{{dump}}
{{dump}}
)):enabledNamespaces.push(new RegExp(`^${n}
Midscene Visualizer
{{dump}}
));for(const n of debuggers)n.enabled=enabled(n.namespace)}function enabled(e){if(e.endsWith(\"*\"))return!0;for(const t of skippedNamespaces)if(t.test(e))return!1;for(const t of enabledNamespaces)if(t.test(e))return!0;return!1}function disable(){const e=enabledString||\"\";return enable(\"\"),e}function createDebugger(e){const t=Object.assign((function(...r){t.enabled&&(r.length>0&&(r[0]=`${e} ${r[0]}`),t.log(...r))}),{enabled:enabled(e),destroy:destroy2,log:debugObj.log,namespace:e,extend:extend});return debuggers.push(t),t}function destroy2(){const e=debuggers.indexOf(this);return e>=0&&(debuggers.splice(e,1),!0)}function extend(e){const t=createDebugger(`${this.namespace}:${e}`);return t.log=this.log,t}var init_debug=__esm({\"../../node_modules/.pnpm/@azure+logger@1.1.4/node_modules/@azure/logger/dist/browser/debug.js\"(){init_globals(),init_log(),debugEnvVariable=void 0!==import_browser.default&&import_browser.default.env&&import_browser.default.env.DEBUG||void 0,enabledNamespaces=[],skippedNamespaces=[],debuggers=[],debugEnvVariable&&enable(debugEnvVariable),debugObj=Object.assign((e=>createDebugger(e)),{enable:enable,enabled:enabled,disable:disable,log:log}),debug_default=debugObj}}),registeredLoggers,logLevelFromEnv,azureLogLevel,AzureLogger,AZURE_LOG_LEVELS,levelMap;function setLogLevel(e){if(e&&!isAzureLogLevel(e))throw new Error(`Unknown log level '${e}'. Acceptable values: ${AZURE_LOG_LEVELS.join(\",\")}`);azureLogLevel=e;const t=[];for(const r of registeredLoggers)shouldEnable(r)&&t.push(r.namespace);debug_default.enable(t.join(\",\"))}function getLogLevel(){return azureLogLevel}function createClientLogger(e){const t=AzureLogger.extend(e);return patchLogMethod(AzureLogger,t),{error:createLogger(t,\"error\"),warning:createLogger(t,\"warning\"),info:createLogger(t,\"info\"),verbose:createLogger(t,\"verbose\")}}function patchLogMethod(e,t){t.log=(...t)=>{e.log(...t)}}function createLogger(e,t){const r=Object.assign(e.extend(t),{level:t});if(patchLogMethod(e,r),shouldEnable(r)){const e=debug_default.disable();debug_default.enable(e+\",\"+r.namespace)}return registeredLoggers.add(r),r}function shouldEnable(e){return Boolean(azureLogLevel&&levelMap[e.level]__left_angle_mark_=levelMap[azureLogLevel])}function isAzureLogLevel(e){return AZURE_LOG_LEVELS.includes(e)}var init_browser=__esm({\"../../node_modules/.pnpm/@azure+logger@1.1.4/node_modules/@azure/logger/dist/browser/index.js\"(){init_globals(),init_debug(),registeredLoggers=new Set,logLevelFromEnv=void 0!==import_browser.default&&import_browser.default.env&&import_browser.default.env.AZURE_LOG_LEVEL||void 0,(AzureLogger=debug_default(\"azure\")).log=(...e)=>{debug_default.log(...e)},AZURE_LOG_LEVELS=[\"verbose\",\"info\",\"warning\",\"error\"],logLevelFromEnv&&(isAzureLogLevel(logLevelFromEnv)?setLogLevel(logLevelFromEnv):import_console_browserify.default.error(`AZURE_LOG_LEVEL set to unknown log level '${logLevelFromEnv}'; logging is not enabled. Acceptable values: ${AZURE_LOG_LEVELS.join(\", \")}.`)),levelMap={verbose:400,info:300,warning:200,error:100}}}),logger;function formatSuccess(e){return`SUCCESS. Scopes: ${Array.isArray(e)?e.join(\", \"):e}.`}function formatError(e,t){let r=\"ERROR.\";return(null==e?void 0:e.length)&&(r+=` Scopes: ${Array.isArray(e)?e.join(\", \"):e}.`),`${r} Error message: ${\"string\"==typeof t?t:t.message}.`}function credentialLoggerInstance(e,t,r=logger){const n=t?`${t.fullTitle} ${e}`:e;return{title:e,fullTitle:n,info:function(e){r.info(`${n} =>`,e)},warning:function(e){r.warning(`${n} =>`,e)},verbose:function(e){r.verbose(`${n} =>`,e)},error:function(e){r.error(`${n} =>`,e)}}}function credentialLogger(e,t=logger){const r=credentialLoggerInstance(e,void 0,t);return Object.assign(Object.assign({},r),{parent:t,getToken:credentialLoggerInstance(\"=> getToken()\",r,t)})}var init_logging=__esm({\"../../node_modules/.pnpm/@azure+identity@4.5.0/node_modules/@azure/identity/dist-esm/src/util/logging.js\"(){init_globals(),init_browser(),logger=createClientLogger(\"identity\")}}),CredentialUnavailableErrorName,CredentialUnavailableError,AuthenticationErrorName,AuthenticationError,AggregateAuthenticationErrorName,AggregateAuthenticationError,AuthenticationRequiredError;function isErrorResponse(e){return e&&\"string\"==typeof e.error&&\"string\"==typeof e.error_description}function convertOAuthErrorResponseToErrorResponse(e){return{error:e.error,errorDescription:e.error_description,correlationId:e.correlation_id,errorCodes:e.error_codes,timestamp:e.timestamp,traceId:e.trace_id}}var init_errors=__esm({\"../../node_modules/.pnpm/@azure+identity@4.5.0/node_modules/@azure/identity/dist-esm/src/errors.js\"(){init_globals(),CredentialUnavailableErrorName=\"CredentialUnavailableError\",CredentialUnavailableError=class extends Error{constructor(e,t){super(e,t),this.name=CredentialUnavailableErrorName}},AuthenticationErrorName=\"AuthenticationError\",AuthenticationError=class extends Error{constructor(e,t,r){let n={error:\"unknown\",errorDescription:\"An unknown error occurred and no additional details are available.\"};if(isErrorResponse(t))n=convertOAuthErrorResponseToErrorResponse(t);else if(\"string\"==typeof t)try{n=convertOAuthErrorResponseToErrorResponse(JSON.parse(t))}catch(i){n=400===e?{error:\"invalid_request\",errorDescription:`The service indicated that the request was invalid.\\n\\n${t}`}:{error:\"unknown_error\",errorDescription:`An unknown error has occurred. Response body:\\n\\n${t}`}}else n={error:\"unknown_error\",errorDescription:\"An unknown error occurred and no additional details are available.\"};super(`${n.error} Status code: ${e}\\nMore details:\\n${n.errorDescription},`,r),this.statusCode=e,this.errorResponse=n,this.name=AuthenticationErrorName}},AggregateAuthenticationErrorName=\"AggregateAuthenticationError\",AggregateAuthenticationError=class extends Error{constructor(e,t){super(`${t}\\n${e.join(\"\\n\")}`),this.errors=e,this.name=AggregateAuthenticationErrorName}},AuthenticationRequiredError=class extends Error{constructor(e){super(e.message,e.cause?{cause:e.cause}:void 0),this.scopes=e.scopes,this.getTokenOptions=e.getTokenOptions,this.name=\"AuthenticationRequiredError\"}}}}),SDK_VERSION,DeveloperSignOnClientId,DefaultTenantId,AzureAuthorityHosts,DefaultAuthorityHost,ALL_TENANTS,init_constants=__esm({\"../../node_modules/.pnpm/@azure+identity@4.5.0/node_modules/@azure/identity/dist-esm/src/constants.js\"(){var e;init_globals(),SDK_VERSION=\"4.5.0\",DeveloperSignOnClientId=\"04b07795-8ddb-461a-bbee-02f9e1bf7b46\",DefaultTenantId=\"common\",(e=AzureAuthorityHosts||(AzureAuthorityHosts={})).AzureChina=\"https://login.chinacloudapi.cn\",e.AzureGermany=\"https://login.microsoftonline.de\",e.AzureGovernment=\"https://login.microsoftonline.us\",e.AzurePublicCloud=\"https://login.microsoftonline.com\",DefaultAuthorityHost=AzureAuthorityHosts.AzurePublicCloud,ALL_TENANTS=[\"*\"]}}),knownContextKeys,TracingContextImpl;function createTracingContext(e={}){let t=new TracingContextImpl(e.parentContext);return e.span&&(t=t.setValue(knownContextKeys.span,e.span)),e.namespace&&(t=t.setValue(knownContextKeys.namespace,e.namespace)),t}var init_tracingContext=__esm({\"../../node_modules/.pnpm/@azure+core-tracing@1.2.0/node_modules/@azure/core-tracing/dist/browser/tracingContext.js\"(){init_globals(),knownContextKeys={span:Symbol.for(\"@azure/core-tracing span\"),namespace:Symbol.for(\"@azure/core-tracing namespace\")},TracingContextImpl=class e{setValue(t,r){const n=new e(this);return n._contextMap.set(t,r),n}getValue(e){return this._contextMap.get(e)}deleteValue(t){const r=new e(this);return r._contextMap.delete(t),r}constructor(t){this._contextMap=t instanceof e?new Map(t._contextMap):new Map}}}}),state,init_state=__esm({\"../../node_modules/.pnpm/@azure+core-tracing@1.2.0/node_modules/@azure/core-tracing/dist/browser/state.js\"(){init_globals(),state={instrumenterImplementation:void 0}}});function createDefaultTracingSpan(){return{end:()=>{},isRecording:()=>!1,recordException:()=>{},setAttribute:()=>{},setStatus:()=>{},addEvent:()=>{}}}function createDefaultInstrumenter(){return{createRequestHeaders:()=>({}),parseTraceparentHeader:()=>{},startSpan:(e,t)=>({span:createDefaultTracingSpan(),tracingContext:createTracingContext({parentContext:t.tracingContext})}),withContext:(e,t,...r)=>t(...r)}}function getInstrumenter(){return state.instrumenterImplementation||(state.instrumenterImplementation=createDefaultInstrumenter()),state.instrumenterImplementation}var init_instrumenter=__esm({\"../../node_modules/.pnpm/@azure+core-tracing@1.2.0/node_modules/@azure/core-tracing/dist/browser/instrumenter.js\"(){init_globals(),init_tracingContext(),init_state()}});function createTracingClient(e){const{namespace:t,packageName:r,packageVersion:n}=e;function i(e,i,o){var a;const s=getInstrumenter().startSpan(e,Object.assign(Object.assign({},o),{packageName:r,packageVersion:n,tracingContext:null===(a=null==i?void 0:i.tracingOptions)||void 0===a?void 0:a.tracingContext}));let l=s.tracingContext;const u=s.span;return l.getValue(knownContextKeys.namespace)||(l=l.setValue(knownContextKeys.namespace,t)),u.setAttribute(\"az.namespace\",l.getValue(knownContextKeys.namespace)),{span:u,updatedOptions:Object.assign({},i,{tracingOptions:Object.assign(Object.assign({},null==i?void 0:i.tracingOptions),{tracingContext:l})})}}function o(e,t,...r){return getInstrumenter().withContext(e,t,...r)}return{startSpan:i,withSpan:async function(e,t,r,n){const{span:a,updatedOptions:s}=i(e,t,n);try{const e=await o(s.tracingOptions.tracingContext,(()=>Promise.resolve(r(s,a))));return a.setStatus({status:\"success\"}),e}catch(l){throw a.setStatus({status:\"error\",error:l}),l}finally{a.end()}},withContext:o,parseTraceparentHeader:function(e){return getInstrumenter().parseTraceparentHeader(e)},createRequestHeaders:function(e){return getInstrumenter().createRequestHeaders(e)}}}var init_tracingClient=__esm({\"../../node_modules/.pnpm/@azure+core-tracing@1.2.0/node_modules/@azure/core-tracing/dist/browser/tracingClient.js\"(){init_globals(),init_instrumenter(),init_tracingContext()}}),init_browser2=__esm({\"../../node_modules/.pnpm/@azure+core-tracing@1.2.0/node_modules/@azure/core-tracing/dist/browser/index.js\"(){init_globals(),init_instrumenter(),init_tracingClient()}}),tracingClient,init_tracing=__esm({\"../../node_modules/.pnpm/@azure+identity@4.5.0/node_modules/@azure/identity/dist-esm/src/util/tracing.js\"(){init_globals(),init_constants(),init_browser2(),tracingClient=createTracingClient({namespace:\"Microsoft.AAD\",packageName:\"@azure/identity\",packageVersion:SDK_VERSION})}}),logger2,ChainedTokenCredential,init_chainedTokenCredential=__esm({\"../../node_modules/.pnpm/@azure+identity@4.5.0/node_modules/@azure/identity/dist-esm/src/credentials/chainedTokenCredential.js\"(){init_globals(),init_errors(),init_logging(),init_tracing(),logger2=credentialLogger(\"ChainedTokenCredential\"),ChainedTokenCredential=class{async getToken(e,t={}){const{token:r}=await this.getTokenInternal(e,t);return r}async getTokenInternal(e,t={}){let r,n=null;const i=[];return tracingClient.withSpan(\"ChainedTokenCredential.getToken\",t,(async t=>{for(let a=0;a__left_angle_mark_this._sources.length&&null===n;a++)try{n=await this._sources[a].getToken(e,t),r=this._sources[a]}catch(o){if(\"CredentialUnavailableError\"!==o.name&&\"AuthenticationRequiredError\"!==o.name)throw logger2.getToken.info(formatError(e,o)),o;i.push(o)}if(!n&&i.length>0){const t=new AggregateAuthenticationError(i,\"ChainedTokenCredential authentication failed.\");throw logger2.getToken.info(formatError(e,t)),t}if(logger2.getToken.info(`Result for ${r.constructor.name}: ${formatSuccess(e)}`),null===n)throw new CredentialUnavailableError(\"Failed to retrieve a valid token\");return{token:n,successfulCredential:r}}))}constructor(...e){this._sources=[],this._sources=e}}}}),BrowserNotSupportedError,logger3,DefaultAzureCredential,init_defaultAzureCredential_browser=__esm({\"../../node_modules/.pnpm/@azure+identity@4.5.0/node_modules/@azure/identity/dist-esm/src/credentials/defaultAzureCredential.browser.js\"(){init_globals(),init_logging(),init_chainedTokenCredential(),BrowserNotSupportedError=new Error(\"DefaultAzureCredential is not supported in the browser. Use InteractiveBrowserCredential instead.\"),logger3=credentialLogger(\"DefaultAzureCredential\"),DefaultAzureCredential=class extends ChainedTokenCredential{getToken(){throw logger3.getToken.info(formatError(\"\",BrowserNotSupportedError)),BrowserNotSupportedError}constructor(e){throw super(),logger3.info(formatError(\"\",BrowserNotSupportedError)),BrowserNotSupportedError}}}}),AbortError,init_AbortError=__esm({\"../../node_modules/.pnpm/@azure+abort-controller@2.1.2/node_modules/@azure/abort-controller/dist/browser/AbortError.js\"(){init_globals(),AbortError=class extends Error{constructor(e){super(e),this.name=\"AbortError\"}}}}),init_browser3=__esm({\"../../node_modules/.pnpm/@azure+abort-controller@2.1.2/node_modules/@azure/abort-controller/dist/browser/index.js\"(){init_globals(),init_AbortError()}}),init_createAbortablePromise=__esm({\"../../node_modules/.pnpm/@azure+core-util@1.11.0/node_modules/@azure/core-util/dist/browser/createAbortablePromise.js\"(){init_globals(),init_browser3()}});function getRandomIntegerInclusive(e,t){return e=Math.ceil(e),t=Math.floor(t),Math.floor(Math.random()*(t-e+1))+e}var init_random=__esm({\"../../node_modules/.pnpm/@azure+core-util@1.11.0/node_modules/@azure/core-util/dist/browser/random.js\"(){init_globals()}});function calculateRetryDelay(e,t){const r=t.retryDelayInMs*Math.pow(2,e),n=Math.min(t.maxRetryDelayInMs,r);return{retryAfterInMs:n/2+getRandomIntegerInclusive(0,n/2)}}var init_delay=__esm({\"../../node_modules/.pnpm/@azure+core-util@1.11.0/node_modules/@azure/core-util/dist/browser/delay.js\"(){init_globals(),init_createAbortablePromise(),init_random()}}),init_aborterUtils=__esm({\"../../node_modules/.pnpm/@azure+core-util@1.11.0/node_modules/@azure/core-util/dist/browser/aborterUtils.js\"(){init_globals()}});function isObject2(e){return!(\"object\"!=typeof e||null===e||Array.isArray(e)||e instanceof RegExp||e instanceof Date)}var init_object=__esm({\"../../node_modules/.pnpm/@azure+core-util@1.11.0/node_modules/@azure/core-util/dist/browser/object.js\"(){init_globals()}});function isError(e){if(isObject2(e)){const t=\"string\"==typeof e.name,r=\"string\"==typeof e.message;return t&&r}return!1}function getErrorMessage(e){if(isError(e))return e.message;{let r;try{r=\"object\"==typeof e&&e?JSON.stringify(e):String(e)}catch(t){r=\"[unable to stringify input]\"}return`Unknown error ${r}`}}var init_error=__esm({\"../../node_modules/.pnpm/@azure+core-util@1.11.0/node_modules/@azure/core-util/dist/browser/error.js\"(){init_globals(),init_object()}}),hexDigits;function stringToUint8Array(e,t){switch(t){case\"utf-8\":return utf8StringToUint8Array(e);case\"base64\":return base64ToUint8Array(e);case\"base64url\":return base64UrlToUint8Array(e);case\"hex\":return hexStringToUint8Array(e)}}function utf8StringToUint8Array(e){return(new TextEncoder).encode(e)}function base64ToUint8Array(e){return new Uint8Array([...atob(e)].map((e=>e.charCodeAt(0))))}function base64UrlToUint8Array(e){return base64ToUint8Array(e.replace(/-/g,\"+\").replace(/_/g,\"/\"))}function hexStringToUint8Array(e){const t=new Uint8Array(e.length/2);for(let r=0;r__left_angle_mark_e.length/2;++r){const n=e[2*r],i=e[2*r+1];if(!hexDigits.has(n)||!hexDigits.has(i))return t.slice(0,r);t[r]=parseInt(`${n}${i}`,16)}return t}var init_bytesEncoding_common=__esm({\"../../node_modules/.pnpm/@azure+core-util@1.11.0/node_modules/@azure/core-util/dist/browser/bytesEncoding.common.js\"(){init_globals(),hexDigits=new Set(\"0123456789abcdefABCDEF\")}}),init_bytesEncoding=__esm({\"../../node_modules/.pnpm/@azure+core-util@1.11.0/node_modules/@azure/core-util/dist/browser/bytesEncoding.js\"(){init_globals(),init_bytesEncoding_common()}}),init_sha256_common=__esm({\"../../node_modules/.pnpm/@azure+core-util@1.11.0/node_modules/@azure/core-util/dist/browser/sha256.common.js\"(){init_globals(),init_bytesEncoding()}}),init_sha256=__esm({\"../../node_modules/.pnpm/@azure+core-util@1.11.0/node_modules/@azure/core-util/dist/browser/sha256.js\"(){init_globals(),init_sha256_common()}}),init_typeGuards=__esm({\"../../node_modules/.pnpm/@azure+core-util@1.11.0/node_modules/@azure/core-util/dist/browser/typeGuards.js\"(){init_globals()}});function generateUUID(){let e=\"\";for(let t=0;t__left_angle_mark_32;t++){const r=Math.floor(16*Math.random());e+=12===t?\"4\":16===t?3&r|8:r.toString(16),7!==t&&11!==t&&15!==t&&19!==t||(e+=\"-\")}return e}var init_uuidUtils_common=__esm({\"../../node_modules/.pnpm/@azure+core-util@1.11.0/node_modules/@azure/core-util/dist/browser/uuidUtils.common.js\"(){init_globals()}}),_a2,uuidFunction;function randomUUID(){return uuidFunction()}var init_uuidUtils=__esm({\"../../node_modules/.pnpm/@azure+core-util@1.11.0/node_modules/@azure/core-util/dist/browser/uuidUtils.js\"(){init_globals(),init_uuidUtils_common(),uuidFunction=\"function\"==typeof(null===(_a2=null===globalThis||void 0===globalThis?void 0:globalThis.crypto)||void 0===_a2?void 0:_a2.randomUUID)?globalThis.crypto.randomUUID.bind(globalThis.crypto):generateUUID}}),_a3,_b,_c,_d,isBrowser2,isWebWorker,isDeno,isBun,isNodeLike,isNode,isReactNative,init_checkEnvironment=__esm({\"../../node_modules/.pnpm/@azure+core-util@1.11.0/node_modules/@azure/core-util/dist/browser/checkEnvironment.js\"(){init_globals(),isBrowser2=\"undefined\"!=typeof window&&void 0!==window.document,isWebWorker=\"object\"==typeof self&&\"function\"==typeof(null===self||void 0===self?void 0:self.importScripts)&&(\"DedicatedWorkerGlobalScope\"===(null===(_a3=self.constructor)||void 0===_a3?void 0:_a3.name)||\"ServiceWorkerGlobalScope\"===(null===(_b=self.constructor)||void 0===_b?void 0:_b.name)||\"SharedWorkerGlobalScope\"===(null===(_c=self.constructor)||void 0===_c?void 0:_c.name)),isDeno=\"undefined\"!=typeof Deno&&void 0!==Deno.version&&void 0!==Deno.version.deno,isBun=\"undefined\"!=typeof Bun&&void 0!==Bun.version,isNodeLike=void 0!==globalThis.process&&Boolean(globalThis.process.version)&&Boolean(null===(_d=globalThis.process.versions)||void 0===_d?void 0:_d.node),isNode=isNodeLike,isReactNative=\"undefined\"!=typeof navigator&&\"ReactNative\"===(null===navigator||void 0===navigator?void 0:navigator.product)}}),init_browser4=__esm({\"../../node_modules/.pnpm/@azure+core-util@1.11.0/node_modules/@azure/core-util/dist/browser/index.js\"(){init_globals(),init_delay(),init_aborterUtils(),init_createAbortablePromise(),init_random(),init_object(),init_error(),init_sha256(),init_typeGuards(),init_uuidUtils(),init_checkEnvironment(),init_bytesEncoding()}}),Constants,HttpStatus,OIDC_DEFAULT_SCOPES,OIDC_SCOPES,HeaderNames,PersistentCacheKeys,AADAuthorityConstants,ClaimsRequestKeys,PromptValue,CodeChallengeMethodValues,ServerResponseType,ResponseMode,GrantType,CacheAccountType,Separators,CredentialType,APP_METADATA,CLIENT_INFO,THE_FAMILY_ID,AUTHORITY_METADATA_CONSTANTS,AuthorityMetadataSource,SERVER_TELEM_CONSTANTS,AuthenticationScheme,ThrottlingConstants,Errors,PasswordGrantConstants,ResponseCodes,RegionDiscoverySources,RegionDiscoveryOutcomes,CacheOutcome,JsonWebTokenTypes,DEFAULT_TOKEN_RENEWAL_OFFSET_SEC,init_Constants=__esm({\"../../node_modules/.pnpm/@azure+msal-common@14.16.0/node_modules/@azure/msal-common/dist/utils/Constants.mjs\"(){init_globals(),HttpStatus={SUCCESS:200,SUCCESS_RANGE_START:200,SUCCESS_RANGE_END:299,REDIRECT:302,CLIENT_ERROR:400,CLIENT_ERROR_RANGE_START:400,BAD_REQUEST:400,UNAUTHORIZED:401,NOT_FOUND:404,REQUEST_TIMEOUT:408,TOO_MANY_REQUESTS:429,CLIENT_ERROR_RANGE_END:499,SERVER_ERROR:500,SERVER_ERROR_RANGE_START:500,SERVICE_UNAVAILABLE:503,GATEWAY_TIMEOUT:504,SERVER_ERROR_RANGE_END:599,MULTI_SIDED_ERROR:600},OIDC_DEFAULT_SCOPES=[(Constants={LIBRARY_NAME:\"MSAL.JS\",SKU:\"msal.js.common\",CACHE_PREFIX:\"msal\",DEFAULT_AUTHORITY:\"https://login.microsoftonline.com/common/\",DEFAULT_AUTHORITY_HOST:\"login.microsoftonline.com\",DEFAULT_COMMON_TENANT:\"common\",ADFS:\"adfs\",DSTS:\"dstsv2\",AAD_INSTANCE_DISCOVERY_ENDPT:\"https://login.microsoftonline.com/common/discovery/instance?api-version=1.1&authorization_endpoint=\",CIAM_AUTH_URL:\".ciamlogin.com\",AAD_TENANT_DOMAIN_SUFFIX:\".onmicrosoft.com\",RESOURCE_DELIM:\"|\",NO_ACCOUNT:\"NO_ACCOUNT\",CLAIMS:\"claims\",CONSUMER_UTID:\"9188040d-6c67-4c5b-b112-36a304b66dad\",OPENID_SCOPE:\"openid\",PROFILE_SCOPE:\"profile\",OFFLINE_ACCESS_SCOPE:\"offline_access\",EMAIL_SCOPE:\"email\",CODE_RESPONSE_TYPE:\"code\",CODE_GRANT_TYPE:\"authorization_code\",RT_GRANT_TYPE:\"refresh_token\",FRAGMENT_RESPONSE_MODE:\"fragment\",S256_CODE_CHALLENGE_METHOD:\"S256\",URL_FORM_CONTENT_TYPE:\"application/x-www-form-urlencoded;charset=utf-8\",AUTHORIZATION_PENDING:\"authorization_pending\",NOT_DEFINED:\"not_defined\",EMPTY_STRING:\"\",NOT_APPLICABLE:\"N/A\",NOT_AVAILABLE:\"Not Available\",FORWARD_SLASH:\"/\",IMDS_ENDPOINT:\"http://169.254.169.254/metadata/instance/compute/location\",IMDS_VERSION:\"2020-06-01\",IMDS_TIMEOUT:2e3,AZURE_REGION_AUTO_DISCOVER_FLAG:\"TryAutoDetect\",REGIONAL_AUTH_PUBLIC_CLOUD_SUFFIX:\"login.microsoft.com\",KNOWN_PUBLIC_CLOUDS:[\"login.microsoftonline.com\",\"login.windows.net\",\"login.microsoft.com\",\"sts.windows.net\"],TOKEN_RESPONSE_TYPE:\"token\",ID_TOKEN_RESPONSE_TYPE:\"id_token\",SHR_NONCE_VALIDITY:240,INVALID_INSTANCE:\"invalid_instance\"}).OPENID_SCOPE,Constants.PROFILE_SCOPE,Constants.OFFLINE_ACCESS_SCOPE],OIDC_SCOPES=[...OIDC_DEFAULT_SCOPES,Constants.EMAIL_SCOPE],HeaderNames={CONTENT_TYPE:\"Content-Type\",CONTENT_LENGTH:\"Content-Length\",RETRY_AFTER:\"Retry-After\",CCS_HEADER:\"X-AnchorMailbox\",WWWAuthenticate:\"WWW-Authenticate\",AuthenticationInfo:\"Authentication-Info\",X_MS_REQUEST_ID:\"x-ms-request-id\",X_MS_HTTP_VERSION:\"x-ms-httpver\"},PersistentCacheKeys={ID_TOKEN:\"idtoken\",CLIENT_INFO:\"client.info\",ADAL_ID_TOKEN:\"adal.idtoken\",ERROR:\"error\",ERROR_DESC:\"error.description\",ACTIVE_ACCOUNT:\"active-account\",ACTIVE_ACCOUNT_FILTERS:\"active-account-filters\"},AADAuthorityConstants={COMMON:\"common\",ORGANIZATIONS:\"organizations\",CONSUMERS:\"consumers\"},ClaimsRequestKeys={ACCESS_TOKEN:\"access_token\",XMS_CC:\"xms_cc\"},PromptValue={LOGIN:\"login\",SELECT_ACCOUNT:\"select_account\",CONSENT:\"consent\",NONE:\"none\",CREATE:\"create\",NO_SESSION:\"no_session\"},CodeChallengeMethodValues={PLAIN:\"plain\",S256:\"S256\"},ServerResponseType={QUERY:\"query\",FRAGMENT:\"fragment\"},ResponseMode={...ServerResponseType,FORM_POST:\"form_post\"},GrantType={IMPLICIT_GRANT:\"implicit\",AUTHORIZATION_CODE_GRANT:\"authorization_code\",CLIENT_CREDENTIALS_GRANT:\"client_credentials\",RESOURCE_OWNER_PASSWORD_GRANT:\"password\",REFRESH_TOKEN_GRANT:\"refresh_token\",DEVICE_CODE_GRANT:\"device_code\",JWT_BEARER:\"urn:ietf:params:oauth:grant-type:jwt-bearer\"},CacheAccountType={MSSTS_ACCOUNT_TYPE:\"MSSTS\",ADFS_ACCOUNT_TYPE:\"ADFS\",MSAV1_ACCOUNT_TYPE:\"MSA\",GENERIC_ACCOUNT_TYPE:\"Generic\"},Separators={CACHE_KEY_SEPARATOR:\"-\",CLIENT_INFO_SEPARATOR:\".\"},CredentialType={ID_TOKEN:\"IdToken\",ACCESS_TOKEN:\"AccessToken\",ACCESS_TOKEN_WITH_AUTH_SCHEME:\"AccessToken_With_AuthScheme\",REFRESH_TOKEN:\"RefreshToken\"},APP_METADATA=\"appmetadata\",CLIENT_INFO=\"client_info\",THE_FAMILY_ID=\"1\",AUTHORITY_METADATA_CONSTANTS={CACHE_KEY:\"authority-metadata\",REFRESH_TIME_SECONDS:86400},AuthorityMetadataSource={CONFIG:\"config\",CACHE:\"cache\",NETWORK:\"network\",HARDCODED_VALUES:\"hardcoded_values\"},SERVER_TELEM_CONSTANTS={SCHEMA_VERSION:5,MAX_CUR_HEADER_BYTES:80,MAX_LAST_HEADER_BYTES:330,MAX_CACHED_ERRORS:50,CACHE_KEY:\"server-telemetry\",CATEGORY_SEPARATOR:\"|\",VALUE_SEPARATOR:\",\",OVERFLOW_TRUE:\"1\",OVERFLOW_FALSE:\"0\",UNKNOWN_ERROR:\"unknown_error\"},AuthenticationScheme={BEARER:\"Bearer\",POP:\"pop\",SSH:\"ssh-cert\"},ThrottlingConstants={DEFAULT_THROTTLE_TIME_SECONDS:60,DEFAULT_MAX_THROTTLE_TIME_SECONDS:3600,THROTTLING_PREFIX:\"throttling\",X_MS_LIB_CAPABILITY_VALUE:\"retry-after, h429\"},Errors={INVALID_GRANT_ERROR:\"invalid_grant\",CLIENT_MISMATCH_ERROR:\"client_mismatch\"},PasswordGrantConstants={username:\"username\",password:\"password\"},ResponseCodes={httpSuccess:200,httpBadRequest:400},RegionDiscoverySources={FAILED_AUTO_DETECTION:\"1\",INTERNAL_CACHE:\"2\",ENVIRONMENT_VARIABLE:\"3\",IMDS:\"4\"},RegionDiscoveryOutcomes={CONFIGURED_MATCHES_DETECTED:\"1\",CONFIGURED_NO_AUTO_DETECTION:\"2\",CONFIGURED_NOT_DETECTED:\"3\",AUTO_DETECTION_REQUESTED_SUCCESSFUL:\"4\",AUTO_DETECTION_REQUESTED_FAILED:\"5\"},CacheOutcome={NOT_APPLICABLE:\"0\",FORCE_REFRESH_OR_CLAIMS:\"1\",NO_CACHED_ACCESS_TOKEN:\"2\",CACHED_ACCESS_TOKEN_EXPIRED:\"3\",PROACTIVELY_REFRESHED:\"4\"},JsonWebTokenTypes={Jwt:\"JWT\",Jwk:\"JWK\",Pop:\"pop\"},DEFAULT_TOKEN_RENEWAL_OFFSET_SEC=300}}),AuthErrorCodes_exports={},unexpectedError,postRequestFailed;__export(AuthErrorCodes_exports,{postRequestFailed:()=>postRequestFailed,unexpectedError:()=>unexpectedError});var init_AuthErrorCodes=__esm({\"../../node_modules/.pnpm/@azure+msal-common@14.16.0/node_modules/@azure/msal-common/dist/error/AuthErrorCodes.mjs\"(){init_globals(),unexpectedError=\"unexpected_error\",postRequestFailed=\"post_request_failed\"}}),AuthErrorMessages,AuthErrorMessage,AuthError;function createAuthError(e,t){return new AuthError(e,t?`${AuthErrorMessages[e]} ${t}`:AuthErrorMessages[e])}var init_AuthError=__esm({\"../../node_modules/.pnpm/@azure+msal-common@14.16.0/node_modules/@azure/msal-common/dist/error/AuthError.mjs\"(){init_globals(),init_Constants(),init_AuthErrorCodes(),AuthErrorMessage={unexpectedError:{code:unexpectedError,desc:(AuthErrorMessages={[unexpectedError]:\"Unexpected error in authentication.\",[postRequestFailed]:\"Post request failed from the network, could be a 4xx/5xx or a network unavailability. Please check the exact error code for details.\"})[unexpectedError]},postRequestFailed:{code:postRequestFailed,desc:AuthErrorMessages[postRequestFailed]}},AuthError=class e extends Error{setCorrelationId(e){this.correlationId=e}constructor(t,r,n){super(r?`${t}: ${r}`:t),Object.setPrototypeOf(this,e.prototype),this.errorCode=t||Constants.EMPTY_STRING,this.errorMessage=r||Constants.EMPTY_STRING,this.subError=n||Constants.EMPTY_STRING,this.name=\"AuthError\"}}}}),ClientAuthErrorCodes_exports={},clientInfoDecodingError,clientInfoEmptyError,tokenParsingError,nullOrEmptyToken,endpointResolutionError,networkError,openIdConfigError,hashNotDeserialized,invalidState,stateMismatch,stateNotFound,nonceMismatch,authTimeNotFound,maxAgeTranspired,multipleMatchingTokens,multipleMatchingAccounts,multipleMatchingAppMetadata,requestCannotBeMade,cannotRemoveEmptyScope,cannotAppendScopeSet,emptyInputScopeSet,deviceCodePollingCancelled,deviceCodeExpired,deviceCodeUnknownError,noAccountInSilentRequest,invalidCacheRecord,invalidCacheEnvironment,noAccountFound,noCryptoObject,unexpectedCredentialType,invalidAssertion,invalidClientCredential,tokenRefreshRequired,userTimeoutReached,tokenClaimsCnfRequiredForSignedJwt,authorizationCodeMissingFromServerResponse,bindingKeyNotRemoved,endSessionEndpointNotSupported,keyIdMissing,noNetworkConnectivity,userCanceled,missingTenantIdError,methodNotImplemented,nestedAppAuthBridgeDisabled;__export(ClientAuthErrorCodes_exports,{authTimeNotFound:()=>authTimeNotFound,authorizationCodeMissingFromServerResponse:()=>authorizationCodeMissingFromServerResponse,bindingKeyNotRemoved:()=>bindingKeyNotRemoved,cannotAppendScopeSet:()=>cannotAppendScopeSet,cannotRemoveEmptyScope:()=>cannotRemoveEmptyScope,clientInfoDecodingError:()=>clientInfoDecodingError,clientInfoEmptyError:()=>clientInfoEmptyError,deviceCodeExpired:()=>deviceCodeExpired,deviceCodePollingCancelled:()=>deviceCodePollingCancelled,deviceCodeUnknownError:()=>deviceCodeUnknownError,emptyInputScopeSet:()=>emptyInputScopeSet,endSessionEndpointNotSupported:()=>endSessionEndpointNotSupported,endpointResolutionError:()=>endpointResolutionError,hashNotDeserialized:()=>hashNotDeserialized,invalidAssertion:()=>invalidAssertion,invalidCacheEnvironment:()=>invalidCacheEnvironment,invalidCacheRecord:()=>invalidCacheRecord,invalidClientCredential:()=>invalidClientCredential,invalidState:()=>invalidState,keyIdMissing:()=>keyIdMissing,maxAgeTranspired:()=>maxAgeTranspired,methodNotImplemented:()=>methodNotImplemented,missingTenantIdError:()=>missingTenantIdError,multipleMatchingAccounts:()=>multipleMatchingAccounts,multipleMatchingAppMetadata:()=>multipleMatchingAppMetadata,multipleMatchingTokens:()=>multipleMatchingTokens,nestedAppAuthBridgeDisabled:()=>nestedAppAuthBridgeDisabled,networkError:()=>networkError,noAccountFound:()=>noAccountFound,noAccountInSilentRequest:()=>noAccountInSilentRequest,noCryptoObject:()=>noCryptoObject,noNetworkConnectivity:()=>noNetworkConnectivity,nonceMismatch:()=>nonceMismatch,nullOrEmptyToken:()=>nullOrEmptyToken,openIdConfigError:()=>openIdConfigError,requestCannotBeMade:()=>requestCannotBeMade,stateMismatch:()=>stateMismatch,stateNotFound:()=>stateNotFound,tokenClaimsCnfRequiredForSignedJwt:()=>tokenClaimsCnfRequiredForSignedJwt,tokenParsingError:()=>tokenParsingError,tokenRefreshRequired:()=>tokenRefreshRequired,unexpectedCredentialType:()=>unexpectedCredentialType,userCanceled:()=>userCanceled,userTimeoutReached:()=>userTimeoutReached});var init_ClientAuthErrorCodes=__esm({\"../../node_modules/.pnpm/@azure+msal-common@14.16.0/node_modules/@azure/msal-common/dist/error/ClientAuthErrorCodes.mjs\"(){init_globals(),clientInfoDecodingError=\"client_info_decoding_error\",clientInfoEmptyError=\"client_info_empty_error\",tokenParsingError=\"token_parsing_error\",nullOrEmptyToken=\"null_or_empty_token\",endpointResolutionError=\"endpoints_resolution_error\",networkError=\"network_error\",openIdConfigError=\"openid_config_error\",hashNotDeserialized=\"hash_not_deserialized\",invalidState=\"invalid_state\",stateMismatch=\"state_mismatch\",stateNotFound=\"state_not_found\",nonceMismatch=\"nonce_mismatch\",authTimeNotFound=\"auth_time_not_found\",maxAgeTranspired=\"max_age_transpired\",multipleMatchingTokens=\"multiple_matching_tokens\",multipleMatchingAccounts=\"multiple_matching_accounts\",multipleMatchingAppMetadata=\"multiple_matching_appMetadata\",requestCannotBeMade=\"request_cannot_be_made\",cannotRemoveEmptyScope=\"cannot_remove_empty_scope\",cannotAppendScopeSet=\"cannot_append_scopeset\",emptyInputScopeSet=\"empty_input_scopeset\",deviceCodePollingCancelled=\"device_code_polling_cancelled\",deviceCodeExpired=\"device_code_expired\",deviceCodeUnknownError=\"device_code_unknown_error\",noAccountInSilentRequest=\"no_account_in_silent_request\",invalidCacheRecord=\"invalid_cache_record\",invalidCacheEnvironment=\"invalid_cache_environment\",noAccountFound=\"no_account_found\",noCryptoObject=\"no_crypto_object\",unexpectedCredentialType=\"unexpected_credential_type\",invalidAssertion=\"invalid_assertion\",invalidClientCredential=\"invalid_client_credential\",tokenRefreshRequired=\"token_refresh_required\",userTimeoutReached=\"user_timeout_reached\",tokenClaimsCnfRequiredForSignedJwt=\"token_claims_cnf_required_for_signedjwt\",authorizationCodeMissingFromServerResponse=\"authorization_code_missing_from_server_response\",bindingKeyNotRemoved=\"binding_key_not_removed\",endSessionEndpointNotSupported=\"end_session_endpoint_not_supported\",keyIdMissing=\"key_id_missing\",noNetworkConnectivity=\"no_network_connectivity\",userCanceled=\"user_canceled\",missingTenantIdError=\"missing_tenant_id_error\",methodNotImplemented=\"method_not_implemented\",nestedAppAuthBridgeDisabled=\"nested_app_auth_bridge_disabled\"}}),ClientAuthErrorMessages,ClientAuthErrorMessage,ClientAuthError;function createClientAuthError(e,t){return new ClientAuthError(e,t)}var init_ClientAuthError=__esm({\"../../node_modules/.pnpm/@azure+msal-common@14.16.0/node_modules/@azure/msal-common/dist/error/ClientAuthError.mjs\"(){init_globals(),init_AuthError(),init_ClientAuthErrorCodes(),ClientAuthErrorMessage={clientInfoDecodingError:{code:clientInfoDecodingError,desc:(ClientAuthErrorMessages={[clientInfoDecodingError]:\"The client info could not be parsed/decoded correctly\",[clientInfoEmptyError]:\"The client info was empty\",[tokenParsingError]:\"Token cannot be parsed\",[nullOrEmptyToken]:\"The token is null or empty\",[endpointResolutionError]:\"Endpoints cannot be resolved\",[networkError]:\"Network request failed\",[openIdConfigError]:\"Could not retrieve endpoints. Check your authority and verify the .well-known/openid-configuration endpoint returns the required endpoints.\",[hashNotDeserialized]:\"The hash parameters could not be deserialized\",[invalidState]:\"State was not the expected format\",[stateMismatch]:\"State mismatch error\",[stateNotFound]:\"State not found\",[nonceMismatch]:\"Nonce mismatch error\",[authTimeNotFound]:\"Max Age was requested and the ID token is missing the auth_time variable. auth_time is an optional claim and is not enabled by default - it must be enabled. See https://aka.ms/msaljs/optional-claims for more information.\",[maxAgeTranspired]:\"Max Age is set to 0, or too much time has elapsed since the last end-user authentication.\",[multipleMatchingTokens]:\"The cache contains multiple tokens satisfying the requirements. Call AcquireToken again providing more requirements such as authority or account.\",[multipleMatchingAccounts]:\"The cache contains multiple accounts satisfying the given parameters. Please pass more info to obtain the correct account\",[multipleMatchingAppMetadata]:\"The cache contains multiple appMetadata satisfying the given parameters. Please pass more info to obtain the correct appMetadata\",[requestCannotBeMade]:\"Token request cannot be made without authorization code or refresh token.\",[cannotRemoveEmptyScope]:\"Cannot remove null or empty scope from ScopeSet\",[cannotAppendScopeSet]:\"Cannot append ScopeSet\",[emptyInputScopeSet]:\"Empty input ScopeSet cannot be processed\",[deviceCodePollingCancelled]:\"Caller has cancelled token endpoint polling during device code flow by setting DeviceCodeRequest.cancel = true.\",[deviceCodeExpired]:\"Device code is expired.\",[deviceCodeUnknownError]:\"Device code stopped polling for unknown reasons.\",[noAccountInSilentRequest]:\"Please pass an account object, silent flow is not supported without account information\",[invalidCacheRecord]:\"Cache record object was null or undefined.\",[invalidCacheEnvironment]:\"Invalid environment when attempting to create cache entry\",[noAccountFound]:\"No account found in cache for given key.\",[noCryptoObject]:\"No crypto object detected.\",[unexpectedCredentialType]:\"Unexpected credential type.\",[invalidAssertion]:\"Client assertion must meet requirements described in https://tools.ietf.org/html/rfc7515\",[invalidClientCredential]:\"Client credential (secret, certificate, or assertion) must not be empty when creating a confidential client. An application should at most have one credential\",[tokenRefreshRequired]:\"Cannot return token from cache because it must be refreshed. This may be due to one of the following reasons: forceRefresh parameter is set to true, claims have been requested, there is no cached access token or it is expired.\",[userTimeoutReached]:\"User defined timeout for device code polling reached\",[tokenClaimsCnfRequiredForSignedJwt]:\"Cannot generate a POP jwt if the token_claims are not populated\",[authorizationCodeMissingFromServerResponse]:\"Server response does not contain an authorization code to proceed\",[bindingKeyNotRemoved]:\"Could not remove the credential's binding key from storage.\",[endSessionEndpointNotSupported]:\"The provided authority does not support logout\",[keyIdMissing]:\"A keyId value is missing from the requested bound token's cache record and is required to match the token to it's stored binding key.\",[noNetworkConnectivity]:\"No network connectivity. Check your internet connection.\",[userCanceled]:\"User cancelled the flow.\",[missingTenantIdError]:\"A tenant id - not common, organizations, or consumers - must be specified when using the client_credentials flow.\",[methodNotImplemented]:\"This method has not been implemented\",[nestedAppAuthBridgeDisabled]:\"The nested app auth bridge is disabled\"})[clientInfoDecodingError]},clientInfoEmptyError:{code:clientInfoEmptyError,desc:ClientAuthErrorMessages[clientInfoEmptyError]},tokenParsingError:{code:tokenParsingError,desc:ClientAuthErrorMessages[tokenParsingError]},nullOrEmptyToken:{code:nullOrEmptyToken,desc:ClientAuthErrorMessages[nullOrEmptyToken]},endpointResolutionError:{code:endpointResolutionError,desc:ClientAuthErrorMessages[endpointResolutionError]},networkError:{code:networkError,desc:ClientAuthErrorMessages[networkError]},unableToGetOpenidConfigError:{code:openIdConfigError,desc:ClientAuthErrorMessages[openIdConfigError]},hashNotDeserialized:{code:hashNotDeserialized,desc:ClientAuthErrorMessages[hashNotDeserialized]},invalidStateError:{code:invalidState,desc:ClientAuthErrorMessages[invalidState]},stateMismatchError:{code:stateMismatch,desc:ClientAuthErrorMessages[stateMismatch]},stateNotFoundError:{code:stateNotFound,desc:ClientAuthErrorMessages[stateNotFound]},nonceMismatchError:{code:nonceMismatch,desc:ClientAuthErrorMessages[nonceMismatch]},authTimeNotFoundError:{code:authTimeNotFound,desc:ClientAuthErrorMessages[authTimeNotFound]},maxAgeTranspired:{code:maxAgeTranspired,desc:ClientAuthErrorMessages[maxAgeTranspired]},multipleMatchingTokens:{code:multipleMatchingTokens,desc:ClientAuthErrorMessages[multipleMatchingTokens]},multipleMatchingAccounts:{code:multipleMatchingAccounts,desc:ClientAuthErrorMessages[multipleMatchingAccounts]},multipleMatchingAppMetadata:{code:multipleMatchingAppMetadata,desc:ClientAuthErrorMessages[multipleMatchingAppMetadata]},tokenRequestCannotBeMade:{code:requestCannotBeMade,desc:ClientAuthErrorMessages[requestCannotBeMade]},removeEmptyScopeError:{code:cannotRemoveEmptyScope,desc:ClientAuthErrorMessages[cannotRemoveEmptyScope]},appendScopeSetError:{code:cannotAppendScopeSet,desc:ClientAuthErrorMessages[cannotAppendScopeSet]},emptyInputScopeSetError:{code:emptyInputScopeSet,desc:ClientAuthErrorMessages[emptyInputScopeSet]},DeviceCodePollingCancelled:{code:deviceCodePollingCancelled,desc:ClientAuthErrorMessages[deviceCodePollingCancelled]},DeviceCodeExpired:{code:deviceCodeExpired,desc:ClientAuthErrorMessages[deviceCodeExpired]},DeviceCodeUnknownError:{code:deviceCodeUnknownError,desc:ClientAuthErrorMessages[deviceCodeUnknownError]},NoAccountInSilentRequest:{code:noAccountInSilentRequest,desc:ClientAuthErrorMessages[noAccountInSilentRequest]},invalidCacheRecord:{code:invalidCacheRecord,desc:ClientAuthErrorMessages[invalidCacheRecord]},invalidCacheEnvironment:{code:invalidCacheEnvironment,desc:ClientAuthErrorMessages[invalidCacheEnvironment]},noAccountFound:{code:noAccountFound,desc:ClientAuthErrorMessages[noAccountFound]},noCryptoObj:{code:noCryptoObject,desc:ClientAuthErrorMessages[noCryptoObject]},unexpectedCredentialType:{code:unexpectedCredentialType,desc:ClientAuthErrorMessages[unexpectedCredentialType]},invalidAssertion:{code:invalidAssertion,desc:ClientAuthErrorMessages[invalidAssertion]},invalidClientCredential:{code:invalidClientCredential,desc:ClientAuthErrorMessages[invalidClientCredential]},tokenRefreshRequired:{code:tokenRefreshRequired,desc:ClientAuthErrorMessages[tokenRefreshRequired]},userTimeoutReached:{code:userTimeoutReached,desc:ClientAuthErrorMessages[userTimeoutReached]},tokenClaimsRequired:{code:tokenClaimsCnfRequiredForSignedJwt,desc:ClientAuthErrorMessages[tokenClaimsCnfRequiredForSignedJwt]},noAuthorizationCodeFromServer:{code:authorizationCodeMissingFromServerResponse,desc:ClientAuthErrorMessages[authorizationCodeMissingFromServerResponse]},bindingKeyNotRemovedError:{code:bindingKeyNotRemoved,desc:ClientAuthErrorMessages[bindingKeyNotRemoved]},logoutNotSupported:{code:endSessionEndpointNotSupported,desc:ClientAuthErrorMessages[endSessionEndpointNotSupported]},keyIdMissing:{code:keyIdMissing,desc:ClientAuthErrorMessages[keyIdMissing]},noNetworkConnectivity:{code:noNetworkConnectivity,desc:ClientAuthErrorMessages[noNetworkConnectivity]},userCanceledError:{code:userCanceled,desc:ClientAuthErrorMessages[userCanceled]},missingTenantIdError:{code:missingTenantIdError,desc:ClientAuthErrorMessages[missingTenantIdError]},nestedAppAuthBridgeDisabled:{code:nestedAppAuthBridgeDisabled,desc:ClientAuthErrorMessages[nestedAppAuthBridgeDisabled]}},ClientAuthError=class e extends AuthError{constructor(t,r){super(t,r?`${ClientAuthErrorMessages[t]}: ${r}`:ClientAuthErrorMessages[t]),this.name=\"ClientAuthError\",Object.setPrototypeOf(this,e.prototype)}}}}),DEFAULT_CRYPTO_IMPLEMENTATION,init_ICrypto=__esm({\"../../node_modules/.pnpm/@azure+msal-common@14.16.0/node_modules/@azure/msal-common/dist/crypto/ICrypto.mjs\"(){init_globals(),init_ClientAuthError(),init_ClientAuthErrorCodes(),DEFAULT_CRYPTO_IMPLEMENTATION={createNewGuid:()=>{throw createClientAuthError(methodNotImplemented)},base64Decode:()=>{throw createClientAuthError(methodNotImplemented)},base64Encode:()=>{throw createClientAuthError(methodNotImplemented)},base64UrlEncode:()=>{throw createClientAuthError(methodNotImplemented)},encodeKid:()=>{throw createClientAuthError(methodNotImplemented)},async getPublicKeyThumbprint(){throw createClientAuthError(methodNotImplemented)},async removeTokenBindingKey(){throw createClientAuthError(methodNotImplemented)},async clearKeystore(){throw createClientAuthError(methodNotImplemented)},async signJwt(){throw createClientAuthError(methodNotImplemented)},async hashString(){throw createClientAuthError(methodNotImplemented)}}}}),LogLevel,Logger,init_Logger=__esm({\"../../node_modules/.pnpm/@azure+msal-common@14.16.0/node_modules/@azure/msal-common/dist/logger/Logger.mjs\"(){var e;init_globals(),init_Constants(),(e=LogLevel||(LogLevel={}))[e.Error=0]=\"Error\",e[e.Warning=1]=\"Warning\",e[e.Info=2]=\"Info\",e[e.Verbose=3]=\"Verbose\",e[e.Trace=4]=\"Trace\",Logger=class e{static createDefaultLoggerOptions(){return{loggerCallback:()=>{},piiLoggingEnabled:!1,logLevel:LogLevel.Info}}clone(t,r,n){return new e({loggerCallback:this.localCallback,piiLoggingEnabled:this.piiLoggingEnabled,logLevel:this.level,correlationId:n||this.correlationId},t,r)}logMessage(e,t){if(t.logLevel>this.level||!this.piiLoggingEnabled&&t.containsPii)return;const r=`[${(new Date).toUTCString()}] : [${t.correlationId||this.correlationId||\"\"}] : ${this.packageName}@${this.packageVersion} : ${LogLevel[t.logLevel]} - ${e}`;this.executeCallback(t.logLevel,r,t.containsPii||!1)}executeCallback(e,t,r){this.localCallback&&this.localCallback(e,t,r)}error(e,t){this.logMessage(e,{logLevel:LogLevel.Error,containsPii:!1,correlationId:t||Constants.EMPTY_STRING})}errorPii(e,t){this.logMessage(e,{logLevel:LogLevel.Error,containsPii:!0,correlationId:t||Constants.EMPTY_STRING})}warning(e,t){this.logMessage(e,{logLevel:LogLevel.Warning,containsPii:!1,correlationId:t||Constants.EMPTY_STRING})}warningPii(e,t){this.logMessage(e,{logLevel:LogLevel.Warning,containsPii:!0,correlationId:t||Constants.EMPTY_STRING})}info(e,t){this.logMessage(e,{logLevel:LogLevel.Info,containsPii:!1,correlationId:t||Constants.EMPTY_STRING})}infoPii(e,t){this.logMessage(e,{logLevel:LogLevel.Info,containsPii:!0,correlationId:t||Constants.EMPTY_STRING})}verbose(e,t){this.logMessage(e,{logLevel:LogLevel.Verbose,containsPii:!1,correlationId:t||Constants.EMPTY_STRING})}verbosePii(e,t){this.logMessage(e,{logLevel:LogLevel.Verbose,containsPii:!0,correlationId:t||Constants.EMPTY_STRING})}trace(e,t){this.logMessage(e,{logLevel:LogLevel.Trace,containsPii:!1,correlationId:t||Constants.EMPTY_STRING})}tracePii(e,t){this.logMessage(e,{logLevel:LogLevel.Trace,containsPii:!0,correlationId:t||Constants.EMPTY_STRING})}isPiiLoggingEnabled(){return this.piiLoggingEnabled||!1}constructor(t,r,n){this.level=LogLevel.Info;const i=t||e.createDefaultLoggerOptions();this.localCallback=i.loggerCallback||(()=>{}),this.piiLoggingEnabled=i.piiLoggingEnabled||!1,this.level=\"number\"==typeof i.logLevel?i.logLevel:LogLevel.Info,this.correlationId=i.correlationId||Constants.EMPTY_STRING,this.packageName=r||Constants.EMPTY_STRING,this.packageVersion=n||Constants.EMPTY_STRING}}}}),name,version3,init_packageMetadata=__esm({\"../../node_modules/.pnpm/@azure+msal-common@14.16.0/node_modules/@azure/msal-common/dist/packageMetadata.mjs\"(){init_globals(),name=\"@azure/msal-common\",version3=\"14.16.0\"}}),AzureCloudInstance,init_AuthorityOptions=__esm({\"../../node_modules/.pnpm/@azure+msal-common@14.16.0/node_modules/@azure/msal-common/dist/authority/AuthorityOptions.mjs\"(){init_globals(),AzureCloudInstance={None:\"none\",AzurePublic:\"https://login.microsoftonline.com\",AzurePpe:\"https://login.windows-ppe.net\",AzureChina:\"https://login.chinacloudapi.cn\",AzureGermany:\"https://login.microsoftonline.de\",AzureUsGovernment:\"https://login.microsoftonline.us\"}}}),AuthToken_exports={};function extractTokenClaims(e,t){const r=getJWSPayload(e);try{const e=t(r);return JSON.parse(e)}catch(n){throw createClientAuthError(tokenParsingError)}}function getJWSPayload(e){if(!e)throw createClientAuthError(nullOrEmptyToken);const t=/^([^\\.\\s]*)\\.([^\\.\\s]+)\\.([^\\.\\s]*)$/.exec(e);if(!t||t.length__left_angle_mark_4)throw createClientAuthError(tokenParsingError);return t[2]}function checkMaxAge(e,t){if(0===t||Date.now()-3e5>e+t)throw createClientAuthError(maxAgeTranspired)}__export(AuthToken_exports,{checkMaxAge:()=>checkMaxAge,extractTokenClaims:()=>extractTokenClaims,getJWSPayload:()=>getJWSPayload});var init_AuthToken=__esm({\"../../node_modules/.pnpm/@azure+msal-common@14.16.0/node_modules/@azure/msal-common/dist/account/AuthToken.mjs\"(){init_globals(),init_ClientAuthError(),init_ClientAuthErrorCodes()}}),TimeUtils_exports={};function nowSeconds(){return Math.round((new Date).getTime()/1e3)}function isTokenExpired(e,t){const r=Number(e)||0;return nowSeconds()+t>r}function wasClockTurnedBack(e){return Number(e)>nowSeconds()}function delay2(e,t){return new Promise((r=>setTimeout((()=>r(t)),e)))}__export(TimeUtils_exports,{delay:()=>delay2,isTokenExpired:()=>isTokenExpired,nowSeconds:()=>nowSeconds,wasClockTurnedBack:()=>wasClockTurnedBack});var init_TimeUtils=__esm({\"../../node_modules/.pnpm/@azure+msal-common@14.16.0/node_modules/@azure/msal-common/dist/utils/TimeUtils.mjs\"(){init_globals()}}),CacheHelpers_exports={};function generateCredentialKey(e){return[generateAccountId(e),generateCredentialId(e),generateTarget(e),generateClaimsHash(e),generateScheme(e)].join(Separators.CACHE_KEY_SEPARATOR).toLowerCase()}function createIdTokenEntity(e,t,r,n,i){return{credentialType:CredentialType.ID_TOKEN,homeAccountId:e,environment:t,clientId:n,secret:r,realm:i}}function createAccessTokenEntity(e,t,r,n,i,o,a,s,l,u,c,d,h,f,p){var m,g;const _={homeAccountId:e,credentialType:CredentialType.ACCESS_TOKEN,secret:r,cachedAt:nowSeconds().toString(),expiresOn:a.toString(),extendedExpiresOn:s.toString(),environment:t,clientId:n,realm:i,target:o,tokenType:c||AuthenticationScheme.BEARER};if(d&&(_.userAssertionHash=d),u&&(_.refreshOn=u.toString()),f&&(_.requestedClaims=f,_.requestedClaimsHash=p),(null==(m=_.tokenType)?void 0:m.toLowerCase())!==AuthenticationScheme.BEARER.toLowerCase())switch(_.credentialType=CredentialType.ACCESS_TOKEN_WITH_AUTH_SCHEME,_.tokenType){case AuthenticationScheme.POP:const e=extractTokenClaims(r,l);if(!(null==(g=null==e?void 0:e.cnf)?void 0:g.kid))throw createClientAuthError(tokenClaimsCnfRequiredForSignedJwt);_.keyId=e.cnf.kid;break;case AuthenticationScheme.SSH:_.keyId=h}return _}function createRefreshTokenEntity(e,t,r,n,i,o,a){const s={credentialType:CredentialType.REFRESH_TOKEN,homeAccountId:e,environment:t,clientId:n,secret:r};return o&&(s.userAssertionHash=o),i&&(s.familyId=i),a&&(s.expiresOn=a.toString()),s}function isCredentialEntity(e){return e.hasOwnProperty(\"homeAccountId\")&&e.hasOwnProperty(\"environment\")&&e.hasOwnProperty(\"credentialType\")&&e.hasOwnProperty(\"clientId\")&&e.hasOwnProperty(\"secret\")}function isAccessTokenEntity(e){return!!e&&isCredentialEntity(e)&&e.hasOwnProperty(\"realm\")&&e.hasOwnProperty(\"target\")&&(e.credentialType===CredentialType.ACCESS_TOKEN||e.credentialType===CredentialType.ACCESS_TOKEN_WITH_AUTH_SCHEME)}function isIdTokenEntity(e){return!!e&&isCredentialEntity(e)&&e.hasOwnProperty(\"realm\")&&e.credentialType===CredentialType.ID_TOKEN}function isRefreshTokenEntity(e){return!!e&&isCredentialEntity(e)&&e.credentialType===CredentialType.REFRESH_TOKEN}function generateAccountId(e){return[e.homeAccountId,e.environment].join(Separators.CACHE_KEY_SEPARATOR).toLowerCase()}function generateCredentialId(e){const t=e.credentialType===CredentialType.REFRESH_TOKEN&&e.familyId||e.clientId;return[e.credentialType,t,e.realm||\"\"].join(Separators.CACHE_KEY_SEPARATOR).toLowerCase()}function generateTarget(e){return(e.target||\"\").toLowerCase()}function generateClaimsHash(e){return(e.requestedClaimsHash||\"\").toLowerCase()}function generateScheme(e){return e.tokenType&&e.tokenType.toLowerCase()!==AuthenticationScheme.BEARER.toLowerCase()?e.tokenType.toLowerCase():\"\"}function isServerTelemetryEntity(e,t){const r=0===e.indexOf(SERVER_TELEM_CONSTANTS.CACHE_KEY);let n=!0;return t&&(n=t.hasOwnProperty(\"failedRequests\")&&t.hasOwnProperty(\"errors\")&&t.hasOwnProperty(\"cacheHits\")),r&&n}function isThrottlingEntity(e,t){let r=!1;e&&(r=0===e.indexOf(ThrottlingConstants.THROTTLING_PREFIX));let n=!0;return t&&(n=t.hasOwnProperty(\"throttleTime\")),r&&n}function generateAppMetadataKey({environment:e,clientId:t}){return[APP_METADATA,e,t].join(Separators.CACHE_KEY_SEPARATOR).toLowerCase()}function isAppMetadataEntity(e,t){return!!t&&0===e.indexOf(APP_METADATA)&&t.hasOwnProperty(\"clientId\")&&t.hasOwnProperty(\"environment\")}function isAuthorityMetadataEntity(e,t){return!!t&&0===e.indexOf(AUTHORITY_METADATA_CONSTANTS.CACHE_KEY)&&t.hasOwnProperty(\"aliases\")&&t.hasOwnProperty(\"preferred_cache\")&&t.hasOwnProperty(\"preferred_network\")&&t.hasOwnProperty(\"canonical_authority\")&&t.hasOwnProperty(\"authorization_endpoint\")&&t.hasOwnProperty(\"token_endpoint\")&&t.hasOwnProperty(\"issuer\")&&t.hasOwnProperty(\"aliasesFromNetwork\")&&t.hasOwnProperty(\"endpointsFromNetwork\")&&t.hasOwnProperty(\"expiresAt\")&&t.hasOwnProperty(\"jwks_uri\")}function generateAuthorityMetadataExpiresAt(){return nowSeconds()+AUTHORITY_METADATA_CONSTANTS.REFRESH_TIME_SECONDS}function updateAuthorityEndpointMetadata(e,t,r){e.authorization_endpoint=t.authorization_endpoint,e.token_endpoint=t.token_endpoint,e.end_session_endpoint=t.end_session_endpoint,e.issuer=t.issuer,e.endpointsFromNetwork=r,e.jwks_uri=t.jwks_uri}function updateCloudDiscoveryMetadata(e,t,r){e.aliases=t.aliases,e.preferred_cache=t.preferred_cache,e.preferred_network=t.preferred_network,e.aliasesFromNetwork=r}function isAuthorityMetadataExpired(e){return e.expiresAt__left_angle_mark_=nowSeconds()}__export(CacheHelpers_exports,{createAccessTokenEntity:()=>createAccessTokenEntity,createIdTokenEntity:()=>createIdTokenEntity,createRefreshTokenEntity:()=>createRefreshTokenEntity,generateAppMetadataKey:()=>generateAppMetadataKey,generateAuthorityMetadataExpiresAt:()=>generateAuthorityMetadataExpiresAt,generateCredentialKey:()=>generateCredentialKey,isAccessTokenEntity:()=>isAccessTokenEntity,isAppMetadataEntity:()=>isAppMetadataEntity,isAuthorityMetadataEntity:()=>isAuthorityMetadataEntity,isAuthorityMetadataExpired:()=>isAuthorityMetadataExpired,isCredentialEntity:()=>isCredentialEntity,isIdTokenEntity:()=>isIdTokenEntity,isRefreshTokenEntity:()=>isRefreshTokenEntity,isServerTelemetryEntity:()=>isServerTelemetryEntity,isThrottlingEntity:()=>isThrottlingEntity,updateAuthorityEndpointMetadata:()=>updateAuthorityEndpointMetadata,updateCloudDiscoveryMetadata:()=>updateCloudDiscoveryMetadata});var init_CacheHelpers=__esm({\"../../node_modules/.pnpm/@azure+msal-common@14.16.0/node_modules/@azure/msal-common/dist/cache/utils/CacheHelpers.mjs\"(){init_globals(),init_AuthToken(),init_ClientAuthError(),init_Constants(),init_TimeUtils(),init_ClientAuthErrorCodes()}}),ClientConfigurationErrorCodes_exports={},redirectUriEmpty,claimsRequestParsingError,authorityUriInsecure,urlParseError,urlEmptyError,emptyInputScopesError,invalidPromptValue,invalidClaims,tokenRequestEmpty,logoutRequestEmpty,invalidCodeChallengeMethod,pkceParamsMissing,invalidCloudDiscoveryMetadata,invalidAuthorityMetadata,untrustedAuthority,missingSshJwk,missingSshKid,missingNonceAuthenticationHeader,invalidAuthenticationHeader,cannotSetOIDCOptions,cannotAllowNativeBroker,authorityMismatch;__export(ClientConfigurationErrorCodes_exports,{authorityMismatch:()=>authorityMismatch,authorityUriInsecure:()=>authorityUriInsecure,cannotAllowNativeBroker:()=>cannotAllowNativeBroker,cannotSetOIDCOptions:()=>cannotSetOIDCOptions,claimsRequestParsingError:()=>claimsRequestParsingError,emptyInputScopesError:()=>emptyInputScopesError,invalidAuthenticationHeader:()=>invalidAuthenticationHeader,invalidAuthorityMetadata:()=>invalidAuthorityMetadata,invalidClaims:()=>invalidClaims,invalidCloudDiscoveryMetadata:()=>invalidCloudDiscoveryMetadata,invalidCodeChallengeMethod:()=>invalidCodeChallengeMethod,invalidPromptValue:()=>invalidPromptValue,logoutRequestEmpty:()=>logoutRequestEmpty,missingNonceAuthenticationHeader:()=>missingNonceAuthenticationHeader,missingSshJwk:()=>missingSshJwk,missingSshKid:()=>missingSshKid,pkceParamsMissing:()=>pkceParamsMissing,redirectUriEmpty:()=>redirectUriEmpty,tokenRequestEmpty:()=>tokenRequestEmpty,untrustedAuthority:()=>untrustedAuthority,urlEmptyError:()=>urlEmptyError,urlParseError:()=>urlParseError});var init_ClientConfigurationErrorCodes=__esm({\"../../node_modules/.pnpm/@azure+msal-common@14.16.0/node_modules/@azure/msal-common/dist/error/ClientConfigurationErrorCodes.mjs\"(){init_globals(),redirectUriEmpty=\"redirect_uri_empty\",claimsRequestParsingError=\"claims_request_parsing_error\",authorityUriInsecure=\"authority_uri_insecure\",urlParseError=\"url_parse_error\",urlEmptyError=\"empty_url_error\",emptyInputScopesError=\"empty_input_scopes_error\",invalidPromptValue=\"invalid_prompt_value\",invalidClaims=\"invalid_claims\",tokenRequestEmpty=\"token_request_empty\",logoutRequestEmpty=\"logout_request_empty\",invalidCodeChallengeMethod=\"invalid_code_challenge_method\",pkceParamsMissing=\"pkce_params_missing\",invalidCloudDiscoveryMetadata=\"invalid_cloud_discovery_metadata\",invalidAuthorityMetadata=\"invalid_authority_metadata\",untrustedAuthority=\"untrusted_authority\",missingSshJwk=\"missing_ssh_jwk\",missingSshKid=\"missing_ssh_kid\",missingNonceAuthenticationHeader=\"missing_nonce_authentication_header\",invalidAuthenticationHeader=\"invalid_authentication_header\",cannotSetOIDCOptions=\"cannot_set_OIDCOptions\",cannotAllowNativeBroker=\"cannot_allow_native_broker\",authorityMismatch=\"authority_mismatch\"}}),ClientConfigurationErrorMessages,ClientConfigurationErrorMessage,ClientConfigurationError;function createClientConfigurationError(e){return new ClientConfigurationError(e)}var init_ClientConfigurationError=__esm({\"../../node_modules/.pnpm/@azure+msal-common@14.16.0/node_modules/@azure/msal-common/dist/error/ClientConfigurationError.mjs\"(){init_globals(),init_AuthError(),init_ClientConfigurationErrorCodes(),ClientConfigurationErrorMessage={redirectUriNotSet:{code:redirectUriEmpty,desc:(ClientConfigurationErrorMessages={[redirectUriEmpty]:\"A redirect URI is required for all calls, and none has been set.\",[claimsRequestParsingError]:\"Could not parse the given claims request object.\",[authorityUriInsecure]:\"Authority URIs must use https. Please see here for valid authority configuration options: https://docs.microsoft.com/en-us/azure/active-directory/develop/msal-js-initializing-client-applications#configuration-options\",[urlParseError]:\"URL could not be parsed into appropriate segments.\",[urlEmptyError]:\"URL was empty or null.\",[emptyInputScopesError]:\"Scopes cannot be passed as null, undefined or empty array because they are required to obtain an access token.\",[invalidPromptValue]:\"Please see here for valid configuration options: https://azuread.github.io/microsoft-authentication-library-for-js/ref/modules/_azure_msal_common.html#commonauthorizationurlrequest\",[invalidClaims]:\"Given claims parameter must be a stringified JSON object.\",[tokenRequestEmpty]:\"Token request was empty and not found in cache.\",[logoutRequestEmpty]:\"The logout request was null or undefined.\",[invalidCodeChallengeMethod]:'code_challenge_method passed is invalid. Valid values are \"plain\" and \"S256\".',[pkceParamsMissing]:\"Both params: code_challenge and code_challenge_method are to be passed if to be sent in the request\",[invalidCloudDiscoveryMetadata]:\"Invalid cloudDiscoveryMetadata provided. Must be a stringified JSON object containing tenant_discovery_endpoint and metadata fields\",[invalidAuthorityMetadata]:\"Invalid authorityMetadata provided. Must by a stringified JSON object containing authorization_endpoint, token_endpoint, issuer fields.\",[untrustedAuthority]:\"The provided authority is not a trusted authority. Please include this authority in the knownAuthorities config parameter.\",[missingSshJwk]:\"Missing sshJwk in SSH certificate request. A stringified JSON Web Key is required when using the SSH authentication scheme.\",[missingSshKid]:\"Missing sshKid in SSH certificate request. A string that uniquely identifies the public SSH key is required when using the SSH authentication scheme.\",[missingNonceAuthenticationHeader]:\"Unable to find an authentication header containing server nonce. Either the Authentication-Info or WWW-Authenticate headers must be present in order to obtain a server nonce.\",[invalidAuthenticationHeader]:\"Invalid authentication header provided\",[cannotSetOIDCOptions]:\"Cannot set OIDCOptions parameter. Please change the protocol mode to OIDC or use a non-Microsoft authority.\",[cannotAllowNativeBroker]:\"Cannot set allowNativeBroker parameter to true when not in AAD protocol mode.\",[authorityMismatch]:\"Authority mismatch error. Authority provided in login request or PublicClientApplication config does not match the environment of the provided account. Please use a matching account or make an interactive request to login to this authority.\"})[redirectUriEmpty]},claimsRequestParsingError:{code:claimsRequestParsingError,desc:ClientConfigurationErrorMessages[claimsRequestParsingError]},authorityUriInsecure:{code:authorityUriInsecure,desc:ClientConfigurationErrorMessages[authorityUriInsecure]},urlParseError:{code:urlParseError,desc:ClientConfigurationErrorMessages[urlParseError]},urlEmptyError:{code:urlEmptyError,desc:ClientConfigurationErrorMessages[urlEmptyError]},emptyScopesError:{code:emptyInputScopesError,desc:ClientConfigurationErrorMessages[emptyInputScopesError]},invalidPrompt:{code:invalidPromptValue,desc:ClientConfigurationErrorMessages[invalidPromptValue]},invalidClaimsRequest:{code:invalidClaims,desc:ClientConfigurationErrorMessages[invalidClaims]},tokenRequestEmptyError:{code:tokenRequestEmpty,desc:ClientConfigurationErrorMessages[tokenRequestEmpty]},logoutRequestEmptyError:{code:logoutRequestEmpty,desc:ClientConfigurationErrorMessages[logoutRequestEmpty]},invalidCodeChallengeMethod:{code:invalidCodeChallengeMethod,desc:ClientConfigurationErrorMessages[invalidCodeChallengeMethod]},invalidCodeChallengeParams:{code:pkceParamsMissing,desc:ClientConfigurationErrorMessages[pkceParamsMissing]},invalidCloudDiscoveryMetadata:{code:invalidCloudDiscoveryMetadata,desc:ClientConfigurationErrorMessages[invalidCloudDiscoveryMetadata]},invalidAuthorityMetadata:{code:invalidAuthorityMetadata,desc:ClientConfigurationErrorMessages[invalidAuthorityMetadata]},untrustedAuthority:{code:untrustedAuthority,desc:ClientConfigurationErrorMessages[untrustedAuthority]},missingSshJwk:{code:missingSshJwk,desc:ClientConfigurationErrorMessages[missingSshJwk]},missingSshKid:{code:missingSshKid,desc:ClientConfigurationErrorMessages[missingSshKid]},missingNonceAuthenticationHeader:{code:missingNonceAuthenticationHeader,desc:ClientConfigurationErrorMessages[missingNonceAuthenticationHeader]},invalidAuthenticationHeader:{code:invalidAuthenticationHeader,desc:ClientConfigurationErrorMessages[invalidAuthenticationHeader]},cannotSetOIDCOptions:{code:cannotSetOIDCOptions,desc:ClientConfigurationErrorMessages[cannotSetOIDCOptions]},cannotAllowNativeBroker:{code:cannotAllowNativeBroker,desc:ClientConfigurationErrorMessages[cannotAllowNativeBroker]},authorityMismatch:{code:authorityMismatch,desc:ClientConfigurationErrorMessages[authorityMismatch]}},ClientConfigurationError=class e extends AuthError{constructor(t){super(t,ClientConfigurationErrorMessages[t]),this.name=\"ClientConfigurationError\",Object.setPrototypeOf(this,e.prototype)}}}}),StringUtils,init_StringUtils=__esm({\"../../node_modules/.pnpm/@azure+msal-common@14.16.0/node_modules/@azure/msal-common/dist/utils/StringUtils.mjs\"(){init_globals(),StringUtils=class{static isEmptyObj(e){if(e)try{const t=JSON.parse(e);return 0===Object.keys(t).length}catch(t){}return!0}static startsWith(e,t){return 0===e.indexOf(t)}static endsWith(e,t){return e.length>=t.length&&e.lastIndexOf(t)===e.length-t.length}static queryStringToObject(e){const t={},r=e.split(\"&\"),n=e=>decodeURIComponent(e.replace(/\\+/g,\" \"));return r.forEach((e=>{if(e.trim()){const[r,i]=e.split(/=(.+)/g,2);r&&i&&(t[n(r)]=n(i))}})),t}static trimArrayEntries(e){return e.map((e=>e.trim()))}static removeEmptyStringsFromArray(e){return e.filter((e=>!!e))}static jsonParseHelper(e){try{return JSON.parse(e)}catch(t){return null}}static matchPattern(e,t){return new RegExp(e.replace(/\\\\/g,\"\\\\\\\\\").replace(/\\*/g,\"[^ ]*\").replace(/\\?/g,\"\\\\?\")).test(t)}}}}),ScopeSet,init_ScopeSet=__esm({\"../../node_modules/.pnpm/@azure+msal-common@14.16.0/node_modules/@azure/msal-common/dist/request/ScopeSet.mjs\"(){init_globals(),init_ClientConfigurationError(),init_StringUtils(),init_ClientAuthError(),init_Constants(),init_ClientConfigurationErrorCodes(),init_ClientAuthErrorCodes(),ScopeSet=class e{static fromString(t){const r=(t||Constants.EMPTY_STRING).split(\" \");return new e(r)}static createSearchScopes(t){const r=new e(t);return r.containsOnlyOIDCScopes()?r.removeScope(Constants.OFFLINE_ACCESS_SCOPE):r.removeOIDCScopes(),r}validateInputScopes(e){if(!e||e.length__left_angle_mark_1)throw createClientConfigurationError(emptyInputScopesError)}containsScope(t){const r=this.printScopesLowerCase().split(\" \"),n=new e(r);return!!t&&n.scopes.has(t.toLowerCase())}containsScopeSet(e){return!(!e||e.scopes.size__left_angle_mark_=0)&&this.scopes.size>=e.scopes.size&&e.asArray().every((e=>this.containsScope(e)))}containsOnlyOIDCScopes(){let e=0;return OIDC_SCOPES.forEach((t=>{this.containsScope(t)&&(e+=1)})),this.scopes.size===e}appendScope(e){e&&this.scopes.add(e.trim())}appendScopes(e){try{e.forEach((e=>this.appendScope(e)))}catch(t){throw createClientAuthError(cannotAppendScopeSet)}}removeScope(e){if(!e)throw createClientAuthError(cannotRemoveEmptyScope);this.scopes.delete(e.trim())}removeOIDCScopes(){OIDC_SCOPES.forEach((e=>{this.scopes.delete(e)}))}unionScopeSets(e){if(!e)throw createClientAuthError(emptyInputScopeSet);const t=new Set;return e.scopes.forEach((e=>t.add(e.toLowerCase()))),this.scopes.forEach((e=>t.add(e.toLowerCase()))),t}intersectingScopeSets(e){if(!e)throw createClientAuthError(emptyInputScopeSet);e.containsOnlyOIDCScopes()||e.removeOIDCScopes();const t=this.unionScopeSets(e),r=e.getScopeCount(),n=this.getScopeCount();return t.size__left_angle_mark_n+r}getScopeCount(){return this.scopes.size}asArray(){const e=[];return this.scopes.forEach((t=>e.push(t))),e}printScopes(){return this.scopes?this.asArray().join(\" \"):Constants.EMPTY_STRING}printScopesLowerCase(){return this.printScopes().toLowerCase()}constructor(e){const t=e?StringUtils.trimArrayEntries([...e]):[],r=t?StringUtils.removeEmptyStringsFromArray(t):[];this.validateInputScopes(r),this.scopes=new Set,r.forEach((e=>this.scopes.add(e)))}}}});function buildClientInfo(e,t){if(!e)throw createClientAuthError(clientInfoEmptyError);try{const r=t(e);return JSON.parse(r)}catch(r){throw createClientAuthError(clientInfoDecodingError)}}function buildClientInfoFromHomeAccountId(e){if(!e)throw createClientAuthError(clientInfoDecodingError);const t=e.split(Separators.CLIENT_INFO_SEPARATOR,2);return{uid:t[0],utid:t.length__left_angle_mark_2?Constants.EMPTY_STRING:t[1]}}var init_ClientInfo=__esm({\"../../node_modules/.pnpm/@azure+msal-common@14.16.0/node_modules/@azure/msal-common/dist/account/ClientInfo.mjs\"(){init_globals(),init_ClientAuthError(),init_Constants(),init_ClientAuthErrorCodes()}});function tenantIdMatchesHomeTenant(e,t){return!!e&&!!t&&e===t.split(\".\")[1]}function buildTenantProfile(e,t,r,n){if(n){const{oid:t,sub:r,tid:i,name:o,tfp:a,acr:s}=n,l=i||a||s||\"\";return{tenantId:l,localAccountId:t||r||\"\",name:o,isHomeTenant:tenantIdMatchesHomeTenant(l,e)}}return{tenantId:r,localAccountId:t,isHomeTenant:tenantIdMatchesHomeTenant(r,e)}}function updateAccountTenantProfileData(e,t,r,n){let i=e;if(t){const{isHomeTenant:r,...n}=t;i={...e,...n}}if(r){const{isHomeTenant:t,...o}=buildTenantProfile(e.homeAccountId,e.localAccountId,e.tenantId,r);return i={...i,...o,idTokenClaims:r,idToken:n},i}return i}var init_AccountInfo=__esm({\"../../node_modules/.pnpm/@azure+msal-common@14.16.0/node_modules/@azure/msal-common/dist/account/AccountInfo.mjs\"(){init_globals()}}),AuthorityType,init_AuthorityType=__esm({\"../../node_modules/.pnpm/@azure+msal-common@14.16.0/node_modules/@azure/msal-common/dist/authority/AuthorityType.mjs\"(){init_globals(),AuthorityType={Default:0,Adfs:1,Dsts:2,Ciam:3}}});function getTenantIdFromIdTokenClaims(e){return e&&(e.tid||e.tfp||e.acr)||null}var init_TokenClaims=__esm({\"../../node_modules/.pnpm/@azure+msal-common@14.16.0/node_modules/@azure/msal-common/dist/account/TokenClaims.mjs\"(){init_globals()}}),ProtocolMode,init_ProtocolMode=__esm({\"../../node_modules/.pnpm/@azure+msal-common@14.16.0/node_modules/@azure/msal-common/dist/authority/ProtocolMode.mjs\"(){init_globals(),ProtocolMode={AAD:\"AAD\",OIDC:\"OIDC\"}}}),AccountEntity,init_AccountEntity=__esm({\"../../node_modules/.pnpm/@azure+msal-common@14.16.0/node_modules/@azure/msal-common/dist/cache/entities/AccountEntity.mjs\"(){init_globals(),init_Constants(),init_ClientInfo(),init_AccountInfo(),init_ClientAuthError(),init_AuthorityType(),init_TokenClaims(),init_ProtocolMode(),init_ClientAuthErrorCodes(),AccountEntity=class e{generateAccountId(){return[this.homeAccountId,this.environment].join(Separators.CACHE_KEY_SEPARATOR).toLowerCase()}generateAccountKey(){return e.generateAccountCacheKey({homeAccountId:this.homeAccountId,environment:this.environment,tenantId:this.realm,username:this.username,localAccountId:this.localAccountId})}getAccountInfo(){return{homeAccountId:this.homeAccountId,environment:this.environment,tenantId:this.realm,username:this.username,localAccountId:this.localAccountId,name:this.name,nativeAccountId:this.nativeAccountId,authorityType:this.authorityType,tenantProfiles:new Map((this.tenantProfiles||[]).map((e=>[e.tenantId,e])))}}isSingleTenant(){return!this.tenantProfiles}static generateAccountCacheKey(e){const t=e.homeAccountId.split(\".\")[1];return[e.homeAccountId,e.environment||\"\",t||e.tenantId||\"\"].join(Separators.CACHE_KEY_SEPARATOR).toLowerCase()}static createAccount(t,r,n){var i,o,a,s,l,u;const c=new e;let d;r.authorityType===AuthorityType.Adfs?c.authorityType=CacheAccountType.ADFS_ACCOUNT_TYPE:r.protocolMode===ProtocolMode.AAD?c.authorityType=CacheAccountType.MSSTS_ACCOUNT_TYPE:c.authorityType=CacheAccountType.GENERIC_ACCOUNT_TYPE,t.clientInfo&&n&&(d=buildClientInfo(t.clientInfo,n)),c.clientInfo=t.clientInfo,c.homeAccountId=t.homeAccountId,c.nativeAccountId=t.nativeAccountId;const h=t.environment||r&&r.getPreferredCache();if(!h)throw createClientAuthError(invalidCacheEnvironment);c.environment=h,c.realm=(null==d?void 0:d.utid)||getTenantIdFromIdTokenClaims(t.idTokenClaims)||\"\",c.localAccountId=(null==d?void 0:d.uid)||(null==(i=t.idTokenClaims)?void 0:i.oid)||(null==(o=t.idTokenClaims)?void 0:o.sub)||\"\";const f=(null==(a=t.idTokenClaims)?void 0:a.preferred_username)||(null==(s=t.idTokenClaims)?void 0:s.upn),p=(null==(l=t.idTokenClaims)?void 0:l.emails)?t.idTokenClaims.emails[0]:null;if(c.username=f||p||\"\",c.name=(null==(u=t.idTokenClaims)?void 0:u.name)||\"\",c.cloudGraphHostName=t.cloudGraphHostName,c.msGraphHost=t.msGraphHost,t.tenantProfiles)c.tenantProfiles=t.tenantProfiles;else{const e=buildTenantProfile(t.homeAccountId,c.localAccountId,c.realm,t.idTokenClaims);c.tenantProfiles=[e]}return c}static createFromAccountInfo(t,r,n){var i;const o=new e;return o.authorityType=t.authorityType||CacheAccountType.GENERIC_ACCOUNT_TYPE,o.homeAccountId=t.homeAccountId,o.localAccountId=t.localAccountId,o.nativeAccountId=t.nativeAccountId,o.realm=t.tenantId,o.environment=t.environment,o.username=t.username,o.name=t.name,o.cloudGraphHostName=r,o.msGraphHost=n,o.tenantProfiles=Array.from((null==(i=t.tenantProfiles)?void 0:i.values())||[]),o}static generateHomeAccountId(e,t,r,n,i){if(t!==AuthorityType.Adfs&&t!==AuthorityType.Dsts){if(e)try{const t=buildClientInfo(e,n.base64Decode);if(t.uid&&t.utid)return`${t.uid}.${t.utid}`}catch(o){}r.warning(\"No client info in response\")}return(null==i?void 0:i.sub)||\"\"}static isAccountEntity(e){return!!e&&e.hasOwnProperty(\"homeAccountId\")&&e.hasOwnProperty(\"environment\")&&e.hasOwnProperty(\"realm\")&&e.hasOwnProperty(\"localAccountId\")&&e.hasOwnProperty(\"username\")&&e.hasOwnProperty(\"authorityType\")}static accountInfoIsEqual(e,t,r){if(!e||!t)return!1;let n=!0;if(r){const r=e.idTokenClaims||{},i=t.idTokenClaims||{};n=r.iat===i.iat&&r.nonce===i.nonce}return e.homeAccountId===t.homeAccountId&&e.localAccountId===t.localAccountId&&e.username===t.username&&e.tenantId===t.tenantId&&e.environment===t.environment&&e.nativeAccountId===t.nativeAccountId&&n}}}}),UrlUtils_exports={};function stripLeadingHashOrQuery(e){return e.startsWith(\"#/\")?e.substring(2):e.startsWith(\"#\")||e.startsWith(\"?\")?e.substring(1):e}function getDeserializedResponse(e){if(!e||e.indexOf(\"=\")__left_angle_mark_0)return null;try{const t=stripLeadingHashOrQuery(e),r=Object.fromEntries(new URLSearchParams(t));if(r.code||r.error||r.error_description||r.state)return r}catch(t){throw createClientAuthError(hashNotDeserialized)}return null}__export(UrlUtils_exports,{getDeserializedResponse:()=>getDeserializedResponse,stripLeadingHashOrQuery:()=>stripLeadingHashOrQuery});var init_UrlUtils=__esm({\"../../node_modules/.pnpm/@azure+msal-common@14.16.0/node_modules/@azure/msal-common/dist/utils/UrlUtils.mjs\"(){init_globals(),init_ClientAuthError(),init_ClientAuthErrorCodes()}}),UrlString,init_UrlString=__esm({\"../../node_modules/.pnpm/@azure+msal-common@14.16.0/node_modules/@azure/msal-common/dist/url/UrlString.mjs\"(){init_globals(),init_ClientConfigurationError(),init_StringUtils(),init_Constants(),init_UrlUtils(),init_ClientConfigurationErrorCodes(),UrlString=class e{get urlString(){return this._urlString}static canonicalizeUri(e){if(e){let t=e.toLowerCase();return StringUtils.endsWith(t,\"?\")?t=t.slice(0,-1):StringUtils.endsWith(t,\"?/\")&&(t=t.slice(0,-2)),StringUtils.endsWith(t,\"/\")||(t+=\"/\"),t}return e}validateAsUri(){let e;try{e=this.getUrlComponents()}catch(t){throw createClientConfigurationError(urlParseError)}if(!e.HostNameAndPort||!e.PathSegments)throw createClientConfigurationError(urlParseError);if(!e.Protocol||\"https:\"!==e.Protocol.toLowerCase())throw createClientConfigurationError(authorityUriInsecure)}static appendQueryString(e,t){return t?e.indexOf(\"?\")__left_angle_mark_0?`${e}?${t}`:`${e}&${t}`:e}static removeHashFromUrl(t){return e.canonicalizeUri(t.split(\"#\")[0])}replaceTenantPath(t){const r=this.getUrlComponents(),n=r.PathSegments;return!t||0===n.length||n[0]!==AADAuthorityConstants.COMMON&&n[0]!==AADAuthorityConstants.ORGANIZATIONS||(n[0]=t),e.constructAuthorityUriFromObject(r)}getUrlComponents(){const e=RegExp(\"^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\\\?([^#]*))?(#(.*))?\"),t=this.urlString.match(e);if(!t)throw createClientConfigurationError(urlParseError);const r={Protocol:t[1],HostNameAndPort:t[4],AbsolutePath:t[5],QueryString:t[7]};let n=r.AbsolutePath.split(\"/\");return n=n.filter((e=>e&&e.length>0)),r.PathSegments=n,r.QueryString&&r.QueryString.endsWith(\"/\")&&(r.QueryString=r.QueryString.substring(0,r.QueryString.length-1)),r}static getDomainFromUrl(e){const t=RegExp(\"^([^:/?#]+://)?([^/?#]*)\"),r=e.match(t);if(!r)throw createClientConfigurationError(urlParseError);return r[2]}static getAbsoluteUrl(t,r){if(t[0]===Constants.FORWARD_SLASH){const n=new e(r).getUrlComponents();return n.Protocol+\"//\"+n.HostNameAndPort+t}return t}static constructAuthorityUriFromObject(t){return new e(t.Protocol+\"//\"+t.HostNameAndPort+\"/\"+t.PathSegments.join(\"/\"))}static hashContainsKnownProperties(e){return!!getDeserializedResponse(e)}constructor(t){if(this._urlString=t,!this._urlString)throw createClientConfigurationError(urlEmptyError);t.includes(\"#\")||(this._urlString=e.canonicalizeUri(t))}}}}),rawMetdataJSON,EndpointMetadata,InstanceDiscoveryMetadata,InstanceDiscoveryMetadataAliases;function getAliasesFromStaticSources(e,t){var r;let n;const i=e.canonicalAuthority;if(i){const o=new UrlString(i).getUrlComponents().HostNameAndPort;n=getAliasesFromMetadata(o,null==(r=e.cloudDiscoveryMetadata)?void 0:r.metadata,AuthorityMetadataSource.CONFIG,t)||getAliasesFromMetadata(o,InstanceDiscoveryMetadata.metadata,AuthorityMetadataSource.HARDCODED_VALUES,t)||e.knownAuthorities}return n||[]}function getAliasesFromMetadata(e,t,r,n){if(null==n||n.trace(`getAliasesFromMetadata called with source: ${r}`),e&&t){const i=getCloudDiscoveryMetadataFromNetworkResponse(t,e);if(i)return null==n||n.trace(`getAliasesFromMetadata: found cloud discovery metadata in ${r}, returning aliases`),i.aliases;null==n||n.trace(`getAliasesFromMetadata: did not find cloud discovery metadata in ${r}`)}return null}function getCloudDiscoveryMetadataFromHardcodedValues(e){return getCloudDiscoveryMetadataFromNetworkResponse(InstanceDiscoveryMetadata.metadata,e)}function getCloudDiscoveryMetadataFromNetworkResponse(e,t){for(let r=0;r__left_angle_mark_e.length;r++){const n=e[r];if(n.aliases.includes(t))return n}return null}var init_AuthorityMetadata=__esm({\"../../node_modules/.pnpm/@azure+msal-common@14.16.0/node_modules/@azure/msal-common/dist/authority/AuthorityMetadata.mjs\"(){init_globals(),init_UrlString(),init_Constants(),EndpointMetadata=(rawMetdataJSON={endpointMetadata:{\"login.microsoftonline.com\":{token_endpoint:\"https://login.microsoftonline.com/{tenantid}/oauth2/v2.0/token\",jwks_uri:\"https://login.microsoftonline.com/{tenantid}/discovery/v2.0/keys\",issuer:\"https://login.microsoftonline.com/{tenantid}/v2.0\",authorization_endpoint:\"https://login.microsoftonline.com/{tenantid}/oauth2/v2.0/authorize\",end_session_endpoint:\"https://login.microsoftonline.com/{tenantid}/oauth2/v2.0/logout\"},\"login.chinacloudapi.cn\":{token_endpoint:\"https://login.chinacloudapi.cn/{tenantid}/oauth2/v2.0/token\",jwks_uri:\"https://login.chinacloudapi.cn/{tenantid}/discovery/v2.0/keys\",issuer:\"https://login.partner.microsoftonline.cn/{tenantid}/v2.0\",authorization_endpoint:\"https://login.chinacloudapi.cn/{tenantid}/oauth2/v2.0/authorize\",end_session_endpoint:\"https://login.chinacloudapi.cn/{tenantid}/oauth2/v2.0/logout\"},\"login.microsoftonline.us\":{token_endpoint:\"https://login.microsoftonline.us/{tenantid}/oauth2/v2.0/token\",jwks_uri:\"https://login.microsoftonline.us/{tenantid}/discovery/v2.0/keys\",issuer:\"https://login.microsoftonline.us/{tenantid}/v2.0\",authorization_endpoint:\"https://login.microsoftonline.us/{tenantid}/oauth2/v2.0/authorize\",end_session_endpoint:\"https://login.microsoftonline.us/{tenantid}/oauth2/v2.0/logout\"}},instanceDiscoveryMetadata:{tenant_discovery_endpoint:\"https://{canonicalAuthority}/v2.0/.well-known/openid-configuration\",metadata:[{preferred_network:\"login.microsoftonline.com\",preferred_cache:\"login.windows.net\",aliases:[\"login.microsoftonline.com\",\"login.windows.net\",\"login.microsoft.com\",\"sts.windows.net\"]},{preferred_network:\"login.partner.microsoftonline.cn\",preferred_cache:\"login.partner.microsoftonline.cn\",aliases:[\"login.partner.microsoftonline.cn\",\"login.chinacloudapi.cn\"]},{preferred_network:\"login.microsoftonline.de\",preferred_cache:\"login.microsoftonline.de\",aliases:[\"login.microsoftonline.de\"]},{preferred_network:\"login.microsoftonline.us\",preferred_cache:\"login.microsoftonline.us\",aliases:[\"login.microsoftonline.us\",\"login.usgovcloudapi.net\"]},{preferred_network:\"login-us.microsoftonline.com\",preferred_cache:\"login-us.microsoftonline.com\",aliases:[\"login-us.microsoftonline.com\"]}]}}).endpointMetadata,InstanceDiscoveryMetadata=rawMetdataJSON.instanceDiscoveryMetadata,InstanceDiscoveryMetadataAliases=new Set,InstanceDiscoveryMetadata.metadata.forEach((e=>{e.aliases.forEach((e=>{InstanceDiscoveryMetadataAliases.add(e)}))}))}}),cacheQuotaExceededErrorCode,cacheUnknownErrorCode,init_CacheErrorCodes=__esm({\"../../node_modules/.pnpm/@azure+msal-common@14.16.0/node_modules/@azure/msal-common/dist/error/CacheErrorCodes.mjs\"(){init_globals(),cacheQuotaExceededErrorCode=\"cache_quota_exceeded\",cacheUnknownErrorCode=\"cache_error_unknown\"}}),CacheErrorMessages,CacheError,init_CacheError=__esm({\"../../node_modules/.pnpm/@azure+msal-common@14.16.0/node_modules/@azure/msal-common/dist/error/CacheError.mjs\"(){init_globals(),init_CacheErrorCodes(),CacheErrorMessages={[cacheQuotaExceededErrorCode]:\"Exceeded cache storage capacity.\",[cacheUnknownErrorCode]:\"Unexpected error occurred when using cache storage.\"},CacheError=class e extends Error{constructor(t,r){const n=r||(CacheErrorMessages[t]?CacheErrorMessages[t]:CacheErrorMessages[cacheUnknownErrorCode]);super(`${t}: ${n}`),Object.setPrototypeOf(this,e.prototype),this.name=\"CacheError\",this.errorCode=t,this.errorMessage=n}}}}),CacheManager,DefaultStorageClass,init_CacheManager=__esm({\"../../node_modules/.pnpm/@azure+msal-common@14.16.0/node_modules/@azure/msal-common/dist/cache/CacheManager.mjs\"(){init_globals(),init_Constants(),init_CacheHelpers(),init_ScopeSet(),init_AccountEntity(),init_ClientAuthError(),init_AccountInfo(),init_AuthToken(),init_packageMetadata(),init_AuthorityMetadata(),init_CacheError(),init_ClientAuthErrorCodes(),init_CacheErrorCodes(),CacheManager=class e{getAllAccounts(e){return this.buildTenantProfiles(this.getAccountsFilteredBy(e||{}),e)}getAccountInfoFilteredBy(e){const t=this.getAllAccounts(e);return t.length>1?t.sort((e=>e.idTokenClaims?-1:1))[0]:1===t.length?t[0]:null}getBaseAccountInfo(e){const t=this.getAccountsFilteredBy(e);return t.length>0?t[0].getAccountInfo():null}buildTenantProfiles(e,t){return e.flatMap((e=>this.getTenantProfilesFromAccountEntity(e,null==t?void 0:t.tenantId,t)))}getTenantedAccountInfoByFilter(e,t,r,n){let i,o=null;if(n&&!this.tenantProfileMatchesFilter(r,n))return null;const a=this.getIdToken(e,t,r.tenantId);return a&&(i=extractTokenClaims(a.secret,this.cryptoImpl.base64Decode),!this.idTokenClaimsMatchTenantProfileFilter(i,n))?null:(o=updateAccountTenantProfileData(e,r,i,null==a?void 0:a.secret),o)}getTenantProfilesFromAccountEntity(e,t,r){const n=e.getAccountInfo();let i=n.tenantProfiles||new Map;const o=this.getTokenKeys();if(t){const e=i.get(t);if(!e)return[];i=new Map([[t,e]])}const a=[];return i.forEach((e=>{const t=this.getTenantedAccountInfoByFilter(n,o,e,r);t&&a.push(t)})),a}tenantProfileMatchesFilter(e,t){return!(t.localAccountId&&!this.matchLocalAccountIdFromTenantProfile(e,t.localAccountId)||t.name&&e.name!==t.name||void 0!==t.isHomeTenant&&e.isHomeTenant!==t.isHomeTenant)}idTokenClaimsMatchTenantProfileFilter(e,t){if(t){if(t.localAccountId&&!this.matchLocalAccountIdFromTokenClaims(e,t.localAccountId))return!1;if(t.loginHint&&!this.matchLoginHintFromTokenClaims(e,t.loginHint))return!1;if(t.username&&!this.matchUsername(e.preferred_username,t.username))return!1;if(t.name&&!this.matchName(e,t.name))return!1;if(t.sid&&!this.matchSid(e,t.sid))return!1}return!0}async saveCacheRecord(e,t,r){var n,i,o,a;if(!e)throw createClientAuthError(invalidCacheRecord);try{e.account&&this.setAccount(e.account),e.idToken&&!1!==(null==t?void 0:t.idToken)&&this.setIdTokenCredential(e.idToken),e.accessToken&&!1!==(null==t?void 0:t.accessToken)&&await this.saveAccessToken(e.accessToken),e.refreshToken&&!1!==(null==t?void 0:t.refreshToken)&&this.setRefreshTokenCredential(e.refreshToken),e.appMetadata&&this.setAppMetadata(e.appMetadata)}catch(s){throw null==(n=this.commonLogger)||n.error(\"CacheManager.saveCacheRecord: failed\"),s instanceof Error?(null==(i=this.commonLogger)||i.errorPii(`CacheManager.saveCacheRecord: ${s.message}`,r),\"QuotaExceededError\"===s.name||\"NS_ERROR_DOM_QUOTA_REACHED\"===s.name||s.message.includes(\"exceeded the quota\")?(null==(o=this.commonLogger)||o.error(\"CacheManager.saveCacheRecord: exceeded storage quota\",r),new CacheError(cacheQuotaExceededErrorCode)):new CacheError(s.name,s.message)):(null==(a=this.commonLogger)||a.errorPii(`CacheManager.saveCacheRecord: ${s}`,r),new CacheError(cacheUnknownErrorCode))}}async saveAccessToken(e){const t={clientId:e.clientId,credentialType:e.credentialType,environment:e.environment,homeAccountId:e.homeAccountId,realm:e.realm,tokenType:e.tokenType,requestedClaimsHash:e.requestedClaimsHash},r=this.getTokenKeys(),n=ScopeSet.fromString(e.target),i=[];r.accessToken.forEach((e=>{if(!this.accessTokenKeyMatchesFilter(e,t,!1))return;const r=this.getAccessTokenCredential(e);r&&this.credentialMatchesFilter(r,t)&&ScopeSet.fromString(r.target).intersectingScopeSets(n)&&i.push(this.removeAccessToken(e))})),await Promise.all(i),this.setAccessTokenCredential(e)}getAccountsFilteredBy(e){const t=this.getAccountKeys(),r=[];return t.forEach((t=>{var n;if(!this.isAccountKey(t,e.homeAccountId))return;const i=this.getAccount(t,this.commonLogger);if(!i)return;if(e.homeAccountId&&!this.matchHomeAccountId(i,e.homeAccountId))return;if(e.username&&!this.matchUsername(i.username,e.username))return;if(e.environment&&!this.matchEnvironment(i,e.environment))return;if(e.realm&&!this.matchRealm(i,e.realm))return;if(e.nativeAccountId&&!this.matchNativeAccountId(i,e.nativeAccountId))return;if(e.authorityType&&!this.matchAuthorityType(i,e.authorityType))return;const o={localAccountId:null==e?void 0:e.localAccountId,name:null==e?void 0:e.name},a=null==(n=i.tenantProfiles)?void 0:n.filter((e=>this.tenantProfileMatchesFilter(e,o)));a&&0===a.length||r.push(i)})),r}isAccountKey(e,t,r){return!(e.split(Separators.CACHE_KEY_SEPARATOR).length__left_angle_mark_3||t&&!e.toLowerCase().includes(t.toLowerCase())||r&&!e.toLowerCase().includes(r.toLowerCase()))}isCredentialKey(e){if(e.split(Separators.CACHE_KEY_SEPARATOR).length__left_angle_mark_6)return!1;const t=e.toLowerCase();if(-1===t.indexOf(CredentialType.ID_TOKEN.toLowerCase())&&-1===t.indexOf(CredentialType.ACCESS_TOKEN.toLowerCase())&&-1===t.indexOf(CredentialType.ACCESS_TOKEN_WITH_AUTH_SCHEME.toLowerCase())&&-1===t.indexOf(CredentialType.REFRESH_TOKEN.toLowerCase()))return!1;if(t.indexOf(CredentialType.REFRESH_TOKEN.toLowerCase())>-1){const e=`${CredentialType.REFRESH_TOKEN}${Separators.CACHE_KEY_SEPARATOR}${this.clientId}${Separators.CACHE_KEY_SEPARATOR}`,r=`${CredentialType.REFRESH_TOKEN}${Separators.CACHE_KEY_SEPARATOR}${THE_FAMILY_ID}${Separators.CACHE_KEY_SEPARATOR}`;if(-1===t.indexOf(e.toLowerCase())&&-1===t.indexOf(r.toLowerCase()))return!1}else if(-1===t.indexOf(this.clientId.toLowerCase()))return!1;return!0}credentialMatchesFilter(e,t){if(t.clientId&&!this.matchClientId(e,t.clientId))return!1;if(t.userAssertionHash&&!this.matchUserAssertionHash(e,t.userAssertionHash))return!1;if(\"string\"==typeof t.homeAccountId&&!this.matchHomeAccountId(e,t.homeAccountId))return!1;if(t.environment&&!this.matchEnvironment(e,t.environment))return!1;if(t.realm&&!this.matchRealm(e,t.realm))return!1;if(t.credentialType&&!this.matchCredentialType(e,t.credentialType))return!1;if(t.familyId&&!this.matchFamilyId(e,t.familyId))return!1;if(t.target&&!this.matchTarget(e,t.target))return!1;if((t.requestedClaimsHash||e.requestedClaimsHash)&&e.requestedClaimsHash!==t.requestedClaimsHash)return!1;if(e.credentialType===CredentialType.ACCESS_TOKEN_WITH_AUTH_SCHEME){if(t.tokenType&&!this.matchTokenType(e,t.tokenType))return!1;if(t.tokenType===AuthenticationScheme.SSH&&t.keyId&&!this.matchKeyId(e,t.keyId))return!1}return!0}getAppMetadataFilteredBy(e){const t=this.getKeys(),r={};return t.forEach((t=>{if(!this.isAppMetadata(t))return;const n=this.getAppMetadata(t);n&&(e.environment&&!this.matchEnvironment(n,e.environment)||e.clientId&&!this.matchClientId(n,e.clientId)||(r[t]=n))})),r}getAuthorityMetadataByAlias(e){const t=this.getAuthorityMetadataKeys();let r=null;return t.forEach((t=>{if(!this.isAuthorityMetadata(t)||-1===t.indexOf(this.clientId))return;const n=this.getAuthorityMetadata(t);n&&-1!==n.aliases.indexOf(e)&&(r=n)})),r}async removeAllAccounts(){const e=this.getAccountKeys(),t=[];e.forEach((e=>{t.push(this.removeAccount(e))})),await Promise.all(t)}async removeAccount(e){const t=this.getAccount(e,this.commonLogger);t&&(await this.removeAccountContext(t),this.removeItem(e))}async removeAccountContext(e){const t=this.getTokenKeys(),r=e.generateAccountId(),n=[];t.idToken.forEach((e=>{0===e.indexOf(r)&&this.removeIdToken(e)})),t.accessToken.forEach((e=>{0===e.indexOf(r)&&n.push(this.removeAccessToken(e))})),t.refreshToken.forEach((e=>{0===e.indexOf(r)&&this.removeRefreshToken(e)})),await Promise.all(n)}updateOutdatedCachedAccount(t,r,n){var i;if(r&&r.isSingleTenant()){null==(i=this.commonLogger)||i.verbose(\"updateOutdatedCachedAccount: Found a single-tenant (outdated) account entity in the cache, migrating to multi-tenant account entity\");const o=this.getAccountKeys().filter((e=>e.startsWith(r.homeAccountId))),a=[];o.forEach((e=>{const t=this.getCachedAccountEntity(e);t&&a.push(t)}));const s=a.find((e=>tenantIdMatchesHomeTenant(e.realm,e.homeAccountId)))||a[0];s.tenantProfiles=a.map((e=>({tenantId:e.realm,localAccountId:e.localAccountId,name:e.name,isHomeTenant:tenantIdMatchesHomeTenant(e.realm,e.homeAccountId)})));const l=e.toObject(new AccountEntity,{...s}),u=l.generateAccountKey();return o.forEach((e=>{e!==u&&this.removeOutdatedAccount(t)})),this.setAccount(l),null==n||n.verbose(\"Updated an outdated account entity in the cache\"),l}return r}async removeAccessToken(e){const t=this.getAccessTokenCredential(e);if(t){if(t.credentialType.toLowerCase()===CredentialType.ACCESS_TOKEN_WITH_AUTH_SCHEME.toLowerCase()&&t.tokenType===AuthenticationScheme.POP){const e=t.keyId;if(e)try{await this.cryptoImpl.removeTokenBindingKey(e)}catch(r){throw createClientAuthError(bindingKeyNotRemoved)}}return this.removeItem(e)}}removeAppMetadata(){return this.getKeys().forEach((e=>{this.isAppMetadata(e)&&this.removeItem(e)})),!0}readAccountFromCache(e){const t=AccountEntity.generateAccountCacheKey(e);return this.getAccount(t,this.commonLogger)}getIdToken(e,t,r,n,i){this.commonLogger.trace(\"CacheManager - getIdToken called\");const o={homeAccountId:e.homeAccountId,environment:e.environment,credentialType:CredentialType.ID_TOKEN,clientId:this.clientId,realm:r},a=this.getIdTokensByFilter(o,t),s=a.size;if(s__left_angle_mark_1)return this.commonLogger.info(\"CacheManager:getIdToken - No token found\"),null;if(s>1){let t=a;if(!r){const r=new Map;a.forEach(((t,n)=>{t.realm===e.tenantId&&r.set(n,t)}));const n=r.size;if(n__left_angle_mark_1)return this.commonLogger.info(\"CacheManager:getIdToken - Multiple ID tokens found for account but none match account entity tenant id, returning first result\"),a.values().next().value;if(1===n)return this.commonLogger.info(\"CacheManager:getIdToken - Multiple ID tokens found for account, defaulting to home tenant profile\"),r.values().next().value;t=r}return this.commonLogger.info(\"CacheManager:getIdToken - Multiple matching ID tokens found, clearing them\"),t.forEach(((e,t)=>{this.removeIdToken(t)})),n&&i&&n.addFields({multiMatchedID:a.size},i),null}return this.commonLogger.info(\"CacheManager:getIdToken - Returning ID token\"),a.values().next().value}getIdTokensByFilter(e,t){const r=t&&t.idToken||this.getTokenKeys().idToken,n=new Map;return r.forEach((t=>{if(!this.idTokenKeyMatchesFilter(t,{clientId:this.clientId,...e}))return;const r=this.getIdTokenCredential(t);r&&this.credentialMatchesFilter(r,e)&&n.set(t,r)})),n}idTokenKeyMatchesFilter(e,t){const r=e.toLowerCase();return!(t.clientId&&-1===r.indexOf(t.clientId.toLowerCase())||t.homeAccountId&&-1===r.indexOf(t.homeAccountId.toLowerCase()))}removeIdToken(e){this.removeItem(e)}removeRefreshToken(e){this.removeItem(e)}getAccessToken(e,t,r,n,i,o){this.commonLogger.trace(\"CacheManager - getAccessToken called\");const a=ScopeSet.createSearchScopes(t.scopes),s=t.authenticationScheme||AuthenticationScheme.BEARER,l=s&&s.toLowerCase()!==AuthenticationScheme.BEARER.toLowerCase()?CredentialType.ACCESS_TOKEN_WITH_AUTH_SCHEME:CredentialType.ACCESS_TOKEN,u={homeAccountId:e.homeAccountId,environment:e.environment,credentialType:l,clientId:this.clientId,realm:n||e.tenantId,target:a,tokenType:s,keyId:t.sshKid,requestedClaimsHash:t.requestedClaimsHash},c=r&&r.accessToken||this.getTokenKeys().accessToken,d=[];c.forEach((e=>{if(this.accessTokenKeyMatchesFilter(e,u,!0)){const t=this.getAccessTokenCredential(e);t&&this.credentialMatchesFilter(t,u)&&d.push(t)}}));const h=d.length;return h__left_angle_mark_1?(this.commonLogger.info(\"CacheManager:getAccessToken - No token found\"),null):h>1?(this.commonLogger.info(\"CacheManager:getAccessToken - Multiple access tokens found, clearing them\"),d.forEach((e=>{this.removeAccessToken(generateCredentialKey(e))})),i&&o&&i.addFields({multiMatchedAT:d.length},o),null):(this.commonLogger.info(\"CacheManager:getAccessToken - Returning access token\"),d[0])}accessTokenKeyMatchesFilter(e,t,r){const n=e.toLowerCase();if(t.clientId&&-1===n.indexOf(t.clientId.toLowerCase()))return!1;if(t.homeAccountId&&-1===n.indexOf(t.homeAccountId.toLowerCase()))return!1;if(t.realm&&-1===n.indexOf(t.realm.toLowerCase()))return!1;if(t.requestedClaimsHash&&-1===n.indexOf(t.requestedClaimsHash.toLowerCase()))return!1;if(t.target){const e=t.target.asArray();for(let t=0;t__left_angle_mark_e.length;t++){if(r&&!n.includes(e[t].toLowerCase()))return!1;if(!r&&n.includes(e[t].toLowerCase()))return!0}}return!0}getAccessTokensByFilter(e){const t=this.getTokenKeys(),r=[];return t.accessToken.forEach((t=>{if(!this.accessTokenKeyMatchesFilter(t,e,!0))return;const n=this.getAccessTokenCredential(t);n&&this.credentialMatchesFilter(n,e)&&r.push(n)})),r}getRefreshToken(e,t,r,n,i){this.commonLogger.trace(\"CacheManager - getRefreshToken called\");const o=t?THE_FAMILY_ID:void 0,a={homeAccountId:e.homeAccountId,environment:e.environment,credentialType:CredentialType.REFRESH_TOKEN,clientId:this.clientId,familyId:o},s=r&&r.refreshToken||this.getTokenKeys().refreshToken,l=[];s.forEach((e=>{if(this.refreshTokenKeyMatchesFilter(e,a)){const t=this.getRefreshTokenCredential(e);t&&this.credentialMatchesFilter(t,a)&&l.push(t)}}));const u=l.length;return u__left_angle_mark_1?(this.commonLogger.info(\"CacheManager:getRefreshToken - No refresh token found.\"),null):(u>1&&n&&i&&n.addFields({multiMatchedRT:u},i),this.commonLogger.info(\"CacheManager:getRefreshToken - returning refresh token\"),l[0])}refreshTokenKeyMatchesFilter(e,t){const r=e.toLowerCase();return!(t.familyId&&-1===r.indexOf(t.familyId.toLowerCase())||!t.familyId&&t.clientId&&-1===r.indexOf(t.clientId.toLowerCase())||t.homeAccountId&&-1===r.indexOf(t.homeAccountId.toLowerCase()))}readAppMetadataFromCache(e){const t={environment:e,clientId:this.clientId},r=this.getAppMetadataFilteredBy(t),n=Object.keys(r).map((e=>r[e])),i=n.length;if(i__left_angle_mark_1)return null;if(i>1)throw createClientAuthError(multipleMatchingAppMetadata);return n[0]}isAppMetadataFOCI(e){const t=this.readAppMetadataFromCache(e);return!(!t||t.familyId!==THE_FAMILY_ID)}matchHomeAccountId(e,t){return!(\"string\"!=typeof e.homeAccountId||t!==e.homeAccountId)}matchLocalAccountIdFromTokenClaims(e,t){return t===(e.oid||e.sub)}matchLocalAccountIdFromTenantProfile(e,t){return e.localAccountId===t}matchName(e,t){var r;return!(t.toLowerCase()!==(null==(r=e.name)?void 0:r.toLowerCase()))}matchUsername(e,t){return!(!e||\"string\"!=typeof e||(null==t?void 0:t.toLowerCase())!==e.toLowerCase())}matchUserAssertionHash(e,t){return!(!e.userAssertionHash||t!==e.userAssertionHash)}matchEnvironment(e,t){if(this.staticAuthorityOptions){const r=getAliasesFromStaticSources(this.staticAuthorityOptions,this.commonLogger);if(r.includes(t)&&r.includes(e.environment))return!0}const r=this.getAuthorityMetadataByAlias(t);return!!(r&&r.aliases.indexOf(e.environment)>-1)}matchCredentialType(e,t){return e.credentialType&&t.toLowerCase()===e.credentialType.toLowerCase()}matchClientId(e,t){return!(!e.clientId||t!==e.clientId)}matchFamilyId(e,t){return!(!e.familyId||t!==e.familyId)}matchRealm(e,t){var r;return!((null==(r=e.realm)?void 0:r.toLowerCase())!==t.toLowerCase())}matchNativeAccountId(e,t){return!(!e.nativeAccountId||t!==e.nativeAccountId)}matchLoginHintFromTokenClaims(e,t){return e.login_hint===t||e.preferred_username===t||e.upn===t}matchSid(e,t){return e.sid===t}matchAuthorityType(e,t){return!(!e.authorityType||t.toLowerCase()!==e.authorityType.toLowerCase())}matchTarget(e,t){return!(e.credentialType!==CredentialType.ACCESS_TOKEN&&e.credentialType!==CredentialType.ACCESS_TOKEN_WITH_AUTH_SCHEME||!e.target)&&ScopeSet.fromString(e.target).containsScopeSet(t)}matchTokenType(e,t){return!(!e.tokenType||e.tokenType!==t)}matchKeyId(e,t){return!(!e.keyId||e.keyId!==t)}isAppMetadata(e){return-1!==e.indexOf(APP_METADATA)}isAuthorityMetadata(e){return-1!==e.indexOf(AUTHORITY_METADATA_CONSTANTS.CACHE_KEY)}generateAuthorityMetadataCacheKey(e){return`${AUTHORITY_METADATA_CONSTANTS.CACHE_KEY}-${this.clientId}-${e}`}static toObject(e,t){for(const r in t)e[r]=t[r];return e}constructor(e,t,r,n){this.clientId=e,this.cryptoImpl=t,this.commonLogger=r.clone(name,version3),this.staticAuthorityOptions=n}},DefaultStorageClass=class extends CacheManager{setAccount(){throw createClientAuthError(methodNotImplemented)}getAccount(){throw createClientAuthError(methodNotImplemented)}getCachedAccountEntity(){throw createClientAuthError(methodNotImplemented)}setIdTokenCredential(){throw createClientAuthError(methodNotImplemented)}getIdTokenCredential(){throw createClientAuthError(methodNotImplemented)}setAccessTokenCredential(){throw createClientAuthError(methodNotImplemented)}getAccessTokenCredential(){throw createClientAuthError(methodNotImplemented)}setRefreshTokenCredential(){throw createClientAuthError(methodNotImplemented)}getRefreshTokenCredential(){throw createClientAuthError(methodNotImplemented)}setAppMetadata(){throw createClientAuthError(methodNotImplemented)}getAppMetadata(){throw createClientAuthError(methodNotImplemented)}setServerTelemetry(){throw createClientAuthError(methodNotImplemented)}getServerTelemetry(){throw createClientAuthError(methodNotImplemented)}setAuthorityMetadata(){throw createClientAuthError(methodNotImplemented)}getAuthorityMetadata(){throw createClientAuthError(methodNotImplemented)}getAuthorityMetadataKeys(){throw createClientAuthError(methodNotImplemented)}setThrottlingCache(){throw createClientAuthError(methodNotImplemented)}getThrottlingCache(){throw createClientAuthError(methodNotImplemented)}removeItem(){throw createClientAuthError(methodNotImplemented)}getKeys(){throw createClientAuthError(methodNotImplemented)}getAccountKeys(){throw createClientAuthError(methodNotImplemented)}getTokenKeys(){throw createClientAuthError(methodNotImplemented)}updateCredentialCacheKey(){throw createClientAuthError(methodNotImplemented)}removeOutdatedAccount(){throw createClientAuthError(methodNotImplemented)}}}}),DEFAULT_SYSTEM_OPTIONS,DEFAULT_LOGGER_IMPLEMENTATION,DEFAULT_CACHE_OPTIONS,DEFAULT_NETWORK_IMPLEMENTATION,DEFAULT_LIBRARY_INFO,DEFAULT_CLIENT_CREDENTIALS,DEFAULT_AZURE_CLOUD_OPTIONS,DEFAULT_TELEMETRY_OPTIONS;function buildClientConfiguration({authOptions:e,systemOptions:t,loggerOptions:r,cacheOptions:n,storageInterface:i,networkInterface:o,cryptoInterface:a,clientCredentials:s,libraryInfo:l,telemetry:u,serverTelemetryManager:c,persistencePlugin:d,serializableCache:h}){const f={...DEFAULT_LOGGER_IMPLEMENTATION,...r};return{authOptions:buildAuthOptions(e),systemOptions:{...DEFAULT_SYSTEM_OPTIONS,...t},loggerOptions:f,cacheOptions:{...DEFAULT_CACHE_OPTIONS,...n},storageInterface:i||new DefaultStorageClass(e.clientId,DEFAULT_CRYPTO_IMPLEMENTATION,new Logger(f)),networkInterface:o||DEFAULT_NETWORK_IMPLEMENTATION,cryptoInterface:a||DEFAULT_CRYPTO_IMPLEMENTATION,clientCredentials:s||DEFAULT_CLIENT_CREDENTIALS,libraryInfo:{...DEFAULT_LIBRARY_INFO,...l},telemetry:{...DEFAULT_TELEMETRY_OPTIONS,...u},serverTelemetryManager:c||null,persistencePlugin:d||null,serializableCache:h||null}}function buildAuthOptions(e){return{clientCapabilities:[],azureCloudOptions:DEFAULT_AZURE_CLOUD_OPTIONS,skipAuthorityMetadataCache:!1,instanceAware:!1,...e}}function isOidcProtocolMode(e){return e.authOptions.authority.options.protocolMode===ProtocolMode.OIDC}var init_ClientConfiguration=__esm({\"../../node_modules/.pnpm/@azure+msal-common@14.16.0/node_modules/@azure/msal-common/dist/config/ClientConfiguration.mjs\"(){init_globals(),init_ICrypto(),init_Logger(),init_Constants(),init_packageMetadata(),init_AuthorityOptions(),init_CacheManager(),init_ProtocolMode(),init_ClientAuthError(),init_ClientAuthErrorCodes(),DEFAULT_SYSTEM_OPTIONS={tokenRenewalOffsetSeconds:DEFAULT_TOKEN_RENEWAL_OFFSET_SEC,preventCorsPreflight:!1},DEFAULT_LOGGER_IMPLEMENTATION={loggerCallback:()=>{},piiLoggingEnabled:!1,logLevel:LogLevel.Info,correlationId:Constants.EMPTY_STRING},DEFAULT_CACHE_OPTIONS={claimsBasedCachingEnabled:!1},DEFAULT_NETWORK_IMPLEMENTATION={async sendGetRequestAsync(){throw createClientAuthError(methodNotImplemented)},async sendPostRequestAsync(){throw createClientAuthError(methodNotImplemented)}},DEFAULT_LIBRARY_INFO={sku:Constants.SKU,version:version3,cpu:Constants.EMPTY_STRING,os:Constants.EMPTY_STRING},DEFAULT_CLIENT_CREDENTIALS={clientSecret:Constants.EMPTY_STRING,clientAssertion:void 0},DEFAULT_AZURE_CLOUD_OPTIONS={azureCloudInstance:AzureCloudInstance.None,tenant:`${Constants.DEFAULT_COMMON_TENANT}`},DEFAULT_TELEMETRY_OPTIONS={application:{appName:\"\",appVersion:\"\"}}}}),CcsCredentialType,init_CcsCredential=__esm({\"../../node_modules/.pnpm/@azure+msal-common@14.16.0/node_modules/@azure/msal-common/dist/account/CcsCredential.mjs\"(){init_globals(),CcsCredentialType={HOME_ACCOUNT_ID:\"home_account_id\",UPN:\"UPN\"}}}),AADServerParamKeys_exports={},CLIENT_ID,REDIRECT_URI,RESPONSE_TYPE,RESPONSE_MODE,GRANT_TYPE,CLAIMS,SCOPE,ERROR,ERROR_DESCRIPTION,ACCESS_TOKEN,ID_TOKEN,REFRESH_TOKEN,EXPIRES_IN,REFRESH_TOKEN_EXPIRES_IN,STATE,NONCE,PROMPT,SESSION_STATE,CLIENT_INFO2,CODE,CODE_CHALLENGE,CODE_CHALLENGE_METHOD,CODE_VERIFIER,CLIENT_REQUEST_ID,X_CLIENT_SKU,X_CLIENT_VER,X_CLIENT_OS,X_CLIENT_CPU,X_CLIENT_CURR_TELEM,X_CLIENT_LAST_TELEM,X_MS_LIB_CAPABILITY,X_APP_NAME,X_APP_VER,POST_LOGOUT_URI,ID_TOKEN_HINT,DEVICE_CODE,CLIENT_SECRET,CLIENT_ASSERTION,CLIENT_ASSERTION_TYPE,TOKEN_TYPE,REQ_CNF,OBO_ASSERTION,REQUESTED_TOKEN_USE,ON_BEHALF_OF,FOCI,CCS_HEADER,RETURN_SPA_CODE,NATIVE_BROKER,LOGOUT_HINT,SID,LOGIN_HINT,DOMAIN_HINT,X_CLIENT_EXTRA_SKU,BROKER_CLIENT_ID,BROKER_REDIRECT_URI;__export(AADServerParamKeys_exports,{ACCESS_TOKEN:()=>ACCESS_TOKEN,BROKER_CLIENT_ID:()=>BROKER_CLIENT_ID,BROKER_REDIRECT_URI:()=>BROKER_REDIRECT_URI,CCS_HEADER:()=>CCS_HEADER,CLAIMS:()=>CLAIMS,CLIENT_ASSERTION:()=>CLIENT_ASSERTION,CLIENT_ASSERTION_TYPE:()=>CLIENT_ASSERTION_TYPE,CLIENT_ID:()=>CLIENT_ID,CLIENT_INFO:()=>CLIENT_INFO2,CLIENT_REQUEST_ID:()=>CLIENT_REQUEST_ID,CLIENT_SECRET:()=>CLIENT_SECRET,CODE:()=>CODE,CODE_CHALLENGE:()=>CODE_CHALLENGE,CODE_CHALLENGE_METHOD:()=>CODE_CHALLENGE_METHOD,CODE_VERIFIER:()=>CODE_VERIFIER,DEVICE_CODE:()=>DEVICE_CODE,DOMAIN_HINT:()=>DOMAIN_HINT,ERROR:()=>ERROR,ERROR_DESCRIPTION:()=>ERROR_DESCRIPTION,EXPIRES_IN:()=>EXPIRES_IN,FOCI:()=>FOCI,GRANT_TYPE:()=>GRANT_TYPE,ID_TOKEN:()=>ID_TOKEN,ID_TOKEN_HINT:()=>ID_TOKEN_HINT,LOGIN_HINT:()=>LOGIN_HINT,LOGOUT_HINT:()=>LOGOUT_HINT,NATIVE_BROKER:()=>NATIVE_BROKER,NONCE:()=>NONCE,OBO_ASSERTION:()=>OBO_ASSERTION,ON_BEHALF_OF:()=>ON_BEHALF_OF,POST_LOGOUT_URI:()=>POST_LOGOUT_URI,PROMPT:()=>PROMPT,REDIRECT_URI:()=>REDIRECT_URI,REFRESH_TOKEN:()=>REFRESH_TOKEN,REFRESH_TOKEN_EXPIRES_IN:()=>REFRESH_TOKEN_EXPIRES_IN,REQUESTED_TOKEN_USE:()=>REQUESTED_TOKEN_USE,REQ_CNF:()=>REQ_CNF,RESPONSE_MODE:()=>RESPONSE_MODE,RESPONSE_TYPE:()=>RESPONSE_TYPE,RETURN_SPA_CODE:()=>RETURN_SPA_CODE,SCOPE:()=>SCOPE,SESSION_STATE:()=>SESSION_STATE,SID:()=>SID,STATE:()=>STATE,TOKEN_TYPE:()=>TOKEN_TYPE,X_APP_NAME:()=>X_APP_NAME,X_APP_VER:()=>X_APP_VER,X_CLIENT_CPU:()=>X_CLIENT_CPU,X_CLIENT_CURR_TELEM:()=>X_CLIENT_CURR_TELEM,X_CLIENT_EXTRA_SKU:()=>X_CLIENT_EXTRA_SKU,X_CLIENT_LAST_TELEM:()=>X_CLIENT_LAST_TELEM,X_CLIENT_OS:()=>X_CLIENT_OS,X_CLIENT_SKU:()=>X_CLIENT_SKU,X_CLIENT_VER:()=>X_CLIENT_VER,X_MS_LIB_CAPABILITY:()=>X_MS_LIB_CAPABILITY});var init_AADServerParamKeys=__esm({\"../../node_modules/.pnpm/@azure+msal-common@14.16.0/node_modules/@azure/msal-common/dist/constants/AADServerParamKeys.mjs\"(){init_globals(),CLIENT_ID=\"client_id\",REDIRECT_URI=\"redirect_uri\",RESPONSE_TYPE=\"response_type\",RESPONSE_MODE=\"response_mode\",GRANT_TYPE=\"grant_type\",CLAIMS=\"claims\",SCOPE=\"scope\",ERROR=\"error\",ERROR_DESCRIPTION=\"error_description\",ACCESS_TOKEN=\"access_token\",ID_TOKEN=\"id_token\",REFRESH_TOKEN=\"refresh_token\",EXPIRES_IN=\"expires_in\",REFRESH_TOKEN_EXPIRES_IN=\"refresh_token_expires_in\",STATE=\"state\",NONCE=\"nonce\",PROMPT=\"prompt\",SESSION_STATE=\"session_state\",CLIENT_INFO2=\"client_info\",CODE=\"code\",CODE_CHALLENGE=\"code_challenge\",CODE_CHALLENGE_METHOD=\"code_challenge_method\",CODE_VERIFIER=\"code_verifier\",CLIENT_REQUEST_ID=\"client-request-id\",X_CLIENT_SKU=\"x-client-SKU\",X_CLIENT_VER=\"x-client-VER\",X_CLIENT_OS=\"x-client-OS\",X_CLIENT_CPU=\"x-client-CPU\",X_CLIENT_CURR_TELEM=\"x-client-current-telemetry\",X_CLIENT_LAST_TELEM=\"x-client-last-telemetry\",X_MS_LIB_CAPABILITY=\"x-ms-lib-capability\",X_APP_NAME=\"x-app-name\",X_APP_VER=\"x-app-ver\",POST_LOGOUT_URI=\"post_logout_redirect_uri\",ID_TOKEN_HINT=\"id_token_hint\",DEVICE_CODE=\"device_code\",CLIENT_SECRET=\"client_secret\",CLIENT_ASSERTION=\"client_assertion\",CLIENT_ASSERTION_TYPE=\"client_assertion_type\",TOKEN_TYPE=\"token_type\",REQ_CNF=\"req_cnf\",OBO_ASSERTION=\"assertion\",REQUESTED_TOKEN_USE=\"requested_token_use\",ON_BEHALF_OF=\"on_behalf_of\",FOCI=\"foci\",CCS_HEADER=\"X-AnchorMailbox\",RETURN_SPA_CODE=\"return_spa_code\",NATIVE_BROKER=\"nativebroker\",LOGOUT_HINT=\"logout_hint\",SID=\"sid\",LOGIN_HINT=\"login_hint\",DOMAIN_HINT=\"domain_hint\",X_CLIENT_EXTRA_SKU=\"x-client-xtra-sku\",BROKER_CLIENT_ID=\"brk_client_id\",BROKER_REDIRECT_URI=\"brk_redirect_uri\"}}),RequestValidator,init_RequestValidator=__esm({\"../../node_modules/.pnpm/@azure+msal-common@14.16.0/node_modules/@azure/msal-common/dist/request/RequestValidator.mjs\"(){init_globals(),init_ClientConfigurationError(),init_Constants(),init_ClientConfigurationErrorCodes(),RequestValidator=class{static validateRedirectUri(e){if(!e)throw createClientConfigurationError(redirectUriEmpty)}static validatePrompt(e){const t=[];for(const r in PromptValue)t.push(PromptValue[r]);if(t.indexOf(e)__left_angle_mark_0)throw createClientConfigurationError(invalidPromptValue)}static validateClaims(e){try{JSON.parse(e)}catch(t){throw createClientConfigurationError(invalidClaims)}}static validateCodeChallengeParams(e,t){if(!e||!t)throw createClientConfigurationError(pkceParamsMissing);this.validateCodeChallengeMethod(t)}static validateCodeChallengeMethod(e){if([CodeChallengeMethodValues.PLAIN,CodeChallengeMethodValues.S256].indexOf(e)__left_angle_mark_0)throw createClientConfigurationError(invalidCodeChallengeMethod)}}}}),RequestParameterBuilder;function instrumentBrokerParams(e,t,r){if(!t)return;const n=e.get(CLIENT_ID);n&&e.has(BROKER_CLIENT_ID)&&(null==r||r.addFields({embeddedClientId:n,embeddedRedirectUri:e.get(REDIRECT_URI)},t))}var init_RequestParameterBuilder=__esm({\"../../node_modules/.pnpm/@azure+msal-common@14.16.0/node_modules/@azure/msal-common/dist/request/RequestParameterBuilder.mjs\"(){init_globals(),init_Constants(),init_AADServerParamKeys(),init_ScopeSet(),init_ClientConfigurationError(),init_RequestValidator(),init_ClientConfigurationErrorCodes(),RequestParameterBuilder=class{addResponseTypeCode(){this.parameters.set(RESPONSE_TYPE,encodeURIComponent(Constants.CODE_RESPONSE_TYPE))}addResponseTypeForTokenAndIdToken(){this.parameters.set(RESPONSE_TYPE,encodeURIComponent(`${Constants.TOKEN_RESPONSE_TYPE} ${Constants.ID_TOKEN_RESPONSE_TYPE}`))}addResponseMode(e){this.parameters.set(RESPONSE_MODE,encodeURIComponent(e||ResponseMode.QUERY))}addNativeBroker(){this.parameters.set(NATIVE_BROKER,encodeURIComponent(\"1\"))}addScopes(e,t=!0,r=OIDC_DEFAULT_SCOPES){!t||r.includes(\"openid\")||e.includes(\"openid\")||r.push(\"openid\");const n=t?[...e||[],...r]:e||[],i=new ScopeSet(n);this.parameters.set(SCOPE,encodeURIComponent(i.printScopes()))}addClientId(e){this.parameters.set(CLIENT_ID,encodeURIComponent(e))}addRedirectUri(e){RequestValidator.validateRedirectUri(e),this.parameters.set(REDIRECT_URI,encodeURIComponent(e))}addPostLogoutRedirectUri(e){RequestValidator.validateRedirectUri(e),this.parameters.set(POST_LOGOUT_URI,encodeURIComponent(e))}addIdTokenHint(e){this.parameters.set(ID_TOKEN_HINT,encodeURIComponent(e))}addDomainHint(e){this.parameters.set(DOMAIN_HINT,encodeURIComponent(e))}addLoginHint(e){this.parameters.set(LOGIN_HINT,encodeURIComponent(e))}addCcsUpn(e){this.parameters.set(HeaderNames.CCS_HEADER,encodeURIComponent(`UPN:${e}`))}addCcsOid(e){this.parameters.set(HeaderNames.CCS_HEADER,encodeURIComponent(`Oid:${e.uid}@${e.utid}`))}addSid(e){this.parameters.set(SID,encodeURIComponent(e))}addClaims(e,t){const r=this.addClientCapabilitiesToClaims(e,t);RequestValidator.validateClaims(r),this.parameters.set(CLAIMS,encodeURIComponent(r))}addCorrelationId(e){this.parameters.set(CLIENT_REQUEST_ID,encodeURIComponent(e))}addLibraryInfo(e){this.parameters.set(X_CLIENT_SKU,e.sku),this.parameters.set(X_CLIENT_VER,e.version),e.os&&this.parameters.set(X_CLIENT_OS,e.os),e.cpu&&this.parameters.set(X_CLIENT_CPU,e.cpu)}addApplicationTelemetry(e){(null==e?void 0:e.appName)&&this.parameters.set(X_APP_NAME,e.appName),(null==e?void 0:e.appVersion)&&this.parameters.set(X_APP_VER,e.appVersion)}addPrompt(e){RequestValidator.validatePrompt(e),this.parameters.set(`${PROMPT}`,encodeURIComponent(e))}addState(e){e&&this.parameters.set(STATE,encodeURIComponent(e))}addNonce(e){this.parameters.set(NONCE,encodeURIComponent(e))}addCodeChallengeParams(e,t){if(RequestValidator.validateCodeChallengeParams(e,t),!e||!t)throw createClientConfigurationError(pkceParamsMissing);this.parameters.set(CODE_CHALLENGE,encodeURIComponent(e)),this.parameters.set(CODE_CHALLENGE_METHOD,encodeURIComponent(t))}addAuthorizationCode(e){this.parameters.set(CODE,encodeURIComponent(e))}addDeviceCode(e){this.parameters.set(DEVICE_CODE,encodeURIComponent(e))}addRefreshToken(e){this.parameters.set(REFRESH_TOKEN,encodeURIComponent(e))}addCodeVerifier(e){this.parameters.set(CODE_VERIFIER,encodeURIComponent(e))}addClientSecret(e){this.parameters.set(CLIENT_SECRET,encodeURIComponent(e))}addClientAssertion(e){e&&this.parameters.set(CLIENT_ASSERTION,encodeURIComponent(e))}addClientAssertionType(e){e&&this.parameters.set(CLIENT_ASSERTION_TYPE,encodeURIComponent(e))}addOboAssertion(e){this.parameters.set(OBO_ASSERTION,encodeURIComponent(e))}addRequestTokenUse(e){this.parameters.set(REQUESTED_TOKEN_USE,encodeURIComponent(e))}addGrantType(e){this.parameters.set(GRANT_TYPE,encodeURIComponent(e))}addClientInfo(){this.parameters.set(CLIENT_INFO,\"1\")}addExtraQueryParameters(e){Object.entries(e).forEach((([e,t])=>{!this.parameters.has(e)&&t&&this.parameters.set(e,t)}))}addClientCapabilitiesToClaims(e,t){let r;if(e)try{r=JSON.parse(e)}catch(n){throw createClientConfigurationError(invalidClaims)}else r={};return t&&t.length>0&&(r.hasOwnProperty(ClaimsRequestKeys.ACCESS_TOKEN)||(r[ClaimsRequestKeys.ACCESS_TOKEN]={}),r[ClaimsRequestKeys.ACCESS_TOKEN][ClaimsRequestKeys.XMS_CC]={values:t}),JSON.stringify(r)}addUsername(e){this.parameters.set(PasswordGrantConstants.username,encodeURIComponent(e))}addPassword(e){this.parameters.set(PasswordGrantConstants.password,encodeURIComponent(e))}addPopToken(e){e&&(this.parameters.set(TOKEN_TYPE,AuthenticationScheme.POP),this.parameters.set(REQ_CNF,encodeURIComponent(e)))}addSshJwk(e){e&&(this.parameters.set(TOKEN_TYPE,AuthenticationScheme.SSH),this.parameters.set(REQ_CNF,encodeURIComponent(e)))}addServerTelemetry(e){this.parameters.set(X_CLIENT_CURR_TELEM,e.generateCurrentRequestHeaderValue()),this.parameters.set(X_CLIENT_LAST_TELEM,e.generateLastRequestHeaderValue())}addThrottling(){this.parameters.set(X_MS_LIB_CAPABILITY,ThrottlingConstants.X_MS_LIB_CAPABILITY_VALUE)}addLogoutHint(e){this.parameters.set(LOGOUT_HINT,encodeURIComponent(e))}addBrokerParameters(e){const t={};t[BROKER_CLIENT_ID]=e.brokerClientId,t[BROKER_REDIRECT_URI]=e.brokerRedirectUri,this.addExtraQueryParameters(t)}createQueryString(){const e=new Array;return this.parameters.forEach(((t,r)=>{e.push(`${r}=${t}`)})),instrumentBrokerParams(this.parameters,this.correlationId,this.performanceClient),e.join(\"&\")}constructor(e,t){this.parameters=new Map,this.performanceClient=t,this.correlationId=e}}}});function isOpenIdConfigResponse(e){return e.hasOwnProperty(\"authorization_endpoint\")&&e.hasOwnProperty(\"token_endpoint\")&&e.hasOwnProperty(\"issuer\")&&e.hasOwnProperty(\"jwks_uri\")}var init_OpenIdConfigResponse=__esm({\"../../node_modules/.pnpm/@azure+msal-common@14.16.0/node_modules/@azure/msal-common/dist/authority/OpenIdConfigResponse.mjs\"(){init_globals()}});function isCloudInstanceDiscoveryResponse(e){return e.hasOwnProperty(\"tenant_discovery_endpoint\")&&e.hasOwnProperty(\"metadata\")}var init_CloudInstanceDiscoveryResponse=__esm({\"../../node_modules/.pnpm/@azure+msal-common@14.16.0/node_modules/@azure/msal-common/dist/authority/CloudInstanceDiscoveryResponse.mjs\"(){init_globals()}});function isCloudInstanceDiscoveryErrorResponse(e){return e.hasOwnProperty(\"error\")&&e.hasOwnProperty(\"error_description\")}var init_CloudInstanceDiscoveryErrorResponse=__esm({\"../../node_modules/.pnpm/@azure+msal-common@14.16.0/node_modules/@azure/msal-common/dist/authority/CloudInstanceDiscoveryErrorResponse.mjs\"(){init_globals()}}),PerformanceEvents,PerformanceEventAbbreviations,PerformanceEventStatus,IntFields,init_PerformanceEvent=__esm({\"../../node_modules/.pnpm/@azure+msal-common@14.16.0/node_modules/@azure/msal-common/dist/telemetry/performance/PerformanceEvent.mjs\"(){init_globals(),PerformanceEvents={AcquireTokenByCode:\"acquireTokenByCode\",AcquireTokenByRefreshToken:\"acquireTokenByRefreshToken\",AcquireTokenSilent:\"acquireTokenSilent\",AcquireTokenSilentAsync:\"acquireTokenSilentAsync\",AcquireTokenPopup:\"acquireTokenPopup\",AcquireTokenPreRedirect:\"acquireTokenPreRedirect\",AcquireTokenRedirect:\"acquireTokenRedirect\",CryptoOptsGetPublicKeyThumbprint:\"cryptoOptsGetPublicKeyThumbprint\",CryptoOptsSignJwt:\"cryptoOptsSignJwt\",SilentCacheClientAcquireToken:\"silentCacheClientAcquireToken\",SilentIframeClientAcquireToken:\"silentIframeClientAcquireToken\",AwaitConcurrentIframe:\"awaitConcurrentIframe\",SilentRefreshClientAcquireToken:\"silentRefreshClientAcquireToken\",SsoSilent:\"ssoSilent\",StandardInteractionClientGetDiscoveredAuthority:\"standardInteractionClientGetDiscoveredAuthority\",FetchAccountIdWithNativeBroker:\"fetchAccountIdWithNativeBroker\",NativeInteractionClientAcquireToken:\"nativeInteractionClientAcquireToken\",BaseClientCreateTokenRequestHeaders:\"baseClientCreateTokenRequestHeaders\",NetworkClientSendPostRequestAsync:\"networkClientSendPostRequestAsync\",RefreshTokenClientExecutePostToTokenEndpoint:\"refreshTokenClientExecutePostToTokenEndpoint\",AuthorizationCodeClientExecutePostToTokenEndpoint:\"authorizationCodeClientExecutePostToTokenEndpoint\",BrokerHandhshake:\"brokerHandshake\",AcquireTokenByRefreshTokenInBroker:\"acquireTokenByRefreshTokenInBroker\",AcquireTokenByBroker:\"acquireTokenByBroker\",RefreshTokenClientExecuteTokenRequest:\"refreshTokenClientExecuteTokenRequest\",RefreshTokenClientAcquireToken:\"refreshTokenClientAcquireToken\",RefreshTokenClientAcquireTokenWithCachedRefreshToken:\"refreshTokenClientAcquireTokenWithCachedRefreshToken\",RefreshTokenClientAcquireTokenByRefreshToken:\"refreshTokenClientAcquireTokenByRefreshToken\",RefreshTokenClientCreateTokenRequestBody:\"refreshTokenClientCreateTokenRequestBody\",AcquireTokenFromCache:\"acquireTokenFromCache\",SilentFlowClientAcquireCachedToken:\"silentFlowClientAcquireCachedToken\",SilentFlowClientGenerateResultFromCacheRecord:\"silentFlowClientGenerateResultFromCacheRecord\",AcquireTokenBySilentIframe:\"acquireTokenBySilentIframe\",InitializeBaseRequest:\"initializeBaseRequest\",InitializeSilentRequest:\"initializeSilentRequest\",InitializeClientApplication:\"initializeClientApplication\",SilentIframeClientTokenHelper:\"silentIframeClientTokenHelper\",SilentHandlerInitiateAuthRequest:\"silentHandlerInitiateAuthRequest\",SilentHandlerMonitorIframeForHash:\"silentHandlerMonitorIframeForHash\",SilentHandlerLoadFrame:\"silentHandlerLoadFrame\",SilentHandlerLoadFrameSync:\"silentHandlerLoadFrameSync\",StandardInteractionClientCreateAuthCodeClient:\"standardInteractionClientCreateAuthCodeClient\",StandardInteractionClientGetClientConfiguration:\"standardInteractionClientGetClientConfiguration\",StandardInteractionClientInitializeAuthorizationRequest:\"standardInteractionClientInitializeAuthorizationRequest\",StandardInteractionClientInitializeAuthorizationCodeRequest:\"standardInteractionClientInitializeAuthorizationCodeRequest\",GetAuthCodeUrl:\"getAuthCodeUrl\",HandleCodeResponseFromServer:\"handleCodeResponseFromServer\",HandleCodeResponse:\"handleCodeResponse\",UpdateTokenEndpointAuthority:\"updateTokenEndpointAuthority\",AuthClientAcquireToken:\"authClientAcquireToken\",AuthClientExecuteTokenRequest:\"authClientExecuteTokenRequest\",AuthClientCreateTokenRequestBody:\"authClientCreateTokenRequestBody\",AuthClientCreateQueryString:\"authClientCreateQueryString\",PopTokenGenerateCnf:\"popTokenGenerateCnf\",PopTokenGenerateKid:\"popTokenGenerateKid\",HandleServerTokenResponse:\"handleServerTokenResponse\",DeserializeResponse:\"deserializeResponse\",AuthorityFactoryCreateDiscoveredInstance:\"authorityFactoryCreateDiscoveredInstance\",AuthorityResolveEndpointsAsync:\"authorityResolveEndpointsAsync\",AuthorityResolveEndpointsFromLocalSources:\"authorityResolveEndpointsFromLocalSources\",AuthorityGetCloudDiscoveryMetadataFromNetwork:\"authorityGetCloudDiscoveryMetadataFromNetwork\",AuthorityUpdateCloudDiscoveryMetadata:\"authorityUpdateCloudDiscoveryMetadata\",AuthorityGetEndpointMetadataFromNetwork:\"authorityGetEndpointMetadataFromNetwork\",AuthorityUpdateEndpointMetadata:\"authorityUpdateEndpointMetadata\",AuthorityUpdateMetadataWithRegionalInformation:\"authorityUpdateMetadataWithRegionalInformation\",RegionDiscoveryDetectRegion:\"regionDiscoveryDetectRegion\",RegionDiscoveryGetRegionFromIMDS:\"regionDiscoveryGetRegionFromIMDS\",RegionDiscoveryGetCurrentVersion:\"regionDiscoveryGetCurrentVersion\",AcquireTokenByCodeAsync:\"acquireTokenByCodeAsync\",GetEndpointMetadataFromNetwork:\"getEndpointMetadataFromNetwork\",GetCloudDiscoveryMetadataFromNetworkMeasurement:\"getCloudDiscoveryMetadataFromNetworkMeasurement\",HandleRedirectPromiseMeasurement:\"handleRedirectPromise\",HandleNativeRedirectPromiseMeasurement:\"handleNativeRedirectPromise\",UpdateCloudDiscoveryMetadataMeasurement:\"updateCloudDiscoveryMetadataMeasurement\",UsernamePasswordClientAcquireToken:\"usernamePasswordClientAcquireToken\",NativeMessageHandlerHandshake:\"nativeMessageHandlerHandshake\",NativeGenerateAuthResult:\"nativeGenerateAuthResult\",RemoveHiddenIframe:\"removeHiddenIframe\",ClearTokensAndKeysWithClaims:\"clearTokensAndKeysWithClaims\",CacheManagerGetRefreshToken:\"cacheManagerGetRefreshToken\",GeneratePkceCodes:\"generatePkceCodes\",GenerateCodeVerifier:\"generateCodeVerifier\",GenerateCodeChallengeFromVerifier:\"generateCodeChallengeFromVerifier\",Sha256Digest:\"sha256Digest\",GetRandomValues:\"getRandomValues\"},PerformanceEventAbbreviations=new Map([[PerformanceEvents.AcquireTokenByCode,\"ATByCode\"],[PerformanceEvents.AcquireTokenByRefreshToken,\"ATByRT\"],[PerformanceEvents.AcquireTokenSilent,\"ATS\"],[PerformanceEvents.AcquireTokenSilentAsync,\"ATSAsync\"],[PerformanceEvents.AcquireTokenPopup,\"ATPopup\"],[PerformanceEvents.AcquireTokenRedirect,\"ATRedirect\"],[PerformanceEvents.CryptoOptsGetPublicKeyThumbprint,\"CryptoGetPKThumb\"],[PerformanceEvents.CryptoOptsSignJwt,\"CryptoSignJwt\"],[PerformanceEvents.SilentCacheClientAcquireToken,\"SltCacheClientAT\"],[PerformanceEvents.SilentIframeClientAcquireToken,\"SltIframeClientAT\"],[PerformanceEvents.SilentRefreshClientAcquireToken,\"SltRClientAT\"],[PerformanceEvents.SsoSilent,\"SsoSlt\"],[PerformanceEvents.StandardInteractionClientGetDiscoveredAuthority,\"StdIntClientGetDiscAuth\"],[PerformanceEvents.FetchAccountIdWithNativeBroker,\"FetchAccIdWithNtvBroker\"],[PerformanceEvents.NativeInteractionClientAcquireToken,\"NtvIntClientAT\"],[PerformanceEvents.BaseClientCreateTokenRequestHeaders,\"BaseClientCreateTReqHead\"],[PerformanceEvents.NetworkClientSendPostRequestAsync,\"NetClientSendPost\"],[PerformanceEvents.RefreshTokenClientExecutePostToTokenEndpoint,\"RTClientExecPost\"],[PerformanceEvents.AuthorizationCodeClientExecutePostToTokenEndpoint,\"AuthCodeClientExecPost\"],[PerformanceEvents.BrokerHandhshake,\"BrokerHandshake\"],[PerformanceEvents.AcquireTokenByRefreshTokenInBroker,\"ATByRTInBroker\"],[PerformanceEvents.AcquireTokenByBroker,\"ATByBroker\"],[PerformanceEvents.RefreshTokenClientExecuteTokenRequest,\"RTClientExecTReq\"],[PerformanceEvents.RefreshTokenClientAcquireToken,\"RTClientAT\"],[PerformanceEvents.RefreshTokenClientAcquireTokenWithCachedRefreshToken,\"RTClientATWithCachedRT\"],[PerformanceEvents.RefreshTokenClientAcquireTokenByRefreshToken,\"RTClientATByRT\"],[PerformanceEvents.RefreshTokenClientCreateTokenRequestBody,\"RTClientCreateTReqBody\"],[PerformanceEvents.AcquireTokenFromCache,\"ATFromCache\"],[PerformanceEvents.SilentFlowClientAcquireCachedToken,\"SltFlowClientATCached\"],[PerformanceEvents.SilentFlowClientGenerateResultFromCacheRecord,\"SltFlowClientGenResFromCache\"],[PerformanceEvents.AcquireTokenBySilentIframe,\"ATBySltIframe\"],[PerformanceEvents.InitializeBaseRequest,\"InitBaseReq\"],[PerformanceEvents.InitializeSilentRequest,\"InitSltReq\"],[PerformanceEvents.InitializeClientApplication,\"InitClientApplication\"],[PerformanceEvents.SilentIframeClientTokenHelper,\"SIClientTHelper\"],[PerformanceEvents.SilentHandlerInitiateAuthRequest,\"SHandlerInitAuthReq\"],[PerformanceEvents.SilentHandlerMonitorIframeForHash,\"SltHandlerMonitorIframeForHash\"],[PerformanceEvents.SilentHandlerLoadFrame,\"SHandlerLoadFrame\"],[PerformanceEvents.SilentHandlerLoadFrameSync,\"SHandlerLoadFrameSync\"],[PerformanceEvents.StandardInteractionClientCreateAuthCodeClient,\"StdIntClientCreateAuthCodeClient\"],[PerformanceEvents.StandardInteractionClientGetClientConfiguration,\"StdIntClientGetClientConf\"],[PerformanceEvents.StandardInteractionClientInitializeAuthorizationRequest,\"StdIntClientInitAuthReq\"],[PerformanceEvents.StandardInteractionClientInitializeAuthorizationCodeRequest,\"StdIntClientInitAuthCodeReq\"],[PerformanceEvents.GetAuthCodeUrl,\"GetAuthCodeUrl\"],[PerformanceEvents.HandleCodeResponseFromServer,\"HandleCodeResFromServer\"],[PerformanceEvents.HandleCodeResponse,\"HandleCodeResp\"],[PerformanceEvents.UpdateTokenEndpointAuthority,\"UpdTEndpointAuth\"],[PerformanceEvents.AuthClientAcquireToken,\"AuthClientAT\"],[PerformanceEvents.AuthClientExecuteTokenRequest,\"AuthClientExecTReq\"],[PerformanceEvents.AuthClientCreateTokenRequestBody,\"AuthClientCreateTReqBody\"],[PerformanceEvents.AuthClientCreateQueryString,\"AuthClientCreateQueryStr\"],[PerformanceEvents.PopTokenGenerateCnf,\"PopTGenCnf\"],[PerformanceEvents.PopTokenGenerateKid,\"PopTGenKid\"],[PerformanceEvents.HandleServerTokenResponse,\"HandleServerTRes\"],[PerformanceEvents.DeserializeResponse,\"DeserializeRes\"],[PerformanceEvents.AuthorityFactoryCreateDiscoveredInstance,\"AuthFactCreateDiscInst\"],[PerformanceEvents.AuthorityResolveEndpointsAsync,\"AuthResolveEndpointsAsync\"],[PerformanceEvents.AuthorityResolveEndpointsFromLocalSources,\"AuthResolveEndpointsFromLocal\"],[PerformanceEvents.AuthorityGetCloudDiscoveryMetadataFromNetwork,\"AuthGetCDMetaFromNet\"],[PerformanceEvents.AuthorityUpdateCloudDiscoveryMetadata,\"AuthUpdCDMeta\"],[PerformanceEvents.AuthorityGetEndpointMetadataFromNetwork,\"AuthUpdCDMetaFromNet\"],[PerformanceEvents.AuthorityUpdateEndpointMetadata,\"AuthUpdEndpointMeta\"],[PerformanceEvents.AuthorityUpdateMetadataWithRegionalInformation,\"AuthUpdMetaWithRegInfo\"],[PerformanceEvents.RegionDiscoveryDetectRegion,\"RegDiscDetectReg\"],[PerformanceEvents.RegionDiscoveryGetRegionFromIMDS,\"RegDiscGetRegFromIMDS\"],[PerformanceEvents.RegionDiscoveryGetCurrentVersion,\"RegDiscGetCurrentVer\"],[PerformanceEvents.AcquireTokenByCodeAsync,\"ATByCodeAsync\"],[PerformanceEvents.GetEndpointMetadataFromNetwork,\"GetEndpointMetaFromNet\"],[PerformanceEvents.GetCloudDiscoveryMetadataFromNetworkMeasurement,\"GetCDMetaFromNet\"],[PerformanceEvents.HandleRedirectPromiseMeasurement,\"HandleRedirectPromise\"],[PerformanceEvents.HandleNativeRedirectPromiseMeasurement,\"HandleNtvRedirectPromise\"],[PerformanceEvents.UpdateCloudDiscoveryMetadataMeasurement,\"UpdateCDMeta\"],[PerformanceEvents.UsernamePasswordClientAcquireToken,\"UserPassClientAT\"],[PerformanceEvents.NativeMessageHandlerHandshake,\"NtvMsgHandlerHandshake\"],[PerformanceEvents.NativeGenerateAuthResult,\"NtvGenAuthRes\"],[PerformanceEvents.RemoveHiddenIframe,\"RemoveHiddenIframe\"],[PerformanceEvents.ClearTokensAndKeysWithClaims,\"ClearTAndKeysWithClaims\"],[PerformanceEvents.CacheManagerGetRefreshToken,\"CacheManagerGetRT\"],[PerformanceEvents.GeneratePkceCodes,\"GenPkceCodes\"],[PerformanceEvents.GenerateCodeVerifier,\"GenCodeVerifier\"],[PerformanceEvents.GenerateCodeChallengeFromVerifier,\"GenCodeChallengeFromVerifier\"],[PerformanceEvents.Sha256Digest,\"Sha256Digest\"],[PerformanceEvents.GetRandomValues,\"GetRandomValues\"]]),PerformanceEventStatus={NotStarted:0,InProgress:1,Completed:2},IntFields=new Set([\"accessTokenSize\",\"durationMs\",\"idTokenSize\",\"matsSilentStatus\",\"matsHttpStatus\",\"refreshTokenSize\",\"queuedTimeMs\",\"startTimeMs\",\"status\",\"multiMatchedAT\",\"multiMatchedID\",\"multiMatchedRT\"])}}),invoke,invokeAsync,init_FunctionWrappers=__esm({\"../../node_modules/.pnpm/@azure+msal-common@14.16.0/node_modules/@azure/msal-common/dist/utils/FunctionWrappers.mjs\"(){init_globals(),invoke=(e,t,r,n,i)=>(...o)=>{r.trace(`Executing function ${t}`);const a=null==n?void 0:n.startMeasurement(t,i);if(i){const e=t+\"CallCount\";null==n||n.incrementFields({[e]:1},i)}try{const n=e(...o);return null==a||a.end({success:!0}),r.trace(`Returning result from ${t}`),n}catch(s){r.trace(`Error occurred in ${t}`);try{r.trace(JSON.stringify(s))}catch(l){r.trace(\"Unable to print error message.\")}throw null==a||a.end({success:!1},s),s}},invokeAsync=(e,t,r,n,i)=>(...o)=>{r.trace(`Executing function ${t}`);const a=null==n?void 0:n.startMeasurement(t,i);if(i){const e=t+\"CallCount\";null==n||n.incrementFields({[e]:1},i)}return null==n||n.setPreQueueTime(t,i),e(...o).then((e=>(r.trace(`Returning result from ${t}`),null==a||a.end({success:!0}),e))).catch((e=>{r.trace(`Error occurred in ${t}`);try{r.trace(JSON.stringify(e))}catch(n){r.trace(\"Unable to print error message.\")}throw null==a||a.end({success:!1},e),e}))}}}),RegionDiscovery,init_RegionDiscovery=__esm({\"../../node_modules/.pnpm/@azure+msal-common@14.16.0/node_modules/@azure/msal-common/dist/authority/RegionDiscovery.mjs\"(){init_globals(),init_Constants(),init_PerformanceEvent(),init_FunctionWrappers(),(RegionDiscovery=class e{async detectRegion(t,r){var n;null==(n=this.performanceClient)||n.addQueueMeasurement(PerformanceEvents.RegionDiscoveryDetectRegion,this.correlationId);let i=t;if(i)r.region_source=RegionDiscoverySources.ENVIRONMENT_VARIABLE;else{const t=e.IMDS_OPTIONS;try{const e=await invokeAsync(this.getRegionFromIMDS.bind(this),PerformanceEvents.RegionDiscoveryGetRegionFromIMDS,this.logger,this.performanceClient,this.correlationId)(Constants.IMDS_VERSION,t);if(e.status===ResponseCodes.httpSuccess&&(i=e.body,r.region_source=RegionDiscoverySources.IMDS),e.status===ResponseCodes.httpBadRequest){const e=await invokeAsync(this.getCurrentVersion.bind(this),PerformanceEvents.RegionDiscoveryGetCurrentVersion,this.logger,this.performanceClient,this.correlationId)(t);if(!e)return r.region_source=RegionDiscoverySources.FAILED_AUTO_DETECTION,null;const n=await invokeAsync(this.getRegionFromIMDS.bind(this),PerformanceEvents.RegionDiscoveryGetRegionFromIMDS,this.logger,this.performanceClient,this.correlationId)(e,t);n.status===ResponseCodes.httpSuccess&&(i=n.body,r.region_source=RegionDiscoverySources.IMDS)}}catch(o){return r.region_source=RegionDiscoverySources.FAILED_AUTO_DETECTION,null}}return i||(r.region_source=RegionDiscoverySources.FAILED_AUTO_DETECTION),i||null}async getRegionFromIMDS(e,t){var r;return null==(r=this.performanceClient)||r.addQueueMeasurement(PerformanceEvents.RegionDiscoveryGetRegionFromIMDS,this.correlationId),this.networkInterface.sendGetRequestAsync(`${Constants.IMDS_ENDPOINT}?api-version=${e}&format=text`,t,Constants.IMDS_TIMEOUT)}async getCurrentVersion(e){var t;null==(t=this.performanceClient)||t.addQueueMeasurement(PerformanceEvents.RegionDiscoveryGetCurrentVersion,this.correlationId);try{const t=await this.networkInterface.sendGetRequestAsync(`${Constants.IMDS_ENDPOINT}?format=json`,e);return t.status===ResponseCodes.httpBadRequest&&t.body&&t.body[\"newest-versions\"]&&t.body[\"newest-versions\"].length>0?t.body[\"newest-versions\"][0]:null}catch(r){return null}}constructor(e,t,r,n){this.networkInterface=e,this.logger=t,this.performanceClient=r,this.correlationId=n}}).IMDS_OPTIONS={headers:{Metadata:\"true\"}}}}),Authority;function getTenantFromAuthorityString(e){var t;const r=null==(t=new UrlString(e).getUrlComponents().PathSegments.slice(-1)[0])?void 0:t.toLowerCase();switch(r){case AADAuthorityConstants.COMMON:case AADAuthorityConstants.ORGANIZATIONS:case AADAuthorityConstants.CONSUMERS:return;default:return r}}function formatAuthorityUri(e){return e.endsWith(Constants.FORWARD_SLASH)?e:`${e}${Constants.FORWARD_SLASH}`}function buildStaticAuthorityOptions(e){const t=e.cloudDiscoveryMetadata;let r;if(t)try{r=JSON.parse(t)}catch(n){throw createClientConfigurationError(invalidCloudDiscoveryMetadata)}return{canonicalAuthority:e.authority?formatAuthorityUri(e.authority):void 0,knownAuthorities:e.knownAuthorities,cloudDiscoveryMetadata:r}}var init_Authority=__esm({\"../../node_modules/.pnpm/@azure+msal-common@14.16.0/node_modules/@azure/msal-common/dist/authority/Authority.mjs\"(){init_globals(),init_AuthorityType(),init_OpenIdConfigResponse(),init_UrlString(),init_ClientAuthError(),init_Constants(),init_AuthorityMetadata(),init_ClientConfigurationError(),init_ProtocolMode(),init_AuthorityOptions(),init_CloudInstanceDiscoveryResponse(),init_CloudInstanceDiscoveryErrorResponse(),init_RegionDiscovery(),init_AuthError(),init_PerformanceEvent(),init_FunctionWrappers(),init_CacheHelpers(),init_ClientAuthErrorCodes(),init_ClientConfigurationErrorCodes(),(Authority=class e{getAuthorityType(e){if(e.HostNameAndPort.endsWith(Constants.CIAM_AUTH_URL))return AuthorityType.Ciam;const t=e.PathSegments;if(t.length)switch(t[0].toLowerCase()){case Constants.ADFS:return AuthorityType.Adfs;case Constants.DSTS:return AuthorityType.Dsts}return AuthorityType.Default}get authorityType(){return this.getAuthorityType(this.canonicalAuthorityUrlComponents)}get protocolMode(){return this.authorityOptions.protocolMode}get options(){return this.authorityOptions}get canonicalAuthority(){return this._canonicalAuthority.urlString}set canonicalAuthority(e){this._canonicalAuthority=new UrlString(e),this._canonicalAuthority.validateAsUri(),this._canonicalAuthorityUrlComponents=null}get canonicalAuthorityUrlComponents(){return this._canonicalAuthorityUrlComponents||(this._canonicalAuthorityUrlComponents=this._canonicalAuthority.getUrlComponents()),this._canonicalAuthorityUrlComponents}get hostnameAndPort(){return this.canonicalAuthorityUrlComponents.HostNameAndPort.toLowerCase()}get tenant(){return this.canonicalAuthorityUrlComponents.PathSegments[0]}get authorizationEndpoint(){if(this.discoveryComplete())return this.replacePath(this.metadata.authorization_endpoint);throw createClientAuthError(endpointResolutionError)}get tokenEndpoint(){if(this.discoveryComplete())return this.replacePath(this.metadata.token_endpoint);throw createClientAuthError(endpointResolutionError)}get deviceCodeEndpoint(){if(this.discoveryComplete())return this.replacePath(this.metadata.token_endpoint.replace(\"/token\",\"/devicecode\"));throw createClientAuthError(endpointResolutionError)}get endSessionEndpoint(){if(this.discoveryComplete()){if(!this.metadata.end_session_endpoint)throw createClientAuthError(endSessionEndpointNotSupported);return this.replacePath(this.metadata.end_session_endpoint)}throw createClientAuthError(endpointResolutionError)}get selfSignedJwtAudience(){if(this.discoveryComplete())return this.replacePath(this.metadata.issuer);throw createClientAuthError(endpointResolutionError)}get jwksUri(){if(this.discoveryComplete())return this.replacePath(this.metadata.jwks_uri);throw createClientAuthError(endpointResolutionError)}canReplaceTenant(t){return 1===t.PathSegments.length&&!e.reservedTenantDomains.has(t.PathSegments[0])&&this.getAuthorityType(t)===AuthorityType.Default&&this.protocolMode===ProtocolMode.AAD}replaceTenant(e){return e.replace(/{tenant}|{tenantid}/g,this.tenant)}replacePath(e){let t=e;const r=new UrlString(this.metadata.canonical_authority).getUrlComponents(),n=r.PathSegments;return this.canonicalAuthorityUrlComponents.PathSegments.forEach(((e,i)=>{let o=n[i];if(0===i&&this.canReplaceTenant(r)){const e=new UrlString(this.metadata.authorization_endpoint).getUrlComponents().PathSegments[0];o!==e&&(this.logger.verbose(`Replacing tenant domain name ${o} with id ${e}`),o=e)}e!==o&&(t=t.replace(`/${o}/`,`/${e}/`))})),this.replaceTenant(t)}get defaultOpenIdConfigurationEndpoint(){const e=this.hostnameAndPort;return this.canonicalAuthority.endsWith(\"v2.0/\")||this.authorityType===AuthorityType.Adfs||this.protocolMode!==ProtocolMode.AAD&&!this.isAliasOfKnownMicrosoftAuthority(e)?`${this.canonicalAuthority}.well-known/openid-configuration`:`${this.canonicalAuthority}v2.0/.well-known/openid-configuration`}discoveryComplete(){return!!this.metadata}async resolveEndpointsAsync(){var e,t;null==(e=this.performanceClient)||e.addQueueMeasurement(PerformanceEvents.AuthorityResolveEndpointsAsync,this.correlationId);const r=this.getCurrentMetadataEntity(),n=await invokeAsync(this.updateCloudDiscoveryMetadata.bind(this),PerformanceEvents.AuthorityUpdateCloudDiscoveryMetadata,this.logger,this.performanceClient,this.correlationId)(r);this.canonicalAuthority=this.canonicalAuthority.replace(this.hostnameAndPort,r.preferred_network);const i=await invokeAsync(this.updateEndpointMetadata.bind(this),PerformanceEvents.AuthorityUpdateEndpointMetadata,this.logger,this.performanceClient,this.correlationId)(r);this.updateCachedMetadata(r,n,{source:i}),null==(t=this.performanceClient)||t.addFields({cloudDiscoverySource:n,authorityEndpointSource:i},this.correlationId)}getCurrentMetadataEntity(){let e=this.cacheManager.getAuthorityMetadataByAlias(this.hostnameAndPort);return e||(e={aliases:[],preferred_cache:this.hostnameAndPort,preferred_network:this.hostnameAndPort,canonical_authority:this.canonicalAuthority,authorization_endpoint:\"\",token_endpoint:\"\",end_session_endpoint:\"\",issuer:\"\",aliasesFromNetwork:!1,endpointsFromNetwork:!1,expiresAt:generateAuthorityMetadataExpiresAt(),jwks_uri:\"\"}),e}updateCachedMetadata(e,t,r){t!==AuthorityMetadataSource.CACHE&&(null==r?void 0:r.source)!==AuthorityMetadataSource.CACHE&&(e.expiresAt=generateAuthorityMetadataExpiresAt(),e.canonical_authority=this.canonicalAuthority);const n=this.cacheManager.generateAuthorityMetadataCacheKey(e.preferred_cache);this.cacheManager.setAuthorityMetadata(n,e),this.metadata=e}async updateEndpointMetadata(e){var t,r,n;null==(t=this.performanceClient)||t.addQueueMeasurement(PerformanceEvents.AuthorityUpdateEndpointMetadata,this.correlationId);const i=this.updateEndpointMetadataFromLocalSources(e);if(i)return i.source===AuthorityMetadataSource.HARDCODED_VALUES&&(null==(r=this.authorityOptions.azureRegionConfiguration)?void 0:r.azureRegion)&&i.metadata&&(updateAuthorityEndpointMetadata(e,await invokeAsync(this.updateMetadataWithRegionalInformation.bind(this),PerformanceEvents.AuthorityUpdateMetadataWithRegionalInformation,this.logger,this.performanceClient,this.correlationId)(i.metadata),!1),e.canonical_authority=this.canonicalAuthority),i.source;let o=await invokeAsync(this.getEndpointMetadataFromNetwork.bind(this),PerformanceEvents.AuthorityGetEndpointMetadataFromNetwork,this.logger,this.performanceClient,this.correlationId)();if(o)return(null==(n=this.authorityOptions.azureRegionConfiguration)?void 0:n.azureRegion)&&(o=await invokeAsync(this.updateMetadataWithRegionalInformation.bind(this),PerformanceEvents.AuthorityUpdateMetadataWithRegionalInformation,this.logger,this.performanceClient,this.correlationId)(o)),updateAuthorityEndpointMetadata(e,o,!0),AuthorityMetadataSource.NETWORK;throw createClientAuthError(openIdConfigError,this.defaultOpenIdConfigurationEndpoint)}updateEndpointMetadataFromLocalSources(e){this.logger.verbose(\"Attempting to get endpoint metadata from authority configuration\");const t=this.getEndpointMetadataFromConfig();if(t)return this.logger.verbose(\"Found endpoint metadata in authority configuration\"),updateAuthorityEndpointMetadata(e,t,!1),{source:AuthorityMetadataSource.CONFIG};if(this.logger.verbose(\"Did not find endpoint metadata in the config... Attempting to get endpoint metadata from the hardcoded values.\"),this.authorityOptions.skipAuthorityMetadataCache)this.logger.verbose(\"Skipping hardcoded metadata cache since skipAuthorityMetadataCache is set to true. Attempting to get endpoint metadata from the network metadata cache.\");else{const t=this.getEndpointMetadataFromHardcodedValues();if(t)return updateAuthorityEndpointMetadata(e,t,!1),{source:AuthorityMetadataSource.HARDCODED_VALUES,metadata:t};this.logger.verbose(\"Did not find endpoint metadata in hardcoded values... Attempting to get endpoint metadata from the network metadata cache.\")}const r=isAuthorityMetadataExpired(e);return this.isAuthoritySameType(e)&&e.endpointsFromNetwork&&!r?(this.logger.verbose(\"Found endpoint metadata in the cache.\"),{source:AuthorityMetadataSource.CACHE}):(r&&this.logger.verbose(\"The metadata entity is expired.\"),null)}isAuthoritySameType(e){return new UrlString(e.canonical_authority).getUrlComponents().PathSegments.length===this.canonicalAuthorityUrlComponents.PathSegments.length}getEndpointMetadataFromConfig(){if(this.authorityOptions.authorityMetadata)try{return JSON.parse(this.authorityOptions.authorityMetadata)}catch(e){throw createClientConfigurationError(invalidAuthorityMetadata)}return null}async getEndpointMetadataFromNetwork(){var e;null==(e=this.performanceClient)||e.addQueueMeasurement(PerformanceEvents.AuthorityGetEndpointMetadataFromNetwork,this.correlationId);const t={},r=this.defaultOpenIdConfigurationEndpoint;this.logger.verbose(`Authority.getEndpointMetadataFromNetwork: attempting to retrieve OAuth endpoints from ${r}`);try{const e=await this.networkInterface.sendGetRequestAsync(r,t);return isOpenIdConfigResponse(e.body)?e.body:(this.logger.verbose(\"Authority.getEndpointMetadataFromNetwork: could not parse response as OpenID configuration\"),null)}catch(n){return this.logger.verbose(`Authority.getEndpointMetadataFromNetwork: ${n}`),null}}getEndpointMetadataFromHardcodedValues(){return this.hostnameAndPort in EndpointMetadata?EndpointMetadata[this.hostnameAndPort]:null}async updateMetadataWithRegionalInformation(t){var r,n,i;null==(r=this.performanceClient)||r.addQueueMeasurement(PerformanceEvents.AuthorityUpdateMetadataWithRegionalInformation,this.correlationId);const o=null==(n=this.authorityOptions.azureRegionConfiguration)?void 0:n.azureRegion;if(o){if(o!==Constants.AZURE_REGION_AUTO_DISCOVER_FLAG)return this.regionDiscoveryMetadata.region_outcome=RegionDiscoveryOutcomes.CONFIGURED_NO_AUTO_DETECTION,this.regionDiscoveryMetadata.region_used=o,e.replaceWithRegionalInformation(t,o);const r=await invokeAsync(this.regionDiscovery.detectRegion.bind(this.regionDiscovery),PerformanceEvents.RegionDiscoveryDetectRegion,this.logger,this.performanceClient,this.correlationId)(null==(i=this.authorityOptions.azureRegionConfiguration)?void 0:i.environmentRegion,this.regionDiscoveryMetadata);if(r)return this.regionDiscoveryMetadata.region_outcome=RegionDiscoveryOutcomes.AUTO_DETECTION_REQUESTED_SUCCESSFUL,this.regionDiscoveryMetadata.region_used=r,e.replaceWithRegionalInformation(t,r);this.regionDiscoveryMetadata.region_outcome=RegionDiscoveryOutcomes.AUTO_DETECTION_REQUESTED_FAILED}return t}async updateCloudDiscoveryMetadata(e){var t;null==(t=this.performanceClient)||t.addQueueMeasurement(PerformanceEvents.AuthorityUpdateCloudDiscoveryMetadata,this.correlationId);const r=this.updateCloudDiscoveryMetadataFromLocalSources(e);if(r)return r;const n=await invokeAsync(this.getCloudDiscoveryMetadataFromNetwork.bind(this),PerformanceEvents.AuthorityGetCloudDiscoveryMetadataFromNetwork,this.logger,this.performanceClient,this.correlationId)();if(n)return updateCloudDiscoveryMetadata(e,n,!0),AuthorityMetadataSource.NETWORK;throw createClientConfigurationError(untrustedAuthority)}updateCloudDiscoveryMetadataFromLocalSources(e){this.logger.verbose(\"Attempting to get cloud discovery metadata from authority configuration\"),this.logger.verbosePii(`Known Authorities: ${this.authorityOptions.knownAuthorities||Constants.NOT_APPLICABLE}`),this.logger.verbosePii(`Authority Metadata: ${this.authorityOptions.authorityMetadata||Constants.NOT_APPLICABLE}`),this.logger.verbosePii(`Canonical Authority: ${e.canonical_authority||Constants.NOT_APPLICABLE}`);const t=this.getCloudDiscoveryMetadataFromConfig();if(t)return this.logger.verbose(\"Found cloud discovery metadata in authority configuration\"),updateCloudDiscoveryMetadata(e,t,!1),AuthorityMetadataSource.CONFIG;if(this.logger.verbose(\"Did not find cloud discovery metadata in the config... Attempting to get cloud discovery metadata from the hardcoded values.\"),this.options.skipAuthorityMetadataCache)this.logger.verbose(\"Skipping hardcoded cloud discovery metadata cache since skipAuthorityMetadataCache is set to true. Attempting to get cloud discovery metadata from the network metadata cache.\");else{const t=getCloudDiscoveryMetadataFromHardcodedValues(this.hostnameAndPort);if(t)return this.logger.verbose(\"Found cloud discovery metadata from hardcoded values.\"),updateCloudDiscoveryMetadata(e,t,!1),AuthorityMetadataSource.HARDCODED_VALUES;this.logger.verbose(\"Did not find cloud discovery metadata in hardcoded values... Attempting to get cloud discovery metadata from the network metadata cache.\")}const r=isAuthorityMetadataExpired(e);return this.isAuthoritySameType(e)&&e.aliasesFromNetwork&&!r?(this.logger.verbose(\"Found cloud discovery metadata in the cache.\"),AuthorityMetadataSource.CACHE):(r&&this.logger.verbose(\"The metadata entity is expired.\"),null)}getCloudDiscoveryMetadataFromConfig(){if(this.authorityType===AuthorityType.Ciam)return this.logger.verbose(\"CIAM authorities do not support cloud discovery metadata, generate the aliases from authority host.\"),e.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort);if(this.authorityOptions.cloudDiscoveryMetadata){this.logger.verbose(\"The cloud discovery metadata has been provided as a network response, in the config.\");try{this.logger.verbose(\"Attempting to parse the cloud discovery metadata.\");const e=getCloudDiscoveryMetadataFromNetworkResponse(JSON.parse(this.authorityOptions.cloudDiscoveryMetadata).metadata,this.hostnameAndPort);if(this.logger.verbose(\"Parsed the cloud discovery metadata.\"),e)return this.logger.verbose(\"There is returnable metadata attached to the parsed cloud discovery metadata.\"),e;this.logger.verbose(\"There is no metadata attached to the parsed cloud discovery metadata.\")}catch(t){throw this.logger.verbose(\"Unable to parse the cloud discovery metadata. Throwing Invalid Cloud Discovery Metadata Error.\"),createClientConfigurationError(invalidCloudDiscoveryMetadata)}}return this.isInKnownAuthorities()?(this.logger.verbose(\"The host is included in knownAuthorities. Creating new cloud discovery metadata from the host.\"),e.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort)):null}async getCloudDiscoveryMetadataFromNetwork(){var t;null==(t=this.performanceClient)||t.addQueueMeasurement(PerformanceEvents.AuthorityGetCloudDiscoveryMetadataFromNetwork,this.correlationId);const r=`${Constants.AAD_INSTANCE_DISCOVERY_ENDPT}${this.canonicalAuthority}oauth2/v2.0/authorize`,n={};let i=null;try{const e=await this.networkInterface.sendGetRequestAsync(r,n);let t,o;if(isCloudInstanceDiscoveryResponse(e.body))t=e.body,o=t.metadata,this.logger.verbosePii(`tenant_discovery_endpoint is: ${t.tenant_discovery_endpoint}`);else{if(!isCloudInstanceDiscoveryErrorResponse(e.body))return this.logger.error(\"AAD did not return a CloudInstanceDiscoveryResponse or CloudInstanceDiscoveryErrorResponse\"),null;if(this.logger.warning(`A CloudInstanceDiscoveryErrorResponse was returned. The cloud instance discovery network request's status code is: ${e.status}`),t=e.body,t.error===Constants.INVALID_INSTANCE)return this.logger.error(\"The CloudInstanceDiscoveryErrorResponse error is invalid_instance.\"),null;this.logger.warning(`The CloudInstanceDiscoveryErrorResponse error is ${t.error}`),this.logger.warning(`The CloudInstanceDiscoveryErrorResponse error description is ${t.error_description}`),this.logger.warning(\"Setting the value of the CloudInstanceDiscoveryMetadata (returned from the network) to []\"),o=[]}this.logger.verbose(\"Attempting to find a match between the developer's authority and the CloudInstanceDiscoveryMetadata returned from the network request.\"),i=getCloudDiscoveryMetadataFromNetworkResponse(o,this.hostnameAndPort)}catch(o){if(o instanceof AuthError)this.logger.error(`There was a network error while attempting to get the cloud discovery instance metadata.\\nError: ${o.errorCode}\\nError Description: ${o.errorMessage}`);else{const e=o;this.logger.error(`A non-MSALJS error was thrown while attempting to get the cloud instance discovery metadata.\\nError: ${e.name}\\nError Description: ${e.message}`)}return null}return i||(this.logger.warning(\"The developer's authority was not found within the CloudInstanceDiscoveryMetadata returned from the network request.\"),this.logger.verbose(\"Creating custom Authority for custom domain scenario.\"),i=e.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort)),i}isInKnownAuthorities(){return this.authorityOptions.knownAuthorities.filter((e=>e&&UrlString.getDomainFromUrl(e).toLowerCase()===this.hostnameAndPort)).length>0}static generateAuthority(e,t){let r;if(t&&t.azureCloudInstance!==AzureCloudInstance.None){const e=t.tenant?t.tenant:Constants.DEFAULT_COMMON_TENANT;r=`${t.azureCloudInstance}/${e}/`}return r||e}static createCloudDiscoveryMetadataFromHost(e){return{preferred_network:e,preferred_cache:e,aliases:[e]}}getPreferredCache(){if(this.managedIdentity)return Constants.DEFAULT_AUTHORITY_HOST;if(this.discoveryComplete())return this.metadata.preferred_cache;throw createClientAuthError(endpointResolutionError)}isAlias(e){return this.metadata.aliases.indexOf(e)>-1}isAliasOfKnownMicrosoftAuthority(e){return InstanceDiscoveryMetadataAliases.has(e)}static isPublicCloudAuthority(e){return Constants.KNOWN_PUBLIC_CLOUDS.indexOf(e)>=0}static buildRegionalAuthorityString(e,t,r){const n=new UrlString(e);n.validateAsUri();const i=n.getUrlComponents();let o=`${t}.${i.HostNameAndPort}`;this.isPublicCloudAuthority(i.HostNameAndPort)&&(o=`${t}.${Constants.REGIONAL_AUTH_PUBLIC_CLOUD_SUFFIX}`);const a=UrlString.constructAuthorityUriFromObject({...n.getUrlComponents(),HostNameAndPort:o}).urlString;return r?`${a}?${r}`:a}static replaceWithRegionalInformation(t,r){const n={...t};return n.authorization_endpoint=e.buildRegionalAuthorityString(n.authorization_endpoint,r),n.token_endpoint=e.buildRegionalAuthorityString(n.token_endpoint,r),n.end_session_endpoint&&(n.end_session_endpoint=e.buildRegionalAuthorityString(n.end_session_endpoint,r)),n}static transformCIAMAuthority(e){let t=e;const r=new UrlString(e).getUrlComponents();return 0===r.PathSegments.length&&r.HostNameAndPort.endsWith(Constants.CIAM_AUTH_URL)&&(t=`${t}${r.HostNameAndPort.split(\".\")[0]}${Constants.AAD_TENANT_DOMAIN_SUFFIX}`),t}constructor(e,t,r,n,i,o,a,s){this.canonicalAuthority=e,this._canonicalAuthority.validateAsUri(),this.networkInterface=t,this.cacheManager=r,this.authorityOptions=n,this.regionDiscoveryMetadata={region_used:void 0,region_source:void 0,region_outcome:void 0},this.logger=i,this.performanceClient=a,this.correlationId=o,this.managedIdentity=s||!1,this.regionDiscovery=new RegionDiscovery(t,this.logger,this.performanceClient,this.correlationId)}}).reservedTenantDomains=new Set([\"{tenant}\",\"{tenantid}\",AADAuthorityConstants.COMMON,AADAuthorityConstants.CONSUMERS,AADAuthorityConstants.ORGANIZATIONS])}}),AuthorityFactory_exports={};async function createDiscoveredInstance(e,t,r,n,i,o,a){null==a||a.addQueueMeasurement(PerformanceEvents.AuthorityFactoryCreateDiscoveredInstance,o);const s=Authority.transformCIAMAuthority(formatAuthorityUri(e)),l=new Authority(s,t,r,n,i,o,a);try{return await invokeAsync(l.resolveEndpointsAsync.bind(l),PerformanceEvents.AuthorityResolveEndpointsAsync,i,a,o)(),l}catch(u){throw createClientAuthError(endpointResolutionError)}}__export(AuthorityFactory_exports,{createDiscoveredInstance:()=>createDiscoveredInstance});var init_AuthorityFactory=__esm({\"../../node_modules/.pnpm/@azure+msal-common@14.16.0/node_modules/@azure/msal-common/dist/authority/AuthorityFactory.mjs\"(){init_globals(),init_Authority(),init_ClientAuthError(),init_PerformanceEvent(),init_FunctionWrappers(),init_ClientAuthErrorCodes()}}),ServerError,init_ServerError=__esm({\"../../node_modules/.pnpm/@azure+msal-common@14.16.0/node_modules/@azure/msal-common/dist/error/ServerError.mjs\"(){init_globals(),init_AuthError(),ServerError=class e extends AuthError{constructor(t,r,n,i,o){super(t,r,n),this.name=\"ServerError\",this.errorNo=i,this.status=o,Object.setPrototypeOf(this,e.prototype)}}}}),ThrottlingUtils,init_ThrottlingUtils=__esm({\"../../node_modules/.pnpm/@azure+msal-common@14.16.0/node_modules/@azure/msal-common/dist/network/ThrottlingUtils.mjs\"(){init_globals(),init_Constants(),init_ServerError(),ThrottlingUtils=class e{static generateThrottlingStorageKey(e){return`${ThrottlingConstants.THROTTLING_PREFIX}.${JSON.stringify(e)}`}static preProcess(t,r){var n;const i=e.generateThrottlingStorageKey(r),o=t.getThrottlingCache(i);if(o){if(o.throttleTime__left_angle_mark_Date.now())return void t.removeItem(i);throw new ServerError((null==(n=o.errorCodes)?void 0:n.join(\" \"))||Constants.EMPTY_STRING,o.errorMessage,o.subError)}}static postProcess(t,r,n){if(e.checkResponseStatus(n)||e.checkResponseForRetryAfter(n)){const i={throttleTime:e.calculateThrottleTime(parseInt(n.headers[HeaderNames.RETRY_AFTER])),error:n.body.error,errorCodes:n.body.error_codes,errorMessage:n.body.error_description,subError:n.body.suberror};t.setThrottlingCache(e.generateThrottlingStorageKey(r),i)}}static checkResponseStatus(e){return 429===e.status||e.status>=500&&e.status__left_angle_mark_600}static checkResponseForRetryAfter(e){return!!e.headers&&e.headers.hasOwnProperty(HeaderNames.RETRY_AFTER)&&(e.status__left_angle_mark_200||e.status>=300)}static calculateThrottleTime(e){const t=e__left_angle_mark_=0?0:e,r=Date.now()/1e3;return Math.floor(1e3*Math.min(r+(t||ThrottlingConstants.DEFAULT_THROTTLE_TIME_SECONDS),r+ThrottlingConstants.DEFAULT_MAX_THROTTLE_TIME_SECONDS))}static removeThrottle(e,t,r,n){const i={clientId:t,authority:r.authority,scopes:r.scopes,homeAccountIdentifier:n,claims:r.claims,authenticationScheme:r.authenticationScheme,resourceRequestMethod:r.resourceRequestMethod,resourceRequestUri:r.resourceRequestUri,shrClaims:r.shrClaims,sshKid:r.sshKid},o=this.generateThrottlingStorageKey(i);e.removeItem(o)}}}}),NetworkError;function createNetworkError(e,t,r){return new NetworkError(e,t,r)}var init_NetworkError=__esm({\"../../node_modules/.pnpm/@azure+msal-common@14.16.0/node_modules/@azure/msal-common/dist/error/NetworkError.mjs\"(){init_globals(),init_AuthError(),NetworkError=class e extends AuthError{constructor(t,r,n){super(t.errorCode,t.errorMessage,t.subError),Object.setPrototypeOf(this,e.prototype),this.name=\"NetworkError\",this.error=t,this.httpStatus=r,this.responseHeaders=n}}}}),BaseClient,init_BaseClient=__esm({\"../../node_modules/.pnpm/@azure+msal-common@14.16.0/node_modules/@azure/msal-common/dist/client/BaseClient.mjs\"(){init_globals(),init_ClientConfiguration(),init_Logger(),init_Constants(),init_packageMetadata(),init_CcsCredential(),init_ClientInfo(),init_RequestParameterBuilder(),init_AuthorityFactory(),init_PerformanceEvent(),init_ThrottlingUtils(),init_AuthError(),init_ClientAuthError(),init_NetworkError(),init_FunctionWrappers(),init_ClientAuthErrorCodes(),BaseClient=class{createTokenRequestHeaders(e){const t={};if(t[HeaderNames.CONTENT_TYPE]=Constants.URL_FORM_CONTENT_TYPE,!this.config.systemOptions.preventCorsPreflight&&e)switch(e.type){case CcsCredentialType.HOME_ACCOUNT_ID:try{const r=buildClientInfoFromHomeAccountId(e.credential);t[HeaderNames.CCS_HEADER]=`Oid:${r.uid}@${r.utid}`}catch(r){this.logger.verbose(\"Could not parse home account ID for CCS Header: \"+r)}break;case CcsCredentialType.UPN:t[HeaderNames.CCS_HEADER]=`UPN: ${e.credential}`}return t}async executePostToTokenEndpoint(e,t,r,n,i,o){var a;o&&(null==(a=this.performanceClient)||a.addQueueMeasurement(o,i));const s=await this.sendPostRequest(n,e,{body:t,headers:r},i);return this.config.serverTelemetryManager&&s.status__left_angle_mark_500&&429!==s.status&&this.config.serverTelemetryManager.clearTelemetryCache(),s}async sendPostRequest(e,t,r,n){var i,o,a;let s;ThrottlingUtils.preProcess(this.cacheManager,e);try{s=await invokeAsync(this.networkClient.sendPostRequestAsync.bind(this.networkClient),PerformanceEvents.NetworkClientSendPostRequestAsync,this.logger,this.performanceClient,n)(t,r);const e=s.headers||{};null==(o=this.performanceClient)||o.addFields({refreshTokenSize:(null==(i=s.body.refresh_token)?void 0:i.length)||0,httpVerToken:e[HeaderNames.X_MS_HTTP_VERSION]||\"\",requestId:e[HeaderNames.X_MS_REQUEST_ID]||\"\"},n)}catch(l){if(l instanceof NetworkError){const e=l.responseHeaders;throw e&&(null==(a=this.performanceClient)||a.addFields({httpVerToken:e[HeaderNames.X_MS_HTTP_VERSION]||\"\",requestId:e[HeaderNames.X_MS_REQUEST_ID]||\"\",contentTypeHeader:e[HeaderNames.CONTENT_TYPE]||void 0,contentLengthHeader:e[HeaderNames.CONTENT_LENGTH]||void 0,httpStatus:l.httpStatus},n)),l.error}throw l instanceof AuthError?l:createClientAuthError(networkError)}return ThrottlingUtils.postProcess(this.cacheManager,e,s),s}async updateAuthority(e,t){var r;null==(r=this.performanceClient)||r.addQueueMeasurement(PerformanceEvents.UpdateTokenEndpointAuthority,t);const n=`https://${e}/${this.authority.tenant}/`,i=await createDiscoveredInstance(n,this.networkClient,this.cacheManager,this.authority.options,this.logger,t,this.performanceClient);this.authority=i}createTokenQueryParameters(e){const t=new RequestParameterBuilder(e.correlationId,this.performanceClient);return e.embeddedClientId&&t.addBrokerParameters({brokerClientId:this.config.authOptions.clientId,brokerRedirectUri:this.config.authOptions.redirectUri}),e.tokenQueryParameters&&t.addExtraQueryParameters(e.tokenQueryParameters),t.addCorrelationId(e.correlationId),t.createQueryString()}constructor(e,t){this.config=buildClientConfiguration(e),this.logger=new Logger(this.config.loggerOptions,name,version3),this.cryptoUtils=this.config.cryptoInterface,this.cacheManager=this.config.storageInterface,this.networkClient=this.config.networkInterface,this.serverTelemetryManager=this.config.serverTelemetryManager,this.authority=this.config.authOptions.authority,this.performanceClient=t}}}}),InteractionRequiredAuthErrorCodes_exports={},noTokensFound,nativeAccountUnavailable,refreshTokenExpired,interactionRequired,consentRequired,loginRequired,badToken;__export(InteractionRequiredAuthErrorCodes_exports,{badToken:()=>badToken,consentRequired:()=>consentRequired,interactionRequired:()=>interactionRequired,loginRequired:()=>loginRequired,nativeAccountUnavailable:()=>nativeAccountUnavailable,noTokensFound:()=>noTokensFound,refreshTokenExpired:()=>refreshTokenExpired});var init_InteractionRequiredAuthErrorCodes=__esm({\"../../node_modules/.pnpm/@azure+msal-common@14.16.0/node_modules/@azure/msal-common/dist/error/InteractionRequiredAuthErrorCodes.mjs\"(){init_globals(),noTokensFound=\"no_tokens_found\",nativeAccountUnavailable=\"native_account_unavailable\",refreshTokenExpired=\"refresh_token_expired\",interactionRequired=\"interaction_required\",consentRequired=\"consent_required\",loginRequired=\"login_required\",badToken=\"bad_token\"}}),InteractionRequiredServerErrorMessage,InteractionRequiredAuthSubErrorMessage,InteractionRequiredAuthErrorMessages,InteractionRequiredAuthErrorMessage,InteractionRequiredAuthError;function isInteractionRequiredError(e,t,r){const n=!!e&&InteractionRequiredServerErrorMessage.indexOf(e)>-1,i=!!r&&InteractionRequiredAuthSubErrorMessage.indexOf(r)>-1,o=!!t&&InteractionRequiredServerErrorMessage.some((e=>t.indexOf(e)>-1));return n||o||i}function createInteractionRequiredAuthError(e){return new InteractionRequiredAuthError(e,InteractionRequiredAuthErrorMessages[e])}var init_InteractionRequiredAuthError=__esm({\"../../node_modules/.pnpm/@azure+msal-common@14.16.0/node_modules/@azure/msal-common/dist/error/InteractionRequiredAuthError.mjs\"(){init_globals(),init_Constants(),init_AuthError(),init_InteractionRequiredAuthErrorCodes(),InteractionRequiredServerErrorMessage=[interactionRequired,consentRequired,loginRequired,badToken],InteractionRequiredAuthSubErrorMessage=[\"message_only\",\"additional_action\",\"basic_action\",\"user_password_expired\",\"consent_required\",\"bad_token\"],InteractionRequiredAuthErrorMessage={noTokensFoundError:{code:noTokensFound,desc:(InteractionRequiredAuthErrorMessages={[noTokensFound]:\"No refresh token found in the cache. Please sign-in.\",[nativeAccountUnavailable]:\"The requested account is not available in the native broker. It may have been deleted or logged out. Please sign-in again using an interactive API.\",[refreshTokenExpired]:\"Refresh token has expired.\",[badToken]:\"Identity provider returned bad_token due to an expired or invalid refresh token. Please invoke an interactive API to resolve.\"})[noTokensFound]},native_account_unavailable:{code:nativeAccountUnavailable,desc:InteractionRequiredAuthErrorMessages[nativeAccountUnavailable]},bad_token:{code:badToken,desc:InteractionRequiredAuthErrorMessages[badToken]}},InteractionRequiredAuthError=class e extends AuthError{constructor(t,r,n,i,o,a,s,l){super(t,r,n),Object.setPrototypeOf(this,e.prototype),this.timestamp=i||Constants.EMPTY_STRING,this.traceId=o||Constants.EMPTY_STRING,this.correlationId=a||Constants.EMPTY_STRING,this.claims=s||Constants.EMPTY_STRING,this.name=\"InteractionRequiredAuthError\",this.errorNo=l}}}}),ProtocolUtils,init_ProtocolUtils=__esm({\"../../node_modules/.pnpm/@azure+msal-common@14.16.0/node_modules/@azure/msal-common/dist/utils/ProtocolUtils.mjs\"(){init_globals(),init_Constants(),init_ClientAuthError(),init_ClientAuthErrorCodes(),ProtocolUtils=class e{static setRequestState(t,r,n){const i=e.generateLibraryState(t,n);return r?`${i}${Constants.RESOURCE_DELIM}${r}`:i}static generateLibraryState(e,t){if(!e)throw createClientAuthError(noCryptoObject);const r={id:e.createNewGuid()};t&&(r.meta=t);const n=JSON.stringify(r);return e.base64Encode(n)}static parseRequestState(e,t){if(!e)throw createClientAuthError(noCryptoObject);if(!t)throw createClientAuthError(invalidState);try{const r=t.split(Constants.RESOURCE_DELIM),n=r[0],i=r.length>1?r.slice(1).join(Constants.RESOURCE_DELIM):Constants.EMPTY_STRING,o=e.base64Decode(n),a=JSON.parse(o);return{userRequestState:i||Constants.EMPTY_STRING,libraryState:a}}catch(r){throw createClientAuthError(invalidState)}}}}}),KeyLocation,PopTokenGenerator,init_PopTokenGenerator=__esm({\"../../node_modules/.pnpm/@azure+msal-common@14.16.0/node_modules/@azure/msal-common/dist/crypto/PopTokenGenerator.mjs\"(){init_globals(),init_TimeUtils(),init_UrlString(),init_PerformanceEvent(),init_FunctionWrappers(),KeyLocation={SW:\"sw\",UHW:\"uhw\"},PopTokenGenerator=class{async generateCnf(e,t){var r;null==(r=this.performanceClient)||r.addQueueMeasurement(PerformanceEvents.PopTokenGenerateCnf,e.correlationId);const n=await invokeAsync(this.generateKid.bind(this),PerformanceEvents.PopTokenGenerateCnf,t,this.performanceClient,e.correlationId)(e),i=this.cryptoUtils.base64UrlEncode(JSON.stringify(n));return{kid:n.kid,reqCnfString:i}}async generateKid(e){var t;return null==(t=this.performanceClient)||t.addQueueMeasurement(PerformanceEvents.PopTokenGenerateKid,e.correlationId),{kid:await this.cryptoUtils.getPublicKeyThumbprint(e),xms_ksl:KeyLocation.SW}}async signPopToken(e,t,r){return this.signPayload(e,t,r)}async signPayload(e,t,r,n){const{resourceRequestMethod:i,resourceRequestUri:o,shrClaims:a,shrNonce:s,shrOptions:l}=r,u=o?new UrlString(o):void 0,c=null==u?void 0:u.getUrlComponents();return this.cryptoUtils.signJwt({at:e,ts:nowSeconds(),m:null==i?void 0:i.toUpperCase(),u:null==c?void 0:c.HostNameAndPort,nonce:s||this.cryptoUtils.createNewGuid(),p:null==c?void 0:c.AbsolutePath,q:(null==c?void 0:c.QueryString)?[[],c.QueryString]:void 0,client_claims:a||void 0,...n},t,l,r.correlationId)}constructor(e,t){this.cryptoUtils=e,this.performanceClient=t}}}}),TokenCacheContext,init_TokenCacheContext=__esm({\"../../node_modules/.pnpm/@azure+msal-common@14.16.0/node_modules/@azure/msal-common/dist/cache/persistence/TokenCacheContext.mjs\"(){init_globals(),TokenCacheContext=class{get cacheHasChanged(){return this.hasChanged}get tokenCache(){return this.cache}constructor(e,t){this.cache=e,this.hasChanged=t}}}}),ResponseHandler;function parseServerErrorNo(e){var t,r;const n=\"code=\",i=null==(t=e.error_uri)?void 0:t.lastIndexOf(n);return i&&i>=0?null==(r=e.error_uri)?void 0:r.substring(i+5):void 0}function buildAccountToCache(e,t,r,n,i,o,a,s,l,u,c){null==c||c.verbose(\"setCachedAccount called\");const d=e.getAccountKeys().find((e=>e.startsWith(r)));let h=null;d&&(h=e.getAccount(d,c));const f=h||AccountEntity.createAccount({homeAccountId:r,idTokenClaims:i,clientInfo:o,environment:a,cloudGraphHostName:null==l?void 0:l.cloud_graph_host_name,msGraphHost:null==l?void 0:l.msgraph_host,nativeAccountId:u},t,n),p=f.tenantProfiles||[],m=s||f.realm;if(m&&!p.find((e=>e.tenantId===m))){const e=buildTenantProfile(r,f.localAccountId,m,i);p.push(e)}return f.tenantProfiles=p,f}var init_ResponseHandler=__esm({\"../../node_modules/.pnpm/@azure+msal-common@14.16.0/node_modules/@azure/msal-common/dist/response/ResponseHandler.mjs\"(){init_globals(),init_ClientAuthError(),init_ServerError(),init_ScopeSet(),init_AccountEntity(),init_InteractionRequiredAuthError(),init_ProtocolUtils(),init_Constants(),init_PopTokenGenerator(),init_TokenCacheContext(),init_PerformanceEvent(),init_AuthToken(),init_TokenClaims(),init_AccountInfo(),init_CacheHelpers(),init_ClientAuthErrorCodes(),ResponseHandler=class e{validateServerAuthorizationCodeResponse(e,t){if(!e.state||!t)throw e.state?createClientAuthError(stateNotFound,\"Cached State\"):createClientAuthError(stateNotFound,\"Server State\");let r,n;try{r=decodeURIComponent(e.state)}catch(i){throw createClientAuthError(invalidState,e.state)}try{n=decodeURIComponent(t)}catch(i){throw createClientAuthError(invalidState,e.state)}if(r!==n)throw createClientAuthError(stateMismatch);if(e.error||e.error_description||e.suberror){const t=parseServerErrorNo(e);if(isInteractionRequiredError(e.error,e.error_description,e.suberror))throw new InteractionRequiredAuthError(e.error||\"\",e.error_description,e.suberror,e.timestamp||\"\",e.trace_id||\"\",e.correlation_id||\"\",e.claims||\"\",t);throw new ServerError(e.error||\"\",e.error_description,e.suberror,t)}}validateTokenResponse(e,t){var r;if(e.error||e.error_description||e.suberror){const n=`Error(s): ${e.error_codes||Constants.NOT_AVAILABLE} - Timestamp: ${e.timestamp||Constants.NOT_AVAILABLE} - Description: ${e.error_description||Constants.NOT_AVAILABLE} - Correlation ID: ${e.correlation_id||Constants.NOT_AVAILABLE} - Trace ID: ${e.trace_id||Constants.NOT_AVAILABLE}`,i=(null==(r=e.error_codes)?void 0:r.length)?e.error_codes[0]:void 0,o=new ServerError(e.error,n,e.suberror,i,e.status);if(t&&e.status&&e.status>=HttpStatus.SERVER_ERROR_RANGE_START&&e.status__left_angle_mark_=HttpStatus.SERVER_ERROR_RANGE_END)return void this.logger.warning(`executeTokenRequest:validateTokenResponse - AAD is currently unavailable and the access token is unable to be refreshed.\\n${o}`);if(t&&e.status&&e.status>=HttpStatus.CLIENT_ERROR_RANGE_START&&e.status__left_angle_mark_=HttpStatus.CLIENT_ERROR_RANGE_END)return void this.logger.warning(`executeTokenRequest:validateTokenResponse - AAD is currently available but is unable to refresh the access token.\\n${o}`);if(isInteractionRequiredError(e.error,e.error_description,e.suberror))throw new InteractionRequiredAuthError(e.error,e.error_description,e.suberror,e.timestamp||Constants.EMPTY_STRING,e.trace_id||Constants.EMPTY_STRING,e.correlation_id||Constants.EMPTY_STRING,e.claims||Constants.EMPTY_STRING,i);throw o}}async handleServerTokenResponse(t,r,n,i,o,a,s,l,u){var c;let d,h;if(null==(c=this.performanceClient)||c.addQueueMeasurement(PerformanceEvents.HandleServerTokenResponse,t.correlation_id),t.id_token){if(d=extractTokenClaims(t.id_token||Constants.EMPTY_STRING,this.cryptoObj.base64Decode),o&&o.nonce&&d.nonce!==o.nonce)throw createClientAuthError(nonceMismatch);if(i.maxAge||0===i.maxAge){const e=d.auth_time;if(!e)throw createClientAuthError(authTimeNotFound);checkMaxAge(e,i.maxAge)}}this.homeAccountIdentifier=AccountEntity.generateHomeAccountId(t.client_info||Constants.EMPTY_STRING,r.authorityType,this.logger,this.cryptoObj,d),o&&o.state&&(h=ProtocolUtils.parseRequestState(this.cryptoObj,o.state)),t.key_id=t.key_id||i.sshKid||void 0;const f=this.generateCacheRecord(t,r,n,i,d,a,o);let p;try{if(this.persistencePlugin&&this.serializableCache&&(this.logger.verbose(\"Persistence enabled, calling beforeCacheAccess\"),p=new TokenCacheContext(this.serializableCache,!0),await this.persistencePlugin.beforeCacheAccess(p)),s&&!l&&f.account){const t=f.account.generateAccountKey();if(!this.cacheStorage.getAccount(t,this.logger))return this.logger.warning(\"Account used to refresh tokens not in persistence, refreshed tokens will not be stored in the cache\"),await e.generateAuthenticationResult(this.cryptoObj,r,f,!1,i,d,h,void 0,u)}await this.cacheStorage.saveCacheRecord(f,i.storeInCache,i.correlationId)}finally{this.persistencePlugin&&this.serializableCache&&p&&(this.logger.verbose(\"Persistence enabled, calling afterCacheAccess\"),await this.persistencePlugin.afterCacheAccess(p))}return e.generateAuthenticationResult(this.cryptoObj,r,f,!1,i,d,h,t,u)}generateCacheRecord(e,t,r,n,i,o,a){const s=t.getPreferredCache();if(!s)throw createClientAuthError(invalidCacheEnvironment);const l=getTenantIdFromIdTokenClaims(i);let u,c;e.id_token&&i&&(u=createIdTokenEntity(this.homeAccountIdentifier,s,e.id_token,this.clientId,l||\"\"),c=buildAccountToCache(this.cacheStorage,t,this.homeAccountIdentifier,this.cryptoObj.base64Decode,i,e.client_info,s,l,a,void 0,this.logger));let d=null;if(e.access_token){const i=e.scope?ScopeSet.fromString(e.scope):new ScopeSet(n.scopes||[]),a=(\"string\"==typeof e.expires_in?parseInt(e.expires_in,10):e.expires_in)||0,u=(\"string\"==typeof e.ext_expires_in?parseInt(e.ext_expires_in,10):e.ext_expires_in)||0,c=(\"string\"==typeof e.refresh_in?parseInt(e.refresh_in,10):e.refresh_in)||void 0,h=r+a,f=h+u,p=c&&c>0?r+c:void 0;d=createAccessTokenEntity(this.homeAccountIdentifier,s,e.access_token,this.clientId,l||t.tenant||\"\",i.printScopes(),h,f,this.cryptoObj.base64Decode,p,e.token_type,o,e.key_id,n.claims,n.requestedClaimsHash)}let h=null;if(e.refresh_token){let t;e.refresh_token_expires_in&&(t=r+(\"string\"==typeof e.refresh_token_expires_in?parseInt(e.refresh_token_expires_in,10):e.refresh_token_expires_in)),h=createRefreshTokenEntity(this.homeAccountIdentifier,s,e.refresh_token,this.clientId,e.foci,o,t)}let f=null;return e.foci&&(f={clientId:this.clientId,environment:s,familyId:e.foci}),{account:c,idToken:u,accessToken:d,refreshToken:h,appMetadata:f}}static async generateAuthenticationResult(e,t,r,n,i,o,a,s,l){var u,c,d,h,f;let p,m,g=Constants.EMPTY_STRING,_=[],b=null,y=Constants.EMPTY_STRING;if(r.accessToken){if(r.accessToken.tokenType!==AuthenticationScheme.POP||i.popKid)g=r.accessToken.secret;else{const t=new PopTokenGenerator(e),{secret:n,keyId:o}=r.accessToken;if(!o)throw createClientAuthError(keyIdMissing);g=await t.signPopToken(n,o,i)}_=ScopeSet.fromString(r.accessToken.target).asArray(),b=new Date(1e3*Number(r.accessToken.expiresOn)),p=new Date(1e3*Number(r.accessToken.extendedExpiresOn)),r.accessToken.refreshOn&&(m=new Date(1e3*Number(r.accessToken.refreshOn)))}r.appMetadata&&(y=r.appMetadata.familyId===THE_FAMILY_ID?THE_FAMILY_ID:\"\");const v=(null==o?void 0:o.oid)||(null==o?void 0:o.sub)||\"\",A=(null==o?void 0:o.tid)||\"\";(null==s?void 0:s.spa_accountid)&&r.account&&(r.account.nativeAccountId=null==s?void 0:s.spa_accountid);const w=r.account?updateAccountTenantProfileData(r.account.getAccountInfo(),void 0,o,null==(u=r.idToken)?void 0:u.secret):null;return{authority:t.canonicalAuthority,uniqueId:v,tenantId:A,scopes:_,account:w,idToken:(null==(c=null==r?void 0:r.idToken)?void 0:c.secret)||\"\",idTokenClaims:o||{},accessToken:g,fromCache:n,expiresOn:b,extExpiresOn:p,refreshOn:m,correlationId:i.correlationId,requestId:l||Constants.EMPTY_STRING,familyId:y,tokenType:(null==(d=r.accessToken)?void 0:d.tokenType)||Constants.EMPTY_STRING,state:a?a.userRequestState:Constants.EMPTY_STRING,cloudGraphHostName:(null==(h=r.account)?void 0:h.cloudGraphHostName)||Constants.EMPTY_STRING,msGraphHost:(null==(f=r.account)?void 0:f.msGraphHost)||Constants.EMPTY_STRING,code:null==s?void 0:s.spa_code,fromNativeBroker:!1}}constructor(e,t,r,n,i,o,a){this.clientId=e,this.cacheStorage=t,this.cryptoObj=r,this.logger=n,this.serializableCache=i,this.persistencePlugin=o,this.performanceClient=a}}}});async function getClientAssertion(e,t,r){return\"string\"==typeof e?e:e({clientId:t,tokenEndpoint:r})}var init_ClientAssertionUtils=__esm({\"../../node_modules/.pnpm/@azure+msal-common@14.16.0/node_modules/@azure/msal-common/dist/utils/ClientAssertionUtils.mjs\"(){init_globals()}}),AuthorizationCodeClient,init_AuthorizationCodeClient=__esm({\"../../node_modules/.pnpm/@azure+msal-common@14.16.0/node_modules/@azure/msal-common/dist/client/AuthorizationCodeClient.mjs\"(){init_globals(),init_BaseClient(),init_RequestParameterBuilder(),init_Constants(),init_AADServerParamKeys(),init_ClientConfiguration(),init_ResponseHandler(),init_StringUtils(),init_ClientAuthError(),init_UrlString(),init_PopTokenGenerator(),init_TimeUtils(),init_ClientInfo(),init_CcsCredential(),init_ClientConfigurationError(),init_RequestValidator(),init_PerformanceEvent(),init_FunctionWrappers(),init_ClientAssertionUtils(),init_ClientAuthErrorCodes(),init_ClientConfigurationErrorCodes(),AuthorizationCodeClient=class extends BaseClient{async getAuthCodeUrl(e){var t;null==(t=this.performanceClient)||t.addQueueMeasurement(PerformanceEvents.GetAuthCodeUrl,e.correlationId);const r=await invokeAsync(this.createAuthCodeUrlQueryString.bind(this),PerformanceEvents.AuthClientCreateQueryString,this.logger,this.performanceClient,e.correlationId)(e);return UrlString.appendQueryString(this.authority.authorizationEndpoint,r)}async acquireToken(e,t){var r,n;if(null==(r=this.performanceClient)||r.addQueueMeasurement(PerformanceEvents.AuthClientAcquireToken,e.correlationId),!e.code)throw createClientAuthError(requestCannotBeMade);const i=nowSeconds(),o=await invokeAsync(this.executeTokenRequest.bind(this),PerformanceEvents.AuthClientExecuteTokenRequest,this.logger,this.performanceClient,e.correlationId)(this.authority,e),a=null==(n=o.headers)?void 0:n[HeaderNames.X_MS_REQUEST_ID],s=new ResponseHandler(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,this.config.serializableCache,this.config.persistencePlugin,this.performanceClient);return s.validateTokenResponse(o.body),invokeAsync(s.handleServerTokenResponse.bind(s),PerformanceEvents.HandleServerTokenResponse,this.logger,this.performanceClient,e.correlationId)(o.body,this.authority,i,e,t,void 0,void 0,void 0,a)}handleFragmentResponse(e,t){if(new ResponseHandler(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,null,null).validateServerAuthorizationCodeResponse(e,t),!e.code)throw createClientAuthError(authorizationCodeMissingFromServerResponse);return e}getLogoutUri(e){if(!e)throw createClientConfigurationError(logoutRequestEmpty);const t=this.createLogoutUrlQueryString(e);return UrlString.appendQueryString(this.authority.endSessionEndpoint,t)}async executeTokenRequest(e,t){var r,n;null==(r=this.performanceClient)||r.addQueueMeasurement(PerformanceEvents.AuthClientExecuteTokenRequest,t.correlationId);const i=this.createTokenQueryParameters(t),o=UrlString.appendQueryString(e.tokenEndpoint,i),a=await invokeAsync(this.createTokenRequestBody.bind(this),PerformanceEvents.AuthClientCreateTokenRequestBody,this.logger,this.performanceClient,t.correlationId)(t);let s;if(t.clientInfo)try{const e=buildClientInfo(t.clientInfo,this.cryptoUtils.base64Decode);s={credential:`${e.uid}${Separators.CLIENT_INFO_SEPARATOR}${e.utid}`,type:CcsCredentialType.HOME_ACCOUNT_ID}}catch(c){this.logger.verbose(\"Could not parse client info for CCS Header: \"+c)}const l=this.createTokenRequestHeaders(s||t.ccsCredential),u={clientId:(null==(n=t.tokenBodyParameters)?void 0:n.clientId)||this.config.authOptions.clientId,authority:e.canonicalAuthority,scopes:t.scopes,claims:t.claims,authenticationScheme:t.authenticationScheme,resourceRequestMethod:t.resourceRequestMethod,resourceRequestUri:t.resourceRequestUri,shrClaims:t.shrClaims,sshKid:t.sshKid};return invokeAsync(this.executePostToTokenEndpoint.bind(this),PerformanceEvents.AuthorizationCodeClientExecutePostToTokenEndpoint,this.logger,this.performanceClient,t.correlationId)(o,a,l,u,t.correlationId,PerformanceEvents.AuthorizationCodeClientExecutePostToTokenEndpoint)}async createTokenRequestBody(e){var t,r;null==(t=this.performanceClient)||t.addQueueMeasurement(PerformanceEvents.AuthClientCreateTokenRequestBody,e.correlationId);const n=new RequestParameterBuilder(e.correlationId,this.performanceClient);if(n.addClientId(e.embeddedClientId||(null==(r=e.tokenBodyParameters)?void 0:r[CLIENT_ID])||this.config.authOptions.clientId),this.includeRedirectUri?n.addRedirectUri(e.redirectUri):RequestValidator.validateRedirectUri(e.redirectUri),n.addScopes(e.scopes,!0,this.oidcDefaultScopes),n.addAuthorizationCode(e.code),n.addLibraryInfo(this.config.libraryInfo),n.addApplicationTelemetry(this.config.telemetry.application),n.addThrottling(),this.serverTelemetryManager&&!isOidcProtocolMode(this.config)&&n.addServerTelemetry(this.serverTelemetryManager),e.codeVerifier&&n.addCodeVerifier(e.codeVerifier),this.config.clientCredentials.clientSecret&&n.addClientSecret(this.config.clientCredentials.clientSecret),this.config.clientCredentials.clientAssertion){const t=this.config.clientCredentials.clientAssertion;n.addClientAssertion(await getClientAssertion(t.assertion,this.config.authOptions.clientId,e.resourceRequestUri)),n.addClientAssertionType(t.assertionType)}if(n.addGrantType(GrantType.AUTHORIZATION_CODE_GRANT),n.addClientInfo(),e.authenticationScheme===AuthenticationScheme.POP){const t=new PopTokenGenerator(this.cryptoUtils,this.performanceClient);let r;r=e.popKid?this.cryptoUtils.encodeKid(e.popKid):(await invokeAsync(t.generateCnf.bind(t),PerformanceEvents.PopTokenGenerateCnf,this.logger,this.performanceClient,e.correlationId)(e,this.logger)).reqCnfString,n.addPopToken(r)}else if(e.authenticationScheme===AuthenticationScheme.SSH){if(!e.sshJwk)throw createClientConfigurationError(missingSshJwk);n.addSshJwk(e.sshJwk)}let i;if((!StringUtils.isEmptyObj(e.claims)||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)&&n.addClaims(e.claims,this.config.authOptions.clientCapabilities),e.clientInfo)try{const t=buildClientInfo(e.clientInfo,this.cryptoUtils.base64Decode);i={credential:`${t.uid}${Separators.CLIENT_INFO_SEPARATOR}${t.utid}`,type:CcsCredentialType.HOME_ACCOUNT_ID}}catch(o){this.logger.verbose(\"Could not parse client info for CCS Header: \"+o)}else i=e.ccsCredential;if(this.config.systemOptions.preventCorsPreflight&&i)switch(i.type){case CcsCredentialType.HOME_ACCOUNT_ID:try{const e=buildClientInfoFromHomeAccountId(i.credential);n.addCcsOid(e)}catch(o){this.logger.verbose(\"Could not parse home account ID for CCS Header: \"+o)}break;case CcsCredentialType.UPN:n.addCcsUpn(i.credential)}return e.embeddedClientId&&n.addBrokerParameters({brokerClientId:this.config.authOptions.clientId,brokerRedirectUri:this.config.authOptions.redirectUri}),e.tokenBodyParameters&&n.addExtraQueryParameters(e.tokenBodyParameters),!e.enableSpaAuthorizationCode||e.tokenBodyParameters&&e.tokenBodyParameters[RETURN_SPA_CODE]||n.addExtraQueryParameters({[RETURN_SPA_CODE]:\"1\"}),n.createQueryString()}async createAuthCodeUrlQueryString(e){var t,r;const n=e.correlationId||this.config.cryptoInterface.createNewGuid();null==(t=this.performanceClient)||t.addQueueMeasurement(PerformanceEvents.AuthClientCreateQueryString,n);const i=new RequestParameterBuilder(n,this.performanceClient);i.addClientId(e.embeddedClientId||(null==(r=e.extraQueryParameters)?void 0:r[CLIENT_ID])||this.config.authOptions.clientId);const o=[...e.scopes||[],...e.extraScopesToConsent||[]];if(i.addScopes(o,!0,this.oidcDefaultScopes),i.addRedirectUri(e.redirectUri),i.addCorrelationId(n),i.addResponseMode(e.responseMode),i.addResponseTypeCode(),i.addLibraryInfo(this.config.libraryInfo),isOidcProtocolMode(this.config)||i.addApplicationTelemetry(this.config.telemetry.application),i.addClientInfo(),e.codeChallenge&&e.codeChallengeMethod&&i.addCodeChallengeParams(e.codeChallenge,e.codeChallengeMethod),e.prompt&&i.addPrompt(e.prompt),e.domainHint&&i.addDomainHint(e.domainHint),e.prompt!==PromptValue.SELECT_ACCOUNT)if(e.sid&&e.prompt===PromptValue.NONE)this.logger.verbose(\"createAuthCodeUrlQueryString: Prompt is none, adding sid from request\"),i.addSid(e.sid);else if(e.account){const t=this.extractAccountSid(e.account);let r=this.extractLoginHint(e.account);if(r&&e.domainHint&&(this.logger.warning('AuthorizationCodeClient.createAuthCodeUrlQueryString: \"domainHint\" param is set, skipping opaque \"login_hint\" claim. Please consider not passing domainHint'),r=null),r){this.logger.verbose(\"createAuthCodeUrlQueryString: login_hint claim present on account\"),i.addLoginHint(r);try{const t=buildClientInfoFromHomeAccountId(e.account.homeAccountId);i.addCcsOid(t)}catch(a){this.logger.verbose(\"createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header\")}}else if(t&&e.prompt===PromptValue.NONE){this.logger.verbose(\"createAuthCodeUrlQueryString: Prompt is none, adding sid from account\"),i.addSid(t);try{const t=buildClientInfoFromHomeAccountId(e.account.homeAccountId);i.addCcsOid(t)}catch(a){this.logger.verbose(\"createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header\")}}else if(e.loginHint)this.logger.verbose(\"createAuthCodeUrlQueryString: Adding login_hint from request\"),i.addLoginHint(e.loginHint),i.addCcsUpn(e.loginHint);else if(e.account.username){this.logger.verbose(\"createAuthCodeUrlQueryString: Adding login_hint from account\"),i.addLoginHint(e.account.username);try{const t=buildClientInfoFromHomeAccountId(e.account.homeAccountId);i.addCcsOid(t)}catch(a){this.logger.verbose(\"createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header\")}}}else e.loginHint&&(this.logger.verbose(\"createAuthCodeUrlQueryString: No account, adding login_hint from request\"),i.addLoginHint(e.loginHint),i.addCcsUpn(e.loginHint));else this.logger.verbose(\"createAuthCodeUrlQueryString: Prompt is select_account, ignoring account hints\");if(e.nonce&&i.addNonce(e.nonce),e.state&&i.addState(e.state),(e.claims||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)&&i.addClaims(e.claims,this.config.authOptions.clientCapabilities),e.embeddedClientId&&i.addBrokerParameters({brokerClientId:this.config.authOptions.clientId,brokerRedirectUri:this.config.authOptions.redirectUri}),this.addExtraQueryParams(e,i),e.nativeBroker&&(i.addNativeBroker(),e.authenticationScheme===AuthenticationScheme.POP)){const t=new PopTokenGenerator(this.cryptoUtils);let r;r=e.popKid?this.cryptoUtils.encodeKid(e.popKid):(await invokeAsync(t.generateCnf.bind(t),PerformanceEvents.PopTokenGenerateCnf,this.logger,this.performanceClient,e.correlationId)(e,this.logger)).reqCnfString,i.addPopToken(r)}return i.createQueryString()}createLogoutUrlQueryString(e){const t=new RequestParameterBuilder(e.correlationId,this.performanceClient);return e.postLogoutRedirectUri&&t.addPostLogoutRedirectUri(e.postLogoutRedirectUri),e.correlationId&&t.addCorrelationId(e.correlationId),e.idTokenHint&&t.addIdTokenHint(e.idTokenHint),e.state&&t.addState(e.state),e.logoutHint&&t.addLogoutHint(e.logoutHint),this.addExtraQueryParams(e,t),t.createQueryString()}addExtraQueryParams(e,t){!(e.extraQueryParameters&&e.extraQueryParameters.hasOwnProperty(\"instance_aware\"))&&this.config.authOptions.instanceAware&&(e.extraQueryParameters=e.extraQueryParameters||{},e.extraQueryParameters.instance_aware=\"true\"),e.extraQueryParameters&&t.addExtraQueryParameters(e.extraQueryParameters)}extractAccountSid(e){var t;return(null==(t=e.idTokenClaims)?void 0:t.sid)||null}extractLoginHint(e){var t;return(null==(t=e.idTokenClaims)?void 0:t.login_hint)||null}constructor(e,t){var r;super(e,t),this.includeRedirectUri=!0,this.oidcDefaultScopes=null==(r=this.config.authOptions.authority.options.OIDCOptions)?void 0:r.defaultScopes}}}}),DEFAULT_REFRESH_TOKEN_EXPIRATION_OFFSET_SECONDS,RefreshTokenClient,init_RefreshTokenClient=__esm({\"../../node_modules/.pnpm/@azure+msal-common@14.16.0/node_modules/@azure/msal-common/dist/client/RefreshTokenClient.mjs\"(){init_globals(),init_ClientConfiguration(),init_BaseClient(),init_RequestParameterBuilder(),init_Constants(),init_AADServerParamKeys(),init_ResponseHandler(),init_PopTokenGenerator(),init_StringUtils(),init_ClientConfigurationError(),init_ClientAuthError(),init_ServerError(),init_TimeUtils(),init_UrlString(),init_CcsCredential(),init_ClientInfo(),init_InteractionRequiredAuthError(),init_PerformanceEvent(),init_FunctionWrappers(),init_CacheHelpers(),init_ClientAssertionUtils(),init_ClientConfigurationErrorCodes(),init_ClientAuthErrorCodes(),init_InteractionRequiredAuthErrorCodes(),DEFAULT_REFRESH_TOKEN_EXPIRATION_OFFSET_SECONDS=300,RefreshTokenClient=class extends BaseClient{async acquireToken(e){var t,r;null==(t=this.performanceClient)||t.addQueueMeasurement(PerformanceEvents.RefreshTokenClientAcquireToken,e.correlationId);const n=nowSeconds(),i=await invokeAsync(this.executeTokenRequest.bind(this),PerformanceEvents.RefreshTokenClientExecuteTokenRequest,this.logger,this.performanceClient,e.correlationId)(e,this.authority),o=null==(r=i.headers)?void 0:r[HeaderNames.X_MS_REQUEST_ID],a=new ResponseHandler(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,this.config.serializableCache,this.config.persistencePlugin);return a.validateTokenResponse(i.body),invokeAsync(a.handleServerTokenResponse.bind(a),PerformanceEvents.HandleServerTokenResponse,this.logger,this.performanceClient,e.correlationId)(i.body,this.authority,n,e,void 0,void 0,!0,e.forceCache,o)}async acquireTokenByRefreshToken(e){var t;if(!e)throw createClientConfigurationError(tokenRequestEmpty);if(null==(t=this.performanceClient)||t.addQueueMeasurement(PerformanceEvents.RefreshTokenClientAcquireTokenByRefreshToken,e.correlationId),!e.account)throw createClientAuthError(noAccountInSilentRequest);if(this.cacheManager.isAppMetadataFOCI(e.account.environment))try{return await invokeAsync(this.acquireTokenWithCachedRefreshToken.bind(this),PerformanceEvents.RefreshTokenClientAcquireTokenWithCachedRefreshToken,this.logger,this.performanceClient,e.correlationId)(e,!0)}catch(r){const t=r instanceof InteractionRequiredAuthError&&r.errorCode===noTokensFound,n=r instanceof ServerError&&r.errorCode===Errors.INVALID_GRANT_ERROR&&r.subError===Errors.CLIENT_MISMATCH_ERROR;if(t||n)return invokeAsync(this.acquireTokenWithCachedRefreshToken.bind(this),PerformanceEvents.RefreshTokenClientAcquireTokenWithCachedRefreshToken,this.logger,this.performanceClient,e.correlationId)(e,!1);throw r}return invokeAsync(this.acquireTokenWithCachedRefreshToken.bind(this),PerformanceEvents.RefreshTokenClientAcquireTokenWithCachedRefreshToken,this.logger,this.performanceClient,e.correlationId)(e,!1)}async acquireTokenWithCachedRefreshToken(e,t){var r;null==(r=this.performanceClient)||r.addQueueMeasurement(PerformanceEvents.RefreshTokenClientAcquireTokenWithCachedRefreshToken,e.correlationId);const n=invoke(this.cacheManager.getRefreshToken.bind(this.cacheManager),PerformanceEvents.CacheManagerGetRefreshToken,this.logger,this.performanceClient,e.correlationId)(e.account,t,void 0,this.performanceClient,e.correlationId);if(!n)throw createInteractionRequiredAuthError(noTokensFound);if(n.expiresOn&&isTokenExpired(n.expiresOn,e.refreshTokenExpirationOffsetSeconds||DEFAULT_REFRESH_TOKEN_EXPIRATION_OFFSET_SECONDS))throw createInteractionRequiredAuthError(refreshTokenExpired);const i={...e,refreshToken:n.secret,authenticationScheme:e.authenticationScheme||AuthenticationScheme.BEARER,ccsCredential:{credential:e.account.homeAccountId,type:CcsCredentialType.HOME_ACCOUNT_ID}};try{return await invokeAsync(this.acquireToken.bind(this),PerformanceEvents.RefreshTokenClientAcquireToken,this.logger,this.performanceClient,e.correlationId)(i)}catch(o){if(o instanceof InteractionRequiredAuthError&&o.subError===badToken){this.logger.verbose(\"acquireTokenWithRefreshToken: bad refresh token, removing from cache\");const e=generateCredentialKey(n);this.cacheManager.removeRefreshToken(e)}throw o}}async executeTokenRequest(e,t){var r,n;null==(r=this.performanceClient)||r.addQueueMeasurement(PerformanceEvents.RefreshTokenClientExecuteTokenRequest,e.correlationId);const i=this.createTokenQueryParameters(e),o=UrlString.appendQueryString(t.tokenEndpoint,i),a=await invokeAsync(this.createTokenRequestBody.bind(this),PerformanceEvents.RefreshTokenClientCreateTokenRequestBody,this.logger,this.performanceClient,e.correlationId)(e),s=this.createTokenRequestHeaders(e.ccsCredential),l={clientId:(null==(n=e.tokenBodyParameters)?void 0:n.clientId)||this.config.authOptions.clientId,authority:t.canonicalAuthority,scopes:e.scopes,claims:e.claims,authenticationScheme:e.authenticationScheme,resourceRequestMethod:e.resourceRequestMethod,resourceRequestUri:e.resourceRequestUri,shrClaims:e.shrClaims,sshKid:e.sshKid};return invokeAsync(this.executePostToTokenEndpoint.bind(this),PerformanceEvents.RefreshTokenClientExecutePostToTokenEndpoint,this.logger,this.performanceClient,e.correlationId)(o,a,s,l,e.correlationId,PerformanceEvents.RefreshTokenClientExecutePostToTokenEndpoint)}async createTokenRequestBody(e){var t,r,n;null==(t=this.performanceClient)||t.addQueueMeasurement(PerformanceEvents.RefreshTokenClientCreateTokenRequestBody,e.correlationId);const i=e.correlationId,o=new RequestParameterBuilder(i,this.performanceClient);if(o.addClientId(e.embeddedClientId||(null==(r=e.tokenBodyParameters)?void 0:r[CLIENT_ID])||this.config.authOptions.clientId),e.redirectUri&&o.addRedirectUri(e.redirectUri),o.addScopes(e.scopes,!0,null==(n=this.config.authOptions.authority.options.OIDCOptions)?void 0:n.defaultScopes),o.addGrantType(GrantType.REFRESH_TOKEN_GRANT),o.addClientInfo(),o.addLibraryInfo(this.config.libraryInfo),o.addApplicationTelemetry(this.config.telemetry.application),o.addThrottling(),this.serverTelemetryManager&&!isOidcProtocolMode(this.config)&&o.addServerTelemetry(this.serverTelemetryManager),o.addRefreshToken(e.refreshToken),this.config.clientCredentials.clientSecret&&o.addClientSecret(this.config.clientCredentials.clientSecret),this.config.clientCredentials.clientAssertion){const t=this.config.clientCredentials.clientAssertion;o.addClientAssertion(await getClientAssertion(t.assertion,this.config.authOptions.clientId,e.resourceRequestUri)),o.addClientAssertionType(t.assertionType)}if(e.authenticationScheme===AuthenticationScheme.POP){const t=new PopTokenGenerator(this.cryptoUtils,this.performanceClient);let r;r=e.popKid?this.cryptoUtils.encodeKid(e.popKid):(await invokeAsync(t.generateCnf.bind(t),PerformanceEvents.PopTokenGenerateCnf,this.logger,this.performanceClient,e.correlationId)(e,this.logger)).reqCnfString,o.addPopToken(r)}else if(e.authenticationScheme===AuthenticationScheme.SSH){if(!e.sshJwk)throw createClientConfigurationError(missingSshJwk);o.addSshJwk(e.sshJwk)}if((!StringUtils.isEmptyObj(e.claims)||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)&&o.addClaims(e.claims,this.config.authOptions.clientCapabilities),this.config.systemOptions.preventCorsPreflight&&e.ccsCredential)switch(e.ccsCredential.type){case CcsCredentialType.HOME_ACCOUNT_ID:try{const t=buildClientInfoFromHomeAccountId(e.ccsCredential.credential);o.addCcsOid(t)}catch(a){this.logger.verbose(\"Could not parse home account ID for CCS Header: \"+a)}break;case CcsCredentialType.UPN:o.addCcsUpn(e.ccsCredential.credential)}return e.embeddedClientId&&o.addBrokerParameters({brokerClientId:this.config.authOptions.clientId,brokerRedirectUri:this.config.authOptions.redirectUri}),e.tokenBodyParameters&&o.addExtraQueryParameters(e.tokenBodyParameters),o.createQueryString()}constructor(e,t){super(e,t)}}}}),SilentFlowClient,init_SilentFlowClient=__esm({\"../../node_modules/.pnpm/@azure+msal-common@14.16.0/node_modules/@azure/msal-common/dist/client/SilentFlowClient.mjs\"(){init_globals(),init_BaseClient(),init_TimeUtils(),init_RefreshTokenClient(),init_ClientAuthError(),init_ResponseHandler(),init_Constants(),init_StringUtils(),init_AuthToken(),init_PerformanceEvent(),init_FunctionWrappers(),init_Authority(),init_ClientAuthErrorCodes(),SilentFlowClient=class extends BaseClient{async acquireToken(e){var t;try{const[r,n]=await this.acquireCachedToken({...e,scopes:(null==(t=e.scopes)?void 0:t.length)?e.scopes:[...OIDC_DEFAULT_SCOPES]});return n===CacheOutcome.PROACTIVELY_REFRESHED&&(this.logger.info(\"SilentFlowClient:acquireCachedToken - Cached access token's refreshOn property has been exceeded'. It's not expired, but must be refreshed.\"),new RefreshTokenClient(this.config,this.performanceClient).acquireTokenByRefreshToken(e).catch((()=>{}))),r}catch(r){if(r instanceof ClientAuthError&&r.errorCode===tokenRefreshRequired)return new RefreshTokenClient(this.config,this.performanceClient).acquireTokenByRefreshToken(e);throw r}}async acquireCachedToken(e){var t;null==(t=this.performanceClient)||t.addQueueMeasurement(PerformanceEvents.SilentFlowClientAcquireCachedToken,e.correlationId);let r=CacheOutcome.NOT_APPLICABLE;if(e.forceRefresh||!this.config.cacheOptions.claimsBasedCachingEnabled&&!StringUtils.isEmptyObj(e.claims))throw this.setCacheOutcome(CacheOutcome.FORCE_REFRESH_OR_CLAIMS,e.correlationId),createClientAuthError(tokenRefreshRequired);if(!e.account)throw createClientAuthError(noAccountInSilentRequest);const n=e.account.tenantId||getTenantFromAuthorityString(e.authority),i=this.cacheManager.getTokenKeys(),o=this.cacheManager.getAccessToken(e.account,e,i,n,this.performanceClient,e.correlationId);if(!o)throw this.setCacheOutcome(CacheOutcome.NO_CACHED_ACCESS_TOKEN,e.correlationId),createClientAuthError(tokenRefreshRequired);if(wasClockTurnedBack(o.cachedAt)||isTokenExpired(o.expiresOn,this.config.systemOptions.tokenRenewalOffsetSeconds))throw this.setCacheOutcome(CacheOutcome.CACHED_ACCESS_TOKEN_EXPIRED,e.correlationId),createClientAuthError(tokenRefreshRequired);o.refreshOn&&isTokenExpired(o.refreshOn,0)&&(r=CacheOutcome.PROACTIVELY_REFRESHED);const a=e.authority||this.authority.getPreferredCache(),s={account:this.cacheManager.readAccountFromCache(e.account),accessToken:o,idToken:this.cacheManager.getIdToken(e.account,i,n,this.performanceClient,e.correlationId),refreshToken:null,appMetadata:this.cacheManager.readAppMetadataFromCache(a)};return this.setCacheOutcome(r,e.correlationId),this.config.serverTelemetryManager&&this.config.serverTelemetryManager.incrementCacheHits(),[await invokeAsync(this.generateResultFromCacheRecord.bind(this),PerformanceEvents.SilentFlowClientGenerateResultFromCacheRecord,this.logger,this.performanceClient,e.correlationId)(s,e),r]}setCacheOutcome(e,t){var r,n;null==(r=this.serverTelemetryManager)||r.setCacheOutcome(e),null==(n=this.performanceClient)||n.addFields({cacheOutcome:e},t),e!==CacheOutcome.NOT_APPLICABLE&&this.logger.info(`Token refresh is required due to cache outcome: ${e}`)}async generateResultFromCacheRecord(e,t){var r;let n;if(null==(r=this.performanceClient)||r.addQueueMeasurement(PerformanceEvents.SilentFlowClientGenerateResultFromCacheRecord,t.correlationId),e.idToken&&(n=extractTokenClaims(e.idToken.secret,this.config.cryptoInterface.base64Decode)),t.maxAge||0===t.maxAge){const e=null==n?void 0:n.auth_time;if(!e)throw createClientAuthError(authTimeNotFound);checkMaxAge(e,t.maxAge)}return ResponseHandler.generateAuthenticationResult(this.cryptoUtils,this.authority,e,!0,t,n)}constructor(e,t){super(e,t)}}}}),StubbedNetworkModule,init_INetworkModule=__esm({\"../../node_modules/.pnpm/@azure+msal-common@14.16.0/node_modules/@azure/msal-common/dist/network/INetworkModule.mjs\"(){init_globals(),init_ClientAuthError(),init_ClientAuthErrorCodes(),StubbedNetworkModule={sendGetRequestAsync:()=>Promise.reject(createClientAuthError(methodNotImplemented)),sendPostRequestAsync:()=>Promise.reject(createClientAuthError(methodNotImplemented))}}}),AuthenticationHeaderParser,init_AuthenticationHeaderParser=__esm({\"../../node_modules/.pnpm/@azure+msal-common@14.16.0/node_modules/@azure/msal-common/dist/request/AuthenticationHeaderParser.mjs\"(){init_globals(),init_ClientConfigurationError(),init_Constants(),init_ClientConfigurationErrorCodes(),AuthenticationHeaderParser=class{getShrNonce(){const e=this.headers[HeaderNames.AuthenticationInfo];if(e){const t=this.parseChallenges(e);if(t.nextnonce)return t.nextnonce;throw createClientConfigurationError(invalidAuthenticationHeader)}const t=this.headers[HeaderNames.WWWAuthenticate];if(t){const e=this.parseChallenges(t);if(e.nonce)return e.nonce;throw createClientConfigurationError(invalidAuthenticationHeader)}throw createClientConfigurationError(missingNonceAuthenticationHeader)}parseChallenges(e){const t=e.indexOf(\" \"),r=e.substr(t+1).split(\",\"),n={};return r.forEach((e=>{const[t,r]=e.split(\"=\");n[t]=unescape(r.replace(/['\"]+/g,Constants.EMPTY_STRING))})),n}constructor(e){this.headers=e}}}}),skuGroupSeparator,skuValueSeparator,ServerTelemetryManager;function makeExtraSkuString(e){const{skus:t,libraryName:r,libraryVersion:n,extensionName:i,extensionVersion:o}=e,a=new Map([[0,[r,n]],[2,[i,o]]]);let s=[];if(null==t?void 0:t.length){if(s=t.split(skuGroupSeparator),s.length__left_angle_mark_4)return t}else s=Array.from({length:4},(()=>skuValueSeparator));return a.forEach(((e,t)=>{var r,n;2===e.length&&(null==(r=e[0])?void 0:r.length)&&(null==(n=e[1])?void 0:n.length)&&setSku({skuArr:s,index:t,skuName:e[0],skuVersion:e[1]})})),s.join(skuGroupSeparator)}function setSku(e){const{skuArr:t,index:r,skuName:n,skuVersion:i}=e;r>=t.length||(t[r]=[n,i].join(skuValueSeparator))}var init_ServerTelemetryManager=__esm({\"../../node_modules/.pnpm/@azure+msal-common@14.16.0/node_modules/@azure/msal-common/dist/telemetry/server/ServerTelemetryManager.mjs\"(){init_globals(),init_Constants(),init_AuthError(),skuGroupSeparator=\",\",skuValueSeparator=\"|\",ServerTelemetryManager=class e{generateCurrentRequestHeaderValue(){const e=`${this.apiId}${SERVER_TELEM_CONSTANTS.VALUE_SEPARATOR}${this.cacheOutcome}`,t=[this.wrapperSKU,this.wrapperVer],r=this.getNativeBrokerErrorCode();(null==r?void 0:r.length)&&t.push(`broker_error=${r}`);const n=t.join(SERVER_TELEM_CONSTANTS.VALUE_SEPARATOR),i=[e,this.getRegionDiscoveryFields()].join(SERVER_TELEM_CONSTANTS.VALUE_SEPARATOR);return[SERVER_TELEM_CONSTANTS.SCHEMA_VERSION,i,n].join(SERVER_TELEM_CONSTANTS.CATEGORY_SEPARATOR)}generateLastRequestHeaderValue(){const t=this.getLastRequests(),r=e.maxErrorsToSend(t),n=t.failedRequests.slice(0,2*r).join(SERVER_TELEM_CONSTANTS.VALUE_SEPARATOR),i=t.errors.slice(0,r).join(SERVER_TELEM_CONSTANTS.VALUE_SEPARATOR),o=t.errors.length,a=[o,r__left_angle_mark_o?SERVER_TELEM_CONSTANTS.OVERFLOW_TRUE:SERVER_TELEM_CONSTANTS.OVERFLOW_FALSE].join(SERVER_TELEM_CONSTANTS.VALUE_SEPARATOR);return[SERVER_TELEM_CONSTANTS.SCHEMA_VERSION,t.cacheHits,n,i,a].join(SERVER_TELEM_CONSTANTS.CATEGORY_SEPARATOR)}cacheFailedRequest(e){const t=this.getLastRequests();t.errors.length>=SERVER_TELEM_CONSTANTS.MAX_CACHED_ERRORS&&(t.failedRequests.shift(),t.failedRequests.shift(),t.errors.shift()),t.failedRequests.push(this.apiId,this.correlationId),e instanceof Error&&e&&e.toString()?e instanceof AuthError?e.subError?t.errors.push(e.subError):e.errorCode?t.errors.push(e.errorCode):t.errors.push(e.toString()):t.errors.push(e.toString()):t.errors.push(SERVER_TELEM_CONSTANTS.UNKNOWN_ERROR),this.cacheManager.setServerTelemetry(this.telemetryCacheKey,t)}incrementCacheHits(){const e=this.getLastRequests();return e.cacheHits+=1,this.cacheManager.setServerTelemetry(this.telemetryCacheKey,e),e.cacheHits}getLastRequests(){return this.cacheManager.getServerTelemetry(this.telemetryCacheKey)||{failedRequests:[],errors:[],cacheHits:0}}clearTelemetryCache(){const t=this.getLastRequests(),r=e.maxErrorsToSend(t);if(r===t.errors.length)this.cacheManager.removeItem(this.telemetryCacheKey);else{const e={failedRequests:t.failedRequests.slice(2*r),errors:t.errors.slice(r),cacheHits:0};this.cacheManager.setServerTelemetry(this.telemetryCacheKey,e)}}static maxErrorsToSend(e){let t,r=0,n=0;const i=e.errors.length;for(t=0;t__left_angle_mark_i;t++){const i=e.failedRequests[2*t]||Constants.EMPTY_STRING,o=e.failedRequests[2*t+1]||Constants.EMPTY_STRING,a=e.errors[t]||Constants.EMPTY_STRING;if(n+=i.toString().length+o.toString().length+a.length+3,!(n__left_angle_mark_SERVER_TELEM_CONSTANTS.MAX_LAST_HEADER_BYTES))break;r+=1}return r}getRegionDiscoveryFields(){const e=[];return e.push(this.regionUsed||Constants.EMPTY_STRING),e.push(this.regionSource||Constants.EMPTY_STRING),e.push(this.regionOutcome||Constants.EMPTY_STRING),e.join(\",\")}updateRegionDiscoveryMetadata(e){this.regionUsed=e.region_used,this.regionSource=e.region_source,this.regionOutcome=e.region_outcome}setCacheOutcome(e){this.cacheOutcome=e}setNativeBrokerErrorCode(e){const t=this.getLastRequests();t.nativeBrokerErrorCode=e,this.cacheManager.setServerTelemetry(this.telemetryCacheKey,t)}getNativeBrokerErrorCode(){return this.getLastRequests().nativeBrokerErrorCode}clearNativeBrokerErrorCode(){const e=this.getLastRequests();delete e.nativeBrokerErrorCode,this.cacheManager.setServerTelemetry(this.telemetryCacheKey,e)}static makeExtraSkuString(e){return makeExtraSkuString(e)}constructor(e,t){this.cacheOutcome=CacheOutcome.NOT_APPLICABLE,this.cacheManager=t,this.apiId=e.apiId,this.correlationId=e.correlationId,this.wrapperSKU=e.wrapperSKU||Constants.EMPTY_STRING,this.wrapperVer=e.wrapperVer||Constants.EMPTY_STRING,this.telemetryCacheKey=SERVER_TELEM_CONSTANTS.CACHE_KEY+Separators.CACHE_KEY_SEPARATOR+e.clientId}}}}),missingKidError,missingAlgError,init_JoseHeaderErrorCodes=__esm({\"../../node_modules/.pnpm/@azure+msal-common@14.16.0/node_modules/@azure/msal-common/dist/error/JoseHeaderErrorCodes.mjs\"(){init_globals(),missingKidError=\"missing_kid_error\",missingAlgError=\"missing_alg_error\"}}),JoseHeaderErrorMessages,JoseHeaderError;function createJoseHeaderError(e){return new JoseHeaderError(e,JoseHeaderErrorMessages[e])}var init_JoseHeaderError=__esm({\"../../node_modules/.pnpm/@azure+msal-common@14.16.0/node_modules/@azure/msal-common/dist/error/JoseHeaderError.mjs\"(){init_globals(),init_AuthError(),init_JoseHeaderErrorCodes(),JoseHeaderErrorMessages={[missingKidError]:\"The JOSE Header for the requested JWT, JWS or JWK object requires a keyId to be configured as the 'kid' header claim. No 'kid' value was provided.\",[missingAlgError]:\"The JOSE Header for the requested JWT, JWS or JWK object requires an algorithm to be specified as the 'alg' header claim. No 'alg' value was provided.\"},JoseHeaderError=class e extends AuthError{constructor(t,r){super(t,r),this.name=\"JoseHeaderError\",Object.setPrototypeOf(this,e.prototype)}}}}),JoseHeader,init_JoseHeader=__esm({\"../../node_modules/.pnpm/@azure+msal-common@14.16.0/node_modules/@azure/msal-common/dist/crypto/JoseHeader.mjs\"(){init_globals(),init_JoseHeaderError(),init_Constants(),init_JoseHeaderErrorCodes(),JoseHeader=class e{static getShrHeaderString(t){if(!t.kid)throw createJoseHeaderError(missingKidError);if(!t.alg)throw createJoseHeaderError(missingAlgError);const r=new e({typ:t.typ||JsonWebTokenTypes.Pop,kid:t.kid,alg:t.alg});return JSON.stringify(r)}constructor(e){this.typ=e.typ,this.alg=e.alg,this.kid=e.kid}}}}),StubPerformanceMeasurement,StubPerformanceClient,init_StubPerformanceClient=__esm({\"../../node_modules/.pnpm/@azure+msal-common@14.16.0/node_modules/@azure/msal-common/dist/telemetry/performance/StubPerformanceClient.mjs\"(){init_globals(),init_PerformanceEvent(),StubPerformanceMeasurement=class{startMeasurement(){}endMeasurement(){}flushMeasurement(){return null}},StubPerformanceClient=class{generateId(){return\"callback-id\"}startMeasurement(e,t){return{end:()=>null,discard:()=>{},add:()=>{},increment:()=>{},event:{eventId:this.generateId(),status:PerformanceEventStatus.InProgress,authority:\"\",libraryName:\"\",libraryVersion:\"\",clientId:\"\",name:e,startTimeMs:Date.now(),correlationId:t||\"\"},measurement:new StubPerformanceMeasurement}}startPerformanceMeasurement(){return new StubPerformanceMeasurement}calculateQueuedTime(){return 0}addQueueMeasurement(){}setPreQueueTime(){}endMeasurement(){return null}discardMeasurements(){}removePerformanceCallback(){return!0}addPerformanceCallback(){return\"\"}emitEvents(){}addFields(){}incrementFields(){}cacheEventByCorrelationId(){}}}}),PerformanceClient;function startContext(e,t,r){r&&r.push({name:t.get(e.name)||e.name})}function endContext(e,t,r,n){if(!(null==r?void 0:r.length))return;const i=e=>e.length?e[e.length-1]:void 0,o=t.get(e.name)||e.name,a=i(r);if((null==a?void 0:a.name)!==o)return;const s=null==r?void 0:r.pop();if(!s)return;const l=n instanceof AuthError?n.errorCode:n instanceof Error?n.name:void 0,u=n instanceof AuthError?n.subError:void 0;l&&s.childErr!==l&&(s.err=l,u&&(s.subErr=u)),delete s.name,delete s.childErr;const c={...s,dur:e.durationMs};e.success||(c.fail=1);const d=i(r);if(!d)return{[o]:c};let h;if(l&&(d.childErr=l),d[o]){const e=Object.keys(d).filter((e=>e.startsWith(o))).length;h=`${o}_${e+1}`}else h=o;return d[h]=c,d}function addError(e,t,r,n=5){var i,o;if(e instanceof Error)return e instanceof AuthError?(r.errorCode=e.errorCode,r.subErrorCode=e.subError,void((e instanceof ServerError||e instanceof InteractionRequiredAuthError)&&(r.serverErrorNo=e.errorNo))):void(e instanceof CacheError?r.errorCode=e.errorCode:(null==(i=r.errorStack)?void 0:i.length)?t.trace(\"PerformanceClient.addErrorStack: Stack already exist\",r.correlationId):(null==(o=e.stack)?void 0:o.length)?(e.stack&&(r.errorStack=compactStack(e.stack,n)),r.errorName=e.name):t.trace(\"PerformanceClient.addErrorStack: Input stack is empty\",r.correlationId));t.trace(\"PerformanceClient.addErrorStack: Input error is not instance of Error\",r.correlationId)}function compactStack(e,t){if(t__left_angle_mark_0)return[];const r=e.split(\"\\n\")||[],n=[],i=r[0];i.startsWith(\"TypeError: Cannot read property\")||i.startsWith(\"TypeError: Cannot read properties of\")||i.startsWith(\"TypeError: Cannot set property\")||i.startsWith(\"TypeError: Cannot set properties of\")||i.endsWith(\"is not a function\")?n.push(compactStackLine(i)):(i.startsWith(\"SyntaxError\")||i.startsWith(\"TypeError\"))&&n.push(compactStackLine(i.replace(/['].*[']|[\"].*[\"]/g,\"__left_angle_mark_redacted>\")));for(let o=1;o__left_angle_mark_r.length&&!(n.length>=t);o++){const e=r[o];n.push(compactStackLine(e))}return n}function compactStackLine(e){const t=e.lastIndexOf(\" \")+1;if(t__left_angle_mark_1)return e;const r=e.substring(t);let n=r.lastIndexOf(\"/\");return n=n__left_angle_mark_0?r.lastIndexOf(\"\\\\\"):n,n>=0?(e.substring(0,t)+\"(\"+r.substring(n+1)+(\")\"===r.charAt(r.length-1)?\"\":\")\")).trimStart():e.trimStart()}var init_PerformanceClient=__esm({\"../../node_modules/.pnpm/@azure+msal-common@14.16.0/node_modules/@azure/msal-common/dist/telemetry/performance/PerformanceClient.mjs\"(){init_globals(),init_PerformanceEvent(),init_StubPerformanceClient(),init_AuthError(),init_CacheError(),init_ServerError(),init_InteractionRequiredAuthError(),PerformanceClient=class{startPerformanceMeasurement(e,t){return{}}getPreQueueTime(e,t){const r=this.preQueueTimeByCorrelationId.get(t);if(r){if(r.name===e)return r.time;this.logger.trace(`PerformanceClient.getPreQueueTime: no pre-queue time found for ${e}, unable to add queue measurement`)}else this.logger.trace(`PerformanceClient.getPreQueueTime: no pre-queue times found for correlationId: ${t}, unable to add queue measurement`)}calculateQueuedTime(e,t){return e__left_angle_mark_1?(this.logger.trace(`PerformanceClient: preQueueTime should be a positive integer and not ${e}`),0):t__left_angle_mark_1?(this.logger.trace(`PerformanceClient: currentTime should be a positive integer and not ${t}`),0):t__left_angle_mark_e?(this.logger.trace(\"PerformanceClient: currentTime is less than preQueueTime, check how time is being retrieved\"),0):t-e}addQueueMeasurement(e,t,r,n){if(!t)return void this.logger.trace(`PerformanceClient.addQueueMeasurement: correlationId not provided for ${e}, cannot add queue measurement`);if(0===r)this.logger.trace(`PerformanceClient.addQueueMeasurement: queue time provided for ${e} is ${r}`);else if(!r)return void this.logger.trace(`PerformanceClient.addQueueMeasurement: no queue time provided for ${e}`);const i={eventName:e,queueTime:n?0:r,manuallyCompleted:n},o=this.queueMeasurements.get(t);if(o)o.push(i),this.queueMeasurements.set(t,o);else{this.logger.trace(`PerformanceClient.addQueueMeasurement: adding correlationId ${t} to queue measurements`);const e=[i];this.queueMeasurements.set(t,e)}this.preQueueTimeByCorrelationId.delete(t)}startMeasurement(e,t){var r,n;const i=t||this.generateId();t||this.logger.info(`PerformanceClient: No correlation id provided for ${e}, generating`,i),this.logger.trace(`PerformanceClient: Performance measurement started for ${e}`,i);const o={eventId:this.generateId(),status:PerformanceEventStatus.InProgress,authority:this.authority,libraryName:this.libraryName,libraryVersion:this.libraryVersion,clientId:this.clientId,name:e,startTimeMs:Date.now(),correlationId:i,appName:null==(r=this.applicationTelemetry)?void 0:r.appName,appVersion:null==(n=this.applicationTelemetry)?void 0:n.appVersion};return this.cacheEventByCorrelationId(o),startContext(o,this.abbreviations,this.eventStack.get(i)),{end:(e,t)=>this.endMeasurement({...o,...e},t),discard:()=>this.discardMeasurements(o.correlationId),add:e=>this.addFields(e,o.correlationId),increment:e=>this.incrementFields(e,o.correlationId),event:o,measurement:new StubPerformanceMeasurement}}endMeasurement(e,t){var r,n;const i=this.eventsByCorrelationId.get(e.correlationId);if(!i)return this.logger.trace(`PerformanceClient: Measurement not found for ${e.eventId}`,e.correlationId),null;const o=e.eventId===i.eventId;let a={totalQueueTime:0,totalQueueCount:0,manuallyCompletedCount:0};e.durationMs=Math.round(e.durationMs||this.getDurationMs(e.startTimeMs));const s=JSON.stringify(endContext(e,this.abbreviations,this.eventStack.get(i.correlationId),t));if(o?(a=this.getQueueInfo(e.correlationId),this.discardMeasurements(i.correlationId)):null==(r=i.incompleteSubMeasurements)||r.delete(e.eventId),this.logger.trace(`PerformanceClient: Performance measurement ended for ${e.name}: ${e.durationMs} ms`,e.correlationId),t&&addError(t,this.logger,i),!o)return i[e.name+\"DurationMs\"]=Math.floor(e.durationMs),{...i};o&&!t&&(i.errorCode||i.subErrorCode)&&(this.logger.trace(`PerformanceClient: Remove error and sub-error codes for root event ${e.name} as intermediate error was successfully handled`,e.correlationId),i.errorCode=void 0,i.subErrorCode=void 0);let l={...i,...e},u=0;return null==(n=l.incompleteSubMeasurements)||n.forEach((t=>{this.logger.trace(`PerformanceClient: Incomplete submeasurement ${t.name} found for ${e.name}`,l.correlationId),u++})),l.incompleteSubMeasurements=void 0,l={...l,queuedTimeMs:a.totalQueueTime,queuedCount:a.totalQueueCount,queuedManuallyCompletedCount:a.manuallyCompletedCount,status:PerformanceEventStatus.Completed,incompleteSubsCount:u,context:s},this.truncateIntegralFields(l),this.emitEvents([l],e.correlationId),l}addFields(e,t){this.logger.trace(\"PerformanceClient: Updating static fields\");const r=this.eventsByCorrelationId.get(t);r?this.eventsByCorrelationId.set(t,{...r,...e}):this.logger.trace(\"PerformanceClient: Event not found for\",t)}incrementFields(e,t){this.logger.trace(\"PerformanceClient: Updating counters\");const r=this.eventsByCorrelationId.get(t);if(r)for(const n in e){if(r.hasOwnProperty(n)){if(isNaN(Number(r[n])))return}else r[n]=0;r[n]+=e[n]}else this.logger.trace(\"PerformanceClient: Event not found for\",t)}cacheEventByCorrelationId(e){const t=this.eventsByCorrelationId.get(e.correlationId);t?(this.logger.trace(`PerformanceClient: Performance measurement for ${e.name} added/updated`,e.correlationId),t.incompleteSubMeasurements=t.incompleteSubMeasurements||new Map,t.incompleteSubMeasurements.set(e.eventId,{name:e.name,startTimeMs:e.startTimeMs})):(this.logger.trace(`PerformanceClient: Performance measurement for ${e.name} started`,e.correlationId),this.eventsByCorrelationId.set(e.correlationId,{...e}),this.eventStack.set(e.correlationId,[]))}getQueueInfo(e){const t=this.queueMeasurements.get(e);t||this.logger.trace(`PerformanceClient: no queue measurements found for for correlationId: ${e}`);let r=0,n=0,i=0;return null==t||t.forEach((e=>{r+=e.queueTime,n++,i+=e.manuallyCompleted?1:0})),{totalQueueTime:r,totalQueueCount:n,manuallyCompletedCount:i}}discardMeasurements(e){this.logger.trace(\"PerformanceClient: Performance measurements discarded\",e),this.eventsByCorrelationId.delete(e),this.logger.trace(\"PerformanceClient: QueueMeasurements discarded\",e),this.queueMeasurements.delete(e),this.logger.trace(\"PerformanceClient: Pre-queue times discarded\",e),this.preQueueTimeByCorrelationId.delete(e),this.logger.trace(\"PerformanceClient: Event stack discarded\",e),this.eventStack.delete(e)}addPerformanceCallback(e){for(const[r,n]of this.callbacks)if(n.toString()===e.toString())return this.logger.warning(`PerformanceClient: Performance callback is already registered with id: ${r}`),r;const t=this.generateId();return this.callbacks.set(t,e),this.logger.verbose(`PerformanceClient: Performance callback registered with id: ${t}`),t}removePerformanceCallback(e){const t=this.callbacks.delete(e);return t?this.logger.verbose(`PerformanceClient: Performance callback ${e} removed.`):this.logger.verbose(`PerformanceClient: Performance callback ${e} not removed.`),t}emitEvents(e,t){this.logger.verbose(\"PerformanceClient: Emitting performance events\",t),this.callbacks.forEach(((r,n)=>{this.logger.trace(`PerformanceClient: Emitting event to callback ${n}`,t),r.apply(null,[e])}))}truncateIntegralFields(e){this.intFields.forEach((t=>{t in e&&\"number\"==typeof e[t]&&(e[t]=Math.floor(e[t]))}))}getDurationMs(e){const t=Date.now()-e;return t__left_angle_mark_0?t:0}constructor(e,t,r,n,i,o,a,s){this.authority=t,this.libraryName=n,this.libraryVersion=i,this.applicationTelemetry=o,this.clientId=e,this.logger=r,this.callbacks=new Map,this.eventsByCorrelationId=new Map,this.eventStack=new Map,this.queueMeasurements=new Map,this.preQueueTimeByCorrelationId=new Map,this.intFields=a||new Set;for(const l of IntFields)this.intFields.add(l);this.abbreviations=s||new Map;for(const[l,u]of PerformanceEventAbbreviations)this.abbreviations.set(l,u)}}}}),init_index_browser=__esm({\"../../node_modules/.pnpm/@azure+msal-common@14.16.0/node_modules/@azure/msal-common/dist/index-browser.mjs\"(){init_globals(),init_AuthorizationCodeClient(),init_RefreshTokenClient(),init_SilentFlowClient(),init_ClientConfiguration(),init_AccountInfo(),init_CcsCredential(),init_Authority(),init_AuthorityOptions(),init_AuthorityType(),init_ProtocolMode(),init_CacheManager(),init_AccountEntity(),init_INetworkModule(),init_ThrottlingUtils(),init_UrlString(),init_ICrypto(),init_RequestParameterBuilder(),init_ResponseHandler(),init_ScopeSet(),init_AuthenticationHeaderParser(),init_Logger(),init_InteractionRequiredAuthError(),init_InteractionRequiredAuthErrorCodes(),init_AuthError(),init_AuthErrorCodes(),init_ServerError(),init_NetworkError(),init_CacheError(),init_ClientAuthError(),init_ClientAuthErrorCodes(),init_ClientConfigurationError(),init_ClientConfigurationErrorCodes(),init_Constants(),init_StringUtils(),init_ProtocolUtils(),init_ServerTelemetryManager(),init_FunctionWrappers(),init_AuthToken(),init_AuthorityFactory(),init_CacheHelpers(),init_TimeUtils(),init_UrlUtils(),init_AADServerParamKeys(),init_JoseHeader(),init_PerformanceEvent(),init_PerformanceClient(),init_StubPerformanceClient(),init_PopTokenGenerator()}}),BrowserAuthErrorCodes_exports={},pkceNotCreated,cryptoNonExistent,emptyNavigateUri,hashEmptyError,noStateInHash,hashDoesNotContainKnownProperties,unableToParseState,stateInteractionTypeMismatch,interactionInProgress,popupWindowError,emptyWindowError,userCancelled,monitorPopupTimeout,monitorWindowTimeout,redirectInIframe,blockIframeReload,blockNestedPopups,iframeClosedPrematurely,silentLogoutUnsupported,noAccountError,silentPromptValueError,noTokenRequestCacheError,unableToParseTokenRequestCacheError,noCachedAuthorityError,authRequestNotSetError,invalidCacheType,nonBrowserEnvironment,databaseNotOpen,noNetworkConnectivity2,postRequestFailed2,getRequestFailed,failedToParseResponse,unableToLoadToken,cryptoKeyNotFound,authCodeRequired,authCodeOrNativeAccountIdRequired,spaCodeAndNativeAccountIdPresent,databaseUnavailable,unableToAcquireTokenFromNativePlatform,nativeHandshakeTimeout,nativeExtensionNotInstalled,nativeConnectionNotEstablished,uninitializedPublicClientApplication,nativePromptNotSupported,invalidBase64String,invalidPopTokenRequest,failedToBuildHeaders,failedToParseHeaders;__export(BrowserAuthErrorCodes_exports,{authCodeOrNativeAccountIdRequired:()=>authCodeOrNativeAccountIdRequired,authCodeRequired:()=>authCodeRequired,authRequestNotSetError:()=>authRequestNotSetError,blockIframeReload:()=>blockIframeReload,blockNestedPopups:()=>blockNestedPopups,cryptoKeyNotFound:()=>cryptoKeyNotFound,cryptoNonExistent:()=>cryptoNonExistent,databaseNotOpen:()=>databaseNotOpen,databaseUnavailable:()=>databaseUnavailable,emptyNavigateUri:()=>emptyNavigateUri,emptyWindowError:()=>emptyWindowError,failedToBuildHeaders:()=>failedToBuildHeaders,failedToParseHeaders:()=>failedToParseHeaders,failedToParseResponse:()=>failedToParseResponse,getRequestFailed:()=>getRequestFailed,hashDoesNotContainKnownProperties:()=>hashDoesNotContainKnownProperties,hashEmptyError:()=>hashEmptyError,iframeClosedPrematurely:()=>iframeClosedPrematurely,interactionInProgress:()=>interactionInProgress,invalidBase64String:()=>invalidBase64String,invalidCacheType:()=>invalidCacheType,invalidPopTokenRequest:()=>invalidPopTokenRequest,monitorPopupTimeout:()=>monitorPopupTimeout,monitorWindowTimeout:()=>monitorWindowTimeout,nativeConnectionNotEstablished:()=>nativeConnectionNotEstablished,nativeExtensionNotInstalled:()=>nativeExtensionNotInstalled,nativeHandshakeTimeout:()=>nativeHandshakeTimeout,nativePromptNotSupported:()=>nativePromptNotSupported,noAccountError:()=>noAccountError,noCachedAuthorityError:()=>noCachedAuthorityError,noNetworkConnectivity:()=>noNetworkConnectivity2,noStateInHash:()=>noStateInHash,noTokenRequestCacheError:()=>noTokenRequestCacheError,nonBrowserEnvironment:()=>nonBrowserEnvironment,pkceNotCreated:()=>pkceNotCreated,popupWindowError:()=>popupWindowError,postRequestFailed:()=>postRequestFailed2,redirectInIframe:()=>redirectInIframe,silentLogoutUnsupported:()=>silentLogoutUnsupported,silentPromptValueError:()=>silentPromptValueError,spaCodeAndNativeAccountIdPresent:()=>spaCodeAndNativeAccountIdPresent,stateInteractionTypeMismatch:()=>stateInteractionTypeMismatch,unableToAcquireTokenFromNativePlatform:()=>unableToAcquireTokenFromNativePlatform,unableToLoadToken:()=>unableToLoadToken,unableToParseState:()=>unableToParseState,unableToParseTokenRequestCacheError:()=>unableToParseTokenRequestCacheError,uninitializedPublicClientApplication:()=>uninitializedPublicClientApplication,userCancelled:()=>userCancelled});var init_BrowserAuthErrorCodes=__esm({\"../../node_modules/.pnpm/@azure+msal-browser@3.28.0/node_modules/@azure/msal-browser/dist/error/BrowserAuthErrorCodes.mjs\"(){init_globals(),pkceNotCreated=\"pkce_not_created\",cryptoNonExistent=\"crypto_nonexistent\",emptyNavigateUri=\"empty_navigate_uri\",hashEmptyError=\"hash_empty_error\",noStateInHash=\"no_state_in_hash\",hashDoesNotContainKnownProperties=\"hash_does_not_contain_known_properties\",unableToParseState=\"unable_to_parse_state\",stateInteractionTypeMismatch=\"state_interaction_type_mismatch\",interactionInProgress=\"interaction_in_progress\",popupWindowError=\"popup_window_error\",emptyWindowError=\"empty_window_error\",userCancelled=\"user_cancelled\",monitorPopupTimeout=\"monitor_popup_timeout\",monitorWindowTimeout=\"monitor_window_timeout\",redirectInIframe=\"redirect_in_iframe\",blockIframeReload=\"block_iframe_reload\",blockNestedPopups=\"block_nested_popups\",iframeClosedPrematurely=\"iframe_closed_prematurely\",silentLogoutUnsupported=\"silent_logout_unsupported\",noAccountError=\"no_account_error\",silentPromptValueError=\"silent_prompt_value_error\",noTokenRequestCacheError=\"no_token_request_cache_error\",unableToParseTokenRequestCacheError=\"unable_to_parse_token_request_cache_error\",noCachedAuthorityError=\"no_cached_authority_error\",authRequestNotSetError=\"auth_request_not_set_error\",invalidCacheType=\"invalid_cache_type\",nonBrowserEnvironment=\"non_browser_environment\",databaseNotOpen=\"database_not_open\",noNetworkConnectivity2=\"no_network_connectivity\",postRequestFailed2=\"post_request_failed\",getRequestFailed=\"get_request_failed\",failedToParseResponse=\"failed_to_parse_response\",unableToLoadToken=\"unable_to_load_token\",cryptoKeyNotFound=\"crypto_key_not_found\",authCodeRequired=\"auth_code_required\",authCodeOrNativeAccountIdRequired=\"auth_code_or_nativeAccountId_required\",spaCodeAndNativeAccountIdPresent=\"spa_code_and_nativeAccountId_present\",databaseUnavailable=\"database_unavailable\",unableToAcquireTokenFromNativePlatform=\"unable_to_acquire_token_from_native_platform\",nativeHandshakeTimeout=\"native_handshake_timeout\",nativeExtensionNotInstalled=\"native_extension_not_installed\",nativeConnectionNotEstablished=\"native_connection_not_established\",uninitializedPublicClientApplication=\"uninitialized_public_client_application\",nativePromptNotSupported=\"native_prompt_not_supported\",invalidBase64String=\"invalid_base64_string\",invalidPopTokenRequest=\"invalid_pop_token_request\",failedToBuildHeaders=\"failed_to_build_headers\",failedToParseHeaders=\"failed_to_parse_headers\"}}),ErrorLink,BrowserAuthErrorMessages,BrowserAuthErrorMessage,BrowserAuthError;function createBrowserAuthError(e,t){return new BrowserAuthError(e,t)}var init_BrowserAuthError=__esm({\"../../node_modules/.pnpm/@azure+msal-browser@3.28.0/node_modules/@azure/msal-browser/dist/error/BrowserAuthError.mjs\"(){init_globals(),init_index_browser(),init_BrowserAuthErrorCodes(),ErrorLink=\"For more visit: aka.ms/msaljs/browser-errors\",BrowserAuthErrorMessage={pkceNotGenerated:{code:pkceNotCreated,desc:(BrowserAuthErrorMessages={[pkceNotCreated]:\"The PKCE code challenge and verifier could not be generated.\",[cryptoNonExistent]:\"The crypto object or function is not available.\",[emptyNavigateUri]:\"Navigation URI is empty. Please check stack trace for more info.\",[hashEmptyError]:`Hash value cannot be processed because it is empty. Please verify that your redirectUri is not clearing the hash. ${ErrorLink}`,[noStateInHash]:\"Hash does not contain state. Please verify that the request originated from msal.\",[hashDoesNotContainKnownProperties]:`Hash does not contain known properites. Please verify that your redirectUri is not changing the hash. ${ErrorLink}`,[unableToParseState]:\"Unable to parse state. Please verify that the request originated from msal.\",[stateInteractionTypeMismatch]:\"Hash contains state but the interaction type does not match the caller.\",[interactionInProgress]:`Interaction is currently in progress. Please ensure that this interaction has been completed before calling an interactive API. ${ErrorLink}`,[popupWindowError]:\"Error opening popup window. This can happen if you are using IE or if popups are blocked in the browser.\",[emptyWindowError]:\"window.open returned null or undefined window object.\",[userCancelled]:\"User cancelled the flow.\",[monitorPopupTimeout]:`Token acquisition in popup failed due to timeout. ${ErrorLink}`,[monitorWindowTimeout]:`Token acquisition in iframe failed due to timeout. ${ErrorLink}`,[redirectInIframe]:\"Redirects are not supported for iframed or brokered applications. Please ensure you are using MSAL.js in a top frame of the window if using the redirect APIs, or use the popup APIs.\",[blockIframeReload]:`Request was blocked inside an iframe because MSAL detected an authentication response. ${ErrorLink}`,[blockNestedPopups]:\"Request was blocked inside a popup because MSAL detected it was running in a popup.\",[iframeClosedPrematurely]:\"The iframe being monitored was closed prematurely.\",[silentLogoutUnsupported]:\"Silent logout not supported. Please call logoutRedirect or logoutPopup instead.\",[noAccountError]:\"No account object provided to acquireTokenSilent and no active account has been set. Please call setActiveAccount or provide an account on the request.\",[silentPromptValueError]:\"The value given for the prompt value is not valid for silent requests - must be set to 'none' or 'no_session'.\",[noTokenRequestCacheError]:\"No token request found in cache.\",[unableToParseTokenRequestCacheError]:\"The cached token request could not be parsed.\",[noCachedAuthorityError]:\"No cached authority found.\",[authRequestNotSetError]:\"Auth Request not set. Please ensure initiateAuthRequest was called from the InteractionHandler\",[invalidCacheType]:\"Invalid cache type\",[nonBrowserEnvironment]:\"Login and token requests are not supported in non-browser environments.\",[databaseNotOpen]:\"Database is not open!\",[noNetworkConnectivity2]:\"No network connectivity. Check your internet connection.\",[postRequestFailed2]:\"Network request failed: If the browser threw a CORS error, check that the redirectUri is registered in the Azure App Portal as type 'SPA'\",[getRequestFailed]:\"Network request failed. Please check the network trace to determine root cause.\",[failedToParseResponse]:\"Failed to parse network response. Check network trace.\",[unableToLoadToken]:\"Error loading token to cache.\",[cryptoKeyNotFound]:\"Cryptographic Key or Keypair not found in browser storage.\",[authCodeRequired]:\"An authorization code must be provided (as the `code` property on the request) to this flow.\",[authCodeOrNativeAccountIdRequired]:\"An authorization code or nativeAccountId must be provided to this flow.\",[spaCodeAndNativeAccountIdPresent]:\"Request cannot contain both spa code and native account id.\",[databaseUnavailable]:\"IndexedDB, which is required for persistent cryptographic key storage, is unavailable. This may be caused by browser privacy features which block persistent storage in third-party contexts.\",[unableToAcquireTokenFromNativePlatform]:`Unable to acquire token from native platform. ${ErrorLink}`,[nativeHandshakeTimeout]:\"Timed out while attempting to establish connection to browser extension\",[nativeExtensionNotInstalled]:\"Native extension is not installed. If you think this is a mistake call the initialize function.\",[nativeConnectionNotEstablished]:`Connection to native platform has not been established. Please install a compatible browser extension and run initialize(). ${ErrorLink}`,[uninitializedPublicClientApplication]:`You must call and await the initialize function before attempting to call any other MSAL API. ${ErrorLink}`,[nativePromptNotSupported]:\"The provided prompt is not supported by the native platform. This request should be routed to the web based flow.\",[invalidBase64String]:\"Invalid base64 encoded string.\",[invalidPopTokenRequest]:\"Invalid PoP token request. The request should not have both a popKid value and signPopToken set to true.\",[failedToBuildHeaders]:\"Failed to build request headers object.\",[failedToParseHeaders]:\"Failed to parse response headers\"})[pkceNotCreated]},cryptoDoesNotExist:{code:cryptoNonExistent,desc:BrowserAuthErrorMessages[cryptoNonExistent]},emptyNavigateUriError:{code:emptyNavigateUri,desc:BrowserAuthErrorMessages[emptyNavigateUri]},hashEmptyError:{code:hashEmptyError,desc:BrowserAuthErrorMessages[hashEmptyError]},hashDoesNotContainStateError:{code:noStateInHash,desc:BrowserAuthErrorMessages[noStateInHash]},hashDoesNotContainKnownPropertiesError:{code:hashDoesNotContainKnownProperties,desc:BrowserAuthErrorMessages[hashDoesNotContainKnownProperties]},unableToParseStateError:{code:unableToParseState,desc:BrowserAuthErrorMessages[unableToParseState]},stateInteractionTypeMismatchError:{code:stateInteractionTypeMismatch,desc:BrowserAuthErrorMessages[stateInteractionTypeMismatch]},interactionInProgress:{code:interactionInProgress,desc:BrowserAuthErrorMessages[interactionInProgress]},popupWindowError:{code:popupWindowError,desc:BrowserAuthErrorMessages[popupWindowError]},emptyWindowError:{code:emptyWindowError,desc:BrowserAuthErrorMessages[emptyWindowError]},userCancelledError:{code:userCancelled,desc:BrowserAuthErrorMessages[userCancelled]},monitorPopupTimeoutError:{code:monitorPopupTimeout,desc:BrowserAuthErrorMessages[monitorPopupTimeout]},monitorIframeTimeoutError:{code:monitorWindowTimeout,desc:BrowserAuthErrorMessages[monitorWindowTimeout]},redirectInIframeError:{code:redirectInIframe,desc:BrowserAuthErrorMessages[redirectInIframe]},blockTokenRequestsInHiddenIframeError:{code:blockIframeReload,desc:BrowserAuthErrorMessages[blockIframeReload]},blockAcquireTokenInPopupsError:{code:blockNestedPopups,desc:BrowserAuthErrorMessages[blockNestedPopups]},iframeClosedPrematurelyError:{code:iframeClosedPrematurely,desc:BrowserAuthErrorMessages[iframeClosedPrematurely]},silentLogoutUnsupportedError:{code:silentLogoutUnsupported,desc:BrowserAuthErrorMessages[silentLogoutUnsupported]},noAccountError:{code:noAccountError,desc:BrowserAuthErrorMessages[noAccountError]},silentPromptValueError:{code:silentPromptValueError,desc:BrowserAuthErrorMessages[silentPromptValueError]},noTokenRequestCacheError:{code:noTokenRequestCacheError,desc:BrowserAuthErrorMessages[noTokenRequestCacheError]},unableToParseTokenRequestCacheError:{code:unableToParseTokenRequestCacheError,desc:BrowserAuthErrorMessages[unableToParseTokenRequestCacheError]},noCachedAuthorityError:{code:noCachedAuthorityError,desc:BrowserAuthErrorMessages[noCachedAuthorityError]},authRequestNotSet:{code:authRequestNotSetError,desc:BrowserAuthErrorMessages[authRequestNotSetError]},invalidCacheType:{code:invalidCacheType,desc:BrowserAuthErrorMessages[invalidCacheType]},notInBrowserEnvironment:{code:nonBrowserEnvironment,desc:BrowserAuthErrorMessages[nonBrowserEnvironment]},databaseNotOpen:{code:databaseNotOpen,desc:BrowserAuthErrorMessages[databaseNotOpen]},noNetworkConnectivity:{code:noNetworkConnectivity2,desc:BrowserAuthErrorMessages[noNetworkConnectivity2]},postRequestFailed:{code:postRequestFailed2,desc:BrowserAuthErrorMessages[postRequestFailed2]},getRequestFailed:{code:getRequestFailed,desc:BrowserAuthErrorMessages[getRequestFailed]},failedToParseNetworkResponse:{code:failedToParseResponse,desc:BrowserAuthErrorMessages[failedToParseResponse]},unableToLoadTokenError:{code:unableToLoadToken,desc:BrowserAuthErrorMessages[unableToLoadToken]},signingKeyNotFoundInStorage:{code:cryptoKeyNotFound,desc:BrowserAuthErrorMessages[cryptoKeyNotFound]},authCodeRequired:{code:authCodeRequired,desc:BrowserAuthErrorMessages[authCodeRequired]},authCodeOrNativeAccountRequired:{code:authCodeOrNativeAccountIdRequired,desc:BrowserAuthErrorMessages[authCodeOrNativeAccountIdRequired]},spaCodeAndNativeAccountPresent:{code:spaCodeAndNativeAccountIdPresent,desc:BrowserAuthErrorMessages[spaCodeAndNativeAccountIdPresent]},databaseUnavailable:{code:databaseUnavailable,desc:BrowserAuthErrorMessages[databaseUnavailable]},unableToAcquireTokenFromNativePlatform:{code:unableToAcquireTokenFromNativePlatform,desc:BrowserAuthErrorMessages[unableToAcquireTokenFromNativePlatform]},nativeHandshakeTimeout:{code:nativeHandshakeTimeout,desc:BrowserAuthErrorMessages[nativeHandshakeTimeout]},nativeExtensionNotInstalled:{code:nativeExtensionNotInstalled,desc:BrowserAuthErrorMessages[nativeExtensionNotInstalled]},nativeConnectionNotEstablished:{code:nativeConnectionNotEstablished,desc:BrowserAuthErrorMessages[nativeConnectionNotEstablished]},uninitializedPublicClientApplication:{code:uninitializedPublicClientApplication,desc:BrowserAuthErrorMessages[uninitializedPublicClientApplication]},nativePromptNotSupported:{code:nativePromptNotSupported,desc:BrowserAuthErrorMessages[nativePromptNotSupported]},invalidBase64StringError:{code:invalidBase64String,desc:BrowserAuthErrorMessages[invalidBase64String]},invalidPopTokenRequest:{code:invalidPopTokenRequest,desc:BrowserAuthErrorMessages[invalidPopTokenRequest]}},BrowserAuthError=class e extends AuthError{constructor(t,r){super(t,BrowserAuthErrorMessages[t],r),Object.setPrototypeOf(this,e.prototype),this.name=\"BrowserAuthError\"}}}}),BrowserConstants,NativeConstants,NativeExtensionMethod,BrowserCacheLocation,HTTP_REQUEST_TYPE,TemporaryCacheKeys,StaticCacheKeys,InMemoryCacheKeys,ApiId,InteractionType,InteractionStatus,DEFAULT_REQUEST,KEY_FORMAT_JWK,WrapperSKU,DB_NAME,DB_VERSION,DB_TABLE_NAME,CacheLookupPolicy,iFrameRenewalPolicies,LOG_LEVEL_CACHE_KEY,LOG_PII_CACHE_KEY,BROWSER_PERF_ENABLED_KEY,init_BrowserConstants=__esm({\"../../node_modules/.pnpm/@azure+msal-browser@3.28.0/node_modules/@azure/msal-browser/dist/utils/BrowserConstants.mjs\"(){var e;init_globals(),init_index_browser(),BrowserConstants={INTERACTION_IN_PROGRESS_VALUE:\"interaction_in_progress\",INVALID_GRANT_ERROR:\"invalid_grant\",POPUP_WIDTH:483,POPUP_HEIGHT:600,POPUP_NAME_PREFIX:\"msal\",DEFAULT_POLL_INTERVAL_MS:30,MSAL_SKU:\"msal.js.browser\"},NativeConstants={CHANNEL_ID:\"53ee284d-920a-4b59-9d30-a60315b26836\",PREFERRED_EXTENSION_ID:\"ppnbnpeolgkicgegkbkbjmhlideopiji\",MATS_TELEMETRY:\"MATS\"},NativeExtensionMethod={HandshakeRequest:\"Handshake\",HandshakeResponse:\"HandshakeResponse\",GetToken:\"GetToken\",Response:\"Response\"},BrowserCacheLocation={LocalStorage:\"localStorage\",SessionStorage:\"sessionStorage\",MemoryStorage:\"memoryStorage\"},HTTP_REQUEST_TYPE={GET:\"GET\",POST:\"POST\"},TemporaryCacheKeys={AUTHORITY:\"authority\",ACQUIRE_TOKEN_ACCOUNT:\"acquireToken.account\",SESSION_STATE:\"session.state\",REQUEST_STATE:\"request.state\",NONCE_IDTOKEN:\"nonce.id_token\",ORIGIN_URI:\"request.origin\",RENEW_STATUS:\"token.renew.status\",URL_HASH:\"urlHash\",REQUEST_PARAMS:\"request.params\",SCOPES:\"scopes\",INTERACTION_STATUS_KEY:\"interaction.status\",CCS_CREDENTIAL:\"ccs.credential\",CORRELATION_ID:\"request.correlationId\",NATIVE_REQUEST:\"request.native\",REDIRECT_CONTEXT:\"request.redirect.context\"},StaticCacheKeys={ACCOUNT_KEYS:\"msal.account.keys\",TOKEN_KEYS:\"msal.token.keys\"},InMemoryCacheKeys={WRAPPER_SKU:\"wrapper.sku\",WRAPPER_VER:\"wrapper.version\"},ApiId={acquireTokenRedirect:861,acquireTokenPopup:862,ssoSilent:863,acquireTokenSilent_authCode:864,handleRedirectPromise:865,acquireTokenByCode:866,acquireTokenSilent_silentFlow:61,logout:961,logoutPopup:962},(e=InteractionType||(InteractionType={})).Redirect=\"redirect\",e.Popup=\"popup\",e.Silent=\"silent\",e.None=\"none\",InteractionStatus={Startup:\"startup\",Login:\"login\",Logout:\"logout\",AcquireToken:\"acquireToken\",SsoSilent:\"ssoSilent\",HandleRedirect:\"handleRedirect\",None:\"none\"},DEFAULT_REQUEST={scopes:OIDC_DEFAULT_SCOPES},KEY_FORMAT_JWK=\"jwk\",WrapperSKU={React:\"@azure/msal-react\",Angular:\"@azure/msal-angular\"},DB_VERSION=1,DB_TABLE_NAME=(DB_NAME=\"msal.db\")+\".keys\",iFrameRenewalPolicies=[(CacheLookupPolicy={Default:0,AccessToken:1,AccessTokenAndRefreshToken:2,RefreshToken:3,RefreshTokenAndNetwork:4,Skip:5}).Default,CacheLookupPolicy.Skip,CacheLookupPolicy.RefreshTokenAndNetwork],LOG_LEVEL_CACHE_KEY=\"msal.browser.log.level\",LOG_PII_CACHE_KEY=\"msal.browser.log.pii\",BROWSER_PERF_ENABLED_KEY=\"msal.browser.performance.enabled\"}});function urlEncode(e){return encodeURIComponent(base64Encode(e).replace(/=/g,\"\").replace(/\\+/g,\"-\").replace(/\\//g,\"_\"))}function urlEncodeArr(e){return base64EncArr(e).replace(/=/g,\"\").replace(/\\+/g,\"-\").replace(/\\//g,\"_\")}function base64Encode(e){return base64EncArr((new TextEncoder).encode(e))}function base64EncArr(e){const t=Array.from(e,(e=>String.fromCodePoint(e))).join(\"\");return btoa(t)}var init_Base64Encode=__esm({\"../../node_modules/.pnpm/@azure+msal-browser@3.28.0/node_modules/@azure/msal-browser/dist/encode/Base64Encode.mjs\"(){init_globals()}}),PKCS1_V15_KEYGEN_ALG,S256_HASH_ALG,MODULUS_LENGTH,PUBLIC_EXPONENT,UUID_CHARS,UINT32_ARR,SUBTLE_SUBERROR,keygenAlgorithmOptions;function validateCryptoAvailable(){if(!window)throw createBrowserAuthError(nonBrowserEnvironment);if(!window.crypto)throw createBrowserAuthError(cryptoNonExistent);if(!window.crypto.subtle)throw createBrowserAuthError(cryptoNonExistent,SUBTLE_SUBERROR)}async function sha256Digest(e,t,r){null==t||t.addQueueMeasurement(PerformanceEvents.Sha256Digest,r);const n=(new TextEncoder).encode(e);return window.crypto.subtle.digest(S256_HASH_ALG,n)}function getRandomValues(e){return window.crypto.getRandomValues(e)}function getRandomUint32(){return window.crypto.getRandomValues(UINT32_ARR),UINT32_ARR[0]}function createNewGuid(){const e=Date.now(),t=1024*getRandomUint32()+(1023&getRandomUint32()),r=new Uint8Array(16),n=Math.trunc(t/2**30),i=t&2**30-1,o=getRandomUint32();r[0]=e/2**40,r[1]=e/2**32,r[2]=e/2**24,r[3]=e/65536,r[4]=e/256,r[5]=e,r[6]=112|n>>>8,r[7]=n,r[8]=128|i>>>24,r[9]=i>>>16,r[10]=i>>>8,r[11]=i,r[12]=o>>>24,r[13]=o>>>16,r[14]=o>>>8,r[15]=o;let a=\"\";for(let s=0;s__left_angle_mark_r.length;s++)a+=UUID_CHARS.charAt(r[s]>>>4),a+=UUID_CHARS.charAt(15&r[s]),3!==s&&5!==s&&7!==s&&9!==s||(a+=\"-\");return a}async function generateKeyPair(e,t){return window.crypto.subtle.generateKey(keygenAlgorithmOptions,e,t)}async function exportJwk(e){return window.crypto.subtle.exportKey(KEY_FORMAT_JWK,e)}async function importJwk(e,t,r){return window.crypto.subtle.importKey(KEY_FORMAT_JWK,e,keygenAlgorithmOptions,t,r)}async function sign(e,t){return window.crypto.subtle.sign(keygenAlgorithmOptions,e,t)}async function hashString(e){const t=await sha256Digest(e);return urlEncodeArr(new Uint8Array(t))}var init_BrowserCrypto=__esm({\"../../node_modules/.pnpm/@azure+msal-browser@3.28.0/node_modules/@azure/msal-browser/dist/crypto/BrowserCrypto.mjs\"(){init_globals(),init_BrowserAuthError(),init_index_browser(),init_BrowserConstants(),init_Base64Encode(),init_BrowserAuthErrorCodes(),PKCS1_V15_KEYGEN_ALG=\"RSASSA-PKCS1-v1_5\",S256_HASH_ALG=\"SHA-256\",MODULUS_LENGTH=2048,PUBLIC_EXPONENT=new Uint8Array([1,0,1]),UUID_CHARS=\"0123456789abcdef\",UINT32_ARR=new Uint32Array(1),SUBTLE_SUBERROR=\"crypto_subtle_undefined\",keygenAlgorithmOptions={name:PKCS1_V15_KEYGEN_ALG,hash:S256_HASH_ALG,modulusLength:MODULUS_LENGTH,publicExponent:PUBLIC_EXPONENT}}}),BrowserConfigurationAuthErrorCodes_exports={},storageNotSupported,stubbedPublicClientApplicationCalled,inMemRedirectUnavailable;__export(BrowserConfigurationAuthErrorCodes_exports,{inMemRedirectUnavailable:()=>inMemRedirectUnavailable,storageNotSupported:()=>storageNotSupported,stubbedPublicClientApplicationCalled:()=>stubbedPublicClientApplicationCalled});var init_BrowserConfigurationAuthErrorCodes=__esm({\"../../node_modules/.pnpm/@azure+msal-browser@3.28.0/node_modules/@azure/msal-browser/dist/error/BrowserConfigurationAuthErrorCodes.mjs\"(){init_globals(),storageNotSupported=\"storage_not_supported\",stubbedPublicClientApplicationCalled=\"stubbed_public_client_application_called\",inMemRedirectUnavailable=\"in_mem_redirect_unavailable\"}}),BrowserConfigurationAuthErrorMessages,BrowserConfigurationAuthErrorMessage,BrowserConfigurationAuthError;function createBrowserConfigurationAuthError(e){return new BrowserConfigurationAuthError(e,BrowserConfigurationAuthErrorMessages[e])}var init_BrowserConfigurationAuthError=__esm({\"../../node_modules/.pnpm/@azure+msal-browser@3.28.0/node_modules/@azure/msal-browser/dist/error/BrowserConfigurationAuthError.mjs\"(){init_globals(),init_index_browser(),init_BrowserConfigurationAuthErrorCodes(),BrowserConfigurationAuthErrorMessage={storageNotSupportedError:{code:storageNotSupported,desc:(BrowserConfigurationAuthErrorMessages={[storageNotSupported]:\"Given storage configuration option was not supported.\",[stubbedPublicClientApplicationCalled]:\"Stub instance of Public Client Application was called. If using msal-react, please ensure context is not used without a provider. For more visit: aka.ms/msaljs/browser-errors\",[inMemRedirectUnavailable]:\"Redirect cannot be supported. In-memory storage was selected and storeAuthStateInCookie=false, which would cause the library to be unable to handle the incoming hash. If you would like to use the redirect API, please use session/localStorage or set storeAuthStateInCookie=true.\"})[storageNotSupported]},stubPcaInstanceCalled:{code:stubbedPublicClientApplicationCalled,desc:BrowserConfigurationAuthErrorMessages[stubbedPublicClientApplicationCalled]},inMemRedirectUnavailable:{code:inMemRedirectUnavailable,desc:BrowserConfigurationAuthErrorMessages[inMemRedirectUnavailable]}},BrowserConfigurationAuthError=class e extends AuthError{constructor(t,r){super(t,r),this.name=\"BrowserConfigurationAuthError\",Object.setPrototypeOf(this,e.prototype)}}}}),BrowserUtils_exports={};function clearHash(e){e.location.hash=\"\",\"function\"==typeof e.history.replaceState&&e.history.replaceState(null,\"\",`${e.location.origin}${e.location.pathname}${e.location.search}`)}function replaceHash(e){const t=e.split(\"#\");t.shift(),window.location.hash=t.length>0?t.join(\"#\"):\"\"}function isInIframe(){return window.parent!==window}function isInPopup(){return\"undefined\"!=typeof window&&!!window.opener&&window.opener!==window&&\"string\"==typeof window.name&&0===window.name.indexOf(`${BrowserConstants.POPUP_NAME_PREFIX}.`)}function getCurrentUri(){return window.location.href.split(\"?\")[0].split(\"#\")[0]}function getHomepage(){const e=new UrlString(window.location.href).getUrlComponents();return`${e.Protocol}//${e.HostNameAndPort}/`}function blockReloadInHiddenIframes(){if(UrlString.hashContainsKnownProperties(window.location.hash)&&isInIframe())throw createBrowserAuthError(blockIframeReload)}function blockRedirectInIframe(e){if(isInIframe()&&!e)throw createBrowserAuthError(redirectInIframe)}function blockAcquireTokenInPopups(){if(isInPopup())throw createBrowserAuthError(blockNestedPopups)}function blockNonBrowserEnvironment(){if(\"undefined\"==typeof window)throw createBrowserAuthError(nonBrowserEnvironment)}function blockAPICallsBeforeInitialize(e){if(!e)throw createBrowserAuthError(uninitializedPublicClientApplication)}function preflightCheck(e){blockNonBrowserEnvironment(),blockReloadInHiddenIframes(),blockAcquireTokenInPopups(),blockAPICallsBeforeInitialize(e)}function redirectPreflightCheck(e,t){if(preflightCheck(e),blockRedirectInIframe(t.system.allowRedirectInIframe),t.cache.cacheLocation===BrowserCacheLocation.MemoryStorage&&!t.cache.storeAuthStateInCookie)throw createBrowserConfigurationAuthError(inMemRedirectUnavailable)}function preconnect(e){const t=document.createElement(\"link\");t.rel=\"preconnect\",t.href=new URL(e).origin,t.crossOrigin=\"anonymous\",document.head.appendChild(t),window.setTimeout((()=>{try{document.head.removeChild(t)}catch(e){}}),1e4)}function createGuid(){return createNewGuid()}__export(BrowserUtils_exports,{blockAPICallsBeforeInitialize:()=>blockAPICallsBeforeInitialize,blockAcquireTokenInPopups:()=>blockAcquireTokenInPopups,blockNonBrowserEnvironment:()=>blockNonBrowserEnvironment,blockRedirectInIframe:()=>blockRedirectInIframe,blockReloadInHiddenIframes:()=>blockReloadInHiddenIframes,clearHash:()=>clearHash,createGuid:()=>createGuid,getCurrentUri:()=>getCurrentUri,getHomepage:()=>getHomepage,invoke:()=>invoke,invokeAsync:()=>invokeAsync,isInIframe:()=>isInIframe,isInPopup:()=>isInPopup,preconnect:()=>preconnect,preflightCheck:()=>preflightCheck,redirectPreflightCheck:()=>redirectPreflightCheck,replaceHash:()=>replaceHash});var init_BrowserUtils=__esm({\"../../node_modules/.pnpm/@azure+msal-browser@3.28.0/node_modules/@azure/msal-browser/dist/utils/BrowserUtils.mjs\"(){init_globals(),init_index_browser(),init_index_browser(),init_BrowserAuthError(),init_BrowserConstants(),init_BrowserCrypto(),init_BrowserConfigurationAuthError(),init_BrowserAuthErrorCodes(),init_BrowserConfigurationAuthErrorCodes()}}),NavigationClient,init_NavigationClient=__esm({\"../../node_modules/.pnpm/@azure+msal-browser@3.28.0/node_modules/@azure/msal-browser/dist/navigation/NavigationClient.mjs\"(){init_globals(),NavigationClient=class e{navigateInternal(t,r){return e.defaultNavigateWindow(t,r)}navigateExternal(t,r){return e.defaultNavigateWindow(t,r)}static defaultNavigateWindow(e,t){return t.noHistory?window.location.replace(e):window.location.assign(e),new Promise((e=>{setTimeout((()=>{e(!0)}),t.timeout)}))}}}}),FetchClient;function getFetchHeaders(e){try{const t=new Headers;if(!e||!e.headers)return t;const r=e.headers;return Object.entries(r).forEach((([e,r])=>{t.append(e,r)})),t}catch(t){throw createBrowserAuthError(failedToBuildHeaders)}}function getHeaderDict(e){try{const t={};return e.forEach(((e,r)=>{t[r]=e})),t}catch(t){throw createBrowserAuthError(failedToParseHeaders)}}var init_FetchClient=__esm({\"../../node_modules/.pnpm/@azure+msal-browser@3.28.0/node_modules/@azure/msal-browser/dist/network/FetchClient.mjs\"(){init_globals(),init_index_browser(),init_BrowserAuthError(),init_BrowserConstants(),init_BrowserAuthErrorCodes(),FetchClient=class{async sendGetRequestAsync(e,t){let r,n={},i=0;const o=getFetchHeaders(t);try{r=await fetch(e,{method:HTTP_REQUEST_TYPE.GET,headers:o})}catch(a){throw createBrowserAuthError(window.navigator.onLine?getRequestFailed:noNetworkConnectivity2)}n=getHeaderDict(r.headers);try{return i=r.status,{headers:n,body:await r.json(),status:i}}catch(a){throw createNetworkError(createBrowserAuthError(failedToParseResponse),i,n)}}async sendPostRequestAsync(e,t){const r=t&&t.body||\"\",n=getFetchHeaders(t);let i,o=0,a={};try{i=await fetch(e,{method:HTTP_REQUEST_TYPE.POST,headers:n,body:r})}catch(s){throw createBrowserAuthError(window.navigator.onLine?postRequestFailed2:noNetworkConnectivity2)}a=getHeaderDict(i.headers);try{return o=i.status,{headers:a,body:await i.json(),status:o}}catch(s){throw createNetworkError(createBrowserAuthError(failedToParseResponse),o,a)}}}}}),DEFAULT_POPUP_TIMEOUT_MS,DEFAULT_IFRAME_TIMEOUT_MS,DEFAULT_REDIRECT_TIMEOUT_MS,DEFAULT_NATIVE_BROKER_HANDSHAKE_TIMEOUT_MS;function buildConfiguration({auth:e,cache:t,system:r,telemetry:n},i){const o={clientId:Constants.EMPTY_STRING,authority:`${Constants.DEFAULT_AUTHORITY}`,knownAuthorities:[],cloudDiscoveryMetadata:Constants.EMPTY_STRING,authorityMetadata:Constants.EMPTY_STRING,redirectUri:\"undefined\"!=typeof window?getCurrentUri():\"\",postLogoutRedirectUri:Constants.EMPTY_STRING,navigateToLoginRequestUrl:!0,clientCapabilities:[],protocolMode:ProtocolMode.AAD,OIDCOptions:{serverResponseType:ServerResponseType.FRAGMENT,defaultScopes:[Constants.OPENID_SCOPE,Constants.PROFILE_SCOPE,Constants.OFFLINE_ACCESS_SCOPE]},azureCloudOptions:{azureCloudInstance:AzureCloudInstance.None,tenant:Constants.EMPTY_STRING},skipAuthorityMetadataCache:!1,supportsNestedAppAuth:!1,instanceAware:!1},a={cacheLocation:BrowserCacheLocation.SessionStorage,temporaryCacheLocation:BrowserCacheLocation.SessionStorage,storeAuthStateInCookie:!1,secureCookies:!1,cacheMigrationEnabled:!(!t||t.cacheLocation!==BrowserCacheLocation.LocalStorage),claimsBasedCachingEnabled:!1},s={loggerCallback:()=>{},logLevel:LogLevel.Info,piiLoggingEnabled:!1},l={...{...DEFAULT_SYSTEM_OPTIONS,loggerOptions:s,networkClient:i?new FetchClient:StubbedNetworkModule,navigationClient:new NavigationClient,loadFrameTimeout:0,windowHashTimeout:(null==r?void 0:r.loadFrameTimeout)||DEFAULT_POPUP_TIMEOUT_MS,iframeHashTimeout:(null==r?void 0:r.loadFrameTimeout)||DEFAULT_IFRAME_TIMEOUT_MS,navigateFrameWait:0,redirectNavigationTimeout:DEFAULT_REDIRECT_TIMEOUT_MS,asyncPopups:!1,allowRedirectInIframe:!1,allowNativeBroker:!1,nativeBrokerHandshakeTimeout:(null==r?void 0:r.nativeBrokerHandshakeTimeout)||DEFAULT_NATIVE_BROKER_HANDSHAKE_TIMEOUT_MS,pollIntervalMilliseconds:BrowserConstants.DEFAULT_POLL_INTERVAL_MS},...r,loggerOptions:(null==r?void 0:r.loggerOptions)||s},u={application:{appName:Constants.EMPTY_STRING,appVersion:Constants.EMPTY_STRING},client:new StubPerformanceClient};if((null==e?void 0:e.protocolMode)!==ProtocolMode.OIDC&&(null==e?void 0:e.OIDCOptions)&&new Logger(l.loggerOptions).warning(JSON.stringify(createClientConfigurationError(ClientConfigurationErrorCodes_exports.cannotSetOIDCOptions))),(null==e?void 0:e.protocolMode)&&e.protocolMode!==ProtocolMode.AAD&&(null==l?void 0:l.allowNativeBroker))throw createClientConfigurationError(ClientConfigurationErrorCodes_exports.cannotAllowNativeBroker);return{auth:{...o,...e,OIDCOptions:{...o.OIDCOptions,...null==e?void 0:e.OIDCOptions}},cache:{...a,...t},system:l,telemetry:{...u,...n}}}var init_Configuration=__esm({\"../../node_modules/.pnpm/@azure+msal-browser@3.28.0/node_modules/@azure/msal-browser/dist/config/Configuration.mjs\"(){init_globals(),init_index_browser(),init_BrowserConstants(),init_NavigationClient(),init_FetchClient(),init_BrowserUtils(),DEFAULT_POPUP_TIMEOUT_MS=6e4,DEFAULT_IFRAME_TIMEOUT_MS=1e4,DEFAULT_REDIRECT_TIMEOUT_MS=3e4,DEFAULT_NATIVE_BROKER_HANDSHAKE_TIMEOUT_MS=2e3}}),name2,version4,init_packageMetadata2=__esm({\"../../node_modules/.pnpm/@azure+msal-browser@3.28.0/node_modules/@azure/msal-browser/dist/packageMetadata.mjs\"(){init_globals(),name2=\"@azure/msal-browser\",version4=\"3.28.0\"}}),BaseOperatingContext,init_BaseOperatingContext=__esm({\"../../node_modules/.pnpm/@azure+msal-browser@3.28.0/node_modules/@azure/msal-browser/dist/operatingcontext/BaseOperatingContext.mjs\"(){init_globals(),init_index_browser(),init_Configuration(),init_packageMetadata2(),init_BrowserConstants(),BaseOperatingContext=class e{static loggerCallback(e,t){switch(e){case LogLevel.Error:return void import_console_browserify.default.error(t);case LogLevel.Info:return void import_console_browserify.default.info(t);case LogLevel.Verbose:return void import_console_browserify.default.debug(t);case LogLevel.Warning:return void import_console_browserify.default.warn(t);default:return void import_console_browserify.default.log(t)}}getConfig(){return this.config}getLogger(){return this.logger}isAvailable(){return this.available}isBrowserEnvironment(){return this.browserEnvironment}constructor(t){var r;let n;this.browserEnvironment=\"undefined\"!=typeof window,this.config=buildConfiguration(t,this.browserEnvironment);try{n=window[BrowserCacheLocation.SessionStorage]}catch(u){}const i=null==n?void 0:n.getItem(LOG_LEVEL_CACHE_KEY),o=null==(r=null==n?void 0:n.getItem(LOG_PII_CACHE_KEY))?void 0:r.toLowerCase(),a=\"true\"===o||\"false\"!==o&&void 0,s={...this.config.system.loggerOptions},l=i&&Object.keys(LogLevel).includes(i)?LogLevel[i]:void 0;l&&(s.loggerCallback=e.loggerCallback,s.logLevel=l),void 0!==a&&(s.piiLoggingEnabled=a),this.logger=new Logger(s,name2,version4),this.available=!1}}}}),BridgeStatusCode,init_BridgeStatusCode=__esm({\"../../node_modules/.pnpm/@azure+msal-browser@3.28.0/node_modules/@azure/msal-browser/dist/naa/BridgeStatusCode.mjs\"(){init_globals(),BridgeStatusCode={UserInteractionRequired:\"USER_INTERACTION_REQUIRED\",UserCancel:\"USER_CANCEL\",NoNetwork:\"NO_NETWORK\",TransientError:\"TRANSIENT_ERROR\",PersistentError:\"PERSISTENT_ERROR\",Disabled:\"DISABLED\",AccountUnavailable:\"ACCOUNT_UNAVAILABLE\",NestedAppAuthUnavailable:\"NESTED_APP_AUTH_UNAVAILABLE\"}}}),BridgeProxy,init_BridgeProxy=__esm({\"../../node_modules/.pnpm/@azure+msal-browser@3.28.0/node_modules/@azure/msal-browser/dist/naa/BridgeProxy.mjs\"(){init_globals(),init_BridgeStatusCode(),init_BrowserCrypto(),init_BrowserConstants(),init_packageMetadata2(),(BridgeProxy=class e{static async initializeNestedAppAuthBridge(){if(void 0===window)throw new Error(\"window is undefined\");if(void 0===window.nestedAppAuthBridge)throw new Error(\"window.nestedAppAuthBridge is undefined\");try{window.nestedAppAuthBridge.addEventListener(\"message\",(t=>{const r=\"string\"==typeof t?t:t.data,n=JSON.parse(r),i=e.bridgeRequests.find((e=>e.requestId===n.requestId));void 0!==i&&(e.bridgeRequests.splice(e.bridgeRequests.indexOf(i),1),n.success?i.resolve(n):i.reject(n.error))}));const t=await new Promise(((t,r)=>{const n=e.buildRequest(\"GetInitContext\"),i={requestId:n.requestId,method:n.method,resolve:t,reject:r};e.bridgeRequests.push(i),window.nestedAppAuthBridge.postMessage(JSON.stringify(n))}));return e.validateBridgeResultOrThrow(t.initContext)}catch(t){throw window.console.log(t),t}}getTokenInteractive(e){return this.getToken(\"GetTokenPopup\",e)}getTokenSilent(e){return this.getToken(\"GetToken\",e)}async getToken(t,r){const n=await this.sendRequest(t,{tokenParams:r});return{token:e.validateBridgeResultOrThrow(n.token),account:e.validateBridgeResultOrThrow(n.account)}}getHostCapabilities(){var e;return null!=(e=this.capabilities)?e:null}getAccountContext(){return this.accountContext?this.accountContext:null}static buildRequest(e,t){return{messageType:\"NestedAppAuthRequest\",method:e,requestId:createNewGuid(),sendTime:Date.now(),clientLibrary:BrowserConstants.MSAL_SKU,clientLibraryVersion:version4,...t}}sendRequest(t,r){const n=e.buildRequest(t,r);return new Promise(((t,r)=>{const i={requestId:n.requestId,method:n.method,resolve:t,reject:r};e.bridgeRequests.push(i),window.nestedAppAuthBridge.postMessage(JSON.stringify(n))}))}static validateBridgeResultOrThrow(e){if(void 0===e)throw{status:BridgeStatusCode.NestedAppAuthUnavailable};return e}static async create(){const t=await e.initializeNestedAppAuthBridge();return new e(t.sdkName,t.sdkVersion,t.accountContext,t.capabilities)}constructor(e,t,r,n){this.sdkName=e,this.sdkVersion=t,this.accountContext=r,this.capabilities=n}}).bridgeRequests=[]}}),NestedAppOperatingContext,init_NestedAppOperatingContext=__esm({\"../../node_modules/.pnpm/@azure+msal-browser@3.28.0/node_modules/@azure/msal-browser/dist/operatingcontext/NestedAppOperatingContext.mjs\"(){init_globals(),init_BaseOperatingContext(),init_BridgeProxy(),NestedAppOperatingContext=class e extends BaseOperatingContext{getModuleName(){return e.MODULE_NAME}getId(){return e.ID}getBridgeProxy(){return this.bridgeProxy}async initialize(){try{if(\"undefined\"!=typeof window){\"function\"==typeof window.__initializeNestedAppAuth&&await window.__initializeNestedAppAuth();const e=await BridgeProxy.create();this.accountContext=e.getAccountContext(),this.bridgeProxy=e,this.available=void 0!==e}}catch(e){this.logger.infoPii(`Could not initialize Nested App Auth bridge (${e})`)}return this.logger.info(`Nested App Auth Bridge available: ${this.available}`),this.available}constructor(){super(...arguments),this.bridgeProxy=void 0,this.accountContext=null}},NestedAppOperatingContext.MODULE_NAME=\"\",NestedAppOperatingContext.ID=\"NestedAppOperatingContext\"}}),StandardOperatingContext,init_StandardOperatingContext=__esm({\"../../node_modules/.pnpm/@azure+msal-browser@3.28.0/node_modules/@azure/msal-browser/dist/operatingcontext/StandardOperatingContext.mjs\"(){init_globals(),init_BaseOperatingContext(),(StandardOperatingContext=class e extends BaseOperatingContext{getModuleName(){return e.MODULE_NAME}getId(){return e.ID}async initialize(){return this.available=\"undefined\"!=typeof window,this.available}}).MODULE_NAME=\"\",StandardOperatingContext.ID=\"StandardOperatingContext\"}});function base64Decode(e){return(new TextDecoder).decode(base64DecToArr(e))}function base64DecToArr(e){let t=e.replace(/-/g,\"+\").replace(/_/g,\"/\");switch(t.length%4){case 0:break;case 2:t+=\"==\";break;case 3:t+=\"=\";break;default:throw createBrowserAuthError(invalidBase64String)}const r=atob(t);return Uint8Array.from(r,(e=>e.codePointAt(0)||0))}var init_Base64Decode=__esm({\"../../node_modules/.pnpm/@azure+msal-browser@3.28.0/node_modules/@azure/msal-browser/dist/encode/Base64Decode.mjs\"(){init_globals(),init_BrowserAuthError(),init_BrowserAuthErrorCodes()}}),DatabaseStorage,init_DatabaseStorage=__esm({\"../../node_modules/.pnpm/@azure+msal-browser@3.28.0/node_modules/@azure/msal-browser/dist/cache/DatabaseStorage.mjs\"(){init_globals(),init_BrowserAuthError(),init_BrowserConstants(),init_BrowserAuthErrorCodes(),DatabaseStorage=class{async open(){return new Promise(((e,t)=>{const r=window.indexedDB.open(this.dbName,this.version);r.addEventListener(\"upgradeneeded\",(e=>{e.target.result.createObjectStore(this.tableName)})),r.addEventListener(\"success\",(t=>{const r=t;this.db=r.target.result,this.dbOpen=!0,e()})),r.addEventListener(\"error\",(()=>t(createBrowserAuthError(databaseUnavailable))))}))}closeConnection(){const e=this.db;e&&this.dbOpen&&(e.close(),this.dbOpen=!1)}async validateDbIsOpen(){if(!this.dbOpen)return this.open()}async getItem(e){return await this.validateDbIsOpen(),new Promise(((t,r)=>{if(!this.db)return r(createBrowserAuthError(databaseNotOpen));const n=this.db.transaction([this.tableName],\"readonly\").objectStore(this.tableName).get(e);n.addEventListener(\"success\",(e=>{const r=e;this.closeConnection(),t(r.target.result)})),n.addEventListener(\"error\",(e=>{this.closeConnection(),r(e)}))}))}async setItem(e,t){return await this.validateDbIsOpen(),new Promise(((r,n)=>{if(!this.db)return n(createBrowserAuthError(databaseNotOpen));const i=this.db.transaction([this.tableName],\"readwrite\").objectStore(this.tableName).put(t,e);i.addEventListener(\"success\",(()=>{this.closeConnection(),r()})),i.addEventListener(\"error\",(e=>{this.closeConnection(),n(e)}))}))}async removeItem(e){return await this.validateDbIsOpen(),new Promise(((t,r)=>{if(!this.db)return r(createBrowserAuthError(databaseNotOpen));const n=this.db.transaction([this.tableName],\"readwrite\").objectStore(this.tableName).delete(e);n.addEventListener(\"success\",(()=>{this.closeConnection(),t()})),n.addEventListener(\"error\",(e=>{this.closeConnection(),r(e)}))}))}async getKeys(){return await this.validateDbIsOpen(),new Promise(((e,t)=>{if(!this.db)return t(createBrowserAuthError(databaseNotOpen));const r=this.db.transaction([this.tableName],\"readonly\").objectStore(this.tableName).getAllKeys();r.addEventListener(\"success\",(t=>{const r=t;this.closeConnection(),e(r.target.result)})),r.addEventListener(\"error\",(e=>{this.closeConnection(),t(e)}))}))}async containsKey(e){return await this.validateDbIsOpen(),new Promise(((t,r)=>{if(!this.db)return r(createBrowserAuthError(databaseNotOpen));const n=this.db.transaction([this.tableName],\"readonly\").objectStore(this.tableName).count(e);n.addEventListener(\"success\",(e=>{const r=e;this.closeConnection(),t(1===r.target.result)})),n.addEventListener(\"error\",(e=>{this.closeConnection(),r(e)}))}))}async deleteDatabase(){return this.db&&this.dbOpen&&this.closeConnection(),new Promise(((e,t)=>{const r=window.indexedDB.deleteDatabase(DB_NAME),n=setTimeout((()=>t(!1)),200);r.addEventListener(\"success\",(()=>(clearTimeout(n),e(!0)))),r.addEventListener(\"blocked\",(()=>(clearTimeout(n),e(!0)))),r.addEventListener(\"error\",(()=>(clearTimeout(n),t(!1))))}))}constructor(){this.dbName=DB_NAME,this.version=DB_VERSION,this.tableName=DB_TABLE_NAME,this.dbOpen=!1}}}}),MemoryStorage,init_MemoryStorage=__esm({\"../../node_modules/.pnpm/@azure+msal-browser@3.28.0/node_modules/@azure/msal-browser/dist/cache/MemoryStorage.mjs\"(){init_globals(),MemoryStorage=class{getItem(e){return this.cache.get(e)||null}setItem(e,t){this.cache.set(e,t)}removeItem(e){this.cache.delete(e)}getKeys(){const e=[];return this.cache.forEach(((t,r)=>{e.push(r)})),e}containsKey(e){return this.cache.has(e)}clear(){this.cache.clear()}constructor(){this.cache=new Map}}}}),AsyncMemoryStorage,init_AsyncMemoryStorage=__esm({\"../../node_modules/.pnpm/@azure+msal-browser@3.28.0/node_modules/@azure/msal-browser/dist/cache/AsyncMemoryStorage.mjs\"(){init_globals(),init_BrowserAuthError(),init_DatabaseStorage(),init_MemoryStorage(),init_BrowserAuthErrorCodes(),AsyncMemoryStorage=class{handleDatabaseAccessError(e){if(!(e instanceof BrowserAuthError&&e.errorCode===databaseUnavailable))throw e;this.logger.error(\"Could not access persistent storage. This may be caused by browser privacy features which block persistent storage in third-party contexts.\")}async getItem(e){const t=this.inMemoryCache.getItem(e);if(!t)try{return this.logger.verbose(\"Queried item not found in in-memory cache, now querying persistent storage.\"),await this.indexedDBCache.getItem(e)}catch(r){this.handleDatabaseAccessError(r)}return t}async setItem(e,t){this.inMemoryCache.setItem(e,t);try{await this.indexedDBCache.setItem(e,t)}catch(r){this.handleDatabaseAccessError(r)}}async removeItem(e){this.inMemoryCache.removeItem(e);try{await this.indexedDBCache.removeItem(e)}catch(t){this.handleDatabaseAccessError(t)}}async getKeys(){const e=this.inMemoryCache.getKeys();if(0===e.length)try{return this.logger.verbose(\"In-memory cache is empty, now querying persistent storage.\"),await this.indexedDBCache.getKeys()}catch(t){this.handleDatabaseAccessError(t)}return e}async containsKey(e){const t=this.inMemoryCache.containsKey(e);if(!t)try{return this.logger.verbose(\"Key not found in in-memory cache, now querying persistent storage.\"),await this.indexedDBCache.containsKey(e)}catch(r){this.handleDatabaseAccessError(r)}return t}clearInMemory(){this.logger.verbose(\"Deleting in-memory keystore\"),this.inMemoryCache.clear(),this.logger.verbose(\"In-memory keystore deleted\")}async clearPersistent(){try{this.logger.verbose(\"Deleting persistent keystore\");const e=await this.indexedDBCache.deleteDatabase();return e&&this.logger.verbose(\"Persistent keystore deleted\"),e}catch(e){return this.handleDatabaseAccessError(e),!1}}constructor(e){this.inMemoryCache=new MemoryStorage,this.indexedDBCache=new DatabaseStorage,this.logger=e}}}}),CryptoOps;function getSortedObjectString(e){return JSON.stringify(e,Object.keys(e).sort())}var init_CryptoOps=__esm({\"../../node_modules/.pnpm/@azure+msal-browser@3.28.0/node_modules/@azure/msal-browser/dist/crypto/CryptoOps.mjs\"(){init_globals(),init_index_browser(),init_Base64Encode(),init_Base64Decode(),init_BrowserCrypto(),init_BrowserAuthError(),init_AsyncMemoryStorage(),init_BrowserAuthErrorCodes(),(CryptoOps=class e{createNewGuid(){return createNewGuid()}base64Encode(e){return base64Encode(e)}base64Decode(e){return base64Decode(e)}base64UrlEncode(e){return urlEncode(e)}encodeKid(e){return this.base64UrlEncode(JSON.stringify({kid:e}))}async getPublicKeyThumbprint(t){var r;const n=null==(r=this.performanceClient)?void 0:r.startMeasurement(PerformanceEvents.CryptoOptsGetPublicKeyThumbprint,t.correlationId),i=await generateKeyPair(e.EXTRACTABLE,e.POP_KEY_USAGES),o=await exportJwk(i.publicKey),a=getSortedObjectString({e:o.e,kty:o.kty,n:o.n}),s=await this.hashString(a),l=await exportJwk(i.privateKey),u=await importJwk(l,!1,[\"sign\"]);return await this.cache.setItem(s,{privateKey:u,publicKey:i.publicKey,requestMethod:t.resourceRequestMethod,requestUri:t.resourceRequestUri}),n&&n.end({success:!0}),s}async removeTokenBindingKey(e){return await this.cache.removeItem(e),!(await this.cache.containsKey(e))}async clearKeystore(){this.cache.clearInMemory();try{return await this.cache.clearPersistent(),!0}catch(e){return e instanceof Error?this.logger.error(`Clearing keystore failed with error: ${e.message}`):this.logger.error(\"Clearing keystore failed with unknown error\"),!1}}async signJwt(e,t,r,n){var i;const o=null==(i=this.performanceClient)?void 0:i.startMeasurement(PerformanceEvents.CryptoOptsSignJwt,n),a=await this.cache.getItem(t);if(!a)throw createBrowserAuthError(cryptoKeyNotFound);const s=await exportJwk(a.publicKey),l=getSortedObjectString(s),u=urlEncode(JSON.stringify({kid:t})),c=urlEncode(JoseHeader.getShrHeaderString({...null==r?void 0:r.header,alg:s.alg,kid:u}));e.cnf={jwk:JSON.parse(l)};const d=`${c}.${urlEncode(JSON.stringify(e))}`,h=(new TextEncoder).encode(d),f=await sign(a.privateKey,h),p=`${d}.${urlEncodeArr(new Uint8Array(f))}`;return o&&o.end({success:!0}),p}async hashString(e){return hashString(e)}constructor(e,t){this.logger=e,validateCryptoAvailable(),this.cache=new AsyncMemoryStorage(this.logger),this.performanceClient=t}}).POP_KEY_USAGES=[\"sign\",\"verify\"],CryptoOps.EXTRACTABLE=!0}}),LocalStorage,init_LocalStorage=__esm({\"../../node_modules/.pnpm/@azure+msal-browser@3.28.0/node_modules/@azure/msal-browser/dist/cache/LocalStorage.mjs\"(){init_globals(),init_BrowserConfigurationAuthError(),init_BrowserConfigurationAuthErrorCodes(),LocalStorage=class{getItem(e){return window.localStorage.getItem(e)}setItem(e,t){window.localStorage.setItem(e,t)}removeItem(e){window.localStorage.removeItem(e)}getKeys(){return Object.keys(window.localStorage)}containsKey(e){return window.localStorage.hasOwnProperty(e)}constructor(){if(!window.localStorage)throw createBrowserConfigurationAuthError(storageNotSupported)}}}}),SessionStorage,init_SessionStorage=__esm({\"../../node_modules/.pnpm/@azure+msal-browser@3.28.0/node_modules/@azure/msal-browser/dist/cache/SessionStorage.mjs\"(){init_globals(),init_BrowserConfigurationAuthError(),init_BrowserConfigurationAuthErrorCodes(),SessionStorage=class{getItem(e){return window.sessionStorage.getItem(e)}setItem(e,t){window.sessionStorage.setItem(e,t)}removeItem(e){window.sessionStorage.removeItem(e)}getKeys(){return Object.keys(window.sessionStorage)}containsKey(e){return window.sessionStorage.hasOwnProperty(e)}constructor(){if(!window.sessionStorage)throw createBrowserConfigurationAuthError(storageNotSupported)}}}});function extractBrowserRequestState(e,t){if(!t)return null;try{return ProtocolUtils.parseRequestState(e,t).libraryState.meta}catch(r){throw createClientAuthError(ClientAuthErrorCodes_exports.invalidState)}}var init_BrowserProtocolUtils=__esm({\"../../node_modules/.pnpm/@azure+msal-browser@3.28.0/node_modules/@azure/msal-browser/dist/utils/BrowserProtocolUtils.mjs\"(){init_globals(),init_index_browser()}}),COOKIE_LIFE_MULTIPLIER,CookieStorage;function getCookieExpirationTime(e){return new Date((new Date).getTime()+e*COOKIE_LIFE_MULTIPLIER).toUTCString()}var init_CookieStorage=__esm({\"../../node_modules/.pnpm/@azure+msal-browser@3.28.0/node_modules/@azure/msal-browser/dist/cache/CookieStorage.mjs\"(){init_globals(),COOKIE_LIFE_MULTIPLIER=864e5,CookieStorage=class{getItem(e){const t=`${encodeURIComponent(e)}`,r=document.cookie.split(\";\");for(let n=0;n__left_angle_mark_r.length;n++){const e=r[n],[i,...o]=decodeURIComponent(e).trim().split(\"=\"),a=o.join(\"=\");if(i===t)return a}return\"\"}setItem(e,t,r,n=!0){let i=`${encodeURIComponent(e)}=${encodeURIComponent(t)};path=/;SameSite=Lax;`;r&&(i+=`expires=${getCookieExpirationTime(r)};`),n&&(i+=\"Secure;\"),document.cookie=i}removeItem(e){this.setItem(e,\"\",-1)}getKeys(){const e=document.cookie.split(\";\"),t=[];return e.forEach((e=>{const r=decodeURIComponent(e).trim().split(\"=\");t.push(r[0])})),t}containsKey(e){return this.getKeys().includes(e)}}}}),BrowserCacheManager,DEFAULT_BROWSER_CACHE_MANAGER,init_BrowserCacheManager=__esm({\"../../node_modules/.pnpm/@azure+msal-browser@3.28.0/node_modules/@azure/msal-browser/dist/cache/BrowserCacheManager.mjs\"(){init_globals(),init_index_browser(),init_BrowserAuthError(),init_BrowserConstants(),init_LocalStorage(),init_SessionStorage(),init_MemoryStorage(),init_BrowserProtocolUtils(),init_Base64Decode(),init_Base64Encode(),init_CookieStorage(),init_BrowserAuthErrorCodes(),BrowserCacheManager=class extends CacheManager{setupBrowserStorage(e){try{switch(e){case BrowserCacheLocation.LocalStorage:return new LocalStorage;case BrowserCacheLocation.SessionStorage:return new SessionStorage;case BrowserCacheLocation.MemoryStorage:}}catch(t){this.logger.error(t)}return this.cacheConfig.cacheLocation=BrowserCacheLocation.MemoryStorage,new MemoryStorage}migrateCacheEntries(){const e=`${Constants.CACHE_PREFIX}.${PersistentCacheKeys.ID_TOKEN}`,t=`${Constants.CACHE_PREFIX}.${PersistentCacheKeys.CLIENT_INFO}`,r=`${Constants.CACHE_PREFIX}.${PersistentCacheKeys.ERROR}`,n=`${Constants.CACHE_PREFIX}.${PersistentCacheKeys.ERROR_DESC}`,i=[this.browserStorage.getItem(e),this.browserStorage.getItem(t),this.browserStorage.getItem(r),this.browserStorage.getItem(n)];[PersistentCacheKeys.ID_TOKEN,PersistentCacheKeys.CLIENT_INFO,PersistentCacheKeys.ERROR,PersistentCacheKeys.ERROR_DESC].forEach(((e,t)=>{const r=i[t];r&&this.setTemporaryCache(e,r,!0)}))}createKeyMaps(){this.logger.trace(\"BrowserCacheManager - createKeyMaps called.\");const e=this.getItem(StaticCacheKeys.ACCOUNT_KEYS),t=this.getItem(`${StaticCacheKeys.TOKEN_KEYS}.${this.clientId}`);e&&t?this.logger.verbose(\"BrowserCacheManager:createKeyMaps - account and token key maps already exist, skipping migration.\"):this.browserStorage.getKeys().forEach((e=>{if(this.isCredentialKey(e)){const t=this.getItem(e);if(t){const r=this.validateAndParseJson(t);if(r&&r.hasOwnProperty(\"credentialType\"))switch(r.credentialType){case CredentialType.ID_TOKEN:if(CacheHelpers_exports.isIdTokenEntity(r)){this.logger.trace(\"BrowserCacheManager:createKeyMaps - idToken found, saving key to token key map\"),this.logger.tracePii(`BrowserCacheManager:createKeyMaps - idToken with key: ${e} found, saving key to token key map`);const t=r,n=this.updateCredentialCacheKey(e,t);return void this.addTokenKey(n,CredentialType.ID_TOKEN)}this.logger.trace(\"BrowserCacheManager:createKeyMaps - key found matching idToken schema with value containing idToken credentialType field but value failed IdTokenEntity validation, skipping.\"),this.logger.tracePii(`BrowserCacheManager:createKeyMaps - failed idToken validation on key: ${e}`);break;case CredentialType.ACCESS_TOKEN:case CredentialType.ACCESS_TOKEN_WITH_AUTH_SCHEME:if(CacheHelpers_exports.isAccessTokenEntity(r)){this.logger.trace(\"BrowserCacheManager:createKeyMaps - accessToken found, saving key to token key map\"),this.logger.tracePii(`BrowserCacheManager:createKeyMaps - accessToken with key: ${e} found, saving key to token key map`);const t=r,n=this.updateCredentialCacheKey(e,t);return void this.addTokenKey(n,CredentialType.ACCESS_TOKEN)}this.logger.trace(\"BrowserCacheManager:createKeyMaps - key found matching accessToken schema with value containing accessToken credentialType field but value failed AccessTokenEntity validation, skipping.\"),this.logger.tracePii(`BrowserCacheManager:createKeyMaps - failed accessToken validation on key: ${e}`);break;case CredentialType.REFRESH_TOKEN:if(CacheHelpers_exports.isRefreshTokenEntity(r)){this.logger.trace(\"BrowserCacheManager:createKeyMaps - refreshToken found, saving key to token key map\"),this.logger.tracePii(`BrowserCacheManager:createKeyMaps - refreshToken with key: ${e} found, saving key to token key map`);const t=r,n=this.updateCredentialCacheKey(e,t);return void this.addTokenKey(n,CredentialType.REFRESH_TOKEN)}this.logger.trace(\"BrowserCacheManager:createKeyMaps - key found matching refreshToken schema with value containing refreshToken credentialType field but value failed RefreshTokenEntity validation, skipping.\"),this.logger.tracePii(`BrowserCacheManager:createKeyMaps - failed refreshToken validation on key: ${e}`)}}}if(this.isAccountKey(e)){const t=this.getItem(e);if(t){const r=this.validateAndParseJson(t);r&&AccountEntity.isAccountEntity(r)&&(this.logger.trace(\"BrowserCacheManager:createKeyMaps - account found, saving key to account key map\"),this.logger.tracePii(`BrowserCacheManager:createKeyMaps - account with key: ${e} found, saving key to account key map`),this.addAccountKeyToMap(e))}}}))}validateAndParseJson(e){try{const t=JSON.parse(e);return t&&\"object\"==typeof t?t:null}catch(t){return null}}getItem(e){return this.browserStorage.getItem(e)}setItem(e,t){this.browserStorage.setItem(e,t)}getAccount(e,t){this.logger.trace(\"BrowserCacheManager.getAccount called\");const r=this.getCachedAccountEntity(e);return this.updateOutdatedCachedAccount(e,r,t)}getCachedAccountEntity(e){const t=this.getItem(e);if(!t)return this.removeAccountKeyFromMap(e),null;const r=this.validateAndParseJson(t);return r&&AccountEntity.isAccountEntity(r)?CacheManager.toObject(new AccountEntity,r):(this.removeAccountKeyFromMap(e),null)}setAccount(e){this.logger.trace(\"BrowserCacheManager.setAccount called\");const t=e.generateAccountKey();this.setItem(t,JSON.stringify(e)),this.addAccountKeyToMap(t)}getAccountKeys(){this.logger.trace(\"BrowserCacheManager.getAccountKeys called\");const e=this.getItem(StaticCacheKeys.ACCOUNT_KEYS);return e?JSON.parse(e):(this.logger.verbose(\"BrowserCacheManager.getAccountKeys - No account keys found\"),[])}addAccountKeyToMap(e){this.logger.trace(\"BrowserCacheManager.addAccountKeyToMap called\"),this.logger.tracePii(`BrowserCacheManager.addAccountKeyToMap called with key: ${e}`);const t=this.getAccountKeys();-1===t.indexOf(e)?(t.push(e),this.setItem(StaticCacheKeys.ACCOUNT_KEYS,JSON.stringify(t)),this.logger.verbose(\"BrowserCacheManager.addAccountKeyToMap account key added\")):this.logger.verbose(\"BrowserCacheManager.addAccountKeyToMap account key already exists in map\")}removeAccountKeyFromMap(e){this.logger.trace(\"BrowserCacheManager.removeAccountKeyFromMap called\"),this.logger.tracePii(`BrowserCacheManager.removeAccountKeyFromMap called with key: ${e}`);const t=this.getAccountKeys(),r=t.indexOf(e);r>-1?(t.splice(r,1),this.setItem(StaticCacheKeys.ACCOUNT_KEYS,JSON.stringify(t)),this.logger.trace(\"BrowserCacheManager.removeAccountKeyFromMap account key removed\")):this.logger.trace(\"BrowserCacheManager.removeAccountKeyFromMap key not found in existing map\")}async removeAccount(e){super.removeAccount(e),this.removeAccountKeyFromMap(e)}removeOutdatedAccount(e){this.removeItem(e),this.removeAccountKeyFromMap(e)}removeIdToken(e){super.removeIdToken(e),this.removeTokenKey(e,CredentialType.ID_TOKEN)}async removeAccessToken(e){super.removeAccessToken(e),this.removeTokenKey(e,CredentialType.ACCESS_TOKEN)}removeRefreshToken(e){super.removeRefreshToken(e),this.removeTokenKey(e,CredentialType.REFRESH_TOKEN)}getTokenKeys(){this.logger.trace(\"BrowserCacheManager.getTokenKeys called\");const e=this.getItem(`${StaticCacheKeys.TOKEN_KEYS}.${this.clientId}`);if(e){const t=this.validateAndParseJson(e);if(t&&t.hasOwnProperty(\"idToken\")&&t.hasOwnProperty(\"accessToken\")&&t.hasOwnProperty(\"refreshToken\"))return t;this.logger.error(\"BrowserCacheManager.getTokenKeys - Token keys found but in an unknown format. Returning empty key map.\")}else this.logger.verbose(\"BrowserCacheManager.getTokenKeys - No token keys found\");return{idToken:[],accessToken:[],refreshToken:[]}}addTokenKey(e,t){this.logger.trace(\"BrowserCacheManager addTokenKey called\");const r=this.getTokenKeys();switch(t){case CredentialType.ID_TOKEN:-1===r.idToken.indexOf(e)&&(this.logger.info(\"BrowserCacheManager: addTokenKey - idToken added to map\"),r.idToken.push(e));break;case CredentialType.ACCESS_TOKEN:-1===r.accessToken.indexOf(e)&&(this.logger.info(\"BrowserCacheManager: addTokenKey - accessToken added to map\"),r.accessToken.push(e));break;case CredentialType.REFRESH_TOKEN:-1===r.refreshToken.indexOf(e)&&(this.logger.info(\"BrowserCacheManager: addTokenKey - refreshToken added to map\"),r.refreshToken.push(e));break;default:throw this.logger.error(`BrowserCacheManager:addTokenKey - CredentialType provided invalid. CredentialType: ${t}`),createClientAuthError(ClientAuthErrorCodes_exports.unexpectedCredentialType)}this.setItem(`${StaticCacheKeys.TOKEN_KEYS}.${this.clientId}`,JSON.stringify(r))}removeTokenKey(e,t){this.logger.trace(\"BrowserCacheManager removeTokenKey called\");const r=this.getTokenKeys();switch(t){case CredentialType.ID_TOKEN:this.logger.infoPii(`BrowserCacheManager: removeTokenKey - attempting to remove idToken with key: ${e} from map`);const n=r.idToken.indexOf(e);n>-1?(this.logger.info(\"BrowserCacheManager: removeTokenKey - idToken removed from map\"),r.idToken.splice(n,1)):this.logger.info(\"BrowserCacheManager: removeTokenKey - idToken does not exist in map. Either it was previously removed or it was never added.\");break;case CredentialType.ACCESS_TOKEN:this.logger.infoPii(`BrowserCacheManager: removeTokenKey - attempting to remove accessToken with key: ${e} from map`);const i=r.accessToken.indexOf(e);i>-1?(this.logger.info(\"BrowserCacheManager: removeTokenKey - accessToken removed from map\"),r.accessToken.splice(i,1)):this.logger.info(\"BrowserCacheManager: removeTokenKey - accessToken does not exist in map. Either it was previously removed or it was never added.\");break;case CredentialType.REFRESH_TOKEN:this.logger.infoPii(`BrowserCacheManager: removeTokenKey - attempting to remove refreshToken with key: ${e} from map`);const o=r.refreshToken.indexOf(e);o>-1?(this.logger.info(\"BrowserCacheManager: removeTokenKey - refreshToken removed from map\"),r.refreshToken.splice(o,1)):this.logger.info(\"BrowserCacheManager: removeTokenKey - refreshToken does not exist in map. Either it was previously removed or it was never added.\");break;default:throw this.logger.error(`BrowserCacheManager:removeTokenKey - CredentialType provided invalid. CredentialType: ${t}`),createClientAuthError(ClientAuthErrorCodes_exports.unexpectedCredentialType)}this.setItem(`${StaticCacheKeys.TOKEN_KEYS}.${this.clientId}`,JSON.stringify(r))}getIdTokenCredential(e){const t=this.getItem(e);if(!t)return this.logger.trace(\"BrowserCacheManager.getIdTokenCredential: called, no cache hit\"),this.removeTokenKey(e,CredentialType.ID_TOKEN),null;const r=this.validateAndParseJson(t);return r&&CacheHelpers_exports.isIdTokenEntity(r)?(this.logger.trace(\"BrowserCacheManager.getIdTokenCredential: cache hit\"),r):(this.logger.trace(\"BrowserCacheManager.getIdTokenCredential: called, no cache hit\"),this.removeTokenKey(e,CredentialType.ID_TOKEN),null)}setIdTokenCredential(e){this.logger.trace(\"BrowserCacheManager.setIdTokenCredential called\");const t=CacheHelpers_exports.generateCredentialKey(e);this.setItem(t,JSON.stringify(e)),this.addTokenKey(t,CredentialType.ID_TOKEN)}getAccessTokenCredential(e){const t=this.getItem(e);if(!t)return this.logger.trace(\"BrowserCacheManager.getAccessTokenCredential: called, no cache hit\"),this.removeTokenKey(e,CredentialType.ACCESS_TOKEN),null;const r=this.validateAndParseJson(t);return r&&CacheHelpers_exports.isAccessTokenEntity(r)?(this.logger.trace(\"BrowserCacheManager.getAccessTokenCredential: cache hit\"),r):(this.logger.trace(\"BrowserCacheManager.getAccessTokenCredential: called, no cache hit\"),this.removeTokenKey(e,CredentialType.ACCESS_TOKEN),null)}setAccessTokenCredential(e){this.logger.trace(\"BrowserCacheManager.setAccessTokenCredential called\");const t=CacheHelpers_exports.generateCredentialKey(e);this.setItem(t,JSON.stringify(e)),this.addTokenKey(t,CredentialType.ACCESS_TOKEN)}getRefreshTokenCredential(e){const t=this.getItem(e);if(!t)return this.logger.trace(\"BrowserCacheManager.getRefreshTokenCredential: called, no cache hit\"),this.removeTokenKey(e,CredentialType.REFRESH_TOKEN),null;const r=this.validateAndParseJson(t);return r&&CacheHelpers_exports.isRefreshTokenEntity(r)?(this.logger.trace(\"BrowserCacheManager.getRefreshTokenCredential: cache hit\"),r):(this.logger.trace(\"BrowserCacheManager.getRefreshTokenCredential: called, no cache hit\"),this.removeTokenKey(e,CredentialType.REFRESH_TOKEN),null)}setRefreshTokenCredential(e){this.logger.trace(\"BrowserCacheManager.setRefreshTokenCredential called\");const t=CacheHelpers_exports.generateCredentialKey(e);this.setItem(t,JSON.stringify(e)),this.addTokenKey(t,CredentialType.REFRESH_TOKEN)}getAppMetadata(e){const t=this.getItem(e);if(!t)return this.logger.trace(\"BrowserCacheManager.getAppMetadata: called, no cache hit\"),null;const r=this.validateAndParseJson(t);return r&&CacheHelpers_exports.isAppMetadataEntity(e,r)?(this.logger.trace(\"BrowserCacheManager.getAppMetadata: cache hit\"),r):(this.logger.trace(\"BrowserCacheManager.getAppMetadata: called, no cache hit\"),null)}setAppMetadata(e){this.logger.trace(\"BrowserCacheManager.setAppMetadata called\");const t=CacheHelpers_exports.generateAppMetadataKey(e);this.setItem(t,JSON.stringify(e))}getServerTelemetry(e){const t=this.getItem(e);if(!t)return this.logger.trace(\"BrowserCacheManager.getServerTelemetry: called, no cache hit\"),null;const r=this.validateAndParseJson(t);return r&&CacheHelpers_exports.isServerTelemetryEntity(e,r)?(this.logger.trace(\"BrowserCacheManager.getServerTelemetry: cache hit\"),r):(this.logger.trace(\"BrowserCacheManager.getServerTelemetry: called, no cache hit\"),null)}setServerTelemetry(e,t){this.logger.trace(\"BrowserCacheManager.setServerTelemetry called\"),this.setItem(e,JSON.stringify(t))}getAuthorityMetadata(e){const t=this.internalStorage.getItem(e);if(!t)return this.logger.trace(\"BrowserCacheManager.getAuthorityMetadata: called, no cache hit\"),null;const r=this.validateAndParseJson(t);return r&&CacheHelpers_exports.isAuthorityMetadataEntity(e,r)?(this.logger.trace(\"BrowserCacheManager.getAuthorityMetadata: cache hit\"),r):null}getAuthorityMetadataKeys(){return this.internalStorage.getKeys().filter((e=>this.isAuthorityMetadata(e)))}setWrapperMetadata(e,t){this.internalStorage.setItem(InMemoryCacheKeys.WRAPPER_SKU,e),this.internalStorage.setItem(InMemoryCacheKeys.WRAPPER_VER,t)}getWrapperMetadata(){return[this.internalStorage.getItem(InMemoryCacheKeys.WRAPPER_SKU)||Constants.EMPTY_STRING,this.internalStorage.getItem(InMemoryCacheKeys.WRAPPER_VER)||Constants.EMPTY_STRING]}setAuthorityMetadata(e,t){this.logger.trace(\"BrowserCacheManager.setAuthorityMetadata called\"),this.internalStorage.setItem(e,JSON.stringify(t))}getActiveAccount(){const e=this.generateCacheKey(PersistentCacheKeys.ACTIVE_ACCOUNT_FILTERS),t=this.getItem(e);if(!t){this.logger.trace(\"BrowserCacheManager.getActiveAccount: No active account filters cache schema found, looking for legacy schema\");const e=this.generateCacheKey(PersistentCacheKeys.ACTIVE_ACCOUNT),t=this.getItem(e);if(!t)return this.logger.trace(\"BrowserCacheManager.getActiveAccount: No active account found\"),null;const r=this.getAccountInfoFilteredBy({localAccountId:t});return r?(this.logger.trace(\"BrowserCacheManager.getActiveAccount: Legacy active account cache schema found\"),this.logger.trace(\"BrowserCacheManager.getActiveAccount: Adding active account filters cache schema\"),this.setActiveAccount(r),r):null}const r=this.validateAndParseJson(t);return r?(this.logger.trace(\"BrowserCacheManager.getActiveAccount: Active account filters schema found\"),this.getAccountInfoFilteredBy({homeAccountId:r.homeAccountId,localAccountId:r.localAccountId,tenantId:r.tenantId})):(this.logger.trace(\"BrowserCacheManager.getActiveAccount: No active account found\"),null)}setActiveAccount(e){const t=this.generateCacheKey(PersistentCacheKeys.ACTIVE_ACCOUNT_FILTERS),r=this.generateCacheKey(PersistentCacheKeys.ACTIVE_ACCOUNT);if(e){this.logger.verbose(\"setActiveAccount: Active account set\");const n={homeAccountId:e.homeAccountId,localAccountId:e.localAccountId,tenantId:e.tenantId};this.browserStorage.setItem(t,JSON.stringify(n)),this.browserStorage.setItem(r,e.localAccountId)}else this.logger.verbose(\"setActiveAccount: No account passed, active account not set\"),this.browserStorage.removeItem(t),this.browserStorage.removeItem(r)}getThrottlingCache(e){const t=this.getItem(e);if(!t)return this.logger.trace(\"BrowserCacheManager.getThrottlingCache: called, no cache hit\"),null;const r=this.validateAndParseJson(t);return r&&CacheHelpers_exports.isThrottlingEntity(e,r)?(this.logger.trace(\"BrowserCacheManager.getThrottlingCache: cache hit\"),r):(this.logger.trace(\"BrowserCacheManager.getThrottlingCache: called, no cache hit\"),null)}setThrottlingCache(e,t){this.logger.trace(\"BrowserCacheManager.setThrottlingCache called\"),this.setItem(e,JSON.stringify(t))}getTemporaryCache(e,t){const r=t?this.generateCacheKey(e):e;if(this.cacheConfig.storeAuthStateInCookie){const e=this.cookieStorage.getItem(r);if(e)return this.logger.trace(\"BrowserCacheManager.getTemporaryCache: storeAuthStateInCookies set to true, retrieving from cookies\"),e}const n=this.temporaryCacheStorage.getItem(r);if(!n){if(this.cacheConfig.cacheLocation===BrowserCacheLocation.LocalStorage){const e=this.browserStorage.getItem(r);if(e)return this.logger.trace(\"BrowserCacheManager.getTemporaryCache: Temporary cache item found in local storage\"),e}return this.logger.trace(\"BrowserCacheManager.getTemporaryCache: No cache item found in local storage\"),null}return this.logger.trace(\"BrowserCacheManager.getTemporaryCache: Temporary cache item returned\"),n}setTemporaryCache(e,t,r){const n=r?this.generateCacheKey(e):e;this.temporaryCacheStorage.setItem(n,t),this.cacheConfig.storeAuthStateInCookie&&(this.logger.trace(\"BrowserCacheManager.setTemporaryCache: storeAuthStateInCookie set to true, setting item cookie\"),this.cookieStorage.setItem(n,t,void 0,this.cacheConfig.secureCookies))}removeItem(e){this.browserStorage.removeItem(e)}removeTemporaryItem(e){this.temporaryCacheStorage.removeItem(e),this.cacheConfig.storeAuthStateInCookie&&(this.logger.trace(\"BrowserCacheManager.removeItem: storeAuthStateInCookie is true, clearing item cookie\"),this.cookieStorage.removeItem(e))}getKeys(){return this.browserStorage.getKeys()}async clear(){await this.removeAllAccounts(),this.removeAppMetadata(),this.temporaryCacheStorage.getKeys().forEach((e=>{-1===e.indexOf(Constants.CACHE_PREFIX)&&-1===e.indexOf(this.clientId)||this.removeTemporaryItem(e)})),this.browserStorage.getKeys().forEach((e=>{-1===e.indexOf(Constants.CACHE_PREFIX)&&-1===e.indexOf(this.clientId)||this.browserStorage.removeItem(e)})),this.internalStorage.clear()}async clearTokensAndKeysWithClaims(e,t){e.addQueueMeasurement(PerformanceEvents.ClearTokensAndKeysWithClaims,t);const r=this.getTokenKeys(),n=[];r.accessToken.forEach((e=>{const t=this.getAccessTokenCredential(e);(null==t?void 0:t.requestedClaimsHash)&&e.includes(t.requestedClaimsHash.toLowerCase())&&n.push(this.removeAccessToken(e))})),await Promise.all(n),n.length>0&&this.logger.warning(`${n.length} access tokens with claims in the cache keys have been removed from the cache.`)}generateCacheKey(e){return this.validateAndParseJson(e)?JSON.stringify(e):StringUtils.startsWith(e,Constants.CACHE_PREFIX)||StringUtils.startsWith(e,PersistentCacheKeys.ADAL_ID_TOKEN)?e:`${Constants.CACHE_PREFIX}.${this.clientId}.${e}`}generateAuthorityKey(e){const{libraryState:{id:t}}=ProtocolUtils.parseRequestState(this.cryptoImpl,e);return this.generateCacheKey(`${TemporaryCacheKeys.AUTHORITY}.${t}`)}generateNonceKey(e){const{libraryState:{id:t}}=ProtocolUtils.parseRequestState(this.cryptoImpl,e);return this.generateCacheKey(`${TemporaryCacheKeys.NONCE_IDTOKEN}.${t}`)}generateStateKey(e){const{libraryState:{id:t}}=ProtocolUtils.parseRequestState(this.cryptoImpl,e);return this.generateCacheKey(`${TemporaryCacheKeys.REQUEST_STATE}.${t}`)}getCachedAuthority(e){const t=this.generateStateKey(e),r=this.getTemporaryCache(t);if(!r)return null;const n=this.generateAuthorityKey(r);return this.getTemporaryCache(n)}updateCacheEntries(e,t,r,n,i){this.logger.trace(\"BrowserCacheManager.updateCacheEntries called\");const o=this.generateStateKey(e);this.setTemporaryCache(o,e,!1);const a=this.generateNonceKey(e);this.setTemporaryCache(a,t,!1);const s=this.generateAuthorityKey(e);if(this.setTemporaryCache(s,r,!1),i){const e={credential:i.homeAccountId,type:CcsCredentialType.HOME_ACCOUNT_ID};this.setTemporaryCache(TemporaryCacheKeys.CCS_CREDENTIAL,JSON.stringify(e),!0)}else if(n){const e={credential:n,type:CcsCredentialType.UPN};this.setTemporaryCache(TemporaryCacheKeys.CCS_CREDENTIAL,JSON.stringify(e),!0)}}resetRequestCache(e){this.logger.trace(\"BrowserCacheManager.resetRequestCache called\"),e&&(this.temporaryCacheStorage.getKeys().forEach((t=>{-1!==t.indexOf(e)&&this.removeTemporaryItem(t)})),this.removeTemporaryItem(this.generateStateKey(e)),this.removeTemporaryItem(this.generateNonceKey(e)),this.removeTemporaryItem(this.generateAuthorityKey(e))),this.removeTemporaryItem(this.generateCacheKey(TemporaryCacheKeys.REQUEST_PARAMS)),this.removeTemporaryItem(this.generateCacheKey(TemporaryCacheKeys.ORIGIN_URI)),this.removeTemporaryItem(this.generateCacheKey(TemporaryCacheKeys.URL_HASH)),this.removeTemporaryItem(this.generateCacheKey(TemporaryCacheKeys.CORRELATION_ID)),this.removeTemporaryItem(this.generateCacheKey(TemporaryCacheKeys.CCS_CREDENTIAL)),this.removeTemporaryItem(this.generateCacheKey(TemporaryCacheKeys.NATIVE_REQUEST)),this.setInteractionInProgress(!1)}cleanRequestByState(e){if(this.logger.trace(\"BrowserCacheManager.cleanRequestByState called\"),e){const t=this.generateStateKey(e),r=this.temporaryCacheStorage.getItem(t);this.logger.infoPii(`BrowserCacheManager.cleanRequestByState: Removing temporary cache items for state: ${r}`),this.resetRequestCache(r||Constants.EMPTY_STRING)}}cleanRequestByInteractionType(e){this.logger.trace(\"BrowserCacheManager.cleanRequestByInteractionType called\"),this.temporaryCacheStorage.getKeys().forEach((t=>{if(-1===t.indexOf(TemporaryCacheKeys.REQUEST_STATE))return;const r=this.temporaryCacheStorage.getItem(t);if(!r)return;const n=extractBrowserRequestState(this.cryptoImpl,r);n&&n.interactionType===e&&(this.logger.infoPii(`BrowserCacheManager.cleanRequestByInteractionType: Removing temporary cache items for state: ${r}`),this.resetRequestCache(r))})),this.setInteractionInProgress(!1)}cacheCodeRequest(e){this.logger.trace(\"BrowserCacheManager.cacheCodeRequest called\");const t=base64Encode(JSON.stringify(e));this.setTemporaryCache(TemporaryCacheKeys.REQUEST_PARAMS,t,!0)}getCachedRequest(e){this.logger.trace(\"BrowserCacheManager.getCachedRequest called\");const t=this.getTemporaryCache(TemporaryCacheKeys.REQUEST_PARAMS,!0);if(!t)throw createBrowserAuthError(noTokenRequestCacheError);let r;try{r=JSON.parse(base64Decode(t))}catch(n){throw this.logger.errorPii(`Attempted to parse: ${t}`),this.logger.error(`Parsing cached token request threw with error: ${n}`),createBrowserAuthError(unableToParseTokenRequestCacheError)}if(this.removeTemporaryItem(this.generateCacheKey(TemporaryCacheKeys.REQUEST_PARAMS)),!r.authority){const t=this.generateAuthorityKey(e),n=this.getTemporaryCache(t);if(!n)throw createBrowserAuthError(noCachedAuthorityError);r.authority=n}return r}getCachedNativeRequest(){this.logger.trace(\"BrowserCacheManager.getCachedNativeRequest called\");const e=this.getTemporaryCache(TemporaryCacheKeys.NATIVE_REQUEST,!0);if(!e)return this.logger.trace(\"BrowserCacheManager.getCachedNativeRequest: No cached native request found\"),null;const t=this.validateAndParseJson(e);return t||(this.logger.error(\"BrowserCacheManager.getCachedNativeRequest: Unable to parse native request\"),null)}isInteractionInProgress(e){const t=this.getInteractionInProgress();return e?t===this.clientId:!!t}getInteractionInProgress(){const e=`${Constants.CACHE_PREFIX}.${TemporaryCacheKeys.INTERACTION_STATUS_KEY}`;return this.getTemporaryCache(e,!1)}setInteractionInProgress(e){const t=`${Constants.CACHE_PREFIX}.${TemporaryCacheKeys.INTERACTION_STATUS_KEY}`;if(e){if(this.getInteractionInProgress())throw createBrowserAuthError(interactionInProgress);this.setTemporaryCache(t,this.clientId,!1)}else e||this.getInteractionInProgress()!==this.clientId||this.removeTemporaryItem(t)}getLegacyLoginHint(){const e=this.getTemporaryCache(PersistentCacheKeys.ADAL_ID_TOKEN);e&&(this.browserStorage.removeItem(PersistentCacheKeys.ADAL_ID_TOKEN),this.logger.verbose(\"Cached ADAL id token retrieved.\"));const t=this.getTemporaryCache(PersistentCacheKeys.ID_TOKEN,!0);t&&(this.browserStorage.removeItem(this.generateCacheKey(PersistentCacheKeys.ID_TOKEN)),this.logger.verbose(\"Cached MSAL.js v1 id token retrieved\"));const r=t||e;if(r){const e=AuthToken_exports.extractTokenClaims(r,base64Decode);if(e.preferred_username)return this.logger.verbose(\"No SSO params used and ADAL/MSAL v1 token retrieved, setting ADAL/MSAL v1 preferred_username as loginHint\"),e.preferred_username;if(e.upn)return this.logger.verbose(\"No SSO params used and ADAL/MSAL v1 token retrieved, setting ADAL/MSAL v1 upn as loginHint\"),e.upn;this.logger.verbose(\"No SSO params used and ADAL/MSAL v1 token retrieved, however, no account hint claim found. Enable preferred_username or upn id token claim to get SSO.\")}return null}updateCredentialCacheKey(e,t){const r=CacheHelpers_exports.generateCredentialKey(t);if(e!==r){const n=this.getItem(e);if(n)return this.browserStorage.removeItem(e),this.setItem(r,n),this.logger.verbose(`Updated an outdated ${t.credentialType} cache key`),r;this.logger.error(`Attempted to update an outdated ${t.credentialType} cache key but no item matching the outdated key was found in storage`)}return e}async hydrateCache(e,t){var r,n,i;const o=CacheHelpers_exports.createIdTokenEntity(null==(r=e.account)?void 0:r.homeAccountId,null==(n=e.account)?void 0:n.environment,e.idToken,this.clientId,e.tenantId);let a;t.claims&&(a=await this.cryptoImpl.hashString(t.claims));const s={idToken:o,accessToken:CacheHelpers_exports.createAccessTokenEntity(null==(i=e.account)?void 0:i.homeAccountId,e.account.environment,e.accessToken,this.clientId,e.tenantId,e.scopes.join(\" \"),e.expiresOn?e.expiresOn.getTime()/1e3:0,e.extExpiresOn?e.extExpiresOn.getTime()/1e3:0,base64Decode,void 0,e.tokenType,void 0,t.sshKid,t.claims,a)};return this.saveCacheRecord(s)}async saveCacheRecord(e,t,r){try{await super.saveCacheRecord(e,t,r)}catch(n){if(n instanceof CacheError&&this.performanceClient&&r)try{const e=this.getTokenKeys();this.performanceClient.addFields({cacheRtCount:e.refreshToken.length,cacheIdCount:e.idToken.length,cacheAtCount:e.accessToken.length},r)}catch(i){}throw n}}constructor(e,t,r,n,i,o){super(e,r,n,i),this.cacheConfig=t,this.logger=n,this.internalStorage=new MemoryStorage,this.browserStorage=this.setupBrowserStorage(this.cacheConfig.cacheLocation),this.temporaryCacheStorage=this.setupBrowserStorage(this.cacheConfig.temporaryCacheLocation),this.cookieStorage=new CookieStorage,t.cacheMigrationEnabled&&(this.migrateCacheEntries(),this.createKeyMaps()),this.performanceClient=o}},DEFAULT_BROWSER_CACHE_MANAGER=(e,t)=>{const r={cacheLocation:BrowserCacheLocation.MemoryStorage,temporaryCacheLocation:BrowserCacheLocation.MemoryStorage,storeAuthStateInCookie:!1,secureCookies:!1,cacheMigrationEnabled:!1,claimsBasedCachingEnabled:!1};return new BrowserCacheManager(e,r,DEFAULT_CRYPTO_IMPLEMENTATION,t)}}});function getAllAccounts(e,t,r,n){return e.verbose(\"getAllAccounts called\"),r?t.getAllAccounts(n):[]}function getAccount(e,t,r){if(t.trace(\"getAccount called\"),0===Object.keys(e).length)return t.warning(\"getAccount: No accountFilter provided\"),null;const n=r.getAccountInfoFilteredBy(e);return n?(t.verbose(\"getAccount: Account matching provided filter found, returning\"),n):(t.verbose(\"getAccount: No matching account found, returning null\"),null)}function getAccountByUsername(e,t,r){if(t.trace(\"getAccountByUsername called\"),!e)return t.warning(\"getAccountByUsername: No username provided\"),null;const n=r.getAccountInfoFilteredBy({username:e});return n?(t.verbose(\"getAccountByUsername: Account matching username found, returning\"),t.verbosePii(`getAccountByUsername: Returning signed-in accounts matching username: ${e}`),n):(t.verbose(\"getAccountByUsername: No matching account found, returning null\"),null)}function getAccountByHomeId(e,t,r){if(t.trace(\"getAccountByHomeId called\"),!e)return t.warning(\"getAccountByHomeId: No homeAccountId provided\"),null;const n=r.getAccountInfoFilteredBy({homeAccountId:e});return n?(t.verbose(\"getAccountByHomeId: Account matching homeAccountId found, returning\"),t.verbosePii(`getAccountByHomeId: Returning signed-in accounts matching homeAccountId: ${e}`),n):(t.verbose(\"getAccountByHomeId: No matching account found, returning null\"),null)}function getAccountByLocalId(e,t,r){if(t.trace(\"getAccountByLocalId called\"),!e)return t.warning(\"getAccountByLocalId: No localAccountId provided\"),null;const n=r.getAccountInfoFilteredBy({localAccountId:e});return n?(t.verbose(\"getAccountByLocalId: Account matching localAccountId found, returning\"),t.verbosePii(`getAccountByLocalId: Returning signed-in accounts matching localAccountId: ${e}`),n):(t.verbose(\"getAccountByLocalId: No matching account found, returning null\"),null)}function setActiveAccount(e,t){t.setActiveAccount(e)}function getActiveAccount(e){return e.getActiveAccount()}var init_AccountManager=__esm({\"../../node_modules/.pnpm/@azure+msal-browser@3.28.0/node_modules/@azure/msal-browser/dist/cache/AccountManager.mjs\"(){init_globals()}}),EventType,init_EventType=__esm({\"../../node_modules/.pnpm/@azure+msal-browser@3.28.0/node_modules/@azure/msal-browser/dist/event/EventType.mjs\"(){init_globals(),EventType={INITIALIZE_START:\"msal:initializeStart\",INITIALIZE_END:\"msal:initializeEnd\",ACCOUNT_ADDED:\"msal:accountAdded\",ACCOUNT_REMOVED:\"msal:accountRemoved\",ACTIVE_ACCOUNT_CHANGED:\"msal:activeAccountChanged\",LOGIN_START:\"msal:loginStart\",LOGIN_SUCCESS:\"msal:loginSuccess\",LOGIN_FAILURE:\"msal:loginFailure\",ACQUIRE_TOKEN_START:\"msal:acquireTokenStart\",ACQUIRE_TOKEN_SUCCESS:\"msal:acquireTokenSuccess\",ACQUIRE_TOKEN_FAILURE:\"msal:acquireTokenFailure\",ACQUIRE_TOKEN_NETWORK_START:\"msal:acquireTokenFromNetworkStart\",SSO_SILENT_START:\"msal:ssoSilentStart\",SSO_SILENT_SUCCESS:\"msal:ssoSilentSuccess\",SSO_SILENT_FAILURE:\"msal:ssoSilentFailure\",ACQUIRE_TOKEN_BY_CODE_START:\"msal:acquireTokenByCodeStart\",ACQUIRE_TOKEN_BY_CODE_SUCCESS:\"msal:acquireTokenByCodeSuccess\",ACQUIRE_TOKEN_BY_CODE_FAILURE:\"msal:acquireTokenByCodeFailure\",HANDLE_REDIRECT_START:\"msal:handleRedirectStart\",HANDLE_REDIRECT_END:\"msal:handleRedirectEnd\",POPUP_OPENED:\"msal:popupOpened\",LOGOUT_START:\"msal:logoutStart\",LOGOUT_SUCCESS:\"msal:logoutSuccess\",LOGOUT_FAILURE:\"msal:logoutFailure\",LOGOUT_END:\"msal:logoutEnd\",RESTORE_FROM_BFCACHE:\"msal:restoreFromBFCache\"}}}),EventHandler,init_EventHandler=__esm({\"../../node_modules/.pnpm/@azure+msal-browser@3.28.0/node_modules/@azure/msal-browser/dist/event/EventHandler.mjs\"(){init_globals(),init_index_browser(),init_BrowserUtils(),EventHandler=class{addEventCallback(e,t,r){if(\"undefined\"!=typeof window){const n=r||createGuid();return this.eventCallbacks.has(n)?(this.logger.error(`Event callback with id: ${n} is already registered. Please provide a unique id or remove the existing callback and try again.`),null):(this.eventCallbacks.set(n,[e,t||[]]),this.logger.verbose(`Event callback registered with id: ${n}`),n)}return null}removeEventCallback(e){this.eventCallbacks.delete(e),this.logger.verbose(`Event callback ${e} removed.`)}emitEvent(e,t,r,n){if(\"undefined\"!=typeof window){const i={eventType:e,interactionType:t||null,payload:r||null,error:n||null,timestamp:Date.now()};this.eventCallbacks.forEach((([t,r],n)=>{(0===r.length||r.includes(e))&&(this.logger.verbose(`Emitting event to callback ${n}: ${e}`),t.apply(null,[i]))}))}}constructor(e){this.eventCallbacks=new Map,this.logger=e||new Logger({})}}}}),BaseInteractionClient,init_BaseInteractionClient=__esm({\"../../node_modules/.pnpm/@azure+msal-browser@3.28.0/node_modules/@azure/msal-browser/dist/interaction_client/BaseInteractionClient.mjs\"(){init_globals(),init_index_browser(),init_packageMetadata2(),init_BrowserConstants(),init_BrowserUtils(),init_BrowserCrypto(),BaseInteractionClient=class{async clearCacheOnLogout(e){if(e){AccountEntity.accountInfoIsEqual(e,this.browserStorage.getActiveAccount(),!1)&&(this.logger.verbose(\"Setting active account to null\"),this.browserStorage.setActiveAccount(null));try{await this.browserStorage.removeAccount(AccountEntity.generateAccountCacheKey(e)),this.logger.verbose(\"Cleared cache items belonging to the account provided in the logout request.\")}catch(t){this.logger.error(\"Account provided in logout request was not found. Local cache unchanged.\")}}else try{this.logger.verbose(\"No account provided in logout request, clearing all cache items.\",this.correlationId),await this.browserStorage.clear(),await this.browserCrypto.clearKeystore()}catch(r){this.logger.error(\"Attempted to clear all MSAL cache items and failed. Local cache unchanged.\")}}getRedirectUri(e){this.logger.verbose(\"getRedirectUri called\");const t=e||this.config.auth.redirectUri;return UrlString.getAbsoluteUrl(t,getCurrentUri())}initializeServerTelemetryManager(e,t){this.logger.verbose(\"initializeServerTelemetryManager called\");const r={clientId:this.config.auth.clientId,correlationId:this.correlationId,apiId:e,forceRefresh:t||!1,wrapperSKU:this.browserStorage.getWrapperMetadata()[0],wrapperVer:this.browserStorage.getWrapperMetadata()[1]};return new ServerTelemetryManager(r,this.browserStorage)}async getDiscoveredAuthority(e){const{account:t}=e,r=e.requestExtraQueryParameters&&e.requestExtraQueryParameters.hasOwnProperty(\"instance_aware\")?e.requestExtraQueryParameters.instance_aware:void 0;this.performanceClient.addQueueMeasurement(PerformanceEvents.StandardInteractionClientGetDiscoveredAuthority,this.correlationId);const n={protocolMode:this.config.auth.protocolMode,OIDCOptions:this.config.auth.OIDCOptions,knownAuthorities:this.config.auth.knownAuthorities,cloudDiscoveryMetadata:this.config.auth.cloudDiscoveryMetadata,authorityMetadata:this.config.auth.authorityMetadata,skipAuthorityMetadataCache:this.config.auth.skipAuthorityMetadataCache},i=e.requestAuthority||this.config.auth.authority,o=(null==r?void 0:r.length)?\"true\"===r:this.config.auth.instanceAware,a=t&&o?this.config.auth.authority.replace(UrlString.getDomainFromUrl(i),t.environment):i,s=Authority.generateAuthority(a,e.requestAzureCloudOptions||this.config.auth.azureCloudOptions),l=await invokeAsync(AuthorityFactory_exports.createDiscoveredInstance,PerformanceEvents.AuthorityFactoryCreateDiscoveredInstance,this.logger,this.performanceClient,this.correlationId)(s,this.config.system.networkClient,this.browserStorage,n,this.logger,this.correlationId,this.performanceClient);if(t&&!l.isAlias(t.environment))throw createClientConfigurationError(ClientConfigurationErrorCodes_exports.authorityMismatch);return l}constructor(e,t,r,n,i,o,a,s,l){this.config=e,this.browserStorage=t,this.browserCrypto=r,this.networkClient=this.config.system.networkClient,this.eventHandler=i,this.navigationClient=o,this.nativeMessageHandler=s,this.correlationId=l||createNewGuid(),this.logger=n.clone(BrowserConstants.MSAL_SKU,version4,this.correlationId),this.performanceClient=a}}}}),RANDOM_BYTE_ARR_LENGTH;async function generatePkceCodes(e,t,r){e.addQueueMeasurement(PerformanceEvents.GeneratePkceCodes,r);const n=invoke(generateCodeVerifier,PerformanceEvents.GenerateCodeVerifier,t,e,r)(e,t,r);return{verifier:n,challenge:await invokeAsync(generateCodeChallengeFromVerifier,PerformanceEvents.GenerateCodeChallengeFromVerifier,t,e,r)(n,e,t,r)}}function generateCodeVerifier(e,t,r){try{const n=new Uint8Array(RANDOM_BYTE_ARR_LENGTH);return invoke(getRandomValues,PerformanceEvents.GetRandomValues,t,e,r)(n),urlEncodeArr(n)}catch(n){throw createBrowserAuthError(pkceNotCreated)}}async function generateCodeChallengeFromVerifier(e,t,r,n){t.addQueueMeasurement(PerformanceEvents.GenerateCodeChallengeFromVerifier,n);try{const i=await invokeAsync(sha256Digest,PerformanceEvents.Sha256Digest,r,t,n)(e,t,n);return urlEncodeArr(new Uint8Array(i))}catch(i){throw createBrowserAuthError(pkceNotCreated)}}var init_PkceGenerator=__esm({\"../../node_modules/.pnpm/@azure+msal-browser@3.28.0/node_modules/@azure/msal-browser/dist/crypto/PkceGenerator.mjs\"(){init_globals(),init_index_browser(),init_BrowserAuthError(),init_Base64Encode(),init_BrowserCrypto(),init_BrowserAuthErrorCodes(),RANDOM_BYTE_ARR_LENGTH=32}});async function initializeBaseRequest(e,t,r,n){r.addQueueMeasurement(PerformanceEvents.InitializeBaseRequest,e.correlationId);const i=e.authority||t.auth.authority,o=[...e&&e.scopes||[]],a={...e,correlationId:e.correlationId,authority:i,scopes:o};if(a.authenticationScheme){if(a.authenticationScheme===AuthenticationScheme.SSH){if(!e.sshJwk)throw createClientConfigurationError(ClientConfigurationErrorCodes_exports.missingSshJwk);if(!e.sshKid)throw createClientConfigurationError(ClientConfigurationErrorCodes_exports.missingSshKid)}n.verbose(`Authentication Scheme set to \"${a.authenticationScheme}\" as configured in Auth request`)}else a.authenticationScheme=AuthenticationScheme.BEARER,n.verbose('Authentication Scheme wasn\\'t explicitly set in request, defaulting to \"Bearer\" request');return t.cache.claimsBasedCachingEnabled&&e.claims&&!StringUtils.isEmptyObj(e.claims)&&(a.requestedClaimsHash=await hashString(e.claims)),a}async function initializeSilentRequest(e,t,r,n,i){n.addQueueMeasurement(PerformanceEvents.InitializeSilentRequest,e.correlationId);const o=await invokeAsync(initializeBaseRequest,PerformanceEvents.InitializeBaseRequest,i,n,e.correlationId)(e,r,n,i);return{...e,...o,account:t,forceRefresh:e.forceRefresh||!1}}var init_RequestHelpers=__esm({\"../../node_modules/.pnpm/@azure+msal-browser@3.28.0/node_modules/@azure/msal-browser/dist/request/RequestHelpers.mjs\"(){init_globals(),init_index_browser(),init_BrowserCrypto()}}),StandardInteractionClient,init_StandardInteractionClient=__esm({\"../../node_modules/.pnpm/@azure+msal-browser@3.28.0/node_modules/@azure/msal-browser/dist/interaction_client/StandardInteractionClient.mjs\"(){init_globals(),init_index_browser(),init_BaseInteractionClient(),init_BrowserConstants(),init_packageMetadata2(),init_BrowserUtils(),init_PkceGenerator(),init_BrowserCrypto(),init_RequestHelpers(),StandardInteractionClient=class extends BaseInteractionClient{async initializeAuthorizationCodeRequest(e){this.performanceClient.addQueueMeasurement(PerformanceEvents.StandardInteractionClientInitializeAuthorizationCodeRequest,this.correlationId);const t=await invokeAsync(generatePkceCodes,PerformanceEvents.GeneratePkceCodes,this.logger,this.performanceClient,this.correlationId)(this.performanceClient,this.logger,this.correlationId),r={...e,redirectUri:e.redirectUri,code:Constants.EMPTY_STRING,codeVerifier:t.verifier};return e.codeChallenge=t.challenge,e.codeChallengeMethod=Constants.S256_CODE_CHALLENGE_METHOD,r}initializeLogoutRequest(e){this.logger.verbose(\"initializeLogoutRequest called\",null==e?void 0:e.correlationId);const t={correlationId:this.correlationId||createNewGuid(),...e};if(e)if(e.logoutHint)this.logger.verbose(\"logoutHint has already been set in logoutRequest\");else if(e.account){const r=this.getLogoutHintFromIdTokenClaims(e.account);r&&(this.logger.verbose(\"Setting logoutHint to login_hint ID Token Claim value for the account provided\"),t.logoutHint=r)}else this.logger.verbose(\"logoutHint was not set and account was not passed into logout request, logoutHint will not be set\");else this.logger.verbose(\"logoutHint will not be set since no logout request was configured\");return e&&null===e.postLogoutRedirectUri?this.logger.verbose(\"postLogoutRedirectUri passed as null, not setting post logout redirect uri\",t.correlationId):e&&e.postLogoutRedirectUri?(this.logger.verbose(\"Setting postLogoutRedirectUri to uri set on logout request\",t.correlationId),t.postLogoutRedirectUri=UrlString.getAbsoluteUrl(e.postLogoutRedirectUri,getCurrentUri())):null===this.config.auth.postLogoutRedirectUri?this.logger.verbose(\"postLogoutRedirectUri configured as null and no uri set on request, not passing post logout redirect\",t.correlationId):this.config.auth.postLogoutRedirectUri?(this.logger.verbose(\"Setting postLogoutRedirectUri to configured uri\",t.correlationId),t.postLogoutRedirectUri=UrlString.getAbsoluteUrl(this.config.auth.postLogoutRedirectUri,getCurrentUri())):(this.logger.verbose(\"Setting postLogoutRedirectUri to current page\",t.correlationId),t.postLogoutRedirectUri=UrlString.getAbsoluteUrl(getCurrentUri(),getCurrentUri())),t}getLogoutHintFromIdTokenClaims(e){const t=e.idTokenClaims;if(t){if(t.login_hint)return t.login_hint;this.logger.verbose(\"The ID Token Claims tied to the provided account do not contain a login_hint claim, logoutHint will not be added to logout request\")}else this.logger.verbose(\"The provided account does not contain ID Token Claims, logoutHint will not be added to logout request\");return null}async createAuthCodeClient(e){this.performanceClient.addQueueMeasurement(PerformanceEvents.StandardInteractionClientCreateAuthCodeClient,this.correlationId);const t=await invokeAsync(this.getClientConfiguration.bind(this),PerformanceEvents.StandardInteractionClientGetClientConfiguration,this.logger,this.performanceClient,this.correlationId)(e);return new AuthorizationCodeClient(t,this.performanceClient)}async getClientConfiguration(e){const{serverTelemetryManager:t,requestAuthority:r,requestAzureCloudOptions:n,requestExtraQueryParameters:i,account:o}=e;this.performanceClient.addQueueMeasurement(PerformanceEvents.StandardInteractionClientGetClientConfiguration,this.correlationId);const a=await invokeAsync(this.getDiscoveredAuthority.bind(this),PerformanceEvents.StandardInteractionClientGetDiscoveredAuthority,this.logger,this.performanceClient,this.correlationId)({requestAuthority:r,requestAzureCloudOptions:n,requestExtraQueryParameters:i,account:o}),s=this.config.system.loggerOptions;return{authOptions:{clientId:this.config.auth.clientId,authority:a,clientCapabilities:this.config.auth.clientCapabilities,redirectUri:this.config.auth.redirectUri},systemOptions:{tokenRenewalOffsetSeconds:this.config.system.tokenRenewalOffsetSeconds,preventCorsPreflight:!0},loggerOptions:{loggerCallback:s.loggerCallback,piiLoggingEnabled:s.piiLoggingEnabled,logLevel:s.logLevel,correlationId:this.correlationId},cacheOptions:{claimsBasedCachingEnabled:this.config.cache.claimsBasedCachingEnabled},cryptoInterface:this.browserCrypto,networkInterface:this.networkClient,storageInterface:this.browserStorage,serverTelemetryManager:t,libraryInfo:{sku:BrowserConstants.MSAL_SKU,version:version4,cpu:Constants.EMPTY_STRING,os:Constants.EMPTY_STRING},telemetry:this.config.telemetry}}async initializeAuthorizationRequest(e,t){this.performanceClient.addQueueMeasurement(PerformanceEvents.StandardInteractionClientInitializeAuthorizationRequest,this.correlationId);const r=this.getRedirectUri(e.redirectUri),n={interactionType:t},i=ProtocolUtils.setRequestState(this.browserCrypto,e&&e.state||Constants.EMPTY_STRING,n),o={...await invokeAsync(initializeBaseRequest,PerformanceEvents.InitializeBaseRequest,this.logger,this.performanceClient,this.correlationId)({...e,correlationId:this.correlationId},this.config,this.performanceClient,this.logger),redirectUri:r,state:i,nonce:e.nonce||createNewGuid(),responseMode:this.config.auth.OIDCOptions.serverResponseType};if(e.loginHint||e.sid)return o;const a=e.account||this.browserStorage.getActiveAccount();if(a&&(this.logger.verbose(\"Setting validated request account\",this.correlationId),this.logger.verbosePii(`Setting validated request account: ${a.homeAccountId}`,this.correlationId),o.account=a),!o.loginHint&&!a){const e=this.browserStorage.getLegacyLoginHint();e&&(o.loginHint=e)}return o}}}}),contentError,userSwitch,init_NativeAuthErrorCodes=__esm({\"../../node_modules/.pnpm/@azure+msal-browser@3.28.0/node_modules/@azure/msal-browser/dist/error/NativeAuthErrorCodes.mjs\"(){init_globals(),contentError=\"ContentError\",userSwitch=\"user_switch\"}}),USER_INTERACTION_REQUIRED,USER_CANCEL,NO_NETWORK,PERSISTENT_ERROR,DISABLED,ACCOUNT_UNAVAILABLE,init_NativeStatusCodes=__esm({\"../../node_modules/.pnpm/@azure+msal-browser@3.28.0/node_modules/@azure/msal-browser/dist/broker/nativeBroker/NativeStatusCodes.mjs\"(){init_globals(),USER_INTERACTION_REQUIRED=\"USER_INTERACTION_REQUIRED\",USER_CANCEL=\"USER_CANCEL\",NO_NETWORK=\"NO_NETWORK\",PERSISTENT_ERROR=\"PERSISTENT_ERROR\",DISABLED=\"DISABLED\",ACCOUNT_UNAVAILABLE=\"ACCOUNT_UNAVAILABLE\"}}),INVALID_METHOD_ERROR,NativeAuthErrorMessages,NativeAuthError;function isFatalNativeAuthError(e){return!(!e.ext||!e.ext.status||e.ext.status!==PERSISTENT_ERROR&&e.ext.status!==DISABLED)||!(!e.ext||!e.ext.error||e.ext.error!==INVALID_METHOD_ERROR)||e.errorCode===contentError}function createNativeAuthError(e,t,r){if(r&&r.status)switch(r.status){case ACCOUNT_UNAVAILABLE:return createInteractionRequiredAuthError(InteractionRequiredAuthErrorCodes_exports.nativeAccountUnavailable);case USER_INTERACTION_REQUIRED:return new InteractionRequiredAuthError(e,t);case USER_CANCEL:return createBrowserAuthError(userCancelled);case NO_NETWORK:return createBrowserAuthError(noNetworkConnectivity2)}return new NativeAuthError(e,NativeAuthErrorMessages[e]||t,r)}var init_NativeAuthError=__esm({\"../../node_modules/.pnpm/@azure+msal-browser@3.28.0/node_modules/@azure/msal-browser/dist/error/NativeAuthError.mjs\"(){init_globals(),init_index_browser(),init_BrowserAuthError(),init_NativeAuthErrorCodes(),init_NativeStatusCodes(),init_BrowserAuthErrorCodes(),INVALID_METHOD_ERROR=-2147186943,NativeAuthErrorMessages={[userSwitch]:\"User attempted to switch accounts in the native broker, which is not allowed. All new accounts must sign-in through the standard web flow first, please try again.\"},NativeAuthError=class e extends AuthError{constructor(t,r,n){super(t,r),Object.setPrototypeOf(this,e.prototype),this.name=\"NativeAuthError\",this.ext=n}}}}),SilentCacheClient,init_SilentCacheClient=__esm({\"../../node_modules/.pnpm/@azure+msal-browser@3.28.0/node_modules/@azure/msal-browser/dist/interaction_client/SilentCacheClient.mjs\"(){init_globals(),init_StandardInteractionClient(),init_index_browser(),init_BrowserConstants(),init_BrowserAuthError(),init_BrowserAuthErrorCodes(),SilentCacheClient=class extends StandardInteractionClient{async acquireToken(e){this.performanceClient.addQueueMeasurement(PerformanceEvents.SilentCacheClientAcquireToken,e.correlationId);const t=this.initializeServerTelemetryManager(ApiId.acquireTokenSilent_silentFlow),r=await invokeAsync(this.getClientConfiguration.bind(this),PerformanceEvents.StandardInteractionClientGetClientConfiguration,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:t,requestAuthority:e.authority,requestAzureCloudOptions:e.azureCloudOptions,account:e.account}),n=new SilentFlowClient(r,this.performanceClient);this.logger.verbose(\"Silent auth client created\");try{const t=(await invokeAsync(n.acquireCachedToken.bind(n),PerformanceEvents.SilentFlowClientAcquireCachedToken,this.logger,this.performanceClient,e.correlationId)(e))[0];return this.performanceClient.addFields({fromCache:!0},e.correlationId),t}catch(i){throw i instanceof BrowserAuthError&&i.errorCode===cryptoKeyNotFound&&this.logger.verbose(\"Signing keypair for bound access token not found. Refreshing bound access token and generating a new crypto keypair.\"),i}}logout(e){this.logger.verbose(\"logoutRedirect called\");const t=this.initializeLogoutRequest(e);return this.clearCacheOnLogout(null==t?void 0:t.account)}}}}),NativeInteractionClient,init_NativeInteractionClient=__esm({\"../../node_modules/.pnpm/@azure+msal-browser@3.28.0/node_modules/@azure/msal-browser/dist/interaction_client/NativeInteractionClient.mjs\"(){init_globals(),init_index_browser(),init_BaseInteractionClient(),init_BrowserConstants(),init_NativeAuthError(),init_BrowserAuthError(),init_SilentCacheClient(),init_Base64Decode(),init_packageMetadata2(),init_BrowserAuthErrorCodes(),init_NativeAuthErrorCodes(),NativeInteractionClient=class extends BaseInteractionClient{addRequestSKUs(e){e.extraParameters={...e.extraParameters,[AADServerParamKeys_exports.X_CLIENT_EXTRA_SKU]:this.skus}}async acquireToken(e){this.performanceClient.addQueueMeasurement(PerformanceEvents.NativeInteractionClientAcquireToken,e.correlationId),this.logger.trace(\"NativeInteractionClient - acquireToken called.\");const t=this.performanceClient.startMeasurement(PerformanceEvents.NativeInteractionClientAcquireToken,e.correlationId),r=TimeUtils_exports.nowSeconds();try{const i=await this.initializeNativeRequest(e);try{const e=await this.acquireTokensFromCache(this.accountId,i);return t.end({success:!0,isNativeBroker:!1,fromCache:!0}),e}catch(n){this.logger.info(\"MSAL internal Cache does not contain tokens, proceed to make a native call\")}const{...o}=i,a={method:NativeExtensionMethod.GetToken,request:o},s=await this.nativeMessageHandler.sendMessage(a),l=this.validateNativeResponse(s);return await this.handleNativeResponse(l,i,r).then((e=>(t.end({success:!0,isNativeBroker:!0,requestId:e.requestId}),this.serverTelemetryManager.clearNativeBrokerErrorCode(),e))).catch((e=>{throw t.end({success:!1,errorCode:e.errorCode,subErrorCode:e.subError,isNativeBroker:!0}),e}))}catch(n){throw n instanceof NativeAuthError&&this.serverTelemetryManager.setNativeBrokerErrorCode(n.errorCode),n}}createSilentCacheRequest(e,t){return{authority:e.authority,correlationId:this.correlationId,scopes:ScopeSet.fromString(e.scope).asArray(),account:t,forceRefresh:!1}}async acquireTokensFromCache(e,t){if(!e)throw this.logger.warning(\"NativeInteractionClient:acquireTokensFromCache - No nativeAccountId provided\"),createClientAuthError(ClientAuthErrorCodes_exports.noAccountFound);const r=this.browserStorage.getBaseAccountInfo({nativeAccountId:e});if(!r)throw createClientAuthError(ClientAuthErrorCodes_exports.noAccountFound);try{const e=this.createSilentCacheRequest(t,r),n=await this.silentCacheClient.acquireToken(e),i={...r,idTokenClaims:null==n?void 0:n.idTokenClaims,idToken:null==n?void 0:n.idToken};return{...n,account:i}}catch(n){throw n}}async acquireTokenRedirect(e,t){this.logger.trace(\"NativeInteractionClient - acquireTokenRedirect called.\");const{...r}=e;delete r.onRedirectNavigate;const n=await this.initializeNativeRequest(r),i={method:NativeExtensionMethod.GetToken,request:n};try{const e=await this.nativeMessageHandler.sendMessage(i);this.validateNativeResponse(e)}catch(s){if(s instanceof NativeAuthError&&(this.serverTelemetryManager.setNativeBrokerErrorCode(s.errorCode),isFatalNativeAuthError(s)))throw s}this.browserStorage.setTemporaryCache(TemporaryCacheKeys.NATIVE_REQUEST,JSON.stringify(n),!0);const o={apiId:ApiId.acquireTokenRedirect,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},a=this.config.auth.navigateToLoginRequestUrl?window.location.href:this.getRedirectUri(e.redirectUri);t.end({success:!0}),await this.navigationClient.navigateExternal(a,o)}async handleRedirectPromise(e,t){if(this.logger.trace(\"NativeInteractionClient - handleRedirectPromise called.\"),!this.browserStorage.isInteractionInProgress(!0))return this.logger.info(\"handleRedirectPromise called but there is no interaction in progress, returning null.\"),null;const r=this.browserStorage.getCachedNativeRequest();if(!r)return this.logger.verbose(\"NativeInteractionClient - handleRedirectPromise called but there is no cached request, returning null.\"),e&&t&&(null==e||e.addFields({errorCode:\"no_cached_request\"},t)),null;const{prompt:n,...i}=r;n&&this.logger.verbose(\"NativeInteractionClient - handleRedirectPromise called and prompt was included in the original request, removing prompt from cached request to prevent second interaction with native broker window.\"),this.browserStorage.removeItem(this.browserStorage.generateCacheKey(TemporaryCacheKeys.NATIVE_REQUEST));const o={method:NativeExtensionMethod.GetToken,request:i},a=TimeUtils_exports.nowSeconds();try{this.logger.verbose(\"NativeInteractionClient - handleRedirectPromise sending message to native broker.\");const e=await this.nativeMessageHandler.sendMessage(o);this.validateNativeResponse(e);const t=this.handleNativeResponse(e,i,a);this.browserStorage.setInteractionInProgress(!1);const r=await t;return this.serverTelemetryManager.clearNativeBrokerErrorCode(),r}catch(s){throw this.browserStorage.setInteractionInProgress(!1),s}}logout(){return this.logger.trace(\"NativeInteractionClient - logout called.\"),Promise.reject(\"Logout not implemented yet\")}async handleNativeResponse(e,t,r){var n;this.logger.trace(\"NativeInteractionClient - handleNativeResponse called.\");const i=AuthToken_exports.extractTokenClaims(e.id_token,base64Decode),o=this.createHomeAccountIdentifier(e,i);if(o!==(null==(n=this.browserStorage.getAccountInfoFilteredBy({nativeAccountId:t.accountId}))?void 0:n.homeAccountId)&&e.account.id!==t.accountId)throw createNativeAuthError(userSwitch);const a=await this.getDiscoveredAuthority({requestAuthority:t.authority}),s=buildAccountToCache(this.browserStorage,a,o,base64Decode,i,e.client_info,void 0,i.tid,void 0,e.account.id,this.logger),l=await this.generateAuthenticationResult(e,t,i,s,a.canonicalAuthority,r);return this.cacheAccount(s),this.cacheNativeTokens(e,t,o,i,e.access_token,l.tenantId,r),l}createHomeAccountIdentifier(e,t){return AccountEntity.generateHomeAccountId(e.client_info||Constants.EMPTY_STRING,AuthorityType.Default,this.logger,this.browserCrypto,t)}generateScopes(e,t){return e.scope?ScopeSet.fromString(e.scope):ScopeSet.fromString(t.scope)}async generatePopAccessToken(e,t){if(t.tokenType===AuthenticationScheme.POP&&t.signPopToken){if(e.shr)return this.logger.trace(\"handleNativeServerResponse: SHR is enabled in native layer\"),e.shr;const r=new PopTokenGenerator(this.browserCrypto),n={resourceRequestMethod:t.resourceRequestMethod,resourceRequestUri:t.resourceRequestUri,shrClaims:t.shrClaims,shrNonce:t.shrNonce};if(!t.keyId)throw createClientAuthError(ClientAuthErrorCodes_exports.keyIdMissing);return r.signPopToken(e.access_token,t.keyId,n)}return e.access_token}async generateAuthenticationResult(e,t,r,n,i,o){const a=this.addTelemetryFromNativeResponse(e),s=e.scope?ScopeSet.fromString(e.scope):ScopeSet.fromString(t.scope),l=e.account.properties||{},u=l.UID||r.oid||r.sub||Constants.EMPTY_STRING,c=l.TenantId||r.tid||Constants.EMPTY_STRING,d=updateAccountTenantProfileData(n.getAccountInfo(),void 0,r,e.id_token);d.nativeAccountId!==e.account.id&&(d.nativeAccountId=e.account.id);const h=await this.generatePopAccessToken(e,t),f=t.tokenType===AuthenticationScheme.POP?AuthenticationScheme.POP:AuthenticationScheme.BEARER;return{authority:i,uniqueId:u,tenantId:c,scopes:s.asArray(),account:d,idToken:e.id_token,idTokenClaims:r,accessToken:h,fromCache:!!a&&this.isResponseFromCache(a),expiresOn:new Date(1e3*Number(o+e.expires_in)),tokenType:f,correlationId:this.correlationId,state:e.state,fromNativeBroker:!0}}cacheAccount(e){this.browserStorage.setAccount(e),this.browserStorage.removeAccountContext(e).catch((e=>{this.logger.error(`Error occurred while removing account context from browser storage. ${e}`)}))}cacheNativeTokens(e,t,r,n,i,o,a){const s=CacheHelpers_exports.createIdTokenEntity(r,t.authority,e.id_token||\"\",t.clientId,n.tid||\"\"),l=a+(t.tokenType===AuthenticationScheme.POP?Constants.SHR_NONCE_VALIDITY:(\"string\"==typeof e.expires_in?parseInt(e.expires_in,10):e.expires_in)||0),u=this.generateScopes(e,t),c={idToken:s,accessToken:CacheHelpers_exports.createAccessTokenEntity(r,t.authority,i,t.clientId,n.tid||o,u.printScopes(),l,0,base64Decode,void 0,t.tokenType,void 0,t.keyId)};this.nativeStorageManager.saveCacheRecord(c,t.storeInCache)}addTelemetryFromNativeResponse(e){const t=this.getMATSFromResponse(e);return t?(this.performanceClient.addFields({extensionId:this.nativeMessageHandler.getExtensionId(),extensionVersion:this.nativeMessageHandler.getExtensionVersion(),matsBrokerVersion:t.broker_version,matsAccountJoinOnStart:t.account_join_on_start,matsAccountJoinOnEnd:t.account_join_on_end,matsDeviceJoin:t.device_join,matsPromptBehavior:t.prompt_behavior,matsApiErrorCode:t.api_error_code,matsUiVisible:t.ui_visible,matsSilentCode:t.silent_code,matsSilentBiSubCode:t.silent_bi_sub_code,matsSilentMessage:t.silent_message,matsSilentStatus:t.silent_status,matsHttpStatus:t.http_status,matsHttpEventCount:t.http_event_count},this.correlationId),t):null}validateNativeResponse(e){if(e.hasOwnProperty(\"access_token\")&&e.hasOwnProperty(\"id_token\")&&e.hasOwnProperty(\"client_info\")&&e.hasOwnProperty(\"account\")&&e.hasOwnProperty(\"scope\")&&e.hasOwnProperty(\"expires_in\"))return e;throw createAuthError(AuthErrorCodes_exports.unexpectedError,\"Response missing expected properties.\")}getMATSFromResponse(e){if(e.properties.MATS)try{return JSON.parse(e.properties.MATS)}catch(t){this.logger.error(\"NativeInteractionClient - Error parsing MATS telemetry, returning null instead\")}return null}isResponseFromCache(e){return void 0===e.is_cached?(this.logger.verbose(\"NativeInteractionClient - MATS telemetry does not contain field indicating if response was served from cache. Returning false.\"),!1):!!e.is_cached}async initializeNativeRequest(e){this.logger.trace(\"NativeInteractionClient - initializeNativeRequest called\");const t=e.authority||this.config.auth.authority;e.account&&await this.getDiscoveredAuthority({requestAuthority:t,requestAzureCloudOptions:e.azureCloudOptions,account:e.account});const r=new UrlString(t);r.validateAsUri();const{scopes:n,...i}=e,o=new ScopeSet(n||[]);o.appendScopes(OIDC_DEFAULT_SCOPES);const a={...i,accountId:this.accountId,clientId:this.config.auth.clientId,authority:r.urlString,scope:o.printScopes(),redirectUri:this.getRedirectUri(e.redirectUri),prompt:(()=>{switch(this.apiId){case ApiId.ssoSilent:case ApiId.acquireTokenSilent_silentFlow:return this.logger.trace(\"initializeNativeRequest: silent request sets prompt to none\"),PromptValue.NONE}if(e.prompt)switch(e.prompt){case PromptValue.NONE:case PromptValue.CONSENT:case PromptValue.LOGIN:return this.logger.trace(\"initializeNativeRequest: prompt is compatible with native flow\"),e.prompt;default:throw this.logger.trace(`initializeNativeRequest: prompt = ${e.prompt} is not compatible with native flow`),createBrowserAuthError(nativePromptNotSupported)}else this.logger.trace(\"initializeNativeRequest: prompt was not provided\")})(),correlationId:this.correlationId,tokenType:e.authenticationScheme,windowTitleSubstring:document.title,extraParameters:{...e.extraQueryParameters,...e.tokenQueryParameters},extendedExpiryToken:!1,keyId:e.popKid};if(a.signPopToken&&e.popKid)throw createBrowserAuthError(invalidPopTokenRequest);if(this.handleExtraBrokerParams(a),a.extraParameters=a.extraParameters||{},a.extraParameters.telemetry=NativeConstants.MATS_TELEMETRY,e.authenticationScheme===AuthenticationScheme.POP){const t={resourceRequestUri:e.resourceRequestUri,resourceRequestMethod:e.resourceRequestMethod,shrClaims:e.shrClaims,shrNonce:e.shrNonce},r=new PopTokenGenerator(this.browserCrypto);let n;if(a.keyId)n=this.browserCrypto.base64UrlEncode(JSON.stringify({kid:a.keyId})),a.signPopToken=!1;else{const i=await invokeAsync(r.generateCnf.bind(r),PerformanceEvents.PopTokenGenerateCnf,this.logger,this.performanceClient,e.correlationId)(t,this.logger);n=i.reqCnfString,a.keyId=i.kid,a.signPopToken=!0}a.reqCnf=n}return this.addRequestSKUs(a),a}handleExtraBrokerParams(e){var t;const r=e.extraParameters&&e.extraParameters.hasOwnProperty(AADServerParamKeys_exports.BROKER_CLIENT_ID)&&e.extraParameters.hasOwnProperty(AADServerParamKeys_exports.BROKER_REDIRECT_URI)&&e.extraParameters.hasOwnProperty(AADServerParamKeys_exports.CLIENT_ID);if(!e.embeddedClientId&&!r)return;let n=\"\";const i=e.redirectUri;e.embeddedClientId?(e.redirectUri=this.config.auth.redirectUri,n=e.embeddedClientId):e.extraParameters&&(e.redirectUri=e.extraParameters[AADServerParamKeys_exports.BROKER_REDIRECT_URI],n=e.extraParameters[AADServerParamKeys_exports.CLIENT_ID]),e.extraParameters={child_client_id:n,child_redirect_uri:i},null==(t=this.performanceClient)||t.addFields({embeddedClientId:n,embeddedRedirectUri:i},e.correlationId)}constructor(e,t,r,n,i,o,a,s,l,u,c,d){var h;super(e,t,r,n,i,o,s,l,d),this.apiId=a,this.accountId=u,this.nativeMessageHandler=l,this.nativeStorageManager=c,this.silentCacheClient=new SilentCacheClient(e,this.nativeStorageManager,r,n,i,o,s,l,d),this.serverTelemetryManager=this.initializeServerTelemetryManager(this.apiId);const f=this.nativeMessageHandler.getExtensionId()===NativeConstants.PREFERRED_EXTENSION_ID?\"chrome\":(null==(h=this.nativeMessageHandler.getExtensionId())?void 0:h.length)?\"unknown\":void 0;this.skus=ServerTelemetryManager.makeExtraSkuString({libraryName:BrowserConstants.MSAL_SKU,libraryVersion:version4,extensionName:f,extensionVersion:this.nativeMessageHandler.getExtensionVersion()})}}}}),NativeMessageHandler,init_NativeMessageHandler=__esm({\"../../node_modules/.pnpm/@azure+msal-browser@3.28.0/node_modules/@azure/msal-browser/dist/broker/nativeBroker/NativeMessageHandler.mjs\"(){init_globals(),init_BrowserConstants(),init_index_browser(),init_NativeAuthError(),init_BrowserAuthError(),init_BrowserCrypto(),init_BrowserAuthErrorCodes(),NativeMessageHandler=class e{async sendMessage(e){this.logger.trace(\"NativeMessageHandler - sendMessage called.\");const t={channel:NativeConstants.CHANNEL_ID,extensionId:this.extensionId,responseId:createNewGuid(),body:e};return this.logger.trace(\"NativeMessageHandler - Sending request to browser extension\"),this.logger.tracePii(`NativeMessageHandler - Sending request to browser extension: ${JSON.stringify(t)}`),this.messageChannel.port1.postMessage(t),new Promise(((e,r)=>{this.resolvers.set(t.responseId,{resolve:e,reject:r})}))}static async createProvider(t,r,n){t.trace(\"NativeMessageHandler - createProvider called.\");try{const i=new e(t,r,n,NativeConstants.PREFERRED_EXTENSION_ID);return await i.sendHandshakeRequest(),i}catch(i){const o=new e(t,r,n);return await o.sendHandshakeRequest(),o}}async sendHandshakeRequest(){this.logger.trace(\"NativeMessageHandler - sendHandshakeRequest called.\"),window.addEventListener(\"message\",this.windowListener,!1);const e={channel:NativeConstants.CHANNEL_ID,extensionId:this.extensionId,responseId:createNewGuid(),body:{method:NativeExtensionMethod.HandshakeRequest}};return this.handshakeEvent.add({extensionId:this.extensionId,extensionHandshakeTimeoutMs:this.handshakeTimeoutMs}),this.messageChannel.port1.onmessage=e=>{this.onChannelMessage(e)},window.postMessage(e,window.origin,[this.messageChannel.port2]),new Promise(((t,r)=>{this.handshakeResolvers.set(e.responseId,{resolve:t,reject:r}),this.timeoutId=window.setTimeout((()=>{window.removeEventListener(\"message\",this.windowListener,!1),this.messageChannel.port1.close(),this.messageChannel.port2.close(),this.handshakeEvent.end({extensionHandshakeTimedOut:!0,success:!1}),r(createBrowserAuthError(nativeHandshakeTimeout)),this.handshakeResolvers.delete(e.responseId)}),this.handshakeTimeoutMs)}))}onWindowMessage(e){if(this.logger.trace(\"NativeMessageHandler - onWindowMessage called\"),e.source!==window)return;const t=e.data;if(t.channel&&t.channel===NativeConstants.CHANNEL_ID&&(!t.extensionId||t.extensionId===this.extensionId)&&t.body.method===NativeExtensionMethod.HandshakeRequest){const e=this.handshakeResolvers.get(t.responseId);if(!e)return void this.logger.trace(`NativeMessageHandler.onWindowMessage - resolver can't be found for request ${t.responseId}`);this.logger.verbose(t.extensionId?`Extension with id: ${t.extensionId} not installed`:\"No extension installed\"),clearTimeout(this.timeoutId),this.messageChannel.port1.close(),this.messageChannel.port2.close(),window.removeEventListener(\"message\",this.windowListener,!1),this.handshakeEvent.end({success:!1,extensionInstalled:!1}),e.reject(createBrowserAuthError(nativeExtensionNotInstalled))}}onChannelMessage(e){this.logger.trace(\"NativeMessageHandler - onChannelMessage called.\");const t=e.data,r=this.resolvers.get(t.responseId),n=this.handshakeResolvers.get(t.responseId);try{const e=t.body.method;if(e===NativeExtensionMethod.Response){if(!r)return;const e=t.body.response;if(this.logger.trace(\"NativeMessageHandler - Received response from browser extension\"),this.logger.tracePii(`NativeMessageHandler - Received response from browser extension: ${JSON.stringify(e)}`),\"Success\"!==e.status)r.reject(createNativeAuthError(e.code,e.description,e.ext));else{if(!e.result)throw createAuthError(AuthErrorCodes_exports.unexpectedError,\"Event does not contain result.\");e.result.code&&e.result.description?r.reject(createNativeAuthError(e.result.code,e.result.description,e.result.ext)):r.resolve(e.result)}this.resolvers.delete(t.responseId)}else if(e===NativeExtensionMethod.HandshakeResponse){if(!n)return void this.logger.trace(`NativeMessageHandler.onChannelMessage - resolver can't be found for request ${t.responseId}`);clearTimeout(this.timeoutId),window.removeEventListener(\"message\",this.windowListener,!1),this.extensionId=t.extensionId,this.extensionVersion=t.body.version,this.logger.verbose(`NativeMessageHandler - Received HandshakeResponse from extension: ${this.extensionId}`),this.handshakeEvent.end({extensionInstalled:!0,success:!0}),n.resolve(),this.handshakeResolvers.delete(t.responseId)}}catch(i){this.logger.error(\"Error parsing response from WAM Extension\"),this.logger.errorPii(`Error parsing response from WAM Extension: ${i}`),this.logger.errorPii(`Unable to parse ${e}`),r?r.reject(i):n&&n.reject(i)}}getExtensionId(){return this.extensionId}getExtensionVersion(){return this.extensionVersion}static isNativeAvailable(e,t,r,n){if(t.trace(\"isNativeAvailable called\"),!e.system.allowNativeBroker)return t.trace(\"isNativeAvailable: allowNativeBroker is not enabled, returning false\"),!1;if(!r)return t.trace(\"isNativeAvailable: WAM extension provider is not initialized, returning false\"),!1;if(n)switch(n){case AuthenticationScheme.BEARER:case AuthenticationScheme.POP:return t.trace(\"isNativeAvailable: authenticationScheme is supported, returning true\"),!0;default:return t.trace(\"isNativeAvailable: authenticationScheme is not supported, returning false\"),!1}return!0}constructor(e,t,r,n){this.logger=e,this.handshakeTimeoutMs=t,this.extensionId=n,this.resolvers=new Map,this.handshakeResolvers=new Map,this.messageChannel=new MessageChannel,this.windowListener=this.onWindowMessage.bind(this),this.performanceClient=r,this.handshakeEvent=r.startMeasurement(PerformanceEvents.NativeMessageHandlerHandshake)}}}}),InteractionHandler,init_InteractionHandler=__esm({\"../../node_modules/.pnpm/@azure+msal-browser@3.28.0/node_modules/@azure/msal-browser/dist/interaction_handler/InteractionHandler.mjs\"(){init_globals(),init_index_browser(),init_BrowserAuthError(),init_BrowserAuthErrorCodes(),InteractionHandler=class{async handleCodeResponse(e,t){let r;this.performanceClient.addQueueMeasurement(PerformanceEvents.HandleCodeResponse,t.correlationId);try{r=this.authModule.handleFragmentResponse(e,t.state)}catch(n){throw n instanceof ServerError&&n.subError===userCancelled?createBrowserAuthError(userCancelled):n}return invokeAsync(this.handleCodeResponseFromServer.bind(this),PerformanceEvents.HandleCodeResponseFromServer,this.logger,this.performanceClient,t.correlationId)(r,t)}async handleCodeResponseFromServer(e,t,r=!0){if(this.performanceClient.addQueueMeasurement(PerformanceEvents.HandleCodeResponseFromServer,t.correlationId),this.logger.trace(\"InteractionHandler.handleCodeResponseFromServer called\"),this.authCodeRequest.code=e.code,e.cloud_instance_host_name&&await invokeAsync(this.authModule.updateAuthority.bind(this.authModule),PerformanceEvents.UpdateTokenEndpointAuthority,this.logger,this.performanceClient,t.correlationId)(e.cloud_instance_host_name,t.correlationId),r&&(e.nonce=t.nonce||void 0),e.state=t.state,e.client_info)this.authCodeRequest.clientInfo=e.client_info;else{const e=this.createCcsCredentials(t);e&&(this.authCodeRequest.ccsCredential=e)}return await invokeAsync(this.authModule.acquireToken.bind(this.authModule),PerformanceEvents.AuthClientAcquireToken,this.logger,this.performanceClient,t.correlationId)(this.authCodeRequest,e)}createCcsCredentials(e){return e.account?{credential:e.account.homeAccountId,type:CcsCredentialType.HOME_ACCOUNT_ID}:e.loginHint?{credential:e.loginHint,type:CcsCredentialType.UPN}:null}constructor(e,t,r,n,i){this.authModule=e,this.browserStorage=t,this.authCodeRequest=r,this.logger=n,this.performanceClient=i}}}});function deserializeResponse(e,t,r){const n=UrlUtils_exports.getDeserializedResponse(e);if(!n)throw UrlUtils_exports.stripLeadingHashOrQuery(e)?(r.error(`A ${t} is present in the iframe but it does not contain known properties. It's likely that the ${t} has been replaced by code running on the redirectUri page.`),r.errorPii(`The ${t} detected is: ${e}`),createBrowserAuthError(hashDoesNotContainKnownProperties)):(r.error(`The request has returned to the redirectUri but a ${t} is not present. It's likely that the ${t} has been removed or the page has been redirected by code running on the redirectUri page.`),createBrowserAuthError(hashEmptyError));return n}function validateInteractionType(e,t,r){if(!e.state)throw createBrowserAuthError(noStateInHash);const n=extractBrowserRequestState(t,e.state);if(!n)throw createBrowserAuthError(unableToParseState);if(n.interactionType!==r)throw createBrowserAuthError(stateInteractionTypeMismatch)}var init_ResponseHandler2=__esm({\"../../node_modules/.pnpm/@azure+msal-browser@3.28.0/node_modules/@azure/msal-browser/dist/response/ResponseHandler.mjs\"(){init_globals(),init_index_browser(),init_BrowserAuthError(),init_BrowserProtocolUtils(),init_BrowserAuthErrorCodes()}}),PopupClient,init_PopupClient=__esm({\"../../node_modules/.pnpm/@azure+msal-browser@3.28.0/node_modules/@azure/msal-browser/dist/interaction_client/PopupClient.mjs\"(){init_globals(),init_index_browser(),init_StandardInteractionClient(),init_EventType(),init_BrowserConstants(),init_BrowserUtils(),init_NativeInteractionClient(),init_NativeMessageHandler(),init_BrowserAuthError(),init_InteractionHandler(),init_ResponseHandler2(),init_BrowserAuthErrorCodes(),PopupClient=class extends StandardInteractionClient{acquireToken(e){var t;try{const r={popupName:this.generatePopupName(e.scopes||OIDC_DEFAULT_SCOPES,e.authority||this.config.auth.authority),popupWindowAttributes:e.popupWindowAttributes||{},popupWindowParent:null!=(t=e.popupWindowParent)?t:window};return this.config.system.asyncPopups?(this.logger.verbose(\"asyncPopups set to true, acquiring token\"),this.acquireTokenPopupAsync(e,r)):(this.logger.verbose(\"asyncPopup set to false, opening popup before acquiring token\"),r.popup=this.openSizedPopup(\"about:blank\",r),this.acquireTokenPopupAsync(e,r))}catch(r){return Promise.reject(r)}}logout(e){var t;try{this.logger.verbose(\"logoutPopup called\");const r=this.initializeLogoutRequest(e),n={popupName:this.generateLogoutPopupName(r),popupWindowAttributes:(null==e?void 0:e.popupWindowAttributes)||{},popupWindowParent:null!=(t=null==e?void 0:e.popupWindowParent)?t:window},i=e&&e.authority,o=e&&e.mainWindowRedirectUri;return this.config.system.asyncPopups?(this.logger.verbose(\"asyncPopups set to true\"),this.logoutPopupAsync(r,n,i,o)):(this.logger.verbose(\"asyncPopup set to false, opening popup\"),n.popup=this.openSizedPopup(\"about:blank\",n),this.logoutPopupAsync(r,n,i,o))}catch(r){return Promise.reject(r)}}async acquireTokenPopupAsync(e,t){var r;this.logger.verbose(\"acquireTokenPopupAsync called\");const n=this.initializeServerTelemetryManager(ApiId.acquireTokenPopup),i=await invokeAsync(this.initializeAuthorizationRequest.bind(this),PerformanceEvents.StandardInteractionClientInitializeAuthorizationRequest,this.logger,this.performanceClient,this.correlationId)(e,InteractionType.Popup);preconnect(i.authority);try{const r=await invokeAsync(this.initializeAuthorizationCodeRequest.bind(this),PerformanceEvents.StandardInteractionClientInitializeAuthorizationCodeRequest,this.logger,this.performanceClient,this.correlationId)(i),o=await invokeAsync(this.createAuthCodeClient.bind(this),PerformanceEvents.StandardInteractionClientCreateAuthCodeClient,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:n,requestAuthority:i.authority,requestAzureCloudOptions:i.azureCloudOptions,requestExtraQueryParameters:i.extraQueryParameters,account:i.account}),a=NativeMessageHandler.isNativeAvailable(this.config,this.logger,this.nativeMessageHandler,e.authenticationScheme);let s;a&&(s=this.performanceClient.startMeasurement(PerformanceEvents.FetchAccountIdWithNativeBroker,e.correlationId));const l=await o.getAuthCodeUrl({...i,nativeBroker:a}),u=new InteractionHandler(o,this.browserStorage,r,this.logger,this.performanceClient),c=this.initiateAuthRequest(l,t);this.eventHandler.emitEvent(EventType.POPUP_OPENED,InteractionType.Popup,{popupWindow:c},null);const d=await this.monitorPopupForHash(c,t.popupWindowParent),h=invoke(deserializeResponse,PerformanceEvents.DeserializeResponse,this.logger,this.performanceClient,this.correlationId)(d,this.config.auth.OIDCOptions.serverResponseType,this.logger);if(ThrottlingUtils.removeThrottle(this.browserStorage,this.config.auth.clientId,r),h.accountId){if(this.logger.verbose(\"Account id found in hash, calling WAM for token\"),s&&s.end({success:!0,isNativeBroker:!0}),!this.nativeMessageHandler)throw createBrowserAuthError(nativeConnectionNotEstablished);const e=new NativeInteractionClient(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,ApiId.acquireTokenPopup,this.performanceClient,this.nativeMessageHandler,h.accountId,this.nativeStorage,i.correlationId),{userRequestState:t}=ProtocolUtils.parseRequestState(this.browserCrypto,i.state);return await e.acquireToken({...i,state:t,prompt:void 0})}return await u.handleCodeResponse(h,i)}catch(o){throw null==(r=t.popup)||r.close(),o instanceof AuthError&&(o.setCorrelationId(this.correlationId),n.cacheFailedRequest(o)),o}}async logoutPopupAsync(e,t,r,n){var i,o,a,s;this.logger.verbose(\"logoutPopupAsync called\"),this.eventHandler.emitEvent(EventType.LOGOUT_START,InteractionType.Popup,e);const l=this.initializeServerTelemetryManager(ApiId.logoutPopup);try{await this.clearCacheOnLogout(e.account);const s=await invokeAsync(this.createAuthCodeClient.bind(this),PerformanceEvents.StandardInteractionClientCreateAuthCodeClient,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:l,requestAuthority:r,account:e.account||void 0});try{s.authority.endSessionEndpoint}catch(u){if((null==(i=e.account)?void 0:i.homeAccountId)&&e.postLogoutRedirectUri&&s.authority.protocolMode===ProtocolMode.OIDC){if(this.browserStorage.removeAccount(null==(o=e.account)?void 0:o.homeAccountId),this.eventHandler.emitEvent(EventType.LOGOUT_SUCCESS,InteractionType.Popup,e),n){const e={apiId:ApiId.logoutPopup,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},t=UrlString.getAbsoluteUrl(n,getCurrentUri());await this.navigationClient.navigateInternal(t,e)}return void(null==(a=t.popup)||a.close())}}const c=s.getLogoutUri(e);this.eventHandler.emitEvent(EventType.LOGOUT_SUCCESS,InteractionType.Popup,e);const d=this.openPopup(c,t);if(this.eventHandler.emitEvent(EventType.POPUP_OPENED,InteractionType.Popup,{popupWindow:d},null),await this.monitorPopupForHash(d,t.popupWindowParent).catch((()=>{})),n){const e={apiId:ApiId.logoutPopup,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},t=UrlString.getAbsoluteUrl(n,getCurrentUri());this.logger.verbose(\"Redirecting main window to url specified in the request\"),this.logger.verbosePii(`Redirecting main window to: ${t}`),await this.navigationClient.navigateInternal(t,e)}else this.logger.verbose(\"No main window navigation requested\")}catch(u){throw null==(s=t.popup)||s.close(),u instanceof AuthError&&(u.setCorrelationId(this.correlationId),l.cacheFailedRequest(u)),this.browserStorage.setInteractionInProgress(!1),this.eventHandler.emitEvent(EventType.LOGOUT_FAILURE,InteractionType.Popup,null,u),this.eventHandler.emitEvent(EventType.LOGOUT_END,InteractionType.Popup),u}this.eventHandler.emitEvent(EventType.LOGOUT_END,InteractionType.Popup)}initiateAuthRequest(e,t){if(e)return this.logger.infoPii(`Navigate to: ${e}`),this.openPopup(e,t);throw this.logger.error(\"Navigate url is empty\"),createBrowserAuthError(emptyNavigateUri)}monitorPopupForHash(e,t){return new Promise(((t,r)=>{this.logger.verbose(\"PopupHandler.monitorPopupForHash - polling started\");const n=setInterval((()=>{if(e.closed)return this.logger.error(\"PopupHandler.monitorPopupForHash - window closed\"),clearInterval(n),void r(createBrowserAuthError(userCancelled));let i=\"\";try{i=e.location.href}catch(s){}if(!i||\"about:blank\"===i)return;clearInterval(n);let o=\"\";const a=this.config.auth.OIDCOptions.serverResponseType;e&&(o=a===ServerResponseType.QUERY?e.location.search:e.location.hash),this.logger.verbose(\"PopupHandler.monitorPopupForHash - popup window is on same origin as caller\"),t(o)}),this.config.system.pollIntervalMilliseconds)})).finally((()=>{this.cleanPopup(e,t)}))}openPopup(e,t){try{let r;if(t.popup?(r=t.popup,this.logger.verbosePii(`Navigating popup window to: ${e}`),r.location.assign(e)):void 0===t.popup&&(this.logger.verbosePii(`Opening popup window to: ${e}`),r=this.openSizedPopup(e,t)),!r)throw createBrowserAuthError(emptyWindowError);return r.focus&&r.focus(),this.currentWindow=r,t.popupWindowParent.addEventListener(\"beforeunload\",this.unloadWindow),r}catch(r){throw this.logger.error(\"error opening popup \"+r.message),this.browserStorage.setInteractionInProgress(!1),createBrowserAuthError(popupWindowError)}}openSizedPopup(e,{popupName:t,popupWindowAttributes:r,popupWindowParent:n}){var i,o,a,s;const l=n.screenLeft?n.screenLeft:n.screenX,u=n.screenTop?n.screenTop:n.screenY,c=n.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,d=n.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;let h=null==(i=r.popupSize)?void 0:i.width,f=null==(o=r.popupSize)?void 0:o.height,p=null==(a=r.popupPosition)?void 0:a.top,m=null==(s=r.popupPosition)?void 0:s.left;return(!h||h__left_angle_mark_0||h>c)&&(this.logger.verbose(\"Default popup window width used. Window width not configured or invalid.\"),h=BrowserConstants.POPUP_WIDTH),(!f||f__left_angle_mark_0||f>d)&&(this.logger.verbose(\"Default popup window height used. Window height not configured or invalid.\"),f=BrowserConstants.POPUP_HEIGHT),(!p||p__left_angle_mark_0||p>d)&&(this.logger.verbose(\"Default popup window top position used. Window top not configured or invalid.\"),p=Math.max(0,d/2-BrowserConstants.POPUP_HEIGHT/2+u)),(!m||m__left_angle_mark_0||m>c)&&(this.logger.verbose(\"Default popup window left position used. Window left not configured or invalid.\"),m=Math.max(0,c/2-BrowserConstants.POPUP_WIDTH/2+l)),n.open(e,t,`width=${h}, height=${f}, top=${p}, left=${m}, scrollbars=yes`)}unloadWindow(e){this.browserStorage.cleanRequestByInteractionType(InteractionType.Popup),this.currentWindow&&this.currentWindow.close(),e.preventDefault()}cleanPopup(e,t){e.close(),t.removeEventListener(\"beforeunload\",this.unloadWindow),this.browserStorage.setInteractionInProgress(!1)}generatePopupName(e,t){return`${BrowserConstants.POPUP_NAME_PREFIX}.${this.config.auth.clientId}.${e.join(\"-\")}.${t}.${this.correlationId}`}generateLogoutPopupName(e){const t=e.account&&e.account.homeAccountId;return`${BrowserConstants.POPUP_NAME_PREFIX}.${this.config.auth.clientId}.${t}.${this.correlationId}`}constructor(e,t,r,n,i,o,a,s,l,u){super(e,t,r,n,i,o,a,l,u),this.unloadWindow=this.unloadWindow.bind(this),this.nativeStorage=s}}}}),RedirectHandler,init_RedirectHandler=__esm({\"../../node_modules/.pnpm/@azure+msal-browser@3.28.0/node_modules/@azure/msal-browser/dist/interaction_handler/RedirectHandler.mjs\"(){init_globals(),init_index_browser(),init_BrowserAuthError(),init_BrowserConstants(),init_BrowserAuthErrorCodes(),RedirectHandler=class{async initiateAuthRequest(e,t){if(this.logger.verbose(\"RedirectHandler.initiateAuthRequest called\"),e){t.redirectStartPage&&(this.logger.verbose(\"RedirectHandler.initiateAuthRequest: redirectStartPage set, caching start page\"),this.browserStorage.setTemporaryCache(TemporaryCacheKeys.ORIGIN_URI,t.redirectStartPage,!0)),this.browserStorage.setTemporaryCache(TemporaryCacheKeys.CORRELATION_ID,this.authCodeRequest.correlationId,!0),this.browserStorage.cacheCodeRequest(this.authCodeRequest),this.logger.infoPii(`RedirectHandler.initiateAuthRequest: Navigate to: ${e}`);const r={apiId:ApiId.acquireTokenRedirect,timeout:t.redirectTimeout,noHistory:!1};return\"function\"==typeof t.onRedirectNavigate?(this.logger.verbose(\"RedirectHandler.initiateAuthRequest: Invoking onRedirectNavigate callback\"),!1!==t.onRedirectNavigate(e)?(this.logger.verbose(\"RedirectHandler.initiateAuthRequest: onRedirectNavigate did not return false, navigating\"),void(await t.navigationClient.navigateExternal(e,r))):void this.logger.verbose(\"RedirectHandler.initiateAuthRequest: onRedirectNavigate returned false, stopping navigation\")):(this.logger.verbose(\"RedirectHandler.initiateAuthRequest: Navigating window to navigate url\"),void(await t.navigationClient.navigateExternal(e,r)))}throw this.logger.info(\"RedirectHandler.initiateAuthRequest: Navigate url is empty\"),createBrowserAuthError(emptyNavigateUri)}async handleCodeResponse(e,t){this.logger.verbose(\"RedirectHandler.handleCodeResponse called\"),this.browserStorage.setInteractionInProgress(!1);const r=this.browserStorage.generateStateKey(t),n=this.browserStorage.getTemporaryCache(r);if(!n)throw createClientAuthError(ClientAuthErrorCodes_exports.stateNotFound,\"Cached State\");let i;try{i=this.authModule.handleFragmentResponse(e,n)}catch(l){throw l instanceof ServerError&&l.subError===userCancelled?createBrowserAuthError(userCancelled):l}const o=this.browserStorage.generateNonceKey(n),a=this.browserStorage.getTemporaryCache(o);if(this.authCodeRequest.code=i.code,i.cloud_instance_host_name&&await invokeAsync(this.authModule.updateAuthority.bind(this.authModule),PerformanceEvents.UpdateTokenEndpointAuthority,this.logger,this.performanceClient,this.authCodeRequest.correlationId)(i.cloud_instance_host_name,this.authCodeRequest.correlationId),i.nonce=a||void 0,i.state=n,i.client_info)this.authCodeRequest.clientInfo=i.client_info;else{const e=this.checkCcsCredentials();e&&(this.authCodeRequest.ccsCredential=e)}const s=await this.authModule.acquireToken(this.authCodeRequest,i);return this.browserStorage.cleanRequestByState(t),s}checkCcsCredentials(){const e=this.browserStorage.getTemporaryCache(TemporaryCacheKeys.CCS_CREDENTIAL,!0);if(e)try{return JSON.parse(e)}catch(t){this.authModule.logger.error(\"Cache credential could not be parsed\"),this.authModule.logger.errorPii(`Cache credential could not be parsed: ${e}`)}return null}constructor(e,t,r,n,i){this.authModule=e,this.browserStorage=t,this.authCodeRequest=r,this.logger=n,this.performanceClient=i}}}}),RedirectClient;function getNavigationType(){if(\"undefined\"==typeof window||void 0===window.performance||\"function\"!=typeof window.performance.getEntriesByType)return;const e=window.performance.getEntriesByType(\"navigation\"),t=e.length?e[0]:void 0;return null==t?void 0:t.type}var init_RedirectClient=__esm({\"../../node_modules/.pnpm/@azure+msal-browser@3.28.0/node_modules/@azure/msal-browser/dist/interaction_client/RedirectClient.mjs\"(){init_globals(),init_index_browser(),init_StandardInteractionClient(),init_BrowserConstants(),init_RedirectHandler(),init_BrowserUtils(),init_EventType(),init_BrowserAuthError(),init_NativeInteractionClient(),init_NativeMessageHandler(),init_ResponseHandler2(),init_BrowserAuthErrorCodes(),RedirectClient=class extends StandardInteractionClient{async acquireToken(e){const t=await invokeAsync(this.initializeAuthorizationRequest.bind(this),PerformanceEvents.StandardInteractionClientInitializeAuthorizationRequest,this.logger,this.performanceClient,this.correlationId)(e,InteractionType.Redirect);this.browserStorage.updateCacheEntries(t.state,t.nonce,t.authority,t.loginHint||\"\",t.account||null);const r=this.initializeServerTelemetryManager(ApiId.acquireTokenRedirect),n=e=>{e.persisted&&(this.logger.verbose(\"Page was restored from back/forward cache. Clearing temporary cache.\"),this.browserStorage.cleanRequestByState(t.state),this.eventHandler.emitEvent(EventType.RESTORE_FROM_BFCACHE,InteractionType.Redirect))};try{const i=await invokeAsync(this.initializeAuthorizationCodeRequest.bind(this),PerformanceEvents.StandardInteractionClientInitializeAuthorizationCodeRequest,this.logger,this.performanceClient,this.correlationId)(t),o=await invokeAsync(this.createAuthCodeClient.bind(this),PerformanceEvents.StandardInteractionClientCreateAuthCodeClient,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:r,requestAuthority:t.authority,requestAzureCloudOptions:t.azureCloudOptions,requestExtraQueryParameters:t.extraQueryParameters,account:t.account}),a=new RedirectHandler(o,this.browserStorage,i,this.logger,this.performanceClient),s=await o.getAuthCodeUrl({...t,nativeBroker:NativeMessageHandler.isNativeAvailable(this.config,this.logger,this.nativeMessageHandler,e.authenticationScheme)}),l=this.getRedirectStartPage(e.redirectStartPage);return this.logger.verbosePii(`Redirect start page: ${l}`),window.addEventListener(\"pageshow\",n),await a.initiateAuthRequest(s,{navigationClient:this.navigationClient,redirectTimeout:this.config.system.redirectNavigationTimeout,redirectStartPage:l,onRedirectNavigate:e.onRedirectNavigate||this.config.auth.onRedirectNavigate})}catch(i){throw i instanceof AuthError&&(i.setCorrelationId(this.correlationId),r.cacheFailedRequest(i)),window.removeEventListener(\"pageshow\",n),this.browserStorage.cleanRequestByState(t.state),i}}async handleRedirectPromise(e=\"\",t){const r=this.initializeServerTelemetryManager(ApiId.handleRedirectPromise);try{if(!this.browserStorage.isInteractionInProgress(!0))return this.logger.info(\"handleRedirectPromise called but there is no interaction in progress, returning null.\"),null;const[n,i]=this.getRedirectResponse(e||\"\");if(!n)return this.logger.info(\"handleRedirectPromise did not detect a response as a result of a redirect. Cleaning temporary cache.\"),this.browserStorage.cleanRequestByInteractionType(InteractionType.Redirect),\"back_forward\"!==getNavigationType()?t.event.errorCode=\"no_server_response\":this.logger.verbose(\"Back navigation event detected. Muting no_server_response error\"),null;const o=this.browserStorage.getTemporaryCache(TemporaryCacheKeys.ORIGIN_URI,!0)||Constants.EMPTY_STRING,a=UrlString.removeHashFromUrl(o);if(a===UrlString.removeHashFromUrl(window.location.href)&&this.config.auth.navigateToLoginRequestUrl)return this.logger.verbose(\"Current page is loginRequestUrl, handling response\"),o.indexOf(\"#\")>-1&&replaceHash(o),await this.handleResponse(n,r);if(!this.config.auth.navigateToLoginRequestUrl)return this.logger.verbose(\"NavigateToLoginRequestUrl set to false, handling response\"),await this.handleResponse(n,r);if(!isInIframe()||this.config.system.allowRedirectInIframe){this.browserStorage.setTemporaryCache(TemporaryCacheKeys.URL_HASH,i,!0);const e={apiId:ApiId.handleRedirectPromise,timeout:this.config.system.redirectNavigationTimeout,noHistory:!0};let t=!0;if(o&&\"null\"!==o)this.logger.verbose(`Navigating to loginRequestUrl: ${o}`),t=await this.navigationClient.navigateInternal(o,e);else{const r=getHomepage();this.browserStorage.setTemporaryCache(TemporaryCacheKeys.ORIGIN_URI,r,!0),this.logger.warning(\"Unable to get valid login request url from cache, redirecting to home page\"),t=await this.navigationClient.navigateInternal(r,e)}if(!t)return await this.handleResponse(n,r)}return null}catch(n){throw n instanceof AuthError&&(n.setCorrelationId(this.correlationId),r.cacheFailedRequest(n)),this.browserStorage.cleanRequestByInteractionType(InteractionType.Redirect),n}}getRedirectResponse(e){this.logger.verbose(\"getRedirectResponseHash called\");let t=e;t||(t=this.config.auth.OIDCOptions.serverResponseType===ServerResponseType.QUERY?window.location.search:window.location.hash);let r=UrlUtils_exports.getDeserializedResponse(t);if(r){try{validateInteractionType(r,this.browserCrypto,InteractionType.Redirect)}catch(i){return i instanceof AuthError&&this.logger.error(`Interaction type validation failed due to ${i.errorCode}: ${i.errorMessage}`),[null,\"\"]}return clearHash(window),this.logger.verbose(\"Hash contains known properties, returning response hash\"),[r,t]}const n=this.browserStorage.getTemporaryCache(TemporaryCacheKeys.URL_HASH,!0);return this.browserStorage.removeItem(this.browserStorage.generateCacheKey(TemporaryCacheKeys.URL_HASH)),n&&(r=UrlUtils_exports.getDeserializedResponse(n),r)?(this.logger.verbose(\"Hash does not contain known properties, returning cached hash\"),[r,n]):[null,\"\"]}async handleResponse(e,t){const r=e.state;if(!r)throw createBrowserAuthError(noStateInHash);const n=this.browserStorage.getCachedRequest(r);if(this.logger.verbose(\"handleResponse called, retrieved cached request\"),e.accountId){if(this.logger.verbose(\"Account id found in hash, calling WAM for token\"),!this.nativeMessageHandler)throw createBrowserAuthError(nativeConnectionNotEstablished);const t=new NativeInteractionClient(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,ApiId.acquireTokenPopup,this.performanceClient,this.nativeMessageHandler,e.accountId,this.nativeStorage,n.correlationId),{userRequestState:i}=ProtocolUtils.parseRequestState(this.browserCrypto,r);return t.acquireToken({...n,state:i,prompt:void 0}).finally((()=>{this.browserStorage.cleanRequestByState(r)}))}const i=this.browserStorage.getCachedAuthority(r);if(!i)throw createBrowserAuthError(noCachedAuthorityError);const o=await invokeAsync(this.createAuthCodeClient.bind(this),PerformanceEvents.StandardInteractionClientCreateAuthCodeClient,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:t,requestAuthority:i});return ThrottlingUtils.removeThrottle(this.browserStorage,this.config.auth.clientId,n),new RedirectHandler(o,this.browserStorage,n,this.logger,this.performanceClient).handleCodeResponse(e,r)}async logout(e){var t,r;this.logger.verbose(\"logoutRedirect called\");const n=this.initializeLogoutRequest(e),i=this.initializeServerTelemetryManager(ApiId.logout);try{this.eventHandler.emitEvent(EventType.LOGOUT_START,InteractionType.Redirect,e),await this.clearCacheOnLogout(n.account);const a={apiId:ApiId.logout,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},s=await invokeAsync(this.createAuthCodeClient.bind(this),PerformanceEvents.StandardInteractionClientCreateAuthCodeClient,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:i,requestAuthority:e&&e.authority,requestExtraQueryParameters:null==e?void 0:e.extraQueryParameters,account:e&&e.account||void 0});if(s.authority.protocolMode===ProtocolMode.OIDC)try{s.authority.endSessionEndpoint}catch(o){if(null==(t=n.account)?void 0:t.homeAccountId)return this.browserStorage.removeAccount(null==(r=n.account)?void 0:r.homeAccountId),void this.eventHandler.emitEvent(EventType.LOGOUT_SUCCESS,InteractionType.Redirect,n)}const l=s.getLogoutUri(n);if(this.eventHandler.emitEvent(EventType.LOGOUT_SUCCESS,InteractionType.Redirect,n),!e||\"function\"!=typeof e.onRedirectNavigate)return this.browserStorage.getInteractionInProgress()||this.browserStorage.setInteractionInProgress(!0),void(await this.navigationClient.navigateExternal(l,a));if(!1!==e.onRedirectNavigate(l))return this.logger.verbose(\"Logout onRedirectNavigate did not return false, navigating\"),this.browserStorage.getInteractionInProgress()||this.browserStorage.setInteractionInProgress(!0),void(await this.navigationClient.navigateExternal(l,a));this.browserStorage.setInteractionInProgress(!1),this.logger.verbose(\"Logout onRedirectNavigate returned false, stopping navigation\")}catch(o){throw o instanceof AuthError&&(o.setCorrelationId(this.correlationId),i.cacheFailedRequest(o)),this.eventHandler.emitEvent(EventType.LOGOUT_FAILURE,InteractionType.Redirect,null,o),this.eventHandler.emitEvent(EventType.LOGOUT_END,InteractionType.Redirect),o}this.eventHandler.emitEvent(EventType.LOGOUT_END,InteractionType.Redirect)}getRedirectStartPage(e){const t=e||window.location.href;return UrlString.getAbsoluteUrl(t,getCurrentUri())}constructor(e,t,r,n,i,o,a,s,l,u){super(e,t,r,n,i,o,a,l,u),this.nativeStorage=s}}}});async function initiateAuthRequest(e,t,r,n,i){if(t.addQueueMeasurement(PerformanceEvents.SilentHandlerInitiateAuthRequest,n),!e)throw r.info(\"Navigate url is empty\"),createBrowserAuthError(emptyNavigateUri);return i?invokeAsync(loadFrame,PerformanceEvents.SilentHandlerLoadFrame,r,t,n)(e,i,t,n):invoke(loadFrameSync,PerformanceEvents.SilentHandlerLoadFrameSync,r,t,n)(e)}async function monitorIframeForHash(e,t,r,n,i,o,a){return n.addQueueMeasurement(PerformanceEvents.SilentHandlerMonitorIframeForHash,o),new Promise(((n,o)=>{t__left_angle_mark_DEFAULT_IFRAME_TIMEOUT_MS&&i.warning(`system.loadFrameTimeout or system.iframeHashTimeout set to lower (${t}ms) than the default (${DEFAULT_IFRAME_TIMEOUT_MS}ms). This may result in timeouts.`);const s=window.setTimeout((()=>{window.clearInterval(l),o(createBrowserAuthError(monitorWindowTimeout))}),t),l=window.setInterval((()=>{let t=\"\";const r=e.contentWindow;try{t=r?r.location.href:\"\"}catch(o){}if(!t||\"about:blank\"===t)return;let i=\"\";r&&(i=a===ServerResponseType.QUERY?r.location.search:r.location.hash),window.clearTimeout(s),window.clearInterval(l),n(i)}),r)})).finally((()=>{invoke(removeHiddenIframe,PerformanceEvents.RemoveHiddenIframe,i,n,o)(e)}))}function loadFrame(e,t,r,n){return r.addQueueMeasurement(PerformanceEvents.SilentHandlerLoadFrame,n),new Promise(((r,n)=>{const i=createHiddenIframe();window.setTimeout((()=>{i?(i.src=e,r(i)):n(\"Unable to load iframe\")}),t)}))}function loadFrameSync(e){const t=createHiddenIframe();return t.src=e,t}function createHiddenIframe(){const e=document.createElement(\"iframe\");return e.className=\"msalSilentIframe\",e.style.visibility=\"hidden\",e.style.position=\"absolute\",e.style.width=e.style.height=\"0\",e.style.border=\"0\",e.setAttribute(\"sandbox\",\"allow-scripts allow-same-origin allow-forms\"),document.body.appendChild(e),e}function removeHiddenIframe(e){document.body===e.parentNode&&document.body.removeChild(e)}var init_SilentHandler=__esm({\"../../node_modules/.pnpm/@azure+msal-browser@3.28.0/node_modules/@azure/msal-browser/dist/interaction_handler/SilentHandler.mjs\"(){init_globals(),init_index_browser(),init_BrowserAuthError(),init_Configuration(),init_BrowserAuthErrorCodes()}}),SilentIframeClient,init_SilentIframeClient=__esm({\"../../node_modules/.pnpm/@azure+msal-browser@3.28.0/node_modules/@azure/msal-browser/dist/interaction_client/SilentIframeClient.mjs\"(){init_globals(),init_index_browser(),init_StandardInteractionClient(),init_BrowserAuthError(),init_BrowserConstants(),init_SilentHandler(),init_NativeMessageHandler(),init_NativeInteractionClient(),init_InteractionHandler(),init_BrowserUtils(),init_ResponseHandler2(),init_BrowserAuthErrorCodes(),SilentIframeClient=class extends StandardInteractionClient{async acquireToken(e){this.performanceClient.addQueueMeasurement(PerformanceEvents.SilentIframeClientAcquireToken,e.correlationId),e.loginHint||e.sid||e.account&&e.account.username||this.logger.warning(\"No user hint provided. The authorization server may need more information to complete this request.\");const t={...e};t.prompt?t.prompt!==PromptValue.NONE&&t.prompt!==PromptValue.NO_SESSION&&(this.logger.warning(`SilentIframeClient. Replacing invalid prompt ${t.prompt} with ${PromptValue.NONE}`),t.prompt=PromptValue.NONE):t.prompt=PromptValue.NONE;const r=await invokeAsync(this.initializeAuthorizationRequest.bind(this),PerformanceEvents.StandardInteractionClientInitializeAuthorizationRequest,this.logger,this.performanceClient,e.correlationId)(t,InteractionType.Silent);preconnect(r.authority);const n=this.initializeServerTelemetryManager(this.apiId);let i;try{return i=await invokeAsync(this.createAuthCodeClient.bind(this),PerformanceEvents.StandardInteractionClientCreateAuthCodeClient,this.logger,this.performanceClient,e.correlationId)({serverTelemetryManager:n,requestAuthority:r.authority,requestAzureCloudOptions:r.azureCloudOptions,requestExtraQueryParameters:r.extraQueryParameters,account:r.account}),await invokeAsync(this.silentTokenHelper.bind(this),PerformanceEvents.SilentIframeClientTokenHelper,this.logger,this.performanceClient,e.correlationId)(i,r)}catch(o){if(o instanceof AuthError&&(o.setCorrelationId(this.correlationId),n.cacheFailedRequest(o)),!(i&&o instanceof AuthError&&o.errorCode===BrowserConstants.INVALID_GRANT_ERROR))throw o;this.performanceClient.addFields({retryError:o.errorCode},this.correlationId);const r=await invokeAsync(this.initializeAuthorizationRequest.bind(this),PerformanceEvents.StandardInteractionClientInitializeAuthorizationRequest,this.logger,this.performanceClient,e.correlationId)(t,InteractionType.Silent);return await invokeAsync(this.silentTokenHelper.bind(this),PerformanceEvents.SilentIframeClientTokenHelper,this.logger,this.performanceClient,this.correlationId)(i,r)}}logout(){return Promise.reject(createBrowserAuthError(silentLogoutUnsupported))}async silentTokenHelper(e,t){const r=t.correlationId;this.performanceClient.addQueueMeasurement(PerformanceEvents.SilentIframeClientTokenHelper,r);const n=await invokeAsync(this.initializeAuthorizationCodeRequest.bind(this),PerformanceEvents.StandardInteractionClientInitializeAuthorizationCodeRequest,this.logger,this.performanceClient,r)(t),i=await invokeAsync(e.getAuthCodeUrl.bind(e),PerformanceEvents.GetAuthCodeUrl,this.logger,this.performanceClient,r)({...t,nativeBroker:NativeMessageHandler.isNativeAvailable(this.config,this.logger,this.nativeMessageHandler,t.authenticationScheme)}),o=new InteractionHandler(e,this.browserStorage,n,this.logger,this.performanceClient),a=await invokeAsync(initiateAuthRequest,PerformanceEvents.SilentHandlerInitiateAuthRequest,this.logger,this.performanceClient,r)(i,this.performanceClient,this.logger,r,this.config.system.navigateFrameWait),s=this.config.auth.OIDCOptions.serverResponseType,l=await invokeAsync(monitorIframeForHash,PerformanceEvents.SilentHandlerMonitorIframeForHash,this.logger,this.performanceClient,r)(a,this.config.system.iframeHashTimeout,this.config.system.pollIntervalMilliseconds,this.performanceClient,this.logger,r,s),u=invoke(deserializeResponse,PerformanceEvents.DeserializeResponse,this.logger,this.performanceClient,this.correlationId)(l,s,this.logger);if(u.accountId){if(this.logger.verbose(\"Account id found in hash, calling WAM for token\"),!this.nativeMessageHandler)throw createBrowserAuthError(nativeConnectionNotEstablished);const e=new NativeInteractionClient(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.apiId,this.performanceClient,this.nativeMessageHandler,u.accountId,this.browserStorage,r),{userRequestState:n}=ProtocolUtils.parseRequestState(this.browserCrypto,t.state);return invokeAsync(e.acquireToken.bind(e),PerformanceEvents.NativeInteractionClientAcquireToken,this.logger,this.performanceClient,r)({...t,state:n,prompt:t.prompt||PromptValue.NONE})}return invokeAsync(o.handleCodeResponse.bind(o),PerformanceEvents.HandleCodeResponse,this.logger,this.performanceClient,r)(u,t)}constructor(e,t,r,n,i,o,a,s,l,u,c){super(e,t,r,n,i,o,s,u,c),this.apiId=a,this.nativeStorage=l}}}}),SilentRefreshClient,init_SilentRefreshClient=__esm({\"../../node_modules/.pnpm/@azure+msal-browser@3.28.0/node_modules/@azure/msal-browser/dist/interaction_client/SilentRefreshClient.mjs\"(){init_globals(),init_StandardInteractionClient(),init_index_browser(),init_BrowserConstants(),init_BrowserAuthError(),init_RequestHelpers(),init_BrowserAuthErrorCodes(),SilentRefreshClient=class extends StandardInteractionClient{async acquireToken(e){this.performanceClient.addQueueMeasurement(PerformanceEvents.SilentRefreshClientAcquireToken,e.correlationId);const t=await invokeAsync(initializeBaseRequest,PerformanceEvents.InitializeBaseRequest,this.logger,this.performanceClient,e.correlationId)(e,this.config,this.performanceClient,this.logger),r={...e,...t};e.redirectUri&&(r.redirectUri=this.getRedirectUri(e.redirectUri));const n=this.initializeServerTelemetryManager(ApiId.acquireTokenSilent_silentFlow),i=await this.createRefreshTokenClient({serverTelemetryManager:n,authorityUrl:r.authority,azureCloudOptions:r.azureCloudOptions,account:r.account});return invokeAsync(i.acquireTokenByRefreshToken.bind(i),PerformanceEvents.RefreshTokenClientAcquireTokenByRefreshToken,this.logger,this.performanceClient,e.correlationId)(r).catch((e=>{throw e.setCorrelationId(this.correlationId),n.cacheFailedRequest(e),e}))}logout(){return Promise.reject(createBrowserAuthError(silentLogoutUnsupported))}async createRefreshTokenClient(e){const t=await invokeAsync(this.getClientConfiguration.bind(this),PerformanceEvents.StandardInteractionClientGetClientConfiguration,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:e.serverTelemetryManager,requestAuthority:e.authorityUrl,requestAzureCloudOptions:e.azureCloudOptions,requestExtraQueryParameters:e.extraQueryParameters,account:e.account});return new RefreshTokenClient(t,this.performanceClient)}}}}),TokenCache,init_TokenCache=__esm({\"../../node_modules/.pnpm/@azure+msal-browser@3.28.0/node_modules/@azure/msal-browser/dist/cache/TokenCache.mjs\"(){init_globals(),init_index_browser(),init_BrowserAuthError(),init_Base64Decode(),init_BrowserCrypto(),init_BrowserAuthErrorCodes(),TokenCache=class{loadExternalTokens(e,t,r){if(!this.isBrowserEnvironment)throw createBrowserAuthError(nonBrowserEnvironment);const n=t.id_token?AuthToken_exports.extractTokenClaims(t.id_token,base64Decode):void 0,i={protocolMode:this.config.auth.protocolMode,knownAuthorities:this.config.auth.knownAuthorities,cloudDiscoveryMetadata:this.config.auth.cloudDiscoveryMetadata,authorityMetadata:this.config.auth.authorityMetadata,skipAuthorityMetadataCache:this.config.auth.skipAuthorityMetadataCache},o=e.authority?new Authority(Authority.generateAuthority(e.authority,e.azureCloudOptions),this.config.system.networkClient,this.storage,i,this.logger,e.correlationId||createNewGuid()):void 0,a=this.loadAccount(e,r.clientInfo||t.client_info||\"\",n,o),s=this.loadIdToken(t,a.homeAccountId,a.environment,a.realm),l=this.loadAccessToken(e,t,a.homeAccountId,a.environment,a.realm,r),u=this.loadRefreshToken(t,a.homeAccountId,a.environment);return this.generateAuthenticationResult(e,{account:a,idToken:s,accessToken:l,refreshToken:u},n,o)}loadAccount(e,t,r,n){if(this.logger.verbose(\"TokenCache - loading account\"),e.account){const t=AccountEntity.createFromAccountInfo(e.account);return this.storage.setAccount(t),t}if(!n||!t&&!r)throw this.logger.error(\"TokenCache - if an account is not provided on the request, authority and either clientInfo or idToken must be provided instead.\"),createBrowserAuthError(unableToLoadToken);const i=AccountEntity.generateHomeAccountId(t,n.authorityType,this.logger,this.cryptoObj,r),o=null==r?void 0:r.tid,a=buildAccountToCache(this.storage,n,i,base64Decode,r,t,n.hostnameAndPort,o,void 0,void 0,this.logger);return this.storage.setAccount(a),a}loadIdToken(e,t,r,n){if(!e.id_token)return this.logger.verbose(\"TokenCache - no id token found in response\"),null;this.logger.verbose(\"TokenCache - loading id token\");const i=CacheHelpers_exports.createIdTokenEntity(t,r,e.id_token,this.config.auth.clientId,n);return this.storage.setIdTokenCredential(i),i}loadAccessToken(e,t,r,n,i,o){if(!t.access_token)return this.logger.verbose(\"TokenCache - no access token found in response\"),null;if(!t.expires_in)return this.logger.error(\"TokenCache - no expiration set on the access token. Cannot add it to the cache.\"),null;if(!(t.scope||e.scopes&&e.scopes.length))return this.logger.error(\"TokenCache - scopes not specified in the request or response. Cannot add token to the cache.\"),null;this.logger.verbose(\"TokenCache - loading access token\");const a=t.scope?ScopeSet.fromString(t.scope):new ScopeSet(e.scopes),s=o.expiresOn||t.expires_in+(new Date).getTime()/1e3,l=o.extendedExpiresOn||(t.ext_expires_in||t.expires_in)+(new Date).getTime()/1e3,u=CacheHelpers_exports.createAccessTokenEntity(r,n,t.access_token,this.config.auth.clientId,i,a.printScopes(),s,l,base64Decode);return this.storage.setAccessTokenCredential(u),u}loadRefreshToken(e,t,r){if(!e.refresh_token)return this.logger.verbose(\"TokenCache - no refresh token found in response\"),null;this.logger.verbose(\"TokenCache - loading refresh token\");const n=CacheHelpers_exports.createRefreshTokenEntity(t,r,e.refresh_token,this.config.auth.clientId,e.foci,void 0,e.refresh_token_expires_in);return this.storage.setRefreshTokenCredential(n),n}generateAuthenticationResult(e,t,r,n){var i,o,a;let s,l=\"\",u=[],c=null;(null==t?void 0:t.accessToken)&&(l=t.accessToken.secret,u=ScopeSet.fromString(t.accessToken.target).asArray(),c=new Date(1e3*Number(t.accessToken.expiresOn)),s=new Date(1e3*Number(t.accessToken.extendedExpiresOn)));const d=t.account;return{authority:n?n.canonicalAuthority:\"\",uniqueId:t.account.localAccountId,tenantId:t.account.realm,scopes:u,account:d.getAccountInfo(),idToken:(null==(i=t.idToken)?void 0:i.secret)||\"\",idTokenClaims:r||{},accessToken:l,fromCache:!0,expiresOn:c,correlationId:e.correlationId||\"\",requestId:\"\",extExpiresOn:s,familyId:(null==(o=t.refreshToken)?void 0:o.familyId)||\"\",tokenType:(null==(a=null==t?void 0:t.accessToken)?void 0:a.tokenType)||\"\",state:e.state||\"\",cloudGraphHostName:d.cloudGraphHostName||\"\",msGraphHost:d.msGraphHost||\"\",fromNativeBroker:!1}}constructor(e,t,r,n){this.isBrowserEnvironment=\"undefined\"!=typeof window,this.config=e,this.storage=t,this.logger=r,this.cryptoObj=n}}}}),HybridSpaAuthorizationCodeClient,init_HybridSpaAuthorizationCodeClient=__esm({\"../../node_modules/.pnpm/@azure+msal-browser@3.28.0/node_modules/@azure/msal-browser/dist/interaction_client/HybridSpaAuthorizationCodeClient.mjs\"(){init_globals(),init_index_browser(),HybridSpaAuthorizationCodeClient=class extends AuthorizationCodeClient{constructor(e){super(e),this.includeRedirectUri=!1}}}}),SilentAuthCodeClient,init_SilentAuthCodeClient=__esm({\"../../node_modules/.pnpm/@azure+msal-browser@3.28.0/node_modules/@azure/msal-browser/dist/interaction_client/SilentAuthCodeClient.mjs\"(){init_globals(),init_index_browser(),init_StandardInteractionClient(),init_BrowserAuthError(),init_BrowserConstants(),init_HybridSpaAuthorizationCodeClient(),init_InteractionHandler(),init_BrowserAuthErrorCodes(),SilentAuthCodeClient=class extends StandardInteractionClient{async acquireToken(e){if(!e.code)throw createBrowserAuthError(authCodeRequired);const t=await invokeAsync(this.initializeAuthorizationRequest.bind(this),PerformanceEvents.StandardInteractionClientInitializeAuthorizationRequest,this.logger,this.performanceClient,e.correlationId)(e,InteractionType.Silent),r=this.initializeServerTelemetryManager(this.apiId);try{const n={...t,code:e.code},i=await invokeAsync(this.getClientConfiguration.bind(this),PerformanceEvents.StandardInteractionClientGetClientConfiguration,this.logger,this.performanceClient,e.correlationId)({serverTelemetryManager:r,requestAuthority:t.authority,requestAzureCloudOptions:t.azureCloudOptions,requestExtraQueryParameters:t.extraQueryParameters,account:t.account}),o=new HybridSpaAuthorizationCodeClient(i);this.logger.verbose(\"Auth code client created\");const a=new InteractionHandler(o,this.browserStorage,n,this.logger,this.performanceClient);return await invokeAsync(a.handleCodeResponseFromServer.bind(a),PerformanceEvents.HandleCodeResponseFromServer,this.logger,this.performanceClient,e.correlationId)({code:e.code,msgraph_host:e.msGraphHost,cloud_graph_host_name:e.cloudGraphHostName,cloud_instance_host_name:e.cloudInstanceHostName},t,!1)}catch(n){throw n instanceof AuthError&&(n.setCorrelationId(this.correlationId),r.cacheFailedRequest(n)),n}}logout(){return Promise.reject(createBrowserAuthError(silentLogoutUnsupported))}constructor(e,t,r,n,i,o,a,s,l,u){super(e,t,r,n,i,o,s,l,u),this.apiId=a}}}}),StandardController;function getAccountType(e){const t=null==e?void 0:e.idTokenClaims;return(null==t?void 0:t.tfp)||(null==t?void 0:t.acr)?\"B2C\":(null==t?void 0:t.tid)?\"9188040d-6c67-4c5b-b112-36a304b66dad\"===(null==t?void 0:t.tid)?\"MSA\":\"AAD\":void 0}function preflightCheck2(e,t){try{preflightCheck(e)}catch(r){throw t.end({success:!1},r),r}}function checkIfRefreshTokenErrorCanBeResolvedSilently(e,t){const r=!(e instanceof InteractionRequiredAuthError&&e.subError!==InteractionRequiredAuthErrorCodes_exports.badToken),n=e.errorCode===BrowserConstants.INVALID_GRANT_ERROR||e.errorCode===ClientAuthErrorCodes_exports.tokenRefreshRequired,i=r&&n||e.errorCode===InteractionRequiredAuthErrorCodes_exports.noTokensFound||e.errorCode===InteractionRequiredAuthErrorCodes_exports.refreshTokenExpired,o=iFrameRenewalPolicies.includes(t);return i&&o}var init_StandardController=__esm({\"../../node_modules/.pnpm/@azure+msal-browser@3.28.0/node_modules/@azure/msal-browser/dist/controllers/StandardController.mjs\"(){init_globals(),init_CryptoOps(),init_index_browser(),init_BrowserCacheManager(),init_AccountManager(),init_BrowserConstants(),init_BrowserUtils(),init_EventType(),init_EventHandler(),init_PopupClient(),init_RedirectClient(),init_SilentIframeClient(),init_SilentRefreshClient(),init_TokenCache(),init_NativeInteractionClient(),init_NativeMessageHandler(),init_NativeAuthError(),init_SilentCacheClient(),init_SilentAuthCodeClient(),init_BrowserAuthError(),init_BrowserCrypto(),init_RequestHelpers(),init_BrowserAuthErrorCodes(),StandardController=class e{static async createController(t,r){const n=new e(t);return await n.initialize(r),n}trackPageVisibility(e){e&&(this.logger.info(\"Perf: Visibility change detected\"),this.performanceClient.incrementFields({visibilityChangeCount:1},e))}async initialize(e){if(this.logger.trace(\"initialize called\"),this.initialized)return void this.logger.info(\"initialize has already been called, exiting early.\");if(!this.isBrowserEnvironment)return this.logger.info(\"in non-browser environment, exiting early.\"),this.initialized=!0,void this.eventHandler.emitEvent(EventType.INITIALIZE_END);const t=(null==e?void 0:e.correlationId)||this.getRequestCorrelationId(),r=this.config.system.allowNativeBroker,n=this.performanceClient.startMeasurement(PerformanceEvents.InitializeClientApplication,t);if(this.eventHandler.emitEvent(EventType.INITIALIZE_START),r)try{this.nativeExtensionProvider=await NativeMessageHandler.createProvider(this.logger,this.config.system.nativeBrokerHandshakeTimeout,this.performanceClient)}catch(i){this.logger.verbose(i)}this.config.cache.claimsBasedCachingEnabled||(this.logger.verbose(\"Claims-based caching is disabled. Clearing the previous cache with claims\"),await invokeAsync(this.browserStorage.clearTokensAndKeysWithClaims.bind(this.browserStorage),PerformanceEvents.ClearTokensAndKeysWithClaims,this.logger,this.performanceClient,t)(this.performanceClient,t)),this.initialized=!0,this.eventHandler.emitEvent(EventType.INITIALIZE_END),n.end({allowNativeBroker:r,success:!0})}async handleRedirectPromise(e){if(this.logger.verbose(\"handleRedirectPromise called\"),blockAPICallsBeforeInitialize(this.initialized),this.isBrowserEnvironment){const t=e||\"\";let r=this.redirectResponse.get(t);return void 0===r?(r=this.handleRedirectPromiseInternal(e),this.redirectResponse.set(t,r),this.logger.verbose(\"handleRedirectPromise has been called for the first time, storing the promise\")):this.logger.verbose(\"handleRedirectPromise has been called previously, returning the result from the first call\"),r}return this.logger.verbose(\"handleRedirectPromise returns null, not browser environment\"),null}async handleRedirectPromiseInternal(e){const t=this.getAllAccounts(),r=this.browserStorage.getCachedNativeRequest(),n=r&&NativeMessageHandler.isNativeAvailable(this.config,this.logger,this.nativeExtensionProvider)&&this.nativeExtensionProvider&&!e,i=n?null==r?void 0:r.correlationId:this.browserStorage.getTemporaryCache(TemporaryCacheKeys.CORRELATION_ID,!0)||\"\",o=this.performanceClient.startMeasurement(PerformanceEvents.AcquireTokenRedirect,i);let a;if(this.eventHandler.emitEvent(EventType.HANDLE_REDIRECT_START,InteractionType.Redirect),n&&this.nativeExtensionProvider){this.logger.trace(\"handleRedirectPromise - acquiring token from native platform\");const e=new NativeInteractionClient(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,ApiId.handleRedirectPromise,this.performanceClient,this.nativeExtensionProvider,r.accountId,this.nativeInternalStorage,r.correlationId);a=invokeAsync(e.handleRedirectPromise.bind(e),PerformanceEvents.HandleNativeRedirectPromiseMeasurement,this.logger,this.performanceClient,o.event.correlationId)(this.performanceClient,o.event.correlationId)}else{this.logger.trace(\"handleRedirectPromise - acquiring token from web flow\");const t=this.createRedirectClient(i);a=invokeAsync(t.handleRedirectPromise.bind(t),PerformanceEvents.HandleRedirectPromiseMeasurement,this.logger,this.performanceClient,o.event.correlationId)(e,o)}return a.then((e=>(e?(t.length__left_angle_mark_this.getAllAccounts().length?(this.eventHandler.emitEvent(EventType.LOGIN_SUCCESS,InteractionType.Redirect,e),this.logger.verbose(\"handleRedirectResponse returned result, login success\")):(this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_SUCCESS,InteractionType.Redirect,e),this.logger.verbose(\"handleRedirectResponse returned result, acquire token success\")),o.end({success:!0,accountType:getAccountType(e.account)})):o.event.errorCode?o.end({success:!1}):o.discard(),this.eventHandler.emitEvent(EventType.HANDLE_REDIRECT_END,InteractionType.Redirect),e))).catch((e=>{const r=e;throw t.length>0?this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_FAILURE,InteractionType.Redirect,null,r):this.eventHandler.emitEvent(EventType.LOGIN_FAILURE,InteractionType.Redirect,null,r),this.eventHandler.emitEvent(EventType.HANDLE_REDIRECT_END,InteractionType.Redirect),o.end({success:!1},r),e}))}async acquireTokenRedirect(e){const t=this.getRequestCorrelationId(e);this.logger.verbose(\"acquireTokenRedirect called\",t);const r=this.performanceClient.startMeasurement(PerformanceEvents.AcquireTokenPreRedirect,t);r.add({accountType:getAccountType(e.account),scenarioId:e.scenarioId});const n=e.onRedirectNavigate;if(n)e.onRedirectNavigate=e=>{const t=\"function\"==typeof n?n(e):void 0;return!1!==t?r.end({success:!0}):r.discard(),t};else{const e=this.config.auth.onRedirectNavigate;this.config.auth.onRedirectNavigate=t=>{const n=\"function\"==typeof e?e(t):void 0;return!1!==n?r.end({success:!0}):r.discard(),n}}const i=this.getAllAccounts().length>0;try{let n;return redirectPreflightCheck(this.initialized,this.config),this.browserStorage.setInteractionInProgress(!0),i?this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_START,InteractionType.Redirect,e):this.eventHandler.emitEvent(EventType.LOGIN_START,InteractionType.Redirect,e),n=this.nativeExtensionProvider&&this.canUseNative(e)?new NativeInteractionClient(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,ApiId.acquireTokenRedirect,this.performanceClient,this.nativeExtensionProvider,this.getNativeAccountId(e),this.nativeInternalStorage,t).acquireTokenRedirect(e,r).catch((r=>{if(r instanceof NativeAuthError&&isFatalNativeAuthError(r))return this.nativeExtensionProvider=void 0,this.createRedirectClient(t).acquireToken(e);if(r instanceof InteractionRequiredAuthError)return this.logger.verbose(\"acquireTokenRedirect - Resolving interaction required error thrown by native broker by falling back to web flow\"),this.createRedirectClient(t).acquireToken(e);throw this.browserStorage.setInteractionInProgress(!1),r})):this.createRedirectClient(t).acquireToken(e),await n}catch(o){throw r.end({success:!1},o),i?this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_FAILURE,InteractionType.Redirect,null,o):this.eventHandler.emitEvent(EventType.LOGIN_FAILURE,InteractionType.Redirect,null,o),o}}acquireTokenPopup(e){const t=this.getRequestCorrelationId(e),r=this.performanceClient.startMeasurement(PerformanceEvents.AcquireTokenPopup,t);r.add({scenarioId:e.scenarioId,accountType:getAccountType(e.account)});try{this.logger.verbose(\"acquireTokenPopup called\",t),preflightCheck2(this.initialized,r),this.browserStorage.setInteractionInProgress(!0)}catch(o){return Promise.reject(o)}const n=this.getAllAccounts();let i;return n.length>0?this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_START,InteractionType.Popup,e):this.eventHandler.emitEvent(EventType.LOGIN_START,InteractionType.Popup,e),i=this.canUseNative(e)?this.acquireTokenNative({...e,correlationId:t},ApiId.acquireTokenPopup).then((e=>(this.browserStorage.setInteractionInProgress(!1),r.end({success:!0,isNativeBroker:!0,accountType:getAccountType(e.account)}),e))).catch((r=>{if(r instanceof NativeAuthError&&isFatalNativeAuthError(r))return this.nativeExtensionProvider=void 0,this.createPopupClient(t).acquireToken(e);if(r instanceof InteractionRequiredAuthError)return this.logger.verbose(\"acquireTokenPopup - Resolving interaction required error thrown by native broker by falling back to web flow\"),this.createPopupClient(t).acquireToken(e);throw this.browserStorage.setInteractionInProgress(!1),r})):this.createPopupClient(t).acquireToken(e),i.then((e=>(n.length__left_angle_mark_this.getAllAccounts().length?this.eventHandler.emitEvent(EventType.LOGIN_SUCCESS,InteractionType.Popup,e):this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_SUCCESS,InteractionType.Popup,e),r.end({success:!0,accessTokenSize:e.accessToken.length,idTokenSize:e.idToken.length,accountType:getAccountType(e.account)}),e))).catch((e=>(n.length>0?this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_FAILURE,InteractionType.Popup,null,e):this.eventHandler.emitEvent(EventType.LOGIN_FAILURE,InteractionType.Popup,null,e),r.end({success:!1},e),Promise.reject(e))))}trackPageVisibilityWithMeasurement(){const e=this.ssoSilentMeasurement||this.acquireTokenByCodeAsyncMeasurement;e&&(this.logger.info(\"Perf: Visibility change detected in \",e.event.name),e.increment({visibilityChangeCount:1}))}async ssoSilent(e){var t,r;const n=this.getRequestCorrelationId(e),i={...e,prompt:e.prompt,correlationId:n};let o;return this.ssoSilentMeasurement=this.performanceClient.startMeasurement(PerformanceEvents.SsoSilent,n),null==(t=this.ssoSilentMeasurement)||t.add({scenarioId:e.scenarioId,accountType:getAccountType(e.account)}),preflightCheck2(this.initialized,this.ssoSilentMeasurement),null==(r=this.ssoSilentMeasurement)||r.increment({visibilityChangeCount:0}),document.addEventListener(\"visibilitychange\",this.trackPageVisibilityWithMeasurement),this.logger.verbose(\"ssoSilent called\",n),this.eventHandler.emitEvent(EventType.SSO_SILENT_START,InteractionType.Silent,i),o=this.canUseNative(i)?this.acquireTokenNative(i,ApiId.ssoSilent).catch((e=>{if(e instanceof NativeAuthError&&isFatalNativeAuthError(e))return this.nativeExtensionProvider=void 0,this.createSilentIframeClient(i.correlationId).acquireToken(i);throw e})):this.createSilentIframeClient(i.correlationId).acquireToken(i),o.then((e=>{var t;return this.eventHandler.emitEvent(EventType.SSO_SILENT_SUCCESS,InteractionType.Silent,e),null==(t=this.ssoSilentMeasurement)||t.end({success:!0,isNativeBroker:e.fromNativeBroker,accessTokenSize:e.accessToken.length,idTokenSize:e.idToken.length,accountType:getAccountType(e.account)}),e})).catch((e=>{var t;throw this.eventHandler.emitEvent(EventType.SSO_SILENT_FAILURE,InteractionType.Silent,null,e),null==(t=this.ssoSilentMeasurement)||t.end({success:!1},e),e})).finally((()=>{document.removeEventListener(\"visibilitychange\",this.trackPageVisibilityWithMeasurement)}))}async acquireTokenByCode(e){const t=this.getRequestCorrelationId(e);this.logger.trace(\"acquireTokenByCode called\",t);const r=this.performanceClient.startMeasurement(PerformanceEvents.AcquireTokenByCode,t);preflightCheck2(this.initialized,r),this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_BY_CODE_START,InteractionType.Silent,e),r.add({scenarioId:e.scenarioId});try{if(e.code&&e.nativeAccountId)throw createBrowserAuthError(spaCodeAndNativeAccountIdPresent);if(e.code){const n=e.code;let i=this.hybridAuthCodeResponses.get(n);return i?(this.logger.verbose(\"Existing acquireTokenByCode request found\",t),r.discard()):(this.logger.verbose(\"Initiating new acquireTokenByCode request\",t),i=this.acquireTokenByCodeAsync({...e,correlationId:t}).then((e=>(this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_BY_CODE_SUCCESS,InteractionType.Silent,e),this.hybridAuthCodeResponses.delete(n),r.end({success:!0,isNativeBroker:e.fromNativeBroker,accessTokenSize:e.accessToken.length,idTokenSize:e.idToken.length,accountType:getAccountType(e.account)}),e))).catch((e=>{throw this.hybridAuthCodeResponses.delete(n),this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_BY_CODE_FAILURE,InteractionType.Silent,null,e),r.end({success:!1},e),e})),this.hybridAuthCodeResponses.set(n,i)),await i}if(e.nativeAccountId){if(this.canUseNative(e,e.nativeAccountId)){const n=await this.acquireTokenNative({...e,correlationId:t},ApiId.acquireTokenByCode,e.nativeAccountId).catch((e=>{throw e instanceof NativeAuthError&&isFatalNativeAuthError(e)&&(this.nativeExtensionProvider=void 0),e}));return r.end({accountType:getAccountType(n.account),success:!0}),n}throw createBrowserAuthError(unableToAcquireTokenFromNativePlatform)}throw createBrowserAuthError(authCodeOrNativeAccountIdRequired)}catch(n){throw this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_BY_CODE_FAILURE,InteractionType.Silent,null,n),r.end({success:!1},n),n}}async acquireTokenByCodeAsync(e){var t;this.logger.trace(\"acquireTokenByCodeAsync called\",e.correlationId),this.acquireTokenByCodeAsyncMeasurement=this.performanceClient.startMeasurement(PerformanceEvents.AcquireTokenByCodeAsync,e.correlationId),null==(t=this.acquireTokenByCodeAsyncMeasurement)||t.increment({visibilityChangeCount:0}),document.addEventListener(\"visibilitychange\",this.trackPageVisibilityWithMeasurement);const r=this.createSilentAuthCodeClient(e.correlationId);return await r.acquireToken(e).then((e=>{var t;return null==(t=this.acquireTokenByCodeAsyncMeasurement)||t.end({success:!0,fromCache:e.fromCache,isNativeBroker:e.fromNativeBroker}),e})).catch((e=>{var t;throw null==(t=this.acquireTokenByCodeAsyncMeasurement)||t.end({success:!1},e),e})).finally((()=>{document.removeEventListener(\"visibilitychange\",this.trackPageVisibilityWithMeasurement)}))}async acquireTokenFromCache(e,t){switch(this.performanceClient.addQueueMeasurement(PerformanceEvents.AcquireTokenFromCache,e.correlationId),t){case CacheLookupPolicy.Default:case CacheLookupPolicy.AccessToken:case CacheLookupPolicy.AccessTokenAndRefreshToken:const t=this.createSilentCacheClient(e.correlationId);return invokeAsync(t.acquireToken.bind(t),PerformanceEvents.SilentCacheClientAcquireToken,this.logger,this.performanceClient,e.correlationId)(e);default:throw createClientAuthError(ClientAuthErrorCodes_exports.tokenRefreshRequired)}}async acquireTokenByRefreshToken(e,t){switch(this.performanceClient.addQueueMeasurement(PerformanceEvents.AcquireTokenByRefreshToken,e.correlationId),t){case CacheLookupPolicy.Default:case CacheLookupPolicy.AccessTokenAndRefreshToken:case CacheLookupPolicy.RefreshToken:case CacheLookupPolicy.RefreshTokenAndNetwork:const t=this.createSilentRefreshClient(e.correlationId);return invokeAsync(t.acquireToken.bind(t),PerformanceEvents.SilentRefreshClientAcquireToken,this.logger,this.performanceClient,e.correlationId)(e);default:throw createClientAuthError(ClientAuthErrorCodes_exports.tokenRefreshRequired)}}async acquireTokenBySilentIframe(e){this.performanceClient.addQueueMeasurement(PerformanceEvents.AcquireTokenBySilentIframe,e.correlationId);const t=this.createSilentIframeClient(e.correlationId);return invokeAsync(t.acquireToken.bind(t),PerformanceEvents.SilentIframeClientAcquireToken,this.logger,this.performanceClient,e.correlationId)(e)}async logout(e){const t=this.getRequestCorrelationId(e);return this.logger.warning(\"logout API is deprecated and will be removed in msal-browser v3.0.0. Use logoutRedirect instead.\",t),this.logoutRedirect({correlationId:t,...e})}async logoutRedirect(e){const t=this.getRequestCorrelationId(e);return redirectPreflightCheck(this.initialized,this.config),this.browserStorage.setInteractionInProgress(!0),this.createRedirectClient(t).logout(e)}logoutPopup(e){try{const t=this.getRequestCorrelationId(e);return preflightCheck(this.initialized),this.browserStorage.setInteractionInProgress(!0),this.createPopupClient(t).logout(e)}catch(t){return Promise.reject(t)}}async clearCache(e){if(!this.isBrowserEnvironment)return void this.logger.info(\"in non-browser environment, returning early.\");const t=this.getRequestCorrelationId(e);return this.createSilentCacheClient(t).logout(e)}getAllAccounts(e){return getAllAccounts(this.logger,this.browserStorage,this.isBrowserEnvironment,e)}getAccount(e){return getAccount(e,this.logger,this.browserStorage)}getAccountByUsername(e){return getAccountByUsername(e,this.logger,this.browserStorage)}getAccountByHomeId(e){return getAccountByHomeId(e,this.logger,this.browserStorage)}getAccountByLocalId(e){return getAccountByLocalId(e,this.logger,this.browserStorage)}setActiveAccount(e){setActiveAccount(e,this.browserStorage)}getActiveAccount(){return getActiveAccount(this.browserStorage)}async hydrateCache(e,t){this.logger.verbose(\"hydrateCache called\");const r=AccountEntity.createFromAccountInfo(e.account,e.cloudGraphHostName,e.msGraphHost);return this.browserStorage.setAccount(r),e.fromNativeBroker?(this.logger.verbose(\"Response was from native broker, storing in-memory\"),this.nativeInternalStorage.hydrateCache(e,t)):this.browserStorage.hydrateCache(e,t)}async acquireTokenNative(e,t,r){if(this.logger.trace(\"acquireTokenNative called\"),!this.nativeExtensionProvider)throw createBrowserAuthError(nativeConnectionNotEstablished);return new NativeInteractionClient(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,t,this.performanceClient,this.nativeExtensionProvider,r||this.getNativeAccountId(e),this.nativeInternalStorage,e.correlationId).acquireToken(e)}canUseNative(e,t){if(this.logger.trace(\"canUseNative called\"),!NativeMessageHandler.isNativeAvailable(this.config,this.logger,this.nativeExtensionProvider,e.authenticationScheme))return this.logger.trace(\"canUseNative: isNativeAvailable returned false, returning false\"),!1;if(e.prompt)switch(e.prompt){case PromptValue.NONE:case PromptValue.CONSENT:case PromptValue.LOGIN:this.logger.trace(\"canUseNative: prompt is compatible with native flow\");break;default:return this.logger.trace(`canUseNative: prompt = ${e.prompt} is not compatible with native flow, returning false`),!1}return!(!t&&!this.getNativeAccountId(e)&&(this.logger.trace(\"canUseNative: nativeAccountId is not available, returning false\"),1))}getNativeAccountId(e){const t=e.account||this.getAccount({loginHint:e.loginHint,sid:e.sid})||this.getActiveAccount();return t&&t.nativeAccountId||\"\"}createPopupClient(e){return new PopupClient(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeInternalStorage,this.nativeExtensionProvider,e)}createRedirectClient(e){return new RedirectClient(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeInternalStorage,this.nativeExtensionProvider,e)}createSilentIframeClient(e){return new SilentIframeClient(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,ApiId.ssoSilent,this.performanceClient,this.nativeInternalStorage,this.nativeExtensionProvider,e)}createSilentCacheClient(e){return new SilentCacheClient(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeExtensionProvider,e)}createSilentRefreshClient(e){return new SilentRefreshClient(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeExtensionProvider,e)}createSilentAuthCodeClient(e){return new SilentAuthCodeClient(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,ApiId.acquireTokenByCode,this.performanceClient,this.nativeExtensionProvider,e)}addEventCallback(e,t){return this.eventHandler.addEventCallback(e,t)}removeEventCallback(e){this.eventHandler.removeEventCallback(e)}addPerformanceCallback(e){return blockNonBrowserEnvironment(),this.performanceClient.addPerformanceCallback(e)}removePerformanceCallback(e){return this.performanceClient.removePerformanceCallback(e)}enableAccountStorageEvents(){\"undefined\"!=typeof window&&(this.listeningToStorageEvents?this.logger.verbose(\"Account storage listener already registered.\"):(this.logger.verbose(\"Adding account storage listener.\"),this.listeningToStorageEvents=!0,window.addEventListener(\"storage\",this.handleAccountCacheChange)))}disableAccountStorageEvents(){\"undefined\"!=typeof window&&(this.listeningToStorageEvents?(this.logger.verbose(\"Removing account storage listener.\"),window.removeEventListener(\"storage\",this.handleAccountCacheChange),this.listeningToStorageEvents=!1):this.logger.verbose(\"No account storage listener registered.\"))}handleAccountCacheChange(e){var t;try{(null==(t=e.key)?void 0:t.includes(PersistentCacheKeys.ACTIVE_ACCOUNT_FILTERS))&&this.eventHandler.emitEvent(EventType.ACTIVE_ACCOUNT_CHANGED);const r=e.newValue||e.oldValue;if(!r)return;const n=JSON.parse(r);if(\"object\"!=typeof n||!AccountEntity.isAccountEntity(n))return;const i=CacheManager.toObject(new AccountEntity,n).getAccountInfo();!e.oldValue&&e.newValue?(this.logger.info(\"Account was added to cache in a different window\"),this.eventHandler.emitEvent(EventType.ACCOUNT_ADDED,void 0,i)):!e.newValue&&e.oldValue&&(this.logger.info(\"Account was removed from cache in a different window\"),this.eventHandler.emitEvent(EventType.ACCOUNT_REMOVED,void 0,i))}catch(r){return}}getTokenCache(){return this.tokenCache}getLogger(){return this.logger}setLogger(e){this.logger=e}initializeWrapperLibrary(e,t){this.browserStorage.setWrapperMetadata(e,t)}setNavigationClient(e){this.navigationClient=e}getConfiguration(){return this.config}getPerformanceClient(){return this.performanceClient}isBrowserEnv(){return this.isBrowserEnvironment}getRequestCorrelationId(e){return(null==e?void 0:e.correlationId)?e.correlationId:this.isBrowserEnvironment?createNewGuid():Constants.EMPTY_STRING}async loginRedirect(e){const t=this.getRequestCorrelationId(e);return this.logger.verbose(\"loginRedirect called\",t),this.acquireTokenRedirect({correlationId:t,...e||DEFAULT_REQUEST})}loginPopup(e){const t=this.getRequestCorrelationId(e);return this.logger.verbose(\"loginPopup called\",t),this.acquireTokenPopup({correlationId:t,...e||DEFAULT_REQUEST})}async acquireTokenSilent(e){const t=this.getRequestCorrelationId(e),r=this.performanceClient.startMeasurement(PerformanceEvents.AcquireTokenSilent,t);r.add({cacheLookupPolicy:e.cacheLookupPolicy,scenarioId:e.scenarioId}),preflightCheck2(this.initialized,r),this.logger.verbose(\"acquireTokenSilent called\",t);const n=e.account||this.getActiveAccount();if(!n)throw createBrowserAuthError(noAccountError);r.add({accountType:getAccountType(n)});const i={clientId:this.config.auth.clientId,authority:e.authority||Constants.EMPTY_STRING,scopes:e.scopes,homeAccountIdentifier:n.homeAccountId,claims:e.claims,authenticationScheme:e.authenticationScheme,resourceRequestMethod:e.resourceRequestMethod,resourceRequestUri:e.resourceRequestUri,shrClaims:e.shrClaims,sshKid:e.sshKid,shrOptions:e.shrOptions},o=JSON.stringify(i),a=this.activeSilentTokenRequests.get(o);if(void 0===a){this.logger.verbose(\"acquireTokenSilent called for the first time, storing active request\",t);const i=invokeAsync(this.acquireTokenSilentAsync.bind(this),PerformanceEvents.AcquireTokenSilentAsync,this.logger,this.performanceClient,t)({...e,correlationId:t},n).then((t=>(this.activeSilentTokenRequests.delete(o),r.end({success:!0,fromCache:t.fromCache,isNativeBroker:t.fromNativeBroker,cacheLookupPolicy:e.cacheLookupPolicy,accessTokenSize:t.accessToken.length,idTokenSize:t.idToken.length}),t))).catch((e=>{throw this.activeSilentTokenRequests.delete(o),r.end({success:!1},e),e}));return this.activeSilentTokenRequests.set(o,i),{...await i,state:e.state}}return this.logger.verbose(\"acquireTokenSilent has been called previously, returning the result from the first call\",t),r.discard(),{...await a,state:e.state}}async acquireTokenSilentAsync(e,t){const r=()=>this.trackPageVisibility(e.correlationId);this.performanceClient.addQueueMeasurement(PerformanceEvents.AcquireTokenSilentAsync,e.correlationId),this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_START,InteractionType.Silent,e),e.correlationId&&this.performanceClient.incrementFields({visibilityChangeCount:0},e.correlationId),document.addEventListener(\"visibilitychange\",r);const n=await invokeAsync(initializeSilentRequest,PerformanceEvents.InitializeSilentRequest,this.logger,this.performanceClient,e.correlationId)(e,t,this.config,this.performanceClient,this.logger),i=e.cacheLookupPolicy||CacheLookupPolicy.Default;return this.acquireTokenSilentNoIframe(n,i).catch((async e=>{if(checkIfRefreshTokenErrorCanBeResolvedSilently(e,i)){if(this.activeIframeRequest){if(i!==CacheLookupPolicy.Skip){const[t,r]=this.activeIframeRequest;this.logger.verbose(`Iframe request is already in progress, awaiting resolution for request with correlationId: ${r}`,n.correlationId);const o=this.performanceClient.startMeasurement(PerformanceEvents.AwaitConcurrentIframe,n.correlationId);o.add({awaitIframeCorrelationId:r});const a=await t;if(o.end({success:a}),a)return this.logger.verbose(`Parallel iframe request with correlationId: ${r} succeeded. Retrying cache and/or RT redemption`,n.correlationId),this.acquireTokenSilentNoIframe(n,i);throw this.logger.info(`Iframe request with correlationId: ${r} failed. Interaction is required.`),e}return this.logger.warning(\"Another iframe request is currently in progress and CacheLookupPolicy is set to Skip. This may result in degraded performance and/or reliability for both calls. Please consider changing the CacheLookupPolicy to take advantage of request queuing and token cache.\",n.correlationId),invokeAsync(this.acquireTokenBySilentIframe.bind(this),PerformanceEvents.AcquireTokenBySilentIframe,this.logger,this.performanceClient,n.correlationId)(n)}{let e;return this.activeIframeRequest=[new Promise((t=>{e=t})),n.correlationId],this.logger.verbose(\"Refresh token expired/invalid or CacheLookupPolicy is set to Skip, attempting acquire token by iframe.\",n.correlationId),invokeAsync(this.acquireTokenBySilentIframe.bind(this),PerformanceEvents.AcquireTokenBySilentIframe,this.logger,this.performanceClient,n.correlationId)(n).then((t=>(e(!0),t))).catch((t=>{throw e(!1),t})).finally((()=>{this.activeIframeRequest=void 0}))}}throw e})).then((t=>(this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_SUCCESS,InteractionType.Silent,t),e.correlationId&&this.performanceClient.addFields({fromCache:t.fromCache,isNativeBroker:t.fromNativeBroker},e.correlationId),t))).catch((e=>{throw this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_FAILURE,InteractionType.Silent,null,e),e})).finally((()=>{document.removeEventListener(\"visibilitychange\",r)}))}async acquireTokenSilentNoIframe(e,t){return NativeMessageHandler.isNativeAvailable(this.config,this.logger,this.nativeExtensionProvider,e.authenticationScheme)&&e.account.nativeAccountId?(this.logger.verbose(\"acquireTokenSilent - attempting to acquire token from native platform\"),this.acquireTokenNative(e,ApiId.acquireTokenSilent_silentFlow).catch((async e=>{if(e instanceof NativeAuthError&&isFatalNativeAuthError(e))throw this.logger.verbose(\"acquireTokenSilent - native platform unavailable, falling back to web flow\"),this.nativeExtensionProvider=void 0,createClientAuthError(ClientAuthErrorCodes_exports.tokenRefreshRequired);throw e}))):(this.logger.verbose(\"acquireTokenSilent - attempting to acquire token from web flow\"),invokeAsync(this.acquireTokenFromCache.bind(this),PerformanceEvents.AcquireTokenFromCache,this.logger,this.performanceClient,e.correlationId)(e,t).catch((r=>{if(t===CacheLookupPolicy.AccessToken)throw r;return this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_NETWORK_START,InteractionType.Silent,e),invokeAsync(this.acquireTokenByRefreshToken.bind(this),PerformanceEvents.AcquireTokenByRefreshToken,this.logger,this.performanceClient,e.correlationId)(e,t)})))}constructor(e){this.operatingContext=e,this.isBrowserEnvironment=this.operatingContext.isBrowserEnvironment(),this.config=e.getConfig(),this.initialized=!1,this.logger=this.operatingContext.getLogger(),this.networkClient=this.config.system.networkClient,this.navigationClient=this.config.system.navigationClient,this.redirectResponse=new Map,this.hybridAuthCodeResponses=new Map,this.performanceClient=this.config.telemetry.client,this.browserCrypto=this.isBrowserEnvironment?new CryptoOps(this.logger,this.performanceClient):DEFAULT_CRYPTO_IMPLEMENTATION,this.eventHandler=new EventHandler(this.logger),this.browserStorage=this.isBrowserEnvironment?new BrowserCacheManager(this.config.auth.clientId,this.config.cache,this.browserCrypto,this.logger,buildStaticAuthorityOptions(this.config.auth),this.performanceClient):DEFAULT_BROWSER_CACHE_MANAGER(this.config.auth.clientId,this.logger);const t={cacheLocation:BrowserCacheLocation.MemoryStorage,temporaryCacheLocation:BrowserCacheLocation.MemoryStorage,storeAuthStateInCookie:!1,secureCookies:!1,cacheMigrationEnabled:!1,claimsBasedCachingEnabled:!1};this.nativeInternalStorage=new BrowserCacheManager(this.config.auth.clientId,t,this.browserCrypto,this.logger,void 0,this.performanceClient),this.tokenCache=new TokenCache(this.config,this.browserStorage,this.logger,this.browserCrypto),this.activeSilentTokenRequests=new Map,this.trackPageVisibility=this.trackPageVisibility.bind(this),this.trackPageVisibilityWithMeasurement=this.trackPageVisibilityWithMeasurement.bind(this),this.listeningToStorageEvents=!1,this.handleAccountCacheChange=this.handleAccountCacheChange.bind(this)}}}});function isBridgeError(e){return void 0!==e.status}var init_BridgeError=__esm({\"../../node_modules/.pnpm/@azure+msal-browser@3.28.0/node_modules/@azure/msal-browser/dist/naa/BridgeError.mjs\"(){init_globals()}}),NestedAppAuthAdapter,init_NestedAppAuthAdapter=__esm({\"../../node_modules/.pnpm/@azure+msal-browser@3.28.0/node_modules/@azure/msal-browser/dist/naa/mapping/NestedAppAuthAdapter.mjs\"(){init_globals(),init_index_browser(),init_BridgeError(),init_BridgeStatusCode(),NestedAppAuthAdapter=class{toNaaTokenRequest(e){var t;let r;r=void 0===e.extraQueryParameters?new Map:new Map(Object.entries(e.extraQueryParameters));const n=e.correlationId||this.crypto.createNewGuid(),i=new RequestParameterBuilder(n).addClientCapabilitiesToClaims(e.claims,this.clientCapabilities),o=e.scopes||OIDC_DEFAULT_SCOPES;return{platformBrokerId:null==(t=e.account)?void 0:t.homeAccountId,clientId:this.clientId,authority:e.authority,scope:o.join(\" \"),correlationId:n,claims:StringUtils.isEmptyObj(i)?void 0:i,state:e.state,authenticationScheme:e.authenticationScheme||AuthenticationScheme.BEARER,extraParameters:r}}fromNaaTokenResponse(e,t,r){if(!t.token.id_token||!t.token.access_token)throw createClientAuthError(ClientAuthErrorCodes_exports.nullOrEmptyToken);const n=new Date(1e3*(r+(t.token.expires_in||0))),i=AuthToken_exports.extractTokenClaims(t.token.id_token,this.crypto.base64Decode),o=this.fromNaaAccountInfo(t.account,t.token.id_token,i),a=t.token.scope||e.scope;return{authority:t.token.authority||o.environment,uniqueId:o.localAccountId,tenantId:o.tenantId,scopes:a.split(\" \"),account:o,idToken:t.token.id_token,idTokenClaims:i,accessToken:t.token.access_token,fromCache:!1,expiresOn:n,tokenType:e.authenticationScheme||AuthenticationScheme.BEARER,correlationId:e.correlationId,extExpiresOn:n,state:e.state}}fromNaaAccountInfo(e,t,r){const n=r||e.idTokenClaims,i=e.localAccountId||(null==n?void 0:n.oid)||(null==n?void 0:n.sub)||\"\",o=e.tenantId||(null==n?void 0:n.tid)||\"\",a=e.homeAccountId||`${i}.${o}`,s=e.username||(null==n?void 0:n.preferred_username)||\"\",l=e.name||(null==n?void 0:n.name),u=new Map,c=buildTenantProfile(a,i,o,n);return u.set(o,c),{homeAccountId:a,environment:e.environment,tenantId:o,username:s,localAccountId:i,name:l,idToken:t,idTokenClaims:n,tenantProfiles:u}}fromBridgeError(e){if(!isBridgeError(e))return new AuthError(\"unknown_error\",\"An unknown error occurred\");switch(e.status){case BridgeStatusCode.UserCancel:return new ClientAuthError(ClientAuthErrorCodes_exports.userCanceled);case BridgeStatusCode.NoNetwork:return new ClientAuthError(ClientAuthErrorCodes_exports.noNetworkConnectivity);case BridgeStatusCode.AccountUnavailable:return new ClientAuthError(ClientAuthErrorCodes_exports.noAccountFound);case BridgeStatusCode.Disabled:return new ClientAuthError(ClientAuthErrorCodes_exports.nestedAppAuthBridgeDisabled);case BridgeStatusCode.NestedAppAuthUnavailable:return new ClientAuthError(e.code||ClientAuthErrorCodes_exports.nestedAppAuthBridgeDisabled,e.description);case BridgeStatusCode.TransientError:case BridgeStatusCode.PersistentError:return new ServerError(e.code,e.description);case BridgeStatusCode.UserInteractionRequired:return new InteractionRequiredAuthError(e.code,e.description);default:return new AuthError(e.code,e.description)}}toAuthenticationResultFromCache(e,t,r,n,i){if(!t||!r)throw createClientAuthError(ClientAuthErrorCodes_exports.nullOrEmptyToken);const o=AuthToken_exports.extractTokenClaims(t.secret,this.crypto.base64Decode),a=r.target||n.scopes.join(\" \");return{authority:r.environment||e.environment,uniqueId:e.localAccountId,tenantId:e.tenantId,scopes:a.split(\" \"),account:e,idToken:t.secret,idTokenClaims:o||{},accessToken:r.secret,fromCache:!0,expiresOn:new Date(1e3*Number(r.expiresOn)),tokenType:n.authenticationScheme||AuthenticationScheme.BEARER,correlationId:i,extExpiresOn:new Date(1e3*Number(r.extendedExpiresOn)),state:n.state}}constructor(e,t,r,n){this.clientId=e,this.clientCapabilities=t,this.crypto=r,this.logger=n}}}}),NestedAppAuthErrorMessage,NestedAppAuthError,init_NestedAppAuthError=__esm({\"../../node_modules/.pnpm/@azure+msal-browser@3.28.0/node_modules/@azure/msal-browser/dist/error/NestedAppAuthError.mjs\"(){init_globals(),init_index_browser(),NestedAppAuthErrorMessage={unsupportedMethod:{code:\"unsupported_method\",desc:\"This method is not supported in nested app environment.\"}},NestedAppAuthError=class e extends AuthError{static createUnsupportedError(){return new e(NestedAppAuthErrorMessage.unsupportedMethod.code,NestedAppAuthErrorMessage.unsupportedMethod.desc)}constructor(t,r){super(t,r),Object.setPrototypeOf(this,e.prototype),this.name=\"NestedAppAuthError\"}}}}),NestedAppAuthController,init_NestedAppAuthController=__esm({\"../../node_modules/.pnpm/@azure+msal-browser@3.28.0/node_modules/@azure/msal-browser/dist/controllers/NestedAppAuthController.mjs\"(){init_globals(),init_index_browser(),init_BrowserConstants(),init_CryptoOps(),init_NestedAppAuthAdapter(),init_NestedAppAuthError(),init_EventHandler(),init_EventType(),init_BrowserCacheManager(),init_AccountManager(),NestedAppAuthController=class e{static async createController(t){const r=new e(t);return Promise.resolve(r)}initialize(){return Promise.resolve()}ensureValidRequest(e){return(null==e?void 0:e.correlationId)?e:{...e,correlationId:this.browserCrypto.createNewGuid()}}async acquireTokenInteractive(e){const t=this.ensureValidRequest(e);this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_START,InteractionType.Popup,t);const r=this.performanceClient.startMeasurement(PerformanceEvents.AcquireTokenPopup,t.correlationId);null==r||r.add({nestedAppAuthRequest:!0});try{const n=this.nestedAppAuthAdapter.toNaaTokenRequest(t),i=TimeUtils_exports.nowSeconds(),o=await this.bridgeProxy.getTokenInteractive(n),a={...this.nestedAppAuthAdapter.fromNaaTokenResponse(n,o,i)};return await this.hydrateCache(a,e),this.browserStorage.setActiveAccount(a.account),this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_SUCCESS,InteractionType.Popup,a),r.add({accessTokenSize:a.accessToken.length,idTokenSize:a.idToken.length}),r.end({success:!0,requestId:a.requestId}),a}catch(n){const e=this.nestedAppAuthAdapter.fromBridgeError(n);throw this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_FAILURE,InteractionType.Popup,null,n),r.end({success:!1},n),e}}async acquireTokenSilentInternal(e){const t=this.ensureValidRequest(e);this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_START,InteractionType.Silent,t);const r=await this.acquireTokenFromCache(t);if(r)return this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_SUCCESS,InteractionType.Silent,r),r;const n=this.performanceClient.startMeasurement(PerformanceEvents.SsoSilent,t.correlationId);null==n||n.increment({visibilityChangeCount:0}),null==n||n.add({nestedAppAuthRequest:!0});try{const r=this.nestedAppAuthAdapter.toNaaTokenRequest(t),i=TimeUtils_exports.nowSeconds(),o=await this.bridgeProxy.getTokenSilent(r),a=this.nestedAppAuthAdapter.fromNaaTokenResponse(r,o,i);return await this.hydrateCache(a,e),this.browserStorage.setActiveAccount(a.account),this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_SUCCESS,InteractionType.Silent,a),null==n||n.add({accessTokenSize:a.accessToken.length,idTokenSize:a.idToken.length}),null==n||n.end({success:!0,requestId:a.requestId}),a}catch(i){const e=this.nestedAppAuthAdapter.fromBridgeError(i);throw this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_FAILURE,InteractionType.Silent,null,i),null==n||n.end({success:!1},i),e}}async acquireTokenFromCache(e){const t=this.performanceClient.startMeasurement(PerformanceEvents.AcquireTokenSilent,e.correlationId);if(null==t||t.add({nestedAppAuthRequest:!0}),e.claims)return this.logger.verbose(\"Claims are present in the request, skipping cache lookup\"),null;let r=null;switch(e.cacheLookupPolicy){case CacheLookupPolicy.Default:case CacheLookupPolicy.AccessToken:case CacheLookupPolicy.AccessTokenAndRefreshToken:r=await this.acquireTokenFromCacheInternal(e);break;default:return null}return r?(this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_SUCCESS,InteractionType.Silent,r),null==t||t.add({accessTokenSize:null==r?void 0:r.accessToken.length,idTokenSize:null==r?void 0:r.idToken.length}),null==t||t.end({success:!0}),r):(this.logger.error(\"Cached tokens are not found for the account, proceeding with silent token request.\"),this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_FAILURE,InteractionType.Silent,null),null==t||t.end({success:!1}),null)}async acquireTokenFromCacheInternal(e){var t;const r=this.bridgeProxy.getAccountContext();let n=null;if(r&&(n=getAccount(r,this.logger,this.browserStorage)||e.account),!n)return this.logger.verbose(\"No active account found, falling back to the host\"),Promise.resolve(null);this.logger.verbose(\"active account found, attempting to acquire token silently\");const i={...e,correlationId:e.correlationId||this.browserCrypto.createNewGuid(),authority:e.authority||n.environment,scopes:(null==(t=e.scopes)?void 0:t.length)?e.scopes:[...OIDC_DEFAULT_SCOPES]},o=this.browserStorage.getTokenKeys(),a=this.browserStorage.getAccessToken(n,i,o,n.tenantId,this.performanceClient,i.correlationId);if(!a)return this.logger.verbose(\"No cached access token found\"),Promise.resolve(null);if(TimeUtils_exports.wasClockTurnedBack(a.cachedAt)||TimeUtils_exports.isTokenExpired(a.expiresOn,this.config.system.tokenRenewalOffsetSeconds))return this.logger.verbose(\"Cached access token has expired\"),Promise.resolve(null);const s=this.browserStorage.getIdToken(n,o,n.tenantId,this.performanceClient,i.correlationId);return s?this.nestedAppAuthAdapter.toAuthenticationResultFromCache(n,s,a,i,i.correlationId):(this.logger.verbose(\"No cached id token found\"),Promise.resolve(null))}async acquireTokenPopup(e){return this.acquireTokenInteractive(e)}acquireTokenRedirect(e){throw NestedAppAuthError.createUnsupportedError()}async acquireTokenSilent(e){return this.acquireTokenSilentInternal(e)}acquireTokenByCode(e){throw NestedAppAuthError.createUnsupportedError()}acquireTokenNative(e,t,r){throw NestedAppAuthError.createUnsupportedError()}acquireTokenByRefreshToken(e,t){throw NestedAppAuthError.createUnsupportedError()}addEventCallback(e,t){return this.eventHandler.addEventCallback(e,t)}removeEventCallback(e){this.eventHandler.removeEventCallback(e)}addPerformanceCallback(e){throw NestedAppAuthError.createUnsupportedError()}removePerformanceCallback(e){throw NestedAppAuthError.createUnsupportedError()}enableAccountStorageEvents(){throw NestedAppAuthError.createUnsupportedError()}disableAccountStorageEvents(){throw NestedAppAuthError.createUnsupportedError()}getAllAccounts(e){return getAllAccounts(this.logger,this.browserStorage,this.isBrowserEnv(),e)}getAccount(e){return getAccount(e,this.logger,this.browserStorage)}getAccountByUsername(e){return getAccountByUsername(e,this.logger,this.browserStorage)}getAccountByHomeId(e){return getAccountByHomeId(e,this.logger,this.browserStorage)}getAccountByLocalId(e){return getAccountByLocalId(e,this.logger,this.browserStorage)}setActiveAccount(e){return setActiveAccount(e,this.browserStorage)}getActiveAccount(){return getActiveAccount(this.browserStorage)}handleRedirectPromise(e){return Promise.resolve(null)}loginPopup(e){return this.acquireTokenInteractive(e||DEFAULT_REQUEST)}loginRedirect(e){throw NestedAppAuthError.createUnsupportedError()}logout(e){throw NestedAppAuthError.createUnsupportedError()}logoutRedirect(e){throw NestedAppAuthError.createUnsupportedError()}logoutPopup(e){throw NestedAppAuthError.createUnsupportedError()}ssoSilent(e){return this.acquireTokenSilentInternal(e)}getTokenCache(){throw NestedAppAuthError.createUnsupportedError()}getLogger(){return this.logger}setLogger(e){this.logger=e}initializeWrapperLibrary(e,t){}setNavigationClient(e){this.logger.warning(\"setNavigationClient is not supported in nested app auth\")}getConfiguration(){return this.config}isBrowserEnv(){return this.operatingContext.isBrowserEnvironment()}getBrowserCrypto(){return this.browserCrypto}getPerformanceClient(){throw NestedAppAuthError.createUnsupportedError()}getRedirectResponse(){throw NestedAppAuthError.createUnsupportedError()}async clearCache(e){throw NestedAppAuthError.createUnsupportedError()}async hydrateCache(e,t){this.logger.verbose(\"hydrateCache called\");const r=AccountEntity.createFromAccountInfo(e.account,e.cloudGraphHostName,e.msGraphHost);return this.browserStorage.setAccount(r),this.browserStorage.hydrateCache(e,t)}constructor(e){this.operatingContext=e;const t=this.operatingContext.getBridgeProxy();if(void 0===t)throw new Error(\"unexpected: bridgeProxy is undefined\");this.bridgeProxy=t,this.config=e.getConfig(),this.logger=this.operatingContext.getLogger(),this.performanceClient=this.config.telemetry.client,this.browserCrypto=e.isBrowserEnvironment()?new CryptoOps(this.logger,this.performanceClient):DEFAULT_CRYPTO_IMPLEMENTATION,this.browserStorage=this.operatingContext.isBrowserEnvironment()?new BrowserCacheManager(this.config.auth.clientId,this.config.cache,this.browserCrypto,this.logger,buildStaticAuthorityOptions(this.config.auth)):DEFAULT_BROWSER_CACHE_MANAGER(this.config.auth.clientId,this.logger),this.eventHandler=new EventHandler(this.logger),this.nestedAppAuthAdapter=new NestedAppAuthAdapter(this.config.auth.clientId,this.config.auth.clientCapabilities,this.browserCrypto,this.logger);const r=this.bridgeProxy.getAccountContext();r&&setActiveAccount(getAccount(r,this.logger,this.browserStorage),this.browserStorage)}}}});async function createV3Controller(e,t){const r=new StandardOperatingContext(e);return await r.initialize(),StandardController.createController(r,t)}async function createController(e){const t=new StandardOperatingContext(e),r=new NestedAppOperatingContext(e),n=[t.initialize(),r.initialize()];return await Promise.all(n),r.isAvailable()&&e.auth.supportsNestedAppAuth?NestedAppAuthController.createController(r):t.isAvailable()?StandardController.createController(t):null}var init_ControllerFactory=__esm({\"../../node_modules/.pnpm/@azure+msal-browser@3.28.0/node_modules/@azure/msal-browser/dist/controllers/ControllerFactory.mjs\"(){init_globals(),init_NestedAppOperatingContext(),init_StandardOperatingContext(),init_StandardController(),init_NestedAppAuthController()}}),PublicClientApplication;async function createNestablePublicClientApplication(e){const t=new NestedAppOperatingContext(e);if(await t.initialize(),t.isAvailable()){const r=new NestedAppAuthController(t);return new PublicClientApplication(e,r)}return createStandardPublicClientApplication(e)}async function createStandardPublicClientApplication(e){const t=new PublicClientApplication(e);return await t.initialize(),t}var init_PublicClientApplication=__esm({\"../../node_modules/.pnpm/@azure+msal-browser@3.28.0/node_modules/@azure/msal-browser/dist/app/PublicClientApplication.mjs\"(){init_globals(),init_ControllerFactory(),init_StandardController(),init_StandardOperatingContext(),init_NestedAppAuthController(),init_NestedAppOperatingContext(),PublicClientApplication=class e{static async createPublicClientApplication(t){const r=await createV3Controller(t);return new e(t,r)}async initialize(e){return this.controller.initialize(e)}async acquireTokenPopup(e){return this.controller.acquireTokenPopup(e)}acquireTokenRedirect(e){return this.controller.acquireTokenRedirect(e)}acquireTokenSilent(e){return this.controller.acquireTokenSilent(e)}acquireTokenByCode(e){return this.controller.acquireTokenByCode(e)}addEventCallback(e,t){return this.controller.addEventCallback(e,t)}removeEventCallback(e){return this.controller.removeEventCallback(e)}addPerformanceCallback(e){return this.controller.addPerformanceCallback(e)}removePerformanceCallback(e){return this.controller.removePerformanceCallback(e)}enableAccountStorageEvents(){this.controller.enableAccountStorageEvents()}disableAccountStorageEvents(){this.controller.disableAccountStorageEvents()}getAccount(e){return this.controller.getAccount(e)}getAccountByHomeId(e){return this.controller.getAccountByHomeId(e)}getAccountByLocalId(e){return this.controller.getAccountByLocalId(e)}getAccountByUsername(e){return this.controller.getAccountByUsername(e)}getAllAccounts(e){return this.controller.getAllAccounts(e)}handleRedirectPromise(e){return this.controller.handleRedirectPromise(e)}loginPopup(e){return this.controller.loginPopup(e)}loginRedirect(e){return this.controller.loginRedirect(e)}logout(e){return this.controller.logout(e)}logoutRedirect(e){return this.controller.logoutRedirect(e)}logoutPopup(e){return this.controller.logoutPopup(e)}ssoSilent(e){return this.controller.ssoSilent(e)}getTokenCache(){return this.controller.getTokenCache()}getLogger(){return this.controller.getLogger()}setLogger(e){this.controller.setLogger(e)}setActiveAccount(e){this.controller.setActiveAccount(e)}getActiveAccount(){return this.controller.getActiveAccount()}initializeWrapperLibrary(e,t){return this.controller.initializeWrapperLibrary(e,t)}setNavigationClient(e){this.controller.setNavigationClient(e)}getConfiguration(){return this.controller.getConfiguration()}async hydrateCache(e,t){return this.controller.hydrateCache(e,t)}clearCache(e){return this.controller.clearCache(e)}constructor(e,t){this.controller=t||new StandardController(new StandardOperatingContext(e))}}}}),UnknownOperatingContextController,init_UnknownOperatingContextController=__esm({\"../../node_modules/.pnpm/@azure+msal-browser@3.28.0/node_modules/@azure/msal-browser/dist/controllers/UnknownOperatingContextController.mjs\"(){init_globals(),init_index_browser(),init_BrowserCacheManager(),init_CryptoOps(),init_BrowserUtils(),UnknownOperatingContextController=class{getBrowserStorage(){return this.browserStorage}getAccount(e){return null}getAccountByHomeId(e){return null}getAccountByLocalId(e){return null}getAccountByUsername(e){return null}getAllAccounts(){return[]}initialize(){return this.initialized=!0,Promise.resolve()}acquireTokenPopup(e){return blockAPICallsBeforeInitialize(this.initialized),blockNonBrowserEnvironment(),{}}acquireTokenRedirect(e){return blockAPICallsBeforeInitialize(this.initialized),blockNonBrowserEnvironment(),Promise.resolve()}acquireTokenSilent(e){return blockAPICallsBeforeInitialize(this.initialized),blockNonBrowserEnvironment(),{}}acquireTokenByCode(e){return blockAPICallsBeforeInitialize(this.initialized),blockNonBrowserEnvironment(),{}}acquireTokenNative(e,t,r){return blockAPICallsBeforeInitialize(this.initialized),blockNonBrowserEnvironment(),{}}acquireTokenByRefreshToken(e,t){return blockAPICallsBeforeInitialize(this.initialized),blockNonBrowserEnvironment(),{}}addEventCallback(e,t){return null}removeEventCallback(e){}addPerformanceCallback(e){return blockAPICallsBeforeInitialize(this.initialized),blockNonBrowserEnvironment(),\"\"}removePerformanceCallback(e){return blockAPICallsBeforeInitialize(this.initialized),blockNonBrowserEnvironment(),!0}enableAccountStorageEvents(){blockAPICallsBeforeInitialize(this.initialized),blockNonBrowserEnvironment()}disableAccountStorageEvents(){blockAPICallsBeforeInitialize(this.initialized),blockNonBrowserEnvironment()}handleRedirectPromise(e){return blockAPICallsBeforeInitialize(this.initialized),Promise.resolve(null)}loginPopup(e){return blockAPICallsBeforeInitialize(this.initialized),blockNonBrowserEnvironment(),{}}loginRedirect(e){return blockAPICallsBeforeInitialize(this.initialized),blockNonBrowserEnvironment(),{}}logout(e){return blockAPICallsBeforeInitialize(this.initialized),blockNonBrowserEnvironment(),{}}logoutRedirect(e){return blockAPICallsBeforeInitialize(this.initialized),blockNonBrowserEnvironment(),{}}logoutPopup(e){return blockAPICallsBeforeInitialize(this.initialized),blockNonBrowserEnvironment(),{}}ssoSilent(e){return blockAPICallsBeforeInitialize(this.initialized),blockNonBrowserEnvironment(),{}}getTokenCache(){return blockAPICallsBeforeInitialize(this.initialized),blockNonBrowserEnvironment(),{}}getLogger(){return this.logger}setLogger(e){blockAPICallsBeforeInitialize(this.initialized),blockNonBrowserEnvironment()}setActiveAccount(e){blockAPICallsBeforeInitialize(this.initialized),blockNonBrowserEnvironment()}getActiveAccount(){return blockAPICallsBeforeInitialize(this.initialized),blockNonBrowserEnvironment(),null}initializeWrapperLibrary(e,t){this.browserStorage.setWrapperMetadata(e,t)}setNavigationClient(e){blockAPICallsBeforeInitialize(this.initialized),blockNonBrowserEnvironment()}getConfiguration(){return this.config}isBrowserEnv(){return blockAPICallsBeforeInitialize(this.initialized),blockNonBrowserEnvironment(),!0}getBrowserCrypto(){return blockAPICallsBeforeInitialize(this.initialized),blockNonBrowserEnvironment(),{}}getPerformanceClient(){return blockAPICallsBeforeInitialize(this.initialized),blockNonBrowserEnvironment(),{}}getRedirectResponse(){return blockAPICallsBeforeInitialize(this.initialized),blockNonBrowserEnvironment(),{}}async clearCache(e){blockAPICallsBeforeInitialize(this.initialized),blockNonBrowserEnvironment()}async hydrateCache(e,t){blockAPICallsBeforeInitialize(this.initialized),blockNonBrowserEnvironment()}constructor(e){this.initialized=!1,this.operatingContext=e,this.isBrowserEnvironment=this.operatingContext.isBrowserEnvironment(),this.config=e.getConfig(),this.logger=e.getLogger(),this.performanceClient=this.config.telemetry.client,this.browserCrypto=this.isBrowserEnvironment?new CryptoOps(this.logger,this.performanceClient):DEFAULT_CRYPTO_IMPLEMENTATION,this.browserStorage=this.isBrowserEnvironment?new BrowserCacheManager(this.config.auth.clientId,this.config.cache,this.browserCrypto,this.logger,void 0,this.performanceClient):DEFAULT_BROWSER_CACHE_MANAGER(this.config.auth.clientId,this.logger)}}}}),UnknownOperatingContext,init_UnknownOperatingContext=__esm({\"../../node_modules/.pnpm/@azure+msal-browser@3.28.0/node_modules/@azure/msal-browser/dist/operatingcontext/UnknownOperatingContext.mjs\"(){init_globals(),init_BaseOperatingContext(),(UnknownOperatingContext=class e extends BaseOperatingContext{getId(){return e.ID}getModuleName(){return e.MODULE_NAME}async initialize(){return!0}}).MODULE_NAME=\"\",UnknownOperatingContext.ID=\"UnknownOperatingContext\"}}),PublicClientNext,init_PublicClientNext=__esm({\"../../node_modules/.pnpm/@azure+msal-browser@3.28.0/node_modules/@azure/msal-browser/dist/app/PublicClientNext.mjs\"(){init_globals(),init_ControllerFactory(),init_UnknownOperatingContextController(),init_UnknownOperatingContext(),PublicClientNext=class e{static async createPublicClientApplication(t){const r=await createController(t);let n;return n=null!==r?new e(t,r):new e(t),n}async initialize(){if(this.controller instanceof UnknownOperatingContextController){const e=await createController(this.configuration);return null!==e&&(this.controller=e),this.controller.initialize()}return Promise.resolve()}async acquireTokenPopup(e){return this.controller.acquireTokenPopup(e)}acquireTokenRedirect(e){return this.controller.acquireTokenRedirect(e)}acquireTokenSilent(e){return this.controller.acquireTokenSilent(e)}acquireTokenByCode(e){return this.controller.acquireTokenByCode(e)}addEventCallback(e,t){return this.controller.addEventCallback(e,t)}removeEventCallback(e){return this.controller.removeEventCallback(e)}addPerformanceCallback(e){return this.controller.addPerformanceCallback(e)}removePerformanceCallback(e){return this.controller.removePerformanceCallback(e)}enableAccountStorageEvents(){this.controller.enableAccountStorageEvents()}disableAccountStorageEvents(){this.controller.disableAccountStorageEvents()}getAccount(e){return this.controller.getAccount(e)}getAccountByHomeId(e){return this.controller.getAccountByHomeId(e)}getAccountByLocalId(e){return this.controller.getAccountByLocalId(e)}getAccountByUsername(e){return this.controller.getAccountByUsername(e)}getAllAccounts(e){return this.controller.getAllAccounts(e)}handleRedirectPromise(e){return this.controller.handleRedirectPromise(e)}loginPopup(e){return this.controller.loginPopup(e)}loginRedirect(e){return this.controller.loginRedirect(e)}logout(e){return this.controller.logout(e)}logoutRedirect(e){return this.controller.logoutRedirect(e)}logoutPopup(e){return this.controller.logoutPopup(e)}ssoSilent(e){return this.controller.ssoSilent(e)}getTokenCache(){return this.controller.getTokenCache()}getLogger(){return this.controller.getLogger()}setLogger(e){this.controller.setLogger(e)}setActiveAccount(e){this.controller.setActiveAccount(e)}getActiveAccount(){return this.controller.getActiveAccount()}initializeWrapperLibrary(e,t){return this.controller.initializeWrapperLibrary(e,t)}setNavigationClient(e){this.controller.setNavigationClient(e)}getConfiguration(){return this.controller.getConfiguration()}async hydrateCache(e,t){return this.controller.hydrateCache(e,t)}clearCache(e){return this.controller.clearCache(e)}constructor(e,t){if(this.configuration=e,t)this.controller=t;else{const t=new UnknownOperatingContext(e);this.controller=new UnknownOperatingContextController(t)}}}}}),stubbedPublicClientApplication,init_IPublicClientApplication=__esm({\"../../node_modules/.pnpm/@azure+msal-browser@3.28.0/node_modules/@azure/msal-browser/dist/app/IPublicClientApplication.mjs\"(){init_globals(),init_BrowserConfigurationAuthError(),init_BrowserConfigurationAuthErrorCodes(),stubbedPublicClientApplication={initialize:()=>Promise.reject(createBrowserConfigurationAuthError(stubbedPublicClientApplicationCalled)),acquireTokenPopup:()=>Promise.reject(createBrowserConfigurationAuthError(stubbedPublicClientApplicationCalled)),acquireTokenRedirect:()=>Promise.reject(createBrowserConfigurationAuthError(stubbedPublicClientApplicationCalled)),acquireTokenSilent:()=>Promise.reject(createBrowserConfigurationAuthError(stubbedPublicClientApplicationCalled)),acquireTokenByCode:()=>Promise.reject(createBrowserConfigurationAuthError(stubbedPublicClientApplicationCalled)),getAllAccounts:()=>[],getAccount:()=>null,getAccountByHomeId:()=>null,getAccountByUsername:()=>null,getAccountByLocalId:()=>null,handleRedirectPromise:()=>Promise.reject(createBrowserConfigurationAuthError(stubbedPublicClientApplicationCalled)),loginPopup:()=>Promise.reject(createBrowserConfigurationAuthError(stubbedPublicClientApplicationCalled)),loginRedirect:()=>Promise.reject(createBrowserConfigurationAuthError(stubbedPublicClientApplicationCalled)),logout:()=>Promise.reject(createBrowserConfigurationAuthError(stubbedPublicClientApplicationCalled)),logoutRedirect:()=>Promise.reject(createBrowserConfigurationAuthError(stubbedPublicClientApplicationCalled)),logoutPopup:()=>Promise.reject(createBrowserConfigurationAuthError(stubbedPublicClientApplicationCalled)),ssoSilent:()=>Promise.reject(createBrowserConfigurationAuthError(stubbedPublicClientApplicationCalled)),addEventCallback:()=>null,removeEventCallback:()=>{},addPerformanceCallback:()=>\"\",removePerformanceCallback:()=>!1,enableAccountStorageEvents:()=>{},disableAccountStorageEvents:()=>{},getTokenCache:()=>{throw createBrowserConfigurationAuthError(stubbedPublicClientApplicationCalled)},getLogger:()=>{throw createBrowserConfigurationAuthError(stubbedPublicClientApplicationCalled)},setLogger:()=>{},setActiveAccount:()=>{},getActiveAccount:()=>null,initializeWrapperLibrary:()=>{},setNavigationClient:()=>{},getConfiguration:()=>{throw createBrowserConfigurationAuthError(stubbedPublicClientApplicationCalled)},hydrateCache:()=>Promise.reject(createBrowserConfigurationAuthError(stubbedPublicClientApplicationCalled)),clearCache:()=>Promise.reject(createBrowserConfigurationAuthError(stubbedPublicClientApplicationCalled))}}}),BrowserStorage,init_BrowserStorage=__esm({\"../../node_modules/.pnpm/@azure+msal-browser@3.28.0/node_modules/@azure/msal-browser/dist/cache/BrowserStorage.mjs\"(){init_globals(),init_BrowserConfigurationAuthError(),init_BrowserConstants(),init_LocalStorage(),init_SessionStorage(),init_BrowserConfigurationAuthErrorCodes(),BrowserStorage=class{getItem(e){return this.windowStorage.getItem(e)}setItem(e,t){this.windowStorage.setItem(e,t)}removeItem(e){this.windowStorage.removeItem(e)}getKeys(){return Object.keys(this.windowStorage)}containsKey(e){return this.windowStorage.hasOwnProperty(e)}constructor(e){if(e===BrowserCacheLocation.LocalStorage)this.windowStorage=new LocalStorage;else{if(e!==BrowserCacheLocation.SessionStorage)throw createBrowserConfigurationAuthError(storageNotSupported);this.windowStorage=new SessionStorage}}}}}),EventMessageUtils,init_EventMessage=__esm({\"../../node_modules/.pnpm/@azure+msal-browser@3.28.0/node_modules/@azure/msal-browser/dist/event/EventMessage.mjs\"(){init_globals(),init_EventType(),init_BrowserConstants(),EventMessageUtils=class{static getInteractionStatusFromEvent(e,t){switch(e.eventType){case EventType.LOGIN_START:return InteractionStatus.Login;case EventType.SSO_SILENT_START:return InteractionStatus.SsoSilent;case EventType.ACQUIRE_TOKEN_START:if(e.interactionType===InteractionType.Redirect||e.interactionType===InteractionType.Popup)return InteractionStatus.AcquireToken;break;case EventType.HANDLE_REDIRECT_START:return InteractionStatus.HandleRedirect;case EventType.LOGOUT_START:return InteractionStatus.Logout;case EventType.SSO_SILENT_SUCCESS:case EventType.SSO_SILENT_FAILURE:if(t&&t!==InteractionStatus.SsoSilent)break;return InteractionStatus.None;case EventType.LOGOUT_END:if(t&&t!==InteractionStatus.Logout)break;return InteractionStatus.None;case EventType.HANDLE_REDIRECT_END:if(t&&t!==InteractionStatus.HandleRedirect)break;return InteractionStatus.None;case EventType.LOGIN_SUCCESS:case EventType.LOGIN_FAILURE:case EventType.ACQUIRE_TOKEN_SUCCESS:case EventType.ACQUIRE_TOKEN_FAILURE:case EventType.RESTORE_FROM_BFCACHE:if(e.interactionType===InteractionType.Redirect||e.interactionType===InteractionType.Popup){if(t&&t!==InteractionStatus.Login&&t!==InteractionStatus.AcquireToken)break;return InteractionStatus.None}}return null}}}}),SignedHttpRequest,init_SignedHttpRequest=__esm({\"../../node_modules/.pnpm/@azure+msal-browser@3.28.0/node_modules/@azure/msal-browser/dist/crypto/SignedHttpRequest.mjs\"(){init_globals(),init_CryptoOps(),init_index_browser(),init_packageMetadata2(),SignedHttpRequest=class{async generatePublicKeyThumbprint(){const{kid:e}=await this.popTokenGenerator.generateKid(this.shrParameters);return e}async signRequest(e,t,r){return this.popTokenGenerator.signPayload(e,t,this.shrParameters,r)}async removeKeys(e){return this.cryptoOps.removeTokenBindingKey(e)}constructor(e,t){const r=t&&t.loggerOptions||{};this.logger=new Logger(r,name2,version4),this.cryptoOps=new CryptoOps(this.logger),this.popTokenGenerator=new PopTokenGenerator(this.cryptoOps),this.shrParameters=e}}}}),BrowserPerformanceMeasurement_exports={},BrowserPerformanceMeasurement;__export(BrowserPerformanceMeasurement_exports,{BrowserPerformanceMeasurement:()=>BrowserPerformanceMeasurement});var init_BrowserPerformanceMeasurement=__esm({\"../../node_modules/.pnpm/@azure+msal-browser@3.28.0/node_modules/@azure/msal-browser/dist/telemetry/BrowserPerformanceMeasurement.mjs\"(){init_globals(),BrowserPerformanceMeasurement=class e{static makeMeasureName(e,t){return`msal.measure.${e}.${t}`}static makeStartMark(e,t){return`msal.start.${e}.${t}`}static makeEndMark(e,t){return`msal.end.${e}.${t}`}static supportsBrowserPerformance(){return\"undefined\"!=typeof window&&void 0!==window.performance&&\"function\"==typeof window.performance.mark&&\"function\"==typeof window.performance.measure&&\"function\"==typeof window.performance.clearMarks&&\"function\"==typeof window.performance.clearMeasures&&\"function\"==typeof window.performance.getEntriesByName}static flushMeasurements(t,r){if(e.supportsBrowserPerformance())try{r.forEach((r=>{const n=e.makeMeasureName(r.name,t);window.performance.getEntriesByName(n,\"measure\").length>0&&(window.performance.clearMeasures(n),window.performance.clearMarks(e.makeStartMark(n,t)),window.performance.clearMarks(e.makeEndMark(n,t)))}))}catch(n){}}startMeasurement(){if(e.supportsBrowserPerformance())try{window.performance.mark(this.startMark)}catch(t){}}endMeasurement(){if(e.supportsBrowserPerformance())try{window.performance.mark(this.endMark),window.performance.measure(this.measureName,this.startMark,this.endMark)}catch(t){}}flushMeasurement(){if(e.supportsBrowserPerformance())try{const e=window.performance.getEntriesByName(this.measureName,\"measure\");if(e.length>0){const t=e[0].duration;return window.performance.clearMeasures(this.measureName),window.performance.clearMarks(this.startMark),window.performance.clearMarks(this.endMark),t}}catch(t){}return null}constructor(t,r){this.correlationId=r,this.measureName=e.makeMeasureName(t,r),this.startMark=e.makeStartMark(t,r),this.endMark=e.makeEndMark(t,r)}}}}),BrowserPerformanceClient;function getPerfMeasurementModule(){let e;try{e=window[BrowserCacheLocation.SessionStorage];const t=null==e?void 0:e.getItem(BROWSER_PERF_ENABLED_KEY);if(1===Number(t))return Promise.resolve().then((()=>(init_BrowserPerformanceMeasurement(),BrowserPerformanceMeasurement_exports)))}catch(t){}}function supportsBrowserPerformanceNow(){return\"undefined\"!=typeof window&&void 0!==window.performance&&\"function\"==typeof window.performance.now}function getPerfDurationMs(e){if(e&&supportsBrowserPerformanceNow())return Math.round(window.performance.now()-e)}var init_BrowserPerformanceClient=__esm({\"../../node_modules/.pnpm/@azure+msal-browser@3.28.0/node_modules/@azure/msal-browser/dist/telemetry/BrowserPerformanceClient.mjs\"(){init_globals(),init_index_browser(),init_packageMetadata2(),init_BrowserConstants(),init_BrowserCrypto(),BrowserPerformanceClient=class extends PerformanceClient{generateId(){return createNewGuid()}getPageVisibility(){var e;return(null==(e=document.visibilityState)?void 0:e.toString())||null}deleteIncompleteSubMeasurements(e){var t;null==(t=getPerfMeasurementModule())||t.then((t=>{const r=this.eventsByCorrelationId.get(e.event.correlationId),n=r&&r.eventId===e.event.eventId,i=[];n&&(null==r?void 0:r.incompleteSubMeasurements)&&r.incompleteSubMeasurements.forEach((e=>{i.push({...e})})),t.BrowserPerformanceMeasurement.flushMeasurements(e.event.correlationId,i)}))}startMeasurement(e,t){var r;const n=this.getPageVisibility(),i=super.startMeasurement(e,t),o=supportsBrowserPerformanceNow()?window.performance.now():void 0,a=null==(r=getPerfMeasurementModule())?void 0:r.then((t=>new t.BrowserPerformanceMeasurement(e,i.event.correlationId)));return null==a||a.then((e=>e.startMeasurement())),{...i,end:(e,t)=>{const r=i.end({...e,startPageVisibility:n,endPageVisibility:this.getPageVisibility(),durationMs:getPerfDurationMs(o)},t);return null==a||a.then((e=>e.endMeasurement())),this.deleteIncompleteSubMeasurements(i),r},discard:()=>{i.discard(),null==a||a.then((e=>e.flushMeasurement())),this.deleteIncompleteSubMeasurements(i)}}}setPreQueueTime(e,t){if(!supportsBrowserPerformanceNow())return void this.logger.trace(`BrowserPerformanceClient: window performance API not available, unable to set telemetry queue time for ${e}`);if(!t)return void this.logger.trace(`BrowserPerformanceClient: correlationId for ${e} not provided, unable to set telemetry queue time`);const r=this.preQueueTimeByCorrelationId.get(t);r&&(this.logger.trace(`BrowserPerformanceClient: Incomplete pre-queue ${r.name} found`,t),this.addQueueMeasurement(r.name,t,void 0,!0)),this.preQueueTimeByCorrelationId.set(t,{name:e,time:window.performance.now()})}addQueueMeasurement(e,t,r,n){if(!supportsBrowserPerformanceNow())return void this.logger.trace(`BrowserPerformanceClient: window performance API not available, unable to add queue measurement for ${e}`);if(!t)return void this.logger.trace(`BrowserPerformanceClient: correlationId for ${e} not provided, unable to add queue measurement`);const i=super.getPreQueueTime(e,t);if(!i)return;const o=window.performance.now(),a=r||super.calculateQueuedTime(i,o);return super.addQueueMeasurement(e,t,a,n)}constructor(e,t,r){var n,i;super(e.auth.clientId,e.auth.authority||`${Constants.DEFAULT_AUTHORITY}`,new Logger((null==(n=e.system)?void 0:n.loggerOptions)||{},name2,version4),name2,version4,(null==(i=e.telemetry)?void 0:i.application)||{appName:\"\",appVersion:\"\"},t,r)}}}}),dist_exports={};__export(dist_exports,{AccountEntity:()=>AccountEntity,ApiId:()=>ApiId,AuthError:()=>AuthError,AuthErrorCodes:()=>AuthErrorCodes_exports,AuthErrorMessage:()=>AuthErrorMessage,AuthenticationHeaderParser:()=>AuthenticationHeaderParser,AuthenticationScheme:()=>AuthenticationScheme,AzureCloudInstance:()=>AzureCloudInstance,BrowserAuthError:()=>BrowserAuthError,BrowserAuthErrorCodes:()=>BrowserAuthErrorCodes_exports,BrowserAuthErrorMessage:()=>BrowserAuthErrorMessage,BrowserCacheLocation:()=>BrowserCacheLocation,BrowserConfigurationAuthError:()=>BrowserConfigurationAuthError,BrowserConfigurationAuthErrorCodes:()=>BrowserConfigurationAuthErrorCodes_exports,BrowserConfigurationAuthErrorMessage:()=>BrowserConfigurationAuthErrorMessage,BrowserPerformanceClient:()=>BrowserPerformanceClient,BrowserPerformanceMeasurement:()=>BrowserPerformanceMeasurement,BrowserStorage:()=>BrowserStorage,BrowserUtils:()=>BrowserUtils_exports,CacheLookupPolicy:()=>CacheLookupPolicy,ClientAuthError:()=>ClientAuthError,ClientAuthErrorCodes:()=>ClientAuthErrorCodes_exports,ClientAuthErrorMessage:()=>ClientAuthErrorMessage,ClientConfigurationError:()=>ClientConfigurationError,ClientConfigurationErrorCodes:()=>ClientConfigurationErrorCodes_exports,ClientConfigurationErrorMessage:()=>ClientConfigurationErrorMessage,DEFAULT_IFRAME_TIMEOUT_MS:()=>DEFAULT_IFRAME_TIMEOUT_MS,EventHandler:()=>EventHandler,EventMessageUtils:()=>EventMessageUtils,EventType:()=>EventType,InteractionRequiredAuthError:()=>InteractionRequiredAuthError,InteractionRequiredAuthErrorCodes:()=>InteractionRequiredAuthErrorCodes_exports,InteractionRequiredAuthErrorMessage:()=>InteractionRequiredAuthErrorMessage,InteractionStatus:()=>InteractionStatus,InteractionType:()=>InteractionType,JsonWebTokenTypes:()=>JsonWebTokenTypes,LocalStorage:()=>LocalStorage,LogLevel:()=>LogLevel,Logger:()=>Logger,MemoryStorage:()=>MemoryStorage,NavigationClient:()=>NavigationClient,OIDC_DEFAULT_SCOPES:()=>OIDC_DEFAULT_SCOPES,PerformanceEvents:()=>PerformanceEvents,PromptValue:()=>PromptValue,ProtocolMode:()=>ProtocolMode,PublicClientApplication:()=>PublicClientApplication,PublicClientNext:()=>PublicClientNext,ServerError:()=>ServerError,ServerResponseType:()=>ServerResponseType,SessionStorage:()=>SessionStorage,SignedHttpRequest:()=>SignedHttpRequest,StringUtils:()=>StringUtils,StubPerformanceClient:()=>StubPerformanceClient,UrlString:()=>UrlString,WrapperSKU:()=>WrapperSKU,createNestablePublicClientApplication:()=>createNestablePublicClientApplication,createStandardPublicClientApplication:()=>createStandardPublicClientApplication,stubbedPublicClientApplication:()=>stubbedPublicClientApplication,version:()=>version4});var init_dist=__esm({\"../../node_modules/.pnpm/@azure+msal-browser@3.28.0/node_modules/@azure/msal-browser/dist/index.mjs\"(){init_globals(),init_BrowserUtils(),init_PublicClientApplication(),init_PublicClientNext(),init_Configuration(),init_BrowserConstants(),init_BrowserAuthError(),init_BrowserConfigurationAuthError(),init_IPublicClientApplication(),init_NavigationClient(),init_MemoryStorage(),init_BrowserStorage(),init_LocalStorage(),init_SessionStorage(),init_EventMessage(),init_EventType(),init_EventHandler(),init_SignedHttpRequest(),init_BrowserPerformanceClient(),init_BrowserPerformanceMeasurement(),init_index_browser(),init_packageMetadata2(),init_BrowserAuthErrorCodes(),init_BrowserConfigurationAuthErrorCodes()}}),init_msal_browser=__esm({\"../../node_modules/.pnpm/@azure+identity@4.5.0/node_modules/@azure/identity/dist-esm/src/msal/msal.browser.js\"(){init_globals(),init_dist()}}),logger4,LatestAuthenticationRecordVersion,defaultLoggerCallback;function ensureValidMsalToken(e,t,r){const n=t=>(logger4.getToken.info(t),new AuthenticationRequiredError({scopes:Array.isArray(e)?e:[e],getTokenOptions:r,message:t}));if(!t)throw n(\"No response\");if(!t.expiresOn)throw n('Response had no \"expiresOn\" property.');if(!t.accessToken)throw n('Response had no \"accessToken\" property.')}function getAuthority(e,t){return t||(t=DefaultAuthorityHost),new RegExp(`${e}/?
Midscene Visualizer
{{dump}}
).test(t)?t:t.endsWith(\"/\")?t+e:`${t}/${e}`}function getKnownAuthorities(e,t,r){return\"adfs\"===e&&t||r?[t]:[]}function getMSALLogLevel(e){switch(e){case\"error\":return dist_exports.LogLevel.Error;case\"info\":default:return dist_exports.LogLevel.Info;case\"verbose\":return dist_exports.LogLevel.Verbose;case\"warning\":return dist_exports.LogLevel.Warning}}function handleMsalError(e,t,r){if(\"AuthError\"===t.name||\"ClientAuthError\"===t.name||\"BrowserAuthError\"===t.name){const r=t;switch(r.errorCode){case\"endpoints_resolution_error\":return logger4.info(formatError(e,t.message)),new CredentialUnavailableError(t.message);case\"device_code_polling_cancelled\":return new AbortError(\"The authentication has been aborted by the caller.\");case\"consent_required\":case\"interaction_required\":case\"login_required\":logger4.info(formatError(e,`Authentication returned errorCode ${r.errorCode}`));break;default:logger4.info(formatError(e,`Failed to acquire token: ${t.message}`))}}return\"ClientConfigurationError\"===t.name||\"BrowserConfigurationAuthError\"===t.name||\"AbortError\"===t.name||\"AuthenticationError\"===t.name?t:\"NativeAuthError\"===t.name?(logger4.info(formatError(e,`Error from the native broker: ${t.message} with status code: ${t.statusCode}`)),t):new AuthenticationRequiredError({scopes:e,getTokenOptions:r,message:t.message})}function publicToMsal(e){const[t]=e.authority.match(/([a-z]*\\.[a-z]*\\.[a-z]*)/)||[\"\"];return Object.assign(Object.assign({},e),{localAccountId:e.homeAccountId,environment:t})}function msalToPublic(e,t){return{authority:getAuthority(t.tenantId,t.environment),homeAccountId:t.homeAccountId,tenantId:t.tenantId||DefaultTenantId,username:t.username,clientId:e,version:LatestAuthenticationRecordVersion}}function serializeAuthenticationRecord(e){return JSON.stringify(e)}function deserializeAuthenticationRecord(e){const t=JSON.parse(e);if(t.version&&t.version!==LatestAuthenticationRecordVersion)throw Error(\"Unsupported AuthenticationRecord version\");return t}var init_utils=__esm({\"../../node_modules/.pnpm/@azure+identity@4.5.0/node_modules/@azure/identity/dist-esm/src/msal/utils.js\"(){init_globals(),init_errors(),init_logging(),init_constants(),init_browser4(),init_browser3(),init_msal_browser(),logger4=credentialLogger(\"IdentityUtils\"),LatestAuthenticationRecordVersion=\"1.0\",defaultLoggerCallback=(e,t=(isNode?\"Node\":\"Browser\"))=>(r,n,i)=>{if(!i)switch(r){case dist_exports.LogLevel.Error:return void e.info(`MSAL ${t} V2 error: ${n}`);case dist_exports.LogLevel.Info:return void e.info(`MSAL ${t} V2 info message: ${n}`);case dist_exports.LogLevel.Verbose:return void e.info(`MSAL ${t} V2 verbose message: ${n}`);case dist_exports.LogLevel.Warning:return void e.info(`MSAL ${t} V2 warning: ${n}`)}}}}),ValidPhaseNames,HttpPipeline;function createEmptyPipeline(){return HttpPipeline.create()}var init_pipeline=__esm({\"../../node_modules/.pnpm/@azure+core-rest-pipeline@1.18.1/node_modules/@azure/core-rest-pipeline/dist/browser/pipeline.js\"(){init_globals(),ValidPhaseNames=new Set([\"Deserialize\",\"Serialize\",\"Retry\",\"Sign\"]),HttpPipeline=class e{addPolicy(e,t={}){if(t.phase&&t.afterPhase)throw new Error(\"Policies inside a phase cannot specify afterPhase.\");if(t.phase&&!ValidPhaseNames.has(t.phase))throw new Error(`Invalid phase name: ${t.phase}`);if(t.afterPhase&&!ValidPhaseNames.has(t.afterPhase))throw new Error(`Invalid afterPhase name: ${t.afterPhase}`);this._policies.push({policy:e,options:t}),this._orderedPolicies=void 0}removePolicy(e){const t=[];return this._policies=this._policies.filter((r=>!(e.name&&r.policy.name===e.name||e.phase&&r.options.phase===e.phase)||(t.push(r.policy),!1))),this._orderedPolicies=void 0,t}sendRequest(e,t){return this.getOrderedPolicies().reduceRight(((e,t)=>r=>t.sendRequest(r,e)),(t=>e.sendRequest(t)))(t)}getOrderedPolicies(){return this._orderedPolicies||(this._orderedPolicies=this.orderPolicies()),this._orderedPolicies}clone(){return new e(this._policies)}static create(){return new e}orderPolicies(){const e=[],t=new Map;function r(e){return{name:e,policies:new Set,hasRun:!1,hasAfterPolicies:!1}}const n=r(\"Serialize\"),i=r(\"None\"),o=r(\"Deserialize\"),a=r(\"Retry\"),s=r(\"Sign\"),l=[n,i,o,a,s];function u(e){return\"Retry\"===e?a:\"Serialize\"===e?n:\"Deserialize\"===e?o:\"Sign\"===e?s:i}for(const f of this._policies){const e=f.policy,r=f.options,n=e.name;if(t.has(n))throw new Error(\"Duplicate policy names not allowed in pipeline\");const i={policy:e,dependsOn:new Set,dependants:new Set};r.afterPhase&&(i.afterPhase=u(r.afterPhase),i.afterPhase.hasAfterPolicies=!0),t.set(n,i),u(r.phase).policies.add(i)}for(const f of this._policies){const{policy:e,options:r}=f,n=e.name,i=t.get(n);if(!i)throw new Error(`Missing node for policy ${n}`);if(r.afterPolicies)for(const o of r.afterPolicies){const e=t.get(o);e&&(i.dependsOn.add(e),e.dependants.add(i))}if(r.beforePolicies)for(const o of r.beforePolicies){const e=t.get(o);e&&(e.dependsOn.add(i),i.dependants.add(e))}}function c(r){r.hasRun=!0;for(const n of r.policies)if((!n.afterPhase||n.afterPhase.hasRun&&!n.afterPhase.policies.size)&&0===n.dependsOn.size){e.push(n.policy);for(const e of n.dependants)e.dependsOn.delete(n);t.delete(n.policy.name),r.policies.delete(n)}}function d(){for(const e of l){if(c(e),e.policies.size>0&&e!==i)return void(i.hasRun||c(i));e.hasAfterPolicies&&c(i)}}let h=0;for(;t.size>0;){h++;const t=e.length;if(d(),e.length__left_angle_mark_=t&&h>1)throw new Error(\"Cannot satisfy policy dependencies due to requirements cycle.\")}return e}constructor(e){var t;this._policies=[],this._policies=null!==(t=null==e?void 0:e.slice(0))&&void 0!==t?t:[],this._orderedPolicies=void 0}}}}),logger5,init_log2=__esm({\"../../node_modules/.pnpm/@azure+core-rest-pipeline@1.18.1/node_modules/@azure/core-rest-pipeline/dist/browser/log.js\"(){init_globals(),init_browser(),logger5=createClientLogger(\"core-rest-pipeline\")}}),RedactedString,defaultAllowedHeaderNames,defaultAllowedQueryParameters,Sanitizer,init_sanitizer=__esm({\"../../node_modules/.pnpm/@azure+core-rest-pipeline@1.18.1/node_modules/@azure/core-rest-pipeline/dist/browser/util/sanitizer.js\"(){init_globals(),init_browser4(),RedactedString=\"REDACTED\",defaultAllowedHeaderNames=[\"x-ms-client-request-id\",\"x-ms-return-client-request-id\",\"x-ms-useragent\",\"x-ms-correlation-request-id\",\"x-ms-request-id\",\"client-request-id\",\"ms-cv\",\"return-client-request-id\",\"traceparent\",\"Access-Control-Allow-Credentials\",\"Access-Control-Allow-Headers\",\"Access-Control-Allow-Methods\",\"Access-Control-Allow-Origin\",\"Access-Control-Expose-Headers\",\"Access-Control-Max-Age\",\"Access-Control-Request-Headers\",\"Access-Control-Request-Method\",\"Origin\",\"Accept\",\"Accept-Encoding\",\"Cache-Control\",\"Connection\",\"Content-Length\",\"Content-Type\",\"Date\",\"ETag\",\"Expires\",\"If-Match\",\"If-Modified-Since\",\"If-None-Match\",\"If-Unmodified-Since\",\"Last-Modified\",\"Pragma\",\"Request-Id\",\"Retry-After\",\"Server\",\"Transfer-Encoding\",\"User-Agent\",\"WWW-Authenticate\"],defaultAllowedQueryParameters=[\"api-version\"],Sanitizer=class{sanitize(e){const t=new Set;return JSON.stringify(e,((e,r)=>{if(r instanceof Error)return Object.assign(Object.assign({},r),{name:r.name,message:r.message});if(\"headers\"===e)return this.sanitizeHeaders(r);if(\"url\"===e)return this.sanitizeUrl(r);if(\"query\"===e)return this.sanitizeQuery(r);if(\"body\"!==e&&\"response\"!==e&&\"operationSpec\"!==e){if(Array.isArray(r)||isObject2(r)){if(t.has(r))return\"[Circular]\";t.add(r)}return r}}),2)}sanitizeUrl(e){if(\"string\"!=typeof e||null===e||\"\"===e)return e;const t=new URL(e);if(!t.search)return e;for(const[r]of t.searchParams)this.allowedQueryParameters.has(r.toLowerCase())||t.searchParams.set(r,RedactedString);return t.toString()}sanitizeHeaders(e){const t={};for(const r of Object.keys(e))this.allowedHeaderNames.has(r.toLowerCase())?t[r]=e[r]:t[r]=RedactedString;return t}sanitizeQuery(e){if(\"object\"!=typeof e||null===e)return e;const t={};for(const r of Object.keys(e))this.allowedQueryParameters.has(r.toLowerCase())?t[r]=e[r]:t[r]=RedactedString;return t}constructor({additionalAllowedHeaderNames:e=[],additionalAllowedQueryParameters:t=[]}={}){e=defaultAllowedHeaderNames.concat(e),t=defaultAllowedQueryParameters.concat(t),this.allowedHeaderNames=new Set(e.map((e=>e.toLowerCase()))),this.allowedQueryParameters=new Set(t.map((e=>e.toLowerCase())))}}}}),logPolicyName;function logPolicy(e={}){var t;const r=null!==(t=e.logger)&&void 0!==t?t:logger5.info,n=new Sanitizer({additionalAllowedHeaderNames:e.additionalAllowedHeaderNames,additionalAllowedQueryParameters:e.additionalAllowedQueryParameters});return{name:logPolicyName,async sendRequest(e,t){if(!r.enabled)return t(e);r(`Request: ${n.sanitize(e)}`);const i=await t(e);return r(`Response status code: ${i.status}`),r(`Headers: ${n.sanitize(i.headers)}`),i}}}var init_logPolicy=__esm({\"../../node_modules/.pnpm/@azure+core-rest-pipeline@1.18.1/node_modules/@azure/core-rest-pipeline/dist/browser/policies/logPolicy.js\"(){init_globals(),init_log2(),init_sanitizer(),logPolicyName=\"logPolicy\"}}),redirectPolicyName,allowedRedirect;function redirectPolicy(e={}){const{maxRetries:t=20}=e;return{name:redirectPolicyName,async sendRequest(e,r){const n=await r(e);return handleRedirect(r,n,t)}}}async function handleRedirect(e,t,r,n=0){const{request:i,status:o,headers:a}=t,s=a.get(\"location\");if(s&&(300===o||301===o&&allowedRedirect.includes(i.method)||302===o&&allowedRedirect.includes(i.method)||303===o&&\"POST\"===i.method||307===o)&&n__left_angle_mark_r){const t=new URL(s,i.url);i.url=t.toString(),303===o&&(i.method=\"GET\",i.headers.delete(\"Content-Length\"),delete i.body),i.headers.delete(\"Authorization\");const a=await e(i);return handleRedirect(e,a,r,n+1)}return t}var init_redirectPolicy=__esm({\"../../node_modules/.pnpm/@azure+core-rest-pipeline@1.18.1/node_modules/@azure/core-rest-pipeline/dist/browser/policies/redirectPolicy.js\"(){init_globals(),redirectPolicyName=\"redirectPolicy\",allowedRedirect=[\"GET\",\"HEAD\"]}});function getHeaderName(){return\"x-ms-useragent\"}function getBrowserInfo(e){const t=[{name:\"Firefox\",regex:/Firefox\\/([\\d.]+)/},{name:\"Safari\",regex:/Version\\/([\\d.]+).*Safari/}];for(const r of t){const t=e.match(r.regex);if(t)return{brand:r.name,version:t[1]}}}function getBrandVersionString(e){const t=[\"Google Chrome\",\"Microsoft Edge\",\"Opera\",\"Brave\",\"Chromium\"];for(const r of t){const t=e.find((e=>e.brand===r));if(t)return t}}async function setPlatformSpecificData(e){const t=globalThis.navigator;let r=\"unknown\";if(null==t?void 0:t.userAgentData){const n=await t.userAgentData.getHighEntropyValues([\"architecture\",\"platformVersion\"]);r=`${n.architecture}-${n.platform}-${n.platformVersion}`;const i=getBrandVersionString(t.userAgentData.brands);i&&e.set(i.brand,i.version)}else if(null==t?void 0:t.platform){r=t.platform;const n=getBrowserInfo(t.userAgent);n&&e.set(n.brand,n.version)}else\"string\"==typeof globalThis.EdgeRuntime&&e.set(\"EdgeRuntime\",globalThis.EdgeRuntime);e.set(\"OS\",r)}var init_userAgentPlatform=__esm({\"../../node_modules/.pnpm/@azure+core-rest-pipeline@1.18.1/node_modules/@azure/core-rest-pipeline/dist/browser/util/userAgentPlatform.js\"(){init_globals()}}),SDK_VERSION2,DEFAULT_RETRY_POLICY_COUNT,init_constants2=__esm({\"../../node_modules/.pnpm/@azure+core-rest-pipeline@1.18.1/node_modules/@azure/core-rest-pipeline/dist/browser/constants.js\"(){init_globals(),SDK_VERSION2=\"1.18.1\",DEFAULT_RETRY_POLICY_COUNT=3}});function getUserAgentString(e){const t=[];for(const[r,n]of e){const e=n?`${r}/${n}`:r;t.push(e)}return t.join(\" \")}function getUserAgentHeaderName(){return getHeaderName()}async function getUserAgentValue(e){const t=new Map;t.set(\"core-rest-pipeline\",SDK_VERSION2),await setPlatformSpecificData(t);const r=getUserAgentString(t);return e?`${e} ${r}`:r}var init_userAgent=__esm({\"../../node_modules/.pnpm/@azure+core-rest-pipeline@1.18.1/node_modules/@azure/core-rest-pipeline/dist/browser/util/userAgent.js\"(){init_globals(),init_userAgentPlatform(),init_constants2()}}),UserAgentHeaderName,userAgentPolicyName;function userAgentPolicy(e={}){const t=getUserAgentValue(e.userAgentPrefix);return{name:userAgentPolicyName,sendRequest:async(e,r)=>(e.headers.has(UserAgentHeaderName)||e.headers.set(UserAgentHeaderName,await t),r(e))}}var init_userAgentPolicy=__esm({\"../../node_modules/.pnpm/@azure+core-rest-pipeline@1.18.1/node_modules/@azure/core-rest-pipeline/dist/browser/policies/userAgentPolicy.js\"(){init_globals(),init_userAgent(),UserAgentHeaderName=getUserAgentHeaderName(),userAgentPolicyName=\"userAgentPolicy\"}});function isNodeReadableStream(e){return Boolean(e&&\"function\"==typeof e.pipe)}function isWebReadableStream(e){return Boolean(e&&\"function\"==typeof e.getReader&&\"function\"==typeof e.tee)}function isBlob(e){return\"function\"==typeof e.stream}var init_typeGuards2=__esm({\"../../node_modules/.pnpm/@azure+core-rest-pipeline@1.18.1/node_modules/@azure/core-rest-pipeline/dist/browser/util/typeGuards.js\"(){init_globals()}}),rawContent;function hasRawContent(e){return\"function\"==typeof e[rawContent]}function getRawContent(e){return hasRawContent(e)?e[rawContent]():e.stream()}var init_file=__esm({\"../../node_modules/.pnpm/@azure+core-rest-pipeline@1.18.1/node_modules/@azure/core-rest-pipeline/dist/browser/util/file.js\"(){init_globals(),init_browser4(),init_typeGuards2(),rawContent=Symbol(\"rawContent\")}});function drain(e){return new Response(e).blob()}async function toBlobPart(e){if(e instanceof Blob||e instanceof Uint8Array)return e;if(isWebReadableStream(e))return drain(e);const t=getRawContent(e);if(isNodeReadableStream(t))throw new Error(\"Encountered unexpected type. In the browser, `concat` supports Web ReadableStream, Blob, Uint8Array, and files created using `createFile` only.\");return toBlobPart(t)}async function concat(e){const t=[];for(const r of e)t.push(await toBlobPart(\"function\"==typeof r?r():r));return new Blob(t)}var init_concat_common=__esm({\"../../node_modules/.pnpm/@azure+core-rest-pipeline@1.18.1/node_modules/@azure/core-rest-pipeline/dist/browser/util/concat.common.js\"(){init_globals(),init_file(),init_typeGuards2()}}),init_concat=__esm({\"../../node_modules/.pnpm/@azure+core-rest-pipeline@1.18.1/node_modules/@azure/core-rest-pipeline/dist/browser/util/concat.js\"(){init_globals(),init_concat_common()}}),multipartPolicyName,maxBoundaryLength,validBoundaryCharacters;function generateBoundary(){return`----AzSDKFormBoundary${randomUUID()}`}function encodeHeaders(e){let t=\"\";for(const[r,n]of e)t+=`${r}: ${n}\\r\\n`;return t}function getLength(e){return e instanceof Uint8Array?e.byteLength:isBlob(e)?-1===e.size?void 0:e.size:void 0}function getTotalLength(e){let t=0;for(const r of e){const e=getLength(r);if(void 0===e)return;t+=e}return t}async function buildRequestBody(e,t,r){const n=[stringToUint8Array(`--${r}`,\"utf-8\"),...t.flatMap((e=>[stringToUint8Array(\"\\r\\n\",\"utf-8\"),stringToUint8Array(encodeHeaders(e.headers),\"utf-8\"),stringToUint8Array(\"\\r\\n\",\"utf-8\"),e.body,stringToUint8Array(`\\r\\n--${r}`,\"utf-8\")])),stringToUint8Array(\"--\\r\\n\\r\\n\",\"utf-8\")],i=getTotalLength(n);i&&e.headers.set(\"Content-Length\",i),e.body=await concat(n)}function assertValidBoundary(e){if(e.length>maxBoundaryLength)throw new Error(`Multipart boundary \"${e}\" exceeds maximum length of 70 characters`);if(Array.from(e).some((e=>!validBoundaryCharacters.has(e))))throw new Error(`Multipart boundary \"${e}\" contains invalid characters`)}function multipartPolicy(){return{name:multipartPolicyName,async sendRequest(e,t){var r;if(!e.multipartBody)return t(e);if(e.body)throw new Error(\"multipartBody and regular body cannot be set at the same time\");let n=e.multipartBody.boundary;const i=null!==(r=e.headers.get(\"Content-Type\"))&&void 0!==r?r:\"multipart/mixed\",o=i.match(/^(multipart\\/[^ ;]+)(?:; *boundary=(.+))?$/);if(!o)throw new Error(`Got multipart request body, but content-type header was not multipart: ${i}`);const[,a,s]=o;if(s&&n&&s!==n)throw new Error(`Multipart boundary was specified as ${s} in the header, but got ${n} in the request body`);return null!=n||(n=s),n?assertValidBoundary(n):n=generateBoundary(),e.headers.set(\"Content-Type\",`${a}; boundary=${n}`),await buildRequestBody(e,e.multipartBody.parts,n),e.multipartBody=void 0,t(e)}}}var init_multipartPolicy=__esm({\"../../node_modules/.pnpm/@azure+core-rest-pipeline@1.18.1/node_modules/@azure/core-rest-pipeline/dist/browser/policies/multipartPolicy.js\"(){init_globals(),init_browser4(),init_concat(),init_typeGuards2(),multipartPolicyName=\"multipartPolicy\",maxBoundaryLength=70,validBoundaryCharacters=new Set(\"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'()+,-./:=?\")}});function decompressResponsePolicy(){throw new Error(\"decompressResponsePolicy is not supported in browser environment\")}var init_decompressResponsePolicy=__esm({\"../../node_modules/.pnpm/@azure+core-rest-pipeline@1.18.1/node_modules/@azure/core-rest-pipeline/dist/browser/policies/decompressResponsePolicy.js\"(){init_globals()}}),StandardAbortMessage;function delay3(e,t,r){return new Promise(((n,i)=>{let o,a;const s=()=>i(new AbortError((null==r?void 0:r.abortErrorMsg)?null==r?void 0:r.abortErrorMsg:StandardAbortMessage)),l=()=>{(null==r?void 0:r.abortSignal)&&a&&r.abortSignal.removeEventListener(\"abort\",a)};if(a=()=>(o&&clearTimeout(o),l(),s()),(null==r?void 0:r.abortSignal)&&r.abortSignal.aborted)return s();o=setTimeout((()=>{l(),n(t)}),e),(null==r?void 0:r.abortSignal)&&r.abortSignal.addEventListener(\"abort\",a)}))}function parseHeaderValueAsNumber(e,t){const r=e.headers.get(t);if(!r)return;const n=Number(r);return Number.isNaN(n)?void 0:n}var init_helpers=__esm({\"../../node_modules/.pnpm/@azure+core-rest-pipeline@1.18.1/node_modules/@azure/core-rest-pipeline/dist/browser/util/helpers.js\"(){init_globals(),init_browser3(),StandardAbortMessage=\"The operation was aborted.\"}}),RetryAfterHeader,AllRetryAfterHeaders;function getRetryAfterInMs(e){if(e&&[429,503].includes(e.status))try{for(const n of AllRetryAfterHeaders){const t=parseHeaderValueAsNumber(e,n);if(0===t||t)return t*(n===RetryAfterHeader?1e3:1)}const t=e.headers.get(RetryAfterHeader);if(!t)return;const r=Date.parse(t)-Date.now();return Number.isFinite(r)?Math.max(0,r):void 0}catch(t){return}}function isThrottlingRetryResponse(e){return Number.isFinite(getRetryAfterInMs(e))}function throttlingRetryStrategy(){return{name:\"throttlingRetryStrategy\",retry({response:e}){const t=getRetryAfterInMs(e);return Number.isFinite(t)?{retryAfterInMs:t}:{skipStrategy:!0}}}}var init_throttlingRetryStrategy=__esm({\"../../node_modules/.pnpm/@azure+core-rest-pipeline@1.18.1/node_modules/@azure/core-rest-pipeline/dist/browser/retryStrategies/throttlingRetryStrategy.js\"(){init_globals(),init_helpers(),AllRetryAfterHeaders=[\"retry-after-ms\",\"x-ms-retry-after-ms\",RetryAfterHeader=\"Retry-After\"]}}),DEFAULT_CLIENT_RETRY_INTERVAL,DEFAULT_CLIENT_MAX_RETRY_INTERVAL;function exponentialRetryStrategy(e={}){var t,r;const n=null!==(t=e.retryDelayInMs)&&void 0!==t?t:DEFAULT_CLIENT_RETRY_INTERVAL,i=null!==(r=e.maxRetryDelayInMs)&&void 0!==r?r:DEFAULT_CLIENT_MAX_RETRY_INTERVAL;return{name:\"exponentialRetryStrategy\",retry({retryCount:t,response:r,responseError:o}){const a=isSystemError(o),s=a&&e.ignoreSystemErrors,l=isExponentialRetryResponse(r),u=l&&e.ignoreHttpStatusCodes;return r&&(isThrottlingRetryResponse(r)||!l)||u||s?{skipStrategy:!0}:!o||a||l?calculateRetryDelay(t,{retryDelayInMs:n,maxRetryDelayInMs:i}):{errorToThrow:o}}}}function isExponentialRetryResponse(e){return Boolean(e&&void 0!==e.status&&(e.status>=500||408===e.status)&&501!==e.status&&505!==e.status)}function isSystemError(e){return!!e&&(\"ETIMEDOUT\"===e.code||\"ESOCKETTIMEDOUT\"===e.code||\"ECONNREFUSED\"===e.code||\"ECONNRESET\"===e.code||\"ENOENT\"===e.code||\"ENOTFOUND\"===e.code)}var init_exponentialRetryStrategy=__esm({\"../../node_modules/.pnpm/@azure+core-rest-pipeline@1.18.1/node_modules/@azure/core-rest-pipeline/dist/browser/retryStrategies/exponentialRetryStrategy.js\"(){init_globals(),init_browser4(),init_throttlingRetryStrategy(),DEFAULT_CLIENT_RETRY_INTERVAL=1e3,DEFAULT_CLIENT_MAX_RETRY_INTERVAL=64e3}}),retryPolicyLogger,retryPolicyName;function retryPolicy(e,t={maxRetries:DEFAULT_RETRY_POLICY_COUNT}){const r=t.logger||retryPolicyLogger;return{name:retryPolicyName,async sendRequest(n,i){var o,a;let s,l,u=-1;e:for(;;){u+=1,s=void 0,l=void 0;try{r.info(`Retry ${u}: Attempting to send request`,n.requestId),s=await i(n),r.info(`Retry ${u}: Received a response from request`,n.requestId)}catch(c){if(r.error(`Retry ${u}: Received an error from request`,n.requestId),l=c,!c||\"RestError\"!==l.name)throw c;s=l.response}if(null===(o=n.abortSignal)||void 0===o?void 0:o.aborted)throw r.error(`Retry ${u}: Request aborted.`),new AbortError;if(u>=(null!==(a=t.maxRetries)&&void 0!==a?a:DEFAULT_RETRY_POLICY_COUNT)){if(r.info(`Retry ${u}: Maximum retries reached. Returning the last received response, or throwing the last received error.`),l)throw l;if(s)return s;throw new Error(\"Maximum retries reached with no response or error to throw\")}r.info(`Retry ${u}: Processing ${e.length} retry strategies.`);t:for(const t of e){const e=t.logger||retryPolicyLogger;e.info(`Retry ${u}: Processing retry strategy ${t.name}.`);const r=t.retry({retryCount:u,response:s,responseError:l});if(r.skipStrategy){e.info(`Retry ${u}: Skipped.`);continue t}const{errorToThrow:i,retryAfterInMs:o,redirectTo:a}=r;if(i)throw e.error(`Retry ${u}: Retry strategy ${t.name} throws error:`,i),i;if(o||0===o){e.info(`Retry ${u}: Retry strategy ${t.name} retries after ${o}`),await delay3(o,void 0,{abortSignal:n.abortSignal});continue e}if(a){e.info(`Retry ${u}: Retry strategy ${t.name} redirects to ${a}`),n.url=a;continue e}}if(l)throw r.info(\"None of the retry strategies could work with the received error. Throwing it.\"),l;if(s)return r.info(\"None of the retry strategies could work with the received response. Returning it.\"),s}}}}var init_retryPolicy=__esm({\"../../node_modules/.pnpm/@azure+core-rest-pipeline@1.18.1/node_modules/@azure/core-rest-pipeline/dist/browser/policies/retryPolicy.js\"(){init_globals(),init_helpers(),init_browser(),init_browser3(),init_constants2(),retryPolicyLogger=createClientLogger(\"core-rest-pipeline retryPolicy\"),retryPolicyName=\"retryPolicy\"}}),defaultRetryPolicyName;function defaultRetryPolicy(e={}){var t;return{name:defaultRetryPolicyName,sendRequest:retryPolicy([throttlingRetryStrategy(),exponentialRetryStrategy(e)],{maxRetries:null!==(t=e.maxRetries)&&void 0!==t?t:DEFAULT_RETRY_POLICY_COUNT}).sendRequest}}var init_defaultRetryPolicy=__esm({\"../../node_modules/.pnpm/@azure+core-rest-pipeline@1.18.1/node_modules/@azure/core-rest-pipeline/dist/browser/policies/defaultRetryPolicy.js\"(){init_globals(),init_exponentialRetryStrategy(),init_throttlingRetryStrategy(),init_retryPolicy(),init_constants2(),defaultRetryPolicyName=\"defaultRetryPolicy\"}}),HttpHeadersImpl;function normalizeName(e){return e.toLowerCase()}function*headerIterator(e){for(const t of e.values())yield[t.name,t.value]}function createHttpHeaders(e){return new HttpHeadersImpl(e)}var init_httpHeaders=__esm({\"../../node_modules/.pnpm/@azure+core-rest-pipeline@1.18.1/node_modules/@azure/core-rest-pipeline/dist/browser/httpHeaders.js\"(){init_globals(),HttpHeadersImpl=class{set(e,t){this._headersMap.set(normalizeName(e),{name:e,value:String(t).trim()})}get(e){var t;return null===(t=this._headersMap.get(normalizeName(e)))||void 0===t?void 0:t.value}has(e){return this._headersMap.has(normalizeName(e))}delete(e){this._headersMap.delete(normalizeName(e))}toJSON(e={}){const t={};if(e.preserveCase)for(const r of this._headersMap.values())t[r.name]=r.value;else for(const[r,n]of this._headersMap)t[r]=n.value;return t}toString(){return JSON.stringify(this.toJSON({preserveCase:!0}))}[Symbol.iterator](){return headerIterator(this._headersMap)}constructor(e){if(this._headersMap=new Map,e)for(const t of Object.keys(e))this.set(t,e[t])}}}}),formDataPolicyName;function formDataToFormDataMap(e){var t;const r={};for(const[n,i]of e.entries())null!==(t=r[n])&&void 0!==t||(r[n]=[]),r[n].push(i);return r}function formDataPolicy(){return{name:formDataPolicyName,async sendRequest(e,t){if(isNodeLike&&\"undefined\"!=typeof FormData&&e.body instanceof FormData&&(e.formData=formDataToFormDataMap(e.body),e.body=void 0),e.formData){const t=e.headers.get(\"Content-Type\");t&&-1!==t.indexOf(\"application/x-www-form-urlencoded\")?e.body=wwwFormUrlEncode(e.formData):await prepareFormData(e.formData,e),e.formData=void 0}return t(e)}}}function wwwFormUrlEncode(e){const t=new URLSearchParams;for(const[r,n]of Object.entries(e))if(Array.isArray(n))for(const e of n)t.append(r,e.toString());else t.append(r,n.toString());return t.toString()}async function prepareFormData(e,t){const r=t.headers.get(\"Content-Type\");if(r&&!r.startsWith(\"multipart/form-data\"))return;t.headers.set(\"Content-Type\",null!=r?r:\"multipart/form-data\");const n=[];for(const[i,o]of Object.entries(e))for(const e of Array.isArray(o)?o:[o])if(\"string\"==typeof e)n.push({headers:createHttpHeaders({\"Content-Disposition\":`form-data; name=\"${i}\"`}),body:stringToUint8Array(e,\"utf-8\")});else{if(null==e||\"object\"!=typeof e)throw new Error(`Unexpected value for key ${i}: ${e}. Value should be serialized to string first.`);{const t=e.name||\"blob\",r=createHttpHeaders();r.set(\"Content-Disposition\",`form-data; name=\"${i}\"; filename=\"${t}\"`),r.set(\"Content-Type\",e.type||\"application/octet-stream\"),n.push({headers:r,body:e})}}t.multipartBody={parts:n}}var init_formDataPolicy=__esm({\"../../node_modules/.pnpm/@azure+core-rest-pipeline@1.18.1/node_modules/@azure/core-rest-pipeline/dist/browser/policies/formDataPolicy.js\"(){init_globals(),init_browser4(),init_httpHeaders(),formDataPolicyName=\"formDataPolicy\"}}),errorMessage;function proxyPolicy(){throw new Error(errorMessage)}var init_proxyPolicy_common=__esm({\"../../node_modules/.pnpm/@azure+core-rest-pipeline@1.18.1/node_modules/@azure/core-rest-pipeline/dist/browser/policies/proxyPolicy.common.js\"(){init_globals(),errorMessage=\"proxyPolicy is not supported in browser environment\"}}),init_proxyPolicy=__esm({\"../../node_modules/.pnpm/@azure+core-rest-pipeline@1.18.1/node_modules/@azure/core-rest-pipeline/dist/browser/policies/proxyPolicy.js\"(){init_globals(),init_proxyPolicy_common()}}),setClientRequestIdPolicyName;function setClientRequestIdPolicy(e=\"x-ms-client-request-id\"){return{name:setClientRequestIdPolicyName,sendRequest:async(t,r)=>(t.headers.has(e)||t.headers.set(e,t.requestId),r(t))}}var init_setClientRequestIdPolicy=__esm({\"../../node_modules/.pnpm/@azure+core-rest-pipeline@1.18.1/node_modules/@azure/core-rest-pipeline/dist/browser/policies/setClientRequestIdPolicy.js\"(){init_globals(),setClientRequestIdPolicyName=\"setClientRequestIdPolicy\"}}),tlsPolicyName;function tlsPolicy(e){return{name:tlsPolicyName,sendRequest:async(t,r)=>(t.tlsSettings||(t.tlsSettings=e),r(t))}}var init_tlsPolicy=__esm({\"../../node_modules/.pnpm/@azure+core-rest-pipeline@1.18.1/node_modules/@azure/core-rest-pipeline/dist/browser/policies/tlsPolicy.js\"(){init_globals(),tlsPolicyName=\"tlsPolicy\"}}),custom,init_inspect_common=__esm({\"../../node_modules/.pnpm/@azure+core-rest-pipeline@1.18.1/node_modules/@azure/core-rest-pipeline/dist/browser/util/inspect.common.js\"(){init_globals(),custom={}}}),init_inspect=__esm({\"../../node_modules/.pnpm/@azure+core-rest-pipeline@1.18.1/node_modules/@azure/core-rest-pipeline/dist/browser/util/inspect.js\"(){init_globals(),init_inspect_common()}}),errorSanitizer,RestError;function isRestError(e){return e instanceof RestError||isError(e)&&\"RestError\"===e.name}var init_restError=__esm({\"../../node_modules/.pnpm/@azure+core-rest-pipeline@1.18.1/node_modules/@azure/core-rest-pipeline/dist/browser/restError.js\"(){init_globals(),init_browser4(),init_inspect(),init_sanitizer(),errorSanitizer=new Sanitizer,(RestError=class e extends Error{[custom](){return`RestError: ${this.message} \\n ${errorSanitizer.sanitize(Object.assign(Object.assign({},this),{request:this.request,response:this.response}))}`}constructor(t,r={}){super(t),this.name=\"RestError\",this.code=r.code,this.statusCode=r.statusCode,Object.defineProperty(this,\"request\",{value:r.request,enumerable:!1}),Object.defineProperty(this,\"response\",{value:r.response,enumerable:!1}),Object.setPrototypeOf(this,e.prototype)}}).REQUEST_SEND_ERROR=\"REQUEST_SEND_ERROR\",RestError.PARSE_ERROR=\"PARSE_ERROR\"}}),tracingPolicyName;function tracingPolicy(e={}){const t=getUserAgentValue(e.userAgentPrefix),r=new Sanitizer({additionalAllowedQueryParameters:e.additionalAllowedQueryParameters}),n=tryCreateTracingClient();return{name:tracingPolicyName,async sendRequest(e,i){var o;if(!n)return i(e);const a=await t,s={\"http.url\":r.sanitizeUrl(e.url),\"http.method\":e.method,\"http.user_agent\":a,requestId:e.requestId};a&&(s[\"http.user_agent\"]=a);const{span:l,tracingContext:u}=null!==(o=tryCreateSpan(n,e,s))&&void 0!==o?o:{};if(!l||!u)return i(e);try{const t=await n.withContext(u,i,e);return tryProcessResponse(l,t),t}catch(c){throw tryProcessError(l,c),c}}}}function tryCreateTracingClient(){try{return createTracingClient({namespace:\"\",packageName:\"@azure/core-rest-pipeline\",packageVersion:SDK_VERSION2})}catch(e){return void logger5.warning(`Error when creating the TracingClient: ${getErrorMessage(e)}`)}}function tryCreateSpan(e,t,r){try{const{span:n,updatedOptions:i}=e.startSpan(`HTTP ${t.method}`,{tracingOptions:t.tracingOptions},{spanKind:\"client\",spanAttributes:r});if(!n.isRecording())return void n.end();const o=e.createRequestHeaders(i.tracingOptions.tracingContext);for(const[e,r]of Object.entries(o))t.headers.set(e,r);return{span:n,tracingContext:i.tracingOptions.tracingContext}}catch(n){return void logger5.warning(`Skipping creating a tracing span due to an error: ${getErrorMessage(n)}`)}}function tryProcessError(e,t){try{e.setStatus({status:\"error\",error:isError(t)?t:void 0}),isRestError(t)&&t.statusCode&&e.setAttribute(\"http.status_code\",t.statusCode),e.end()}catch(r){logger5.warning(`Skipping tracing span processing due to an error: ${getErrorMessage(r)}`)}}function tryProcessResponse(e,t){try{e.setAttribute(\"http.status_code\",t.status);const r=t.headers.get(\"x-ms-request-id\");r&&e.setAttribute(\"serviceRequestId\",r),e.setStatus({status:\"success\"}),e.end()}catch(r){logger5.warning(`Skipping tracing span processing due to an error: ${getErrorMessage(r)}`)}}var init_tracingPolicy=__esm({\"../../node_modules/.pnpm/@azure+core-rest-pipeline@1.18.1/node_modules/@azure/core-rest-pipeline/dist/browser/policies/tracingPolicy.js\"(){init_globals(),init_browser2(),init_constants2(),init_userAgent(),init_log2(),init_browser4(),init_restError(),init_sanitizer(),tracingPolicyName=\"tracingPolicy\"}});function createPipelineFromOptions(e){var t;const r=createEmptyPipeline();return isNodeLike&&(e.tlsOptions&&r.addPolicy(tlsPolicy(e.tlsOptions)),r.addPolicy(proxyPolicy(e.proxyOptions)),r.addPolicy(decompressResponsePolicy())),r.addPolicy(formDataPolicy(),{beforePolicies:[multipartPolicyName]}),r.addPolicy(userAgentPolicy(e.userAgentOptions)),r.addPolicy(setClientRequestIdPolicy(null===(t=e.telemetryOptions)||void 0===t?void 0:t.clientRequestIdHeaderName)),r.addPolicy(multipartPolicy(),{afterPhase:\"Deserialize\"}),r.addPolicy(defaultRetryPolicy(e.retryOptions),{phase:\"Retry\"}),r.addPolicy(tracingPolicy(Object.assign(Object.assign({},e.userAgentOptions),e.loggingOptions)),{afterPhase:\"Retry\"}),isNodeLike&&r.addPolicy(redirectPolicy(e.redirectOptions),{afterPhase:\"Retry\"}),r.addPolicy(logPolicy(e.loggingOptions),{afterPhase:\"Sign\"}),r}var init_createPipelineFromOptions=__esm({\"../../node_modules/.pnpm/@azure+core-rest-pipeline@1.18.1/node_modules/@azure/core-rest-pipeline/dist/browser/createPipelineFromOptions.js\"(){init_globals(),init_logPolicy(),init_pipeline(),init_redirectPolicy(),init_userAgentPolicy(),init_multipartPolicy(),init_decompressResponsePolicy(),init_defaultRetryPolicy(),init_formDataPolicy(),init_browser4(),init_proxyPolicy(),init_setClientRequestIdPolicy(),init_tlsPolicy(),init_tracingPolicy()}}),FetchHttpClient;function isBlob2(e){return(\"function\"==typeof Blob||\"object\"==typeof Blob)&&e instanceof Blob}async function makeRequest(e){const{abortController:t,abortControllerCleanup:r}=setupAbortSignal(e);try{const n=buildFetchHeaders(e.headers),{streaming:i,body:o}=buildRequestBody2(e),a=Object.assign(Object.assign({body:o,method:e.method,headers:n,signal:t.signal},\"credentials\"in Request.prototype?{credentials:e.withCredentials?\"include\":\"same-origin\"}:{}),\"cache\"in Request.prototype?{cache:\"no-store\"}:{});i&&(a.duplex=\"half\");const s=await fetch(e.url,a);return isBlob2(e.body)&&e.onUploadProgress&&e.onUploadProgress({loadedBytes:e.body.size}),buildPipelineResponse(s,e,r)}catch(n){throw null==r||r(),n}}async function buildPipelineResponse(e,t,r){var n,i;const o={request:t,headers:buildPipelineHeaders(e),status:e.status},a=isWebReadableStream(e.body)?buildBodyStream(e.body,{onProgress:t.onDownloadProgress,onEnd:r}):e.body;if((null===(n=t.streamResponseStatusCodes)||void 0===n?void 0:n.has(Number.POSITIVE_INFINITY))||(null===(i=t.streamResponseStatusCodes)||void 0===i?void 0:i.has(o.status)))if(t.enableBrowserStreams)o.browserStreamBody=null!=a?a:void 0;else{const e=new Response(a);o.blobBody=e.blob(),null==r||r()}else{const e=new Response(a);o.bodyAsText=await e.text(),null==r||r()}return o}function setupAbortSignal(e){const t=new AbortController;let r,n;if(e.abortSignal){if(e.abortSignal.aborted)throw new AbortError(\"The operation was aborted.\");n=e=>{\"abort\"===e.type&&t.abort()},e.abortSignal.addEventListener(\"abort\",n),r=()=>{var t;n&&(null===(t=e.abortSignal)||void 0===t||t.removeEventListener(\"abort\",n))}}return e.timeout>0&&setTimeout((()=>{t.abort()}),e.timeout),{abortController:t,abortControllerCleanup:r}}function getError2(e,t){var r;return e&&\"AbortError\"===(null==e?void 0:e.name)?e:new RestError(`Error sending request: ${e.message}`,{code:null!==(r=null==e?void 0:e.code)&&void 0!==r?r:RestError.REQUEST_SEND_ERROR,request:t})}function buildFetchHeaders(e){const t=new Headers;for(const[r,n]of e)t.append(r,n);return t}function buildPipelineHeaders(e){const t=createHttpHeaders();for(const[r,n]of e.headers)t.set(r,n);return t}function buildRequestBody2(e){const t=\"function\"==typeof e.body?e.body():e.body;if(isNodeReadableStream(t))throw new Error(\"Node streams are not supported in browser environment.\");return isWebReadableStream(t)?{streaming:!0,body:buildBodyStream(t,{onProgress:e.onUploadProgress})}:{streaming:!1,body:t}}function buildBodyStream(e,t={}){let r=0;const{onProgress:n,onEnd:i}=t;if(isTransformStreamSupported(e))return e.pipeThrough(new TransformStream({transform(e,t){null!==e?(t.enqueue(e),r+=e.length,n&&n({loadedBytes:r})):t.terminate()},flush(){null==i||i()}}));{const t=e.getReader();return new ReadableStream({async pull(e){var o;const{done:a,value:s}=await t.read();if(a||!s)return null==i||i(),e.close(),void t.releaseLock();r+=null!==(o=null==s?void 0:s.length)&&void 0!==o?o:0,e.enqueue(s),n&&n({loadedBytes:r})},cancel:e=>(null==i||i(),t.cancel(e))})}}function createFetchHttpClient(){return new FetchHttpClient}function isTransformStreamSupported(e){return void 0!==e.pipeThrough&&void 0!==self.TransformStream}var init_fetchHttpClient=__esm({\"../../node_modules/.pnpm/@azure+core-rest-pipeline@1.18.1/node_modules/@azure/core-rest-pipeline/dist/browser/fetchHttpClient.js\"(){init_globals(),init_browser3(),init_restError(),init_httpHeaders(),init_typeGuards2(),FetchHttpClient=class{async sendRequest(e){if(\"https:\"!==new URL(e.url).protocol&&!e.allowInsecureConnection)throw new Error(`Cannot connect to ${e.url} while allowInsecureConnection is false.`);if(e.proxySettings)throw new Error(\"HTTP proxy is not supported in browser environment\");try{return await makeRequest(e)}catch(t){throw getError2(t,e)}}}}});function createDefaultHttpClient(){return createFetchHttpClient()}var init_defaultHttpClient=__esm({\"../../node_modules/.pnpm/@azure+core-rest-pipeline@1.18.1/node_modules/@azure/core-rest-pipeline/dist/browser/defaultHttpClient.js\"(){init_globals(),init_fetchHttpClient()}}),PipelineRequestImpl;function createPipelineRequest(e){return new PipelineRequestImpl(e)}var init_pipelineRequest=__esm({\"../../node_modules/.pnpm/@azure+core-rest-pipeline@1.18.1/node_modules/@azure/core-rest-pipeline/dist/browser/pipelineRequest.js\"(){init_globals(),init_httpHeaders(),init_browser4(),PipelineRequestImpl=class{constructor(e){var t,r,n,i,o,a,s;this.url=e.url,this.body=e.body,this.headers=null!==(t=e.headers)&&void 0!==t?t:createHttpHeaders(),this.method=null!==(r=e.method)&&void 0!==r?r:\"GET\",this.timeout=null!==(n=e.timeout)&&void 0!==n?n:0,this.multipartBody=e.multipartBody,this.formData=e.formData,this.disableKeepAlive=null!==(i=e.disableKeepAlive)&&void 0!==i&&i,this.proxySettings=e.proxySettings,this.streamResponseStatusCodes=e.streamResponseStatusCodes,this.withCredentials=null!==(o=e.withCredentials)&&void 0!==o&&o,this.abortSignal=e.abortSignal,this.tracingOptions=e.tracingOptions,this.onUploadProgress=e.onUploadProgress,this.onDownloadProgress=e.onDownloadProgress,this.requestId=e.requestId||randomUUID(),this.allowInsecureConnection=null!==(a=e.allowInsecureConnection)&&void 0!==a&&a,this.enableBrowserStreams=null!==(s=e.enableBrowserStreams)&&void 0!==s&&s}}}}),init_exponentialRetryPolicy=__esm({\"../../node_modules/.pnpm/@azure+core-rest-pipeline@1.18.1/node_modules/@azure/core-rest-pipeline/dist/browser/policies/exponentialRetryPolicy.js\"(){init_globals(),init_exponentialRetryStrategy(),init_retryPolicy(),init_constants2()}}),init_systemErrorRetryPolicy=__esm({\"../../node_modules/.pnpm/@azure+core-rest-pipeline@1.18.1/node_modules/@azure/core-rest-pipeline/dist/browser/policies/systemErrorRetryPolicy.js\"(){init_globals(),init_exponentialRetryStrategy(),init_retryPolicy(),init_constants2()}}),init_throttlingRetryPolicy=__esm({\"../../node_modules/.pnpm/@azure+core-rest-pipeline@1.18.1/node_modules/@azure/core-rest-pipeline/dist/browser/policies/throttlingRetryPolicy.js\"(){init_globals(),init_throttlingRetryStrategy(),init_retryPolicy(),init_constants2()}}),DEFAULT_CYCLER_OPTIONS;async function beginRefresh(e,t,r){async function n(){if(!(Date.now()__left_angle_mark_r)){const t=await e();if(null===t)throw new Error(\"Failed to refresh access token.\");return t}try{return await e()}catch(t){return null}}let i=await n();for(;null===i;)await delay3(t),i=await n();return i}function createTokenCycler(e,t){let r,n=null,i=null;const o=Object.assign(Object.assign({},DEFAULT_CYCLER_OPTIONS),t),a={get isRefreshing(){return null!==n},get shouldRefresh(){var e;return!a.isRefreshing&&(!!((null==i?void 0:i.refreshAfterTimestamp)&&i.refreshAfterTimestamp__left_angle_mark_Date.now())||(null!==(e=null==i?void 0:i.expiresOnTimestamp)&&void 0!==e?e:0)-o.refreshWindowInMs__left_angle_mark_Date.now())},get mustRefresh(){return null===i||i.expiresOnTimestamp-o.forcedRefreshWindowInMs__left_angle_mark_Date.now()}};function s(t,s){var l;return a.isRefreshing||(n=beginRefresh((()=>e.getToken(t,s)),o.retryIntervalInMs,null!==(l=null==i?void 0:i.expiresOnTimestamp)&&void 0!==l?l:Date.now()).then((e=>(n=null,i=e,r=s.tenantId,i))).catch((e=>{throw n=null,i=null,r=void 0,e}))),n}return async(e,t)=>{const n=Boolean(t.claims),o=r!==t.tenantId;return n&&(i=null),o||n||a.mustRefresh?s(e,t):(a.shouldRefresh&&s(e,t),i)}}var init_tokenCycler=__esm({\"../../node_modules/.pnpm/@azure+core-rest-pipeline@1.18.1/node_modules/@azure/core-rest-pipeline/dist/browser/util/tokenCycler.js\"(){init_globals(),init_helpers(),DEFAULT_CYCLER_OPTIONS={forcedRefreshWindowInMs:1e3,retryIntervalInMs:3e3,refreshWindowInMs:12e4}}}),bearerTokenAuthenticationPolicyName;async function trySendRequest(e,t){try{return[await t(e),void 0]}catch(r){if(isRestError(r)&&r.response)return[r.response,r];throw r}}async function defaultAuthorizeRequest(e){const{scopes:t,getAccessToken:r,request:n}=e,i={abortSignal:n.abortSignal,tracingOptions:n.tracingOptions,enableCae:!0},o=await r(t,i);o&&e.request.headers.set(\"Authorization\",`Bearer ${o.token}`)}function isChallengeResponse(e){return 401===e.status&&e.headers.has(\"WWW-Authenticate\")}async function authorizeRequestOnCaeChallenge(e,t){var r;const{scopes:n}=e,i=await e.getAccessToken(n,{enableCae:!0,claims:t});return!!i&&(e.request.headers.set(\"Authorization\",`${null!==(r=i.tokenType)&&void 0!==r?r:\"Bearer\"} ${i.token}`),!0)}function bearerTokenAuthenticationPolicy(e){var t,r,n;const{credential:i,scopes:o,challengeCallbacks:a}=e,s=e.logger||logger5,l={authorizeRequest:null!==(r=null===(t=null==a?void 0:a.authorizeRequest)||void 0===t?void 0:t.bind(a))&&void 0!==r?r:defaultAuthorizeRequest,authorizeRequestOnChallenge:null===(n=null==a?void 0:a.authorizeRequestOnChallenge)||void 0===n?void 0:n.bind(a)},u=i?createTokenCycler(i):()=>Promise.resolve(null);return{name:bearerTokenAuthenticationPolicyName,async sendRequest(e,t){if(!e.url.toLowerCase().startsWith(\"https://\"))throw new Error(\"Bearer token authentication is not permitted for non-TLS protected (non-https) URLs.\");let r,n,i;if(await l.authorizeRequest({scopes:Array.isArray(o)?o:[o],request:e,getAccessToken:u,logger:s}),[r,n]=await trySendRequest(e,t),isChallengeResponse(r)){let c=getCaeChallengeClaims(r.headers.get(\"WWW-Authenticate\"));if(c){let l;try{l=atob(c)}catch(a){return s.warning(`The WWW-Authenticate header contains \"claims\" that cannot be parsed. Unable to perform the Continuous Access Evaluation authentication flow. Unparsable claims: ${c}`),r}i=await authorizeRequestOnCaeChallenge({scopes:Array.isArray(o)?o:[o],response:r,request:e,getAccessToken:u,logger:s},l),i&&([r,n]=await trySendRequest(e,t))}else if(l.authorizeRequestOnChallenge&&(i=await l.authorizeRequestOnChallenge({scopes:Array.isArray(o)?o:[o],request:e,response:r,getAccessToken:u,logger:s}),i&&([r,n]=await trySendRequest(e,t)),isChallengeResponse(r)&&(c=getCaeChallengeClaims(r.headers.get(\"WWW-Authenticate\")),c))){let l;try{l=atob(c)}catch(a){return s.warning(`The WWW-Authenticate header contains \"claims\" that cannot be parsed. Unable to perform the Continuous Access Evaluation authentication flow. Unparsable claims: ${c}`),r}i=await authorizeRequestOnCaeChallenge({scopes:Array.isArray(o)?o:[o],response:r,request:e,getAccessToken:u,logger:s},l),i&&([r,n]=await trySendRequest(e,t))}}if(n)throw n;return r}}}function parseChallenges(e){const t=/(\\w+)\\s+((?:\\w+=(?:\"[^\"]*\"|[^,]*),?\\s*)+)/g,r=/(\\w+)=\"([^\"]*)\"/g,n=[];let i;for(;null!==(i=t.exec(e));){const e=i[1],t=i[2],o={};let a;for(;null!==(a=r.exec(t));)o[a[1]]=a[2];n.push({scheme:e,params:o})}return n}function getCaeChallengeClaims(e){var t;if(e)return null===(t=parseChallenges(e).find((e=>\"Bearer\"===e.scheme&&e.params.claims&&\"insufficient_claims\"===e.params.error)))||void 0===t?void 0:t.params.claims}var init_bearerTokenAuthenticationPolicy=__esm({\"../../node_modules/.pnpm/@azure+core-rest-pipeline@1.18.1/node_modules/@azure/core-rest-pipeline/dist/browser/policies/bearerTokenAuthenticationPolicy.js\"(){init_globals(),init_tokenCycler(),init_log2(),init_restError(),bearerTokenAuthenticationPolicyName=\"bearerTokenAuthenticationPolicy\"}}),init_ndJsonPolicy=__esm({\"../../node_modules/.pnpm/@azure+core-rest-pipeline@1.18.1/node_modules/@azure/core-rest-pipeline/dist/browser/policies/ndJsonPolicy.js\"(){init_globals()}}),init_auxiliaryAuthenticationHeaderPolicy=__esm({\"../../node_modules/.pnpm/@azure+core-rest-pipeline@1.18.1/node_modules/@azure/core-rest-pipeline/dist/browser/policies/auxiliaryAuthenticationHeaderPolicy.js\"(){init_globals(),init_tokenCycler(),init_log2()}}),init_browser5=__esm({\"../../node_modules/.pnpm/@azure+core-rest-pipeline@1.18.1/node_modules/@azure/core-rest-pipeline/dist/browser/index.js\"(){init_globals(),init_pipeline(),init_createPipelineFromOptions(),init_defaultHttpClient(),init_httpHeaders(),init_pipelineRequest(),init_restError(),init_decompressResponsePolicy(),init_exponentialRetryPolicy(),init_setClientRequestIdPolicy(),init_logPolicy(),init_multipartPolicy(),init_proxyPolicy(),init_redirectPolicy(),init_systemErrorRetryPolicy(),init_throttlingRetryPolicy(),init_retryPolicy(),init_tracingPolicy(),init_defaultRetryPolicy(),init_userAgentPolicy(),init_tlsPolicy(),init_formDataPolicy(),init_bearerTokenAuthenticationPolicy(),init_ndJsonPolicy(),init_auxiliaryAuthenticationHeaderPolicy(),init_file()}});function createConfigurationErrorMessage(e){return`The current credential is not configured to acquire tokens for tenant ${e}. To enable acquiring tokens for this tenant add it to the AdditionallyAllowedTenants on the credential options, or add \"*\" to AdditionallyAllowedTenants to allow acquiring tokens for any tenant.`}function processMultiTenantRequest(e,t,r=[]){var n;let i;if(i=\"adfs\"===e?e:null!==(n=null==t?void 0:t.tenantId)&&void 0!==n?n:e,e&&i!==e&&!r.includes(\"*\")&&!r.some((e=>0===e.localeCompare(i))))throw new Error(createConfigurationErrorMessage(e));return i}var init_processMultiTenantRequest_browser=__esm({\"../../node_modules/.pnpm/@azure+identity@4.5.0/node_modules/@azure/identity/dist-esm/src/util/processMultiTenantRequest.browser.js\"(){init_globals()}});function checkTenantId(e,t){if(!t.match(/^[0-9a-zA-Z-.]+$/)){const t=new Error(\"Invalid tenant id provided. You can locate your tenant id by following the instructions listed here: https://learn.microsoft.com/partner-center/find-ids-and-domain-names.\");throw e.info(formatError(\"\",t)),t}}function resolveTenantId(e,t,r){return t?(checkTenantId(e,t),t):(r||(r=DeveloperSignOnClientId),r!==DeveloperSignOnClientId?\"common\":\"organizations\")}function resolveAdditionallyAllowedTenantIds(e){return e&&0!==e.length?e.includes(\"*\")?ALL_TENANTS:e:[]}var init_tenantIdUtils=__esm({\"../../node_modules/.pnpm/@azure+identity@4.5.0/node_modules/@azure/identity/dist-esm/src/util/tenantIdUtils.js\"(){init_globals(),init_constants(),init_logging(),init_processMultiTenantRequest_browser()}}),init_base64=__esm({\"../../node_modules/.pnpm/@azure+core-client@1.9.2/node_modules/@azure/core-client/dist/browser/base64.js\"(){init_globals()}}),XML_ATTRKEY,XML_CHARKEY,init_interfaces=__esm({\"../../node_modules/.pnpm/@azure+core-client@1.9.2/node_modules/@azure/core-client/dist/browser/interfaces.js\"(){init_globals(),XML_ATTRKEY=\"$\",XML_CHARKEY=\"_\"}});function isPrimitiveBody(e,t){return\"Composite\"!==t&&\"Dictionary\"!==t&&(\"string\"==typeof e||\"number\"==typeof e||\"boolean\"==typeof e||null!==(null==t?void 0:t.match(/^(Date|DateTime|DateTimeRfc1123|UnixTime|ByteArray|Base64Url)$/i))||null==e)}function handleNullableResponseAndWrappableBody(e){const t=Object.assign(Object.assign({},e.headers),e.body);return e.hasNullableType&&0===Object.getOwnPropertyNames(t).length?e.shouldWrapBody?{body:null}:null:e.shouldWrapBody?Object.assign(Object.assign({},e.headers),{body:e.body}):t}function flattenResponse(e,t){var r,n;const i=e.parsedHeaders;if(\"HEAD\"===e.request.method)return Object.assign(Object.assign({},i),{body:e.parsedBody});const o=t&&t.bodyMapper,a=Boolean(null==o?void 0:o.nullable),s=null==o?void 0:o.type.name;if(\"Stream\"===s)return Object.assign(Object.assign({},i),{blobBody:e.blobBody,readableStreamBody:e.readableStreamBody});const l=\"Composite\"===s&&o.type.modelProperties||{},u=Object.keys(l).some((e=>\"\"===l[e].serializedName));if(\"Sequence\"===s||u){const t=null!==(r=e.parsedBody)&&void 0!==r?r:[];for(const r of Object.keys(l))l[r].serializedName&&(t[r]=null===(n=e.parsedBody)||void 0===n?void 0:n[r]);if(i)for(const e of Object.keys(i))t[e]=i[e];return!a||e.parsedBody||i||0!==Object.getOwnPropertyNames(l).length?t:null}return handleNullableResponseAndWrappableBody({body:e.parsedBody,headers:i,hasNullableType:a,shouldWrapBody:isPrimitiveBody(e.parsedBody,s)})}var init_utils2=__esm({\"../../node_modules/.pnpm/@azure+core-client@1.9.2/node_modules/@azure/core-client/dist/browser/utils.js\"(){init_globals()}}),MapperTypeNames,init_serializer=__esm({\"../../node_modules/.pnpm/@azure+core-client@1.9.2/node_modules/@azure/core-client/dist/browser/serializer.js\"(){init_globals(),init_base64(),init_interfaces(),init_utils2(),MapperTypeNames={Base64Url:\"Base64Url\",Boolean:\"Boolean\",ByteArray:\"ByteArray\",Composite:\"Composite\",Date:\"Date\",DateTime:\"DateTime\",DateTimeRfc1123:\"DateTimeRfc1123\",Dictionary:\"Dictionary\",Enum:\"Enum\",Number:\"Number\",Object:\"Object\",Sequence:\"Sequence\",String:\"String\",Stream:\"Stream\",TimeSpan:\"TimeSpan\",UnixTime:\"UnixTime\"}}}),state2,init_state2=__esm({\"../../node_modules/.pnpm/@azure+core-client@1.9.2/node_modules/@azure/core-client/dist/browser/state.js\"(){init_globals(),state2={operationRequestMap:new WeakMap}}}),originalRequestSymbol;function getOperationArgumentValueFromParameter(e,t,r){let n=t.parameterPath;const i=t.mapper;let o;if(\"string\"==typeof n&&(n=[n]),Array.isArray(n)){if(n.length>0)if(i.isConstant)o=i.defaultValue;else{let t=getPropertyFromParameterPath(e,n);!t.propertyFound&&r&&(t=getPropertyFromParameterPath(r,n));let a=!1;t.propertyFound||(a=i.required||\"options\"===n[0]&&2===n.length),o=a?i.defaultValue:t.propertyValue}}else{i.required&&(o={});for(const t in n){const a=i.type.modelProperties[t],s=getOperationArgumentValueFromParameter(e,{parameterPath:n[t],mapper:a},r);void 0!==s&&(o||(o={}),o[t]=s)}}return o}function getPropertyFromParameterPath(e,t){const r={propertyFound:!1};let n=0;for(;n__left_angle_mark_t.length;++n){const r=t[n];if(!e||!(r in e))break;e=e[r]}return n===t.length&&(r.propertyValue=e,r.propertyFound=!0),r}function hasOriginalRequest(e){return originalRequestSymbol in e}function getOperationRequestInfo(e){if(hasOriginalRequest(e))return getOperationRequestInfo(e[originalRequestSymbol]);let t=state2.operationRequestMap.get(e);return t||(t={},state2.operationRequestMap.set(e,t)),t}var init_operationHelpers=__esm({\"../../node_modules/.pnpm/@azure+core-client@1.9.2/node_modules/@azure/core-client/dist/browser/operationHelpers.js\"(){init_globals(),init_state2(),originalRequestSymbol=Symbol.for(\"@azure/core-client original request\")}}),defaultJsonContentTypes,defaultXmlContentTypes,deserializationPolicyName;function deserializationPolicy(e={}){var t,r,n,i,o,a,s;const l=null!==(r=null===(t=e.expectedContentTypes)||void 0===t?void 0:t.json)&&void 0!==r?r:defaultJsonContentTypes,u=null!==(i=null===(n=e.expectedContentTypes)||void 0===n?void 0:n.xml)&&void 0!==i?i:defaultXmlContentTypes,c=e.parseXML,d=e.serializerOptions,h={xml:{rootName:null!==(o=null==d?void 0:d.xml.rootName)&&void 0!==o?o:\"\",includeRoot:null!==(a=null==d?void 0:d.xml.includeRoot)&&void 0!==a&&a,xmlCharKey:null!==(s=null==d?void 0:d.xml.xmlCharKey)&&void 0!==s?s:XML_CHARKEY}};return{name:deserializationPolicyName,async sendRequest(e,t){const r=await t(e);return deserializeResponseBody(l,u,r,h,c)}}}function getOperationResponseMap(e){let t;const r=getOperationRequestInfo(e.request),n=null==r?void 0:r.operationSpec;return n&&(t=(null==r?void 0:r.operationResponseGetter)?null==r?void 0:r.operationResponseGetter(n,e):n.responses[e.status]),t}function shouldDeserializeResponse(e){const t=getOperationRequestInfo(e.request),r=null==t?void 0:t.shouldDeserialize;let n;return n=void 0===r||(\"boolean\"==typeof r?r:r(e)),n}async function deserializeResponseBody(e,t,r,n,i){const o=await parse4(e,t,r,n,i);if(!shouldDeserializeResponse(o))return o;const a=getOperationRequestInfo(o.request),s=null==a?void 0:a.operationSpec;if(!s||!s.responses)return o;const l=getOperationResponseMap(o),{error:u,shouldReturnResponse:c}=handleErrorResponse(o,s,l,n);if(u)throw u;if(c)return o;if(l){if(l.bodyMapper){let e=o.parsedBody;s.isXML&&l.bodyMapper.type.name===MapperTypeNames.Sequence&&(e=\"object\"==typeof e?e[l.bodyMapper.xmlElementName]:[]);try{o.parsedBody=s.serializer.deserialize(l.bodyMapper,e,\"operationRes.parsedBody\",n)}catch(d){throw new RestError(`Error ${d} occurred in deserializing the responseBody - ${o.bodyAsText}`,{statusCode:o.status,request:o.request,response:o})}}else\"HEAD\"===s.httpMethod&&(o.parsedBody=r.status>=200&&r.status__left_angle_mark_300);l.headersMapper&&(o.parsedHeaders=s.serializer.deserialize(l.headersMapper,o.headers.toJSON(),\"operationRes.parsedHeaders\",{xml:{},ignoreUnknownProperties:!0}))}return o}function isOperationSpecEmpty(e){const t=Object.keys(e.responses);return 0===t.length||1===t.length&&\"default\"===t[0]}function handleErrorResponse(e,t,r,n){var i;const o=200__left_angle_mark_=e.status&&e.status__left_angle_mark_300;if(isOperationSpecEmpty(t)?o:r){if(!r)return{error:null,shouldReturnResponse:!1};if(!r.isError)return{error:null,shouldReturnResponse:!1}}const a=null!=r?r:t.responses.default,s=(null===(i=e.request.streamResponseStatusCodes)||void 0===i?void 0:i.has(e.status))?`Unexpected status code: ${e.status}`:e.bodyAsText,l=new RestError(s,{statusCode:e.status,request:e.request,response:e});if(!a)throw l;const u=a.bodyMapper,c=a.headersMapper;try{if(e.parsedBody){const r=e.parsedBody;let i;if(u){let e=r;if(t.isXML&&u.type.name===MapperTypeNames.Sequence){e=[];const t=u.xmlElementName;\"object\"==typeof r&&t&&(e=r[t])}i=t.serializer.deserialize(u,e,\"error.response.parsedBody\",n)}const o=r.error||i||r;l.code=o.code,o.message&&(l.message=o.message),u&&(l.response.parsedBody=i)}e.headers&&c&&(l.response.parsedHeaders=t.serializer.deserialize(c,e.headers.toJSON(),\"operationRes.parsedHeaders\"))}catch(d){l.message=`Error \"${d.message}\" occurred in deserializing the responseBody - \"${e.bodyAsText}\" for the default response.`}return{error:l,shouldReturnResponse:!1}}async function parse4(e,t,r,n,i){var o;if(!(null===(o=r.request.streamResponseStatusCodes)||void 0===o?void 0:o.has(r.status))&&r.bodyAsText){const o=r.bodyAsText,s=r.headers.get(\"Content-Type\")||\"\",l=s?s.split(\";\").map((e=>e.toLowerCase())):[];try{if(0===l.length||l.some((t=>-1!==e.indexOf(t))))return r.parsedBody=JSON.parse(o),r;if(l.some((e=>-1!==t.indexOf(e)))){if(!i)throw new Error(\"Parsing XML not supported.\");const e=await i(o,n.xml);return r.parsedBody=e,r}}catch(a){const e=`Error \"${a}\" occurred while parsing the response body - ${r.bodyAsText}.`,t=a.code||RestError.PARSE_ERROR;throw new RestError(e,{code:t,statusCode:r.status,request:r.request,response:r})}}return r}var init_deserializationPolicy=__esm({\"../../node_modules/.pnpm/@azure+core-client@1.9.2/node_modules/@azure/core-client/dist/browser/deserializationPolicy.js\"(){init_globals(),init_interfaces(),init_browser5(),init_serializer(),init_operationHelpers(),defaultJsonContentTypes=[\"application/json\",\"text/json\"],defaultXmlContentTypes=[\"application/xml\",\"application/atom+xml\"],deserializationPolicyName=\"deserializationPolicy\"}});function getStreamingResponseStatusCodes(e){const t=new Set;for(const r in e.responses){const n=e.responses[r];n.bodyMapper&&n.bodyMapper.type.name===MapperTypeNames.Stream&&t.add(Number(r))}return t}function getPathStringFromParameter(e){const{parameterPath:t,mapper:r}=e;let n;return n=\"string\"==typeof t?t:Array.isArray(t)?t.join(\".\"):r.serializedName,n}var init_interfaceHelpers=__esm({\"../../node_modules/.pnpm/@azure+core-client@1.9.2/node_modules/@azure/core-client/dist/browser/interfaceHelpers.js\"(){init_globals(),init_serializer()}}),serializationPolicyName;function serializationPolicy(e={}){const t=e.stringifyXML;return{name:serializationPolicyName,async sendRequest(e,r){const n=getOperationRequestInfo(e),i=null==n?void 0:n.operationSpec,o=null==n?void 0:n.operationArguments;return i&&o&&(serializeHeaders(e,o,i),serializeRequestBody(e,o,i,t)),r(e)}}}function serializeHeaders(e,t,r){var n,i;if(r.headerParameters)for(const a of r.headerParameters){let n=getOperationArgumentValueFromParameter(t,a);if(null!=n||a.mapper.required){n=r.serializer.serialize(a.mapper,n,getPathStringFromParameter(a));const t=a.mapper.headerCollectionPrefix;if(t)for(const r of Object.keys(n))e.headers.set(t+r,n[r]);else e.headers.set(a.mapper.serializedName||getPathStringFromParameter(a),n)}}const o=null===(i=null===(n=t.options)||void 0===n?void 0:n.requestOptions)||void 0===i?void 0:i.customHeaders;if(o)for(const a of Object.keys(o))e.headers.set(a,o[a])}function serializeRequestBody(e,t,r,n=function(){throw new Error(\"XML serialization unsupported!\")}){var i,o,a,s,l;const u=null===(i=t.options)||void 0===i?void 0:i.serializerOptions,c={xml:{rootName:null!==(o=null==u?void 0:u.xml.rootName)&&void 0!==o?o:\"\",includeRoot:null!==(a=null==u?void 0:u.xml.includeRoot)&&void 0!==a&&a,xmlCharKey:null!==(s=null==u?void 0:u.xml.xmlCharKey)&&void 0!==s?s:XML_CHARKEY}},d=c.xml.xmlCharKey;if(r.requestBody&&r.requestBody.mapper){e.body=getOperationArgumentValueFromParameter(t,r.requestBody);const i=r.requestBody.mapper,{required:o,serializedName:a,xmlName:s,xmlElementName:u,xmlNamespace:f,xmlNamespacePrefix:p,nullable:m}=i,g=i.type.name;try{if(void 0!==e.body&&null!==e.body||m&&null===e.body||o){const t=getPathStringFromParameter(r.requestBody);e.body=r.serializer.serialize(i,e.body,t,c);const o=g===MapperTypeNames.Stream;if(r.isXML){const t=p?`xmlns:${p}`:\"xmlns\",r=getXmlValueWithNamespace(f,t,g,e.body,c);g===MapperTypeNames.Sequence?e.body=n(prepareXMLRootList(r,u||s||a,t,f),{rootName:s||a,xmlCharKey:d}):o||(e.body=n(r,{rootName:s||a,xmlCharKey:d}))}else{if(g===MapperTypeNames.String&&((null===(l=r.contentType)||void 0===l?void 0:l.match(\"text/plain\"))||\"text\"===r.mediaType))return;o||(e.body=JSON.stringify(e.body))}}}catch(h){throw new Error(`Error \"${h.message}\" occurred in serializing the payload - ${JSON.stringify(a,void 0,\" \")}.`)}}else if(r.formDataParameters&&r.formDataParameters.length>0){e.formData={};for(const n of r.formDataParameters){const i=getOperationArgumentValueFromParameter(t,n);if(null!=i){const t=n.mapper.serializedName||getPathStringFromParameter(n);e.formData[t]=r.serializer.serialize(n.mapper,i,getPathStringFromParameter(n),c)}}}}function getXmlValueWithNamespace(e,t,r,n,i){if(e&&![\"Composite\",\"Sequence\",\"Dictionary\"].includes(r)){const r={};return r[i.xml.xmlCharKey]=n,r[XML_ATTRKEY]={[t]:e},r}return n}function prepareXMLRootList(e,t,r,n){if(Array.isArray(e)||(e=[e]),!r||!n)return{[t]:e};const i={[t]:e};return i[XML_ATTRKEY]={[r]:n},i}var init_serializationPolicy=__esm({\"../../node_modules/.pnpm/@azure+core-client@1.9.2/node_modules/@azure/core-client/dist/browser/serializationPolicy.js\"(){init_globals(),init_interfaces(),init_operationHelpers(),init_serializer(),init_interfaceHelpers(),serializationPolicyName=\"serializationPolicy\"}});function createClientPipeline(e={}){const t=createPipelineFromOptions(null!=e?e:{});return e.credentialOptions&&t.addPolicy(bearerTokenAuthenticationPolicy({credential:e.credentialOptions.credential,scopes:e.credentialOptions.credentialScopes})),t.addPolicy(serializationPolicy(e.serializationOptions),{phase:\"Serialize\"}),t.addPolicy(deserializationPolicy(e.deserializationOptions),{phase:\"Deserialize\"}),t}var init_pipeline2=__esm({\"../../node_modules/.pnpm/@azure+core-client@1.9.2/node_modules/@azure/core-client/dist/browser/pipeline.js\"(){init_globals(),init_deserializationPolicy(),init_browser5(),init_serializationPolicy()}}),cachedHttpClient;function getCachedDefaultHttpClient(){return cachedHttpClient||(cachedHttpClient=createDefaultHttpClient()),cachedHttpClient}var init_httpClientCache=__esm({\"../../node_modules/.pnpm/@azure+core-client@1.9.2/node_modules/@azure/core-client/dist/browser/httpClientCache.js\"(){init_globals(),init_browser5()}}),CollectionFormatToDelimiterMap;function getRequestUrl(e,t,r,n){const i=calculateUrlReplacements(t,r,n);let o=!1,a=replaceAll2(e,i);if(t.path){let e=replaceAll2(t.path,i);\"/{nextLink}\"===t.path&&e.startsWith(\"/\")&&(e=e.substring(1)),isAbsoluteUrl(e)?(a=e,o=!0):a=appendPath(a,e)}const{queryParams:s,sequenceParams:l}=calculateQueryParameters(t,r,n);return a=appendQueryParams(a,s,l,o),a}function replaceAll2(e,t){let r=e;for(const[n,i]of t)r=r.split(n).join(i);return r}function calculateUrlReplacements(e,t,r){var n;const i=new Map;if(null===(n=e.urlParameters)||void 0===n?void 0:n.length)for(const o of e.urlParameters){let n=getOperationArgumentValueFromParameter(t,o,r);const a=getPathStringFromParameter(o);n=e.serializer.serialize(o.mapper,n,a),o.skipEncoding||(n=encodeURIComponent(n)),i.set(`{${o.mapper.serializedName||a}}`,n)}return i}function isAbsoluteUrl(e){return e.includes(\"://\")}function appendPath(e,t){if(!t)return e;const r=new URL(e);let n=r.pathname;n.endsWith(\"/\")||(n=`${n}/`),t.startsWith(\"/\")&&(t=t.substring(1));const i=t.indexOf(\"?\");if(-1!==i){const e=t.substring(0,i),o=t.substring(i+1);n+=e,o&&(r.search=r.search?`${r.search}&${o}`:o)}else n+=t;return r.pathname=n,r.toString()}function calculateQueryParameters(e,t,r){var n;const i=new Map,o=new Set;if(null===(n=e.queryParameters)||void 0===n?void 0:n.length)for(const a of e.queryParameters){\"Sequence\"===a.mapper.type.name&&a.mapper.serializedName&&o.add(a.mapper.serializedName);let n=getOperationArgumentValueFromParameter(t,a,r);if(null!=n||a.mapper.required){n=e.serializer.serialize(a.mapper,n,getPathStringFromParameter(a));const t=a.collectionFormat?CollectionFormatToDelimiterMap[a.collectionFormat]:\"\";if(Array.isArray(n)&&(n=n.map((e=>null==e?\"\":e))),\"Multi\"===a.collectionFormat&&0===n.length)continue;!Array.isArray(n)||\"SSV\"!==a.collectionFormat&&\"TSV\"!==a.collectionFormat||(n=n.join(t)),a.skipEncoding||(n=Array.isArray(n)?n.map((e=>encodeURIComponent(e))):encodeURIComponent(n)),!Array.isArray(n)||\"CSV\"!==a.collectionFormat&&\"Pipes\"!==a.collectionFormat||(n=n.join(t)),i.set(a.mapper.serializedName||getPathStringFromParameter(a),n)}}return{queryParams:i,sequenceParams:o}}function simpleParseQueryParams(e){const t=new Map;if(!e||\"?\"!==e[0])return t;const r=(e=e.slice(1)).split(\"&\");for(const n of r){const[e,r]=n.split(\"=\",2),i=t.get(e);i?Array.isArray(i)?i.push(r):t.set(e,[i,r]):t.set(e,r)}return t}function appendQueryParams(e,t,r,n=!1){if(0===t.size)return e;const i=new URL(e),o=simpleParseQueryParams(i.search);for(const[s,l]of t){const e=o.get(s);if(Array.isArray(e))if(Array.isArray(l)){e.push(...l);const t=new Set(e);o.set(s,Array.from(t))}else e.push(l);else e?(Array.isArray(l)?l.unshift(e):r.has(s)&&o.set(s,[e,l]),n||o.set(s,l)):o.set(s,l)}const a=[];for(const[s,l]of o)if(\"string\"==typeof l)a.push(`${s}=${l}`);else if(Array.isArray(l))for(const e of l)a.push(`${s}=${e}`);else a.push(`${s}=${l}`);return i.search=a.length?`?${a.join(\"&\")}`:\"\",i.toString()}var init_urlHelpers=__esm({\"../../node_modules/.pnpm/@azure+core-client@1.9.2/node_modules/@azure/core-client/dist/browser/urlHelpers.js\"(){init_globals(),init_operationHelpers(),init_interfaceHelpers(),CollectionFormatToDelimiterMap={CSV:\",\",SSV:\" \",Multi:\"Multi\",TSV:\"\\t\",Pipes:\"|\"}}}),logger6,init_log3=__esm({\"../../node_modules/.pnpm/@azure+core-client@1.9.2/node_modules/@azure/core-client/dist/browser/log.js\"(){init_globals(),init_browser(),logger6=createClientLogger(\"core-client\")}}),ServiceClient;function createDefaultPipeline(e){const t=getCredentialScopes(e),r=e.credential&&t?{credentialScopes:t,credential:e.credential}:void 0;return createClientPipeline(Object.assign(Object.assign({},e),{credentialOptions:r}))}function getCredentialScopes(e){if(e.credentialScopes)return e.credentialScopes;if(e.endpoint)return`${e.endpoint}/.default`;if(e.baseUri)return`${e.baseUri}/.default`;if(e.credential&&!e.credentialScopes)throw new Error(\"When using credentials, the ServiceClientOptions must contain either a endpoint or a credentialScopes. Unable to create a bearerTokenAuthenticationPolicy\")}var init_serviceClient=__esm({\"../../node_modules/.pnpm/@azure+core-client@1.9.2/node_modules/@azure/core-client/dist/browser/serviceClient.js\"(){init_globals(),init_browser5(),init_pipeline2(),init_utils2(),init_httpClientCache(),init_operationHelpers(),init_urlHelpers(),init_interfaceHelpers(),init_log3(),ServiceClient=class{async sendRequest(e){return this.pipeline.sendRequest(this._httpClient,e)}async sendOperationRequest(e,t){const r=t.baseUrl||this._endpoint;if(!r)throw new Error(\"If operationSpec.baseUrl is not specified, then the ServiceClient must have a endpoint string property that contains the base URL to use.\");const n=createPipelineRequest({url:getRequestUrl(r,t,e,this)});n.method=t.httpMethod;const i=getOperationRequestInfo(n);i.operationSpec=t,i.operationArguments=e;const o=t.contentType||this._requestContentType;o&&t.requestBody&&n.headers.set(\"Content-Type\",o);const a=e.options;if(a){const e=a.requestOptions;e&&(e.timeout&&(n.timeout=e.timeout),e.onUploadProgress&&(n.onUploadProgress=e.onUploadProgress),e.onDownloadProgress&&(n.onDownloadProgress=e.onDownloadProgress),void 0!==e.shouldDeserialize&&(i.shouldDeserialize=e.shouldDeserialize),e.allowInsecureConnection&&(n.allowInsecureConnection=!0)),a.abortSignal&&(n.abortSignal=a.abortSignal),a.tracingOptions&&(n.tracingOptions=a.tracingOptions)}this._allowInsecureConnection&&(n.allowInsecureConnection=!0),void 0===n.streamResponseStatusCodes&&(n.streamResponseStatusCodes=getStreamingResponseStatusCodes(t));try{const e=await this.sendRequest(n),r=flattenResponse(e,t.responses[e.status]);return(null==a?void 0:a.onResponse)&&a.onResponse(e,r),r}catch(s){if(\"object\"==typeof s&&(null==s?void 0:s.response)){const e=s.response,r=flattenResponse(e,t.responses[s.statusCode]||t.responses.default);s.details=r,(null==a?void 0:a.onResponse)&&a.onResponse(e,r,s)}throw s}}constructor(e={}){var t,r;if(this._requestContentType=e.requestContentType,this._endpoint=null!==(t=e.endpoint)&&void 0!==t?t:e.baseUri,e.baseUri&&logger6.warning(\"The baseUri option for SDK Clients has been deprecated, please use endpoint instead.\"),this._allowInsecureConnection=e.allowInsecureConnection,this._httpClient=e.httpClient||getCachedDefaultHttpClient(),this.pipeline=e.pipeline||createDefaultPipeline(e),null===(r=e.additionalPolicies)||void 0===r?void 0:r.length)for(const{policy:n,position:i}of e.additionalPolicies){const e=\"perRetry\"===i?\"Sign\":void 0;this.pipeline.addPolicy(n,{afterPhase:e})}}}}}),init_authorizeRequestOnClaimChallenge=__esm({\"../../node_modules/.pnpm/@azure+core-client@1.9.2/node_modules/@azure/core-client/dist/browser/authorizeRequestOnClaimChallenge.js\"(){init_globals(),init_log3(),init_base64()}}),init_authorizeRequestOnTenantChallenge=__esm({\"../../node_modules/.pnpm/@azure+core-client@1.9.2/node_modules/@azure/core-client/dist/browser/authorizeRequestOnTenantChallenge.js\"(){init_globals()}}),init_browser6=__esm({\"../../node_modules/.pnpm/@azure+core-client@1.9.2/node_modules/@azure/core-client/dist/browser/index.js\"(){init_globals(),init_serializer(),init_serviceClient(),init_pipeline2(),init_interfaces(),init_deserializationPolicy(),init_serializationPolicy(),init_authorizeRequestOnClaimChallenge(),init_authorizeRequestOnTenantChallenge()}});function getIdentityTokenEndpointSuffix(e){return\"adfs\"===e?\"oauth2/token\":\"oauth2/v2.0/token\"}var init_identityTokenEndpoint=__esm({\"../../node_modules/.pnpm/@azure+identity@4.5.0/node_modules/@azure/identity/dist-esm/src/util/identityTokenEndpoint.js\"(){init_globals()}});function parseExpirationTimestamp(e){if(\"number\"==typeof e.expires_on)return 1e3*e.expires_on;if(\"string\"==typeof e.expires_on){const t=+e.expires_on;if(!isNaN(t))return 1e3*t;const r=Date.parse(e.expires_on);if(!isNaN(r))return r}if(\"number\"==typeof e.expires_in)return Date.now()+1e3*e.expires_in;throw new Error(`Failed to parse token expiration from body. expires_in=\"${e.expires_in}\", expires_on=\"${e.expires_on}\"`)}function parseRefreshTimestamp(e){if(e.refresh_on){if(\"number\"==typeof e.refresh_on)return 1e3*e.refresh_on;if(\"string\"==typeof e.refresh_on){const t=+e.refresh_on;if(!isNaN(t))return 1e3*t;const r=Date.parse(e.refresh_on);if(!isNaN(r))return r}throw new Error(`Failed to parse refresh_on from body. refresh_on=\"${e.refresh_on}\"`)}}var init_utils3=__esm({\"../../node_modules/.pnpm/@azure+identity@4.5.0/node_modules/@azure/identity/dist-esm/src/credentials/managedIdentityCredential/utils.js\"(){init_globals()}}),noCorrelationId,IdentityClient;function getIdentityClientAuthorityHost(e){let t=null==e?void 0:e.authorityHost;return isNode&&(t=null!=t?t:import_browser.default.env.AZURE_AUTHORITY_HOST),null!=t?t:DefaultAuthorityHost}var init_identityClient=__esm({\"../../node_modules/.pnpm/@azure+identity@4.5.0/node_modules/@azure/identity/dist-esm/src/client/identityClient.js\"(){init_globals(),init_browser6(),init_browser4(),init_browser5(),init_errors(),init_identityTokenEndpoint(),init_constants(),init_tracing(),init_logging(),init_utils3(),noCorrelationId=\"noCorrelationId\",IdentityClient=class extends ServiceClient{async sendTokenRequest(e){logger.info(`IdentityClient: sending token request to [${e.url}]`);const t=await this.sendRequest(e);if(!t.bodyAsText||200!==t.status&&201!==t.status){const e=new AuthenticationError(t.status,t.bodyAsText);throw logger.warning(`IdentityClient: authentication error. HTTP status: ${t.status}, ${e.errorResponse.errorDescription}`),e}{const r=JSON.parse(t.bodyAsText);if(!r.access_token)return null;this.logIdentifiers(t);const n={accessToken:{token:r.access_token,expiresOnTimestamp:parseExpirationTimestamp(r),refreshAfterTimestamp:parseRefreshTimestamp(r),tokenType:\"Bearer\"},refreshToken:r.refresh_token};return logger.info(`IdentityClient: [${e.url}] token acquired, expires on ${n.accessToken.expiresOnTimestamp}`),n}}async refreshAccessToken(e,t,r,n,i,o={}){if(void 0===n)return null;logger.info(`IdentityClient: refreshing access token with client ID: ${t}, scopes: ${r} started`);const a={grant_type:\"refresh_token\",client_id:t,refresh_token:n,scope:r};void 0!==i&&(a.client_secret=i);const s=new URLSearchParams(a);return tracingClient.withSpan(\"IdentityClient.refreshAccessToken\",o,(async r=>{try{const n=getIdentityTokenEndpointSuffix(e),i=createPipelineRequest({url:`${this.authorityHost}/${e}/${n}`,method:\"POST\",body:s.toString(),abortSignal:o.abortSignal,headers:createHttpHeaders({Accept:\"application/json\",\"Content-Type\":\"application/x-www-form-urlencoded\"}),tracingOptions:r.tracingOptions}),a=await this.sendTokenRequest(i);return logger.info(`IdentityClient: refreshed token for client ID: ${t}`),a}catch(n){if(n.name===AuthenticationErrorName&&\"interaction_required\"===n.errorResponse.error)return logger.info(`IdentityClient: interaction required for client ID: ${t}`),null;throw logger.warning(`IdentityClient: failed refreshing token for client ID: ${t}: ${n}`),n}}))}generateAbortSignal(e){const t=new AbortController,r=this.abortControllers.get(e)||[];r.push(t),this.abortControllers.set(e,r);const n=t.signal.onabort;return t.signal.onabort=(...r)=>{this.abortControllers.set(e,void 0),n&&n.apply(t.signal,r)},t.signal}abortRequests(e){const t=e||noCorrelationId,r=[...this.abortControllers.get(t)||[],...this.abortControllers.get(noCorrelationId)||[]];if(r.length){for(const e of r)e.abort();this.abortControllers.set(t,void 0)}}getCorrelationId(e){var t;const r=null===(t=null==e?void 0:e.body)||void 0===t?void 0:t.split(\"&\").map((e=>e.split(\"=\"))).find((([e])=>\"client-request-id\"===e));return r&&r.length&&r[1]||noCorrelationId}async sendGetRequestAsync(e,t){const r=createPipelineRequest({url:e,method:\"GET\",body:null==t?void 0:t.body,allowInsecureConnection:this.allowInsecureConnection,headers:createHttpHeaders(null==t?void 0:t.headers),abortSignal:this.generateAbortSignal(noCorrelationId)}),n=await this.sendRequest(r);return this.logIdentifiers(n),{body:n.bodyAsText?JSON.parse(n.bodyAsText):void 0,headers:n.headers.toJSON(),status:n.status}}async sendPostRequestAsync(e,t){const r=createPipelineRequest({url:e,method:\"POST\",body:null==t?void 0:t.body,headers:createHttpHeaders(null==t?void 0:t.headers),allowInsecureConnection:this.allowInsecureConnection,abortSignal:this.generateAbortSignal(this.getCorrelationId(t))}),n=await this.sendRequest(r);return this.logIdentifiers(n),{body:n.bodyAsText?JSON.parse(n.bodyAsText):void 0,headers:n.headers.toJSON(),status:n.status}}getTokenCredentialOptions(){return this.tokenCredentialOptions}logIdentifiers(e){if(this.allowLoggingAccountIdentifiers&&e.bodyAsText)try{const t=(e.parsedBody||JSON.parse(e.bodyAsText)).access_token;if(!t)return;const r=t.split(\".\")[1],{appid:n,upn:i,tid:o,oid:a}=JSON.parse(Buffer.from(r,\"base64\").toString(\"utf8\"));logger.info(`[Authenticated account] Client ID: ${n}. Tenant ID: ${o}. User Principal Name: ${i||\"No User Principal Name available\"}. Object ID (user): ${a}`)}catch(t){logger.warning(\"allowLoggingAccountIdentifiers was set, but we couldn't log the account information. Error:\",t.message)}}constructor(e){var t,r;const n=`azsdk-js-identity/${SDK_VERSION}`,i=(null===(t=null==e?void 0:e.userAgentOptions)||void 0===t?void 0:t.userAgentPrefix)?`${e.userAgentOptions.userAgentPrefix} ${n}`:`${n}`,o=getIdentityClientAuthorityHost(e);if(!o.startsWith(\"https:\"))throw new Error(\"The authorityHost address must use the 'https' protocol.\");super(Object.assign(Object.assign({requestContentType:\"application/json; charset=utf-8\",retryOptions:{maxRetries:3}},e),{userAgentOptions:{userAgentPrefix:i},baseUri:o})),this.allowInsecureConnection=!1,this.authorityHost=o,this.abortControllers=new Map,this.allowLoggingAccountIdentifiers=null===(r=null==e?void 0:e.loggingOptions)||void 0===r?void 0:r.allowLoggingAccountIdentifiers,this.tokenCredentialOptions=Object.assign({},e),(null==e?void 0:e.allowInsecureConnection)&&(this.allowInsecureConnection=e.allowInsecureConnection)}}}}),logger7,ClientSecretCredential,init_clientSecretCredential_browser=__esm({\"../../node_modules/.pnpm/@azure+identity@4.5.0/node_modules/@azure/identity/dist-esm/src/credentials/clientSecretCredential.browser.js\"(){init_globals(),init_browser5(),init_logging(),init_tenantIdUtils(),init_identityClient(),init_identityTokenEndpoint(),init_tracing(),logger7=credentialLogger(\"ClientSecretCredential\"),ClientSecretCredential=class{async getToken(e,t={}){return tracingClient.withSpan(`${this.constructor.name}.getToken`,t,(async r=>{const n=processMultiTenantRequest(this.tenantId,r,this.additionallyAllowedTenantIds),i=new URLSearchParams({response_type:\"token\",grant_type:\"client_credentials\",client_id:this.clientId,client_secret:this.clientSecret,scope:\"string\"==typeof e?e:e.join(\" \")});try{const o=getIdentityTokenEndpointSuffix(n),a=createPipelineRequest({url:`${this.identityClient.authorityHost}/${n}/${o}`,method:\"POST\",body:i.toString(),headers:createHttpHeaders({Accept:\"application/json\",\"Content-Type\":\"application/x-www-form-urlencoded\"}),abortSignal:t&&t.abortSignal,tracingOptions:null==r?void 0:r.tracingOptions}),s=await this.identityClient.sendTokenRequest(a);return logger7.getToken.info(formatSuccess(e)),s&&s.accessToken||null}catch(o){throw logger7.getToken.info(formatError(e,o)),o}}))}constructor(e,t,r,n){this.identityClient=new IdentityClient(n),this.tenantId=e,this.additionallyAllowedTenantIds=resolveAdditionallyAllowedTenantIds(null==n?void 0:n.additionallyAllowedTenants),this.clientId=t,this.clientSecret=r}}}}),BrowserNotSupportedError2,logger8,EnvironmentCredential,init_environmentCredential_browser=__esm({\"../../node_modules/.pnpm/@azure+identity@4.5.0/node_modules/@azure/identity/dist-esm/src/credentials/environmentCredential.browser.js\"(){init_globals(),init_logging(),BrowserNotSupportedError2=new Error(\"EnvironmentCredential is not supported in the browser.\"),logger8=credentialLogger(\"EnvironmentCredential\"),EnvironmentCredential=class{getToken(){throw logger8.getToken.info(formatError(\"\",BrowserNotSupportedError2)),BrowserNotSupportedError2}constructor(){throw logger8.info(formatError(\"\",BrowserNotSupportedError2)),BrowserNotSupportedError2}}}}),BrowserNotSupportedError3,logger9,ClientCertificateCredential,init_clientCertificateCredential_browser=__esm({\"../../node_modules/.pnpm/@azure+identity@4.5.0/node_modules/@azure/identity/dist-esm/src/credentials/clientCertificateCredential.browser.js\"(){init_globals(),init_logging(),BrowserNotSupportedError3=new Error(\"ClientCertificateCredential is not supported in the browser.\"),logger9=credentialLogger(\"ClientCertificateCredential\"),ClientCertificateCredential=class{getToken(){throw logger9.getToken.info(formatError(\"\",BrowserNotSupportedError3)),BrowserNotSupportedError3}constructor(){throw logger9.info(formatError(\"\",BrowserNotSupportedError3)),BrowserNotSupportedError3}}}}),BrowserNotSupportedError4,logger10,ClientAssertionCredential,init_clientAssertionCredential_browser=__esm({\"../../node_modules/.pnpm/@azure+identity@4.5.0/node_modules/@azure/identity/dist-esm/src/credentials/clientAssertionCredential.browser.js\"(){init_globals(),init_logging(),BrowserNotSupportedError4=new Error(\"ClientAssertionCredential is not supported in the browser.\"),logger10=credentialLogger(\"ClientAssertionCredential\"),ClientAssertionCredential=class{getToken(){throw logger10.getToken.info(formatError(\"\",BrowserNotSupportedError4)),BrowserNotSupportedError4}constructor(){throw logger10.info(formatError(\"\",BrowserNotSupportedError4)),BrowserNotSupportedError4}}}}),BrowserNotSupportedError5,logger11,AzureCliCredential,init_azureCliCredential_browser=__esm({\"../../node_modules/.pnpm/@azure+identity@4.5.0/node_modules/@azure/identity/dist-esm/src/credentials/azureCliCredential.browser.js\"(){init_globals(),init_logging(),BrowserNotSupportedError5=new Error(\"AzureCliCredential is not supported in the browser.\"),logger11=credentialLogger(\"AzureCliCredential\"),AzureCliCredential=class{getToken(){throw logger11.getToken.info(formatError(\"\",BrowserNotSupportedError5)),BrowserNotSupportedError5}constructor(){throw logger11.info(formatError(\"\",BrowserNotSupportedError5)),BrowserNotSupportedError5}}}}),BrowserNotSupportedError6,logger12,AzureDeveloperCliCredential,init_azureDeveloperCliCredential_browser=__esm({\"../../node_modules/.pnpm/@azure+identity@4.5.0/node_modules/@azure/identity/dist-esm/src/credentials/azureDeveloperCliCredential.browser.js\"(){init_globals(),init_logging(),BrowserNotSupportedError6=new Error(\"AzureDeveloperCliCredential is not supported in the browser.\"),logger12=credentialLogger(\"AzureDeveloperCliCredential\"),AzureDeveloperCliCredential=class{getToken(){throw logger12.getToken.info(formatError(\"\",BrowserNotSupportedError6)),BrowserNotSupportedError6}constructor(){throw logger12.info(formatError(\"\",BrowserNotSupportedError6)),BrowserNotSupportedError6}}}}),MsalBrowser;function defaultBrowserMsalConfig(e){const t=e.tenantId||DefaultTenantId,r=getAuthority(t,e.authorityHost);return{auth:{clientId:e.clientId,authority:r,knownAuthorities:getKnownAuthorities(t,r,e.disableInstanceDiscovery),redirectUri:e.redirectUri||self.location.origin}}}var init_msalBrowserCommon=__esm({\"../../node_modules/.pnpm/@azure+identity@4.5.0/node_modules/@azure/identity/dist-esm/src/msal/browserFlows/msalBrowserCommon.js\"(){init_globals(),init_errors(),init_logging(),init_utils(),init_tenantIdUtils(),init_constants(),MsalBrowser=class{async init(){}async logout(){var e;null===(e=this.app)||void 0===e||e.logout()}async getToken(e,t={}){const r=processMultiTenantRequest(this.tenantId,t,this.additionallyAllowedTenantIds)||this.tenantId;return t.authority||(t.authority=getAuthority(r,this.authorityHost)),await this.handleRedirect(),await this.getActiveAccount()||this.disableAutomaticAuthentication||await this.login(e),this.getTokenSilent(e).catch((r=>{if(\"AuthenticationRequiredError\"!==r.name)throw r;if(null==t?void 0:t.disableAutomaticAuthentication)throw new AuthenticationRequiredError({scopes:e,getTokenOptions:t,message:\"Automatic authentication has been disabled. You may call the authentication() method.\"});return this.logger.info(`Silent authentication failed, falling back to interactive method ${this.loginStyle}`),this.doGetToken(e)}))}handleResult(e,t,r){var n;return(null==t?void 0:t.account)&&(this.account=msalToPublic(this.clientId,t.account)),ensureValidMsalToken(e,t,r),this.logger.getToken.info(formatSuccess(e)),{token:t.accessToken,expiresOnTimestamp:t.expiresOn.getTime(),refreshAfterTimestamp:null===(n=t.refreshOn)||void 0===n?void 0:n.getTime(),tokenType:\"Bearer\"}}constructor(e){var t;if(this.logger=e.logger,this.loginStyle=e.loginStyle,!e.clientId)throw new CredentialUnavailableError(\"A client ID is required in browsers\");this.clientId=e.clientId,this.additionallyAllowedTenantIds=resolveAdditionallyAllowedTenantIds(null===(t=null==e?void 0:e.tokenCredentialOptions)||void 0===t?void 0:t.additionallyAllowedTenants),this.tenantId=resolveTenantId(this.logger,e.tenantId,e.clientId),this.authorityHost=e.authorityHost,this.msalConfig=defaultBrowserMsalConfig(e),this.disableAutomaticAuthentication=e.disableAutomaticAuthentication,e.authenticationRecord&&(this.account=Object.assign(Object.assign({},e.authenticationRecord),{tenantId:this.tenantId}))}}}}),redirectHash,MSALAuthCode,init_msalAuthCode=__esm({\"../../node_modules/.pnpm/@azure+identity@4.5.0/node_modules/@azure/identity/dist-esm/src/msal/browserFlows/msalAuthCode.js\"(){init_globals(),init_dist(),init_msalBrowserCommon(),init_utils(),init_errors(),init_browser(),redirectHash=self.location.hash,MSALAuthCode=class extends MsalBrowser{async getApp(){return this.app||(this.app=await PublicClientApplication.createPublicClientApplication(this.msalConfig),this.account&&this.app.setActiveAccount(publicToMsal(this.account))),this.app}async handleBrowserResult(e){try{const t=await this.getApp();if(e&&e.account)return this.logger.info(\"MSAL Browser V2 authentication successful.\"),t.setActiveAccount(e.account),msalToPublic(this.clientId,e.account);const r=await this.app.getActiveAccount();if(r)return msalToPublic(this.clientId,r);const n=t.getAllAccounts();if(n.length>1)return this.logger.info('More than one account was found authenticated for this Client ID and Tenant ID.\\nHowever, no \"authenticationRecord\" has been provided for this credential,\\ntherefore we\\'re unable to pick between these accounts.\\nA new login attempt will be requested, to ensure the correct account is picked.\\nTo work with multiple accounts for the same Client ID and Tenant ID, please provide an \"authenticationRecord\" when initializing \"InteractiveBrowserCredential\".'),void(await t.logout({onRedirectNavigate:()=>!1}));if(1===n.length){const e=n[0];return t.setActiveAccount(e),msalToPublic(this.clientId,e)}this.logger.info(\"No accounts were found through MSAL.\")}catch(t){this.logger.info(`Failed to acquire token through MSAL. ${t.message}`)}}async handleRedirect(){const e=await this.getApp();return this.handleBrowserResult(await e.handleRedirectPromise(redirectHash)||void 0)}async login(e=[]){const t={scopes:Array.isArray(e)?e:[e],loginHint:this.loginHint},r=await this.getApp();switch(this.loginStyle){case\"redirect\":return void(await r.loginRedirect(t));case\"popup\":return this.handleBrowserResult(await r.loginPopup(t))}}async getActiveAccount(){const e=(await this.getApp()).getActiveAccount();if(e)return msalToPublic(this.clientId,e)}async getTokenSilent(e,t){const r=await this.getActiveAccount();if(!r)throw new AuthenticationRequiredError({scopes:e,getTokenOptions:t,message:\"Silent authentication failed. We couldn't retrieve an active account from the cache.\"});const n={authority:(null==t?void 0:t.authority)||this.msalConfig.auth.authority,correlationId:null==t?void 0:t.correlationId,claims:null==t?void 0:t.claims,account:publicToMsal(r),forceRefresh:!1,scopes:e};try{this.logger.info(\"Attempting to acquire token silently\");const t=await this.getApp(),r=await t.acquireTokenSilent(n);return this.handleResult(e,r)}catch(i){throw handleMsalError(e,i,t)}}async doGetToken(e,t){const r=await this.getActiveAccount();if(!r)throw new AuthenticationRequiredError({scopes:e,getTokenOptions:t,message:\"Silent authentication failed. We couldn't retrieve an active account from the cache.\"});const n={authority:(null==t?void 0:t.authority)||this.msalConfig.auth.authority,correlationId:null==t?void 0:t.correlationId,claims:null==t?void 0:t.claims,account:publicToMsal(r),loginHint:this.loginHint,scopes:e},i=await this.getApp();switch(this.loginStyle){case\"redirect\":return await i.acquireTokenRedirect(n),{token:\"\",expiresOnTimestamp:0,tokenType:\"Bearer\"};case\"popup\":return this.handleResult(e,await i.acquireTokenPopup(n))}}constructor(e){var t;super(e),this.loginHint=e.loginHint,this.msalConfig.cache={cacheLocation:\"sessionStorage\",storeAuthStateInCookie:!0},this.msalConfig.system={loggerOptions:{loggerCallback:defaultLoggerCallback(this.logger,\"Browser\"),logLevel:getMSALLogLevel(getLogLevel()),piiLoggingEnabled:null===(t=e.loggingOptions)||void 0===t?void 0:t.enableUnsafeSupportLogging}},e.authenticationRecord&&(this.account=Object.assign(Object.assign({},e.authenticationRecord),{tenantId:this.tenantId}))}}}});function ensureScopes(e){return Array.isArray(e)?e:[e]}var init_scopeUtils=__esm({\"../../node_modules/.pnpm/@azure+identity@4.5.0/node_modules/@azure/identity/dist-esm/src/util/scopeUtils.js\"(){init_globals()}}),logger13,InteractiveBrowserCredential,init_interactiveBrowserCredential_browser=__esm({\"../../node_modules/.pnpm/@azure+identity@4.5.0/node_modules/@azure/identity/dist-esm/src/credentials/interactiveBrowserCredential.browser.js\"(){init_globals(),init_logging(),init_tenantIdUtils(),init_msalAuthCode(),init_scopeUtils(),init_tracing(),logger13=credentialLogger(\"InteractiveBrowserCredential\"),InteractiveBrowserCredential=class{async getToken(e,t={}){return tracingClient.withSpan(`${this.constructor.name}.getToken`,t,(async t=>{const r=processMultiTenantRequest(this.tenantId,t,this.additionallyAllowedTenantIds);t.tenantId=r;const n=ensureScopes(e);return this.msalFlow.getToken(n,Object.assign(Object.assign({},t),{disableAutomaticAuthentication:this.disableAutomaticAuthentication}))}))}async authenticate(e,t={}){return tracingClient.withSpan(`${this.constructor.name}.authenticate`,t,(async t=>{const r=Array.isArray(e)?e:[e];return await this.msalFlow.getToken(r,t),this.msalFlow.getActiveAccount()}))}constructor(e){if(!(null==e?void 0:e.clientId)){const e=new Error(\"The parameter `clientId` cannot be left undefined for the `InteractiveBrowserCredential`\");throw logger13.info(formatError(\"\",e)),e}this.tenantId=null==e?void 0:e.tenantId,this.additionallyAllowedTenantIds=resolveAdditionallyAllowedTenantIds(null==e?void 0:e.additionallyAllowedTenants);const t=e,r=t.loginStyle||\"popup\",n=[\"redirect\",\"popup\"];if(-1===n.indexOf(r)){const e=new Error(`Invalid loginStyle: ${t.loginStyle}. Should be any of the following: ${n.join(\", \")}.`);throw logger13.info(formatError(\"\",e)),e}const i=Object.assign(Object.assign({},e),{tokenCredentialOptions:e,logger:logger13,loginStyle:r,redirectUri:\"function\"==typeof e.redirectUri?e.redirectUri():e.redirectUri});this.msalFlow=new MSALAuthCode(i),this.disableAutomaticAuthentication=null==e?void 0:e.disableAutomaticAuthentication}}}}),BrowserNotSupportedError7,logger14,ManagedIdentityCredential,init_index_browser2=__esm({\"../../node_modules/.pnpm/@azure+identity@4.5.0/node_modules/@azure/identity/dist-esm/src/credentials/managedIdentityCredential/index.browser.js\"(){init_globals(),init_logging(),BrowserNotSupportedError7=new Error(\"ManagedIdentityCredential is not supported in the browser.\"),logger14=credentialLogger(\"ManagedIdentityCredential\"),ManagedIdentityCredential=class{async getToken(){throw logger14.getToken.info(formatError(\"\",BrowserNotSupportedError7)),BrowserNotSupportedError7}constructor(){throw logger14.info(formatError(\"\",BrowserNotSupportedError7)),BrowserNotSupportedError7}}}}),BrowserNotSupportedError8,logger15,DeviceCodeCredential,init_deviceCodeCredential_browser=__esm({\"../../node_modules/.pnpm/@azure+identity@4.5.0/node_modules/@azure/identity/dist-esm/src/credentials/deviceCodeCredential.browser.js\"(){init_globals(),init_logging(),BrowserNotSupportedError8=new Error(\"DeviceCodeCredential is not supported in the browser.\"),logger15=credentialLogger(\"DeviceCodeCredential\"),DeviceCodeCredential=class{getToken(){throw logger15.getToken.info(formatError(\"\",BrowserNotSupportedError8)),BrowserNotSupportedError8}constructor(){throw logger15.info(formatError(\"\",BrowserNotSupportedError8)),BrowserNotSupportedError8}}}}),BrowserNotSupportedError9,logger16,AzurePipelinesCredential,init_azurePipelinesCredential_browser=__esm({\"../../node_modules/.pnpm/@azure+identity@4.5.0/node_modules/@azure/identity/dist-esm/src/credentials/azurePipelinesCredential.browser.js\"(){init_globals(),init_logging(),BrowserNotSupportedError9=new Error(\"AzurePipelinesCredential is not supported in the browser.\"),logger16=credentialLogger(\"AzurePipelinesCredential\"),AzurePipelinesCredential=class{getToken(){throw logger16.getToken.info(formatError(\"\",BrowserNotSupportedError9)),BrowserNotSupportedError9}constructor(){throw logger16.info(formatError(\"\",BrowserNotSupportedError9)),BrowserNotSupportedError9}}}}),BrowserNotSupportedError10,logger17,AuthorizationCodeCredential,init_authorizationCodeCredential_browser=__esm({\"../../node_modules/.pnpm/@azure+identity@4.5.0/node_modules/@azure/identity/dist-esm/src/credentials/authorizationCodeCredential.browser.js\"(){init_globals(),init_logging(),BrowserNotSupportedError10=new Error(\"AuthorizationCodeCredential is not supported in the browser. InteractiveBrowserCredential is more appropriate for this use case.\"),logger17=credentialLogger(\"AuthorizationCodeCredential\"),AuthorizationCodeCredential=class{getToken(){throw logger17.getToken.info(formatError(\"\",BrowserNotSupportedError10)),BrowserNotSupportedError10}constructor(){throw logger17.info(formatError(\"\",BrowserNotSupportedError10)),BrowserNotSupportedError10}}}}),BrowserNotSupportedError11,logger18,AzurePowerShellCredential,init_azurePowerShellCredential_browser=__esm({\"../../node_modules/.pnpm/@azure+identity@4.5.0/node_modules/@azure/identity/dist-esm/src/credentials/azurePowerShellCredential.browser.js\"(){init_globals(),init_logging(),BrowserNotSupportedError11=new Error(\"AzurePowerShellCredential is not supported in the browser.\"),logger18=credentialLogger(\"AzurePowerShellCredential\"),AzurePowerShellCredential=class{getToken(){throw logger18.getToken.info(formatError(\"\",BrowserNotSupportedError11)),BrowserNotSupportedError11}constructor(){throw logger18.info(formatError(\"\",BrowserNotSupportedError11)),BrowserNotSupportedError11}}}}),logger19,UsernamePasswordCredential,init_usernamePasswordCredential_browser=__esm({\"../../node_modules/.pnpm/@azure+identity@4.5.0/node_modules/@azure/identity/dist-esm/src/credentials/usernamePasswordCredential.browser.js\"(){init_globals(),init_tenantIdUtils(),init_browser5(),init_logging(),init_identityClient(),init_identityTokenEndpoint(),init_tracing(),logger19=credentialLogger(\"UsernamePasswordCredential\"),UsernamePasswordCredential=class{async getToken(e,t={}){return tracingClient.withSpan(\"UsernamePasswordCredential.getToken\",t,(async r=>{const n=processMultiTenantRequest(this.tenantId,r,this.additionallyAllowedTenantIds);r.tenantId=n;const i=getIdentityTokenEndpointSuffix(this.tenantId),o=new URLSearchParams({response_type:\"token\",grant_type:\"password\",client_id:this.clientId,username:this.username,password:this.password,scope:\"string\"==typeof e?e:e.join(\" \")}),a=createPipelineRequest({url:`${this.identityClient.authorityHost}/${this.tenantId}/${i}`,method:\"POST\",body:o.toString(),headers:createHttpHeaders({Accept:\"application/json\",\"Content-Type\":\"application/x-www-form-urlencoded\"}),abortSignal:t&&t.abortSignal,tracingOptions:r.tracingOptions}),s=await this.identityClient.sendTokenRequest(a);return logger19.getToken.info(formatSuccess(e)),s&&s.accessToken||null}))}constructor(e,t,r,n,i){checkTenantId(logger19,e),this.identityClient=new IdentityClient(i),this.tenantId=e,this.additionallyAllowedTenantIds=resolveAdditionallyAllowedTenantIds(null==i?void 0:i.additionallyAllowedTenants),this.clientId=t,this.username=r,this.password=n}}}}),BrowserNotSupportedError12,logger20,VisualStudioCodeCredential,init_visualStudioCodeCredential_browser=__esm({\"../../node_modules/.pnpm/@azure+identity@4.5.0/node_modules/@azure/identity/dist-esm/src/credentials/visualStudioCodeCredential.browser.js\"(){init_globals(),init_logging(),BrowserNotSupportedError12=new Error(\"VisualStudioCodeCredential is not supported in the browser.\"),logger20=credentialLogger(\"VisualStudioCodeCredential\"),VisualStudioCodeCredential=class{getToken(){throw logger20.getToken.info(formatError(\"\",BrowserNotSupportedError12)),BrowserNotSupportedError12}constructor(){throw logger20.info(formatError(\"\",BrowserNotSupportedError12)),BrowserNotSupportedError12}}}}),credentialName,BrowserNotSupportedError13,logger21,OnBehalfOfCredential,init_onBehalfOfCredential_browser=__esm({\"../../node_modules/.pnpm/@azure+identity@4.5.0/node_modules/@azure/identity/dist-esm/src/credentials/onBehalfOfCredential.browser.js\"(){init_globals(),init_logging(),credentialName=\"OnBehalfOfCredential\",BrowserNotSupportedError13=new Error(`${credentialName}: Not supported in the browser.`),logger21=credentialLogger(credentialName),OnBehalfOfCredential=class{getToken(){throw logger21.getToken.info(formatError(\"\",BrowserNotSupportedError13)),BrowserNotSupportedError13}constructor(){throw logger21.info(formatError(\"\",BrowserNotSupportedError13)),BrowserNotSupportedError13}}}}),BrowserNotSupportedError14,logger22,WorkloadIdentityCredential,init_workloadIdentityCredential_browser=__esm({\"../../node_modules/.pnpm/@azure+identity@4.5.0/node_modules/@azure/identity/dist-esm/src/credentials/workloadIdentityCredential.browser.js\"(){init_globals(),init_logging(),BrowserNotSupportedError14=new Error(\"WorkloadIdentityCredential is not supported in the browser.\"),logger22=credentialLogger(\"WorkloadIdentityCredential\"),WorkloadIdentityCredential=class{getToken(){throw logger22.getToken.info(formatError(\"\",BrowserNotSupportedError14)),BrowserNotSupportedError14}constructor(){throw logger22.info(formatError(\"\",BrowserNotSupportedError14)),BrowserNotSupportedError14}}}});function getBearerTokenProvider(e,t,r){const{abortSignal:n,tracingOptions:i}=r||{},o=createEmptyPipeline();return o.addPolicy(bearerTokenAuthenticationPolicy({credential:e,scopes:t})),async function(){var e;const t=null===(e=(await o.sendRequest({sendRequest:e=>Promise.resolve({request:e,status:200,headers:e.headers})},createPipelineRequest({url:\"https://example.com\",abortSignal:n,tracingOptions:i}))).headers.get(\"authorization\"))||void 0===e?void 0:e.split(\" \")[1];if(!t)throw new Error(\"Failed to get access token\");return t}}var init_tokenProvider=__esm({\"../../node_modules/.pnpm/@azure+identity@4.5.0/node_modules/@azure/identity/dist-esm/src/tokenProvider.js\"(){init_globals(),init_browser5()}}),src_exports={};function getDefaultAzureCredential(){return new DefaultAzureCredential}__export(src_exports,{AggregateAuthenticationError:()=>AggregateAuthenticationError,AggregateAuthenticationErrorName:()=>AggregateAuthenticationErrorName,AuthenticationError:()=>AuthenticationError,AuthenticationErrorName:()=>AuthenticationErrorName,AuthenticationRequiredError:()=>AuthenticationRequiredError,AuthorizationCodeCredential:()=>AuthorizationCodeCredential,AzureAuthorityHosts:()=>AzureAuthorityHosts,AzureCliCredential:()=>AzureCliCredential,AzureDeveloperCliCredential:()=>AzureDeveloperCliCredential,AzurePipelinesCredential:()=>AzurePipelinesCredential,AzurePowerShellCredential:()=>AzurePowerShellCredential,ChainedTokenCredential:()=>ChainedTokenCredential,ClientAssertionCredential:()=>ClientAssertionCredential,ClientCertificateCredential:()=>ClientCertificateCredential,ClientSecretCredential:()=>ClientSecretCredential,CredentialUnavailableError:()=>CredentialUnavailableError,CredentialUnavailableErrorName:()=>CredentialUnavailableErrorName,DefaultAzureCredential:()=>DefaultAzureCredential,DeviceCodeCredential:()=>DeviceCodeCredential,EnvironmentCredential:()=>EnvironmentCredential,InteractiveBrowserCredential:()=>InteractiveBrowserCredential,ManagedIdentityCredential:()=>ManagedIdentityCredential,OnBehalfOfCredential:()=>OnBehalfOfCredential,UsernamePasswordCredential:()=>UsernamePasswordCredential,VisualStudioCodeCredential:()=>VisualStudioCodeCredential,WorkloadIdentityCredential:()=>WorkloadIdentityCredential,deserializeAuthenticationRecord:()=>deserializeAuthenticationRecord,getBearerTokenProvider:()=>getBearerTokenProvider,getDefaultAzureCredential:()=>getDefaultAzureCredential,logger:()=>logger,serializeAuthenticationRecord:()=>serializeAuthenticationRecord,useIdentityPlugin:()=>useIdentityPlugin});var init_src=__esm({\"../../node_modules/.pnpm/@azure+identity@4.5.0/node_modules/@azure/identity/dist-esm/src/index.js\"(){init_globals(),init_consumer_browser(),init_defaultAzureCredential_browser(),init_errors(),init_utils(),init_chainedTokenCredential(),init_clientSecretCredential_browser(),init_defaultAzureCredential_browser(),init_environmentCredential_browser(),init_clientCertificateCredential_browser(),init_clientAssertionCredential_browser(),init_azureCliCredential_browser(),init_azureDeveloperCliCredential_browser(),init_interactiveBrowserCredential_browser(),init_index_browser2(),init_deviceCodeCredential_browser(),init_azurePipelinesCredential_browser(),init_authorizationCodeCredential_browser(),init_azurePowerShellCredential_browser(),init_usernamePasswordCredential_browser(),init_visualStudioCodeCredential_browser(),init_onBehalfOfCredential_browser(),init_workloadIdentityCredential_browser(),init_logging(),init_constants(),init_tokenProvider()}}),require_lexer=__commonJS({\"../../node_modules/.pnpm/lex@1.7.9/node_modules/lex/lexer.js\"(e,t){function r(e){\"function\"!=typeof e&&(e=r.defunct);var t=[],n=[],i=0;function o(){for(var e=[],t=0,r=this.state,i=this.index,o=this.input,a=0,s=n.length;a__left_angle_mark_s;a++){var l=n[a],u=l.start,c=u.length;if(!c||u.indexOf(r)>=0||r%2&&1===c&&!u[0]){var d=l.pattern;d.lastIndex=i;var h=d.exec(o);if(h&&h.index===i){var f=e.push({result:h,action:l.action,length:h[0].length});for(l.global&&(t=f);--f>t;){var p=f-1;if(e[f].length>e[p].length){var m=e[f];e[f]=e[p],e[p]=m}}}}}return e}this.state=0,this.index=0,this.input=\"\",this.addRule=function(e,t,r){var i=e.global;if(!i){var o=\"g\";e.multiline&&(o+=\"m\"),e.ignoreCase&&(o+=\"i\"),e=new RegExp(e.source,o)}return\"[object Array]\"!==Object.prototype.toString.call(r)&&(r=[0]),n.push({pattern:e,global:i,action:t,start:r}),this},this.setInput=function(e){return i=0,this.state=0,this.index=0,t.length=0,this.input=e,this},this.lex=function(){if(t.length)return t.shift();for(this.reject=!0;this.index__left_angle_mark_=this.input.length;){for(var r=o.call(this).splice(i),n=this.index;r.length&&this.reject;){var a=r.shift(),s=a.result,l=a.length;this.index+=l,this.reject=!1,i++;var u=a.action.apply(this,s);if(this.reject)this.index=s.index;else if(void 0!==u)return\"[object Array]\"===Object.prototype.toString.call(u)&&(t=u.slice(1),u=u[0]),l&&(i=0),u}var c=this.input;if(n__left_angle_mark_c.length)if(this.reject){if(i=0,void 0!==(u=e.call(this,c.charAt(this.index++))))return\"[object Array]\"===Object.prototype.toString.call(u)?(t=u.slice(1),u[0]):u}else this.index!==n&&(i=0),this.reject=!0;else{if(!r.length)break;this.reject=!0}}}}init_globals(),\"object\"==typeof t&&\"object\"==typeof t.exports&&(t.exports=r),r.defunct=function(e){throw new Error(\"Unexpected character at index \"+(this.index-1)+\": \"+e)}}}),require_fromcodepoint=__commonJS({\"../../node_modules/.pnpm/string.fromcodepoint@0.2.1/node_modules/string.fromcodepoint/fromcodepoint.js\"(){var e,t,r,n;init_globals(),String.fromCodePoint||(e=function(){try{var e={},t=Object.defineProperty,r=t(e,e,e)&&t}catch(n){}return r}(),t=String.fromCharCode,r=Math.floor,n=function(e){var n,i,o=[],a=-1,s=arguments.length;if(!s)return\"\";for(var l=\"\";++a__left_angle_mark_s;){var u=Number(arguments[a]);if(!isFinite(u)||u__left_angle_mark_0||u>1114111||r(u)!=u)throw RangeError(\"Invalid code point: \"+u);u__left_angle_mark_=65535?o.push(u):(n=55296+((u-=65536)>>10),i=u%1024+56320,o.push(n,i)),(a+1==s||o.length>16384)&&(l+=t.apply(null,o),o.length=0)}return l},e?e(String,\"fromCodePoint\",{\"value\":n,\"configurable\":!0,\"writable\":!0}):String.fromCodePoint=n)}}),require_dist=__commonJS({\"../../node_modules/.pnpm/unescape-js@1.1.4/node_modules/unescape-js/dist/index.js\"(e,t){init_globals(),Object.defineProperty(e,\"__esModule\",{value:!0}),e.default=void 0,require_fromcodepoint();var r=/\\\\(u\\{([0-9A-Fa-f]+)\\}|u([0-9A-Fa-f]{4})|x([0-9A-Fa-f]{2})|([1-7][0-7]{0,2}|[0-7]{2,3})|(['\"tbrnfv0\\\\]))|\\\\U([0-9A-Fa-f]{8})/g,n={0:\"\\0\",\"b\":\"\\b\",\"f\":\"\\f\",\"n\":\"\\n\",\"r\":\"\\r\",\"t\":\"\\t\",\"v\":\"\\v\",\"'\":\"'\",'\"':'\"',\"\\\\\":\"\\\\\"},i=function(e){return String.fromCodePoint(parseInt(e,16))};e.default=function(e){return e.replace(r,(function(e,t,r,o,a,s,l,u){return void 0!==r?i(r):void 0!==o?i(o):void 0!==a?i(a):void 0!==s?(c=s,String.fromCodePoint(parseInt(c,8))):void 0!==u?i(u):n[l];var c}))},t.exports=e.default}}),require_utf8=__commonJS({\"../../node_modules/.pnpm/utf8@3.0.0/node_modules/utf8/utf8.js\"(e){init_globals(),function(e){var t,r,n,i=String.fromCharCode;function o(e){for(var t,r,n=[],i=0,o=e.length;i__left_angle_mark_o;)(t=e.charCodeAt(i++))>=55296&&t__left_angle_mark_=56319&&i__left_angle_mark_o?56320==(64512&(r=e.charCodeAt(i++)))?n.push(((1023&t)__left_angle_mark___left_angle_mark_10)+(1023&r)+65536):(n.push(t),i--):n.push(t);return n}function a(e){if(e>=55296&&e__left_angle_mark_=57343)throw Error(\"Lone surrogate U+\"+e.toString(16).toUpperCase()+\" is not a scalar value\")}function s(e,t){return i(e>>t&63|128)}function l(e){if(!(4294967168&e))return i(e);var t=\"\";return 4294965248&e?4294901760&e?4292870144&e||(t=i(e>>18&7|240),t+=s(e,12),t+=s(e,6)):(a(e),t=i(e>>12&15|224),t+=s(e,6)):t=i(e>>6&31|192),t+=i(63&e|128)}function u(){if(n>=r)throw Error(\"Invalid byte index\");var e=255&t[n];if(n++,128==(192&e))return 63&e;throw Error(\"Invalid continuation byte\")}function c(){var e,i;if(n>r)throw Error(\"Invalid byte index\");if(n==r)return!1;if(e=255&t[n],n++,!(128&e))return e;if(192==(224&e)){if((i=(31&e)__left_angle_mark___left_angle_mark_6|u())>=128)return i;throw Error(\"Invalid continuation byte\")}if(224==(240&e)){if((i=(15&e)__left_angle_mark___left_angle_mark_12|u()__left_angle_mark___left_angle_mark_6|u())>=2048)return a(i),i;throw Error(\"Invalid continuation byte\")}if(240==(248&e)&&(i=(7&e)__left_angle_mark___left_angle_mark_18|u()__left_angle_mark___left_angle_mark_12|u()__left_angle_mark___left_angle_mark_6|u())>=65536&&i__left_angle_mark_=1114111)return i;throw Error(\"Invalid UTF-8 detected\")}e.version=\"3.0.0\",e.encode=function(e){for(var t=o(e),r=t.length,n=-1,i=\"\";++n__left_angle_mark_r;)i+=l(t[n]);return i},e.decode=function(e){t=o(e),r=t.length,n=0;for(var a,s=[];!1!==(a=c());)s.push(a);return function(e){for(var t,r=e.length,n=-1,o=\"\";++n__left_angle_mark_r;)(t=e[n])>65535&&(o+=i((t-=65536)>>>10&1023|55296),t=56320|1023&t),o+=i(t);return o}(s)}}(void 0===e?e.utf8={}:e)}}),require_lexer2=__commonJS({\"../../node_modules/.pnpm/dirty-json@0.9.2/node_modules/dirty-json/lexer.js\"(e,t){init_globals();var r=require_lexer(),n=require_dist(),i=(require_utf8(),[[/\\s*:\\s*/,-1],[/\\s*,\\s*/,-2],[/\\s*{\\s*/,-3],[/\\s*}\\s*/,13],[/\\s*\\[\\s*/,-4],[/\\s*\\]\\s*/,12],[/\\s*\\.\\s*/,-5]]);function o(e){return e=e.replace(/\\\\\\//,\"/\"),n(e)}function a(e,t){let n=function(e){let t=new r,n=0,a=0;return t.addRule(/\"((?:\\\\.|[^\"])*?)($|\")/,((e,t)=>(n+=e.length,{type:11,value:o(t),row:a,col:n,single:!1}))),t.addRule(/'((?:\\\\.|[^'])*?)($|'|(\",?[ \\t]*\\n))/,((e,t)=>(n+=e.length,{type:11,value:o(t),row:a,col:n,single:!0}))),t.addRule(/[\\-0-9]*\\.[0-9]*([eE][\\+\\-]?)?[0-9]*(?:\\s*)/,(e=>(n+=e.length,{type:6,value:parseFloat(e),row:a,col:n}))),t.addRule(/\\-?[0-9]+([eE][\\+\\-]?)[0-9]*(?:\\s*)/,(e=>(n+=e.length,{type:6,value:parseFloat(e),row:a,col:n}))),t.addRule(/\\-?[0-9]+(?:\\s*)/,(e=>(n+=e.length,{type:7,value:parseInt(e),row:a,col:n}))),i.forEach((e=>{t.addRule(e[0],(t=>(n+=t.length,{type:e[1],value:t,row:a,col:n})))})),t.addRule(/\\s/,(e=>{\"\\n\"==e?(n=0,a++):n+=e.length})),t.addRule(/\\S[ \\t]*/,(e=>(n+=e.length,{type:14,value:e,row:a,col:n}))),t.setInput(e),t}(e),a=\"\";for(;a=n.lex();)t(a)}t.exports.lexString=a,t.exports.getAllTokens=function(e){let t=[];return a(e,(function(e){t.push(e)})),t}}}),require_parser2=__commonJS({\"../../node_modules/.pnpm/dirty-json@0.9.2/node_modules/dirty-json/parser.js\"(e,t){init_globals();var r=require_lexer2(),n=10,i=12,o=13,a=15,s=-1,l=-2,u=-4;function c(e){null==e.peek&&Object.defineProperty(e,\"peek\",{enumerable:!1,value:function(){return this[this.length-1]}}),null==e.last&&Object.defineProperty(e,\"last\",{enumerable:!1,value:function(e){return this[this.length-(1+e)]}})}function d(e,t){return e&&e.hasOwnProperty(\"type\")&&e.type==t}function h(e){let t=e.pop();switch(t.type){case 8:if(\"true\"==t.value.trim())return e.push({\"type\":3,\"value\":\"true\"}),!0;if(\"false\"==t.value.trim())return e.push({\"type\":3,\"value\":\"false\"}),!0;if(\"null\"==t.value.trim())return e.push({\"type\":a,\"value\":null}),!0;break;case 14:return d(e.peek(),8)?(e.peek().value+=t.value,!0):(e.push({type:8,value:t.value}),!0);case 7:return d(t,7)&&d(e.peek(),8)?(e.peek().value+=t.value,!0):(t.type=a,e.push(t),!0);case 11:return t.type=a,t.value=t.value,e.push(t),!0;case 3:return t.type=a,\"true\"==t.value?t.value=!0:t.value=!1,e.push(t),!0;case 6:return t.type=a,e.push(t),!0;case a:if(d(e.peek(),l))return t.type=5,e.pop(),e.push(t),!0;if(d(e.peek(),s))return t.type=4,e.pop(),e.push(t),!0;if(d(e.peek(),8)&&d(e.last(1),a)){let r=e.pop();return e.peek().value+='\"'+r.value+'\"',e.peek().value+=t.value,!0}if(d(e.peek(),8)&&d(e.last(1),2)){let r=e.pop(),n=e.peek().value.pop();return n+='\"'+r.value+'\"',n+=t.value,e.peek().value.push(n),!0}if(d(e.peek(),8)&&d(e.last(1),1)){let r=e.pop(),n=e.peek().value.pop();const i=t.single?\"'\":'\"';return n.value+=i+r.value+i,n.value+=t.value,e.peek().value.push(n),!0}if(d(e.peek(),8)){let r=e.pop().value;return t.value=r+t.value,e.push(t),!0}break;case 9:if(d(t,9)&&d(e.peek(),l))return t.type=5,e.pop(),e.push(t),!0;if(d(e.peek(),s))return t.type=4,e.pop(),e.push(t),!0;break;case n:if(d(e.peek(),l)){let r={\"type\":5,\"value\":t};return e.pop(),e.push(r),!0}if(d(e.peek(),s)){let r={\"type\":4,\"value\":t};return e.pop(),e.push(r),!0}if(d(e.peek(),8)){let r=e.pop();return e.push({\"type\":0,\"key\":r.value.trim(),\"value\":t}),!0}break;case 5:return d(e.peek(),2)?(e.peek().value.push(t.value),!0):(e.push({\"type\":2,\"value\":[t.value]}),!0);case 2:if(d(e.peek(),a))return t.value.unshift(e.peek().value),e.pop(),e.push(t),!0;if(d(e.peek(),9))return t.value.unshift(e.peek().value),e.pop(),e.push(t),!0;if(d(e.peek(),n))return t.value.unshift(e.peek()),e.pop(),e.push(t),!0;if(d(e.peek(),8)&&(e.last(1),l)){let r=e.pop();for(e.push({type:a,\"value\":r.value}),r.value;h(e););return e.push(t),!0}if(d(e.peek(),2))return e.peek().value.push(t.value[0]),!0;break;case 4:if(d(e.peek(),8)||d(e.peek(),a)||d(e.peek(),2)){let r=e.pop();return e.push({\"type\":0,\"key\":r.value,\"value\":t.value}),!0}throw new Error(\"Got a :value that can't be handled at line \"+t.row+\":\"+t.col);case 0:return d(e.last(0),l)&&d(e.last(1),1)?(e.last(1).value.push(t),e.pop(),!0):(e.push({\"type\":1,\"value\":[t]}),!0);case 1:if(d(e.peek(),1))return t.value.forEach((function(t){e.peek().value.push(t)})),!0;break;case i:if(d(e.peek(),2)&&d(e.last(1),u)){let t=e.pop();return e.pop(),e.push({\"type\":9,\"value\":t.value}),!0}if(d(e.peek(),9)&&d(e.last(1),u)){let t=e.pop();return e.pop(),e.push({\"type\":9,\"value\":[t.value]}),!0}if(d(e.peek(),u))return e.pop(),e.push({type:9,\"value\":[]}),!0;if(d(e.peek(),a)&&d(e.last(1),u)){let t=e.pop().value;return e.pop(),e.push({type:9,\"value\":[t]}),!0}if(d(e.peek(),n)&&d(e.last(1),u)){let t=e.pop();return e.pop(),e.push({type:9,\"value\":[t]}),!0}if(d(e.peek(),8)&&d(e.last(1),l)){let t=e.pop();for(e.push({type:a,\"value\":t.value}),t.value;h(e););return e.push({type:i}),!0}if(d(e.peek(),l)&&(d(e.last(1),8)||d(e.last(1),n)||d(e.last(1),a))){for(e.pop(),e.push({type:i,\"value\":\"]\"}),JSON.stringify(e);h(e););return!0}if(d(e.peek(),8)&&d(e.last(1),u)){let t=e.pop();return e.pop(),e.push({type:9,value:[t.value]}),!0}if(d(e.peek(),l)&&d(e.last(1),2)){for(e.pop(),e.push({type:i}),JSON.stringify(e);h(e););return!0}break;case o:if(d(e.peek(),1)&&d(e.last(1),-3)){let t=e.pop();return e.pop(),e.push({\"type\":n,\"value\":t.value}),!0}if(d(e.peek(),-3))return e.pop(),e.push({type:n,\"value\":null}),!0;if(d(e.peek(),8)&&d(e.last(1),s)){let t=e.pop();for(e.push({type:a,\"value\":t.value}),t.value;h(e););return e.push({type:o}),!0}if(d(e.peek(),s)){for(e.push({type:a,value:null});h(e););return e.push({type:o}),!0}if(d(e.peek(),l))return e.pop(),e.push({type:o}),!0;throw new Error(\"Found } that I can't handle at line \"+t.row+\":\"+t.col);case l:if(d(e.peek(),l))return!0;if(d(e.peek(),8)){const r=e.pop();for(e.push({type:a,value:r.value});h(e););return e.push(t),!0}if(d(e.peek(),s)){for(e.push({type:a,value:null});h(e););return e.push(t),!0}}return e.push(t),!1}function f(e,t){if(-1!=[\"boolean\",\"number\",\"string\"].indexOf(typeof e))return e;if(null===e)return null;if(Array.isArray(e)){let t=[];for(;e.length>0;)t.unshift(f(e.pop()));return t}if(d(e,n)){let r={};return null===e.value?{}:(e.value.forEach((function(e){const n=e.key,i=f(e.value);r[n]=t&&n in r?{\"value\":r[n],\"next\":i}:i})),r)}return d(e,9)?f(e.value):e.value}t.exports.parse=function(e,t){let a=[],s=[];c(a),c(s),r.lexString(e,(function(e){s.push(e)})),s[0].type==u&&s.last(0).type!=i&&s.push({type:i,value:\"]\",row:-1,col:-1}),-3==s[0].type&&s.last(0).type!=o&&s.push({type:o,value:\"}\",row:-1,col:-1});for(let r=0;r__left_angle_mark_s.length;r++)for(s[r].type,a.push(s[r]);h(a););return 1==a.length&&1==a[0].type&&(a=[{type:n,value:a[0].value}]),f(a[0],t)}}}),require_dirty_json=__commonJS({\"../../node_modules/.pnpm/dirty-json@0.9.2/node_modules/dirty-json/dirty-json.js\"(e,t){init_globals();var r=require_parser2();t.exports.parse=function(e,t){let n=!0,i=!1;t&&(\"fallback\"in t&&!1===t[n]&&(n=!1),i=\"duplicateKeys\"in t&&!0===t.duplicateKeys);try{return r.parse(e,i)}catch(o){if(!1===n)throw o;try{let t=JSON.parse(e);return import_console_browserify.default.warn(\"dirty-json got valid JSON that failed with the custom parser. We're returning the valid JSON, but please file a bug report here: https://github.com/RyanMarcus/dirty-json/issues -- the JSON that caused the failure was: \"+e),t}catch(a){throw o}}}}}),require_version2=__commonJS({\"../../node_modules/.pnpm/openai@4.57.1_zod@3.23.8/node_modules/openai/version.js\"(e){init_globals(),Object.defineProperty(e,\"__esModule\",{value:!0}),e.VERSION=void 0,e.VERSION=\"4.57.1\"}}),require_registry2=__commonJS({\"../../node_modules/.pnpm/openai@4.57.1_zod@3.23.8/node_modules/openai/_shims/registry.js\"(e){init_globals(),Object.defineProperty(e,\"__esModule\",{value:!0}),e.setShims=e.isFsReadStream=e.fileFromPath=e.getDefaultAgent=e.getMultipartRequestOptions=e.ReadableStream=e.File=e.Blob=e.FormData=e.Headers=e.Response=e.Request=e.fetch=e.kind=e.auto=void 0,e.auto=!1,e.kind=void 0,e.fetch=void 0,e.Request=void 0,e.Response=void 0,e.Headers=void 0,e.FormData=void 0,e.Blob=void 0,e.File=void 0,e.ReadableStream=void 0,e.getMultipartRequestOptions=void 0,e.getDefaultAgent=void 0,e.fileFromPath=void 0,e.isFsReadStream=void 0,e.setShims=function(t,r={auto:!1}){if(e.auto)throw new Error(`you must \\`import 'openai/shims/${t.kind}'\\` before importing anything else from openai`);if(e.kind)throw new Error(`can't \\`import 'openai/shims/${t.kind}'\\` after \\`import 'openai/shims/${e.kind}'\\``);e.auto=r.auto,e.kind=t.kind,e.fetch=t.fetch,e.Request=t.Request,e.Response=t.Response,e.Headers=t.Headers,e.FormData=t.FormData,e.Blob=t.Blob,e.File=t.File,e.ReadableStream=t.ReadableStream,e.getMultipartRequestOptions=t.getMultipartRequestOptions,e.getDefaultAgent=t.getDefaultAgent,e.fileFromPath=t.fileFromPath,e.isFsReadStream=t.isFsReadStream}}}),require_MultipartBody2=__commonJS({\"../../node_modules/.pnpm/openai@4.57.1_zod@3.23.8/node_modules/openai/_shims/MultipartBody.js\"(e){init_globals(),Object.defineProperty(e,\"__esModule\",{value:!0}),e.MultipartBody=void 0;var t=class{get[Symbol.toStringTag](){return\"MultipartBody\"}constructor(e){this.body=e}};e.MultipartBody=t}}),require_web_runtime2=__commonJS({\"../../node_modules/.pnpm/openai@4.57.1_zod@3.23.8/node_modules/openai/_shims/web-runtime.js\"(e){init_globals(),Object.defineProperty(e,\"__esModule\",{value:!0}),e.getRuntime=void 0;var t=require_MultipartBody2();e.getRuntime=function({manuallyImported:e}={}){const r=e?\"You may need to use polyfills\":\"Add one of these imports before your first `import … from 'openai'`:\\n- `import 'openai/shims/node'` (if you're running on Node)\\n- `import 'openai/shims/web'` (otherwise)\\n\";let n,i,o,a;try{n=fetch,i=Request,o=Response,a=Headers}catch(s){throw new Error(`this environment is missing the following Web Fetch API type: ${s.message}. ${r}`)}return{kind:\"web\",fetch:n,Request:i,Response:o,Headers:a,FormData:\"undefined\"!=typeof FormData?FormData:class{constructor(){throw new Error(`file uploads aren't supported in this environment yet as 'FormData' is undefined. ${r}`)}},Blob:\"undefined\"!=typeof Blob?Blob:class{constructor(){throw new Error(`file uploads aren't supported in this environment yet as 'Blob' is undefined. ${r}`)}},File:\"undefined\"!=typeof File?File:class{constructor(){throw new Error(`file uploads aren't supported in this environment yet as 'File' is undefined. ${r}`)}},ReadableStream:\"undefined\"!=typeof ReadableStream?ReadableStream:class{constructor(){throw new Error(`streaming isn't supported in this environment yet as 'ReadableStream' is undefined. ${r}`)}},getMultipartRequestOptions:async(e,r)=>({...r,body:new t.MultipartBody(e)}),getDefaultAgent:e=>{},fileFromPath:()=>{throw new Error(\"The `fileFromPath` function is only supported in Node. See the README for more details: https://www.github.com/openai/openai-node#file-uploads\")},isFsReadStream:e=>!1}}}}),require_runtime2=__commonJS({\"../../node_modules/.pnpm/openai@4.57.1_zod@3.23.8/node_modules/openai/_shims/auto/runtime.js\"(e){init_globals();var t=e&&e.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!(\"get\"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=e&&e.__exportStar||function(e,r){for(var n in e)\"default\"===n||Object.prototype.hasOwnProperty.call(r,n)||t(r,e,n)};Object.defineProperty(e,\"__esModule\",{value:!0}),r(require_web_runtime2(),e)}}),require_shims2=__commonJS({\"../../node_modules/.pnpm/openai@4.57.1_zod@3.23.8/node_modules/openai/_shims/index.js\"(e){init_globals();var t=require_registry2(),r=require_runtime2();t.kind||t.setShims(r.getRuntime(),{auto:!0});for(const n of Object.keys(t))Object.defineProperty(e,n,{get:()=>t[n]})}}),require_streaming2=__commonJS({\"../../node_modules/.pnpm/openai@4.57.1_zod@3.23.8/node_modules/openai/streaming.js\"(e){init_globals(),Object.defineProperty(e,\"__esModule\",{value:!0}),e.readableStreamAsyncIterable=e._decodeChunks=e._iterSSEMessages=e.Stream=void 0;var t=require_shims2(),r=require_error2(),n=require_error2(),i=class e{static fromSSEResponse(t,r){let i=!1;return new e((async function*(){if(i)throw new Error(\"Cannot iterate over a consumed stream, use `.tee()` to split the stream.\");i=!0;let e=!1;try{for await(const i of o(t,r))if(!e)if(i.data.startsWith(\"[DONE]\"))e=!0;else if(null===i.event){let e;try{e=JSON.parse(i.data)}catch(a){throw import_console_browserify.default.error(\"Could not parse message into JSON:\",i.data),import_console_browserify.default.error(\"From chunk:\",i.raw),a}if(e&&e.error)throw new n.APIError(void 0,e.error,void 0,void 0);yield e}else{let e;try{e=JSON.parse(i.data)}catch(a){throw import_console_browserify.default.error(\"Could not parse message into JSON:\",i.data),import_console_browserify.default.error(\"From chunk:\",i.raw),a}if(\"error\"==i.event)throw new n.APIError(void 0,e.error,e.message,void 0);yield{event:i.event,data:e}}e=!0}catch(a){if(a instanceof Error&&\"AbortError\"===a.name)return;throw a}finally{e||r.abort()}}),r)}static fromReadableStream(t,r){let n=!1;return new e((async function*(){if(n)throw new Error(\"Cannot iterate over a consumed stream, use `.tee()` to split the stream.\");n=!0;let e=!1;try{for await(const r of async function*(){const e=new l,r=u(t);for await(const t of r)for(const r of e.decode(t))yield r;for(const t of e.flush())yield t}())e||r&&(yield JSON.parse(r));e=!0}catch(i){if(i instanceof Error&&\"AbortError\"===i.name)return;throw i}finally{e||r.abort()}}),r)}[Symbol.asyncIterator](){return this.iterator()}tee(){const t=[],r=[],n=this.iterator(),i=e=>({next:()=>{if(0===e.length){const e=n.next();t.push(e),r.push(e)}return e.shift()}});return[new e((()=>i(t)),this.controller),new e((()=>i(r)),this.controller)]}toReadableStream(){const e=this;let r;const n=new TextEncoder;return new t.ReadableStream({async start(){r=e[Symbol.asyncIterator]()},async pull(e){try{const{value:t,done:i}=await r.next();if(i)return e.close();const o=n.encode(JSON.stringify(t)+\"\\n\");e.enqueue(o)}catch(t){e.error(t)}},async cancel(){var e;await(null==(e=r.return)?void 0:e.call(r))}})}constructor(e,t){this.iterator=e,this.controller=t}};async function*o(e,t){if(!e.body)throw t.abort(),new r.OpenAIError(\"Attempted to iterate over a response with no body\");const n=new s,i=new l,o=u(e.body);for await(const r of async function*(e){let t=new Uint8Array;for await(const r of e){if(null==r)continue;const e=r instanceof ArrayBuffer?new Uint8Array(r):\"string\"==typeof r?(new TextEncoder).encode(r):r;let n,i=new Uint8Array(t.length+e.length);for(i.set(t),i.set(e,t.length),t=i;-1!==(n=a(t));)yield t.slice(0,n),t=t.slice(n)}t.length>0&&(yield t)}(o))for(const e of i.decode(r)){const t=n.decode(e);t&&(yield t)}for(const r of i.flush()){const e=n.decode(r);e&&(yield e)}}function a(e){for(let t=0;t__left_angle_mark_e.length-2;t++){if(10===e[t]&&10===e[t+1])return t+2;if(13===e[t]&&13===e[t+1])return t+2;if(13===e[t]&&10===e[t+1]&&t+3__left_angle_mark_e.length&&13===e[t+2]&&10===e[t+3])return t+4}return-1}e.Stream=i,e._iterSSEMessages=o;var s=class{decode(e){if(e.endsWith(\"\\r\")&&(e=e.substring(0,e.length-1)),!e){if(!this.event&&!this.data.length)return null;const e={event:this.event,data:this.data.join(\"\\n\"),raw:this.chunks};return this.event=null,this.data=[],this.chunks=[],e}if(this.chunks.push(e),e.startsWith(\":\"))return null;let[t,r,n]=function(e,t){const r=e.indexOf(t);return-1!==r?[e.substring(0,r),t,e.substring(r+t.length)]:[e,\"\",\"\"]}(e,\":\");return n.startsWith(\" \")&&(n=n.substring(1)),\"event\"===t?this.event=n:\"data\"===t&&this.data.push(n),null}constructor(){this.event=null,this.data=[],this.chunks=[]}},l=class e{decode(t){let r=this.decodeText(t);if(this.trailingCR&&(r=\"\\r\"+r,this.trailingCR=!1),r.endsWith(\"\\r\")&&(this.trailingCR=!0,r=r.slice(0,-1)),!r)return[];const n=e.NEWLINE_CHARS.has(r[r.length-1]||\"\");let i=r.split(e.NEWLINE_REGEXP);return n&&i.pop(),1!==i.length||n?(this.buffer.length>0&&(i=[this.buffer.join(\"\")+i[0],...i.slice(1)],this.buffer=[]),n||(this.buffer=[i.pop()||\"\"]),i):(this.buffer.push(i[0]),[])}decodeText(e){if(null==e)return\"\";if(\"string\"==typeof e)return e;if(\"undefined\"!=typeof Buffer){if(e instanceof Buffer)return e.toString();if(e instanceof Uint8Array)return Buffer.from(e).toString();throw new r.OpenAIError(`Unexpected: received non-Uint8Array (${e.constructor.name}) stream chunk in an environment with a global \"Buffer\" defined, which this library assumes to be Node. Please report this error.`)}if(\"undefined\"!=typeof TextDecoder){if(e instanceof Uint8Array||e instanceof ArrayBuffer)return null!=this.textDecoder||(this.textDecoder=new TextDecoder(\"utf8\")),this.textDecoder.decode(e);throw new r.OpenAIError(`Unexpected: received non-Uint8Array/ArrayBuffer (${e.constructor.name}) in a web platform. Please report this error.`)}throw new r.OpenAIError(\"Unexpected: neither Buffer nor TextDecoder are available as globals. Please report this error.\")}flush(){if(!this.buffer.length&&!this.trailingCR)return[];const e=[this.buffer.join(\"\")];return this.buffer=[],this.trailingCR=!1,e}constructor(){this.buffer=[],this.trailingCR=!1}};function u(e){if(e[Symbol.asyncIterator])return e;const t=e.getReader();return{async next(){try{const e=await t.read();return(null==e?void 0:e.done)&&t.releaseLock(),e}catch(e){throw t.releaseLock(),e}},async return(){const e=t.cancel();return t.releaseLock(),await e,{done:!0,value:void 0}},[Symbol.asyncIterator](){return this}}}l.NEWLINE_CHARS=new Set([\"\\n\",\"\\r\"]),l.NEWLINE_REGEXP=/\\r\\n|[\\n\\r]/g,e._decodeChunks=function(e){const t=new l,r=[];for(const n of e)r.push(...t.decode(n));return r},e.readableStreamAsyncIterable=u}}),require_uploads2=__commonJS({\"../../node_modules/.pnpm/openai@4.57.1_zod@3.23.8/node_modules/openai/uploads.js\"(e){init_globals(),Object.defineProperty(e,\"__esModule\",{value:!0}),e.createForm=e.multipartFormRequestOptions=e.maybeMultipartFormRequestOptions=e.isMultipartBody=e.toFile=e.isUploadable=e.isBlobLike=e.isFileLike=e.isResponseLike=e.fileFromPath=void 0;var t=require_shims2(),r=require_shims2();async function n(r,n,a){var s,l,u;if(r=await r,null!=a||(a=(0,e.isFileLike)(r)?{lastModified:r.lastModified,type:r.type}:{}),(0,e.isResponseLike)(r)){const i=await r.blob();n||(n=null!=(s=new URL(r.url).pathname.split(/[\\\\/]/).pop())?s:\"unknown_file\");const o=(0,e.isBlobLike)(i)?[await i.arrayBuffer()]:[i];return new t.File(o,n,a)}const c=await async function(t){var r;let n=[];if(\"string\"==typeof t||ArrayBuffer.isView(t)||t instanceof ArrayBuffer)n.push(t);else if((0,e.isBlobLike)(t))n.push(await t.arrayBuffer());else{if(!o(t))throw new Error(`Unexpected data type: ${typeof t}; constructor: ${null==(r=null==t?void 0:t.constructor)?void 0:r.name}; props: ${function(e){const t=Object.getOwnPropertyNames(e);return`[${t.map((e=>`\"${e}\"`)).join(\", \")}]`}(t)}`);for await(const e of t)n.push(e)}return n}(r);if(n||(n=null!=(l=function(e){var t;return i(e.name)||i(e.filename)||(null==(t=i(e.path))?void 0:t.split(/[\\\\/]/).pop())}(r))?l:\"unknown_file\"),!a.type){const e=null==(u=c[0])?void 0:u.type;\"string\"==typeof e&&(a={...a,type:e})}return new t.File(c,n,a)}Object.defineProperty(e,\"fileFromPath\",{enumerable:!0,get:function(){return r.fileFromPath}}),e.isResponseLike=e=>null!=e&&\"object\"==typeof e&&\"string\"==typeof e.url&&\"function\"==typeof e.blob,e.isFileLike=t=>null!=t&&\"object\"==typeof t&&\"string\"==typeof t.name&&\"number\"==typeof t.lastModified&&(0,e.isBlobLike)(t),e.isBlobLike=e=>null!=e&&\"object\"==typeof e&&\"number\"==typeof e.size&&\"string\"==typeof e.type&&\"function\"==typeof e.text&&\"function\"==typeof e.slice&&\"function\"==typeof e.arrayBuffer,e.isUploadable=r=>(0,e.isFileLike)(r)||(0,e.isResponseLike)(r)||(0,t.isFsReadStream)(r),e.toFile=n;var i=e=>\"string\"==typeof e?e:\"undefined\"!=typeof Buffer&&e instanceof Buffer?String(e):void 0,o=e=>null!=e&&\"object\"==typeof e&&\"function\"==typeof e[Symbol.asyncIterator];e.isMultipartBody=e=>e&&\"object\"==typeof e&&e.body&&\"MultipartBody\"===e[Symbol.toStringTag],e.maybeMultipartFormRequestOptions=async r=>{if(!a(r.body))return r;const n=await(0,e.createForm)(r.body);return(0,t.getMultipartRequestOptions)(n,r)},e.multipartFormRequestOptions=async r=>{const n=await(0,e.createForm)(r.body);return(0,t.getMultipartRequestOptions)(n,r)},e.createForm=async e=>{const r=new t.FormData;return await Promise.all(Object.entries(e||{}).map((([e,t])=>s(r,e,t)))),r};var a=t=>{if((0,e.isUploadable)(t))return!0;if(Array.isArray(t))return t.some(a);if(t&&\"object\"==typeof t)for(const e in t)if(a(t[e]))return!0;return!1},s=async(t,r,i)=>{if(void 0!==i){if(null==i)throw new TypeError(`Received null for \"${r}\"; to pass null in FormData, you must use the string 'null'`);if(\"string\"==typeof i||\"number\"==typeof i||\"boolean\"==typeof i)t.append(r,String(i));else if((0,e.isUploadable)(i)){const e=await n(i);t.append(r,e)}else if(Array.isArray(i))await Promise.all(i.map((e=>s(t,r+\"[]\",e))));else{if(\"object\"!=typeof i)throw new TypeError(`Invalid value given to form, expected a string, number, boolean, object, Array, File or Blob but got ${i} instead`);await Promise.all(Object.entries(i).map((([e,n])=>s(t,`${r}[${e}]`,n))))}}}}}),require_core2=__commonJS({\"../../node_modules/.pnpm/openai@4.57.1_zod@3.23.8/node_modules/openai/core.js\"(e){init_globals();var t,r=e&&e.__classPrivateFieldSet||function(e,t,r,n,i){if(\"m\"===n)throw new TypeError(\"Private method is not writable\");if(\"a\"===n&&!i)throw new TypeError(\"Private accessor was defined without a setter\");if(\"function\"==typeof t?e!==t||!i:!t.has(e))throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");return\"a\"===n?i.call(e,r):i?i.value=r:t.set(e,r),r},n=e&&e.__classPrivateFieldGet||function(e,t,r,n){if(\"a\"===r&&!n)throw new TypeError(\"Private accessor was defined without a getter\");if(\"function\"==typeof t?e!==t||!n:!t.has(e))throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");return\"m\"===r?n:\"a\"===r?n.call(e):n?n.value:t.get(e)};Object.defineProperty(e,\"__esModule\",{value:!0}),e.isObj=e.toBase64=e.getRequiredHeader=e.isHeadersProtocol=e.isRunningInBrowser=e.debug=e.hasOwn=e.isEmptyObj=e.maybeCoerceBoolean=e.maybeCoerceFloat=e.maybeCoerceInteger=e.coerceBoolean=e.coerceFloat=e.coerceInteger=e.readEnv=e.ensurePresent=e.castToError=e.sleep=e.safeJSON=e.isRequestOptions=e.createResponseHeaders=e.PagePromise=e.AbstractPage=e.APIClient=e.APIPromise=e.createForm=e.multipartFormRequestOptions=e.maybeMultipartFormRequestOptions=void 0;var i=require_version2(),o=require_streaming2(),a=require_error2(),s=require_shims2(),l=require_uploads2(),u=require_uploads2();async function c(e){const{response:t}=e;if(e.options.stream)return C(\"response\",t.status,t.url,t.headers,t.body),e.options.__streamClass?e.options.__streamClass.fromSSEResponse(t,e.controller):o.Stream.fromSSEResponse(t,e.controller);if(204===t.status)return null;if(e.options.__binaryResponse)return t;const r=t.headers.get(\"content-type\");if((null==r?void 0:r.includes(\"application/json\"))||(null==r?void 0:r.includes(\"application/vnd.api+json\"))){const e=await t.json();return C(\"response\",t.status,t.url,t.headers,e),e}const n=await t.text();return C(\"response\",t.status,t.url,t.headers,n),n}Object.defineProperty(e,\"maybeMultipartFormRequestOptions\",{enumerable:!0,get:function(){return u.maybeMultipartFormRequestOptions}}),Object.defineProperty(e,\"multipartFormRequestOptions\",{enumerable:!0,get:function(){return u.multipartFormRequestOptions}}),Object.defineProperty(e,\"createForm\",{enumerable:!0,get:function(){return u.createForm}});var d=class e extends Promise{_thenUnwrap(t){return new e(this.responsePromise,(async e=>t(await this.parseResponse(e))))}asResponse(){return this.responsePromise.then((e=>e.response))}async withResponse(){const[e,t]=await Promise.all([this.parse(),this.asResponse()]);return{data:e,response:t}}parse(){return this.parsedPromise||(this.parsedPromise=this.responsePromise.then(this.parseResponse)),this.parsedPromise}then(e,t){return this.parse().then(e,t)}catch(e){return this.parse().catch(e)}finally(e){return this.parse().finally(e)}constructor(e,t=c){super((e=>{e(null)})),this.responsePromise=e,this.parseResponse=t}};e.APIPromise=d,e.APIClient=class{authHeaders(e){return{}}defaultHeaders(e){return{Accept:\"application/json\",\"Content-Type\":\"application/json\",\"User-Agent\":this.getUserAgent(),...y(),...this.authHeaders(e)}}validateHeaders(e,t){}defaultIdempotencyKey(){return`stainless-node-retry-${T()}`}get(e,t){return this.methodRequest(\"get\",e,t)}post(e,t){return this.methodRequest(\"post\",e,t)}patch(e,t){return this.methodRequest(\"patch\",e,t)}put(e,t){return this.methodRequest(\"put\",e,t)}delete(e,t){return this.methodRequest(\"delete\",e,t)}methodRequest(e,t,r){return this.request(Promise.resolve(r).then((async r=>{const n=r&&(0,l.isBlobLike)(null==r?void 0:r.body)?new DataView(await r.body.arrayBuffer()):(null==r?void 0:r.body)instanceof DataView?r.body:(null==r?void 0:r.body)instanceof ArrayBuffer?new DataView(r.body):r&&ArrayBuffer.isView(null==r?void 0:r.body)?new DataView(r.body.buffer):null==r?void 0:r.body;return{method:e,path:t,...r,body:n}})))}getAPIList(e,t,r){return this.requestAPIList(t,{method:\"get\",path:e,...r})}calculateContentLength(e){if(\"string\"==typeof e){if(\"undefined\"!=typeof Buffer)return Buffer.byteLength(e,\"utf8\").toString();if(\"undefined\"!=typeof TextEncoder)return(new TextEncoder).encode(e).length.toString()}else if(ArrayBuffer.isView(e))return e.byteLength.toString();return null}buildRequest(e){var t,r,n,i,o,a;const{method:u,path:c,query:d,headers:h={}}=e,f=ArrayBuffer.isView(e.body)||e.__binaryRequest&&\"string\"==typeof e.body?e.body:(0,l.isMultipartBody)(e.body)?e.body.body:e.body?JSON.stringify(e.body,null,2):null,p=this.calculateContentLength(f),m=this.buildURL(c,d);\"timeout\"in e&&w(\"timeout\",e.timeout);const g=null!=(t=e.timeout)?t:this.timeout,_=null!=(n=null!=(r=e.httpAgent)?r:this.httpAgent)?n:(0,s.getDefaultAgent)(m),b=g+1e3;return\"number\"==typeof(null==(i=null==_?void 0:_.options)?void 0:i.timeout)&&b>(null!=(o=_.options.timeout)?o:0)&&(_.options.timeout=b),this.idempotencyHeader&&\"get\"!==u&&(e.idempotencyKey||(e.idempotencyKey=this.defaultIdempotencyKey()),h[this.idempotencyHeader]=e.idempotencyKey),{req:{method:u,...f&&{body:f},headers:this.buildHeaders({options:e,headers:h,contentLength:p}),..._&&{agent:_},signal:null!=(a=e.signal)?a:null},url:m,timeout:g}}buildHeaders({options:e,headers:t,contentLength:r}){const n={};return r&&(n[\"content-length\"]=r),x(n,this.defaultHeaders(e)),x(n,t),(0,l.isMultipartBody)(e.body)&&\"node\"!==s.kind&&delete n[\"content-type\"],this.validateHeaders(n,t),n}async prepareOptions(e){}async prepareRequest(e,{url:t,options:r}){}parseHeaders(e){return e?Symbol.iterator in e?Object.fromEntries(Array.from(e).map((e=>[...e]))):{...e}:{}}makeStatusError(e,t,r,n){return a.APIError.generate(e,t,r,n)}request(e,t=null){return new d(this.makeRequest(e,t))}async makeRequest(t,r){var n,i,o;const s=await t;null==r&&(r=null!=(n=s.maxRetries)?n:this.maxRetries),await this.prepareOptions(s);const{req:l,url:u,timeout:c}=this.buildRequest(s);if(await this.prepareRequest(l,{url:u,options:s}),C(\"request\",u,s,l.headers),null==(i=s.signal)?void 0:i.aborted)throw new a.APIUserAbortError;const d=new AbortController,h=await this.fetchWithTimeout(u,l,c,d).catch(e.castToError);if(h instanceof Error){if(null==(o=s.signal)?void 0:o.aborted)throw new a.APIUserAbortError;if(r)return this.retryRequest(s,r);if(\"AbortError\"===h.name)throw new a.APIConnectionTimeoutError;throw new a.APIConnectionError({cause:h})}const f=(0,e.createResponseHeaders)(h.headers);if(!h.ok){if(r&&this.shouldRetry(h))return C(`response (error; retrying, ${r} attempts remaining)`,h.status,u,f),this.retryRequest(s,r,f);const t=await h.text().catch((t=>(0,e.castToError)(t).message)),n=(0,e.safeJSON)(t),i=n?void 0:t;throw C(`response (error; ${r?\"(error; no more retries left)\":\"(error; not retryable)\"})`,h.status,u,f,i),this.makeStatusError(h.status,n,i,f)}return{response:h,options:s,controller:d}}requestAPIList(e,t){const r=this.makeRequest(t,null);return new f(this,r,e)}buildURL(e,t){const r=A(e)?new URL(e):new URL(this.baseURL+(this.baseURL.endsWith(\"/\")&&e.startsWith(\"/\")?e.slice(1):e)),n=this.defaultQuery();return S(n)||(t={...n,...t}),\"object\"==typeof t&&t&&!Array.isArray(t)&&(r.search=this.stringifyQuery(t)),r.toString()}stringifyQuery(e){return Object.entries(e).filter((([e,t])=>void 0!==t)).map((([e,t])=>{if(\"string\"==typeof t||\"number\"==typeof t||\"boolean\"==typeof t)return`${encodeURIComponent(e)}=${encodeURIComponent(t)}`;if(null===t)return`${encodeURIComponent(e)}=`;throw new a.OpenAIError(`Cannot stringify type ${typeof t}; Expected string, number, boolean, or null. If you need to pass nested query parameters, you can manually encode them, e.g. { query: { 'foo[key1]': value1, 'foo[key2]': value2 } }, and please open a GitHub issue requesting better support for your use case.`)})).join(\"&\")}async fetchWithTimeout(e,t,r,n){const{signal:i,...o}=t||{};i&&i.addEventListener(\"abort\",(()=>n.abort()));const a=setTimeout((()=>n.abort()),r);return this.getRequestClient().fetch.call(void 0,e,{signal:n.signal,...o}).finally((()=>{clearTimeout(a)}))}getRequestClient(){return{fetch:this.fetch}}shouldRetry(e){const t=e.headers.get(\"x-should-retry\");return\"true\"===t||\"false\"!==t&&(408===e.status||409===e.status||429===e.status||e.status>=500)}async retryRequest(t,r,n){var i;let o;const a=null==n?void 0:n[\"retry-after-ms\"];if(a){const e=parseFloat(a);Number.isNaN(e)||(o=e)}const s=null==n?void 0:n[\"retry-after\"];if(s&&!o){const e=parseFloat(s);o=Number.isNaN(e)?Date.parse(s)-Date.now():1e3*e}if(!(o&&0__left_angle_mark_=o&&o__left_angle_mark_6e4)){const e=null!=(i=t.maxRetries)?i:this.maxRetries;o=this.calculateDefaultRetryTimeoutMillis(r,e)}return await(0,e.sleep)(o),this.makeRequest(t,r-1)}calculateDefaultRetryTimeoutMillis(e,t){const r=t-e;return Math.min(.5*Math.pow(2,r),8)*(1-.25*Math.random())*1e3}getUserAgent(){return`${this.constructor.name}/JS ${i.VERSION}`}constructor({baseURL:e,maxRetries:t=2,timeout:r=6e5,httpAgent:n,fetch:i}){this.baseURL=e,this.maxRetries=w(\"maxRetries\",t),this.timeout=w(\"timeout\",r),this.httpAgent=n,this.fetch=null!=i?i:s.fetch}};var h=class{hasNextPage(){return!!this.getPaginatedItems().length&&null!=this.nextPageInfo()}async getNextPage(){const e=this.nextPageInfo();if(!e)throw new a.OpenAIError(\"No next page expected; please check `.hasNextPage()` before calling `.getNextPage()`.\");const r={...this.options};if(\"params\"in e&&\"object\"==typeof r.query)r.query={...r.query,...e.params};else if(\"url\"in e){const t=[...Object.entries(r.query||{}),...e.url.searchParams.entries()];for(const[r,n]of t)e.url.searchParams.set(r,n);r.query=void 0,r.path=e.url.toString()}return await n(this,t,\"f\").requestAPIList(this.constructor,r)}async*iterPages(){let e=this;for(yield e;e.hasNextPage();)e=await e.getNextPage(),yield e}async*[(t=new WeakMap,Symbol.asyncIterator)](){for await(const e of this.iterPages())for(const t of e.getPaginatedItems())yield t}constructor(e,n,i,o){t.set(this,void 0),r(this,t,e,\"f\"),this.options=o,this.response=n,this.body=i}};e.AbstractPage=h;var f=class extends d{async*[Symbol.asyncIterator](){const e=await(this);for await(const t of e)yield t}constructor(e,t,r){super(t,(async t=>new r(e,t.response,await c(t),t.options)))}};e.PagePromise=f,e.createResponseHeaders=e=>new Proxy(Object.fromEntries(e.entries()),{get(e,t){const r=t.toString();return e[r.toLowerCase()]||e[r]}});var p={method:!0,path:!0,query:!0,body:!0,headers:!0,maxRetries:!0,stream:!0,timeout:!0,httpAgent:!0,signal:!0,idempotencyKey:!0,__binaryRequest:!0,__binaryResponse:!0,__streamClass:!0};e.isRequestOptions=e=>\"object\"==typeof e&&null!==e&&!S(e)&&Object.keys(e).every((e=>E(p,e)));var m,g=()=>{var e,t;if(\"undefined\"!=typeof Deno&&null!=Deno.build)return{\"X-Stainless-Lang\":\"js\",\"X-Stainless-Package-Version\":i.VERSION,\"X-Stainless-OS\":b(Deno.build.os),\"X-Stainless-Arch\":_(Deno.build.arch),\"X-Stainless-Runtime\":\"deno\",\"X-Stainless-Runtime-Version\":\"string\"==typeof Deno.version?Deno.version:null!=(t=null==(e=Deno.version)?void 0:e.deno)?t:\"unknown\"};if(\"undefined\"!=typeof EdgeRuntime)return{\"X-Stainless-Lang\":\"js\",\"X-Stainless-Package-Version\":i.VERSION,\"X-Stainless-OS\":\"Unknown\",\"X-Stainless-Arch\":`other:${EdgeRuntime}`,\"X-Stainless-Runtime\":\"edge\",\"X-Stainless-Runtime-Version\":import_browser.default.version};if(\"[object process]\"===Object.prototype.toString.call(void 0!==import_browser.default?import_browser.default:0))return{\"X-Stainless-Lang\":\"js\",\"X-Stainless-Package-Version\":i.VERSION,\"X-Stainless-OS\":b(import_browser.default.platform),\"X-Stainless-Arch\":_(import_browser.default.arch),\"X-Stainless-Runtime\":\"node\",\"X-Stainless-Runtime-Version\":import_browser.default.version};const r=function(){if(\"undefined\"==typeof navigator||!navigator)return null;const e=[{key:\"edge\",pattern:/Edge(?:\\W+(\\d+)\\.(\\d+)(?:\\.(\\d+))?)?/},{key:\"ie\",pattern:/MSIE(?:\\W+(\\d+)\\.(\\d+)(?:\\.(\\d+))?)?/},{key:\"ie\",pattern:/Trident(?:.*rv\\:(\\d+)\\.(\\d+)(?:\\.(\\d+))?)?/},{key:\"chrome\",pattern:/Chrome(?:\\W+(\\d+)\\.(\\d+)(?:\\.(\\d+))?)?/},{key:\"firefox\",pattern:/Firefox(?:\\W+(\\d+)\\.(\\d+)(?:\\.(\\d+))?)?/},{key:\"safari\",pattern:/(?:Version\\W+(\\d+)\\.(\\d+)(?:\\.(\\d+))?)?(?:\\W+Mobile\\S*)?\\W+Safari/}];for(const{key:t,pattern:r}of e){const e=r.exec(navigator.userAgent);if(e)return{browser:t,version:`${e[1]||0}.${e[2]||0}.${e[3]||0}`}}return null}();return r?{\"X-Stainless-Lang\":\"js\",\"X-Stainless-Package-Version\":i.VERSION,\"X-Stainless-OS\":\"Unknown\",\"X-Stainless-Arch\":\"unknown\",\"X-Stainless-Runtime\":`browser:${r.browser}`,\"X-Stainless-Runtime-Version\":r.version}:{\"X-Stainless-Lang\":\"js\",\"X-Stainless-Package-Version\":i.VERSION,\"X-Stainless-OS\":\"Unknown\",\"X-Stainless-Arch\":\"unknown\",\"X-Stainless-Runtime\":\"unknown\",\"X-Stainless-Runtime-Version\":\"unknown\"}},_=e=>\"x32\"===e?\"x32\":\"x86_64\"===e||\"x64\"===e?\"x64\":\"arm\"===e?\"arm\":\"aarch64\"===e||\"arm64\"===e?\"arm64\":e?`other:${e}`:\"unknown\",b=e=>(e=e.toLowerCase()).includes(\"ios\")?\"iOS\":\"android\"===e?\"Android\":\"darwin\"===e?\"MacOS\":\"win32\"===e?\"Windows\":\"freebsd\"===e?\"FreeBSD\":\"openbsd\"===e?\"OpenBSD\":\"linux\"===e?\"Linux\":e?`Other:${e}`:\"Unknown\",y=()=>null!=m?m:m=g();e.safeJSON=e=>{try{return JSON.parse(e)}catch(t){return}};var v=new RegExp(\"^(?:[a-z]+:)?//\",\"i\"),A=e=>v.test(e);e.sleep=e=>new Promise((t=>setTimeout(t,e)));var w=(e,t)=>{if(\"number\"!=typeof t||!Number.isInteger(t))throw new a.OpenAIError(`${e} must be an integer`);if(t__left_angle_mark_0)throw new a.OpenAIError(`${e} must be a positive integer`);return t};function S(e){if(!e)return!0;for(const t in e)return!1;return!0}function E(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function x(e,t){for(const r in t){if(!E(t,r))continue;const n=r.toLowerCase();if(!n)continue;const i=t[r];null===i?delete e[n]:void 0!==i&&(e[n]=i)}}function C(e,...t){var r,n;void 0!==import_browser.default&&\"true\"===(null==(n=null==(r=import_browser.default)?void 0:r.env)?void 0:n.DEBUG)&&import_console_browserify.default.log(`OpenAI:DEBUG:${e}`,...t)}e.castToError=e=>e instanceof Error?e:new Error(e),e.ensurePresent=e=>{if(null==e)throw new a.OpenAIError(`Expected a value to be given but received ${e} instead.`);return e},e.readEnv=e=>{var t,r,n,i,o,a;return void 0!==import_browser.default?null!=(n=null==(r=null==(t=import_browser.default.env)?void 0:t[e])?void 0:r.trim())?n:void 0:\"undefined\"!=typeof Deno?null==(a=null==(o=null==(i=Deno.env)?void 0:i.get)?void 0:o.call(i,e))?void 0:a.trim():void 0},e.coerceInteger=e=>{if(\"number\"==typeof e)return Math.round(e);if(\"string\"==typeof e)return parseInt(e,10);throw new a.OpenAIError(`Could not coerce ${e} (type: ${typeof e}) into a number`)},e.coerceFloat=e=>{if(\"number\"==typeof e)return e;if(\"string\"==typeof e)return parseFloat(e);throw new a.OpenAIError(`Could not coerce ${e} (type: ${typeof e}) into a number`)},e.coerceBoolean=e=>\"boolean\"==typeof e?e:\"string\"==typeof e?\"true\"===e:Boolean(e),e.maybeCoerceInteger=t=>{if(void 0!==t)return(0,e.coerceInteger)(t)},e.maybeCoerceFloat=t=>{if(void 0!==t)return(0,e.coerceFloat)(t)},e.maybeCoerceBoolean=t=>{if(void 0!==t)return(0,e.coerceBoolean)(t)},e.isEmptyObj=S,e.hasOwn=E,e.debug=C;var T=()=>\"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx\".replace(/[xy]/g,(e=>{const t=16*Math.random()|0;return(\"x\"===e?t:3&t|8).toString(16)}));e.isRunningInBrowser=()=>\"undefined\"!=typeof window&&void 0!==window.document&&\"undefined\"!=typeof navigator,e.isHeadersProtocol=e=>\"function\"==typeof(null==e?void 0:e.get),e.getRequiredHeader=(t,r)=>{var n;const i=r.toLowerCase();if((0,e.isHeadersProtocol)(t)){const e=(null==(n=r[0])?void 0:n.toUpperCase())+r.substring(1).replace(/([^\\w])(\\w)/g,((e,t,r)=>t+r.toUpperCase()));for(const n of[r,i,r.toUpperCase(),e]){const e=t.get(n);if(e)return e}}for(const[e,o]of Object.entries(t))if(e.toLowerCase()===i)return Array.isArray(o)?(o.length__left_angle_mark_=1||import_console_browserify.default.warn(`Received ${o.length} entries for the ${r} header, using the first entry.`),o[0]):o;throw new Error(`Could not find ${r} header`)},e.toBase64=e=>{if(!e)return\"\";if(\"undefined\"!=typeof Buffer)return Buffer.from(e).toString(\"base64\");if(\"undefined\"!=typeof btoa)return btoa(e);throw new a.OpenAIError(\"Cannot generate b64 string; Expected `Buffer` or `btoa` to be defined\")},e.isObj=function(e){return null!=e&&\"object\"==typeof e&&!Array.isArray(e)}}}),require_error2=__commonJS({\"../../node_modules/.pnpm/openai@4.57.1_zod@3.23.8/node_modules/openai/error.js\"(e){init_globals(),Object.defineProperty(e,\"__esModule\",{value:!0}),e.ContentFilterFinishReasonError=e.LengthFinishReasonError=e.InternalServerError=e.RateLimitError=e.UnprocessableEntityError=e.ConflictError=e.NotFoundError=e.PermissionDeniedError=e.AuthenticationError=e.BadRequestError=e.APIConnectionTimeoutError=e.APIConnectionError=e.APIUserAbortError=e.APIError=e.OpenAIError=void 0;var t=require_core2(),r=class extends Error{};e.OpenAIError=r;var n=class e extends r{static makeMessage(e,t,r){const n=(null==t?void 0:t.message)?\"string\"==typeof t.message?t.message:JSON.stringify(t.message):t?JSON.stringify(t):r;return e&&n?`${e} ${n}`:e?`${e} status code (no body)`:n||\"(no status code or body)\"}static generate(r,n,f,p){if(!r)return new i({cause:(0,t.castToError)(n)});const m=null==n?void 0:n.error;return 400===r?new o(r,m,f,p):401===r?new a(r,m,f,p):403===r?new s(r,m,f,p):404===r?new l(r,m,f,p):409===r?new u(r,m,f,p):422===r?new c(r,m,f,p):429===r?new d(r,m,f,p):r>=500?new h(r,m,f,p):new e(r,m,f,p)}constructor(t,r,n,i){super(`${e.makeMessage(t,r,n)}`),this.status=t,this.headers=i,this.request_id=null==i?void 0:i[\"x-request-id\"];const o=r;this.error=o,this.code=null==o?void 0:o.code,this.param=null==o?void 0:o.param,this.type=null==o?void 0:o.type}};e.APIError=n,e.APIUserAbortError=class extends n{constructor({message:e}={}){super(void 0,void 0,e||\"Request was aborted.\",void 0),this.status=void 0}};var i=class extends n{constructor({message:e,cause:t}){super(void 0,void 0,e||\"Connection error.\",void 0),this.status=void 0,t&&(this.cause=t)}};e.APIConnectionError=i,e.APIConnectionTimeoutError=class extends i{constructor({message:e}={}){super({message:null!=e?e:\"Request timed out.\"})}};var o=class extends n{constructor(){super(...arguments),this.status=400}};e.BadRequestError=o;var a=class extends n{constructor(){super(...arguments),this.status=401}};e.AuthenticationError=a;var s=class extends n{constructor(){super(...arguments),this.status=403}};e.PermissionDeniedError=s;var l=class extends n{constructor(){super(...arguments),this.status=404}};e.NotFoundError=l;var u=class extends n{constructor(){super(...arguments),this.status=409}};e.ConflictError=u;var c=class extends n{constructor(){super(...arguments),this.status=422}};e.UnprocessableEntityError=c;var d=class extends n{constructor(){super(...arguments),this.status=429}};e.RateLimitError=d;var h=class extends n{};e.InternalServerError=h,e.LengthFinishReasonError=class extends r{constructor(){super(\"Could not parse response content as the length limit was reached\")}},e.ContentFilterFinishReasonError=class extends r{constructor(){super(\"Could not parse response content as the request was rejected by the content filter\")}}}}),require_empty_stub=__commonJS({\"resolve-false:/empty-stub\"(e,t){init_globals(),t.exports={}}}),require_object_inspect=__commonJS({\"../../node_modules/.pnpm/object-inspect@1.13.2/node_modules/object-inspect/index.js\"(e,t){init_globals();var r=\"function\"==typeof Map&&Map.prototype,n=Object.getOwnPropertyDescriptor&&r?Object.getOwnPropertyDescriptor(Map.prototype,\"size\"):null,i=r&&n&&\"function\"==typeof n.get?n.get:null,o=r&&Map.prototype.forEach,a=\"function\"==typeof Set&&Set.prototype,s=Object.getOwnPropertyDescriptor&&a?Object.getOwnPropertyDescriptor(Set.prototype,\"size\"):null,l=a&&s&&\"function\"==typeof s.get?s.get:null,u=a&&Set.prototype.forEach,c=\"function\"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,d=\"function\"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,h=\"function\"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,f=Boolean.prototype.valueOf,p=Object.prototype.toString,m=Function.prototype.toString,g=String.prototype.match,_=String.prototype.slice,b=String.prototype.replace,y=String.prototype.toUpperCase,v=String.prototype.toLowerCase,A=RegExp.prototype.test,w=Array.prototype.concat,S=Array.prototype.join,E=Array.prototype.slice,x=Math.floor,C=\"function\"==typeof BigInt?BigInt.prototype.valueOf:null,T=Object.getOwnPropertySymbols,R=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?Symbol.prototype.toString:null,I=\"function\"==typeof Symbol&&\"object\"==typeof Symbol.iterator,k=\"function\"==typeof Symbol&&Symbol.toStringTag&&(Symbol.toStringTag,1)?Symbol.toStringTag:null,P=Object.prototype.propertyIsEnumerable,M=(\"function\"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function O(e,t){if(e===1/0||e===-1/0||e!=e||e&&e>-1e3&&e__left_angle_mark_1e3||A.call(/e/,t))return t;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(\"number\"==typeof e){var n=e__left_angle_mark_0?-x(-e):x(e);if(n!==e){var i=String(n),o=_.call(t,i.length+1);return b.call(i,r,\"
_\")+\".\"+b.call(b.call(o,/([0-9]{3})/g,\"
_\"),/_$/,\"\")}}return b.call(t,r,\"
_\")}var B=require_empty_stub(),N=B.custom,j=z(N)?N:null;function L(e,t,r){var n=\"double\"===(r.quoteStyle||t)?'\"':\"'\";return n+e+n}function D(e){return b.call(String(e),/\"/g,\""\")}function F(e){return!(\"[object Array]\"!==H(e)||k&&\"object\"==typeof e&&k in e)}function U(e){return!(\"[object RegExp]\"!==H(e)||k&&\"object\"==typeof e&&k in e)}function z(e){if(I)return e&&\"object\"==typeof e&&e instanceof Symbol;if(\"symbol\"==typeof e)return!0;if(!e||\"object\"!=typeof e||!R)return!1;try{return R.call(e),!0}catch(t){}return!1}t.exports=function e(t,r,n,a){var s=r||{};if(G(s,\"quoteStyle\")&&\"single\"!==s.quoteStyle&&\"double\"!==s.quoteStyle)throw new TypeError('option \"quoteStyle\" must be \"single\" or \"double\"');if(G(s,\"maxStringLength\")&&(\"number\"==typeof s.maxStringLength?s.maxStringLength__left_angle_mark_0&&s.maxStringLength!==1/0:null!==s.maxStringLength))throw new TypeError('option \"maxStringLength\", if provided, must be a positive integer, Infinity, or `null`');var p=!G(s,\"customInspect\")||s.customInspect;if(\"boolean\"!=typeof p&&\"symbol\"!==p)throw new TypeError(\"option \\\"customInspect\\\", if provided, must be `true`, `false`, or `'symbol'`\");if(G(s,\"indent\")&&null!==s.indent&&\"\\t\"!==s.indent&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option \"indent\" must be \"\\\\t\", an integer > 0, or `null`');if(G(s,\"numericSeparator\")&&\"boolean\"!=typeof s.numericSeparator)throw new TypeError('option \"numericSeparator\", if provided, must be `true` or `false`');var y=s.numericSeparator;if(void 0===t)return\"undefined\";if(null===t)return\"null\";if(\"boolean\"==typeof t)return t?\"true\":\"false\";if(\"string\"==typeof t)return V(t,s);if(\"number\"==typeof t){if(0===t)return 1/0/t>0?\"0\":\"-0\";var A=String(t);return y?O(t,A):A}if(\"bigint\"==typeof t){var x=String(t)+\"n\";return y?O(t,x):x}var T=void 0===s.depth?5:s.depth;if(void 0===n&&(n=0),n>=T&&T>0&&\"object\"==typeof t)return F(t)?\"[Array]\":\"[Object]\";var N,q=function(e,t){var r;if(\"\\t\"===e.indent)r=\"\\t\";else{if(!(\"number\"==typeof e.indent&&e.indent>0))return null;r=S.call(Array(e.indent+1),\" \")}return{base:r,prev:S.call(Array(t+1),r)}}(s,n);if(void 0===a)a=[];else if(W(a,t)>=0)return\"[Circular]\";function $(t,r,i){if(r&&(a=E.call(a)).push(r),i){var o={depth:s.depth};return G(s,\"quoteStyle\")&&(o.quoteStyle=s.quoteStyle),e(t,o,n+1,a)}return e(t,s,n+1,a)}if(\"function\"==typeof t&&!U(t)){var Z=function(e){if(e.name)return e.name;var t=g.call(m.call(e),/^function\\s*([\\w$]+)/);return t?t[1]:null}(t),ee=Q(t,$);return\"[Function\"+(Z?\": \"+Z:\" (anonymous)\")+\"]\"+(ee.length>0?\" { \"+S.call(ee,\", \")+\" }\":\"\")}if(z(t)){var te=I?b.call(String(t),/^(Symbol\\(.*\\))_[^)]*$/,\"$1\"):R.call(t);return\"object\"!=typeof t||I?te:K(te)}if((N=t)&&\"object\"==typeof N&&(\"undefined\"!=typeof HTMLElement&&N instanceof HTMLElement||\"string\"==typeof N.nodeName&&\"function\"==typeof N.getAttribute)){for(var re=\"__left_angle_mark_\"+v.call(String(t.nodeName)),ne=t.attributes||[],ie=0;ie__left_angle_mark_ne.length;ie++)re+=\" \"+ne[ie].name+\"=\"+L(D(ne[ie].value),\"double\",s);return re+=\">\",t.childNodes&&t.childNodes.length&&(re+=\"...\"),re+=\"__left_angle_mark_/\"+v.call(String(t.nodeName))+\">\"}if(F(t)){if(0===t.length)return\"[]\";var oe=Q(t,$);return q&&!function(e){for(var t=0;t__left_angle_mark_e.length;t++)if(W(e[t],\"\\n\")>=0)return!1;return!0}(oe)?\"[\"+J(oe,q)+\"]\":\"[ \"+S.call(oe,\", \")+\" ]\"}if(function(e){return!(\"[object Error]\"!==H(e)||k&&\"object\"==typeof e&&k in e)}(t)){var ae=Q(t,$);return\"cause\"in Error.prototype||!(\"cause\"in t)||P.call(t,\"cause\")?0===ae.length?\"[\"+String(t)+\"]\":\"{ [\"+String(t)+\"] \"+S.call(ae,\", \")+\" }\":\"{ [\"+String(t)+\"] \"+S.call(w.call(\"[cause]: \"+$(t.cause),ae),\", \")+\" }\"}if(\"object\"==typeof t&&p){if(j&&\"function\"==typeof t[j]&&B)return B(t,{depth:T-n});if(\"symbol\"!==p&&\"function\"==typeof t.inspect)return t.inspect()}if(function(e){if(!i||!e||\"object\"!=typeof e)return!1;try{i.call(e);try{l.call(e)}catch(re){return!0}return e instanceof Map}catch(t){}return!1}(t)){var se=[];return o&&o.call(t,(function(e,r){se.push($(r,t,!0)+\" => \"+$(e,t))})),Y(\"Map\",i.call(t),se,q)}if(function(e){if(!l||!e||\"object\"!=typeof e)return!1;try{l.call(e);try{i.call(e)}catch(t){return!0}return e instanceof Set}catch(r){}return!1}(t)){var le=[];return u&&u.call(t,(function(e){le.push($(e,t))})),Y(\"Set\",l.call(t),le,q)}if(function(e){if(!c||!e||\"object\"!=typeof e)return!1;try{c.call(e,c);try{d.call(e,d)}catch(re){return!0}return e instanceof WeakMap}catch(t){}return!1}(t))return X(\"WeakMap\");if(function(e){if(!d||!e||\"object\"!=typeof e)return!1;try{d.call(e,d);try{c.call(e,c)}catch(re){return!0}return e instanceof WeakSet}catch(t){}return!1}(t))return X(\"WeakSet\");if(function(e){if(!h||!e||\"object\"!=typeof e)return!1;try{return h.call(e),!0}catch(t){}return!1}(t))return X(\"WeakRef\");if(function(e){return!(\"[object Number]\"!==H(e)||k&&\"object\"==typeof e&&k in e)}(t))return K($(Number(t)));if(function(e){if(!e||\"object\"!=typeof e||!C)return!1;try{return C.call(e),!0}catch(t){}return!1}(t))return K($(C.call(t)));if(function(e){return!(\"[object Boolean]\"!==H(e)||k&&\"object\"==typeof e&&k in e)}(t))return K(f.call(t));if(function(e){return!(\"[object String]\"!==H(e)||k&&\"object\"==typeof e&&k in e)}(t))return K($(String(t)));if(\"undefined\"!=typeof window&&t===window)return\"{ [object Window] }\";if(\"undefined\"!=typeof globalThis&&t===globalThis||\"globalThis\"===t)return\"{ [object globalThis] }\";if(!function(e){return!(\"[object Date]\"!==H(e)||k&&\"object\"==typeof e&&k in e)}(t)&&!U(t)){var ue=Q(t,$),ce=M?M(t)===Object.prototype:t instanceof Object||t.constructor===Object,de=t instanceof Object?\"\":\"null prototype\",he=!ce&&k&&Object(t)===t&&k in t?_.call(H(t),8,-1):de?\"Object\":\"\",fe=(ce||\"function\"!=typeof t.constructor?\"\":t.constructor.name?t.constructor.name+\" \":\"\")+(he||de?\"[\"+S.call(w.call([],he||[],de||[]),\": \")+\"] \":\"\");return 0===ue.length?fe+\"{}\":q?fe+\"{\"+J(ue,q)+\"}\":fe+\"{ \"+S.call(ue,\", \")+\" }\"}return String(t)};var q=Object.prototype.hasOwnProperty||function(e){return e in this};function G(e,t){return q.call(e,t)}function H(e){return p.call(e)}function W(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0,n=e.length;r__left_angle_mark_n;r++)if(e[r]===t)return r;return-1}function V(e,t){if(e.length>t.maxStringLength){var r=e.length-t.maxStringLength,n=\"... \"+r+\" more character\"+(r>1?\"s\":\"\");return V(_.call(e,0,t.maxStringLength),t)+n}return L(b.call(b.call(e,/(['\\\\])/g,\"\\\\$1\"),/[\\x00-\\x1f]/g,$),\"single\",t)}function $(e){var t=e.charCodeAt(0),r={8:\"b\",9:\"t\",10:\"n\",12:\"f\",13:\"r\"}[t];return r?\"\\\\\"+r:\"\\\\x\"+(t__left_angle_mark_16?\"0\":\"\")+y.call(t.toString(16))}function K(e){return\"Object(\"+e+\")\"}function X(e){return e+\" { ? }\"}function Y(e,t,r,n){return e+\" (\"+t+\") {\"+(n?J(r,n):S.call(r,\", \"))+\"}\"}function J(e,t){if(0===e.length)return\"\";var r=\"\\n\"+t.prev+t.base;return r+S.call(e,\",\"+r)+\"\\n\"+t.prev}function Q(e,t){var r=F(e),n=[];if(r){n.length=e.length;for(var i=0;i__left_angle_mark_e.length;i++)n[i]=G(e,i)?t(e[i],e):\"\"}var o,a=\"function\"==typeof T?T(e):[];if(I){o={};for(var s=0;s__left_angle_mark_a.length;s++)o[\"$\"+a[s]]=a[s]}for(var l in e)G(e,l)&&(r&&String(Number(l))===l&&l__left_angle_mark_e.length||I&&o[\"$\"+l]instanceof Symbol||(A.call(/[^\\w$]/,l)?n.push(t(l,e)+\": \"+t(e[l],e)):n.push(l+\": \"+t(e[l],e))));if(\"function\"==typeof T)for(var u=0;u__left_angle_mark_a.length;u++)P.call(e,a[u])&&n.push(\"[\"+t(a[u])+\"]: \"+t(e[a[u]],e));return n}}}),require_side_channel=__commonJS({\"../../node_modules/.pnpm/side-channel@1.0.6/node_modules/side-channel/index.js\"(e,t){init_globals();var r=require_get_intrinsic(),n=require_callBound(),i=require_object_inspect(),o=require_type(),a=r(\"%WeakMap%\",!0),s=r(\"%Map%\",!0),l=n(\"WeakMap.prototype.get\",!0),u=n(\"WeakMap.prototype.set\",!0),c=n(\"WeakMap.prototype.has\",!0),d=n(\"Map.prototype.get\",!0),h=n(\"Map.prototype.set\",!0),f=n(\"Map.prototype.has\",!0),p=function(e,t){for(var r,n=e;null!==(r=n.next);n=r)if(r.key===t)return n.next=r.next,r.next=e.next,e.next=r,r};t.exports=function(){var e,t,r,n={assert:function(e){if(!n.has(e))throw new o(\"Side channel does not contain \"+i(e))},get:function(n){if(a&&n&&(\"object\"==typeof n||\"function\"==typeof n)){if(e)return l(e,n)}else if(s){if(t)return d(t,n)}else if(r)return function(e,t){var r=p(e,t);return r&&r.value}(r,n)},has:function(n){if(a&&n&&(\"object\"==typeof n||\"function\"==typeof n)){if(e)return c(e,n)}else if(s){if(t)return f(t,n)}else if(r)return function(e,t){return!!p(e,t)}(r,n);return!1},set:function(n,i){a&&n&&(\"object\"==typeof n||\"function\"==typeof n)?(e||(e=new a),u(e,n,i)):s?(t||(t=new s),h(t,n,i)):(r||(r={key:{},next:null}),function(e,t,r){var n=p(e,t);n?n.value=r:e.next={key:t,next:e.next,value:r}}(r,n,i))}};return n}}}),require_formats=__commonJS({\"../../node_modules/.pnpm/qs@6.13.0/node_modules/qs/lib/formats.js\"(e,t){init_globals();var r=String.prototype.replace,n=/%20/g,i=\"RFC1738\",o=\"RFC3986\";t.exports={\"default\":o,formatters:{RFC1738:function(e){return r.call(e,n,\"+\")},RFC3986:function(e){return String(e)}},RFC1738:i,RFC3986:o}}}),require_utils6=__commonJS({\"../../node_modules/.pnpm/qs@6.13.0/node_modules/qs/lib/utils.js\"(e,t){init_globals();var r=require_formats(),n=Object.prototype.hasOwnProperty,i=Array.isArray,o=function(){for(var e=[],t=0;t__left_angle_mark_256;++t)e.push(\"%\"+((t__left_angle_mark_16?\"0\":\"\")+t.toString(16)).toUpperCase());return e}(),a=function(e,t){for(var r=t&&t.plainObjects?Object.create(null):{},n=0;n__left_angle_mark_e.length;++n)void 0!==e[n]&&(r[n]=e[n]);return r},s=1024;t.exports={arrayToObject:a,assign:function(e,t){return Object.keys(t).reduce((function(e,r){return e[r]=t[r],e}),e)},combine:function(e,t){return[].concat(e,t)},compact:function(e){for(var t=[{obj:{o:e},prop:\"o\"}],r=[],n=0;n__left_angle_mark_t.length;++n)for(var o=t[n],a=o.obj[o.prop],s=Object.keys(a),l=0;l__left_angle_mark_s.length;++l){var u=s[l],c=a[u];\"object\"==typeof c&&null!==c&&-1===r.indexOf(c)&&(t.push({obj:a,prop:u}),r.push(c))}return function(e){for(;e.length>1;){var t=e.pop(),r=t.obj[t.prop];if(i(r)){for(var n=[],o=0;o__left_angle_mark_r.length;++o)void 0!==r[o]&&n.push(r[o]);t.obj[t.prop]=n}}}(t),e},decode:function(e,t,r){var n=e.replace(/\\+/g,\" \");if(\"iso-8859-1\"===r)return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch(i){return n}},encode:function(e,t,n,i,a){if(0===e.length)return e;var l=e;if(\"symbol\"==typeof e?l=Symbol.prototype.toString.call(e):\"string\"!=typeof e&&(l=String(e)),\"iso-8859-1\"===n)return escape(l).replace(/%u[0-9a-f]{4}/gi,(function(e){return\"%26%23\"+parseInt(e.slice(2),16)+\"%3B\"}));for(var u=\"\",c=0;c__left_angle_mark_l.length;c+=s){for(var d=l.length>=s?l.slice(c,c+s):l,h=[],f=0;f__left_angle_mark_d.length;++f){var p=d.charCodeAt(f);45===p||46===p||95===p||126===p||p>=48&&p__left_angle_mark_=57||p>=65&&p__left_angle_mark_=90||p>=97&&p__left_angle_mark_=122||a===r.RFC1738&&(40===p||41===p)?h[h.length]=d.charAt(f):p__left_angle_mark_128?h[h.length]=o[p]:p__left_angle_mark_2048?h[h.length]=o[192|p>>6]+o[128|63&p]:p__left_angle_mark_55296||p>=57344?h[h.length]=o[224|p>>12]+o[128|p>>6&63]+o[128|63&p]:(f+=1,p=65536+((1023&p)__left_angle_mark___left_angle_mark_10|1023&d.charCodeAt(f)),h[h.length]=o[240|p>>18]+o[128|p>>12&63]+o[128|p>>6&63]+o[128|63&p])}u+=h.join(\"\")}return u},isBuffer:function(e){return!(!e||\"object\"!=typeof e||!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e)))},isRegExp:function(e){return\"[object RegExp]\"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(i(e)){for(var r=[],n=0;n__left_angle_mark_e.length;n+=1)r.push(t(e[n]));return r}return t(e)},merge:function e(t,r,o){if(!r)return t;if(\"object\"!=typeof r){if(i(t))t.push(r);else{if(!t||\"object\"!=typeof t)return[t,r];(o&&(o.plainObjects||o.allowPrototypes)||!n.call(Object.prototype,r))&&(t[r]=!0)}return t}if(!t||\"object\"!=typeof t)return[t].concat(r);var s=t;return i(t)&&!i(r)&&(s=a(t,o)),i(t)&&i(r)?(r.forEach((function(r,i){if(n.call(t,i)){var a=t[i];a&&\"object\"==typeof a&&r&&\"object\"==typeof r?t[i]=e(a,r,o):t.push(r)}else t[i]=r})),t):Object.keys(r).reduce((function(t,i){var a=r[i];return n.call(t,i)?t[i]=e(t[i],a,o):t[i]=a,t}),s)}}}}),require_stringify=__commonJS({\"../../node_modules/.pnpm/qs@6.13.0/node_modules/qs/lib/stringify.js\"(e,t){init_globals();var r=require_side_channel(),n=require_utils6(),i=require_formats(),o=Object.prototype.hasOwnProperty,a={brackets:function(e){return e+\"[]\"},comma:\"comma\",indices:function(e,t){return e+\"[\"+t+\"]\"},repeat:function(e){return e}},s=Array.isArray,l=Array.prototype.push,u=function(e,t){l.apply(e,s(t)?t:[t])},c=Date.prototype.toISOString,d=i.default,h={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:\"indices\",charset:\"utf-8\",charsetSentinel:!1,delimiter:\"&\",encode:!0,encodeDotInKeys:!1,encoder:n.encode,encodeValuesOnly:!1,format:d,formatter:i.formatters[d],indices:!1,serializeDate:function(e){return c.call(e)},skipNulls:!1,strictNullHandling:!1},f={},p=function e(t,i,o,a,l,c,d,p,m,g,_,b,y,v,A,w,S,E){for(var x,C=t,T=E,R=0,I=!1;void 0!==(T=T.get(f))&&!I;){var k=T.get(t);if(R+=1,void 0!==k){if(k===R)throw new RangeError(\"Cyclic object value\");I=!0}void 0===T.get(f)&&(R=0)}if(\"function\"==typeof g?C=g(i,C):C instanceof Date?C=y(C):\"comma\"===o&&s(C)&&(C=n.maybeMap(C,(function(e){return e instanceof Date?y(e):e}))),null===C){if(c)return m&&!w?m(i,h.encoder,S,\"key\",v):i;C=\"\"}if(\"string\"==typeof(x=C)||\"number\"==typeof x||\"boolean\"==typeof x||\"symbol\"==typeof x||\"bigint\"==typeof x||n.isBuffer(C))return m?[A(w?i:m(i,h.encoder,S,\"key\",v))+\"=\"+A(m(C,h.encoder,S,\"value\",v))]:[A(i)+\"=\"+A(String(C))];var P,M=[];if(void 0===C)return M;if(\"comma\"===o&&s(C))w&&m&&(C=n.maybeMap(C,m)),P=[{value:C.length>0?C.join(\",\")||null:void 0}];else if(s(g))P=g;else{var O=Object.keys(C);P=_?O.sort(_):O}var B=p?i.replace(/\\./g,\"%2E\"):i,N=a&&s(C)&&1===C.length?B+\"[]\":B;if(l&&s(C)&&0===C.length)return N+\"[]\";for(var j=0;j__left_angle_mark_P.length;++j){var L=P[j],D=\"object\"==typeof L&&void 0!==L.value?L.value:C[L];if(!d||null!==D){var F=b&&p?L.replace(/\\./g,\"%2E\"):L,U=s(C)?\"function\"==typeof o?o(N,F):N:N+(b?\".\"+F:\"[\"+F+\"]\");E.set(t,R);var z=r();z.set(f,E),u(M,e(D,U,o,a,l,c,d,p,\"comma\"===o&&w&&s(C)?null:m,g,_,b,y,v,A,w,S,z))}}return M};t.exports=function(e,t){var n,l=e,c=function(e){if(!e)return h;if(void 0!==e.allowEmptyArrays&&\"boolean\"!=typeof e.allowEmptyArrays)throw new TypeError(\"`allowEmptyArrays` option can only be `true` or `false`, when provided\");if(void 0!==e.encodeDotInKeys&&\"boolean\"!=typeof e.encodeDotInKeys)throw new TypeError(\"`encodeDotInKeys` option can only be `true` or `false`, when provided\");if(null!==e.encoder&&void 0!==e.encoder&&\"function\"!=typeof e.encoder)throw new TypeError(\"Encoder has to be a function.\");var t=e.charset||h.charset;if(void 0!==e.charset&&\"utf-8\"!==e.charset&&\"iso-8859-1\"!==e.charset)throw new TypeError(\"The charset option must be either utf-8, iso-8859-1, or undefined\");var r=i.default;if(void 0!==e.format){if(!o.call(i.formatters,e.format))throw new TypeError(\"Unknown format option provided.\");r=e.format}var n,l=i.formatters[r],u=h.filter;if((\"function\"==typeof e.filter||s(e.filter))&&(u=e.filter),n=e.arrayFormat in a?e.arrayFormat:\"indices\"in e?e.indices?\"indices\":\"repeat\":h.arrayFormat,\"commaRoundTrip\"in e&&\"boolean\"!=typeof e.commaRoundTrip)throw new TypeError(\"`commaRoundTrip` must be a boolean, or absent\");var c=void 0===e.allowDots?!0===e.encodeDotInKeys||h.allowDots:!!e.allowDots;return{addQueryPrefix:\"boolean\"==typeof e.addQueryPrefix?e.addQueryPrefix:h.addQueryPrefix,allowDots:c,allowEmptyArrays:\"boolean\"==typeof e.allowEmptyArrays?!!e.allowEmptyArrays:h.allowEmptyArrays,arrayFormat:n,charset:t,charsetSentinel:\"boolean\"==typeof e.charsetSentinel?e.charsetSentinel:h.charsetSentinel,commaRoundTrip:e.commaRoundTrip,delimiter:void 0===e.delimiter?h.delimiter:e.delimiter,encode:\"boolean\"==typeof e.encode?e.encode:h.encode,encodeDotInKeys:\"boolean\"==typeof e.encodeDotInKeys?e.encodeDotInKeys:h.encodeDotInKeys,encoder:\"function\"==typeof e.encoder?e.encoder:h.encoder,encodeValuesOnly:\"boolean\"==typeof e.encodeValuesOnly?e.encodeValuesOnly:h.encodeValuesOnly,filter:u,format:r,formatter:l,serializeDate:\"function\"==typeof e.serializeDate?e.serializeDate:h.serializeDate,skipNulls:\"boolean\"==typeof e.skipNulls?e.skipNulls:h.skipNulls,sort:\"function\"==typeof e.sort?e.sort:null,strictNullHandling:\"boolean\"==typeof e.strictNullHandling?e.strictNullHandling:h.strictNullHandling}}(t);\"function\"==typeof c.filter?l=(0,c.filter)(\"\",l):s(c.filter)&&(n=c.filter);var d=[];if(\"object\"!=typeof l||null===l)return\"\";var f=a[c.arrayFormat],m=\"comma\"===f&&c.commaRoundTrip;n||(n=Object.keys(l)),c.sort&&n.sort(c.sort);for(var g=r(),_=0;___left_angle_mark_n.length;++_){var b=n[_];c.skipNulls&&null===l[b]||u(d,p(l[b],b,f,m,c.allowEmptyArrays,c.strictNullHandling,c.skipNulls,c.encodeDotInKeys,c.encode?c.encoder:null,c.filter,c.sort,c.allowDots,c.serializeDate,c.format,c.formatter,c.encodeValuesOnly,c.charset,g))}var y=d.join(c.delimiter),v=!0===c.addQueryPrefix?\"?\":\"\";return c.charsetSentinel&&(\"iso-8859-1\"===c.charset?v+=\"utf8=%26%2310003%3B&\":v+=\"utf8=%E2%9C%93&\"),y.length>0?v+y:\"\"}}}),require_parse=__commonJS({\"../../node_modules/.pnpm/qs@6.13.0/node_modules/qs/lib/parse.js\"(e,t){init_globals();var r=require_utils6(),n=Object.prototype.hasOwnProperty,i=Array.isArray,o={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:\"utf-8\",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:r.decode,delimiter:\"&\",depth:5,duplicates:\"combine\",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1},a=function(e){return e.replace(/&#(\\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},s=function(e,t){return e&&\"string\"==typeof e&&t.comma&&e.indexOf(\",\")>-1?e.split(\",\"):e},l=function(e,t,r,i){if(e){var o=r.allowDots?e.replace(/\\.([^.[]+)/g,\"[$1]\"):e,a=/(\\[[^[\\]]*])/g,l=r.depth>0&&/(\\[[^[\\]]*])/.exec(o),u=l?o.slice(0,l.index):o,c=[];if(u){if(!r.plainObjects&&n.call(Object.prototype,u)&&!r.allowPrototypes)return;c.push(u)}for(var d=0;r.depth>0&&null!==(l=a.exec(o))&&d__left_angle_mark_r.depth;){if(d+=1,!r.plainObjects&&n.call(Object.prototype,l[1].slice(1,-1))&&!r.allowPrototypes)return;c.push(l[1])}if(l){if(!0===r.strictDepth)throw new RangeError(\"Input depth exceeded depth option of \"+r.depth+\" and strictDepth is true\");c.push(\"[\"+o.slice(l.index)+\"]\")}return function(e,t,r,n){for(var i=n?t:s(t,r),o=e.length-1;o>=0;--o){var a,l=e[o];if(\"[]\"===l&&r.parseArrays)a=r.allowEmptyArrays&&(\"\"===i||r.strictNullHandling&&null===i)?[]:[].concat(i);else{a=r.plainObjects?Object.create(null):{};var u=\"[\"===l.charAt(0)&&\"]\"===l.charAt(l.length-1)?l.slice(1,-1):l,c=r.decodeDotInKeys?u.replace(/%2E/g,\".\"):u,d=parseInt(c,10);r.parseArrays||\"\"!==c?!isNaN(d)&&l!==c&&String(d)===c&&d>=0&&r.parseArrays&&d__left_angle_mark_=r.arrayLimit?(a=[])[d]=i:\"__proto__\"!==c&&(a[c]=i):a={0:i}}i=a}return i}(c,t,r,i)}};t.exports=function(e,t){var u=function(e){if(!e)return o;if(void 0!==e.allowEmptyArrays&&\"boolean\"!=typeof e.allowEmptyArrays)throw new TypeError(\"`allowEmptyArrays` option can only be `true` or `false`, when provided\");if(void 0!==e.decodeDotInKeys&&\"boolean\"!=typeof e.decodeDotInKeys)throw new TypeError(\"`decodeDotInKeys` option can only be `true` or `false`, when provided\");if(null!==e.decoder&&void 0!==e.decoder&&\"function\"!=typeof e.decoder)throw new TypeError(\"Decoder has to be a function.\");if(void 0!==e.charset&&\"utf-8\"!==e.charset&&\"iso-8859-1\"!==e.charset)throw new TypeError(\"The charset option must be either utf-8, iso-8859-1, or undefined\");var t=void 0===e.charset?o.charset:e.charset,n=void 0===e.duplicates?o.duplicates:e.duplicates;if(\"combine\"!==n&&\"first\"!==n&&\"last\"!==n)throw new TypeError(\"The duplicates option must be either combine, first, or last\");return{allowDots:void 0===e.allowDots?!0===e.decodeDotInKeys||o.allowDots:!!e.allowDots,allowEmptyArrays:\"boolean\"==typeof e.allowEmptyArrays?!!e.allowEmptyArrays:o.allowEmptyArrays,allowPrototypes:\"boolean\"==typeof e.allowPrototypes?e.allowPrototypes:o.allowPrototypes,allowSparse:\"boolean\"==typeof e.allowSparse?e.allowSparse:o.allowSparse,arrayLimit:\"number\"==typeof e.arrayLimit?e.arrayLimit:o.arrayLimit,charset:t,charsetSentinel:\"boolean\"==typeof e.charsetSentinel?e.charsetSentinel:o.charsetSentinel,comma:\"boolean\"==typeof e.comma?e.comma:o.comma,decodeDotInKeys:\"boolean\"==typeof e.decodeDotInKeys?e.decodeDotInKeys:o.decodeDotInKeys,decoder:\"function\"==typeof e.decoder?e.decoder:o.decoder,delimiter:\"string\"==typeof e.delimiter||r.isRegExp(e.delimiter)?e.delimiter:o.delimiter,depth:\"number\"==typeof e.depth||!1===e.depth?+e.depth:o.depth,duplicates:n,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:\"boolean\"==typeof e.interpretNumericEntities?e.interpretNumericEntities:o.interpretNumericEntities,parameterLimit:\"number\"==typeof e.parameterLimit?e.parameterLimit:o.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:\"boolean\"==typeof e.plainObjects?e.plainObjects:o.plainObjects,strictDepth:\"boolean\"==typeof e.strictDepth?!!e.strictDepth:o.strictDepth,strictNullHandling:\"boolean\"==typeof e.strictNullHandling?e.strictNullHandling:o.strictNullHandling}}(t);if(\"\"===e||null==e)return u.plainObjects?Object.create(null):{};for(var c=\"string\"==typeof e?function(e,t){var l={__proto__:null},u=t.ignoreQueryPrefix?e.replace(/^\\?/,\"\"):e;u=u.replace(/%5B/gi,\"[\").replace(/%5D/gi,\"]\");var c,d=t.parameterLimit===1/0?void 0:t.parameterLimit,h=u.split(t.delimiter,d),f=-1,p=t.charset;if(t.charsetSentinel)for(c=0;c__left_angle_mark_h.length;++c)0===h[c].indexOf(\"utf8=\")&&(\"utf8=%E2%9C%93\"===h[c]?p=\"utf-8\":\"utf8=%26%2310003%3B\"===h[c]&&(p=\"iso-8859-1\"),f=c,c=h.length);for(c=0;c__left_angle_mark_h.length;++c)if(c!==f){var m,g,_=h[c],b=_.indexOf(\"]=\"),y=-1===b?_.indexOf(\"=\"):b+1;-1===y?(m=t.decoder(_,o.decoder,p,\"key\"),g=t.strictNullHandling?null:\"\"):(m=t.decoder(_.slice(0,y),o.decoder,p,\"key\"),g=r.maybeMap(s(_.slice(y+1),t),(function(e){return t.decoder(e,o.decoder,p,\"value\")}))),g&&t.interpretNumericEntities&&\"iso-8859-1\"===p&&(g=a(g)),_.indexOf(\"[]=\")>-1&&(g=i(g)?[g]:g);var v=n.call(l,m);v&&\"combine\"===t.duplicates?l[m]=r.combine(l[m],g):v&&\"last\"!==t.duplicates||(l[m]=g)}return l}(e,u):e,d=u.plainObjects?Object.create(null):{},h=Object.keys(c),f=0;f__left_angle_mark_h.length;++f){var p=h[f],m=l(p,c[p],u,\"string\"==typeof e);d=r.merge(d,m,u)}return!0===u.allowSparse?d:r.compact(d)}}}),require_lib2=__commonJS({\"../../node_modules/.pnpm/qs@6.13.0/node_modules/qs/lib/index.js\"(e,t){init_globals();var r=require_stringify(),n=require_parse(),i=require_formats();t.exports={formats:i,parse:n,stringify:r}}}),require_pagination2=__commonJS({\"../../node_modules/.pnpm/openai@4.57.1_zod@3.23.8/node_modules/openai/pagination.js\"(e){init_globals(),Object.defineProperty(e,\"__esModule\",{value:!0}),e.CursorPage=e.Page=void 0;var t=require_core2(),r=class extends t.AbstractPage{getPaginatedItems(){var e;return null!=(e=this.data)?e:[]}nextPageParams(){return null}nextPageInfo(){return null}constructor(e,t,r,n){super(e,t,r,n),this.data=r.data||[],this.object=r.object}};e.Page=r;var n=class extends t.AbstractPage{getPaginatedItems(){var e;return null!=(e=this.data)?e:[]}nextPageParams(){const e=this.nextPageInfo();if(!e)return null;if(\"params\"in e)return e.params;const t=Object.fromEntries(e.url.searchParams);return Object.keys(t).length?t:null}nextPageInfo(){var e;const t=this.getPaginatedItems();if(!t.length)return null;const r=null==(e=t[t.length-1])?void 0:e.id;return r?{params:{after:r}}:null}constructor(e,t,r,n){super(e,t,r,n),this.data=r.data||[]}};e.CursorPage=n}}),require_resource2=__commonJS({\"../../node_modules/.pnpm/openai@4.57.1_zod@3.23.8/node_modules/openai/resource.js\"(e){init_globals(),Object.defineProperty(e,\"__esModule\",{value:!0}),e.APIResource=void 0,e.APIResource=class{constructor(e){this._client=e}}}}),require_completions2=__commonJS({\"../../node_modules/.pnpm/openai@4.57.1_zod@3.23.8/node_modules/openai/resources/chat/completions.js\"(e){init_globals(),Object.defineProperty(e,\"__esModule\",{value:!0}),e.Completions=void 0;var t=require_resource2(),r=class extends t.APIResource{create(e,t){var r;return this._client.post(\"/chat/completions\",{body:e,...t,stream:null!=(r=e.stream)&&r})}};e.Completions=r,r=e.Completions||(e.Completions={})}}),require_chat=__commonJS({\"../../node_modules/.pnpm/openai@4.57.1_zod@3.23.8/node_modules/openai/resources/chat/chat.js\"(e){init_globals();var t=e&&e.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!(\"get\"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=e&&e.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,\"default\",{enumerable:!0,value:t})}:function(e,t){e.default=t}),n=e&&e.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(null!=e)for(var i in e)\"default\"!==i&&Object.prototype.hasOwnProperty.call(e,i)&&t(n,e,i);return r(n,e),n};Object.defineProperty(e,\"__esModule\",{value:!0}),e.Chat=void 0;var i=require_resource2(),o=n(require_completions2()),a=class extends i.APIResource{constructor(){super(...arguments),this.completions=new o.Completions(this._client)}};e.Chat=a,(a=e.Chat||(e.Chat={})).Completions=o.Completions}}),require_chat2=__commonJS({\"../../node_modules/.pnpm/openai@4.57.1_zod@3.23.8/node_modules/openai/resources/chat/index.js\"(e){init_globals(),Object.defineProperty(e,\"__esModule\",{value:!0}),e.Chat=e.Completions=void 0;var t=require_completions2();Object.defineProperty(e,\"Completions\",{enumerable:!0,get:function(){return t.Completions}});var r=require_chat();Object.defineProperty(e,\"Chat\",{enumerable:!0,get:function(){return r.Chat}})}}),require_shared2=__commonJS({\"../../node_modules/.pnpm/openai@4.57.1_zod@3.23.8/node_modules/openai/resources/shared.js\"(e){init_globals(),Object.defineProperty(e,\"__esModule\",{value:!0})}}),require_speech=__commonJS({\"../../node_modules/.pnpm/openai@4.57.1_zod@3.23.8/node_modules/openai/resources/audio/speech.js\"(e){init_globals(),Object.defineProperty(e,\"__esModule\",{value:!0}),e.Speech=void 0;var t=require_resource2(),r=class extends t.APIResource{create(e,t){return this._client.post(\"/audio/speech\",{body:e,...t,__binaryResponse:!0})}};e.Speech=r,r=e.Speech||(e.Speech={})}}),require_transcriptions=__commonJS({\"../../node_modules/.pnpm/openai@4.57.1_zod@3.23.8/node_modules/openai/resources/audio/transcriptions.js\"(e){init_globals();var t=e&&e.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!(\"get\"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=e&&e.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,\"default\",{enumerable:!0,value:t})}:function(e,t){e.default=t}),n=e&&e.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(null!=e)for(var i in e)\"default\"!==i&&Object.prototype.hasOwnProperty.call(e,i)&&t(n,e,i);return r(n,e),n};Object.defineProperty(e,\"__esModule\",{value:!0}),e.Transcriptions=void 0;var i=require_resource2(),o=n(require_core2()),a=class extends i.APIResource{create(e,t){return this._client.post(\"/audio/transcriptions\",o.multipartFormRequestOptions({body:e,...t}))}};e.Transcriptions=a,a=e.Transcriptions||(e.Transcriptions={})}}),require_translations=__commonJS({\"../../node_modules/.pnpm/openai@4.57.1_zod@3.23.8/node_modules/openai/resources/audio/translations.js\"(e){init_globals();var t=e&&e.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!(\"get\"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=e&&e.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,\"default\",{enumerable:!0,value:t})}:function(e,t){e.default=t}),n=e&&e.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(null!=e)for(var i in e)\"default\"!==i&&Object.prototype.hasOwnProperty.call(e,i)&&t(n,e,i);return r(n,e),n};Object.defineProperty(e,\"__esModule\",{value:!0}),e.Translations=void 0;var i=require_resource2(),o=n(require_core2()),a=class extends i.APIResource{create(e,t){return this._client.post(\"/audio/translations\",o.multipartFormRequestOptions({body:e,...t}))}};e.Translations=a,a=e.Translations||(e.Translations={})}}),require_audio=__commonJS({\"../../node_modules/.pnpm/openai@4.57.1_zod@3.23.8/node_modules/openai/resources/audio/audio.js\"(e){init_globals();var t=e&&e.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!(\"get\"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=e&&e.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,\"default\",{enumerable:!0,value:t})}:function(e,t){e.default=t}),n=e&&e.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(null!=e)for(var i in e)\"default\"!==i&&Object.prototype.hasOwnProperty.call(e,i)&&t(n,e,i);return r(n,e),n};Object.defineProperty(e,\"__esModule\",{value:!0}),e.Audio=void 0;var i,o=require_resource2(),a=n(require_speech()),s=n(require_transcriptions()),l=n(require_translations()),u=class extends o.APIResource{constructor(){super(...arguments),this.transcriptions=new s.Transcriptions(this._client),this.translations=new l.Translations(this._client),this.speech=new a.Speech(this._client)}};e.Audio=u,(i=u=e.Audio||(e.Audio={})).Transcriptions=s.Transcriptions,i.Translations=l.Translations,i.Speech=a.Speech}}),require_batches3=__commonJS({\"../../node_modules/.pnpm/openai@4.57.1_zod@3.23.8/node_modules/openai/resources/batches.js\"(e){init_globals();var t=e&&e.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!(\"get\"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=e&&e.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,\"default\",{enumerable:!0,value:t})}:function(e,t){e.default=t}),n=e&&e.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(null!=e)for(var i in e)\"default\"!==i&&Object.prototype.hasOwnProperty.call(e,i)&&t(n,e,i);return r(n,e),n};Object.defineProperty(e,\"__esModule\",{value:!0}),e.BatchesPage=e.Batches=void 0;var i=require_resource2(),o=require_core2(),a=n(require_batches3()),s=require_pagination2(),l=class extends i.APIResource{create(e,t){return this._client.post(\"/batches\",{body:e,...t})}retrieve(e,t){return this._client.get(`/batches/${e}`,t)}list(e={},t){return(0,o.isRequestOptions)(e)?this.list({},e):this._client.getAPIList(\"/batches\",u,{query:e,...t})}cancel(e,t){return this._client.post(`/batches/${e}/cancel`,t)}};e.Batches=l;var u=class extends s.CursorPage{};e.BatchesPage=u,(l=e.Batches||(e.Batches={})).BatchesPage=a.BatchesPage}}),require_assistants=__commonJS({\"../../node_modules/.pnpm/openai@4.57.1_zod@3.23.8/node_modules/openai/resources/beta/assistants.js\"(e){init_globals();var t=e&&e.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!(\"get\"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=e&&e.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,\"default\",{enumerable:!0,value:t})}:function(e,t){e.default=t}),n=e&&e.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(null!=e)for(var i in e)\"default\"!==i&&Object.prototype.hasOwnProperty.call(e,i)&&t(n,e,i);return r(n,e),n};Object.defineProperty(e,\"__esModule\",{value:!0}),e.AssistantsPage=e.Assistants=void 0;var i=require_resource2(),o=require_core2(),a=n(require_assistants()),s=require_pagination2(),l=class extends i.APIResource{create(e,t){return this._client.post(\"/assistants\",{body:e,...t,headers:{\"OpenAI-Beta\":\"assistants=v2\",...null==t?void 0:t.headers}})}retrieve(e,t){return this._client.get(`/assistants/${e}`,{...t,headers:{\"OpenAI-Beta\":\"assistants=v2\",...null==t?void 0:t.headers}})}update(e,t,r){return this._client.post(`/assistants/${e}`,{body:t,...r,headers:{\"OpenAI-Beta\":\"assistants=v2\",...null==r?void 0:r.headers}})}list(e={},t){return(0,o.isRequestOptions)(e)?this.list({},e):this._client.getAPIList(\"/assistants\",u,{query:e,...t,headers:{\"OpenAI-Beta\":\"assistants=v2\",...null==t?void 0:t.headers}})}del(e,t){return this._client.delete(`/assistants/${e}`,{...t,headers:{\"OpenAI-Beta\":\"assistants=v2\",...null==t?void 0:t.headers}})}};e.Assistants=l;var u=class extends s.CursorPage{};e.AssistantsPage=u,(l=e.Assistants||(e.Assistants={})).AssistantsPage=a.AssistantsPage}}),require_RunnableFunction=__commonJS({\"../../node_modules/.pnpm/openai@4.57.1_zod@3.23.8/node_modules/openai/lib/RunnableFunction.js\"(e){init_globals(),Object.defineProperty(e,\"__esModule\",{value:!0}),e.ParsingToolFunction=e.ParsingFunction=e.isRunnableFunctionWithParse=void 0,e.isRunnableFunctionWithParse=function(e){return\"function\"==typeof e.parse},e.ParsingFunction=class{constructor(e){this.function=e.function,this.parse=e.parse,this.parameters=e.parameters,this.description=e.description,this.name=e.name}},e.ParsingToolFunction=class{constructor(e){this.type=\"function\",this.function=e}}}}),require_chatCompletionUtils=__commonJS({\"../../node_modules/.pnpm/openai@4.57.1_zod@3.23.8/node_modules/openai/lib/chatCompletionUtils.js\"(e){init_globals(),Object.defineProperty(e,\"__esModule\",{value:!0}),e.isPresent=e.isToolMessage=e.isFunctionMessage=e.isAssistantMessage=void 0,e.isAssistantMessage=e=>\"assistant\"===(null==e?void 0:e.role),e.isFunctionMessage=e=>\"function\"===(null==e?void 0:e.role),e.isToolMessage=e=>\"tool\"===(null==e?void 0:e.role),e.isPresent=function(e){return null!=e}}}),require_EventStream=__commonJS({\"../../node_modules/.pnpm/openai@4.57.1_zod@3.23.8/node_modules/openai/lib/EventStream.js\"(e){init_globals();var t,r,n,i,o,a,s,l,u,c,d,h,f,p=e&&e.__classPrivateFieldSet||function(e,t,r,n,i){if(\"m\"===n)throw new TypeError(\"Private method is not writable\");if(\"a\"===n&&!i)throw new TypeError(\"Private accessor was defined without a setter\");if(\"function\"==typeof t?e!==t||!i:!t.has(e))throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");return\"a\"===n?i.call(e,r):i?i.value=r:t.set(e,r),r},m=e&&e.__classPrivateFieldGet||function(e,t,r,n){if(\"a\"===r&&!n)throw new TypeError(\"Private accessor was defined without a getter\");if(\"function\"==typeof t?e!==t||!n:!t.has(e))throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");return\"m\"===r?n:\"a\"===r?n.call(e):n?n.value:t.get(e)};Object.defineProperty(e,\"__esModule\",{value:!0}),e.EventStream=void 0;var g=require_error2();e.EventStream=class{_run(e){setTimeout((()=>{e().then((()=>{this._emitFinal(),this._emit(\"end\")}),m(this,t,\"m\",f).bind(this))}),0)}_connected(){this.ended||(m(this,n,\"f\").call(this),this._emit(\"connect\"))}get ended(){return m(this,u,\"f\")}get errored(){return m(this,c,\"f\")}get aborted(){return m(this,d,\"f\")}abort(){this.controller.abort()}on(e,t){return(m(this,l,\"f\")[e]||(m(this,l,\"f\")[e]=[])).push({listener:t}),this}off(e,t){const r=m(this,l,\"f\")[e];if(!r)return this;const n=r.findIndex((e=>e.listener===t));return n>=0&&r.splice(n,1),this}once(e,t){return(m(this,l,\"f\")[e]||(m(this,l,\"f\")[e]=[])).push({listener:t,once:!0}),this}emitted(e){return new Promise(((t,r)=>{p(this,h,!0,\"f\"),\"error\"!==e&&this.once(\"error\",r),this.once(e,t)}))}async done(){p(this,h,!0,\"f\"),await m(this,o,\"f\")}_emit(e,...t){if(m(this,u,\"f\"))return;\"end\"===e&&(p(this,u,!0,\"f\"),m(this,a,\"f\").call(this));const r=m(this,l,\"f\")[e];if(r&&(m(this,l,\"f\")[e]=r.filter((e=>!e.once)),r.forEach((({listener:e})=>e(...t)))),\"abort\"===e){const e=t[0];return m(this,h,\"f\")||(null==r?void 0:r.length)||Promise.reject(e),m(this,i,\"f\").call(this,e),m(this,s,\"f\").call(this,e),void this._emit(\"end\")}if(\"error\"===e){const e=t[0];m(this,h,\"f\")||(null==r?void 0:r.length)||Promise.reject(e),m(this,i,\"f\").call(this,e),m(this,s,\"f\").call(this,e),this._emit(\"end\")}}_emitFinal(){}constructor(){t.add(this),this.controller=new AbortController,r.set(this,void 0),n.set(this,(()=>{})),i.set(this,(()=>{})),o.set(this,void 0),a.set(this,(()=>{})),s.set(this,(()=>{})),l.set(this,{}),u.set(this,!1),c.set(this,!1),d.set(this,!1),h.set(this,!1),p(this,r,new Promise(((e,t)=>{p(this,n,e,\"f\"),p(this,i,t,\"f\")})),\"f\"),p(this,o,new Promise(((e,t)=>{p(this,a,e,\"f\"),p(this,s,t,\"f\")})),\"f\"),m(this,r,\"f\").catch((()=>{})),m(this,o,\"f\").catch((()=>{}))}},r=new WeakMap,n=new WeakMap,i=new WeakMap,o=new WeakMap,a=new WeakMap,s=new WeakMap,l=new WeakMap,u=new WeakMap,c=new WeakMap,d=new WeakMap,h=new WeakMap,t=new WeakSet,f=function(e){if(p(this,c,!0,\"f\"),e instanceof Error&&\"AbortError\"===e.name&&(e=new g.APIUserAbortError),e instanceof g.APIUserAbortError)return p(this,d,!0,\"f\"),this._emit(\"abort\",e);if(e instanceof g.OpenAIError)return this._emit(\"error\",e);if(e instanceof Error){const t=new g.OpenAIError(e.message);return t.cause=e,this._emit(\"error\",t)}return this._emit(\"error\",new g.OpenAIError(String(e)))}}}),require_parser3=__commonJS({\"../../node_modules/.pnpm/openai@4.57.1_zod@3.23.8/node_modules/openai/lib/parser.js\"(e){init_globals(),Object.defineProperty(e,\"__esModule\",{value:!0}),e.validateInputTools=e.hasAutoParseableInput=e.shouldParseToolCall=e.parseChatCompletion=e.maybeParseChatCompletion=e.isAutoParsableTool=e.makeParseableTool=e.isAutoParsableResponseFormat=e.makeParseableResponseFormat=void 0;var t=require_error2();function r(e){return\"auto-parseable-response-format\"===(null==e?void 0:e.$brand)}function n(e){return\"auto-parseable-tool\"===(null==e?void 0:e.$brand)}function i(e,r){const i=e.choices.map((e=>{var i,a;if(\"length\"===e.finish_reason)throw new t.LengthFinishReasonError;if(\"content_filter\"===e.finish_reason)throw new t.ContentFilterFinishReasonError;return{...e,message:{...e.message,tool_calls:null!=(a=null==(i=e.message.tool_calls)?void 0:i.map((e=>function(e,t){var r;const i=null==(r=e.tools)?void 0:r.find((e=>{var r;return(null==(r=e.function)?void 0:r.name)===t.function.name}));return{...t,function:{...t.function,parsed_arguments:n(i)?i.$parseRaw(t.function.arguments):(null==i?void 0:i.function.strict)?JSON.parse(t.function.arguments):null}}}(r,e))))?a:[],parsed:e.message.content&&!e.message.refusal?o(r,e.message.content):null}}}));return{...e,choices:i}}function o(e,t){var r,n;return\"json_schema\"!==(null==(r=e.response_format)?void 0:r.type)?null:\"json_schema\"===(null==(n=e.response_format)?void 0:n.type)?\"$parseRaw\"in e.response_format?e.response_format.$parseRaw(t):JSON.parse(t):null}function a(e){var t,i;return!!r(e.response_format)||null!=(i=null==(t=e.tools)?void 0:t.some((e=>n(e)||\"function\"===e.type&&!0===e.function.strict)))&&i}e.makeParseableResponseFormat=function(e,t){const r={...e};return Object.defineProperties(r,{$brand:{value:\"auto-parseable-response-format\",enumerable:!1},$parseRaw:{value:t,enumerable:!1}}),r},e.isAutoParsableResponseFormat=r,e.makeParseableTool=function(e,{parser:t,callback:r}){const n={...e};return Object.defineProperties(n,{$brand:{value:\"auto-parseable-tool\",enumerable:!1},$parseRaw:{value:t,enumerable:!1},$callback:{value:r,enumerable:!1}}),n},e.isAutoParsableTool=n,e.maybeParseChatCompletion=function(e,t){return t&&a(t)?i(e,t):{...e,choices:e.choices.map((e=>{var t;return{...e,message:{...e.message,parsed:null,tool_calls:null!=(t=e.message.tool_calls)?t:[]}}}))}},e.parseChatCompletion=i,e.shouldParseToolCall=function(e,t){var r;if(!e)return!1;const i=null==(r=e.tools)?void 0:r.find((e=>{var r;return(null==(r=e.function)?void 0:r.name)===t.function.name}));return n(i)||(null==i?void 0:i.function.strict)||!1},e.hasAutoParseableInput=a,e.validateInputTools=function(e){for(const r of null!=e?e:[]){if(\"function\"!==r.type)throw new t.OpenAIError(`Currently only \\`function\\` tool types support auto-parsing; Received \\`${r.type}\\``);if(!0!==r.function.strict)throw new t.OpenAIError(`The \\`${r.function.name}\\` tool is not marked with \\`strict: true\\`. Only strict function tools can be auto-parsed`)}}}}),require_AbstractChatCompletionRunner=__commonJS({\"../../node_modules/.pnpm/openai@4.57.1_zod@3.23.8/node_modules/openai/lib/AbstractChatCompletionRunner.js\"(e){init_globals();var t,r,n,i,o,a,s,l,u=e&&e.__classPrivateFieldGet||function(e,t,r,n){if(\"a\"===r&&!n)throw new TypeError(\"Private accessor was defined without a getter\");if(\"function\"==typeof t?e!==t||!n:!t.has(e))throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");return\"m\"===r?n:\"a\"===r?n.call(e):n?n.value:t.get(e)};Object.defineProperty(e,\"__esModule\",{value:!0}),e.AbstractChatCompletionRunner=void 0;var c=require_error2(),d=require_RunnableFunction(),h=require_chatCompletionUtils(),f=require_EventStream(),p=require_parser3(),m=10,g=class extends f.EventStream{_addChatCompletion(e){var t;this._chatCompletions.push(e),this._emit(\"chatCompletion\",e);const r=null==(t=e.choices[0])?void 0:t.message;return r&&this._addMessage(r),e}_addMessage(e,t=!0){if(\"content\"in e||(e.content=null),this.messages.push(e),t)if(this._emit(\"message\",e),((0,h.isFunctionMessage)(e)||(0,h.isToolMessage)(e))&&e.content)this._emit(\"functionCallResult\",e.content);else if((0,h.isAssistantMessage)(e)&&e.function_call)this._emit(\"functionCall\",e.function_call);else if((0,h.isAssistantMessage)(e)&&e.tool_calls)for(const r of e.tool_calls)\"function\"===r.type&&this._emit(\"functionCall\",r.function)}async finalChatCompletion(){await this.done();const e=this._chatCompletions[this._chatCompletions.length-1];if(!e)throw new c.OpenAIError(\"stream ended without producing a ChatCompletion\");return e}async finalContent(){return await this.done(),u(this,t,\"m\",r).call(this)}async finalMessage(){return await this.done(),u(this,t,\"m\",n).call(this)}async finalFunctionCall(){return await this.done(),u(this,t,\"m\",i).call(this)}async finalFunctionCallResult(){return await this.done(),u(this,t,\"m\",o).call(this)}async totalUsage(){return await this.done(),u(this,t,\"m\",a).call(this)}allChatCompletions(){return[...this._chatCompletions]}_emitFinal(){const e=this._chatCompletions[this._chatCompletions.length-1];e&&this._emit(\"finalChatCompletion\",e);const s=u(this,t,\"m\",n).call(this);s&&this._emit(\"finalMessage\",s);const l=u(this,t,\"m\",r).call(this);l&&this._emit(\"finalContent\",l);const c=u(this,t,\"m\",i).call(this);c&&this._emit(\"finalFunctionCall\",c);const d=u(this,t,\"m\",o).call(this);null!=d&&this._emit(\"finalFunctionCallResult\",d),this._chatCompletions.some((e=>e.usage))&&this._emit(\"totalUsage\",u(this,t,\"m\",a).call(this))}async _createChatCompletion(e,r,n){const i=null==n?void 0:n.signal;i&&(i.aborted&&this.controller.abort(),i.addEventListener(\"abort\",(()=>this.controller.abort()))),u(this,t,\"m\",s).call(this,r);const o=await e.chat.completions.create({...r,stream:!1},{...n,signal:this.controller.signal});return this._connected(),this._addChatCompletion((0,p.parseChatCompletion)(o,r))}async _runChatCompletion(e,t,r){for(const n of t.messages)this._addMessage(n,!1);return await this._createChatCompletion(e,t,r)}async _runFunctions(e,r,n){var i;const o=\"function\",{function_call:a=\"auto\",stream:s,...h}=r,f=\"string\"!=typeof a&&(null==a?void 0:a.name),{maxChatCompletions:p=m}=n||{},g={};for(const t of r.functions)g[t.name||t.function.name]=t;const _=r.functions.map((e=>({name:e.name||e.function.name,parameters:e.parameters,description:e.description})));for(const t of r.messages)this._addMessage(t,!1);for(let m=0;m__left_angle_mark_p;++m){const r=null==(i=(await this._createChatCompletion(e,{...h,function_call:a,functions:_,messages:[...this.messages]},n)).choices[0])?void 0:i.message;if(!r)throw new c.OpenAIError(\"missing message in ChatCompletion response\");if(!r.function_call)return;const{name:s,arguments:p}=r.function_call,m=g[s];if(!m){const e=`Invalid function_call: ${JSON.stringify(s)}. Available options are: ${_.map((e=>JSON.stringify(e.name))).join(\", \")}. Please try again`;this._addMessage({role:o,name:s,content:e});continue}if(f&&f!==s){const e=`Invalid function_call: ${JSON.stringify(s)}. ${JSON.stringify(f)} requested. Please try again`;this._addMessage({role:o,name:s,content:e});continue}let y;try{y=(0,d.isRunnableFunctionWithParse)(m)?await m.parse(p):p}catch(b){this._addMessage({role:o,name:s,content:b instanceof Error?b.message:String(b)});continue}const v=await m.function(y,this),A=u(this,t,\"m\",l).call(this,v);if(this._addMessage({role:o,name:s,content:A}),f)return}}async _runTools(e,r,n){var i,o,a;const s=\"tool\",{tool_choice:h=\"auto\",stream:f,...g}=r,_=\"string\"!=typeof h&&(null==(i=null==h?void 0:h.function)?void 0:i.name),{maxChatCompletions:b=m}=n||{},y=r.tools.map((e=>{if((0,p.isAutoParsableTool)(e)){if(!e.$callback)throw new c.OpenAIError(\"Tool given to `.runTools()` that does not have an associated function\");return{type:\"function\",function:{function:e.$callback,name:e.function.name,description:e.function.description||\"\",parameters:e.function.parameters,parse:e.$parseRaw,strict:!0}}}return e})),v={};for(const t of y)\"function\"===t.type&&(v[t.function.name||t.function.function.name]=t.function);const A=\"tools\"in r?y.map((e=>\"function\"===e.type?{type:\"function\",function:{name:e.function.name||e.function.function.name,parameters:e.function.parameters,description:e.function.description,strict:e.function.strict}}:e)):void 0;for(const t of r.messages)this._addMessage(t,!1);for(let p=0;p__left_angle_mark_b;++p){const r=null==(o=(await this._createChatCompletion(e,{...g,tool_choice:h,tools:A,messages:[...this.messages]},n)).choices[0])?void 0:o.message;if(!r)throw new c.OpenAIError(\"missing message in ChatCompletion response\");if(!(null==(a=r.tool_calls)?void 0:a.length))return;for(const e of r.tool_calls){if(\"function\"!==e.type)continue;const r=e.id,{name:n,arguments:i}=e.function,o=v[n];if(!o){const e=`Invalid tool_call: ${JSON.stringify(n)}. Available options are: ${Object.keys(v).map((e=>JSON.stringify(e))).join(\", \")}. Please try again`;this._addMessage({role:s,tool_call_id:r,content:e});continue}if(_&&_!==n){const e=`Invalid tool_call: ${JSON.stringify(n)}. ${JSON.stringify(_)} requested. Please try again`;this._addMessage({role:s,tool_call_id:r,content:e});continue}let a;try{a=(0,d.isRunnableFunctionWithParse)(o)?await o.parse(i):i}catch(w){const e=w instanceof Error?w.message:String(w);this._addMessage({role:s,tool_call_id:r,content:e});continue}const c=await o.function(a,this),h=u(this,t,\"m\",l).call(this,c);if(this._addMessage({role:s,tool_call_id:r,content:h}),_)return}}}constructor(){super(...arguments),t.add(this),this._chatCompletions=[],this.messages=[]}};e.AbstractChatCompletionRunner=g,t=new WeakSet,r=function(){var e;return null!=(e=u(this,t,\"m\",n).call(this).content)?e:null},n=function(){var e,t;let r=this.messages.length;for(;r-- >0;){const n=this.messages[r];if((0,h.isAssistantMessage)(n)){const{function_call:r,...i}=n,o={...i,content:null!=(e=n.content)?e:null,refusal:null!=(t=n.refusal)?t:null};return r&&(o.function_call=r),o}}throw new c.OpenAIError(\"stream ended without producing a ChatCompletionMessage with role=assistant\")},i=function(){var e,t;for(let r=this.messages.length-1;r>=0;r--){const n=this.messages[r];if((0,h.isAssistantMessage)(n)&&(null==n?void 0:n.function_call))return n.function_call;if((0,h.isAssistantMessage)(n)&&(null==(e=null==n?void 0:n.tool_calls)?void 0:e.length))return null==(t=n.tool_calls.at(-1))?void 0:t.function}},o=function(){for(let e=this.messages.length-1;e>=0;e--){const t=this.messages[e];if((0,h.isFunctionMessage)(t)&&null!=t.content)return t.content;if((0,h.isToolMessage)(t)&&null!=t.content&&\"string\"==typeof t.content&&this.messages.some((e=>{var r;return\"assistant\"===e.role&&(null==(r=e.tool_calls)?void 0:r.some((e=>\"function\"===e.type&&e.id===t.tool_call_id)))})))return t.content}},a=function(){const e={completion_tokens:0,prompt_tokens:0,total_tokens:0};for(const{usage:t}of this._chatCompletions)t&&(e.completion_tokens+=t.completion_tokens,e.prompt_tokens+=t.prompt_tokens,e.total_tokens+=t.total_tokens);return e},s=function(e){if(null!=e.n&&e.n>1)throw new c.OpenAIError(\"ChatCompletion convenience helpers only support n=1 at this time. To use n>1, please use chat.completions.create() directly.\")},l=function(e){return\"string\"==typeof e?e:void 0===e?\"undefined\":JSON.stringify(e)}}}),require_ChatCompletionRunner=__commonJS({\"../../node_modules/.pnpm/openai@4.57.1_zod@3.23.8/node_modules/openai/lib/ChatCompletionRunner.js\"(e){init_globals(),Object.defineProperty(e,\"__esModule\",{value:!0}),e.ChatCompletionRunner=void 0;var t=require_AbstractChatCompletionRunner(),r=require_chatCompletionUtils(),n=class e extends t.AbstractChatCompletionRunner{static runFunctions(t,r,n){const i=new e,o={...n,headers:{...null==n?void 0:n.headers,\"X-Stainless-Helper-Method\":\"runFunctions\"}};return i._run((()=>i._runFunctions(t,r,o))),i}static runTools(t,r,n){const i=new e,o={...n,headers:{...null==n?void 0:n.headers,\"X-Stainless-Helper-Method\":\"runTools\"}};return i._run((()=>i._runTools(t,r,o))),i}_addMessage(e,t=!0){super._addMessage(e,t),(0,r.isAssistantMessage)(e)&&e.content&&this._emit(\"content\",e.content)}};e.ChatCompletionRunner=n}}),require_parser4=__commonJS({\"../../node_modules/.pnpm/openai@4.57.1_zod@3.23.8/node_modules/openai/_vendor/partial-json-parser/parser.js\"(e){init_globals(),Object.defineProperty(e,\"__esModule\",{value:!0}),e.partialParse=void 0;var t=e=>{if(0===e.length)return e;let r=e[e.length-1];switch(r.type){case\"separator\":return e=e.slice(0,e.length-1),t(e);case\"number\":let n=r.value[r.value.length-1];if(\".\"===n||\"-\"===n)return e=e.slice(0,e.length-1),t(e);case\"string\":let i=e[e.length-2];if(\"delimiter\"===(null==i?void 0:i.type))return e=e.slice(0,e.length-1),t(e);if(\"brace\"===(null==i?void 0:i.type)&&\"{\"===i.value)return e=e.slice(0,e.length-1),t(e);break;case\"delimiter\":return e=e.slice(0,e.length-1),t(e)}return e};e.partialParse=e=>JSON.parse((e=>{let t=\"\";return e.map((e=>{\"string\"===e.type?t+='\"'+e.value+'\"':t+=e.value})),t})((e=>{let t=[];return e.map((e=>{\"brace\"===e.type&&(\"{\"===e.value?t.push(\"}\"):t.splice(t.lastIndexOf(\"}\"),1)),\"paren\"===e.type&&(\"[\"===e.value?t.push(\"]\"):t.splice(t.lastIndexOf(\"]\"),1))})),t.length>0&&t.reverse().map((t=>{\"}\"===t?e.push({type:\"brace\",value:\"}\"}):\"]\"===t&&e.push({type:\"paren\",value:\"]\"})})),e})(t((e=>{let t=0,r=[];for(;t__left_angle_mark_e.length;){let n=e[t];if(\"\\\\\"===n){t++;continue}if(\"{\"===n){r.push({type:\"brace\",value:\"{\"}),t++;continue}if(\"}\"===n){r.push({type:\"brace\",value:\"}\"}),t++;continue}if(\"[\"===n){r.push({type:\"paren\",value:\"[\"}),t++;continue}if(\"]\"===n){r.push({type:\"paren\",value:\"]\"}),t++;continue}if(\":\"===n){r.push({type:\"separator\",value:\":\"}),t++;continue}if(\",\"===n){r.push({type:\"delimiter\",value:\",\"}),t++;continue}if('\"'===n){let i=\"\",o=!1;for(n=e[++t];'\"'!==n;){if(t===e.length){o=!0;break}if(\"\\\\\"===n){if(t++,t===e.length){o=!0;break}i+=n+e[t],n=e[++t]}else i+=n,n=e[++t]}n=e[++t],o||r.push({type:\"string\",value:i});continue}if(n&&/\\s/.test(n)){t++;continue}let i=/[0-9]/;if(n&&i.test(n)||\"-\"===n||\".\"===n){let o=\"\";for(\"-\"===n&&(o+=n,n=e[++t]);n&&i.test(n)||\".\"===n;)o+=n,n=e[++t];r.push({type:\"number\",value:o});continue}let o=/[a-z]/i;if(n&&o.test(n)){let i=\"\";for(;n&&o.test(n)&&t!==e.length;)i+=n,n=e[++t];if(\"true\"!=i&&\"false\"!=i&&\"null\"!==i){t++;continue}r.push({type:\"name\",value:i})}else t++}return r})(e)))))}}),require_ChatCompletionStream=__commonJS({\"../../node_modules/.pnpm/openai@4.57.1_zod@3.23.8/node_modules/openai/lib/ChatCompletionStream.js\"(e){init_globals();var t,r,n,i,o,a,s,l,u,c,d,h,f=e&&e.__classPrivateFieldSet||function(e,t,r,n,i){if(\"m\"===n)throw new TypeError(\"Private method is not writable\");if(\"a\"===n&&!i)throw new TypeError(\"Private accessor was defined without a setter\");if(\"function\"==typeof t?e!==t||!i:!t.has(e))throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");return\"a\"===n?i.call(e,r):i?i.value=r:t.set(e,r),r},p=e&&e.__classPrivateFieldGet||function(e,t,r,n){if(\"a\"===r&&!n)throw new TypeError(\"Private accessor was defined without a getter\");if(\"function\"==typeof t?e!==t||!n:!t.has(e))throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");return\"m\"===r?n:\"a\"===r?n.call(e):n?n.value:t.get(e)};Object.defineProperty(e,\"__esModule\",{value:!0}),e.ChatCompletionStream=void 0;var m=require_error2(),g=require_AbstractChatCompletionRunner(),_=require_streaming2(),b=require_parser3(),y=require_parser4(),v=class e extends g.AbstractChatCompletionRunner{get currentChatCompletionSnapshot(){return p(this,i,\"f\")}static fromReadableStream(t){const r=new e(null);return r._run((()=>r._fromReadableStream(t))),r}static createChatCompletion(t,r,n){const i=new e(r);return i._run((()=>i._runChatCompletion(t,{...r,stream:!0},{...n,headers:{...null==n?void 0:n.headers,\"X-Stainless-Helper-Method\":\"stream\"}}))),i}async _createChatCompletion(e,r,n){var i;super._createChatCompletion;const a=null==n?void 0:n.signal;a&&(a.aborted&&this.controller.abort(),a.addEventListener(\"abort\",(()=>this.controller.abort()))),p(this,t,\"m\",o).call(this);const l=await e.chat.completions.create({...r,stream:!0},{...n,signal:this.controller.signal});this._connected();for await(const o of l)p(this,t,\"m\",s).call(this,o);if(null==(i=l.controller.signal)?void 0:i.aborted)throw new m.APIUserAbortError;return this._addChatCompletion(p(this,t,\"m\",c).call(this))}async _fromReadableStream(e,r){var n;const i=null==r?void 0:r.signal;i&&(i.aborted&&this.controller.abort(),i.addEventListener(\"abort\",(()=>this.controller.abort()))),p(this,t,\"m\",o).call(this),this._connected();const a=_.Stream.fromReadableStream(e,this.controller);let l;for await(const o of a)l&&l!==o.id&&this._addChatCompletion(p(this,t,\"m\",c).call(this)),p(this,t,\"m\",s).call(this,o),l=o.id;if(null==(n=a.controller.signal)?void 0:n.aborted)throw new m.APIUserAbortError;return this._addChatCompletion(p(this,t,\"m\",c).call(this))}[(r=new WeakMap,n=new WeakMap,i=new WeakMap,t=new WeakSet,o=function(){this.ended||f(this,i,void 0,\"f\")},a=function(e){let t=p(this,n,\"f\")[e.index];return t||(t={content_done:!1,refusal_done:!1,logprobs_content_done:!1,logprobs_refusal_done:!1,done_tool_calls:new Set,current_tool_call_index:null},p(this,n,\"f\")[e.index]=t,t)},s=function(e){var r,n,i,o,s,c,d,f,m,g,_,b,y,v,A,w,S,E,x,C;if(this.ended)return;const T=p(this,t,\"m\",h).call(this,e);this._emit(\"chunk\",e,T);for(const h of e.choices){const e=T.choices[h.index];null!=h.delta.content&&\"assistant\"===(null==(r=e.message)?void 0:r.role)&&(null==(n=e.message)?void 0:n.content)&&(this._emit(\"content\",h.delta.content,e.message.content),this._emit(\"content.delta\",{delta:h.delta.content,snapshot:e.message.content,parsed:e.message.parsed})),null!=h.delta.refusal&&\"assistant\"===(null==(i=e.message)?void 0:i.role)&&(null==(o=e.message)?void 0:o.refusal)&&this._emit(\"refusal.delta\",{delta:h.delta.refusal,snapshot:e.message.refusal}),null!=(null==(s=h.logprobs)?void 0:s.content)&&\"assistant\"===(null==(c=e.message)?void 0:c.role)&&this._emit(\"logprobs.content.delta\",{content:null==(d=h.logprobs)?void 0:d.content,snapshot:null!=(m=null==(f=e.logprobs)?void 0:f.content)?m:[]}),null!=(null==(g=h.logprobs)?void 0:g.refusal)&&\"assistant\"===(null==(_=e.message)?void 0:_.role)&&this._emit(\"logprobs.refusal.delta\",{refusal:null==(b=h.logprobs)?void 0:b.refusal,snapshot:null!=(v=null==(y=e.logprobs)?void 0:y.refusal)?v:[]});const R=p(this,t,\"m\",a).call(this,e);e.finish_reason&&(p(this,t,\"m\",u).call(this,e),null!=R.current_tool_call_index&&p(this,t,\"m\",l).call(this,e,R.current_tool_call_index));for(const r of null!=(A=h.delta.tool_calls)?A:[])R.current_tool_call_index!==r.index&&(p(this,t,\"m\",u).call(this,e),null!=R.current_tool_call_index&&p(this,t,\"m\",l).call(this,e,R.current_tool_call_index)),R.current_tool_call_index=r.index;for(const t of null!=(w=h.delta.tool_calls)?w:[]){const r=null==(S=e.message.tool_calls)?void 0:S[t.index];(null==r?void 0:r.type)&&(\"function\"===(null==r?void 0:r.type)?this._emit(\"tool_calls.function.arguments.delta\",{name:null==(E=r.function)?void 0:E.name,index:t.index,arguments:r.function.arguments,parsed_arguments:r.function.parsed_arguments,arguments_delta:null!=(C=null==(x=t.function)?void 0:x.arguments)?C:\"\"}):null==r||r.type)}}},l=function(e,n){var i,o,s;if(p(this,t,\"m\",a).call(this,e).done_tool_calls.has(n))return;const l=null==(i=e.message.tool_calls)?void 0:i[n];if(!l)throw new Error(\"no tool call snapshot\");if(!l.type)throw new Error(\"tool call snapshot missing `type`\");if(\"function\"===l.type){const e=null==(s=null==(o=p(this,r,\"f\"))?void 0:o.tools)?void 0:s.find((e=>\"function\"===e.type&&e.function.name===l.function.name));this._emit(\"tool_calls.function.arguments.done\",{name:l.function.name,index:n,arguments:l.function.arguments,parsed_arguments:(0,b.isAutoParsableTool)(e)?e.$parseRaw(l.function.arguments):(null==e?void 0:e.function.strict)?JSON.parse(l.function.arguments):null})}else l.type},u=function(e){var r,n;const i=p(this,t,\"m\",a).call(this,e);if(e.message.content&&!i.content_done){i.content_done=!0;const r=p(this,t,\"m\",d).call(this);this._emit(\"content.done\",{content:e.message.content,parsed:r?r.$parseRaw(e.message.content):null})}e.message.refusal&&!i.refusal_done&&(i.refusal_done=!0,this._emit(\"refusal.done\",{refusal:e.message.refusal})),(null==(r=e.logprobs)?void 0:r.content)&&!i.logprobs_content_done&&(i.logprobs_content_done=!0,this._emit(\"logprobs.content.done\",{content:e.logprobs.content})),(null==(n=e.logprobs)?void 0:n.refusal)&&!i.logprobs_refusal_done&&(i.logprobs_refusal_done=!0,this._emit(\"logprobs.refusal.done\",{refusal:e.logprobs.refusal}))},c=function(){if(this.ended)throw new m.OpenAIError(\"stream has ended, this shouldn't happen\");const e=p(this,i,\"f\");if(!e)throw new m.OpenAIError(\"request ended without sending any chunks\");return f(this,i,void 0,\"f\"),f(this,n,[],\"f\"),function(e,t){const{id:r,choices:n,created:i,model:o,system_fingerprint:a,...s}=e,l={...s,id:r,choices:n.map((({message:t,finish_reason:r,index:n,logprobs:i,...o})=>{var a,s,l;if(!r)throw new m.OpenAIError(`missing finish_reason for choice ${n}`);const{content:u=null,function_call:c,tool_calls:d,...h}=t,f=t.role;if(!f)throw new m.OpenAIError(`missing role for choice ${n}`);if(c){const{arguments:e,name:s}=c;if(null==e)throw new m.OpenAIError(`missing function_call.arguments for choice ${n}`);if(!s)throw new m.OpenAIError(`missing function_call.name for choice ${n}`);return{...o,message:{content:u,function_call:{arguments:e,name:s},role:f,refusal:null!=(a=t.refusal)?a:null},finish_reason:r,index:n,logprobs:i}}return d?{...o,index:n,finish_reason:r,logprobs:i,message:{...h,role:f,content:u,refusal:null!=(s=t.refusal)?s:null,tool_calls:d.map(((t,r)=>{const{function:i,type:o,id:a,...s}=t,{arguments:l,name:u,...c}=i||{};if(null==a)throw new m.OpenAIError(`missing choices[${n}].tool_calls[${r}].id\\n${A(e)}`);if(null==o)throw new m.OpenAIError(`missing choices[${n}].tool_calls[${r}].type\\n${A(e)}`);if(null==u)throw new m.OpenAIError(`missing choices[${n}].tool_calls[${r}].function.name\\n${A(e)}`);if(null==l)throw new m.OpenAIError(`missing choices[${n}].tool_calls[${r}].function.arguments\\n${A(e)}`);return{...s,id:a,type:o,function:{...c,name:u,arguments:l}}}))}}:{...o,message:{...h,content:u,role:f,refusal:null!=(l=t.refusal)?l:null},finish_reason:r,index:n,logprobs:i}})),created:i,model:o,object:\"chat.completion\",...a?{system_fingerprint:a}:{}};return(0,b.maybeParseChatCompletion)(l,t)}(e,p(this,r,\"f\"))},d=function(){var e;const t=null==(e=p(this,r,\"f\"))?void 0:e.response_format;return(0,b.isAutoParsableResponseFormat)(t)?t:null},h=function(e){var n,o,a,s,l,u;let c=p(this,i,\"f\");const{choices:h,...g}=e;c?Object.assign(c,g):c=f(this,i,{...g,choices:[]},\"f\");for(const{delta:i,finish_reason:f,index:_,logprobs:v=null,...A}of e.choices){let e=c.choices[_];if(e||(e=c.choices[_]={finish_reason:f,index:_,message:{},logprobs:v,...A}),v)if(e.logprobs){const{content:t,refusal:r,...n}=v;Object.assign(e.logprobs,n),t&&(null!=(a=e.logprobs).content||(a.content=[]),e.logprobs.content.push(...t)),r&&(null!=(s=e.logprobs).refusal||(s.refusal=[]),e.logprobs.refusal.push(...r))}else e.logprobs=Object.assign({},v);if(f&&(e.finish_reason=f,p(this,r,\"f\")&&(0,b.hasAutoParseableInput)(p(this,r,\"f\")))){if(\"length\"===f)throw new m.LengthFinishReasonError;if(\"content_filter\"===f)throw new m.ContentFilterFinishReasonError}if(Object.assign(e,A),!i)continue;const{content:h,refusal:g,function_call:w,role:S,tool_calls:E,...x}=i;if(Object.assign(e.message,x),g&&(e.message.refusal=(e.message.refusal||\"\")+g),S&&(e.message.role=S),w&&(e.message.function_call?(w.name&&(e.message.function_call.name=w.name),w.arguments&&(null!=(l=e.message.function_call).arguments||(l.arguments=\"\"),e.message.function_call.arguments+=w.arguments)):e.message.function_call=w),h&&(e.message.content=(e.message.content||\"\")+h,!e.message.refusal&&p(this,t,\"m\",d).call(this)&&(e.message.parsed=(0,y.partialParse)(e.message.content))),E){e.message.tool_calls||(e.message.tool_calls=[]);for(const{index:t,id:i,type:a,function:s,...l}of E){const c=null!=(n=(u=e.message.tool_calls)[t])?n:u[t]={};Object.assign(c,l),i&&(c.id=i),a&&(c.type=a),s&&(null!=c.function||(c.function={name:null!=(o=s.name)?o:\"\",arguments:\"\"})),(null==s?void 0:s.name)&&(c.function.name=s.name),(null==s?void 0:s.arguments)&&(c.function.arguments+=s.arguments,(0,b.shouldParseToolCall)(p(this,r,\"f\"),c)&&(c.function.parsed_arguments=(0,y.partialParse)(c.function.arguments)))}}}return c},Symbol.asyncIterator)](){const e=[],t=[];let r=!1;return this.on(\"chunk\",(r=>{const n=t.shift();n?n.resolve(r):e.push(r)})),this.on(\"end\",(()=>{r=!0;for(const e of t)e.resolve(void 0);t.length=0})),this.on(\"abort\",(e=>{r=!0;for(const r of t)r.reject(e);t.length=0})),this.on(\"error\",(e=>{r=!0;for(const r of t)r.reject(e);t.length=0})),{next:async()=>e.length?{value:e.shift(),done:!1}:r?{value:void 0,done:!0}:new Promise(((e,r)=>t.push({resolve:e,reject:r}))).then((e=>e?{value:e,done:!1}:{value:void 0,done:!0})),return:async()=>(this.abort(),{value:void 0,done:!0})}}toReadableStream(){return new _.Stream(this[Symbol.asyncIterator].bind(this),this.controller).toReadableStream()}constructor(e){super(),t.add(this),r.set(this,void 0),n.set(this,void 0),i.set(this,void 0),f(this,r,e,\"f\"),f(this,n,[],\"f\")}};function A(e){return JSON.stringify(e)}e.ChatCompletionStream=v}}),require_ChatCompletionStreamingRunner=__commonJS({\"../../node_modules/.pnpm/openai@4.57.1_zod@3.23.8/node_modules/openai/lib/ChatCompletionStreamingRunner.js\"(e){init_globals(),Object.defineProperty(e,\"__esModule\",{value:!0}),e.ChatCompletionStreamingRunner=void 0;var t=require_ChatCompletionStream(),r=class e extends t.ChatCompletionStream{static fromReadableStream(t){const r=new e(null);return r._run((()=>r._fromReadableStream(t))),r}static runFunctions(t,r,n){const i=new e(null),o={...n,headers:{...null==n?void 0:n.headers,\"X-Stainless-Helper-Method\":\"runFunctions\"}};return i._run((()=>i._runFunctions(t,r,o))),i}static runTools(t,r,n){const i=new e(r),o={...n,headers:{...null==n?void 0:n.headers,\"X-Stainless-Helper-Method\":\"runTools\"}};return i._run((()=>i._runTools(t,r,o))),i}};e.ChatCompletionStreamingRunner=r}}),require_completions3=__commonJS({\"../../node_modules/.pnpm/openai@4.57.1_zod@3.23.8/node_modules/openai/resources/beta/chat/completions.js\"(e){init_globals(),Object.defineProperty(e,\"__esModule\",{value:!0}),e.Completions=e.ChatCompletionStream=e.ParsingToolFunction=e.ParsingFunction=e.ChatCompletionStreamingRunner=e.ChatCompletionRunner=void 0;var t=require_resource2(),r=require_ChatCompletionRunner(),n=require_ChatCompletionRunner();Object.defineProperty(e,\"ChatCompletionRunner\",{enumerable:!0,get:function(){return n.ChatCompletionRunner}});var i=require_ChatCompletionStreamingRunner(),o=require_ChatCompletionStreamingRunner();Object.defineProperty(e,\"ChatCompletionStreamingRunner\",{enumerable:!0,get:function(){return o.ChatCompletionStreamingRunner}});var a=require_RunnableFunction();Object.defineProperty(e,\"ParsingFunction\",{enumerable:!0,get:function(){return a.ParsingFunction}}),Object.defineProperty(e,\"ParsingToolFunction\",{enumerable:!0,get:function(){return a.ParsingToolFunction}});var s=require_ChatCompletionStream(),l=require_parser3(),u=require_ChatCompletionStream();Object.defineProperty(e,\"ChatCompletionStream\",{enumerable:!0,get:function(){return u.ChatCompletionStream}});var c=class extends t.APIResource{async parse(e,t){(0,l.validateInputTools)(e.tools);const r=await this._client.chat.completions.create(e,{...t,headers:{...null==t?void 0:t.headers,\"X-Stainless-Helper-Method\":\"beta.chat.completions.parse\"}});return(0,l.parseChatCompletion)(r,e)}runFunctions(e,t){return e.stream?i.ChatCompletionStreamingRunner.runFunctions(this._client,e,t):r.ChatCompletionRunner.runFunctions(this._client,e,t)}runTools(e,t){return e.stream?i.ChatCompletionStreamingRunner.runTools(this._client,e,t):r.ChatCompletionRunner.runTools(this._client,e,t)}stream(e,t){return s.ChatCompletionStream.createChatCompletion(this._client,e,t)}};e.Completions=c}}),require_chat3=__commonJS({\"../../node_modules/.pnpm/openai@4.57.1_zod@3.23.8/node_modules/openai/resources/beta/chat/chat.js\"(e){init_globals();var t=e&&e.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!(\"get\"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=e&&e.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,\"default\",{enumerable:!0,value:t})}:function(e,t){e.default=t}),n=e&&e.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(null!=e)for(var i in e)\"default\"!==i&&Object.prototype.hasOwnProperty.call(e,i)&&t(n,e,i);return r(n,e),n};Object.defineProperty(e,\"__esModule\",{value:!0}),e.Chat=void 0;var i=require_resource2(),o=n(require_completions3()),a=class extends i.APIResource{constructor(){super(...arguments),this.completions=new o.Completions(this._client)}};e.Chat=a,(a=e.Chat||(e.Chat={})).Completions=o.Completions}}),require_AssistantStream=__commonJS({\"../../node_modules/.pnpm/openai@4.57.1_zod@3.23.8/node_modules/openai/lib/AssistantStream.js\"(e){init_globals();var t,r,n,i,o,a,s,l,u,c,d,h,f,p,m,g,_,b,y,v,A,w,S=e&&e.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!(\"get\"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),E=e&&e.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,\"default\",{enumerable:!0,value:t})}:function(e,t){e.default=t}),x=e&&e.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)\"default\"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&S(t,e,r);return E(t,e),t},C=e&&e.__classPrivateFieldGet||function(e,t,r,n){if(\"a\"===r&&!n)throw new TypeError(\"Private accessor was defined without a getter\");if(\"function\"==typeof t?e!==t||!n:!t.has(e))throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");return\"m\"===r?n:\"a\"===r?n.call(e):n?n.value:t.get(e)},T=e&&e.__classPrivateFieldSet||function(e,t,r,n,i){if(\"m\"===n)throw new TypeError(\"Private method is not writable\");if(\"a\"===n&&!i)throw new TypeError(\"Private accessor was defined without a setter\");if(\"function\"==typeof t?e!==t||!i:!t.has(e))throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");return\"a\"===n?i.call(e,r):i?i.value=r:t.set(e,r),r};Object.defineProperty(e,\"__esModule\",{value:!0}),e.AssistantStream=void 0;var R=x(require_core2()),I=require_streaming2(),k=require_error2(),P=require_EventStream(),M=class e extends P.EventStream{[(r=new WeakMap,n=new WeakMap,i=new WeakMap,o=new WeakMap,a=new WeakMap,s=new WeakMap,l=new WeakMap,u=new WeakMap,c=new WeakMap,d=new WeakMap,h=new WeakMap,f=new WeakMap,t=new WeakSet,Symbol.asyncIterator)](){const e=[],t=[];let r=!1;return this.on(\"event\",(r=>{const n=t.shift();n?n.resolve(r):e.push(r)})),this.on(\"end\",(()=>{r=!0;for(const e of t)e.resolve(void 0);t.length=0})),this.on(\"abort\",(e=>{r=!0;for(const r of t)r.reject(e);t.length=0})),this.on(\"error\",(e=>{r=!0;for(const r of t)r.reject(e);t.length=0})),{next:async()=>e.length?{value:e.shift(),done:!1}:r?{value:void 0,done:!0}:new Promise(((e,r)=>t.push({resolve:e,reject:r}))).then((e=>e?{value:e,done:!1}:{value:void 0,done:!0})),return:async()=>(this.abort(),{value:void 0,done:!0})}}static fromReadableStream(t){const r=new e;return r._run((()=>r._fromReadableStream(t))),r}async _fromReadableStream(e,r){var n;const i=null==r?void 0:r.signal;i&&(i.aborted&&this.controller.abort(),i.addEventListener(\"abort\",(()=>this.controller.abort()))),this._connected();const o=I.Stream.fromReadableStream(e,this.controller);for await(const a of o)C(this,t,\"m\",p).call(this,a);if(null==(n=o.controller.signal)?void 0:n.aborted)throw new k.APIUserAbortError;return this._addRun(C(this,t,\"m\",m).call(this))}toReadableStream(){return new I.Stream(this[Symbol.asyncIterator].bind(this),this.controller).toReadableStream()}static createToolAssistantStream(t,r,n,i,o){const a=new e;return a._run((()=>a._runToolAssistantStream(t,r,n,i,{...o,headers:{...null==o?void 0:o.headers,\"X-Stainless-Helper-Method\":\"stream\"}}))),a}async _createToolAssistantStream(e,r,n,i,o){var a;const s=null==o?void 0:o.signal;s&&(s.aborted&&this.controller.abort(),s.addEventListener(\"abort\",(()=>this.controller.abort())));const l={...i,stream:!0},u=await e.submitToolOutputs(r,n,l,{...o,signal:this.controller.signal});this._connected();for await(const c of u)C(this,t,\"m\",p).call(this,c);if(null==(a=u.controller.signal)?void 0:a.aborted)throw new k.APIUserAbortError;return this._addRun(C(this,t,\"m\",m).call(this))}static createThreadAssistantStream(t,r,n){const i=new e;return i._run((()=>i._threadAssistantStream(t,r,{...n,headers:{...null==n?void 0:n.headers,\"X-Stainless-Helper-Method\":\"stream\"}}))),i}static createAssistantStream(t,r,n,i){const o=new e;return o._run((()=>o._runAssistantStream(t,r,n,{...i,headers:{...null==i?void 0:i.headers,\"X-Stainless-Helper-Method\":\"stream\"}}))),o}currentEvent(){return C(this,d,\"f\")}currentRun(){return C(this,h,\"f\")}currentMessageSnapshot(){return C(this,o,\"f\")}currentRunStepSnapshot(){return C(this,f,\"f\")}async finalRunSteps(){return await this.done(),Object.values(C(this,n,\"f\"))}async finalMessages(){return await this.done(),Object.values(C(this,i,\"f\"))}async finalRun(){if(await this.done(),!C(this,a,\"f\"))throw Error(\"Final run was not received.\");return C(this,a,\"f\")}async _createThreadAssistantStream(e,r,n){var i;const o=null==n?void 0:n.signal;o&&(o.aborted&&this.controller.abort(),o.addEventListener(\"abort\",(()=>this.controller.abort())));const a={...r,stream:!0},s=await e.createAndRun(a,{...n,signal:this.controller.signal});this._connected();for await(const l of s)C(this,t,\"m\",p).call(this,l);if(null==(i=s.controller.signal)?void 0:i.aborted)throw new k.APIUserAbortError;return this._addRun(C(this,t,\"m\",m).call(this))}async _createAssistantStream(e,r,n,i){var o;const a=null==i?void 0:i.signal;a&&(a.aborted&&this.controller.abort(),a.addEventListener(\"abort\",(()=>this.controller.abort())));const s={...n,stream:!0},l=await e.create(r,s,{...i,signal:this.controller.signal});this._connected();for await(const u of l)C(this,t,\"m\",p).call(this,u);if(null==(o=l.controller.signal)?void 0:o.aborted)throw new k.APIUserAbortError;return this._addRun(C(this,t,\"m\",m).call(this))}static accumulateDelta(e,t){for(const[r,n]of Object.entries(t)){if(!e.hasOwnProperty(r)){e[r]=n;continue}let t=e[r];if(null!=t)if(\"index\"!==r&&\"type\"!==r){if(\"string\"==typeof t&&\"string\"==typeof n)t+=n;else if(\"number\"==typeof t&&\"number\"==typeof n)t+=n;else{if(!R.isObj(t)||!R.isObj(n)){if(Array.isArray(t)&&Array.isArray(n)){if(t.every((e=>\"string\"==typeof e||\"number\"==typeof e))){t.push(...n);continue}for(const e of n){if(!R.isObj(e))throw new Error(`Expected array delta entry to be an object but got: ${e}`);const r=e.index;if(null==r)throw import_console_browserify.default.error(e),new Error(\"Expected array delta entry to have an `index` property\");if(\"number\"!=typeof r)throw new Error(`Expected array delta entry \\`index\\` property to be a number but got ${r}`);const n=t[r];null==n?t.push(e):t[r]=this.accumulateDelta(n,e)}continue}throw Error(`Unhandled record type: ${r}, deltaValue: ${n}, accValue: ${t}`)}t=this.accumulateDelta(t,n)}e[r]=t}else e[r]=n;else e[r]=n}return e}_addRun(e){return e}async _threadAssistantStream(e,t,r){return await this._createThreadAssistantStream(t,e,r)}async _runAssistantStream(e,t,r,n){return await this._createAssistantStream(t,e,r,n)}async _runToolAssistantStream(e,t,r,n,i){return await this._createToolAssistantStream(r,e,t,n,i)}constructor(){super(...arguments),t.add(this),r.set(this,[]),n.set(this,{}),i.set(this,{}),o.set(this,void 0),a.set(this,void 0),s.set(this,void 0),l.set(this,void 0),u.set(this,void 0),c.set(this,void 0),d.set(this,void 0),h.set(this,void 0),f.set(this,void 0)}};e.AssistantStream=M,p=function(e){if(!this.ended)switch(T(this,d,e,\"f\"),C(this,t,\"m\",b).call(this,e),e.event){case\"thread.created\":break;case\"thread.run.created\":case\"thread.run.queued\":case\"thread.run.in_progress\":case\"thread.run.requires_action\":case\"thread.run.completed\":case\"thread.run.failed\":case\"thread.run.cancelling\":case\"thread.run.cancelled\":case\"thread.run.expired\":C(this,t,\"m\",w).call(this,e);break;case\"thread.run.step.created\":case\"thread.run.step.in_progress\":case\"thread.run.step.delta\":case\"thread.run.step.completed\":case\"thread.run.step.failed\":case\"thread.run.step.cancelled\":case\"thread.run.step.expired\":C(this,t,\"m\",_).call(this,e);break;case\"thread.message.created\":case\"thread.message.in_progress\":case\"thread.message.delta\":case\"thread.message.completed\":case\"thread.message.incomplete\":C(this,t,\"m\",g).call(this,e);break;case\"error\":throw new Error(\"Encountered an error event in event processing - errors should be processed earlier\")}},m=function(){if(this.ended)throw new k.OpenAIError(\"stream has ended, this shouldn't happen\");if(!C(this,a,\"f\"))throw Error(\"Final run has not been received\");return C(this,a,\"f\")},g=function(e){const[r,n]=C(this,t,\"m\",v).call(this,e,C(this,o,\"f\"));T(this,o,r,\"f\"),C(this,i,\"f\")[r.id]=r;for(const t of n){const e=r.content[t.index];\"text\"==(null==e?void 0:e.type)&&this._emit(\"textCreated\",e.text)}switch(e.event){case\"thread.message.created\":this._emit(\"messageCreated\",e.data);break;case\"thread.message.in_progress\":break;case\"thread.message.delta\":if(this._emit(\"messageDelta\",e.data.delta,r),e.data.delta.content)for(const t of e.data.delta.content){if(\"text\"==t.type&&t.text){let e=t.text,n=r.content[t.index];if(!n||\"text\"!=n.type)throw Error(\"The snapshot associated with this text delta is not text or missing\");this._emit(\"textDelta\",e,n.text)}if(t.index!=C(this,s,\"f\")){if(C(this,l,\"f\"))switch(C(this,l,\"f\").type){case\"text\":this._emit(\"textDone\",C(this,l,\"f\").text,C(this,o,\"f\"));break;case\"image_file\":this._emit(\"imageFileDone\",C(this,l,\"f\").image_file,C(this,o,\"f\"))}T(this,s,t.index,\"f\")}T(this,l,r.content[t.index],\"f\")}break;case\"thread.message.completed\":case\"thread.message.incomplete\":if(void 0!==C(this,s,\"f\")){const t=e.data.content[C(this,s,\"f\")];if(t)switch(t.type){case\"image_file\":this._emit(\"imageFileDone\",t.image_file,C(this,o,\"f\"));break;case\"text\":this._emit(\"textDone\",t.text,C(this,o,\"f\"))}}C(this,o,\"f\")&&this._emit(\"messageDone\",e.data),T(this,o,void 0,\"f\")}},_=function(e){const r=C(this,t,\"m\",y).call(this,e);switch(T(this,f,r,\"f\"),e.event){case\"thread.run.step.created\":this._emit(\"runStepCreated\",e.data);break;case\"thread.run.step.delta\":const t=e.data.delta;if(t.step_details&&\"tool_calls\"==t.step_details.type&&t.step_details.tool_calls&&\"tool_calls\"==r.step_details.type)for(const e of t.step_details.tool_calls)e.index==C(this,u,\"f\")?this._emit(\"toolCallDelta\",e,r.step_details.tool_calls[e.index]):(C(this,c,\"f\")&&this._emit(\"toolCallDone\",C(this,c,\"f\")),T(this,u,e.index,\"f\"),T(this,c,r.step_details.tool_calls[e.index],\"f\"),C(this,c,\"f\")&&this._emit(\"toolCallCreated\",C(this,c,\"f\")));this._emit(\"runStepDelta\",e.data.delta,r);break;case\"thread.run.step.completed\":case\"thread.run.step.failed\":case\"thread.run.step.cancelled\":case\"thread.run.step.expired\":T(this,f,void 0,\"f\"),\"tool_calls\"==e.data.step_details.type&&C(this,c,\"f\")&&(this._emit(\"toolCallDone\",C(this,c,\"f\")),T(this,c,void 0,\"f\")),this._emit(\"runStepDone\",e.data,r)}},b=function(e){C(this,r,\"f\").push(e),this._emit(\"event\",e)},y=function(e){switch(e.event){case\"thread.run.step.created\":return C(this,n,\"f\")[e.data.id]=e.data,e.data;case\"thread.run.step.delta\":let t=C(this,n,\"f\")[e.data.id];if(!t)throw Error(\"Received a RunStepDelta before creation of a snapshot\");let r=e.data;if(r.delta){const i=M.accumulateDelta(t,r.delta);C(this,n,\"f\")[e.data.id]=i}return C(this,n,\"f\")[e.data.id];case\"thread.run.step.completed\":case\"thread.run.step.failed\":case\"thread.run.step.cancelled\":case\"thread.run.step.expired\":case\"thread.run.step.in_progress\":C(this,n,\"f\")[e.data.id]=e.data}if(C(this,n,\"f\")[e.data.id])return C(this,n,\"f\")[e.data.id];throw new Error(\"No snapshot available\")},v=function(e,r){let n=[];switch(e.event){case\"thread.message.created\":return[e.data,n];case\"thread.message.delta\":if(!r)throw Error(\"Received a delta with no existing snapshot (there should be one from message creation)\");let i=e.data;if(i.delta.content)for(const e of i.delta.content)if(e.index in r.content){let n=r.content[e.index];r.content[e.index]=C(this,t,\"m\",A).call(this,e,n)}else r.content[e.index]=e,n.push(e);return[r,n];case\"thread.message.in_progress\":case\"thread.message.completed\":case\"thread.message.incomplete\":if(r)return[r,n];throw Error(\"Received thread message event with no existing snapshot\")}throw Error(\"Tried to accumulate a non-message event\")},A=function(e,t){return M.accumulateDelta(t,e)},w=function(e){switch(T(this,h,e.data,\"f\"),e.event){case\"thread.run.created\":case\"thread.run.queued\":case\"thread.run.in_progress\":case\"thread.run.cancelling\":break;case\"thread.run.requires_action\":case\"thread.run.cancelled\":case\"thread.run.failed\":case\"thread.run.completed\":case\"thread.run.expired\":T(this,a,e.data,\"f\"),C(this,c,\"f\")&&(this._emit(\"toolCallDone\",C(this,c,\"f\")),T(this,c,void 0,\"f\"))}}}}),require_messages3=__commonJS({\"../../node_modules/.pnpm/openai@4.57.1_zod@3.23.8/node_modules/openai/resources/beta/threads/messages.js\"(e){init_globals();var t=e&&e.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!(\"get\"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=e&&e.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,\"default\",{enumerable:!0,value:t})}:function(e,t){e.default=t}),n=e&&e.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(null!=e)for(var i in e)\"default\"!==i&&Object.prototype.hasOwnProperty.call(e,i)&&t(n,e,i);return r(n,e),n};Object.defineProperty(e,\"__esModule\",{value:!0}),e.MessagesPage=e.Messages=void 0;var i=require_resource2(),o=require_core2(),a=n(require_messages3()),s=require_pagination2(),l=class extends i.APIResource{create(e,t,r){return this._client.post(`/threads/${e}/messages`,{body:t,...r,headers:{\"OpenAI-Beta\":\"assistants=v2\",...null==r?void 0:r.headers}})}retrieve(e,t,r){return this._client.get(`/threads/${e}/messages/${t}`,{...r,headers:{\"OpenAI-Beta\":\"assistants=v2\",...null==r?void 0:r.headers}})}update(e,t,r,n){return this._client.post(`/threads/${e}/messages/${t}`,{body:r,...n,headers:{\"OpenAI-Beta\":\"assistants=v2\",...null==n?void 0:n.headers}})}list(e,t={},r){return(0,o.isRequestOptions)(t)?this.list(e,{},t):this._client.getAPIList(`/threads/${e}/messages`,u,{query:t,...r,headers:{\"OpenAI-Beta\":\"assistants=v2\",...null==r?void 0:r.headers}})}del(e,t,r){return this._client.delete(`/threads/${e}/messages/${t}`,{...r,headers:{\"OpenAI-Beta\":\"assistants=v2\",...null==r?void 0:r.headers}})}};e.Messages=l;var u=class extends s.CursorPage{};e.MessagesPage=u,(l=e.Messages||(e.Messages={})).MessagesPage=a.MessagesPage}}),require_steps=__commonJS({\"../../node_modules/.pnpm/openai@4.57.1_zod@3.23.8/node_modules/openai/resources/beta/threads/runs/steps.js\"(e){init_globals();var t=e&&e.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!(\"get\"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=e&&e.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,\"default\",{enumerable:!0,value:t})}:function(e,t){e.default=t}),n=e&&e.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(null!=e)for(var i in e)\"default\"!==i&&Object.prototype.hasOwnProperty.call(e,i)&&t(n,e,i);return r(n,e),n};Object.defineProperty(e,\"__esModule\",{value:!0}),e.RunStepsPage=e.Steps=void 0;var i=require_resource2(),o=require_core2(),a=n(require_steps()),s=require_pagination2(),l=class extends i.APIResource{retrieve(e,t,r,n={},i){return(0,o.isRequestOptions)(n)?this.retrieve(e,t,r,{},n):this._client.get(`/threads/${e}/runs/${t}/steps/${r}`,{query:n,...i,headers:{\"OpenAI-Beta\":\"assistants=v2\",...null==i?void 0:i.headers}})}list(e,t,r={},n){return(0,o.isRequestOptions)(r)?this.list(e,t,{},r):this._client.getAPIList(`/threads/${e}/runs/${t}/steps`,u,{query:r,...n,headers:{\"OpenAI-Beta\":\"assistants=v2\",...null==n?void 0:n.headers}})}};e.Steps=l;var u=class extends s.CursorPage{};e.RunStepsPage=u,(l=e.Steps||(e.Steps={})).RunStepsPage=a.RunStepsPage}}),require_runs=__commonJS({\"../../node_modules/.pnpm/openai@4.57.1_zod@3.23.8/node_modules/openai/resources/beta/threads/runs/runs.js\"(e){init_globals();var t=e&&e.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!(\"get\"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=e&&e.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,\"default\",{enumerable:!0,value:t})}:function(e,t){e.default=t}),n=e&&e.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(null!=e)for(var i in e)\"default\"!==i&&Object.prototype.hasOwnProperty.call(e,i)&&t(n,e,i);return r(n,e),n};Object.defineProperty(e,\"__esModule\",{value:!0}),e.RunsPage=e.Runs=void 0;var i=require_resource2(),o=require_core2(),a=require_AssistantStream(),s=require_core2(),l=n(require_runs()),u=n(require_steps()),c=require_pagination2(),d=class extends i.APIResource{create(e,t,r){var n;const{include:i,...o}=t;return this._client.post(`/threads/${e}/runs`,{query:{include:i},body:o,...r,headers:{\"OpenAI-Beta\":\"assistants=v2\",...null==r?void 0:r.headers},stream:null!=(n=t.stream)&&n})}retrieve(e,t,r){return this._client.get(`/threads/${e}/runs/${t}`,{...r,headers:{\"OpenAI-Beta\":\"assistants=v2\",...null==r?void 0:r.headers}})}update(e,t,r,n){return this._client.post(`/threads/${e}/runs/${t}`,{body:r,...n,headers:{\"OpenAI-Beta\":\"assistants=v2\",...null==n?void 0:n.headers}})}list(e,t={},r){return(0,o.isRequestOptions)(t)?this.list(e,{},t):this._client.getAPIList(`/threads/${e}/runs`,f,{query:t,...r,headers:{\"OpenAI-Beta\":\"assistants=v2\",...null==r?void 0:r.headers}})}cancel(e,t,r){return this._client.post(`/threads/${e}/runs/${t}/cancel`,{...r,headers:{\"OpenAI-Beta\":\"assistants=v2\",...null==r?void 0:r.headers}})}async createAndPoll(e,t,r){const n=await this.create(e,t,r);return await this.poll(e,n.id,r)}createAndStream(e,t,r){return a.AssistantStream.createAssistantStream(e,this._client.beta.threads.runs,t,r)}async poll(e,t,r){const n={...null==r?void 0:r.headers,\"X-Stainless-Poll-Helper\":\"true\"};for((null==r?void 0:r.pollIntervalMs)&&(n[\"X-Stainless-Custom-Poll-Interval\"]=r.pollIntervalMs.toString());;){const{data:i,response:o}=await this.retrieve(e,t,{...r,headers:{...null==r?void 0:r.headers,...n}}).withResponse();switch(i.status){case\"queued\":case\"in_progress\":case\"cancelling\":let e=5e3;if(null==r?void 0:r.pollIntervalMs)e=r.pollIntervalMs;else{const t=o.headers.get(\"openai-poll-after-ms\");if(t){const r=parseInt(t);isNaN(r)||(e=r)}}await(0,s.sleep)(e);break;case\"requires_action\":case\"incomplete\":case\"cancelled\":case\"completed\":case\"failed\":case\"expired\":return i}}}stream(e,t,r){return a.AssistantStream.createAssistantStream(e,this._client.beta.threads.runs,t,r)}submitToolOutputs(e,t,r,n){var i;return this._client.post(`/threads/${e}/runs/${t}/submit_tool_outputs`,{body:r,...n,headers:{\"OpenAI-Beta\":\"assistants=v2\",...null==n?void 0:n.headers},stream:null!=(i=r.stream)&&i})}async submitToolOutputsAndPoll(e,t,r,n){const i=await this.submitToolOutputs(e,t,r,n);return await this.poll(e,i.id,n)}submitToolOutputsStream(e,t,r,n){return a.AssistantStream.createToolAssistantStream(e,t,this._client.beta.threads.runs,r,n)}constructor(){super(...arguments),this.steps=new u.Steps(this._client)}};e.Runs=d;var h,f=class extends c.CursorPage{};e.RunsPage=f,(h=d=e.Runs||(e.Runs={})).RunsPage=l.RunsPage,h.Steps=u.Steps,h.RunStepsPage=u.RunStepsPage}}),require_threads=__commonJS({\"../../node_modules/.pnpm/openai@4.57.1_zod@3.23.8/node_modules/openai/resources/beta/threads/threads.js\"(e){init_globals();var t=e&&e.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!(\"get\"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=e&&e.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,\"default\",{enumerable:!0,value:t})}:function(e,t){e.default=t}),n=e&&e.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(null!=e)for(var i in e)\"default\"!==i&&Object.prototype.hasOwnProperty.call(e,i)&&t(n,e,i);return r(n,e),n};Object.defineProperty(e,\"__esModule\",{value:!0}),e.Threads=void 0;var i,o=require_resource2(),a=require_core2(),s=require_AssistantStream(),l=n(require_messages3()),u=n(require_runs()),c=class extends o.APIResource{create(e={},t){return(0,a.isRequestOptions)(e)?this.create({},e):this._client.post(\"/threads\",{body:e,...t,headers:{\"OpenAI-Beta\":\"assistants=v2\",...null==t?void 0:t.headers}})}retrieve(e,t){return this._client.get(`/threads/${e}`,{...t,headers:{\"OpenAI-Beta\":\"assistants=v2\",...null==t?void 0:t.headers}})}update(e,t,r){return this._client.post(`/threads/${e}`,{body:t,...r,headers:{\"OpenAI-Beta\":\"assistants=v2\",...null==r?void 0:r.headers}})}del(e,t){return this._client.delete(`/threads/${e}`,{...t,headers:{\"OpenAI-Beta\":\"assistants=v2\",...null==t?void 0:t.headers}})}createAndRun(e,t){var r;return this._client.post(\"/threads/runs\",{body:e,...t,headers:{\"OpenAI-Beta\":\"assistants=v2\",...null==t?void 0:t.headers},stream:null!=(r=e.stream)&&r})}async createAndRunPoll(e,t){const r=await this.createAndRun(e,t);return await this.runs.poll(r.thread_id,r.id,t)}createAndRunStream(e,t){return s.AssistantStream.createThreadAssistantStream(e,this._client.beta.threads,t)}constructor(){super(...arguments),this.runs=new u.Runs(this._client),this.messages=new l.Messages(this._client)}};e.Threads=c,(i=c=e.Threads||(e.Threads={})).Runs=u.Runs,i.RunsPage=u.RunsPage,i.Messages=l.Messages,i.MessagesPage=l.MessagesPage}}),require_Util=__commonJS({\"../../node_modules/.pnpm/openai@4.57.1_zod@3.23.8/node_modules/openai/lib/Util.js\"(e){init_globals(),Object.defineProperty(e,\"__esModule\",{value:!0}),e.allSettledWithThrow=void 0,e.allSettledWithThrow=async e=>{const t=await Promise.allSettled(e),r=t.filter((e=>\"rejected\"===e.status));if(r.length){for(const e of r)import_console_browserify.default.error(e.reason);throw new Error(`${r.length} promise(s) failed - see the above errors`)}const n=[];for(const i of t)\"fulfilled\"===i.status&&n.push(i.value);return n}}}),require_files=__commonJS({\"../../node_modules/.pnpm/openai@4.57.1_zod@3.23.8/node_modules/openai/resources/beta/vector-stores/files.js\"(e){init_globals();var t=e&&e.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!(\"get\"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=e&&e.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,\"default\",{enumerable:!0,value:t})}:function(e,t){e.default=t}),n=e&&e.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(null!=e)for(var i in e)\"default\"!==i&&Object.prototype.hasOwnProperty.call(e,i)&&t(n,e,i);return r(n,e),n};Object.defineProperty(e,\"__esModule\",{value:!0}),e.VectorStoreFilesPage=e.Files=void 0;var i=require_resource2(),o=require_core2(),a=n(require_files()),s=require_pagination2(),l=class extends i.APIResource{create(e,t,r){return this._client.post(`/vector_stores/${e}/files`,{body:t,...r,headers:{\"OpenAI-Beta\":\"assistants=v2\",...null==r?void 0:r.headers}})}retrieve(e,t,r){return this._client.get(`/vector_stores/${e}/files/${t}`,{...r,headers:{\"OpenAI-Beta\":\"assistants=v2\",...null==r?void 0:r.headers}})}list(e,t={},r){return(0,o.isRequestOptions)(t)?this.list(e,{},t):this._client.getAPIList(`/vector_stores/${e}/files`,u,{query:t,...r,headers:{\"OpenAI-Beta\":\"assistants=v2\",...null==r?void 0:r.headers}})}del(e,t,r){return this._client.delete(`/vector_stores/${e}/files/${t}`,{...r,headers:{\"OpenAI-Beta\":\"assistants=v2\",...null==r?void 0:r.headers}})}async createAndPoll(e,t,r){const n=await this.create(e,t,r);return await this.poll(e,n.id,r)}async poll(e,t,r){const n={...null==r?void 0:r.headers,\"X-Stainless-Poll-Helper\":\"true\"};for((null==r?void 0:r.pollIntervalMs)&&(n[\"X-Stainless-Custom-Poll-Interval\"]=r.pollIntervalMs.toString());;){const i=await this.retrieve(e,t,{...r,headers:n}).withResponse(),a=i.data;switch(a.status){case\"in_progress\":let e=5e3;if(null==r?void 0:r.pollIntervalMs)e=r.pollIntervalMs;else{const t=i.response.headers.get(\"openai-poll-after-ms\");if(t){const r=parseInt(t);isNaN(r)||(e=r)}}await(0,o.sleep)(e);break;case\"failed\":case\"completed\":return a}}}async upload(e,t,r){const n=await this._client.files.create({file:t,purpose:\"assistants\"},r);return this.create(e,{file_id:n.id},r)}async uploadAndPoll(e,t,r){const n=await this.upload(e,t,r);return await this.poll(e,n.id,r)}};e.Files=l;var u=class extends s.CursorPage{};e.VectorStoreFilesPage=u,(l=e.Files||(e.Files={})).VectorStoreFilesPage=a.VectorStoreFilesPage}}),require_file_batches=__commonJS({\"../../node_modules/.pnpm/openai@4.57.1_zod@3.23.8/node_modules/openai/resources/beta/vector-stores/file-batches.js\"(e){init_globals(),Object.defineProperty(e,\"__esModule\",{value:!0}),e.VectorStoreFilesPage=e.FileBatches=void 0;var t=require_resource2(),r=require_core2(),n=require_core2(),i=require_Util(),o=require_files();Object.defineProperty(e,\"VectorStoreFilesPage\",{enumerable:!0,get:function(){return o.VectorStoreFilesPage}});var a=class extends t.APIResource{create(e,t,r){return this._client.post(`/vector_stores/${e}/file_batches`,{body:t,...r,headers:{\"OpenAI-Beta\":\"assistants=v2\",...null==r?void 0:r.headers}})}retrieve(e,t,r){return this._client.get(`/vector_stores/${e}/file_batches/${t}`,{...r,headers:{\"OpenAI-Beta\":\"assistants=v2\",...null==r?void 0:r.headers}})}cancel(e,t,r){return this._client.post(`/vector_stores/${e}/file_batches/${t}/cancel`,{...r,headers:{\"OpenAI-Beta\":\"assistants=v2\",...null==r?void 0:r.headers}})}async createAndPoll(e,t,r){const n=await this.create(e,t);return await this.poll(e,n.id,r)}listFiles(e,t,n={},i){return(0,r.isRequestOptions)(n)?this.listFiles(e,t,{},n):this._client.getAPIList(`/vector_stores/${e}/file_batches/${t}/files`,o.VectorStoreFilesPage,{query:n,...i,headers:{\"OpenAI-Beta\":\"assistants=v2\",...null==i?void 0:i.headers}})}async poll(e,t,r){const i={...null==r?void 0:r.headers,\"X-Stainless-Poll-Helper\":\"true\"};for((null==r?void 0:r.pollIntervalMs)&&(i[\"X-Stainless-Custom-Poll-Interval\"]=r.pollIntervalMs.toString());;){const{data:o,response:a}=await this.retrieve(e,t,{...r,headers:i}).withResponse();switch(o.status){case\"in_progress\":let e=5e3;if(null==r?void 0:r.pollIntervalMs)e=r.pollIntervalMs;else{const t=a.headers.get(\"openai-poll-after-ms\");if(t){const r=parseInt(t);isNaN(r)||(e=r)}}await(0,n.sleep)(e);break;case\"failed\":case\"cancelled\":case\"completed\":return o}}}async uploadAndPoll(e,{files:t,fileIds:r=[]},n){var o;if(null==t||0==t.length)throw new Error(\"No `files` provided to process. If you've already uploaded files you should use `.createAndPoll()` instead\");const a=null!=(o=null==n?void 0:n.maxConcurrency)?o:5,s=Math.min(a,t.length),l=this._client,u=t.values(),c=[...r],d=Array(s).fill(u).map((async function(e){for(let t of e){const e=await l.files.create({file:t,purpose:\"assistants\"},n);c.push(e.id)}}));return await(0,i.allSettledWithThrow)(d),await this.createAndPoll(e,{file_ids:c})}};e.FileBatches=a,a=e.FileBatches||(e.FileBatches={})}}),require_vector_stores=__commonJS({\"../../node_modules/.pnpm/openai@4.57.1_zod@3.23.8/node_modules/openai/resources/beta/vector-stores/vector-stores.js\"(e){init_globals();var t=e&&e.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!(\"get\"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=e&&e.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,\"default\",{enumerable:!0,value:t})}:function(e,t){e.default=t}),n=e&&e.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(null!=e)for(var i in e)\"default\"!==i&&Object.prototype.hasOwnProperty.call(e,i)&&t(n,e,i);return r(n,e),n};Object.defineProperty(e,\"__esModule\",{value:!0}),e.VectorStoresPage=e.VectorStores=void 0;var i=require_resource2(),o=require_core2(),a=n(require_vector_stores()),s=n(require_file_batches()),l=n(require_files()),u=require_pagination2(),c=class extends i.APIResource{create(e,t){return this._client.post(\"/vector_stores\",{body:e,...t,headers:{\"OpenAI-Beta\":\"assistants=v2\",...null==t?void 0:t.headers}})}retrieve(e,t){return this._client.get(`/vector_stores/${e}`,{...t,headers:{\"OpenAI-Beta\":\"assistants=v2\",...null==t?void 0:t.headers}})}update(e,t,r){return this._client.post(`/vector_stores/${e}`,{body:t,...r,headers:{\"OpenAI-Beta\":\"assistants=v2\",...null==r?void 0:r.headers}})}list(e={},t){return(0,o.isRequestOptions)(e)?this.list({},e):this._client.getAPIList(\"/vector_stores\",h,{query:e,...t,headers:{\"OpenAI-Beta\":\"assistants=v2\",...null==t?void 0:t.headers}})}del(e,t){return this._client.delete(`/vector_stores/${e}`,{...t,headers:{\"OpenAI-Beta\":\"assistants=v2\",...null==t?void 0:t.headers}})}constructor(){super(...arguments),this.files=new l.Files(this._client),this.fileBatches=new s.FileBatches(this._client)}};e.VectorStores=c;var d,h=class extends u.CursorPage{};e.VectorStoresPage=h,(d=c=e.VectorStores||(e.VectorStores={})).VectorStoresPage=a.VectorStoresPage,d.Files=l.Files,d.VectorStoreFilesPage=l.VectorStoreFilesPage,d.FileBatches=s.FileBatches}}),require_beta2=__commonJS({\"../../node_modules/.pnpm/openai@4.57.1_zod@3.23.8/node_modules/openai/resources/beta/beta.js\"(e){init_globals();var t=e&&e.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!(\"get\"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=e&&e.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,\"default\",{enumerable:!0,value:t})}:function(e,t){e.default=t}),n=e&&e.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(null!=e)for(var i in e)\"default\"!==i&&Object.prototype.hasOwnProperty.call(e,i)&&t(n,e,i);return r(n,e),n};Object.defineProperty(e,\"__esModule\",{value:!0}),e.Beta=void 0;var i,o=require_resource2(),a=n(require_assistants()),s=n(require_chat3()),l=n(require_threads()),u=n(require_vector_stores()),c=class extends o.APIResource{constructor(){super(...arguments),this.vectorStores=new u.VectorStores(this._client),this.chat=new s.Chat(this._client),this.assistants=new a.Assistants(this._client),this.threads=new l.Threads(this._client)}};e.Beta=c,(i=c=e.Beta||(e.Beta={})).VectorStores=u.VectorStores,i.VectorStoresPage=u.VectorStoresPage,i.Chat=s.Chat,i.Assistants=a.Assistants,i.AssistantsPage=a.AssistantsPage,i.Threads=l.Threads}}),require_completions4=__commonJS({\"../../node_modules/.pnpm/openai@4.57.1_zod@3.23.8/node_modules/openai/resources/completions.js\"(e){init_globals(),Object.defineProperty(e,\"__esModule\",{value:!0}),e.Completions=void 0;var t=require_resource2(),r=class extends t.APIResource{create(e,t){var r;return this._client.post(\"/completions\",{body:e,...t,stream:null!=(r=e.stream)&&r})}};e.Completions=r,r=e.Completions||(e.Completions={})}}),require_embeddings=__commonJS({\"../../node_modules/.pnpm/openai@4.57.1_zod@3.23.8/node_modules/openai/resources/embeddings.js\"(e){init_globals(),Object.defineProperty(e,\"__esModule\",{value:!0}),e.Embeddings=void 0;var t=require_resource2(),r=class extends t.APIResource{create(e,t){return this._client.post(\"/embeddings\",{body:e,...t})}};e.Embeddings=r,r=e.Embeddings||(e.Embeddings={})}}),require_files2=__commonJS({\"../../node_modules/.pnpm/openai@4.57.1_zod@3.23.8/node_modules/openai/resources/files.js\"(e){init_globals();var t=e&&e.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!(\"get\"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=e&&e.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,\"default\",{enumerable:!0,value:t})}:function(e,t){e.default=t}),n=e&&e.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(null!=e)for(var i in e)\"default\"!==i&&Object.prototype.hasOwnProperty.call(e,i)&&t(n,e,i);return r(n,e),n};Object.defineProperty(e,\"__esModule\",{value:!0}),e.FileObjectsPage=e.Files=void 0;var i=require_resource2(),o=require_core2(),a=require_core2(),s=require_error2(),l=n(require_core2()),u=n(require_files2()),c=require_pagination2(),d=class extends i.APIResource{create(e,t){return this._client.post(\"/files\",l.multipartFormRequestOptions({body:e,...t}))}retrieve(e,t){return this._client.get(`/files/${e}`,t)}list(e={},t){return(0,o.isRequestOptions)(e)?this.list({},e):this._client.getAPIList(\"/files\",h,{query:e,...t})}del(e,t){return this._client.delete(`/files/${e}`,t)}content(e,t){return this._client.get(`/files/${e}/content`,{...t,__binaryResponse:!0})}retrieveContent(e,t){return this._client.get(`/files/${e}/content`,{...t,headers:{Accept:\"application/json\",...null==t?void 0:t.headers}})}async waitForProcessing(e,{pollInterval:t=5e3,maxWait:r=18e5}={}){const n=new Set([\"processed\",\"error\",\"deleted\"]),i=Date.now();let o=await this.retrieve(e);for(;!o.status||!n.has(o.status);)if(await(0,a.sleep)(t),o=await this.retrieve(e),Date.now()-i>r)throw new s.APIConnectionTimeoutError({message:`Giving up on waiting for file ${e} to finish processing after ${r} milliseconds.`});return o}};e.Files=d;var h=class extends c.Page{};e.FileObjectsPage=h,(d=e.Files||(e.Files={})).FileObjectsPage=u.FileObjectsPage}}),require_checkpoints=__commonJS({\"../../node_modules/.pnpm/openai@4.57.1_zod@3.23.8/node_modules/openai/resources/fine-tuning/jobs/checkpoints.js\"(e){init_globals();var t=e&&e.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!(\"get\"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=e&&e.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,\"default\",{enumerable:!0,value:t})}:function(e,t){e.default=t}),n=e&&e.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(null!=e)for(var i in e)\"default\"!==i&&Object.prototype.hasOwnProperty.call(e,i)&&t(n,e,i);return r(n,e),n};Object.defineProperty(e,\"__esModule\",{value:!0}),e.FineTuningJobCheckpointsPage=e.Checkpoints=void 0;var i=require_resource2(),o=require_core2(),a=n(require_checkpoints()),s=require_pagination2(),l=class extends i.APIResource{list(e,t={},r){return(0,o.isRequestOptions)(t)?this.list(e,{},t):this._client.getAPIList(`/fine_tuning/jobs/${e}/checkpoints`,u,{query:t,...r})}};e.Checkpoints=l;var u=class extends s.CursorPage{};e.FineTuningJobCheckpointsPage=u,(l=e.Checkpoints||(e.Checkpoints={})).FineTuningJobCheckpointsPage=a.FineTuningJobCheckpointsPage}}),require_jobs=__commonJS({\"../../node_modules/.pnpm/openai@4.57.1_zod@3.23.8/node_modules/openai/resources/fine-tuning/jobs/jobs.js\"(e){init_globals();var t=e&&e.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!(\"get\"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=e&&e.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,\"default\",{enumerable:!0,value:t})}:function(e,t){e.default=t}),n=e&&e.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(null!=e)for(var i in e)\"default\"!==i&&Object.prototype.hasOwnProperty.call(e,i)&&t(n,e,i);return r(n,e),n};Object.defineProperty(e,\"__esModule\",{value:!0}),e.FineTuningJobEventsPage=e.FineTuningJobsPage=e.Jobs=void 0;var i=require_resource2(),o=require_core2(),a=n(require_jobs()),s=n(require_checkpoints()),l=require_pagination2(),u=class extends i.APIResource{create(e,t){return this._client.post(\"/fine_tuning/jobs\",{body:e,...t})}retrieve(e,t){return this._client.get(`/fine_tuning/jobs/${e}`,t)}list(e={},t){return(0,o.isRequestOptions)(e)?this.list({},e):this._client.getAPIList(\"/fine_tuning/jobs\",c,{query:e,...t})}cancel(e,t){return this._client.post(`/fine_tuning/jobs/${e}/cancel`,t)}listEvents(e,t={},r){return(0,o.isRequestOptions)(t)?this.listEvents(e,{},t):this._client.getAPIList(`/fine_tuning/jobs/${e}/events`,h,{query:t,...r})}constructor(){super(...arguments),this.checkpoints=new s.Checkpoints(this._client)}};e.Jobs=u;var c=class extends l.CursorPage{};e.FineTuningJobsPage=c;var d,h=class extends l.CursorPage{};e.FineTuningJobEventsPage=h,(d=u=e.Jobs||(e.Jobs={})).FineTuningJobsPage=a.FineTuningJobsPage,d.FineTuningJobEventsPage=a.FineTuningJobEventsPage,d.Checkpoints=s.Checkpoints,d.FineTuningJobCheckpointsPage=s.FineTuningJobCheckpointsPage}}),require_fine_tuning=__commonJS({\"../../node_modules/.pnpm/openai@4.57.1_zod@3.23.8/node_modules/openai/resources/fine-tuning/fine-tuning.js\"(e){init_globals();var t=e&&e.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!(\"get\"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=e&&e.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,\"default\",{enumerable:!0,value:t})}:function(e,t){e.default=t}),n=e&&e.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(null!=e)for(var i in e)\"default\"!==i&&Object.prototype.hasOwnProperty.call(e,i)&&t(n,e,i);return r(n,e),n};Object.defineProperty(e,\"__esModule\",{value:!0}),e.FineTuning=void 0;var i,o=require_resource2(),a=n(require_jobs()),s=class extends o.APIResource{constructor(){super(...arguments),this.jobs=new a.Jobs(this._client)}};e.FineTuning=s,(i=s=e.FineTuning||(e.FineTuning={})).Jobs=a.Jobs,i.FineTuningJobsPage=a.FineTuningJobsPage,i.FineTuningJobEventsPage=a.FineTuningJobEventsPage}}),require_images=__commonJS({\"../../node_modules/.pnpm/openai@4.57.1_zod@3.23.8/node_modules/openai/resources/images.js\"(e){init_globals();var t=e&&e.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!(\"get\"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=e&&e.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,\"default\",{enumerable:!0,value:t})}:function(e,t){e.default=t}),n=e&&e.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(null!=e)for(var i in e)\"default\"!==i&&Object.prototype.hasOwnProperty.call(e,i)&&t(n,e,i);return r(n,e),n};Object.defineProperty(e,\"__esModule\",{value:!0}),e.Images=void 0;var i=require_resource2(),o=n(require_core2()),a=class extends i.APIResource{createVariation(e,t){return this._client.post(\"/images/variations\",o.multipartFormRequestOptions({body:e,...t}))}edit(e,t){return this._client.post(\"/images/edits\",o.multipartFormRequestOptions({body:e,...t}))}generate(e,t){return this._client.post(\"/images/generations\",{body:e,...t})}};e.Images=a,a=e.Images||(e.Images={})}}),require_models3=__commonJS({\"../../node_modules/.pnpm/openai@4.57.1_zod@3.23.8/node_modules/openai/resources/models.js\"(e){init_globals();var t=e&&e.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!(\"get\"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=e&&e.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,\"default\",{enumerable:!0,value:t})}:function(e,t){e.default=t}),n=e&&e.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(null!=e)for(var i in e)\"default\"!==i&&Object.prototype.hasOwnProperty.call(e,i)&&t(n,e,i);return r(n,e),n};Object.defineProperty(e,\"__esModule\",{value:!0}),e.ModelsPage=e.Models=void 0;var i=require_resource2(),o=n(require_models3()),a=require_pagination2(),s=class extends i.APIResource{retrieve(e,t){return this._client.get(`/models/${e}`,t)}list(e){return this._client.getAPIList(\"/models\",l,e)}del(e,t){return this._client.delete(`/models/${e}`,t)}};e.Models=s;var l=class extends a.Page{};e.ModelsPage=l,(s=e.Models||(e.Models={})).ModelsPage=o.ModelsPage}}),require_moderations=__commonJS({\"../../node_modules/.pnpm/openai@4.57.1_zod@3.23.8/node_modules/openai/resources/moderations.js\"(e){init_globals(),Object.defineProperty(e,\"__esModule\",{value:!0}),e.Moderations=void 0;var t=require_resource2(),r=class extends t.APIResource{create(e,t){return this._client.post(\"/moderations\",{body:e,...t})}};e.Moderations=r,r=e.Moderations||(e.Moderations={})}}),require_parts=__commonJS({\"../../node_modules/.pnpm/openai@4.57.1_zod@3.23.8/node_modules/openai/resources/uploads/parts.js\"(e){init_globals();var t=e&&e.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!(\"get\"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=e&&e.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,\"default\",{enumerable:!0,value:t})}:function(e,t){e.default=t}),n=e&&e.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(null!=e)for(var i in e)\"default\"!==i&&Object.prototype.hasOwnProperty.call(e,i)&&t(n,e,i);return r(n,e),n};Object.defineProperty(e,\"__esModule\",{value:!0}),e.Parts=void 0;var i=require_resource2(),o=n(require_core2()),a=class extends i.APIResource{create(e,t,r){return this._client.post(`/uploads/${e}/parts`,o.multipartFormRequestOptions({body:t,...r}))}};e.Parts=a,a=e.Parts||(e.Parts={})}}),require_uploads3=__commonJS({\"../../node_modules/.pnpm/openai@4.57.1_zod@3.23.8/node_modules/openai/resources/uploads/uploads.js\"(e){init_globals();var t=e&&e.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!(\"get\"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=e&&e.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,\"default\",{enumerable:!0,value:t})}:function(e,t){e.default=t}),n=e&&e.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(null!=e)for(var i in e)\"default\"!==i&&Object.prototype.hasOwnProperty.call(e,i)&&t(n,e,i);return r(n,e),n};Object.defineProperty(e,\"__esModule\",{value:!0}),e.Uploads=void 0;var i=require_resource2(),o=n(require_parts()),a=class extends i.APIResource{create(e,t){return this._client.post(\"/uploads\",{body:e,...t})}cancel(e,t){return this._client.post(`/uploads/${e}/cancel`,t)}complete(e,t,r){return this._client.post(`/uploads/${e}/complete`,{body:t,...r})}constructor(){super(...arguments),this.parts=new o.Parts(this._client)}};e.Uploads=a,(a=e.Uploads||(e.Uploads={})).Parts=o.Parts}}),require_resources2=__commonJS({\"../../node_modules/.pnpm/openai@4.57.1_zod@3.23.8/node_modules/openai/resources/index.js\"(e){init_globals();var t=e&&e.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!(\"get\"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=e&&e.__exportStar||function(e,r){for(var n in e)\"default\"===n||Object.prototype.hasOwnProperty.call(r,n)||t(r,e,n)};Object.defineProperty(e,\"__esModule\",{value:!0}),e.Uploads=e.Moderations=e.Models=e.ModelsPage=e.Images=e.FineTuning=e.Files=e.FileObjectsPage=e.Embeddings=e.Completions=e.Beta=e.Batches=e.BatchesPage=e.Audio=void 0,r(require_chat2(),e),r(require_shared2(),e);var n=require_audio();Object.defineProperty(e,\"Audio\",{enumerable:!0,get:function(){return n.Audio}});var i=require_batches3();Object.defineProperty(e,\"BatchesPage\",{enumerable:!0,get:function(){return i.BatchesPage}}),Object.defineProperty(e,\"Batches\",{enumerable:!0,get:function(){return i.Batches}});var o=require_beta2();Object.defineProperty(e,\"Beta\",{enumerable:!0,get:function(){return o.Beta}});var a=require_completions4();Object.defineProperty(e,\"Completions\",{enumerable:!0,get:function(){return a.Completions}});var s=require_embeddings();Object.defineProperty(e,\"Embeddings\",{enumerable:!0,get:function(){return s.Embeddings}});var l=require_files2();Object.defineProperty(e,\"FileObjectsPage\",{enumerable:!0,get:function(){return l.FileObjectsPage}}),Object.defineProperty(e,\"Files\",{enumerable:!0,get:function(){return l.Files}});var u=require_fine_tuning();Object.defineProperty(e,\"FineTuning\",{enumerable:!0,get:function(){return u.FineTuning}});var c=require_images();Object.defineProperty(e,\"Images\",{enumerable:!0,get:function(){return c.Images}});var d=require_models3();Object.defineProperty(e,\"ModelsPage\",{enumerable:!0,get:function(){return d.ModelsPage}}),Object.defineProperty(e,\"Models\",{enumerable:!0,get:function(){return d.Models}});var h=require_moderations();Object.defineProperty(e,\"Moderations\",{enumerable:!0,get:function(){return h.Moderations}});var f=require_uploads3();Object.defineProperty(e,\"Uploads\",{enumerable:!0,get:function(){return f.Uploads}})}}),require_openai=__commonJS({\"../../node_modules/.pnpm/openai@4.57.1_zod@3.23.8/node_modules/openai/index.js\"(e,t){init_globals();var r,n=e&&e.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!(\"get\"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=e&&e.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,\"default\",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=e&&e.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)\"default\"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(e,\"__esModule\",{value:!0}),e.AzureOpenAI=e.fileFromPath=e.toFile=e.UnprocessableEntityError=e.PermissionDeniedError=e.InternalServerError=e.AuthenticationError=e.BadRequestError=e.RateLimitError=e.ConflictError=e.NotFoundError=e.APIUserAbortError=e.APIConnectionTimeoutError=e.APIConnectionError=e.APIError=e.OpenAIError=e.OpenAI=void 0;var a,s=o(require_error2()),l=o(require_uploads2()),u=o(require_lib2()),c=o(require_core2()),d=o(require_pagination2()),h=o(require_resources2()),f=class extends c.APIClient{defaultQuery(){return this._options.defaultQuery}defaultHeaders(e){return{...super.defaultHeaders(e),\"OpenAI-Organization\":this.organization,\"OpenAI-Project\":this.project,...this._options.defaultHeaders}}authHeaders(e){return{Authorization:`Bearer ${this.apiKey}`}}stringifyQuery(e){return u.stringify(e,{arrayFormat:\"brackets\"})}constructor({baseURL:e=c.readEnv(\"OPENAI_BASE_URL\"),apiKey:t=c.readEnv(\"OPENAI_API_KEY\"),organization:r=(e=>null!=(e=c.readEnv(\"OPENAI_ORG_ID\"))?e:null)(),project:n=(e=>null!=(e=c.readEnv(\"OPENAI_PROJECT_ID\"))?e:null)(),...i}={}){var o;if(void 0===t)throw new s.OpenAIError(\"The OPENAI_API_KEY environment variable is missing or empty; either provide it, or instantiate the OpenAI client with an apiKey option, like new OpenAI({ apiKey: 'My API Key' }).\");const a={apiKey:t,organization:r,project:n,...i,baseURL:e||\"https://api.openai.com/v1\"};if(!a.dangerouslyAllowBrowser&&c.isRunningInBrowser())throw new s.OpenAIError(\"It looks like you're running in a browser-like environment.\\n\\nThis is disabled by default, as it risks exposing your secret API credentials to attackers.\\nIf you understand the risks and have appropriate mitigations in place,\\nyou can set the `dangerouslyAllowBrowser` option to `true`, e.g.,\\n\\nnew OpenAI({ apiKey, dangerouslyAllowBrowser: true });\\n\\nhttps://help.openai.com/en/articles/5112595-best-practices-for-api-key-safety\\n\");super({baseURL:a.baseURL,timeout:null!=(o=a.timeout)?o:6e5,httpAgent:a.httpAgent,maxRetries:a.maxRetries,fetch:a.fetch}),this.completions=new h.Completions(this),this.chat=new h.Chat(this),this.embeddings=new h.Embeddings(this),this.files=new h.Files(this),this.images=new h.Images(this),this.audio=new h.Audio(this),this.moderations=new h.Moderations(this),this.models=new h.Models(this),this.fineTuning=new h.FineTuning(this),this.beta=new h.Beta(this),this.batches=new h.Batches(this),this.uploads=new h.Uploads(this),this._options=a,this.apiKey=t,this.organization=r,this.project=n}};e.OpenAI=f,r=f,f.OpenAI=r,f.DEFAULT_TIMEOUT=6e5,f.OpenAIError=s.OpenAIError,f.APIError=s.APIError,f.APIConnectionError=s.APIConnectionError,f.APIConnectionTimeoutError=s.APIConnectionTimeoutError,f.APIUserAbortError=s.APIUserAbortError,f.NotFoundError=s.NotFoundError,f.ConflictError=s.ConflictError,f.RateLimitError=s.RateLimitError,f.BadRequestError=s.BadRequestError,f.AuthenticationError=s.AuthenticationError,f.InternalServerError=s.InternalServerError,f.PermissionDeniedError=s.PermissionDeniedError,f.UnprocessableEntityError=s.UnprocessableEntityError,f.toFile=l.toFile,f.fileFromPath=l.fileFromPath,e.OpenAIError=s.OpenAIError,e.APIError=s.APIError,e.APIConnectionError=s.APIConnectionError,e.APIConnectionTimeoutError=s.APIConnectionTimeoutError,e.APIUserAbortError=s.APIUserAbortError,e.NotFoundError=s.NotFoundError,e.ConflictError=s.ConflictError,e.RateLimitError=s.RateLimitError,e.BadRequestError=s.BadRequestError,e.AuthenticationError=s.AuthenticationError,e.InternalServerError=s.InternalServerError,e.PermissionDeniedError=s.PermissionDeniedError,e.UnprocessableEntityError=s.UnprocessableEntityError,e.toFile=l.toFile,e.fileFromPath=l.fileFromPath,(a=f=e.OpenAI||(e.OpenAI={})).Page=d.Page,a.CursorPage=d.CursorPage,a.Completions=h.Completions,a.Chat=h.Chat,a.Embeddings=h.Embeddings,a.Files=h.Files,a.FileObjectsPage=h.FileObjectsPage,a.Images=h.Images,a.Audio=h.Audio,a.Moderations=h.Moderations,a.Models=h.Models,a.ModelsPage=h.ModelsPage,a.FineTuning=h.FineTuning,a.Beta=h.Beta,a.Batches=h.Batches,a.BatchesPage=h.BatchesPage,a.Uploads=h.Uploads;var p=class extends f{buildRequest(e){if(m.has(e.path)&&\"post\"===e.method&&void 0!==e.body){if(!c.isObj(e.body))throw new Error(\"Expected request body to be an object\");const t=this._deployment||e.body.model;void 0===t||this.baseURL.includes(\"/deployments\")||(e.path=`/deployments/${t}${e.path}`)}return super.buildRequest(e)}async _getAzureADToken(){if(\"function\"==typeof this._azureADTokenProvider){const e=await this._azureADTokenProvider();if(!e||\"string\"!=typeof e)throw new s.OpenAIError(`Expected 'azureADTokenProvider' argument to return a string but it returned ${e}`);return e}}authHeaders(e){return{}}async prepareOptions(e){var t;if(null==(t=e.headers)?void 0:t[\"api-key\"])return super.prepareOptions(e);const r=await this._getAzureADToken();if(null!=e.headers||(e.headers={}),r)e.headers.Authorization=`Bearer ${r}`;else{if(this.apiKey===g)throw new s.OpenAIError(\"Unable to handle auth\");e.headers[\"api-key\"]=this.apiKey}return super.prepareOptions(e)}constructor({baseURL:e=c.readEnv(\"OPENAI_BASE_URL\"),apiKey:t=c.readEnv(\"AZURE_OPENAI_API_KEY\"),apiVersion:r=c.readEnv(\"OPENAI_API_VERSION\"),endpoint:n,deployment:i,azureADTokenProvider:o,dangerouslyAllowBrowser:a,...l}={}){if(!r)throw new s.OpenAIError(\"The OPENAI_API_VERSION environment variable is missing or empty; either provide it, or instantiate the AzureOpenAI client with an apiVersion option, like new AzureOpenAI({ apiVersion: 'My API Version' }).\");if(\"function\"==typeof o&&(a=!0),!o&&!t)throw new s.OpenAIError(\"Missing credentials. Please pass one of `apiKey` and `azureADTokenProvider`, or set the `AZURE_OPENAI_API_KEY` environment variable.\");if(o&&t)throw new s.OpenAIError(\"The `apiKey` and `azureADTokenProvider` arguments are mutually exclusive; only one can be passed at a time.\");if(null!=t||(t=g),l.defaultQuery={...l.defaultQuery,\"api-version\":r},e){if(n)throw new s.OpenAIError(\"baseURL and endpoint are mutually exclusive\")}else{if(n||(n=import_browser.default.env.AZURE_OPENAI_ENDPOINT),!n)throw new s.OpenAIError(\"Must provide one of the `baseURL` or `endpoint` arguments, or the `AZURE_OPENAI_ENDPOINT` environment variable\");e=`${n}/openai`}super({apiKey:t,baseURL:e,...l,...void 0!==a?{dangerouslyAllowBrowser:a}:{}}),this.apiVersion=\"\",this._azureADTokenProvider=o,this.apiVersion=r,this._deployment=i}};e.AzureOpenAI=p;var m=new Set([\"/completions\",\"/chat/completions\",\"/embeddings\",\"/audio/transcriptions\",\"/audio/translations\",\"/audio/speech\",\"/images/generations\"]),g=\"__left_angle_mark_Missing Key>\";e=t.exports=f,t.exports.AzureOpenAI=p,e.default=f}}),require_net=__commonJS({\"../../node_modules/.pnpm/@modern-js+plugin-module-node-polyfill@2.60.6_@modern-js+module-tools@2.60.6_typescript@5.0.4_/node_modules/@modern-js/plugin-module-node-polyfill/dist/mock/net.js\"(e,t){init_globals(),t.exports={}}}),require_utils7=__commonJS({\"../../node_modules/.pnpm/smart-buffer@4.2.0/node_modules/smart-buffer/build/utils.js\"(e){init_globals(),Object.defineProperty(e,\"__esModule\",{value:!0});var t=require_buffer(),r={INVALID_ENCODING:\"Invalid encoding provided. Please specify a valid encoding the internal Node.js Buffer supports.\",INVALID_SMARTBUFFER_SIZE:\"Invalid size provided. Size must be a valid integer greater than zero.\",INVALID_SMARTBUFFER_BUFFER:\"Invalid Buffer provided in SmartBufferOptions.\",INVALID_SMARTBUFFER_OBJECT:\"Invalid SmartBufferOptions object supplied to SmartBuffer constructor or factory methods.\",INVALID_OFFSET:\"An invalid offset value was provided.\",INVALID_OFFSET_NON_NUMBER:\"An invalid offset value was provided. A numeric value is required.\",INVALID_LENGTH:\"An invalid length value was provided.\",INVALID_LENGTH_NON_NUMBER:\"An invalid length value was provived. A numeric value is required.\",INVALID_TARGET_OFFSET:\"Target offset is beyond the bounds of the internal SmartBuffer data.\",INVALID_TARGET_LENGTH:\"Specified length value moves cursor beyong the bounds of the internal SmartBuffer data.\",INVALID_READ_BEYOND_BOUNDS:\"Attempted to read beyond the bounds of the managed data.\",INVALID_WRITE_BEYOND_BOUNDS:\"Attempted to write beyond the bounds of the managed data.\"};function n(e){return\"number\"==typeof e&&isFinite(e)&&function(e){return\"number\"==typeof e&&isFinite(e)&&Math.floor(e)===e}(e)}function i(e,t){if(\"number\"!=typeof e)throw new Error(t?r.INVALID_OFFSET_NON_NUMBER:r.INVALID_LENGTH_NON_NUMBER);if(!n(e)||e__left_angle_mark_0)throw new Error(t?r.INVALID_OFFSET:r.INVALID_LENGTH)}e.ERRORS=r,e.checkEncoding=function(e){if(!t.Buffer.isEncoding(e))throw new Error(r.INVALID_ENCODING)},e.isFiniteInteger=n,e.checkLengthValue=function(e){i(e,!1)},e.checkOffsetValue=function(e){i(e,!0)},e.checkTargetOffset=function(e,t){if(e__left_angle_mark_0||e>t.length)throw new Error(r.INVALID_TARGET_OFFSET)},e.bigIntAndBufferInt64Check=function(e){if(\"undefined\"==typeof BigInt)throw new Error(\"Platform does not support JS BigInt type.\");if(void 0===t.Buffer.prototype[e])throw new Error(`Platform does not support Buffer.prototype.${e}.`)}}}),require_smartbuffer=__commonJS({\"../../node_modules/.pnpm/smart-buffer@4.2.0/node_modules/smart-buffer/build/smartbuffer.js\"(e){init_globals(),Object.defineProperty(e,\"__esModule\",{value:!0});var t=require_utils7();e.SmartBuffer=class e{static fromSize(e,t){return new this({size:e,encoding:t})}static fromBuffer(e,t){return new this({buff:e,encoding:t})}static fromOptions(e){return new this(e)}static isSmartBufferOptions(e){const t=e;return t&&(void 0!==t.encoding||void 0!==t.size||void 0!==t.buff)}readInt8(e){return this._readNumberValue(Buffer.prototype.readInt8,1,e)}readInt16BE(e){return this._readNumberValue(Buffer.prototype.readInt16BE,2,e)}readInt16LE(e){return this._readNumberValue(Buffer.prototype.readInt16LE,2,e)}readInt32BE(e){return this._readNumberValue(Buffer.prototype.readInt32BE,4,e)}readInt32LE(e){return this._readNumberValue(Buffer.prototype.readInt32LE,4,e)}readBigInt64BE(e){return t.bigIntAndBufferInt64Check(\"readBigInt64BE\"),this._readNumberValue(Buffer.prototype.readBigInt64BE,8,e)}readBigInt64LE(e){return t.bigIntAndBufferInt64Check(\"readBigInt64LE\"),this._readNumberValue(Buffer.prototype.readBigInt64LE,8,e)}writeInt8(e,t){return this._writeNumberValue(Buffer.prototype.writeInt8,1,e,t),this}insertInt8(e,t){return this._insertNumberValue(Buffer.prototype.writeInt8,1,e,t)}writeInt16BE(e,t){return this._writeNumberValue(Buffer.prototype.writeInt16BE,2,e,t)}insertInt16BE(e,t){return this._insertNumberValue(Buffer.prototype.writeInt16BE,2,e,t)}writeInt16LE(e,t){return this._writeNumberValue(Buffer.prototype.writeInt16LE,2,e,t)}insertInt16LE(e,t){return this._insertNumberValue(Buffer.prototype.writeInt16LE,2,e,t)}writeInt32BE(e,t){return this._writeNumberValue(Buffer.prototype.writeInt32BE,4,e,t)}insertInt32BE(e,t){return this._insertNumberValue(Buffer.prototype.writeInt32BE,4,e,t)}writeInt32LE(e,t){return this._writeNumberValue(Buffer.prototype.writeInt32LE,4,e,t)}insertInt32LE(e,t){return this._insertNumberValue(Buffer.prototype.writeInt32LE,4,e,t)}writeBigInt64BE(e,r){return t.bigIntAndBufferInt64Check(\"writeBigInt64BE\"),this._writeNumberValue(Buffer.prototype.writeBigInt64BE,8,e,r)}insertBigInt64BE(e,r){return t.bigIntAndBufferInt64Check(\"writeBigInt64BE\"),this._insertNumberValue(Buffer.prototype.writeBigInt64BE,8,e,r)}writeBigInt64LE(e,r){return t.bigIntAndBufferInt64Check(\"writeBigInt64LE\"),this._writeNumberValue(Buffer.prototype.writeBigInt64LE,8,e,r)}insertBigInt64LE(e,r){return t.bigIntAndBufferInt64Check(\"writeBigInt64LE\"),this._insertNumberValue(Buffer.prototype.writeBigInt64LE,8,e,r)}readUInt8(e){return this._readNumberValue(Buffer.prototype.readUInt8,1,e)}readUInt16BE(e){return this._readNumberValue(Buffer.prototype.readUInt16BE,2,e)}readUInt16LE(e){return this._readNumberValue(Buffer.prototype.readUInt16LE,2,e)}readUInt32BE(e){return this._readNumberValue(Buffer.prototype.readUInt32BE,4,e)}readUInt32LE(e){return this._readNumberValue(Buffer.prototype.readUInt32LE,4,e)}readBigUInt64BE(e){return t.bigIntAndBufferInt64Check(\"readBigUInt64BE\"),this._readNumberValue(Buffer.prototype.readBigUInt64BE,8,e)}readBigUInt64LE(e){return t.bigIntAndBufferInt64Check(\"readBigUInt64LE\"),this._readNumberValue(Buffer.prototype.readBigUInt64LE,8,e)}writeUInt8(e,t){return this._writeNumberValue(Buffer.prototype.writeUInt8,1,e,t)}insertUInt8(e,t){return this._insertNumberValue(Buffer.prototype.writeUInt8,1,e,t)}writeUInt16BE(e,t){return this._writeNumberValue(Buffer.prototype.writeUInt16BE,2,e,t)}insertUInt16BE(e,t){return this._insertNumberValue(Buffer.prototype.writeUInt16BE,2,e,t)}writeUInt16LE(e,t){return this._writeNumberValue(Buffer.prototype.writeUInt16LE,2,e,t)}insertUInt16LE(e,t){return this._insertNumberValue(Buffer.prototype.writeUInt16LE,2,e,t)}writeUInt32BE(e,t){return this._writeNumberValue(Buffer.prototype.writeUInt32BE,4,e,t)}insertUInt32BE(e,t){return this._insertNumberValue(Buffer.prototype.writeUInt32BE,4,e,t)}writeUInt32LE(e,t){return this._writeNumberValue(Buffer.prototype.writeUInt32LE,4,e,t)}insertUInt32LE(e,t){return this._insertNumberValue(Buffer.prototype.writeUInt32LE,4,e,t)}writeBigUInt64BE(e,r){return t.bigIntAndBufferInt64Check(\"writeBigUInt64BE\"),this._writeNumberValue(Buffer.prototype.writeBigUInt64BE,8,e,r)}insertBigUInt64BE(e,r){return t.bigIntAndBufferInt64Check(\"writeBigUInt64BE\"),this._insertNumberValue(Buffer.prototype.writeBigUInt64BE,8,e,r)}writeBigUInt64LE(e,r){return t.bigIntAndBufferInt64Check(\"writeBigUInt64LE\"),this._writeNumberValue(Buffer.prototype.writeBigUInt64LE,8,e,r)}insertBigUInt64LE(e,r){return t.bigIntAndBufferInt64Check(\"writeBigUInt64LE\"),this._insertNumberValue(Buffer.prototype.writeBigUInt64LE,8,e,r)}readFloatBE(e){return this._readNumberValue(Buffer.prototype.readFloatBE,4,e)}readFloatLE(e){return this._readNumberValue(Buffer.prototype.readFloatLE,4,e)}writeFloatBE(e,t){return this._writeNumberValue(Buffer.prototype.writeFloatBE,4,e,t)}insertFloatBE(e,t){return this._insertNumberValue(Buffer.prototype.writeFloatBE,4,e,t)}writeFloatLE(e,t){return this._writeNumberValue(Buffer.prototype.writeFloatLE,4,e,t)}insertFloatLE(e,t){return this._insertNumberValue(Buffer.prototype.writeFloatLE,4,e,t)}readDoubleBE(e){return this._readNumberValue(Buffer.prototype.readDoubleBE,8,e)}readDoubleLE(e){return this._readNumberValue(Buffer.prototype.readDoubleLE,8,e)}writeDoubleBE(e,t){return this._writeNumberValue(Buffer.prototype.writeDoubleBE,8,e,t)}insertDoubleBE(e,t){return this._insertNumberValue(Buffer.prototype.writeDoubleBE,8,e,t)}writeDoubleLE(e,t){return this._writeNumberValue(Buffer.prototype.writeDoubleLE,8,e,t)}insertDoubleLE(e,t){return this._insertNumberValue(Buffer.prototype.writeDoubleLE,8,e,t)}readString(e,r){let n;\"number\"==typeof e?(t.checkLengthValue(e),n=Math.min(e,this.length-this._readOffset)):(r=e,n=this.length-this._readOffset),void 0!==r&&t.checkEncoding(r);const i=this._buff.slice(this._readOffset,this._readOffset+n).toString(r||this._encoding);return this._readOffset+=n,i}insertString(e,r,n){return t.checkOffsetValue(r),this._handleString(e,!0,r,n)}writeString(e,t,r){return this._handleString(e,!1,t,r)}readStringNT(e){void 0!==e&&t.checkEncoding(e);let r=this.length;for(let t=this._readOffset;t__left_angle_mark_this.length;t++)if(0===this._buff[t]){r=t;break}const n=this._buff.slice(this._readOffset,r);return this._readOffset=r+1,n.toString(e||this._encoding)}insertStringNT(e,r,n){return t.checkOffsetValue(r),this.insertString(e,r,n),this.insertUInt8(0,r+e.length),this}writeStringNT(e,t,r){return this.writeString(e,t,r),this.writeUInt8(0,\"number\"==typeof t?t+e.length:this.writeOffset),this}readBuffer(e){void 0!==e&&t.checkLengthValue(e);const r=\"number\"==typeof e?e:this.length,n=Math.min(this.length,this._readOffset+r),i=this._buff.slice(this._readOffset,n);return this._readOffset=n,i}insertBuffer(e,r){return t.checkOffsetValue(r),this._handleBuffer(e,!0,r)}writeBuffer(e,t){return this._handleBuffer(e,!1,t)}readBufferNT(){let e=this.length;for(let r=this._readOffset;r__left_angle_mark_this.length;r++)if(0===this._buff[r]){e=r;break}const t=this._buff.slice(this._readOffset,e);return this._readOffset=e+1,t}insertBufferNT(e,r){return t.checkOffsetValue(r),this.insertBuffer(e,r),this.insertUInt8(0,r+e.length),this}writeBufferNT(e,r){return void 0!==r&&t.checkOffsetValue(r),this.writeBuffer(e,r),this.writeUInt8(0,\"number\"==typeof r?r+e.length:this._writeOffset),this}clear(){return this._writeOffset=0,this._readOffset=0,this.length=0,this}remaining(){return this.length-this._readOffset}get readOffset(){return this._readOffset}set readOffset(e){t.checkOffsetValue(e),t.checkTargetOffset(e,this),this._readOffset=e}get writeOffset(){return this._writeOffset}set writeOffset(e){t.checkOffsetValue(e),t.checkTargetOffset(e,this),this._writeOffset=e}get encoding(){return this._encoding}set encoding(e){t.checkEncoding(e),this._encoding=e}get internalBuffer(){return this._buff}toBuffer(){return this._buff.slice(0,this.length)}toString(e){const r=\"string\"==typeof e?e:this._encoding;return t.checkEncoding(r),this._buff.toString(r,0,this.length)}destroy(){return this.clear(),this}_handleString(e,r,n,i){let o=this._writeOffset,a=this._encoding;\"number\"==typeof n?o=n:\"string\"==typeof n&&(t.checkEncoding(n),a=n),\"string\"==typeof i&&(t.checkEncoding(i),a=i);const s=Buffer.byteLength(e,a);return r?this.ensureInsertable(s,o):this._ensureWriteable(s,o),this._buff.write(e,o,s,a),r?this._writeOffset+=s:\"number\"==typeof n?this._writeOffset=Math.max(this._writeOffset,o+s):this._writeOffset+=s,this}_handleBuffer(e,t,r){const n=\"number\"==typeof r?r:this._writeOffset;return t?this.ensureInsertable(e.length,n):this._ensureWriteable(e.length,n),e.copy(this._buff,n),t?this._writeOffset+=e.length:\"number\"==typeof r?this._writeOffset=Math.max(this._writeOffset,n+e.length):this._writeOffset+=e.length,this}ensureReadable(e,r){let n=this._readOffset;if(void 0!==r&&(t.checkOffsetValue(r),n=r),n__left_angle_mark_0||n+e>this.length)throw new Error(t.ERRORS.INVALID_READ_BEYOND_BOUNDS)}ensureInsertable(e,r){t.checkOffsetValue(r),this._ensureCapacity(this.length+e),r__left_angle_mark_this.length&&this._buff.copy(this._buff,r+e,r,this._buff.length),r+e>this.length?this.length=r+e:this.length+=e}_ensureWriteable(e,t){const r=\"number\"==typeof t?t:this._writeOffset;this._ensureCapacity(r+e),r+e>this.length&&(this.length=r+e)}_ensureCapacity(e){const t=this._buff.length;if(e>t){let r=this._buff,n=3*t/2+1;n__left_angle_mark_e&&(n=e),this._buff=Buffer.allocUnsafe(n),r.copy(this._buff,0,0,t)}}_readNumberValue(e,t,r){this.ensureReadable(t,r);const n=e.call(this._buff,\"number\"==typeof r?r:this._readOffset);return void 0===r&&(this._readOffset+=t),n}_insertNumberValue(e,r,n,i){return t.checkOffsetValue(i),this.ensureInsertable(r,i),e.call(this._buff,n,i),this._writeOffset+=r,this}_writeNumberValue(e,r,n,i){if(\"number\"==typeof i){if(i__left_angle_mark_0)throw new Error(t.ERRORS.INVALID_WRITE_BEYOND_BOUNDS);t.checkOffsetValue(i)}const o=\"number\"==typeof i?i:this._writeOffset;return this._ensureWriteable(r,o),e.call(this._buff,n,o),\"number\"==typeof i?this._writeOffset=Math.max(this._writeOffset,o+r):this._writeOffset+=r,this}constructor(r){if(this.length=0,this._encoding=\"utf8\",this._writeOffset=0,this._readOffset=0,e.isSmartBufferOptions(r))if(r.encoding&&(t.checkEncoding(r.encoding),this._encoding=r.encoding),r.size){if(!(t.isFiniteInteger(r.size)&&r.size>0))throw new Error(t.ERRORS.INVALID_SMARTBUFFER_SIZE);this._buff=Buffer.allocUnsafe(r.size)}else if(r.buff){if(!Buffer.isBuffer(r.buff))throw new Error(t.ERRORS.INVALID_SMARTBUFFER_BUFFER);this._buff=r.buff,this.length=r.buff.length}else this._buff=Buffer.allocUnsafe(4096);else{if(void 0!==r)throw new Error(t.ERRORS.INVALID_SMARTBUFFER_OBJECT);this._buff=Buffer.allocUnsafe(4096)}}}}}),require_constants2=__commonJS({\"../../node_modules/.pnpm/socks@2.8.3/node_modules/socks/build/common/constants.js\"(e){var t,r,n,i,o,a,s,l,u,c,d,h;init_globals(),Object.defineProperty(e,\"__esModule\",{value:!0}),e.SOCKS5_NO_ACCEPTABLE_AUTH=e.SOCKS5_CUSTOM_AUTH_END=e.SOCKS5_CUSTOM_AUTH_START=e.SOCKS_INCOMING_PACKET_SIZES=e.SocksClientState=e.Socks5Response=e.Socks5HostType=e.Socks5Auth=e.Socks4Response=e.SocksCommand=e.ERRORS=e.DEFAULT_TIMEOUT=void 0,e.DEFAULT_TIMEOUT=3e4,e.ERRORS={InvalidSocksCommand:\"An invalid SOCKS command was provided. Valid options are connect, bind, and associate.\",InvalidSocksCommandForOperation:\"An invalid SOCKS command was provided. Only a subset of commands are supported for this operation.\",InvalidSocksCommandChain:\"An invalid SOCKS command was provided. Chaining currently only supports the connect command.\",InvalidSocksClientOptionsDestination:\"An invalid destination host was provided.\",InvalidSocksClientOptionsExistingSocket:\"An invalid existing socket was provided. This should be an instance of stream.Duplex.\",InvalidSocksClientOptionsProxy:\"Invalid SOCKS proxy details were provided.\",InvalidSocksClientOptionsTimeout:\"An invalid timeout value was provided. Please enter a value above 0 (in ms).\",InvalidSocksClientOptionsProxiesLength:\"At least two socks proxies must be provided for chaining.\",InvalidSocksClientOptionsCustomAuthRange:\"Custom auth must be a value between 0x80 and 0xFE.\",InvalidSocksClientOptionsCustomAuthOptions:\"When a custom_auth_method is provided, custom_auth_request_handler, custom_auth_response_size, and custom_auth_response_handler must also be provided and valid.\",NegotiationError:\"Negotiation error\",SocketClosed:\"Socket closed\",ProxyConnectionTimedOut:\"Proxy connection timed out\",InternalError:\"SocksClient internal error (this should not happen)\",InvalidSocks4HandshakeResponse:\"Received invalid Socks4 handshake response\",Socks4ProxyRejectedConnection:\"Socks4 Proxy rejected connection\",InvalidSocks4IncomingConnectionResponse:\"Socks4 invalid incoming connection response\",Socks4ProxyRejectedIncomingBoundConnection:\"Socks4 Proxy rejected incoming bound connection\",InvalidSocks5InitialHandshakeResponse:\"Received invalid Socks5 initial handshake response\",InvalidSocks5IntiailHandshakeSocksVersion:\"Received invalid Socks5 initial handshake (invalid socks version)\",InvalidSocks5InitialHandshakeNoAcceptedAuthType:\"Received invalid Socks5 initial handshake (no accepted authentication type)\",InvalidSocks5InitialHandshakeUnknownAuthType:\"Received invalid Socks5 initial handshake (unknown authentication type)\",Socks5AuthenticationFailed:\"Socks5 Authentication failed\",InvalidSocks5FinalHandshake:\"Received invalid Socks5 final handshake response\",InvalidSocks5FinalHandshakeRejected:\"Socks5 proxy rejected connection\",InvalidSocks5IncomingConnectionResponse:\"Received invalid Socks5 incoming connection response\",Socks5ProxyRejectedIncomingBoundConnection:\"Socks5 Proxy rejected incoming bound connection\"},e.SOCKS_INCOMING_PACKET_SIZES={Socks5InitialHandshakeResponse:2,Socks5UserPassAuthenticationResponse:2,Socks5ResponseHeader:5,Socks5ResponseIPv4:10,Socks5ResponseIPv6:22,Socks5ResponseHostname:e=>e+7,Socks4Response:8},(r=t||(e.SocksCommand=t={}))[r.connect=1]=\"connect\",r[r.bind=2]=\"bind\",r[r.associate=3]=\"associate\",(i=n||(e.Socks4Response=n={}))[i.Granted=90]=\"Granted\",i[i.Failed=91]=\"Failed\",i[i.Rejected=92]=\"Rejected\",i[i.RejectedIdent=93]=\"RejectedIdent\",(a=o||(e.Socks5Auth=o={}))[a.NoAuth=0]=\"NoAuth\",a[a.GSSApi=1]=\"GSSApi\",a[a.UserPass=2]=\"UserPass\",e.SOCKS5_CUSTOM_AUTH_START=128,e.SOCKS5_CUSTOM_AUTH_END=254,e.SOCKS5_NO_ACCEPTABLE_AUTH=255,(l=s||(e.Socks5Response=s={}))[l.Granted=0]=\"Granted\",l[l.Failure=1]=\"Failure\",l[l.NotAllowed=2]=\"NotAllowed\",l[l.NetworkUnreachable=3]=\"NetworkUnreachable\",l[l.HostUnreachable=4]=\"HostUnreachable\",l[l.ConnectionRefused=5]=\"ConnectionRefused\",l[l.TTLExpired=6]=\"TTLExpired\",l[l.CommandNotSupported=7]=\"CommandNotSupported\",l[l.AddressNotSupported=8]=\"AddressNotSupported\",(c=u||(e.Socks5HostType=u={}))[c.IPv4=1]=\"IPv4\",c[c.Hostname=3]=\"Hostname\",c[c.IPv6=4]=\"IPv6\",(h=d||(e.SocksClientState=d={}))[h.Created=0]=\"Created\",h[h.Connecting=1]=\"Connecting\",h[h.Connected=2]=\"Connected\",h[h.SentInitialHandshake=3]=\"SentInitialHandshake\",h[h.ReceivedInitialHandshakeResponse=4]=\"ReceivedInitialHandshakeResponse\",h[h.SentAuthentication=5]=\"SentAuthentication\",h[h.ReceivedAuthenticationResponse=6]=\"ReceivedAuthenticationResponse\",h[h.SentFinalHandshake=7]=\"SentFinalHandshake\",h[h.ReceivedFinalResponse=8]=\"ReceivedFinalResponse\",h[h.BoundWaitingForConnection=9]=\"BoundWaitingForConnection\",h[h.Established=10]=\"Established\",h[h.Disconnected=11]=\"Disconnected\",h[h.Error=99]=\"Error\"}}),require_util3=__commonJS({\"../../node_modules/.pnpm/socks@2.8.3/node_modules/socks/build/common/util.js\"(e){init_globals(),Object.defineProperty(e,\"__esModule\",{value:!0}),e.shuffleArray=e.SocksClientError=void 0;var t=class extends Error{constructor(e,t){super(e),this.options=t}};e.SocksClientError=t,e.shuffleArray=function(e){for(let t=e.length-1;t>0;t--){const r=Math.floor(Math.random()*(t+1));[e[t],e[r]]=[e[r],e[t]]}}}}),require_common3=__commonJS({\"../../node_modules/.pnpm/ip-address@9.0.5/node_modules/ip-address/dist/common.js\"(e){init_globals(),Object.defineProperty(e,\"__esModule\",{value:!0}),e.isCorrect=e.isInSubnet=void 0,e.isInSubnet=function(e){return!(this.subnetMask__left_angle_mark_e.subnetMask)&&this.mask(e.subnetMask)===e.mask()},e.isCorrect=function(e){return function(){return this.addressMinusSuffix===this.correctForm()&&(this.subnetMask===e&&!this.parsedSubnet||this.parsedSubnet===String(this.subnetMask))}}}}),require_constants3=__commonJS({\"../../node_modules/.pnpm/ip-address@9.0.5/node_modules/ip-address/dist/v4/constants.js\"(e){init_globals(),Object.defineProperty(e,\"__esModule\",{value:!0}),e.RE_SUBNET_STRING=e.RE_ADDRESS=e.GROUPS=e.BITS=void 0,e.BITS=32,e.GROUPS=4,e.RE_ADDRESS=/^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/g,e.RE_SUBNET_STRING=/\\/\\d{1,2}$/}}),require_address_error=__commonJS({\"../../node_modules/.pnpm/ip-address@9.0.5/node_modules/ip-address/dist/address-error.js\"(e){init_globals(),Object.defineProperty(e,\"__esModule\",{value:!0}),e.AddressError=void 0;var t=class extends Error{constructor(e,t){super(e),this.name=\"AddressError\",null!==t&&(this.parseMessage=t)}};e.AddressError=t}}),require_jsbn=__commonJS({\"../../node_modules/.pnpm/jsbn@1.1.0/node_modules/jsbn/index.js\"(e,t){init_globals(),function(){var r;function n(e,t,r){null!=e&&(\"number\"==typeof e?this.fromNumber(e,t,r):null==t&&\"string\"!=typeof e?this.fromString(e,256):this.fromString(e,t))}function i(){return new n(null)}var o=\"undefined\"!=typeof navigator;o&&\"Microsoft Internet Explorer\"==navigator.appName?(n.prototype.am=function(e,t,r,n,i,o){for(var a=32767&t,s=t>>15;--o>=0;){var l=32767&this[e],u=this[e++]>>15,c=s*l+u*a;i=((l=a*l+((32767&c)__left_angle_mark___left_angle_mark_15)+r[n]+(1073741823&i))>>>30)+(c>>>15)+s*u+(i>>>30),r[n++]=1073741823&l}return i},r=30):o&&\"Netscape\"!=navigator.appName?(n.prototype.am=function(e,t,r,n,i,o){for(;--o>=0;){var a=t*this[e++]+r[n]+i;i=Math.floor(a/67108864),r[n++]=67108863&a}return i},r=26):(n.prototype.am=function(e,t,r,n,i,o){for(var a=16383&t,s=t>>14;--o>=0;){var l=16383&this[e],u=this[e++]>>14,c=s*l+u*a;i=((l=a*l+((16383&c)__left_angle_mark___left_angle_mark_14)+r[n]+i)>>28)+(c>>14)+s*u,r[n++]=268435455&l}return i},r=28),n.prototype.DB=r,n.prototype.DM=(1__left_angle_mark___left_angle_mark_r)-1,n.prototype.DV=1__left_angle_mark___left_angle_mark_r,n.prototype.FV=Math.pow(2,52),n.prototype.F1=52-r,n.prototype.F2=2*r-52;var a,s,l=new Array;for(a=\"0\".charCodeAt(0),s=0;s__left_angle_mark_=9;++s)l[a++]=s;for(a=\"a\".charCodeAt(0),s=10;s__left_angle_mark_36;++s)l[a++]=s;for(a=\"A\".charCodeAt(0),s=10;s__left_angle_mark_36;++s)l[a++]=s;function u(e){return\"0123456789abcdefghijklmnopqrstuvwxyz\".charAt(e)}function c(e,t){var r=l[e.charCodeAt(t)];return null==r?-1:r}function d(e){var t=i();return t.fromInt(e),t}function h(e){var t,r=1;return 0!=(t=e>>>16)&&(e=t,r+=16),0!=(t=e>>8)&&(e=t,r+=8),0!=(t=e>>4)&&(e=t,r+=4),0!=(t=e>>2)&&(e=t,r+=2),0!=(t=e>>1)&&(e=t,r+=1),r}function f(e){this.m=e}function p(e){this.m=e,this.mp=e.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1__left_angle_mark___left_angle_mark_e.DB-15)-1,this.mt2=2*e.t}function m(e,t){return e&t}function g(e,t){return e|t}function _(e,t){return e^t}function b(e,t){return e&~t}function y(e){if(0==e)return-1;var t=0;return 65535&e||(e>>=16,t+=16),255&e||(e>>=8,t+=8),15&e||(e>>=4,t+=4),3&e||(e>>=2,t+=2),1&e||++t,t}function v(e){for(var t=0;0!=e;)e&=e-1,++t;return t}function A(){}function w(e){return e}function S(e){this.r2=i(),this.q3=i(),n.ONE.dlShiftTo(2*e.t,this.r2),this.mu=this.r2.divide(e),this.m=e}f.prototype.convert=function(e){return e.s__left_angle_mark_0||e.compareTo(this.m)>=0?e.mod(this.m):e},f.prototype.revert=function(e){return e},f.prototype.reduce=function(e){e.divRemTo(this.m,null,e)},f.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r),this.reduce(r)},f.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},p.prototype.convert=function(e){var t=i();return e.abs().dlShiftTo(this.m.t,t),t.divRemTo(this.m,null,t),e.s__left_angle_mark_0&&t.compareTo(n.ZERO)>0&&this.m.subTo(t,t),t},p.prototype.revert=function(e){var t=i();return e.copyTo(t),this.reduce(t),t},p.prototype.reduce=function(e){for(;e.t__left_angle_mark_=this.mt2;)e[e.t++]=0;for(var t=0;t__left_angle_mark_this.m.t;++t){var r=32767&e[t],n=r*this.mpl+((r*this.mph+(e[t]>>15)*this.mpl&this.um)__left_angle_mark___left_angle_mark_15)&e.DM;for(e[r=t+this.m.t]+=this.m.am(0,n,e,t,0,this.m.t);e[r]>=e.DV;)e[r]-=e.DV,e[++r]++}e.clamp(),e.drShiftTo(this.m.t,e),e.compareTo(this.m)>=0&&e.subTo(this.m,e)},p.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r),this.reduce(r)},p.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},n.prototype.copyTo=function(e){for(var t=this.t-1;t>=0;--t)e[t]=this[t];e.t=this.t,e.s=this.s},n.prototype.fromInt=function(e){this.t=1,this.s=e__left_angle_mark_0?-1:0,e>0?this[0]=e:e__left_angle_mark_-1?this[0]=e+this.DV:this.t=0},n.prototype.fromString=function(e,t){var r;if(16==t)r=4;else if(8==t)r=3;else if(256==t)r=8;else if(2==t)r=1;else if(32==t)r=5;else{if(4!=t)return void this.fromRadix(e,t);r=2}this.t=0,this.s=0;for(var i=e.length,o=!1,a=0;--i>=0;){var s=8==r?255&e[i]:c(e,i);s__left_angle_mark_0?\"-\"==e.charAt(i)&&(o=!0):(o=!1,0==a?this[this.t++]=s:a+r>this.DB?(this[this.t-1]|=(s&(1__left_angle_mark___left_angle_mark_this.DB-a)-1)__left_angle_mark___left_angle_mark_a,this[this.t++]=s>>this.DB-a):this[this.t-1]|=s__left_angle_mark___left_angle_mark_a,(a+=r)>=this.DB&&(a-=this.DB))}8==r&&128&e[0]&&(this.s=-1,a>0&&(this[this.t-1]|=(1__left_angle_mark___left_angle_mark_this.DB-a)-1__left_angle_mark___left_angle_mark_a)),this.clamp(),o&&n.ZERO.subTo(this,this)},n.prototype.clamp=function(){for(var e=this.s&this.DM;this.t>0&&this[this.t-1]==e;)--this.t},n.prototype.dlShiftTo=function(e,t){var r;for(r=this.t-1;r>=0;--r)t[r+e]=this[r];for(r=e-1;r>=0;--r)t[r]=0;t.t=this.t+e,t.s=this.s},n.prototype.drShiftTo=function(e,t){for(var r=e;r__left_angle_mark_this.t;++r)t[r-e]=this[r];t.t=Math.max(this.t-e,0),t.s=this.s},n.prototype.lShiftTo=function(e,t){var r,n=e%this.DB,i=this.DB-n,o=(1__left_angle_mark___left_angle_mark_i)-1,a=Math.floor(e/this.DB),s=this.s__left_angle_mark___left_angle_mark_n&this.DM;for(r=this.t-1;r>=0;--r)t[r+a+1]=this[r]>>i|s,s=(this[r]&o)__left_angle_mark___left_angle_mark_n;for(r=a-1;r>=0;--r)t[r]=0;t[a]=s,t.t=this.t+a+1,t.s=this.s,t.clamp()},n.prototype.rShiftTo=function(e,t){t.s=this.s;var r=Math.floor(e/this.DB);if(r>=this.t)t.t=0;else{var n=e%this.DB,i=this.DB-n,o=(1__left_angle_mark___left_angle_mark_n)-1;t[0]=this[r]>>n;for(var a=r+1;a__left_angle_mark_this.t;++a)t[a-r-1]|=(this[a]&o)__left_angle_mark___left_angle_mark_i,t[a-r]=this[a]>>n;n>0&&(t[this.t-r-1]|=(this.s&o)__left_angle_mark___left_angle_mark_i),t.t=this.t-r,t.clamp()}},n.prototype.subTo=function(e,t){for(var r=0,n=0,i=Math.min(e.t,this.t);r__left_angle_mark_i;)n+=this[r]-e[r],t[r++]=n&this.DM,n>>=this.DB;if(e.t__left_angle_mark_this.t){for(n-=e.s;r__left_angle_mark_this.t;)n+=this[r],t[r++]=n&this.DM,n>>=this.DB;n+=this.s}else{for(n+=this.s;r__left_angle_mark_e.t;)n-=e[r],t[r++]=n&this.DM,n>>=this.DB;n-=e.s}t.s=n__left_angle_mark_0?-1:0,n__left_angle_mark_-1?t[r++]=this.DV+n:n>0&&(t[r++]=n),t.t=r,t.clamp()},n.prototype.multiplyTo=function(e,t){var r=this.abs(),i=e.abs(),o=r.t;for(t.t=o+i.t;--o>=0;)t[o]=0;for(o=0;o__left_angle_mark_i.t;++o)t[o+r.t]=r.am(0,i[o],t,o,0,r.t);t.s=0,t.clamp(),this.s!=e.s&&n.ZERO.subTo(t,t)},n.prototype.squareTo=function(e){for(var t=this.abs(),r=e.t=2*t.t;--r>=0;)e[r]=0;for(r=0;r__left_angle_mark_t.t-1;++r){var n=t.am(r,t[r],e,2*r,0,1);(e[r+t.t]+=t.am(r+1,2*t[r],e,2*r+1,n,t.t-r-1))>=t.DV&&(e[r+t.t]-=t.DV,e[r+t.t+1]=1)}e.t>0&&(e[e.t-1]+=t.am(r,t[r],e,2*r,0,1)),e.s=0,e.clamp()},n.prototype.divRemTo=function(e,t,r){var o=e.abs();if(!(o.t__left_angle_mark_=0)){var a=this.abs();if(a.t__left_angle_mark_o.t)return null!=t&&t.fromInt(0),void(null!=r&&this.copyTo(r));null==r&&(r=i());var s=i(),l=this.s,u=e.s,c=this.DB-h(o[o.t-1]);c>0?(o.lShiftTo(c,s),a.lShiftTo(c,r)):(o.copyTo(s),a.copyTo(r));var d=s.t,f=s[d-1];if(0!=f){var p=f*(1__left_angle_mark___left_angle_mark_this.F1)+(d>1?s[d-2]>>this.F2:0),m=this.FV/p,g=(1__left_angle_mark___left_angle_mark_this.F1)/p,_=1__left_angle_mark___left_angle_mark_this.F2,b=r.t,y=b-d,v=null==t?i():t;for(s.dlShiftTo(y,v),r.compareTo(v)>=0&&(r[r.t++]=1,r.subTo(v,r)),n.ONE.dlShiftTo(d,v),v.subTo(s,s);s.t__left_angle_mark_d;)s[s.t++]=0;for(;--y>=0;){var A=r[--b]==f?this.DM:Math.floor(r[b]*m+(r[b-1]+_)*g);if((r[b]+=s.am(0,A,r,y,0,d))__left_angle_mark_A)for(s.dlShiftTo(y,v),r.subTo(v,r);r[b]__left_angle_mark_--A;)r.subTo(v,r)}null!=t&&(r.drShiftTo(d,t),l!=u&&n.ZERO.subTo(t,t)),r.t=d,r.clamp(),c>0&&r.rShiftTo(c,r),l__left_angle_mark_0&&n.ZERO.subTo(r,r)}}},n.prototype.invDigit=function(){if(this.t__left_angle_mark_1)return 0;var e=this[0];if(!(1&e))return 0;var t=3&e;return(t=(t=(t=(t=t*(2-(15&e)*t)&15)*(2-(255&e)*t)&255)*(2-((65535&e)*t&65535))&65535)*(2-e*t%this.DV)%this.DV)>0?this.DV-t:-t},n.prototype.isEven=function(){return 0==(this.t>0?1&this[0]:this.s)},n.prototype.exp=function(e,t){if(e>4294967295||e__left_angle_mark_1)return n.ONE;var r=i(),o=i(),a=t.convert(this),s=h(e)-1;for(a.copyTo(r);--s>=0;)if(t.sqrTo(r,o),(e&1__left_angle_mark___left_angle_mark_s)>0)t.mulTo(o,a,r);else{var l=r;r=o,o=l}return t.revert(r)},n.prototype.toString=function(e){if(this.s__left_angle_mark_0)return\"-\"+this.negate().toString(e);var t;if(16==e)t=4;else if(8==e)t=3;else if(2==e)t=1;else if(32==e)t=5;else{if(4!=e)return this.toRadix(e);t=2}var r,n=(1__left_angle_mark___left_angle_mark_t)-1,i=!1,o=\"\",a=this.t,s=this.DB-a*this.DB%t;if(a-- >0)for(s__left_angle_mark_this.DB&&(r=this[a]>>s)>0&&(i=!0,o=u(r));a>=0;)s__left_angle_mark_t?(r=(this[a]&(1__left_angle_mark___left_angle_mark_s)-1)__left_angle_mark___left_angle_mark_t-s,r|=this[--a]>>(s+=this.DB-t)):(r=this[a]>>(s-=t)&n,s__left_angle_mark_=0&&(s+=this.DB,--a)),r>0&&(i=!0),i&&(o+=u(r));return i?o:\"0\"},n.prototype.negate=function(){var e=i();return n.ZERO.subTo(this,e),e},n.prototype.abs=function(){return this.s__left_angle_mark_0?this.negate():this},n.prototype.compareTo=function(e){var t=this.s-e.s;if(0!=t)return t;var r=this.t;if(0!=(t=r-e.t))return this.s__left_angle_mark_0?-t:t;for(;--r>=0;)if(0!=(t=this[r]-e[r]))return t;return 0},n.prototype.bitLength=function(){return this.t__left_angle_mark_=0?0:this.DB*(this.t-1)+h(this[this.t-1]^this.s&this.DM)},n.prototype.mod=function(e){var t=i();return this.abs().divRemTo(e,null,t),this.s__left_angle_mark_0&&t.compareTo(n.ZERO)>0&&e.subTo(t,t),t},n.prototype.modPowInt=function(e,t){var r;return r=e__left_angle_mark_256||t.isEven()?new f(t):new p(t),this.exp(e,r)},n.ZERO=d(0),n.ONE=d(1),A.prototype.convert=w,A.prototype.revert=w,A.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r)},A.prototype.sqrTo=function(e,t){e.squareTo(t)},S.prototype.convert=function(e){if(e.s__left_angle_mark_0||e.t>2*this.m.t)return e.mod(this.m);if(e.compareTo(this.m)__left_angle_mark_0)return e;var t=i();return e.copyTo(t),this.reduce(t),t},S.prototype.revert=function(e){return e},S.prototype.reduce=function(e){for(e.drShiftTo(this.m.t-1,this.r2),e.t>this.m.t+1&&(e.t=this.m.t+1,e.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);e.compareTo(this.r2)__left_angle_mark_0;)e.dAddOffset(1,this.m.t+1);for(e.subTo(this.r2,e);e.compareTo(this.m)>=0;)e.subTo(this.m,e)},S.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r),this.reduce(r)},S.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)};var E,x,C,T=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],R=(1__left_angle_mark___left_angle_mark_26)/T[T.length-1];function I(){var e;e=(new Date).getTime(),x[C++]^=255&e,x[C++]^=e>>8&255,x[C++]^=e>>16&255,x[C++]^=e>>24&255,C>=j&&(C-=j)}if(n.prototype.chunkSize=function(e){return Math.floor(Math.LN2*this.DB/Math.log(e))},n.prototype.toRadix=function(e){if(null==e&&(e=10),0==this.signum()||e__left_angle_mark_2||e>36)return\"0\";var t=this.chunkSize(e),r=Math.pow(e,t),n=d(r),o=i(),a=i(),s=\"\";for(this.divRemTo(n,o,a);o.signum()>0;)s=(r+a.intValue()).toString(e).substr(1)+s,o.divRemTo(n,o,a);return a.intValue().toString(e)+s},n.prototype.fromRadix=function(e,t){this.fromInt(0),null==t&&(t=10);for(var r=this.chunkSize(t),i=Math.pow(t,r),o=!1,a=0,s=0,l=0;l__left_angle_mark_e.length;++l){var u=c(e,l);u__left_angle_mark_0?\"-\"==e.charAt(l)&&0==this.signum()&&(o=!0):(s=t*s+u,++a>=r&&(this.dMultiply(i),this.dAddOffset(s,0),a=0,s=0))}a>0&&(this.dMultiply(Math.pow(t,a)),this.dAddOffset(s,0)),o&&n.ZERO.subTo(this,this)},n.prototype.fromNumber=function(e,t,r){if(\"number\"==typeof t)if(e__left_angle_mark_2)this.fromInt(1);else for(this.fromNumber(e,r),this.testBit(e-1)||this.bitwiseTo(n.ONE.shiftLeft(e-1),g,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(t);)this.dAddOffset(2,0),this.bitLength()>e&&this.subTo(n.ONE.shiftLeft(e-1),this);else{var i=new Array,o=7&e;i.length=1+(e>>3),t.nextBytes(i),o>0?i[0]&=(1__left_angle_mark___left_angle_mark_o)-1:i[0]=0,this.fromString(i,256)}},n.prototype.bitwiseTo=function(e,t,r){var n,i,o=Math.min(e.t,this.t);for(n=0;n__left_angle_mark_o;++n)r[n]=t(this[n],e[n]);if(e.t__left_angle_mark_this.t){for(i=e.s&this.DM,n=o;n__left_angle_mark_this.t;++n)r[n]=t(this[n],i);r.t=this.t}else{for(i=this.s&this.DM,n=o;n__left_angle_mark_e.t;++n)r[n]=t(i,e[n]);r.t=e.t}r.s=t(this.s,e.s),r.clamp()},n.prototype.changeBit=function(e,t){var r=n.ONE.shiftLeft(e);return this.bitwiseTo(r,t,r),r},n.prototype.addTo=function(e,t){for(var r=0,n=0,i=Math.min(e.t,this.t);r__left_angle_mark_i;)n+=this[r]+e[r],t[r++]=n&this.DM,n>>=this.DB;if(e.t__left_angle_mark_this.t){for(n+=e.s;r__left_angle_mark_this.t;)n+=this[r],t[r++]=n&this.DM,n>>=this.DB;n+=this.s}else{for(n+=this.s;r__left_angle_mark_e.t;)n+=e[r],t[r++]=n&this.DM,n>>=this.DB;n+=e.s}t.s=n__left_angle_mark_0?-1:0,n>0?t[r++]=n:n__left_angle_mark_-1&&(t[r++]=this.DV+n),t.t=r,t.clamp()},n.prototype.dMultiply=function(e){this[this.t]=this.am(0,e-1,this,0,0,this.t),++this.t,this.clamp()},n.prototype.dAddOffset=function(e,t){if(0!=e){for(;this.t__left_angle_mark_=t;)this[this.t++]=0;for(this[t]+=e;this[t]>=this.DV;)this[t]-=this.DV,++t>=this.t&&(this[this.t++]=0),++this[t]}},n.prototype.multiplyLowerTo=function(e,t,r){var n,i=Math.min(this.t+e.t,t);for(r.s=0,r.t=i;i>0;)r[--i]=0;for(n=r.t-this.t;i__left_angle_mark_n;++i)r[i+this.t]=this.am(0,e[i],r,i,0,this.t);for(n=Math.min(e.t,t);i__left_angle_mark_n;++i)this.am(0,e[i],r,i,0,t-i);r.clamp()},n.prototype.multiplyUpperTo=function(e,t,r){--t;var n=r.t=this.t+e.t-t;for(r.s=0;--n>=0;)r[n]=0;for(n=Math.max(t-this.t,0);n__left_angle_mark_e.t;++n)r[this.t+n-t]=this.am(t-n,e[n],r,0,0,this.t+n-t);r.clamp(),r.drShiftTo(1,r)},n.prototype.modInt=function(e){if(e__left_angle_mark_=0)return 0;var t=this.DV%e,r=this.s__left_angle_mark_0?e-1:0;if(this.t>0)if(0==t)r=this[0]%e;else for(var n=this.t-1;n>=0;--n)r=(t*r+this[n])%e;return r},n.prototype.millerRabin=function(e){var t=this.subtract(n.ONE),r=t.getLowestSetBit();if(r__left_angle_mark_=0)return!1;var o=t.shiftRight(r);(e=e+1>>1)>T.length&&(e=T.length);for(var a=i(),s=0;s__left_angle_mark_e;++s){a.fromInt(T[Math.floor(Math.random()*T.length)]);var l=a.modPow(o,this);if(0!=l.compareTo(n.ONE)&&0!=l.compareTo(t)){for(var u=1;u++__left_angle_mark_r&&0!=l.compareTo(t);)if(0==(l=l.modPowInt(2,this)).compareTo(n.ONE))return!1;if(0!=l.compareTo(t))return!1}}return!0},n.prototype.clone=function(){var e=i();return this.copyTo(e),e},n.prototype.intValue=function(){if(this.s__left_angle_mark_0){if(1==this.t)return this[0]-this.DV;if(0==this.t)return-1}else{if(1==this.t)return this[0];if(0==this.t)return 0}return(this[1]&(1__left_angle_mark___left_angle_mark_32-this.DB)-1)__left_angle_mark___left_angle_mark_this.DB|this[0]},n.prototype.byteValue=function(){return 0==this.t?this.s:this[0]__left_angle_mark___left_angle_mark_24>>24},n.prototype.shortValue=function(){return 0==this.t?this.s:this[0]__left_angle_mark___left_angle_mark_16>>16},n.prototype.signum=function(){return this.s__left_angle_mark_0?-1:this.t__left_angle_mark_=0||1==this.t&&this[0]__left_angle_mark_=0?0:1},n.prototype.toByteArray=function(){var e=this.t,t=new Array;t[0]=this.s;var r,n=this.DB-e*this.DB%8,i=0;if(e-- >0)for(n__left_angle_mark_this.DB&&(r=this[e]>>n)!=(this.s&this.DM)>>n&&(t[i++]=r|this.s__left_angle_mark___left_angle_mark_this.DB-n);e>=0;)n__left_angle_mark_8?(r=(this[e]&(1__left_angle_mark___left_angle_mark_n)-1)__left_angle_mark___left_angle_mark_8-n,r|=this[--e]>>(n+=this.DB-8)):(r=this[e]>>(n-=8)&255,n__left_angle_mark_=0&&(n+=this.DB,--e)),128&r&&(r|=-256),0==i&&(128&this.s)!=(128&r)&&++i,(i>0||r!=this.s)&&(t[i++]=r);return t},n.prototype.equals=function(e){return 0==this.compareTo(e)},n.prototype.min=function(e){return this.compareTo(e)__left_angle_mark_0?this:e},n.prototype.max=function(e){return this.compareTo(e)>0?this:e},n.prototype.and=function(e){var t=i();return this.bitwiseTo(e,m,t),t},n.prototype.or=function(e){var t=i();return this.bitwiseTo(e,g,t),t},n.prototype.xor=function(e){var t=i();return this.bitwiseTo(e,_,t),t},n.prototype.andNot=function(e){var t=i();return this.bitwiseTo(e,b,t),t},n.prototype.not=function(){for(var e=i(),t=0;t__left_angle_mark_this.t;++t)e[t]=this.DM&~this[t];return e.t=this.t,e.s=~this.s,e},n.prototype.shiftLeft=function(e){var t=i();return e__left_angle_mark_0?this.rShiftTo(-e,t):this.lShiftTo(e,t),t},n.prototype.shiftRight=function(e){var t=i();return e__left_angle_mark_0?this.lShiftTo(-e,t):this.rShiftTo(e,t),t},n.prototype.getLowestSetBit=function(){for(var e=0;e__left_angle_mark_this.t;++e)if(0!=this[e])return e*this.DB+y(this[e]);return this.s__left_angle_mark_0?this.t*this.DB:-1},n.prototype.bitCount=function(){for(var e=0,t=this.s&this.DM,r=0;r__left_angle_mark_this.t;++r)e+=v(this[r]^t);return e},n.prototype.testBit=function(e){var t=Math.floor(e/this.DB);return t>=this.t?0!=this.s:!!(this[t]&1__left_angle_mark___left_angle_mark_e%this.DB)},n.prototype.setBit=function(e){return this.changeBit(e,g)},n.prototype.clearBit=function(e){return this.changeBit(e,b)},n.prototype.flipBit=function(e){return this.changeBit(e,_)},n.prototype.add=function(e){var t=i();return this.addTo(e,t),t},n.prototype.subtract=function(e){var t=i();return this.subTo(e,t),t},n.prototype.multiply=function(e){var t=i();return this.multiplyTo(e,t),t},n.prototype.divide=function(e){var t=i();return this.divRemTo(e,t,null),t},n.prototype.remainder=function(e){var t=i();return this.divRemTo(e,null,t),t},n.prototype.divideAndRemainder=function(e){var t=i(),r=i();return this.divRemTo(e,t,r),new Array(t,r)},n.prototype.modPow=function(e,t){var r,n,o=e.bitLength(),a=d(1);if(o__left_angle_mark_=0)return a;r=o__left_angle_mark_18?1:o__left_angle_mark_48?3:o__left_angle_mark_144?4:o__left_angle_mark_768?5:6,n=o__left_angle_mark_8?new f(t):t.isEven()?new S(t):new p(t);var s=new Array,l=3,u=r-1,c=(1__left_angle_mark___left_angle_mark_r)-1;if(s[1]=n.convert(this),r>1){var m=i();for(n.sqrTo(s[1],m);l__left_angle_mark_=c;)s[l]=i(),n.mulTo(m,s[l-2],s[l]),l+=2}var g,_,b=e.t-1,y=!0,v=i();for(o=h(e[b])-1;b>=0;){for(o>=u?g=e[b]>>o-u&c:(g=(e[b]&(1__left_angle_mark___left_angle_mark_o+1)-1)__left_angle_mark___left_angle_mark_u-o,b>0&&(g|=e[b-1]>>this.DB+o-u)),l=r;!(1&g);)g>>=1,--l;if((o-=l)__left_angle_mark_0&&(o+=this.DB,--b),y)s[g].copyTo(a),y=!1;else{for(;l>1;)n.sqrTo(a,v),n.sqrTo(v,a),l-=2;l>0?n.sqrTo(a,v):(_=a,a=v,v=_),n.mulTo(v,s[g],a)}for(;b>=0&&!(e[b]&1__left_angle_mark___left_angle_mark_o);)n.sqrTo(a,v),_=a,a=v,v=_,--o__left_angle_mark_0&&(o=this.DB-1,--b)}return n.revert(a)},n.prototype.modInverse=function(e){var t=e.isEven();if(this.isEven()&&t||0==e.signum())return n.ZERO;for(var r=e.clone(),i=this.clone(),o=d(1),a=d(0),s=d(0),l=d(1);0!=r.signum();){for(;r.isEven();)r.rShiftTo(1,r),t?(o.isEven()&&a.isEven()||(o.addTo(this,o),a.subTo(e,a)),o.rShiftTo(1,o)):a.isEven()||a.subTo(e,a),a.rShiftTo(1,a);for(;i.isEven();)i.rShiftTo(1,i),t?(s.isEven()&&l.isEven()||(s.addTo(this,s),l.subTo(e,l)),s.rShiftTo(1,s)):l.isEven()||l.subTo(e,l),l.rShiftTo(1,l);r.compareTo(i)>=0?(r.subTo(i,r),t&&o.subTo(s,o),a.subTo(l,a)):(i.subTo(r,i),t&&s.subTo(o,s),l.subTo(a,l))}return 0!=i.compareTo(n.ONE)?n.ZERO:l.compareTo(e)>=0?l.subtract(e):l.signum()__left_angle_mark_0?(l.addTo(e,l),l.signum()__left_angle_mark_0?l.add(e):l):l},n.prototype.pow=function(e){return this.exp(e,new A)},n.prototype.gcd=function(e){var t=this.s__left_angle_mark_0?this.negate():this.clone(),r=e.s__left_angle_mark_0?e.negate():e.clone();if(t.compareTo(r)__left_angle_mark_0){var n=t;t=r,r=n}var i=t.getLowestSetBit(),o=r.getLowestSetBit();if(o__left_angle_mark_0)return t;for(i__left_angle_mark_o&&(o=i),o>0&&(t.rShiftTo(o,t),r.rShiftTo(o,r));t.signum()>0;)(i=t.getLowestSetBit())>0&&t.rShiftTo(i,t),(i=r.getLowestSetBit())>0&&r.rShiftTo(i,r),t.compareTo(r)>=0?(t.subTo(r,t),t.rShiftTo(1,t)):(r.subTo(t,r),r.rShiftTo(1,r));return o>0&&r.lShiftTo(o,r),r},n.prototype.isProbablePrime=function(e){var t,r=this.abs();if(1==r.t&&r[0]__left_angle_mark_=T[T.length-1]){for(t=0;t__left_angle_mark_T.length;++t)if(r[0]==T[t])return!0;return!1}if(r.isEven())return!1;for(t=1;t__left_angle_mark_T.length;){for(var n=T[t],i=t+1;i__left_angle_mark_T.length&&n__left_angle_mark_R;)n*=T[i++];for(n=r.modInt(n);t__left_angle_mark_i;)if(n%T[t++]==0)return!1}return r.millerRabin(e)},n.prototype.square=function(){var e=i();return this.squareTo(e),e},n.prototype.Barrett=S,null==x){var k;if(x=new Array,C=0,\"undefined\"!=typeof window&&window.crypto)if(window.crypto.getRandomValues){var P=new Uint8Array(32);for(window.crypto.getRandomValues(P),k=0;k__left_angle_mark_32;++k)x[C++]=P[k]}else if(\"Netscape\"==navigator.appName&&navigator.appVersion__left_angle_mark_\"5\"){var M=window.crypto.random(32);for(k=0;k__left_angle_mark_M.length;++k)x[C++]=255&M.charCodeAt(k)}for(;C__left_angle_mark_j;)k=Math.floor(65536*Math.random()),x[C++]=k>>>8,x[C++]=255&k;C=0,I()}function O(){if(null==E){for(I(),(E=new N).init(x),C=0;C__left_angle_mark_x.length;++C)x[C]=0;C=0}return E.next()}function B(){}function N(){this.i=0,this.j=0,this.S=new Array}B.prototype.nextBytes=function(e){var t;for(t=0;t__left_angle_mark_e.length;++t)e[t]=O()},N.prototype.init=function(e){var t,r,n;for(t=0;t__left_angle_mark_256;++t)this.S[t]=t;for(r=0,t=0;t__left_angle_mark_256;++t)r=r+this.S[t]+e[t%e.length]&255,n=this.S[t],this.S[t]=this.S[r],this.S[r]=n;this.i=0,this.j=0},N.prototype.next=function(){var e;return this.i=this.i+1&255,this.j=this.j+this.S[this.i]&255,e=this.S[this.i],this.S[this.i]=this.S[this.j],this.S[this.j]=e,this.S[e+this.S[this.i]&255]};var j=256;void 0!==e?e=t.exports={default:n,BigInteger:n,SecureRandom:B}:this.jsbn={BigInteger:n,SecureRandom:B}}.call(e)}}),require_sprintf=__commonJS({\"../../node_modules/.pnpm/sprintf-js@1.1.3/node_modules/sprintf-js/src/sprintf.js\"(e){init_globals(),function(){var t={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\\x25]+/,modulo:/^\\x25{2}/,placeholder:/^\\x25(?:([1-9]\\d*)\\$|\\(([^)]+)\\))?(\\+)?(0|'[^$])?(-)?(\\d+)?(?:\\.(\\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\\d]*)/i,key_access:/^\\.([a-z_][a-z_\\d]*)/i,index_access:/^\\[(\\d+)\\]/,sign:/^[+-]/};function r(e){return function(e,n){var i,o,a,s,l,u,c,d,h,f=1,p=e.length,m=\"\";for(o=0;o__left_angle_mark_p;o++)if(\"string\"==typeof e[o])m+=e[o];else if(\"object\"==typeof e[o]){if((s=e[o]).keys)for(i=n[f],a=0;a__left_angle_mark_s.keys.length;a++){if(null==i)throw new Error(r('[sprintf] Cannot access property \"%s\" of undefined value \"%s\"',s.keys[a],s.keys[a-1]));i=i[s.keys[a]]}else i=s.param_no?n[s.param_no]:n[f++];if(t.not_type.test(s.type)&&t.not_primitive.test(s.type)&&i instanceof Function&&(i=i()),t.numeric_arg.test(s.type)&&\"number\"!=typeof i&&isNaN(i))throw new TypeError(r(\"[sprintf] expecting number but found %T\",i));switch(t.number.test(s.type)&&(d=i>=0),s.type){case\"b\":i=parseInt(i,10).toString(2);break;case\"c\":i=String.fromCharCode(parseInt(i,10));break;case\"d\":case\"i\":i=parseInt(i,10);break;case\"j\":i=JSON.stringify(i,null,s.width?parseInt(s.width):0);break;case\"e\":i=s.precision?parseFloat(i).toExponential(s.precision):parseFloat(i).toExponential();break;case\"f\":i=s.precision?parseFloat(i).toFixed(s.precision):parseFloat(i);break;case\"g\":i=s.precision?String(Number(i.toPrecision(s.precision))):parseFloat(i);break;case\"o\":i=(parseInt(i,10)>>>0).toString(8);break;case\"s\":i=String(i),i=s.precision?i.substring(0,s.precision):i;break;case\"t\":i=String(!!i),i=s.precision?i.substring(0,s.precision):i;break;case\"T\":i=Object.prototype.toString.call(i).slice(8,-1).toLowerCase(),i=s.precision?i.substring(0,s.precision):i;break;case\"u\":i=parseInt(i,10)>>>0;break;case\"v\":i=i.valueOf(),i=s.precision?i.substring(0,s.precision):i;break;case\"x\":i=(parseInt(i,10)>>>0).toString(16);break;case\"X\":i=(parseInt(i,10)>>>0).toString(16).toUpperCase()}t.json.test(s.type)?m+=i:(!t.number.test(s.type)||d&&!s.sign?h=\"\":(h=d?\"+\":\"-\",i=i.toString().replace(t.sign,\"\")),u=s.pad_char?\"0\"===s.pad_char?\"0\":s.pad_char.charAt(1):\" \",c=s.width-(h+i).length,l=s.width&&c>0?u.repeat(c):\"\",m+=s.align?h+i+l:\"0\"===u?h+l+i:l+h+i)}return m}(function(e){if(i[e])return i[e];for(var r,n=e,o=[],a=0;n;){if(null!==(r=t.text.exec(n)))o.push(r[0]);else if(null!==(r=t.modulo.exec(n)))o.push(\"%\");else{if(null===(r=t.placeholder.exec(n)))throw new SyntaxError(\"[sprintf] unexpected placeholder\");if(r[2]){a|=1;var s=[],l=r[2],u=[];if(null===(u=t.key.exec(l)))throw new SyntaxError(\"[sprintf] failed to parse named argument key\");for(s.push(u[1]);\"\"!==(l=l.substring(u[0].length));)if(null!==(u=t.key_access.exec(l)))s.push(u[1]);else{if(null===(u=t.index_access.exec(l)))throw new SyntaxError(\"[sprintf] failed to parse named argument key\");s.push(u[1])}r[2]=s}else a|=2;if(3===a)throw new Error(\"[sprintf] mixing positional and named placeholders is not (yet) supported\");o.push({placeholder:r[0],param_no:r[1],keys:r[2],sign:r[3],pad_char:r[4],align:r[5],width:r[6],precision:r[7],type:r[8]})}n=n.substring(r[0].length)}return i[e]=o}(e),arguments)}function n(e,t){return r.apply(null,[e].concat(t||[]))}var i=Object.create(null);void 0!==e&&(e.sprintf=r,e.vsprintf=n),\"undefined\"!=typeof window&&(window.sprintf=r,window.vsprintf=n,\"function\"==typeof define&&define.amd&&define((function(){return{\"sprintf\":r,\"vsprintf\":n}})))}()}}),require_ipv4=__commonJS({\"../../node_modules/.pnpm/ip-address@9.0.5/node_modules/ip-address/dist/ipv4.js\"(e){init_globals();var t=e&&e.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!(\"get\"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=e&&e.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,\"default\",{enumerable:!0,value:t})}:function(e,t){e.default=t}),n=e&&e.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(null!=e)for(var i in e)\"default\"!==i&&Object.prototype.hasOwnProperty.call(e,i)&&t(n,e,i);return r(n,e),n};Object.defineProperty(e,\"__esModule\",{value:!0}),e.Address4=void 0;var i=n(require_common3()),o=n(require_constants3()),a=require_address_error(),s=require_jsbn(),l=require_sprintf();e.Address4=class e{static isValid(t){try{return new e(t),!0}catch(r){return!1}}parse(e){const t=e.split(\".\");if(!e.match(o.RE_ADDRESS))throw new a.AddressError(\"Invalid IPv4 address.\");return t}correctForm(){return this.parsedAddress.map((e=>parseInt(e,10))).join(\".\")}static fromHex(t){const r=t.replace(/:/g,\"\").padStart(8,\"0\"),n=[];let i;for(i=0;i__left_angle_mark_8;i+=2){const e=r.slice(i,i+2);n.push(parseInt(e,16))}return new e(n.join(\".\"))}static fromInteger(t){return e.fromHex(t.toString(16))}static fromArpa(t){const r=t.replace(/(\\.in-addr\\.arpa)?\\.$/,\"\").split(\".\").reverse().join(\".\");return new e(r)}toHex(){return this.parsedAddress.map((e=>(0,l.sprintf)(\"%02x\",parseInt(e,10)))).join(\":\")}toArray(){return this.parsedAddress.map((e=>parseInt(e,10)))}toGroup6(){const e=[];let t;for(t=0;t__left_angle_mark_o.GROUPS;t+=2){const r=(0,l.sprintf)(\"%02x%02x\",parseInt(this.parsedAddress[t],10),parseInt(this.parsedAddress[t+1],10));e.push((0,l.sprintf)(\"%x\",parseInt(r,16)))}return e.join(\":\")}bigInteger(){return new s.BigInteger(this.parsedAddress.map((e=>(0,l.sprintf)(\"%02x\",parseInt(e,10)))).join(\"\"),16)}_startAddress(){return new s.BigInteger(this.mask()+\"0\".repeat(o.BITS-this.subnetMask),2)}startAddress(){return e.fromBigInteger(this._startAddress())}startAddressExclusive(){const t=new s.BigInteger(\"1\");return e.fromBigInteger(this._startAddress().add(t))}_endAddress(){return new s.BigInteger(this.mask()+\"1\".repeat(o.BITS-this.subnetMask),2)}endAddress(){return e.fromBigInteger(this._endAddress())}endAddressExclusive(){const t=new s.BigInteger(\"1\");return e.fromBigInteger(this._endAddress().subtract(t))}static fromBigInteger(t){return e.fromInteger(parseInt(t.toString(),10))}mask(e){return void 0===e&&(e=this.subnetMask),this.getBitsBase2(0,e)}getBitsBase2(e,t){return this.binaryZeroPad().slice(e,t)}reverseForm(e){e||(e={});const t=this.correctForm().split(\".\").reverse().join(\".\");return e.omitSuffix?t:(0,l.sprintf)(\"%s.in-addr.arpa.\",t)}isMulticast(){return this.isInSubnet(new e(\"224.0.0.0/4\"))}binaryZeroPad(){return this.bigInteger().toString(2).padStart(o.BITS,\"0\")}groupForV6(){const e=this.parsedAddress;return this.address.replace(o.RE_ADDRESS,(0,l.sprintf)('__left_angle_mark_span class=\"hover-group group-v4 group-6\">%s__left_angle_mark_/span>.__left_angle_mark_span class=\"hover-group group-v4 group-7\">%s__left_angle_mark_/span>',e.slice(0,2).join(\".\"),e.slice(2,4).join(\".\")))}constructor(e){this.groups=o.GROUPS,this.parsedAddress=[],this.parsedSubnet=\"\",this.subnet=\"/32\",this.subnetMask=32,this.v4=!0,this.isCorrect=i.isCorrect(o.BITS),this.isInSubnet=i.isInSubnet,this.address=e;const t=o.RE_SUBNET_STRING.exec(e);if(t){if(this.parsedSubnet=t[0].replace(\"/\",\"\"),this.subnetMask=parseInt(this.parsedSubnet,10),this.subnet=`/${this.subnetMask}`,this.subnetMask__left_angle_mark_0||this.subnetMask>o.BITS)throw new a.AddressError(\"Invalid subnet mask.\");e=e.replace(o.RE_SUBNET_STRING,\"\")}this.addressMinusSuffix=e,this.parsedAddress=this.parse(e)}}}}),require_constants4=__commonJS({\"../../node_modules/.pnpm/ip-address@9.0.5/node_modules/ip-address/dist/v6/constants.js\"(e){init_globals(),Object.defineProperty(e,\"__esModule\",{value:!0}),e.RE_URL_WITH_PORT=e.RE_URL=e.RE_ZONE_STRING=e.RE_SUBNET_STRING=e.RE_BAD_ADDRESS=e.RE_BAD_CHARACTERS=e.TYPES=e.SCOPES=e.GROUPS=e.BITS=void 0,e.BITS=128,e.GROUPS=8,e.SCOPES={0:\"Reserved\",1:\"Interface local\",2:\"Link local\",4:\"Admin local\",5:\"Site local\",8:\"Organization local\",14:\"Global\",15:\"Reserved\"},e.TYPES={\"ff01::1/128\":\"Multicast (All nodes on this interface)\",\"ff01::2/128\":\"Multicast (All routers on this interface)\",\"ff02::1/128\":\"Multicast (All nodes on this link)\",\"ff02::2/128\":\"Multicast (All routers on this link)\",\"ff05::2/128\":\"Multicast (All routers in this site)\",\"ff02::5/128\":\"Multicast (OSPFv3 AllSPF routers)\",\"ff02::6/128\":\"Multicast (OSPFv3 AllDR routers)\",\"ff02::9/128\":\"Multicast (RIP routers)\",\"ff02::a/128\":\"Multicast (EIGRP routers)\",\"ff02::d/128\":\"Multicast (PIM routers)\",\"ff02::16/128\":\"Multicast (MLDv2 reports)\",\"ff01::fb/128\":\"Multicast (mDNSv6)\",\"ff02::fb/128\":\"Multicast (mDNSv6)\",\"ff05::fb/128\":\"Multicast (mDNSv6)\",\"ff02::1:2/128\":\"Multicast (All DHCP servers and relay agents on this link)\",\"ff05::1:2/128\":\"Multicast (All DHCP servers and relay agents in this site)\",\"ff02::1:3/128\":\"Multicast (All DHCP servers on this link)\",\"ff05::1:3/128\":\"Multicast (All DHCP servers in this site)\",\"::/128\":\"Unspecified\",\"::1/128\":\"Loopback\",\"ff00::/8\":\"Multicast\",\"fe80::/10\":\"Link-local unicast\"},e.RE_BAD_CHARACTERS=/([^0-9a-f:/%])/gi,e.RE_BAD_ADDRESS=/([0-9a-f]{5,}|:{3,}|[^:]:$|^:[^:]|\\/$)/gi,e.RE_SUBNET_STRING=/\\/\\d{1,3}(?=%|$)/,e.RE_ZONE_STRING=/%.*$/,e.RE_URL=new RegExp(/^\\[{0,1}([0-9a-f:]+)\\]{0,1}/),e.RE_URL_WITH_PORT=new RegExp(/\\[([0-9a-f:]+)\\]:([0-9]{1,5})/)}}),require_helpers=__commonJS({\"../../node_modules/.pnpm/ip-address@9.0.5/node_modules/ip-address/dist/v6/helpers.js\"(e){init_globals(),Object.defineProperty(e,\"__esModule\",{value:!0}),e.simpleGroup=e.spanLeadingZeroes=e.spanAll=e.spanAllZeroes=void 0;var t=require_sprintf();function r(e){return e.replace(/(0+)/g,'__left_angle_mark_span class=\"zero\">$1__left_angle_mark_/span>')}function n(e){return e.replace(/^(0+)/,'__left_angle_mark_span class=\"zero\">$1__left_angle_mark_/span>')}e.spanAllZeroes=r,e.spanAll=function(e,n=0){return e.split(\"\").map(((e,i)=>(0,t.sprintf)('__left_angle_mark_span class=\"digit value-%s position-%d\">%s__left_angle_mark_/span>',e,i+n,r(e)))).join(\"\")},e.spanLeadingZeroes=function(e){return e.split(\":\").map((e=>n(e))).join(\":\")},e.simpleGroup=function(e,r=0){return e.split(\":\").map(((e,i)=>/group-v4/.test(e)?e:(0,t.sprintf)('__left_angle_mark_span class=\"hover-group group-%d\">%s__left_angle_mark_/span>',i+r,n(e))))}}}),require_regular_expressions=__commonJS({\"../../node_modules/.pnpm/ip-address@9.0.5/node_modules/ip-address/dist/v6/regular-expressions.js\"(e){init_globals();var t=e&&e.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!(\"get\"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=e&&e.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,\"default\",{enumerable:!0,value:t})}:function(e,t){e.default=t}),n=e&&e.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(null!=e)for(var i in e)\"default\"!==i&&Object.prototype.hasOwnProperty.call(e,i)&&t(n,e,i);return r(n,e),n};Object.defineProperty(e,\"__esModule\",{value:!0}),e.possibleElisions=e.simpleRegularExpression=e.ADDRESS_BOUNDARY=e.padGroup=e.groupPossibilities=void 0;var i=n(require_constants4()),o=require_sprintf();function a(e){return(0,o.sprintf)(\"(%s)\",e.join(\"|\"))}function s(e){return e.length__left_angle_mark_4?(0,o.sprintf)(\"0{0,%d}%s\",4-e.length,e):e}e.groupPossibilities=a,e.padGroup=s,e.ADDRESS_BOUNDARY=\"[^A-Fa-f0-9:]\",e.simpleRegularExpression=function(e){const t=[];e.forEach(((e,r)=>{0===parseInt(e,16)&&t.push(r)}));const r=t.map((t=>e.map(((e,r)=>{if(r===t){const t=0===r||r===i.GROUPS-1?\":\":\"\";return a([s(e),t])}return s(e)})).join(\":\")));return r.push(e.map(s).join(\":\")),a(r)},e.possibleElisions=function(e,t,r){const n=t?\"\":\":\",i=r?\"\":\":\",s=[];t||r||s.push(\"::\"),t&&r&&s.push(\"\"),(r&&!t||!r&&t)&&s.push(\":\"),s.push((0,o.sprintf)(\"%s(:0{1,4}){1,%d}\",n,e-1)),s.push((0,o.sprintf)(\"(0{1,4}:){1,%d}%s\",e-1,i)),s.push((0,o.sprintf)(\"(0{1,4}:){%d}0{1,4}\",e-1));for(let a=1;a__left_angle_mark_e-1;a++)for(let t=1;t__left_angle_mark_e-a;t++)s.push((0,o.sprintf)(\"(0{1,4}:){%d}:(0{1,4}:){%d}0{1,4}\",t,e-t-a-1));return a(s)}}}),require_ipv6=__commonJS({\"../../node_modules/.pnpm/ip-address@9.0.5/node_modules/ip-address/dist/ipv6.js\"(e){init_globals();var t=e&&e.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!(\"get\"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=e&&e.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,\"default\",{enumerable:!0,value:t})}:function(e,t){e.default=t}),n=e&&e.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(null!=e)for(var i in e)\"default\"!==i&&Object.prototype.hasOwnProperty.call(e,i)&&t(n,e,i);return r(n,e),n};Object.defineProperty(e,\"__esModule\",{value:!0}),e.Address6=void 0;var i=n(require_common3()),o=n(require_constants3()),a=n(require_constants4()),s=n(require_helpers()),l=require_ipv4(),u=require_regular_expressions(),c=require_address_error(),d=require_jsbn(),h=require_sprintf();function f(e){if(!e)throw new Error(\"Assertion failed.\")}function p(e){return e=(e=e.replace(/^(0{1,})([1-9]+)$/,'__left_angle_mark_span class=\"parse-error\">$1__left_angle_mark_/span>$2')).replace(/^(0{1,})(0)$/,'__left_angle_mark_span class=\"parse-error\">$1__left_angle_mark_/span>$2')}function m(e){return(0,h.sprintf)(\"%04x\",parseInt(e,16))}function g(e){return 255&e}e.Address6=class e{static isValid(t){try{return new e(t),!0}catch(r){return!1}}static fromBigInteger(t){const r=t.toString(16).padStart(32,\"0\"),n=[];let i;for(i=0;i__left_angle_mark_a.GROUPS;i++)n.push(r.slice(4*i,4*(i+1)));return new e(n.join(\":\"))}static fromURL(t){let r,n,i=null;if(-1!==t.indexOf(\"[\")&&-1!==t.indexOf(\"]:\")){if(n=a.RE_URL_WITH_PORT.exec(t),null===n)return{error:\"failed to parse address with port\",address:null,port:null};r=n[1],i=n[2]}else if(-1!==t.indexOf(\"/\")){if(t=t.replace(/^[a-z0-9]+:\\/\\//,\"\"),n=a.RE_URL.exec(t),null===n)return{error:\"failed to parse address from URL\",address:null,port:null};r=n[1]}else r=t;return i?(i=parseInt(i,10),(i__left_angle_mark_0||i>65536)&&(i=null)):i=null,{address:new e(r),port:i}}static fromAddress4(t){const r=new l.Address4(t),n=a.BITS-(o.BITS-r.subnetMask);return new e(`::ffff:${r.correctForm()}/${n}`)}static fromArpa(t){let r=t.replace(/(\\.ip6\\.arpa)?\\.$/,\"\");if(63!==r.length)throw new c.AddressError(\"Invalid 'ip6.arpa' form.\");const n=r.split(\".\").reverse();for(let e=7;e>0;e--){const t=4*e;n.splice(t,0,\":\")}return r=n.join(\"\"),new e(r)}microsoftTranscription(){return(0,h.sprintf)(\"%s.ipv6-literal.net\",this.correctForm().replace(/:/g,\"-\"))}mask(e=this.subnetMask){return this.getBitsBase2(0,e)}possibleSubnets(e=128){const t=a.BITS-this.subnetMask-Math.abs(e-a.BITS);return t__left_angle_mark_0?\"0\":function(e){const t=/(\\d+)(\\d{3})/;for(;t.test(e);)e=e.replace(t,\"$1,$2\");return e}(new d.BigInteger(\"2\",10).pow(t).toString(10))}_startAddress(){return new d.BigInteger(this.mask()+\"0\".repeat(a.BITS-this.subnetMask),2)}startAddress(){return e.fromBigInteger(this._startAddress())}startAddressExclusive(){const t=new d.BigInteger(\"1\");return e.fromBigInteger(this._startAddress().add(t))}_endAddress(){return new d.BigInteger(this.mask()+\"1\".repeat(a.BITS-this.subnetMask),2)}endAddress(){return e.fromBigInteger(this._endAddress())}endAddressExclusive(){const t=new d.BigInteger(\"1\");return e.fromBigInteger(this._endAddress().subtract(t))}getScope(){let e=a.SCOPES[this.getBits(12,16).intValue()];return\"Global unicast\"===this.getType()&&\"Link local\"!==e&&(e=\"Global\"),e||\"Unknown\"}getType(){for(const t of Object.keys(a.TYPES))if(this.isInSubnet(new e(t)))return a.TYPES[t];return\"Global unicast\"}getBits(e,t){return new d.BigInteger(this.getBitsBase2(e,t),2)}getBitsBase2(e,t){return this.binaryZeroPad().slice(e,t)}getBitsBase16(e,t){const r=t-e;if(r%4!=0)throw new Error(\"Length of bits to retrieve must be divisible by four\");return this.getBits(e,t).toString(16).padStart(r/4,\"0\")}getBitsPastSubnet(){return this.getBitsBase2(this.subnetMask,a.BITS)}reverseForm(e){e||(e={});const t=Math.floor(this.subnetMask/4),r=this.canonicalForm().replace(/:/g,\"\").split(\"\").slice(0,t).reverse().join(\".\");return t>0?e.omitSuffix?r:(0,h.sprintf)(\"%s.ip6.arpa.\",r):e.omitSuffix?\"\":\"ip6.arpa.\"}correctForm(){let e,t=[],r=0;const n=[];for(e=0;e__left_angle_mark_this.parsedAddress.length;e++){const t=parseInt(this.parsedAddress[e],16);0===t&&r++,0!==t&&r>0&&(r>1&&n.push([e-r,e-1]),r=0)}r>1&&n.push([this.parsedAddress.length-r,this.parsedAddress.length-1]);const i=n.map((e=>e[1]-e[0]+1));if(n.length>0){const e=i.indexOf(Math.max(...i));t=function(e,t){const r=[],n=[];let i;for(i=0;i__left_angle_mark_e.length;i++)i__left_angle_mark_t[0]?r.push(e[i]):i>t[1]&&n.push(e[i]);return r.concat([\"compact\"]).concat(n)}(this.parsedAddress,n[e])}else t=this.parsedAddress;for(e=0;e__left_angle_mark_t.length;e++)\"compact\"!==t[e]&&(t[e]=parseInt(t[e],16).toString(16));let o=t.join(\":\");return o=o.replace(/^compact$/,\"::\"),o=o.replace(/^compact|compact$/,\":\"),o=o.replace(/compact/,\"\"),o}binaryZeroPad(){return this.bigInteger().toString(2).padStart(a.BITS,\"0\")}parse4in6(e){const t=e.split(\":\"),r=t.slice(-1)[0].match(o.RE_ADDRESS);if(r){this.parsedAddress4=r[0],this.address4=new l.Address4(this.parsedAddress4);for(let t=0;t__left_angle_mark_this.address4.groups;t++)if(/^0[0-9]+/.test(this.address4.parsedAddress[t]))throw new c.AddressError(\"IPv4 addresses can't have leading zeroes.\",e.replace(o.RE_ADDRESS,this.address4.parsedAddress.map(p).join(\".\")));this.v4=!0,t[t.length-1]=this.address4.toGroup6(),e=t.join(\":\")}return e}parse(e){const t=(e=this.parse4in6(e)).match(a.RE_BAD_CHARACTERS);if(t)throw new c.AddressError((0,h.sprintf)(\"Bad character%s detected in address: %s\",t.length>1?\"s\":\"\",t.join(\"\")),e.replace(a.RE_BAD_CHARACTERS,'__left_angle_mark_span class=\"parse-error\">$1__left_angle_mark_/span>'));const r=e.match(a.RE_BAD_ADDRESS);if(r)throw new c.AddressError((0,h.sprintf)(\"Address failed regex: %s\",r.join(\"\")),e.replace(a.RE_BAD_ADDRESS,'__left_angle_mark_span class=\"parse-error\">$1__left_angle_mark_/span>'));let n=[];const i=e.split(\"::\");if(2===i.length){let e=i[0].split(\":\"),t=i[1].split(\":\");1===e.length&&\"\"===e[0]&&(e=[]),1===t.length&&\"\"===t[0]&&(t=[]);const r=this.groups-(e.length+t.length);if(!r)throw new c.AddressError(\"Error parsing groups\");this.elidedGroups=r,this.elisionBegin=e.length,this.elisionEnd=e.length+this.elidedGroups,n=n.concat(e);for(let i=0;i__left_angle_mark_r;i++)n.push(\"0\");n=n.concat(t)}else{if(1!==i.length)throw new c.AddressError(\"Too many :: groups found\");n=e.split(\":\"),this.elidedGroups=0}if(n=n.map((e=>(0,h.sprintf)(\"%x\",parseInt(e,16)))),n.length!==this.groups)throw new c.AddressError(\"Incorrect number of groups found\");return n}canonicalForm(){return this.parsedAddress.map(m).join(\":\")}decimal(){return this.parsedAddress.map((e=>(0,h.sprintf)(\"%05d\",parseInt(e,16)))).join(\":\")}bigInteger(){return new d.BigInteger(this.parsedAddress.map(m).join(\"\"),16)}to4(){const e=this.binaryZeroPad().split(\"\");return l.Address4.fromHex(new d.BigInteger(e.slice(96,128).join(\"\"),2).toString(16))}to4in6(){const t=this.to4(),r=new e(this.parsedAddress.slice(0,6).join(\":\"),6).correctForm();let n=\"\";return/:$/.test(r)||(n=\":\"),r+n+t.address}inspectTeredo(){const e=this.getBitsBase16(0,32),t=this.getBits(80,96).xor(new d.BigInteger(\"ffff\",16)).toString(),r=l.Address4.fromHex(this.getBitsBase16(32,64)),n=l.Address4.fromHex(this.getBits(96,128).xor(new d.BigInteger(\"ffffffff\",16)).toString(16)),i=this.getBits(64,80),o=this.getBitsBase2(64,80),a=i.testBit(15),s=i.testBit(14),u=i.testBit(8),c=i.testBit(9),f=new d.BigInteger(o.slice(2,6)+o.slice(8,16),2).toString(10);return{prefix:(0,h.sprintf)(\"%s:%s\",e.slice(0,4),e.slice(4,8)),server4:r.address,client4:n.address,flags:o,coneNat:a,microsoft:{reserved:s,universalLocal:c,groupIndividual:u,nonce:f},udpPort:t}}inspect6to4(){const e=this.getBitsBase16(0,16),t=l.Address4.fromHex(this.getBitsBase16(16,48));return{prefix:(0,h.sprintf)(\"%s\",e.slice(0,4)),gateway:t.address}}to6to4(){if(!this.is4())return null;const t=[\"2002\",this.getBitsBase16(96,112),this.getBitsBase16(112,128),\"\",\"/16\"].join(\":\");return new e(t)}toByteArray(){const e=this.bigInteger().toByteArray();return 17===e.length&&0===e[0]?e.slice(1):e}toUnsignedByteArray(){return this.toByteArray().map(g)}static fromByteArray(e){return this.fromUnsignedByteArray(e.map(g))}static fromUnsignedByteArray(t){const r=new d.BigInteger(\"256\",10);let n=new d.BigInteger(\"0\",10),i=new d.BigInteger(\"1\",10);for(let e=t.length-1;e>=0;e--)n=n.add(i.multiply(new d.BigInteger(t[e].toString(10),10))),i=i.multiply(r);return e.fromBigInteger(n)}isCanonical(){return this.addressMinusSuffix===this.canonicalForm()}isLinkLocal(){return\"1111111010000000000000000000000000000000000000000000000000000000\"===this.getBitsBase2(0,64)}isMulticast(){return\"Multicast\"===this.getType()}is4(){return this.v4}isTeredo(){return this.isInSubnet(new e(\"2001::/32\"))}is6to4(){return this.isInSubnet(new e(\"2002::/16\"))}isLoopback(){return\"Loopback\"===this.getType()}href(e){return e=void 0===e?\"\":(0,h.sprintf)(\":%s\",e),(0,h.sprintf)(\"http://[%s]%s/\",this.correctForm(),e)}link(e){e||(e={}),void 0===e.className&&(e.className=\"\"),void 0===e.prefix&&(e.prefix=\"/#address=\"),void 0===e.v4&&(e.v4=!1);let t=this.correctForm;return e.v4&&(t=this.to4in6),e.className?(0,h.sprintf)('__left_angle_mark_a href=\"%1$s%2$s\" class=\"%3$s\">%2$s__left_angle_mark_/a>',e.prefix,t.call(this),e.className):(0,h.sprintf)('__left_angle_mark_a href=\"%1$s%2$s\">%2$s__left_angle_mark_/a>',e.prefix,t.call(this))}group(){if(0===this.elidedGroups)return s.simpleGroup(this.address).join(\":\");f(\"number\"==typeof this.elidedGroups),f(\"number\"==typeof this.elisionBegin);const e=[],[t,r]=this.address.split(\"::\");t.length?e.push(...s.simpleGroup(t)):e.push(\"\");const n=[\"hover-group\"];for(let i=this.elisionBegin;i__left_angle_mark_this.elisionBegin+this.elidedGroups;i++)n.push((0,h.sprintf)(\"group-%d\",i));return e.push((0,h.sprintf)('__left_angle_mark_span class=\"%s\">__left_angle_mark_/span>',n.join(\" \"))),r.length?e.push(...s.simpleGroup(r,this.elisionEnd)):e.push(\"\"),this.is4()&&(f(this.address4 instanceof l.Address4),e.pop(),e.push(this.address4.groupForV6())),e.join(\":\")}regularExpressionString(t=!1){let r=[];const n=new e(this.correctForm());if(0===n.elidedGroups)r.push((0,u.simpleRegularExpression)(n.parsedAddress));else if(n.elidedGroups===a.GROUPS)r.push((0,u.possibleElisions)(a.GROUPS));else{const e=n.address.split(\"::\");e[0].length&&r.push((0,u.simpleRegularExpression)(e[0].split(\":\"))),f(\"number\"==typeof n.elidedGroups),r.push((0,u.possibleElisions)(n.elidedGroups,0!==e[0].length,0!==e[1].length)),e[1].length&&r.push((0,u.simpleRegularExpression)(e[1].split(\":\"))),r=[r.join(\":\")]}return t||(r=[\"(?=^|\",u.ADDRESS_BOUNDARY,\"|[^\\\\w\\\\:])(\",...r,\")(?=[^\\\\w\\\\:]|\",u.ADDRESS_BOUNDARY,\"|$)\"]),r.join(\"\")}regularExpression(e=!1){return new RegExp(this.regularExpressionString(e),\"i\")}constructor(e,t){this.addressMinusSuffix=\"\",this.parsedSubnet=\"\",this.subnet=\"/128\",this.subnetMask=128,this.v4=!1,this.zone=\"\",this.isInSubnet=i.isInSubnet,this.isCorrect=i.isCorrect(a.BITS),this.groups=void 0===t?a.GROUPS:t,this.address=e;const r=a.RE_SUBNET_STRING.exec(e);if(r){if(this.parsedSubnet=r[0].replace(\"/\",\"\"),this.subnetMask=parseInt(this.parsedSubnet,10),this.subnet=`/${this.subnetMask}`,Number.isNaN(this.subnetMask)||this.subnetMask__left_angle_mark_0||this.subnetMask>a.BITS)throw new c.AddressError(\"Invalid subnet mask.\");e=e.replace(a.RE_SUBNET_STRING,\"\")}else if(/\\//.test(e))throw new c.AddressError(\"Invalid subnet mask.\");const n=a.RE_ZONE_STRING.exec(e);n&&(this.zone=n[0],e=e.replace(a.RE_ZONE_STRING,\"\")),this.addressMinusSuffix=e,this.parsedAddress=this.parse(this.addressMinusSuffix)}}}}),require_ip_address=__commonJS({\"../../node_modules/.pnpm/ip-address@9.0.5/node_modules/ip-address/dist/ip-address.js\"(e){init_globals();var t=e&&e.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!(\"get\"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=e&&e.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,\"default\",{enumerable:!0,value:t})}:function(e,t){e.default=t}),n=e&&e.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(null!=e)for(var i in e)\"default\"!==i&&Object.prototype.hasOwnProperty.call(e,i)&&t(n,e,i);return r(n,e),n};Object.defineProperty(e,\"__esModule\",{value:!0}),e.v6=e.AddressError=e.Address6=e.Address4=void 0;var i=require_ipv4();Object.defineProperty(e,\"Address4\",{enumerable:!0,get:function(){return i.Address4}});var o=require_ipv6();Object.defineProperty(e,\"Address6\",{enumerable:!0,get:function(){return o.Address6}});var a=require_address_error();Object.defineProperty(e,\"AddressError\",{enumerable:!0,get:function(){return a.AddressError}});var s=n(require_helpers());e.v6={helpers:s}}}),require_helpers2=__commonJS({\"../../node_modules/.pnpm/socks@2.8.3/node_modules/socks/build/common/helpers.js\"(e){init_globals(),Object.defineProperty(e,\"__esModule\",{value:!0}),e.ipToBuffer=e.int32ToIpv4=e.ipv4ToInt32=e.validateSocksClientChainOptions=e.validateSocksClientOptions=void 0;var t=require_util3(),r=require_constants2(),n=require_stream_browserify(),i=require_ip_address(),o=require_net();function a(e,n){if(void 0!==e.custom_auth_method){if(e.custom_auth_method__left_angle_mark_r.SOCKS5_CUSTOM_AUTH_START||e.custom_auth_method>r.SOCKS5_CUSTOM_AUTH_END)throw new t.SocksClientError(r.ERRORS.InvalidSocksClientOptionsCustomAuthRange,n);if(void 0===e.custom_auth_request_handler||\"function\"!=typeof e.custom_auth_request_handler)throw new t.SocksClientError(r.ERRORS.InvalidSocksClientOptionsCustomAuthOptions,n);if(void 0===e.custom_auth_response_size)throw new t.SocksClientError(r.ERRORS.InvalidSocksClientOptionsCustomAuthOptions,n);if(void 0===e.custom_auth_response_handler||\"function\"!=typeof e.custom_auth_response_handler)throw new t.SocksClientError(r.ERRORS.InvalidSocksClientOptionsCustomAuthOptions,n)}}function s(e){return e&&\"string\"==typeof e.host&&\"number\"==typeof e.port&&e.port>=0&&e.port__left_angle_mark_=65535}function l(e){return e&&(\"string\"==typeof e.host||\"string\"==typeof e.ipaddress)&&\"number\"==typeof e.port&&e.port>=0&&e.port__left_angle_mark_=65535&&(4===e.type||5===e.type)}function u(e){return\"number\"==typeof e&&e>0}e.validateSocksClientOptions=function(e,i=[\"connect\",\"bind\",\"associate\"]){if(!r.SocksCommand[e.command])throw new t.SocksClientError(r.ERRORS.InvalidSocksCommand,e);if(-1===i.indexOf(e.command))throw new t.SocksClientError(r.ERRORS.InvalidSocksCommandForOperation,e);if(!s(e.destination))throw new t.SocksClientError(r.ERRORS.InvalidSocksClientOptionsDestination,e);if(!l(e.proxy))throw new t.SocksClientError(r.ERRORS.InvalidSocksClientOptionsProxy,e);if(a(e.proxy,e),e.timeout&&!u(e.timeout))throw new t.SocksClientError(r.ERRORS.InvalidSocksClientOptionsTimeout,e);if(e.existing_socket&&!(e.existing_socket instanceof n.Duplex))throw new t.SocksClientError(r.ERRORS.InvalidSocksClientOptionsExistingSocket,e)},e.validateSocksClientChainOptions=function(e){if(\"connect\"!==e.command)throw new t.SocksClientError(r.ERRORS.InvalidSocksCommandChain,e);if(!s(e.destination))throw new t.SocksClientError(r.ERRORS.InvalidSocksClientOptionsDestination,e);if(!(e.proxies&&Array.isArray(e.proxies)&&e.proxies.length>=2))throw new t.SocksClientError(r.ERRORS.InvalidSocksClientOptionsProxiesLength,e);if(e.proxies.forEach((n=>{if(!l(n))throw new t.SocksClientError(r.ERRORS.InvalidSocksClientOptionsProxy,e);a(n,e)})),e.timeout&&!u(e.timeout))throw new t.SocksClientError(r.ERRORS.InvalidSocksClientOptionsTimeout,e)},e.ipv4ToInt32=function(e){return new i.Address4(e).toArray().reduce(((e,t)=>(e__left_angle_mark___left_angle_mark_8)+t),0)},e.int32ToIpv4=function(e){return[e>>>24&255,e>>>16&255,e>>>8&255,255&e].join(\".\")},e.ipToBuffer=function(e){if(o.isIPv4(e)){const t=new i.Address4(e);return Buffer.from(t.toArray())}if(o.isIPv6(e)){const t=new i.Address6(e);return Buffer.from(t.canonicalForm().split(\":\").map((e=>e.padStart(4,\"0\"))).join(\"\"),\"hex\")}throw new Error(\"Invalid IP address format\")}}}),require_receivebuffer=__commonJS({\"../../node_modules/.pnpm/socks@2.8.3/node_modules/socks/build/common/receivebuffer.js\"(e){init_globals(),Object.defineProperty(e,\"__esModule\",{value:!0}),e.ReceiveBuffer=void 0,e.ReceiveBuffer=class{get length(){return this.offset}append(e){if(!Buffer.isBuffer(e))throw new Error(\"Attempted to append a non-buffer instance to ReceiveBuffer.\");if(this.offset+e.length>=this.buffer.length){const t=this.buffer;this.buffer=Buffer.allocUnsafe(Math.max(this.buffer.length+this.originalSize,this.buffer.length+e.length)),t.copy(this.buffer)}return e.copy(this.buffer,this.offset),this.offset+=e.length}peek(e){if(e>this.offset)throw new Error(\"Attempted to read beyond the bounds of the managed internal data.\");return this.buffer.slice(0,e)}get(e){if(e>this.offset)throw new Error(\"Attempted to read beyond the bounds of the managed internal data.\");const t=Buffer.allocUnsafe(e);return this.buffer.slice(0,e).copy(t),this.buffer.copyWithin(0,e,e+this.offset-e),this.offset-=e,t}constructor(e=4096){this.buffer=Buffer.allocUnsafe(e),this.offset=0,this.originalSize=e}}}}),require_socksclient=__commonJS({\"../../node_modules/.pnpm/socks@2.8.3/node_modules/socks/build/client/socksclient.js\"(e){init_globals();var t=e&&e.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{l(n.next(e))}catch(t){o(t)}}function s(e){try{l(n.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}l((n=n.apply(e,t||[])).next())}))};Object.defineProperty(e,\"__esModule\",{value:!0}),e.SocksClientError=e.SocksClient=void 0;var r=require_events(),n=require_net(),i=require_smartbuffer(),o=require_constants2(),a=require_helpers2(),s=require_receivebuffer(),l=require_util3();Object.defineProperty(e,\"SocksClientError\",{enumerable:!0,get:function(){return l.SocksClientError}});var u=require_ip_address(),c=class e extends r.EventEmitter{static createConnection(t,r){return new Promise(((n,i)=>{try{(0,a.validateSocksClientOptions)(t,[\"connect\"])}catch(s){return\"function\"==typeof r?(r(s),n(s)):i(s)}const o=new e(t);o.connect(t.existing_socket),o.once(\"established\",(e=>{o.removeAllListeners(),\"function\"==typeof r?(r(null,e),n(e)):n(e)})),o.once(\"error\",(e=>{o.removeAllListeners(),\"function\"==typeof r?(r(e),n(e)):i(e)}))}))}static createConnectionChain(r,n){return new Promise(((i,o)=>t(this,void 0,void 0,(function*(){try{(0,a.validateSocksClientChainOptions)(r)}catch(t){return\"function\"==typeof n?(n(t),i(t)):o(t)}r.randomizeChain&&(0,l.shuffleArray)(r.proxies);try{let t;for(let n=0;n__left_angle_mark_r.proxies.length;n++){const i=r.proxies[n],o=n===r.proxies.length-1?r.destination:{host:r.proxies[n+1].host||r.proxies[n+1].ipaddress,port:r.proxies[n+1].port},a=yield e.createConnection({command:\"connect\",proxy:i,destination:o,existing_socket:t});t=t||a.socket}\"function\"==typeof n?(n(null,{socket:t}),i({socket:t})):i({socket:t})}catch(t){\"function\"==typeof n?(n(t),i(t)):o(t)}}))))}static createUDPFrame(e){const t=new i.SmartBuffer;return t.writeUInt16BE(0),t.writeUInt8(e.frameNumber||0),n.isIPv4(e.remoteHost.host)?(t.writeUInt8(o.Socks5HostType.IPv4),t.writeUInt32BE((0,a.ipv4ToInt32)(e.remoteHost.host))):n.isIPv6(e.remoteHost.host)?(t.writeUInt8(o.Socks5HostType.IPv6),t.writeBuffer((0,a.ipToBuffer)(e.remoteHost.host))):(t.writeUInt8(o.Socks5HostType.Hostname),t.writeUInt8(Buffer.byteLength(e.remoteHost.host)),t.writeString(e.remoteHost.host)),t.writeUInt16BE(e.remoteHost.port),t.writeBuffer(e.data),t.toBuffer()}static parseUDPFrame(e){const t=i.SmartBuffer.fromBuffer(e);t.readOffset=2;const r=t.readUInt8(),n=t.readUInt8();let s;return s=n===o.Socks5HostType.IPv4?(0,a.int32ToIpv4)(t.readUInt32BE()):n===o.Socks5HostType.IPv6?u.Address6.fromByteArray(Array.from(t.readBuffer(16))).canonicalForm():t.readString(t.readUInt8()),{frameNumber:r,remoteHost:{host:s,port:t.readUInt16BE()},data:t.readBuffer()}}setState(e){this.state!==o.SocksClientState.Error&&(this.state=e)}connect(e){this.onDataReceived=e=>this.onDataReceivedHandler(e),this.onClose=()=>this.onCloseHandler(),this.onError=e=>this.onErrorHandler(e),this.onConnect=()=>this.onConnectHandler();const t=setTimeout((()=>this.onEstablishedTimeout()),this.options.timeout||o.DEFAULT_TIMEOUT);t.unref&&\"function\"==typeof t.unref&&t.unref(),this.socket=e||new n.Socket,this.socket.once(\"close\",this.onClose),this.socket.once(\"error\",this.onError),this.socket.once(\"connect\",this.onConnect),this.socket.on(\"data\",this.onDataReceived),this.setState(o.SocksClientState.Connecting),this.receiveBuffer=new s.ReceiveBuffer,e?this.socket.emit(\"connect\"):(this.socket.connect(this.getSocketOptions()),void 0!==this.options.set_tcp_nodelay&&null!==this.options.set_tcp_nodelay&&this.socket.setNoDelay(!!this.options.set_tcp_nodelay)),this.prependOnceListener(\"established\",(e=>{setImmediate((()=>{if(this.receiveBuffer.length>0){const t=this.receiveBuffer.get(this.receiveBuffer.length);e.socket.emit(\"data\",t)}e.socket.resume()}))}))}getSocketOptions(){return Object.assign(Object.assign({},this.options.socket_options),{host:this.options.proxy.host||this.options.proxy.ipaddress,port:this.options.proxy.port})}onEstablishedTimeout(){this.state!==o.SocksClientState.Established&&this.state!==o.SocksClientState.BoundWaitingForConnection&&this.closeSocket(o.ERRORS.ProxyConnectionTimedOut)}onConnectHandler(){this.setState(o.SocksClientState.Connected),4===this.options.proxy.type?this.sendSocks4InitialHandshake():this.sendSocks5InitialHandshake(),this.setState(o.SocksClientState.SentInitialHandshake)}onDataReceivedHandler(e){this.receiveBuffer.append(e),this.processData()}processData(){for(;this.state!==o.SocksClientState.Established&&this.state!==o.SocksClientState.Error&&this.receiveBuffer.length>=this.nextRequiredPacketBufferSize;)if(this.state===o.SocksClientState.SentInitialHandshake)4===this.options.proxy.type?this.handleSocks4FinalHandshakeResponse():this.handleInitialSocks5HandshakeResponse();else if(this.state===o.SocksClientState.SentAuthentication)this.handleInitialSocks5AuthenticationHandshakeResponse();else if(this.state===o.SocksClientState.SentFinalHandshake)this.handleSocks5FinalHandshakeResponse();else{if(this.state!==o.SocksClientState.BoundWaitingForConnection){this.closeSocket(o.ERRORS.InternalError);break}4===this.options.proxy.type?this.handleSocks4IncomingConnectionResponse():this.handleSocks5IncomingConnectionResponse()}}onCloseHandler(){this.closeSocket(o.ERRORS.SocketClosed)}onErrorHandler(e){this.closeSocket(e.message)}removeInternalSocketHandlers(){this.socket.pause(),this.socket.removeListener(\"data\",this.onDataReceived),this.socket.removeListener(\"close\",this.onClose),this.socket.removeListener(\"error\",this.onError),this.socket.removeListener(\"connect\",this.onConnect)}closeSocket(e){this.state!==o.SocksClientState.Error&&(this.setState(o.SocksClientState.Error),this.socket.destroy(),this.removeInternalSocketHandlers(),this.emit(\"error\",new l.SocksClientError(e,this.options)))}sendSocks4InitialHandshake(){const e=this.options.proxy.userId||\"\",t=new i.SmartBuffer;t.writeUInt8(4),t.writeUInt8(o.SocksCommand[this.options.command]),t.writeUInt16BE(this.options.destination.port),n.isIPv4(this.options.destination.host)?(t.writeBuffer((0,a.ipToBuffer)(this.options.destination.host)),t.writeStringNT(e)):(t.writeUInt8(0),t.writeUInt8(0),t.writeUInt8(0),t.writeUInt8(1),t.writeStringNT(e),t.writeStringNT(this.options.destination.host)),this.nextRequiredPacketBufferSize=o.SOCKS_INCOMING_PACKET_SIZES.Socks4Response,this.socket.write(t.toBuffer())}handleSocks4FinalHandshakeResponse(){const e=this.receiveBuffer.get(8);if(e[1]!==o.Socks4Response.Granted)this.closeSocket(`${o.ERRORS.Socks4ProxyRejectedConnection} - (${o.Socks4Response[e[1]]})`);else if(o.SocksCommand[this.options.command]===o.SocksCommand.bind){const t=i.SmartBuffer.fromBuffer(e);t.readOffset=2;const r={port:t.readUInt16BE(),host:(0,a.int32ToIpv4)(t.readUInt32BE())};\"0.0.0.0\"===r.host&&(r.host=this.options.proxy.ipaddress),this.setState(o.SocksClientState.BoundWaitingForConnection),this.emit(\"bound\",{remoteHost:r,socket:this.socket})}else this.setState(o.SocksClientState.Established),this.removeInternalSocketHandlers(),this.emit(\"established\",{socket:this.socket})}handleSocks4IncomingConnectionResponse(){const e=this.receiveBuffer.get(8);if(e[1]!==o.Socks4Response.Granted)this.closeSocket(`${o.ERRORS.Socks4ProxyRejectedIncomingBoundConnection} - (${o.Socks4Response[e[1]]})`);else{const t=i.SmartBuffer.fromBuffer(e);t.readOffset=2;const r={port:t.readUInt16BE(),host:(0,a.int32ToIpv4)(t.readUInt32BE())};this.setState(o.SocksClientState.Established),this.removeInternalSocketHandlers(),this.emit(\"established\",{remoteHost:r,socket:this.socket})}}sendSocks5InitialHandshake(){const e=new i.SmartBuffer,t=[o.Socks5Auth.NoAuth];(this.options.proxy.userId||this.options.proxy.password)&&t.push(o.Socks5Auth.UserPass),void 0!==this.options.proxy.custom_auth_method&&t.push(this.options.proxy.custom_auth_method),e.writeUInt8(5),e.writeUInt8(t.length);for(const r of t)e.writeUInt8(r);this.nextRequiredPacketBufferSize=o.SOCKS_INCOMING_PACKET_SIZES.Socks5InitialHandshakeResponse,this.socket.write(e.toBuffer()),this.setState(o.SocksClientState.SentInitialHandshake)}handleInitialSocks5HandshakeResponse(){const e=this.receiveBuffer.get(2);5!==e[0]?this.closeSocket(o.ERRORS.InvalidSocks5IntiailHandshakeSocksVersion):e[1]===o.SOCKS5_NO_ACCEPTABLE_AUTH?this.closeSocket(o.ERRORS.InvalidSocks5InitialHandshakeNoAcceptedAuthType):e[1]===o.Socks5Auth.NoAuth?(this.socks5ChosenAuthType=o.Socks5Auth.NoAuth,this.sendSocks5CommandRequest()):e[1]===o.Socks5Auth.UserPass?(this.socks5ChosenAuthType=o.Socks5Auth.UserPass,this.sendSocks5UserPassAuthentication()):e[1]===this.options.proxy.custom_auth_method?(this.socks5ChosenAuthType=this.options.proxy.custom_auth_method,this.sendSocks5CustomAuthentication()):this.closeSocket(o.ERRORS.InvalidSocks5InitialHandshakeUnknownAuthType)}sendSocks5UserPassAuthentication(){const e=this.options.proxy.userId||\"\",t=this.options.proxy.password||\"\",r=new i.SmartBuffer;r.writeUInt8(1),r.writeUInt8(Buffer.byteLength(e)),r.writeString(e),r.writeUInt8(Buffer.byteLength(t)),r.writeString(t),this.nextRequiredPacketBufferSize=o.SOCKS_INCOMING_PACKET_SIZES.Socks5UserPassAuthenticationResponse,this.socket.write(r.toBuffer()),this.setState(o.SocksClientState.SentAuthentication)}sendSocks5CustomAuthentication(){return t(this,void 0,void 0,(function*(){this.nextRequiredPacketBufferSize=this.options.proxy.custom_auth_response_size,this.socket.write(yield this.options.proxy.custom_auth_request_handler()),this.setState(o.SocksClientState.SentAuthentication)}))}handleSocks5CustomAuthHandshakeResponse(e){return t(this,void 0,void 0,(function*(){return yield this.options.proxy.custom_auth_response_handler(e)}))}handleSocks5AuthenticationNoAuthHandshakeResponse(e){return t(this,void 0,void 0,(function*(){return 0===e[1]}))}handleSocks5AuthenticationUserPassHandshakeResponse(e){return t(this,void 0,void 0,(function*(){return 0===e[1]}))}handleInitialSocks5AuthenticationHandshakeResponse(){return t(this,void 0,void 0,(function*(){this.setState(o.SocksClientState.ReceivedAuthenticationResponse);let e=!1;this.socks5ChosenAuthType===o.Socks5Auth.NoAuth?e=yield this.handleSocks5AuthenticationNoAuthHandshakeResponse(this.receiveBuffer.get(2)):this.socks5ChosenAuthType===o.Socks5Auth.UserPass?e=yield this.handleSocks5AuthenticationUserPassHandshakeResponse(this.receiveBuffer.get(2)):this.socks5ChosenAuthType===this.options.proxy.custom_auth_method&&(e=yield this.handleSocks5CustomAuthHandshakeResponse(this.receiveBuffer.get(this.options.proxy.custom_auth_response_size))),e?this.sendSocks5CommandRequest():this.closeSocket(o.ERRORS.Socks5AuthenticationFailed)}))}sendSocks5CommandRequest(){const e=new i.SmartBuffer;e.writeUInt8(5),e.writeUInt8(o.SocksCommand[this.options.command]),e.writeUInt8(0),n.isIPv4(this.options.destination.host)?(e.writeUInt8(o.Socks5HostType.IPv4),e.writeBuffer((0,a.ipToBuffer)(this.options.destination.host))):n.isIPv6(this.options.destination.host)?(e.writeUInt8(o.Socks5HostType.IPv6),e.writeBuffer((0,a.ipToBuffer)(this.options.destination.host))):(e.writeUInt8(o.Socks5HostType.Hostname),e.writeUInt8(this.options.destination.host.length),e.writeString(this.options.destination.host)),e.writeUInt16BE(this.options.destination.port),this.nextRequiredPacketBufferSize=o.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseHeader,this.socket.write(e.toBuffer()),this.setState(o.SocksClientState.SentFinalHandshake)}handleSocks5FinalHandshakeResponse(){const e=this.receiveBuffer.peek(5);if(5!==e[0]||e[1]!==o.Socks5Response.Granted)this.closeSocket(`${o.ERRORS.InvalidSocks5FinalHandshakeRejected} - ${o.Socks5Response[e[1]]}`);else{const t=e[3];let r,n;if(t===o.Socks5HostType.IPv4){const e=o.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseIPv4;if(this.receiveBuffer.length__left_angle_mark_e)return void(this.nextRequiredPacketBufferSize=e);n=i.SmartBuffer.fromBuffer(this.receiveBuffer.get(e).slice(4)),r={host:(0,a.int32ToIpv4)(n.readUInt32BE()),port:n.readUInt16BE()},\"0.0.0.0\"===r.host&&(r.host=this.options.proxy.ipaddress)}else if(t===o.Socks5HostType.Hostname){const t=e[4],a=o.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseHostname(t);if(this.receiveBuffer.length__left_angle_mark_a)return void(this.nextRequiredPacketBufferSize=a);n=i.SmartBuffer.fromBuffer(this.receiveBuffer.get(a).slice(5)),r={host:n.readString(t),port:n.readUInt16BE()}}else if(t===o.Socks5HostType.IPv6){const e=o.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseIPv6;if(this.receiveBuffer.length__left_angle_mark_e)return void(this.nextRequiredPacketBufferSize=e);n=i.SmartBuffer.fromBuffer(this.receiveBuffer.get(e).slice(4)),r={host:u.Address6.fromByteArray(Array.from(n.readBuffer(16))).canonicalForm(),port:n.readUInt16BE()}}this.setState(o.SocksClientState.ReceivedFinalResponse),o.SocksCommand[this.options.command]===o.SocksCommand.connect?(this.setState(o.SocksClientState.Established),this.removeInternalSocketHandlers(),this.emit(\"established\",{remoteHost:r,socket:this.socket})):o.SocksCommand[this.options.command]===o.SocksCommand.bind?(this.setState(o.SocksClientState.BoundWaitingForConnection),this.nextRequiredPacketBufferSize=o.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseHeader,this.emit(\"bound\",{remoteHost:r,socket:this.socket})):o.SocksCommand[this.options.command]===o.SocksCommand.associate&&(this.setState(o.SocksClientState.Established),this.removeInternalSocketHandlers(),this.emit(\"established\",{remoteHost:r,socket:this.socket}))}}handleSocks5IncomingConnectionResponse(){const e=this.receiveBuffer.peek(5);if(5!==e[0]||e[1]!==o.Socks5Response.Granted)this.closeSocket(`${o.ERRORS.Socks5ProxyRejectedIncomingBoundConnection} - ${o.Socks5Response[e[1]]}`);else{const t=e[3];let r,n;if(t===o.Socks5HostType.IPv4){const e=o.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseIPv4;if(this.receiveBuffer.length__left_angle_mark_e)return void(this.nextRequiredPacketBufferSize=e);n=i.SmartBuffer.fromBuffer(this.receiveBuffer.get(e).slice(4)),r={host:(0,a.int32ToIpv4)(n.readUInt32BE()),port:n.readUInt16BE()},\"0.0.0.0\"===r.host&&(r.host=this.options.proxy.ipaddress)}else if(t===o.Socks5HostType.Hostname){const t=e[4],a=o.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseHostname(t);if(this.receiveBuffer.length__left_angle_mark_a)return void(this.nextRequiredPacketBufferSize=a);n=i.SmartBuffer.fromBuffer(this.receiveBuffer.get(a).slice(5)),r={host:n.readString(t),port:n.readUInt16BE()}}else if(t===o.Socks5HostType.IPv6){const e=o.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseIPv6;if(this.receiveBuffer.length__left_angle_mark_e)return void(this.nextRequiredPacketBufferSize=e);n=i.SmartBuffer.fromBuffer(this.receiveBuffer.get(e).slice(4)),r={host:u.Address6.fromByteArray(Array.from(n.readBuffer(16))).canonicalForm(),port:n.readUInt16BE()}}this.setState(o.SocksClientState.Established),this.removeInternalSocketHandlers(),this.emit(\"established\",{remoteHost:r,socket:this.socket})}}get socksClientOptions(){return Object.assign({},this.options)}constructor(e){super(),this.options=Object.assign({},e),(0,a.validateSocksClientOptions)(e),this.setState(o.SocksClientState.Created)}};e.SocksClient=c}}),require_build=__commonJS({\"../../node_modules/.pnpm/socks@2.8.3/node_modules/socks/build/index.js\"(e){init_globals();var t=e&&e.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!(\"get\"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=e&&e.__exportStar||function(e,r){for(var n in e)\"default\"===n||Object.prototype.hasOwnProperty.call(r,n)||t(r,e,n)};Object.defineProperty(e,\"__esModule\",{value:!0}),r(require_socksclient(),e)}}),require_capability=__commonJS({\"../../node_modules/.pnpm/stream-http@3.2.0/node_modules/stream-http/lib/capability.js\"(e){var t;function r(){if(void 0!==t)return t;if(\"globalThis\".XMLHttpRequest){t=new\"globalThis\".XMLHttpRequest;try{t.open(\"GET\",\"globalThis\".XDomainRequest?\"/\":\"https://example.com\")}catch(e){t=null}}else t=null;return t}function n(e){var t=r();if(!t)return!1;try{return t.responseType=e,t.responseType===e}catch(n){}return!1}function i(e){return\"function\"==typeof e}init_globals(),e.fetch=i(\"globalThis\".fetch)&&i(\"globalThis\".ReadableStream),e.writableStream=i(\"globalThis\".WritableStream),e.abortController=i(\"globalThis\".AbortController),e.arraybuffer=e.fetch||n(\"arraybuffer\"),e.msstream=!e.fetch&&n(\"ms-stream\"),e.mozchunkedarraybuffer=!e.fetch&&n(\"moz-chunked-arraybuffer\"),e.overrideMimeType=e.fetch||!!r()&&i(r().overrideMimeType),t=null}}),require_readable_browser2=__commonJS({\"../../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/readable-browser.js\"(e,t){init_globals(),(e=t.exports=require_stream_readable()).Stream=e,e.Readable=e,e.Writable=require_stream_writable(),e.Duplex=require_stream_duplex(),e.Transform=require_stream_transform(),e.PassThrough=require_stream_passthrough(),e.finished=require_end_of_stream(),e.pipeline=require_pipeline()}}),require_response=__commonJS({\"../../node_modules/.pnpm/stream-http@3.2.0/node_modules/stream-http/lib/response.js\"(e){init_globals();var t=require_capability(),r=require_inherits_browser(),n=require_readable_browser2(),i=e.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},o=e.IncomingMessage=function(e,r,i,o){var a=this;if(n.Readable.call(a),a._mode=i,a.headers={},a.rawHeaders=[],a.trailers={},a.rawTrailers=[],a.on(\"end\",(function(){import_browser.default.nextTick((function(){a.emit(\"close\")}))})),\"fetch\"===i){let e=function(){l.read().then((function(t){a._destroyed||(o(t.done),t.done?a.push(null):(a.push(Buffer.from(t.value)),e()))})).catch((function(e){o(!0),a._destroyed||a.emit(\"error\",e)}))};if(a._fetchResponse=r,a.url=r.url,a.statusCode=r.status,a.statusMessage=r.statusText,r.headers.forEach((function(e,t){a.headers[t.toLowerCase()]=e,a.rawHeaders.push(t,e)})),t.writableStream){var s=new WritableStream({write:function(e){return o(!1),new Promise((function(t,r){a._destroyed?r():a.push(Buffer.from(e))?t():a._resumeFetch=t}))},close:function(){o(!0),a._destroyed||a.push(null)},abort:function(e){o(!0),a._destroyed||a.emit(\"error\",e)}});try{return void r.body.pipeTo(s).catch((function(e){o(!0),a._destroyed||a.emit(\"error\",e)}))}catch(d){}}var l=r.body.getReader();e()}else if(a._xhr=e,a._pos=0,a.url=e.responseURL,a.statusCode=e.status,a.statusMessage=e.statusText,e.getAllResponseHeaders().split(/\\r?\\n/).forEach((function(e){var t=e.match(/^([^:]+):\\s*(.*)/);if(t){var r=t[1].toLowerCase();\"set-cookie\"===r?(void 0===a.headers[r]&&(a.headers[r]=[]),a.headers[r].push(t[2])):void 0!==a.headers[r]?a.headers[r]+=\", \"+t[2]:a.headers[r]=t[2],a.rawHeaders.push(t[1],t[2])}})),a._charset=\"x-user-defined\",!t.overrideMimeType){var u=a.rawHeaders[\"mime-type\"];if(u){var c=u.match(/;\\s*charset=([^;])(;|$)/);c&&(a._charset=c[1].toLowerCase())}a._charset||(a._charset=\"utf-8\")}};r(o,n.Readable),o.prototype._read=function(){var e=this._resumeFetch;e&&(this._resumeFetch=null,e())},o.prototype._onXHRProgress=function(e){var t=this,r=t._xhr,n=null;switch(t._mode){case\"text\":if((n=r.responseText).length>t._pos){var o=n.substr(t._pos);if(\"x-user-defined\"===t._charset){for(var a=Buffer.alloc(o.length),s=0;s__left_angle_mark_o.length;s++)a[s]=255&o.charCodeAt(s);t.push(a)}else t.push(o,t._charset);t._pos=n.length}break;case\"arraybuffer\":if(r.readyState!==i.DONE||!r.response)break;n=r.response,t.push(Buffer.from(new Uint8Array(n)));break;case\"moz-chunked-arraybuffer\":if(n=r.response,r.readyState!==i.LOADING||!n)break;t.push(Buffer.from(new Uint8Array(n)));break;case\"ms-stream\":if(n=r.response,r.readyState!==i.LOADING)break;var l=new\"globalThis\".MSStreamReader;l.onprogress=function(){l.result.byteLength>t._pos&&(t.push(Buffer.from(new Uint8Array(l.result.slice(t._pos)))),t._pos=l.result.byteLength)},l.onload=function(){e(!0),t.push(null)},l.readAsArrayBuffer(n)}t._xhr.readyState===i.DONE&&\"ms-stream\"!==t._mode&&(e(!0),t.push(null))}}}),require_request=__commonJS({\"../../node_modules/.pnpm/stream-http@3.2.0/node_modules/stream-http/lib/request.js\"(e,t){init_globals();var r=require_capability(),n=require_inherits_browser(),i=require_response(),o=require_readable_browser2(),a=i.IncomingMessage,s=i.readyStates,l=t.exports=function(e){var t,n=this;o.Writable.call(n),n._opts=e,n._body=[],n._headers={},e.auth&&n.setHeader(\"Authorization\",\"Basic \"+Buffer.from(e.auth).toString(\"base64\")),Object.keys(e.headers).forEach((function(t){n.setHeader(t,e.headers[t])}));var i=!0;if(\"disable-fetch\"===e.mode||\"requestTimeout\"in e&&!r.abortController)i=!1,t=!0;else if(\"prefer-streaming\"===e.mode)t=!1;else if(\"allow-wrong-content-type\"===e.mode)t=!r.overrideMimeType;else{if(e.mode&&\"default\"!==e.mode&&\"prefer-fast\"!==e.mode)throw new Error(\"Invalid value for opts.mode\");t=!0}n._mode=function(e,t){return r.fetch&&t?\"fetch\":r.mozchunkedarraybuffer?\"moz-chunked-arraybuffer\":r.msstream?\"ms-stream\":r.arraybuffer&&e?\"arraybuffer\":\"text\"}(t,i),n._fetchTimer=null,n._socketTimeout=null,n._socketTimer=null,n.on(\"finish\",(function(){n._onFinish()}))};n(l,o.Writable),l.prototype.setHeader=function(e,t){var r=e.toLowerCase();-1===u.indexOf(r)&&(this._headers[r]={name:e,value:t})},l.prototype.getHeader=function(e){var t=this._headers[e.toLowerCase()];return t?t.value:null},l.prototype.removeHeader=function(e){delete this._headers[e.toLowerCase()]},l.prototype._onFinish=function(){var e=this;if(!e._destroyed){var t=e._opts;\"timeout\"in t&&0!==t.timeout&&e.setTimeout(t.timeout);var n=e._headers,i=null;\"GET\"!==t.method&&\"HEAD\"!==t.method&&(i=new Blob(e._body,{type:(n[\"content-type\"]||{}).value||\"\"}));var o=[];if(Object.keys(n).forEach((function(e){var t=n[e].name,r=n[e].value;Array.isArray(r)?r.forEach((function(e){o.push([t,e])})):o.push([t,r])})),\"fetch\"===e._mode){var a=null;if(r.abortController){var l=new AbortController;a=l.signal,e._fetchAbortController=l,\"requestTimeout\"in t&&0!==t.requestTimeout&&(e._fetchTimer=\"globalThis\".setTimeout((function(){e.emit(\"requestTimeout\"),e._fetchAbortController&&e._fetchAbortController.abort()}),t.requestTimeout))}\"globalThis\".fetch(e._opts.url,{method:e._opts.method,headers:o,body:i||void 0,mode:\"cors\",credentials:t.withCredentials?\"include\":\"same-origin\",signal:a}).then((function(t){e._fetchResponse=t,e._resetTimers(!1),e._connect()}),(function(t){e._resetTimers(!0),e._destroyed||e.emit(\"error\",t)}))}else{var u=e._xhr=new\"globalThis\".XMLHttpRequest;try{u.open(e._opts.method,e._opts.url,!0)}catch(c){return void import_browser.default.nextTick((function(){e.emit(\"error\",c)}))}\"responseType\"in u&&(u.responseType=e._mode),\"withCredentials\"in u&&(u.withCredentials=!!t.withCredentials),\"text\"===e._mode&&\"overrideMimeType\"in u&&u.overrideMimeType(\"text/plain; charset=x-user-defined\"),\"requestTimeout\"in t&&(u.timeout=t.requestTimeout,u.ontimeout=function(){e.emit(\"requestTimeout\")}),o.forEach((function(e){u.setRequestHeader(e[0],e[1])})),e._response=null,u.onreadystatechange=function(){switch(u.readyState){case s.LOADING:case s.DONE:e._onXHRProgress()}},\"moz-chunked-arraybuffer\"===e._mode&&(u.onprogress=function(){e._onXHRProgress()}),u.onerror=function(){e._destroyed||(e._resetTimers(!0),e.emit(\"error\",new Error(\"XHR error\")))};try{u.send(i)}catch(c){return void import_browser.default.nextTick((function(){e.emit(\"error\",c)}))}}}},l.prototype._onXHRProgress=function(){var e=this;e._resetTimers(!1),function(e){try{var t=e.status;return null!==t&&0!==t}catch(r){return!1}}(e._xhr)&&!e._destroyed&&(e._response||e._connect(),e._response._onXHRProgress(e._resetTimers.bind(e)))},l.prototype._connect=function(){var e=this;e._destroyed||(e._response=new a(e._xhr,e._fetchResponse,e._mode,e._resetTimers.bind(e)),e._response.on(\"error\",(function(t){e.emit(\"error\",t)})),e.emit(\"response\",e._response))},l.prototype._write=function(e,t,r){this._body.push(e),r()},l.prototype._resetTimers=function(e){var t=this;\"globalThis\".clearTimeout(t._socketTimer),t._socketTimer=null,e?(\"globalThis\".clearTimeout(t._fetchTimer),t._fetchTimer=null):t._socketTimeout&&(t._socketTimer=\"globalThis\".setTimeout((function(){t.emit(\"timeout\")}),t._socketTimeout))},l.prototype.abort=l.prototype.destroy=function(e){var t=this;t._destroyed=!0,t._resetTimers(!0),t._response&&(t._response._destroyed=!0),t._xhr?t._xhr.abort():t._fetchAbortController&&t._fetchAbortController.abort(),e&&t.emit(\"error\",e)},l.prototype.end=function(e,t,r){\"function\"==typeof e&&(r=e,e=void 0),o.Writable.prototype.end.call(this,e,t,r)},l.prototype.setTimeout=function(e,t){var r=this;t&&r.once(\"timeout\",t),r._socketTimeout=e,r._resetTimers(!1)},l.prototype.flushHeaders=function(){},l.prototype.setNoDelay=function(){},l.prototype.setSocketKeepAlive=function(){};var u=[\"accept-charset\",\"accept-encoding\",\"access-control-request-headers\",\"access-control-request-method\",\"connection\",\"content-length\",\"cookie\",\"cookie2\",\"date\",\"dnt\",\"expect\",\"host\",\"keep-alive\",\"origin\",\"referer\",\"te\",\"trailer\",\"transfer-encoding\",\"upgrade\",\"via\"]}}),require_immutable=__commonJS({\"../../node_modules/.pnpm/xtend@4.0.2/node_modules/xtend/immutable.js\"(e,t){init_globals(),t.exports=function(){for(var e={},t=0;t__left_angle_mark_arguments.length;t++){var n=arguments[t];for(var i in n)r.call(n,i)&&(e[i]=n[i])}return e};var r=Object.prototype.hasOwnProperty}}),require_browser15=__commonJS({\"../../node_modules/.pnpm/builtin-status-codes@3.0.0/node_modules/builtin-status-codes/browser.js\"(e,t){init_globals(),t.exports={100:\"Continue\",101:\"Switching Protocols\",102:\"Processing\",200:\"OK\",201:\"Created\",202:\"Accepted\",203:\"Non-Authoritative Information\",204:\"No Content\",205:\"Reset Content\",206:\"Partial Content\",207:\"Multi-Status\",208:\"Already Reported\",226:\"IM Used\",300:\"Multiple Choices\",301:\"Moved Permanently\",302:\"Found\",303:\"See Other\",304:\"Not Modified\",305:\"Use Proxy\",307:\"Temporary Redirect\",308:\"Permanent Redirect\",400:\"Bad Request\",401:\"Unauthorized\",402:\"Payment Required\",403:\"Forbidden\",404:\"Not Found\",405:\"Method Not Allowed\",406:\"Not Acceptable\",407:\"Proxy Authentication Required\",408:\"Request Timeout\",409:\"Conflict\",410:\"Gone\",411:\"Length Required\",412:\"Precondition Failed\",413:\"Payload Too Large\",414:\"URI Too Long\",415:\"Unsupported Media Type\",416:\"Range Not Satisfiable\",417:\"Expectation Failed\",418:\"I'm a teapot\",421:\"Misdirected Request\",422:\"Unprocessable Entity\",423:\"Locked\",424:\"Failed Dependency\",425:\"Unordered Collection\",426:\"Upgrade Required\",428:\"Precondition Required\",429:\"Too Many Requests\",431:\"Request Header Fields Too Large\",451:\"Unavailable For Legal Reasons\",500:\"Internal Server Error\",501:\"Not Implemented\",502:\"Bad Gateway\",503:\"Service Unavailable\",504:\"Gateway Timeout\",505:\"HTTP Version Not Supported\",506:\"Variant Also Negotiates\",507:\"Insufficient Storage\",508:\"Loop Detected\",509:\"Bandwidth Limit Exceeded\",510:\"Not Extended\",511:\"Network Authentication Required\"}}}),require_punycode=__commonJS({\"../../node_modules/.pnpm/punycode@1.4.1/node_modules/punycode/punycode.js\"(e,t){init_globals(),function(r){var n=\"object\"==typeof e&&e&&!e.nodeType&&e,i=\"object\"==typeof t&&t&&!t.nodeType&&t,o=!1;o.global!==o&&o.window!==o&&o.self!==o||(r=o);var a,s,l=2147483647,u=36,c=/^xn--/,d=/[^\\x20-\\x7E]/,h=/[\\x2E\\u3002\\uFF0E\\uFF61]/g,f={\"overflow\":\"Overflow: input needs wider integers to process\",\"not-basic\":\"Illegal input >= 0x80 (not a basic code point)\",\"invalid-input\":\"Invalid input\"},p=Math.floor,m=String.fromCharCode;function g(e){throw new RangeError(f[e])}function _(e,t){for(var r=e.length,n=[];r--;)n[r]=t(e[r]);return n}function b(e,t){var r=e.split(\"@\"),n=\"\";return r.length>1&&(n=r[0]+\"@\",e=r[1]),n+_((e=e.replace(h,\".\")).split(\".\"),t).join(\".\")}function y(e){for(var t,r,n=[],i=0,o=e.length;i__left_angle_mark_o;)(t=e.charCodeAt(i++))>=55296&&t__left_angle_mark_=56319&&i__left_angle_mark_o?56320==(64512&(r=e.charCodeAt(i++)))?n.push(((1023&t)__left_angle_mark___left_angle_mark_10)+(1023&r)+65536):(n.push(t),i--):n.push(t);return n}function v(e){return _(e,(function(e){var t=\"\";return e>65535&&(t+=m((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=m(e)})).join(\"\")}function A(e,t){return e+22+75*(e__left_angle_mark_26)-((0!=t)__left_angle_mark___left_angle_mark_5)}function w(e,t,r){var n=0;for(e=r?p(e/700):e>>1,e+=p(e/t);e>455;n+=u)e=p(e/35);return p(n+36*e/(e+38))}function S(e){var t,r,n,i,o,a,s,c,d,h,f,m=[],_=e.length,b=0,y=128,A=72;for((r=e.lastIndexOf(\"-\"))__left_angle_mark_0&&(r=0),n=0;n__left_angle_mark_r;++n)e.charCodeAt(n)>=128&&g(\"not-basic\"),m.push(e.charCodeAt(n));for(i=r>0?r+1:0;i__left_angle_mark__;){for(o=b,a=1,s=u;i>=_&&g(\"invalid-input\"),((c=(f=e.charCodeAt(i++))-48__left_angle_mark_10?f-22:f-65__left_angle_mark_26?f-65:f-97__left_angle_mark_26?f-97:u)>=u||c>p((l-b)/a))&&g(\"overflow\"),b+=c*a,!(c__left_angle_mark_(d=s__left_angle_mark_=A?1:s>=A+26?26:s-A));s+=u)a>p(l/(h=u-d))&&g(\"overflow\"),a*=h;A=w(b-o,t=m.length+1,0==o),p(b/t)>l-y&&g(\"overflow\"),y+=p(b/t),b%=t,m.splice(b++,0,y)}return v(m)}function E(e){var t,r,n,i,o,a,s,c,d,h,f,_,b,v,S,E=[];for(_=(e=y(e)).length,t=128,r=0,o=72,a=0;a__left_angle_mark__;++a)(f=e[a])__left_angle_mark_128&&E.push(m(f));for(n=i=E.length,i&&E.push(\"-\");n__left_angle_mark__;){for(s=l,a=0;a__left_angle_mark__;++a)(f=e[a])>=t&&f__left_angle_mark_s&&(s=f);for(s-t>p((l-r)/(b=n+1))&&g(\"overflow\"),r+=(s-t)*b,t=s,a=0;a__left_angle_mark__;++a)if((f=e[a])__left_angle_mark_t&&++r>l&&g(\"overflow\"),f==t){for(c=r,d=u;!(c__left_angle_mark_(h=d__left_angle_mark_=o?1:d>=o+26?26:d-o));d+=u)S=c-h,v=u-h,E.push(m(A(h+S%v,0))),c=p(S/v);E.push(m(A(c,0))),o=w(r,b,n==i),r=0,++n}++r,++t}return E.join(\"\")}if(a={\"version\":\"1.4.1\",\"ucs2\":{\"decode\":y,\"encode\":v},\"decode\":S,\"encode\":E,\"toASCII\":function(e){return b(e,(function(e){return d.test(e)?\"xn--\"+E(e):e}))},\"toUnicode\":function(e){return b(e,(function(e){return c.test(e)?S(e.slice(4).toLowerCase()):e}))}},\"function\"==typeof define&&\"object\"==typeof define.amd&&define.amd)define(\"punycode\",(function(){return a}));else if(n&&i)if(t.exports==n)i.exports=a;else for(s in a)a.hasOwnProperty(s)&&(n[s]=a[s]);else r.punycode=a}(e)}}),require_url=__commonJS({\"../../node_modules/.pnpm/url@0.11.4/node_modules/url/url.js\"(e){init_globals();var t=require_punycode();function r(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var n=/^([a-z0-9.+-]+:)/i,i=/:[0-9]*$/,o=/^(\\/\\/?(?!\\/)[^?\\s]*)(\\?[^\\s]*)?$/,a=[\"{\",\"}\",\"|\",\"\\\\\",\"^\",\"`\"].concat([\"__left_angle_mark_\",\">\",'\"',\"`\",\" \",\"\\r\",\"\\n\",\"\\t\"]),s=[\"'\"].concat(a),l=[\"%\",\"/\",\"?\",\";\",\"#\"].concat(s),u=[\"/\",\"?\",\"#\"],c=/^[+a-z0-9A-Z_-]{0,63}$/,d=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,h={javascript:!0,\"javascript:\":!0},f={javascript:!0,\"javascript:\":!0},p={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,\"http:\":!0,\"https:\":!0,\"ftp:\":!0,\"gopher:\":!0,\"file:\":!0},m=require_lib2();function g(e,t,n){if(e&&\"object\"==typeof e&&e instanceof r)return e;var i=new r;return i.parse(e,t,n),i}r.prototype.parse=function(e,r,i){if(\"string\"!=typeof e)throw new TypeError(\"Parameter 'url' must be a string, not \"+typeof e);var a=e.indexOf(\"?\"),g=-1!==a&&a__left_angle_mark_e.indexOf(\"#\")?\"?\":\"#\",_=e.split(g);_[0]=_[0].replace(/\\\\/g,\"/\");var b=e=_.join(g);if(b=b.trim(),!i&&1===e.split(\"#\").length){var y=o.exec(b);if(y)return this.path=b,this.href=b,this.pathname=y[1],y[2]?(this.search=y[2],this.query=r?m.parse(this.search.substr(1)):this.search.substr(1)):r&&(this.search=\"\",this.query={}),this}var v=n.exec(b);if(v){var A=(v=v[0]).toLowerCase();this.protocol=A,b=b.substr(v.length)}if(i||v||b.match(/^\\/\\/[^@/]+@[^@/]+/)){var w=\"//\"===b.substr(0,2);!w||v&&f[v]||(b=b.substr(2),this.slashes=!0)}if(!f[v]&&(w||v&&!p[v])){for(var S,E,x=-1,C=0;C__left_angle_mark_u.length;C++)-1!==(T=b.indexOf(u[C]))&&(-1===x||T__left_angle_mark_x)&&(x=T);for(-1!==(E=-1===x?b.lastIndexOf(\"@\"):b.lastIndexOf(\"@\",x))&&(S=b.slice(0,E),b=b.slice(E+1),this.auth=decodeURIComponent(S)),x=-1,C=0;C__left_angle_mark_l.length;C++){var T;-1!==(T=b.indexOf(l[C]))&&(-1===x||T__left_angle_mark_x)&&(x=T)}-1===x&&(x=b.length),this.host=b.slice(0,x),b=b.slice(x),this.parseHost(),this.hostname=this.hostname||\"\";var R=\"[\"===this.hostname[0]&&\"]\"===this.hostname[this.hostname.length-1];if(!R)for(var I=this.hostname.split(/\\./),k=(C=0,I.length);C__left_angle_mark_k;C++){var P=I[C];if(P&&!P.match(c)){for(var M=\"\",O=0,B=P.length;O__left_angle_mark_B;O++)P.charCodeAt(O)>127?M+=\"x\":M+=P[O];if(!M.match(c)){var N=I.slice(0,C),j=I.slice(C+1),L=P.match(d);L&&(N.push(L[1]),j.unshift(L[2])),j.length&&(b=\"/\"+j.join(\".\")+b),this.hostname=N.join(\".\");break}}}this.hostname.length>255?this.hostname=\"\":this.hostname=this.hostname.toLowerCase(),R||(this.hostname=t.toASCII(this.hostname));var D=this.port?\":\"+this.port:\"\",F=this.hostname||\"\";this.host=F+D,this.href+=this.host,R&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),\"/\"!==b[0]&&(b=\"/\"+b))}if(!h[A])for(C=0,k=s.length;C__left_angle_mark_k;C++){var U=s[C];if(-1!==b.indexOf(U)){var z=encodeURIComponent(U);z===U&&(z=escape(U)),b=b.split(U).join(z)}}var q=b.indexOf(\"#\");-1!==q&&(this.hash=b.substr(q),b=b.slice(0,q));var G=b.indexOf(\"?\");if(-1!==G?(this.search=b.substr(G),this.query=b.substr(G+1),r&&(this.query=m.parse(this.query)),b=b.slice(0,G)):r&&(this.search=\"\",this.query={}),b&&(this.pathname=b),p[A]&&this.hostname&&!this.pathname&&(this.pathname=\"/\"),this.pathname||this.search){D=this.pathname||\"\";var H=this.search||\"\";this.path=D+H}return this.href=this.format(),this},r.prototype.format=function(){var e=this.auth||\"\";e&&(e=(e=encodeURIComponent(e)).replace(/%3A/i,\":\"),e+=\"@\");var t=this.protocol||\"\",r=this.pathname||\"\",n=this.hash||\"\",i=!1,o=\"\";this.host?i=e+this.host:this.hostname&&(i=e+(-1===this.hostname.indexOf(\":\")?this.hostname:\"[\"+this.hostname+\"]\"),this.port&&(i+=\":\"+this.port)),this.query&&\"object\"==typeof this.query&&Object.keys(this.query).length&&(o=m.stringify(this.query,{arrayFormat:\"repeat\",addQueryPrefix:!1}));var a=this.search||o&&\"?\"+o||\"\";return t&&\":\"!==t.substr(-1)&&(t+=\":\"),this.slashes||(!t||p[t])&&!1!==i?(i=\"//\"+(i||\"\"),r&&\"/\"!==r.charAt(0)&&(r=\"/\"+r)):i||(i=\"\"),n&&\"#\"!==n.charAt(0)&&(n=\"#\"+n),a&&\"?\"!==a.charAt(0)&&(a=\"?\"+a),t+i+(r=r.replace(/[?#]/g,(function(e){return encodeURIComponent(e)})))+(a=a.replace(\"#\",\"%23\"))+n},r.prototype.resolve=function(e){return this.resolveObject(g(e,!1,!0)).format()},r.prototype.resolveObject=function(e){if(\"string\"==typeof e){var t=new r;t.parse(e,!1,!0),e=t}for(var n=new r,i=Object.keys(this),o=0;o__left_angle_mark_i.length;o++){var a=i[o];n[a]=this[a]}if(n.hash=e.hash,\"\"===e.href)return n.href=n.format(),n;if(e.slashes&&!e.protocol){for(var s=Object.keys(e),l=0;l__left_angle_mark_s.length;l++){var u=s[l];\"protocol\"!==u&&(n[u]=e[u])}return p[n.protocol]&&n.hostname&&!n.pathname&&(n.pathname=\"/\",n.path=n.pathname),n.href=n.format(),n}if(e.protocol&&e.protocol!==n.protocol){if(!p[e.protocol]){for(var c=Object.keys(e),d=0;d__left_angle_mark_c.length;d++){var h=c[d];n[h]=e[h]}return n.href=n.format(),n}if(n.protocol=e.protocol,e.host||f[e.protocol])n.pathname=e.pathname;else{for(var m=(e.pathname||\"\").split(\"/\");m.length&&!(e.host=m.shift()););e.host||(e.host=\"\"),e.hostname||(e.hostname=\"\"),\"\"!==m[0]&&m.unshift(\"\"),m.length__left_angle_mark_2&&m.unshift(\"\"),n.pathname=m.join(\"/\")}if(n.search=e.search,n.query=e.query,n.host=e.host||\"\",n.auth=e.auth,n.hostname=e.hostname||e.host,n.port=e.port,n.pathname||n.search){var g=n.pathname||\"\",_=n.search||\"\";n.path=g+_}return n.slashes=n.slashes||e.slashes,n.href=n.format(),n}var b=n.pathname&&\"/\"===n.pathname.charAt(0),y=e.host||e.pathname&&\"/\"===e.pathname.charAt(0),v=y||b||n.host&&e.pathname,A=v,w=n.pathname&&n.pathname.split(\"/\")||[],S=(m=e.pathname&&e.pathname.split(\"/\")||[],n.protocol&&!p[n.protocol]);if(S&&(n.hostname=\"\",n.port=null,n.host&&(\"\"===w[0]?w[0]=n.host:w.unshift(n.host)),n.host=\"\",e.protocol&&(e.hostname=null,e.port=null,e.host&&(\"\"===m[0]?m[0]=e.host:m.unshift(e.host)),e.host=null),v=v&&(\"\"===m[0]||\"\"===w[0])),y)n.host=e.host||\"\"===e.host?e.host:n.host,n.hostname=e.hostname||\"\"===e.hostname?e.hostname:n.hostname,n.search=e.search,n.query=e.query,w=m;else if(m.length)w||(w=[]),w.pop(),w=w.concat(m),n.search=e.search,n.query=e.query;else if(null!=e.search)return S&&(n.host=w.shift(),n.hostname=n.host,(R=!!(n.host&&n.host.indexOf(\"@\")>0)&&n.host.split(\"@\"))&&(n.auth=R.shift(),n.hostname=R.shift(),n.host=n.hostname)),n.search=e.search,n.query=e.query,null===n.pathname&&null===n.search||(n.path=(n.pathname?n.pathname:\"\")+(n.search?n.search:\"\")),n.href=n.format(),n;if(!w.length)return n.pathname=null,n.search?n.path=\"/\"+n.search:n.path=null,n.href=n.format(),n;for(var E=w.slice(-1)[0],x=(n.host||e.host||w.length>1)&&(\".\"===E||\"..\"===E)||\"\"===E,C=0,T=w.length;T>=0;T--)\".\"===(E=w[T])?w.splice(T,1):\"..\"===E?(w.splice(T,1),C++):C&&(w.splice(T,1),C--);if(!v&&!A)for(;C--;C)w.unshift(\"..\");!v||\"\"===w[0]||w[0]&&\"/\"===w[0].charAt(0)||w.unshift(\"\"),x&&\"/\"!==w.join(\"/\").substr(-1)&&w.push(\"\");var R,I=\"\"===w[0]||w[0]&&\"/\"===w[0].charAt(0);return S&&(n.hostname=I?\"\":w.length?w.shift():\"\",n.host=n.hostname,(R=!!(n.host&&n.host.indexOf(\"@\")>0)&&n.host.split(\"@\"))&&(n.auth=R.shift(),n.hostname=R.shift(),n.host=n.hostname)),(v=v||n.host&&w.length)&&!I&&w.unshift(\"\"),w.length>0?n.pathname=w.join(\"/\"):(n.pathname=null,n.path=null),null===n.pathname&&null===n.search||(n.path=(n.pathname?n.pathname:\"\")+(n.search?n.search:\"\")),n.auth=e.auth||n.auth,n.slashes=n.slashes||e.slashes,n.href=n.format(),n},r.prototype.parseHost=function(){var e=this.host,t=i.exec(e);t&&(\":\"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)},e.parse=g,e.resolve=function(e,t){return g(e,!1,!0).resolve(t)},e.resolveObject=function(e,t){return e?g(e,!1,!0).resolveObject(t):t},e.format=function(e){return\"string\"==typeof e&&(e=g(e)),e instanceof r?e.format():r.prototype.format.call(e)},e.Url=r}}),require_stream_http=__commonJS({\"../../node_modules/.pnpm/stream-http@3.2.0/node_modules/stream-http/index.js\"(e){init_globals();var t=require_request(),r=require_response(),n=require_immutable(),i=require_browser15(),o=require_url(),a=e;a.request=function(e,r){e=\"string\"==typeof e?o.parse(e):n(e);var i=-1===\"globalThis\".location.protocol.search(/^https?:$/)?\"http:\":\"\",a=e.protocol||i,s=e.hostname||e.host,l=e.port,u=e.path||\"/\";s&&-1!==s.indexOf(\":\")&&(s=\"[\"+s+\"]\"),e.url=(s?a+\"//\"+s:\"\")+(l?\":\"+l:\"\")+u,e.method=(e.method||\"GET\").toUpperCase(),e.headers=e.headers||{};var c=new t(e);return r&&c.on(\"response\",r),c},a.get=function(e,t){var r=a.request(e,t);return r.end(),r},a.ClientRequest=t,a.IncomingMessage=r.IncomingMessage,a.Agent=function(){},a.Agent.defaultMaxSockets=4,a.globalAgent=new a.Agent,a.STATUS_CODES=i,a.METHODS=[\"CHECKOUT\",\"CONNECT\",\"COPY\",\"DELETE\",\"GET\",\"HEAD\",\"LOCK\",\"M-SEARCH\",\"MERGE\",\"MKACTIVITY\",\"MKCOL\",\"MOVE\",\"NOTIFY\",\"OPTIONS\",\"PATCH\",\"POST\",\"PROPFIND\",\"PROPPATCH\",\"PURGE\",\"PUT\",\"REPORT\",\"SEARCH\",\"SUBSCRIBE\",\"TRACE\",\"UNLOCK\",\"UNSUBSCRIBE\"]}}),require_https_browserify=__commonJS({\"../../node_modules/.pnpm/https-browserify@1.0.0/node_modules/https-browserify/index.js\"(e,t){init_globals();var r,n=require_stream_http(),i=require_url(),o=t.exports;for(r in n)n.hasOwnProperty(r)&&(o[r]=n[r]);function a(e){if(\"string\"==typeof e&&(e=i.parse(e)),e.protocol||(e.protocol=\"https:\"),\"https:\"!==e.protocol)throw new Error('Protocol \"'+e.protocol+'\" not supported. Expected \"https:\"');return e}o.request=function(e,t){return e=a(e),n.request.call(this,e,t)},o.get=function(e,t){return e=a(e),n.get.call(this,e,t)}}}),require_helpers3=__commonJS({\"../../node_modules/.pnpm/agent-base@7.1.1/node_modules/agent-base/dist/helpers.js\"(e){init_globals();var t=e&&e.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!(\"get\"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=e&&e.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,\"default\",{enumerable:!0,value:t})}:function(e,t){e.default=t}),n=e&&e.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(null!=e)for(var i in e)\"default\"!==i&&Object.prototype.hasOwnProperty.call(e,i)&&t(n,e,i);return r(n,e),n};Object.defineProperty(e,\"__esModule\",{value:!0}),e.req=e.json=e.toBuffer=void 0;var i=n(require_stream_http()),o=n(require_https_browserify());async function a(e){let t=0;const r=[];for await(const n of e)t+=n.length,r.push(n);return Buffer.concat(r,t)}e.toBuffer=a,e.json=async function(e){const t=(await a(e)).toString(\"utf8\");try{return JSON.parse(t)}catch(r){const e=r;throw e.message+=` (input: ${t})`,e}},e.req=function(e,t={}){const r=((\"string\"==typeof e?e:e.href).startsWith(\"https:\")?o:i).request(e,t),n=new Promise(((e,t)=>{r.once(\"response\",e).once(\"error\",t).end()}));return r.then=n.then.bind(n),r}}}),require_dist2=__commonJS({\"../../node_modules/.pnpm/agent-base@7.1.1/node_modules/agent-base/dist/index.js\"(e){init_globals();var t=e&&e.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!(\"get\"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=e&&e.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,\"default\",{enumerable:!0,value:t})}:function(e,t){e.default=t}),n=e&&e.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(null!=e)for(var i in e)\"default\"!==i&&Object.prototype.hasOwnProperty.call(e,i)&&t(n,e,i);return r(n,e),n},i=e&&e.__exportStar||function(e,r){for(var n in e)\"default\"===n||Object.prototype.hasOwnProperty.call(r,n)||t(r,e,n)};Object.defineProperty(e,\"__esModule\",{value:!0}),e.Agent=void 0;var o=n(require_net()),a=n(require_stream_http()),s=require_https_browserify();i(require_helpers3(),e);var l=Symbol(\"AgentBaseInternalState\"),u=class extends a.Agent{isSecureEndpoint(e){if(e){if(\"boolean\"==typeof e.secureEndpoint)return e.secureEndpoint;if(\"string\"==typeof e.protocol)return\"https:\"===e.protocol}const{stack:t}=new Error;return\"string\"==typeof t&&t.split(\"\\n\").some((e=>-1!==e.indexOf(\"(https.js:\")||-1!==e.indexOf(\"node:https:\")))}incrementSockets(e){if(this.maxSockets===1/0&&this.maxTotalSockets===1/0)return null;this.sockets[e]||(this.sockets[e]=[]);const t=new o.Socket({writable:!1});return this.sockets[e].push(t),this.totalSocketCount++,t}decrementSockets(e,t){if(!this.sockets[e]||null===t)return;const r=this.sockets[e],n=r.indexOf(t);-1!==n&&(r.splice(n,1),this.totalSocketCount--,0===r.length&&delete this.sockets[e])}getName(e){return(\"boolean\"==typeof e.secureEndpoint?e.secureEndpoint:this.isSecureEndpoint(e))?s.Agent.prototype.getName.call(this,e):super.getName(e)}createSocket(e,t,r){const n={...t,secureEndpoint:this.isSecureEndpoint(t)},i=this.getName(n),o=this.incrementSockets(i);Promise.resolve().then((()=>this.connect(e,n))).then((s=>{if(this.decrementSockets(i,o),s instanceof a.Agent)return s.addRequest(e,n);this[l].currentSocket=s,super.createSocket(e,t,r)}),(e=>{this.decrementSockets(i,o),r(e)}))}createConnection(){const e=this[l].currentSocket;if(this[l].currentSocket=void 0,!e)throw new Error(\"No socket was returned in the `connect()` function\");return e}get defaultPort(){var e;return null!=(e=this[l].defaultPort)?e:\"https:\"===this.protocol?443:80}set defaultPort(e){this[l]&&(this[l].defaultPort=e)}get protocol(){var e;return null!=(e=this[l].protocol)?e:this.isSecureEndpoint()?\"https:\":\"http:\"}set protocol(e){this[l]&&(this[l].protocol=e)}constructor(e){super(e),this[l]={}}};e.Agent=u}}),require_ms=__commonJS({\"../../node_modules/.pnpm/ms@2.1.3/node_modules/ms/index.js\"(e,t){init_globals();var r=1e3,n=6e4,i=60*n,o=24*i,a=7*o,s=365.25*o;function l(e,t,r,n){var i=t>=1.5*r;return Math.round(e/r)+\" \"+n+(i?\"s\":\"\")}t.exports=function(e,t){t=t||{};var u,c,d=typeof e;if(\"string\"===d&&e.length>0)return function(e){if(!((e=String(e)).length>100)){var t=/^(-?(?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var l=parseFloat(t[1]);switch((t[2]||\"ms\").toLowerCase()){case\"years\":case\"year\":case\"yrs\":case\"yr\":case\"y\":return l*s;case\"weeks\":case\"week\":case\"w\":return l*a;case\"days\":case\"day\":case\"d\":return l*o;case\"hours\":case\"hour\":case\"hrs\":case\"hr\":case\"h\":return l*i;case\"minutes\":case\"minute\":case\"mins\":case\"min\":case\"m\":return l*n;case\"seconds\":case\"second\":case\"secs\":case\"sec\":case\"s\":return l*r;case\"milliseconds\":case\"millisecond\":case\"msecs\":case\"msec\":case\"ms\":return l;default:return}}}}(e);if(\"number\"===d&&isFinite(e))return t.long?(u=e,(c=Math.abs(u))>=o?l(u,c,o,\"day\"):c>=i?l(u,c,i,\"hour\"):c>=n?l(u,c,n,\"minute\"):c>=r?l(u,c,r,\"second\"):u+\" ms\"):function(e){var t=Math.abs(e);return t>=o?Math.round(e/o)+\"d\":t>=i?Math.round(e/i)+\"h\":t>=n?Math.round(e/n)+\"m\":t>=r?Math.round(e/r)+\"s\":e+\"ms\"}(e);throw new Error(\"val is not a non-empty string or a valid number. val=\"+JSON.stringify(e))}}}),require_common4=__commonJS({\"../../node_modules/.pnpm/debug@4.3.7_supports-color@5.5.0/node_modules/debug/src/common.js\"(e,t){init_globals(),t.exports=function(e){function t(e){let n,i,o,a=null;function s(...e){if(!s.enabled)return;const r=s,i=Number(new Date),o=i-(n||i);r.diff=o,r.prev=n,r.curr=i,n=i,e[0]=t.coerce(e[0]),\"string\"!=typeof e[0]&&e.unshift(\"%O\");let a=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((n,i)=>{if(\"%%\"===n)return\"%\";a++;const o=t.formatters[i];if(\"function\"==typeof o){const t=e[a];n=o.call(r,t),e.splice(a,1),a--}return n})),t.formatArgs.call(r,e),(r.log||t.log).apply(r,e)}return s.namespace=e,s.useColors=t.useColors(),s.color=t.selectColor(e),s.extend=r,s.destroy=t.destroy,Object.defineProperty(s,\"enabled\",{enumerable:!0,configurable:!1,get:()=>null!==a?a:(i!==t.namespaces&&(i=t.namespaces,o=t.enabled(e)),o),set:e=>{a=e}}),\"function\"==typeof t.init&&t.init(s),s}function r(e,r){const n=t(this.namespace+(void 0===r?\":\":r)+e);return n.log=this.log,n}function n(e){return e.toString().substring(2,e.toString().length-2).replace(/\\.\\*\\?$/,\"*\")}return t.debug=t,t.default=t,t.coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){const e=[...t.names.map(n),...t.skips.map(n).map((e=>\"-\"+e))].join(\",\");return t.enable(\"\"),e},t.enable=function(e){let r;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const n=(\"string\"==typeof e?e:\"\").split(/[\\s,]+/),i=n.length;for(r=0;r__left_angle_mark_i;r++)n[r]&&(\"-\"===(e=n[r].replace(/\\*/g,\".*?\"))[0]?t.skips.push(new RegExp(\"^\"+e.slice(1)+\"$\")):t.names.push(new RegExp(\"^\"+e+\"$\")))},t.enabled=function(e){if(\"*\"===e[e.length-1])return!0;let r,n;for(r=0,n=t.skips.length;r__left_angle_mark_n;r++)if(t.skips[r].test(e))return!1;for(r=0,n=t.names.length;r__left_angle_mark_n;r++)if(t.names[r].test(e))return!0;return!1},t.humanize=require_ms(),t.destroy=function(){import_console_browserify.default.warn(\"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.\")},Object.keys(e).forEach((r=>{t[r]=e[r]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let r=0;for(let t=0;t__left_angle_mark_e.length;t++)r=(r__left_angle_mark___left_angle_mark_5)-r+e.charCodeAt(t),r|=0;return t.colors[Math.abs(r)%t.colors.length]},t.enable(t.load()),t}}}),require_browser16=__commonJS({\"../../node_modules/.pnpm/debug@4.3.7_supports-color@5.5.0/node_modules/debug/src/browser.js\"(e,t){init_globals(),e.formatArgs=function(e){if(e[0]=(this.useColors?\"%c\":\"\")+this.namespace+(this.useColors?\" %c\":\" \")+e[0]+(this.useColors?\"%c \":\" \")+\"+\"+t.exports.humanize(this.diff),!this.useColors)return;const r=\"color: \"+this.color;e.splice(1,0,r,\"color: inherit\");let n=0,i=0;e[0].replace(/%[a-zA-Z%]/g,(e=>{\"%%\"!==e&&(n++,\"%c\"===e&&(i=n))})),e.splice(i,0,r)},e.save=function(t){try{t?e.storage.setItem(\"debug\",t):e.storage.removeItem(\"debug\")}catch(r){}},e.load=function(){let t;try{t=e.storage.getItem(\"debug\")}catch(r){}return!t&&void 0!==import_browser.default&&\"env\"in import_browser.default&&(t=import_browser.default.env.DEBUG),t},e.useColors=function(){if(\"undefined\"!=typeof window&&window.process&&(\"renderer\"===window.process.type||window.process.__nwjs))return!0;if(\"undefined\"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\\/(\\d+)/))return!1;let e;return\"undefined\"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||\"undefined\"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||\"undefined\"!=typeof navigator&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/))&&parseInt(e[1],10)>=31||\"undefined\"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/)},e.storage=function(){try{return localStorage}catch(e){}}(),e.destroy=(()=>{let e=!1;return()=>{e||(e=!0,import_console_browserify.default.warn(\"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.\"))}})(),e.colors=[\"#0000CC\",\"#0000FF\",\"#0033CC\",\"#0033FF\",\"#0066CC\",\"#0066FF\",\"#0099CC\",\"#0099FF\",\"#00CC00\",\"#00CC33\",\"#00CC66\",\"#00CC99\",\"#00CCCC\",\"#00CCFF\",\"#3300CC\",\"#3300FF\",\"#3333CC\",\"#3333FF\",\"#3366CC\",\"#3366FF\",\"#3399CC\",\"#3399FF\",\"#33CC00\",\"#33CC33\",\"#33CC66\",\"#33CC99\",\"#33CCCC\",\"#33CCFF\",\"#6600CC\",\"#6600FF\",\"#6633CC\",\"#6633FF\",\"#66CC00\",\"#66CC33\",\"#9900CC\",\"#9900FF\",\"#9933CC\",\"#9933FF\",\"#99CC00\",\"#99CC33\",\"#CC0000\",\"#CC0033\",\"#CC0066\",\"#CC0099\",\"#CC00CC\",\"#CC00FF\",\"#CC3300\",\"#CC3333\",\"#CC3366\",\"#CC3399\",\"#CC33CC\",\"#CC33FF\",\"#CC6600\",\"#CC6633\",\"#CC9900\",\"#CC9933\",\"#CCCC00\",\"#CCCC33\",\"#FF0000\",\"#FF0033\",\"#FF0066\",\"#FF0099\",\"#FF00CC\",\"#FF00FF\",\"#FF3300\",\"#FF3333\",\"#FF3366\",\"#FF3399\",\"#FF33CC\",\"#FF33FF\",\"#FF6600\",\"#FF6633\",\"#FF9900\",\"#FF9933\",\"#FFCC00\",\"#FFCC33\"],e.log=import_console_browserify.default.debug||import_console_browserify.default.log||(()=>{}),t.exports=require_common4()(e);var{formatters:r}=t.exports;r.j=function(e){try{return JSON.stringify(e)}catch(t){return\"[UnexpectedJSONParseError]: \"+t.message}}}}),require_dns=__commonJS({\"../../node_modules/.pnpm/@modern-js+plugin-module-node-polyfill@2.60.6_@modern-js+module-tools@2.60.6_typescript@5.0.4_/node_modules/@modern-js/plugin-module-node-polyfill/dist/mock/dns.js\"(e,t){init_globals(),t.exports={}}}),require_tls=__commonJS({\"../../node_modules/.pnpm/@modern-js+plugin-module-node-polyfill@2.60.6_@modern-js+module-tools@2.60.6_typescript@5.0.4_/node_modules/@modern-js/plugin-module-node-polyfill/dist/mock/tls.js\"(e,t){init_globals(),t.exports={}}}),require_dist3=__commonJS({\"../../node_modules/.pnpm/socks-proxy-agent@8.0.4/node_modules/socks-proxy-agent/dist/index.js\"(e){init_globals();var t=e&&e.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!(\"get\"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=e&&e.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,\"default\",{enumerable:!0,value:t})}:function(e,t){e.default=t}),n=e&&e.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(null!=e)for(var i in e)\"default\"!==i&&Object.prototype.hasOwnProperty.call(e,i)&&t(n,e,i);return r(n,e),n},i=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{\"default\":e}};Object.defineProperty(e,\"__esModule\",{value:!0}),e.SocksProxyAgent=void 0;var o=require_build(),a=require_dist2(),s=i(require_browser16()),l=n(require_dns()),u=n(require_tls()),c=require_url(),d=(0,s.default)(\"socks-proxy-agent\"),h=class extends a.Agent{async connect(e,t){var r;const{shouldLookup:n,proxy:i,timeout:a}=this;if(!t.host)throw new Error(\"No `host` defined!\");let{host:s}=t;const{port:c,lookup:h=l.lookup}=t;n&&(s=await new Promise(((e,t)=>{h(s,{},((r,n)=>{r?t(r):e(n)}))})));const p={proxy:i,destination:{host:s,port:\"number\"==typeof c?c:parseInt(c,10)},command:\"connect\",timeout:null!=a?a:void 0,socket_options:null!=(r=this.socketOptions)?r:void 0},m=t=>{e.destroy(),g.destroy(),t&&t.destroy()};d(\"Creating socks proxy connection: %o\",p);const{socket:g}=await o.SocksClient.createConnection(p);if(d(\"Successfully created socks proxy connection\"),null!==a&&(g.setTimeout(a),g.on(\"timeout\",(()=>m()))),t.secureEndpoint){d(\"Upgrading socket connection to TLS\");const e=t.servername||t.host,r=u.connect({...f(t,\"host\",\"path\",\"port\"),socket:g,servername:e});return r.once(\"error\",(e=>{d(\"Socket TLS error\",e.message),m(r)})),r}return g}constructor(e,t){var r,n;super(t);const i=\"string\"==typeof e?new c.URL(e):e,{proxy:o,lookup:a}=function(e){let t=!1,r=5;const n=e.hostname,i=parseInt(e.port,10)||1080;switch(e.protocol.replace(\":\",\"\")){case\"socks4\":t=!0,r=4;break;case\"socks4a\":r=4;break;case\"socks5\":t=!0,r=5;break;case\"socks\":case\"socks5h\":r=5;break;default:throw new TypeError(`A \"socks\" protocol must be specified! Got: ${String(e.protocol)}`)}const o={host:n,port:i,type:r};return e.username&&Object.defineProperty(o,\"userId\",{value:decodeURIComponent(e.username),enumerable:!1}),null!=e.password&&Object.defineProperty(o,\"password\",{value:decodeURIComponent(e.password),enumerable:!1}),{lookup:t,proxy:o}}(i);this.shouldLookup=a,this.proxy=o,this.timeout=null!=(r=null==t?void 0:t.timeout)?r:null,this.socketOptions=null!=(n=null==t?void 0:t.socketOptions)?n:null}};function f(e,...t){const r={};let n;for(n in e)t.includes(n)||(r[n]=e[n]);return r}h.protocols=[\"socks\",\"socks4\",\"socks4a\",\"socks5\",\"socks5h\"],e.SocksProxyAgent=h}}),require_jimp=__commonJS({\"../../node_modules/.pnpm/jimp@0.22.12/node_modules/jimp/browser/lib/jimp.js\"(exports,module){init_globals(),(()=>{var __webpack_modules__={236:(e,t,r)=>{var n=r(4618);function i(e,t){var r=new n(e,t);return function(e){return r.convert(e)}}i.BIN=\"01\",i.OCT=\"01234567\",i.DEC=\"0123456789\",i.HEX=\"0123456789abcdef\",e.exports=i},4618:e=>{function t(e,t){if(!(e&&t&&e.length&&t.length))throw new Error(\"Bad alphabet\");this.srcAlphabet=e,this.dstAlphabet=t}t.prototype.convert=function(e){var t,r,n,i={},o=this.srcAlphabet.length,a=this.dstAlphabet.length,s=e.length,l=\"string\"==typeof e?\"\":[];if(!this.isValid(e))throw new Error('Number \"'+e+'\" contains of non-alphabetic digits ('+this.srcAlphabet+\")\");if(this.srcAlphabet===this.dstAlphabet)return e;for(t=0;t__left_angle_mark_s;t++)i[t]=this.srcAlphabet.indexOf(e[t]);do{for(r=0,n=0,t=0;t__left_angle_mark_s;t++)(r=r*o+i[t])>=a?(i[n++]=parseInt(r/a,10),r%=a):n>0&&(i[n++]=0);s=n,l=this.dstAlphabet.slice(r,r+1).concat(l)}while(0!==n);return l},t.prototype.isValid=function(e){for(var t=0;t__left_angle_mark_e.length;++t)if(-1===this.srcAlphabet.indexOf(e[t]))return!1;return!0},e.exports=t},5766:(e,t)=>{t.byteLength=function(e){var t=s(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,o,a=s(e),l=a[0],u=a[1],c=new i(3*(l+(o=u))/4-o),d=0,h=u>0?l-4:l;for(r=0;r__left_angle_mark_h;r+=4)t=n[e.charCodeAt(r)]__left_angle_mark___left_angle_mark_18|n[e.charCodeAt(r+1)]__left_angle_mark___left_angle_mark_12|n[e.charCodeAt(r+2)]__left_angle_mark___left_angle_mark_6|n[e.charCodeAt(r+3)],c[d++]=t>>16&255,c[d++]=t>>8&255,c[d++]=255&t;return 2===u&&(t=n[e.charCodeAt(r)]__left_angle_mark___left_angle_mark_2|n[e.charCodeAt(r+1)]>>4,c[d++]=255&t),1===u&&(t=n[e.charCodeAt(r)]__left_angle_mark___left_angle_mark_10|n[e.charCodeAt(r+1)]__left_angle_mark___left_angle_mark_4|n[e.charCodeAt(r+2)]>>2,c[d++]=t>>8&255,c[d++]=255&t),c},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],a=16383,s=0,u=n-i;s__left_angle_mark_u;s+=a)o.push(l(e,s,s+a>u?u:s+a));return 1===i?(t=e[n-1],o.push(r[t>>2]+r[t__left_angle_mark___left_angle_mark_4&63]+\"==\")):2===i&&(t=(e[n-2]__left_angle_mark___left_angle_mark_8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t__left_angle_mark___left_angle_mark_2&63]+\"=\")),o.join(\"\")};for(var r=[],n=[],i=\"undefined\"!=typeof Uint8Array?Uint8Array:Array,o=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\",a=0;a__left_angle_mark_64;++a)r[a]=o[a],n[o.charCodeAt(a)]=a;function s(e){var t=e.length;if(t%4>0)throw new Error(\"Invalid string. Length must be a multiple of 4\");var r=e.indexOf(\"=\");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function l(e,t,n){for(var i,o,a=[],s=t;s__left_angle_mark_n;s+=3)i=(e[s]__left_angle_mark___left_angle_mark_16&16711680)+(e[s+1]__left_angle_mark___left_angle_mark_8&65280)+(255&e[s+2]),a.push(r[(o=i)>>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return a.join(\"\")}n[\"-\".charCodeAt(0)]=62,n[\"_\".charCodeAt(0)]=63},486:(e,t,r)=>{var n=r(5433),i=r(1651);e.exports={encode:n,decode:i}},1651:(e,t,r)=>{var n=r(8834).lW;function i(e,t){if(this.pos=0,this.buffer=e,this.is_with_alpha=!!t,this.bottom_up=!0,this.flag=this.buffer.toString(\"utf-8\",0,this.pos+=2),\"BM\"!=this.flag)throw new Error(\"Invalid BMP File\");this.parseHeader(),this.parseRGBA()}i.prototype.parseHeader=function(){if(this.fileSize=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.reserved=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.offset=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.headerSize=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.width=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.height=this.buffer.readInt32LE(this.pos),this.pos+=4,this.planes=this.buffer.readUInt16LE(this.pos),this.pos+=2,this.bitPP=this.buffer.readUInt16LE(this.pos),this.pos+=2,this.compress=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.rawSize=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.hr=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.vr=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.colors=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.importantColors=this.buffer.readUInt32LE(this.pos),this.pos+=4,16===this.bitPP&&this.is_with_alpha&&(this.bitPP=15),this.bitPP__left_angle_mark_15){var e=0===this.colors?1__left_angle_mark___left_angle_mark_this.bitPP:this.colors;this.palette=new Array(e);for(var t=0;t__left_angle_mark_e;t++){var r=this.buffer.readUInt8(this.pos++),n=this.buffer.readUInt8(this.pos++),i=this.buffer.readUInt8(this.pos++),o=this.buffer.readUInt8(this.pos++);this.palette[t]={red:i,green:n,blue:r,quad:o}}}this.height__left_angle_mark_0&&(this.height*=-1,this.bottom_up=!1)},i.prototype.parseRGBA=function(){var e=\"bit\"+this.bitPP,t=this.width*this.height*4;this.data=new n(t),this[e]()},i.prototype.bit1=function(){var e=Math.ceil(this.width/8),t=e%4,r=this.height>=0?this.height-1:-this.height;for(r=this.height-1;r>=0;r--){for(var n=this.bottom_up?r:this.height-1-r,i=0;i__left_angle_mark_e;i++)for(var o=this.buffer.readUInt8(this.pos++),a=n*this.width*4+8*i*4,s=0;s__left_angle_mark_8&&8*i+s__left_angle_mark_this.width;s++){var l=this.palette[o>>7-s&1];this.data[a+4*s]=0,this.data[a+4*s+1]=l.blue,this.data[a+4*s+2]=l.green,this.data[a+4*s+3]=l.red}0!=t&&(this.pos+=4-t)}},i.prototype.bit4=function(){if(2==this.compress){let u=function(t){var r=this.palette[t];this.data[e]=0,this.data[e+1]=r.blue,this.data[e+2]=r.green,this.data[e+3]=r.red,e+=4};this.data.fill(255);for(var e=0,t=this.bottom_up?this.height-1:0,r=!1;e__left_angle_mark_this.data.length;){var n=this.buffer.readUInt8(this.pos++),i=this.buffer.readUInt8(this.pos++);if(0==n){if(0==i){this.bottom_up?t--:t++,e=t*this.width*4,r=!1;continue}if(1==i)break;if(2==i){var o=this.buffer.readUInt8(this.pos++),a=this.buffer.readUInt8(this.pos++);this.bottom_up?t-=a:t+=a,e+=a*this.width*4+4*o}else{for(var s=this.buffer.readUInt8(this.pos++),l=0;l__left_angle_mark_i;l++)r?u.call(this,15&s):u.call(this,(240&s)>>4),1&l&&l+1__left_angle_mark_i&&(s=this.buffer.readUInt8(this.pos++)),r=!r;1==(i+1>>1&1)&&this.pos++}}else for(l=0;l__left_angle_mark_n;l++)r?u.call(this,15&i):u.call(this,(240&i)>>4),r=!r}}else{var u=Math.ceil(this.width/2),c=u%4;for(a=this.height-1;a>=0;a--){var d=this.bottom_up?a:this.height-1-a;for(o=0;o__left_angle_mark_u;o++){i=this.buffer.readUInt8(this.pos++),e=d*this.width*4+2*o*4;var h=i>>4,f=15&i,p=this.palette[h];if(this.data[e]=0,this.data[e+1]=p.blue,this.data[e+2]=p.green,this.data[e+3]=p.red,2*o+1>=this.width)break;p=this.palette[f],this.data[e+4]=0,this.data[e+4+1]=p.blue,this.data[e+4+2]=p.green,this.data[e+4+3]=p.red}0!=c&&(this.pos+=4-c)}}},i.prototype.bit8=function(){if(1==this.compress){let l=function(t){var r=this.palette[t];this.data[e]=0,this.data[e+1]=r.blue,this.data[e+2]=r.green,this.data[e+3]=r.red,e+=4};this.data.fill(255);for(var e=0,t=this.bottom_up?this.height-1:0;e__left_angle_mark_this.data.length;){var r=this.buffer.readUInt8(this.pos++),n=this.buffer.readUInt8(this.pos++);if(0==r){if(0==n){this.bottom_up?t--:t++,e=t*this.width*4;continue}if(1==n)break;if(2==n){var i=this.buffer.readUInt8(this.pos++),o=this.buffer.readUInt8(this.pos++);this.bottom_up?t-=o:t+=o,e+=o*this.width*4+4*i}else{for(var a=0;a__left_angle_mark_n;a++){var s=this.buffer.readUInt8(this.pos++);l.call(this,s)}!0&n&&this.pos++}}else for(a=0;a__left_angle_mark_r;a++)l.call(this,n)}}else{var l=this.width%4;for(o=this.height-1;o>=0;o--){var u=this.bottom_up?o:this.height-1-o;for(i=0;i__left_angle_mark_this.width;i++)if(n=this.buffer.readUInt8(this.pos++),e=u*this.width*4+4*i,n__left_angle_mark_this.palette.length){var c=this.palette[n];this.data[e]=0,this.data[e+1]=c.blue,this.data[e+2]=c.green,this.data[e+3]=c.red}else this.data[e]=0,this.data[e+1]=255,this.data[e+2]=255,this.data[e+3]=255;0!=l&&(this.pos+=4-l)}}},i.prototype.bit15=function(){for(var e=this.width%3,t=parseInt(\"11111\",2),r=this.height-1;r>=0;r--){for(var n=this.bottom_up?r:this.height-1-r,i=0;i__left_angle_mark_this.width;i++){var o=this.buffer.readUInt16LE(this.pos);this.pos+=2;var a=(o&t)/t*255|0,s=(o>>5&t)/t*255|0,l=(o>>10&t)/t*255|0,u=o>>15?255:0,c=n*this.width*4+4*i;this.data[c]=u,this.data[c+1]=a,this.data[c+2]=s,this.data[c+3]=l}this.pos+=e}},i.prototype.bit16=function(){var e=this.width%2*2;this.maskRed=31744,this.maskGreen=992,this.maskBlue=31,this.mask0=0,3==this.compress&&(this.maskRed=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.maskGreen=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.maskBlue=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.mask0=this.buffer.readUInt32LE(this.pos),this.pos+=4);for(var t=[0,0,0],r=0;r__left_angle_mark_16;r++)this.maskRed>>r&1&&t[0]++,this.maskGreen>>r&1&&t[1]++,this.maskBlue>>r&1&&t[2]++;t[1]+=t[0],t[2]+=t[1],t[0]=8-t[0],t[1]-=8,t[2]-=8;for(var n=this.height-1;n>=0;n--){for(var i=this.bottom_up?n:this.height-1-n,o=0;o__left_angle_mark_this.width;o++){var a=this.buffer.readUInt16LE(this.pos);this.pos+=2;var s=(a&this.maskBlue)__left_angle_mark___left_angle_mark_t[0],l=(a&this.maskGreen)>>t[1],u=(a&this.maskRed)>>t[2],c=i*this.width*4+4*o;this.data[c]=0,this.data[c+1]=s,this.data[c+2]=l,this.data[c+3]=u}this.pos+=e}},i.prototype.bit24=function(){for(var e=this.height-1;e>=0;e--){for(var t=this.bottom_up?e:this.height-1-e,r=0;r__left_angle_mark_this.width;r++){var n=this.buffer.readUInt8(this.pos++),i=this.buffer.readUInt8(this.pos++),o=this.buffer.readUInt8(this.pos++),a=t*this.width*4+4*r;this.data[a]=0,this.data[a+1]=n,this.data[a+2]=i,this.data[a+3]=o}this.pos+=this.width%4}},i.prototype.bit32=function(){if(3==this.compress){this.maskRed=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.maskGreen=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.maskBlue=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.mask0=this.buffer.readUInt32LE(this.pos),this.pos+=4;for(var e=this.height-1;e>=0;e--)for(var t=this.bottom_up?e:this.height-1-e,r=0;r__left_angle_mark_this.width;r++){var n=this.buffer.readUInt8(this.pos++),i=this.buffer.readUInt8(this.pos++),o=this.buffer.readUInt8(this.pos++),a=this.buffer.readUInt8(this.pos++),s=t*this.width*4+4*r;this.data[s]=n,this.data[s+1]=i,this.data[s+2]=o,this.data[s+3]=a}}else for(e=this.height-1;e>=0;e--)for(t=this.bottom_up?e:this.height-1-e,r=0;r__left_angle_mark_this.width;r++)i=this.buffer.readUInt8(this.pos++),o=this.buffer.readUInt8(this.pos++),a=this.buffer.readUInt8(this.pos++),n=this.buffer.readUInt8(this.pos++),s=t*this.width*4+4*r,this.data[s]=n,this.data[s+1]=i,this.data[s+2]=o,this.data[s+3]=a},i.prototype.getData=function(){return this.data},e.exports=function(e){return new i(e)}},5433:(e,t,r)=>{var n=r(8834).lW;function i(e){this.buffer=e.data,this.width=e.width,this.height=e.height,this.extraBytes=this.width%4,this.rgbSize=this.height*(3*this.width+this.extraBytes),this.headerInfoSize=40,this.data=[],this.flag=\"BM\",this.reserved=0,this.offset=54,this.fileSize=this.rgbSize+this.offset,this.planes=1,this.bitPP=24,this.compress=0,this.hr=0,this.vr=0,this.colors=0,this.importantColors=0}i.prototype.encode=function(){var e=new n(this.offset+this.rgbSize);this.pos=0,e.write(this.flag,this.pos,2),this.pos+=2,e.writeUInt32LE(this.fileSize,this.pos),this.pos+=4,e.writeUInt32LE(this.reserved,this.pos),this.pos+=4,e.writeUInt32LE(this.offset,this.pos),this.pos+=4,e.writeUInt32LE(this.headerInfoSize,this.pos),this.pos+=4,e.writeUInt32LE(this.width,this.pos),this.pos+=4,e.writeInt32LE(-this.height,this.pos),this.pos+=4,e.writeUInt16LE(this.planes,this.pos),this.pos+=2,e.writeUInt16LE(this.bitPP,this.pos),this.pos+=2,e.writeUInt32LE(this.compress,this.pos),this.pos+=4,e.writeUInt32LE(this.rgbSize,this.pos),this.pos+=4,e.writeUInt32LE(this.hr,this.pos),this.pos+=4,e.writeUInt32LE(this.vr,this.pos),this.pos+=4,e.writeUInt32LE(this.colors,this.pos),this.pos+=4,e.writeUInt32LE(this.importantColors,this.pos),this.pos+=4;for(var t=0,r=3*this.width+this.extraBytes,i=0;i__left_angle_mark_this.height;i++){for(var o=0;o__left_angle_mark_this.width;o++){var a=this.pos+i*r+3*o;t++,e[a]=this.buffer[t++],e[a+1]=this.buffer[t++],e[a+2]=this.buffer[t++]}if(this.extraBytes>0){var s=this.pos+i*r+3*this.width;e.fill(0,s,s+this.extraBytes)}}return e},e.exports=function(e,t){return void 0===t&&(t=100),{data:new i(e).encode(),width:e.width,height:e.height}}},5137:(e,t,r)=>{var n=r(8834).lW;e.exports=function(e,t){if(n.isBuffer(e)&&n.isBuffer(t)){if(\"function\"==typeof e.equals)return e.equals(t);if(e.length!==t.length)return!1;for(var r=0;r__left_angle_mark_e.length;r++)if(e[r]!==t[r])return!1;return!0}}},8834:(e,t,r)=>{var n=r(5766),i=r(4181);t.lW=s,t.h2=50;var o=2147483647;function a(e){if(e>o)throw new RangeError('The value \"'+e+'\" is invalid for option \"size\"');var t=new Uint8Array(e);return t.__proto__=s.prototype,t}function s(e,t,r){if(\"number\"==typeof e){if(\"string\"==typeof t)throw new TypeError('The \"string\" argument must be of type string. Received type number');return c(e)}return l(e,t,r)}function l(e,t,r){if(\"string\"==typeof e)return function(e,t){if(\"string\"==typeof t&&\"\"!==t||(t=\"utf8\"),!s.isEncoding(t))throw new TypeError(\"Unknown encoding: \"+t);var r=0|f(e,t),n=a(r),i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}(e,t);if(ArrayBuffer.isView(e))return d(e);if(null==e)throw TypeError(\"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type \"+typeof e);if(U(e,ArrayBuffer)||e&&U(e.buffer,ArrayBuffer))return function(e,t,r){if(t__left_angle_mark_0||e.byteLength__left_angle_mark_t)throw new RangeError('\"offset\" is outside of buffer bounds');if(e.byteLength__left_angle_mark_t+(r||0))throw new RangeError('\"length\" is outside of buffer bounds');var n;return(n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r)).__proto__=s.prototype,n}(e,t,r);if(\"number\"==typeof e)throw new TypeError('The \"value\" argument must not be of type number. Received type number');var n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return s.from(n,t,r);var i=function(e){if(s.isBuffer(e)){var t=0|h(e.length),r=a(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?\"number\"!=typeof e.length||z(e.length)?a(0):d(e):\"Buffer\"===e.type&&Array.isArray(e.data)?d(e.data):void 0}(e);if(i)return i;if(\"undefined\"!=typeof Symbol&&null!=Symbol.toPrimitive&&\"function\"==typeof e[Symbol.toPrimitive])return s.from(e[Symbol.toPrimitive](\"string\"),t,r);throw new TypeError(\"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type \"+typeof e)}function u(e){if(\"number\"!=typeof e)throw new TypeError('\"size\" argument must be of type number');if(e__left_angle_mark_0)throw new RangeError('The value \"'+e+'\" is invalid for option \"size\"')}function c(e){return u(e),a(e__left_angle_mark_0?0:0|h(e))}function d(e){for(var t=e.length__left_angle_mark_0?0:0|h(e.length),r=a(t),n=0;n__left_angle_mark_t;n+=1)r[n]=255&e[n];return r}function h(e){if(e>=o)throw new RangeError(\"Attempt to allocate Buffer larger than maximum size: 0x\"+o.toString(16)+\" bytes\");return 0|e}function f(e,t){if(s.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||U(e,ArrayBuffer))return e.byteLength;if(\"string\"!=typeof e)throw new TypeError('The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var i=!1;;)switch(t){case\"ascii\":case\"latin1\":case\"binary\":return r;case\"utf8\":case\"utf-8\":return L(e).length;case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return 2*r;case\"hex\":return r>>>1;case\"base64\":return D(e).length;default:if(i)return n?-1:L(e).length;t=(\"\"+t).toLowerCase(),i=!0}}function p(e,t,r){var n=!1;if((void 0===t||t__left_angle_mark_0)&&(t=0),t>this.length)return\"\";if((void 0===r||r>this.length)&&(r=this.length),r__left_angle_mark_=0)return\"\";if((r>>>=0)__left_angle_mark_=(t>>>=0))return\"\";for(e||(e=\"utf8\");;)switch(e){case\"hex\":return I(this,t,r);case\"utf8\":case\"utf-8\":return x(this,t,r);case\"ascii\":return T(this,t,r);case\"latin1\":case\"binary\":return R(this,t,r);case\"base64\":return E(this,t,r);case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return k(this,t,r);default:if(n)throw new TypeError(\"Unknown encoding: \"+e);e=(e+\"\").toLowerCase(),n=!0}}function m(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function g(e,t,r,n,i){if(0===e.length)return-1;if(\"string\"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r__left_angle_mark_-2147483648&&(r=-2147483648),z(r=+r)&&(r=i?0:e.length-1),r__left_angle_mark_0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r__left_angle_mark_0){if(!i)return-1;r=0}if(\"string\"==typeof t&&(t=s.from(t,n)),s.isBuffer(t))return 0===t.length?-1:_(e,t,r,n,i);if(\"number\"==typeof t)return t&=255,\"function\"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):_(e,[t],r,n,i);throw new TypeError(\"val must be string, number or Buffer\")}function _(e,t,r,n,i){var o,a=1,s=e.length,l=t.length;if(void 0!==n&&(\"ucs2\"===(n=String(n).toLowerCase())||\"ucs-2\"===n||\"utf16le\"===n||\"utf-16le\"===n)){if(e.length__left_angle_mark_2||t.length__left_angle_mark_2)return-1;a=2,s/=2,l/=2,r/=2}function u(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){var c=-1;for(o=r;o__left_angle_mark_s;o++)if(u(e,o)===u(t,-1===c?0:o-c)){if(-1===c&&(c=o),o-c+1===l)return c*a}else-1!==c&&(o-=o-c),c=-1}else for(r+l>s&&(r=s-l),o=r;o>=0;o--){for(var d=!0,h=0;h__left_angle_mark_l;h++)if(u(e,o+h)!==u(t,h)){d=!1;break}if(d)return o}return-1}function b(e,t,r,n){r=Number(r)||0;var i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;var o=t.length;n>o/2&&(n=o/2);for(var a=0;a__left_angle_mark_n;++a){var s=parseInt(t.substr(2*a,2),16);if(z(s))return a;e[r+a]=s}return a}function y(e,t,r,n){return F(L(t,e.length-r),e,r,n)}function v(e,t,r,n){return F(function(e){for(var t=[],r=0;r__left_angle_mark_e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function A(e,t,r,n){return v(e,t,r,n)}function w(e,t,r,n){return F(D(t),e,r,n)}function S(e,t,r,n){return F(function(e,t){for(var r,n,i,o=[],a=0;a__left_angle_mark_e.length&&!((t-=2)__left_angle_mark_0);++a)n=(r=e.charCodeAt(a))>>8,i=r%256,o.push(i),o.push(n);return o}(t,e.length-r),e,r,n)}function E(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function x(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i__left_angle_mark_r;){var o,a,s,l,u=e[i],c=null,d=u>239?4:u>223?3:u>191?2:1;if(i+d__left_angle_mark_=r)switch(d){case 1:u__left_angle_mark_128&&(c=u);break;case 2:128==(192&(o=e[i+1]))&&(l=(31&u)__left_angle_mark___left_angle_mark_6|63&o)>127&&(c=l);break;case 3:o=e[i+1],a=e[i+2],128==(192&o)&&128==(192&a)&&(l=(15&u)__left_angle_mark___left_angle_mark_12|(63&o)__left_angle_mark___left_angle_mark_6|63&a)>2047&&(l__left_angle_mark_55296||l>57343)&&(c=l);break;case 4:o=e[i+1],a=e[i+2],s=e[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&(l=(15&u)__left_angle_mark___left_angle_mark_18|(63&o)__left_angle_mark___left_angle_mark_12|(63&a)__left_angle_mark___left_angle_mark_6|63&s)>65535&&l__left_angle_mark_1114112&&(c=l)}null===c?(c=65533,d=1):c>65535&&(c-=65536,n.push(c>>>10&1023|55296),c=56320|1023&c),n.push(c),i+=d}return function(e){var t=e.length;if(t__left_angle_mark_=C)return String.fromCharCode.apply(String,e);for(var r=\"\",n=0;n__left_angle_mark_t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=C));return r}(n)}s.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()}catch(t){return!1}}(),s.TYPED_ARRAY_SUPPORT||void 0===import_console_browserify.default||\"function\"!=typeof import_console_browserify.default.error||import_console_browserify.default.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.\"),Object.defineProperty(s.prototype,\"parent\",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,\"offset\",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}}),\"undefined\"!=typeof Symbol&&null!=Symbol.species&&s[Symbol.species]===s&&Object.defineProperty(s,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),s.poolSize=8192,s.from=function(e,t,r){return l(e,t,r)},s.prototype.__proto__=Uint8Array.prototype,s.__proto__=Uint8Array,s.alloc=function(e,t,r){return i=t,o=r,u(n=e),n__left_angle_mark_=0?a(n):void 0!==i?\"string\"==typeof o?a(n).fill(i,o):a(n).fill(i):a(n);var n,i,o},s.allocUnsafe=function(e){return c(e)},s.allocUnsafeSlow=function(e){return c(e)},s.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==s.prototype},s.compare=function(e,t){if(U(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),U(t,Uint8Array)&&(t=s.from(t,t.offset,t.byteLength)),!s.isBuffer(e)||!s.isBuffer(t))throw new TypeError('The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var r=e.length,n=t.length,i=0,o=Math.min(r,n);i__left_angle_mark_o;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r__left_angle_mark_n?-1:n__left_angle_mark_r?1:0},s.isEncoding=function(e){switch(String(e).toLowerCase()){case\"hex\":case\"utf8\":case\"utf-8\":case\"ascii\":case\"latin1\":case\"binary\":case\"base64\":case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return!0;default:return!1}},s.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('\"list\" argument must be an Array of Buffers');if(0===e.length)return s.alloc(0);var r;if(void 0===t)for(t=0,r=0;r__left_angle_mark_e.length;++r)t+=e[r].length;var n=s.allocUnsafe(t),i=0;for(r=0;r__left_angle_mark_e.length;++r){var o=e[r];if(U(o,Uint8Array)&&(o=s.from(o)),!s.isBuffer(o))throw new TypeError('\"list\" argument must be an Array of Buffers');o.copy(n,i),i+=o.length}return n},s.byteLength=f,s.prototype._isBuffer=!0,s.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError(\"Buffer size must be a multiple of 16-bits\");for(var t=0;t__left_angle_mark_e;t+=2)m(this,t,t+1);return this},s.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError(\"Buffer size must be a multiple of 32-bits\");for(var t=0;t__left_angle_mark_e;t+=4)m(this,t,t+3),m(this,t+1,t+2);return this},s.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError(\"Buffer size must be a multiple of 64-bits\");for(var t=0;t__left_angle_mark_e;t+=8)m(this,t,t+7),m(this,t+1,t+6),m(this,t+2,t+5),m(this,t+3,t+4);return this},s.prototype.toString=function(){var e=this.length;return 0===e?\"\":0===arguments.length?x(this,0,e):p.apply(this,arguments)},s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(e){if(!s.isBuffer(e))throw new TypeError(\"Argument must be a Buffer\");return this===e||0===s.compare(this,e)},s.prototype.inspect=function(){var e=\"\",r=t.h2;return e=this.toString(\"hex\",0,r).replace(/(.{2})/g,\"$1 \").trim(),this.length>r&&(e+=\" ... \"),\"__left_angle_mark_Buffer \"+e+\">\"},s.prototype.compare=function(e,t,r,n,i){if(U(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),!s.isBuffer(e))throw new TypeError('The \"target\" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t__left_angle_mark_0||r>e.length||n__left_angle_mark_0||i>this.length)throw new RangeError(\"out of range index\");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(n>>>=0),a=(r>>>=0)-(t>>>=0),l=Math.min(o,a),u=this.slice(n,i),c=e.slice(t,r),d=0;d__left_angle_mark_l;++d)if(u[d]!==c[d]){o=u[d],a=c[d];break}return o__left_angle_mark_a?-1:a__left_angle_mark_o?1:0},s.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},s.prototype.indexOf=function(e,t,r){return g(this,e,t,r,!0)},s.prototype.lastIndexOf=function(e,t,r){return g(this,e,t,r,!1)},s.prototype.write=function(e,t,r,n){if(void 0===t)n=\"utf8\",r=this.length,t=0;else if(void 0===r&&\"string\"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error(\"Buffer.write(string, encoding, offset[, length]) is no longer supported\");t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n=\"utf8\")):(n=r,r=void 0)}var i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r__left_angle_mark_0||t__left_angle_mark_0)||t>this.length)throw new RangeError(\"Attempt to write outside buffer bounds\");n||(n=\"utf8\");for(var o=!1;;)switch(n){case\"hex\":return b(this,e,t,r);case\"utf8\":case\"utf-8\":return y(this,e,t,r);case\"ascii\":return v(this,e,t,r);case\"latin1\":case\"binary\":return A(this,e,t,r);case\"base64\":return w(this,e,t,r);case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return S(this,e,t,r);default:if(o)throw new TypeError(\"Unknown encoding: \"+n);n=(\"\"+n).toLowerCase(),o=!0}},s.prototype.toJSON=function(){return{type:\"Buffer\",data:Array.prototype.slice.call(this._arr||this,0)}};var C=4096;function T(e,t,r){var n=\"\";r=Math.min(e.length,r);for(var i=t;i__left_angle_mark_r;++i)n+=String.fromCharCode(127&e[i]);return n}function R(e,t,r){var n=\"\";r=Math.min(e.length,r);for(var i=t;i__left_angle_mark_r;++i)n+=String.fromCharCode(e[i]);return n}function I(e,t,r){var n,i=e.length;(!t||t__left_angle_mark_0)&&(t=0),(!r||r__left_angle_mark_0||r>i)&&(r=i);for(var o=\"\",a=t;a__left_angle_mark_r;++a)o+=(n=e[a])__left_angle_mark_16?\"0\"+n.toString(16):n.toString(16);return o}function k(e,t,r){for(var n=e.slice(t,r),i=\"\",o=0;o__left_angle_mark_n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function P(e,t,r){if(e%1!=0||e__left_angle_mark_0)throw new RangeError(\"offset is not uint\");if(e+t>r)throw new RangeError(\"Trying to access beyond buffer length\")}function M(e,t,r,n,i,o){if(!s.isBuffer(e))throw new TypeError('\"buffer\" argument must be a Buffer instance');if(t>i||t__left_angle_mark_o)throw new RangeError('\"value\" argument is out of bounds');if(r+n>e.length)throw new RangeError(\"Index out of range\")}function O(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError(\"Index out of range\");if(r__left_angle_mark_0)throw new RangeError(\"Index out of range\")}function B(e,t,r,n,o){return t=+t,r>>>=0,o||O(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function N(e,t,r,n,o){return t=+t,r>>>=0,o||O(e,0,r,8),i.write(e,t,r,n,52,8),r+8}s.prototype.slice=function(e,t){var r=this.length;(e=~~e)__left_angle_mark_0?(e+=r)__left_angle_mark_0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)__left_angle_mark_0?(t+=r)__left_angle_mark_0&&(t=0):t>r&&(t=r),t__left_angle_mark_e&&(t=e);var n=this.subarray(e,t);return n.__proto__=s.prototype,n},s.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||P(e,t,this.length);for(var n=this[e],i=1,o=0;++o__left_angle_mark_t&&(i*=256);)n+=this[e+o]*i;return n},s.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||P(e,t,this.length);for(var n=this[e+--t],i=1;t>0&&(i*=256);)n+=this[e+--t]*i;return n},s.prototype.readUInt8=function(e,t){return e>>>=0,t||P(e,1,this.length),this[e]},s.prototype.readUInt16LE=function(e,t){return e>>>=0,t||P(e,2,this.length),this[e]|this[e+1]__left_angle_mark___left_angle_mark_8},s.prototype.readUInt16BE=function(e,t){return e>>>=0,t||P(e,2,this.length),this[e]__left_angle_mark___left_angle_mark_8|this[e+1]},s.prototype.readUInt32LE=function(e,t){return e>>>=0,t||P(e,4,this.length),(this[e]|this[e+1]__left_angle_mark___left_angle_mark_8|this[e+2]__left_angle_mark___left_angle_mark_16)+16777216*this[e+3]},s.prototype.readUInt32BE=function(e,t){return e>>>=0,t||P(e,4,this.length),16777216*this[e]+(this[e+1]__left_angle_mark___left_angle_mark_16|this[e+2]__left_angle_mark___left_angle_mark_8|this[e+3])},s.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||P(e,t,this.length);for(var n=this[e],i=1,o=0;++o__left_angle_mark_t&&(i*=256);)n+=this[e+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*t)),n},s.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||P(e,t,this.length);for(var n=t,i=1,o=this[e+--n];n>0&&(i*=256);)o+=this[e+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},s.prototype.readInt8=function(e,t){return e>>>=0,t||P(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},s.prototype.readInt16LE=function(e,t){e>>>=0,t||P(e,2,this.length);var r=this[e]|this[e+1]__left_angle_mark___left_angle_mark_8;return 32768&r?4294901760|r:r},s.prototype.readInt16BE=function(e,t){e>>>=0,t||P(e,2,this.length);var r=this[e+1]|this[e]__left_angle_mark___left_angle_mark_8;return 32768&r?4294901760|r:r},s.prototype.readInt32LE=function(e,t){return e>>>=0,t||P(e,4,this.length),this[e]|this[e+1]__left_angle_mark___left_angle_mark_8|this[e+2]__left_angle_mark___left_angle_mark_16|this[e+3]__left_angle_mark___left_angle_mark_24},s.prototype.readInt32BE=function(e,t){return e>>>=0,t||P(e,4,this.length),this[e]__left_angle_mark___left_angle_mark_24|this[e+1]__left_angle_mark___left_angle_mark_16|this[e+2]__left_angle_mark___left_angle_mark_8|this[e+3]},s.prototype.readFloatLE=function(e,t){return e>>>=0,t||P(e,4,this.length),i.read(this,e,!0,23,4)},s.prototype.readFloatBE=function(e,t){return e>>>=0,t||P(e,4,this.length),i.read(this,e,!1,23,4)},s.prototype.readDoubleLE=function(e,t){return e>>>=0,t||P(e,8,this.length),i.read(this,e,!0,52,8)},s.prototype.readDoubleBE=function(e,t){return e>>>=0,t||P(e,8,this.length),i.read(this,e,!1,52,8)},s.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||M(this,e,t,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[t]=255&e;++o__left_angle_mark_r&&(i*=256);)this[t+o]=e/i&255;return t+r},s.prototype.writeUIntBE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||M(this,e,t,r,Math.pow(2,8*r)-1,0);var i=r-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r},s.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,1,255,0),this[t]=255&e,t+1},s.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},s.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},s.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},s.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},s.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);M(this,e,t,r,i-1,-i)}var o=0,a=1,s=0;for(this[t]=255&e;++o__left_angle_mark_r&&(a*=256);)e__left_angle_mark_0&&0===s&&0!==this[t+o-1]&&(s=1),this[t+o]=(e/a|0)-s&255;return t+r},s.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);M(this,e,t,r,i-1,-i)}var o=r-1,a=1,s=0;for(this[t+o]=255&e;--o>=0&&(a*=256);)e__left_angle_mark_0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a|0)-s&255;return t+r},s.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,1,127,-128),e__left_angle_mark_0&&(e=255+e+1),this[t]=255&e,t+1},s.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},s.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},s.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},s.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,4,2147483647,-2147483648),e__left_angle_mark_0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},s.prototype.writeFloatLE=function(e,t,r){return B(this,e,t,!0,r)},s.prototype.writeFloatBE=function(e,t,r){return B(this,e,t,!1,r)},s.prototype.writeDoubleLE=function(e,t,r){return N(this,e,t,!0,r)},s.prototype.writeDoubleBE=function(e,t,r){return N(this,e,t,!1,r)},s.prototype.copy=function(e,t,r,n){if(!s.isBuffer(e))throw new TypeError(\"argument should be a Buffer\");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n__left_angle_mark_r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t__left_angle_mark_0)throw new RangeError(\"targetStart out of bounds\");if(r__left_angle_mark_0||r>=this.length)throw new RangeError(\"Index out of range\");if(n__left_angle_mark_0)throw new RangeError(\"sourceEnd out of bounds\");n>this.length&&(n=this.length),e.length-t__left_angle_mark_n-r&&(n=e.length-t+r);var i=n-r;if(this===e&&\"function\"==typeof Uint8Array.prototype.copyWithin)this.copyWithin(t,r,n);else if(this===e&&r__left_angle_mark_t&&t__left_angle_mark_n)for(var o=i-1;o>=0;--o)e[o+t]=this[o+r];else Uint8Array.prototype.set.call(e,this.subarray(r,n),t);return i},s.prototype.fill=function(e,t,r,n){if(\"string\"==typeof e){if(\"string\"==typeof t?(n=t,t=0,r=this.length):\"string\"==typeof r&&(n=r,r=this.length),void 0!==n&&\"string\"!=typeof n)throw new TypeError(\"encoding must be a string\");if(\"string\"==typeof n&&!s.isEncoding(n))throw new TypeError(\"Unknown encoding: \"+n);if(1===e.length){var i=e.charCodeAt(0);(\"utf8\"===n&&i__left_angle_mark_128||\"latin1\"===n)&&(e=i)}}else\"number\"==typeof e&&(e&=255);if(t__left_angle_mark_0||this.length__left_angle_mark_t||this.length__left_angle_mark_r)throw new RangeError(\"Out of range index\");if(r__left_angle_mark_=t)return this;var o;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),\"number\"==typeof e)for(o=t;o__left_angle_mark_r;++o)this[o]=e;else{var a=s.isBuffer(e)?e:s.from(e,n),l=a.length;if(0===l)throw new TypeError('The value \"'+e+'\" is invalid for argument \"value\"');for(o=0;o__left_angle_mark_r-t;++o)this[o+t]=a[o%l]}return this};var j=/[^+/0-9A-Za-z-_]/g;function L(e,t){var r;t=t||1/0;for(var n=e.length,i=null,o=[],a=0;a__left_angle_mark_n;++a){if((r=e.charCodeAt(a))>55295&&r__left_angle_mark_57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r__left_angle_mark_56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296__left_angle_mark___left_angle_mark_10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r__left_angle_mark_128){if((t-=1)__left_angle_mark_0)break;o.push(r)}else if(r__left_angle_mark_2048){if((t-=2)__left_angle_mark_0)break;o.push(r>>6|192,63&r|128)}else if(r__left_angle_mark_65536){if((t-=3)__left_angle_mark_0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r__left_angle_mark_1114112))throw new Error(\"Invalid code point\");if((t-=4)__left_angle_mark_0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function D(e){return n.toByteArray(function(e){if((e=(e=e.split(\"=\")[0]).trim().replace(j,\"\")).length__left_angle_mark_2)return\"\";for(;e.length%4!=0;)e+=\"=\";return e}(e))}function F(e,t,r,n){for(var i=0;i__left_angle_mark_n&&!(i+r>=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function U(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function z(e){return e!=e}},4181:(e,t)=>{t.read=function(e,t,r,n,i){var o,a,s=8*i-n-1,l=(1__left_angle_mark___left_angle_mark_s)-1,u=l>>1,c=-7,d=r?i-1:0,h=r?-1:1,f=e[t+d];for(d+=h,o=f&(1__left_angle_mark___left_angle_mark_-c)-1,f>>=-c,c+=s;c>0;o=256*o+e[t+d],d+=h,c-=8);for(a=o&(1__left_angle_mark___left_angle_mark_-c)-1,o>>=-c,c+=n;c>0;a=256*a+e[t+d],d+=h,c-=8);if(0===o)o=1-u;else{if(o===l)return a?NaN:1/0*(f?-1:1);a+=Math.pow(2,n),o-=u}return(f?-1:1)*a*Math.pow(2,o-n)},t.write=function(e,t,r,n,i,o){var a,s,l,u=8*o-i-1,c=(1__left_angle_mark___left_angle_mark_u)-1,d=c>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=n?0:o-1,p=n?1:-1,m=t__left_angle_mark_0||0===t&&1/t__left_angle_mark_0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=c):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))__left_angle_mark_1&&(a--,l*=2),(t+=a+d>=1?h/l:h*Math.pow(2,1-d))*l>=2&&(a++,l/=2),a+d>=c?(s=0,a=c):a+d>=1?(s=(t*l-1)*Math.pow(2,i),a+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,i),a=0));i>=8;e[r+f]=255&s,f+=p,s/=256,i-=8);for(a=a__left_angle_mark___left_angle_mark_i|s,u+=i;u>0;e[r+f]=255&a,f+=p,a/=256,u-=8);e[r+f-p]|=128*m}},2699:e=>{var t,r=\"object\"==typeof Reflect?Reflect:null,n=r&&\"function\"==typeof r.apply?r.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};t=r&&\"function\"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var i=Number.isNaN||function(e){return e!=e};function o(){o.init.call(this)}e.exports=o,e.exports.once=function(e,t){return new Promise((function(r,n){function i(r){e.removeListener(t,o),n(r)}function o(){\"function\"==typeof e.removeListener&&e.removeListener(\"error\",i),r([].slice.call(arguments))}var a,s;m(e,t,o,{once:!0}),\"error\"!==t&&(s=i,\"function\"==typeof(a=e).on&&m(a,\"error\",s,{once:!0}))}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var a=10;function s(e){if(\"function\"!=typeof e)throw new TypeError('The \"listener\" argument must be of type Function. Received type '+typeof e)}function l(e){return void 0===e._maxListeners?o.defaultMaxListeners:e._maxListeners}function u(e,t,r,n){var i,o,a,u;if(s(r),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit(\"newListener\",t,r.listener?r.listener:r),o=e._events),a=o[t]),void 0===a)a=o[t]=r,++e._eventsCount;else if(\"function\"==typeof a?a=o[t]=n?[r,a]:[a,r]:n?a.unshift(r):a.push(r),(i=l(e))>0&&a.length>i&&!a.warned){a.warned=!0;var c=new Error(\"Possible EventEmitter memory leak detected. \"+a.length+\" \"+String(t)+\" listeners added. Use emitter.setMaxListeners() to increase limit\");c.name=\"MaxListenersExceededWarning\",c.emitter=e,c.type=t,c.count=a.length,u=c,import_console_browserify.default&&import_console_browserify.default.warn&&import_console_browserify.default.warn(u)}return e}function c(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=c.bind(n);return i.listener=r,n.wrapFn=i,i}function h(e,t,r){var n=e._events;if(void 0===n)return[];var i=n[t];return void 0===i?[]:\"function\"==typeof i?r?[i.listener||i]:[i]:r?function(e){for(var t=new Array(e.length),r=0;r__left_angle_mark_t.length;++r)t[r]=e[r].listener||e[r];return t}(i):p(i,i.length)}function f(e){var t=this._events;if(void 0!==t){var r=t[e];if(\"function\"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function p(e,t){for(var r=new Array(t),n=0;n__left_angle_mark_t;++n)r[n]=e[n];return r}function m(e,t,r,n){if(\"function\"==typeof e.on)n.once?e.once(t,r):e.on(t,r);else{if(\"function\"!=typeof e.addEventListener)throw new TypeError('The \"emitter\" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function i(o){n.once&&e.removeEventListener(t,i),r(o)}))}}Object.defineProperty(o,\"defaultMaxListeners\",{enumerable:!0,get:function(){return a},set:function(e){if(\"number\"!=typeof e||e__left_angle_mark_0||i(e))throw new RangeError('The value of \"defaultMaxListeners\" is out of range. It must be a non-negative number. Received '+e+\".\");a=e}}),o.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(e){if(\"number\"!=typeof e||e__left_angle_mark_0||i(e))throw new RangeError('The value of \"n\" is out of range. It must be a non-negative number. Received '+e+\".\");return this._maxListeners=e,this},o.prototype.getMaxListeners=function(){return l(this)},o.prototype.emit=function(e){for(var t=[],r=1;r__left_angle_mark_arguments.length;r++)t.push(arguments[r]);var i=\"error\"===e,o=this._events;if(void 0!==o)i=i&&void 0===o.error;else if(!i)return!1;if(i){var a;if(t.length>0&&(a=t[0]),a instanceof Error)throw a;var s=new Error(\"Unhandled error.\"+(a?\" (\"+a.message+\")\":\"\"));throw s.context=a,s}var l=o[e];if(void 0===l)return!1;if(\"function\"==typeof l)n(l,this,t);else{var u=l.length,c=p(l,u);for(r=0;r__left_angle_mark_u;++r)n(c[r],this,t)}return!0},o.prototype.addListener=function(e,t){return u(this,e,t,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(e,t){return u(this,e,t,!0)},o.prototype.once=function(e,t){return s(t),this.on(e,d(this,e,t)),this},o.prototype.prependOnceListener=function(e,t){return s(t),this.prependListener(e,d(this,e,t)),this},o.prototype.removeListener=function(e,t){var r,n,i,o,a;if(s(t),void 0===(n=this._events))return this;if(void 0===(r=n[e]))return this;if(r===t||r.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit(\"removeListener\",e,r.listener||t));else if(\"function\"!=typeof r){for(i=-1,o=r.length-1;o>=0;o--)if(r[o]===t||r[o].listener===t){a=r[o].listener,i=o;break}if(i__left_angle_mark_0)return this;0===i?r.shift():function(e,t){for(;t+1__left_angle_mark_e.length;t++)e[t]=e[t+1];e.pop()}(r,i),1===r.length&&(n[e]=r[0]),void 0!==n.removeListener&&this.emit(\"removeListener\",e,a||t)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(e){var t,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0===arguments.length){var i,o=Object.keys(r);for(n=0;n__left_angle_mark_o.length;++n)\"removeListener\"!==(i=o[n])&&this.removeAllListeners(i);return this.removeAllListeners(\"removeListener\"),this._events=Object.create(null),this._eventsCount=0,this}if(\"function\"==typeof(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},o.prototype.listeners=function(e){return h(this,e,!0)},o.prototype.rawListeners=function(e){return h(this,e,!1)},o.listenerCount=function(e,t){return\"function\"==typeof e.listenerCount?e.listenerCount(t):f.call(e,t)},o.prototype.listenerCount=f,o.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},6551:(e,t,r)=>{var n=r(453);e.exports={create:function(e,t){if(e instanceof(t=t||(0,eval)(\"this\")).ArrayBuffer){var i=r(909);return new n(new i(e,0,e.byteLength,!0,t))}var o=r(3684);return new n(new o(e,0,e.length,!0))}}},3684:e=>{function t(e,t,r,n){this.buffer=e,this.offset=t||0,r=\"number\"==typeof r?r:e.length,this.endPosition=this.offset+r,this.setBigEndian(n)}t.prototype={setBigEndian:function(e){this.bigEndian=!!e},nextUInt8:function(){var e=this.buffer.readUInt8(this.offset);return this.offset+=1,e},nextInt8:function(){var e=this.buffer.readInt8(this.offset);return this.offset+=1,e},nextUInt16:function(){var e=this.bigEndian?this.buffer.readUInt16BE(this.offset):this.buffer.readUInt16LE(this.offset);return this.offset+=2,e},nextUInt32:function(){var e=this.bigEndian?this.buffer.readUInt32BE(this.offset):this.buffer.readUInt32LE(this.offset);return this.offset+=4,e},nextInt16:function(){var e=this.bigEndian?this.buffer.readInt16BE(this.offset):this.buffer.readInt16LE(this.offset);return this.offset+=2,e},nextInt32:function(){var e=this.bigEndian?this.buffer.readInt32BE(this.offset):this.buffer.readInt32LE(this.offset);return this.offset+=4,e},nextFloat:function(){var e=this.bigEndian?this.buffer.readFloatBE(this.offset):this.buffer.readFloatLE(this.offset);return this.offset+=4,e},nextDouble:function(){var e=this.bigEndian?this.buffer.readDoubleBE(this.offset):this.buffer.readDoubleLE(this.offset);return this.offset+=8,e},nextBuffer:function(e){var t=this.buffer.slice(this.offset,this.offset+e);return this.offset+=e,t},remainingLength:function(){return this.endPosition-this.offset},nextString:function(e){var t=this.buffer.toString(\"utf8\",this.offset,this.offset+e);return this.offset+=e,t},mark:function(){var e=this;return{openWithOffset:function(r){return r=(r||0)+this.offset,new t(e.buffer,r,e.endPosition-r,e.bigEndian)},offset:this.offset}},offsetFrom:function(e){return this.offset-e.offset},skip:function(e){this.offset+=e},branch:function(e,r){return r=\"number\"==typeof r?r:this.endPosition-(this.offset+e),new t(this.buffer,this.offset+e,r,this.bigEndian)}},e.exports=t},565:e=>{function t(e){return parseInt(e,10)}function r(e,r){e=e.map(t),r=r.map(t);var n=e[0],i=e[1]-1,o=e[2],a=r[0],s=r[1],l=r[2];return Date.UTC(n,i,o,a,s,l,0)/1e3}function n(e){var n=e.substr(0,10).split(\"-\"),i=e.substr(11,8).split(\":\"),o=e.substr(19,6).split(\":\").map(t),a=3600*o[0]+60*o[1],s=r(n,i);if(\"number\"==typeof(s-=a)&&!isNaN(s))return s}function i(e){var t=e.split(\" \"),n=r(t[0].split(\":\"),t[1].split(\":\"));if(\"number\"==typeof n&&!isNaN(n))return n}e.exports={parseDateWithSpecFormat:i,parseDateWithTimezoneFormat:n,parseExifDate:function(e){var t=19===e.length&&\":\"===e.charAt(4);return 25===e.length&&\"T\"===e.charAt(10)?n(e):t?i(e):void 0}}},909:e=>{function t(e,t,r,n,i,o){this.global=i,t=t||0,r=r||e.byteLength-t,this.arrayBuffer=e.slice(t,t+r),this.view=new i.DataView(this.arrayBuffer,0,this.arrayBuffer.byteLength),this.setBigEndian(n),this.offset=0,this.parentOffset=(o||0)+t}t.prototype={setBigEndian:function(e){this.littleEndian=!e},nextUInt8:function(){var e=this.view.getUint8(this.offset);return this.offset+=1,e},nextInt8:function(){var e=this.view.getInt8(this.offset);return this.offset+=1,e},nextUInt16:function(){var e=this.view.getUint16(this.offset,this.littleEndian);return this.offset+=2,e},nextUInt32:function(){var e=this.view.getUint32(this.offset,this.littleEndian);return this.offset+=4,e},nextInt16:function(){var e=this.view.getInt16(this.offset,this.littleEndian);return this.offset+=2,e},nextInt32:function(){var e=this.view.getInt32(this.offset,this.littleEndian);return this.offset+=4,e},nextFloat:function(){var e=this.view.getFloat32(this.offset,this.littleEndian);return this.offset+=4,e},nextDouble:function(){var e=this.view.getFloat64(this.offset,this.littleEndian);return this.offset+=8,e},nextBuffer:function(e){var t=this.arrayBuffer.slice(this.offset,this.offset+e);return this.offset+=e,t},remainingLength:function(){return this.arrayBuffer.byteLength-this.offset},nextString:function(e){var t=this.arrayBuffer.slice(this.offset,this.offset+e);return t=String.fromCharCode.apply(null,new this.global.Uint8Array(t)),this.offset+=e,t},mark:function(){var e=this;return{openWithOffset:function(r){return r=(r||0)+this.offset,new t(e.arrayBuffer,r,e.arrayBuffer.byteLength-r,!e.littleEndian,e.global,e.parentOffset)},offset:this.offset,getParentOffset:function(){return e.parentOffset}}},offsetFrom:function(e){return this.parentOffset+this.offset-(e.offset+e.getParentOffset())},skip:function(e){this.offset+=e},branch:function(e,r){return r=\"number\"==typeof r?r:this.arrayBuffer.byteLength-(this.offset+e),new t(this.arrayBuffer,this.offset+e,r,!this.littleEndian,this.global,this.parentOffset)}},e.exports=t},3332:e=>{e.exports={exif:{1:\"InteropIndex\",2:\"InteropVersion\",11:\"ProcessingSoftware\",254:\"SubfileType\",255:\"OldSubfileType\",256:\"ImageWidth\",257:\"ImageHeight\",258:\"BitsPerSample\",259:\"Compression\",262:\"PhotometricInterpretation\",263:\"Thresholding\",264:\"CellWidth\",265:\"CellLength\",266:\"FillOrder\",269:\"DocumentName\",270:\"ImageDescription\",271:\"Make\",272:\"Model\",273:\"StripOffsets\",274:\"Orientation\",277:\"SamplesPerPixel\",278:\"RowsPerStrip\",279:\"StripByteCounts\",280:\"MinSampleValue\",281:\"MaxSampleValue\",282:\"XResolution\",283:\"YResolution\",284:\"PlanarConfiguration\",285:\"PageName\",286:\"XPosition\",287:\"YPosition\",288:\"FreeOffsets\",289:\"FreeByteCounts\",290:\"GrayResponseUnit\",291:\"GrayResponseCurve\",292:\"T4Options\",293:\"T6Options\",296:\"ResolutionUnit\",297:\"PageNumber\",300:\"ColorResponseUnit\",301:\"TransferFunction\",305:\"Software\",306:\"ModifyDate\",315:\"Artist\",316:\"HostComputer\",317:\"Predictor\",318:\"WhitePoint\",319:\"PrimaryChromaticities\",320:\"ColorMap\",321:\"HalftoneHints\",322:\"TileWidth\",323:\"TileLength\",324:\"TileOffsets\",325:\"TileByteCounts\",326:\"BadFaxLines\",327:\"CleanFaxData\",328:\"ConsecutiveBadFaxLines\",330:\"SubIFD\",332:\"InkSet\",333:\"InkNames\",334:\"NumberofInks\",336:\"DotRange\",337:\"TargetPrinter\",338:\"ExtraSamples\",339:\"SampleFormat\",340:\"SMinSampleValue\",341:\"SMaxSampleValue\",342:\"TransferRange\",343:\"ClipPath\",344:\"XClipPathUnits\",345:\"YClipPathUnits\",346:\"Indexed\",347:\"JPEGTables\",351:\"OPIProxy\",400:\"GlobalParametersIFD\",401:\"ProfileType\",402:\"FaxProfile\",403:\"CodingMethods\",404:\"VersionYear\",405:\"ModeNumber\",433:\"Decode\",434:\"DefaultImageColor\",435:\"T82Options\",437:\"JPEGTables\",512:\"JPEGProc\",513:\"ThumbnailOffset\",514:\"ThumbnailLength\",515:\"JPEGRestartInterval\",517:\"JPEGLosslessPredictors\",518:\"JPEGPointTransforms\",519:\"JPEGQTables\",520:\"JPEGDCTables\",521:\"JPEGACTables\",529:\"YCbCrCoefficients\",530:\"YCbCrSubSampling\",531:\"YCbCrPositioning\",532:\"ReferenceBlackWhite\",559:\"StripRowCounts\",700:\"ApplicationNotes\",999:\"USPTOMiscellaneous\",4096:\"RelatedImageFileFormat\",4097:\"RelatedImageWidth\",4098:\"RelatedImageHeight\",18246:\"Rating\",18247:\"XP_DIP_XML\",18248:\"StitchInfo\",18249:\"RatingPercent\",32781:\"ImageID\",32931:\"WangTag1\",32932:\"WangAnnotation\",32933:\"WangTag3\",32934:\"WangTag4\",32995:\"Matteing\",32996:\"DataType\",32997:\"ImageDepth\",32998:\"TileDepth\",33405:\"Model2\",33421:\"CFARepeatPatternDim\",33422:\"CFAPattern2\",33423:\"BatteryLevel\",33424:\"KodakIFD\",33432:\"Copyright\",33434:\"ExposureTime\",33437:\"FNumber\",33445:\"MDFileTag\",33446:\"MDScalePixel\",33447:\"MDColorTable\",33448:\"MDLabName\",33449:\"MDSampleInfo\",33450:\"MDPrepDate\",33451:\"MDPrepTime\",33452:\"MDFileUnits\",33550:\"PixelScale\",33589:\"AdventScale\",33590:\"AdventRevision\",33628:\"UIC1Tag\",33629:\"UIC2Tag\",33630:\"UIC3Tag\",33631:\"UIC4Tag\",33723:\"IPTC-NAA\",33918:\"IntergraphPacketData\",33919:\"IntergraphFlagRegisters\",33920:\"IntergraphMatrix\",33921:\"INGRReserved\",33922:\"ModelTiePoint\",34016:\"Site\",34017:\"ColorSequence\",34018:\"IT8Header\",34019:\"RasterPadding\",34020:\"BitsPerRunLength\",34021:\"BitsPerExtendedRunLength\",34022:\"ColorTable\",34023:\"ImageColorIndicator\",34024:\"BackgroundColorIndicator\",34025:\"ImageColorValue\",34026:\"BackgroundColorValue\",34027:\"PixelIntensityRange\",34028:\"TransparencyIndicator\",34029:\"ColorCharacterization\",34030:\"HCUsage\",34031:\"TrapIndicator\",34032:\"CMYKEquivalent\",34118:\"SEMInfo\",34152:\"AFCP_IPTC\",34232:\"PixelMagicJBIGOptions\",34264:\"ModelTransform\",34306:\"WB_GRGBLevels\",34310:\"LeafData\",34377:\"PhotoshopSettings\",34665:\"ExifOffset\",34675:\"ICC_Profile\",34687:\"TIFF_FXExtensions\",34688:\"MultiProfiles\",34689:\"SharedData\",34690:\"T88Options\",34732:\"ImageLayer\",34735:\"GeoTiffDirectory\",34736:\"GeoTiffDoubleParams\",34737:\"GeoTiffAsciiParams\",34850:\"ExposureProgram\",34852:\"SpectralSensitivity\",34853:\"GPSInfo\",34855:\"ISO\",34856:\"Opto-ElectricConvFactor\",34857:\"Interlace\",34858:\"TimeZoneOffset\",34859:\"SelfTimerMode\",34864:\"SensitivityType\",34865:\"StandardOutputSensitivity\",34866:\"RecommendedExposureIndex\",34867:\"ISOSpeed\",34868:\"ISOSpeedLatitudeyyy\",34869:\"ISOSpeedLatitudezzz\",34908:\"FaxRecvParams\",34909:\"FaxSubAddress\",34910:\"FaxRecvTime\",34954:\"LeafSubIFD\",36864:\"ExifVersion\",36867:\"DateTimeOriginal\",36868:\"CreateDate\",37121:\"ComponentsConfiguration\",37122:\"CompressedBitsPerPixel\",37377:\"ShutterSpeedValue\",37378:\"ApertureValue\",37379:\"BrightnessValue\",37380:\"ExposureCompensation\",37381:\"MaxApertureValue\",37382:\"SubjectDistance\",37383:\"MeteringMode\",37384:\"LightSource\",37385:\"Flash\",37386:\"FocalLength\",37387:\"FlashEnergy\",37388:\"SpatialFrequencyResponse\",37389:\"Noise\",37390:\"FocalPlaneXResolution\",37391:\"FocalPlaneYResolution\",37392:\"FocalPlaneResolutionUnit\",37393:\"ImageNumber\",37394:\"SecurityClassification\",37395:\"ImageHistory\",37396:\"SubjectArea\",37397:\"ExposureIndex\",37398:\"TIFF-EPStandardID\",37399:\"SensingMethod\",37434:\"CIP3DataFile\",37435:\"CIP3Sheet\",37436:\"CIP3Side\",37439:\"StoNits\",37500:\"MakerNote\",37510:\"UserComment\",37520:\"SubSecTime\",37521:\"SubSecTimeOriginal\",37522:\"SubSecTimeDigitized\",37679:\"MSDocumentText\",37680:\"MSPropertySetStorage\",37681:\"MSDocumentTextPosition\",37724:\"ImageSourceData\",40091:\"XPTitle\",40092:\"XPComment\",40093:\"XPAuthor\",40094:\"XPKeywords\",40095:\"XPSubject\",40960:\"FlashpixVersion\",40961:\"ColorSpace\",40962:\"ExifImageWidth\",40963:\"ExifImageHeight\",40964:\"RelatedSoundFile\",40965:\"InteropOffset\",41483:\"FlashEnergy\",41484:\"SpatialFrequencyResponse\",41485:\"Noise\",41486:\"FocalPlaneXResolution\",41487:\"FocalPlaneYResolution\",41488:\"FocalPlaneResolutionUnit\",41489:\"ImageNumber\",41490:\"SecurityClassification\",41491:\"ImageHistory\",41492:\"SubjectLocation\",41493:\"ExposureIndex\",41494:\"TIFF-EPStandardID\",41495:\"SensingMethod\",41728:\"FileSource\",41729:\"SceneType\",41730:\"CFAPattern\",41985:\"CustomRendered\",41986:\"ExposureMode\",41987:\"WhiteBalance\",41988:\"DigitalZoomRatio\",41989:\"FocalLengthIn35mmFormat\",41990:\"SceneCaptureType\",41991:\"GainControl\",41992:\"Contrast\",41993:\"Saturation\",41994:\"Sharpness\",41995:\"DeviceSettingDescription\",41996:\"SubjectDistanceRange\",42016:\"ImageUniqueID\",42032:\"OwnerName\",42033:\"SerialNumber\",42034:\"LensInfo\",42035:\"LensMake\",42036:\"LensModel\",42037:\"LensSerialNumber\",42112:\"GDALMetadata\",42113:\"GDALNoData\",42240:\"Gamma\",44992:\"ExpandSoftware\",44993:\"ExpandLens\",44994:\"ExpandFilm\",44995:\"ExpandFilterLens\",44996:\"ExpandScanner\",44997:\"ExpandFlashLamp\",48129:\"PixelFormat\",48130:\"Transformation\",48131:\"Uncompressed\",48132:\"ImageType\",48256:\"ImageWidth\",48257:\"ImageHeight\",48258:\"WidthResolution\",48259:\"HeightResolution\",48320:\"ImageOffset\",48321:\"ImageByteCount\",48322:\"AlphaOffset\",48323:\"AlphaByteCount\",48324:\"ImageDataDiscard\",48325:\"AlphaDataDiscard\",50215:\"OceScanjobDesc\",50216:\"OceApplicationSelector\",50217:\"OceIDNumber\",50218:\"OceImageLogic\",50255:\"Annotations\",50341:\"PrintIM\",50560:\"USPTOOriginalContentType\",50706:\"DNGVersion\",50707:\"DNGBackwardVersion\",50708:\"UniqueCameraModel\",50709:\"LocalizedCameraModel\",50710:\"CFAPlaneColor\",50711:\"CFALayout\",50712:\"LinearizationTable\",50713:\"BlackLevelRepeatDim\",50714:\"BlackLevel\",50715:\"BlackLevelDeltaH\",50716:\"BlackLevelDeltaV\",50717:\"WhiteLevel\",50718:\"DefaultScale\",50719:\"DefaultCropOrigin\",50720:\"DefaultCropSize\",50721:\"ColorMatrix1\",50722:\"ColorMatrix2\",50723:\"CameraCalibration1\",50724:\"CameraCalibration2\",50725:\"ReductionMatrix1\",50726:\"ReductionMatrix2\",50727:\"AnalogBalance\",50728:\"AsShotNeutral\",50729:\"AsShotWhiteXY\",50730:\"BaselineExposure\",50731:\"BaselineNoise\",50732:\"BaselineSharpness\",50733:\"BayerGreenSplit\",50734:\"LinearResponseLimit\",50735:\"CameraSerialNumber\",50736:\"DNGLensInfo\",50737:\"ChromaBlurRadius\",50738:\"AntiAliasStrength\",50739:\"ShadowScale\",50740:\"DNGPrivateData\",50741:\"MakerNoteSafety\",50752:\"RawImageSegmentation\",50778:\"CalibrationIlluminant1\",50779:\"CalibrationIlluminant2\",50780:\"BestQualityScale\",50781:\"RawDataUniqueID\",50784:\"AliasLayerMetadata\",50827:\"OriginalRawFileName\",50828:\"OriginalRawFileData\",50829:\"ActiveArea\",50830:\"MaskedAreas\",50831:\"AsShotICCProfile\",50832:\"AsShotPreProfileMatrix\",50833:\"CurrentICCProfile\",50834:\"CurrentPreProfileMatrix\",50879:\"ColorimetricReference\",50898:\"PanasonicTitle\",50899:\"PanasonicTitle2\",50931:\"CameraCalibrationSig\",50932:\"ProfileCalibrationSig\",50933:\"ProfileIFD\",50934:\"AsShotProfileName\",50935:\"NoiseReductionApplied\",50936:\"ProfileName\",50937:\"ProfileHueSatMapDims\",50938:\"ProfileHueSatMapData1\",50939:\"ProfileHueSatMapData2\",50940:\"ProfileToneCurve\",50941:\"ProfileEmbedPolicy\",50942:\"ProfileCopyright\",50964:\"ForwardMatrix1\",50965:\"ForwardMatrix2\",50966:\"PreviewApplicationName\",50967:\"PreviewApplicationVersion\",50968:\"PreviewSettingsName\",50969:\"PreviewSettingsDigest\",50970:\"PreviewColorSpace\",50971:\"PreviewDateTime\",50972:\"RawImageDigest\",50973:\"OriginalRawFileDigest\",50974:\"SubTileBlockSize\",50975:\"RowInterleaveFactor\",50981:\"ProfileLookTableDims\",50982:\"ProfileLookTableData\",51008:\"OpcodeList1\",51009:\"OpcodeList2\",51022:\"OpcodeList3\",51041:\"NoiseProfile\",51043:\"TimeCodes\",51044:\"FrameRate\",51058:\"TStop\",51081:\"ReelName\",51089:\"OriginalDefaultFinalSize\",51090:\"OriginalBestQualitySize\",51091:\"OriginalDefaultCropSize\",51105:\"CameraLabel\",51107:\"ProfileHueSatMapEncoding\",51108:\"ProfileLookTableEncoding\",51109:\"BaselineExposureOffset\",51110:\"DefaultBlackRender\",51111:\"NewRawImageDigest\",51112:\"RawToPreviewGain\",51125:\"DefaultUserCrop\",59932:\"Padding\",59933:\"OffsetSchema\",65e3:\"OwnerName\",65001:\"SerialNumber\",65002:\"Lens\",65024:\"KDC_IFD\",65100:\"RawFile\",65101:\"Converter\",65102:\"WhiteBalance\",65105:\"Exposure\",65106:\"Shadows\",65107:\"Brightness\",65108:\"Contrast\",65109:\"Saturation\",65110:\"Sharpness\",65111:\"Smoothness\",65112:\"MoireFilter\"},gps:{0:\"GPSVersionID\",1:\"GPSLatitudeRef\",2:\"GPSLatitude\",3:\"GPSLongitudeRef\",4:\"GPSLongitude\",5:\"GPSAltitudeRef\",6:\"GPSAltitude\",7:\"GPSTimeStamp\",8:\"GPSSatellites\",9:\"GPSStatus\",10:\"GPSMeasureMode\",11:\"GPSDOP\",12:\"GPSSpeedRef\",13:\"GPSSpeed\",14:\"GPSTrackRef\",15:\"GPSTrack\",16:\"GPSImgDirectionRef\",17:\"GPSImgDirection\",18:\"GPSMapDatum\",19:\"GPSDestLatitudeRef\",20:\"GPSDestLatitude\",21:\"GPSDestLongitudeRef\",22:\"GPSDestLongitude\",23:\"GPSDestBearingRef\",24:\"GPSDestBearing\",25:\"GPSDestDistanceRef\",26:\"GPSDestDistance\",27:\"GPSProcessingMethod\",28:\"GPSAreaInformation\",29:\"GPSDateStamp\",30:\"GPSDifferential\",31:\"GPSHPositioningError\"}}},592:e=>{function t(e,t){switch(e){case 1:return t.nextUInt8();case 3:case 8:return t.nextUInt16();case 4:case 9:return t.nextUInt32();case 5:return[t.nextUInt32(),t.nextUInt32()];case 6:return t.nextInt8();case 10:return[t.nextInt32(),t.nextInt32()];case 11:return t.nextFloat();case 12:return t.nextDouble();default:throw new Error(\"Invalid format while decoding: \"+e)}}function r(e,r){var n,i,o=r.nextUInt16(),a=r.nextUInt16(),s=function(e){switch(e){case 1:case 2:case 6:case 7:return 1;case 3:case 8:return 2;case 4:case 9:case 11:return 4;case 5:case 10:case 12:return 8;default:return 0}}(a),l=r.nextUInt32(),u=s*l;if(u>4&&(r=e.openWithOffset(r.nextUInt32())),2===a){var c=(n=r.nextString(l)).indexOf(\"\\0\");-1!==c&&(n=n.substr(0,c))}else if(7===a)n=r.nextBuffer(l);else if(0!==a)for(n=[],i=0;i__left_angle_mark_l;++i)n.push(t(a,r));return u__left_angle_mark_4&&r.skip(4-u),[o,n,a]}function n(e,t,n){var i,o,a=t.nextUInt16();for(o=0;o__left_angle_mark_a;++o)n((i=r(e,t))[0],i[1],i[2])}e.exports={IFD0:1,IFD1:2,GPSIFD:3,SubIFD:4,InteropIFD:5,parseTags:function(e,t){var r,i,o,a;try{r=function(e){if(\"Exif\\0\\0\"!==e.nextString(6))throw new Error(\"Invalid EXIF header\");var t=e.mark(),r=e.nextUInt16();if(18761===r)e.setBigEndian(!1);else{if(19789!==r)throw new Error(\"Invalid TIFF header\");e.setBigEndian(!0)}if(42!==e.nextUInt16())throw new Error(\"Invalid TIFF data\");return t}(e)}catch(m){return!1}var s=r.openWithOffset(e.nextUInt32()),l=this.IFD0;n(r,s,(function(e,r,n){switch(e){case 34853:o=r[0];break;case 34665:i=r[0];break;default:t(l,e,r,n)}}));var u=s.nextUInt32();if(0!==u){var c=r.openWithOffset(u);n(r,c,t.bind(null,this.IFD1))}if(o){var d=r.openWithOffset(o);n(r,d,t.bind(null,this.GPSIFD))}if(i){var h=r.openWithOffset(i),f=this.InteropIFD;n(r,h,(function(e,r,n){40965===e?a=r[0]:t(f,e,r,n)}))}if(a){var p=r.openWithOffset(a);n(r,p,t.bind(null,this.InteropIFD))}return!0}}},656:e=>{e.exports={parseSections:function(e,t){var r,n;for(e.setBigEndian(!0);e.remainingLength()>0&&218!==n;){if(255!==e.nextUInt8())throw new Error(\"Invalid JPEG section offset\");r=(n=e.nextUInt8())>=208&&n__left_angle_mark_=217||218===n?0:e.nextUInt16()-2,t(n,e.branch(0,r)),e.skip(r)}},getSizeFromSOFSection:function(e){return e.skip(1),{height:e.nextUInt16(),width:e.nextUInt16()}},getSectionName:function(e){var t,r;switch(e){case 216:t=\"SOI\";break;case 196:t=\"DHT\";break;case 219:t=\"DQT\";break;case 221:t=\"DRI\";break;case 218:t=\"SOS\";break;case 254:t=\"COM\";break;case 217:t=\"EOI\";break;default:e>=224&&e__left_angle_mark_=239?(t=\"APP\",r=e-224):e>=192&&e__left_angle_mark_=207&&196!==e&&200!==e&&204!==e?(t=\"SOF\",r=e-192):e>=208&&e__left_angle_mark_=215&&(t=\"RST\",r=e-208)}var n={name:t};return\"number\"==typeof r&&(n.index=r),n}}},453:(e,t,r)=>{var n=r(656),i=r(592),o=r(3814);function a(e,t,r,n,i,o,a){this.startMarker=e,this.tags=t,this.imageSize=r,this.thumbnailOffset=n,this.thumbnailLength=i,this.thumbnailType=o,this.app1Offset=a}function s(e){this.stream=e,this.flags={readBinaryTags:!1,resolveTagNames:!0,simplifyValues:!0,imageSize:!0,hidePointers:!0,returnTags:!0}}a.prototype={hasThumbnail:function(e){return!(!this.thumbnailOffset||!this.thumbnailLength||\"string\"==typeof e&&(\"image/jpeg\"===e.toLowerCase().trim()?6!==this.thumbnailType:\"image/tiff\"!==e.toLowerCase().trim()||1!==this.thumbnailType))},getThumbnailOffset:function(){return this.app1Offset+6+this.thumbnailOffset},getThumbnailLength:function(){return this.thumbnailLength},getThumbnailBuffer:function(){return this._getThumbnailStream().nextBuffer(this.thumbnailLength)},_getThumbnailStream:function(){return this.startMarker.openWithOffset(this.getThumbnailOffset())},getImageSize:function(){return this.imageSize},getThumbnailSize:function(){var e,t=this._getThumbnailStream();return n.parseSections(t,(function(t,r){\"SOF\"===n.getSectionName(t).name&&(e=n.getSizeFromSOFSection(r))})),e}},s.prototype={enableBinaryFields:function(e){return this.flags.readBinaryTags=!!e,this},enablePointers:function(e){return this.flags.hidePointers=!e,this},enableTagNames:function(e){return this.flags.resolveTagNames=!!e,this},enableImageSize:function(e){return this.flags.imageSize=!!e,this},enableReturnTags:function(e){return this.flags.returnTags=!!e,this},enableSimpleValues:function(e){return this.flags.simplifyValues=!!e,this},parse:function(){var e,t,s,l,u,c,d,h,f,p=this.stream.mark(),m=p.openWithOffset(0),g=this.flags;return g.resolveTagNames&&(d=r(3332)),g.resolveTagNames?(e={},h=function(t){return e[t.name]},f=function(t,r){e[t.name]=r}):(e=[],h=function(t){var r;for(r=0;r__left_angle_mark_e.length;++r)if(e[r].type===t.type&&e[r].section===t.section)return e.value},f=function(t,r){var n;for(n=0;n__left_angle_mark_e.length;++n)if(e[n].type===t.type&&e[n].section===t.section)return void(e.value=r)}),n.parseSections(m,(function(r,a){var h=a.offsetFrom(p);225===r?i.parseTags(a,(function(t,r,n,a){if(g.readBinaryTags||7!==a){if(513===r){if(s=n[0],g.hidePointers)return}else if(514===r){if(l=n[0],g.hidePointers)return}else if(259===r&&(u=n[0],g.hidePointers))return;if(g.returnTags)if(g.simplifyValues&&(n=o.simplifyValue(n,a)),g.resolveTagNames){var c=(t===i.GPSIFD?d.gps:d.exif)[r];c||(c=d.exif[r]),e.hasOwnProperty(c)||(e[c]=n)}else e.push({section:t,type:r,value:n})}}))&&(c=h):g.imageSize&&\"SOF\"===n.getSectionName(r).name&&(t=n.getSizeFromSOFSection(a))})),g.simplifyValues&&(o.castDegreeValues(h,f),o.castDateValues(h,f)),new a(p,e,t,s,l,u,c)}},e.exports=s},3814:(e,t,r)=>{var n=r(592),i=r(565),o=[{section:n.GPSIFD,type:2,name:\"GPSLatitude\",refType:1,refName:\"GPSLatitudeRef\",posVal:\"N\"},{section:n.GPSIFD,type:4,name:\"GPSLongitude\",refType:3,refName:\"GPSLongitudeRef\",posVal:\"E\"}],a=[{section:n.SubIFD,type:306,name:\"ModifyDate\"},{section:n.SubIFD,type:36867,name:\"DateTimeOriginal\"},{section:n.SubIFD,type:36868,name:\"CreateDate\"},{section:n.SubIFD,type:306,name:\"ModifyDate\"}];e.exports={castDegreeValues:function(e,t){o.forEach((function(r){var n=e(r);if(n){var i=e({section:r.section,type:r.refType,name:r.refName})===r.posVal?1:-1,o=(n[0]+n[1]/60+n[2]/3600)*i;t(r,o)}}))},castDateValues:function(e,t){a.forEach((function(r){var n=e(r);if(n){var o=i.parseExifDate(n);void 0!==o&&t(r,o)}}))},simplifyValue:function(e,t){return Array.isArray(e)&&1===(e=e.map((function(e){return 10===t||5===t?e[0]/e[1]:e}))).length&&(e=e[0]),e}}},8789:(module,__unused_webpack_exports,__webpack_require__)=>{var Buffer=__webpack_require__(8834).lW;const Token=__webpack_require__(5010),strtok3=__webpack_require__(7378),{stringToBytes:stringToBytes,tarHeaderChecksumMatches:tarHeaderChecksumMatches,uint32SyncSafeToken:uint32SyncSafeToken}=__webpack_require__(7044),supported=__webpack_require__(4078),minimumBytes=4100;async function fromStream(e){const t=await strtok3.fromStream(e);try{return await fromTokenizer(t)}finally{await t.close()}}async function fromBuffer(e){if(!(e instanceof Uint8Array||e instanceof ArrayBuffer||Buffer.isBuffer(e)))throw new TypeError(`Expected the \\`input\\` argument to be of type \\`Uint8Array\\` or \\`Buffer\\` or \\`ArrayBuffer\\`, got \\`${typeof e}\\``);const t=e instanceof Buffer?e:Buffer.from(e);if(t&&t.length>1)return fromTokenizer(strtok3.fromBuffer(t))}function _check(e,t,r){r={offset:0,...r};for(const[n,i]of t.entries())if(r.mask){if(i!==(r.mask[n]&e[n+r.offset]))return!1}else if(i!==e[n+r.offset])return!1;return!0}async function fromTokenizer(e){try{return _fromTokenizer(e)}catch(t){if(!(t instanceof strtok3.EndOfStreamError))throw t}}async function _fromTokenizer(e){let t=Buffer.alloc(minimumBytes);const r=(e,r)=>_check(t,e,r),n=(e,t)=>r(stringToBytes(e),t);if(e.fileInfo.size||(e.fileInfo.size=Number.MAX_SAFE_INTEGER),await e.peekBuffer(t,{length:12,mayBeLess:!0}),r([66,77]))return{ext:\"bmp\",mime:\"image/bmp\"};if(r([11,119]))return{ext:\"ac3\",mime:\"audio/vnd.dolby.dd-raw\"};if(r([120,1]))return{ext:\"dmg\",mime:\"application/x-apple-diskimage\"};if(r([77,90]))return{ext:\"exe\",mime:\"application/x-msdownload\"};if(r([37,33]))return await e.peekBuffer(t,{length:24,mayBeLess:!0}),n(\"PS-Adobe-\",{offset:2})&&n(\" EPSF-\",{offset:14})?{ext:\"eps\",mime:\"application/eps\"}:{ext:\"ps\",mime:\"application/postscript\"};if(r([31,160])||r([31,157]))return{ext:\"Z\",mime:\"application/x-compress\"};if(r([255,216,255]))return{ext:\"jpg\",mime:\"image/jpeg\"};if(r([73,73,188]))return{ext:\"jxr\",mime:\"image/vnd.ms-photo\"};if(r([31,139,8]))return{ext:\"gz\",mime:\"application/gzip\"};if(r([66,90,104]))return{ext:\"bz2\",mime:\"application/x-bzip2\"};if(n(\"ID3\")){await e.ignore(6);const a=await e.readToken(uint32SyncSafeToken);return e.position+a>e.fileInfo.size?{ext:\"mp3\",mime:\"audio/mpeg\"}:(await e.ignore(a),fromTokenizer(e))}if(n(\"MP+\"))return{ext:\"mpc\",mime:\"audio/x-musepack\"};if((67===t[0]||70===t[0])&&r([87,83],{offset:1}))return{ext:\"swf\",mime:\"application/x-shockwave-flash\"};if(r([71,73,70]))return{ext:\"gif\",mime:\"image/gif\"};if(n(\"FLIF\"))return{ext:\"flif\",mime:\"image/flif\"};if(n(\"8BPS\"))return{ext:\"psd\",mime:\"image/vnd.adobe.photoshop\"};if(n(\"WEBP\",{offset:8}))return{ext:\"webp\",mime:\"image/webp\"};if(n(\"MPCK\"))return{ext:\"mpc\",mime:\"audio/x-musepack\"};if(n(\"FORM\"))return{ext:\"aif\",mime:\"audio/aiff\"};if(n(\"icns\",{offset:0}))return{ext:\"icns\",mime:\"image/icns\"};if(r([80,75,3,4])){try{for(;e.position+30__left_angle_mark_e.fileInfo.size;){await e.readBuffer(t,{length:30});const s={compressedSize:t.readUInt32LE(18),uncompressedSize:t.readUInt32LE(22),filenameLength:t.readUInt16LE(26),extraFieldLength:t.readUInt16LE(28)};if(s.filename=await e.readToken(new Token.StringType(s.filenameLength,\"utf-8\")),await e.ignore(s.extraFieldLength),\"META-INF/mozilla.rsa\"===s.filename)return{ext:\"xpi\",mime:\"application/x-xpinstall\"};if(s.filename.endsWith(\".rels\")||s.filename.endsWith(\".xml\"))switch(s.filename.split(\"/\")[0]){case\"_rels\":default:break;case\"word\":return{ext:\"docx\",mime:\"application/vnd.openxmlformats-officedocument.wordprocessingml.document\"};case\"ppt\":return{ext:\"pptx\",mime:\"application/vnd.openxmlformats-officedocument.presentationml.presentation\"};case\"xl\":return{ext:\"xlsx\",mime:\"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\"}}if(s.filename.startsWith(\"xl/\"))return{ext:\"xlsx\",mime:\"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\"};if(s.filename.startsWith(\"3D/\")&&s.filename.endsWith(\".model\"))return{ext:\"3mf\",mime:\"model/3mf\"};if(\"mimetype\"===s.filename&&s.compressedSize===s.uncompressedSize)switch(await e.readToken(new Token.StringType(s.compressedSize,\"utf-8\"))){case\"application/epub+zip\":return{ext:\"epub\",mime:\"application/epub+zip\"};case\"application/vnd.oasis.opendocument.text\":return{ext:\"odt\",mime:\"application/vnd.oasis.opendocument.text\"};case\"application/vnd.oasis.opendocument.spreadsheet\":return{ext:\"ods\",mime:\"application/vnd.oasis.opendocument.spreadsheet\"};case\"application/vnd.oasis.opendocument.presentation\":return{ext:\"odp\",mime:\"application/vnd.oasis.opendocument.presentation\"}}if(0===s.compressedSize){let l=-1;for(;l__left_angle_mark_0&&e.position__left_angle_mark_e.fileInfo.size;)await e.peekBuffer(t,{mayBeLess:!0}),l=t.indexOf(\"504B0304\",0,\"hex\"),await e.ignore(l>=0?l:t.length)}else await e.ignore(s.compressedSize)}}catch(i){if(!(i instanceof strtok3.EndOfStreamError))throw i}return{ext:\"zip\",mime:\"application/zip\"}}if(n(\"OggS\")){await e.ignore(28);const u=Buffer.alloc(8);return await e.readBuffer(u),_check(u,[79,112,117,115,72,101,97,100])?{ext:\"opus\",mime:\"audio/opus\"}:_check(u,[128,116,104,101,111,114,97])?{ext:\"ogv\",mime:\"video/ogg\"}:_check(u,[1,118,105,100,101,111,0])?{ext:\"ogm\",mime:\"video/ogg\"}:_check(u,[127,70,76,65,67])?{ext:\"oga\",mime:\"audio/ogg\"}:_check(u,[83,112,101,101,120,32,32])?{ext:\"spx\",mime:\"audio/ogg\"}:_check(u,[1,118,111,114,98,105,115])?{ext:\"ogg\",mime:\"audio/ogg\"}:{ext:\"ogx\",mime:\"application/ogg\"}}if(r([80,75])&&(3===t[2]||5===t[2]||7===t[2])&&(4===t[3]||6===t[3]||8===t[3]))return{ext:\"zip\",mime:\"application/zip\"};if(n(\"ftyp\",{offset:4})&&96&t[8]){const c=t.toString(\"binary\",8,12).replace(\"\\0\",\" \").trim();switch(c){case\"avif\":return{ext:\"avif\",mime:\"image/avif\"};case\"mif1\":return{ext:\"heic\",mime:\"image/heif\"};case\"msf1\":return{ext:\"heic\",mime:\"image/heif-sequence\"};case\"heic\":case\"heix\":return{ext:\"heic\",mime:\"image/heic\"};case\"hevc\":case\"hevx\":return{ext:\"heic\",mime:\"image/heic-sequence\"};case\"qt\":return{ext:\"mov\",mime:\"video/quicktime\"};case\"M4V\":case\"M4VH\":case\"M4VP\":return{ext:\"m4v\",mime:\"video/x-m4v\"};case\"M4P\":return{ext:\"m4p\",mime:\"video/mp4\"};case\"M4B\":return{ext:\"m4b\",mime:\"audio/mp4\"};case\"M4A\":return{ext:\"m4a\",mime:\"audio/x-m4a\"};case\"F4V\":return{ext:\"f4v\",mime:\"video/mp4\"};case\"F4P\":return{ext:\"f4p\",mime:\"video/mp4\"};case\"F4A\":return{ext:\"f4a\",mime:\"audio/mp4\"};case\"F4B\":return{ext:\"f4b\",mime:\"audio/mp4\"};case\"crx\":return{ext:\"cr3\",mime:\"image/x-canon-cr3\"};default:return c.startsWith(\"3g\")?c.startsWith(\"3g2\")?{ext:\"3g2\",mime:\"video/3gpp2\"}:{ext:\"3gp\",mime:\"video/3gpp\"}:{ext:\"mp4\",mime:\"video/mp4\"}}}if(n(\"MThd\"))return{ext:\"mid\",mime:\"audio/midi\"};if(n(\"wOFF\")&&(r([0,1,0,0],{offset:4})||n(\"OTTO\",{offset:4})))return{ext:\"woff\",mime:\"font/woff\"};if(n(\"wOF2\")&&(r([0,1,0,0],{offset:4})||n(\"OTTO\",{offset:4})))return{ext:\"woff2\",mime:\"font/woff2\"};if(r([212,195,178,161])||r([161,178,195,212]))return{ext:\"pcap\",mime:\"application/vnd.tcpdump.pcap\"};if(n(\"DSD \"))return{ext:\"dsf\",mime:\"audio/x-dsf\"};if(n(\"LZIP\"))return{ext:\"lz\",mime:\"application/x-lzip\"};if(n(\"fLaC\"))return{ext:\"flac\",mime:\"audio/x-flac\"};if(r([66,80,71,251]))return{ext:\"bpg\",mime:\"image/bpg\"};if(n(\"wvpk\"))return{ext:\"wv\",mime:\"audio/wavpack\"};if(n(\"%PDF\")){await e.ignore(1350);const d=10485760,h=Buffer.alloc(Math.min(d,e.fileInfo.size));return await e.readBuffer(h,{mayBeLess:!0}),h.includes(Buffer.from(\"AIPrivateData\"))?{ext:\"ai\",mime:\"application/postscript\"}:{ext:\"pdf\",mime:\"application/pdf\"}}if(r([0,97,115,109]))return{ext:\"wasm\",mime:\"application/wasm\"};if(r([73,73,42,0]))return n(\"CR\",{offset:8})?{ext:\"cr2\",mime:\"image/x-canon-cr2\"}:r([28,0,254,0],{offset:8})||r([31,0,11,0],{offset:8})?{ext:\"nef\",mime:\"image/x-nikon-nef\"}:r([8,0,0,0],{offset:4})&&(r([45,0,254,0],{offset:8})||r([39,0,254,0],{offset:8}))?{ext:\"dng\",mime:\"image/x-adobe-dng\"}:(t=Buffer.alloc(24),await e.peekBuffer(t),(r([16,251,134,1],{offset:4})||r([8,0,0,0],{offset:4}))&&r([0,254,0,4,0,1,0,0,0,1,0,0,0,3,1],{offset:9})?{ext:\"arw\",mime:\"image/x-sony-arw\"}:{ext:\"tif\",mime:\"image/tiff\"});if(r([77,77,0,42]))return{ext:\"tif\",mime:\"image/tiff\"};if(n(\"MAC \"))return{ext:\"ape\",mime:\"audio/ape\"};if(r([26,69,223,163])){async function f(){const t=await e.peekNumber(Token.UINT8);let r=128,n=0;for(;!(t&r)&&0!==r;)++n,r>>=1;const i=Buffer.alloc(n+1);return await e.readBuffer(i),i}async function p(){const e=await f(),t=await f();t[0]^=128>>t.length-1;const r=Math.min(6,t.length);return{id:e.readUIntBE(0,e.length),len:t.readUIntBE(t.length-r,r)}}async function m(t,r){for(;r>0;){const t=await p();if(17026===t.id)return e.readToken(new Token.StringType(t.len,\"utf-8\"));await e.ignore(t.len),--r}}const g=await p();switch(await m(0,g.len)){case\"webm\":return{ext:\"webm\",mime:\"video/webm\"};case\"matroska\":return{ext:\"mkv\",mime:\"video/x-matroska\"};default:return}}if(r([82,73,70,70])){if(r([65,86,73],{offset:8}))return{ext:\"avi\",mime:\"video/vnd.avi\"};if(r([87,65,86,69],{offset:8}))return{ext:\"wav\",mime:\"audio/vnd.wave\"};if(r([81,76,67,77],{offset:8}))return{ext:\"qcp\",mime:\"audio/qcelp\"}}if(n(\"SQLi\"))return{ext:\"sqlite\",mime:\"application/x-sqlite3\"};if(r([78,69,83,26]))return{ext:\"nes\",mime:\"application/x-nintendo-nes-rom\"};if(n(\"Cr24\"))return{ext:\"crx\",mime:\"application/x-google-chrome-extension\"};if(n(\"MSCF\")||n(\"ISc(\"))return{ext:\"cab\",mime:\"application/vnd.ms-cab-compressed\"};if(r([237,171,238,219]))return{ext:\"rpm\",mime:\"application/x-rpm\"};if(r([197,208,211,198]))return{ext:\"eps\",mime:\"application/eps\"};if(r([40,181,47,253]))return{ext:\"zst\",mime:\"application/zstd\"};if(r([79,84,84,79,0]))return{ext:\"otf\",mime:\"font/otf\"};if(n(\"#!AMR\"))return{ext:\"amr\",mime:\"audio/amr\"};if(n(\"{\\\\rtf\"))return{ext:\"rtf\",mime:\"application/rtf\"};if(r([70,76,86,1]))return{ext:\"flv\",mime:\"video/x-flv\"};if(n(\"IMPM\"))return{ext:\"it\",mime:\"audio/x-it\"};if(n(\"-lh0-\",{offset:2})||n(\"-lh1-\",{offset:2})||n(\"-lh2-\",{offset:2})||n(\"-lh3-\",{offset:2})||n(\"-lh4-\",{offset:2})||n(\"-lh5-\",{offset:2})||n(\"-lh6-\",{offset:2})||n(\"-lh7-\",{offset:2})||n(\"-lzs-\",{offset:2})||n(\"-lz4-\",{offset:2})||n(\"-lz5-\",{offset:2})||n(\"-lhd-\",{offset:2}))return{ext:\"lzh\",mime:\"application/x-lzh-compressed\"};if(r([0,0,1,186])){if(r([33],{offset:4,mask:[241]}))return{ext:\"mpg\",mime:\"video/MP1S\"};if(r([68],{offset:4,mask:[196]}))return{ext:\"mpg\",mime:\"video/MP2P\"}}if(n(\"ITSF\"))return{ext:\"chm\",mime:\"application/vnd.ms-htmlhelp\"};if(r([253,55,122,88,90,0]))return{ext:\"xz\",mime:\"application/x-xz\"};if(n(\"__left_angle_mark_?xml \"))return{ext:\"xml\",mime:\"application/xml\"};if(r([55,122,188,175,39,28]))return{ext:\"7z\",mime:\"application/x-7z-compressed\"};if(r([82,97,114,33,26,7])&&(0===t[6]||1===t[6]))return{ext:\"rar\",mime:\"application/x-rar-compressed\"};if(n(\"solid \"))return{ext:\"stl\",mime:\"model/stl\"};if(n(\"BLENDER\"))return{ext:\"blend\",mime:\"application/x-blender\"};if(n(\"!__left_angle_mark_arch>\"))return await e.ignore(8),\"debian-binary\"===await e.readToken(new Token.StringType(13,\"ascii\"))?{ext:\"deb\",mime:\"application/x-deb\"}:{ext:\"ar\",mime:\"application/x-unix-archive\"};if(r([137,80,78,71,13,10,26,10])){async function _(){return{length:await e.readToken(Token.INT32_BE),type:await e.readToken(new Token.StringType(4,\"binary\"))}}await e.ignore(8);do{const b=await _();if(b.length__left_angle_mark_0)return;switch(b.type){case\"IDAT\":return{ext:\"png\",mime:\"image/png\"};case\"acTL\":return{ext:\"apng\",mime:\"image/apng\"};default:await e.ignore(b.length+4)}}while(e.position+8__left_angle_mark_e.fileInfo.size);return{ext:\"png\",mime:\"image/png\"}}if(r([65,82,82,79,87,49,0,0]))return{ext:\"arrow\",mime:\"application/x-apache-arrow\"};if(r([103,108,84,70,2,0,0,0]))return{ext:\"glb\",mime:\"model/gltf-binary\"};if(r([102,114,101,101],{offset:4})||r([109,100,97,116],{offset:4})||r([109,111,111,118],{offset:4})||r([119,105,100,101],{offset:4}))return{ext:\"mov\",mime:\"video/quicktime\"};if(r([73,73,82,79,8,0,0,0,24]))return{ext:\"orf\",mime:\"image/x-olympus-orf\"};if(n(\"gimp xcf \"))return{ext:\"xcf\",mime:\"image/x-xcf\"};if(r([73,73,85,0,24,0,0,0,136,231,116,216]))return{ext:\"rw2\",mime:\"image/x-panasonic-rw2\"};if(r([48,38,178,117,142,102,207,17,166,217])){async function y(){const t=Buffer.alloc(16);return await e.readBuffer(t),{id:t,size:Number(await e.readToken(Token.UINT64_LE))}}for(await e.ignore(30);e.position+24__left_angle_mark_e.fileInfo.size;){const v=await y();let A=v.size-24;if(_check(v.id,[145,7,220,183,183,169,207,17,142,230,0,192,12,32,83,101])){const w=Buffer.alloc(16);if(A-=await e.readBuffer(w),_check(w,[64,158,105,248,77,91,207,17,168,253,0,128,95,92,68,43]))return{ext:\"asf\",mime:\"audio/x-ms-asf\"};if(_check(w,[192,239,25,188,77,91,207,17,168,253,0,128,95,92,68,43]))return{ext:\"asf\",mime:\"video/x-ms-asf\"};break}await e.ignore(A)}return{ext:\"asf\",mime:\"application/vnd.ms-asf\"}}if(r([171,75,84,88,32,49,49,187,13,10,26,10]))return{ext:\"ktx\",mime:\"image/ktx\"};if((r([126,16,4])||r([126,24,4]))&&r([48,77,73,69],{offset:4}))return{ext:\"mie\",mime:\"application/x-mie\"};if(r([39,10,0,0,0,0,0,0,0,0,0,0],{offset:2}))return{ext:\"shp\",mime:\"application/x-esri-shape\"};if(r([0,0,0,12,106,80,32,32,13,10,135,10]))switch(await e.ignore(20),await e.readToken(new Token.StringType(4,\"ascii\"))){case\"jp2 \":return{ext:\"jp2\",mime:\"image/jp2\"};case\"jpx \":return{ext:\"jpx\",mime:\"image/jpx\"};case\"jpm \":return{ext:\"jpm\",mime:\"image/jpm\"};case\"mjp2\":return{ext:\"mj2\",mime:\"image/mj2\"};default:return}if(r([255,10])||r([0,0,0,12,74,88,76,32,13,10,135,10]))return{ext:\"jxl\",mime:\"image/jxl\"};if(r([0,0,1,186])||r([0,0,1,179]))return{ext:\"mpg\",mime:\"video/mpeg\"};if(r([0,1,0,0,0]))return{ext:\"ttf\",mime:\"font/ttf\"};if(r([0,0,1,0]))return{ext:\"ico\",mime:\"image/x-icon\"};if(r([0,0,2,0]))return{ext:\"cur\",mime:\"image/x-icon\"};if(r([208,207,17,224,161,177,26,225]))return{ext:\"cfb\",mime:\"application/x-cfb\"};if(await e.peekBuffer(t,{length:Math.min(256,e.fileInfo.size),mayBeLess:!0}),n(\"BEGIN:\")){if(n(\"VCARD\",{offset:6}))return{ext:\"vcf\",mime:\"text/vcard\"};if(n(\"VCALENDAR\",{offset:6}))return{ext:\"ics\",mime:\"text/calendar\"}}if(n(\"FUJIFILMCCD-RAW\"))return{ext:\"raf\",mime:\"image/x-fujifilm-raf\"};if(n(\"Extended Module:\"))return{ext:\"xm\",mime:\"audio/x-xm\"};if(n(\"Creative Voice File\"))return{ext:\"voc\",mime:\"audio/x-voc\"};if(r([4,0,0,0])&&t.length>=16){const S=t.readUInt32LE(12);if(S>12&&t.length>=S+16)try{const E=t.slice(16,S+16).toString();if(JSON.parse(E).files)return{ext:\"asar\",mime:\"application/x-asar\"}}catch(o){}}if(r([6,14,43,52,2,5,1,1,13,1,2,1,1,2]))return{ext:\"mxf\",mime:\"application/mxf\"};if(n(\"SCRM\",{offset:44}))return{ext:\"s3m\",mime:\"audio/x-s3m\"};if(r([71],{offset:4})&&(r([71],{offset:192})||r([71],{offset:196})))return{ext:\"mts\",mime:\"video/mp2t\"};if(r([66,79,79,75,77,79,66,73],{offset:60}))return{ext:\"mobi\",mime:\"application/x-mobipocket-ebook\"};if(r([68,73,67,77],{offset:128}))return{ext:\"dcm\",mime:\"application/dicom\"};if(r([76,0,0,0,1,20,2,0,0,0,0,0,192,0,0,0,0,0,0,70]))return{ext:\"lnk\",mime:\"application/x.ms.shortcut\"};if(r([98,111,111,107,0,0,0,0,109,97,114,107,0,0,0,0]))return{ext:\"alias\",mime:\"application/x.apple.alias\"};if(r([76,80],{offset:34})&&(r([0,0,1],{offset:8})||r([1,0,2],{offset:8})||r([2,0,2],{offset:8})))return{ext:\"eot\",mime:\"application/vnd.ms-fontobject\"};if(r([6,6,237,245,216,29,70,229,189,49,239,231,254,116,183,29]))return{ext:\"indd\",mime:\"application/x-indesign\"};if(await e.peekBuffer(t,{length:Math.min(512,e.fileInfo.size),mayBeLess:!0}),tarHeaderChecksumMatches(t))return{ext:\"tar\",mime:\"application/x-tar\"};if(r([255,254,255,14,83,0,107,0,101,0,116,0,99,0,104,0,85,0,112,0,32,0,77,0,111,0,100,0,101,0,108,0]))return{ext:\"skp\",mime:\"application/vnd.sketchup.skp\"};if(n(\"-----BEGIN PGP MESSAGE-----\"))return{ext:\"pgp\",mime:\"application/pgp-encrypted\"};if(t.length>=2&&r([255,224],{offset:0,mask:[255,224]})){if(r([16],{offset:1,mask:[22]}))return r([8],{offset:1,mask:[8]}),{ext:\"aac\",mime:\"audio/aac\"};if(r([2],{offset:1,mask:[6]}))return{ext:\"mp3\",mime:\"audio/mpeg\"};if(r([4],{offset:1,mask:[6]}))return{ext:\"mp2\",mime:\"audio/mpeg\"};if(r([6],{offset:1,mask:[6]}))return{ext:\"mp1\",mime:\"audio/mpeg\"}}}const stream=readableStream=>new Promise(((resolve,reject)=>{const stream=eval(\"require\")(\"stream\");readableStream.on(\"error\",reject),readableStream.once(\"readable\",(async()=>{const e=new stream.PassThrough;let t;t=stream.pipeline?stream.pipeline(readableStream,e,(()=>{})):readableStream.pipe(e);const r=readableStream.read(minimumBytes)||readableStream.read()||Buffer.alloc(0);try{const t=await fromBuffer(r);e.fileType=t}catch(n){reject(n)}resolve(t)}))})),fileType={fromStream:fromStream,fromTokenizer:fromTokenizer,fromBuffer:fromBuffer,stream:stream};Object.defineProperty(fileType,\"extensions\",{get:()=>new Set(supported.extensions)}),Object.defineProperty(fileType,\"mimeTypes\",{get:()=>new Set(supported.mimeTypes)}),module.exports=fileType},5025:(e,t,r)=>{const n=r(3569),i=r(8789),o={fromFile:async function(e){const t=await n.fromFile(e);try{return await i.fromTokenizer(t)}finally{await t.close()}}};Object.assign(o,i),Object.defineProperty(o,\"extensions\",{get:()=>i.extensions}),Object.defineProperty(o,\"mimeTypes\",{get:()=>i.mimeTypes}),e.exports=o},4078:e=>{e.exports={extensions:[\"jpg\",\"png\",\"apng\",\"gif\",\"webp\",\"flif\",\"xcf\",\"cr2\",\"cr3\",\"orf\",\"arw\",\"dng\",\"nef\",\"rw2\",\"raf\",\"tif\",\"bmp\",\"icns\",\"jxr\",\"psd\",\"indd\",\"zip\",\"tar\",\"rar\",\"gz\",\"bz2\",\"7z\",\"dmg\",\"mp4\",\"mid\",\"mkv\",\"webm\",\"mov\",\"avi\",\"mpg\",\"mp2\",\"mp3\",\"m4a\",\"oga\",\"ogg\",\"ogv\",\"opus\",\"flac\",\"wav\",\"spx\",\"amr\",\"pdf\",\"epub\",\"exe\",\"swf\",\"rtf\",\"wasm\",\"woff\",\"woff2\",\"eot\",\"ttf\",\"otf\",\"ico\",\"flv\",\"ps\",\"xz\",\"sqlite\",\"nes\",\"crx\",\"xpi\",\"cab\",\"deb\",\"ar\",\"rpm\",\"Z\",\"lz\",\"cfb\",\"mxf\",\"mts\",\"blend\",\"bpg\",\"docx\",\"pptx\",\"xlsx\",\"3gp\",\"3g2\",\"jp2\",\"jpm\",\"jpx\",\"mj2\",\"aif\",\"qcp\",\"odt\",\"ods\",\"odp\",\"xml\",\"mobi\",\"heic\",\"cur\",\"ktx\",\"ape\",\"wv\",\"dcm\",\"ics\",\"glb\",\"pcap\",\"dsf\",\"lnk\",\"alias\",\"voc\",\"ac3\",\"m4v\",\"m4p\",\"m4b\",\"f4v\",\"f4p\",\"f4b\",\"f4a\",\"mie\",\"asf\",\"ogm\",\"ogx\",\"mpc\",\"arrow\",\"shp\",\"aac\",\"mp1\",\"it\",\"s3m\",\"xm\",\"ai\",\"skp\",\"avif\",\"eps\",\"lzh\",\"pgp\",\"asar\",\"stl\",\"chm\",\"3mf\",\"zst\",\"jxl\",\"vcf\"],mimeTypes:[\"image/jpeg\",\"image/png\",\"image/gif\",\"image/webp\",\"image/flif\",\"image/x-xcf\",\"image/x-canon-cr2\",\"image/x-canon-cr3\",\"image/tiff\",\"image/bmp\",\"image/vnd.ms-photo\",\"image/vnd.adobe.photoshop\",\"application/x-indesign\",\"application/epub+zip\",\"application/x-xpinstall\",\"application/vnd.oasis.opendocument.text\",\"application/vnd.oasis.opendocument.spreadsheet\",\"application/vnd.oasis.opendocument.presentation\",\"application/vnd.openxmlformats-officedocument.wordprocessingml.document\",\"application/vnd.openxmlformats-officedocument.presentationml.presentation\",\"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\",\"application/zip\",\"application/x-tar\",\"application/x-rar-compressed\",\"application/gzip\",\"application/x-bzip2\",\"application/x-7z-compressed\",\"application/x-apple-diskimage\",\"application/x-apache-arrow\",\"video/mp4\",\"audio/midi\",\"video/x-matroska\",\"video/webm\",\"video/quicktime\",\"video/vnd.avi\",\"audio/vnd.wave\",\"audio/qcelp\",\"audio/x-ms-asf\",\"video/x-ms-asf\",\"application/vnd.ms-asf\",\"video/mpeg\",\"video/3gpp\",\"audio/mpeg\",\"audio/mp4\",\"audio/opus\",\"video/ogg\",\"audio/ogg\",\"application/ogg\",\"audio/x-flac\",\"audio/ape\",\"audio/wavpack\",\"audio/amr\",\"application/pdf\",\"application/x-msdownload\",\"application/x-shockwave-flash\",\"application/rtf\",\"application/wasm\",\"font/woff\",\"font/woff2\",\"application/vnd.ms-fontobject\",\"font/ttf\",\"font/otf\",\"image/x-icon\",\"video/x-flv\",\"application/postscript\",\"application/eps\",\"application/x-xz\",\"application/x-sqlite3\",\"application/x-nintendo-nes-rom\",\"application/x-google-chrome-extension\",\"application/vnd.ms-cab-compressed\",\"application/x-deb\",\"application/x-unix-archive\",\"application/x-rpm\",\"application/x-compress\",\"application/x-lzip\",\"application/x-cfb\",\"application/x-mie\",\"application/mxf\",\"video/mp2t\",\"application/x-blender\",\"image/bpg\",\"image/jp2\",\"image/jpx\",\"image/jpm\",\"image/mj2\",\"audio/aiff\",\"application/xml\",\"application/x-mobipocket-ebook\",\"image/heif\",\"image/heif-sequence\",\"image/heic\",\"image/heic-sequence\",\"image/icns\",\"image/ktx\",\"application/dicom\",\"audio/x-musepack\",\"text/calendar\",\"text/vcard\",\"model/gltf-binary\",\"application/vnd.tcpdump.pcap\",\"audio/x-dsf\",\"application/x.ms.shortcut\",\"application/x.apple.alias\",\"audio/x-voc\",\"audio/vnd.dolby.dd-raw\",\"audio/x-m4a\",\"image/apng\",\"image/x-olympus-orf\",\"image/x-sony-arw\",\"image/x-adobe-dng\",\"image/x-nikon-nef\",\"image/x-panasonic-rw2\",\"image/x-fujifilm-raf\",\"video/x-m4v\",\"video/3gpp2\",\"application/x-esri-shape\",\"audio/aac\",\"audio/x-it\",\"audio/x-s3m\",\"audio/x-xm\",\"video/MP1S\",\"video/MP2P\",\"application/vnd.sketchup.skp\",\"image/avif\",\"application/x-lzh-compressed\",\"application/pgp-encrypted\",\"application/x-asar\",\"model/stl\",\"application/vnd.ms-htmlhelp\",\"model/3mf\",\"image/jxl\",\"application/zstd\"]}},7044:(e,t)=>{t.stringToBytes=e=>[...e].map((e=>e.charCodeAt(0))),t.tarHeaderChecksumMatches=(e,t=0)=>{const r=parseInt(e.toString(\"utf8\",148,154).replace(/\\0.*$/,\"\").trim(),8);if(isNaN(r))return!1;let n=256;for(let i=t;i__left_angle_mark_t+148;i++)n+=e[i];for(let i=t+156;i__left_angle_mark_t+512;i++)n+=e[i];return r===n},t.uint32SyncSafeToken={get:(e,t)=>127&e[t+3]|e[t+2]__left_angle_mark___left_angle_mark_7|e[t+1]__left_angle_mark___left_angle_mark_14|e[t]__left_angle_mark___left_angle_mark_21,len:4}},3243:(e,t,r)=>{var n=r(9680),i=Object.prototype.toString,o=Object.prototype.hasOwnProperty;e.exports=function(e,t,r){if(!n(t))throw new TypeError(\"iterator must be a function\");var a;arguments.length>=3&&(a=r),\"[object Array]\"===i.call(e)?function(e,t,r){for(var n=0,i=e.length;n__left_angle_mark_i;n++)o.call(e,n)&&(null==r?t(e[n],n,e):t.call(r,e[n],n,e))}(e,t,a):\"string\"==typeof e?function(e,t,r){for(var n=0,i=e.length;n__left_angle_mark_i;n++)null==r?t(e.charAt(n),n,e):t.call(r,e.charAt(n),n,e)}(e,t,a):function(e,t,r){for(var n in e)o.call(e,n)&&(null==r?t(e[n],n,e):t.call(r,e[n],n,e))}(e,t,a)}},2855:(e,t)=>{function r(e,t,r,n){for(var i=e[t++],o=1__left_angle_mark___left_angle_mark_i,a=o+1,s=a+1,l=i+1,u=(1__left_angle_mark___left_angle_mark_l)-1,c=0,d=0,h=0,f=e[t++],p=new Int32Array(4096),m=null;;){for(;c__left_angle_mark_16&&0!==f;)d|=e[t++]__left_angle_mark___left_angle_mark_c,c+=8,1===f?f=e[t++]:--f;if(c__left_angle_mark_l)break;var g=d&u;if(d>>=l,c-=l,g!==o){if(g===a)break;for(var _=g__left_angle_mark_s?g:m,b=0,y=_;y>o;)y=p[y]>>8,++b;var v=y;if(h+b+(_!==g?1:0)>n)return void import_console_browserify.default.log(\"Warning, gif stream longer than expected.\");r[h++]=v;var A=h+=b;for(_!==g&&(r[h++]=v),y=_;b--;)y=p[y],r[--A]=255&y,y>>=8;null!==m&&s__left_angle_mark_4096&&(p[s++]=m__left_angle_mark___left_angle_mark_8|v,s>=u+1&&l__left_angle_mark_12&&(++l,u=u__left_angle_mark___left_angle_mark_1|1)),m=g}else s=a+1,u=(1__left_angle_mark___left_angle_mark_(l=i+1))-1,m=null}return h!==n&&import_console_browserify.default.log(\"Warning, gif stream shorter than expected.\"),r}try{t.GifWriter=function(e,t,r,n){var i=0,o=void 0===(n=void 0===n?{}:n).loop?null:n.loop,a=void 0===n.palette?null:n.palette;if(t__left_angle_mark_=0||r__left_angle_mark_=0||t>65535||r>65535)throw new Error(\"Width/Height invalid.\");function s(e){var t=e.length;if(t__left_angle_mark_2||t>256||t&t-1)throw new Error(\"Invalid code/color length, must be power of 2 and 2 .. 256.\");return t}e[i++]=71,e[i++]=73,e[i++]=70,e[i++]=56,e[i++]=57,e[i++]=97;var l=0,u=0;if(null!==a){for(var c=s(a);c>>=1;)++l;if(c=1__left_angle_mark___left_angle_mark_l,--l,void 0!==n.background){if((u=n.background)>=c)throw new Error(\"Background index out of range.\");if(0===u)throw new Error(\"Background index explicitly passed as 0.\")}}if(e[i++]=255&t,e[i++]=t>>8&255,e[i++]=255&r,e[i++]=r>>8&255,e[i++]=(null!==a?128:0)|l,e[i++]=u,e[i++]=0,null!==a)for(var d=0,h=a.length;d__left_angle_mark_h;++d){var f=a[d];e[i++]=f>>16&255,e[i++]=f>>8&255,e[i++]=255&f}if(null!==o){if(o__left_angle_mark_0||o>65535)throw new Error(\"Loop count invalid.\");e[i++]=33,e[i++]=255,e[i++]=11,e[i++]=78,e[i++]=69,e[i++]=84,e[i++]=83,e[i++]=67,e[i++]=65,e[i++]=80,e[i++]=69,e[i++]=50,e[i++]=46,e[i++]=48,e[i++]=3,e[i++]=1,e[i++]=255&o,e[i++]=o>>8&255,e[i++]=0}var p=!1;this.addFrame=function(t,r,n,o,l,u){if(!0===p&&(--i,p=!1),u=void 0===u?{}:u,t__left_angle_mark_0||r__left_angle_mark_0||t>65535||r>65535)throw new Error(\"x/y invalid.\");if(n__left_angle_mark_=0||o__left_angle_mark_=0||n>65535||o>65535)throw new Error(\"Width/Height invalid.\");if(l.length__left_angle_mark_n*o)throw new Error(\"Not enough pixels for the frame size.\");var c=!0,d=u.palette;if(null==d&&(c=!1,d=a),null==d)throw new Error(\"Must supply either a local or global palette.\");for(var h=s(d),f=0;h>>=1;)++f;h=1__left_angle_mark___left_angle_mark_f;var m=void 0===u.delay?0:u.delay,g=void 0===u.disposal?0:u.disposal;if(g__left_angle_mark_0||g>3)throw new Error(\"Disposal out of range.\");var _=!1,b=0;if(void 0!==u.transparent&&null!==u.transparent&&(_=!0,(b=u.transparent)__left_angle_mark_0||b>=h))throw new Error(\"Transparent color index.\");if((0!==g||_||0!==m)&&(e[i++]=33,e[i++]=249,e[i++]=4,e[i++]=g__left_angle_mark___left_angle_mark_2|(!0===_?1:0),e[i++]=255&m,e[i++]=m>>8&255,e[i++]=b,e[i++]=0),e[i++]=44,e[i++]=255&t,e[i++]=t>>8&255,e[i++]=255&r,e[i++]=r>>8&255,e[i++]=255&n,e[i++]=n>>8&255,e[i++]=255&o,e[i++]=o>>8&255,e[i++]=!0===c?128|f-1:0,!0===c)for(var y=0,v=d.length;y__left_angle_mark_v;++y){var A=d[y];e[i++]=A>>16&255,e[i++]=A>>8&255,e[i++]=255&A}return i=function(e,t,r,n){e[t++]=r;var i=t++,o=1__left_angle_mark___left_angle_mark_r,a=o-1,s=o+1,l=s+1,u=r+1,c=0,d=0;function h(r){for(;c>=r;)e[t++]=255&d,d>>=8,c-=8,t===i+256&&(e[i]=255,i=t++)}function f(e){d|=e__left_angle_mark___left_angle_mark_c,c+=u,h(8)}var p=n[0]&a,m={};f(o);for(var g=1,_=n.length;g__left_angle_mark__;++g){var b=n[g]&a,y=p__left_angle_mark___left_angle_mark_8|b,v=m[y];if(void 0===v){for(d|=p__left_angle_mark___left_angle_mark_c,c+=u;c>=8;)e[t++]=255&d,d>>=8,c-=8,t===i+256&&(e[i]=255,i=t++);4096===l?(f(o),l=s+1,u=r+1,m={}):(l>=1__left_angle_mark___left_angle_mark_u&&++u,m[y]=l++),p=b}else p=v}return f(p),f(s),h(1),i+1===t?e[i]=0:(e[i]=t-i-1,e[t++]=0),t}(e,i,f__left_angle_mark_2?2:f,l)},this.end=function(){return!1===p&&(e[i++]=59,p=!0),i},this.getOutputBuffer=function(){return e},this.setOutputBuffer=function(t){e=t},this.getOutputBufferPosition=function(){return i},this.setOutputBufferPosition=function(e){i=e}},t.GifReader=function(e){var t=0;if(71!==e[t++]||73!==e[t++]||70!==e[t++]||56!==e[t++]||56!=(e[t++]+1&253)||97!==e[t++])throw new Error(\"Invalid GIF 87a/89a header.\");var n=e[t++]|e[t++]__left_angle_mark___left_angle_mark_8,i=e[t++]|e[t++]__left_angle_mark___left_angle_mark_8,o=e[t++],a=o>>7,s=1__left_angle_mark___left_angle_mark_1+(7&o);e[t++],e[t++];var l=null,u=null;a&&(l=t,u=s,t+=3*s);var c=!0,d=[],h=0,f=null,p=0,m=null;for(this.width=n,this.height=i;c&&t__left_angle_mark_e.length;)switch(e[t++]){case 33:switch(e[t++]){case 255:if(11!==e[t]||78==e[t+1]&&69==e[t+2]&&84==e[t+3]&&83==e[t+4]&&67==e[t+5]&&65==e[t+6]&&80==e[t+7]&&69==e[t+8]&&50==e[t+9]&&46==e[t+10]&&48==e[t+11]&&3==e[t+12]&&1==e[t+13]&&0==e[t+16])t+=14,m=e[t++]|e[t++]__left_angle_mark___left_angle_mark_8,t++;else for(t+=12;;){if(!((R=e[t++])>=0))throw Error(\"Invalid block size\");if(0===R)break;t+=R}break;case 249:if(4!==e[t++]||0!==e[t+4])throw new Error(\"Invalid graphics extension block.\");var g=e[t++];h=e[t++]|e[t++]__left_angle_mark___left_angle_mark_8,f=e[t++],!(1&g)&&(f=null),p=g>>2&7,t++;break;case 254:for(;;){if(!((R=e[t++])>=0))throw Error(\"Invalid block size\");if(0===R)break;t+=R}break;default:throw new Error(\"Unknown graphic control label: 0x\"+e[t-1].toString(16))}break;case 44:var _=e[t++]|e[t++]__left_angle_mark___left_angle_mark_8,b=e[t++]|e[t++]__left_angle_mark___left_angle_mark_8,y=e[t++]|e[t++]__left_angle_mark___left_angle_mark_8,v=e[t++]|e[t++]__left_angle_mark___left_angle_mark_8,A=e[t++],w=A>>6&1,S=1__left_angle_mark___left_angle_mark_1+(7&A),E=l,x=u,C=!1;A>>7&&(C=!0,E=t,x=S,t+=3*S);var T=t;for(t++;;){var R;if(!((R=e[t++])>=0))throw Error(\"Invalid block size\");if(0===R)break;t+=R}d.push({x:_,y:b,width:y,height:v,has_local_palette:C,palette_offset:E,palette_size:x,data_offset:T,data_length:t-T,transparent_index:f,interlaced:!!w,delay:h,disposal:p});break;case 59:c=!1;break;default:throw new Error(\"Unknown gif block: 0x\"+e[t-1].toString(16))}this.numFrames=function(){return d.length},this.loopCount=function(){return m},this.frameInfo=function(e){if(e__left_angle_mark_0||e>=d.length)throw new Error(\"Frame index out of range.\");return d[e]},this.decodeAndBlitFrameBGRA=function(t,i){var o=this.frameInfo(t),a=o.width*o.height,s=new Uint8Array(a);r(e,o.data_offset,s,a);var l=o.palette_offset,u=o.transparent_index;null===u&&(u=256);var c=o.width,d=n-c,h=c,f=4*(o.y*n+o.x),p=4*((o.y+o.height)*n+o.x),m=f,g=4*d;!0===o.interlaced&&(g+=4*n*7);for(var _=8,b=0,y=s.length;b__left_angle_mark_y;++b){var v=s[b];if(0===h&&(h=c,(m+=g)>=p&&(g=4*d+4*n*(_-1),m=f+(c+d)*(___left_angle_mark___left_angle_mark_1),_>>=1)),v===u)m+=4;else{var A=e[l+3*v],w=e[l+3*v+1],S=e[l+3*v+2];i[m++]=S,i[m++]=w,i[m++]=A,i[m++]=255}--h}},this.decodeAndBlitFrameRGBA=function(t,i){var o=this.frameInfo(t),a=o.width*o.height,s=new Uint8Array(a);r(e,o.data_offset,s,a);var l=o.palette_offset,u=o.transparent_index;null===u&&(u=256);var c=o.width,d=n-c,h=c,f=4*(o.y*n+o.x),p=4*((o.y+o.height)*n+o.x),m=f,g=4*d;!0===o.interlaced&&(g+=4*n*7);for(var _=8,b=0,y=s.length;b__left_angle_mark_y;++b){var v=s[b];if(0===h&&(h=c,(m+=g)>=p&&(g=4*d+4*n*(_-1),m=f+(c+d)*(___left_angle_mark___left_angle_mark_1),_>>=1)),v===u)m+=4;else{var A=e[l+3*v],w=e[l+3*v+1],S=e[l+3*v+2];i[m++]=A,i[m++]=w,i[m++]=S,i[m++]=255}--h}}}}catch(n){}},7604:(e,t,r)=>{var n=r(8834).lW;class i{blit(e,t,r,n,i,o,a){if(n+o>this.bitmap.width)throw new Error(\"copy exceeds width of source bitmap\");if(t+o>e.bitmap.width)throw new Error(\"copy exceeds width of target bitmap\");if(i+a>this.bitmap.height)throw new Error(\"copy exceeds height of source bitmap\");if(r+a>e.bitmap.height)throw new Erro(\"copy exceeds height of target bitmap\");const s=this.bitmap.data,l=e.bitmap.data,u=4*this.bitmap.width,c=4*e.bitmap.width,d=4*o;let h=i*u+4*n,f=r*c+4*t;for(;--a>=0;)s.copy(l,f,h,h+d),h+=u,f+=c;return this}fillRGBA(e){const t=this.bitmap.data,r=4*this.bitmap.height;let n=0;for(;n__left_angle_mark_r;)t.writeUInt32BE(e,n),n+=4;for(;n__left_angle_mark_t.length;)t.copy(t,n,0,r),n+=r;return this}getRGBA(e,t){const r=4*(t*this.bitmap.width+e);return this.bitmap.data.readUInt32BE(r)}getRGBASet(){const e=new Set,t=this.bitmap.data;for(let r=0;r__left_angle_mark_t.length;r+=4)e.add(t.readUInt32BE(r,!0));return e}greyscale(){const e=this.bitmap.data;return this.scan(0,0,this.bitmap.width,this.bitmap.height,((t,r,n)=>{const i=Math.round(.299*e[n]+.587*e[n+1]+.114*e[n+2]);e[n]=i,e[n+1]=i,e[n+2]=i})),this}reframe(e,t,r,n,o){const a=e__left_angle_mark_0?0:e,s=t__left_angle_mark_0?0:t,l=r+a>this.bitmap.width?this.bitmap.width-a:r,u=n+s>this.bitmap.height?this.bitmap.height-s:n,c=e__left_angle_mark_0?-e:0,d=t__left_angle_mark_0?-t:0;let h;if(void 0===o){if(a!==e||s!=t||l!==r||u!==n)throw new GifError(\"fillRGBA required for this reframing\");h=new i(r,n)}else h=new i(r,n,o);return this.blit(h,c,d,a,s,l,u),this.bitmap=h.bitmap,this}scale(e){if(1===e)return;if(!Number.isInteger(e)||e__left_angle_mark_1)throw new Error(\"the scale must be an integer >= 1\");const t=this.bitmap.width,r=this.bitmap.height,i=t*e*4,o=this.bitmap.data,a=new n(r*i*e);let s,l=0,u=0;for(let n=0;n__left_angle_mark_r;++n){s=u;for(let r=0;r__left_angle_mark_t;++r){const t=o.readUInt32BE(l,!0);for(let r=0;r__left_angle_mark_e;++r)a.writeUInt32BE(t,u),u+=4;l+=4}for(let t=1;t__left_angle_mark_e;++t)a.copy(a,u,s,u),u+=i,s+=i}return this.bitmap={width:t*e,height:r*e,data:a},this}scanAllCoords(e){const t=this.bitmap.width,r=this.bitmap.data.length;let n=0,i=0;for(let o=0;o__left_angle_mark_r;o+=4)e(n,i,o),++n===t&&(n=0,++i)}scanAllIndexes(e){const t=this.bitmap.data.length;for(let r=0;r__left_angle_mark_t;r+=4)e(r)}constructor(...e){if(0===e.length)throw new Error(\"constructor requires parameters\");const t=e[0];if(null!==t&&\"object\"==typeof t)if(t instanceof i){const e=t.bitmap;this.bitmap={width:e.width,height:e.height,data:new n(e.width*e.height*4)},e.data.copy(this.bitmap.data)}else{if(!(t.width&&t.height&&t.data))throw new Error(\"unrecognized constructor parameters\");this.bitmap=t}else{if(\"number\"!=typeof t||\"number\"!=typeof e[1])throw new Error(\"unrecognized constructor parameters\");{const r=t,i=e[1],o=e[2];this.bitmap={width:r,height:i},n.isBuffer(o)?this.bitmap.data=o:(this.bitmap.data=new n(r*i*4),\"number\"==typeof o&&this.fillRGBA(o))}}}}e.exports=i},4364:(e,t)=>{class r{constructor(e,t,r){this.width=r.width,this.height=r.height,this.loops=r.loops,this.usesTransparency=r.usesTransparency,this.colorScope=r.colorScope,this.frames=t,this.buffer=e}}r.GlobalColorsPreferred=0,r.GlobalColorsOnly=1,r.LocalColorsOnly=2;class n extends Error{constructor(e){super(e),e instanceof Error&&(this.stack=\"Gif\"+e.stack)}}t.Gif=r,t.GifError=n},6512:(e,t,r)=>{var n=r(8834).lW;const i=r(2855),{Gif:o,GifError:a}=r(4364);function s(){const e=r(4602);return s=function(){return e},e}const{GifFrame:l}=r(5585);function u(e,t){const r=e.indexOf(t);return-1===r?null:r}function c(e,t){for(var r,n=0,i=e.length-1;n__left_angle_mark_=i;)if(e[r=Math.floor((n+i)/2)]>t)i=r-1;else{if(!(e[r]__left_angle_mark_t))return r;n=r+1}return null}function d(e){const t=e.colors;e.usesTransparency&&t.push(0);const r=t.length;let n=2;for(;r>n;)n__left_angle_mark___left_angle_mark_=1;t.length=n,t.fill(0,r)}function h(e,t){let r=e.bitmap.width*e.bitmap.height;return r=Math.ceil(r*t/8),r+=Math.ceil(r/255),100+r+768}function f(e){let t=e.indexCount,r=0;for(--t;t;)++r,t>>=1;return r>0?r:1}function p(e,t,r,i,o){if(r.interlaced)throw new a(\"writing interlaced GIFs is not supported\");const s=function(e,t,r){const i=r.colors,o=i.length__left_angle_mark_=8?u:c,s=t.bitmap.data,l=new n(s.length/4);let d=i.length,h=0,f=0;for(;h__left_angle_mark_s.length;){if(0!==s[h+3]){const e=s.readUInt32BE(h,!0)>>8&16777215;l[f]=o(i,e)}else l[f]=d;h+=4,++f}if(r.usesTransparency){if(256===d)throw new a(`Frame ${e} already has 256 colorsand so can't use transparency`)}else d=null;return{buffer:l,transparentIndex:d}}(t,r,i),l={delay:r.delayCentisecs,disposal:r.disposalMethod,transparent:s.transparentIndex};o&&(d(i),l.palette=i.colors);try{let t,i=e.getOutputBuffer(),o=e.getOutputBufferPosition(),a=!0;for(;a;)if(t=e.addFrame(r.xOffset,r.yOffset,r.bitmap.width,r.bitmap.height,s.buffer,l),a=!1,t>=i.length-1){const t=new n(1.5*i.length);i.copy(t),e.setOutputBuffer(t),e.setOutputBufferPosition(o),i=t,a=!0}return i}catch(h){throw new a(h)}}t.GifCodec=class{decodeGif(e){try{let r;try{r=new i.GifReader(e)}catch(t){throw new a(t)}const n=r.numFrames(),s=[],l={width:r.width,height:r.height,loops:r.loopCount(),usesTransparency:!1};for(let e=0;e__left_angle_mark_n;++e){const t=this._decodeFrame(r,e,l.usesTransparency);s.push(t.frame),t.usesTransparency&&(l.usesTransparency=!0)}return Promise.resolve(new o(e,s,l))}catch(t){return Promise.reject(t)}}encodeGif(e,t={}){try{if(null===e||0===e.length)throw new a(\"there are no frames\");const r=s().getMaxDimensions(e);return(t=Object.assign({},t)).width=r.maxWidth,t.height=r.maxHeight,void 0===t.loops&&(t.loops=0),t.colorScope=t.colorScope||o.GlobalColorsPreferred,Promise.resolve(this._encodeGif(e,t))}catch(r){return Promise.reject(r)}}_decodeFrame(e,t,r){let i,o;try{if(i=e.frameInfo(t),o=new n(e.width*e.height*4),e.decodeAndBlitFrameRGBA(t,o),i.width!==e.width||i.height!==e.height){if(i.y&&(o=o.slice(i.y*e.width*4)),e.width>i.width)for(let t=0;t__left_angle_mark_i.height;++t)o.copy(o,t*i.width*4,4*(i.x+t*e.width),4*(i.x+t*e.width)+4*i.width);o=o.slice(0,i.width*i.height*4)}}catch(u){throw new a(u)}let s=!1;if(null===this._transparentRGBA){if(!r)for(let n=3;n__left_angle_mark_o.length;n+=4)0===o[n]&&(s=!0,n=o.length)}else for(let n=3;n__left_angle_mark_o.length;n+=4)0===o[n]&&(o.writeUInt32BE(this._transparentRGBA,n-3),s=!0);return{frame:new l(i.width,i.height,o,{xOffset:i.x,yOffset:i.y,disposalMethod:i.disposal,interlaced:i.interlaced,delayCentisecs:i.delay}),usesTransparency:s}}_encodeGif(e,t){let r;if(t.colorScope===o.LocalColorsOnly)r=s().getColorInfo(e,0);else if(r=s().getColorInfo(e,256),!r.colors){if(t.colorScope===o.GlobalColorsOnly)throw new a(\"Too many color indexes for global color table\");t.colorScope=o.LocalColorsOnly}t.usesTransparency=r.usesTransparency;const l=r.palettes;return t.colorScope===o.LocalColorsOnly?function(e,t,r,s){const l={loop:t.loops};let u,c=new n(2e3);try{u=new i.GifWriter(c,t.width,t.height,l)}catch(d){throw new a(d)}for(let n=0;n__left_angle_mark_e.length;++n)c=p(u,n,e[n],s[n],!0);return new o(c.slice(0,u.end()),e,t)}(e,t,0,l):function(e,t,r,s){const l={colors:s.colors.slice(),usesTransparency:s.usesTransparency};d(l);const u={palette:l.colors,loop:t.loops};let c,h=new n(2e3);try{c=new i.GifWriter(h,t.width,t.height,u)}catch(f){throw new a(f)}for(let n=0;n__left_angle_mark_e.length;++n)h=p(c,n,e[n],s,!1);return new o(h.slice(0,c.end()),e,t)}(e,t,0,r)}_getSizeEstimateGlobal(e,t){if(this._testInitialBufferSize>0)return this._testInitialBufferSize;let r=968;const n=f(e);return t.forEach((e=>{r+=h(e,n)})),r}_getSizeEstimateLocal(e,t){if(this._testInitialBufferSize>0)return this._testInitialBufferSize;let r=200;for(let n=0;n__left_angle_mark_t.length;++n){const i=f(e[n]);r+=h(t[n],i)}return r}constructor(e={}){this._transparentRGB=null,\"number\"==typeof e.transparentRGB&&0!==e.transparentRGB&&(this._transparentRGBA=256*e.transparentRGB),this._testInitialBufferSize=0}}},5585:(e,t,r)=>{const n=r(7604),{GifError:i}=r(4364);class o extends n{getPalette(){const e=new Set,t=this.bitmap.data;let r=0,n=!1;for(;r__left_angle_mark_t.length;){if(0===t[r+3])n=!0;else{const n=t.readUInt32BE(r,!0)>>8&16777215;e.add(n)}r+=4}const i=new Array(e.size),o=e.values();for(r=0;r__left_angle_mark_i.length;++r)i[r]=o.next().value;i.sort(((e,t)=>e-t));let a=i.length;return n&&++a,{colors:i,usesTransparency:n,indexCount:a}}constructor(...e){if(super(...e),e[0]instanceof o){const t=e[0];this.xOffset=t.xOffset,this.yOffset=t.yOffset,this.disposalMethod=t.disposalMethod,this.delayCentisecs=t.delayCentisecs,this.interlaced=t.interlaced}else{const t=e[e.length-1];let r={};\"object\"!=typeof t||t instanceof n||(r=t),this.xOffset=r.xOffset||0,this.yOffset=r.yOffset||0,this.disposalMethod=void 0!==r.disposalMethod?r.disposalMethod:o.DisposeToBackgroundColor,this.delayCentisecs=r.delayCentisecs||8,this.interlaced=r.interlaced||!1}}}o.DisposeToAnything=0,o.DisposeNothing=1,o.DisposeToBackgroundColor=2,o.DisposeToPrevious=3,t.GifFrame=o},4602:(e,t,r)=>{var n=r(8834).lW;const i=r(8522),o=r(2460),a=r(7604),{GifFrame:s}=r(5585),{GifError:l}=r(4364),{GifCodec:u}=r(6512),c=[\".jpg\",\".jpeg\",\".png\",\".bmp\"],d=new u;function h(e,t,r,n,i){const a=Array.isArray(e)?e:[e];if(i){if([\"FloydSteinberg\",\"FalseFloydSteinberg\",\"Stucki\",\"Atkinson\",\"Jarvis\",\"Burkes\",\"Sierra\",\"TwoSierra\",\"SierraLite\"].indexOf(i.ditherAlgorithm)__left_angle_mark_0)throw new Error(`Invalid ditherAlgorithm '${i.ditherAlgorithm}'`);void 0===i.serpentine&&(i.serpentine=!0),void 0===i.minimumColorDistanceToDither&&(i.minimumColorDistanceToDither=0),void 0===i.calculateErrorLikeGIMP&&(i.calculateErrorLikeGIMP=!1)}const s=new o.distance.Euclidean,l=new o.palette[t](s,r,n);let u;u=i?new o.image.ErrorDiffusionArray(s,o.image.ErrorDiffusionArrayKernel[i.ditherAlgorithm],i.serpentine,i.minimumColorDistanceToDither,i.calculateErrorLikeGIMP):new o.image.NearestColor(s);const c=[];a.forEach((e=>{const t=e.bitmap.data,r=new ArrayBuffer(t.length),n=new Uint32Array(r);for(let o=0,a=0;o__left_angle_mark_t.length;o+=4,++a)n[a]=t.readUInt32LE(o,!0);const i=o.utils.PointContainer.fromUint32Array(n,e.bitmap.width,e.bitmap.height);l.sample(i),c.push(i)}));const d=l.quantizeSync();for(let o=0;o__left_angle_mark_a.length;++o){const e=a[o].bitmap.data,t=u.quantizeSync(c[o],d).toUint32Array();for(let r=0,n=0;r__left_angle_mark_e.length;r+=4,++n)e.writeUInt32LE(t[n],r)}}t.cloneFrames=function(e){let t=[];return e.forEach((e=>{t.push(new s(e))})),t},t.getColorInfo=function(e,t){let r=!1;const n=[];for(let u=0;u__left_angle_mark_e.length;++u){let t=e[u].getPalette();if(t.usesTransparency&&(r=!0),t.indexCount>256)throw new l(`Frame ${u} uses more than 256 color indexes`);n.push(t)}if(0===t)return{usesTransparency:r,palettes:n};const i=new Set;n.forEach((e=>{e.colors.forEach((e=>{i.add(e)}))}));let o=i.size;if(r&&++o,t&&o>t)return{usesTransparency:r,palettes:n};const a=new Array(i.size),s=i.values();for(let l=0;l__left_angle_mark_a.length;++l)a[l]=s.next().value;return a.sort(((e,t)=>e-t)),{colors:a,indexCount:o,usesTransparency:r,palettes:n}},t.copyAsJimp=function(e,r){return t.shareAsJimp(e,new a(r))},t.getMaxDimensions=function(e){let t=0,r=0;return e.forEach((e=>{const n=e.xOffset+e.bitmap.width;n>t&&(t=n);const i=e.yOffset+e.bitmap.height;i>r&&(r=i)})),{maxWidth:t,maxHeight:r}},t.quantizeDekker=function(e,t,r){h(e,\"NeuQuantFloat\",t=t||256,0,r)},t.quantizeSorokin=function(e,t,r,n){let i;switch(t=t||256,r=r||\"min-pop\"){case\"min-pop\":i=2;break;case\"top-pop\":i=1;break;default:throw new Error(`Invalid quantizeSorokin histogram '${r}'`)}h(e,\"RGBQuant\",t,i,n)},t.quantizeWu=function(e,t,r,n){if(t=t||256,(r=r||5)__left_angle_mark_1||r>8)throw new Error(\"Invalid quantization quality\");h(e,\"WuQuant\",t,r,n)},t.read=function(e,t){return t=t||d,n.isBuffer(e)?t.decodeGif(e):(r=e,new Promise(((e,t)=>{i.readFile(r,((r,n)=>r?t(r):e(n)))}))).then((e=>t.decodeGif(e)));var r},t.shareAsJimp=function(e,t){const r=new e(t.bitmap.width,t.bitmap.height,0);return r.bitmap.data=t.bitmap.data,r},t.write=function(e,t,r,n){n=n||d;const o=e.match(/\\.[a-zA-Z]+$/);if(null!==o&&c.includes(o[0].toLowerCase()))throw new Error(`GIF '${e}' has an unexpected suffix`);return n.encodeGif(t,r).then((t=>{return(r=e,n=t.buffer,new Promise(((e,t)=>{i.writeFile(r,n,(r=>r?t(r):e()))}))).then((()=>t));var r,n}))}},9455:(e,t,r)=>{const n=r(7604),{Gif:i,GifError:o}=r(4364),{GifCodec:a}=r(6512),{GifFrame:s}=r(5585),l=r(4602);e.exports={BitmapImage:n,Gif:i,GifCodec:a,GifFrame:s,GifUtil:l,GifError:o}},5048:(e,t,r)=>{var n;n=\"undefined\"!=typeof window?window:void 0!==r.g?r.g:\"undefined\"!=typeof self?self:{},e.exports=n},2333:(e,t)=>{t.read=function(e,t,r,n,i){var o,a,s=8*i-n-1,l=(1__left_angle_mark___left_angle_mark_s)-1,u=l>>1,c=-7,d=r?i-1:0,h=r?-1:1,f=e[t+d];for(d+=h,o=f&(1__left_angle_mark___left_angle_mark_-c)-1,f>>=-c,c+=s;c>0;o=256*o+e[t+d],d+=h,c-=8);for(a=o&(1__left_angle_mark___left_angle_mark_-c)-1,o>>=-c,c+=n;c>0;a=256*a+e[t+d],d+=h,c-=8);if(0===o)o=1-u;else{if(o===l)return a?NaN:1/0*(f?-1:1);a+=Math.pow(2,n),o-=u}return(f?-1:1)*a*Math.pow(2,o-n)},t.write=function(e,t,r,n,i,o){var a,s,l,u=8*o-i-1,c=(1__left_angle_mark___left_angle_mark_u)-1,d=c>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=n?0:o-1,p=n?1:-1,m=t__left_angle_mark_0||0===t&&1/t__left_angle_mark_0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=c):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))__left_angle_mark_1&&(a--,l*=2),(t+=a+d>=1?h/l:h*Math.pow(2,1-d))*l>=2&&(a++,l/=2),a+d>=c?(s=0,a=c):a+d>=1?(s=(t*l-1)*Math.pow(2,i),a+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,i),a=0));i>=8;e[r+f]=255&s,f+=p,s/=256,i-=8);for(a=a__left_angle_mark___left_angle_mark_i|s,u+=i;u>0;e[r+f]=255&a,f+=p,a/=256,u-=8);e[r+f-p]|=128*m}},9680:e=>{var t=Function.prototype.toString,r=/^\\s*class\\b/,n=function(e){try{var n=t.call(e);return r.test(n)}catch(i){return!1}},i=Object.prototype.toString,o=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.toStringTag;e.exports=function(e){if(!e)return!1;if(\"function\"!=typeof e&&\"object\"!=typeof e)return!1;if(\"function\"==typeof e&&!e.prototype)return!0;if(o)return function(e){try{return!n(e)&&(t.call(e),!0)}catch(r){return!1}}(e);if(n(e))return!1;var r=i.call(e);return\"[object Function]\"===r||\"[object GeneratorFunction]\"===r}},9748:e=>{e.exports=function(e){var r=t.call(e);return\"[object Function]\"===r||\"function\"==typeof e&&\"[object RegExp]\"!==r||\"undefined\"!=typeof window&&(e===window.setTimeout||e===window.alert||e===window.confirm||e===window.prompt)};var t=Object.prototype.toString},9307:(e,t,r)=>{r(6168),e.exports=self.fetch.bind(self)},2691:(e,t,r)=>{var n=r(706),i=r(770);e.exports={encode:n,decode:i}},770:(e,t,r)=>{var n=r(8834).lW,i=function(){var e=new Int32Array([0,1,8,16,9,2,3,10,17,24,32,25,18,11,4,5,12,19,26,33,40,48,41,34,27,20,13,6,7,14,21,28,35,42,49,56,57,50,43,36,29,22,15,23,30,37,44,51,58,59,52,45,38,31,39,46,53,60,61,54,47,55,62,63]),t=4017,r=799,n=3406,i=2276,o=1567,a=3784,s=5793,l=2896;function u(){}function c(e,t){for(var r,n,i=0,o=[],a=16;a>0&&!e[a-1];)a--;o.push({children:[],index:0});var s,l=o[0];for(r=0;r__left_angle_mark_a;r++){for(n=0;n__left_angle_mark_e[r];n++){for((l=o.pop()).children[l.index]=t[i];l.index>0;){if(0===o.length)throw new Error(\"Could not recreate Huffman Table\");l=o.pop()}for(l.index++,o.push(l);o.length__left_angle_mark_=r;)o.push(s={children:[],index:0}),l.children[l.index]=s.children,l=s;i++}r+1__left_angle_mark_a&&(o.push(s={children:[],index:0}),l.children[l.index]=s.children,l=s)}return o[0].children}function d(t,r,n,i,o,a,s,l,u,c){n.precision,n.samplesPerLine,n.scanLines;var d=n.mcusPerLine,h=n.progressive,f=(n.maxH,n.maxV,r),p=0,m=0;function g(){if(m>0)return m--,p>>m&1;if(255==(p=t[r++])){var e=t[r++];if(e)throw new Error(\"unexpected marker: \"+(p__left_angle_mark___left_angle_mark_8|e).toString(16))}return m=7,p>>>7}function _(e){for(var t,r=e;null!==(t=g());){if(\"number\"==typeof(r=r[t]))return r;if(\"object\"!=typeof r)throw new Error(\"invalid huffman sequence\")}return null}function b(e){for(var t=0;e>0;){var r=g();if(null===r)return;t=t__left_angle_mark___left_angle_mark_1|r,e--}return t}function y(e){var t=b(e);return t>=1__left_angle_mark___left_angle_mark_e-1?t:t+(-1__left_angle_mark___left_angle_mark_e)+1}var v,A=0,w=0;function S(e,t,r,n,i){var o=r%d,a=(r/d|0)*e.v+n,s=o*e.h+i;void 0===e.blocks[a]&&c.tolerantDecoding||t(e,e.blocks[a][s])}var E,x,C,T,R,I,k=i.length;I=h?0===a?0===l?function(e,t){var r=_(e.huffmanTableDC),n=0===r?0:y(r)__left_angle_mark___left_angle_mark_u;t[0]=e.pred+=n}:function(e,t){t[0]|=g()__left_angle_mark___left_angle_mark_u}:0===l?function(t,r){if(A>0)A--;else for(var n=a,i=s;n__left_angle_mark_=i;){var o=_(t.huffmanTableAC),l=15&o,c=o>>4;if(0!==l)r[e[n+=c]]=y(l)*(1__left_angle_mark___left_angle_mark_u),n++;else{if(c__left_angle_mark_15){A=b(c)+(1__left_angle_mark___left_angle_mark_c)-1;break}n+=16}}}:function(t,r){for(var n=a,i=s,o=0;n__left_angle_mark_=i;){var l=e[n],c=r[l]__left_angle_mark_0?-1:1;switch(w){case 0:var d=_(t.huffmanTableAC),h=15&d;if(o=d>>4,0===h)o__left_angle_mark_15?(A=b(o)+(1__left_angle_mark___left_angle_mark_o),w=4):(o=16,w=1);else{if(1!==h)throw new Error(\"invalid ACn encoding\");v=y(h),w=o?2:3}continue;case 1:case 2:r[l]?r[l]+=(g()__left_angle_mark___left_angle_mark_u)*c:0==--o&&(w=2==w?3:0);break;case 3:r[l]?r[l]+=(g()__left_angle_mark___left_angle_mark_u)*c:(r[l]=v__left_angle_mark___left_angle_mark_u,w=0);break;case 4:r[l]&&(r[l]+=(g()__left_angle_mark___left_angle_mark_u)*c)}n++}4===w&&0==--A&&(w=0)}:function(t,r){var n=_(t.huffmanTableDC),i=0===n?0:y(n);r[0]=t.pred+=i;for(var o=1;o__left_angle_mark_64;){var a=_(t.huffmanTableAC),s=15&a,l=a>>4;if(0!==s)r[e[o+=l]]=y(s),o++;else{if(l__left_angle_mark_15)break;o+=16}}};var P,M,O,B,N,j,L,D,F,U=0;for(M=1==k?i[0].blocksPerLine*i[0].blocksPerColumn:d*n.mcusPerColumn,o||(o=M);U__left_angle_mark_M;){for(x=0;x__left_angle_mark_k;x++)i[x].pred=0;if(A=0,1==k)for(E=i[0],R=0;R__left_angle_mark_o;R++)j=I,D=void 0,F=void 0,D=(L=U)/(N=E).blocksPerLine|0,F=L%N.blocksPerLine,void 0===N.blocks[D]&&c.tolerantDecoding||j(N,N.blocks[D][F]),U++;else for(R=0;R__left_angle_mark_o;R++){for(x=0;x__left_angle_mark_k;x++)for(O=(E=i[x]).h,B=E.v,C=0;C__left_angle_mark_B;C++)for(T=0;T__left_angle_mark_O;T++)S(E,I,U,C,T);if(++U===M)break}if(U===M)do{if(255===t[r]&&0!==t[r+1])break;r+=1}while(r__left_angle_mark_t.length-2);if(m=0,(P=t[r]__left_angle_mark___left_angle_mark_8|t[r+1])__left_angle_mark_65280)throw new Error(\"marker was not found\");if(!(P>=65488&&P__left_angle_mark_=65495))break;r+=2}return r-f}function h(e,u){var c,d,h=[],f=u.blocksPerLine,p=u.blocksPerColumn,m=f__left_angle_mark___left_angle_mark_3,_=new Int32Array(64),b=new Uint8Array(64);function y(e,c,d){var h,f,p,m,g,_,b,y,v,A,w=u.quantizationTable,S=d;for(A=0;A__left_angle_mark_64;A++)S[A]=e[A]*w[A];for(A=0;A__left_angle_mark_8;++A){var E=8*A;0!=S[1+E]||0!=S[2+E]||0!=S[3+E]||0!=S[4+E]||0!=S[5+E]||0!=S[6+E]||0!=S[7+E]?(h=s*S[0+E]+128>>8,f=s*S[4+E]+128>>8,p=S[2+E],m=S[6+E],g=l*(S[1+E]-S[7+E])+128>>8,y=l*(S[1+E]+S[7+E])+128>>8,_=S[3+E]__left_angle_mark___left_angle_mark_4,b=S[5+E]__left_angle_mark___left_angle_mark_4,v=h-f+1>>1,h=h+f+1>>1,f=v,v=p*a+m*o+128>>8,p=p*o-m*a+128>>8,m=v,v=g-b+1>>1,g=g+b+1>>1,b=v,v=y+_+1>>1,_=y-_+1>>1,y=v,v=h-m+1>>1,h=h+m+1>>1,m=v,v=f-p+1>>1,f=f+p+1>>1,p=v,v=g*i+y*n+2048>>12,g=g*n-y*i+2048>>12,y=v,v=_*r+b*t+2048>>12,_=_*t-b*r+2048>>12,b=v,S[0+E]=h+y,S[7+E]=h-y,S[1+E]=f+b,S[6+E]=f-b,S[2+E]=p+_,S[5+E]=p-_,S[3+E]=m+g,S[4+E]=m-g):(v=s*S[0+E]+512>>10,S[0+E]=v,S[1+E]=v,S[2+E]=v,S[3+E]=v,S[4+E]=v,S[5+E]=v,S[6+E]=v,S[7+E]=v)}for(A=0;A__left_angle_mark_8;++A){var x=A;0!=S[8+x]||0!=S[16+x]||0!=S[24+x]||0!=S[32+x]||0!=S[40+x]||0!=S[48+x]||0!=S[56+x]?(h=s*S[0+x]+2048>>12,f=s*S[32+x]+2048>>12,p=S[16+x],m=S[48+x],g=l*(S[8+x]-S[56+x])+2048>>12,y=l*(S[8+x]+S[56+x])+2048>>12,_=S[24+x],b=S[40+x],v=h-f+1>>1,h=h+f+1>>1,f=v,v=p*a+m*o+2048>>12,p=p*o-m*a+2048>>12,m=v,v=g-b+1>>1,g=g+b+1>>1,b=v,v=y+_+1>>1,_=y-_+1>>1,y=v,v=h-m+1>>1,h=h+m+1>>1,m=v,v=f-p+1>>1,f=f+p+1>>1,p=v,v=g*i+y*n+2048>>12,g=g*n-y*i+2048>>12,y=v,v=_*r+b*t+2048>>12,_=_*t-b*r+2048>>12,b=v,S[0+x]=h+y,S[56+x]=h-y,S[8+x]=f+b,S[48+x]=f-b,S[16+x]=p+_,S[40+x]=p-_,S[24+x]=m+g,S[32+x]=m-g):(v=s*d[A+0]+8192>>14,S[0+x]=v,S[8+x]=v,S[16+x]=v,S[24+x]=v,S[32+x]=v,S[40+x]=v,S[48+x]=v,S[56+x]=v)}for(A=0;A__left_angle_mark_64;++A){var C=128+(S[A]+8>>4);c[A]=C__left_angle_mark_0?0:C>255?255:C}}g(m*p*8);for(var v=0;v__left_angle_mark_p;v++){var A=v__left_angle_mark___left_angle_mark_3;for(c=0;c__left_angle_mark_8;c++)h.push(new Uint8Array(m));for(var w=0;w__left_angle_mark_f;w++){y(u.blocks[v][w],b,_);var S=0,E=w__left_angle_mark___left_angle_mark_3;for(d=0;d__left_angle_mark_8;d++){var x=h[A+d];for(c=0;c__left_angle_mark_8;c++)x[E+c]=b[S++]}}}return h}function f(e){return e__left_angle_mark_0?0:e>255?255:e}u.prototype={load:function(e){var t=new XMLHttpRequest;t.open(\"GET\",e,!0),t.responseType=\"arraybuffer\",t.onload=function(){var e=new Uint8Array(t.response||t.mozResponseArrayBuffer);this.parse(e),this.onload&&this.onload()}.bind(this),t.send(null)},parse:function(t){var r=1e3*this.opts.maxResolutionInMP*1e3,n=0;function i(){var e=t[n]__left_angle_mark___left_angle_mark_8|t[n+1];return n+=2,e}function o(e){var t,r,n=1,i=1;for(r in e.components)e.components.hasOwnProperty(r)&&(n__left_angle_mark_(t=e.components[r]).h&&(n=t.h),i__left_angle_mark_t.v&&(i=t.v));var o=Math.ceil(e.samplesPerLine/8/n),a=Math.ceil(e.scanLines/8/i);for(r in e.components)if(e.components.hasOwnProperty(r)){t=e.components[r];var s=Math.ceil(Math.ceil(e.samplesPerLine/8)*t.h/n),l=Math.ceil(Math.ceil(e.scanLines/8)*t.v/i),u=o*t.h,c=a*t.v,d=[];g(c*u*256);for(var h=0;h__left_angle_mark_c;h++){for(var f=[],p=0;p__left_angle_mark_u;p++)f.push(new Int32Array(64));d.push(f)}t.blocksPerLine=s,t.blocksPerColumn=l,t.blocks=d}e.maxH=n,e.maxV=i,e.mcusPerLine=o,e.mcusPerColumn=a}t.length;var a,s,l,u,f=null,p=null,m=[],_=[],b=[],y=[],v=i(),A=-1;if(this.comments=[],65496!=v)throw new Error(\"SOI not found\");for(v=i();65497!=v;){switch(v){case 65280:break;case 65504:case 65505:case 65506:case 65507:case 65508:case 65509:case 65510:case 65511:case 65512:case 65513:case 65514:case 65515:case 65516:case 65517:case 65518:case 65519:case 65534:var w=(l=i(),u=t.subarray(n,n+l-2),n+=u.length,u);if(65534===v){var S=String.fromCharCode.apply(null,w);this.comments.push(S)}65504===v&&74===w[0]&&70===w[1]&&73===w[2]&&70===w[3]&&0===w[4]&&(f={version:{major:w[5],minor:w[6]},densityUnits:w[7],xDensity:w[8]__left_angle_mark___left_angle_mark_8|w[9],yDensity:w[10]__left_angle_mark___left_angle_mark_8|w[11],thumbWidth:w[12],thumbHeight:w[13],thumbData:w.subarray(14,14+3*w[12]*w[13])}),65505===v&&69===w[0]&&120===w[1]&&105===w[2]&&102===w[3]&&0===w[4]&&(this.exifBuffer=w.subarray(5,w.length)),65518===v&&65===w[0]&&100===w[1]&&111===w[2]&&98===w[3]&&101===w[4]&&0===w[5]&&(p={version:w[6],flags0:w[7]__left_angle_mark___left_angle_mark_8|w[8],flags1:w[9]__left_angle_mark___left_angle_mark_8|w[10],transformCode:w[11]});break;case 65499:for(var E=i()+n-2;n__left_angle_mark_E;){var x=t[n++];g(256);var C=new Int32Array(64);if(x>>4){if(x>>4!=1)throw new Error(\"DQT: invalid table spec\");for(K=0;K__left_angle_mark_64;K++)C[e[K]]=i()}else for(K=0;K__left_angle_mark_64;K++)C[e[K]]=t[n++];m[15&x]=C}break;case 65472:case 65473:case 65474:i(),(a={}).extended=65473===v,a.progressive=65474===v,a.precision=t[n++],a.scanLines=i(),a.samplesPerLine=i(),a.components={},a.componentsOrder=[];var T=a.scanLines*a.samplesPerLine;if(T>r){var R=Math.ceil((T-r)/1e6);throw new Error(`maxResolutionInMP limit exceeded by ${R}MP`)}var I,k=t[n++];for(V=0;V__left_angle_mark_k;V++){I=t[n];var P=t[n+1]>>4,M=15&t[n+1],O=t[n+2];if(P__left_angle_mark_=0||M__left_angle_mark_=0)throw new Error(\"Invalid sampling factor, expected values above 0\");a.componentsOrder.push(I),a.components[I]={h:P,v:M,quantizationIdx:O},n+=3}o(a),_.push(a);break;case 65476:var B=i();for(V=2;V__left_angle_mark_B;){var N=t[n++],j=new Uint8Array(16),L=0;for(K=0;K__left_angle_mark_16;K++,n++)L+=j[K]=t[n];g(16+L);var D=new Uint8Array(L);for(K=0;K__left_angle_mark_L;K++,n++)D[K]=t[n];V+=17+L,(N>>4?b:y)[15&N]=c(j,D)}break;case 65501:i(),s=i();break;case 65500:i(),i();break;case 65498:i();var F=t[n++],U=[];for(V=0;V__left_angle_mark_F;V++){X=a.components[t[n++]];var z=t[n++];X.huffmanTableDC=y[z>>4],X.huffmanTableAC=b[15&z],U.push(X)}var q=t[n++],G=t[n++],H=t[n++],W=d(t,n,a,U,s,q,G,H>>4,15&H,this.opts);n+=W;break;case 65535:255!==t[n]&&n--;break;default:if(255==t[n-3]&&t[n-2]>=192&&t[n-2]__left_angle_mark_=254){n-=3;break}if(224===v||225==v){if(-1!==A)throw new Error(`first unknown JPEG marker at offset ${A.toString(16)}, second unknown JPEG marker ${v.toString(16)} at offset ${(n-1).toString(16)}`);A=n-1;const e=i();if(255===t[n+e-2]){n+=e-2;break}}throw new Error(\"unknown JPEG marker \"+v.toString(16))}v=i()}if(1!=_.length)throw new Error(\"only single frame JPEGs supported\");for(var V=0;V__left_angle_mark__.length;V++){var $=_[V].components;for(var K in $)$[K].quantizationTable=m[$[K].quantizationIdx],delete $[K].quantizationIdx}for(this.width=a.samplesPerLine,this.height=a.scanLines,this.jfif=f,this.adobe=p,this.components=[],V=0;V__left_angle_mark_a.componentsOrder.length;V++){var X=a.components[a.componentsOrder[V]];this.components.push({lines:h(0,X),scaleX:X.h/a.maxH,scaleY:X.v/a.maxV})}},getData:function(e,t){var r,n,i,o,a,s,l,u,c,d,h,p,m,_,b,y,v,A,w,S,E,x=this.width/e,C=this.height/t,T=0,R=e*t*this.components.length;g(R);var I=new Uint8Array(R);switch(this.components.length){case 1:for(r=this.components[0],d=0;d__left_angle_mark_t;d++)for(a=r.lines[0|d*r.scaleY*C],c=0;c__left_angle_mark_e;c++)h=a[0|c*r.scaleX*x],I[T++]=h;break;case 2:for(r=this.components[0],n=this.components[1],d=0;d__left_angle_mark_t;d++)for(a=r.lines[0|d*r.scaleY*C],s=n.lines[0|d*n.scaleY*C],c=0;c__left_angle_mark_e;c++)h=a[0|c*r.scaleX*x],I[T++]=h,h=s[0|c*n.scaleX*x],I[T++]=h;break;case 3:for(E=!0,this.adobe&&this.adobe.transformCode?E=!0:void 0!==this.opts.colorTransform&&(E=!!this.opts.colorTransform),r=this.components[0],n=this.components[1],i=this.components[2],d=0;d__left_angle_mark_t;d++)for(a=r.lines[0|d*r.scaleY*C],s=n.lines[0|d*n.scaleY*C],l=i.lines[0|d*i.scaleY*C],c=0;c__left_angle_mark_e;c++)E?(h=a[0|c*r.scaleX*x],p=s[0|c*n.scaleX*x],A=f(h+1.402*((m=l[0|c*i.scaleX*x])-128)),w=f(h-.3441363*(p-128)-.71413636*(m-128)),S=f(h+1.772*(p-128))):(A=a[0|c*r.scaleX*x],w=s[0|c*n.scaleX*x],S=l[0|c*i.scaleX*x]),I[T++]=A,I[T++]=w,I[T++]=S;break;case 4:if(!this.adobe)throw new Error(\"Unsupported color mode (4 components)\");for(E=!1,this.adobe&&this.adobe.transformCode?E=!0:void 0!==this.opts.colorTransform&&(E=!!this.opts.colorTransform),r=this.components[0],n=this.components[1],i=this.components[2],o=this.components[3],d=0;d__left_angle_mark_t;d++)for(a=r.lines[0|d*r.scaleY*C],s=n.lines[0|d*n.scaleY*C],l=i.lines[0|d*i.scaleY*C],u=o.lines[0|d*o.scaleY*C],c=0;c__left_angle_mark_e;c++)E?(h=a[0|c*r.scaleX*x],p=s[0|c*n.scaleX*x],m=l[0|c*i.scaleX*x],_=u[0|c*o.scaleX*x],b=255-f(h+1.402*(m-128)),y=255-f(h-.3441363*(p-128)-.71413636*(m-128)),v=255-f(h+1.772*(p-128))):(b=a[0|c*r.scaleX*x],y=s[0|c*n.scaleX*x],v=l[0|c*i.scaleX*x],_=u[0|c*o.scaleX*x]),I[T++]=255-b,I[T++]=255-y,I[T++]=255-v,I[T++]=255-_;break;default:throw new Error(\"Unsupported color mode\")}return I},copyToImageData:function(e,t){var r,n,i,o,a,s,l,u,c,d=e.width,h=e.height,p=e.data,m=this.getData(d,h),g=0,_=0;switch(this.components.length){case 1:for(n=0;n__left_angle_mark_h;n++)for(r=0;r__left_angle_mark_d;r++)i=m[g++],p[_++]=i,p[_++]=i,p[_++]=i,t&&(p[_++]=255);break;case 3:for(n=0;n__left_angle_mark_h;n++)for(r=0;r__left_angle_mark_d;r++)l=m[g++],u=m[g++],c=m[g++],p[_++]=l,p[_++]=u,p[_++]=c,t&&(p[_++]=255);break;case 4:for(n=0;n__left_angle_mark_h;n++)for(r=0;r__left_angle_mark_d;r++)a=m[g++],s=m[g++],i=m[g++],l=255-f(a*(1-(o=m[g++])/255)+o),u=255-f(s*(1-o/255)+o),c=255-f(i*(1-o/255)+o),p[_++]=l,p[_++]=u,p[_++]=c,t&&(p[_++]=255);break;default:throw new Error(\"Unsupported color mode\")}}};var p=0,m=0;function g(e=0){var t=p+e;if(t>m){var r=Math.ceil((t-m)/1024/1024);throw new Error(`maxMemoryUsageInMB limit exceeded by at least ${r}MB`)}p=t}return u.resetMaxMemoryUsage=function(e){p=0,m=e},u.getBytesAllocated=function(){return p},u.requestMemoryAllocation=g,u}();e.exports=function(e,t={}){var r={colorTransform:void 0,useTArray:!1,formatAsRGBA:!0,tolerantDecoding:!0,maxResolutionInMP:100,maxMemoryUsageInMB:512,...t},o=new Uint8Array(e),a=new i;a.opts=r,i.resetMaxMemoryUsage(1024*r.maxMemoryUsageInMB*1024),a.parse(o);var s=r.formatAsRGBA?4:3,l=a.width*a.height*s;try{i.requestMemoryAllocation(l);var u={width:a.width,height:a.height,exifBuffer:a.exifBuffer,data:r.useTArray?new Uint8Array(l):n.alloc(l)};a.comments.length>0&&(u.comments=a.comments)}catch(c){if(c instanceof RangeError)throw new Error(\"Could not allocate enough memory for the image. Required: \"+l);if(c instanceof ReferenceError&&\"Buffer is not defined\"===c.message)throw new Error(\"Buffer is not globally defined in this environment. Consider setting useTArray to true\");throw c}return a.copyToImageData(u,r.formatAsRGBA),u}},706:(e,t,r)=>{var n=r(8834).lW;function i(e){Math.round;var t,r,i,o,a,s=Math.floor,l=new Array(64),u=new Array(64),c=new Array(64),d=new Array(64),h=new Array(65535),f=new Array(65535),p=new Array(64),m=new Array(64),g=[],_=0,b=7,y=new Array(64),v=new Array(64),A=new Array(64),w=new Array(256),S=new Array(2048),E=[0,1,5,6,14,15,27,28,2,4,7,13,16,26,29,42,3,8,12,17,25,30,41,43,9,11,18,24,31,40,44,53,10,19,23,32,39,45,52,54,20,22,33,38,46,51,55,60,21,34,37,47,50,56,59,61,35,36,48,49,57,58,62,63],x=[0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],C=[0,1,2,3,4,5,6,7,8,9,10,11],T=[0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125],R=[1,2,3,0,4,17,5,18,33,49,65,6,19,81,97,7,34,113,20,50,129,145,161,8,35,66,177,193,21,82,209,240,36,51,98,114,130,9,10,22,23,24,25,26,37,38,39,40,41,42,52,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,225,226,227,228,229,230,231,232,233,234,241,242,243,244,245,246,247,248,249,250],I=[0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0],k=[0,1,2,3,4,5,6,7,8,9,10,11],P=[0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],M=[0,1,2,3,17,4,5,33,49,6,18,65,81,7,97,113,19,34,50,129,8,20,66,145,161,177,193,9,35,51,82,240,21,98,114,209,10,22,36,52,225,37,241,23,24,25,26,38,39,40,41,42,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,130,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,226,227,228,229,230,231,232,233,234,242,243,244,245,246,247,248,249,250];function O(e,t){for(var r=0,n=0,i=new Array,o=1;o__left_angle_mark_=16;o++){for(var a=1;a__left_angle_mark_=e[o];a++)i[t[n]]=[],i[t[n]][0]=r,i[t[n]][1]=o,n++,r++;r*=2}return i}function B(e){for(var t=e[0],r=e[1]-1;r>=0;)t&1__left_angle_mark___left_angle_mark_r&&(_|=1__left_angle_mark___left_angle_mark_b),r--,--b__left_angle_mark_0&&(255==_?(N(255),N(0)):N(_),b=7,_=0)}function N(e){g.push(e)}function j(e){N(e>>8&255),N(255&e)}function L(e,t,r,n,i){for(var o,a=i[0],s=i[240],l=function(e,t){var r,n,i,o,a,s,l,u,c,d,h=0;for(c=0;c__left_angle_mark_8;++c){r=e[h],n=e[h+1],i=e[h+2],o=e[h+3],a=e[h+4],s=e[h+5],l=e[h+6];var f=r+(u=e[h+7]),m=r-u,g=n+l,_=n-l,b=i+s,y=i-s,v=o+a,A=o-a,w=f+v,S=f-v,E=g+b,x=g-b;e[h]=w+E,e[h+4]=w-E;var C=.707106781*(x+S);e[h+2]=S+C,e[h+6]=S-C;var T=.382683433*((w=A+y)-(x=_+m)),R=.5411961*w+T,I=1.306562965*x+T,k=.707106781*(E=y+_),P=m+k,M=m-k;e[h+5]=M+R,e[h+3]=M-R,e[h+1]=P+I,e[h+7]=P-I,h+=8}for(h=0,c=0;c__left_angle_mark_8;++c){r=e[h],n=e[h+8],i=e[h+16],o=e[h+24],a=e[h+32],s=e[h+40],l=e[h+48];var O=r+(u=e[h+56]),B=r-u,N=n+l,j=n-l,L=i+s,D=i-s,F=o+a,U=o-a,z=O+F,q=O-F,G=N+L,H=N-L;e[h]=z+G,e[h+32]=z-G;var W=.707106781*(H+q);e[h+16]=q+W,e[h+48]=q-W;var V=.382683433*((z=U+D)-(H=j+B)),$=.5411961*z+V,K=1.306562965*H+V,X=.707106781*(G=D+j),Y=B+X,J=B-X;e[h+40]=J+$,e[h+24]=J-$,e[h+8]=Y+K,e[h+56]=Y-K,h++}for(c=0;c__left_angle_mark_64;++c)d=e[c]*t[c],p[c]=d>0?d+.5|0:d-.5|0;return p}(e,t),u=0;u__left_angle_mark_64;++u)m[E[u]]=l[u];var c=m[0]-r;r=m[0],0==c?B(n[0]):(B(n[f[o=32767+c]]),B(h[o]));for(var d=63;d>0&&0==m[d];d--);if(0==d)return B(a),r;for(var g,_=1;___left_angle_mark_=d;){for(var b=_;0==m[_]&&___left_angle_mark_=d;++_);var y=_-b;if(y>=16){g=y>>4;for(var v=1;v__left_angle_mark_=g;++v)B(s);y&=15}o=32767+m[_],B(i[(y__left_angle_mark___left_angle_mark_4)+f[o]]),B(h[o]),_++}return 63!=d&&B(a),r}function D(e){e__left_angle_mark_=0&&(e=1),e>100&&(e=100),a!=e&&(function(e){for(var t=[16,11,10,16,24,40,51,61,12,12,14,19,26,58,60,55,14,13,16,24,40,57,69,56,14,17,22,29,51,87,80,62,18,22,37,56,68,109,103,77,24,35,55,64,81,104,113,92,49,64,78,87,103,121,120,101,72,92,95,98,112,100,103,99],r=0;r__left_angle_mark_64;r++){var n=s((t[r]*e+50)/100);n__left_angle_mark_1?n=1:n>255&&(n=255),l[E[r]]=n}for(var i=[17,18,24,47,99,99,99,99,18,21,26,66,99,99,99,99,24,26,56,99,99,99,99,99,47,66,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99],o=0;o__left_angle_mark_64;o++){var a=s((i[o]*e+50)/100);a__left_angle_mark_1?a=1:a>255&&(a=255),u[E[o]]=a}for(var h=[1,1.387039845,1.306562965,1.175875602,1,.785694958,.5411961,.275899379],f=0,p=0;p__left_angle_mark_8;p++)for(var m=0;m__left_angle_mark_8;m++)c[f]=1/(l[E[f]]*h[p]*h[m]*8),d[f]=1/(u[E[f]]*h[p]*h[m]*8),f++}(e__left_angle_mark_50?Math.floor(5e3/e):Math.floor(200-2*e)),a=e)}this.encode=function(e,a){var s,h,f;a&&D(a),g=new Array,_=0,b=7,j(65496),j(65504),j(16),N(74),N(70),N(73),N(70),N(0),N(1),N(1),N(0),j(1),j(1),N(0),N(0),void 0!==(s=e.comments)&&s.constructor===Array&&s.forEach((e=>{if(\"string\"==typeof e){j(65534);var t,r=e.length;for(j(r+2),t=0;t__left_angle_mark_r;t++)N(e.charCodeAt(t))}})),function(e){if(e){j(65505),69===e[0]&&120===e[1]&&105===e[2]&&102===e[3]?j(e.length+2):(j(e.length+5+2),N(69),N(120),N(105),N(102),N(0));for(var t=0;t__left_angle_mark_e.length;t++)N(e[t])}}(e.exifBuffer),function(){j(65499),j(132),N(0);for(var e=0;e__left_angle_mark_64;e++)N(l[e]);N(1);for(var t=0;t__left_angle_mark_64;t++)N(u[t])}(),h=e.width,f=e.height,j(65472),j(17),N(8),j(f),j(h),N(3),N(1),N(17),N(0),N(2),N(17),N(1),N(3),N(17),N(1),function(){j(65476),j(418),N(0);for(var e=0;e__left_angle_mark_16;e++)N(x[e+1]);for(var t=0;t__left_angle_mark_=11;t++)N(C[t]);N(16);for(var r=0;r__left_angle_mark_16;r++)N(T[r+1]);for(var n=0;n__left_angle_mark_=161;n++)N(R[n]);N(1);for(var i=0;i__left_angle_mark_16;i++)N(I[i+1]);for(var o=0;o__left_angle_mark_=11;o++)N(k[o]);N(17);for(var a=0;a__left_angle_mark_16;a++)N(P[a+1]);for(var s=0;s__left_angle_mark_=161;s++)N(M[s])}(),j(65498),j(12),N(3),N(1),N(0),N(2),N(17),N(3),N(17),N(0),N(63),N(0);var p=0,m=0,w=0;_=0,b=7,this.encode.displayName=\"_encode_\";for(var E,O,F,U,z,q,G,H,W,V=e.data,$=e.width,K=e.height,X=4*$,Y=0;Y__left_angle_mark_K;){for(E=0;E__left_angle_mark_X;){for(q=z=X*Y+E,G=-1,H=0,W=0;W__left_angle_mark_64;W++)q=z+(H=W>>3)*X+(G=4*(7&W)),Y+H>=K&&(q-=X*(Y+1+H-K)),E+G>=X&&(q-=E+G-X+4),O=V[q++],F=V[q++],U=V[q++],y[W]=(S[O]+S[F+256|0]+S[U+512|0]>>16)-128,v[W]=(S[O+768|0]+S[F+1024|0]+S[U+1280|0]>>16)-128,A[W]=(S[O+1280|0]+S[F+1536|0]+S[U+1792|0]>>16)-128;p=L(y,c,p,t,i),m=L(v,d,m,r,o),w=L(A,d,w,r,o),E+=32}Y+=8}if(b>=0){var J=[];J[1]=b+1,J[0]=(1__left_angle_mark___left_angle_mark_b+1)-1,B(J)}return j(65497),n.from(g)},e||(e=50),function(){for(var e=String.fromCharCode,t=0;t__left_angle_mark_256;t++)w[t]=e(t)}(),t=O(x,C),r=O(I,k),i=O(T,R),o=O(P,M),function(){for(var e=1,t=2,r=1;r__left_angle_mark_=15;r++){for(var n=e;n__left_angle_mark_t;n++)f[32767+n]=r,h[32767+n]=[],h[32767+n][1]=r,h[32767+n][0]=n;for(var i=-(t-1);i__left_angle_mark_=-e;i++)f[32767+i]=r,h[32767+i]=[],h[32767+i][1]=r,h[32767+i][0]=t-1+i;e__left_angle_mark___left_angle_mark_=1,t__left_angle_mark___left_angle_mark_=1}}(),function(){for(var e=0;e__left_angle_mark_256;e++)S[e]=19595*e,S[e+256|0]=38470*e,S[e+512|0]=7471*e+32768,S[e+768|0]=-11059*e,S[e+1024|0]=-21709*e,S[e+1280|0]=32768*e+8421375,S[e+1536|0]=-27439*e,S[e+1792|0]=-5329*e}(),D(e)}e.exports=function(e,t){return void 0===t&&(t=50),{data:new i(t).encode(e,t),width:e.width,height:e.height}}},8058:(e,t,r)=>{var n=r(8834).lW,i=r(6290),o=function(){},a=r(4398),s=r(5947),l=r(8438),u=r(5565),c=r(1960),d=self.XMLHttpRequest&&\"withCredentials\"in new XMLHttpRequest;e.exports=function(e,t){t=\"function\"==typeof t?t:o,\"string\"==typeof e?e={uri:e}:e||(e={}),e.binary&&(e=function(e){if(d)return c(e,{responseType:\"arraybuffer\"});if(void 0===self.XMLHttpRequest)throw new Error(\"your browser does not support XHR loading\");var t=new self.XMLHttpRequest;return t.overrideMimeType(\"text/plain; charset=x-user-defined\"),c({xhr:t},e)}(e)),i(e,(function(r,i,c){if(r)return t(r);if(!/^2/.test(i.statusCode))return t(new Error(\"http status code: \"+i.statusCode));if(!c)return t(new Error(\"no body result\"));var d,h,f=!1;if(d=c,\"[object ArrayBuffer]\"===Object.prototype.toString.call(d)){var p=new Uint8Array(c);c=n.from(p,\"binary\")}u(c)&&(f=!0,\"string\"==typeof c&&(c=n.from(c,\"binary\"))),f||(n.isBuffer(c)&&(c=c.toString(e.encoding)),c=c.trim());try{var m=i.headers[\"content-type\"];h=f?l(c):/json/.test(m)||\"{\"===c.charAt(0)?JSON.parse(c):/xml/.test(m)||\"__left_angle_mark_\"===c.charAt(0)?s(c):a(c)}catch(g){t(new Error(\"error parsing font \"+g.message)),t=o}t(null,h)}))}},5565:(e,t,r)=>{var n=r(8834).lW,i=r(5137),o=n.from([66,77,70,3]);e.exports=function(e){return\"string\"==typeof e?\"BMF\"===e.substring(0,3):e.length>4&&i(e.slice(0,4),o)}},63:(e,t)=>{function r(e,t,r,n){for(var i=e[t++],o=1__left_angle_mark___left_angle_mark_i,a=o+1,s=a+1,l=i+1,u=(1__left_angle_mark___left_angle_mark_l)-1,c=0,d=0,h=0,f=e[t++],p=new Int32Array(4096),m=null;;){for(;c__left_angle_mark_16&&0!==f;)d|=e[t++]__left_angle_mark___left_angle_mark_c,c+=8,1===f?f=e[t++]:--f;if(c__left_angle_mark_l)break;var g=d&u;if(d>>=l,c-=l,g!==o){if(g===a)break;for(var _=g__left_angle_mark_s?g:m,b=0,y=_;y>o;)y=p[y]>>8,++b;var v=y;if(h+b+(_!==g?1:0)>n)return void import_console_browserify.default.log(\"Warning, gif stream longer than expected.\");r[h++]=v;var A=h+=b;for(_!==g&&(r[h++]=v),y=_;b--;)y=p[y],r[--A]=255&y,y>>=8;null!==m&&s__left_angle_mark_4096&&(p[s++]=m__left_angle_mark___left_angle_mark_8|v,s>=u+1&&l__left_angle_mark_12&&(++l,u=u__left_angle_mark___left_angle_mark_1|1)),m=g}else s=a+1,u=(1__left_angle_mark___left_angle_mark_(l=i+1))-1,m=null}return h!==n&&import_console_browserify.default.log(\"Warning, gif stream shorter than expected.\"),r}try{t.N=function(e){var t=0;if(71!==e[t++]||73!==e[t++]||70!==e[t++]||56!==e[t++]||56!=(e[t++]+1&253)||97!==e[t++])throw new Error(\"Invalid GIF 87a/89a header.\");var n=e[t++]|e[t++]__left_angle_mark___left_angle_mark_8,i=e[t++]|e[t++]__left_angle_mark___left_angle_mark_8,o=e[t++],a=o>>7,s=1__left_angle_mark___left_angle_mark_1+(7&o);e[t++],e[t++];var l=null,u=null;a&&(l=t,u=s,t+=3*s);var c=!0,d=[],h=0,f=null,p=0,m=null;for(this.width=n,this.height=i;c&&t__left_angle_mark_e.length;)switch(e[t++]){case 33:switch(e[t++]){case 255:if(11!==e[t]||78==e[t+1]&&69==e[t+2]&&84==e[t+3]&&83==e[t+4]&&67==e[t+5]&&65==e[t+6]&&80==e[t+7]&&69==e[t+8]&&50==e[t+9]&&46==e[t+10]&&48==e[t+11]&&3==e[t+12]&&1==e[t+13]&&0==e[t+16])t+=14,m=e[t++]|e[t++]__left_angle_mark___left_angle_mark_8,t++;else for(t+=12;;){if(!((R=e[t++])>=0))throw Error(\"Invalid block size\");if(0===R)break;t+=R}break;case 249:if(4!==e[t++]||0!==e[t+4])throw new Error(\"Invalid graphics extension block.\");var g=e[t++];h=e[t++]|e[t++]__left_angle_mark___left_angle_mark_8,f=e[t++],!(1&g)&&(f=null),p=g>>2&7,t++;break;case 254:for(;;){if(!((R=e[t++])>=0))throw Error(\"Invalid block size\");if(0===R)break;t+=R}break;default:throw new Error(\"Unknown graphic control label: 0x\"+e[t-1].toString(16))}break;case 44:var _=e[t++]|e[t++]__left_angle_mark___left_angle_mark_8,b=e[t++]|e[t++]__left_angle_mark___left_angle_mark_8,y=e[t++]|e[t++]__left_angle_mark___left_angle_mark_8,v=e[t++]|e[t++]__left_angle_mark___left_angle_mark_8,A=e[t++],w=A>>6&1,S=1__left_angle_mark___left_angle_mark_1+(7&A),E=l,x=u,C=!1;A>>7&&(C=!0,E=t,x=S,t+=3*S);var T=t;for(t++;;){var R;if(!((R=e[t++])>=0))throw Error(\"Invalid block size\");if(0===R)break;t+=R}d.push({x:_,y:b,width:y,height:v,has_local_palette:C,palette_offset:E,palette_size:x,data_offset:T,data_length:t-T,transparent_index:f,interlaced:!!w,delay:h,disposal:p});break;case 59:c=!1;break;default:throw new Error(\"Unknown gif block: 0x\"+e[t-1].toString(16))}this.numFrames=function(){return d.length},this.loopCount=function(){return m},this.frameInfo=function(e){if(e__left_angle_mark_0||e>=d.length)throw new Error(\"Frame index out of range.\");return d[e]},this.decodeAndBlitFrameBGRA=function(t,i){var o=this.frameInfo(t),a=o.width*o.height,s=new Uint8Array(a);r(e,o.data_offset,s,a);var l=o.palette_offset,u=o.transparent_index;null===u&&(u=256);var c=o.width,d=n-c,h=c,f=4*(o.y*n+o.x),p=4*((o.y+o.height)*n+o.x),m=f,g=4*d;!0===o.interlaced&&(g+=4*n*7);for(var _=8,b=0,y=s.length;b__left_angle_mark_y;++b){var v=s[b];if(0===h&&(h=c,(m+=g)>=p&&(g=4*d+4*n*(_-1),m=f+(c+d)*(___left_angle_mark___left_angle_mark_1),_>>=1)),v===u)m+=4;else{var A=e[l+3*v],w=e[l+3*v+1],S=e[l+3*v+2];i[m++]=S,i[m++]=w,i[m++]=A,i[m++]=255}--h}},this.decodeAndBlitFrameRGBA=function(t,i){var o=this.frameInfo(t),a=o.width*o.height,s=new Uint8Array(a);r(e,o.data_offset,s,a);var l=o.palette_offset,u=o.transparent_index;null===u&&(u=256);var c=o.width,d=n-c,h=c,f=4*(o.y*n+o.x),p=4*((o.y+o.height)*n+o.x),m=f,g=4*d;!0===o.interlaced&&(g+=4*n*7);for(var _=8,b=0,y=s.length;b__left_angle_mark_y;++b){var v=s[b];if(0===h&&(h=c,(m+=g)>=p&&(g=4*d+4*n*(_-1),m=f+(c+d)*(___left_angle_mark___left_angle_mark_1),_>>=1)),v===u)m+=4;else{var A=e[l+3*v],w=e[l+3*v+1],S=e[l+3*v+2];i[m++]=A,i[m++]=w,i[m++]=S,i[m++]=255}--h}}}}catch(n){}},2845:(e,t,r)=>{var n={};(0,r(9761).assign)(n,r(9880),r(1380),r(1271)),e.exports=n},9880:(e,t,r)=>{var n=r(5789),i=r(9761),o=r(7944),a=r(2950),s=r(744),l=Object.prototype.toString;function u(e){if(!(this instanceof u))return new u(e);this.options=i.assign({level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0,to:\"\"},e||{});var t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits__left_angle_mark_16&&(t.windowBits+=16),this.err=0,this.msg=\"\",this.ended=!1,this.chunks=[],this.strm=new s,this.strm.avail_out=0;var r=n.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(0!==r)throw new Error(a[r]);if(t.header&&n.deflateSetHeader(this.strm,t.header),t.dictionary){var c;if(c=\"string\"==typeof t.dictionary?o.string2buf(t.dictionary):\"[object ArrayBuffer]\"===l.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,0!==(r=n.deflateSetDictionary(this.strm,c)))throw new Error(a[r]);this._dict_set=!0}}function c(e,t){var r=new u(t);if(r.push(e,!0),r.err)throw r.msg||a[r.err];return r.result}u.prototype.push=function(e,t){var r,a,s=this.strm,u=this.options.chunkSize;if(this.ended)return!1;a=t===~~t?t:!0===t?4:0,\"string\"==typeof e?s.input=o.string2buf(e):\"[object ArrayBuffer]\"===l.call(e)?s.input=new Uint8Array(e):s.input=e,s.next_in=0,s.avail_in=s.input.length;do{if(0===s.avail_out&&(s.output=new i.Buf8(u),s.next_out=0,s.avail_out=u),1!==(r=n.deflate(s,a))&&0!==r)return this.onEnd(r),this.ended=!0,!1;0!==s.avail_out&&(0!==s.avail_in||4!==a&&2!==a)||(\"string\"===this.options.to?this.onData(o.buf2binstring(i.shrinkBuf(s.output,s.next_out))):this.onData(i.shrinkBuf(s.output,s.next_out)))}while((s.avail_in>0||0===s.avail_out)&&1!==r);return 4===a?(r=n.deflateEnd(this.strm),this.onEnd(r),this.ended=!0,0===r):2!==a||(this.onEnd(0),s.avail_out=0,!0)},u.prototype.onData=function(e){this.chunks.push(e)},u.prototype.onEnd=function(e){0===e&&(\"string\"===this.options.to?this.result=this.chunks.join(\"\"):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},t.Deflate=u,t.deflate=c,t.deflateRaw=function(e,t){return(t=t||{}).raw=!0,c(e,t)},t.gzip=function(e,t){return(t=t||{}).gzip=!0,c(e,t)}},1380:(e,t,r)=>{var n=r(5020),i=r(9761),o=r(7944),a=r(1271),s=r(2950),l=r(744),u=r(7357),c=Object.prototype.toString;function d(e){if(!(this instanceof d))return new d(e);this.options=i.assign({chunkSize:16384,windowBits:0,to:\"\"},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits__left_angle_mark_16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits__left_angle_mark_16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits__left_angle_mark_48&&!(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg=\"\",this.ended=!1,this.chunks=[],this.strm=new l,this.strm.avail_out=0;var r=n.inflateInit2(this.strm,t.windowBits);if(r!==a.Z_OK)throw new Error(s[r]);if(this.header=new u,n.inflateGetHeader(this.strm,this.header),t.dictionary&&(\"string\"==typeof t.dictionary?t.dictionary=o.string2buf(t.dictionary):\"[object ArrayBuffer]\"===c.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(r=n.inflateSetDictionary(this.strm,t.dictionary))!==a.Z_OK))throw new Error(s[r])}function h(e,t){var r=new d(t);if(r.push(e,!0),r.err)throw r.msg||s[r.err];return r.result}d.prototype.push=function(e,t){var r,s,l,u,d,h=this.strm,f=this.options.chunkSize,p=this.options.dictionary,m=!1;if(this.ended)return!1;s=t===~~t?t:!0===t?a.Z_FINISH:a.Z_NO_FLUSH,\"string\"==typeof e?h.input=o.binstring2buf(e):\"[object ArrayBuffer]\"===c.call(e)?h.input=new Uint8Array(e):h.input=e,h.next_in=0,h.avail_in=h.input.length;do{if(0===h.avail_out&&(h.output=new i.Buf8(f),h.next_out=0,h.avail_out=f),(r=n.inflate(h,a.Z_NO_FLUSH))===a.Z_NEED_DICT&&p&&(r=n.inflateSetDictionary(this.strm,p)),r===a.Z_BUF_ERROR&&!0===m&&(r=a.Z_OK,m=!1),r!==a.Z_STREAM_END&&r!==a.Z_OK)return this.onEnd(r),this.ended=!0,!1;h.next_out&&(0!==h.avail_out&&r!==a.Z_STREAM_END&&(0!==h.avail_in||s!==a.Z_FINISH&&s!==a.Z_SYNC_FLUSH)||(\"string\"===this.options.to?(l=o.utf8border(h.output,h.next_out),u=h.next_out-l,d=o.buf2string(h.output,l),h.next_out=u,h.avail_out=f-u,u&&i.arraySet(h.output,h.output,l,u,0),this.onData(d)):this.onData(i.shrinkBuf(h.output,h.next_out)))),0===h.avail_in&&0===h.avail_out&&(m=!0)}while((h.avail_in>0||0===h.avail_out)&&r!==a.Z_STREAM_END);return r===a.Z_STREAM_END&&(s=a.Z_FINISH),s===a.Z_FINISH?(r=n.inflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===a.Z_OK):s!==a.Z_SYNC_FLUSH||(this.onEnd(a.Z_OK),h.avail_out=0,!0)},d.prototype.onData=function(e){this.chunks.push(e)},d.prototype.onEnd=function(e){e===a.Z_OK&&(\"string\"===this.options.to?this.result=this.chunks.join(\"\"):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},t.Inflate=d,t.inflate=h,t.inflateRaw=function(e,t){return(t=t||{}).raw=!0,h(e,t)},t.ungzip=h},9761:(e,t)=>{var r=\"undefined\"!=typeof Uint8Array&&\"undefined\"!=typeof Uint16Array&&\"undefined\"!=typeof Int32Array;function n(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var r=t.shift();if(r){if(\"object\"!=typeof r)throw new TypeError(r+\"must be non-object\");for(var i in r)n(r,i)&&(e[i]=r[i])}}return e},t.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var i={arraySet:function(e,t,r,n,i){if(t.subarray&&e.subarray)e.set(t.subarray(r,r+n),i);else for(var o=0;o__left_angle_mark_n;o++)e[i+o]=t[r+o]},flattenChunks:function(e){var t,r,n,i,o,a;for(n=0,t=0,r=e.length;t__left_angle_mark_r;t++)n+=e[t].length;for(a=new Uint8Array(n),i=0,t=0,r=e.length;t__left_angle_mark_r;t++)o=e[t],a.set(o,i),i+=o.length;return a}},o={arraySet:function(e,t,r,n,i){for(var o=0;o__left_angle_mark_n;o++)e[i+o]=t[r+o]},flattenChunks:function(e){return[].concat.apply([],e)}};t.setTyped=function(e){e?(t.Buf8=Uint8Array,t.Buf16=Uint16Array,t.Buf32=Int32Array,t.assign(t,i)):(t.Buf8=Array,t.Buf16=Array,t.Buf32=Array,t.assign(t,o))},t.setTyped(r)},7944:(e,t,r)=>{var n=r(9761),i=!0,o=!0;try{String.fromCharCode.apply(null,[0])}catch(u){i=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(u){o=!1}for(var a=new n.Buf8(256),s=0;s__left_angle_mark_256;s++)a[s]=s>=252?6:s>=248?5:s>=240?4:s>=224?3:s>=192?2:1;function l(e,t){if(t__left_angle_mark_65534&&(e.subarray&&o||!e.subarray&&i))return String.fromCharCode.apply(null,n.shrinkBuf(e,t));for(var r=\"\",a=0;a__left_angle_mark_t;a++)r+=String.fromCharCode(e[a]);return r}a[254]=a[254]=1,t.string2buf=function(e){var t,r,i,o,a,s=e.length,l=0;for(o=0;o__left_angle_mark_s;o++)55296==(64512&(r=e.charCodeAt(o)))&&o+1__left_angle_mark_s&&56320==(64512&(i=e.charCodeAt(o+1)))&&(r=65536+(r-55296__left_angle_mark___left_angle_mark_10)+(i-56320),o++),l+=r__left_angle_mark_128?1:r__left_angle_mark_2048?2:r__left_angle_mark_65536?3:4;for(t=new n.Buf8(l),a=0,o=0;a__left_angle_mark_l;o++)55296==(64512&(r=e.charCodeAt(o)))&&o+1__left_angle_mark_s&&56320==(64512&(i=e.charCodeAt(o+1)))&&(r=65536+(r-55296__left_angle_mark___left_angle_mark_10)+(i-56320),o++),r__left_angle_mark_128?t[a++]=r:r__left_angle_mark_2048?(t[a++]=192|r>>>6,t[a++]=128|63&r):r__left_angle_mark_65536?(t[a++]=224|r>>>12,t[a++]=128|r>>>6&63,t[a++]=128|63&r):(t[a++]=240|r>>>18,t[a++]=128|r>>>12&63,t[a++]=128|r>>>6&63,t[a++]=128|63&r);return t},t.buf2binstring=function(e){return l(e,e.length)},t.binstring2buf=function(e){for(var t=new n.Buf8(e.length),r=0,i=t.length;r__left_angle_mark_i;r++)t[r]=e.charCodeAt(r);return t},t.buf2string=function(e,t){var r,n,i,o,s=t||e.length,u=new Array(2*s);for(n=0,r=0;r__left_angle_mark_s;)if((i=e[r++])__left_angle_mark_128)u[n++]=i;else if((o=a[i])>4)u[n++]=65533,r+=o-1;else{for(i&=2===o?31:3===o?15:7;o>1&&r__left_angle_mark_s;)i=i__left_angle_mark___left_angle_mark_6|63&e[r++],o--;o>1?u[n++]=65533:i__left_angle_mark_65536?u[n++]=i:(i-=65536,u[n++]=55296|i>>10&1023,u[n++]=56320|1023&i)}return l(u,n)},t.utf8border=function(e,t){var r;for((t=t||e.length)>e.length&&(t=e.length),r=t-1;r>=0&&128==(192&e[r]);)r--;return r__left_angle_mark_0||0===r?t:r+a[e[r]]>t?r:t}},5562:e=>{e.exports=function(e,t,r,n){for(var i=65535&e,o=e>>>16&65535,a=0;0!==r;){r-=a=r>2e3?2e3:r;do{o=o+(i=i+t[n++]|0)|0}while(--a);i%=65521,o%=65521}return i|o__left_angle_mark___left_angle_mark_16}},1271:e=>{e.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},4299:e=>{var t=function(){for(var e,t=[],r=0;r__left_angle_mark_256;r++){e=r;for(var n=0;n__left_angle_mark_8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t}();e.exports=function(e,r,n,i){var o=t,a=i+n;e^=-1;for(var s=i;s__left_angle_mark_a;s++)e=e>>>8^o[255&(e^r[s])];return~e}},5789:(e,t,r)=>{var n,i=r(9761),o=r(9564),a=r(5562),s=r(4299),l=r(2950),u=-2,c=258,d=262,h=103,f=113,p=666;function m(e,t){return e.msg=l[t],t}function g(e){return(e__left_angle_mark___left_angle_mark_1)-(e>4?9:0)}function _(e){for(var t=e.length;--t>=0;)e[t]=0}function b(e){var t=e.state,r=t.pending;r>e.avail_out&&(r=e.avail_out),0!==r&&(i.arraySet(e.output,t.pending_buf,t.pending_out,r,e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,0===t.pending&&(t.pending_out=0))}function y(e,t){o._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,b(e.strm)}function v(e,t){e.pending_buf[e.pending++]=t}function A(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function w(e,t){var r,n,i=e.max_chain_length,o=e.strstart,a=e.prev_length,s=e.nice_match,l=e.strstart>e.w_size-d?e.strstart-(e.w_size-d):0,u=e.window,h=e.w_mask,f=e.prev,p=e.strstart+c,m=u[o+a-1],g=u[o+a];e.prev_length>=e.good_match&&(i>>=2),s>e.lookahead&&(s=e.lookahead);do{if(u[(r=t)+a]===g&&u[r+a-1]===m&&u[r]===u[o]&&u[++r]===u[o+1]){o+=2,r++;do{}while(u[++o]===u[++r]&&u[++o]===u[++r]&&u[++o]===u[++r]&&u[++o]===u[++r]&&u[++o]===u[++r]&&u[++o]===u[++r]&&u[++o]===u[++r]&&u[++o]===u[++r]&&o__left_angle_mark_p);if(n=c-(p-o),o=p-c,n>a){if(e.match_start=t,a=n,n>=s)break;m=u[o+a-1],g=u[o+a]}}}while((t=f[t&h])>l&&0!=--i);return a__left_angle_mark_=e.lookahead?a:e.lookahead}function S(e){var t,r,n,o,l,u,c,h,f,p,m=e.w_size;do{if(o=e.window_size-e.lookahead-e.strstart,e.strstart>=m+(m-d)){i.arraySet(e.window,e.window,m,m,0),e.match_start-=m,e.strstart-=m,e.block_start-=m,t=r=e.hash_size;do{n=e.head[--t],e.head[t]=n>=m?n-m:0}while(--r);t=r=m;do{n=e.prev[--t],e.prev[t]=n>=m?n-m:0}while(--r);o+=m}if(0===e.strm.avail_in)break;if(u=e.strm,c=e.window,h=e.strstart+e.lookahead,f=o,p=void 0,(p=u.avail_in)>f&&(p=f),r=0===p?0:(u.avail_in-=p,i.arraySet(c,u.input,u.next_in,p,h),1===u.state.wrap?u.adler=a(u.adler,c,p,h):2===u.state.wrap&&(u.adler=s(u.adler,c,p,h)),u.next_in+=p,u.total_in+=p,p),e.lookahead+=r,e.lookahead+e.insert>=3)for(l=e.strstart-e.insert,e.ins_h=e.window[l],e.ins_h=(e.ins_h__left_angle_mark___left_angle_mark_e.hash_shift^e.window[l+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h__left_angle_mark___left_angle_mark_e.hash_shift^e.window[l+3-1])&e.hash_mask,e.prev[l&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=l,l++,e.insert--,!(e.lookahead+e.insert__left_angle_mark_3)););}while(e.lookahead__left_angle_mark_d&&0!==e.strm.avail_in)}function E(e,t){for(var r,n;;){if(e.lookahead__left_angle_mark_d){if(S(e),e.lookahead__left_angle_mark_d&&0===t)return 1;if(0===e.lookahead)break}if(r=0,e.lookahead>=3&&(e.ins_h=(e.ins_h__left_angle_mark___left_angle_mark_e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==r&&e.strstart-r__left_angle_mark_=e.w_size-d&&(e.match_length=w(e,r)),e.match_length>=3)if(n=o._tr_tally(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length__left_angle_mark_=e.max_lazy_match&&e.lookahead>=3){e.match_length--;do{e.strstart++,e.ins_h=(e.ins_h__left_angle_mark___left_angle_mark_e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart}while(0!=--e.match_length);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h__left_angle_mark___left_angle_mark_e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else n=o._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(n&&(y(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart__left_angle_mark_2?e.strstart:2,4===t?(y(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(y(e,!1),0===e.strm.avail_out)?1:2}function x(e,t){for(var r,n,i;;){if(e.lookahead__left_angle_mark_d){if(S(e),e.lookahead__left_angle_mark_d&&0===t)return 1;if(0===e.lookahead)break}if(r=0,e.lookahead>=3&&(e.ins_h=(e.ins_h__left_angle_mark___left_angle_mark_e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=2,0!==r&&e.prev_length__left_angle_mark_e.max_lazy_match&&e.strstart-r__left_angle_mark_=e.w_size-d&&(e.match_length=w(e,r),e.match_length__left_angle_mark_=5&&(1===e.strategy||3===e.match_length&&e.strstart-e.match_start>4096)&&(e.match_length=2)),e.prev_length>=3&&e.match_length__left_angle_mark_=e.prev_length){i=e.strstart+e.lookahead-3,n=o._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart__left_angle_mark_=i&&(e.ins_h=(e.ins_h__left_angle_mark___left_angle_mark_e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart)}while(0!=--e.prev_length);if(e.match_available=0,e.match_length=2,e.strstart++,n&&(y(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if((n=o._tr_tally(e,0,e.window[e.strstart-1]))&&y(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return 1}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(n=o._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart__left_angle_mark_2?e.strstart:2,4===t?(y(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(y(e,!1),0===e.strm.avail_out)?1:2}function C(e,t,r,n,i){this.good_length=e,this.max_lazy=t,this.nice_length=r,this.max_chain=n,this.func=i}function T(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=8,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new i.Buf16(1146),this.dyn_dtree=new i.Buf16(122),this.bl_tree=new i.Buf16(78),_(this.dyn_ltree),_(this.dyn_dtree),_(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new i.Buf16(16),this.heap=new i.Buf16(573),_(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new i.Buf16(573),_(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function R(e){var t;return e&&e.state?(e.total_in=e.total_out=0,e.data_type=2,(t=e.state).pending=0,t.pending_out=0,t.wrap__left_angle_mark_0&&(t.wrap=-t.wrap),t.status=t.wrap?42:f,e.adler=2===t.wrap?0:1,t.last_flush=0,o._tr_init(t),0):m(e,u)}function I(e){var t,r=R(e);return 0===r&&((t=e.state).window_size=2*t.w_size,_(t.head),t.max_lazy_match=n[t.level].max_lazy,t.good_match=n[t.level].good_length,t.nice_match=n[t.level].nice_length,t.max_chain_length=n[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=2,t.match_available=0,t.ins_h=0),r}function k(e,t,r,n,o,a){if(!e)return u;var s=1;if(-1===t&&(t=6),n__left_angle_mark_0?(s=0,n=-n):n>15&&(s=2,n-=16),o__left_angle_mark_1||o>9||8!==r||n__left_angle_mark_8||n>15||t__left_angle_mark_0||t>9||a__left_angle_mark_0||a>4)return m(e,u);8===n&&(n=9);var l=new T;return e.state=l,l.strm=e,l.wrap=s,l.gzhead=null,l.w_bits=n,l.w_size=1__left_angle_mark___left_angle_mark_l.w_bits,l.w_mask=l.w_size-1,l.hash_bits=o+7,l.hash_size=1__left_angle_mark___left_angle_mark_l.hash_bits,l.hash_mask=l.hash_size-1,l.hash_shift=~~((l.hash_bits+3-1)/3),l.window=new i.Buf8(2*l.w_size),l.head=new i.Buf16(l.hash_size),l.prev=new i.Buf16(l.w_size),l.lit_bufsize=1__left_angle_mark___left_angle_mark_o+6,l.pending_buf_size=4*l.lit_bufsize,l.pending_buf=new i.Buf8(l.pending_buf_size),l.d_buf=1*l.lit_bufsize,l.l_buf=3*l.lit_bufsize,l.level=t,l.strategy=a,l.method=r,I(e)}n=[new C(0,0,0,0,(function(e,t){var r=65535;for(r>e.pending_buf_size-5&&(r=e.pending_buf_size-5);;){if(e.lookahead__left_angle_mark_=1){if(S(e),0===e.lookahead&&0===t)return 1;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var n=e.block_start+r;if((0===e.strstart||e.strstart>=n)&&(e.lookahead=e.strstart-n,e.strstart=n,y(e,!1),0===e.strm.avail_out))return 1;if(e.strstart-e.block_start>=e.w_size-d&&(y(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(y(e,!0),0===e.strm.avail_out?3:4):(e.strstart>e.block_start&&(y(e,!1),e.strm.avail_out),1)})),new C(4,4,8,4,E),new C(4,5,16,8,E),new C(4,6,32,32,E),new C(4,4,16,16,x),new C(8,16,32,32,x),new C(8,16,128,128,x),new C(8,32,128,256,x),new C(32,128,258,1024,x),new C(32,258,258,4096,x)],t.deflateInit=function(e,t){return k(e,t,8,15,8,0)},t.deflateInit2=k,t.deflateReset=I,t.deflateResetKeep=R,t.deflateSetHeader=function(e,t){return e&&e.state?2!==e.state.wrap?u:(e.state.gzhead=t,0):u},t.deflate=function(e,t){var r,i,a,l;if(!e||!e.state||t>5||t__left_angle_mark_0)return e?m(e,u):u;if(i=e.state,!e.output||!e.input&&0!==e.avail_in||i.status===p&&4!==t)return m(e,0===e.avail_out?-5:u);if(i.strm=e,r=i.last_flush,i.last_flush=t,42===i.status)if(2===i.wrap)e.adler=0,v(i,31),v(i,139),v(i,8),i.gzhead?(v(i,(i.gzhead.text?1:0)+(i.gzhead.hcrc?2:0)+(i.gzhead.extra?4:0)+(i.gzhead.name?8:0)+(i.gzhead.comment?16:0)),v(i,255&i.gzhead.time),v(i,i.gzhead.time>>8&255),v(i,i.gzhead.time>>16&255),v(i,i.gzhead.time>>24&255),v(i,9===i.level?2:i.strategy>=2||i.level__left_angle_mark_2?4:0),v(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(v(i,255&i.gzhead.extra.length),v(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(e.adler=s(e.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69):(v(i,0),v(i,0),v(i,0),v(i,0),v(i,0),v(i,9===i.level?2:i.strategy>=2||i.level__left_angle_mark_2?4:0),v(i,3),i.status=f);else{var d=8+(i.w_bits-8__left_angle_mark___left_angle_mark_4)__left_angle_mark___left_angle_mark_8;d|=(i.strategy>=2||i.level__left_angle_mark_2?0:i.level__left_angle_mark_6?1:6===i.level?2:3)__left_angle_mark___left_angle_mark_6,0!==i.strstart&&(d|=32),d+=31-d%31,i.status=f,A(i,d),0!==i.strstart&&(A(i,e.adler>>>16),A(i,65535&e.adler)),e.adler=1}if(69===i.status)if(i.gzhead.extra){for(a=i.pending;i.gzindex__left_angle_mark_(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>a&&(e.adler=s(e.adler,i.pending_buf,i.pending-a,a)),b(e),a=i.pending,i.pending!==i.pending_buf_size));)v(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>a&&(e.adler=s(e.adler,i.pending_buf,i.pending-a,a)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=73)}else i.status=73;if(73===i.status)if(i.gzhead.name){a=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>a&&(e.adler=s(e.adler,i.pending_buf,i.pending-a,a)),b(e),a=i.pending,i.pending===i.pending_buf_size)){l=1;break}l=i.gzindex__left_angle_mark_i.gzhead.name.length?255&i.gzhead.name.charCodeAt(i.gzindex++):0,v(i,l)}while(0!==l);i.gzhead.hcrc&&i.pending>a&&(e.adler=s(e.adler,i.pending_buf,i.pending-a,a)),0===l&&(i.gzindex=0,i.status=91)}else i.status=91;if(91===i.status)if(i.gzhead.comment){a=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>a&&(e.adler=s(e.adler,i.pending_buf,i.pending-a,a)),b(e),a=i.pending,i.pending===i.pending_buf_size)){l=1;break}l=i.gzindex__left_angle_mark_i.gzhead.comment.length?255&i.gzhead.comment.charCodeAt(i.gzindex++):0,v(i,l)}while(0!==l);i.gzhead.hcrc&&i.pending>a&&(e.adler=s(e.adler,i.pending_buf,i.pending-a,a)),0===l&&(i.status=h)}else i.status=h;if(i.status===h&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&b(e),i.pending+2__left_angle_mark_=i.pending_buf_size&&(v(i,255&e.adler),v(i,e.adler>>8&255),e.adler=0,i.status=f)):i.status=f),0!==i.pending){if(b(e),0===e.avail_out)return i.last_flush=-1,0}else if(0===e.avail_in&&g(t)__left_angle_mark_=g(r)&&4!==t)return m(e,-5);if(i.status===p&&0!==e.avail_in)return m(e,-5);if(0!==e.avail_in||0!==i.lookahead||0!==t&&i.status!==p){var w=2===i.strategy?function(e,t){for(var r;;){if(0===e.lookahead&&(S(e),0===e.lookahead)){if(0===t)return 1;break}if(e.match_length=0,r=o._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(y(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(y(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(y(e,!1),0===e.strm.avail_out)?1:2}(i,t):3===i.strategy?function(e,t){for(var r,n,i,a,s=e.window;;){if(e.lookahead__left_angle_mark_=c){if(S(e),e.lookahead__left_angle_mark_=c&&0===t)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&e.strstart>0&&(n=s[i=e.strstart-1])===s[++i]&&n===s[++i]&&n===s[++i]){a=e.strstart+c;do{}while(n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&i__left_angle_mark_a);e.match_length=c-(a-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(r=o._tr_tally(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=o._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(y(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(y(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(y(e,!1),0===e.strm.avail_out)?1:2}(i,t):n[i.level].func(i,t);if(3!==w&&4!==w||(i.status=p),1===w||3===w)return 0===e.avail_out&&(i.last_flush=-1),0;if(2===w&&(1===t?o._tr_align(i):5!==t&&(o._tr_stored_block(i,0,0,!1),3===t&&(_(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),b(e),0===e.avail_out))return i.last_flush=-1,0}return 4!==t?0:i.wrap__left_angle_mark_=0?1:(2===i.wrap?(v(i,255&e.adler),v(i,e.adler>>8&255),v(i,e.adler>>16&255),v(i,e.adler>>24&255),v(i,255&e.total_in),v(i,e.total_in>>8&255),v(i,e.total_in>>16&255),v(i,e.total_in>>24&255)):(A(i,e.adler>>>16),A(i,65535&e.adler)),b(e),i.wrap>0&&(i.wrap=-i.wrap),0!==i.pending?0:1)},t.deflateEnd=function(e){var t;return e&&e.state?42!==(t=e.state.status)&&69!==t&&73!==t&&91!==t&&t!==h&&t!==f&&t!==p?m(e,u):(e.state=null,t===f?m(e,-3):0):u},t.deflateSetDictionary=function(e,t){var r,n,o,s,l,c,d,h,f=t.length;if(!e||!e.state)return u;if(2===(s=(r=e.state).wrap)||1===s&&42!==r.status||r.lookahead)return u;for(1===s&&(e.adler=a(e.adler,t,f,0)),r.wrap=0,f>=r.w_size&&(0===s&&(_(r.head),r.strstart=0,r.block_start=0,r.insert=0),h=new i.Buf8(r.w_size),i.arraySet(h,t,f-r.w_size,r.w_size,0),t=h,f=r.w_size),l=e.avail_in,c=e.next_in,d=e.input,e.avail_in=f,e.next_in=0,e.input=t,S(r);r.lookahead>=3;){n=r.strstart,o=r.lookahead-2;do{r.ins_h=(r.ins_h__left_angle_mark___left_angle_mark_r.hash_shift^r.window[n+3-1])&r.hash_mask,r.prev[n&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=n,n++}while(--o);r.strstart=n,r.lookahead=2,S(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=2,r.match_available=0,e.next_in=c,e.input=d,e.avail_in=l,r.wrap=s,0},t.deflateInfo=\"pako deflate (from Nodeca project)\"},7357:e=>{e.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name=\"\",this.comment=\"\",this.hcrc=0,this.done=!1}},4980:e=>{e.exports=function(e,t){var r,n,i,o,a,s,l,u,c,d,h,f,p,m,g,_,b,y,v,A,w,S,E,x,C;r=e.state,n=e.next_in,x=e.input,i=n+(e.avail_in-5),o=e.next_out,C=e.output,a=o-(t-e.avail_out),s=o+(e.avail_out-257),l=r.dmax,u=r.wsize,c=r.whave,d=r.wnext,h=r.window,f=r.hold,p=r.bits,m=r.lencode,g=r.distcode,_=(1__left_angle_mark___left_angle_mark_r.lenbits)-1,b=(1__left_angle_mark___left_angle_mark_r.distbits)-1;e:do{p__left_angle_mark_15&&(f+=x[n++]__left_angle_mark___left_angle_mark_p,p+=8,f+=x[n++]__left_angle_mark___left_angle_mark_p,p+=8),y=m[f&_];t:for(;;){if(f>>>=v=y>>>24,p-=v,0==(v=y>>>16&255))C[o++]=65535&y;else{if(!(16&v)){if(!(64&v)){y=m[(65535&y)+(f&(1__left_angle_mark___left_angle_mark_v)-1)];continue t}if(32&v){r.mode=12;break e}e.msg=\"invalid literal/length code\",r.mode=30;break e}A=65535&y,(v&=15)&&(p__left_angle_mark_v&&(f+=x[n++]__left_angle_mark___left_angle_mark_p,p+=8),A+=f&(1__left_angle_mark___left_angle_mark_v)-1,f>>>=v,p-=v),p__left_angle_mark_15&&(f+=x[n++]__left_angle_mark___left_angle_mark_p,p+=8,f+=x[n++]__left_angle_mark___left_angle_mark_p,p+=8),y=g[f&b];r:for(;;){if(f>>>=v=y>>>24,p-=v,!(16&(v=y>>>16&255))){if(!(64&v)){y=g[(65535&y)+(f&(1__left_angle_mark___left_angle_mark_v)-1)];continue r}e.msg=\"invalid distance code\",r.mode=30;break e}if(w=65535&y,p__left_angle_mark_(v&=15)&&(f+=x[n++]__left_angle_mark___left_angle_mark_p,(p+=8)__left_angle_mark_v&&(f+=x[n++]__left_angle_mark___left_angle_mark_p,p+=8)),(w+=f&(1__left_angle_mark___left_angle_mark_v)-1)>l){e.msg=\"invalid distance too far back\",r.mode=30;break e}if(f>>>=v,p-=v,w>(v=o-a)){if((v=w-v)>c&&r.sane){e.msg=\"invalid distance too far back\",r.mode=30;break e}if(S=0,E=h,0===d){if(S+=u-v,v__left_angle_mark_A){A-=v;do{C[o++]=h[S++]}while(--v);S=o-w,E=C}}else if(d__left_angle_mark_v){if(S+=u+d-v,(v-=d)__left_angle_mark_A){A-=v;do{C[o++]=h[S++]}while(--v);if(S=0,d__left_angle_mark_A){A-=v=d;do{C[o++]=h[S++]}while(--v);S=o-w,E=C}}}else if(S+=d-v,v__left_angle_mark_A){A-=v;do{C[o++]=h[S++]}while(--v);S=o-w,E=C}for(;A>2;)C[o++]=E[S++],C[o++]=E[S++],C[o++]=E[S++],A-=3;A&&(C[o++]=E[S++],A>1&&(C[o++]=E[S++]))}else{S=o-w;do{C[o++]=C[S++],C[o++]=C[S++],C[o++]=C[S++],A-=3}while(A>2);A&&(C[o++]=C[S++],A>1&&(C[o++]=C[S++]))}break}}break}}while(n__left_angle_mark_i&&o__left_angle_mark_s);n-=A=p>>3,f&=(1__left_angle_mark___left_angle_mark_(p-=A__left_angle_mark___left_angle_mark_3))-1,e.next_in=n,e.next_out=o,e.avail_in=n__left_angle_mark_i?i-n+5:5-(n-i),e.avail_out=o__left_angle_mark_s?s-o+257:257-(o-s),r.hold=f,r.bits=p}},5020:(e,t,r)=>{var n=r(9761),i=r(5562),o=r(4299),a=r(4980),s=r(881),l=-2,u=12,c=30;function d(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)__left_angle_mark___left_angle_mark_8)+((255&e)__left_angle_mark___left_angle_mark_24)}function h(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new n.Buf16(320),this.work=new n.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function f(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg=\"\",t.wrap&&(e.adler=1&t.wrap),t.mode=1,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new n.Buf32(852),t.distcode=t.distdyn=new n.Buf32(592),t.sane=1,t.back=-1,0):l}function p(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,f(e)):l}function m(e,t){var r,n;return e&&e.state?(n=e.state,t__left_angle_mark_0?(r=0,t=-t):(r=1+(t>>4),t__left_angle_mark_48&&(t&=15)),t&&(t__left_angle_mark_8||t>15)?l:(null!==n.window&&n.wbits!==t&&(n.window=null),n.wrap=r,n.wbits=t,p(e))):l}function g(e,t){var r,n;return e?(n=new h,e.state=n,n.window=null,0!==(r=m(e,t))&&(e.state=null),r):l}var _,b,y=!0;function v(e){if(y){var t;for(_=new n.Buf32(512),b=new n.Buf32(32),t=0;t__left_angle_mark_144;)e.lens[t++]=8;for(;t__left_angle_mark_256;)e.lens[t++]=9;for(;t__left_angle_mark_280;)e.lens[t++]=7;for(;t__left_angle_mark_288;)e.lens[t++]=8;for(s(1,e.lens,0,288,_,0,e.work,{bits:9}),t=0;t__left_angle_mark_32;)e.lens[t++]=5;s(2,e.lens,0,32,b,0,e.work,{bits:5}),y=!1}e.lencode=_,e.lenbits=9,e.distcode=b,e.distbits=5}function A(e,t,r,i){var o,a=e.state;return null===a.window&&(a.wsize=1__left_angle_mark___left_angle_mark_a.wbits,a.wnext=0,a.whave=0,a.window=new n.Buf8(a.wsize)),i>=a.wsize?(n.arraySet(a.window,t,r-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):((o=a.wsize-a.wnext)>i&&(o=i),n.arraySet(a.window,t,r-i,o,a.wnext),(i-=o)?(n.arraySet(a.window,t,r-i,i,0),a.wnext=i,a.whave=a.wsize):(a.wnext+=o,a.wnext===a.wsize&&(a.wnext=0),a.whave__left_angle_mark_a.wsize&&(a.whave+=o))),0}t.inflateReset=p,t.inflateReset2=m,t.inflateResetKeep=f,t.inflateInit=function(e){return g(e,15)},t.inflateInit2=g,t.inflate=function(e,t){var r,h,f,p,m,g,_,b,y,w,S,E,x,C,T,R,I,k,P,M,O,B,N,j,L=0,D=new n.Buf8(4),F=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return l;(r=e.state).mode===u&&(r.mode=13),m=e.next_out,f=e.output,_=e.avail_out,p=e.next_in,h=e.input,g=e.avail_in,b=r.hold,y=r.bits,w=g,S=_,B=0;e:for(;;)switch(r.mode){case 1:if(0===r.wrap){r.mode=13;break}for(;y__left_angle_mark_16;){if(0===g)break e;g--,b+=h[p++]__left_angle_mark___left_angle_mark_y,y+=8}if(2&r.wrap&&35615===b){r.check=0,D[0]=255&b,D[1]=b>>>8&255,r.check=o(r.check,D,2,0),b=0,y=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&b)__left_angle_mark___left_angle_mark_8)+(b>>8))%31){e.msg=\"incorrect header check\",r.mode=c;break}if(8!=(15&b)){e.msg=\"unknown compression method\",r.mode=c;break}if(y-=4,O=8+(15&(b>>>=4)),0===r.wbits)r.wbits=O;else if(O>r.wbits){e.msg=\"invalid window size\",r.mode=c;break}r.dmax=1__left_angle_mark___left_angle_mark_O,e.adler=r.check=1,r.mode=512&b?10:u,b=0,y=0;break;case 2:for(;y__left_angle_mark_16;){if(0===g)break e;g--,b+=h[p++]__left_angle_mark___left_angle_mark_y,y+=8}if(r.flags=b,8!=(255&r.flags)){e.msg=\"unknown compression method\",r.mode=c;break}if(57344&r.flags){e.msg=\"unknown header flags set\",r.mode=c;break}r.head&&(r.head.text=b>>8&1),512&r.flags&&(D[0]=255&b,D[1]=b>>>8&255,r.check=o(r.check,D,2,0)),b=0,y=0,r.mode=3;case 3:for(;y__left_angle_mark_32;){if(0===g)break e;g--,b+=h[p++]__left_angle_mark___left_angle_mark_y,y+=8}r.head&&(r.head.time=b),512&r.flags&&(D[0]=255&b,D[1]=b>>>8&255,D[2]=b>>>16&255,D[3]=b>>>24&255,r.check=o(r.check,D,4,0)),b=0,y=0,r.mode=4;case 4:for(;y__left_angle_mark_16;){if(0===g)break e;g--,b+=h[p++]__left_angle_mark___left_angle_mark_y,y+=8}r.head&&(r.head.xflags=255&b,r.head.os=b>>8),512&r.flags&&(D[0]=255&b,D[1]=b>>>8&255,r.check=o(r.check,D,2,0)),b=0,y=0,r.mode=5;case 5:if(1024&r.flags){for(;y__left_angle_mark_16;){if(0===g)break e;g--,b+=h[p++]__left_angle_mark___left_angle_mark_y,y+=8}r.length=b,r.head&&(r.head.extra_len=b),512&r.flags&&(D[0]=255&b,D[1]=b>>>8&255,r.check=o(r.check,D,2,0)),b=0,y=0}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&((E=r.length)>g&&(E=g),E&&(r.head&&(O=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),n.arraySet(r.head.extra,h,p,E,O)),512&r.flags&&(r.check=o(r.check,h,E,p)),g-=E,p+=E,r.length-=E),r.length))break e;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(0===g)break e;E=0;do{O=h[p+E++],r.head&&O&&r.length__left_angle_mark_65536&&(r.head.name+=String.fromCharCode(O))}while(O&&E__left_angle_mark_g);if(512&r.flags&&(r.check=o(r.check,h,E,p)),g-=E,p+=E,O)break e}else r.head&&(r.head.name=null);r.length=0,r.mode=8;case 8:if(4096&r.flags){if(0===g)break e;E=0;do{O=h[p+E++],r.head&&O&&r.length__left_angle_mark_65536&&(r.head.comment+=String.fromCharCode(O))}while(O&&E__left_angle_mark_g);if(512&r.flags&&(r.check=o(r.check,h,E,p)),g-=E,p+=E,O)break e}else r.head&&(r.head.comment=null);r.mode=9;case 9:if(512&r.flags){for(;y__left_angle_mark_16;){if(0===g)break e;g--,b+=h[p++]__left_angle_mark___left_angle_mark_y,y+=8}if(b!==(65535&r.check)){e.msg=\"header crc mismatch\",r.mode=c;break}b=0,y=0}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=u;break;case 10:for(;y__left_angle_mark_32;){if(0===g)break e;g--,b+=h[p++]__left_angle_mark___left_angle_mark_y,y+=8}e.adler=r.check=d(b),b=0,y=0,r.mode=11;case 11:if(0===r.havedict)return e.next_out=m,e.avail_out=_,e.next_in=p,e.avail_in=g,r.hold=b,r.bits=y,2;e.adler=r.check=1,r.mode=u;case u:if(5===t||6===t)break e;case 13:if(r.last){b>>>=7&y,y-=7&y,r.mode=27;break}for(;y__left_angle_mark_3;){if(0===g)break e;g--,b+=h[p++]__left_angle_mark___left_angle_mark_y,y+=8}switch(r.last=1&b,y-=1,3&(b>>>=1)){case 0:r.mode=14;break;case 1:if(v(r),r.mode=20,6===t){b>>>=2,y-=2;break e}break;case 2:r.mode=17;break;case 3:e.msg=\"invalid block type\",r.mode=c}b>>>=2,y-=2;break;case 14:for(b>>>=7&y,y-=7&y;y__left_angle_mark_32;){if(0===g)break e;g--,b+=h[p++]__left_angle_mark___left_angle_mark_y,y+=8}if((65535&b)!=(b>>>16^65535)){e.msg=\"invalid stored block lengths\",r.mode=c;break}if(r.length=65535&b,b=0,y=0,r.mode=15,6===t)break e;case 15:r.mode=16;case 16:if(E=r.length){if(E>g&&(E=g),E>_&&(E=_),0===E)break e;n.arraySet(f,h,p,E,m),g-=E,p+=E,_-=E,m+=E,r.length-=E;break}r.mode=u;break;case 17:for(;y__left_angle_mark_14;){if(0===g)break e;g--,b+=h[p++]__left_angle_mark___left_angle_mark_y,y+=8}if(r.nlen=257+(31&b),b>>>=5,y-=5,r.ndist=1+(31&b),b>>>=5,y-=5,r.ncode=4+(15&b),b>>>=4,y-=4,r.nlen>286||r.ndist>30){e.msg=\"too many length or distance symbols\",r.mode=c;break}r.have=0,r.mode=18;case 18:for(;r.have__left_angle_mark_r.ncode;){for(;y__left_angle_mark_3;){if(0===g)break e;g--,b+=h[p++]__left_angle_mark___left_angle_mark_y,y+=8}r.lens[F[r.have++]]=7&b,b>>>=3,y-=3}for(;r.have__left_angle_mark_19;)r.lens[F[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,N={bits:r.lenbits},B=s(0,r.lens,0,19,r.lencode,0,r.work,N),r.lenbits=N.bits,B){e.msg=\"invalid code lengths set\",r.mode=c;break}r.have=0,r.mode=19;case 19:for(;r.have__left_angle_mark_r.nlen+r.ndist;){for(;R=(L=r.lencode[b&(1__left_angle_mark___left_angle_mark_r.lenbits)-1])>>>16&255,I=65535&L,!((T=L>>>24)__left_angle_mark_=y);){if(0===g)break e;g--,b+=h[p++]__left_angle_mark___left_angle_mark_y,y+=8}if(I__left_angle_mark_16)b>>>=T,y-=T,r.lens[r.have++]=I;else{if(16===I){for(j=T+2;y__left_angle_mark_j;){if(0===g)break e;g--,b+=h[p++]__left_angle_mark___left_angle_mark_y,y+=8}if(b>>>=T,y-=T,0===r.have){e.msg=\"invalid bit length repeat\",r.mode=c;break}O=r.lens[r.have-1],E=3+(3&b),b>>>=2,y-=2}else if(17===I){for(j=T+3;y__left_angle_mark_j;){if(0===g)break e;g--,b+=h[p++]__left_angle_mark___left_angle_mark_y,y+=8}y-=T,O=0,E=3+(7&(b>>>=T)),b>>>=3,y-=3}else{for(j=T+7;y__left_angle_mark_j;){if(0===g)break e;g--,b+=h[p++]__left_angle_mark___left_angle_mark_y,y+=8}y-=T,O=0,E=11+(127&(b>>>=T)),b>>>=7,y-=7}if(r.have+E>r.nlen+r.ndist){e.msg=\"invalid bit length repeat\",r.mode=c;break}for(;E--;)r.lens[r.have++]=O}}if(r.mode===c)break;if(0===r.lens[256]){e.msg=\"invalid code -- missing end-of-block\",r.mode=c;break}if(r.lenbits=9,N={bits:r.lenbits},B=s(1,r.lens,0,r.nlen,r.lencode,0,r.work,N),r.lenbits=N.bits,B){e.msg=\"invalid literal/lengths set\",r.mode=c;break}if(r.distbits=6,r.distcode=r.distdyn,N={bits:r.distbits},B=s(2,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,N),r.distbits=N.bits,B){e.msg=\"invalid distances set\",r.mode=c;break}if(r.mode=20,6===t)break e;case 20:r.mode=21;case 21:if(g>=6&&_>=258){e.next_out=m,e.avail_out=_,e.next_in=p,e.avail_in=g,r.hold=b,r.bits=y,a(e,S),m=e.next_out,f=e.output,_=e.avail_out,p=e.next_in,h=e.input,g=e.avail_in,b=r.hold,y=r.bits,r.mode===u&&(r.back=-1);break}for(r.back=0;R=(L=r.lencode[b&(1__left_angle_mark___left_angle_mark_r.lenbits)-1])>>>16&255,I=65535&L,!((T=L>>>24)__left_angle_mark_=y);){if(0===g)break e;g--,b+=h[p++]__left_angle_mark___left_angle_mark_y,y+=8}if(R&&!(240&R)){for(k=T,P=R,M=I;R=(L=r.lencode[M+((b&(1__left_angle_mark___left_angle_mark_k+P)-1)>>k)])>>>16&255,I=65535&L,!(k+(T=L>>>24)__left_angle_mark_=y);){if(0===g)break e;g--,b+=h[p++]__left_angle_mark___left_angle_mark_y,y+=8}b>>>=k,y-=k,r.back+=k}if(b>>>=T,y-=T,r.back+=T,r.length=I,0===R){r.mode=26;break}if(32&R){r.back=-1,r.mode=u;break}if(64&R){e.msg=\"invalid literal/length code\",r.mode=c;break}r.extra=15&R,r.mode=22;case 22:if(r.extra){for(j=r.extra;y__left_angle_mark_j;){if(0===g)break e;g--,b+=h[p++]__left_angle_mark___left_angle_mark_y,y+=8}r.length+=b&(1__left_angle_mark___left_angle_mark_r.extra)-1,b>>>=r.extra,y-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=23;case 23:for(;R=(L=r.distcode[b&(1__left_angle_mark___left_angle_mark_r.distbits)-1])>>>16&255,I=65535&L,!((T=L>>>24)__left_angle_mark_=y);){if(0===g)break e;g--,b+=h[p++]__left_angle_mark___left_angle_mark_y,y+=8}if(!(240&R)){for(k=T,P=R,M=I;R=(L=r.distcode[M+((b&(1__left_angle_mark___left_angle_mark_k+P)-1)>>k)])>>>16&255,I=65535&L,!(k+(T=L>>>24)__left_angle_mark_=y);){if(0===g)break e;g--,b+=h[p++]__left_angle_mark___left_angle_mark_y,y+=8}b>>>=k,y-=k,r.back+=k}if(b>>>=T,y-=T,r.back+=T,64&R){e.msg=\"invalid distance code\",r.mode=c;break}r.offset=I,r.extra=15&R,r.mode=24;case 24:if(r.extra){for(j=r.extra;y__left_angle_mark_j;){if(0===g)break e;g--,b+=h[p++]__left_angle_mark___left_angle_mark_y,y+=8}r.offset+=b&(1__left_angle_mark___left_angle_mark_r.extra)-1,b>>>=r.extra,y-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg=\"invalid distance too far back\",r.mode=c;break}r.mode=25;case 25:if(0===_)break e;if(E=S-_,r.offset>E){if((E=r.offset-E)>r.whave&&r.sane){e.msg=\"invalid distance too far back\",r.mode=c;break}E>r.wnext?(E-=r.wnext,x=r.wsize-E):x=r.wnext-E,E>r.length&&(E=r.length),C=r.window}else C=f,x=m-r.offset,E=r.length;E>_&&(E=_),_-=E,r.length-=E;do{f[m++]=C[x++]}while(--E);0===r.length&&(r.mode=21);break;case 26:if(0===_)break e;f[m++]=r.length,_--,r.mode=21;break;case 27:if(r.wrap){for(;y__left_angle_mark_32;){if(0===g)break e;g--,b|=h[p++]__left_angle_mark___left_angle_mark_y,y+=8}if(S-=_,e.total_out+=S,r.total+=S,S&&(e.adler=r.check=r.flags?o(r.check,f,S,m-S):i(r.check,f,S,m-S)),S=_,(r.flags?b:d(b))!==r.check){e.msg=\"incorrect data check\",r.mode=c;break}b=0,y=0}r.mode=28;case 28:if(r.wrap&&r.flags){for(;y__left_angle_mark_32;){if(0===g)break e;g--,b+=h[p++]__left_angle_mark___left_angle_mark_y,y+=8}if(b!==(4294967295&r.total)){e.msg=\"incorrect length check\",r.mode=c;break}b=0,y=0}r.mode=29;case 29:B=1;break e;case c:B=-3;break e;case 31:return-4;default:return l}return e.next_out=m,e.avail_out=_,e.next_in=p,e.avail_in=g,r.hold=b,r.bits=y,(r.wsize||S!==e.avail_out&&r.mode__left_angle_mark_c&&(r.mode__left_angle_mark_27||4!==t))&&A(e,e.output,e.next_out,S-e.avail_out)?(r.mode=31,-4):(w-=e.avail_in,S-=e.avail_out,e.total_in+=w,e.total_out+=S,r.total+=S,r.wrap&&S&&(e.adler=r.check=r.flags?o(r.check,f,S,e.next_out-S):i(r.check,f,S,e.next_out-S)),e.data_type=r.bits+(r.last?64:0)+(r.mode===u?128:0)+(20===r.mode||15===r.mode?256:0),(0===w&&0===S||4===t)&&0===B&&(B=-5),B)},t.inflateEnd=function(e){if(!e||!e.state)return l;var t=e.state;return t.window&&(t.window=null),e.state=null,0},t.inflateGetHeader=function(e,t){var r;return e&&e.state&&2&(r=e.state).wrap?(r.head=t,t.done=!1,0):l},t.inflateSetDictionary=function(e,t){var r,n=t.length;return e&&e.state?0!==(r=e.state).wrap&&11!==r.mode?l:11===r.mode&&i(1,t,n,0)!==r.check?-3:A(e,t,n,n)?(r.mode=31,-4):(r.havedict=1,0):l},t.inflateInfo=\"pako inflate (from Nodeca project)\"},881:(e,t,r)=>{var n=r(9761),i=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],o=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],a=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],s=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];e.exports=function(e,t,r,l,u,c,d,h){var f,p,m,g,_,b,y,v,A,w=h.bits,S=0,E=0,x=0,C=0,T=0,R=0,I=0,k=0,P=0,M=0,O=null,B=0,N=new n.Buf16(16),j=new n.Buf16(16),L=null,D=0;for(S=0;S__left_angle_mark_=15;S++)N[S]=0;for(E=0;E__left_angle_mark_l;E++)N[t[r+E]]++;for(T=w,C=15;C>=1&&0===N[C];C--);if(T>C&&(T=C),0===C)return u[c++]=20971520,u[c++]=20971520,h.bits=1,0;for(x=1;x__left_angle_mark_C&&0===N[x];x++);for(T__left_angle_mark_x&&(T=x),k=1,S=1;S__left_angle_mark_=15;S++)if(k__left_angle_mark___left_angle_mark_=1,(k-=N[S])__left_angle_mark_0)return-1;if(k>0&&(0===e||1!==C))return-1;for(j[1]=0,S=1;S__left_angle_mark_15;S++)j[S+1]=j[S]+N[S];for(E=0;E__left_angle_mark_l;E++)0!==t[r+E]&&(d[j[t[r+E]]++]=E);if(0===e?(O=L=d,b=19):1===e?(O=i,B-=257,L=o,D-=257,b=256):(O=a,L=s,b=-1),M=0,E=0,S=x,_=c,R=T,I=0,m=-1,g=(P=1__left_angle_mark___left_angle_mark_T)-1,1===e&&P>852||2===e&&P>592)return 1;for(;;){y=S-I,d[E]__left_angle_mark_b?(v=0,A=d[E]):d[E]>b?(v=L[D+d[E]],A=O[B+d[E]]):(v=96,A=0),f=1__left_angle_mark___left_angle_mark_S-I,x=p=1__left_angle_mark___left_angle_mark_R;do{u[_+(M>>I)+(p-=f)]=y__left_angle_mark___left_angle_mark_24|v__left_angle_mark___left_angle_mark_16|A}while(0!==p);for(f=1__left_angle_mark___left_angle_mark_S-1;M&f;)f>>=1;if(0!==f?(M&=f-1,M+=f):M=0,E++,0==--N[S]){if(S===C)break;S=t[r+d[E]]}if(S>T&&(M&g)!==m){for(0===I&&(I=T),_+=x,k=1__left_angle_mark___left_angle_mark_(R=S-I);R+I__left_angle_mark_C&&!((k-=N[R+I])__left_angle_mark_=0);)R++,k__left_angle_mark___left_angle_mark_=1;if(P+=1__left_angle_mark___left_angle_mark_R,1===e&&P>852||2===e&&P>592)return 1;u[m=M&g]=T__left_angle_mark___left_angle_mark_24|R__left_angle_mark___left_angle_mark_16|_-c}}return 0!==M&&(u[_+M]=S-I__left_angle_mark___left_angle_mark_24|64__left_angle_mark___left_angle_mark_16),h.bits=T,0}},2950:e=>{e.exports={2:\"need dictionary\",1:\"stream end\",0:\"\",\"-1\":\"file error\",\"-2\":\"stream error\",\"-3\":\"data error\",\"-4\":\"insufficient memory\",\"-5\":\"buffer error\",\"-6\":\"incompatible version\"}},9564:(e,t,r)=>{var n=r(9761);function i(e){for(var t=e.length;--t>=0;)e[t]=0}var o=256,a=286,s=30,l=15,u=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],c=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],d=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],h=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],f=new Array(576);i(f);var p=new Array(60);i(p);var m=new Array(512);i(m);var g=new Array(256);i(g);var _=new Array(29);i(_);var b,y,v,A=new Array(s);function w(e,t,r,n,i){this.static_tree=e,this.extra_bits=t,this.extra_base=r,this.elems=n,this.max_length=i,this.has_stree=e&&e.length}function S(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function E(e){return e__left_angle_mark_256?m[e]:m[256+(e>>>7)]}function x(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function C(e,t,r){e.bi_valid>16-r?(e.bi_buf|=t__left_angle_mark___left_angle_mark_e.bi_valid&65535,x(e,e.bi_buf),e.bi_buf=t>>16-e.bi_valid,e.bi_valid+=r-16):(e.bi_buf|=t__left_angle_mark___left_angle_mark_e.bi_valid&65535,e.bi_valid+=r)}function T(e,t,r){C(e,r[2*t],r[2*t+1])}function R(e,t){var r=0;do{r|=1&e,e>>>=1,r__left_angle_mark___left_angle_mark_=1}while(--t>0);return r>>>1}function I(e,t,r){var n,i,o=new Array(16),a=0;for(n=1;n__left_angle_mark_=l;n++)o[n]=a=a+r[n-1]__left_angle_mark___left_angle_mark_1;for(i=0;i__left_angle_mark_=t;i++){var s=e[2*i+1];0!==s&&(e[2*i]=R(o[s]++,s))}}function k(e){var t;for(t=0;t__left_angle_mark_a;t++)e.dyn_ltree[2*t]=0;for(t=0;t__left_angle_mark_s;t++)e.dyn_dtree[2*t]=0;for(t=0;t__left_angle_mark_19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function P(e){e.bi_valid>8?x(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function M(e,t,r,n){var i=2*t,o=2*r;return e[i]__left_angle_mark_e[o]||e[i]===e[o]&&n[t]__left_angle_mark_=n[r]}function O(e,t,r){for(var n=e.heap[r],i=r__left_angle_mark___left_angle_mark_1;i__left_angle_mark_=e.heap_len&&(i__left_angle_mark_e.heap_len&&M(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!M(t,n,e.heap[i],e.depth));)e.heap[r]=e.heap[i],r=i,i__left_angle_mark___left_angle_mark_=1;e.heap[r]=n}function B(e,t,r){var n,i,a,s,l=0;if(0!==e.last_lit)do{n=e.pending_buf[e.d_buf+2*l]__left_angle_mark___left_angle_mark_8|e.pending_buf[e.d_buf+2*l+1],i=e.pending_buf[e.l_buf+l],l++,0===n?T(e,i,t):(T(e,(a=g[i])+o+1,t),0!==(s=u[a])&&C(e,i-=_[a],s),T(e,a=E(--n),r),0!==(s=c[a])&&C(e,n-=A[a],s))}while(l__left_angle_mark_e.last_lit);T(e,256,t)}function N(e,t){var r,n,i,o=t.dyn_tree,a=t.stat_desc.static_tree,s=t.stat_desc.has_stree,u=t.stat_desc.elems,c=-1;for(e.heap_len=0,e.heap_max=573,r=0;r__left_angle_mark_u;r++)0!==o[2*r]?(e.heap[++e.heap_len]=c=r,e.depth[r]=0):o[2*r+1]=0;for(;e.heap_len__left_angle_mark_2;)o[2*(i=e.heap[++e.heap_len]=c__left_angle_mark_2?++c:0)]=1,e.depth[i]=0,e.opt_len--,s&&(e.static_len-=a[2*i+1]);for(t.max_code=c,r=e.heap_len>>1;r>=1;r--)O(e,o,r);i=u;do{r=e.heap[1],e.heap[1]=e.heap[e.heap_len--],O(e,o,1),n=e.heap[1],e.heap[--e.heap_max]=r,e.heap[--e.heap_max]=n,o[2*i]=o[2*r]+o[2*n],e.depth[i]=(e.depth[r]>=e.depth[n]?e.depth[r]:e.depth[n])+1,o[2*r+1]=o[2*n+1]=i,e.heap[1]=i++,O(e,o,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],function(e,t){var r,n,i,o,a,s,u=t.dyn_tree,c=t.max_code,d=t.stat_desc.static_tree,h=t.stat_desc.has_stree,f=t.stat_desc.extra_bits,p=t.stat_desc.extra_base,m=t.stat_desc.max_length,g=0;for(o=0;o__left_angle_mark_=l;o++)e.bl_count[o]=0;for(u[2*e.heap[e.heap_max]+1]=0,r=e.heap_max+1;r__left_angle_mark_573;r++)(o=u[2*u[2*(n=e.heap[r])+1]+1]+1)>m&&(o=m,g++),u[2*n+1]=o,n>c||(e.bl_count[o]++,a=0,n>=p&&(a=f[n-p]),s=u[2*n],e.opt_len+=s*(o+a),h&&(e.static_len+=s*(d[2*n+1]+a)));if(0!==g){do{for(o=m-1;0===e.bl_count[o];)o--;e.bl_count[o]--,e.bl_count[o+1]+=2,e.bl_count[m]--,g-=2}while(g>0);for(o=m;0!==o;o--)for(n=e.bl_count[o];0!==n;)(i=e.heap[--r])>c||(u[2*i+1]!==o&&(e.opt_len+=(o-u[2*i+1])*u[2*i],u[2*i+1]=o),n--)}}(e,t),I(o,c,e.bl_count)}function j(e,t,r){var n,i,o=-1,a=t[1],s=0,l=7,u=4;for(0===a&&(l=138,u=3),t[2*(r+1)+1]=65535,n=0;n__left_angle_mark_=r;n++)i=a,a=t[2*(n+1)+1],++s__left_angle_mark_l&&i===a||(s__left_angle_mark_u?e.bl_tree[2*i]+=s:0!==i?(i!==o&&e.bl_tree[2*i]++,e.bl_tree[32]++):s__left_angle_mark_=10?e.bl_tree[34]++:e.bl_tree[36]++,s=0,o=i,0===a?(l=138,u=3):i===a?(l=6,u=3):(l=7,u=4))}function L(e,t,r){var n,i,o=-1,a=t[1],s=0,l=7,u=4;for(0===a&&(l=138,u=3),n=0;n__left_angle_mark_=r;n++)if(i=a,a=t[2*(n+1)+1],!(++s__left_angle_mark_l&&i===a)){if(s__left_angle_mark_u)do{T(e,i,e.bl_tree)}while(0!=--s);else 0!==i?(i!==o&&(T(e,i,e.bl_tree),s--),T(e,16,e.bl_tree),C(e,s-3,2)):s__left_angle_mark_=10?(T(e,17,e.bl_tree),C(e,s-3,3)):(T(e,18,e.bl_tree),C(e,s-11,7));s=0,o=i,0===a?(l=138,u=3):i===a?(l=6,u=3):(l=7,u=4)}}i(A);var D=!1;function F(e,t,r,i){var o,a,s;C(e,0+(i?1:0),3),a=t,s=r,P(o=e),x(o,s),x(o,~s),n.arraySet(o.pending_buf,o.window,a,s,o.pending),o.pending+=s}t._tr_init=function(e){D||(function(){var e,t,r,n,i,o=new Array(16);for(r=0,n=0;n__left_angle_mark_28;n++)for(_[n]=r,e=0;e__left_angle_mark_1__left_angle_mark___left_angle_mark_u[n];e++)g[r++]=n;for(g[r-1]=n,i=0,n=0;n__left_angle_mark_16;n++)for(A[n]=i,e=0;e__left_angle_mark_1__left_angle_mark___left_angle_mark_c[n];e++)m[i++]=n;for(i>>=7;n__left_angle_mark_s;n++)for(A[n]=i__left_angle_mark___left_angle_mark_7,e=0;e__left_angle_mark_1__left_angle_mark___left_angle_mark_c[n]-7;e++)m[256+i++]=n;for(t=0;t__left_angle_mark_=l;t++)o[t]=0;for(e=0;e__left_angle_mark_=143;)f[2*e+1]=8,e++,o[8]++;for(;e__left_angle_mark_=255;)f[2*e+1]=9,e++,o[9]++;for(;e__left_angle_mark_=279;)f[2*e+1]=7,e++,o[7]++;for(;e__left_angle_mark_=287;)f[2*e+1]=8,e++,o[8]++;for(I(f,287,o),e=0;e__left_angle_mark_s;e++)p[2*e+1]=5,p[2*e]=R(e,5);b=new w(f,u,257,a,l),y=new w(p,c,0,s,l),v=new w(new Array(0),d,0,19,7)}(),D=!0),e.l_desc=new S(e.dyn_ltree,b),e.d_desc=new S(e.dyn_dtree,y),e.bl_desc=new S(e.bl_tree,v),e.bi_buf=0,e.bi_valid=0,k(e)},t._tr_stored_block=F,t._tr_flush_block=function(e,t,r,n){var i,a,s=0;e.level>0?(2===e.strm.data_type&&(e.strm.data_type=function(e){var t,r=4093624447;for(t=0;t__left_angle_mark_=31;t++,r>>>=1)if(1&r&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t__left_angle_mark_o;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0}(e)),N(e,e.l_desc),N(e,e.d_desc),s=function(e){var t;for(j(e,e.dyn_ltree,e.l_desc.max_code),j(e,e.dyn_dtree,e.d_desc.max_code),N(e,e.bl_desc),t=18;t>=3&&0===e.bl_tree[2*h[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),i=e.opt_len+3+7>>>3,(a=e.static_len+3+7>>>3)__left_angle_mark_=i&&(i=a)):i=a=r+5,r+4__left_angle_mark_=i&&-1!==t?F(e,t,r,n):4===e.strategy||a===i?(C(e,2+(n?1:0),3),B(e,f,p)):(C(e,4+(n?1:0),3),function(e,t,r,n){var i;for(C(e,t-257,5),C(e,r-1,5),C(e,n-4,4),i=0;i__left_angle_mark_n;i++)C(e,e.bl_tree[2*h[i]+1],3);L(e,e.dyn_ltree,t-1),L(e,e.dyn_dtree,r-1)}(e,e.l_desc.max_code+1,e.d_desc.max_code+1,s+1),B(e,e.dyn_ltree,e.dyn_dtree)),k(e),n&&P(e)},t._tr_tally=function(e,t,r){return e.pending_buf[e.d_buf+2*e.last_lit]=t>>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&r,e.last_lit++,0===t?e.dyn_ltree[2*r]++:(e.matches++,t--,e.dyn_ltree[2*(g[r]+o+1)]++,e.dyn_dtree[2*E(t)]++),e.last_lit===e.lit_bufsize-1},t._tr_align=function(e){var t;C(e,2,3),T(e,256,f),16===(t=e).bi_valid?(x(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}},744:e=>{e.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg=\"\",this.state=null,this.data_type=2,this.adler=0}},4398:e=>{function t(e,t){if(!(e=e.replace(/\\t+/g,\" \").trim()))return null;var n=e.indexOf(\" \");if(-1===n)throw new Error(\"no named row at line \"+t);var i=e.substring(0,n);e=(e=(e=(e=e.substring(n+1)).replace(/letter=[\\'\\\"]\\S+[\\'\\\"]/gi,\"\")).split(\"=\")).map((function(e){return e.trim().match(/(\".*?\"|[^\"\\s]+)+(?=\\s*|\\s*$)/g)}));for(var o=[],a=0;a__left_angle_mark_e.length;a++){var s=e[a];0===a?o.push({key:s[0],data:\"\"}):a===e.length-1?o[o.length-1].data=r(s[0]):(o[o.length-1].data=r(s[0]),o.push({key:s[1],data:\"\"}))}var l={key:i,data:{}};return o.forEach((function(e){l.data[e.key]=e.data})),l}function r(e){return e&&0!==e.length?0===e.indexOf('\"')||0===e.indexOf(\"'\")?e.substring(1,e.length-1):-1!==e.indexOf(\",\")?e.split(\",\").map((function(e){return parseInt(e,10)})):parseInt(e,10):\"\"}e.exports=function(e){if(!e)throw new Error(\"no data provided\");var r={pages:[],chars:[],kernings:[]},n=(e=e.toString().trim()).split(/\\r\\n?|\\n/g);if(0===n.length)throw new Error(\"no data in BMFont file\");for(var i=0;i__left_angle_mark_n.length;i++){var o=t(n[i],i);if(o)if(\"page\"===o.key){if(\"number\"!=typeof o.data.id)throw new Error(\"malformed file at line \"+i+\" -- needs page id=N\");if(\"string\"!=typeof o.data.file)throw new Error(\"malformed file at line \"+i+' -- needs page file=\"path\"');r.pages[o.data.id]=o.data.file}else\"chars\"===o.key||\"kernings\"===o.key||(\"char\"===o.key?r.chars.push(o.data):\"kerning\"===o.key?r.kernings.push(o.data):r[o.key]=o.data)}return r}},8438:e=>{var t=[66,77,70];function r(e,t,r){if(r>t.length-1)return 0;var i,o,a,s=t.readUInt8(r++),l=t.readInt32LE(r);switch(r+=4,s){case 1:e.info=function(e,t){var r={};r.size=e.readInt16LE(t);var i=e.readUInt8(t+2);return r.smooth=i>>7&1,r.unicode=i>>6&1,r.italic=i>>5&1,r.bold=i>>4&1,i>>3&1&&(r.fixedHeight=1),r.charset=e.readUInt8(t+3)||\"\",r.stretchH=e.readUInt16LE(t+4),r.aa=e.readUInt8(t+6),r.padding=[e.readInt8(t+7),e.readInt8(t+8),e.readInt8(t+9),e.readInt8(t+10)],r.spacing=[e.readInt8(t+11),e.readInt8(t+12)],r.outline=e.readUInt8(t+13),r.face=n(e,t+14).toString(\"utf8\"),r}(t,r);break;case 2:e.common=(o=r,(a={}).lineHeight=(i=t).readUInt16LE(o),a.base=i.readUInt16LE(o+2),a.scaleW=i.readUInt16LE(o+4),a.scaleH=i.readUInt16LE(o+6),a.pages=i.readUInt16LE(o+8),i.readUInt8(o+10),a.packed=0,a.alphaChnl=i.readUInt8(o+11),a.redChnl=i.readUInt8(o+12),a.greenChnl=i.readUInt8(o+13),a.blueChnl=i.readUInt8(o+14),a);break;case 3:e.pages=function(e,t,r){for(var i=[],o=n(e,t),a=o.length+1,s=r/a,l=0;l__left_angle_mark_s;l++)i[l]=e.slice(t,t+o.length).toString(\"utf8\"),t+=a;return i}(t,r,l);break;case 4:e.chars=function(e,t,r){for(var n=[],i=r/20,o=0;o__left_angle_mark_i;o++){var a={},s=20*o;a.id=e.readUInt32LE(t+0+s),a.x=e.readUInt16LE(t+4+s),a.y=e.readUInt16LE(t+6+s),a.width=e.readUInt16LE(t+8+s),a.height=e.readUInt16LE(t+10+s),a.xoffset=e.readInt16LE(t+12+s),a.yoffset=e.readInt16LE(t+14+s),a.xadvance=e.readInt16LE(t+16+s),a.page=e.readUInt8(t+18+s),a.chnl=e.readUInt8(t+19+s),n[o]=a}return n}(t,r,l);break;case 5:e.kernings=function(e,t,r){for(var n=[],i=r/10,o=0;o__left_angle_mark_i;o++){var a={},s=10*o;a.first=e.readUInt32LE(t+0+s),a.second=e.readUInt32LE(t+4+s),a.amount=e.readInt16LE(t+8+s),n[o]=a}return n}(t,r,l)}return 5+l}function n(e,t){for(var r=t;r__left_angle_mark_e.length&&0!==e[r];r++);return e.slice(t,r)}e.exports=function(e){if(e.length__left_angle_mark_6)throw new Error(\"invalid buffer length for BMFont\");if(!t.every((function(t,r){return e.readUInt8(r)===t})))throw new Error(\"BMFont missing BMF byte header\");var n=3;if(e.readUInt8(n++)>3)throw new Error(\"Only supports BMFont Binary v3 (BMFont App v1.10)\");for(var i={kernings:[],chars:[]},o=0;o__left_angle_mark_5;o++)n+=r(i,e,n);return i}},5947:(e,t,r)=>{var n=r(403),i=r(1596),o={scaleh:\"scaleH\",scalew:\"scaleW\",stretchh:\"stretchH\",lineheight:\"lineHeight\",alphachnl:\"alphaChnl\",redchnl:\"redChnl\",greenchnl:\"greenChnl\",bluechnl:\"blueChnl\"};function a(e){return function(e){for(var t=[],r=0;r__left_angle_mark_e.attributes.length;r++)t.push(e.attributes[r]);return t}(e).reduce((function(e,t){var r;return e[(r=t.nodeName,o[r.toLowerCase()]||r)]=t.nodeValue,e}),{})}e.exports=function(e){e=e.toString();var t=i(e),r={pages:[],chars:[],kernings:[]};[\"info\",\"common\"].forEach((function(e){var i=t.getElementsByTagName(e)[0];i&&(r[e]=n(a(i)))}));var o=t.getElementsByTagName(\"pages\")[0];if(!o)throw new Error(\"malformed file -- no __left_angle_mark_pages> element\");for(var s=o.getElementsByTagName(\"page\"),l=0;l__left_angle_mark_s.length;l++){var u=s[l],c=parseInt(u.getAttribute(\"id\"),10),d=u.getAttribute(\"file\");if(isNaN(c))throw new Error('malformed file -- page \"id\" attribute is NaN');if(!d)throw new Error('malformed file -- needs page \"file\" attribute');r.pages[parseInt(c,10)]=d}return[\"chars\",\"kernings\"].forEach((function(e){var i=t.getElementsByTagName(e)[0];if(i)for(var o=e.substring(0,e.length-1),s=i.getElementsByTagName(o),l=0;l__left_angle_mark_s.length;l++){var u=s[l];r[e].push(n(a(u)))}})),r}},403:e=>{var t=\"chasrset\";e.exports=function(e){for(var r in t in e&&(e.charset=e[t],delete e[t]),e)\"face\"!==r&&\"charset\"!==r&&(e[r]=\"padding\"===r||\"spacing\"===r?e[r].split(\",\").map((function(e){return parseInt(e,10)})):parseInt(e[r],10));return e}},4655:(e,t,r)=>{var n=r(311),i=r(3243);e.exports=function(e){if(!e)return{};var t={};return i(n(e).split(\"\\n\"),(function(e){var r,i=e.indexOf(\":\"),o=n(e.slice(0,i)).toLowerCase(),a=n(e.slice(i+1));void 0===t[o]?t[o]=a:(r=t[o],\"[object Array]\"===Object.prototype.toString.call(r)?t[o].push(a):t[o]=[t[o],a])})),t}},1023:(e,t,r)=>{var n=r(4406);function i(e){if(\"string\"!=typeof e)throw new TypeError(\"Path must be a string. Received \"+JSON.stringify(e))}function o(e,t){for(var r,n=\"\",i=0,o=-1,a=0,s=0;s__left_angle_mark_=e.length;++s){if(s__left_angle_mark_e.length)r=e.charCodeAt(s);else{if(47===r)break;r=47}if(47===r){if(o===s-1||1===a);else if(o!==s-1&&2===a){if(n.length__left_angle_mark_2||2!==i||46!==n.charCodeAt(n.length-1)||46!==n.charCodeAt(n.length-2))if(n.length>2){var l=n.lastIndexOf(\"/\");if(l!==n.length-1){-1===l?(n=\"\",i=0):i=(n=n.slice(0,l)).length-1-n.lastIndexOf(\"/\"),o=s,a=0;continue}}else if(2===n.length||1===n.length){n=\"\",i=0,o=s,a=0;continue}t&&(n.length>0?n+=\"/..\":n=\"..\",i=2)}else n.length>0?n+=\"/\"+e.slice(o+1,s):n=e.slice(o+1,s),i=s-o-1;o=s,a=0}else 46===r&&-1!==a?++a:a=-1}return n}var a={resolve:function(){for(var e,t=\"\",r=!1,a=arguments.length-1;a>=-1&&!r;a--){var s;a>=0?s=arguments[a]:(void 0===e&&(e=n.cwd()),s=e),i(s),0!==s.length&&(t=s+\"/\"+t,r=47===s.charCodeAt(0))}return t=o(t,!r),r?t.length>0?\"/\"+t:\"/\":t.length>0?t:\".\"},normalize:function(e){if(i(e),0===e.length)return\".\";var t=47===e.charCodeAt(0),r=47===e.charCodeAt(e.length-1);return 0!==(e=o(e,!t)).length||t||(e=\".\"),e.length>0&&r&&(e+=\"/\"),t?\"/\"+e:e},isAbsolute:function(e){return i(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return\".\";for(var e,t=0;t__left_angle_mark_arguments.length;++t){var r=arguments[t];i(r),r.length>0&&(void 0===e?e=r:e+=\"/\"+r)}return void 0===e?\".\":a.normalize(e)},relative:function(e,t){if(i(e),i(t),e===t)return\"\";if((e=a.resolve(e))===(t=a.resolve(t)))return\"\";for(var r=1;r__left_angle_mark_e.length&&47===e.charCodeAt(r);++r);for(var n=e.length,o=n-r,s=1;s__left_angle_mark_t.length&&47===t.charCodeAt(s);++s);for(var l=t.length-s,u=o__left_angle_mark_l?o:l,c=-1,d=0;d__left_angle_mark_=u;++d){if(d===u){if(l>u){if(47===t.charCodeAt(s+d))return t.slice(s+d+1);if(0===d)return t.slice(s+d)}else o>u&&(47===e.charCodeAt(r+d)?c=d:0===d&&(c=0));break}var h=e.charCodeAt(r+d);if(h!==t.charCodeAt(s+d))break;47===h&&(c=d)}var f=\"\";for(d=r+c+1;d__left_angle_mark_=n;++d)d!==n&&47!==e.charCodeAt(d)||(0===f.length?f+=\"..\":f+=\"/..\");return f.length>0?f+t.slice(s+c):(s+=c,47===t.charCodeAt(s)&&++s,t.slice(s))},_makeLong:function(e){return e},dirname:function(e){if(i(e),0===e.length)return\".\";for(var t=e.charCodeAt(0),r=47===t,n=-1,o=!0,a=e.length-1;a>=1;--a)if(47===(t=e.charCodeAt(a))){if(!o){n=a;break}}else o=!1;return-1===n?r?\"/\":\".\":r&&1===n?\"//\":e.slice(0,n)},basename:function(e,t){if(void 0!==t&&\"string\"!=typeof t)throw new TypeError('\"ext\" argument must be a string');i(e);var r,n=0,o=-1,a=!0;if(void 0!==t&&t.length>0&&t.length__left_angle_mark_=e.length){if(t.length===e.length&&t===e)return\"\";var s=t.length-1,l=-1;for(r=e.length-1;r>=0;--r){var u=e.charCodeAt(r);if(47===u){if(!a){n=r+1;break}}else-1===l&&(a=!1,l=r+1),s>=0&&(u===t.charCodeAt(s)?-1==--s&&(o=r):(s=-1,o=l))}return n===o?o=l:-1===o&&(o=e.length),e.slice(n,o)}for(r=e.length-1;r>=0;--r)if(47===e.charCodeAt(r)){if(!a){n=r+1;break}}else-1===o&&(a=!1,o=r+1);return-1===o?\"\":e.slice(n,o)},extname:function(e){i(e);for(var t=-1,r=0,n=-1,o=!0,a=0,s=e.length-1;s>=0;--s){var l=e.charCodeAt(s);if(47!==l)-1===n&&(o=!1,n=s+1),46===l?-1===t?t=s:1!==a&&(a=1):-1!==t&&(a=-1);else if(!o){r=s+1;break}}return-1===t||-1===n||0===a||1===a&&t===n-1&&t===r+1?\"\":e.slice(t,n)},format:function(e){if(null===e||\"object\"!=typeof e)throw new TypeError('The \"pathObject\" argument must be of type Object. Received type '+typeof e);return r=(t=e).dir||t.root,n=t.base||(t.name||\"\")+(t.ext||\"\"),r?r===t.root?r+n:r+\"/\"+n:n;var t,r,n},parse:function(e){i(e);var t={root:\"\",dir:\"\",base:\"\",ext:\"\",name:\"\"};if(0===e.length)return t;var r,n=e.charCodeAt(0),o=47===n;o?(t.root=\"/\",r=1):r=0;for(var a=-1,s=0,l=-1,u=!0,c=e.length-1,d=0;c>=r;--c)if(47!==(n=e.charCodeAt(c)))-1===l&&(u=!1,l=c+1),46===n?-1===a?a=c:1!==d&&(d=1):-1!==a&&(d=-1);else if(!u){s=c+1;break}return-1===a||-1===l||0===d||1===d&&a===l-1&&a===s+1?-1!==l&&(t.base=t.name=0===s&&o?e.slice(1,l):e.slice(s,l)):(0===s&&o?(t.name=e.slice(1,a),t.base=e.slice(1,l)):(t.name=e.slice(s,a),t.base=e.slice(s,l)),t.ext=e.slice(a,l)),s>0?t.dir=e.slice(0,s-1):o&&(t.dir=\"/\"),t},sep:\"/\",delimiter:\":\",win32:null,posix:null};a.posix=a,e.exports=a},482:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:!0}),t.Deferred=void 0,t.Deferred=class{constructor(){this.resolve=()=>null,this.reject=()=>null,this.promise=new Promise(((e,t)=>{this.reject=t,this.resolve=e}))}}},5567:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:!0}),t.EndOfStreamError=t.defaultMessages=void 0,t.defaultMessages=\"End-Of-Stream\";class r extends Error{constructor(){super(t.defaultMessages)}}t.EndOfStreamError=r},4514:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:!0}),t.StreamReader=t.EndOfStreamError=void 0;const n=r(5567),i=r(482);var o=r(5567);Object.defineProperty(t,\"EndOfStreamError\",{enumerable:!0,get:function(){return o.EndOfStreamError}}),t.StreamReader=class{async peek(e,t,r){const n=await this.read(e,t,r);return this.peekQueue.push(e.subarray(t,t+n)),n}async read(e,t,r){if(0===r)return 0;if(0===this.peekQueue.length&&this.endOfStream)throw new n.EndOfStreamError;let i=r,o=0;for(;this.peekQueue.length>0&&i>0;){const r=this.peekQueue.pop();if(!r)throw new Error(\"peekData should be defined\");const n=Math.min(r.length,i);e.set(r.subarray(0,n),t+o),o+=n,i-=n,n__left_angle_mark_r.length&&this.peekQueue.push(r.subarray(n))}for(;i>0&&!this.endOfStream;){const r=Math.min(i,1048576),n=await this.readFromStream(e,t+o,r);if(o+=n,n__left_angle_mark_r)break;i-=n}return o}async readFromStream(e,t,r){const n=this.s.read(r);if(n)return e.set(n,t),n.length;{const n={buffer:e,offset:t,length:r,deferred:new i.Deferred};return this.deferred=n.deferred,this.s.once(\"readable\",(()=>{this.readDeferred(n)})),n.deferred.promise}}readDeferred(e){const t=this.s.read(e.length);t?(e.buffer.set(t,e.offset),e.deferred.resolve(t.length),this.deferred=null):this.s.once(\"readable\",(()=>{this.readDeferred(e)}))}reject(e){this.endOfStream=!0,this.deferred&&(this.deferred.reject(e),this.deferred=null)}constructor(e){if(this.s=e,this.deferred=null,this.endOfStream=!1,this.peekQueue=[],!e.read||!e.once)throw new Error(\"Expected an instance of stream.Readable\");this.s.once(\"end\",(()=>this.reject(new n.EndOfStreamError))),this.s.once(\"error\",(e=>this.reject(e))),this.s.once(\"close\",(()=>this.reject(new Error(\"Stream closed\"))))}}},4644:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:!0}),t.StreamReader=t.EndOfStreamError=void 0;var n=r(5567);Object.defineProperty(t,\"EndOfStreamError\",{enumerable:!0,get:function(){return n.EndOfStreamError}});var i=r(4514);Object.defineProperty(t,\"StreamReader\",{enumerable:!0,get:function(){return i.StreamReader}})},1294:e=>{function t(e,n,i,o,a,s){for(var l,u,c,d,h=Math.max(n-1,0),f=Math.max(i-1,0),p=Math.min(n+1,o-1),m=Math.min(i+1,a-1),g=4*(i*o+n),_=0,b=0,y=0,v=0,A=0,w=h;w__left_angle_mark_=p;w++)for(var S=f;S__left_angle_mark_=m;S++)if(w!==n||S!==i){var E=r(e,e,g,4*(S*o+w),!0);if(0===E?_++:E__left_angle_mark_0?y++:E>0&&b++,_>2)return!1;s&&(E__left_angle_mark_v&&(v=E,l=w,u=S),E>A&&(A=E,c=w,d=S))}return!s||0!==y&&0!==b&&(!t(e,l,u,o,a)&&!t(s,l,u,o,a)||!t(e,c,d,o,a)&&!t(s,c,d,o,a))}function r(e,t,r,s,l){var u=e[r+3]/255,c=t[s+3]/255,d=a(e[r+0],u),h=a(e[r+1],u),f=a(e[r+2],u),p=a(t[s+0],c),m=a(t[s+1],c),g=a(t[s+2],c),_=n(d,h,f)-n(p,m,g);if(l)return _;var b=i(d,h,f)-i(p,m,g),y=o(d,h,f)-o(p,m,g);return.5053*_*_+.299*b*b+.1957*y*y}function n(e,t,r){return.29889531*e+.58662247*t+.11448223*r}function i(e,t,r){return.59597799*e-.2741761*t-.32180189*r}function o(e,t,r){return.21147017*e-.52261711*t+.31114694*r}function a(e,t){return 255+(e-255)*t}function s(e,t,r,n,i){e[t+0]=r,e[t+1]=n,e[t+2]=i,e[t+3]=255}e.exports=function(e,i,o,l,u,c){c||(c={});for(var d=void 0===c.threshold?.1:c.threshold,h=35215*d*d,f=0,p=0;p__left_angle_mark_u;p++)for(var m=0;m__left_angle_mark_l;m++){var g=4*(p*l+m);if(r(e,i,g,g)>h)c.includeAA||!t(e,m,p,l,u,i)&&!t(i,m,p,l,u,e)?(o&&s(o,g,255,0,0),f++):o&&s(o,g,255,255,0);else if(o){var _=a((v=(b=e)[(y=g)+3]/255,n(a(b[y+0],v),a(b[y+1],v),a(b[y+2],v))),.1);s(o,g,_,_,_)}}var b,y,v;return f}},9902:(e,t,r)=>{e.exports=function e(t,r,n){function i(a,s){if(!r[a]){if(!t[a]){if(o)return o(a,!0);var l=new Error(\"Cannot find module '\"+a+\"'\");throw l.code=\"MODULE_NOT_FOUND\",l}var u=r[a]={exports:{}};t[a][0].call(u.exports,(function(e){return i(t[a][1][e]||e)}),u,u.exports,e,t,r,n)}return r[a].exports}for(var o=void 0,a=0;a__left_angle_mark_n.length;a++)i(n[a]);return i}({1:[function(e,t,r){(function(t){(function(){let n=e(\"./interlace\"),i=[function(){},function(e,t,r,n){if(n===t.length)throw new Error(\"Ran out of data\");let i=t[n];e[r]=i,e[r+1]=i,e[r+2]=i,e[r+3]=255},function(e,t,r,n){if(n+1>=t.length)throw new Error(\"Ran out of data\");let i=t[n];e[r]=i,e[r+1]=i,e[r+2]=i,e[r+3]=t[n+1]},function(e,t,r,n){if(n+2>=t.length)throw new Error(\"Ran out of data\");e[r]=t[n],e[r+1]=t[n+1],e[r+2]=t[n+2],e[r+3]=255},function(e,t,r,n){if(n+3>=t.length)throw new Error(\"Ran out of data\");e[r]=t[n],e[r+1]=t[n+1],e[r+2]=t[n+2],e[r+3]=t[n+3]}],o=[function(){},function(e,t,r,n){let i=t[0];e[r]=i,e[r+1]=i,e[r+2]=i,e[r+3]=n},function(e,t,r){let n=t[0];e[r]=n,e[r+1]=n,e[r+2]=n,e[r+3]=t[1]},function(e,t,r,n){e[r]=t[0],e[r+1]=t[1],e[r+2]=t[2],e[r+3]=n},function(e,t,r){e[r]=t[0],e[r+1]=t[1],e[r+2]=t[2],e[r+3]=t[3]}];function a(e,t,r,n,o,a){let s=e.width,l=e.height,u=e.index;for(let c=0;c__left_angle_mark_l;c++)for(let e=0;e__left_angle_mark_s;e++){let s=r(e,c,u);i[n](t,o,s,a),a+=n}return a}function s(e,t,r,n,i,a){let s=e.width,l=e.height,u=e.index;for(let c=0;c__left_angle_mark_l;c++){for(let e=0;e__left_angle_mark_s;e++){let s=i.get(n),l=r(e,c,u);o[n](t,s,l,a)}i.resetAfterLine()}}r.dataToBitMap=function(e,r){let i,o,l=r.width,u=r.height,c=r.depth,d=r.bpp,h=r.interlace;8!==c&&(i=function(e,t){let r=[],n=0;function i(){if(n===e.length)throw new Error(\"Ran out of data\");let i,o,a,s,l,u,c,d,h=e[n];switch(n++,t){default:throw new Error(\"unrecognised depth\");case 16:c=e[n],n++,r.push((h__left_angle_mark___left_angle_mark_8)+c);break;case 4:c=15&h,d=h>>4,r.push(d,c);break;case 2:l=3&h,u=h>>2&3,c=h>>4&3,d=h>>6&3,r.push(d,c,u,l);break;case 1:i=1&h,o=h>>1&1,a=h>>2&1,s=h>>3&1,l=h>>4&1,u=h>>5&1,c=h>>6&1,d=h>>7&1,r.push(d,c,u,l,s,a,o,i)}}return{get:function(e){for(;r.length__left_angle_mark_e;)i();let t=r.slice(0,e);return r=r.slice(e),t},resetAfterLine:function(){r.length=0},end:function(){if(n!==e.length)throw new Error(\"extra data found\")}}}(e,c)),o=c__left_angle_mark_=8?t.alloc(l*u*4):new Uint16Array(l*u*4);let f,p,m=Math.pow(2,c)-1,g=0;if(h)f=n.getImagePasses(l,u),p=n.getInterlaceIterator(l,u);else{let e=0;p=function(){let t=e;return e+=4,t},f=[{width:l,height:u}]}for(let t=0;t__left_angle_mark_f.length;t++)8===c?g=a(f[t],o,p,d,e,g):s(f[t],o,p,d,i,m);if(8===c){if(g!==e.length)throw new Error(\"extra data found\")}else i.end();return o}}).call(this)}).call(this,e(\"buffer\").Buffer)},{\"./interlace\":11,buffer:33}],2:[function(e,t,r){(function(r){(function(){let n=e(\"./constants\");t.exports=function(e,t,i,o){let a=-1!==[n.COLORTYPE_COLOR_ALPHA,n.COLORTYPE_ALPHA].indexOf(o.colorType);if(o.colorType===o.inputColorType){let t=function(){let e=new ArrayBuffer(2);return new DataView(e).setInt16(0,256,!0),256!==new Int16Array(e)[0]}();if(8===o.bitDepth||16===o.bitDepth&&t)return e}let s=16!==o.bitDepth?e:new Uint16Array(e.buffer),l=255,u=n.COLORTYPE_TO_BPP_MAP[o.inputColorType];4!==u||o.inputHasAlpha||(u=3);let c=n.COLORTYPE_TO_BPP_MAP[o.colorType];16===o.bitDepth&&(l=65535,c*=2);let d=r.alloc(t*i*c),h=0,f=0,p=o.bgColor||{};function m(){let e,t,r,i=l;switch(o.inputColorType){case n.COLORTYPE_COLOR_ALPHA:i=s[h+3],e=s[h],t=s[h+1],r=s[h+2];break;case n.COLORTYPE_COLOR:e=s[h],t=s[h+1],r=s[h+2];break;case n.COLORTYPE_ALPHA:i=s[h+1],e=s[h],t=e,r=e;break;case n.COLORTYPE_GRAYSCALE:e=s[h],t=e,r=e;break;default:throw new Error(\"input color type:\"+o.inputColorType+\" is not supported at present\")}return o.inputHasAlpha&&(a||(i/=l,e=Math.min(Math.max(Math.round((1-i)*p.red+i*e),0),l),t=Math.min(Math.max(Math.round((1-i)*p.green+i*t),0),l),r=Math.min(Math.max(Math.round((1-i)*p.blue+i*r),0),l))),{red:e,green:t,blue:r,alpha:i}}void 0===p.red&&(p.red=l),void 0===p.green&&(p.green=l),void 0===p.blue&&(p.blue=l);for(let r=0;r__left_angle_mark_i;r++)for(let e=0;e__left_angle_mark_t;e++){let e=m();switch(o.colorType){case n.COLORTYPE_COLOR_ALPHA:case n.COLORTYPE_COLOR:8===o.bitDepth?(d[f]=e.red,d[f+1]=e.green,d[f+2]=e.blue,a&&(d[f+3]=e.alpha)):(d.writeUInt16BE(e.red,f),d.writeUInt16BE(e.green,f+2),d.writeUInt16BE(e.blue,f+4),a&&d.writeUInt16BE(e.alpha,f+6));break;case n.COLORTYPE_ALPHA:case n.COLORTYPE_GRAYSCALE:{let t=(e.red+e.green+e.blue)/3;8===o.bitDepth?(d[f]=t,a&&(d[f+1]=e.alpha)):(d.writeUInt16BE(t,f),a&&d.writeUInt16BE(e.alpha,f+2));break}default:throw new Error(\"unrecognised color Type \"+o.colorType)}h+=u,f+=c}return d}}).call(this)}).call(this,e(\"buffer\").Buffer)},{\"./constants\":4,buffer:33}],3:[function(e,t,r){(function(r,n){(function(){let i=e(\"util\"),o=e(\"stream\"),a=t.exports=function(){o.call(this),this._buffers=[],this._buffered=0,this._reads=[],this._paused=!1,this._encoding=\"utf8\",this.writable=!0};i.inherits(a,o),a.prototype.read=function(e,t){this._reads.push({length:Math.abs(e),allowLess:e__left_angle_mark_0,func:t}),r.nextTick(function(){this._process(),this._paused&&this._reads&&this._reads.length>0&&(this._paused=!1,this.emit(\"drain\"))}.bind(this))},a.prototype.write=function(e,t){if(!this.writable)return this.emit(\"error\",new Error(\"Stream not writable\")),!1;let r;return r=n.isBuffer(e)?e:n.from(e,t||this._encoding),this._buffers.push(r),this._buffered+=r.length,this._process(),this._reads&&0===this._reads.length&&(this._paused=!0),this.writable&&!this._paused},a.prototype.end=function(e,t){e&&this.write(e,t),this.writable=!1,this._buffers&&(0===this._buffers.length?this._end():(this._buffers.push(null),this._process()))},a.prototype.destroySoon=a.prototype.end,a.prototype._end=function(){this._reads.length>0&&this.emit(\"error\",new Error(\"Unexpected end of input\")),this.destroy()},a.prototype.destroy=function(){this._buffers&&(this.writable=!1,this._reads=null,this._buffers=null,this.emit(\"close\"))},a.prototype._processReadAllowingLess=function(e){this._reads.shift();let t=this._buffers[0];t.length>e.length?(this._buffered-=e.length,this._buffers[0]=t.slice(e.length),e.func.call(this,t.slice(0,e.length))):(this._buffered-=t.length,this._buffers.shift(),e.func.call(this,t))},a.prototype._processRead=function(e){this._reads.shift();let t=0,r=0,i=n.alloc(e.length);for(;t__left_angle_mark_e.length;){let n=this._buffers[r++],o=Math.min(n.length,e.length-t);n.copy(i,t,0,o),t+=o,o!==n.length&&(this._buffers[--r]=n.slice(o))}r>0&&this._buffers.splice(0,r),this._buffered-=e.length,e.func.call(this,i)},a.prototype._process=function(){try{for(;this._buffered>0&&this._reads&&this._reads.length>0;){let e=this._reads[0];if(e.allowLess)this._processReadAllowingLess(e);else{if(!(this._buffered>=e.length))break;this._processRead(e)}}this._buffers&&!this.writable&&this._end()}catch(e){this.emit(\"error\",e)}}}).call(this)}).call(this,e(\"_process\"),e(\"buffer\").Buffer)},{_process:60,buffer:33,stream:61,util:81}],4:[function(e,t,r){t.exports={PNG_SIGNATURE:[137,80,78,71,13,10,26,10],TYPE_IHDR:1229472850,TYPE_IEND:1229278788,TYPE_IDAT:1229209940,TYPE_PLTE:1347179589,TYPE_tRNS:1951551059,TYPE_gAMA:1732332865,COLORTYPE_GRAYSCALE:0,COLORTYPE_PALETTE:1,COLORTYPE_COLOR:2,COLORTYPE_ALPHA:4,COLORTYPE_PALETTE_COLOR:3,COLORTYPE_COLOR_ALPHA:6,COLORTYPE_TO_BPP_MAP:{0:1,2:3,3:1,4:2,6:4},GAMMA_DIVISION:1e5}},{}],5:[function(e,t,r){let n=[];!function(){for(let e=0;e__left_angle_mark_256;e++){let t=e;for(let e=0;e__left_angle_mark_8;e++)1&t?t=3988292384^t>>>1:t>>>=1;n[e]=t}}();let i=t.exports=function(){this._crc=-1};i.prototype.write=function(e){for(let t=0;t__left_angle_mark_e.length;t++)this._crc=n[255&(this._crc^e[t])]^this._crc>>>8;return!0},i.prototype.crc32=function(){return~this._crc},i.crc32=function(e){let t=-1;for(let r=0;r__left_angle_mark_e.length;r++)t=n[255&(t^e[r])]^t>>>8;return~t}},{}],6:[function(e,t,r){(function(r){(function(){let n=e(\"./paeth-predictor\"),i={0:function(e,t,r,n,i){for(let o=0;o__left_angle_mark_r;o++)n[i+o]=e[t+o]},1:function(e,t,r,n,i,o){for(let a=0;a__left_angle_mark_r;a++){let r=a>=o?e[t+a-o]:0,s=e[t+a]-r;n[i+a]=s}},2:function(e,t,r,n,i){for(let o=0;o__left_angle_mark_r;o++){let a=t>0?e[t+o-r]:0,s=e[t+o]-a;n[i+o]=s}},3:function(e,t,r,n,i,o){for(let a=0;a__left_angle_mark_r;a++){let s=a>=o?e[t+a-o]:0,l=t>0?e[t+a-r]:0,u=e[t+a]-(s+l>>1);n[i+a]=u}},4:function(e,t,r,i,o,a){for(let s=0;s__left_angle_mark_r;s++){let l=s>=a?e[t+s-a]:0,u=t>0?e[t+s-r]:0,c=t>0&&s>=a?e[t+s-(r+a)]:0,d=e[t+s]-n(l,u,c);i[o+s]=d}}},o={0:function(e,t,r){let n=0,i=t+r;for(let o=t;o__left_angle_mark_i;o++)n+=Math.abs(e[o]);return n},1:function(e,t,r,n){let i=0;for(let o=0;o__left_angle_mark_r;o++){let r=o>=n?e[t+o-n]:0,a=e[t+o]-r;i+=Math.abs(a)}return i},2:function(e,t,r){let n=0,i=t+r;for(let o=t;o__left_angle_mark_i;o++){let i=t>0?e[o-r]:0,a=e[o]-i;n+=Math.abs(a)}return n},3:function(e,t,r,n){let i=0;for(let o=0;o__left_angle_mark_r;o++){let a=o>=n?e[t+o-n]:0,s=t>0?e[t+o-r]:0,l=e[t+o]-(a+s>>1);i+=Math.abs(l)}return i},4:function(e,t,r,i){let o=0;for(let a=0;a__left_angle_mark_r;a++){let s=a>=i?e[t+a-i]:0,l=t>0?e[t+a-r]:0,u=t>0&&a>=i?e[t+a-(r+i)]:0,c=e[t+a]-n(s,l,u);o+=Math.abs(c)}return o}};t.exports=function(e,t,n,a,s){let l;if(\"filterType\"in a&&-1!==a.filterType){if(\"number\"!=typeof a.filterType)throw new Error(\"unrecognised filter types\");l=[a.filterType]}else l=[0,1,2,3,4];16===a.bitDepth&&(s*=2);let u=t*s,c=0,d=0,h=r.alloc((u+1)*n),f=l[0];for(let r=0;r__left_angle_mark_n;r++){if(l.length>1){let t=1/0;for(let r=0;r__left_angle_mark_l.length;r++){let n=o[l[r]](e,d,u,s);n__left_angle_mark_t&&(f=l[r],t=n)}}h[c]=f,c++,i[f](e,d,u,h,c,s),c+=u,d+=u}return h}}).call(this)}).call(this,e(\"buffer\").Buffer)},{\"./paeth-predictor\":15,buffer:33}],7:[function(e,t,r){(function(r){(function(){let n=e(\"util\"),i=e(\"./chunkstream\"),o=e(\"./filter-parse\"),a=t.exports=function(e){i.call(this);let t=[],n=this;this._filter=new o(e,{read:this.read.bind(this),write:function(e){t.push(e)},complete:function(){n.emit(\"complete\",r.concat(t))}}),this._filter.start()};n.inherits(a,i)}).call(this)}).call(this,e(\"buffer\").Buffer)},{\"./chunkstream\":3,\"./filter-parse\":9,buffer:33,util:81}],8:[function(e,t,r){(function(t){(function(){let n=e(\"./sync-reader\"),i=e(\"./filter-parse\");r.process=function(e,r){let o=[],a=new n(e);return new i(r,{read:a.read.bind(a),write:function(e){o.push(e)},complete:function(){}}).start(),a.process(),t.concat(o)}}).call(this)}).call(this,e(\"buffer\").Buffer)},{\"./filter-parse\":9,\"./sync-reader\":22,buffer:33}],9:[function(e,t,r){(function(r){(function(){let n=e(\"./interlace\"),i=e(\"./paeth-predictor\");function o(e,t,r){let n=e*t;return 8!==r&&(n=Math.ceil(n/(8/r))),n}let a=t.exports=function(e,t){let r=e.width,i=e.height,a=e.interlace,s=e.bpp,l=e.depth;if(this.read=t.read,this.write=t.write,this.complete=t.complete,this._imageIndex=0,this._images=[],a){let e=n.getImagePasses(r,i);for(let t=0;t__left_angle_mark_e.length;t++)this._images.push({byteWidth:o(e[t].width,s,l),height:e[t].height,lineIndex:0})}else this._images.push({byteWidth:o(r,s,l),height:i,lineIndex:0});this._xComparison=8===l?s:16===l?2*s:1};a.prototype.start=function(){this.read(this._images[this._imageIndex].byteWidth+1,this._reverseFilterLine.bind(this))},a.prototype._unFilterType1=function(e,t,r){let n=this._xComparison,i=n-1;for(let o=0;o__left_angle_mark_r;o++){let r=e[1+o],a=o>i?t[o-n]:0;t[o]=r+a}},a.prototype._unFilterType2=function(e,t,r){let n=this._lastLine;for(let i=0;i__left_angle_mark_r;i++){let r=e[1+i],o=n?n[i]:0;t[i]=r+o}},a.prototype._unFilterType3=function(e,t,r){let n=this._xComparison,i=n-1,o=this._lastLine;for(let a=0;a__left_angle_mark_r;a++){let r=e[1+a],s=o?o[a]:0,l=a>i?t[a-n]:0,u=Math.floor((l+s)/2);t[a]=r+u}},a.prototype._unFilterType4=function(e,t,r){let n=this._xComparison,o=n-1,a=this._lastLine;for(let s=0;s__left_angle_mark_r;s++){let r=e[1+s],l=a?a[s]:0,u=s>o?t[s-n]:0,c=s>o&&a?a[s-n]:0,d=i(u,l,c);t[s]=r+d}},a.prototype._reverseFilterLine=function(e){let t,n=e[0],i=this._images[this._imageIndex],o=i.byteWidth;if(0===n)t=e.slice(1,o+1);else switch(t=r.alloc(o),n){case 1:this._unFilterType1(e,t,o);break;case 2:this._unFilterType2(e,t,o);break;case 3:this._unFilterType3(e,t,o);break;case 4:this._unFilterType4(e,t,o);break;default:throw new Error(\"Unrecognised filter type - \"+n)}this.write(t),i.lineIndex++,i.lineIndex>=i.height?(this._lastLine=null,this._imageIndex++,i=this._images[this._imageIndex]):this._lastLine=t,i?this.read(i.byteWidth+1,this._reverseFilterLine.bind(this)):(this._lastLine=null,this.complete())}}).call(this)}).call(this,e(\"buffer\").Buffer)},{\"./interlace\":11,\"./paeth-predictor\":15,buffer:33}],10:[function(e,t,r){(function(e){(function(){t.exports=function(t,r,n=!1){let i=r.depth,o=r.width,a=r.height,s=r.colorType,l=r.transColor,u=r.palette,c=t;return 3===s?function(e,t,r,n,i){let o=0;for(let a=0;a__left_angle_mark_n;a++)for(let n=0;n__left_angle_mark_r;n++){let r=i[e[o]];if(!r)throw new Error(\"index \"+e[o]+\" not in palette\");for(let e=0;e__left_angle_mark_4;e++)t[o+e]=r[e];o+=4}}(t,c,o,a,u):(l&&function(e,t,r,n,i){let o=0;for(let a=0;a__left_angle_mark_n;a++)for(let n=0;n__left_angle_mark_r;n++){let r=!1;if(1===i.length?i[0]===e[o]&&(r=!0):i[0]===e[o]&&i[1]===e[o+1]&&i[2]===e[o+2]&&(r=!0),r)for(let e=0;e__left_angle_mark_4;e++)t[o+e]=0;o+=4}}(t,c,o,a,l),8===i||n||(16===i&&(c=e.alloc(o*a*4)),function(e,t,r,n,i){let o=Math.pow(2,i)-1,a=0;for(let s=0;s__left_angle_mark_n;s++)for(let n=0;n__left_angle_mark_r;n++){for(let r=0;r__left_angle_mark_4;r++)t[a+r]=Math.floor(255*e[a+r]/o+.5);a+=4}}(t,c,o,a,i))),c}}).call(this)}).call(this,e(\"buffer\").Buffer)},{buffer:33}],11:[function(e,t,r){let n=[{x:[0],y:[0]},{x:[4],y:[0]},{x:[0,4],y:[4]},{x:[2,6],y:[0,4]},{x:[0,2,4,6],y:[2,6]},{x:[1,3,5,7],y:[0,2,4,6]},{x:[0,1,2,3,4,5,6,7],y:[1,3,5,7]}];r.getImagePasses=function(e,t){let r=[],i=e%8,o=t%8,a=(e-i)/8,s=(t-o)/8;for(let l=0;l__left_angle_mark_n.length;l++){let e=n[l],t=a*e.x.length,u=s*e.y.length;for(let r=0;r__left_angle_mark_e.x.length&&e.x[r]__left_angle_mark_i;r++)t++;for(let r=0;r__left_angle_mark_e.y.length&&e.y[r]__left_angle_mark_o;r++)u++;t>0&&u>0&&r.push({width:t,height:u,index:l})}return r},r.getInterlaceIterator=function(e){return function(t,r,i){let o=t%n[i].x.length,a=(t-o)/n[i].x.length*8+n[i].x[o],s=r%n[i].y.length;return 4*a+((r-s)/n[i].y.length*8+n[i].y[s])*e*4}}},{}],12:[function(e,t,r){(function(r){(function(){let n=e(\"util\"),i=e(\"stream\"),o=e(\"./constants\"),a=e(\"./packer\"),s=t.exports=function(e){i.call(this);let t=e||{};this._packer=new a(t),this._deflate=this._packer.createDeflate(),this.readable=!0};n.inherits(s,i),s.prototype.pack=function(e,t,n,i){this.emit(\"data\",r.from(o.PNG_SIGNATURE)),this.emit(\"data\",this._packer.packIHDR(t,n)),i&&this.emit(\"data\",this._packer.packGAMA(i));let a=this._packer.filterData(e,t,n);this._deflate.on(\"error\",this.emit.bind(this,\"error\")),this._deflate.on(\"data\",function(e){this.emit(\"data\",this._packer.packIDAT(e))}.bind(this)),this._deflate.on(\"end\",function(){this.emit(\"data\",this._packer.packIEND()),this.emit(\"end\")}.bind(this)),this._deflate.end(a)}}).call(this)}).call(this,e(\"buffer\").Buffer)},{\"./constants\":4,\"./packer\":14,buffer:33,stream:61,util:81}],13:[function(e,t,r){(function(r){(function(){let n=!0,i=e(\"zlib\");i.deflateSync||(n=!1);let o=e(\"./constants\"),a=e(\"./packer\");t.exports=function(e,t){if(!n)throw new Error(\"To use the sync capability of this library in old node versions, please pin pngjs to v2.3.0\");let s=new a(t||{}),l=[];l.push(r.from(o.PNG_SIGNATURE)),l.push(s.packIHDR(e.width,e.height)),e.gamma&&l.push(s.packGAMA(e.gamma));let u=s.filterData(e.data,e.width,e.height),c=i.deflateSync(u,s.getDeflateOptions());if(u=null,!c||!c.length)throw new Error(\"bad png - invalid compressed data response\");return l.push(s.packIDAT(c)),l.push(s.packIEND()),r.concat(l)}}).call(this)}).call(this,e(\"buffer\").Buffer)},{\"./constants\":4,\"./packer\":14,buffer:33,zlib:32}],14:[function(e,t,r){(function(r){(function(){let n=e(\"./constants\"),i=e(\"./crc\"),o=e(\"./bitpacker\"),a=e(\"./filter-pack\"),s=e(\"zlib\"),l=t.exports=function(e){if(this._options=e,e.deflateChunkSize=e.deflateChunkSize||32768,e.deflateLevel=null!=e.deflateLevel?e.deflateLevel:9,e.deflateStrategy=null!=e.deflateStrategy?e.deflateStrategy:3,e.inputHasAlpha=null==e.inputHasAlpha||e.inputHasAlpha,e.deflateFactory=e.deflateFactory||s.createDeflate,e.bitDepth=e.bitDepth||8,e.colorType=\"number\"==typeof e.colorType?e.colorType:n.COLORTYPE_COLOR_ALPHA,e.inputColorType=\"number\"==typeof e.inputColorType?e.inputColorType:n.COLORTYPE_COLOR_ALPHA,-1===[n.COLORTYPE_GRAYSCALE,n.COLORTYPE_COLOR,n.COLORTYPE_COLOR_ALPHA,n.COLORTYPE_ALPHA].indexOf(e.colorType))throw new Error(\"option color type:\"+e.colorType+\" is not supported at present\");if(-1===[n.COLORTYPE_GRAYSCALE,n.COLORTYPE_COLOR,n.COLORTYPE_COLOR_ALPHA,n.COLORTYPE_ALPHA].indexOf(e.inputColorType))throw new Error(\"option input color type:\"+e.inputColorType+\" is not supported at present\");if(8!==e.bitDepth&&16!==e.bitDepth)throw new Error(\"option bit depth:\"+e.bitDepth+\" is not supported at present\")};l.prototype.getDeflateOptions=function(){return{chunkSize:this._options.deflateChunkSize,level:this._options.deflateLevel,strategy:this._options.deflateStrategy}},l.prototype.createDeflate=function(){return this._options.deflateFactory(this.getDeflateOptions())},l.prototype.filterData=function(e,t,r){let i=o(e,t,r,this._options),s=n.COLORTYPE_TO_BPP_MAP[this._options.colorType];return a(i,t,r,this._options,s)},l.prototype._packChunk=function(e,t){let n=t?t.length:0,o=r.alloc(n+12);return o.writeUInt32BE(n,0),o.writeUInt32BE(e,4),t&&t.copy(o,8),o.writeInt32BE(i.crc32(o.slice(4,o.length-4)),o.length-4),o},l.prototype.packGAMA=function(e){let t=r.alloc(4);return t.writeUInt32BE(Math.floor(e*n.GAMMA_DIVISION),0),this._packChunk(n.TYPE_gAMA,t)},l.prototype.packIHDR=function(e,t){let i=r.alloc(13);return i.writeUInt32BE(e,0),i.writeUInt32BE(t,4),i[8]=this._options.bitDepth,i[9]=this._options.colorType,i[10]=0,i[11]=0,i[12]=0,this._packChunk(n.TYPE_IHDR,i)},l.prototype.packIDAT=function(e){return this._packChunk(n.TYPE_IDAT,e)},l.prototype.packIEND=function(){return this._packChunk(n.TYPE_IEND,null)}}).call(this)}).call(this,e(\"buffer\").Buffer)},{\"./bitpacker\":2,\"./constants\":4,\"./crc\":5,\"./filter-pack\":6,buffer:33,zlib:32}],15:[function(e,t,r){t.exports=function(e,t,r){let n=e+t-r,i=Math.abs(n-e),o=Math.abs(n-t),a=Math.abs(n-r);return i__left_angle_mark_=o&&i__left_angle_mark_=a?e:o__left_angle_mark_=a?t:r}},{}],16:[function(e,t,r){let n=e(\"util\"),i=e(\"zlib\"),o=e(\"./chunkstream\"),a=e(\"./filter-parse-async\"),s=e(\"./parser\"),l=e(\"./bitmapper\"),u=e(\"./format-normaliser\"),c=t.exports=function(e){o.call(this),this._parser=new s(e,{read:this.read.bind(this),error:this._handleError.bind(this),metadata:this._handleMetaData.bind(this),gamma:this.emit.bind(this,\"gamma\"),palette:this._handlePalette.bind(this),transColor:this._handleTransColor.bind(this),finished:this._finished.bind(this),inflateData:this._inflateData.bind(this),simpleTransparency:this._simpleTransparency.bind(this),headersFinished:this._headersFinished.bind(this)}),this._options=e,this.writable=!0,this._parser.start()};n.inherits(c,o),c.prototype._handleError=function(e){this.emit(\"error\",e),this.writable=!1,this.destroy(),this._inflate&&this._inflate.destroy&&this._inflate.destroy(),this._filter&&(this._filter.destroy(),this._filter.on(\"error\",(function(){}))),this.errord=!0},c.prototype._inflateData=function(e){if(!this._inflate)if(this._bitmapInfo.interlace)this._inflate=i.createInflate(),this._inflate.on(\"error\",this.emit.bind(this,\"error\")),this._filter.on(\"complete\",this._complete.bind(this)),this._inflate.pipe(this._filter);else{let e=(1+(this._bitmapInfo.width*this._bitmapInfo.bpp*this._bitmapInfo.depth+7>>3))*this._bitmapInfo.height,t=Math.max(e,i.Z_MIN_CHUNK);this._inflate=i.createInflate({chunkSize:t});let r=e,n=this.emit.bind(this,\"error\");this._inflate.on(\"error\",(function(e){r&&n(e)})),this._filter.on(\"complete\",this._complete.bind(this));let o=this._filter.write.bind(this._filter);this._inflate.on(\"data\",(function(e){r&&(e.length>r&&(e=e.slice(0,r)),r-=e.length,o(e))})),this._inflate.on(\"end\",this._filter.end.bind(this._filter))}this._inflate.write(e)},c.prototype._handleMetaData=function(e){this._metaData=e,this._bitmapInfo=Object.create(e),this._filter=new a(this._bitmapInfo)},c.prototype._handleTransColor=function(e){this._bitmapInfo.transColor=e},c.prototype._handlePalette=function(e){this._bitmapInfo.palette=e},c.prototype._simpleTransparency=function(){this._metaData.alpha=!0},c.prototype._headersFinished=function(){this.emit(\"metadata\",this._metaData)},c.prototype._finished=function(){this.errord||(this._inflate?this._inflate.end():this.emit(\"error\",\"No Inflate block\"))},c.prototype._complete=function(e){if(this.errord)return;let t;try{let r=l.dataToBitMap(e,this._bitmapInfo);t=u(r,this._bitmapInfo,this._options.skipRescale),r=null}catch(r){return void this._handleError(r)}this.emit(\"parsed\",t)}},{\"./bitmapper\":1,\"./chunkstream\":3,\"./filter-parse-async\":7,\"./format-normaliser\":10,\"./parser\":18,util:81,zlib:32}],17:[function(e,t,r){(function(r){(function(){let n=!0,i=e(\"zlib\"),o=e(\"./sync-inflate\");i.deflateSync||(n=!1);let a=e(\"./sync-reader\"),s=e(\"./filter-parse-sync\"),l=e(\"./parser\"),u=e(\"./bitmapper\"),c=e(\"./format-normaliser\");t.exports=function(e,t){if(!n)throw new Error(\"To use the sync capability of this library in old node versions, please pin pngjs to v2.3.0\");let d,h,f,p=[],m=new a(e);if(new l(t,{read:m.read.bind(m),error:function(e){d=e},metadata:function(e){h=e},gamma:function(e){f=e},palette:function(e){h.palette=e},transColor:function(e){h.transColor=e},inflateData:function(e){p.push(e)},simpleTransparency:function(){h.alpha=!0}}).start(),m.process(),d)throw d;let g,_=r.concat(p);if(p.length=0,h.interlace)g=i.inflateSync(_);else{let e=(1+(h.width*h.bpp*h.depth+7>>3))*h.height;g=o(_,{chunkSize:e,maxLength:e})}if(_=null,!g||!g.length)throw new Error(\"bad png - invalid inflate data response\");let b=s.process(g,h);_=null;let y=u.dataToBitMap(b,h);b=null;let v=c(y,h,t.skipRescale);return h.data=v,h.gamma=f||0,h}}).call(this)}).call(this,e(\"buffer\").Buffer)},{\"./bitmapper\":1,\"./filter-parse-sync\":8,\"./format-normaliser\":10,\"./parser\":18,\"./sync-inflate\":21,\"./sync-reader\":22,buffer:33,zlib:32}],18:[function(e,t,r){(function(r){(function(){let n=e(\"./constants\"),i=e(\"./crc\"),o=t.exports=function(e,t){this._options=e,e.checkCRC=!1!==e.checkCRC,this._hasIHDR=!1,this._hasIEND=!1,this._emittedHeadersFinished=!1,this._palette=[],this._colorType=0,this._chunks={},this._chunks[n.TYPE_IHDR]=this._handleIHDR.bind(this),this._chunks[n.TYPE_IEND]=this._handleIEND.bind(this),this._chunks[n.TYPE_IDAT]=this._handleIDAT.bind(this),this._chunks[n.TYPE_PLTE]=this._handlePLTE.bind(this),this._chunks[n.TYPE_tRNS]=this._handleTRNS.bind(this),this._chunks[n.TYPE_gAMA]=this._handleGAMA.bind(this),this.read=t.read,this.error=t.error,this.metadata=t.metadata,this.gamma=t.gamma,this.transColor=t.transColor,this.palette=t.palette,this.parsed=t.parsed,this.inflateData=t.inflateData,this.finished=t.finished,this.simpleTransparency=t.simpleTransparency,this.headersFinished=t.headersFinished||function(){}};o.prototype.start=function(){this.read(n.PNG_SIGNATURE.length,this._parseSignature.bind(this))},o.prototype._parseSignature=function(e){let t=n.PNG_SIGNATURE;for(let r=0;r__left_angle_mark_t.length;r++)if(e[r]!==t[r])return void this.error(new Error(\"Invalid file signature\"));this.read(8,this._parseChunkBegin.bind(this))},o.prototype._parseChunkBegin=function(e){let t=e.readUInt32BE(0),o=e.readUInt32BE(4),a=\"\";for(let r=4;r__left_angle_mark_8;r++)a+=String.fromCharCode(e[r]);let s=Boolean(32&e[4]);if(this._hasIHDR||o===n.TYPE_IHDR){if(this._crc=new i,this._crc.write(r.from(a)),this._chunks[o])return this._chunks[o](t);s?this.read(t+4,this._skipChunk.bind(this)):this.error(new Error(\"Unsupported critical chunk type \"+a))}else this.error(new Error(\"Expected IHDR on beggining\"))},o.prototype._skipChunk=function(){this.read(8,this._parseChunkBegin.bind(this))},o.prototype._handleChunkEnd=function(){this.read(4,this._parseChunkEnd.bind(this))},o.prototype._parseChunkEnd=function(e){let t=e.readInt32BE(0),r=this._crc.crc32();this._options.checkCRC&&r!==t?this.error(new Error(\"Crc error - \"+t+\" - \"+r)):this._hasIEND||this.read(8,this._parseChunkBegin.bind(this))},o.prototype._handleIHDR=function(e){this.read(e,this._parseIHDR.bind(this))},o.prototype._parseIHDR=function(e){this._crc.write(e);let t=e.readUInt32BE(0),r=e.readUInt32BE(4),i=e[8],o=e[9],a=e[10],s=e[11],l=e[12];if(8!==i&&4!==i&&2!==i&&1!==i&&16!==i)return void this.error(new Error(\"Unsupported bit depth \"+i));if(!(o in n.COLORTYPE_TO_BPP_MAP))return void this.error(new Error(\"Unsupported color type\"));if(0!==a)return void this.error(new Error(\"Unsupported compression method\"));if(0!==s)return void this.error(new Error(\"Unsupported filter method\"));if(0!==l&&1!==l)return void this.error(new Error(\"Unsupported interlace method\"));this._colorType=o;let u=n.COLORTYPE_TO_BPP_MAP[this._colorType];this._hasIHDR=!0,this.metadata({width:t,height:r,depth:i,interlace:Boolean(l),palette:Boolean(o&n.COLORTYPE_PALETTE),color:Boolean(o&n.COLORTYPE_COLOR),alpha:Boolean(o&n.COLORTYPE_ALPHA),bpp:u,colorType:o}),this._handleChunkEnd()},o.prototype._handlePLTE=function(e){this.read(e,this._parsePLTE.bind(this))},o.prototype._parsePLTE=function(e){this._crc.write(e);let t=Math.floor(e.length/3);for(let r=0;r__left_angle_mark_t;r++)this._palette.push([e[3*r],e[3*r+1],e[3*r+2],255]);this.palette(this._palette),this._handleChunkEnd()},o.prototype._handleTRNS=function(e){this.simpleTransparency(),this.read(e,this._parseTRNS.bind(this))},o.prototype._parseTRNS=function(e){if(this._crc.write(e),this._colorType===n.COLORTYPE_PALETTE_COLOR){if(0===this._palette.length)return void this.error(new Error(\"Transparency chunk must be after palette\"));if(e.length>this._palette.length)return void this.error(new Error(\"More transparent colors than palette size\"));for(let t=0;t__left_angle_mark_e.length;t++)this._palette[t][3]=e[t];this.palette(this._palette)}this._colorType===n.COLORTYPE_GRAYSCALE&&this.transColor([e.readUInt16BE(0)]),this._colorType===n.COLORTYPE_COLOR&&this.transColor([e.readUInt16BE(0),e.readUInt16BE(2),e.readUInt16BE(4)]),this._handleChunkEnd()},o.prototype._handleGAMA=function(e){this.read(e,this._parseGAMA.bind(this))},o.prototype._parseGAMA=function(e){this._crc.write(e),this.gamma(e.readUInt32BE(0)/n.GAMMA_DIVISION),this._handleChunkEnd()},o.prototype._handleIDAT=function(e){this._emittedHeadersFinished||(this._emittedHeadersFinished=!0,this.headersFinished()),this.read(-e,this._parseIDAT.bind(this,e))},o.prototype._parseIDAT=function(e,t){if(this._crc.write(t),this._colorType===n.COLORTYPE_PALETTE_COLOR&&0===this._palette.length)throw new Error(\"Expected palette not found\");this.inflateData(t);let r=e-t.length;r>0?this._handleIDAT(r):this._handleChunkEnd()},o.prototype._handleIEND=function(e){this.read(e,this._parseIEND.bind(this))},o.prototype._parseIEND=function(e){this._crc.write(e),this._hasIEND=!0,this._handleChunkEnd(),this.finished&&this.finished()}}).call(this)}).call(this,e(\"buffer\").Buffer)},{\"./constants\":4,\"./crc\":5,buffer:33}],19:[function(e,t,r){let n=e(\"./parser-sync\"),i=e(\"./packer-sync\");r.read=function(e,t){return n(e,t||{})},r.write=function(e,t){return i(e,t)}},{\"./packer-sync\":13,\"./parser-sync\":17}],20:[function(e,t,r){(function(t,n){(function(){let i=e(\"util\"),o=e(\"stream\"),a=e(\"./parser-async\"),s=e(\"./packer-async\"),l=e(\"./png-sync\"),u=r.PNG=function(e){o.call(this),e=e||{},this.width=0|e.width,this.height=0|e.height,this.data=this.width>0&&this.height>0?n.alloc(4*this.width*this.height):null,e.fill&&this.data&&this.data.fill(0),this.gamma=0,this.readable=this.writable=!0,this._parser=new a(e),this._parser.on(\"error\",this.emit.bind(this,\"error\")),this._parser.on(\"close\",this._handleClose.bind(this)),this._parser.on(\"metadata\",this._metadata.bind(this)),this._parser.on(\"gamma\",this._gamma.bind(this)),this._parser.on(\"parsed\",function(e){this.data=e,this.emit(\"parsed\",e)}.bind(this)),this._packer=new s(e),this._packer.on(\"data\",this.emit.bind(this,\"data\")),this._packer.on(\"end\",this.emit.bind(this,\"end\")),this._parser.on(\"close\",this._handleClose.bind(this)),this._packer.on(\"error\",this.emit.bind(this,\"error\"))};i.inherits(u,o),u.sync=l,u.prototype.pack=function(){return this.data&&this.data.length?(t.nextTick(function(){this._packer.pack(this.data,this.width,this.height,this.gamma)}.bind(this)),this):(this.emit(\"error\",\"No data provided\"),this)},u.prototype.parse=function(e,t){if(t){let e,r;e=function(e){this.removeListener(\"error\",r),this.data=e,t(null,this)}.bind(this),r=function(r){this.removeListener(\"parsed\",e),t(r,null)}.bind(this),this.once(\"parsed\",e),this.once(\"error\",r)}return this.end(e),this},u.prototype.write=function(e){return this._parser.write(e),!0},u.prototype.end=function(e){this._parser.end(e)},u.prototype._metadata=function(e){this.width=e.width,this.height=e.height,this.emit(\"metadata\",e)},u.prototype._gamma=function(e){this.gamma=e},u.prototype._handleClose=function(){this._parser.writable||this._packer.readable||this.emit(\"close\")},u.bitblt=function(e,t,r,n,i,o,a,s){if(n|=0,i|=0,o|=0,a|=0,s|=0,(r|=0)>e.width||n>e.height||r+i>e.width||n+o>e.height)throw new Error(\"bitblt reading outside image\");if(a>t.width||s>t.height||a+i>t.width||s+o>t.height)throw new Error(\"bitblt writing outside image\");for(let l=0;l__left_angle_mark_o;l++)e.data.copy(t.data,(s+l)*t.width+a__left_angle_mark___left_angle_mark_2,(n+l)*e.width+r__left_angle_mark___left_angle_mark_2,(n+l)*e.width+r+i__left_angle_mark___left_angle_mark_2)},u.prototype.bitblt=function(e,t,r,n,i,o,a){return u.bitblt(this,e,t,r,n,i,o,a),this},u.adjustGamma=function(e){if(e.gamma){for(let t=0;t__left_angle_mark_e.height;t++)for(let r=0;r__left_angle_mark_e.width;r++){let n=e.width*t+r__left_angle_mark___left_angle_mark_2;for(let t=0;t__left_angle_mark_3;t++){let r=e.data[n+t]/255;r=Math.pow(r,1/2.2/e.gamma),e.data[n+t]=Math.round(255*r)}}e.gamma=0}},u.prototype.adjustGamma=function(){u.adjustGamma(this)}}).call(this)}).call(this,e(\"_process\"),e(\"buffer\").Buffer)},{\"./packer-async\":12,\"./parser-async\":16,\"./png-sync\":19,_process:60,buffer:33,stream:61,util:81}],21:[function(e,t,r){(function(n,i){(function(){let o=e(\"assert\").ok,a=e(\"zlib\"),s=e(\"util\"),l=e(\"buffer\").kMaxLength;function u(e){if(!(this instanceof u))return new u(e);e&&e.chunkSize__left_angle_mark_a.Z_MIN_CHUNK&&(e.chunkSize=a.Z_MIN_CHUNK),a.Inflate.call(this,e),this._offset=void 0===this._offset?this._outOffset:this._offset,this._buffer=this._buffer||this._outBuffer,e&&null!=e.maxLength&&(this._maxLength=e.maxLength)}function c(e,t){t&&n.nextTick(t),e._handle&&(e._handle.close(),e._handle=null)}function d(e,t){return function(e,t){if(\"string\"==typeof t&&(t=i.from(t)),!(t instanceof i))throw new TypeError(\"Not a string or buffer\");let r=e._finishFlushFlag;return null==r&&(r=a.Z_FINISH),e._processChunk(t,r)}(new u(t),e)}u.prototype._processChunk=function(e,t,r){if(\"function\"==typeof r)return a.Inflate._processChunk.call(this,e,t,r);let n,s,u=this,d=e&&e.length,h=this._chunkSize-this._offset,f=this._maxLength,p=0,m=[],g=0;function _(e,t){if(u._hadError)return;let r=h-t;if(o(r>=0,\"have should not go down\"),r>0){let e=u._buffer.slice(u._offset,u._offset+r);if(u._offset+=r,e.length>f&&(e=e.slice(0,f)),m.push(e),g+=e.length,f-=e.length,0===f)return!1}return(0===t||u._offset>=u._chunkSize)&&(h=u._chunkSize,u._offset=0,u._buffer=i.allocUnsafe(u._chunkSize)),0===t&&(p+=d-e,d=e,!0)}this.on(\"error\",(function(e){n=e})),o(this._handle,\"zlib binding closed\");do{s=this._handle.writeSync(t,e,p,d,this._buffer,this._offset,h),s=s||this._writeState}while(!this._hadError&&_(s[0],s[1]));if(this._hadError)throw n;if(g>=l)throw c(this),new RangeError(\"Cannot create final Buffer. It would be larger than 0x\"+l.toString(16)+\" bytes\");let b=i.concat(m,g);return c(this),b},s.inherits(u,a.Inflate),t.exports=r=d,r.Inflate=u,r.createInflate=function(e){return new u(e)},r.inflateSync=d}).call(this)}).call(this,e(\"_process\"),e(\"buffer\").Buffer)},{_process:60,assert:23,buffer:33,util:81,zlib:32}],22:[function(e,t,r){let n=t.exports=function(e){this._buffer=e,this._reads=[]};n.prototype.read=function(e,t){this._reads.push({length:Math.abs(e),allowLess:e__left_angle_mark_0,func:t})},n.prototype.process=function(){for(;this._reads.length>0&&this._buffer.length;){let e=this._reads[0];if(!this._buffer.length||!(this._buffer.length>=e.length||e.allowLess))break;{this._reads.shift();let t=this._buffer;this._buffer=t.slice(e.length),e.func.call(this,t.slice(0,e.length))}}if(this._reads.length>0)throw new Error(\"There are some read requests waitng on finished stream\");if(this._buffer.length>0)throw new Error(\"unrecognised content at end of stream\")}},{}],23:[function(e,t,n){(function(r){(function(){function n(e,t){if(e===t)return 0;for(var r=e.length,n=t.length,i=0,o=Math.min(r,n);i__left_angle_mark_o;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r__left_angle_mark_n?-1:n__left_angle_mark_r?1:0}function i(e){return r.Buffer&&\"function\"==typeof r.Buffer.isBuffer?r.Buffer.isBuffer(e):!(null==e||!e._isBuffer)}var o=e(\"util/\"),a=Object.prototype.hasOwnProperty,s=Array.prototype.slice,l=\"foo\"===function(){}.name;function u(e){return Object.prototype.toString.call(e)}function c(e){return!i(e)&&\"function\"==typeof r.ArrayBuffer&&(\"function\"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):!!e&&(e instanceof DataView||!!(e.buffer&&e.buffer instanceof ArrayBuffer)))}var d=t.exports=_,h=/\\s*function\\s+([^\\(\\s]*)\\s*/;function f(e){if(o.isFunction(e)){if(l)return e.name;var t=e.toString().match(h);return t&&t[1]}}function p(e,t){return\"string\"==typeof e?e.length__left_angle_mark_t?e:e.slice(0,t):e}function m(e){if(l||!o.isFunction(e))return o.inspect(e);var t=f(e);return\"[Function\"+(t?\": \"+t:\"\")+\"]\"}function g(e,t,r,n,i){throw new d.AssertionError({message:r,actual:e,expected:t,operator:n,stackStartFunction:i})}function _(e,t){e||g(e,!0,t,\"==\",d.ok)}function b(e,t,r,a){if(e===t)return!0;if(i(e)&&i(t))return 0===n(e,t);if(o.isDate(e)&&o.isDate(t))return e.getTime()===t.getTime();if(o.isRegExp(e)&&o.isRegExp(t))return e.source===t.source&&e.global===t.global&&e.multiline===t.multiline&&e.lastIndex===t.lastIndex&&e.ignoreCase===t.ignoreCase;if(null!==e&&\"object\"==typeof e||null!==t&&\"object\"==typeof t){if(c(e)&&c(t)&&u(e)===u(t)&&!(e instanceof Float32Array||e instanceof Float64Array))return 0===n(new Uint8Array(e.buffer),new Uint8Array(t.buffer));if(i(e)!==i(t))return!1;var l=(a=a||{actual:[],expected:[]}).actual.indexOf(e);return-1!==l&&l===a.expected.indexOf(t)||(a.actual.push(e),a.expected.push(t),function(e,t,r,n){if(null==e||null==t)return!1;if(o.isPrimitive(e)||o.isPrimitive(t))return e===t;if(r&&Object.getPrototypeOf(e)!==Object.getPrototypeOf(t))return!1;var i=y(e),a=y(t);if(i&&!a||!i&&a)return!1;if(i)return b(e=s.call(e),t=s.call(t),r);var l,u,c=w(e),d=w(t);if(c.length!==d.length)return!1;for(c.sort(),d.sort(),u=c.length-1;u>=0;u--)if(c[u]!==d[u])return!1;for(u=c.length-1;u>=0;u--)if(!b(e[l=c[u]],t[l],r,n))return!1;return!0}(e,t,r,a))}return r?e===t:e==t}function y(e){return\"[object Arguments]\"==Object.prototype.toString.call(e)}function v(e,t){if(!e||!t)return!1;if(\"[object RegExp]\"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(r){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function A(e,t,r,n){var i;if(\"function\"!=typeof t)throw new TypeError('\"block\" argument must be a function');\"string\"==typeof r&&(n=r,r=null),i=function(e){var t;try{e()}catch(r){t=r}return t}(t),n=(r&&r.name?\" (\"+r.name+\").\":\".\")+(n?\" \"+n:\".\"),e&&!i&&g(i,r,\"Missing expected exception\"+n);var a=\"string\"==typeof n,s=!e&&i&&!r;if((!e&&o.isError(i)&&a&&v(i,r)||s)&&g(i,r,\"Got unwanted exception\"+n),e&&i&&r&&!v(i,r)||!e&&i)throw i}d.AssertionError=function(e){var t;this.name=\"AssertionError\",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=p(m((t=this).actual),128)+\" \"+t.operator+\" \"+p(m(t.expected),128),this.generatedMessage=!0);var r=e.stackStartFunction||g;if(Error.captureStackTrace)Error.captureStackTrace(this,r);else{var n=new Error;if(n.stack){var i=n.stack,o=f(r),a=i.indexOf(\"\\n\"+o);if(a>=0){var s=i.indexOf(\"\\n\",a+1);i=i.substring(s+1)}this.stack=i}}},o.inherits(d.AssertionError,Error),d.fail=g,d.ok=_,d.equal=function(e,t,r){e!=t&&g(e,t,r,\"==\",d.equal)},d.notEqual=function(e,t,r){e==t&&g(e,t,r,\"!=\",d.notEqual)},d.deepEqual=function(e,t,r){b(e,t,!1)||g(e,t,r,\"deepEqual\",d.deepEqual)},d.deepStrictEqual=function(e,t,r){b(e,t,!0)||g(e,t,r,\"deepStrictEqual\",d.deepStrictEqual)},d.notDeepEqual=function(e,t,r){b(e,t,!1)&&g(e,t,r,\"notDeepEqual\",d.notDeepEqual)},d.notDeepStrictEqual=function e(t,r,n){b(t,r,!0)&&g(t,r,n,\"notDeepStrictEqual\",e)},d.strictEqual=function(e,t,r){e!==t&&g(e,t,r,\"===\",d.strictEqual)},d.notStrictEqual=function(e,t,r){e===t&&g(e,t,r,\"!==\",d.notStrictEqual)},d.throws=function(e,t,r){A(!0,e,t,r)},d.doesNotThrow=function(e,t,r){A(!1,e,t,r)},d.ifError=function(e){if(e)throw e};var w=Object.keys||function(e){var t=[];for(var r in e)a.call(e,r)&&t.push(r);return t}}).call(this)}).call(this,void 0!==r.g?r.g:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:{})},{\"util/\":26}],24:[function(e,t,r){\"function\"==typeof Object.create?t.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}},{}],25:[function(e,t,r){t.exports=function(e){return e&&\"object\"==typeof e&&\"function\"==typeof e.copy&&\"function\"==typeof e.fill&&\"function\"==typeof e.readUInt8}},{}],26:[function(e,t,n){(function(t,r){(function(){var i=/%[sdj%]/g;n.format=function(e){if(!_(e)){for(var t=[],r=0;r__left_angle_mark_arguments.length;r++)t.push(s(arguments[r]));return t.join(\" \")}r=1;for(var n=arguments,o=n.length,a=String(e).replace(i,(function(e){if(\"%%\"===e)return\"%\";if(r>=o)return e;switch(e){case\"%s\":return String(n[r++]);case\"%d\":return Number(n[r++]);case\"%j\":try{return JSON.stringify(n[r++])}catch(t){return\"[Circular]\"}default:return e}})),l=n[r];r__left_angle_mark_o;l=n[++r])m(l)||!v(l)?a+=\" \"+l:a+=\" \"+s(l);return a},n.deprecate=function(e,i){if(b(r.process))return function(){return n.deprecate(e,i).apply(this,arguments)};if(!0===t.noDeprecation)return e;var o=!1;return function(){if(!o){if(t.throwDeprecation)throw new Error(i);t.traceDeprecation?import_console_browserify.default.trace(i):import_console_browserify.default.error(i),o=!0}return e.apply(this,arguments)}};var o,a={};function s(e,t){var r={seen:[],stylize:u};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),p(t)?r.showHidden=t:t&&n._extend(r,t),b(r.showHidden)&&(r.showHidden=!1),b(r.depth)&&(r.depth=2),b(r.colors)&&(r.colors=!1),b(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=l),c(r,e,r.depth)}function l(e,t){var r=s.styles[t];return r?\"\u001b[\"+s.colors[r][0]+\"m\"+e+\"\u001b[\"+s.colors[r][1]+\"m\":e}function u(e,t){return e}function c(e,t,r){if(e.customInspect&&t&&S(t.inspect)&&t.inspect!==n.inspect&&(!t.constructor||t.constructor.prototype!==t)){var i=t.inspect(r,e);return _(i)||(i=c(e,i,r)),i}var o=function(e,t){if(b(t))return e.stylize(\"undefined\",\"undefined\");if(_(t)){var r=\"'\"+JSON.stringify(t).replace(/^\"|\"$/g,\"\").replace(/'/g,\"\\\\'\").replace(/\\\\\"/g,'\"')+\"'\";return e.stylize(r,\"string\")}return g(t)?e.stylize(\"\"+t,\"number\"):p(t)?e.stylize(\"\"+t,\"boolean\"):m(t)?e.stylize(\"null\",\"null\"):void 0}(e,t);if(o)return o;var a,s=Object.keys(t),l=(a={},s.forEach((function(e,t){a[e]=!0})),a);if(e.showHidden&&(s=Object.getOwnPropertyNames(t)),w(t)&&(s.indexOf(\"message\")>=0||s.indexOf(\"description\")>=0))return d(t);if(0===s.length){if(S(t)){var u=t.name?\": \"+t.name:\"\";return e.stylize(\"[Function\"+u+\"]\",\"special\")}if(y(t))return e.stylize(RegExp.prototype.toString.call(t),\"regexp\");if(A(t))return e.stylize(Date.prototype.toString.call(t),\"date\");if(w(t))return d(t)}var v,E=\"\",x=!1,C=[\"{\",\"}\"];return f(t)&&(x=!0,C=[\"[\",\"]\"]),S(t)&&(E=\" [Function\"+(t.name?\": \"+t.name:\"\")+\"]\"),y(t)&&(E=\" \"+RegExp.prototype.toString.call(t)),A(t)&&(E=\" \"+Date.prototype.toUTCString.call(t)),w(t)&&(E=\" \"+d(t)),0!==s.length||x&&0!=t.length?r__left_angle_mark_0?y(t)?e.stylize(RegExp.prototype.toString.call(t),\"regexp\"):e.stylize(\"[Object]\",\"special\"):(e.seen.push(t),v=x?function(e,t,r,n,i){for(var o=[],a=0,s=t.length;a__left_angle_mark_s;++a)T(t,String(a))?o.push(h(e,t,r,n,String(a),!0)):o.push(\"\");return i.forEach((function(i){i.match(/^\\d+$/)||o.push(h(e,t,r,n,i,!0))})),o}(e,t,r,l,s):s.map((function(n){return h(e,t,r,l,n,x)})),e.seen.pop(),function(e,t,r){return e.reduce((function(e,t){return t.indexOf(\"\\n\"),e+t.replace(/\\u001b\\[\\d\\d?m/g,\"\").length+1}),0)>60?r[0]+(\"\"===t?\"\":t+\"\\n \")+\" \"+e.join(\",\\n \")+\" \"+r[1]:r[0]+t+\" \"+e.join(\", \")+\" \"+r[1]}(v,E,C)):C[0]+E+C[1]}function d(e){return\"[\"+Error.prototype.toString.call(e)+\"]\"}function h(e,t,r,n,i,o){var a,s,l;if((l=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?s=l.set?e.stylize(\"[Getter/Setter]\",\"special\"):e.stylize(\"[Getter]\",\"special\"):l.set&&(s=e.stylize(\"[Setter]\",\"special\")),T(n,i)||(a=\"[\"+i+\"]\"),s||(e.seen.indexOf(l.value)__left_angle_mark_0?(s=m(r)?c(e,l.value,null):c(e,l.value,r-1)).indexOf(\"\\n\")>-1&&(s=o?s.split(\"\\n\").map((function(e){return\" \"+e})).join(\"\\n\").substr(2):\"\\n\"+s.split(\"\\n\").map((function(e){return\" \"+e})).join(\"\\n\")):s=e.stylize(\"[Circular]\",\"special\")),b(a)){if(o&&i.match(/^\\d+$/))return s;(a=JSON.stringify(\"\"+i)).match(/^\"([a-zA-Z_][a-zA-Z_0-9]*)\"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,\"name\")):(a=a.replace(/'/g,\"\\\\'\").replace(/\\\\\"/g,'\"').replace(/(^\"|\"$)/g,\"'\"),a=e.stylize(a,\"string\"))}return a+\": \"+s}function f(e){return Array.isArray(e)}function p(e){return\"boolean\"==typeof e}function m(e){return null===e}function g(e){return\"number\"==typeof e}function _(e){return\"string\"==typeof e}function b(e){return void 0===e}function y(e){return v(e)&&\"[object RegExp]\"===E(e)}function v(e){return\"object\"==typeof e&&null!==e}function A(e){return v(e)&&\"[object Date]\"===E(e)}function w(e){return v(e)&&(\"[object Error]\"===E(e)||e instanceof Error)}function S(e){return\"function\"==typeof e}function E(e){return Object.prototype.toString.call(e)}function x(e){return e__left_angle_mark_10?\"0\"+e.toString(10):e.toString(10)}n.debuglog=function(e){if(b(o)&&(o=t.env.NODE_DEBUG||\"\"),e=e.toUpperCase(),!a[e])if(new RegExp(\"\\\\b\"+e+\"\\\\b\",\"i\").test(o)){var r=t.pid;a[e]=function(){var t=n.format.apply(n,arguments);import_console_browserify.default.error(\"%s %d: %s\",e,r,t)}}else a[e]=function(){};return a[e]},n.inspect=s,s.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},s.styles={special:\"cyan\",number:\"yellow\",boolean:\"yellow\",undefined:\"grey\",null:\"bold\",string:\"green\",date:\"magenta\",regexp:\"red\"},n.isArray=f,n.isBoolean=p,n.isNull=m,n.isNullOrUndefined=function(e){return null==e},n.isNumber=g,n.isString=_,n.isSymbol=function(e){return\"symbol\"==typeof e},n.isUndefined=b,n.isRegExp=y,n.isObject=v,n.isDate=A,n.isError=w,n.isFunction=S,n.isPrimitive=function(e){return null===e||\"boolean\"==typeof e||\"number\"==typeof e||\"string\"==typeof e||\"symbol\"==typeof e||void 0===e},n.isBuffer=e(\"./support/isBuffer\");var C=[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\"];function T(e,t){return Object.prototype.hasOwnProperty.call(e,t)}n.log=function(){var e,t;import_console_browserify.default.log(\"%s - %s\",(t=[x((e=new Date).getHours()),x(e.getMinutes()),x(e.getSeconds())].join(\":\"),[e.getDate(),C[e.getMonth()],t].join(\" \")),n.format.apply(n,arguments))},n.inherits=e(\"inherits\"),n._extend=function(e,t){if(!t||!v(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e}}).call(this)}).call(this,e(\"_process\"),void 0!==r.g?r.g:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:{})},{\"./support/isBuffer\":25,_process:60,inherits:24}],27:[function(e,t,n){(function(r){(function(){var n=e(\"array-filter\");t.exports=function(){return n([\"BigInt64Array\",\"BigUint64Array\",\"Float32Array\",\"Float64Array\",\"Int16Array\",\"Int32Array\",\"Int8Array\",\"Uint16Array\",\"Uint32Array\",\"Uint8Array\",\"Uint8ClampedArray\"],(function(e){return\"function\"==typeof r[e]}))}}).call(this)}).call(this,void 0!==r.g?r.g:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:{})},{\"array-filter\":28}],28:[function(e,t,r){t.exports=function(e,t,r){if(e.filter)return e.filter(t,r);if(null==e)throw new TypeError;if(\"function\"!=typeof t)throw new TypeError;for(var i=[],o=0;o__left_angle_mark_e.length;o++)if(n.call(e,o)){var a=e[o];t.call(r,a,o,e)&&i.push(a)}return i};var n=Object.prototype.hasOwnProperty},{}],29:[function(e,t,r){r.byteLength=function(e){var t=l(e),r=t[0],n=t[1];return 3*(r+n)/4-n},r.toByteArray=function(e){var t,r,n,a=l(e),s=a[0],u=a[1],c=new o(3*(s+(n=u))/4-n),d=0,h=u>0?s-4:s;for(r=0;r__left_angle_mark_h;r+=4)t=i[e.charCodeAt(r)]__left_angle_mark___left_angle_mark_18|i[e.charCodeAt(r+1)]__left_angle_mark___left_angle_mark_12|i[e.charCodeAt(r+2)]__left_angle_mark___left_angle_mark_6|i[e.charCodeAt(r+3)],c[d++]=t>>16&255,c[d++]=t>>8&255,c[d++]=255&t;return 2===u&&(t=i[e.charCodeAt(r)]__left_angle_mark___left_angle_mark_2|i[e.charCodeAt(r+1)]>>4,c[d++]=255&t),1===u&&(t=i[e.charCodeAt(r)]__left_angle_mark___left_angle_mark_10|i[e.charCodeAt(r+1)]__left_angle_mark___left_angle_mark_4|i[e.charCodeAt(r+2)]>>2,c[d++]=t>>8&255,c[d++]=255&t),c},r.fromByteArray=function(e){for(var t,r=e.length,i=r%3,o=[],a=16383,s=0,l=r-i;s__left_angle_mark_l;s+=a)o.push(u(e,s,s+a>l?l:s+a));return 1===i?(t=e[r-1],o.push(n[t>>2]+n[t__left_angle_mark___left_angle_mark_4&63]+\"==\")):2===i&&(t=(e[r-2]__left_angle_mark___left_angle_mark_8)+e[r-1],o.push(n[t>>10]+n[t>>4&63]+n[t__left_angle_mark___left_angle_mark_2&63]+\"=\")),o.join(\"\")};for(var n=[],i=[],o=\"undefined\"!=typeof Uint8Array?Uint8Array:Array,a=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\",s=0;s__left_angle_mark_64;++s)n[s]=a[s],i[a.charCodeAt(s)]=s;function l(e){var t=e.length;if(t%4>0)throw new Error(\"Invalid string. Length must be a multiple of 4\");var r=e.indexOf(\"=\");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function u(e,t,r){for(var i,o=[],a=t;a__left_angle_mark_r;a+=3)i=(e[a]__left_angle_mark___left_angle_mark_16&16711680)+(e[a+1]__left_angle_mark___left_angle_mark_8&65280)+(255&e[a+2]),o.push(n[(s=i)>>18&63]+n[s>>12&63]+n[s>>6&63]+n[63&s]);var s;return o.join(\"\")}i[\"-\".charCodeAt(0)]=62,i[\"_\".charCodeAt(0)]=63},{}],30:[function(e,t,r){},{}],31:[function(e,t,r){(function(t,n){(function(){var i=e(\"assert\"),o=e(\"pako/lib/zlib/zstream\"),a=e(\"pako/lib/zlib/deflate.js\"),s=e(\"pako/lib/zlib/inflate.js\"),l=e(\"pako/lib/zlib/constants\");for(var u in l)r[u]=l[u];function c(e){if(\"number\"!=typeof e||e__left_angle_mark_r.DEFLATE||e>r.UNZIP)throw new TypeError(\"Bad argument\");this.dictionary=null,this.err=0,this.flush=0,this.init_done=!1,this.level=0,this.memLevel=0,this.mode=e,this.strategy=0,this.windowBits=0,this.write_in_progress=!1,this.pending_close=!1,this.gzip_id_bytes_read=0}r.NONE=0,r.DEFLATE=1,r.INFLATE=2,r.GZIP=3,r.GUNZIP=4,r.DEFLATERAW=5,r.INFLATERAW=6,r.UNZIP=7,c.prototype.close=function(){this.write_in_progress?this.pending_close=!0:(this.pending_close=!1,i(this.init_done,\"close before init\"),i(this.mode__left_angle_mark_=r.UNZIP),this.mode===r.DEFLATE||this.mode===r.GZIP||this.mode===r.DEFLATERAW?a.deflateEnd(this.strm):this.mode!==r.INFLATE&&this.mode!==r.GUNZIP&&this.mode!==r.INFLATERAW&&this.mode!==r.UNZIP||s.inflateEnd(this.strm),this.mode=r.NONE,this.dictionary=null)},c.prototype.write=function(e,t,r,n,i,o,a){return this._write(!0,e,t,r,n,i,o,a)},c.prototype.writeSync=function(e,t,r,n,i,o,a){return this._write(!1,e,t,r,n,i,o,a)},c.prototype._write=function(e,o,a,s,l,u,c,d){if(i.equal(arguments.length,8),i(this.init_done,\"write before init\"),i(this.mode!==r.NONE,\"already finalized\"),i.equal(!1,this.write_in_progress,\"write already in progress\"),i.equal(!1,this.pending_close,\"close is pending\"),this.write_in_progress=!0,i.equal(!1,void 0===o,\"must provide flush value\"),this.write_in_progress=!0,o!==r.Z_NO_FLUSH&&o!==r.Z_PARTIAL_FLUSH&&o!==r.Z_SYNC_FLUSH&&o!==r.Z_FULL_FLUSH&&o!==r.Z_FINISH&&o!==r.Z_BLOCK)throw new Error(\"Invalid flush value\");if(null==a&&(a=n.alloc(0),l=0,s=0),this.strm.avail_in=l,this.strm.input=a,this.strm.next_in=s,this.strm.avail_out=d,this.strm.output=u,this.strm.next_out=c,this.flush=o,!e)return this._process(),this._checkError()?this._afterSync():void 0;var h=this;return t.nextTick((function(){h._process(),h._after()})),this},c.prototype._afterSync=function(){var e=this.strm.avail_out,t=this.strm.avail_in;return this.write_in_progress=!1,[t,e]},c.prototype._process=function(){var e=null;switch(this.mode){case r.DEFLATE:case r.GZIP:case r.DEFLATERAW:this.err=a.deflate(this.strm,this.flush);break;case r.UNZIP:switch(this.strm.avail_in>0&&(e=this.strm.next_in),this.gzip_id_bytes_read){case 0:if(null===e)break;if(31!==this.strm.input[e]){this.mode=r.INFLATE;break}if(this.gzip_id_bytes_read=1,e++,1===this.strm.avail_in)break;case 1:if(null===e)break;139===this.strm.input[e]?(this.gzip_id_bytes_read=2,this.mode=r.GUNZIP):this.mode=r.INFLATE;break;default:throw new Error(\"invalid number of gzip magic number bytes read\")}case r.INFLATE:case r.GUNZIP:case r.INFLATERAW:for(this.err=s.inflate(this.strm,this.flush),this.err===r.Z_NEED_DICT&&this.dictionary&&(this.err=s.inflateSetDictionary(this.strm,this.dictionary),this.err===r.Z_OK?this.err=s.inflate(this.strm,this.flush):this.err===r.Z_DATA_ERROR&&(this.err=r.Z_NEED_DICT));this.strm.avail_in>0&&this.mode===r.GUNZIP&&this.err===r.Z_STREAM_END&&0!==this.strm.next_in[0];)this.reset(),this.err=s.inflate(this.strm,this.flush);break;default:throw new Error(\"Unknown mode \"+this.mode)}},c.prototype._checkError=function(){switch(this.err){case r.Z_OK:case r.Z_BUF_ERROR:if(0!==this.strm.avail_out&&this.flush===r.Z_FINISH)return this._error(\"unexpected end of file\"),!1;break;case r.Z_STREAM_END:break;case r.Z_NEED_DICT:return null==this.dictionary?this._error(\"Missing dictionary\"):this._error(\"Bad dictionary\"),!1;default:return this._error(\"Zlib error\"),!1}return!0},c.prototype._after=function(){if(this._checkError()){var e=this.strm.avail_out,t=this.strm.avail_in;this.write_in_progress=!1,this.callback(t,e),this.pending_close&&this.close()}},c.prototype._error=function(e){this.strm.msg&&(e=this.strm.msg),this.onerror(e,this.err),this.write_in_progress=!1,this.pending_close&&this.close()},c.prototype.init=function(e,t,n,o,a){i(4===arguments.length||5===arguments.length,\"init(windowBits, level, memLevel, strategy, [dictionary])\"),i(e>=8&&e__left_angle_mark_=15,\"invalid windowBits\"),i(t>=-1&&t__left_angle_mark_=9,\"invalid compression level\"),i(n>=1&&n__left_angle_mark_=9,\"invalid memlevel\"),i(o===r.Z_FILTERED||o===r.Z_HUFFMAN_ONLY||o===r.Z_RLE||o===r.Z_FIXED||o===r.Z_DEFAULT_STRATEGY,\"invalid strategy\"),this._init(t,e,n,o,a),this._setDictionary()},c.prototype.params=function(){throw new Error(\"deflateParams Not supported\")},c.prototype.reset=function(){this._reset(),this._setDictionary()},c.prototype._init=function(e,t,n,i,l){switch(this.level=e,this.windowBits=t,this.memLevel=n,this.strategy=i,this.flush=r.Z_NO_FLUSH,this.err=r.Z_OK,this.mode!==r.GZIP&&this.mode!==r.GUNZIP||(this.windowBits+=16),this.mode===r.UNZIP&&(this.windowBits+=32),this.mode!==r.DEFLATERAW&&this.mode!==r.INFLATERAW||(this.windowBits=-1*this.windowBits),this.strm=new o,this.mode){case r.DEFLATE:case r.GZIP:case r.DEFLATERAW:this.err=a.deflateInit2(this.strm,this.level,r.Z_DEFLATED,this.windowBits,this.memLevel,this.strategy);break;case r.INFLATE:case r.GUNZIP:case r.INFLATERAW:case r.UNZIP:this.err=s.inflateInit2(this.strm,this.windowBits);break;default:throw new Error(\"Unknown mode \"+this.mode)}this.err!==r.Z_OK&&this._error(\"Init error\"),this.dictionary=l,this.write_in_progress=!1,this.init_done=!0},c.prototype._setDictionary=function(){if(null!=this.dictionary){switch(this.err=r.Z_OK,this.mode){case r.DEFLATE:case r.DEFLATERAW:this.err=a.deflateSetDictionary(this.strm,this.dictionary)}this.err!==r.Z_OK&&this._error(\"Failed to set dictionary\")}},c.prototype._reset=function(){switch(this.err=r.Z_OK,this.mode){case r.DEFLATE:case r.DEFLATERAW:case r.GZIP:this.err=a.deflateReset(this.strm);break;case r.INFLATE:case r.INFLATERAW:case r.GUNZIP:this.err=s.inflateReset(this.strm)}this.err!==r.Z_OK&&this._error(\"Failed to reset stream\")},r.Zlib=c}).call(this)}).call(this,e(\"_process\"),e(\"buffer\").Buffer)},{_process:60,assert:23,buffer:33,\"pako/lib/zlib/constants\":51,\"pako/lib/zlib/deflate.js\":53,\"pako/lib/zlib/inflate.js\":55,\"pako/lib/zlib/zstream\":59}],32:[function(e,t,r){(function(t){(function(){var n=e(\"buffer\").Buffer,i=e(\"stream\").Transform,o=e(\"./binding\"),a=e(\"util\"),s=e(\"assert\").ok,l=e(\"buffer\").kMaxLength,u=\"Cannot create final Buffer. It would be larger than 0x\"+l.toString(16)+\" bytes\";o.Z_MIN_WINDOWBITS=8,o.Z_MAX_WINDOWBITS=15,o.Z_DEFAULT_WINDOWBITS=15,o.Z_MIN_CHUNK=64,o.Z_MAX_CHUNK=1/0,o.Z_DEFAULT_CHUNK=16384,o.Z_MIN_MEMLEVEL=1,o.Z_MAX_MEMLEVEL=9,o.Z_DEFAULT_MEMLEVEL=8,o.Z_MIN_LEVEL=-1,o.Z_MAX_LEVEL=9,o.Z_DEFAULT_LEVEL=o.Z_DEFAULT_COMPRESSION;for(var c=Object.keys(o),d=0;d__left_angle_mark_c.length;d++){var h=c[d];h.match(/^Z/)&&Object.defineProperty(r,h,{enumerable:!0,value:o[h],writable:!1})}for(var f={Z_OK:o.Z_OK,Z_STREAM_END:o.Z_STREAM_END,Z_NEED_DICT:o.Z_NEED_DICT,Z_ERRNO:o.Z_ERRNO,Z_STREAM_ERROR:o.Z_STREAM_ERROR,Z_DATA_ERROR:o.Z_DATA_ERROR,Z_MEM_ERROR:o.Z_MEM_ERROR,Z_BUF_ERROR:o.Z_BUF_ERROR,Z_VERSION_ERROR:o.Z_VERSION_ERROR},p=Object.keys(f),m=0;m__left_angle_mark_p.length;m++){var g=p[m];f[f[g]]=g}function _(e,t,r){var i=[],o=0;function a(){for(var t;null!==(t=e.read());)i.push(t),o+=t.length;e.once(\"readable\",a)}function s(){var t,a=null;o>=l?a=new RangeError(u):t=n.concat(i,o),i=[],e.close(),r(a,t)}e.on(\"error\",(function(t){e.removeListener(\"end\",s),e.removeListener(\"readable\",a),r(t)})),e.on(\"end\",s),e.end(t),a()}function b(e,t){if(\"string\"==typeof t&&(t=n.from(t)),!n.isBuffer(t))throw new TypeError(\"Not a string or buffer\");var r=e._finishFlushFlag;return e._processChunk(t,r)}function y(e){if(!(this instanceof y))return new y(e);T.call(this,e,o.DEFLATE)}function v(e){if(!(this instanceof v))return new v(e);T.call(this,e,o.INFLATE)}function A(e){if(!(this instanceof A))return new A(e);T.call(this,e,o.GZIP)}function w(e){if(!(this instanceof w))return new w(e);T.call(this,e,o.GUNZIP)}function S(e){if(!(this instanceof S))return new S(e);T.call(this,e,o.DEFLATERAW)}function E(e){if(!(this instanceof E))return new E(e);T.call(this,e,o.INFLATERAW)}function x(e){if(!(this instanceof x))return new x(e);T.call(this,e,o.UNZIP)}function C(e){return e===o.Z_NO_FLUSH||e===o.Z_PARTIAL_FLUSH||e===o.Z_SYNC_FLUSH||e===o.Z_FULL_FLUSH||e===o.Z_FINISH||e===o.Z_BLOCK}function T(e,t){var a=this;if(this._opts=e=e||{},this._chunkSize=e.chunkSize||r.Z_DEFAULT_CHUNK,i.call(this,e),e.flush&&!C(e.flush))throw new Error(\"Invalid flush flag: \"+e.flush);if(e.finishFlush&&!C(e.finishFlush))throw new Error(\"Invalid flush flag: \"+e.finishFlush);if(this._flushFlag=e.flush||o.Z_NO_FLUSH,this._finishFlushFlag=void 0!==e.finishFlush?e.finishFlush:o.Z_FINISH,e.chunkSize&&(e.chunkSize__left_angle_mark_r.Z_MIN_CHUNK||e.chunkSize>r.Z_MAX_CHUNK))throw new Error(\"Invalid chunk size: \"+e.chunkSize);if(e.windowBits&&(e.windowBits__left_angle_mark_r.Z_MIN_WINDOWBITS||e.windowBits>r.Z_MAX_WINDOWBITS))throw new Error(\"Invalid windowBits: \"+e.windowBits);if(e.level&&(e.level__left_angle_mark_r.Z_MIN_LEVEL||e.level>r.Z_MAX_LEVEL))throw new Error(\"Invalid compression level: \"+e.level);if(e.memLevel&&(e.memLevel__left_angle_mark_r.Z_MIN_MEMLEVEL||e.memLevel>r.Z_MAX_MEMLEVEL))throw new Error(\"Invalid memLevel: \"+e.memLevel);if(e.strategy&&e.strategy!=r.Z_FILTERED&&e.strategy!=r.Z_HUFFMAN_ONLY&&e.strategy!=r.Z_RLE&&e.strategy!=r.Z_FIXED&&e.strategy!=r.Z_DEFAULT_STRATEGY)throw new Error(\"Invalid strategy: \"+e.strategy);if(e.dictionary&&!n.isBuffer(e.dictionary))throw new Error(\"Invalid dictionary: it should be a Buffer instance\");this._handle=new o.Zlib(t);var s=this;this._hadError=!1,this._handle.onerror=function(e,t){R(s),s._hadError=!0;var n=new Error(e);n.errno=t,n.code=r.codes[t],s.emit(\"error\",n)};var l=r.Z_DEFAULT_COMPRESSION;\"number\"==typeof e.level&&(l=e.level);var u=r.Z_DEFAULT_STRATEGY;\"number\"==typeof e.strategy&&(u=e.strategy),this._handle.init(e.windowBits||r.Z_DEFAULT_WINDOWBITS,l,e.memLevel||r.Z_DEFAULT_MEMLEVEL,u,e.dictionary),this._buffer=n.allocUnsafe(this._chunkSize),this._offset=0,this._level=l,this._strategy=u,this.once(\"end\",this.close),Object.defineProperty(this,\"_closed\",{get:function(){return!a._handle},configurable:!0,enumerable:!0})}function R(e,r){r&&t.nextTick(r),e._handle&&(e._handle.close(),e._handle=null)}function I(e){e.emit(\"close\")}Object.defineProperty(r,\"codes\",{enumerable:!0,value:Object.freeze(f),writable:!1}),r.Deflate=y,r.Inflate=v,r.Gzip=A,r.Gunzip=w,r.DeflateRaw=S,r.InflateRaw=E,r.Unzip=x,r.createDeflate=function(e){return new y(e)},r.createInflate=function(e){return new v(e)},r.createDeflateRaw=function(e){return new S(e)},r.createInflateRaw=function(e){return new E(e)},r.createGzip=function(e){return new A(e)},r.createGunzip=function(e){return new w(e)},r.createUnzip=function(e){return new x(e)},r.deflate=function(e,t,r){return\"function\"==typeof t&&(r=t,t={}),_(new y(t),e,r)},r.deflateSync=function(e,t){return b(new y(t),e)},r.gzip=function(e,t,r){return\"function\"==typeof t&&(r=t,t={}),_(new A(t),e,r)},r.gzipSync=function(e,t){return b(new A(t),e)},r.deflateRaw=function(e,t,r){return\"function\"==typeof t&&(r=t,t={}),_(new S(t),e,r)},r.deflateRawSync=function(e,t){return b(new S(t),e)},r.unzip=function(e,t,r){return\"function\"==typeof t&&(r=t,t={}),_(new x(t),e,r)},r.unzipSync=function(e,t){return b(new x(t),e)},r.inflate=function(e,t,r){return\"function\"==typeof t&&(r=t,t={}),_(new v(t),e,r)},r.inflateSync=function(e,t){return b(new v(t),e)},r.gunzip=function(e,t,r){return\"function\"==typeof t&&(r=t,t={}),_(new w(t),e,r)},r.gunzipSync=function(e,t){return b(new w(t),e)},r.inflateRaw=function(e,t,r){return\"function\"==typeof t&&(r=t,t={}),_(new E(t),e,r)},r.inflateRawSync=function(e,t){return b(new E(t),e)},a.inherits(T,i),T.prototype.params=function(e,n,i){if(e__left_angle_mark_r.Z_MIN_LEVEL||e>r.Z_MAX_LEVEL)throw new RangeError(\"Invalid compression level: \"+e);if(n!=r.Z_FILTERED&&n!=r.Z_HUFFMAN_ONLY&&n!=r.Z_RLE&&n!=r.Z_FIXED&&n!=r.Z_DEFAULT_STRATEGY)throw new TypeError(\"Invalid strategy: \"+n);if(this._level!==e||this._strategy!==n){var a=this;this.flush(o.Z_SYNC_FLUSH,(function(){s(a._handle,\"zlib binding closed\"),a._handle.params(e,n),a._hadError||(a._level=e,a._strategy=n,i&&i())}))}else t.nextTick(i)},T.prototype.reset=function(){return s(this._handle,\"zlib binding closed\"),this._handle.reset()},T.prototype._flush=function(e){this._transform(n.alloc(0),\"\",e)},T.prototype.flush=function(e,r){var i=this,a=this._writableState;(\"function\"==typeof e||void 0===e&&!r)&&(r=e,e=o.Z_FULL_FLUSH),a.ended?r&&t.nextTick(r):a.ending?r&&this.once(\"end\",r):a.needDrain?r&&this.once(\"drain\",(function(){return i.flush(e,r)})):(this._flushFlag=e,this.write(n.alloc(0),\"\",r))},T.prototype.close=function(e){R(this,e),t.nextTick(I,this)},T.prototype._transform=function(e,t,r){var i,a=this._writableState,s=(a.ending||a.ended)&&(!e||a.length===e.length);return null===e||n.isBuffer(e)?this._handle?(s?i=this._finishFlushFlag:(i=this._flushFlag,e.length>=a.length&&(this._flushFlag=this._opts.flush||o.Z_NO_FLUSH)),void this._processChunk(e,i,r)):r(new Error(\"zlib binding closed\")):r(new Error(\"invalid input\"))},T.prototype._processChunk=function(e,t,r){var i=e&&e.length,o=this._chunkSize-this._offset,a=0,c=this,d=\"function\"==typeof r;if(!d){var h,f=[],p=0;this.on(\"error\",(function(e){h=e})),s(this._handle,\"zlib binding closed\");do{var m=this._handle.writeSync(t,e,a,i,this._buffer,this._offset,o)}while(!this._hadError&&b(m[0],m[1]));if(this._hadError)throw h;if(p>=l)throw R(this),new RangeError(u);var g=n.concat(f,p);return R(this),g}s(this._handle,\"zlib binding closed\");var _=this._handle.write(t,e,a,i,this._buffer,this._offset,o);function b(l,u){if(this&&(this.buffer=null,this.callback=null),!c._hadError){var h=o-u;if(s(h>=0,\"have should not go down\"),h>0){var m=c._buffer.slice(c._offset,c._offset+h);c._offset+=h,d?c.push(m):(f.push(m),p+=m.length)}if((0===u||c._offset>=c._chunkSize)&&(o=c._chunkSize,c._offset=0,c._buffer=n.allocUnsafe(c._chunkSize)),0===u){if(a+=i-l,i=l,!d)return!0;var g=c._handle.write(t,e,a,i,c._buffer,c._offset,c._chunkSize);return g.callback=b,void(g.buffer=e)}if(!d)return!1;r()}}_.buffer=e,_.callback=b},a.inherits(y,T),a.inherits(v,T),a.inherits(A,T),a.inherits(w,T),a.inherits(S,T),a.inherits(E,T),a.inherits(x,T)}).call(this)}).call(this,e(\"_process\"))},{\"./binding\":31,_process:60,assert:23,buffer:33,stream:61,util:81}],33:[function(e,t,r){(function(t){(function(){var t=e(\"base64-js\"),n=e(\"ieee754\");r.Buffer=a,r.SlowBuffer=function(e){return+e!=e&&(e=0),a.alloc(+e)},r.INSPECT_MAX_BYTES=50;var i=2147483647;function o(e){if(e>i)throw new RangeError('The value \"'+e+'\" is invalid for option \"size\"');var t=new Uint8Array(e);return t.__proto__=a.prototype,t}function a(e,t,r){if(\"number\"==typeof e){if(\"string\"==typeof t)throw new TypeError('The \"string\" argument must be of type string. Received type number');return u(e)}return s(e,t,r)}function s(e,t,r){if(\"string\"==typeof e)return function(e,t){if(\"string\"==typeof t&&\"\"!==t||(t=\"utf8\"),!a.isEncoding(t))throw new TypeError(\"Unknown encoding: \"+t);var r=0|h(e,t),n=o(r),i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}(e,t);if(ArrayBuffer.isView(e))return c(e);if(null==e)throw TypeError(\"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type \"+typeof e);if(F(e,ArrayBuffer)||e&&F(e.buffer,ArrayBuffer))return function(e,t,r){if(t__left_angle_mark_0||e.byteLength__left_angle_mark_t)throw new RangeError('\"offset\" is outside of buffer bounds');if(e.byteLength__left_angle_mark_t+(r||0))throw new RangeError('\"length\" is outside of buffer bounds');var n;return(n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r)).__proto__=a.prototype,n}(e,t,r);if(\"number\"==typeof e)throw new TypeError('The \"value\" argument must not be of type number. Received type number');var n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return a.from(n,t,r);var i=function(e){if(a.isBuffer(e)){var t=0|d(e.length),r=o(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?\"number\"!=typeof e.length||U(e.length)?o(0):c(e):\"Buffer\"===e.type&&Array.isArray(e.data)?c(e.data):void 0}(e);if(i)return i;if(\"undefined\"!=typeof Symbol&&null!=Symbol.toPrimitive&&\"function\"==typeof e[Symbol.toPrimitive])return a.from(e[Symbol.toPrimitive](\"string\"),t,r);throw new TypeError(\"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type \"+typeof e)}function l(e){if(\"number\"!=typeof e)throw new TypeError('\"size\" argument must be of type number');if(e__left_angle_mark_0)throw new RangeError('The value \"'+e+'\" is invalid for option \"size\"')}function u(e){return l(e),o(e__left_angle_mark_0?0:0|d(e))}function c(e){for(var t=e.length__left_angle_mark_0?0:0|d(e.length),r=o(t),n=0;n__left_angle_mark_t;n+=1)r[n]=255&e[n];return r}function d(e){if(e>=i)throw new RangeError(\"Attempt to allocate Buffer larger than maximum size: 0x\"+i.toString(16)+\" bytes\");return 0|e}function h(e,t){if(a.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||F(e,ArrayBuffer))return e.byteLength;if(\"string\"!=typeof e)throw new TypeError('The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var i=!1;;)switch(t){case\"ascii\":case\"latin1\":case\"binary\":return r;case\"utf8\":case\"utf-8\":return j(e).length;case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return 2*r;case\"hex\":return r>>>1;case\"base64\":return L(e).length;default:if(i)return n?-1:j(e).length;t=(\"\"+t).toLowerCase(),i=!0}}function f(e,t,r){var n=!1;if((void 0===t||t__left_angle_mark_0)&&(t=0),t>this.length)return\"\";if((void 0===r||r>this.length)&&(r=this.length),r__left_angle_mark_=0)return\"\";if((r>>>=0)__left_angle_mark_=(t>>>=0))return\"\";for(e||(e=\"utf8\");;)switch(e){case\"hex\":return R(this,t,r);case\"utf8\":case\"utf-8\":return E(this,t,r);case\"ascii\":return C(this,t,r);case\"latin1\":case\"binary\":return T(this,t,r);case\"base64\":return S(this,t,r);case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return I(this,t,r);default:if(n)throw new TypeError(\"Unknown encoding: \"+e);e=(e+\"\").toLowerCase(),n=!0}}function p(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function m(e,t,r,n,i){if(0===e.length)return-1;if(\"string\"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r__left_angle_mark_-2147483648&&(r=-2147483648),U(r=+r)&&(r=i?0:e.length-1),r__left_angle_mark_0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r__left_angle_mark_0){if(!i)return-1;r=0}if(\"string\"==typeof t&&(t=a.from(t,n)),a.isBuffer(t))return 0===t.length?-1:g(e,t,r,n,i);if(\"number\"==typeof t)return t&=255,\"function\"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):g(e,[t],r,n,i);throw new TypeError(\"val must be string, number or Buffer\")}function g(e,t,r,n,i){var o,a=1,s=e.length,l=t.length;if(void 0!==n&&(\"ucs2\"===(n=String(n).toLowerCase())||\"ucs-2\"===n||\"utf16le\"===n||\"utf-16le\"===n)){if(e.length__left_angle_mark_2||t.length__left_angle_mark_2)return-1;a=2,s/=2,l/=2,r/=2}function u(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){var c=-1;for(o=r;o__left_angle_mark_s;o++)if(u(e,o)===u(t,-1===c?0:o-c)){if(-1===c&&(c=o),o-c+1===l)return c*a}else-1!==c&&(o-=o-c),c=-1}else for(r+l>s&&(r=s-l),o=r;o>=0;o--){for(var d=!0,h=0;h__left_angle_mark_l;h++)if(u(e,o+h)!==u(t,h)){d=!1;break}if(d)return o}return-1}function _(e,t,r,n){r=Number(r)||0;var i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;var o=t.length;n>o/2&&(n=o/2);for(var a=0;a__left_angle_mark_n;++a){var s=parseInt(t.substr(2*a,2),16);if(U(s))return a;e[r+a]=s}return a}function b(e,t,r,n){return D(j(t,e.length-r),e,r,n)}function y(e,t,r,n){return D(function(e){for(var t=[],r=0;r__left_angle_mark_e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function v(e,t,r,n){return y(e,t,r,n)}function A(e,t,r,n){return D(L(t),e,r,n)}function w(e,t,r,n){return D(function(e,t){for(var r,n,i,o=[],a=0;a__left_angle_mark_e.length&&!((t-=2)__left_angle_mark_0);++a)n=(r=e.charCodeAt(a))>>8,i=r%256,o.push(i),o.push(n);return o}(t,e.length-r),e,r,n)}function S(e,r,n){return 0===r&&n===e.length?t.fromByteArray(e):t.fromByteArray(e.slice(r,n))}function E(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i__left_angle_mark_r;){var o,a,s,l,u=e[i],c=null,d=u>239?4:u>223?3:u>191?2:1;if(i+d__left_angle_mark_=r)switch(d){case 1:u__left_angle_mark_128&&(c=u);break;case 2:128==(192&(o=e[i+1]))&&(l=(31&u)__left_angle_mark___left_angle_mark_6|63&o)>127&&(c=l);break;case 3:o=e[i+1],a=e[i+2],128==(192&o)&&128==(192&a)&&(l=(15&u)__left_angle_mark___left_angle_mark_12|(63&o)__left_angle_mark___left_angle_mark_6|63&a)>2047&&(l__left_angle_mark_55296||l>57343)&&(c=l);break;case 4:o=e[i+1],a=e[i+2],s=e[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&(l=(15&u)__left_angle_mark___left_angle_mark_18|(63&o)__left_angle_mark___left_angle_mark_12|(63&a)__left_angle_mark___left_angle_mark_6|63&s)>65535&&l__left_angle_mark_1114112&&(c=l)}null===c?(c=65533,d=1):c>65535&&(c-=65536,n.push(c>>>10&1023|55296),c=56320|1023&c),n.push(c),i+=d}return function(e){var t=e.length;if(t__left_angle_mark_=x)return String.fromCharCode.apply(String,e);for(var r=\"\",n=0;n__left_angle_mark_t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=x));return r}(n)}r.kMaxLength=i,a.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()}catch(t){return!1}}(),a.TYPED_ARRAY_SUPPORT||void 0===import_console_browserify.default||\"function\"!=typeof import_console_browserify.default.error||import_console_browserify.default.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.\"),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}}),\"undefined\"!=typeof Symbol&&null!=Symbol.species&&a[Symbol.species]===a&&Object.defineProperty(a,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),a.poolSize=8192,a.from=function(e,t,r){return s(e,t,r)},a.prototype.__proto__=Uint8Array.prototype,a.__proto__=Uint8Array,a.alloc=function(e,t,r){return i=t,a=r,l(n=e),n__left_angle_mark_=0?o(n):void 0!==i?\"string\"==typeof a?o(n).fill(i,a):o(n).fill(i):o(n);var n,i,a},a.allocUnsafe=function(e){return u(e)},a.allocUnsafeSlow=function(e){return u(e)},a.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==a.prototype},a.compare=function(e,t){if(F(e,Uint8Array)&&(e=a.from(e,e.offset,e.byteLength)),F(t,Uint8Array)&&(t=a.from(t,t.offset,t.byteLength)),!a.isBuffer(e)||!a.isBuffer(t))throw new TypeError('The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var r=e.length,n=t.length,i=0,o=Math.min(r,n);i__left_angle_mark_o;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r__left_angle_mark_n?-1:n__left_angle_mark_r?1:0},a.isEncoding=function(e){switch(String(e).toLowerCase()){case\"hex\":case\"utf8\":case\"utf-8\":case\"ascii\":case\"latin1\":case\"binary\":case\"base64\":case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return!0;default:return!1}},a.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('\"list\" argument must be an Array of Buffers');if(0===e.length)return a.alloc(0);var r;if(void 0===t)for(t=0,r=0;r__left_angle_mark_e.length;++r)t+=e[r].length;var n=a.allocUnsafe(t),i=0;for(r=0;r__left_angle_mark_e.length;++r){var o=e[r];if(F(o,Uint8Array)&&(o=a.from(o)),!a.isBuffer(o))throw new TypeError('\"list\" argument must be an Array of Buffers');o.copy(n,i),i+=o.length}return n},a.byteLength=h,a.prototype._isBuffer=!0,a.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError(\"Buffer size must be a multiple of 16-bits\");for(var t=0;t__left_angle_mark_e;t+=2)p(this,t,t+1);return this},a.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError(\"Buffer size must be a multiple of 32-bits\");for(var t=0;t__left_angle_mark_e;t+=4)p(this,t,t+3),p(this,t+1,t+2);return this},a.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError(\"Buffer size must be a multiple of 64-bits\");for(var t=0;t__left_angle_mark_e;t+=8)p(this,t,t+7),p(this,t+1,t+6),p(this,t+2,t+5),p(this,t+3,t+4);return this},a.prototype.toString=function(){var e=this.length;return 0===e?\"\":0===arguments.length?E(this,0,e):f.apply(this,arguments)},a.prototype.toLocaleString=a.prototype.toString,a.prototype.equals=function(e){if(!a.isBuffer(e))throw new TypeError(\"Argument must be a Buffer\");return this===e||0===a.compare(this,e)},a.prototype.inspect=function(){var e=\"\",t=r.INSPECT_MAX_BYTES;return e=this.toString(\"hex\",0,t).replace(/(.{2})/g,\"$1 \").trim(),this.length>t&&(e+=\" ... \"),\"__left_angle_mark_Buffer \"+e+\">\"},a.prototype.compare=function(e,t,r,n,i){if(F(e,Uint8Array)&&(e=a.from(e,e.offset,e.byteLength)),!a.isBuffer(e))throw new TypeError('The \"target\" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t__left_angle_mark_0||r>e.length||n__left_angle_mark_0||i>this.length)throw new RangeError(\"out of range index\");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(n>>>=0),s=(r>>>=0)-(t>>>=0),l=Math.min(o,s),u=this.slice(n,i),c=e.slice(t,r),d=0;d__left_angle_mark_l;++d)if(u[d]!==c[d]){o=u[d],s=c[d];break}return o__left_angle_mark_s?-1:s__left_angle_mark_o?1:0},a.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},a.prototype.indexOf=function(e,t,r){return m(this,e,t,r,!0)},a.prototype.lastIndexOf=function(e,t,r){return m(this,e,t,r,!1)},a.prototype.write=function(e,t,r,n){if(void 0===t)n=\"utf8\",r=this.length,t=0;else if(void 0===r&&\"string\"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error(\"Buffer.write(string, encoding, offset[, length]) is no longer supported\");t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n=\"utf8\")):(n=r,r=void 0)}var i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r__left_angle_mark_0||t__left_angle_mark_0)||t>this.length)throw new RangeError(\"Attempt to write outside buffer bounds\");n||(n=\"utf8\");for(var o=!1;;)switch(n){case\"hex\":return _(this,e,t,r);case\"utf8\":case\"utf-8\":return b(this,e,t,r);case\"ascii\":return y(this,e,t,r);case\"latin1\":case\"binary\":return v(this,e,t,r);case\"base64\":return A(this,e,t,r);case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return w(this,e,t,r);default:if(o)throw new TypeError(\"Unknown encoding: \"+n);n=(\"\"+n).toLowerCase(),o=!0}},a.prototype.toJSON=function(){return{type:\"Buffer\",data:Array.prototype.slice.call(this._arr||this,0)}};var x=4096;function C(e,t,r){var n=\"\";r=Math.min(e.length,r);for(var i=t;i__left_angle_mark_r;++i)n+=String.fromCharCode(127&e[i]);return n}function T(e,t,r){var n=\"\";r=Math.min(e.length,r);for(var i=t;i__left_angle_mark_r;++i)n+=String.fromCharCode(e[i]);return n}function R(e,t,r){var n,i=e.length;(!t||t__left_angle_mark_0)&&(t=0),(!r||r__left_angle_mark_0||r>i)&&(r=i);for(var o=\"\",a=t;a__left_angle_mark_r;++a)o+=(n=e[a])__left_angle_mark_16?\"0\"+n.toString(16):n.toString(16);return o}function I(e,t,r){for(var n=e.slice(t,r),i=\"\",o=0;o__left_angle_mark_n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function k(e,t,r){if(e%1!=0||e__left_angle_mark_0)throw new RangeError(\"offset is not uint\");if(e+t>r)throw new RangeError(\"Trying to access beyond buffer length\")}function P(e,t,r,n,i,o){if(!a.isBuffer(e))throw new TypeError('\"buffer\" argument must be a Buffer instance');if(t>i||t__left_angle_mark_o)throw new RangeError('\"value\" argument is out of bounds');if(r+n>e.length)throw new RangeError(\"Index out of range\")}function M(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError(\"Index out of range\");if(r__left_angle_mark_0)throw new RangeError(\"Index out of range\")}function O(e,t,r,i,o){return t=+t,r>>>=0,o||M(e,0,r,4),n.write(e,t,r,i,23,4),r+4}function B(e,t,r,i,o){return t=+t,r>>>=0,o||M(e,0,r,8),n.write(e,t,r,i,52,8),r+8}a.prototype.slice=function(e,t){var r=this.length;(e=~~e)__left_angle_mark_0?(e+=r)__left_angle_mark_0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)__left_angle_mark_0?(t+=r)__left_angle_mark_0&&(t=0):t>r&&(t=r),t__left_angle_mark_e&&(t=e);var n=this.subarray(e,t);return n.__proto__=a.prototype,n},a.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||k(e,t,this.length);for(var n=this[e],i=1,o=0;++o__left_angle_mark_t&&(i*=256);)n+=this[e+o]*i;return n},a.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||k(e,t,this.length);for(var n=this[e+--t],i=1;t>0&&(i*=256);)n+=this[e+--t]*i;return n},a.prototype.readUInt8=function(e,t){return e>>>=0,t||k(e,1,this.length),this[e]},a.prototype.readUInt16LE=function(e,t){return e>>>=0,t||k(e,2,this.length),this[e]|this[e+1]__left_angle_mark___left_angle_mark_8},a.prototype.readUInt16BE=function(e,t){return e>>>=0,t||k(e,2,this.length),this[e]__left_angle_mark___left_angle_mark_8|this[e+1]},a.prototype.readUInt32LE=function(e,t){return e>>>=0,t||k(e,4,this.length),(this[e]|this[e+1]__left_angle_mark___left_angle_mark_8|this[e+2]__left_angle_mark___left_angle_mark_16)+16777216*this[e+3]},a.prototype.readUInt32BE=function(e,t){return e>>>=0,t||k(e,4,this.length),16777216*this[e]+(this[e+1]__left_angle_mark___left_angle_mark_16|this[e+2]__left_angle_mark___left_angle_mark_8|this[e+3])},a.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||k(e,t,this.length);for(var n=this[e],i=1,o=0;++o__left_angle_mark_t&&(i*=256);)n+=this[e+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*t)),n},a.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||k(e,t,this.length);for(var n=t,i=1,o=this[e+--n];n>0&&(i*=256);)o+=this[e+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},a.prototype.readInt8=function(e,t){return e>>>=0,t||k(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},a.prototype.readInt16LE=function(e,t){e>>>=0,t||k(e,2,this.length);var r=this[e]|this[e+1]__left_angle_mark___left_angle_mark_8;return 32768&r?4294901760|r:r},a.prototype.readInt16BE=function(e,t){e>>>=0,t||k(e,2,this.length);var r=this[e+1]|this[e]__left_angle_mark___left_angle_mark_8;return 32768&r?4294901760|r:r},a.prototype.readInt32LE=function(e,t){return e>>>=0,t||k(e,4,this.length),this[e]|this[e+1]__left_angle_mark___left_angle_mark_8|this[e+2]__left_angle_mark___left_angle_mark_16|this[e+3]__left_angle_mark___left_angle_mark_24},a.prototype.readInt32BE=function(e,t){return e>>>=0,t||k(e,4,this.length),this[e]__left_angle_mark___left_angle_mark_24|this[e+1]__left_angle_mark___left_angle_mark_16|this[e+2]__left_angle_mark___left_angle_mark_8|this[e+3]},a.prototype.readFloatLE=function(e,t){return e>>>=0,t||k(e,4,this.length),n.read(this,e,!0,23,4)},a.prototype.readFloatBE=function(e,t){return e>>>=0,t||k(e,4,this.length),n.read(this,e,!1,23,4)},a.prototype.readDoubleLE=function(e,t){return e>>>=0,t||k(e,8,this.length),n.read(this,e,!0,52,8)},a.prototype.readDoubleBE=function(e,t){return e>>>=0,t||k(e,8,this.length),n.read(this,e,!1,52,8)},a.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||P(this,e,t,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[t]=255&e;++o__left_angle_mark_r&&(i*=256);)this[t+o]=e/i&255;return t+r},a.prototype.writeUIntBE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||P(this,e,t,r,Math.pow(2,8*r)-1,0);var i=r-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r},a.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,1,255,0),this[t]=255&e,t+1},a.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},a.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},a.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},a.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},a.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);P(this,e,t,r,i-1,-i)}var o=0,a=1,s=0;for(this[t]=255&e;++o__left_angle_mark_r&&(a*=256);)e__left_angle_mark_0&&0===s&&0!==this[t+o-1]&&(s=1),this[t+o]=(e/a|0)-s&255;return t+r},a.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);P(this,e,t,r,i-1,-i)}var o=r-1,a=1,s=0;for(this[t+o]=255&e;--o>=0&&(a*=256);)e__left_angle_mark_0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a|0)-s&255;return t+r},a.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,1,127,-128),e__left_angle_mark_0&&(e=255+e+1),this[t]=255&e,t+1},a.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},a.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},a.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},a.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,4,2147483647,-2147483648),e__left_angle_mark_0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},a.prototype.writeFloatLE=function(e,t,r){return O(this,e,t,!0,r)},a.prototype.writeFloatBE=function(e,t,r){return O(this,e,t,!1,r)},a.prototype.writeDoubleLE=function(e,t,r){return B(this,e,t,!0,r)},a.prototype.writeDoubleBE=function(e,t,r){return B(this,e,t,!1,r)},a.prototype.copy=function(e,t,r,n){if(!a.isBuffer(e))throw new TypeError(\"argument should be a Buffer\");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n__left_angle_mark_r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t__left_angle_mark_0)throw new RangeError(\"targetStart out of bounds\");if(r__left_angle_mark_0||r>=this.length)throw new RangeError(\"Index out of range\");if(n__left_angle_mark_0)throw new RangeError(\"sourceEnd out of bounds\");n>this.length&&(n=this.length),e.length-t__left_angle_mark_n-r&&(n=e.length-t+r);var i=n-r;if(this===e&&\"function\"==typeof Uint8Array.prototype.copyWithin)this.copyWithin(t,r,n);else if(this===e&&r__left_angle_mark_t&&t__left_angle_mark_n)for(var o=i-1;o>=0;--o)e[o+t]=this[o+r];else Uint8Array.prototype.set.call(e,this.subarray(r,n),t);return i},a.prototype.fill=function(e,t,r,n){if(\"string\"==typeof e){if(\"string\"==typeof t?(n=t,t=0,r=this.length):\"string\"==typeof r&&(n=r,r=this.length),void 0!==n&&\"string\"!=typeof n)throw new TypeError(\"encoding must be a string\");if(\"string\"==typeof n&&!a.isEncoding(n))throw new TypeError(\"Unknown encoding: \"+n);if(1===e.length){var i=e.charCodeAt(0);(\"utf8\"===n&&i__left_angle_mark_128||\"latin1\"===n)&&(e=i)}}else\"number\"==typeof e&&(e&=255);if(t__left_angle_mark_0||this.length__left_angle_mark_t||this.length__left_angle_mark_r)throw new RangeError(\"Out of range index\");if(r__left_angle_mark_=t)return this;var o;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),\"number\"==typeof e)for(o=t;o__left_angle_mark_r;++o)this[o]=e;else{var s=a.isBuffer(e)?e:a.from(e,n),l=s.length;if(0===l)throw new TypeError('The value \"'+e+'\" is invalid for argument \"value\"');for(o=0;o__left_angle_mark_r-t;++o)this[o+t]=s[o%l]}return this};var N=/[^+/0-9A-Za-z-_]/g;function j(e,t){var r;t=t||1/0;for(var n=e.length,i=null,o=[],a=0;a__left_angle_mark_n;++a){if((r=e.charCodeAt(a))>55295&&r__left_angle_mark_57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r__left_angle_mark_56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296__left_angle_mark___left_angle_mark_10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r__left_angle_mark_128){if((t-=1)__left_angle_mark_0)break;o.push(r)}else if(r__left_angle_mark_2048){if((t-=2)__left_angle_mark_0)break;o.push(r>>6|192,63&r|128)}else if(r__left_angle_mark_65536){if((t-=3)__left_angle_mark_0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r__left_angle_mark_1114112))throw new Error(\"Invalid code point\");if((t-=4)__left_angle_mark_0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function L(e){return t.toByteArray(function(e){if((e=(e=e.split(\"=\")[0]).trim().replace(N,\"\")).length__left_angle_mark_2)return\"\";for(;e.length%4!=0;)e+=\"=\";return e}(e))}function D(e,t,r,n){for(var i=0;i__left_angle_mark_n&&!(i+r>=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function F(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function U(e){return e!=e}}).call(this)}).call(this,e(\"buffer\").Buffer)},{\"base64-js\":29,buffer:33,ieee754:44}],34:[function(e,t,r){var n,i=TypeError,o=Object.getOwnPropertyDescriptor;if(o)try{o({},\"\")}catch(y){o=null}var a=function(){throw new i},s=o?function(){try{return a}catch(y){try{return o(arguments,\"callee\").get}catch(e){return a}}}():a,l=e(\"has-symbols\")(),u=Object.getPrototypeOf||function(e){return e.__proto__},c=n,d=n,h=n,f=n,p=\"undefined\"==typeof Uint8Array?n:u(Uint8Array),m={\"%Array%\":Array,\"%ArrayBuffer%\":\"undefined\"==typeof ArrayBuffer?n:ArrayBuffer,\"%ArrayBufferPrototype%\":\"undefined\"==typeof ArrayBuffer?n:ArrayBuffer.prototype,\"%ArrayIteratorPrototype%\":l?u([][Symbol.iterator]()):n,\"%ArrayPrototype%\":Array.prototype,\"%ArrayProto_entries%\":Array.prototype.entries,\"%ArrayProto_forEach%\":Array.prototype.forEach,\"%ArrayProto_keys%\":Array.prototype.keys,\"%ArrayProto_values%\":Array.prototype.values,\"%AsyncFromSyncIteratorPrototype%\":n,\"%AsyncFunction%\":d,\"%AsyncFunctionPrototype%\":n,\"%AsyncGenerator%\":n,\"%AsyncGeneratorFunction%\":h,\"%AsyncGeneratorPrototype%\":n,\"%AsyncIteratorPrototype%\":f&&l&&Symbol.asyncIterator?f[Symbol.asyncIterator]():n,\"%Atomics%\":\"undefined\"==typeof Atomics?n:Atomics,\"%Boolean%\":Boolean,\"%BooleanPrototype%\":Boolean.prototype,\"%DataView%\":\"undefined\"==typeof DataView?n:DataView,\"%DataViewPrototype%\":\"undefined\"==typeof DataView?n:DataView.prototype,\"%Date%\":Date,\"%DatePrototype%\":Date.prototype,\"%decodeURI%\":decodeURI,\"%decodeURIComponent%\":decodeURIComponent,\"%encodeURI%\":encodeURI,\"%encodeURIComponent%\":encodeURIComponent,\"%Error%\":Error,\"%ErrorPrototype%\":Error.prototype,\"%eval%\":eval,\"%EvalError%\":EvalError,\"%EvalErrorPrototype%\":EvalError.prototype,\"%Float32Array%\":\"undefined\"==typeof Float32Array?n:Float32Array,\"%Float32ArrayPrototype%\":\"undefined\"==typeof Float32Array?n:Float32Array.prototype,\"%Float64Array%\":\"undefined\"==typeof Float64Array?n:Float64Array,\"%Float64ArrayPrototype%\":\"undefined\"==typeof Float64Array?n:Float64Array.prototype,\"%Function%\":Function,\"%FunctionPrototype%\":Function.prototype,\"%Generator%\":n,\"%GeneratorFunction%\":c,\"%GeneratorPrototype%\":n,\"%Int8Array%\":\"undefined\"==typeof Int8Array?n:Int8Array,\"%Int8ArrayPrototype%\":\"undefined\"==typeof Int8Array?n:Int8Array.prototype,\"%Int16Array%\":\"undefined\"==typeof Int16Array?n:Int16Array,\"%Int16ArrayPrototype%\":\"undefined\"==typeof Int16Array?n:Int8Array.prototype,\"%Int32Array%\":\"undefined\"==typeof Int32Array?n:Int32Array,\"%Int32ArrayPrototype%\":\"undefined\"==typeof Int32Array?n:Int32Array.prototype,\"%isFinite%\":isFinite,\"%isNaN%\":isNaN,\"%IteratorPrototype%\":l?u(u([][Symbol.iterator]())):n,\"%JSON%\":\"object\"==typeof JSON?JSON:n,\"%JSONParse%\":\"object\"==typeof JSON?JSON.parse:n,\"%Map%\":\"undefined\"==typeof Map?n:Map,\"%MapIteratorPrototype%\":\"undefined\"!=typeof Map&&l?u((new Map)[Symbol.iterator]()):n,\"%MapPrototype%\":\"undefined\"==typeof Map?n:Map.prototype,\"%Math%\":Math,\"%Number%\":Number,\"%NumberPrototype%\":Number.prototype,\"%Object%\":Object,\"%ObjectPrototype%\":Object.prototype,\"%ObjProto_toString%\":Object.prototype.toString,\"%ObjProto_valueOf%\":Object.prototype.valueOf,\"%parseFloat%\":parseFloat,\"%parseInt%\":parseInt,\"%Promise%\":\"undefined\"==typeof Promise?n:Promise,\"%PromisePrototype%\":\"undefined\"==typeof Promise?n:Promise.prototype,\"%PromiseProto_then%\":\"undefined\"==typeof Promise?n:Promise.prototype.then,\"%Promise_all%\":\"undefined\"==typeof Promise?n:Promise.all,\"%Promise_reject%\":\"undefined\"==typeof Promise?n:Promise.reject,\"%Promise_resolve%\":\"undefined\"==typeof Promise?n:Promise.resolve,\"%Proxy%\":\"undefined\"==typeof Proxy?n:Proxy,\"%RangeError%\":RangeError,\"%RangeErrorPrototype%\":RangeError.prototype,\"%ReferenceError%\":ReferenceError,\"%ReferenceErrorPrototype%\":ReferenceError.prototype,\"%Reflect%\":\"undefined\"==typeof Reflect?n:Reflect,\"%RegExp%\":RegExp,\"%RegExpPrototype%\":RegExp.prototype,\"%Set%\":\"undefined\"==typeof Set?n:Set,\"%SetIteratorPrototype%\":\"undefined\"!=typeof Set&&l?u((new Set)[Symbol.iterator]()):n,\"%SetPrototype%\":\"undefined\"==typeof Set?n:Set.prototype,\"%SharedArrayBuffer%\":\"undefined\"==typeof SharedArrayBuffer?n:SharedArrayBuffer,\"%SharedArrayBufferPrototype%\":\"undefined\"==typeof SharedArrayBuffer?n:SharedArrayBuffer.prototype,\"%String%\":String,\"%StringIteratorPrototype%\":l?u(\"\"[Symbol.iterator]()):n,\"%StringPrototype%\":String.prototype,\"%Symbol%\":l?Symbol:n,\"%SymbolPrototype%\":l?Symbol.prototype:n,\"%SyntaxError%\":SyntaxError,\"%SyntaxErrorPrototype%\":SyntaxError.prototype,\"%ThrowTypeError%\":s,\"%TypedArray%\":p,\"%TypedArrayPrototype%\":p?p.prototype:n,\"%TypeError%\":i,\"%TypeErrorPrototype%\":i.prototype,\"%Uint8Array%\":\"undefined\"==typeof Uint8Array?n:Uint8Array,\"%Uint8ArrayPrototype%\":\"undefined\"==typeof Uint8Array?n:Uint8Array.prototype,\"%Uint8ClampedArray%\":\"undefined\"==typeof Uint8ClampedArray?n:Uint8ClampedArray,\"%Uint8ClampedArrayPrototype%\":\"undefined\"==typeof Uint8ClampedArray?n:Uint8ClampedArray.prototype,\"%Uint16Array%\":\"undefined\"==typeof Uint16Array?n:Uint16Array,\"%Uint16ArrayPrototype%\":\"undefined\"==typeof Uint16Array?n:Uint16Array.prototype,\"%Uint32Array%\":\"undefined\"==typeof Uint32Array?n:Uint32Array,\"%Uint32ArrayPrototype%\":\"undefined\"==typeof Uint32Array?n:Uint32Array.prototype,\"%URIError%\":URIError,\"%URIErrorPrototype%\":URIError.prototype,\"%WeakMap%\":\"undefined\"==typeof WeakMap?n:WeakMap,\"%WeakMapPrototype%\":\"undefined\"==typeof WeakMap?n:WeakMap.prototype,\"%WeakSet%\":\"undefined\"==typeof WeakSet?n:WeakSet,\"%WeakSetPrototype%\":\"undefined\"==typeof WeakSet?n:WeakSet.prototype},g=e(\"function-bind\").call(Function.call,String.prototype.replace),_=/[^%.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|%$))/g,b=/\\\\(\\\\)?/g;t.exports=function(e,t){if(\"string\"!=typeof e||0===e.length)throw new TypeError(\"intrinsic name must be a non-empty string\");if(arguments.length>1&&\"boolean\"!=typeof t)throw new TypeError('\"allowMissing\" argument must be a boolean');for(var r=function(e){var t=[];return g(e,_,(function(e,r,n,i){t[t.length]=n?g(i,b,\"$1\"):r||e})),t}(e),n=function(e,t){if(!(e in m))throw new SyntaxError(\"intrinsic \"+e+\" does not exist!\");if(void 0===m[e]&&!t)throw new i(\"intrinsic \"+e+\" exists, but is not available. Please file an issue!\");return m[e]}(\"%\"+(r.length>0?r[0]:\"\")+\"%\",t),a=1;a__left_angle_mark_r.length;a+=1)if(null!=n)if(o&&a+1>=r.length){var s=o(n,r[a]);if(!t&&!(r[a]in n))throw new i(\"base intrinsic for \"+e+\" exists, but the property is not available.\");n=s?s.get||s.value:n[r[a]]}else n=n[r[a]];return n}},{\"function-bind\":41,\"has-symbols\":42}],35:[function(e,t,r){var n=e(\"function-bind\"),i=e(\"../GetIntrinsic\")(\"%Function%\"),o=i.apply,a=i.call;t.exports=function(){return n.apply(a,arguments)},t.exports.apply=function(){return n.apply(o,arguments)}},{\"../GetIntrinsic\":34,\"function-bind\":41}],36:[function(e,t,r){var n=e(\"../GetIntrinsic\"),i=e(\"./callBind\"),o=i(n(\"String.prototype.indexOf\"));t.exports=function(e,t){var r=n(e,!!t);return\"function\"==typeof r&&o(e,\".prototype.\")?i(r):r}},{\"../GetIntrinsic\":34,\"./callBind\":35}],37:[function(e,t,r){var n=e(\"../GetIntrinsic\")(\"%Object.getOwnPropertyDescriptor%\");if(n)try{n([],\"length\")}catch(i){n=null}t.exports=n},{\"../GetIntrinsic\":34}],38:[function(e,t,r){var n,i=\"object\"==typeof Reflect?Reflect:null,o=i&&\"function\"==typeof i.apply?i.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};n=i&&\"function\"==typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var a=Number.isNaN||function(e){return e!=e};function s(){s.init.call(this)}t.exports=s,t.exports.once=function(e,t){return new Promise((function(r,n){function i(){void 0!==o&&e.removeListener(\"error\",o),r([].slice.call(arguments))}var o;\"error\"!==t&&(o=function(r){e.removeListener(t,i),n(r)},e.once(\"error\",o)),e.once(t,i)}))},s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var l=10;function u(e){if(\"function\"!=typeof e)throw new TypeError('The \"listener\" argument must be of type Function. Received type '+typeof e)}function c(e){return void 0===e._maxListeners?s.defaultMaxListeners:e._maxListeners}function d(e,t,r,n){var i,o,a,s;if(u(r),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit(\"newListener\",t,r.listener?r.listener:r),o=e._events),a=o[t]),void 0===a)a=o[t]=r,++e._eventsCount;else if(\"function\"==typeof a?a=o[t]=n?[r,a]:[a,r]:n?a.unshift(r):a.push(r),(i=c(e))>0&&a.length>i&&!a.warned){a.warned=!0;var l=new Error(\"Possible EventEmitter memory leak detected. \"+a.length+\" \"+String(t)+\" listeners added. Use emitter.setMaxListeners() to increase limit\");l.name=\"MaxListenersExceededWarning\",l.emitter=e,l.type=t,l.count=a.length,s=l,import_console_browserify.default&&import_console_browserify.default.warn&&import_console_browserify.default.warn(s)}return e}function h(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function f(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=h.bind(n);return i.listener=r,n.wrapFn=i,i}function p(e,t,r){var n=e._events;if(void 0===n)return[];var i=n[t];return void 0===i?[]:\"function\"==typeof i?r?[i.listener||i]:[i]:r?function(e){for(var t=new Array(e.length),r=0;r__left_angle_mark_t.length;++r)t[r]=e[r].listener||e[r];return t}(i):g(i,i.length)}function m(e){var t=this._events;if(void 0!==t){var r=t[e];if(\"function\"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function g(e,t){for(var r=new Array(t),n=0;n__left_angle_mark_t;++n)r[n]=e[n];return r}Object.defineProperty(s,\"defaultMaxListeners\",{enumerable:!0,get:function(){return l},set:function(e){if(\"number\"!=typeof e||e__left_angle_mark_0||a(e))throw new RangeError('The value of \"defaultMaxListeners\" is out of range. It must be a non-negative number. Received '+e+\".\");l=e}}),s.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(e){if(\"number\"!=typeof e||e__left_angle_mark_0||a(e))throw new RangeError('The value of \"n\" is out of range. It must be a non-negative number. Received '+e+\".\");return this._maxListeners=e,this},s.prototype.getMaxListeners=function(){return c(this)},s.prototype.emit=function(e){for(var t=[],r=1;r__left_angle_mark_arguments.length;r++)t.push(arguments[r]);var n=\"error\"===e,i=this._events;if(void 0!==i)n=n&&void 0===i.error;else if(!n)return!1;if(n){var a;if(t.length>0&&(a=t[0]),a instanceof Error)throw a;var s=new Error(\"Unhandled error.\"+(a?\" (\"+a.message+\")\":\"\"));throw s.context=a,s}var l=i[e];if(void 0===l)return!1;if(\"function\"==typeof l)o(l,this,t);else{var u=l.length,c=g(l,u);for(r=0;r__left_angle_mark_u;++r)o(c[r],this,t)}return!0},s.prototype.addListener=function(e,t){return d(this,e,t,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(e,t){return d(this,e,t,!0)},s.prototype.once=function(e,t){return u(t),this.on(e,f(this,e,t)),this},s.prototype.prependOnceListener=function(e,t){return u(t),this.prependListener(e,f(this,e,t)),this},s.prototype.removeListener=function(e,t){var r,n,i,o,a;if(u(t),void 0===(n=this._events))return this;if(void 0===(r=n[e]))return this;if(r===t||r.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit(\"removeListener\",e,r.listener||t));else if(\"function\"!=typeof r){for(i=-1,o=r.length-1;o>=0;o--)if(r[o]===t||r[o].listener===t){a=r[o].listener,i=o;break}if(i__left_angle_mark_0)return this;0===i?r.shift():function(e,t){for(;t+1__left_angle_mark_e.length;t++)e[t]=e[t+1];e.pop()}(r,i),1===r.length&&(n[e]=r[0]),void 0!==n.removeListener&&this.emit(\"removeListener\",e,a||t)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(e){var t,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0===arguments.length){var i,o=Object.keys(r);for(n=0;n__left_angle_mark_o.length;++n)\"removeListener\"!==(i=o[n])&&this.removeAllListeners(i);return this.removeAllListeners(\"removeListener\"),this._events=Object.create(null),this._eventsCount=0,this}if(\"function\"==typeof(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},s.prototype.listeners=function(e){return p(this,e,!0)},s.prototype.rawListeners=function(e){return p(this,e,!1)},s.listenerCount=function(e,t){return\"function\"==typeof e.listenerCount?e.listenerCount(t):m.call(e,t)},s.prototype.listenerCount=m,s.prototype.eventNames=function(){return this._eventsCount>0?n(this._events):[]}},{}],39:[function(e,t,r){var n=Object.prototype.hasOwnProperty,i=Object.prototype.toString;t.exports=function(e,t,r){if(\"[object Function]\"!==i.call(t))throw new TypeError(\"iterator must be a function\");var o=e.length;if(o===+o)for(var a=0;a__left_angle_mark_o;a++)t.call(r,e[a],a,e);else for(var s in e)n.call(e,s)&&t.call(r,e[s],s,e)}},{}],40:[function(e,t,r){var n=Array.prototype.slice,i=Object.prototype.toString;t.exports=function(e){var t=this;if(\"function\"!=typeof t||\"[object Function]\"!==i.call(t))throw new TypeError(\"Function.prototype.bind called on incompatible \"+t);for(var r,o=n.call(arguments,1),a=Math.max(0,t.length-o.length),s=[],l=0;l__left_angle_mark_a;l++)s.push(\"$\"+l);if(r=Function(\"binder\",\"return function (\"+s.join(\",\")+\"){ return binder.apply(this,arguments); }\")((function(){if(this instanceof r){var i=t.apply(this,o.concat(n.call(arguments)));return Object(i)===i?i:this}return t.apply(e,o.concat(n.call(arguments)))})),t.prototype){var u=function(){};u.prototype=t.prototype,r.prototype=new u,u.prototype=null}return r}},{}],41:[function(e,t,r){var n=e(\"./implementation\");t.exports=Function.prototype.bind||n},{\"./implementation\":40}],42:[function(e,t,n){(function(r){(function(){var n=r.Symbol,i=e(\"./shams\");t.exports=function(){return\"function\"==typeof n&&\"function\"==typeof Symbol&&\"symbol\"==typeof n(\"foo\")&&\"symbol\"==typeof Symbol(\"bar\")&&i()}}).call(this)}).call(this,void 0!==r.g?r.g:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:{})},{\"./shams\":43}],43:[function(e,t,r){t.exports=function(){if(\"function\"!=typeof Symbol||\"function\"!=typeof Object.getOwnPropertySymbols)return!1;if(\"symbol\"==typeof Symbol.iterator)return!0;var e={},t=Symbol(\"test\"),r=Object(t);if(\"string\"==typeof t)return!1;if(\"[object Symbol]\"!==Object.prototype.toString.call(t))return!1;if(\"[object Symbol]\"!==Object.prototype.toString.call(r))return!1;for(t in e[t]=42,e)return!1;if(\"function\"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if(\"function\"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var n=Object.getOwnPropertySymbols(e);if(1!==n.length||n[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(\"function\"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(e,t);if(42!==i.value||!0!==i.enumerable)return!1}return!0}},{}],44:[function(e,t,r){r.read=function(e,t,r,n,i){var o,a,s=8*i-n-1,l=(1__left_angle_mark___left_angle_mark_s)-1,u=l>>1,c=-7,d=r?i-1:0,h=r?-1:1,f=e[t+d];for(d+=h,o=f&(1__left_angle_mark___left_angle_mark_-c)-1,f>>=-c,c+=s;c>0;o=256*o+e[t+d],d+=h,c-=8);for(a=o&(1__left_angle_mark___left_angle_mark_-c)-1,o>>=-c,c+=n;c>0;a=256*a+e[t+d],d+=h,c-=8);if(0===o)o=1-u;else{if(o===l)return a?NaN:1/0*(f?-1:1);a+=Math.pow(2,n),o-=u}return(f?-1:1)*a*Math.pow(2,o-n)},r.write=function(e,t,r,n,i,o){var a,s,l,u=8*o-i-1,c=(1__left_angle_mark___left_angle_mark_u)-1,d=c>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=n?0:o-1,p=n?1:-1,m=t__left_angle_mark_0||0===t&&1/t__left_angle_mark_0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=c):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))__left_angle_mark_1&&(a--,l*=2),(t+=a+d>=1?h/l:h*Math.pow(2,1-d))*l>=2&&(a++,l/=2),a+d>=c?(s=0,a=c):a+d>=1?(s=(t*l-1)*Math.pow(2,i),a+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,i),a=0));i>=8;e[r+f]=255&s,f+=p,s/=256,i-=8);for(a=a__left_angle_mark___left_angle_mark_i|s,u+=i;u>0;e[r+f]=255&a,f+=p,a/=256,u-=8);e[r+f-p]|=128*m}},{}],45:[function(e,t,r){\"function\"==typeof Object.create?t.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},{}],46:[function(e,t,r){var n=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.toStringTag,i=Object.prototype.toString,o=function(e){return!(n&&e&&\"object\"==typeof e&&Symbol.toStringTag in e)&&\"[object Arguments]\"===i.call(e)},a=function(e){return!!o(e)||null!==e&&\"object\"==typeof e&&\"number\"==typeof e.length&&e.length>=0&&\"[object Array]\"!==i.call(e)&&\"[object Function]\"===i.call(e.callee)},s=function(){return o(arguments)}();o.isLegacyArguments=a,t.exports=s?o:a},{}],47:[function(e,t,r){var n=Object.prototype.toString,i=Function.prototype.toString,o=/^\\s*(?:function)?\\*/,a=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.toStringTag,s=Object.getPrototypeOf,l=function(){if(!a)return!1;try{return Function(\"return function*() {}\")()}catch(e){}}(),u=l?s(l):{};t.exports=function(e){return\"function\"==typeof e&&(!!o.test(i.call(e))||(a?s(e)===u:\"[object GeneratorFunction]\"===n.call(e)))}},{}],48:[function(e,t,n){(function(r){(function(){var n=e(\"foreach\"),i=e(\"available-typed-arrays\"),o=e(\"es-abstract/helpers/callBound\"),a=o(\"Object.prototype.toString\"),s=e(\"has-symbols\")()&&\"symbol\"==typeof Symbol.toStringTag,l=i(),u=o(\"Array.prototype.indexOf\",!0)||function(e,t){for(var r=0;r__left_angle_mark_e.length;r+=1)if(e[r]===t)return r;return-1},c=o(\"String.prototype.slice\"),d={},h=e(\"es-abstract/helpers/getOwnPropertyDescriptor\"),f=Object.getPrototypeOf;s&&h&&f&&n(l,(function(e){var t=new r[e];if(!(Symbol.toStringTag in t))throw new EvalError(\"this engine has support for Symbol.toStringTag, but \"+e+\" does not have the property! Please report this.\");var n=f(t),i=h(n,Symbol.toStringTag);if(!i){var o=f(n);i=h(o,Symbol.toStringTag)}d[e]=i.get})),t.exports=function(e){if(!e||\"object\"!=typeof e)return!1;if(!s){var t=c(a(e),8,-1);return u(l,t)>-1}return!!h&&(r=e,i=!1,n(d,(function(e,t){if(!i)try{i=e.call(r)===t}catch(n){}})),i);var r,i}}).call(this)}).call(this,void 0!==r.g?r.g:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:{})},{\"available-typed-arrays\":27,\"es-abstract/helpers/callBound\":36,\"es-abstract/helpers/getOwnPropertyDescriptor\":37,foreach:39,\"has-symbols\":42}],49:[function(e,t,r){var n=\"undefined\"!=typeof Uint8Array&&\"undefined\"!=typeof Uint16Array&&\"undefined\"!=typeof Int32Array;function i(e,t){return Object.prototype.hasOwnProperty.call(e,t)}r.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var r=t.shift();if(r){if(\"object\"!=typeof r)throw new TypeError(r+\"must be non-object\");for(var n in r)i(r,n)&&(e[n]=r[n])}}return e},r.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var o={arraySet:function(e,t,r,n,i){if(t.subarray&&e.subarray)e.set(t.subarray(r,r+n),i);else for(var o=0;o__left_angle_mark_n;o++)e[i+o]=t[r+o]},flattenChunks:function(e){var t,r,n,i,o,a;for(n=0,t=0,r=e.length;t__left_angle_mark_r;t++)n+=e[t].length;for(a=new Uint8Array(n),i=0,t=0,r=e.length;t__left_angle_mark_r;t++)o=e[t],a.set(o,i),i+=o.length;return a}},a={arraySet:function(e,t,r,n,i){for(var o=0;o__left_angle_mark_n;o++)e[i+o]=t[r+o]},flattenChunks:function(e){return[].concat.apply([],e)}};r.setTyped=function(e){e?(r.Buf8=Uint8Array,r.Buf16=Uint16Array,r.Buf32=Int32Array,r.assign(r,o)):(r.Buf8=Array,r.Buf16=Array,r.Buf32=Array,r.assign(r,a))},r.setTyped(n)},{}],50:[function(e,t,r){t.exports=function(e,t,r,n){for(var i=65535&e,o=e>>>16&65535,a=0;0!==r;){r-=a=r>2e3?2e3:r;do{o=o+(i=i+t[n++]|0)|0}while(--a);i%=65521,o%=65521}return i|o__left_angle_mark___left_angle_mark_16}},{}],51:[function(e,t,r){t.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],52:[function(e,t,r){var n=function(){for(var e,t=[],r=0;r__left_angle_mark_256;r++){e=r;for(var n=0;n__left_angle_mark_8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t}();t.exports=function(e,t,r,i){var o=n,a=i+r;e^=-1;for(var s=i;s__left_angle_mark_a;s++)e=e>>>8^o[255&(e^t[s])];return~e}},{}],53:[function(e,t,r){var n,i=e(\"../utils/common\"),o=e(\"./trees\"),a=e(\"./adler32\"),s=e(\"./crc32\"),l=e(\"./messages\"),u=-2,c=258,d=262,h=103,f=113,p=666;function m(e,t){return e.msg=l[t],t}function g(e){return(e__left_angle_mark___left_angle_mark_1)-(e>4?9:0)}function _(e){for(var t=e.length;--t>=0;)e[t]=0}function b(e){var t=e.state,r=t.pending;r>e.avail_out&&(r=e.avail_out),0!==r&&(i.arraySet(e.output,t.pending_buf,t.pending_out,r,e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,0===t.pending&&(t.pending_out=0))}function y(e,t){o._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,b(e.strm)}function v(e,t){e.pending_buf[e.pending++]=t}function A(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function w(e,t){var r,n,i=e.max_chain_length,o=e.strstart,a=e.prev_length,s=e.nice_match,l=e.strstart>e.w_size-d?e.strstart-(e.w_size-d):0,u=e.window,h=e.w_mask,f=e.prev,p=e.strstart+c,m=u[o+a-1],g=u[o+a];e.prev_length>=e.good_match&&(i>>=2),s>e.lookahead&&(s=e.lookahead);do{if(u[(r=t)+a]===g&&u[r+a-1]===m&&u[r]===u[o]&&u[++r]===u[o+1]){o+=2,r++;do{}while(u[++o]===u[++r]&&u[++o]===u[++r]&&u[++o]===u[++r]&&u[++o]===u[++r]&&u[++o]===u[++r]&&u[++o]===u[++r]&&u[++o]===u[++r]&&u[++o]===u[++r]&&o__left_angle_mark_p);if(n=c-(p-o),o=p-c,n>a){if(e.match_start=t,a=n,n>=s)break;m=u[o+a-1],g=u[o+a]}}}while((t=f[t&h])>l&&0!=--i);return a__left_angle_mark_=e.lookahead?a:e.lookahead}function S(e){var t,r,n,o,l,u,c,h,f,p,m=e.w_size;do{if(o=e.window_size-e.lookahead-e.strstart,e.strstart>=m+(m-d)){i.arraySet(e.window,e.window,m,m,0),e.match_start-=m,e.strstart-=m,e.block_start-=m,t=r=e.hash_size;do{n=e.head[--t],e.head[t]=n>=m?n-m:0}while(--r);t=r=m;do{n=e.prev[--t],e.prev[t]=n>=m?n-m:0}while(--r);o+=m}if(0===e.strm.avail_in)break;if(u=e.strm,c=e.window,h=e.strstart+e.lookahead,f=o,p=void 0,(p=u.avail_in)>f&&(p=f),r=0===p?0:(u.avail_in-=p,i.arraySet(c,u.input,u.next_in,p,h),1===u.state.wrap?u.adler=a(u.adler,c,p,h):2===u.state.wrap&&(u.adler=s(u.adler,c,p,h)),u.next_in+=p,u.total_in+=p,p),e.lookahead+=r,e.lookahead+e.insert>=3)for(l=e.strstart-e.insert,e.ins_h=e.window[l],e.ins_h=(e.ins_h__left_angle_mark___left_angle_mark_e.hash_shift^e.window[l+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h__left_angle_mark___left_angle_mark_e.hash_shift^e.window[l+3-1])&e.hash_mask,e.prev[l&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=l,l++,e.insert--,!(e.lookahead+e.insert__left_angle_mark_3)););}while(e.lookahead__left_angle_mark_d&&0!==e.strm.avail_in)}function E(e,t){for(var r,n;;){if(e.lookahead__left_angle_mark_d){if(S(e),e.lookahead__left_angle_mark_d&&0===t)return 1;if(0===e.lookahead)break}if(r=0,e.lookahead>=3&&(e.ins_h=(e.ins_h__left_angle_mark___left_angle_mark_e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==r&&e.strstart-r__left_angle_mark_=e.w_size-d&&(e.match_length=w(e,r)),e.match_length>=3)if(n=o._tr_tally(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length__left_angle_mark_=e.max_lazy_match&&e.lookahead>=3){e.match_length--;do{e.strstart++,e.ins_h=(e.ins_h__left_angle_mark___left_angle_mark_e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart}while(0!=--e.match_length);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h__left_angle_mark___left_angle_mark_e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else n=o._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(n&&(y(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart__left_angle_mark_2?e.strstart:2,4===t?(y(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(y(e,!1),0===e.strm.avail_out)?1:2}function x(e,t){for(var r,n,i;;){if(e.lookahead__left_angle_mark_d){if(S(e),e.lookahead__left_angle_mark_d&&0===t)return 1;if(0===e.lookahead)break}if(r=0,e.lookahead>=3&&(e.ins_h=(e.ins_h__left_angle_mark___left_angle_mark_e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=2,0!==r&&e.prev_length__left_angle_mark_e.max_lazy_match&&e.strstart-r__left_angle_mark_=e.w_size-d&&(e.match_length=w(e,r),e.match_length__left_angle_mark_=5&&(1===e.strategy||3===e.match_length&&e.strstart-e.match_start>4096)&&(e.match_length=2)),e.prev_length>=3&&e.match_length__left_angle_mark_=e.prev_length){i=e.strstart+e.lookahead-3,n=o._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart__left_angle_mark_=i&&(e.ins_h=(e.ins_h__left_angle_mark___left_angle_mark_e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart)}while(0!=--e.prev_length);if(e.match_available=0,e.match_length=2,e.strstart++,n&&(y(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if((n=o._tr_tally(e,0,e.window[e.strstart-1]))&&y(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return 1}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(n=o._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart__left_angle_mark_2?e.strstart:2,4===t?(y(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(y(e,!1),0===e.strm.avail_out)?1:2}function C(e,t,r,n,i){this.good_length=e,this.max_lazy=t,this.nice_length=r,this.max_chain=n,this.func=i}function T(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=8,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new i.Buf16(1146),this.dyn_dtree=new i.Buf16(122),this.bl_tree=new i.Buf16(78),_(this.dyn_ltree),_(this.dyn_dtree),_(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new i.Buf16(16),this.heap=new i.Buf16(573),_(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new i.Buf16(573),_(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function R(e){var t;return e&&e.state?(e.total_in=e.total_out=0,e.data_type=2,(t=e.state).pending=0,t.pending_out=0,t.wrap__left_angle_mark_0&&(t.wrap=-t.wrap),t.status=t.wrap?42:f,e.adler=2===t.wrap?0:1,t.last_flush=0,o._tr_init(t),0):m(e,u)}function I(e){var t,r=R(e);return 0===r&&((t=e.state).window_size=2*t.w_size,_(t.head),t.max_lazy_match=n[t.level].max_lazy,t.good_match=n[t.level].good_length,t.nice_match=n[t.level].nice_length,t.max_chain_length=n[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=2,t.match_available=0,t.ins_h=0),r}function k(e,t,r,n,o,a){if(!e)return u;var s=1;if(-1===t&&(t=6),n__left_angle_mark_0?(s=0,n=-n):n>15&&(s=2,n-=16),o__left_angle_mark_1||o>9||8!==r||n__left_angle_mark_8||n>15||t__left_angle_mark_0||t>9||a__left_angle_mark_0||a>4)return m(e,u);8===n&&(n=9);var l=new T;return e.state=l,l.strm=e,l.wrap=s,l.gzhead=null,l.w_bits=n,l.w_size=1__left_angle_mark___left_angle_mark_l.w_bits,l.w_mask=l.w_size-1,l.hash_bits=o+7,l.hash_size=1__left_angle_mark___left_angle_mark_l.hash_bits,l.hash_mask=l.hash_size-1,l.hash_shift=~~((l.hash_bits+3-1)/3),l.window=new i.Buf8(2*l.w_size),l.head=new i.Buf16(l.hash_size),l.prev=new i.Buf16(l.w_size),l.lit_bufsize=1__left_angle_mark___left_angle_mark_o+6,l.pending_buf_size=4*l.lit_bufsize,l.pending_buf=new i.Buf8(l.pending_buf_size),l.d_buf=1*l.lit_bufsize,l.l_buf=3*l.lit_bufsize,l.level=t,l.strategy=a,l.method=r,I(e)}n=[new C(0,0,0,0,(function(e,t){var r=65535;for(r>e.pending_buf_size-5&&(r=e.pending_buf_size-5);;){if(e.lookahead__left_angle_mark_=1){if(S(e),0===e.lookahead&&0===t)return 1;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var n=e.block_start+r;if((0===e.strstart||e.strstart>=n)&&(e.lookahead=e.strstart-n,e.strstart=n,y(e,!1),0===e.strm.avail_out))return 1;if(e.strstart-e.block_start>=e.w_size-d&&(y(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(y(e,!0),0===e.strm.avail_out?3:4):(e.strstart>e.block_start&&(y(e,!1),e.strm.avail_out),1)})),new C(4,4,8,4,E),new C(4,5,16,8,E),new C(4,6,32,32,E),new C(4,4,16,16,x),new C(8,16,32,32,x),new C(8,16,128,128,x),new C(8,32,128,256,x),new C(32,128,258,1024,x),new C(32,258,258,4096,x)],r.deflateInit=function(e,t){return k(e,t,8,15,8,0)},r.deflateInit2=k,r.deflateReset=I,r.deflateResetKeep=R,r.deflateSetHeader=function(e,t){return e&&e.state?2!==e.state.wrap?u:(e.state.gzhead=t,0):u},r.deflate=function(e,t){var r,i,a,l;if(!e||!e.state||t>5||t__left_angle_mark_0)return e?m(e,u):u;if(i=e.state,!e.output||!e.input&&0!==e.avail_in||i.status===p&&4!==t)return m(e,0===e.avail_out?-5:u);if(i.strm=e,r=i.last_flush,i.last_flush=t,42===i.status)if(2===i.wrap)e.adler=0,v(i,31),v(i,139),v(i,8),i.gzhead?(v(i,(i.gzhead.text?1:0)+(i.gzhead.hcrc?2:0)+(i.gzhead.extra?4:0)+(i.gzhead.name?8:0)+(i.gzhead.comment?16:0)),v(i,255&i.gzhead.time),v(i,i.gzhead.time>>8&255),v(i,i.gzhead.time>>16&255),v(i,i.gzhead.time>>24&255),v(i,9===i.level?2:i.strategy>=2||i.level__left_angle_mark_2?4:0),v(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(v(i,255&i.gzhead.extra.length),v(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(e.adler=s(e.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69):(v(i,0),v(i,0),v(i,0),v(i,0),v(i,0),v(i,9===i.level?2:i.strategy>=2||i.level__left_angle_mark_2?4:0),v(i,3),i.status=f);else{var d=8+(i.w_bits-8__left_angle_mark___left_angle_mark_4)__left_angle_mark___left_angle_mark_8;d|=(i.strategy>=2||i.level__left_angle_mark_2?0:i.level__left_angle_mark_6?1:6===i.level?2:3)__left_angle_mark___left_angle_mark_6,0!==i.strstart&&(d|=32),d+=31-d%31,i.status=f,A(i,d),0!==i.strstart&&(A(i,e.adler>>>16),A(i,65535&e.adler)),e.adler=1}if(69===i.status)if(i.gzhead.extra){for(a=i.pending;i.gzindex__left_angle_mark_(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>a&&(e.adler=s(e.adler,i.pending_buf,i.pending-a,a)),b(e),a=i.pending,i.pending!==i.pending_buf_size));)v(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>a&&(e.adler=s(e.adler,i.pending_buf,i.pending-a,a)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=73)}else i.status=73;if(73===i.status)if(i.gzhead.name){a=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>a&&(e.adler=s(e.adler,i.pending_buf,i.pending-a,a)),b(e),a=i.pending,i.pending===i.pending_buf_size)){l=1;break}l=i.gzindex__left_angle_mark_i.gzhead.name.length?255&i.gzhead.name.charCodeAt(i.gzindex++):0,v(i,l)}while(0!==l);i.gzhead.hcrc&&i.pending>a&&(e.adler=s(e.adler,i.pending_buf,i.pending-a,a)),0===l&&(i.gzindex=0,i.status=91)}else i.status=91;if(91===i.status)if(i.gzhead.comment){a=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>a&&(e.adler=s(e.adler,i.pending_buf,i.pending-a,a)),b(e),a=i.pending,i.pending===i.pending_buf_size)){l=1;break}l=i.gzindex__left_angle_mark_i.gzhead.comment.length?255&i.gzhead.comment.charCodeAt(i.gzindex++):0,v(i,l)}while(0!==l);i.gzhead.hcrc&&i.pending>a&&(e.adler=s(e.adler,i.pending_buf,i.pending-a,a)),0===l&&(i.status=h)}else i.status=h;if(i.status===h&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&b(e),i.pending+2__left_angle_mark_=i.pending_buf_size&&(v(i,255&e.adler),v(i,e.adler>>8&255),e.adler=0,i.status=f)):i.status=f),0!==i.pending){if(b(e),0===e.avail_out)return i.last_flush=-1,0}else if(0===e.avail_in&&g(t)__left_angle_mark_=g(r)&&4!==t)return m(e,-5);if(i.status===p&&0!==e.avail_in)return m(e,-5);if(0!==e.avail_in||0!==i.lookahead||0!==t&&i.status!==p){var w=2===i.strategy?function(e,t){for(var r;;){if(0===e.lookahead&&(S(e),0===e.lookahead)){if(0===t)return 1;break}if(e.match_length=0,r=o._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(y(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(y(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(y(e,!1),0===e.strm.avail_out)?1:2}(i,t):3===i.strategy?function(e,t){for(var r,n,i,a,s=e.window;;){if(e.lookahead__left_angle_mark_=c){if(S(e),e.lookahead__left_angle_mark_=c&&0===t)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&e.strstart>0&&(n=s[i=e.strstart-1])===s[++i]&&n===s[++i]&&n===s[++i]){a=e.strstart+c;do{}while(n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&i__left_angle_mark_a);e.match_length=c-(a-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(r=o._tr_tally(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=o._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(y(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(y(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(y(e,!1),0===e.strm.avail_out)?1:2}(i,t):n[i.level].func(i,t);if(3!==w&&4!==w||(i.status=p),1===w||3===w)return 0===e.avail_out&&(i.last_flush=-1),0;if(2===w&&(1===t?o._tr_align(i):5!==t&&(o._tr_stored_block(i,0,0,!1),3===t&&(_(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),b(e),0===e.avail_out))return i.last_flush=-1,0}return 4!==t?0:i.wrap__left_angle_mark_=0?1:(2===i.wrap?(v(i,255&e.adler),v(i,e.adler>>8&255),v(i,e.adler>>16&255),v(i,e.adler>>24&255),v(i,255&e.total_in),v(i,e.total_in>>8&255),v(i,e.total_in>>16&255),v(i,e.total_in>>24&255)):(A(i,e.adler>>>16),A(i,65535&e.adler)),b(e),i.wrap>0&&(i.wrap=-i.wrap),0!==i.pending?0:1)},r.deflateEnd=function(e){var t;return e&&e.state?42!==(t=e.state.status)&&69!==t&&73!==t&&91!==t&&t!==h&&t!==f&&t!==p?m(e,u):(e.state=null,t===f?m(e,-3):0):u},r.deflateSetDictionary=function(e,t){var r,n,o,s,l,c,d,h,f=t.length;if(!e||!e.state)return u;if(2===(s=(r=e.state).wrap)||1===s&&42!==r.status||r.lookahead)return u;for(1===s&&(e.adler=a(e.adler,t,f,0)),r.wrap=0,f>=r.w_size&&(0===s&&(_(r.head),r.strstart=0,r.block_start=0,r.insert=0),h=new i.Buf8(r.w_size),i.arraySet(h,t,f-r.w_size,r.w_size,0),t=h,f=r.w_size),l=e.avail_in,c=e.next_in,d=e.input,e.avail_in=f,e.next_in=0,e.input=t,S(r);r.lookahead>=3;){n=r.strstart,o=r.lookahead-2;do{r.ins_h=(r.ins_h__left_angle_mark___left_angle_mark_r.hash_shift^r.window[n+3-1])&r.hash_mask,r.prev[n&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=n,n++}while(--o);r.strstart=n,r.lookahead=2,S(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=2,r.match_available=0,e.next_in=c,e.input=d,e.avail_in=l,r.wrap=s,0},r.deflateInfo=\"pako deflate (from Nodeca project)\"},{\"../utils/common\":49,\"./adler32\":50,\"./crc32\":52,\"./messages\":57,\"./trees\":58}],54:[function(e,t,r){t.exports=function(e,t){var r,n,i,o,a,s,l,u,c,d,h,f,p,m,g,_,b,y,v,A,w,S,E,x,C;r=e.state,n=e.next_in,x=e.input,i=n+(e.avail_in-5),o=e.next_out,C=e.output,a=o-(t-e.avail_out),s=o+(e.avail_out-257),l=r.dmax,u=r.wsize,c=r.whave,d=r.wnext,h=r.window,f=r.hold,p=r.bits,m=r.lencode,g=r.distcode,_=(1__left_angle_mark___left_angle_mark_r.lenbits)-1,b=(1__left_angle_mark___left_angle_mark_r.distbits)-1;e:do{p__left_angle_mark_15&&(f+=x[n++]__left_angle_mark___left_angle_mark_p,p+=8,f+=x[n++]__left_angle_mark___left_angle_mark_p,p+=8),y=m[f&_];t:for(;;){if(f>>>=v=y>>>24,p-=v,0==(v=y>>>16&255))C[o++]=65535&y;else{if(!(16&v)){if(!(64&v)){y=m[(65535&y)+(f&(1__left_angle_mark___left_angle_mark_v)-1)];continue t}if(32&v){r.mode=12;break e}e.msg=\"invalid literal/length code\",r.mode=30;break e}A=65535&y,(v&=15)&&(p__left_angle_mark_v&&(f+=x[n++]__left_angle_mark___left_angle_mark_p,p+=8),A+=f&(1__left_angle_mark___left_angle_mark_v)-1,f>>>=v,p-=v),p__left_angle_mark_15&&(f+=x[n++]__left_angle_mark___left_angle_mark_p,p+=8,f+=x[n++]__left_angle_mark___left_angle_mark_p,p+=8),y=g[f&b];r:for(;;){if(f>>>=v=y>>>24,p-=v,!(16&(v=y>>>16&255))){if(!(64&v)){y=g[(65535&y)+(f&(1__left_angle_mark___left_angle_mark_v)-1)];continue r}e.msg=\"invalid distance code\",r.mode=30;break e}if(w=65535&y,p__left_angle_mark_(v&=15)&&(f+=x[n++]__left_angle_mark___left_angle_mark_p,(p+=8)__left_angle_mark_v&&(f+=x[n++]__left_angle_mark___left_angle_mark_p,p+=8)),(w+=f&(1__left_angle_mark___left_angle_mark_v)-1)>l){e.msg=\"invalid distance too far back\",r.mode=30;break e}if(f>>>=v,p-=v,w>(v=o-a)){if((v=w-v)>c&&r.sane){e.msg=\"invalid distance too far back\",r.mode=30;break e}if(S=0,E=h,0===d){if(S+=u-v,v__left_angle_mark_A){A-=v;do{C[o++]=h[S++]}while(--v);S=o-w,E=C}}else if(d__left_angle_mark_v){if(S+=u+d-v,(v-=d)__left_angle_mark_A){A-=v;do{C[o++]=h[S++]}while(--v);if(S=0,d__left_angle_mark_A){A-=v=d;do{C[o++]=h[S++]}while(--v);S=o-w,E=C}}}else if(S+=d-v,v__left_angle_mark_A){A-=v;do{C[o++]=h[S++]}while(--v);S=o-w,E=C}for(;A>2;)C[o++]=E[S++],C[o++]=E[S++],C[o++]=E[S++],A-=3;A&&(C[o++]=E[S++],A>1&&(C[o++]=E[S++]))}else{S=o-w;do{C[o++]=C[S++],C[o++]=C[S++],C[o++]=C[S++],A-=3}while(A>2);A&&(C[o++]=C[S++],A>1&&(C[o++]=C[S++]))}break}}break}}while(n__left_angle_mark_i&&o__left_angle_mark_s);n-=A=p>>3,f&=(1__left_angle_mark___left_angle_mark_(p-=A__left_angle_mark___left_angle_mark_3))-1,e.next_in=n,e.next_out=o,e.avail_in=n__left_angle_mark_i?i-n+5:5-(n-i),e.avail_out=o__left_angle_mark_s?s-o+257:257-(o-s),r.hold=f,r.bits=p}},{}],55:[function(e,t,r){var n=e(\"../utils/common\"),i=e(\"./adler32\"),o=e(\"./crc32\"),a=e(\"./inffast\"),s=e(\"./inftrees\"),l=-2,u=12,c=30;function d(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)__left_angle_mark___left_angle_mark_8)+((255&e)__left_angle_mark___left_angle_mark_24)}function h(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new n.Buf16(320),this.work=new n.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function f(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg=\"\",t.wrap&&(e.adler=1&t.wrap),t.mode=1,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new n.Buf32(852),t.distcode=t.distdyn=new n.Buf32(592),t.sane=1,t.back=-1,0):l}function p(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,f(e)):l}function m(e,t){var r,n;return e&&e.state?(n=e.state,t__left_angle_mark_0?(r=0,t=-t):(r=1+(t>>4),t__left_angle_mark_48&&(t&=15)),t&&(t__left_angle_mark_8||t>15)?l:(null!==n.window&&n.wbits!==t&&(n.window=null),n.wrap=r,n.wbits=t,p(e))):l}function g(e,t){var r,n;return e?(n=new h,e.state=n,n.window=null,0!==(r=m(e,t))&&(e.state=null),r):l}var _,b,y=!0;function v(e){if(y){var t;for(_=new n.Buf32(512),b=new n.Buf32(32),t=0;t__left_angle_mark_144;)e.lens[t++]=8;for(;t__left_angle_mark_256;)e.lens[t++]=9;for(;t__left_angle_mark_280;)e.lens[t++]=7;for(;t__left_angle_mark_288;)e.lens[t++]=8;for(s(1,e.lens,0,288,_,0,e.work,{bits:9}),t=0;t__left_angle_mark_32;)e.lens[t++]=5;s(2,e.lens,0,32,b,0,e.work,{bits:5}),y=!1}e.lencode=_,e.lenbits=9,e.distcode=b,e.distbits=5}function A(e,t,r,i){var o,a=e.state;return null===a.window&&(a.wsize=1__left_angle_mark___left_angle_mark_a.wbits,a.wnext=0,a.whave=0,a.window=new n.Buf8(a.wsize)),i>=a.wsize?(n.arraySet(a.window,t,r-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):((o=a.wsize-a.wnext)>i&&(o=i),n.arraySet(a.window,t,r-i,o,a.wnext),(i-=o)?(n.arraySet(a.window,t,r-i,i,0),a.wnext=i,a.whave=a.wsize):(a.wnext+=o,a.wnext===a.wsize&&(a.wnext=0),a.whave__left_angle_mark_a.wsize&&(a.whave+=o))),0}r.inflateReset=p,r.inflateReset2=m,r.inflateResetKeep=f,r.inflateInit=function(e){return g(e,15)},r.inflateInit2=g,r.inflate=function(e,t){var r,h,f,p,m,g,_,b,y,w,S,E,x,C,T,R,I,k,P,M,O,B,N,j,L=0,D=new n.Buf8(4),F=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return l;(r=e.state).mode===u&&(r.mode=13),m=e.next_out,f=e.output,_=e.avail_out,p=e.next_in,h=e.input,g=e.avail_in,b=r.hold,y=r.bits,w=g,S=_,B=0;e:for(;;)switch(r.mode){case 1:if(0===r.wrap){r.mode=13;break}for(;y__left_angle_mark_16;){if(0===g)break e;g--,b+=h[p++]__left_angle_mark___left_angle_mark_y,y+=8}if(2&r.wrap&&35615===b){r.check=0,D[0]=255&b,D[1]=b>>>8&255,r.check=o(r.check,D,2,0),b=0,y=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&b)__left_angle_mark___left_angle_mark_8)+(b>>8))%31){e.msg=\"incorrect header check\",r.mode=c;break}if(8!=(15&b)){e.msg=\"unknown compression method\",r.mode=c;break}if(y-=4,O=8+(15&(b>>>=4)),0===r.wbits)r.wbits=O;else if(O>r.wbits){e.msg=\"invalid window size\",r.mode=c;break}r.dmax=1__left_angle_mark___left_angle_mark_O,e.adler=r.check=1,r.mode=512&b?10:u,b=0,y=0;break;case 2:for(;y__left_angle_mark_16;){if(0===g)break e;g--,b+=h[p++]__left_angle_mark___left_angle_mark_y,y+=8}if(r.flags=b,8!=(255&r.flags)){e.msg=\"unknown compression method\",r.mode=c;break}if(57344&r.flags){e.msg=\"unknown header flags set\",r.mode=c;break}r.head&&(r.head.text=b>>8&1),512&r.flags&&(D[0]=255&b,D[1]=b>>>8&255,r.check=o(r.check,D,2,0)),b=0,y=0,r.mode=3;case 3:for(;y__left_angle_mark_32;){if(0===g)break e;g--,b+=h[p++]__left_angle_mark___left_angle_mark_y,y+=8}r.head&&(r.head.time=b),512&r.flags&&(D[0]=255&b,D[1]=b>>>8&255,D[2]=b>>>16&255,D[3]=b>>>24&255,r.check=o(r.check,D,4,0)),b=0,y=0,r.mode=4;case 4:for(;y__left_angle_mark_16;){if(0===g)break e;g--,b+=h[p++]__left_angle_mark___left_angle_mark_y,y+=8}r.head&&(r.head.xflags=255&b,r.head.os=b>>8),512&r.flags&&(D[0]=255&b,D[1]=b>>>8&255,r.check=o(r.check,D,2,0)),b=0,y=0,r.mode=5;case 5:if(1024&r.flags){for(;y__left_angle_mark_16;){if(0===g)break e;g--,b+=h[p++]__left_angle_mark___left_angle_mark_y,y+=8}r.length=b,r.head&&(r.head.extra_len=b),512&r.flags&&(D[0]=255&b,D[1]=b>>>8&255,r.check=o(r.check,D,2,0)),b=0,y=0}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&((E=r.length)>g&&(E=g),E&&(r.head&&(O=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),n.arraySet(r.head.extra,h,p,E,O)),512&r.flags&&(r.check=o(r.check,h,E,p)),g-=E,p+=E,r.length-=E),r.length))break e;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(0===g)break e;E=0;do{O=h[p+E++],r.head&&O&&r.length__left_angle_mark_65536&&(r.head.name+=String.fromCharCode(O))}while(O&&E__left_angle_mark_g);if(512&r.flags&&(r.check=o(r.check,h,E,p)),g-=E,p+=E,O)break e}else r.head&&(r.head.name=null);r.length=0,r.mode=8;case 8:if(4096&r.flags){if(0===g)break e;E=0;do{O=h[p+E++],r.head&&O&&r.length__left_angle_mark_65536&&(r.head.comment+=String.fromCharCode(O))}while(O&&E__left_angle_mark_g);if(512&r.flags&&(r.check=o(r.check,h,E,p)),g-=E,p+=E,O)break e}else r.head&&(r.head.comment=null);r.mode=9;case 9:if(512&r.flags){for(;y__left_angle_mark_16;){if(0===g)break e;g--,b+=h[p++]__left_angle_mark___left_angle_mark_y,y+=8}if(b!==(65535&r.check)){e.msg=\"header crc mismatch\",r.mode=c;break}b=0,y=0}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=u;break;case 10:for(;y__left_angle_mark_32;){if(0===g)break e;g--,b+=h[p++]__left_angle_mark___left_angle_mark_y,y+=8}e.adler=r.check=d(b),b=0,y=0,r.mode=11;case 11:if(0===r.havedict)return e.next_out=m,e.avail_out=_,e.next_in=p,e.avail_in=g,r.hold=b,r.bits=y,2;e.adler=r.check=1,r.mode=u;case u:if(5===t||6===t)break e;case 13:if(r.last){b>>>=7&y,y-=7&y,r.mode=27;break}for(;y__left_angle_mark_3;){if(0===g)break e;g--,b+=h[p++]__left_angle_mark___left_angle_mark_y,y+=8}switch(r.last=1&b,y-=1,3&(b>>>=1)){case 0:r.mode=14;break;case 1:if(v(r),r.mode=20,6===t){b>>>=2,y-=2;break e}break;case 2:r.mode=17;break;case 3:e.msg=\"invalid block type\",r.mode=c}b>>>=2,y-=2;break;case 14:for(b>>>=7&y,y-=7&y;y__left_angle_mark_32;){if(0===g)break e;g--,b+=h[p++]__left_angle_mark___left_angle_mark_y,y+=8}if((65535&b)!=(b>>>16^65535)){e.msg=\"invalid stored block lengths\",r.mode=c;break}if(r.length=65535&b,b=0,y=0,r.mode=15,6===t)break e;case 15:r.mode=16;case 16:if(E=r.length){if(E>g&&(E=g),E>_&&(E=_),0===E)break e;n.arraySet(f,h,p,E,m),g-=E,p+=E,_-=E,m+=E,r.length-=E;break}r.mode=u;break;case 17:for(;y__left_angle_mark_14;){if(0===g)break e;g--,b+=h[p++]__left_angle_mark___left_angle_mark_y,y+=8}if(r.nlen=257+(31&b),b>>>=5,y-=5,r.ndist=1+(31&b),b>>>=5,y-=5,r.ncode=4+(15&b),b>>>=4,y-=4,r.nlen>286||r.ndist>30){e.msg=\"too many length or distance symbols\",r.mode=c;break}r.have=0,r.mode=18;case 18:for(;r.have__left_angle_mark_r.ncode;){for(;y__left_angle_mark_3;){if(0===g)break e;g--,b+=h[p++]__left_angle_mark___left_angle_mark_y,y+=8}r.lens[F[r.have++]]=7&b,b>>>=3,y-=3}for(;r.have__left_angle_mark_19;)r.lens[F[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,N={bits:r.lenbits},B=s(0,r.lens,0,19,r.lencode,0,r.work,N),r.lenbits=N.bits,B){e.msg=\"invalid code lengths set\",r.mode=c;break}r.have=0,r.mode=19;case 19:for(;r.have__left_angle_mark_r.nlen+r.ndist;){for(;R=(L=r.lencode[b&(1__left_angle_mark___left_angle_mark_r.lenbits)-1])>>>16&255,I=65535&L,!((T=L>>>24)__left_angle_mark_=y);){if(0===g)break e;g--,b+=h[p++]__left_angle_mark___left_angle_mark_y,y+=8}if(I__left_angle_mark_16)b>>>=T,y-=T,r.lens[r.have++]=I;else{if(16===I){for(j=T+2;y__left_angle_mark_j;){if(0===g)break e;g--,b+=h[p++]__left_angle_mark___left_angle_mark_y,y+=8}if(b>>>=T,y-=T,0===r.have){e.msg=\"invalid bit length repeat\",r.mode=c;break}O=r.lens[r.have-1],E=3+(3&b),b>>>=2,y-=2}else if(17===I){for(j=T+3;y__left_angle_mark_j;){if(0===g)break e;g--,b+=h[p++]__left_angle_mark___left_angle_mark_y,y+=8}y-=T,O=0,E=3+(7&(b>>>=T)),b>>>=3,y-=3}else{for(j=T+7;y__left_angle_mark_j;){if(0===g)break e;g--,b+=h[p++]__left_angle_mark___left_angle_mark_y,y+=8}y-=T,O=0,E=11+(127&(b>>>=T)),b>>>=7,y-=7}if(r.have+E>r.nlen+r.ndist){e.msg=\"invalid bit length repeat\",r.mode=c;break}for(;E--;)r.lens[r.have++]=O}}if(r.mode===c)break;if(0===r.lens[256]){e.msg=\"invalid code -- missing end-of-block\",r.mode=c;break}if(r.lenbits=9,N={bits:r.lenbits},B=s(1,r.lens,0,r.nlen,r.lencode,0,r.work,N),r.lenbits=N.bits,B){e.msg=\"invalid literal/lengths set\",r.mode=c;break}if(r.distbits=6,r.distcode=r.distdyn,N={bits:r.distbits},B=s(2,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,N),r.distbits=N.bits,B){e.msg=\"invalid distances set\",r.mode=c;break}if(r.mode=20,6===t)break e;case 20:r.mode=21;case 21:if(g>=6&&_>=258){e.next_out=m,e.avail_out=_,e.next_in=p,e.avail_in=g,r.hold=b,r.bits=y,a(e,S),m=e.next_out,f=e.output,_=e.avail_out,p=e.next_in,h=e.input,g=e.avail_in,b=r.hold,y=r.bits,r.mode===u&&(r.back=-1);break}for(r.back=0;R=(L=r.lencode[b&(1__left_angle_mark___left_angle_mark_r.lenbits)-1])>>>16&255,I=65535&L,!((T=L>>>24)__left_angle_mark_=y);){if(0===g)break e;g--,b+=h[p++]__left_angle_mark___left_angle_mark_y,y+=8}if(R&&!(240&R)){for(k=T,P=R,M=I;R=(L=r.lencode[M+((b&(1__left_angle_mark___left_angle_mark_k+P)-1)>>k)])>>>16&255,I=65535&L,!(k+(T=L>>>24)__left_angle_mark_=y);){if(0===g)break e;g--,b+=h[p++]__left_angle_mark___left_angle_mark_y,y+=8}b>>>=k,y-=k,r.back+=k}if(b>>>=T,y-=T,r.back+=T,r.length=I,0===R){r.mode=26;break}if(32&R){r.back=-1,r.mode=u;break}if(64&R){e.msg=\"invalid literal/length code\",r.mode=c;break}r.extra=15&R,r.mode=22;case 22:if(r.extra){for(j=r.extra;y__left_angle_mark_j;){if(0===g)break e;g--,b+=h[p++]__left_angle_mark___left_angle_mark_y,y+=8}r.length+=b&(1__left_angle_mark___left_angle_mark_r.extra)-1,b>>>=r.extra,y-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=23;case 23:for(;R=(L=r.distcode[b&(1__left_angle_mark___left_angle_mark_r.distbits)-1])>>>16&255,I=65535&L,!((T=L>>>24)__left_angle_mark_=y);){if(0===g)break e;g--,b+=h[p++]__left_angle_mark___left_angle_mark_y,y+=8}if(!(240&R)){for(k=T,P=R,M=I;R=(L=r.distcode[M+((b&(1__left_angle_mark___left_angle_mark_k+P)-1)>>k)])>>>16&255,I=65535&L,!(k+(T=L>>>24)__left_angle_mark_=y);){if(0===g)break e;g--,b+=h[p++]__left_angle_mark___left_angle_mark_y,y+=8}b>>>=k,y-=k,r.back+=k}if(b>>>=T,y-=T,r.back+=T,64&R){e.msg=\"invalid distance code\",r.mode=c;break}r.offset=I,r.extra=15&R,r.mode=24;case 24:if(r.extra){for(j=r.extra;y__left_angle_mark_j;){if(0===g)break e;g--,b+=h[p++]__left_angle_mark___left_angle_mark_y,y+=8}r.offset+=b&(1__left_angle_mark___left_angle_mark_r.extra)-1,b>>>=r.extra,y-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg=\"invalid distance too far back\",r.mode=c;break}r.mode=25;case 25:if(0===_)break e;if(E=S-_,r.offset>E){if((E=r.offset-E)>r.whave&&r.sane){e.msg=\"invalid distance too far back\",r.mode=c;break}E>r.wnext?(E-=r.wnext,x=r.wsize-E):x=r.wnext-E,E>r.length&&(E=r.length),C=r.window}else C=f,x=m-r.offset,E=r.length;E>_&&(E=_),_-=E,r.length-=E;do{f[m++]=C[x++]}while(--E);0===r.length&&(r.mode=21);break;case 26:if(0===_)break e;f[m++]=r.length,_--,r.mode=21;break;case 27:if(r.wrap){for(;y__left_angle_mark_32;){if(0===g)break e;g--,b|=h[p++]__left_angle_mark___left_angle_mark_y,y+=8}if(S-=_,e.total_out+=S,r.total+=S,S&&(e.adler=r.check=r.flags?o(r.check,f,S,m-S):i(r.check,f,S,m-S)),S=_,(r.flags?b:d(b))!==r.check){e.msg=\"incorrect data check\",r.mode=c;break}b=0,y=0}r.mode=28;case 28:if(r.wrap&&r.flags){for(;y__left_angle_mark_32;){if(0===g)break e;g--,b+=h[p++]__left_angle_mark___left_angle_mark_y,y+=8}if(b!==(4294967295&r.total)){e.msg=\"incorrect length check\",r.mode=c;break}b=0,y=0}r.mode=29;case 29:B=1;break e;case c:B=-3;break e;case 31:return-4;default:return l}return e.next_out=m,e.avail_out=_,e.next_in=p,e.avail_in=g,r.hold=b,r.bits=y,(r.wsize||S!==e.avail_out&&r.mode__left_angle_mark_c&&(r.mode__left_angle_mark_27||4!==t))&&A(e,e.output,e.next_out,S-e.avail_out)?(r.mode=31,-4):(w-=e.avail_in,S-=e.avail_out,e.total_in+=w,e.total_out+=S,r.total+=S,r.wrap&&S&&(e.adler=r.check=r.flags?o(r.check,f,S,e.next_out-S):i(r.check,f,S,e.next_out-S)),e.data_type=r.bits+(r.last?64:0)+(r.mode===u?128:0)+(20===r.mode||15===r.mode?256:0),(0===w&&0===S||4===t)&&0===B&&(B=-5),B)},r.inflateEnd=function(e){if(!e||!e.state)return l;var t=e.state;return t.window&&(t.window=null),e.state=null,0},r.inflateGetHeader=function(e,t){var r;return e&&e.state&&2&(r=e.state).wrap?(r.head=t,t.done=!1,0):l},r.inflateSetDictionary=function(e,t){var r,n=t.length;return e&&e.state?0!==(r=e.state).wrap&&11!==r.mode?l:11===r.mode&&i(1,t,n,0)!==r.check?-3:A(e,t,n,n)?(r.mode=31,-4):(r.havedict=1,0):l},r.inflateInfo=\"pako inflate (from Nodeca project)\"},{\"../utils/common\":49,\"./adler32\":50,\"./crc32\":52,\"./inffast\":54,\"./inftrees\":56}],56:[function(e,t,r){var n=e(\"../utils/common\"),i=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],o=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],a=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],s=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];t.exports=function(e,t,r,l,u,c,d,h){var f,p,m,g,_,b,y,v,A,w=h.bits,S=0,E=0,x=0,C=0,T=0,R=0,I=0,k=0,P=0,M=0,O=null,B=0,N=new n.Buf16(16),j=new n.Buf16(16),L=null,D=0;for(S=0;S__left_angle_mark_=15;S++)N[S]=0;for(E=0;E__left_angle_mark_l;E++)N[t[r+E]]++;for(T=w,C=15;C>=1&&0===N[C];C--);if(T>C&&(T=C),0===C)return u[c++]=20971520,u[c++]=20971520,h.bits=1,0;for(x=1;x__left_angle_mark_C&&0===N[x];x++);for(T__left_angle_mark_x&&(T=x),k=1,S=1;S__left_angle_mark_=15;S++)if(k__left_angle_mark___left_angle_mark_=1,(k-=N[S])__left_angle_mark_0)return-1;if(k>0&&(0===e||1!==C))return-1;for(j[1]=0,S=1;S__left_angle_mark_15;S++)j[S+1]=j[S]+N[S];for(E=0;E__left_angle_mark_l;E++)0!==t[r+E]&&(d[j[t[r+E]]++]=E);if(0===e?(O=L=d,b=19):1===e?(O=i,B-=257,L=o,D-=257,b=256):(O=a,L=s,b=-1),M=0,E=0,S=x,_=c,R=T,I=0,m=-1,g=(P=1__left_angle_mark___left_angle_mark_T)-1,1===e&&P>852||2===e&&P>592)return 1;for(;;){y=S-I,d[E]__left_angle_mark_b?(v=0,A=d[E]):d[E]>b?(v=L[D+d[E]],A=O[B+d[E]]):(v=96,A=0),f=1__left_angle_mark___left_angle_mark_S-I,x=p=1__left_angle_mark___left_angle_mark_R;do{u[_+(M>>I)+(p-=f)]=y__left_angle_mark___left_angle_mark_24|v__left_angle_mark___left_angle_mark_16|A}while(0!==p);for(f=1__left_angle_mark___left_angle_mark_S-1;M&f;)f>>=1;if(0!==f?(M&=f-1,M+=f):M=0,E++,0==--N[S]){if(S===C)break;S=t[r+d[E]]}if(S>T&&(M&g)!==m){for(0===I&&(I=T),_+=x,k=1__left_angle_mark___left_angle_mark_(R=S-I);R+I__left_angle_mark_C&&!((k-=N[R+I])__left_angle_mark_=0);)R++,k__left_angle_mark___left_angle_mark_=1;if(P+=1__left_angle_mark___left_angle_mark_R,1===e&&P>852||2===e&&P>592)return 1;u[m=M&g]=T__left_angle_mark___left_angle_mark_24|R__left_angle_mark___left_angle_mark_16|_-c}}return 0!==M&&(u[_+M]=S-I__left_angle_mark___left_angle_mark_24|64__left_angle_mark___left_angle_mark_16),h.bits=T,0}},{\"../utils/common\":49}],57:[function(e,t,r){t.exports={2:\"need dictionary\",1:\"stream end\",0:\"\",\"-1\":\"file error\",\"-2\":\"stream error\",\"-3\":\"data error\",\"-4\":\"insufficient memory\",\"-5\":\"buffer error\",\"-6\":\"incompatible version\"}},{}],58:[function(e,t,r){var n=e(\"../utils/common\");function i(e){for(var t=e.length;--t>=0;)e[t]=0}var o=256,a=286,s=30,l=15,u=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],c=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],d=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],h=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],f=new Array(576);i(f);var p=new Array(60);i(p);var m=new Array(512);i(m);var g=new Array(256);i(g);var _=new Array(29);i(_);var b,y,v,A=new Array(s);function w(e,t,r,n,i){this.static_tree=e,this.extra_bits=t,this.extra_base=r,this.elems=n,this.max_length=i,this.has_stree=e&&e.length}function S(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function E(e){return e__left_angle_mark_256?m[e]:m[256+(e>>>7)]}function x(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function C(e,t,r){e.bi_valid>16-r?(e.bi_buf|=t__left_angle_mark___left_angle_mark_e.bi_valid&65535,x(e,e.bi_buf),e.bi_buf=t>>16-e.bi_valid,e.bi_valid+=r-16):(e.bi_buf|=t__left_angle_mark___left_angle_mark_e.bi_valid&65535,e.bi_valid+=r)}function T(e,t,r){C(e,r[2*t],r[2*t+1])}function R(e,t){var r=0;do{r|=1&e,e>>>=1,r__left_angle_mark___left_angle_mark_=1}while(--t>0);return r>>>1}function I(e,t,r){var n,i,o=new Array(16),a=0;for(n=1;n__left_angle_mark_=l;n++)o[n]=a=a+r[n-1]__left_angle_mark___left_angle_mark_1;for(i=0;i__left_angle_mark_=t;i++){var s=e[2*i+1];0!==s&&(e[2*i]=R(o[s]++,s))}}function k(e){var t;for(t=0;t__left_angle_mark_a;t++)e.dyn_ltree[2*t]=0;for(t=0;t__left_angle_mark_s;t++)e.dyn_dtree[2*t]=0;for(t=0;t__left_angle_mark_19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function P(e){e.bi_valid>8?x(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function M(e,t,r,n){var i=2*t,o=2*r;return e[i]__left_angle_mark_e[o]||e[i]===e[o]&&n[t]__left_angle_mark_=n[r]}function O(e,t,r){for(var n=e.heap[r],i=r__left_angle_mark___left_angle_mark_1;i__left_angle_mark_=e.heap_len&&(i__left_angle_mark_e.heap_len&&M(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!M(t,n,e.heap[i],e.depth));)e.heap[r]=e.heap[i],r=i,i__left_angle_mark___left_angle_mark_=1;e.heap[r]=n}function B(e,t,r){var n,i,a,s,l=0;if(0!==e.last_lit)do{n=e.pending_buf[e.d_buf+2*l]__left_angle_mark___left_angle_mark_8|e.pending_buf[e.d_buf+2*l+1],i=e.pending_buf[e.l_buf+l],l++,0===n?T(e,i,t):(T(e,(a=g[i])+o+1,t),0!==(s=u[a])&&C(e,i-=_[a],s),T(e,a=E(--n),r),0!==(s=c[a])&&C(e,n-=A[a],s))}while(l__left_angle_mark_e.last_lit);T(e,256,t)}function N(e,t){var r,n,i,o=t.dyn_tree,a=t.stat_desc.static_tree,s=t.stat_desc.has_stree,u=t.stat_desc.elems,c=-1;for(e.heap_len=0,e.heap_max=573,r=0;r__left_angle_mark_u;r++)0!==o[2*r]?(e.heap[++e.heap_len]=c=r,e.depth[r]=0):o[2*r+1]=0;for(;e.heap_len__left_angle_mark_2;)o[2*(i=e.heap[++e.heap_len]=c__left_angle_mark_2?++c:0)]=1,e.depth[i]=0,e.opt_len--,s&&(e.static_len-=a[2*i+1]);for(t.max_code=c,r=e.heap_len>>1;r>=1;r--)O(e,o,r);i=u;do{r=e.heap[1],e.heap[1]=e.heap[e.heap_len--],O(e,o,1),n=e.heap[1],e.heap[--e.heap_max]=r,e.heap[--e.heap_max]=n,o[2*i]=o[2*r]+o[2*n],e.depth[i]=(e.depth[r]>=e.depth[n]?e.depth[r]:e.depth[n])+1,o[2*r+1]=o[2*n+1]=i,e.heap[1]=i++,O(e,o,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],function(e,t){var r,n,i,o,a,s,u=t.dyn_tree,c=t.max_code,d=t.stat_desc.static_tree,h=t.stat_desc.has_stree,f=t.stat_desc.extra_bits,p=t.stat_desc.extra_base,m=t.stat_desc.max_length,g=0;for(o=0;o__left_angle_mark_=l;o++)e.bl_count[o]=0;for(u[2*e.heap[e.heap_max]+1]=0,r=e.heap_max+1;r__left_angle_mark_573;r++)(o=u[2*u[2*(n=e.heap[r])+1]+1]+1)>m&&(o=m,g++),u[2*n+1]=o,n>c||(e.bl_count[o]++,a=0,n>=p&&(a=f[n-p]),s=u[2*n],e.opt_len+=s*(o+a),h&&(e.static_len+=s*(d[2*n+1]+a)));if(0!==g){do{for(o=m-1;0===e.bl_count[o];)o--;e.bl_count[o]--,e.bl_count[o+1]+=2,e.bl_count[m]--,g-=2}while(g>0);for(o=m;0!==o;o--)for(n=e.bl_count[o];0!==n;)(i=e.heap[--r])>c||(u[2*i+1]!==o&&(e.opt_len+=(o-u[2*i+1])*u[2*i],u[2*i+1]=o),n--)}}(e,t),I(o,c,e.bl_count)}function j(e,t,r){var n,i,o=-1,a=t[1],s=0,l=7,u=4;for(0===a&&(l=138,u=3),t[2*(r+1)+1]=65535,n=0;n__left_angle_mark_=r;n++)i=a,a=t[2*(n+1)+1],++s__left_angle_mark_l&&i===a||(s__left_angle_mark_u?e.bl_tree[2*i]+=s:0!==i?(i!==o&&e.bl_tree[2*i]++,e.bl_tree[32]++):s__left_angle_mark_=10?e.bl_tree[34]++:e.bl_tree[36]++,s=0,o=i,0===a?(l=138,u=3):i===a?(l=6,u=3):(l=7,u=4))}function L(e,t,r){var n,i,o=-1,a=t[1],s=0,l=7,u=4;for(0===a&&(l=138,u=3),n=0;n__left_angle_mark_=r;n++)if(i=a,a=t[2*(n+1)+1],!(++s__left_angle_mark_l&&i===a)){if(s__left_angle_mark_u)do{T(e,i,e.bl_tree)}while(0!=--s);else 0!==i?(i!==o&&(T(e,i,e.bl_tree),s--),T(e,16,e.bl_tree),C(e,s-3,2)):s__left_angle_mark_=10?(T(e,17,e.bl_tree),C(e,s-3,3)):(T(e,18,e.bl_tree),C(e,s-11,7));s=0,o=i,0===a?(l=138,u=3):i===a?(l=6,u=3):(l=7,u=4)}}i(A);var D=!1;function F(e,t,r,i){var o,a,s;C(e,0+(i?1:0),3),a=t,s=r,P(o=e),x(o,s),x(o,~s),n.arraySet(o.pending_buf,o.window,a,s,o.pending),o.pending+=s}r._tr_init=function(e){D||(function(){var e,t,r,n,i,o=new Array(16);for(r=0,n=0;n__left_angle_mark_28;n++)for(_[n]=r,e=0;e__left_angle_mark_1__left_angle_mark___left_angle_mark_u[n];e++)g[r++]=n;for(g[r-1]=n,i=0,n=0;n__left_angle_mark_16;n++)for(A[n]=i,e=0;e__left_angle_mark_1__left_angle_mark___left_angle_mark_c[n];e++)m[i++]=n;for(i>>=7;n__left_angle_mark_s;n++)for(A[n]=i__left_angle_mark___left_angle_mark_7,e=0;e__left_angle_mark_1__left_angle_mark___left_angle_mark_c[n]-7;e++)m[256+i++]=n;for(t=0;t__left_angle_mark_=l;t++)o[t]=0;for(e=0;e__left_angle_mark_=143;)f[2*e+1]=8,e++,o[8]++;for(;e__left_angle_mark_=255;)f[2*e+1]=9,e++,o[9]++;for(;e__left_angle_mark_=279;)f[2*e+1]=7,e++,o[7]++;for(;e__left_angle_mark_=287;)f[2*e+1]=8,e++,o[8]++;for(I(f,287,o),e=0;e__left_angle_mark_s;e++)p[2*e+1]=5,p[2*e]=R(e,5);b=new w(f,u,257,a,l),y=new w(p,c,0,s,l),v=new w(new Array(0),d,0,19,7)}(),D=!0),e.l_desc=new S(e.dyn_ltree,b),e.d_desc=new S(e.dyn_dtree,y),e.bl_desc=new S(e.bl_tree,v),e.bi_buf=0,e.bi_valid=0,k(e)},r._tr_stored_block=F,r._tr_flush_block=function(e,t,r,n){var i,a,s=0;e.level>0?(2===e.strm.data_type&&(e.strm.data_type=function(e){var t,r=4093624447;for(t=0;t__left_angle_mark_=31;t++,r>>>=1)if(1&r&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t__left_angle_mark_o;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0}(e)),N(e,e.l_desc),N(e,e.d_desc),s=function(e){var t;for(j(e,e.dyn_ltree,e.l_desc.max_code),j(e,e.dyn_dtree,e.d_desc.max_code),N(e,e.bl_desc),t=18;t>=3&&0===e.bl_tree[2*h[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),i=e.opt_len+3+7>>>3,(a=e.static_len+3+7>>>3)__left_angle_mark_=i&&(i=a)):i=a=r+5,r+4__left_angle_mark_=i&&-1!==t?F(e,t,r,n):4===e.strategy||a===i?(C(e,2+(n?1:0),3),B(e,f,p)):(C(e,4+(n?1:0),3),function(e,t,r,n){var i;for(C(e,t-257,5),C(e,r-1,5),C(e,n-4,4),i=0;i__left_angle_mark_n;i++)C(e,e.bl_tree[2*h[i]+1],3);L(e,e.dyn_ltree,t-1),L(e,e.dyn_dtree,r-1)}(e,e.l_desc.max_code+1,e.d_desc.max_code+1,s+1),B(e,e.dyn_ltree,e.dyn_dtree)),k(e),n&&P(e)},r._tr_tally=function(e,t,r){return e.pending_buf[e.d_buf+2*e.last_lit]=t>>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&r,e.last_lit++,0===t?e.dyn_ltree[2*r]++:(e.matches++,t--,e.dyn_ltree[2*(g[r]+o+1)]++,e.dyn_dtree[2*E(t)]++),e.last_lit===e.lit_bufsize-1},r._tr_align=function(e){var t;C(e,2,3),T(e,256,f),16===(t=e).bi_valid?(x(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}},{\"../utils/common\":49}],59:[function(e,t,r){t.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg=\"\",this.state=null,this.data_type=2,this.adler=0}},{}],60:[function(e,t,r){var n,i,o=t.exports={};function a(){throw new Error(\"setTimeout has not been defined\")}function s(){throw new Error(\"clearTimeout has not been defined\")}function l(e){if(n===setTimeout)return setTimeout(e,0);if((n===a||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(r){return n.call(this,e,0)}}}!function(){try{n=\"function\"==typeof setTimeout?setTimeout:a}catch(e){n=a}try{i=\"function\"==typeof clearTimeout?clearTimeout:s}catch(e){i=s}}();var u,c=[],d=!1,h=-1;function f(){d&&u&&(d=!1,u.length?c=u.concat(c):h=-1,c.length&&p())}function p(){if(!d){var e=l(f);d=!0;for(var t=c.length;t;){for(u=c,c=[];++h__left_angle_mark_t;)u&&u[h].run();h=-1,t=c.length}u=null,d=!1,function(e){if(i===clearTimeout)return clearTimeout(e);if((i===s||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(e);try{i(e)}catch(t){try{return i.call(null,e)}catch(r){return i.call(this,e)}}}(e)}}function m(e,t){this.fun=e,this.array=t}function g(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r__left_angle_mark_arguments.length;r++)t[r-1]=arguments[r];c.push(new m(e,t)),1!==c.length||d||l(p)},m.prototype.run=function(){this.fun.apply(null,this.array)},o.title=\"browser\",o.browser=!0,o.env={},o.argv=[],o.version=\"\",o.versions={},o.on=g,o.addListener=g,o.once=g,o.off=g,o.removeListener=g,o.removeAllListeners=g,o.emit=g,o.prependListener=g,o.prependOnceListener=g,o.listeners=function(e){return[]},o.binding=function(e){throw new Error(\"process.binding is not supported\")},o.cwd=function(){return\"/\"},o.chdir=function(e){throw new Error(\"process.chdir is not supported\")},o.umask=function(){return 0}},{}],61:[function(e,t,r){t.exports=i;var n=e(\"events\").EventEmitter;function i(){n.call(this)}e(\"inherits\")(i,n),i.Readable=e(\"readable-stream/lib/_stream_readable.js\"),i.Writable=e(\"readable-stream/lib/_stream_writable.js\"),i.Duplex=e(\"readable-stream/lib/_stream_duplex.js\"),i.Transform=e(\"readable-stream/lib/_stream_transform.js\"),i.PassThrough=e(\"readable-stream/lib/_stream_passthrough.js\"),i.finished=e(\"readable-stream/lib/internal/streams/end-of-stream.js\"),i.pipeline=e(\"readable-stream/lib/internal/streams/pipeline.js\"),i.Stream=i,i.prototype.pipe=function(e,t){var r=this;function i(t){e.writable&&!1===e.write(t)&&r.pause&&r.pause()}function o(){r.readable&&r.resume&&r.resume()}r.on(\"data\",i),e.on(\"drain\",o),e._isStdio||t&&!1===t.end||(r.on(\"end\",s),r.on(\"close\",l));var a=!1;function s(){a||(a=!0,e.end())}function l(){a||(a=!0,\"function\"==typeof e.destroy&&e.destroy())}function u(e){if(c(),0===n.listenerCount(this,\"error\"))throw e}function c(){r.removeListener(\"data\",i),e.removeListener(\"drain\",o),r.removeListener(\"end\",s),r.removeListener(\"close\",l),r.removeListener(\"error\",u),e.removeListener(\"error\",u),r.removeListener(\"end\",c),r.removeListener(\"close\",c),e.removeListener(\"close\",c)}return r.on(\"error\",u),e.on(\"error\",u),r.on(\"end\",c),r.on(\"close\",c),e.on(\"close\",c),e.emit(\"pipe\",r),e}},{events:38,inherits:45,\"readable-stream/lib/_stream_duplex.js\":63,\"readable-stream/lib/_stream_passthrough.js\":64,\"readable-stream/lib/_stream_readable.js\":65,\"readable-stream/lib/_stream_transform.js\":66,\"readable-stream/lib/_stream_writable.js\":67,\"readable-stream/lib/internal/streams/end-of-stream.js\":71,\"readable-stream/lib/internal/streams/pipeline.js\":73}],62:[function(e,t,r){var n={};function i(e,t,r){r||(r=Error);var i=function(e){function r(r,n,i){return e.call(this,(o=r,a=n,s=i,\"string\"==typeof t?t:t(o,a,s)))||this;var o,a,s}return i=e,(n=r).prototype=Object.create(i.prototype),n.prototype.constructor=n,n.__proto__=i,r;var n,i}(r);i.prototype.name=r.name,i.prototype.code=e,n[e]=i}function o(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map((function(e){return String(e)})),r>2?\"one of \".concat(t,\" \").concat(e.slice(0,r-1).join(\", \"),\", or \")+e[r-1]:2===r?\"one of \".concat(t,\" \").concat(e[0],\" or \").concat(e[1]):\"of \".concat(t,\" \").concat(e[0])}return\"of \".concat(t,\" \").concat(String(e))}i(\"ERR_INVALID_OPT_VALUE\",(function(e,t){return'The value \"'+t+'\" is invalid for option \"'+e+'\"'}),TypeError),i(\"ERR_INVALID_ARG_TYPE\",(function(e,t,r){var n,i,a,s,l,u;if(\"string\"==typeof t&&(a=\"not \",t.substr(0,4)===a)?(n=\"must not be\",t=t.replace(/^not /,\"\")):n=\"must be\",s=e,l=\" argument\",(void 0===u||u>s.length)&&(u=s.length),s.substring(u-9,u)===l)i=\"The \".concat(e,\" \").concat(n,\" \").concat(o(t,\"type\"));else{var c=function(e,t,r){return\"number\"!=typeof r&&(r=0),!(r+1>e.length)&&-1!==e.indexOf(\".\",r)}(e)?\"property\":\"argument\";i='The \"'.concat(e,'\" ').concat(c,\" \").concat(n,\" \").concat(o(t,\"type\"))}return i+\". Received type \".concat(typeof r)}),TypeError),i(\"ERR_STREAM_PUSH_AFTER_EOF\",\"stream.push() after EOF\"),i(\"ERR_METHOD_NOT_IMPLEMENTED\",(function(e){return\"The \"+e+\" method is not implemented\"})),i(\"ERR_STREAM_PREMATURE_CLOSE\",\"Premature close\"),i(\"ERR_STREAM_DESTROYED\",(function(e){return\"Cannot call \"+e+\" after a stream was destroyed\"})),i(\"ERR_MULTIPLE_CALLBACK\",\"Callback called multiple times\"),i(\"ERR_STREAM_CANNOT_PIPE\",\"Cannot pipe, not readable\"),i(\"ERR_STREAM_WRITE_AFTER_END\",\"write after end\"),i(\"ERR_STREAM_NULL_VALUES\",\"May not write null values to stream\",TypeError),i(\"ERR_UNKNOWN_ENCODING\",(function(e){return\"Unknown encoding: \"+e}),TypeError),i(\"ERR_STREAM_UNSHIFT_AFTER_END_EVENT\",\"stream.unshift() after end event\"),t.exports.codes=n},{}],63:[function(e,t,r){(function(r){(function(){var n=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};t.exports=u;var i=e(\"./_stream_readable\"),o=e(\"./_stream_writable\");e(\"inherits\")(u,i);for(var a=n(o.prototype),s=0;s__left_angle_mark_a.length;s++){var l=a[s];u.prototype[l]||(u.prototype[l]=o.prototype[l])}function u(e){if(!(this instanceof u))return new u(e);i.call(this,e),o.call(this,e),this.allowHalfOpen=!0,e&&(!1===e.readable&&(this.readable=!1),!1===e.writable&&(this.writable=!1),!1===e.allowHalfOpen&&(this.allowHalfOpen=!1,this.once(\"end\",c)))}function c(){this._writableState.ended||r.nextTick(d,this)}function d(e){e.end()}Object.defineProperty(u.prototype,\"writableHighWaterMark\",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(u.prototype,\"writableBuffer\",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(u.prototype,\"writableLength\",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(u.prototype,\"destroyed\",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&this._readableState.destroyed&&this._writableState.destroyed},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}})}).call(this)}).call(this,e(\"_process\"))},{\"./_stream_readable\":65,\"./_stream_writable\":67,_process:60,inherits:45}],64:[function(e,t,r){t.exports=i;var n=e(\"./_stream_transform\");function i(e){if(!(this instanceof i))return new i(e);n.call(this,e)}e(\"inherits\")(i,n),i.prototype._transform=function(e,t,r){r(null,e)}},{\"./_stream_transform\":66,inherits:45}],65:[function(e,t,n){(function(r,n){(function(){var i;t.exports=x,x.ReadableState=E,e(\"events\").EventEmitter;var o,a=function(e,t){return e.listeners(t).length},s=e(\"./internal/streams/stream\"),l=e(\"buffer\").Buffer,u=n.Uint8Array||function(){},c=e(\"util\");o=c&&c.debuglog?c.debuglog(\"stream\"):function(){};var d,h,f,p=e(\"./internal/streams/buffer_list\"),m=e(\"./internal/streams/destroy\"),g=e(\"./internal/streams/state\").getHighWaterMark,_=e(\"../errors\").codes,b=_.ERR_INVALID_ARG_TYPE,y=_.ERR_STREAM_PUSH_AFTER_EOF,v=_.ERR_METHOD_NOT_IMPLEMENTED,A=_.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;e(\"inherits\")(x,s);var w=m.errorOrDestroy,S=[\"error\",\"close\",\"destroy\",\"pause\",\"resume\"];function E(t,r,n){i=i||e(\"./_stream_duplex\"),t=t||{},\"boolean\"!=typeof n&&(n=r instanceof i),this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=g(this,t,\"readableHighWaterMark\",n),this.buffer=new p,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||\"utf8\",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(d||(d=e(\"string_decoder/\").StringDecoder),this.decoder=new d(t.encoding),this.encoding=t.encoding)}function x(t){if(i=i||e(\"./_stream_duplex\"),!(this instanceof x))return new x(t);var r=this instanceof i;this._readableState=new E(t,this,r),this.readable=!0,t&&(\"function\"==typeof t.read&&(this._read=t.read),\"function\"==typeof t.destroy&&(this._destroy=t.destroy)),s.call(this)}function C(e,t,r,n,i){o(\"readableAddChunk\",t);var a,s,c,d,h,f=e._readableState;if(null===t)f.reading=!1,function(e,t){if(o(\"onEofChunk\"),!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?k(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,P(e)))}}(e,f);else if(i||(s=f,h=c=t,l.isBuffer(h)||h instanceof u||\"string\"==typeof c||void 0===c||s.objectMode||(d=new b(\"chunk\",[\"string\",\"Buffer\",\"Uint8Array\"],c)),a=d),a)w(e,a);else if(f.objectMode||t&&t.length>0)if(\"string\"==typeof t||f.objectMode||Object.getPrototypeOf(t)===l.prototype||(t=function(e){return l.from(e)}(t)),n)f.endEmitted?w(e,new A):T(e,f,t,!0);else if(f.ended)w(e,new y);else{if(f.destroyed)return!1;f.reading=!1,f.decoder&&!r?(t=f.decoder.write(t),f.objectMode||0!==t.length?T(e,f,t,!1):M(e,f)):T(e,f,t,!1)}else n||(f.reading=!1,M(e,f));return!f.ended&&(f.length__left_angle_mark_f.highWaterMark||0===f.length)}function T(e,t,r,n){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit(\"data\",r)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&k(e)),M(e,t)}Object.defineProperty(x.prototype,\"destroyed\",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),x.prototype.destroy=m.destroy,x.prototype._undestroy=m.undestroy,x.prototype._destroy=function(e,t){t(e)},x.prototype.push=function(e,t){var r,n=this._readableState;return n.objectMode?r=!0:\"string\"==typeof e&&((t=t||n.defaultEncoding)!==n.encoding&&(e=l.from(e,t),t=\"\"),r=!0),C(this,e,t,!1,r)},x.prototype.unshift=function(e){return C(this,e,null,!0,!1)},x.prototype.isPaused=function(){return!1===this._readableState.flowing},x.prototype.setEncoding=function(t){d||(d=e(\"string_decoder/\").StringDecoder);var r=new d(t);this._readableState.decoder=r,this._readableState.encoding=this._readableState.decoder.encoding;for(var n=this._readableState.buffer.head,i=\"\";null!==n;)i+=r.write(n.data),n=n.next;return this._readableState.buffer.clear(),\"\"!==i&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};var R=1073741824;function I(e,t){return e__left_angle_mark_=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=((r=e)>=R?r=R:(r--,r|=r>>>1,r|=r>>>2,r|=r>>>4,r|=r>>>8,r|=r>>>16,r++),r)),e__left_angle_mark_=t.length?e:t.ended?t.length:(t.needReadable=!0,0));var r}function k(e){var t=e._readableState;o(\"emitReadable\",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(o(\"emitReadable\",t.flowing),t.emittedReadable=!0,r.nextTick(P,e))}function P(e){var t=e._readableState;o(\"emitReadable_\",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit(\"readable\"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length__left_angle_mark_=t.highWaterMark,L(e)}function M(e,t){t.readingMore||(t.readingMore=!0,r.nextTick(O,e,t))}function O(e,t){for(;!t.reading&&!t.ended&&(t.length__left_angle_mark_t.highWaterMark||t.flowing&&0===t.length);){var r=t.length;if(o(\"maybeReadMore read 0\"),e.read(0),r===t.length)break}t.readingMore=!1}function B(e){var t=e._readableState;t.readableListening=e.listenerCount(\"readable\")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount(\"data\")>0&&e.resume()}function N(e){o(\"readable nexttick read 0\"),e.read(0)}function j(e,t){o(\"resume\",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit(\"resume\"),L(e),t.flowing&&!t.reading&&e.read(0)}function L(e){var t=e._readableState;for(o(\"flow\",t.flowing);t.flowing&&null!==e.read(););}function D(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(\"\"):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r);var r}function F(e){var t=e._readableState;o(\"endReadable\",t.endEmitted),t.endEmitted||(t.ended=!0,r.nextTick(U,t,e))}function U(e,t){if(o(\"endReadableNT\",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit(\"end\"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}function z(e,t){for(var r=0,n=e.length;r__left_angle_mark_n;r++)if(e[r]===t)return r;return-1}x.prototype.read=function(e){o(\"read\",e),e=parseInt(e,10);var t=this._readableState,r=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return o(\"read: emitReadable\",t.length,t.ended),0===t.length&&t.ended?F(this):k(this),null;if(0===(e=I(e,t))&&t.ended)return 0===t.length&&F(this),null;var n,i=t.needReadable;return o(\"need readable\",i),(0===t.length||t.length-e__left_angle_mark_t.highWaterMark)&&o(\"length less than watermark\",i=!0),t.ended||t.reading?o(\"reading or ended\",i=!1):i&&(o(\"do read\"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=I(r,t))),null===(n=e>0?D(e,t):null)?(t.needReadable=t.length__left_angle_mark_=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&F(this)),null!==n&&this.emit(\"data\",n),n},x.prototype._read=function(e){w(this,new v(\"_read()\"))},x.prototype.pipe=function(e,t){var n=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e)}i.pipesCount+=1,o(\"pipe count=%d opts=%j\",i.pipesCount,t);var s=t&&!1===t.end||e===r.stdout||e===r.stderr?g:l;function l(){o(\"onend\"),e.end()}i.endEmitted?r.nextTick(s):n.once(\"end\",s),e.on(\"unpipe\",(function t(r,a){o(\"onunpipe\"),r===n&&a&&!1===a.hasUnpiped&&(a.hasUnpiped=!0,o(\"cleanup\"),e.removeListener(\"close\",p),e.removeListener(\"finish\",m),e.removeListener(\"drain\",c),e.removeListener(\"error\",f),e.removeListener(\"unpipe\",t),n.removeListener(\"end\",l),n.removeListener(\"end\",g),n.removeListener(\"data\",h),d=!0,!i.awaitDrain||e._writableState&&!e._writableState.needDrain||c())}));var u,c=(u=n,function(){var e=u._readableState;o(\"pipeOnDrain\",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&a(u,\"data\")&&(e.flowing=!0,L(u))});e.on(\"drain\",c);var d=!1;function h(t){o(\"ondata\");var r=e.write(t);o(\"dest.write\",r),!1===r&&((1===i.pipesCount&&i.pipes===e||i.pipesCount>1&&-1!==z(i.pipes,e))&&!d&&(o(\"false write response, pause\",i.awaitDrain),i.awaitDrain++),n.pause())}function f(t){o(\"onerror\",t),g(),e.removeListener(\"error\",f),0===a(e,\"error\")&&w(e,t)}function p(){e.removeListener(\"finish\",m),g()}function m(){o(\"onfinish\"),e.removeListener(\"close\",p),g()}function g(){o(\"unpipe\"),n.unpipe(e)}return n.on(\"data\",h),function(e,t,r){if(\"function\"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,\"error\",f),e.once(\"close\",p),e.once(\"finish\",m),e.emit(\"pipe\",n),i.flowing||(o(\"pipe resume\"),n.resume()),e},x.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit(\"unpipe\",this,r)),this;if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o__left_angle_mark_i;o++)n[o].emit(\"unpipe\",this,{hasUnpiped:!1});return this}var a=z(t.pipes,e);return-1===a||(t.pipes.splice(a,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit(\"unpipe\",this,r)),this},x.prototype.on=function(e,t){var n=s.prototype.on.call(this,e,t),i=this._readableState;return\"data\"===e?(i.readableListening=this.listenerCount(\"readable\")>0,!1!==i.flowing&&this.resume()):\"readable\"===e&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,o(\"on readable\",i.length,i.reading),i.length?k(this):i.reading||r.nextTick(N,this))),n},x.prototype.addListener=x.prototype.on,x.prototype.removeListener=function(e,t){var n=s.prototype.removeListener.call(this,e,t);return\"readable\"===e&&r.nextTick(B,this),n},x.prototype.removeAllListeners=function(e){var t=s.prototype.removeAllListeners.apply(this,arguments);return\"readable\"!==e&&void 0!==e||r.nextTick(B,this),t},x.prototype.resume=function(){var e,t,n=this._readableState;return n.flowing||(o(\"resume\"),n.flowing=!n.readableListening,e=this,(t=n).resumeScheduled||(t.resumeScheduled=!0,r.nextTick(j,e,t))),n.paused=!1,this},x.prototype.pause=function(){return o(\"call pause flowing=%j\",this._readableState.flowing),!1!==this._readableState.flowing&&(o(\"pause\"),this._readableState.flowing=!1,this.emit(\"pause\")),this._readableState.paused=!0,this},x.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var i in e.on(\"end\",(function(){if(o(\"wrapped end\"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on(\"data\",(function(i){o(\"wrapped data\"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i||(r.objectMode||i&&i.length)&&(t.push(i)||(n=!0,e.pause()))})),e)void 0===this[i]&&\"function\"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var a=0;a__left_angle_mark_S.length;a++)e.on(S[a],this.emit.bind(this,S[a]));return this._read=function(t){o(\"wrapped _read\",t),n&&(n=!1,e.resume())},this},\"function\"==typeof Symbol&&(x.prototype[Symbol.asyncIterator]=function(){return void 0===h&&(h=e(\"./internal/streams/async_iterator\")),h(this)}),Object.defineProperty(x.prototype,\"readableHighWaterMark\",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(x.prototype,\"readableBuffer\",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(x.prototype,\"readableFlowing\",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),x._fromList=D,Object.defineProperty(x.prototype,\"readableLength\",{enumerable:!1,get:function(){return this._readableState.length}}),\"function\"==typeof Symbol&&(x.from=function(t,r){return void 0===f&&(f=e(\"./internal/streams/from\")),f(x,t,r)})}).call(this)}).call(this,e(\"_process\"),void 0!==r.g?r.g:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:{})},{\"../errors\":62,\"./_stream_duplex\":63,\"./internal/streams/async_iterator\":68,\"./internal/streams/buffer_list\":69,\"./internal/streams/destroy\":70,\"./internal/streams/from\":72,\"./internal/streams/state\":74,\"./internal/streams/stream\":75,_process:60,buffer:33,events:38,inherits:45,\"string_decoder/\":76,util:30}],66:[function(e,t,r){t.exports=c;var n=e(\"../errors\").codes,i=n.ERR_METHOD_NOT_IMPLEMENTED,o=n.ERR_MULTIPLE_CALLBACK,a=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,s=n.ERR_TRANSFORM_WITH_LENGTH_0,l=e(\"./_stream_duplex\");function u(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit(\"error\",new o);r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length__left_angle_mark_i.highWaterMark)&&this._read(i.highWaterMark)}function c(e){if(!(this instanceof c))return new c(e);l.call(this,e),this._transformState={afterTransform:u.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&(\"function\"==typeof e.transform&&(this._transform=e.transform),\"function\"==typeof e.flush&&(this._flush=e.flush)),this.on(\"prefinish\",d)}function d(){var e=this;\"function\"!=typeof this._flush||this._readableState.destroyed?h(this,null,null):this._flush((function(t,r){h(e,t,r)}))}function h(e,t,r){if(t)return e.emit(\"error\",t);if(null!=r&&e.push(r),e._writableState.length)throw new s;if(e._transformState.transforming)throw new a;return e.push(null)}e(\"inherits\")(c,l),c.prototype.push=function(e,t){return this._transformState.needTransform=!1,l.prototype.push.call(this,e,t)},c.prototype._transform=function(e,t,r){r(new i(\"_transform()\"))},c.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length__left_angle_mark_i.highWaterMark)&&this._read(i.highWaterMark)}},c.prototype._read=function(e){var t=this._transformState;null===t.writechunk||t.transforming?t.needTransform=!0:(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform))},c.prototype._destroy=function(e,t){l.prototype._destroy.call(this,e,(function(e){t(e)}))}},{\"../errors\":62,\"./_stream_duplex\":63,inherits:45}],67:[function(e,t,n){(function(r,n){(function(){function i(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t){var r=e.entry;for(e.entry=null;r;){var n=r.callback;t.pendingcb--,n(void 0),r=r.next}t.corkedRequestsFree.next=e}(t,e)}}var o;t.exports=x,x.WritableState=E;var a,s={deprecate:e(\"util-deprecate\")},l=e(\"./internal/streams/stream\"),u=e(\"buffer\").Buffer,c=n.Uint8Array||function(){},d=e(\"./internal/streams/destroy\"),h=e(\"./internal/streams/state\").getHighWaterMark,f=e(\"../errors\").codes,p=f.ERR_INVALID_ARG_TYPE,m=f.ERR_METHOD_NOT_IMPLEMENTED,g=f.ERR_MULTIPLE_CALLBACK,_=f.ERR_STREAM_CANNOT_PIPE,b=f.ERR_STREAM_DESTROYED,y=f.ERR_STREAM_NULL_VALUES,v=f.ERR_STREAM_WRITE_AFTER_END,A=f.ERR_UNKNOWN_ENCODING,w=d.errorOrDestroy;function S(){}function E(t,n,a){o=o||e(\"./_stream_duplex\"),t=t||{},\"boolean\"!=typeof a&&(a=n instanceof o),this.objectMode=!!t.objectMode,a&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=h(this,t,\"writableHighWaterMark\",a),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var s=!1===t.decodeStrings;this.decodeStrings=!s,this.defaultEncoding=t.defaultEncoding||\"utf8\",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var n,i=e._writableState,o=i.sync,a=i.writecb;if(\"function\"!=typeof a)throw new g;if((n=i).writing=!1,n.writecb=null,n.length-=n.writelen,n.writelen=0,t)!function(e,t,n,i,o){--t.pendingcb,n?(r.nextTick(o,i),r.nextTick(P,e,t),e._writableState.errorEmitted=!0,w(e,i)):(o(i),e._writableState.errorEmitted=!0,w(e,i),P(e,t))}(e,i,o,t,a);else{var s=I(i)||e.destroyed;s||i.corked||i.bufferProcessing||!i.bufferedRequest||R(e,i),o?r.nextTick(T,e,i,s,a):T(e,i,s,a)}}(n,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new i(this)}function x(t){var r=this instanceof(o=o||e(\"./_stream_duplex\"));if(!r&&!a.call(x,this))return new x(t);this._writableState=new E(t,this,r),this.writable=!0,t&&(\"function\"==typeof t.write&&(this._write=t.write),\"function\"==typeof t.writev&&(this._writev=t.writev),\"function\"==typeof t.destroy&&(this._destroy=t.destroy),\"function\"==typeof t.final&&(this._final=t.final)),l.call(this)}function C(e,t,r,n,i,o,a){t.writelen=n,t.writecb=a,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new b(\"write\")):r?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function T(e,t,r,n){var i,o;r||(i=e,0===(o=t).length&&o.needDrain&&(o.needDrain=!1,i.emit(\"drain\"))),t.pendingcb--,n(),P(e,t)}function R(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,o=new Array(n),a=t.corkedRequestsFree;a.entry=r;for(var s=0,l=!0;r;)o[s]=r,r.isBuf||(l=!1),r=r.next,s+=1;o.allBuffers=l,C(e,t,!0,t.length,o,\"\",a.finish),t.pendingcb++,t.lastBufferedRequest=null,a.next?(t.corkedRequestsFree=a.next,a.next=null):t.corkedRequestsFree=new i(t),t.bufferedRequestCount=0}else{for(;r;){var u=r.chunk,c=r.encoding,d=r.callback;if(C(e,t,!1,t.objectMode?1:u.length,u,c,d),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function I(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function k(e,t){e._final((function(r){t.pendingcb--,r&&w(e,r),t.prefinished=!0,e.emit(\"prefinish\"),P(e,t)}))}function P(e,t){var n,i,o=I(t);if(o&&(n=e,(i=t).prefinished||i.finalCalled||(\"function\"!=typeof n._final||i.destroyed?(i.prefinished=!0,n.emit(\"prefinish\")):(i.pendingcb++,i.finalCalled=!0,r.nextTick(k,n,i))),0===t.pendingcb&&(t.finished=!0,e.emit(\"finish\"),t.autoDestroy))){var a=e._readableState;(!a||a.autoDestroy&&a.endEmitted)&&e.destroy()}return o}e(\"inherits\")(x,l),E.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(E.prototype,\"buffer\",{get:s.deprecate((function(){return this.getBuffer()}),\"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.\",\"DEP0003\")})}catch(e){}}(),\"function\"==typeof Symbol&&Symbol.hasInstance&&\"function\"==typeof Function.prototype[Symbol.hasInstance]?(a=Function.prototype[Symbol.hasInstance],Object.defineProperty(x,Symbol.hasInstance,{value:function(e){return!!a.call(this,e)||this===x&&e&&e._writableState instanceof E}})):a=function(e){return e instanceof this},x.prototype.pipe=function(){w(this,new _)},x.prototype.write=function(e,t,n){var i,o,a=this._writableState,s=!1,l=!a.objectMode&&(i=e,u.isBuffer(i)||i instanceof c);return l&&!u.isBuffer(e)&&(o=e,e=u.from(o)),\"function\"==typeof t&&(n=t,t=null),l?t=\"buffer\":t||(t=a.defaultEncoding),\"function\"!=typeof n&&(n=S),a.ending?function(e,t){var n=new v;w(e,n),r.nextTick(t,n)}(this,n):(l||function(e,t,n,i){var o;return null===n?o=new y:\"string\"==typeof n||t.objectMode||(o=new p(\"chunk\",[\"string\",\"Buffer\"],n)),!o||(w(e,o),r.nextTick(i,o),!1)}(this,a,e,n))&&(a.pendingcb++,s=function(e,t,r,n,i,o){if(!r){var a=(l=n,c=i,(s=t).objectMode||!1===s.decodeStrings||\"string\"!=typeof l||(l=u.from(l,c)),l);n!==a&&(r=!0,i=\"buffer\",n=a)}var s,l,c,d=t.objectMode?1:n.length;t.length+=d;var h=t.length__left_angle_mark_t.highWaterMark;if(h||(t.needDrain=!0),t.writing||t.corked){var f=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:o,next:null},f?f.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else C(e,t,!1,d,n,i,o);return h}(this,a,l,e,t,n)),s},x.prototype.cork=function(){this._writableState.corked++},x.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||R(this,e))},x.prototype.setDefaultEncoding=function(e){if(\"string\"==typeof e&&(e=e.toLowerCase()),!([\"hex\",\"utf8\",\"utf-8\",\"ascii\",\"binary\",\"base64\",\"ucs2\",\"ucs-2\",\"utf16le\",\"utf-16le\",\"raw\"].indexOf((e+\"\").toLowerCase())>-1))throw new A(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(x.prototype,\"writableBuffer\",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(x.prototype,\"writableHighWaterMark\",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),x.prototype._write=function(e,t,r){r(new m(\"_write()\"))},x.prototype._writev=null,x.prototype.end=function(e,t,n){var i,o,a,s=this._writableState;return\"function\"==typeof e?(n=e,e=null,t=null):\"function\"==typeof t&&(n=t,t=null),null!=e&&this.write(e,t),s.corked&&(s.corked=1,this.uncork()),s.ending||(i=this,a=n,(o=s).ending=!0,P(i,o),a&&(o.finished?r.nextTick(a):i.once(\"finish\",a)),o.ended=!0,i.writable=!1),this},Object.defineProperty(x.prototype,\"writableLength\",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(x.prototype,\"destroyed\",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),x.prototype.destroy=d.destroy,x.prototype._undestroy=d.undestroy,x.prototype._destroy=function(e,t){t(e)}}).call(this)}).call(this,e(\"_process\"),void 0!==r.g?r.g:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:{})},{\"../errors\":62,\"./_stream_duplex\":63,\"./internal/streams/destroy\":70,\"./internal/streams/state\":74,\"./internal/streams/stream\":75,_process:60,buffer:33,inherits:45,\"util-deprecate\":78}],68:[function(e,t,r){(function(r){(function(){var n;function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var o=e(\"./end-of-stream\"),a=Symbol(\"lastResolve\"),s=Symbol(\"lastReject\"),l=Symbol(\"error\"),u=Symbol(\"ended\"),c=Symbol(\"lastPromise\"),d=Symbol(\"handlePromise\"),h=Symbol(\"stream\");function f(e,t){return{value:e,done:t}}function p(e){var t=e[a];if(null!==t){var r=e[h].read();null!==r&&(e[c]=null,e[a]=null,e[s]=null,t(f(r,!1)))}}function m(e){r.nextTick(p,e)}var g=Object.getPrototypeOf((function(){})),_=Object.setPrototypeOf((i(n={get stream(){return this[h]},next:function(){var e=this,t=this[l];if(null!==t)return Promise.reject(t);if(this[u])return Promise.resolve(f(void 0,!0));if(this[h].destroyed)return new Promise((function(t,n){r.nextTick((function(){e[l]?n(e[l]):t(f(void 0,!0))}))}));var n,i,o,a=this[c];if(a)n=new Promise((i=a,o=this,function(e,t){i.then((function(){o[u]?e(f(void 0,!0)):o[d](e,t)}),t)}));else{var s=this[h].read();if(null!==s)return Promise.resolve(f(s,!1));n=new Promise(this[d])}return this[c]=n,n}},Symbol.asyncIterator,(function(){return this})),i(n,\"return\",(function(){var e=this;return new Promise((function(t,r){e[h].destroy(null,(function(e){e?r(e):t(f(void 0,!0))}))}))})),n),g);t.exports=function(e){var t,r=Object.create(_,(i(t={},h,{value:e,writable:!0}),i(t,a,{value:null,writable:!0}),i(t,s,{value:null,writable:!0}),i(t,l,{value:null,writable:!0}),i(t,u,{value:e._readableState.endEmitted,writable:!0}),i(t,d,{value:function(e,t){var n=r[h].read();n?(r[c]=null,r[a]=null,r[s]=null,e(f(n,!1))):(r[a]=e,r[s]=t)},writable:!0}),t));return r[c]=null,o(e,(function(e){if(e&&\"ERR_STREAM_PREMATURE_CLOSE\"!==e.code){var t=r[s];return null!==t&&(r[c]=null,r[a]=null,r[s]=null,t(e)),void(r[l]=e)}var n=r[a];null!==n&&(r[c]=null,r[a]=null,r[s]=null,n(f(void 0,!0))),r[u]=!0})),e.on(\"readable\",m.bind(null,r)),r}}).call(this)}).call(this,e(\"_process\"))},{\"./end-of-stream\":71,_process:60}],69:[function(e,t,r){function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){for(var r=0;r__left_angle_mark_t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,\"value\"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var a=e(\"buffer\").Buffer,s=e(\"util\").inspect,l=s&&s.custom||\"inspect\";t.exports=function(){function e(){(function(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")})(this,e),this.head=null,this.tail=null,this.length=0}return t=e,r=[{key:\"push\",value:function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:\"unshift\",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:\"shift\",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:\"clear\",value:function(){this.head=this.tail=null,this.length=0}},{key:\"join\",value:function(e){if(0===this.length)return\"\";for(var t=this.head,r=\"\"+t.data;t=t.next;)r+=e+t.data;return r}},{key:\"concat\",value:function(e){if(0===this.length)return a.alloc(0);for(var t=a.allocUnsafe(e>>>0),r=this.head,n=0;r;)i=r.data,o=t,s=n,a.prototype.copy.call(i,o,s),n+=r.data.length,r=r.next;var i,o,s;return t}},{key:\"consume\",value:function(e,t){var r;return e__left_angle_mark_this.head.data.length?(r=this.head.data.slice(0,e),this.head.data=this.head.data.slice(e)):r=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),r}},{key:\"first\",value:function(){return this.head.data}},{key:\"_getString\",value:function(e){var t=this.head,r=1,n=t.data;for(e-=n.length;t=t.next;){var i=t.data,o=e>i.length?i.length:e;if(o===i.length?n+=i:n+=i.slice(0,e),0==(e-=o)){o===i.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(o));break}++r}return this.length-=r,n}},{key:\"_getBuffer\",value:function(e){var t=a.allocUnsafe(e),r=this.head,n=1;for(r.data.copy(t),e-=r.data.length;r=r.next;){var i=r.data,o=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,o),0==(e-=o)){o===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(o));break}++n}return this.length-=n,t}},{key:l,value:function(e,t){return s(this,function(e){for(var t=1;t__left_angle_mark_arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(Object(r),!0).forEach((function(t){i(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},t,{depth:0,customInspect:!1}))}}],r&&o(t.prototype,r),e;var t,r}()},{buffer:33,util:30}],70:[function(e,t,r){(function(e){(function(){function r(e,t){i(e,t),n(e)}function n(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit(\"close\")}function i(e,t){e.emit(\"error\",t)}t.exports={destroy:function(t,o){var a=this,s=this._readableState&&this._readableState.destroyed,l=this._writableState&&this._writableState.destroyed;return s||l?(o?o(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,e.nextTick(i,this,t)):e.nextTick(i,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,(function(t){!o&&t?a._writableState?a._writableState.errorEmitted?e.nextTick(n,a):(a._writableState.errorEmitted=!0,e.nextTick(r,a,t)):e.nextTick(r,a,t):o?(e.nextTick(n,a),o(t)):e.nextTick(n,a)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit(\"error\",t)}}}).call(this)}).call(this,e(\"_process\"))},{_process:60}],71:[function(e,t,r){var n=e(\"../../../errors\").codes.ERR_STREAM_PREMATURE_CLOSE;function i(){}t.exports=function e(t,r,o){if(\"function\"==typeof r)return e(t,null,r);var a,s;r||(r={}),a=o||i,s=!1,o=function(){if(!s){s=!0;for(var e=arguments.length,t=new Array(e),r=0;r__left_angle_mark_e;r++)t[r]=arguments[r];a.apply(this,t)}};var l=r.readable||!1!==r.readable&&t.readable,u=r.writable||!1!==r.writable&&t.writable,c=function(){t.writable||h()},d=t._writableState&&t._writableState.finished,h=function(){u=!1,d=!0,l||o.call(t)},f=t._readableState&&t._readableState.endEmitted,p=function(){l=!1,f=!0,u||o.call(t)},m=function(e){o.call(t,e)},g=function(){var e;return l&&!f?(t._readableState&&t._readableState.ended||(e=new n),o.call(t,e)):u&&!d?(t._writableState&&t._writableState.ended||(e=new n),o.call(t,e)):void 0},_=function(){t.req.on(\"finish\",h)};return function(e){return e.setHeader&&\"function\"==typeof e.abort}(t)?(t.on(\"complete\",h),t.on(\"abort\",g),t.req?_():t.on(\"request\",_)):u&&!t._writableState&&(t.on(\"end\",c),t.on(\"close\",c)),t.on(\"end\",p),t.on(\"finish\",h),!1!==r.error&&t.on(\"error\",m),t.on(\"close\",g),function(){t.removeListener(\"complete\",h),t.removeListener(\"abort\",g),t.removeListener(\"request\",_),t.req&&t.req.removeListener(\"finish\",h),t.removeListener(\"end\",c),t.removeListener(\"close\",c),t.removeListener(\"finish\",h),t.removeListener(\"end\",p),t.removeListener(\"error\",m),t.removeListener(\"close\",g)}}},{\"../../../errors\":62}],72:[function(e,t,r){t.exports=function(){throw new Error(\"Readable.from is not available in the browser\")}},{}],73:[function(e,t,r){var n,i=e(\"../../../errors\").codes,o=i.ERR_MISSING_ARGS,a=i.ERR_STREAM_DESTROYED;function s(e){if(e)throw e}function l(e){e()}function u(e,t){return e.pipe(t)}t.exports=function(){for(var t=arguments.length,r=new Array(t),i=0;i__left_angle_mark_t;i++)r[i]=arguments[i];var c,d,h=(d=r).length?\"function\"!=typeof d[d.length-1]?s:d.pop():s;if(Array.isArray(r[0])&&(r=r[0]),r.length__left_angle_mark_2)throw new o(\"streams\");var f=r.map((function(t,i){var o=i__left_angle_mark_r.length-1;return function(t,r,i,o){o=function(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}(o);var s=!1;t.on(\"close\",(function(){s=!0})),void 0===n&&(n=e(\"./end-of-stream\")),n(t,{readable:r,writable:i},(function(e){if(e)return o(e);s=!0,o()}));var l=!1;return function(e){if(!s&&!l)return l=!0,(r=t).setHeader&&\"function\"==typeof r.abort?t.abort():\"function\"==typeof t.destroy?t.destroy():void o(e||new a(\"pipe\"));var r}}(t,o,i>0,(function(e){c||(c=e),e&&f.forEach(l),o||(f.forEach(l),h(c))}))}));return r.reduce(u)}},{\"../../../errors\":62,\"./end-of-stream\":71}],74:[function(e,t,r){var n=e(\"../../../errors\").codes.ERR_INVALID_OPT_VALUE;t.exports={getHighWaterMark:function(e,t,r,i){var o,a,s,l=(a=i,s=r,null!=(o=t).highWaterMark?o.highWaterMark:a?o[s]:null);if(null!=l){if(!isFinite(l)||Math.floor(l)!==l||l__left_angle_mark_0)throw new n(i?r:\"highWaterMark\",l);return Math.floor(l)}return e.objectMode?16:16384}}},{\"../../../errors\":62}],75:[function(e,t,r){t.exports=e(\"events\").EventEmitter},{events:38}],76:[function(e,t,r){var n=e(\"safe-buffer\").Buffer,i=n.isEncoding||function(e){switch((e=\"\"+e)&&e.toLowerCase()){case\"hex\":case\"utf8\":case\"utf-8\":case\"ascii\":case\"binary\":case\"base64\":case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":case\"raw\":return!0;default:return!1}};function o(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return\"utf8\";for(var t;;)switch(e){case\"utf8\":case\"utf-8\":return\"utf8\";case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return\"utf16le\";case\"latin1\":case\"binary\":return\"latin1\";case\"base64\":case\"ascii\":case\"hex\":return e;default:if(t)return;e=(\"\"+e).toLowerCase(),t=!0}}(e);if(\"string\"!=typeof t&&(n.isEncoding===i||!i(e)))throw new Error(\"Unknown encoding: \"+e);return t||e}(e),this.encoding){case\"utf16le\":this.text=l,this.end=u,t=4;break;case\"utf8\":this.fillLast=s,t=4;break;case\"base64\":this.text=c,this.end=d,t=3;break;default:return this.write=h,void(this.end=f)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function a(e){return e__left_angle_mark_=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function s(e){var t=this.lastTotal-this.lastNeed,r=function(e,t){if(128!=(192&t[0]))return e.lastNeed=0,\"�\";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,\"�\";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,\"�\"}}(this,e);return void 0!==r?r:this.lastNeed__left_angle_mark_=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function l(e,t){if((e.length-t)%2==0){var r=e.toString(\"utf16le\",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n__left_angle_mark_=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString(\"utf16le\",t,e.length-1)}function u(e){var t=e&&e.length?this.write(e):\"\";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString(\"utf16le\",0,r)}return t}function c(e,t){var r=(e.length-t)%3;return 0===r?e.toString(\"base64\",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString(\"base64\",t,e.length-r))}function d(e){var t=e&&e.length?this.write(e):\"\";return this.lastNeed?t+this.lastChar.toString(\"base64\",0,3-this.lastNeed):t}function h(e){return e.toString(this.encoding)}function f(e){return e&&e.length?this.write(e):\"\"}r.StringDecoder=o,o.prototype.write=function(e){if(0===e.length)return\"\";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return\"\";r=this.lastNeed,this.lastNeed=0}else r=0;return r__left_angle_mark_e.length?t?t+this.text(e,r):this.text(e,r):t||\"\"},o.prototype.end=function(e){var t=e&&e.length?this.write(e):\"\";return this.lastNeed?t+\"�\":t},o.prototype.text=function(e,t){var r=function(e,t,r){var n=t.length-1;if(n__left_angle_mark_r)return 0;var i=a(t[n]);return i>=0?(i>0&&(e.lastNeed=i-1),i):--n__left_angle_mark_r||-2===i?0:(i=a(t[n]))>=0?(i>0&&(e.lastNeed=i-2),i):--n__left_angle_mark_r||-2===i?0:(i=a(t[n]))>=0?(i>0&&(2===i?i=0:e.lastNeed=i-3),i):0}(this,e,t);if(!this.lastNeed)return e.toString(\"utf8\",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString(\"utf8\",t,n)},o.prototype.fillLast=function(e){if(this.lastNeed__left_angle_mark_=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},{\"safe-buffer\":77}],77:[function(e,t,r){var n=e(\"buffer\"),i=n.Buffer;function o(e,t){for(var r in e)t[r]=e[r]}function a(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=n:(o(n,r),r.Buffer=a),a.prototype=Object.create(i.prototype),o(i,a),a.from=function(e,t,r){if(\"number\"==typeof e)throw new TypeError(\"Argument must not be a number\");return i(e,t,r)},a.alloc=function(e,t,r){if(\"number\"!=typeof e)throw new TypeError(\"Argument must be a number\");var n=i(e);return void 0!==t?\"string\"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},a.allocUnsafe=function(e){if(\"number\"!=typeof e)throw new TypeError(\"Argument must be a number\");return i(e)},a.allocUnsafeSlow=function(e){if(\"number\"!=typeof e)throw new TypeError(\"Argument must be a number\");return n.SlowBuffer(e)}},{buffer:33}],78:[function(e,t,n){(function(e){(function(){function r(t){try{if(!e.localStorage)return!1}catch(n){return!1}var r=e.localStorage[t];return null!=r&&\"true\"===String(r).toLowerCase()}t.exports=function(e,t){if(r(\"noDeprecation\"))return e;var n=!1;return function(){if(!n){if(r(\"throwDeprecation\"))throw new Error(t);r(\"traceDeprecation\")?import_console_browserify.default.trace(t):import_console_browserify.default.warn(t),n=!0}return e.apply(this,arguments)}}}).call(this)}).call(this,void 0!==r.g?r.g:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:{})},{}],79:[function(e,t,r){arguments[4][25][0].apply(r,arguments)},{dup:25}],80:[function(e,t,r){var n=e(\"is-arguments\"),i=e(\"is-generator-function\"),o=e(\"which-typed-array\"),a=e(\"is-typed-array\");function s(e){return e.call.bind(e)}var l=\"undefined\"!=typeof BigInt,u=\"undefined\"!=typeof Symbol,c=s(Object.prototype.toString),d=s(Number.prototype.valueOf),h=s(String.prototype.valueOf),f=s(Boolean.prototype.valueOf);if(l)var p=s(BigInt.prototype.valueOf);if(u)var m=s(Symbol.prototype.valueOf);function g(e,t){if(\"object\"!=typeof e)return!1;try{return t(e),!0}catch(r){return!1}}function _(e){return\"[object Map]\"===c(e)}function b(e){return\"[object Set]\"===c(e)}function y(e){return\"[object WeakMap]\"===c(e)}function v(e){return\"[object WeakSet]\"===c(e)}function A(e){return\"[object ArrayBuffer]\"===c(e)}function w(e){return\"undefined\"!=typeof ArrayBuffer&&(A.working?A(e):e instanceof ArrayBuffer)}function S(e){return\"[object DataView]\"===c(e)}function E(e){return\"undefined\"!=typeof DataView&&(S.working?S(e):e instanceof DataView)}function x(e){return\"[object SharedArrayBuffer]\"===c(e)}function C(e){return\"undefined\"!=typeof SharedArrayBuffer&&(x.working?x(e):e instanceof SharedArrayBuffer)}function T(e){return g(e,d)}function R(e){return g(e,h)}function I(e){return g(e,f)}function k(e){return l&&g(e,p)}function P(e){return u&&g(e,m)}r.isArgumentsObject=n,r.isGeneratorFunction=i,r.isTypedArray=a,r.isPromise=function(e){return\"undefined\"!=typeof Promise&&e instanceof Promise||null!==e&&\"object\"==typeof e&&\"function\"==typeof e.then&&\"function\"==typeof e.catch},r.isArrayBufferView=function(e){return\"undefined\"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):a(e)||E(e)},r.isUint8Array=function(e){return\"Uint8Array\"===o(e)},r.isUint8ClampedArray=function(e){return\"Uint8ClampedArray\"===o(e)},r.isUint16Array=function(e){return\"Uint16Array\"===o(e)},r.isUint32Array=function(e){return\"Uint32Array\"===o(e)},r.isInt8Array=function(e){return\"Int8Array\"===o(e)},r.isInt16Array=function(e){return\"Int16Array\"===o(e)},r.isInt32Array=function(e){return\"Int32Array\"===o(e)},r.isFloat32Array=function(e){return\"Float32Array\"===o(e)},r.isFloat64Array=function(e){return\"Float64Array\"===o(e)},r.isBigInt64Array=function(e){return\"BigInt64Array\"===o(e)},r.isBigUint64Array=function(e){return\"BigUint64Array\"===o(e)},_.working=\"undefined\"!=typeof Map&&_(new Map),r.isMap=function(e){return\"undefined\"!=typeof Map&&(_.working?_(e):e instanceof Map)},b.working=\"undefined\"!=typeof Set&&b(new Set),r.isSet=function(e){return\"undefined\"!=typeof Set&&(b.working?b(e):e instanceof Set)},y.working=\"undefined\"!=typeof WeakMap&&y(new WeakMap),r.isWeakMap=function(e){return\"undefined\"!=typeof WeakMap&&(y.working?y(e):e instanceof WeakMap)},v.working=\"undefined\"!=typeof WeakSet&&v(new WeakSet),r.isWeakSet=function(e){return v(e)},A.working=\"undefined\"!=typeof ArrayBuffer&&A(new ArrayBuffer),r.isArrayBuffer=w,S.working=\"undefined\"!=typeof ArrayBuffer&&\"undefined\"!=typeof DataView&&S(new DataView(new ArrayBuffer(1),0,1)),r.isDataView=E,x.working=\"undefined\"!=typeof SharedArrayBuffer&&x(new SharedArrayBuffer),r.isSharedArrayBuffer=C,r.isAsyncFunction=function(e){return\"[object AsyncFunction]\"===c(e)},r.isMapIterator=function(e){return\"[object Map Iterator]\"===c(e)},r.isSetIterator=function(e){return\"[object Set Iterator]\"===c(e)},r.isGeneratorObject=function(e){return\"[object Generator]\"===c(e)},r.isWebAssemblyCompiledModule=function(e){return\"[object WebAssembly.Module]\"===c(e)},r.isNumberObject=T,r.isStringObject=R,r.isBooleanObject=I,r.isBigIntObject=k,r.isSymbolObject=P,r.isBoxedPrimitive=function(e){return T(e)||R(e)||I(e)||k(e)||P(e)},r.isAnyArrayBuffer=function(e){return\"undefined\"!=typeof Uint8Array&&(w(e)||C(e))},[\"isProxy\",\"isExternal\",\"isModuleNamespaceObject\"].forEach((function(e){Object.defineProperty(r,e,{enumerable:!1,value:function(){throw new Error(e+\" is not supported in userland\")}})}))},{\"is-arguments\":46,\"is-generator-function\":47,\"is-typed-array\":48,\"which-typed-array\":82}],81:[function(e,t,r){(function(t){(function(){var n=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),r={},n=0;n__left_angle_mark_t.length;n++)r[t[n]]=Object.getOwnPropertyDescriptor(e,t[n]);return r},i=/%[sdj%]/g;r.format=function(e){if(!b(e)){for(var t=[],r=0;r__left_angle_mark_arguments.length;r++)t.push(l(arguments[r]));return t.join(\" \")}r=1;for(var n=arguments,o=n.length,a=String(e).replace(i,(function(e){if(\"%%\"===e)return\"%\";if(r>=o)return e;switch(e){case\"%s\":return String(n[r++]);case\"%d\":return Number(n[r++]);case\"%j\":try{return JSON.stringify(n[r++])}catch(t){return\"[Circular]\"}default:return e}})),s=n[r];r__left_angle_mark_o;s=n[++r])g(s)||!A(s)?a+=\" \"+s:a+=\" \"+l(s);return a},r.deprecate=function(e,n){if(void 0!==t&&!0===t.noDeprecation)return e;if(void 0===t)return function(){return r.deprecate(e,n).apply(this,arguments)};var i=!1;return function(){if(!i){if(t.throwDeprecation)throw new Error(n);t.traceDeprecation?import_console_browserify.default.trace(n):import_console_browserify.default.error(n),i=!0}return e.apply(this,arguments)}};var o={},a=/^$/;if(t.env.NODE_DEBUG){var s=t.env.NODE_DEBUG;s=s.replace(/[|\\\\{}()[\\]^$+?.]/g,\"\\\\
\").replace(/\\*/g,\".*\").replace(/,/g,\"$|^\").toUpperCase(),a=new RegExp(\"^\"+s+\"$\",\"i\")}function l(e,t){var n={seen:[],stylize:c};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),m(t)?n.showHidden=t:t&&r._extend(n,t),y(n.showHidden)&&(n.showHidden=!1),y(n.depth)&&(n.depth=2),y(n.colors)&&(n.colors=!1),y(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=u),d(n,e,n.depth)}function u(e,t){var r=l.styles[t];return r?\"\u001b[\"+l.colors[r][0]+\"m\"+e+\"\u001b[\"+l.colors[r][1]+\"m\":e}function c(e,t){return e}function d(e,t,n){if(e.customInspect&&t&&E(t.inspect)&&t.inspect!==r.inspect&&(!t.constructor||t.constructor.prototype!==t)){var i=t.inspect(n,e);return b(i)||(i=d(e,i,n)),i}var o=function(e,t){if(y(t))return e.stylize(\"undefined\",\"undefined\");if(b(t)){var r=\"'\"+JSON.stringify(t).replace(/^\"|\"$/g,\"\").replace(/'/g,\"\\\\'\").replace(/\\\\\"/g,'\"')+\"'\";return e.stylize(r,\"string\")}return _(t)?e.stylize(\"\"+t,\"number\"):m(t)?e.stylize(\"\"+t,\"boolean\"):g(t)?e.stylize(\"null\",\"null\"):void 0}(e,t);if(o)return o;var a,s=Object.keys(t),l=(a={},s.forEach((function(e,t){a[e]=!0})),a);if(e.showHidden&&(s=Object.getOwnPropertyNames(t)),S(t)&&(s.indexOf(\"message\")>=0||s.indexOf(\"description\")>=0))return h(t);if(0===s.length){if(E(t)){var u=t.name?\": \"+t.name:\"\";return e.stylize(\"[Function\"+u+\"]\",\"special\")}if(v(t))return e.stylize(RegExp.prototype.toString.call(t),\"regexp\");if(w(t))return e.stylize(Date.prototype.toString.call(t),\"date\");if(S(t))return h(t)}var c,A=\"\",x=!1,C=[\"{\",\"}\"];return p(t)&&(x=!0,C=[\"[\",\"]\"]),E(t)&&(A=\" [Function\"+(t.name?\": \"+t.name:\"\")+\"]\"),v(t)&&(A=\" \"+RegExp.prototype.toString.call(t)),w(t)&&(A=\" \"+Date.prototype.toUTCString.call(t)),S(t)&&(A=\" \"+h(t)),0!==s.length||x&&0!=t.length?n__left_angle_mark_0?v(t)?e.stylize(RegExp.prototype.toString.call(t),\"regexp\"):e.stylize(\"[Object]\",\"special\"):(e.seen.push(t),c=x?function(e,t,r,n,i){for(var o=[],a=0,s=t.length;a__left_angle_mark_s;++a)R(t,String(a))?o.push(f(e,t,r,n,String(a),!0)):o.push(\"\");return i.forEach((function(i){i.match(/^\\d+$/)||o.push(f(e,t,r,n,i,!0))})),o}(e,t,n,l,s):s.map((function(r){return f(e,t,n,l,r,x)})),e.seen.pop(),function(e,t,r){return e.reduce((function(e,t){return t.indexOf(\"\\n\"),e+t.replace(/\\u001b\\[\\d\\d?m/g,\"\").length+1}),0)>60?r[0]+(\"\"===t?\"\":t+\"\\n \")+\" \"+e.join(\",\\n \")+\" \"+r[1]:r[0]+t+\" \"+e.join(\", \")+\" \"+r[1]}(c,A,C)):C[0]+A+C[1]}function h(e){return\"[\"+Error.prototype.toString.call(e)+\"]\"}function f(e,t,r,n,i,o){var a,s,l;if((l=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?s=l.set?e.stylize(\"[Getter/Setter]\",\"special\"):e.stylize(\"[Getter]\",\"special\"):l.set&&(s=e.stylize(\"[Setter]\",\"special\")),R(n,i)||(a=\"[\"+i+\"]\"),s||(e.seen.indexOf(l.value)__left_angle_mark_0?(s=g(r)?d(e,l.value,null):d(e,l.value,r-1)).indexOf(\"\\n\")>-1&&(s=o?s.split(\"\\n\").map((function(e){return\" \"+e})).join(\"\\n\").substr(2):\"\\n\"+s.split(\"\\n\").map((function(e){return\" \"+e})).join(\"\\n\")):s=e.stylize(\"[Circular]\",\"special\")),y(a)){if(o&&i.match(/^\\d+$/))return s;(a=JSON.stringify(\"\"+i)).match(/^\"([a-zA-Z_][a-zA-Z_0-9]*)\"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,\"name\")):(a=a.replace(/'/g,\"\\\\'\").replace(/\\\\\"/g,'\"').replace(/(^\"|\"$)/g,\"'\"),a=e.stylize(a,\"string\"))}return a+\": \"+s}function p(e){return Array.isArray(e)}function m(e){return\"boolean\"==typeof e}function g(e){return null===e}function _(e){return\"number\"==typeof e}function b(e){return\"string\"==typeof e}function y(e){return void 0===e}function v(e){return A(e)&&\"[object RegExp]\"===x(e)}function A(e){return\"object\"==typeof e&&null!==e}function w(e){return A(e)&&\"[object Date]\"===x(e)}function S(e){return A(e)&&(\"[object Error]\"===x(e)||e instanceof Error)}function E(e){return\"function\"==typeof e}function x(e){return Object.prototype.toString.call(e)}function C(e){return e__left_angle_mark_10?\"0\"+e.toString(10):e.toString(10)}r.debuglog=function(e){if(e=e.toUpperCase(),!o[e])if(a.test(e)){var n=t.pid;o[e]=function(){var t=r.format.apply(r,arguments);import_console_browserify.default.error(\"%s %d: %s\",e,n,t)}}else o[e]=function(){};return o[e]},r.inspect=l,l.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},l.styles={special:\"cyan\",number:\"yellow\",boolean:\"yellow\",undefined:\"grey\",null:\"bold\",string:\"green\",date:\"magenta\",regexp:\"red\"},r.types=e(\"./support/types\"),r.isArray=p,r.isBoolean=m,r.isNull=g,r.isNullOrUndefined=function(e){return null==e},r.isNumber=_,r.isString=b,r.isSymbol=function(e){return\"symbol\"==typeof e},r.isUndefined=y,r.isRegExp=v,r.types.isRegExp=v,r.isObject=A,r.isDate=w,r.types.isDate=w,r.isError=S,r.types.isNativeError=S,r.isFunction=E,r.isPrimitive=function(e){return null===e||\"boolean\"==typeof e||\"number\"==typeof e||\"string\"==typeof e||\"symbol\"==typeof e||void 0===e},r.isBuffer=e(\"./support/isBuffer\");var T=[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\"];function R(e,t){return Object.prototype.hasOwnProperty.call(e,t)}r.log=function(){var e,t;import_console_browserify.default.log(\"%s - %s\",(t=[C((e=new Date).getHours()),C(e.getMinutes()),C(e.getSeconds())].join(\":\"),[e.getDate(),T[e.getMonth()],t].join(\" \")),r.format.apply(r,arguments))},r.inherits=e(\"inherits\"),r._extend=function(e,t){if(!t||!A(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e};var I=\"undefined\"!=typeof Symbol?Symbol(\"util.promisify.custom\"):void 0;function k(e,t){if(!e){var r=new Error(\"Promise was rejected with a falsy value\");r.reason=e,e=r}return t(e)}r.promisify=function(e){if(\"function\"!=typeof e)throw new TypeError('The \"original\" argument must be of type Function');if(I&&e[I]){var t;if(\"function\"!=typeof(t=e[I]))throw new TypeError('The \"util.promisify.custom\" argument must be of type Function');return Object.defineProperty(t,I,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var t,r,n=new Promise((function(e,n){t=e,r=n})),i=[],o=0;o__left_angle_mark_arguments.length;o++)i.push(arguments[o]);i.push((function(e,n){e?r(e):t(n)}));try{e.apply(this,i)}catch(a){r(a)}return n}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),I&&Object.defineProperty(t,I,{value:t,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(t,n(e))},r.promisify.custom=I,r.callbackify=function(e){if(\"function\"!=typeof e)throw new TypeError('The \"original\" argument must be of type Function');function r(){for(var r=[],n=0;n__left_angle_mark_arguments.length;n++)r.push(arguments[n]);var i=r.pop();if(\"function\"!=typeof i)throw new TypeError(\"The last argument must be of type Function\");var o=this,a=function(){return i.apply(o,arguments)};e.apply(this,r).then((function(e){t.nextTick(a.bind(null,null,e))}),(function(e){t.nextTick(k.bind(null,e,a))}))}return Object.setPrototypeOf(r,Object.getPrototypeOf(e)),Object.defineProperties(r,n(e)),r}}).call(this)}).call(this,e(\"_process\"))},{\"./support/isBuffer\":79,\"./support/types\":80,_process:60,inherits:45}],82:[function(e,t,n){(function(r){(function(){var n=e(\"foreach\"),i=e(\"available-typed-arrays\"),o=e(\"es-abstract/helpers/callBound\"),a=o(\"Object.prototype.toString\"),s=e(\"has-symbols\")()&&\"symbol\"==typeof Symbol.toStringTag,l=i(),u=o(\"String.prototype.slice\"),c={},d=e(\"es-abstract/helpers/getOwnPropertyDescriptor\"),h=Object.getPrototypeOf;s&&d&&h&&n(l,(function(e){if(\"function\"==typeof r[e]){var t=new r[e];if(!(Symbol.toStringTag in t))throw new EvalError(\"this engine has support for Symbol.toStringTag, but \"+e+\" does not have the property! Please report this.\");var n=h(t),i=d(n,Symbol.toStringTag);if(!i){var o=h(n);i=d(o,Symbol.toStringTag)}c[e]=i.get}}));var f=e(\"is-typed-array\");t.exports=function(e){return!!f(e)&&(s?(t=e,r=!1,n(c,(function(e,n){if(!r)try{var i=e.call(t);i===n&&(r=i)}catch(o){}})),r):u(a(e),8,-1));var t,r}}).call(this)}).call(this,void 0!==r.g?r.g:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:{})},{\"available-typed-arrays\":27,\"es-abstract/helpers/callBound\":36,\"es-abstract/helpers/getOwnPropertyDescriptor\":37,foreach:39,\"has-symbols\":42,\"is-typed-array\":48}]},{},[20])(20)},4406:e=>{var t=e.exports={};t.nextTick=function(){var e=\"undefined\"!=typeof window&&window.setImmediate,t=\"undefined\"!=typeof window&&window.postMessage&&window.addEventListener;if(e)return function(e){return window.setImmediate(e)};if(t){var r=[];return window.addEventListener(\"message\",(function(e){var t=e.source;t!==window&&null!==t||\"process-tick\"!==e.data||(e.stopPropagation(),r.length>0&&r.shift()())}),!0),function(e){r.push(e),window.postMessage(\"process-tick\",\"*\")}}return function(e){setTimeout(e,0)}}(),t.title=\"browser\",t.browser=!0,t.env={},t.argv=[],t.binding=function(e){throw new Error(\"process.binding is not supported\")},t.cwd=function(){return\"/\"},t.chdir=function(e){throw new Error(\"process.chdir is not supported\")}},6197:(e,t,r)=>{var n=r(8834).lW;Object.defineProperty(t,\"__esModule\",{value:!0}),t.AbstractTokenizer=void 0;const i=r(4644);t.AbstractTokenizer=class{async readToken(e,t=this.position){const r=n.alloc(e.len);if(await this.readBuffer(r,{position:t})__left_angle_mark_e.len)throw new i.EndOfStreamError;return e.get(r,0)}async peekToken(e,t=this.position){const r=n.alloc(e.len);if(await this.peekBuffer(r,{position:t})__left_angle_mark_e.len)throw new i.EndOfStreamError;return e.get(r,0)}async readNumber(e){if(await this.readBuffer(this.numBuffer,{length:e.len})__left_angle_mark_e.len)throw new i.EndOfStreamError;return e.get(this.numBuffer,0)}async peekNumber(e){if(await this.peekBuffer(this.numBuffer,{length:e.len})__left_angle_mark_e.len)throw new i.EndOfStreamError;return e.get(this.numBuffer,0)}async ignore(e){if(void 0!==this.fileInfo.size){const t=this.fileInfo.size-this.position;if(e>t)return this.position+=t,t}return this.position+=e,e}async close(){}normalizeOptions(e,t){if(t&&void 0!==t.position&&t.position__left_angle_mark_this.position)throw new Error(\"`options.position` must be equal or greater than `tokenizer.position`\");return t?{mayBeLess:!0===t.mayBeLess,offset:t.offset?t.offset:0,length:t.length?t.length:e.length-(t.offset?t.offset:0),position:t.position?t.position:this.position}:{mayBeLess:!1,offset:0,length:e.length,position:this.position}}constructor(e){this.position=0,this.numBuffer=new Uint8Array(8),this.fileInfo=e||{}}}},932:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:!0}),t.BufferTokenizer=void 0;const n=r(4644),i=r(6197);class o extends i.AbstractTokenizer{async readBuffer(e,t){if(t&&t.position){if(t.position__left_angle_mark_this.position)throw new Error(\"`options.position` must be equal or greater than `tokenizer.position`\");this.position=t.position}const r=await this.peekBuffer(e,t);return this.position+=r,r}async peekBuffer(e,t){const r=this.normalizeOptions(e,t),i=Math.min(this.uint8Array.length-r.position,r.length);if(!r.mayBeLess&&i__left_angle_mark_r.length)throw new n.EndOfStreamError;return e.set(this.uint8Array.subarray(r.position,r.position+i),r.offset),i}async close(){}constructor(e,t){super(t),this.uint8Array=e,this.fileInfo.size=this.fileInfo.size?this.fileInfo.size:e.length}}t.BufferTokenizer=o},9425:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:!0}),t.fromFile=t.FileTokenizer=void 0;const n=r(6197),i=r(4644),o=r(5187);class a extends n.AbstractTokenizer{async readBuffer(e,t){const r=this.normalizeOptions(e,t);this.position=r.position;const n=await o.read(this.fd,e,r.offset,r.length,r.position);if(this.position+=n.bytesRead,n.bytesRead__left_angle_mark_r.length&&(!t||!t.mayBeLess))throw new i.EndOfStreamError;return n.bytesRead}async peekBuffer(e,t){const r=this.normalizeOptions(e,t),n=await o.read(this.fd,e,r.offset,r.length,r.position);if(!r.mayBeLess&&n.bytesRead__left_angle_mark_r.length)throw new i.EndOfStreamError;return n.bytesRead}async close(){return o.close(this.fd)}constructor(e,t){super(t),this.fd=e}}t.FileTokenizer=a,t.fromFile=async function(e){const t=await o.stat(e);if(!t.isFile)throw new Error(`File not a file: ${e}`);const r=await o.open(e,\"r\");return new a(r,{path:e,size:t.size})}},5187:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:!0}),t.readFile=t.writeFileSync=t.writeFile=t.read=t.open=t.close=t.stat=t.createReadStream=t.pathExists=void 0;const n=r(6777);t.pathExists=n.existsSync,t.createReadStream=n.createReadStream,t.stat=async function(e){return new Promise(((t,r)=>{n.stat(e,((e,n)=>{e?r(e):t(n)}))}))},t.close=async function(e){return new Promise(((t,r)=>{n.close(e,(e=>{e?r(e):t()}))}))},t.open=async function(e,t){return new Promise(((r,i)=>{n.open(e,t,((e,t)=>{e?i(e):r(t)}))}))},t.read=async function(e,t,r,i,o){return new Promise(((a,s)=>{n.read(e,t,r,i,o,((e,t,r)=>{e?s(e):a({bytesRead:t,buffer:r})}))}))},t.writeFile=async function(e,t){return new Promise(((r,i)=>{n.writeFile(e,t,(e=>{e?i(e):r()}))}))},t.writeFileSync=function(e,t){n.writeFileSync(e,t)},t.readFile=async function(e){return new Promise(((t,r)=>{n.readFile(e,((e,n)=>{e?r(e):t(n)}))}))}},8286:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:!0}),t.ReadStreamTokenizer=void 0;const n=r(6197),i=r(4644);class o extends n.AbstractTokenizer{async getFileInfo(){return this.fileInfo}async readBuffer(e,t){const r=this.normalizeOptions(e,t),n=r.position-this.position;if(n>0)return await this.ignore(n),this.readBuffer(e,t);if(n__left_angle_mark_0)throw new Error(\"`options.position` must be equal or greater than `tokenizer.position`\");if(0===r.length)return 0;const o=await this.streamReader.read(e,r.offset,r.length);if(this.position+=o,(!t||!t.mayBeLess)&&o__left_angle_mark_r.length)throw new i.EndOfStreamError;return o}async peekBuffer(e,t){const r=this.normalizeOptions(e,t);let n=0;if(r.position){const t=r.position-this.position;if(t>0){const i=new Uint8Array(r.length+t);return n=await this.peekBuffer(i,{mayBeLess:r.mayBeLess}),e.set(i.subarray(t),r.offset),n-t}if(t__left_angle_mark_0)throw new Error(\"Cannot peek from a negative offset in a stream\")}if(r.length>0){try{n=await this.streamReader.peek(e,r.offset,r.length)}catch(o){if(t&&t.mayBeLess&&o instanceof i.EndOfStreamError)return 0;throw o}if(!r.mayBeLess&&n__left_angle_mark_r.length)throw new i.EndOfStreamError}return n}async ignore(e){const t=Math.min(256e3,e),r=new Uint8Array(t);let n=0;for(;n__left_angle_mark_e;){const i=e-n,o=await this.readBuffer(r,{length:Math.min(t,i)});if(o__left_angle_mark_0)return o;n+=o}return n}constructor(e,t){super(t),this.streamReader=new i.StreamReader(e)}}t.ReadStreamTokenizer=o},7378:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:!0}),t.fromBuffer=t.fromStream=t.EndOfStreamError=void 0;const n=r(8286),i=r(932);var o=r(4644);Object.defineProperty(t,\"EndOfStreamError\",{enumerable:!0,get:function(){return o.EndOfStreamError}}),t.fromStream=function(e,t){return t=t||{},new n.ReadStreamTokenizer(e,t)},t.fromBuffer=function(e,t){return new i.BufferTokenizer(e,t)}},3569:(e,t,r)=>{Object.defineProperty(t,\"__esModule\",{value:!0}),t.fromStream=t.fromBuffer=t.EndOfStreamError=t.fromFile=void 0;const n=r(5187),i=r(7378);var o=r(9425);Object.defineProperty(t,\"fromFile\",{enumerable:!0,get:function(){return o.fromFile}});var a=r(7378);Object.defineProperty(t,\"EndOfStreamError\",{enumerable:!0,get:function(){return a.EndOfStreamError}}),Object.defineProperty(t,\"fromBuffer\",{enumerable:!0,get:function(){return a.fromBuffer}}),t.fromStream=async function(e,t){if(t=t||{},e.path){const r=await n.stat(e.path);t.path=e.path,t.size=r.size}return i.fromStream(e,t)}},643:(e,t)=>{var r=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&\"function\"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":typeof e};t.Ee=function(e,t,r,n,i,o){for(var s=arguments.length,l=Array(s>6?s-6:0),u=6;u__left_angle_mark_s;u++)l[u-6]=arguments[u];return l.length?a.call.apply(a,[null,!1,!0,e,t,r,n,i,o].concat(l)):a(!1,!0,e,t,r,n,i,o)};var n=\"INVALID_ARGS\";function i(e){var t=Object.keys(e);return Object.getOwnPropertySymbols?t.concat(Object.getOwnPropertySymbols(e)):t}function o(e){if(Array.isArray(e))return e.slice();for(var t=i(e),r={},n=0;n__left_angle_mark_t.length;n++){var o=t[n];r[o]=e[o]}return r}function a(e,t,r){var l=r;null==l&&function(e){throw new Error(e)}(n);for(var u=!1,c=arguments.length,d=Array(c>3?c-3:0),h=3;h__left_angle_mark_c;h++)d[h-3]=arguments[h];for(var f=0;f__left_angle_mark_d.length;f++){var p=d[f];if(null!=p){var m=i(p);if(m.length)for(var g=0;g__left_angle_mark_=m.length;g++){var _=m[g];if(!e||void 0===l[_]){var b=p[_];t&&s(l[_])&&s(b)&&(b=a(e,t,l[_],b)),void 0!==b&&b!==l[_]&&(u||(u=!0,l=o(l)),l[_]=b)}}}}return l}function s(e){var t=void 0===e?\"undefined\":r(e);return null!=e&&\"object\"===t}},5010:(e,t,r)=>{var n=r(8834).lW;Object.defineProperty(t,\"__esModule\",{value:!0}),t.AnsiStringType=t.StringType=t.BufferType=t.Uint8ArrayType=t.IgnoreType=t.Float80_LE=t.Float80_BE=t.Float64_LE=t.Float64_BE=t.Float32_LE=t.Float32_BE=t.Float16_LE=t.Float16_BE=t.INT64_BE=t.UINT64_BE=t.INT64_LE=t.UINT64_LE=t.INT32_LE=t.INT32_BE=t.INT24_BE=t.INT24_LE=t.INT16_LE=t.INT16_BE=t.INT8=t.UINT32_BE=t.UINT32_LE=t.UINT24_BE=t.UINT24_LE=t.UINT16_BE=t.UINT16_LE=t.UINT8=void 0;const i=r(2333);function o(e){return new DataView(e.buffer,e.byteOffset)}t.UINT8={len:1,get:(e,t)=>o(e).getUint8(t),put:(e,t,r)=>(o(e).setUint8(t,r),t+1)},t.UINT16_LE={len:2,get:(e,t)=>o(e).getUint16(t,!0),put:(e,t,r)=>(o(e).setUint16(t,r,!0),t+2)},t.UINT16_BE={len:2,get:(e,t)=>o(e).getUint16(t),put:(e,t,r)=>(o(e).setUint16(t,r),t+2)},t.UINT24_LE={len:3,get(e,t){const r=o(e);return r.getUint8(t)+(r.getUint16(t+1,!0)__left_angle_mark___left_angle_mark_8)},put(e,t,r){const n=o(e);return n.setUint8(t,255&r),n.setUint16(t+1,r>>8,!0),t+3}},t.UINT24_BE={len:3,get(e,t){const r=o(e);return(r.getUint16(t)__left_angle_mark___left_angle_mark_8)+r.getUint8(t+2)},put(e,t,r){const n=o(e);return n.setUint16(t,r>>8),n.setUint8(t+2,255&r),t+3}},t.UINT32_LE={len:4,get:(e,t)=>o(e).getUint32(t,!0),put:(e,t,r)=>(o(e).setUint32(t,r,!0),t+4)},t.UINT32_BE={len:4,get:(e,t)=>o(e).getUint32(t),put:(e,t,r)=>(o(e).setUint32(t,r),t+4)},t.INT8={len:1,get:(e,t)=>o(e).getInt8(t),put:(e,t,r)=>(o(e).setInt8(t,r),t+1)},t.INT16_BE={len:2,get:(e,t)=>o(e).getInt16(t),put:(e,t,r)=>(o(e).setInt16(t,r),t+2)},t.INT16_LE={len:2,get:(e,t)=>o(e).getInt16(t,!0),put:(e,t,r)=>(o(e).setInt16(t,r,!0),t+2)},t.INT24_LE={len:3,get(e,r){const n=t.UINT24_LE.get(e,r);return n>8388607?n-16777216:n},put(e,t,r){const n=o(e);return n.setUint8(t,255&r),n.setUint16(t+1,r>>8,!0),t+3}},t.INT24_BE={len:3,get(e,r){const n=t.UINT24_BE.get(e,r);return n>8388607?n-16777216:n},put(e,t,r){const n=o(e);return n.setUint16(t,r>>8),n.setUint8(t+2,255&r),t+3}},t.INT32_BE={len:4,get:(e,t)=>o(e).getInt32(t),put:(e,t,r)=>(o(e).setInt32(t,r),t+4)},t.INT32_LE={len:4,get:(e,t)=>o(e).getInt32(t,!0),put:(e,t,r)=>(o(e).setInt32(t,r,!0),t+4)},t.UINT64_LE={len:8,get:(e,t)=>o(e).getBigUint64(t,!0),put:(e,t,r)=>(o(e).setBigUint64(t,r,!0),t+8)},t.INT64_LE={len:8,get:(e,t)=>o(e).getBigInt64(t,!0),put:(e,t,r)=>(o(e).setBigInt64(t,r,!0),t+8)},t.UINT64_BE={len:8,get:(e,t)=>o(e).getBigUint64(t),put:(e,t,r)=>(o(e).setBigUint64(t,r),t+8)},t.INT64_BE={len:8,get:(e,t)=>o(e).getBigInt64(t),put:(e,t,r)=>(o(e).setBigInt64(t,r),t+8)},t.Float16_BE={len:2,get(e,t){return i.read(e,t,!1,10,this.len)},put(e,t,r){return i.write(e,r,t,!1,10,this.len),t+this.len}},t.Float16_LE={len:2,get(e,t){return i.read(e,t,!0,10,this.len)},put(e,t,r){return i.write(e,r,t,!0,10,this.len),t+this.len}},t.Float32_BE={len:4,get:(e,t)=>o(e).getFloat32(t),put:(e,t,r)=>(o(e).setFloat32(t,r),t+4)},t.Float32_LE={len:4,get:(e,t)=>o(e).getFloat32(t,!0),put:(e,t,r)=>(o(e).setFloat32(t,r,!0),t+4)},t.Float64_BE={len:8,get:(e,t)=>o(e).getFloat64(t),put:(e,t,r)=>(o(e).setFloat64(t,r),t+8)},t.Float64_LE={len:8,get:(e,t)=>o(e).getFloat64(t,!0),put:(e,t,r)=>(o(e).setFloat64(t,r,!0),t+8)},t.Float80_BE={len:10,get(e,t){return i.read(e,t,!1,63,this.len)},put(e,t,r){return i.write(e,r,t,!1,63,this.len),t+this.len}},t.Float80_LE={len:10,get(e,t){return i.read(e,t,!0,63,this.len)},put(e,t,r){return i.write(e,r,t,!0,63,this.len),t+this.len}},t.IgnoreType=class{get(e,t){}constructor(e){this.len=e}},t.Uint8ArrayType=class{get(e,t){return e.subarray(t,t+this.len)}constructor(e){this.len=e}},t.BufferType=class{get(e,t){return n.from(e.subarray(t,t+this.len))}constructor(e){this.len=e}},t.StringType=class{get(e,t){return n.from(e).toString(this.encoding,t,t+this.len)}constructor(e,t){this.len=e,this.encoding=t}};class a{static decode(e,t,r){let n=\"\";for(let i=t;i__left_angle_mark_r;++i)n+=a.codePointToString(a.singleByteDecoder(e[i]));return n}static inRange(e,t,r){return t__left_angle_mark_=e&&e__left_angle_mark_=r}static codePointToString(e){return e__left_angle_mark_=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10),56320+(1023&e)))}static singleByteDecoder(e){if(a.inRange(e,0,127))return e;const t=a.windows1252[e-128];if(null===t)throw Error(\"invaliding encoding\");return t}get(e,t=0){return a.decode(e,t,t+this.len)}constructor(e){this.len=e}}t.AnsiStringType=a,a.windows1252=[8364,129,8218,402,8222,8230,8224,8225,710,8240,352,8249,338,141,381,143,144,8216,8217,8220,8221,8226,8211,8212,732,8482,353,8250,339,157,382,376,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255]},311:(e,t)=>{(t=e.exports=function(e){return e.replace(/^\\s*|\\s*$/g,\"\")}).left=function(e){return e.replace(/^\\s*/,\"\")},t.right=function(e){return e.replace(/\\s*$/,\"\")}},9299:(e,t,r)=>{var n=r(4406);!function(){var t,i,o,a,s,l,u,c,d,h,f,p,m,g,_,b,y,v={};function A(){void 0===n&&import_console_browserify.default.log.apply(import_console_browserify.default,arguments)}e.exports=v,t=v,i=r(2845),function(){var e=function(){function e(e){this.message=\"JPEG error: \"+e}return e.prototype=new Error,e.prototype.name=\"JpegError\",e.constructor=e,e}(),r=function(){var t=new Uint8Array([0,1,8,16,9,2,3,10,17,24,32,25,18,11,4,5,12,19,26,33,40,48,41,34,27,20,13,6,7,14,21,28,35,42,49,56,57,50,43,36,29,22,15,23,30,37,44,51,58,59,52,45,38,31,39,46,53,60,61,54,47,55,62,63]),r=4017,i=799,o=3406,a=2276,s=1567,l=3784,u=5793,c=2896;function d(e){null==e&&(e={}),null==e.w&&(e.w=-1),this.V=e.n,this.N=e.w}function h(e,t){for(var r,n,i,o=0,a=[],s=16;s>0&&!e[s-1];)s--;a.push({children:[],index:0});var l=a[0];for(r=0;r__left_angle_mark_s;r++){for(n=0;n__left_angle_mark_e[r];n++){for((l=a.pop()).children[l.index]=t[o];l.index>0;)l=a.pop();for(l.index++,a.push(l);a.length__left_angle_mark_=r;)a.push(i={children:[],index:0}),l.children[l.index]=i.children,l=i;o++}r+1__left_angle_mark_s&&(a.push(i={children:[],index:0}),l.children[l.index]=i.children,l=i)}return a[0].children}function f(e,t,r){return 64*((e.P+1)*t+r)}function p(r,i,o,a,s,l,u,c,d,h){null==h&&(h=!1);var p,m,g,b,y,v,A,w,S,E,x,C=o.m,T=o.Z,R=i,I=0,k=0,P=0,M=0,O=0,B=0;function N(){if(k>0)return k--,I>>k&1;if(255===(I=r[i++])){var t=r[i++];if(t){if(220===t&&h){var a=n(r,i+=2);if(i+=2,a>0&&a!==o.s)throw new DNLMarkerError(\"Found DNL marker (0xFFDC) while parsing scan data\",a)}else if(217===t){if(h){var s=8*O;if(s>0&&s__left_angle_mark_o.s/10)throw new DNLMarkerError(\"Found EOI marker (0xFFD9) while parsing scan data, possibly caused by incorrect `scanLines` parameter\",s)}throw new EOIMarkerError(\"Found EOI marker (0xFFD9) while parsing scan data\")}throw new e(\"unexpected marker\")}}return k=7,I>>>7}function j(t){for(var r=t;;){switch(typeof(r=r[N()])){case\"number\":return r;case\"object\":continue}throw new e(\"invalid huffman sequence\")}}function L(e){for(var t=0;e>0;)t=t__left_angle_mark___left_angle_mark_1|N(),e--;return t}function D(e){if(1===e)return 1===N()?1:-1;var t=L(e);return t>=1__left_angle_mark___left_angle_mark_e-1?t:t+(-1__left_angle_mark___left_angle_mark_e)+1}function F(e,t,r,n,i){var o=r%C;O=(r/C|0)*e.A+n;var a=o*e.h+i;t(e,f(e,O,a))}function U(e,t,r){O=r/e.P|0;var n=r%e.P;t(e,f(e,O,n))}var z=a.length;for(A=T?0===l?0===c?function(e,t){var r=j(e.J),n=0===r?0:D(r)__left_angle_mark___left_angle_mark_d;e.D[t]=e.Q+=n}:function(e,t){e.D[t]|=N()__left_angle_mark___left_angle_mark_d}:0===c?function(e,r){if(P>0)P--;else for(var n=l,i=u;n__left_angle_mark_=i;){var o=j(e.i),a=15&o,s=o>>4;if(0!==a){var c=t[n+=s];e.D[r+c]=D(a)*(1__left_angle_mark___left_angle_mark_d),n++}else{if(s__left_angle_mark_15){P=L(s)+(1__left_angle_mark___left_angle_mark_s)-1;break}n+=16}}}:function(r,n){for(var i,o,a=l,s=u,c=0;a__left_angle_mark_=s;){var h=n+t[a],f=r.D[h]__left_angle_mark_0?-1:1;switch(M){case 0:if(c=(o=j(r.i))>>4,0==(i=15&o))c__left_angle_mark_15?(P=L(c)+(1__left_angle_mark___left_angle_mark_c),M=4):(c=16,M=1);else{if(1!==i)throw new e(\"invalid ACn encoding\");p=D(i),M=c?2:3}continue;case 1:case 2:r.D[h]?r.D[h]+=f*(N()__left_angle_mark___left_angle_mark_d):0==--c&&(M=2===M?3:0);break;case 3:r.D[h]?r.D[h]+=f*(N()__left_angle_mark___left_angle_mark_d):(r.D[h]=p__left_angle_mark___left_angle_mark_d,M=0);break;case 4:r.D[h]&&(r.D[h]+=f*(N()__left_angle_mark___left_angle_mark_d))}a++}4===M&&0==--P&&(M=0)}:function(e,r){var n=j(e.J),i=0===n?0:D(n),o=1;for(e.D[r]=e.Q+=i;o__left_angle_mark_64;){var a=j(e.i),s=15&a,l=a>>4;if(0!==s){var u=t[o+=l];e.D[r+u]=D(s),o++}else{if(l__left_angle_mark_15)break;o+=16}}},S=1===z?a[0].P*a[0].c:C*o.R;B__left_angle_mark_=S;){var q=s?Math.min(S-B,s):S;if(q>0){for(g=0;g__left_angle_mark_z;g++)a[g].Q=0;if(P=0,1===z)for(m=a[0],v=0;v__left_angle_mark_q;v++)U(m,A,B),B++;else for(v=0;v__left_angle_mark_q;v++){for(g=0;g__left_angle_mark_z;g++)for(E=(m=a[g]).h,x=m.A,b=0;b__left_angle_mark_x;b++)for(y=0;y__left_angle_mark_E;y++)F(m,A,B,b,y);B++}}if(k=0,!(w=_(r,i)))break;if(w.u&&(i=w.offset),!(w.M>=65488&&w.M__left_angle_mark_=65495))break;i+=2}return i-R}function m(t,n,d){var h,f,p,m,g,_,b,y,v,A,w,S,E,x,C,T,R,I=t.$,k=t.D;if(!I)throw new e(\"missing required Quantization Table.\");for(var P=0;P__left_angle_mark_64;P+=8)v=k[n+P],A=k[n+P+1],w=k[n+P+2],S=k[n+P+3],E=k[n+P+4],x=k[n+P+5],C=k[n+P+6],T=k[n+P+7],v*=I[P],A|w|S|E|x|C|T?(A*=I[P+1],w*=I[P+2],S*=I[P+3],E*=I[P+4],x*=I[P+5],C*=I[P+6],T*=I[P+7],f=(h=(h=u*v+128>>8)+(f=u*E+128>>8)+1>>1)-f,R=(p=w)*l+(m=C)*s+128>>8,p=p*s-m*l+128>>8,b=(g=(g=c*(A-T)+128>>8)+(b=x__left_angle_mark___left_angle_mark_4)+1>>1)-b,_=(y=(y=c*(A+T)+128>>8)+(_=S__left_angle_mark___left_angle_mark_4)+1>>1)-_,m=(h=h+(m=R)+1>>1)-m,p=(f=f+p+1>>1)-p,R=g*a+y*o+2048>>12,g=g*o-y*a+2048>>12,y=R,R=_*i+b*r+2048>>12,_=_*r-b*i+2048>>12,b=R,d[P]=h+y,d[P+7]=h-y,d[P+1]=f+b,d[P+6]=f-b,d[P+2]=p+_,d[P+5]=p-_,d[P+3]=m+g,d[P+4]=m-g):(R=u*v+512>>10,d[P]=R,d[P+1]=R,d[P+2]=R,d[P+3]=R,d[P+4]=R,d[P+5]=R,d[P+6]=R,d[P+7]=R);for(var M=0;M__left_angle_mark_8;++M)v=d[M],(A=d[M+8])|(w=d[M+16])|(S=d[M+24])|(E=d[M+32])|(x=d[M+40])|(C=d[M+48])|(T=d[M+56])?(f=(h=4112+((h=u*v+2048>>12)+(f=u*E+2048>>12)+1>>1))-f,R=(p=w)*l+(m=C)*s+2048>>12,p=p*s-m*l+2048>>12,m=R,b=(g=(g=c*(A-T)+2048>>12)+(b=x)+1>>1)-b,_=(y=(y=c*(A+T)+2048>>12)+(_=S)+1>>1)-_,R=g*a+y*o+2048>>12,g=g*o-y*a+2048>>12,y=R,R=_*i+b*r+2048>>12,_=_*r-b*i+2048>>12,(v=(h=h+m+1>>1)+y)__left_angle_mark_16?v=0:v>=4080?v=255:v>>=4,(A=(f=f+p+1>>1)+(b=R))__left_angle_mark_16?A=0:A>=4080?A=255:A>>=4,(w=(p=f-p)+_)__left_angle_mark_16?w=0:w>=4080?w=255:w>>=4,(S=(m=h-m)+g)__left_angle_mark_16?S=0:S>=4080?S=255:S>>=4,(E=m-g)__left_angle_mark_16?E=0:E>=4080?E=255:E>>=4,(x=p-_)__left_angle_mark_16?x=0:x>=4080?x=255:x>>=4,(C=f-b)__left_angle_mark_16?C=0:C>=4080?C=255:C>>=4,(T=h-y)__left_angle_mark_16?T=0:T>=4080?T=255:T>>=4,k[n+M]=v,k[n+M+8]=A,k[n+M+16]=w,k[n+M+24]=S,k[n+M+32]=E,k[n+M+40]=x,k[n+M+48]=C,k[n+M+56]=T):(R=(R=u*v+8192>>14)__left_angle_mark_-2040?0:R>=2024?255:R+2056>>4,k[n+M]=R,k[n+M+8]=R,k[n+M+16]=R,k[n+M+24]=R,k[n+M+32]=R,k[n+M+40]=R,k[n+M+48]=R,k[n+M+56]=R)}function g(e,t){for(var r=t.P,n=t.c,i=new Int16Array(64),o=0;o__left_angle_mark_n;o++)for(var a=0;a__left_angle_mark_r;a++)m(t,f(t,o,a),i);return t.D}function _(e,t,r){null==r&&(r=t);var i=e.length-1,o=r__left_angle_mark_t?r:t;if(t>=i)return null;var a=n(e,t);if(a>=65472&&a__left_angle_mark_=65534)return{u:null,M:a,offset:t};for(var s=n(e,o);!(s>=65472&&s__left_angle_mark_=65534);){if(++o>=i)return null;s=n(e,o)}return{u:a.toString(16),M:s,offset:o}}return d.prototype={parse(r,i){null==i&&(i={});var o,a,s=i.F,l=0,u=null,c=null,d=0;function f(){var e=n(r,l),t=(l+=2)+e-2,i=_(r,t,l);i&&i.u&&(t=i.offset);var o=r.subarray(l,t);return l+=o.length,o}function m(e){for(var t=Math.ceil(e.o/8/e.X),r=Math.ceil(e.s/8/e.B),n=0;n__left_angle_mark_e.W.length;n++){q=e.W[n];var i=Math.ceil(Math.ceil(e.o/8)*q.h/e.X),o=Math.ceil(Math.ceil(e.s/8)*q.A/e.B),a=t*q.h,s=r*q.A*64*(a+1);q.D=new Int16Array(s),q.P=i,q.c=o}e.m=t,e.R=r}var b=[],y=[],v=[],A=n(r,l);if(l+=2,65496!==A)throw new e(\"SOI not found\");A=n(r,l),l+=2;e:for(;65497!==A;){var w,S,E;switch(A){case 65504:case 65505:case 65506:case 65507:case 65508:case 65509:case 65510:case 65511:case 65512:case 65513:case 65514:case 65515:case 65516:case 65517:case 65518:case 65519:case 65534:var x=f();65504===A&&74===x[0]&&70===x[1]&&73===x[2]&&70===x[3]&&0===x[4]&&(u={version:{d:x[5],T:x[6]},K:x[7],j:x[8]__left_angle_mark___left_angle_mark_8|x[9],H:x[10]__left_angle_mark___left_angle_mark_8|x[11],S:x[12],I:x[13],C:x.subarray(14,14+3*x[12]*x[13])}),65518===A&&65===x[0]&&100===x[1]&&111===x[2]&&98===x[3]&&101===x[4]&&(c={version:x[5]__left_angle_mark___left_angle_mark_8|x[6],k:x[7]__left_angle_mark___left_angle_mark_8|x[8],q:x[9]__left_angle_mark___left_angle_mark_8|x[10],a:x[11]});break;case 65499:for(var C=n(r,l)+(l+=2)-2;l__left_angle_mark_C;){var T=r[l++],R=new Uint16Array(64);if(T>>4){if(T>>4!=1)throw new e(\"DQT - invalid table spec\");for(S=0;S__left_angle_mark_64;S++)R[t[S]]=n(r,l),l+=2}else for(S=0;S__left_angle_mark_64;S++)R[t[S]]=r[l++];b[15&T]=R}break;case 65472:case 65473:case 65474:if(o)throw new e(\"Only single frame JPEGs supported\");l+=2,(o={}).G=65473===A,o.Z=65474===A,o.precision=r[l++];var I,k=n(r,l),P=0,M=0;l+=2,o.s=s||k,o.o=n(r,l),l+=2,o.W=[],o._={};var O=r[l++];for(w=0;w__left_angle_mark_O;w++){I=r[l];var B=r[l+1]>>4,N=15&r[l+1];P__left_angle_mark_B&&(P=B),M__left_angle_mark_N&&(M=N);var j=r[l+2];E=o.W.push({h:B,A:N,L:j,$:null}),o._[I]=E-1,l+=3}o.X=P,o.B=M,m(o);break;case 65476:var L=n(r,l);for(l+=2,w=2;w__left_angle_mark_L;){var D=r[l++],F=new Uint8Array(16),U=0;for(S=0;S__left_angle_mark_16;S++,l++)U+=F[S]=r[l];var z=new Uint8Array(U);for(S=0;S__left_angle_mark_U;S++,l++)z[S]=r[l];w+=17+U,(D>>4?y:v)[15&D]=h(F,z)}break;case 65501:a=n(r,l+=2),l+=2;break;case 65498:var q,G=1==++d&&!s;l+=2;var H=r[l++],W=[];for(w=0;w__left_angle_mark_H;w++){var V=r[l++],$=o._[V];(q=o.W[$]).index=V;var K=r[l++];q.J=v[K>>4],q.i=y[15&K],W.push(q)}var X=r[l++],Y=r[l++],J=r[l++];try{var Q=p(r,l,o,W,a,X,Y,J>>4,15&J,G);l+=Q}catch(te){if(te instanceof DNLMarkerError)return this.parse(r,{F:te.s});if(te instanceof EOIMarkerError)break e;throw te}break;case 65500:l+=4;break;case 65535:255!==r[l]&&l--;break;default:var Z=_(r,l-2,l-3);if(Z&&Z.u){l=Z.offset;break}if(l>=r.length-1)break e;throw new e(\"JpegImage.parse - unknown marker: \"+A.toString(16))}A=n(r,l),l+=2}for(this.width=o.o,this.height=o.s,this.g=u,this.b=c,this.W=[],w=0;w__left_angle_mark_o.W.length;w++){var ee=b[(q=o.W[w]).L];ee&&(q.$=ee),this.W.push({index:q.index,e:g(0,q),l:q.h/o.X,t:q.A/o.B,P:q.P,c:q.c})}this.p=this.W.length},Y(e,t,r){null==r&&(r=!1);var n,i,o,a,s,l,u,c,d,h,f,p,m=this.width/e,g=this.height/t,_=0,b=this.W.length,y=e*t*b,v=new Uint8ClampedArray(y),A=new Uint32Array(e),w=4294967288;for(u=0;u__left_angle_mark_b;u++){if(i=(n=this.W[u]).l*m,o=n.t*g,_=u,f=n.e,a=n.P+1__left_angle_mark___left_angle_mark_3,i!==p){for(s=0;s__left_angle_mark_e;s++)c=0|s*i,A[s]=(c&w)__left_angle_mark___left_angle_mark_3|7&c;p=i}for(l=0;l__left_angle_mark_t;l++)for(h=a*((c=0|l*o)&w)|(7&c)__left_angle_mark___left_angle_mark_3,s=0;s__left_angle_mark_e;s++)v[_]=f[h+A[s]],_+=b}var S=this.V;if(r||4!==b||S||(S=new Int32Array([-256,255,-256,255,-256,255,-256,255])),S)for(u=0;u__left_angle_mark_y;)for(c=0,d=0;c__left_angle_mark_b;c++,u++,d+=2)v[u]=(v[u]*S[d]>>8)+S[d+1];return v},get f(){return this.b?!!this.b.a:3===this.p?0!==this.N&&(82!==this.W[0].index||71!==this.W[1].index||66!==this.W[2].index):1===this.N},z:function(e){for(var t,r,n,i=0,o=e.length;i__left_angle_mark_o;i+=3)t=e[i],r=e[i+1],n=e[i+2],e[i]=t-179.456+1.402*n,e[i+1]=t+135.459-.344*r-.714*n,e[i+2]=t-226.816+1.772*r;return e},O:function(e){for(var t,r,n,i,o=0,a=0,s=e.length;a__left_angle_mark_s;a+=4)t=e[a],r=e[a+1],n=e[a+2],i=e[a+3],e[o++]=r*(-660635669420364e-19*r+.000437130475926232*n-54080610064599e-18*t+.00048449797120281*i-.154362151871126)-122.67195406894+n*(-.000957964378445773*n+.000817076911346625*t-.00477271405408747*i+1.53380253221734)+t*(.000961250184130688*t-.00266257332283933*i+.48357088451265)+i*(-.000336197177618394*i+.484791561490776),e[o++]=107.268039397724+r*(219927104525741e-19*r-.000640992018297945*n+.000659397001245577*t+.000426105652938837*i-.176491792462875)+n*(-.000778269941513683*n+.00130872261408275*t+.000770482631801132*i-.151051492775562)+t*(.00126935368114843*t-.00265090189010898*i+.25802910206845)+i*(-.000318913117588328*i-.213742400323665),e[o++]=r*(-.000570115196973677*r-263409051004589e-19*n+.0020741088115012*t-.00288260236853442*i+.814272968359295)-20.810012546947+n*(-153496057440975e-19*n-.000132689043961446*t+.000560833691242812*i-.195152027534049)+t*(.00174418132927582*t-.00255243321439347*i+.116935020465145)+i*(-.000343531996510555*i+.24165260232407);return e.subarray(0,o)},r:function(e){for(var t,r,n,i=0,o=e.length;i__left_angle_mark_o;i+=4)t=e[i],r=e[i+1],n=e[i+2],e[i]=434.456-t-1.402*n,e[i+1]=119.541-t+.344*r+.714*n,e[i+2]=481.816-t-1.772*r;return e},U:function(e){for(var t,r,n,i,o=0,a=0,s=e.length;a__left_angle_mark_s;a+=4)t=e[a],r=e[a+1],n=e[a+2],i=e[a+3],e[o++]=255+t*(-6747147073602441e-20*t+.0008379262121013727*r+.0002894718188643294*n+.003264231057537806*i-1.1185611867203937)+r*(26374107616089405e-21*r-8626949158638572e-20*n-.0002748769067499491*i-.02155688794978967)+n*(-3878099212869363e-20*n-.0003267808279485286*i+.0686742238595345)-i*(.0003361971776183937*i+.7430659151342254),e[o++]=255+t*(.00013596372813588848*t+.000924537132573585*r+.00010567359618683593*n+.0004791864687436512*i-.3109689587515875)+r*(-.00023545346108370344*r+.0002702845253534714*n+.0020200308977307156*i-.7488052167015494)+n*(6834815998235662e-20*n+.00015168452363460973*i-.09751927774728933)-i*(.0003189131175883281*i+.7364883807733168),e[o++]=255+t*(13598650411385307e-21*t+.00012423956175490851*r+.0004751985097583589*n-36729317476630422e-22*i-.05562186980264034)+r*(.00016141380598724676*r+.0009692239130725186*n+.0007782692450036253*i-.44015232367526463)+n*(5.068882914068769e-7*n+.0017778369011375071*i-.7591454649749609)-i*(.0003435319965105553*i+.7063770186160144);return e.subarray(0,o)},getData:function(t){var r=t.width,n=t.height,i=t.forceRGB,o=t.isSourcePDF;if(this.p>4)throw new e(\"Unsupported color mode\");var a=this.Y(r,n,o);if(1===this.p&&i){for(var s=a.length,l=new Uint8ClampedArray(3*s),u=0,c=0;c__left_angle_mark_s;c++){var d=a[c];l[u++]=d,l[u++]=d,l[u++]=d}return l}if(3===this.p&&this.f)return this.z(a);if(4===this.p){if(this.f)return i?this.O(a):this.r(a);if(i)return this.U(a)}return a}},d}();function n(e,t){return e[t]__left_angle_mark___left_angle_mark_8|e[t+1]}t.JpegDecoder=r}(),t.encodeImage=function(e,r,n,i){var o={t256:[r],t257:[n],t258:[8,8,8,8],t259:[1],t262:[2],t273:[1e3],t277:[4],t278:[n],t279:[r*n*4],t282:[[72,1]],t283:[[72,1]],t284:[1],t286:[[0,1]],t287:[[0,1]],t296:[1],t305:[\"Photopea (UTIF.js)\"],t338:[1]};if(i)for(var a in i)o[a]=i[a];var s=new Uint8Array(t.encode([o])),l=new Uint8Array(e),u=new Uint8Array(1e3+r*n*4);for(a=0;a__left_angle_mark_s.length;a++)u[a]=s[a];for(a=0;a__left_angle_mark_l.length;a++)u[1e3+a]=l[a];return u.buffer},t.encode=function(e){var r=new Uint8Array(2e4),n=4,i=t._binBE;r[0]=r[1]=77,i.writeUshort(r,2,42);var o=8;i.writeUint(r,n,o),n+=4;for(var a=0;a__left_angle_mark_e.length;a++){var s=t._writeIFD(i,t._types.basic,r,o,e[a]);o=s[1],a__left_angle_mark_e.length-1&&(!!(3&o)&&(o+=4-(3&o)),i.writeUint(r,s[0],o))}return r.slice(0,o).buffer},t.decode=function(e,r){null==r&&(r={parseMN:!0,debug:!1});var n=new Uint8Array(e),i=0,o=t._binBE.readASCII(n,i,2);i+=2;var a=\"II\"==o?t._binLE:t._binBE;a.readUshort(n,i),i+=2;var s=a.readUint(n,i);i+=4;for(var l=[];;){var u=a.readUshort(n,s),c=a.readUshort(n,s+4);if(0!=u&&(c__left_angle_mark_1||13__left_angle_mark_c)){A(\"error in TIFF\");break}if(t._readIFD(a,n,s,l,0,r),0==(s=a.readUint(n,s+2+12*u)))break}return l},t.decodeImage=function(e,r,n){if(!r.data){var i=new Uint8Array(e),o=t._binBE.readASCII(i,0,2);if(null!=r.t256){r.isLE=\"II\"==o,r.width=r.t256[0],r.height=r.t257[0];var a,s=r.t259?r.t259[0]:1,l=r.t266?r.t266[0]:1;r.t284&&2==r.t284[0]&&A(\"PlanarConfiguration 2 should not be used!\"),7==s&&r.t258&&r.t258.length>3&&(r.t258=r.t258.slice(0,3)),a=r.t258?Math.min(32,r.t258[0])*r.t258.length:r.t277?r.t277[0]:1,1==s&&null!=r.t279&&r.t278&&32803==r.t262[0]&&(a=Math.round(8*r.t279[0]/(r.width*r.t278[0]))),r.t50885&&4==r.t50885[0]&&(a=3*r.t258[0]);var u=8*Math.ceil(r.width*a/8),c=r.t273;(null==c||r.t322)&&(c=r.t324);var d=r.t279;1==s&&1==c.length&&(d=[r.height*(u>>>3)]),(null==d||r.t322)&&(d=r.t325);var h=new Uint8Array(r.height*(u>>>3)),f=0;if(null!=r.t322){var p=r.t322[0],m=r.t323[0],g=Math.floor((r.width+p-1)/p),_=Math.floor((r.height+m-1)/m),b=new Uint8Array(0|Math.ceil(p*m*a/8));import_console_browserify.default.log(\"====\",g,_);for(var y=0;y__left_angle_mark__;y++)for(var v=0;v__left_angle_mark_g;v++){var w=y*g+v;b.fill(0),t.decode._decompress(r,n,i,c[w],d[w],s,b,0,l),6==s?h=b:t._copyTile(b,0|Math.ceil(p*a/8),m,h,0|Math.ceil(r.width*a/8),r.height,0|Math.ceil(v*p*a/8),y*m)}f=8*h.length}else{var S=r.t278?r.t278[0]:r.height;for(S=Math.min(S,r.height),import_console_browserify.default.log(\"====\",r.width,S),w=0;w__left_angle_mark_c.length;w++)t.decode._decompress(r,n,i,c[w],d[w],s,h,0|Math.ceil(f/8),l),f+=u*S;f=Math.min(f,8*h.length)}r.data=new Uint8Array(h.buffer,0,0|Math.ceil(f/8))}}},t.decode._decompress=function(e,r,n,o,a,s,l,u,c){if(1==s)for(var d=0;d__left_angle_mark_a;d++)l[u+d]=n[o+d];else if(2==s)t.decode._decodeG2(n,o,a,l,u,e.width,c);else if(3==s)t.decode._decodeG3(n,o,a,l,u,e.width,c,!(!e.t292||1&~e.t292[0]));else if(4==s)t.decode._decodeG4(n,o,a,l,u,e.width,c);else if(5==s)t.decode._decodeLZW(n,o,a,l,u,8);else if(6==s)t.decode._decodeOldJPEG(e,n,o,a,l,u);else if(7==s||34892==s)t.decode._decodeNewJPEG(e,n,o,a,l,u);else if(8==s||32946==s)for(var h=new Uint8Array(n.buffer,o,a),f=i.inflate(h),p=0;p__left_angle_mark_f.length;p++)l[u+p]=f[p];else 9==s?t.decode._decodeVC5(n,o,a,l,u):32767==s?t.decode._decodeARW(e,n,o,a,l,u):32773==s?t.decode._decodePackBits(n,o,a,l,u):32809==s?t.decode._decodeThunder(n,o,a,l,u):34713==s?t.decode._decodeNikon(e,r,n,o,a,l,u):34676==s?t.decode._decodeLogLuv32(e,n,o,a,l,u):A(\"Unknown compression\",s);var m=e.t258?Math.min(32,e.t258[0]):1,g=e.t277?e.t277[0]:1,_=m*g>>>3,b=e.t278?e.t278[0]:e.height,y=Math.ceil(m*g*e.width/8);if(16==m&&!e.isLE&&null==e.t33422)for(var v=0;v__left_angle_mark_b;v++)for(var w=u+v*y,S=1;S__left_angle_mark_y;S+=2){var E=l[w+S];l[w+S]=l[w+S-1],l[w+S-1]=E}if(e.t317&&2==e.t317[0])for(v=0;v__left_angle_mark_b;v++){var x=u+v*y;if(16==m)for(d=_;d__left_angle_mark_y;d+=2){var C=(l[x+d+1]__left_angle_mark___left_angle_mark_8|l[x+d])+(l[x+d-_+1]__left_angle_mark___left_angle_mark_8|l[x+d-_]);l[x+d]=255&C,l[x+d+1]=C>>>8&255}else if(3==g)for(d=3;d__left_angle_mark_y;d+=3)l[x+d]=l[x+d]+l[x+d-3]&255,l[x+d+1]=l[x+d+1]+l[x+d-2]&255,l[x+d+2]=l[x+d+2]+l[x+d-1]&255;else for(d=_;d__left_angle_mark_y;d++)l[x+d]=l[x+d]+l[x+d-_]&255}},t.decode._decodeVC5=t.decode._decodeVC5=function(){var e,r,n,i=[1,0,1,0,2,2,1,1,3,7,1,2,5,25,1,3,6,48,1,4,6,54,1,5,7,111,1,8,7,99,1,6,7,105,12,0,7,107,1,7,8,209,20,0,8,212,1,9,8,220,1,10,9,393,1,11,9,394,32,0,9,416,1,12,9,427,1,13,10,887,1,18,10,784,1,14,10,790,1,15,10,835,60,0,10,852,1,16,10,885,1,17,11,1571,1,19,11,1668,1,20,11,1669,100,0,11,1707,1,21,11,1772,1,22,12,3547,1,29,12,3164,1,24,12,3166,1,25,12,3140,1,23,12,3413,1,26,12,3537,1,27,12,3539,1,28,13,7093,1,35,13,6283,1,30,13,6331,1,31,13,6335,180,0,13,6824,1,32,13,7072,1,33,13,7077,320,0,13,7076,1,34,14,12565,1,36,14,12661,1,37,14,12669,1,38,14,13651,1,39,14,14184,1,40,15,28295,1,46,15,28371,1,47,15,25320,1,42,15,25336,1,43,15,25128,1,41,15,27300,1,44,15,28293,1,45,16,50259,1,48,16,50643,1,49,16,50675,1,50,16,56740,1,53,16,56584,1,51,16,56588,1,52,17,113483,1,61,17,113482,1,60,17,101285,1,55,17,101349,1,56,17,109205,1,57,17,109207,1,58,17,100516,1,54,17,113171,1,59,18,202568,1,62,18,202696,1,63,18,218408,1,64,18,218412,1,65,18,226340,1,66,18,226356,1,67,18,226358,1,68,19,402068,1,69,19,405138,1,70,19,405394,1,71,19,436818,1,72,19,436826,1,73,19,452714,1,75,19,452718,1,76,19,452682,1,74,20,804138,1,77,20,810279,1,78,20,810790,1,79,20,873638,1,80,20,873654,1,81,20,905366,1,82,20,905430,1,83,20,905438,1,84,21,1608278,1,85,21,1620557,1,86,21,1621582,1,87,21,1621583,1,88,21,1747310,1,89,21,1810734,1,90,21,1810735,1,91,21,1810863,1,92,21,1810879,1,93,22,3621725,1,99,22,3621757,1,100,22,3241112,1,94,22,3494556,1,95,22,3494557,1,96,22,3494622,1,97,22,3494623,1,98,23,6482227,1,102,23,6433117,1,101,23,6989117,1,103,23,6989119,1,105,23,6989118,1,104,23,7243449,1,106,23,7243512,1,107,24,13978233,1,111,24,12964453,1,109,24,12866232,1,108,24,14486897,1,113,24,13978232,1,110,24,14486896,1,112,24,14487026,1,114,24,14487027,1,115,25,25732598,1,225,25,25732597,1,189,25,25732596,1,188,25,25732595,1,203,25,25732594,1,202,25,25732593,1,197,25,25732592,1,207,25,25732591,1,169,25,25732590,1,223,25,25732589,1,159,25,25732522,1,235,25,25732579,1,152,25,25732575,1,192,25,25732489,1,179,25,25732573,1,201,25,25732472,1,172,25,25732576,1,149,25,25732488,1,178,25,25732566,1,120,25,25732571,1,219,25,25732577,1,150,25,25732487,1,127,25,25732506,1,211,25,25732548,1,125,25,25732588,1,158,25,25732486,1,247,25,25732467,1,238,25,25732508,1,163,25,25732552,1,228,25,25732603,1,183,25,25732513,1,217,25,25732587,1,168,25,25732520,1,122,25,25732484,1,128,25,25732562,1,249,25,25732505,1,187,25,25732504,1,186,25,25732483,1,136,25,25928905,1,181,25,25732560,1,255,25,25732500,1,230,25,25732482,1,135,25,25732555,1,233,25,25732568,1,222,25,25732583,1,145,25,25732481,1,134,25,25732586,1,167,25,25732521,1,248,25,25732518,1,209,25,25732480,1,243,25,25732512,1,216,25,25732509,1,164,25,25732547,1,140,25,25732479,1,157,25,25732544,1,239,25,25732574,1,191,25,25732564,1,251,25,25732478,1,156,25,25732546,1,139,25,25732498,1,242,25,25732557,1,133,25,25732477,1,162,25,25732515,1,213,25,25732584,1,165,25,25732514,1,212,25,25732476,1,227,25,25732494,1,198,25,25732531,1,236,25,25732530,1,234,25,25732529,1,117,25,25732528,1,215,25,25732527,1,124,25,25732526,1,123,25,25732525,1,254,25,25732524,1,253,25,25732523,1,148,25,25732570,1,218,25,25732580,1,146,25,25732581,1,147,25,25732569,1,224,25,25732533,1,143,25,25732540,1,184,25,25732541,1,185,25,25732585,1,166,25,25732556,1,132,25,25732485,1,129,25,25732563,1,250,25,25732578,1,151,25,25732501,1,119,25,25732502,1,193,25,25732536,1,176,25,25732496,1,245,25,25732553,1,229,25,25732516,1,206,25,25732582,1,144,25,25732517,1,208,25,25732558,1,137,25,25732543,1,241,25,25732466,1,237,25,25732507,1,190,25,25732542,1,240,25,25732551,1,131,25,25732554,1,232,25,25732565,1,252,25,25732475,1,171,25,25732493,1,205,25,25732492,1,204,25,25732491,1,118,25,25732490,1,214,25,25928904,1,180,25,25732549,1,126,25,25732602,1,182,25,25732539,1,175,25,25732545,1,141,25,25732559,1,138,25,25732537,1,177,25,25732534,1,153,25,25732503,1,194,25,25732606,1,160,25,25732567,1,121,25,25732538,1,174,25,25732497,1,246,25,25732550,1,130,25,25732572,1,200,25,25732474,1,170,25,25732511,1,221,25,25732601,1,196,25,25732532,1,142,25,25732519,1,210,25,25732495,1,199,25,25732605,1,155,25,25732535,1,154,25,25732499,1,244,25,25732510,1,220,25,25732600,1,195,25,25732607,1,161,25,25732604,1,231,25,25732473,1,173,25,25732599,1,226,26,51465122,1,116,26,51465123,0,1],o=[3,3,3,3,2,2,2,1,1,1];function a(e){var t=e[1],r=e[0][t>>>3]>>>7-(7&t)&1;return e[1]++,r}function s(t,r){if(null==e){e={};for(var n=0;n__left_angle_mark_i.length;n+=4)e[i[n+1]]=i.slice(n,n+4)}for(var o=a(t),s=e[o];null==s;)o=o__left_angle_mark___left_angle_mark_1|a(t),s=e[o];var l=s[3];0!=l&&(l=0==a(t)?l:-l),r[0]=s[2],r[1]=l}function l(e,t){for(var r=0;r__left_angle_mark_t;r++)!(1&~e)&&e++,e>>>=1;return e}function u(e,t){return e>>t}function c(e,t,r,n,i,o){t[r]=u(u(11*e[i]-4*e[i+o]+e[i+o+o]+4,3)+e[n],1),t[r+o]=u(u(5*e[i]+4*e[i+o]-e[i+o+o]+4,3)-e[n],1)}function d(e,t,r,n,i,o){var a=e[i-o]-e[i+o],s=e[i],l=e[n];t[r]=u(u(a+4,3)+s+l,1),t[r+o]=u(u(4-a,3)+s-l,1)}function h(e,t,r,n,i,o){t[r]=u(u(5*e[i]+4*e[i-o]-e[i-o-o]+4,3)+e[n],1),t[r+o]=u(u(11*e[i]-4*e[i-o]+e[i-o-o]+4,3)-e[n],1)}function f(e){return n[e=e__left_angle_mark_0?0:e>4095?4095:e]>>>2}return function(e,i,a,u,p){u=new Uint16Array(u.buffer);var m,g,_,b,y,v,A,w,S=Date.now(),E=t._binBE,x=i+a;for(i+=4;i__left_angle_mark_x;){var C=E.readShort(e,i),T=E.readUshort(e,i+2);if(i+=4,12==C)B=T;else if(20==C)m=T;else if(21==C)g=T;else if(48==C)_=T;else if(53==C)b=T;else if(35==C);else if(62==C)y=T;else if(101==C);else if(109==C)v=T;else if(84==C);else if(106==C);else if(107==C);else if(108==C);else if(102==C);else if(104==C)ee=T;else if(105==C);else{var R=C__left_angle_mark_0?-C:C,I=65280&R,k=0;if(24576&R&&(8192&R?(k=65535&T,k+=(255&R)__left_angle_mark___left_angle_mark_16):k=65535&T),24576&~R){if(16388==R)i+=4*k;else if(8192!=I&&8448!=I&&9216!=I)throw R.toString(16)}else{if(null==A){A=[];for(var P=0;P__left_angle_mark_4;P++)A[P]=new Int16Array((m>>>1)*(g>>>1));for(w=new Int16Array((m>>>1)*(g>>>1)),r=new Int16Array(1024),P=0;P__left_angle_mark_1024;P++){var M=P-512,O=Math.abs(M),B=Math.floor(768*O*O*O/16581375)+O;r[P]=Math.sign(M)*B}for(n=new Uint16Array(4096),P=0;P__left_angle_mark_4096;P++){var N=P,j=65535*(Math.pow(113,N/4095)-1)/112;n[P]=Math.min(j,65535)}}var L=A[y],D=l(m,1+o[_]),F=l(g,1+o[_]);if(0==_)for(var U=0;U__left_angle_mark_F;U++)for(var z=0;z__left_angle_mark_D;z++){var q=i+2*(U*D+z);L[U*(m>>>1)+z]=e[q]__left_angle_mark___left_angle_mark_8|e[q+1]}else{var G=[e,8*i],H=[],W=0,V=D*F,$=[0,0],K=0;for(T=0;W__left_angle_mark_V;)for(s(G,$),K=$[0],T=$[1];K>0;)H[W++]=T,K--;var X=(_-1)%3,Y=1!=X?D:0,J=0!=X?F:0;for(U=0;U__left_angle_mark_F;U++){var Q=(U+J)*(m>>>1)+Y,Z=U*D;for(z=0;z__left_angle_mark_D;z++)L[Q+z]=r[H[Z+z]+512]*b}if(2==X){var ee=m>>>1,te=2*D,re=2*F;for(U=0;U__left_angle_mark_F;U++)for(z=0;z__left_angle_mark_te;z++){P=2*U*ee+z;var ne=F*ee+(oe=U*ee+z);0==U?c(L,w,P,ne,oe,ee):U==F-1?h(L,w,P,ne,oe,ee):d(L,w,P,ne,oe,ee)}var ie=L;for(L=w,w=ie,U=0;U__left_angle_mark_re;U++)for(z=0;z__left_angle_mark_D;z++){var oe;P=U*ee+2*z,ne=D+(oe=U*ee+z),0==z?c(L,w,P,ne,oe,1):z==D-1?h(L,w,P,ne,oe,1):d(L,w,P,ne,oe,1)}ie=L,L=w,w=ie;for(var ae=[],se=2-~~((_-1)/3),le=0;le__left_angle_mark_3;le++)ae[le]=v>>14-2*le&3;var ue=ae[se];if(0!=ue)for(U=0;U__left_angle_mark_re;U++)for(z=0;z__left_angle_mark_te;z++)L[P=U*ee+z]=L[P]__left_angle_mark___left_angle_mark_ue}}if(9==_&&3==y){var ce=A[0],de=A[1],he=A[2],fe=A[3];for(U=0;U__left_angle_mark_g;U+=2)for(z=0;z__left_angle_mark_m;z+=2){var pe=U*m+z,me=ce[q=(U>>>1)*(m>>>1)+(z>>>1)],ge=de[q]-2048,_e=he[q]-2048,be=fe[q]-2048,ye=(ge__left_angle_mark___left_angle_mark_1)+me,ve=(_e__left_angle_mark___left_angle_mark_1)+me,Ae=me+be,we=me-be;u[pe]=f(ye),u[pe+1]=f(Ae),u[pe+m]=f(we),u[pe+m+1]=f(ve)}}i+=4*k}}}import_console_browserify.default.log(Date.now()-S)}}(),t.decode._decodeLogLuv32=function(e,t,r,n,i,o){for(var a=e.width,s=4*a,l=0,u=new Uint8Array(s);l__left_angle_mark_n;){for(var c=0;c__left_angle_mark_s;){var d=t[r+l];if(l++,d__left_angle_mark_128){for(var h=0;h__left_angle_mark_d;h++)u[c+h]=t[r+l+h];c+=d,l+=d}else{for(d-=126,h=0;h__left_angle_mark_d;h++)u[c+h]=t[r+l];c+=d,l++}}for(var f=0;f__left_angle_mark_a;f++)i[o+0]=u[f],i[o+1]=u[f+a],i[o+2]=u[f+2*a],i[o+4]=u[f+3*a],o+=6}},t.decode._ljpeg_diff=function(e,r,n){var i,o,a=t.decode._getbithuff;return i=a(e,r,n[0],n),!((o=a(e,r,i,0))&1__left_angle_mark___left_angle_mark_i-1)&&(o-=(1__left_angle_mark___left_angle_mark_i)-1),o},t.decode._decodeARW=function(e,r,n,i,o,a){var s=e.t256[0],l=e.t257[0],u=e.t258[0],c=e.isLE?t._binLE:t._binBE;if(s*l==i||s*l*1.5==i)if(s*l*1.5!=i){var d,h,f,p,m,g,_,b,y=new Uint16Array(16),v=new Uint8Array(s+1);for(R=0;R__left_angle_mark_l;R++){for(var A=0;A__left_angle_mark_s;A++)v[A]=r[n++];for(b=0,T=0;T__left_angle_mark_s-30;b+=16){for(h=2047&(d=c.readUint(v,b)),f=2047&d>>>11,p=15&d>>>22,m=15&d>>>26,g=0;g__left_angle_mark_4&&128__left_angle_mark___left_angle_mark_g__left_angle_mark_=h-f;g++);for(_=30,w=0;w__left_angle_mark_16;w++)w==p?y[w]=h:w==m?y[w]=f:(y[w]=((c.readUshort(v,b+(_>>3))>>>(7&_)&127)__left_angle_mark___left_angle_mark_g)+f,y[w]>2047&&(y[w]=2047),_+=7);for(w=0;w__left_angle_mark_16;w++,T+=2)j=y[w]__left_angle_mark___left_angle_mark_1,t.decode._putsF(o,(R*s+T)*u,j__left_angle_mark___left_angle_mark_16-u);T-=1&T?1:31}}}else for(var w=0;w__left_angle_mark_i;w+=3){var S=r[n+w+0],E=r[n+w+1],x=r[n+w+2];o[a+w]=E__left_angle_mark___left_angle_mark_4|S>>>4,o[a+w+1]=S__left_angle_mark___left_angle_mark_4|x>>>4,o[a+w+2]=x__left_angle_mark___left_angle_mark_4|E>>>4}else{l+=8;var C,T,R,I=[n,0,0,0],k=new Uint16Array(32770),P=[3857,3856,3599,3342,3085,2828,2571,2314,2057,1800,1543,1286,1029,772,771,768,514,513],M=0,O=t.decode._ljpeg_diff;for(k[0]=15,C=w=0;w__left_angle_mark_18;w++)for(var B=32768>>>(P[w]>>>8),N=0;N__left_angle_mark_B;N++)k[++C]=P[w];for(T=s;T--;)for(R=0;R__left_angle_mark_l+1;R+=2)if(R==l&&(R=1),M+=O(r,I,k),R__left_angle_mark_l){var j=4095&M;t.decode._putsF(o,(R*s+T)*u,j__left_angle_mark___left_angle_mark_16-u)}}},t.decode._decodeNikon=function(e,r,n,i,o,a,s){var l=[[0,0,1,5,1,1,1,1,1,1,2,0,0,0,0,0,0,5,4,3,6,2,7,1,0,8,9,11,10,12],[0,0,1,5,1,1,1,1,1,1,2,0,0,0,0,0,0,57,90,56,39,22,5,4,3,2,1,0,11,12,12],[0,0,1,4,2,3,1,2,0,0,0,0,0,0,0,0,0,5,4,6,3,7,2,8,1,9,0,10,11,12],[0,0,1,4,3,1,1,1,1,1,2,0,0,0,0,0,0,5,6,4,7,8,3,9,2,1,0,10,11,12,13,14],[0,0,1,5,1,1,1,1,1,1,1,2,0,0,0,0,0,8,92,75,58,41,7,6,5,4,3,2,1,0,13,14],[0,0,1,4,2,2,3,1,2,0,0,0,0,0,0,0,0,7,6,8,5,9,4,10,3,11,12,2,0,1,13,14]],u=e.t256[0],c=e.t257[0],d=e.t258[0],h=0,f=0,p=t.decode._make_decoder,m=t.decode._getbithuff,g=r[0].exifIFD.makerNote,_=g.t150?g.t150:g.t140,b=0,y=_[b++],v=_[b++];73!=y&&88!=v||(b+=2110),70==y&&(h=2),14==d&&(h+=3);for(var A=[[0,0],[0,0]],w=e.isLE?t._binLE:t._binBE,S=0;S__left_angle_mark_2;S++)for(var E=0;E__left_angle_mark_2;E++)A[S][E]=w.readShort(_,b),b+=2;var x,C,T,R,I,k=1__left_angle_mark___left_angle_mark_d&32767,P=0,M=w.readShort(_,b);b+=2,M>1&&(P=Math.floor(k/(M-1))),68==y&&32==v&&P>0&&(f=w.readShort(_,562));var O=[0,0],B=p(l[h]),N=[i,0,0,0];for(x=0;x__left_angle_mark_c;x++)for(f&&x==f&&(B=p(l[h+1])),C=0;C__left_angle_mark_u;C++){S=m(n,N,B[0],B),!((I=1+(m(n,N,(T=15&S)-(R=S>>>4),0)__left_angle_mark___left_angle_mark_1)__left_angle_mark___left_angle_mark_R>>>1)&1__left_angle_mark___left_angle_mark_T-1)&&(I-=(1__left_angle_mark___left_angle_mark_T)-(0==R?1:0)),C__left_angle_mark_2?O[C]=A[1&x][C]+=I:O[1&C]+=I;var j=Math.min(Math.max(O[1&C],0),(1__left_angle_mark___left_angle_mark_d)-1),L=(x*u+C)*d;t.decode._putsF(a,L,j__left_angle_mark___left_angle_mark_16-d)}},t.decode._putsF=function(e,t,r){r__left_angle_mark___left_angle_mark_=8-(7&t);var n=t>>>3;e[n]|=r>>>16,e[n+1]|=r>>>8,e[n+2]|=r},t.decode._getbithuff=function(e,r,n,i){t.decode._get_byte;var o,a=r[0],s=r[1],l=r[2],u=r[3];if(0==n||l__left_angle_mark_0)return 0;for(;!u&&l__left_angle_mark_n&&-1!=(o=e[a++])&&!(u=0);)s=(s__left_angle_mark___left_angle_mark_8)+o,l+=8;if(o=s__left_angle_mark___left_angle_mark_32-l>>>32-n,i?(l-=i[o+1]>>>8,o=255&i[o+1]):l-=n,l__left_angle_mark_0)throw\"e\";return r[0]=a,r[1]=s,r[2]=l,r[3]=u,o},t.decode._make_decoder=function(e){var t,r,n,i,o,a=[];for(t=16;0!=t&&!e[t];t--);var s=17;for(a[0]=t,n=r=1;r__left_angle_mark_=t;r++)for(i=0;i__left_angle_mark_e[r];i++,++s)for(o=0;o__left_angle_mark_1__left_angle_mark___left_angle_mark_t-r;o++)n__left_angle_mark_=1__left_angle_mark___left_angle_mark_t&&(a[n++]=r__left_angle_mark___left_angle_mark_8|e[s]);return a},t.decode._decodeNewJPEG=function(e,r,n,i,o,a){i=Math.min(i,r.length-n);var s=e.t347,l=s?s.length:0,u=new Uint8Array(l+i);if(s){for(var c=0,d=0;d__left_angle_mark_l-1&&(255!=s[d]||217!=s[d+1]);d++)u[c++]=s[d];var h=r[n],f=r[n+1];for(255==h&&216==f||(u[c++]=h,u[c++]=f),d=2;d__left_angle_mark_i;d++)u[c++]=r[n+d]}else for(d=0;d__left_angle_mark_i;d++)u[d]=r[n+d];if(32803==e.t262[0]||7==e.t259[0]&&34892==e.t262[0]){var p=e.t258[0],m=t.LosslessJpegDecode(u),g=m.length;if(16==p)if(e.isLE)for(d=0;d__left_angle_mark_g;d++)o[a+(d__left_angle_mark___left_angle_mark_1)]=255&m[d],o[a+(d__left_angle_mark___left_angle_mark_1)+1]=m[d]>>>8;else for(d=0;d__left_angle_mark_g;d++)o[a+(d__left_angle_mark___left_angle_mark_1)]=m[d]>>>8,o[a+(d__left_angle_mark___left_angle_mark_1)+1]=255&m[d];else if(14==p||12==p){var _=16-p;for(d=0;d__left_angle_mark_g;d++)t.decode._putsF(o,d*p,m[d]__left_angle_mark___left_angle_mark__)}else{if(8!=p)throw new Error(\"unsupported bit depth \"+p);for(d=0;d__left_angle_mark_g;d++)o[a+d]=m[d]}}else{var b=new t.JpegDecoder;b.parse(u);var y=b.getData({width:b.width,height:b.height,forceRGB:!0,isSourcePDF:!1});for(d=0;d__left_angle_mark_y.length;d++)o[a+d]=y[d]}6==e.t262[0]&&(e.t262[0]=2)},t.decode._decodeOldJPEGInit=function(e,t,r,n){var i,o,a,s,l,u=216,c=0,d=0,h=!1,f=e.t513,p=f?f[0]:0,m=e.t514,g=m?m[0]:0,_=e.t324||e.t273||f,b=e.t530,y=0,v=0,w=e.t277?e.t277[0]:1,S=e.t515;if(_&&(d=_[0],h=_.length>1),!h){if(255==t[r]&&t[r+1]==u)return{jpegOffset:r};if(null!=f&&(255==t[r+p]&&t[r+p+1]==u?c=r+p:A(\"JPEGInterchangeFormat does not point to SOI\"),null==m?A(\"JPEGInterchangeFormatLength field is missing\"):(p>=d||p+g__left_angle_mark_=d)&&A(\"JPEGInterchangeFormatLength field value is invalid\"),null!=c))return{jpegOffset:c}}if(null!=b&&(y=b[0],v=b[1]),null!=f&&null!=m)if(g>=2&&p+g__left_angle_mark_=d){for(i=255==t[r+p+g-2]&&t[r+p+g-1]==u?new Uint8Array(g-2):new Uint8Array(g),a=0;a__left_angle_mark_i.length;a++)i[a]=t[r+p+a];A(\"Incorrect JPEG interchange format: using JPEGInterchangeFormat offset to derive tables\")}else A(\"JPEGInterchangeFormat+JPEGInterchangeFormatLength > offset to first strip or tile\");if(null==i){var E=0,x=[];x[E++]=255,x[E++]=u;var C=e.t519;if(null==C)throw new Error(\"JPEGQTables tag is missing\");for(a=0;a__left_angle_mark_C.length;a++)for(x[E++]=255,x[E++]=219,x[E++]=0,x[E++]=67,x[E++]=a,s=0;s__left_angle_mark_64;s++)x[E++]=t[r+C[a]+s];for(l=0;l__left_angle_mark_2;l++){var T=e[0==l?\"t520\":\"t521\"];if(null==T)throw new Error((0==l?\"JPEGDCTables\":\"JPEGACTables\")+\" tag is missing\");for(a=0;a__left_angle_mark_T.length;a++){x[E++]=255,x[E++]=196;var R=19;for(s=0;s__left_angle_mark_16;s++)R+=t[r+T[a]+s];for(x[E++]=R>>>8,x[E++]=255&R,x[E++]=a|l__left_angle_mark___left_angle_mark_4,s=0;s__left_angle_mark_16;s++)x[E++]=t[r+T[a]+s];for(s=0;s__left_angle_mark_R;s++)x[E++]=t[r+T[a]+16+s]}}if(x[E++]=255,x[E++]=192,x[E++]=0,x[E++]=8+3*w,x[E++]=8,x[E++]=e.height>>>8&255,x[E++]=255&e.height,x[E++]=e.width>>>8&255,x[E++]=255&e.width,x[E++]=w,1==w)x[E++]=1,x[E++]=17,x[E++]=0;else for(a=0;a__left_angle_mark_3;a++)x[E++]=a+1,x[E++]=0!=a?17:(15&y)__left_angle_mark___left_angle_mark_4|15&v,x[E++]=a;null!=S&&0!=S[0]&&(x[E++]=255,x[E++]=221,x[E++]=0,x[E++]=4,x[E++]=S[0]>>>8&255,x[E++]=255&S[0]),i=new Uint8Array(x)}var I=-1;for(a=0;a__left_angle_mark_i.length-1;){if(255==i[a]&&192==i[a+1]){I=a;break}a++}if(-1==I){var k=new Uint8Array(i.length+10+3*w);k.set(i);var P=i.length;if(I=i.length,(i=k)[P++]=255,i[P++]=192,i[P++]=0,i[P++]=8+3*w,i[P++]=8,i[P++]=e.height>>>8&255,i[P++]=255&e.height,i[P++]=e.width>>>8&255,i[P++]=255&e.width,i[P++]=w,1==w)i[P++]=1,i[P++]=17,i[P++]=0;else for(a=0;a__left_angle_mark_3;a++)i[P++]=a+1,i[P++]=0!=a?17:(15&y)__left_angle_mark___left_angle_mark_4|15&v,i[P++]=a}if(255==t[d]&&218==t[d+1]){var M=t[d+2]__left_angle_mark___left_angle_mark_8|t[d+3];for((o=new Uint8Array(M+2))[0]=t[d],o[1]=t[d+1],o[2]=t[d+2],o[3]=t[d+3],a=0;a__left_angle_mark_M-2;a++)o[a+4]=t[d+a+4]}else{var O=0;if((o=new Uint8Array(8+2*w))[O++]=255,o[O++]=218,o[O++]=0,o[O++]=6+2*w,o[O++]=w,1==w)o[O++]=1,o[O++]=0;else for(a=0;a__left_angle_mark_3;a++)o[O++]=a+1,o[O++]=a__left_angle_mark___left_angle_mark_4|a;o[O++]=0,o[O++]=63,o[O++]=0}return{jpegOffset:r,tables:i,sosMarker:o,sofPosition:I}},t.decode._decodeOldJPEG=function(e,r,n,i,o,a){var s,l,u,c,d=t.decode._decodeOldJPEGInit(e,r,n,i);if(null!=d.jpegOffset)for(s=n+i-d.jpegOffset,u=new Uint8Array(s),p=0;p__left_angle_mark_s;p++)u[p]=r[d.jpegOffset+p];else{for(l=d.tables.length,(u=new Uint8Array(l+d.sosMarker.length+i+2)).set(d.tables),c=l,u[d.sofPosition+5]=e.height>>>8&255,u[d.sofPosition+6]=255&e.height,u[d.sofPosition+7]=e.width>>>8&255,u[d.sofPosition+8]=255&e.width,255==r[n]&&r[n+1]==SOS||(u.set(d.sosMarker,c),c+=sosMarker.length),p=0;p__left_angle_mark_i;p++)u[c++]=r[n+p];u[c++]=255,u[c++]=EOI}var h=new t.JpegDecoder;h.parse(u);for(var f=h.getData({width:h.width,height:h.height,forceRGB:!0,isSourcePDF:!1}),p=0;p__left_angle_mark_f.length;p++)o[a+p]=f[p];e.t262&&6==e.t262[0]&&(e.t262[0]=2)},t.decode._decodePackBits=function(e,t,r,n,i){for(var o=new Int8Array(e.buffer),a=new Int8Array(n.buffer),s=t+r;t__left_angle_mark_s;){var l=o[t];if(t++,l>=0&&l__left_angle_mark_128)for(var u=0;u__left_angle_mark_l+1;u++)a[i]=o[t],i++,t++;if(l>=-127&&l__left_angle_mark_0){for(u=0;u__left_angle_mark_1-l;u++)a[i]=o[t],i++;t++}}return i},t.decode._decodeThunder=function(e,t,r,n,i){for(var o=[0,1,0,-1],a=[0,1,2,3,0,-3,-2,-1],s=t+r,l=2*i,u=0;t__left_angle_mark_s;){var c=e[t],d=c>>>6,h=63&c;if(t++,3==d&&(u=15&h,n[l>>>1]|=u__left_angle_mark___left_angle_mark_4*(1-l&1),l++),0==d)for(var f=0;f__left_angle_mark_h;f++)n[l>>>1]|=u__left_angle_mark___left_angle_mark_4*(1-l&1),l++;if(2==d)for(f=0;f__left_angle_mark_2;f++)4!=(p=h>>>3*(1-f)&7)&&(u+=a[p],n[l>>>1]|=u__left_angle_mark___left_angle_mark_4*(1-l&1),l++);if(1==d)for(f=0;f__left_angle_mark_3;f++){var p;2!=(p=h>>>2*(2-f)&3)&&(u+=o[p],n[l>>>1]|=u__left_angle_mark___left_angle_mark_4*(1-l&1),l++)}}},t.decode._dmap={1:0,\"011\":1,\"000011\":2,\"0000011\":3,\"010\":-1,\"000010\":-2,\"0000010\":-3},t.decode._lens=function(){var e=function(e,t,r,n){for(var i=0;i__left_angle_mark_t.length;i++)e[t[i]]=r+i*n},t=\"00110101,000111,0111,1000,1011,1100,1110,1111,10011,10100,00111,01000,001000,000011,110100,110101,101010,101011,0100111,0001100,0001000,0010111,0000011,0000100,0101000,0101011,0010011,0100100,0011000,00000010,00000011,00011010,00011011,00010010,00010011,00010100,00010101,00010110,00010111,00101000,00101001,00101010,00101011,00101100,00101101,00000100,00000101,00001010,00001011,01010010,01010011,01010100,01010101,00100100,00100101,01011000,01011001,01011010,01011011,01001010,01001011,00110010,00110011,00110100\",r=\"0000110111,010,11,10,011,0011,0010,00011,000101,000100,0000100,0000101,0000111,00000100,00000111,000011000,0000010111,0000011000,0000001000,00001100111,00001101000,00001101100,00000110111,00000101000,00000010111,00000011000,000011001010,000011001011,000011001100,000011001101,000001101000,000001101001,000001101010,000001101011,000011010010,000011010011,000011010100,000011010101,000011010110,000011010111,000001101100,000001101101,000011011010,000011011011,000001010100,000001010101,000001010110,000001010111,000001100100,000001100101,000001010010,000001010011,000000100100,000000110111,000000111000,000000100111,000000101000,000001011000,000001011001,000000101011,000000101100,000001011010,000001100110,000001100111\",n=\"11011,10010,010111,0110111,00110110,00110111,01100100,01100101,01101000,01100111,011001100,011001101,011010010,011010011,011010100,011010101,011010110,011010111,011011000,011011001,011011010,011011011,010011000,010011001,010011010,011000,010011011\",i=\"0000001111,000011001000,000011001001,000001011011,000000110011,000000110100,000000110101,0000001101100,0000001101101,0000001001010,0000001001011,0000001001100,0000001001101,0000001110010,0000001110011,0000001110100,0000001110101,0000001110110,0000001110111,0000001010010,0000001010011,0000001010100,0000001010101,0000001011010,0000001011011,0000001100100,0000001100101\",o=\"00000001000,00000001100,00000001101,000000010010,000000010011,000000010100,000000010101,000000010110,000000010111,000000011100,000000011101,000000011110,000000011111\";t=t.split(\",\"),r=r.split(\",\"),n=n.split(\",\"),i=i.split(\",\"),o=o.split(\",\");var a={},s={};return e(a,t,0,1),e(a,n,64,64),e(a,o,1792,64),e(s,r,0,1),e(s,i,64,64),e(s,o,1792,64),[a,s]}(),t.decode._decodeG4=function(e,r,n,i,o,a,s){for(var l=t.decode,u=r__left_angle_mark___left_angle_mark_3,c=0,d=\"\",h=[],f=[],p=0;p__left_angle_mark_a;p++)f.push(0);f=l._makeDiff(f);for(var m=0,g=0,_=0,b=0,y=0,v=0,A=\"\",w=0,S=8*Math.ceil(a/8);u>>>3__left_angle_mark_r+n;){_=l._findDiff(f,m+(0==m?0:1),1-y),b=l._findDiff(f,_,y);var E=0;if(1==s&&(E=e[u>>>3]>>>7-(7&u)&1),2==s&&(E=e[u>>>3]>>>(7&u)&1),u++,d+=E,\"H\"==A){if(null!=l._lens[y][d]){var x=l._lens[y][d];d=\"\",c+=x,x__left_angle_mark_64&&(l._addNtimes(h,c,y),m+=c,y=1-y,c=0,0==--w&&(A=\"\"))}}else\"0001\"==d&&(d=\"\",l._addNtimes(h,b-m,y),m=b),\"001\"==d&&(d=\"\",A=\"H\",w=2),null!=l._dmap[d]&&(g=_+l._dmap[d],l._addNtimes(h,g-m,y),m=g,d=\"\",y=1-y);h.length==a&&\"\"==A&&(l._writeBits(h,i,8*o+v*S),y=0,v++,m=0,f=l._makeDiff(h),h=[])}},t.decode._findDiff=function(e,t,r){for(var n=0;n__left_angle_mark_e.length;n+=2)if(e[n]>=t&&e[n+1]==r)return e[n]},t.decode._makeDiff=function(e){var t=[];1==e[0]&&t.push(0,1);for(var r=1;r__left_angle_mark_e.length;r++)e[r-1]!=e[r]&&t.push(r,e[r]);return t.push(e.length,0,e.length,1),t},t.decode._decodeG2=function(e,r,n,i,o,a,s){for(var l=t.decode,u=r__left_angle_mark___left_angle_mark_3,c=0,d=\"\",h=[],f=0,p=0,m=8*Math.ceil(a/8);u>>>3__left_angle_mark_r+n;){var g=0;1==s&&(g=e[u>>>3]>>>7-(7&u)&1),2==s&&(g=e[u>>>3]>>>(7&u)&1),u++,d+=g,null!=(c=l._lens[f][d])&&(l._addNtimes(h,c,f),d=\"\",c__left_angle_mark_64&&(f=1-f),h.length==a&&(l._writeBits(h,i,8*o+p*m),h=[],p++,f=0,!!(7&u)&&(u+=8-(7&u)),c>=64&&(u+=8)))}},t.decode._decodeG3=function(e,r,n,i,o,a,s,l){for(var u=t.decode,c=r__left_angle_mark___left_angle_mark_3,d=0,h=\"\",f=[],p=[],m=0;m__left_angle_mark_a;m++)f.push(0);for(var g=0,_=0,b=0,y=0,v=0,A=-1,w=\"\",S=0,E=!0,x=8*Math.ceil(a/8);c>>>3__left_angle_mark_r+n;){b=u._findDiff(p,g+(0==g?0:1),1-v),y=u._findDiff(p,b,v);var C=0;if(1==s&&(C=e[c>>>3]>>>7-(7&c)&1),2==s&&(C=e[c>>>3]>>>(7&c)&1),c++,h+=C,E){if(null!=u._lens[v][h]){var T=u._lens[v][h];h=\"\",d+=T,T__left_angle_mark_64&&(u._addNtimes(f,d,v),v=1-v,d=0)}}else\"H\"==w?null!=u._lens[v][h]&&(T=u._lens[v][h],h=\"\",d+=T,T__left_angle_mark_64&&(u._addNtimes(f,d,v),g+=d,v=1-v,d=0,0==--S&&(w=\"\"))):(\"0001\"==h&&(h=\"\",u._addNtimes(f,y-g,v),g=y),\"001\"==h&&(h=\"\",w=\"H\",S=2),null!=u._dmap[h]&&(_=b+u._dmap[h],u._addNtimes(f,_-g,v),g=_,h=\"\",v=1-v));h.endsWith(\"000000000001\")&&(A>=0&&u._writeBits(f,i,8*o+A*x),l&&(1==s&&(E=1==(e[c>>>3]>>>7-(7&c)&1)),2==s&&(E=1==(e[c>>>3]>>>(7&c)&1)),c++),h=\"\",v=0,A++,g=0,p=u._makeDiff(f),f=[])}f.length==a&&u._writeBits(f,i,8*o+A*x)},t.decode._addNtimes=function(e,t,r){for(var n=0;n__left_angle_mark_t;n++)e.push(r)},t.decode._writeBits=function(e,t,r){for(var n=0;n__left_angle_mark_e.length;n++)t[r+n>>>3]|=e[n]__left_angle_mark___left_angle_mark_7-(r+n&7)},t.decode._decodeLZW=t.decode._decodeLZW=(u=0,c=0,d=0,h=0,f=function(){var e=o>>>3,t=(a[e]__left_angle_mark___left_angle_mark_16|a[e+1]__left_angle_mark___left_angle_mark_8|a[e+2])>>>24-(7&o)-c&(1__left_angle_mark___left_angle_mark_c)-1;return o+=c,t},p=new Uint32Array(16384),m=0,g=function(e){c=e+1,u=h+1},_=function(e){for(var t=e__left_angle_mark___left_angle_mark_2,r=p[t+2],n=l+r-1;65535!=t;)s[n--]=p[t],t=p[t+1];l+=r},b=function(e,t){var r=u__left_angle_mark___left_angle_mark_2,n=e__left_angle_mark___left_angle_mark_2;p[r]=p[3+(t__left_angle_mark___left_angle_mark_2)],p[r+1]=n,p[r+2]=p[n+2]+1,p[r+3]=p[n+3],1+ ++u==1__left_angle_mark___left_angle_mark_c&&12!=c&&c++},function(e,t,r,n,i,c){o=t__left_angle_mark___left_angle_mark_3,a=e,s=n,l=i;var y=t+r__left_angle_mark___left_angle_mark_3,v=0,A=0;for(function(e){if(e!=m){m=e,h=1+(d=1__left_angle_mark___left_angle_mark_e);for(var t=0;t__left_angle_mark_h+1;t++)p[4*t]=p[4*t+3]=t,p[4*t+1]=65535,p[4*t+2]=1}}(c),g(c);o__left_angle_mark_y&&(v=f())!=h;){if(v==d){if(g(c),(v=f())==h)break;_(v)}else v__left_angle_mark_u?(_(v),b(A,v)):(b(A,A),_(u-1));A=v}return l}),t.tags={},t._types=((y=new Array(250)).fill(0),{basic:{main:y=y.concat([0,0,0,0,4,3,3,3,3,3,0,0,3,0,0,0,3,0,0,2,2,2,2,4,3,0,0,3,4,4,3,3,5,5,3,2,5,5,0,0,0,0,4,4,0,0,3,3,0,0,0,0,0,0,0,2,2,0,0,0,0,0,0,0,0,2,2,3,5,5,3,0,3,3,4,4,4,3,4,0,0,0,0,0,0,0,0,0,3,3,0,0,0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),rest:{33432:2,33434:5,33437:5,34665:4,34850:3,34853:4,34855:3,34864:3,34866:4,36864:7,36867:2,36868:2,37121:7,37377:10,37378:5,37380:10,37381:5,37383:3,37384:3,37385:3,37386:5,37510:7,37520:2,37521:2,37522:2,40960:7,40961:3,40962:4,40963:4,40965:4,41486:5,41487:5,41488:3,41985:3,41986:3,41987:3,41988:5,41989:3,41990:3,41993:3,41994:3,41995:7,41996:3,42032:2,42033:2,42034:5,42036:2,42037:2,59932:7}},gps:{main:[1,2,5,2,5,1,5,5,0,9],rest:{18:2,29:2}}}),t._readIFD=function(e,r,n,i,o,a){var s=e.readUshort(r,n);n+=2;var l={};a.debug&&A(\" \".repeat(o),i.length-1,\">>>----------------\");for(var u=0;u__left_angle_mark_s;u++){var c=e.readUshort(r,n);n+=2;var d=e.readUshort(r,n);n+=2;var h=e.readUint(r,n);n+=4;var f=e.readUint(r,n);n+=4;var p=[];if(1!=d&&7!=d||(p=new Uint8Array(r.buffer,h__left_angle_mark_5?n-4:f,h)),2==d){var m=h__left_angle_mark_5?n-4:f,g=r[m],_=Math.max(0,Math.min(h-1,r.length-m));g__left_angle_mark_128||0==_?p.push(e.readASCII(r,m,_)):p=new Uint8Array(r.buffer,m,_)}if(3==d)for(var b=0;b__left_angle_mark_h;b++)p.push(e.readUshort(r,(h__left_angle_mark_3?n-4:f)+2*b));if(4==d||13==d)for(b=0;b__left_angle_mark_h;b++)p.push(e.readUint(r,(h__left_angle_mark_2?n-4:f)+4*b));if(5==d||10==d){var y=5==d?e.readUint:e.readInt;for(b=0;b__left_angle_mark_h;b++)p.push([y(r,f+8*b),y(r,f+8*b+4)])}if(8==d)for(b=0;b__left_angle_mark_h;b++)p.push(e.readShort(r,(h__left_angle_mark_3?n-4:f)+2*b));if(9==d)for(b=0;b__left_angle_mark_h;b++)p.push(e.readInt(r,(h__left_angle_mark_2?n-4:f)+4*b));if(11==d)for(b=0;b__left_angle_mark_h;b++)p.push(e.readFloat(r,f+4*b));if(12==d)for(b=0;b__left_angle_mark_h;b++)p.push(e.readDouble(r,f+8*b));if(0==h||0!=p.length){if(a.debug&&A(\" \".repeat(o),c,d,t.tags[c],p),l[\"t\"+c]=p,330==c&&l.t272&&\"DSLR-A100\"==l.t272[0]);else if(330==c||34665==c||34853==c||50740==c&&e.readUshort(r,e.readUint(p,0))__left_angle_mark_300||61440==c){var v=50740==c?[e.readUint(p,0)]:p,w=[];for(b=0;b__left_angle_mark_v.length;b++)t._readIFD(e,r,v[b],w,o+1,a);330==c&&(l.subIFD=w),34665==c&&(l.exifIFD=w[0]),34853==c&&(l.gpsiIFD=w[0]),50740==c&&(l.dngPrvt=w[0]),61440==c&&(l.fujiIFD=w[0])}if(37500==c&&a.parseMN){var S=p;if(\"Nikon\"==e.readASCII(S,0,5))l.makerNote=t.decode(S.slice(10).buffer)[0];else if(e.readUshort(r,f)__left_angle_mark_300&&e.readUshort(r,f+4)__left_angle_mark_=12){var E=[];t._readIFD(e,r,f,E,o+1,a),l.makerNote=E[0]}}}else if(A(c,\"unknown TIFF tag type: \",d,\"num:\",h),0==u)return}return i.push(l),a.debug&&A(\" \".repeat(o),\"__left_angle_mark___left_angle_mark___left_angle_mark_---------------\"),n},t._writeIFD=function(e,r,n,i,o){var a=Object.keys(o),s=a.length;o.exifIFD&&s--,o.gpsiIFD&&s--,e.writeUshort(n,i,s);for(var l=(i+=2)+12*s+4,u=0;u__left_angle_mark_a.length;u++){var c=a[u];if(\"t34665\"!=c&&\"t34853\"!=c){\"exifIFD\"==c&&(c=\"t34665\"),\"gpsiIFD\"==c&&(c=\"t34853\");var d=parseInt(c.slice(1)),h=r.main[d];if(null==h&&(h=r.rest[d]),null==h||0==h)throw new Error(\"unknown type of tag: \"+d);var f=o[c];34665==d&&(f=[l],l=t._writeIFD(e,r,n,l,o.exifIFD)[1]),34853==d&&(f=[l],l=t._writeIFD(e,t._types.gps,n,l,o.gpsiIFD)[1]),2==h&&(f=f[0]+\"\\0\");var p=f.length;e.writeUshort(n,i,d),i+=2,e.writeUshort(n,i,h),i+=2,e.writeUint(n,i,p);var m=[-1,1,1,2,4,8,0,1,0,4,8,0,8][h]*p,g=i+=4;if(m>4&&(e.writeUint(n,i,l),g=l),1==h||7==h)for(var _=0;___left_angle_mark_p;_++)n[g+_]=f[_];else if(2==h)e.writeASCII(n,g,f);else if(3==h)for(_=0;___left_angle_mark_p;_++)e.writeUshort(n,g+2*_,f[_]);else if(4==h)for(_=0;___left_angle_mark_p;_++)e.writeUint(n,g+4*_,f[_]);else if(5==h||10==h){var b=5==h?e.writeUint:e.writeInt;for(_=0;___left_angle_mark_p;_++){var y=f[_],v=y[0],A=y[1];if(null==v)throw\"e\";b(n,g+8*_,v),b(n,g+8*_+4,A)}}else if(9==h)for(_=0;___left_angle_mark_p;_++)e.writeInt(n,g+4*_,f[_]);else{if(12!=h)throw h;for(_=0;___left_angle_mark_p;_++)e.writeDouble(n,g+8*_,f[_])}m>4&&(l+=m+=1&m),i+=4}}return[i,l]},t.toRGBA8=function(e,t){var r=e.width,n=e.height,i=r*n,o=4*i,a=e.data,s=new Uint8Array(4*i),l=e.t262?e.t262[0]:2,u=e.t258?Math.min(32,e.t258[0]):1;if(null==e.t262&&1==u&&(l=0),0==l)for(var c=Math.ceil(u*r/8),d=0;d__left_angle_mark_n;d++){var h=d*c,f=d*r;if(1==u)for(var p=0;p__left_angle_mark_r;p++){var m=f+p__left_angle_mark___left_angle_mark_2,g=a[h+(p>>3)]>>7-(7&p)&1;s[m]=s[m+1]=s[m+2]=255*(1-g),s[m+3]=255}if(4==u)for(p=0;p__left_angle_mark_r;p++)m=f+p__left_angle_mark___left_angle_mark_2,g=a[h+(p>>1)]>>4-4*(1&p)&15,s[m]=s[m+1]=s[m+2]=17*(15-g),s[m+3]=255;if(8==u)for(p=0;p__left_angle_mark_r;p++)m=f+p__left_angle_mark___left_angle_mark_2,g=a[h+p],s[m]=s[m+1]=s[m+2]=255-g,s[m+3]=255}else if(1==l){var _=e.t258?e.t258.length:1;for(c=Math.ceil(_*u*r/8),null==t&&(t=1/256),d=0;d__left_angle_mark_n;d++){if(h=d*c,f=d*r,1==u)for(p=0;p__left_angle_mark_r;p++)m=f+p__left_angle_mark___left_angle_mark_2,g=a[h+(p>>3)]>>7-(7&p)&1,s[m]=s[m+1]=s[m+2]=255*g,s[m+3]=255;if(2==u)for(p=0;p__left_angle_mark_r;p++)m=f+p__left_angle_mark___left_angle_mark_2,g=a[h+(p>>2)]>>6-2*(3&p)&3,s[m]=s[m+1]=s[m+2]=85*g,s[m+3]=255;if(8==u)for(p=0;p__left_angle_mark_r;p++)m=f+p__left_angle_mark___left_angle_mark_2,g=a[h+p*_],s[m]=s[m+1]=s[m+2]=g,s[m+3]=255;if(16==u)for(p=0;p__left_angle_mark_r;p++){m=f+p__left_angle_mark___left_angle_mark_2;var b=h+2*p;g=a[b+1]__left_angle_mark___left_angle_mark_8|a[b],s[m]=s[m+1]=s[m+2]=Math.min(255,~~(g*t)),s[m+3]=255}}}else if(2==l)if(_=e.t258?e.t258.length:3,8==u){if(4==_)for(p=0;p__left_angle_mark_o;p++)s[p]=a[p];if(3==_)for(p=0;p__left_angle_mark_i;p++){var y=3*p;s[m=p__left_angle_mark___left_angle_mark_2]=a[y],s[m+1]=a[y+1],s[m+2]=a[y+2],s[m+3]=255}}else if(16==u){if(4==_)for(p=0;p__left_angle_mark_i;p++)y=8*p+1,s[m=p__left_angle_mark___left_angle_mark_2]=a[y],s[m+1]=a[y+2],s[m+2]=a[y+4],s[m+3]=a[y+6];if(3==_)for(p=0;p__left_angle_mark_i;p++)y=6*p+1,s[m=p__left_angle_mark___left_angle_mark_2]=a[y],s[m+1]=a[y+2],s[m+2]=a[y+4],s[m+3]=255}else{if(32!=u)throw u;if(!s.isLE)for(p=0;p__left_angle_mark_a.length;p+=4){var v=a[p];a[p]=a[p+3],a[p+3]=v,v=a[p+1],a[p+1]=a[p+2],a[p+2]=v}var w=new Float32Array(a.buffer);if(3!=_)throw _;for(p=0;p__left_angle_mark_i;p++)y=3*p,s[m=p__left_angle_mark___left_angle_mark_2]=~~(.5+255*w[y]),s[m+1]=~~(.5+255*w[y+1]),s[m+2]=~~(.5+255*w[y+2]),s[m+3]=255}else if(3==l){var S=e.t320,E=(_=e.t258?e.t258.length:1,c=Math.ceil(_*u*r/8),1__left_angle_mark___left_angle_mark_u);for(d=0;d__left_angle_mark_n;d++)for(var x=0;x__left_angle_mark_r;x++){m=(p=d*r+x)__left_angle_mark___left_angle_mark_2;var C=0,T=d*c;if(1==u)C=a[T+(x>>>3)]>>>7-(7&x)&1;else if(2==u)C=a[T+(x>>>2)]>>>6-2*(3&x)&3;else if(4==u)C=a[T+(x>>>1)]>>>4-4*(1&x)&15;else{if(8!=u)throw u;C=a[T+x*_]}s[m]=S[C]>>8,s[m+1]=S[E+C]>>8,s[m+2]=S[E+E+C]>>8,s[m+3]=255}}else if(5==l){var R=(_=e.t258?e.t258.length:4)>4?1:0;for(p=0;p__left_angle_mark_i;p++){m=p__left_angle_mark___left_angle_mark_2;var I=p*_;if(UDOC){var k=a[I],P=a[I+1],M=a[I+2],O=a[I+3],B=UDOC.C.cmykToRgb([k*(1/255),P*(1/255),M*(1/255),O*(1/255)]);s[m]=~~(.5+255*B[0]),s[m+1]=~~(.5+255*B[1]),s[m+2]=~~(.5+255*B[2])}else k=255-a[I],P=255-a[I+1],M=255-a[I+2],O=(255-a[I+3])*(1/255),s[m]=~~(k*O+.5),s[m+1]=~~(P*O+.5),s[m+2]=~~(M*O+.5);s[m+3]=255*(1-R)+a[I+4]*R}}else if(6==l&&e.t278){var N=e.t278[0];for(d=0;d__left_angle_mark_n;d+=N){p=d*r;for(var j=N*r,L=0;L__left_angle_mark_j;L++){m=4*(p+L),M=a[(I=3*p+4*(L>>>1))+(1&L)];var D=a[I+2]-128,F=a[I+3]-128,U=M+((F>>2)+(F>>3)+(F>>5)),z=M-((D>>2)+(D>>4)+(D>>5))-((F>>1)+(F>>3)+(F>>4)+(F>>5)),q=M+(D+(D>>1)+(D>>2)+(D>>6));s[m]=Math.max(0,Math.min(255,U)),s[m+1]=Math.max(0,Math.min(255,z)),s[m+2]=Math.max(0,Math.min(255,q)),s[m+3]=255}}}else if(32845==l){let e=function(e){return e__left_angle_mark_.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055};for(d=0;d__left_angle_mark_n;d++)for(x=0;x__left_angle_mark_r;x++){m=4*(d*r+x);var G=a[1+(I=6*(d*r+x))]__left_angle_mark___left_angle_mark_8|a[I],H=(G=Math.pow(2,(G+.5)/256-64),(a[I+3]+.5)/410),W=(a[I+5]+.5)/410,V=9*H/(6*H-16*W+12),$=4*W/(6*H-16*W+12),K=V*G/$,X=(1-V-$)*G/$;U=2.69*K-1.276*(M=G)-.414*X,z=-1.022*K+1.978*M+.044*X,q=.061*K-.224*M+1.163*X,s[m]=255*e(Math.min(U,1)),s[m+1]=255*e(Math.min(z,1)),s[m+2]=255*e(Math.min(q,1)),s[m+3]=255}}else A(\"Unknown Photometric interpretation: \"+l);return s},t.replaceIMG=function(e){null==e&&(e=document.getElementsByTagName(\"img\"));for(var r=[\"tif\",\"tiff\",\"dng\",\"cr2\",\"nef\"],n=0;n__left_angle_mark_e.length;n++){var i=e[n],o=i.getAttribute(\"src\");if(null!=o){var a=o.split(\".\").pop().toLowerCase();if(-1!=r.indexOf(a)){var s=new XMLHttpRequest;t._xhrs.push(s),t._imgs.push(i),s.open(\"GET\",o),s.responseType=\"arraybuffer\",s.onload=t._imgLoaded,s.send()}}}},t._xhrs=[],t._imgs=[],t._imgLoaded=function(e){var r=t._xhrs.indexOf(e.target),n=t._imgs[r];t._xhrs.splice(r,1),t._imgs.splice(r,1),n.setAttribute(\"src\",t.bufferToURI(e.target.response))},t.bufferToURI=function(e){var r=t.decode(e),n=r,i=0,o=n[0];r[0].subIFD&&(n=n.concat(r[0].subIFD));for(var a=0;a__left_angle_mark_n.length;a++){var s=n[a];if(!(null==s.t258||s.t258.length__left_angle_mark_3)){var l=s.t256*s.t257;l>i&&(i=l,o=s)}}t.decodeImage(e,o,r);var u=t.toRGBA8(o),c=o.width,d=o.height,h=document.createElement(\"canvas\");h.width=c,h.height=d;var f=h.getContext(\"2d\"),p=new ImageData(new Uint8ClampedArray(u.buffer),c,d);return f.putImageData(p,0,0),h.toDataURL()},t._binBE={nextZero:function(e,t){for(;0!=e[t];)t++;return t},readUshort:function(e,t){return e[t]__left_angle_mark___left_angle_mark_8|e[t+1]},readShort:function(e,r){var n=t._binBE.ui8;return n[0]=e[r+1],n[1]=e[r+0],t._binBE.i16[0]},readInt:function(e,r){var n=t._binBE.ui8;return n[0]=e[r+3],n[1]=e[r+2],n[2]=e[r+1],n[3]=e[r+0],t._binBE.i32[0]},readUint:function(e,r){var n=t._binBE.ui8;return n[0]=e[r+3],n[1]=e[r+2],n[2]=e[r+1],n[3]=e[r+0],t._binBE.ui32[0]},readASCII:function(e,t,r){for(var n=\"\",i=0;i__left_angle_mark_r;i++)n+=String.fromCharCode(e[t+i]);return n},readFloat:function(e,r){for(var n=t._binBE.ui8,i=0;i__left_angle_mark_4;i++)n[i]=e[r+3-i];return t._binBE.fl32[0]},readDouble:function(e,r){for(var n=t._binBE.ui8,i=0;i__left_angle_mark_8;i++)n[i]=e[r+7-i];return t._binBE.fl64[0]},writeUshort:function(e,t,r){e[t]=r>>8&255,e[t+1]=255&r},writeInt:function(e,r,n){var i=t._binBE.ui8;t._binBE.i32[0]=n,e[r+3]=i[0],e[r+2]=i[1],e[r+1]=i[2],e[r+0]=i[3]},writeUint:function(e,t,r){e[t]=r>>24&255,e[t+1]=r>>16&255,e[t+2]=r>>8&255,e[t+3]=255&r},writeASCII:function(e,t,r){for(var n=0;n__left_angle_mark_r.length;n++)e[t+n]=r.charCodeAt(n)},writeDouble:function(e,r,n){t._binBE.fl64[0]=n;for(var i=0;i__left_angle_mark_8;i++)e[r+i]=t._binBE.ui8[7-i]}},t._binBE.ui8=new Uint8Array(8),t._binBE.i16=new Int16Array(t._binBE.ui8.buffer),t._binBE.i32=new Int32Array(t._binBE.ui8.buffer),t._binBE.ui32=new Uint32Array(t._binBE.ui8.buffer),t._binBE.fl32=new Float32Array(t._binBE.ui8.buffer),t._binBE.fl64=new Float64Array(t._binBE.ui8.buffer),t._binLE={nextZero:t._binBE.nextZero,readUshort:function(e,t){return e[t+1]__left_angle_mark___left_angle_mark_8|e[t]},readShort:function(e,r){var n=t._binBE.ui8;return n[0]=e[r+0],n[1]=e[r+1],t._binBE.i16[0]},readInt:function(e,r){var n=t._binBE.ui8;return n[0]=e[r+0],n[1]=e[r+1],n[2]=e[r+2],n[3]=e[r+3],t._binBE.i32[0]},readUint:function(e,r){var n=t._binBE.ui8;return n[0]=e[r+0],n[1]=e[r+1],n[2]=e[r+2],n[3]=e[r+3],t._binBE.ui32[0]},readASCII:t._binBE.readASCII,readFloat:function(e,r){for(var n=t._binBE.ui8,i=0;i__left_angle_mark_4;i++)n[i]=e[r+i];return t._binBE.fl32[0]},readDouble:function(e,r){for(var n=t._binBE.ui8,i=0;i__left_angle_mark_8;i++)n[i]=e[r+i];return t._binBE.fl64[0]},writeUshort:function(e,t,r){e[t]=255&r,e[t+1]=r>>8&255},writeInt:function(e,r,n){var i=t._binBE.ui8;t._binBE.i32[0]=n,e[r+0]=i[0],e[r+1]=i[1],e[r+2]=i[2],e[r+3]=i[3]},writeUint:function(e,t,r){e[t]=r>>>0&255,e[t+1]=r>>>8&255,e[t+2]=r>>>16&255,e[t+3]=r>>>24&255},writeASCII:t._binBE.writeASCII},t._copyTile=function(e,t,r,n,i,o,a,s){for(var l=Math.min(t,i-a),u=Math.min(r,o-s),c=0;c__left_angle_mark_u;c++)for(var d=(s+c)*i+a,h=c*t,f=0;f__left_angle_mark_l;f++)n[d+f]=e[h+f]},t.LosslessJpegDecode=function(){var e,t;function r(){return e[t++]}function n(){return e[t++]__left_angle_mark___left_angle_mark_8|e[t++]}function i(e){for(var t=r(),n=[0,0,0,255],i=[],a=0;a__left_angle_mark_16;a++)i[a]=r();for(a=0;a__left_angle_mark_16;a++)for(var s=0;s__left_angle_mark_i[a];s++)n[o(n,0,a+1,1)+3]=r();var l=new Uint8Array(256);for(e[t]=[new Uint8Array(n),l],a=0;a__left_angle_mark_256;a++){for(var u=8,c=a,d=0;255==n[d+3]&&0!=u;)d=n[d+(c>>--u&1)];l[a]=d}}function o(e,t,r,n){if(255!=e[t+3])return 0;if(0==r)return t;for(var i=0;i__left_angle_mark_2;i++){0==e[t+i]&&(e[t+i]=e.length,e.push(0,0,n,255));var a=o(e,e[t+i],r-1,n+1);if(0!=a)return a}return 0}function a(e){for(var t=e.b,r=e.a;t__left_angle_mark_25&&e.e__left_angle_mark_e.d;){var n=e.data[e.e++];e.c||(e.e+=n+1>>>8),r=r__left_angle_mark___left_angle_mark_8|n,t+=8}if(t__left_angle_mark_0)throw\"e\";e.b=t,e.a=r}function s(e,t){return t.b__left_angle_mark_e&&a(t),t.a>>(t.b-=e)&65535>>16-e}function l(e,t){var r=e[0],n=0,i=255;t.b__left_angle_mark_16&&a(t);var o=t.a>>t.b-8&255;for(i=r[(n=e[1][o])+3],t.b-=r[n+2];255==i;)i=r[(n=r[n+(t.a>>--t.b&1)])+3];return i}function u(e,t){return e__left_angle_mark_32768>>16-t&&(e+=1-(1__left_angle_mark___left_angle_mark_t)),e}function c(e,t){var r=l(e,t);return 0==r?0:16==r?-32768:u(s(r,t),r)}function d(e,t,r,n,i,o){for(var a=0;a__left_angle_mark_o;a++)for(var s=a*t,l=0;l__left_angle_mark_t;l+=i)for(var u=0;u__left_angle_mark_i;u++)e[s+l+u]=c(n[u],r)}function h(e,t){return u(s(e,t),e)}function f(e,t,r,n,i,o,a,s){for(var l=r*a,u=i;u__left_angle_mark_o;u++)e[u]+=1__left_angle_mark___left_angle_mark_s-1;for(var c=a;c__left_angle_mark_l;c+=a)for(u=i;u__left_angle_mark_o;u++)e[c+u]+=e[c+u-a];for(var d=1;d__left_angle_mark_n;d++){var h=d*l;for(u=i;u__left_angle_mark_o;u++)e[h+u]+=e[h+u-l];for(c=a;c__left_angle_mark_l;c+=a)for(u=i;u__left_angle_mark_o;u++){var f=h+c+u,p=f-l,m=e[f-a],g=0;if(0==t)g=0;else if(1==t)g=m;else if(2==t)g=e[p];else if(3==t)g=e[p-a];else if(4==t)g=m+(e[p]-e[p-a]);else if(5==t)g=m+(e[p]-e[p-a]>>>1);else if(6==t)g=e[p]+(m-e[p-a]>>>1);else{if(7!=t)throw t;g=m+e[p]>>>1}e[f]+=g}}}return function(o){if(e=o,t=0,65496!=n())throw\"e\";for(var a=[],s=0,u=0,c=[],p=[],m=[],g=0,_=0,b=0;;){var y=n();if(65535!=y){var v=n();if(65475==y){u=r(),_=n(),b=n(),g=r();for(var A=0;A__left_angle_mark_g;A++){var w=r(),S=r();if(0!=r())throw\"e\";a[w]=[A,S>>4,15&S]}}else if(65476==y)for(var E=t+v-2;t__left_angle_mark_E;)i(p);else{if(65498==y){for(t++,A=0;A__left_angle_mark_g;A++){var x=a[r()];m[x[0]]=p[r()>>>4],c[x[0]]=x.slice(1)}s=r(),t+=2;break}t+=v-2}}else t--}var C=new(u>8?Uint16Array:Uint8Array)(_*b*g),T={b:0,a:0,c:8==s,e:t,data:e,d:e.length};if(T.c)!function(r,n,i,o,a){for(var s=e.length-t,u=0;u__left_angle_mark_s;u+=4){var c=e[t+u];e[t+u]=e[t+u+3],e[t+u+3]=c,c=e[t+u+1],e[t+u+1]=e[t+u+2],e[t+u+2]=c}for(var d=0;d__left_angle_mark_a;d++)for(var f=32768,p=32768,m=0;m__left_angle_mark_n;m+=2){var g=l(o,i),_=l(o,i);0!=g&&(f+=h(g,i)),0!=_&&(p+=h(_,i)),r[d*n+m]=65535&f,r[d*n+m+1]=65535&p}}(C,b*g,T,m[0],_);else{var R=[],I=0,k=0;for(A=0;A__left_angle_mark_g;A++){var P=c[A];(F=P[0])>I&&(I=F),(D=P[1])>k&&(k=D),R.push(F*D)}if(1!=I||1!=k){var M=[],O=0;for(A=0;A__left_angle_mark_g;A++){for(var B=0;B__left_angle_mark_R[A];B++)M.push(m[A]);O+=R[A]}var N=b/I,j=_/k;d(C,N*O,T,M,O,j),f(C,s,N,j,O-2,O,O,u);for(var L=C.slice(0),D=0;D__left_angle_mark__;D++)for(var F=0;F__left_angle_mark_b;F++){var U=(D*b+F)*g,z=~~(D/k)*N+~~(F/I),q=0;for(A=0;A__left_angle_mark_g;A++){var G=1&F,H=z*O+q+(0==A?1==k?G:2*G+(1&D):0);C[U+A]=L[H],q+=R[A]}}f(C,s,b,_,0,1,g,u)}else d(C,b*g,T,m,g,_),f(C,s,b,_,0,g,g,u)}return C}}(),function(){var e=5,r=6,n=13,i=14;function o(e){for(var t=[[],[],[]],r=Math.max(2,e.w+32>>>6),n=0;n__left_angle_mark_3;n++)for(var i=0;i__left_angle_mark_41;i++)t[n][i]=[r,1];return t}function a(e,t){var r=0,n=8-e.a;if(e.j,e.a,t){if(t>=n)do{r__left_angle_mark___left_angle_mark_=n,t-=n,r|=e[e.j]&(1__left_angle_mark___left_angle_mark_n)-1,e.j++,n=8}while(t>=8);t&&(r__left_angle_mark___left_angle_mark_=t,n-=t,r|=e[e.j]>>>n&(1__left_angle_mark___left_angle_mark_t)-1),e.a=8-n}return r}function s(e,t,r,n,i,o,s,l){null==l&&(l=0);var u,c,d,h,f,p,m=o+1,g=m%2,_=0,b=n[i],y=n[i-1],v=n[i-2][m],A=y[m-1],w=y[m],S=y[m+1],E=b[m-1],x=b[m+1],C=Math.abs;if(g&&(d=C(S-w),h=C(v-w),f=C(A-w)),g){if(p=(p=d>f&&h__left_angle_mark_d?v+A:d__left_angle_mark_f&&h__left_angle_mark_f?v+S:S+A)+2*w>>>2,l)return void(b[m]=p);u=t.t*t.c[e.g+w-v]+t.c[e.g+A-w]}else p=w>A&&w>S||w__left_angle_mark_A&&w__left_angle_mark_S?x+E+2*w>>>2:E+x>>>1,u=t.t*t.c[e.g+w-A]+t.c[e.g+A-E];c=C(u);var T=function(e){for(var t=-1,r=0;!r;t++)r=e[e.j]>>>7-e.a&1,e.a++,e.a&=7,e.a||e.j++;return t}(r);if(T__left_angle_mark_e.n-t.v-1){var R=function(e,t){var r=0;if(t__left_angle_mark_e)for(;r__left_angle_mark_=14&&t__left_angle_mark___left_angle_mark_++r__left_angle_mark_e;);return r}(s[c][0],s[c][1]);_=a(r,R)+(T__left_angle_mark___left_angle_mark_R)}else _=a(r,t.v)+1;_=1&_?-1-(_>>>1):_>>>1,s[c][0]+=C(_),s[c][1]==e.f&&(s[c][0]>>>=1,s[c][1]>>>=1),s[c][1]++,p=u__left_angle_mark_0?p-_:p+_,e.i&&(p__left_angle_mark_0?p+=t.w:p>e.g&&(p-=t.w)),b[m]=p>=0?Math.min(p,e.g):0}function l(e,t,r){for(var n=e[0].length,i=t;i__left_angle_mark_=r;i++)e[i][0]=e[i-1][1],e[i][n-1]=e[i-1][n-2]}function u(e){l(e,7,12),l(e,2,4),l(e,15,17)}function c(e,t,r,i,o,a,l,c,d,h,f,p,m){for(var g=0,_=1,b=o__left_angle_mark_n&&o>4;___left_angle_mark_e.m;)g__left_angle_mark_e.m&&(s(e,t,r,i,o,g,l[d],e.h&&(b&&h||!b&&(f||(g&p)==m))),s(e,t,r,i,a,g,l[d],e.h&&(!b&&h||b&&(f||(g&p)==m))),g+=2),g>8&&(s(e,t,r,i,o,_,c[d]),s(e,t,r,i,a,_,c[d]),_+=2);u(i)}function d(e,t,r,n,i,o){c(e,t,r,n,2,7,i,o,0,0,1,0,8),c(e,t,r,n,8,15,i,o,1,0,1,0,8),c(e,t,r,n,3,9,i,o,2,1,0,3,0),c(e,t,r,n,10,16,i,o,0,0,0,3,2),c(e,t,r,n,4,11,i,o,1,0,0,3,2),c(e,t,r,n,12,17,i,o,2,1,0,3,0)}function h(e,t,r,n,i,o){var a=o.length,s=e.l;i+1==e.s&&(s=e.e-i*e.l);for(var l=6*e.e*n+i*e.l,u=0;u__left_angle_mark_6;u++){for(var c=0;c__left_angle_mark_s;c++){var d,h=o[u%a][c%a];d=0==h?2+(u>>>1):2==h?15+(u>>>1):7+u;var f=e.h?(2*c/3&2147483646|c%3&1)+(c%3>>>1):c>>>1;t[l+c]=r[d][f+1]}l+=e.e}}t._decompressRAF=function(a,s){var l,c,f,p,m,g=function(e){var r=t._binBE.readUshort,n={b:r(e,0),i:e[2],C:e[3],u:e[4],q:r(e,5),k:r(e,7),e:r(e,9),l:r(e,11),s:e[13],d:r(e,14)};if(18771!=n.b||n.i>1||n.q__left_angle_mark_6||n.q%6||n.e__left_angle_mark_768||n.e%24||768!=n.l||n.k__left_angle_mark_n.l||n.k%n.l||n.k-n.e>=n.l||n.s>16||n.s!=n.k/n.l||n.s!=Math.ceil(n.e/n.l)||n.d!=n.q/6||12!=n.u&&14!=n.u&&16!=n.u||16!=n.C&&0!=n.C)throw\"Invalid data\";if(0==n.i)throw\"Not implemented. We need this file!\";return n.h=16==n.C,n.m=0|(n.h?2*n.l/3:n.l>>>1),n.A=n.m+2,n.f=64,n.g=(1__left_angle_mark___left_angle_mark_n.u)-1,n.n=4*n.u,n}(a),_=function(e,r){var n=new Array(r.s),i=4*r.s,o=16+i;12&i&&(o+=16-(12&i));for(var a=0,s=16;a__left_angle_mark_r.s;s+=4){var l=t._binBE.readUint(e,s);n[a]=e.slice(o,o+l),n[a].j=0,n[a].a=0,o+=l,a++}if(o!=e.length)throw\"Invalid data\";return n}(a,g),b=(l=g,m={c:new Int8Array(2__left_angle_mark___left_angle_mark_l.u)},c=m,f=l.g,p=[0,18,67,276,f],c.o=0,c.w=(p[4]+0)/1+1|0,c.v=Math.ceil(Math.log2(c.w)),c.t=9,function(e,t){for(var r=-t[4],n=0;r__left_angle_mark_=t[4];n++,r++)e[n]=r__left_angle_mark_=-t[3]?-4:r__left_angle_mark_=-t[2]?-3:r__left_angle_mark_=-t[1]?-2:r__left_angle_mark_-t[0]?-1:r__left_angle_mark_=t[0]?0:r__left_angle_mark_t[1]?1:r__left_angle_mark_t[2]?2:r__left_angle_mark_t[3]?3:4}(c.c,p),m),y=new Int16Array(g.e*g.q);null==s&&(s=g.h?[[1,1,0,1,1,2],[1,1,2,1,1,0],[2,0,1,0,2,1],[1,1,2,1,1,0],[1,1,0,1,1,2],[0,2,1,2,0,1]]:[[0,1],[3,2]]);for(var v=[[0,3],[1,4],[e,11],[r,12],[n,16],[i,17]],A=[],w=0;w__left_angle_mark_18;w++)A[w]=new Uint16Array(g.A);for(var S=0;S__left_angle_mark_g.s;S++){var E=o(b),x=o(b);for(w=0;w__left_angle_mark_18;w++)for(var C=0;C__left_angle_mark_g.A;C++)A[w][C]=0;for(var T=0;T__left_angle_mark_g.d;T++){for(d(g,b,_[S],A,E,x),w=0;w__left_angle_mark_6;w++)for(C=0;C__left_angle_mark_g.A;C++)A[v[w][0]][C]=A[v[w][1]][C];for(h(g,y,A,T,S,s),w=2;w__left_angle_mark_18;w++)if(-1==[e,r,n,i].indexOf(w))for(C=0;C__left_angle_mark_g.A;C++)A[w][C]=0;u(A)}}return y}}()}()},6168:(e,t,r)=>{r.r(t),r.d(t,{DOMException:()=>A,Headers:()=>c,Request:()=>_,Response:()=>y,fetch:()=>w});var n=\"undefined\"!=typeof globalThis&&globalThis||\"undefined\"!=typeof self&&self||void 0!==n&&n,i={searchParams:\"URLSearchParams\"in n,iterable:\"Symbol\"in n&&\"iterator\"in Symbol,blob:\"FileReader\"in n&&\"Blob\"in n&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:\"FormData\"in n,arrayBuffer:\"ArrayBuffer\"in n};if(i.arrayBuffer)var o=[\"[object Int8Array]\",\"[object Uint8Array]\",\"[object Uint8ClampedArray]\",\"[object Int16Array]\",\"[object Uint16Array]\",\"[object Int32Array]\",\"[object Uint32Array]\",\"[object Float32Array]\",\"[object Float64Array]\"],a=ArrayBuffer.isView||function(e){return e&&o.indexOf(Object.prototype.toString.call(e))>-1};function s(e){if(\"string\"!=typeof e&&(e=String(e)),/[^a-z0-9\\-#$%&'*+.^_`|~!]/i.test(e)||\"\"===e)throw new TypeError('Invalid character in header field name: \"'+e+'\"');return e.toLowerCase()}function l(e){return\"string\"!=typeof e&&(e=String(e)),e}function u(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return i.iterable&&(t[Symbol.iterator]=function(){return t}),t}function c(e){this.map={},e instanceof c?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function d(e){if(e.bodyUsed)return Promise.reject(new TypeError(\"Already read\"));e.bodyUsed=!0}function h(e){return new Promise((function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}}))}function f(e){var t=new FileReader,r=h(t);return t.readAsArrayBuffer(e),r}function p(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function m(){return this.bodyUsed=!1,this._initBody=function(e){var t;this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?\"string\"==typeof e?this._bodyText=e:i.blob&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:i.formData&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:i.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():i.arrayBuffer&&i.blob&&(t=e)&&DataView.prototype.isPrototypeOf(t)?(this._bodyArrayBuffer=p(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):i.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(e)||a(e))?this._bodyArrayBuffer=p(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText=\"\",this.headers.get(\"content-type\")||(\"string\"==typeof e?this.headers.set(\"content-type\",\"text/plain;charset=UTF-8\"):this._bodyBlob&&this._bodyBlob.type?this.headers.set(\"content-type\",this._bodyBlob.type):i.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set(\"content-type\",\"application/x-www-form-urlencoded;charset=UTF-8\"))},i.blob&&(this.blob=function(){var e=d(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error(\"could not read FormData body as blob\");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?d(this)||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer)):this.blob().then(f)}),this.text=function(){var e,t,r,n=d(this);if(n)return n;if(this._bodyBlob)return e=this._bodyBlob,r=h(t=new FileReader),t.readAsText(e),r;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),r=new Array(t.length),n=0;n__left_angle_mark_t.length;n++)r[n]=String.fromCharCode(t[n]);return r.join(\"\")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error(\"could not read FormData body as text\");return Promise.resolve(this._bodyText)},i.formData&&(this.formData=function(){return this.text().then(b)}),this.json=function(){return this.text().then(JSON.parse)},this}c.prototype.append=function(e,t){e=s(e),t=l(t);var r=this.map[e];this.map[e]=r?r+\", \"+t:t},c.prototype.delete=function(e){delete this.map[s(e)]},c.prototype.get=function(e){return e=s(e),this.has(e)?this.map[e]:null},c.prototype.has=function(e){return this.map.hasOwnProperty(s(e))},c.prototype.set=function(e,t){this.map[s(e)]=l(t)},c.prototype.forEach=function(e,t){for(var r in this.map)this.map.hasOwnProperty(r)&&e.call(t,this.map[r],r,this)},c.prototype.keys=function(){var e=[];return this.forEach((function(t,r){e.push(r)})),u(e)},c.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),u(e)},c.prototype.entries=function(){var e=[];return this.forEach((function(t,r){e.push([r,t])})),u(e)},i.iterable&&(c.prototype[Symbol.iterator]=c.prototype.entries);var g=[\"DELETE\",\"GET\",\"HEAD\",\"OPTIONS\",\"POST\",\"PUT\"];function _(e,t){if(!(this instanceof _))throw new TypeError('Please use the \"new\" operator, this DOM object constructor cannot be called as a function.');var r,n,i=(t=t||{}).body;if(e instanceof _){if(e.bodyUsed)throw new TypeError(\"Already read\");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new c(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,i||null==e._bodyInit||(i=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||\"same-origin\",!t.headers&&this.headers||(this.headers=new c(t.headers)),this.method=(n=(r=t.method||this.method||\"GET\").toUpperCase(),g.indexOf(n)>-1?n:r),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,(\"GET\"===this.method||\"HEAD\"===this.method)&&i)throw new TypeError(\"Body not allowed for GET or HEAD requests\");if(this._initBody(i),!(\"GET\"!==this.method&&\"HEAD\"!==this.method||\"no-store\"!==t.cache&&\"no-cache\"!==t.cache)){var o=/([?&])_=[^&]*/;o.test(this.url)?this.url=this.url.replace(o,\"$1_=\"+(new Date).getTime()):this.url+=(/\\?/.test(this.url)?\"&\":\"?\")+\"_=\"+(new Date).getTime()}}function b(e){var t=new FormData;return e.trim().split(\"&\").forEach((function(e){if(e){var r=e.split(\"=\"),n=r.shift().replace(/\\+/g,\" \"),i=r.join(\"=\").replace(/\\+/g,\" \");t.append(decodeURIComponent(n),decodeURIComponent(i))}})),t}function y(e,t){if(!(this instanceof y))throw new TypeError('Please use the \"new\" operator, this DOM object constructor cannot be called as a function.');t||(t={}),this.type=\"default\",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status__left_angle_mark_300,this.statusText=void 0===t.statusText?\"\":\"\"+t.statusText,this.headers=new c(t.headers),this.url=t.url||\"\",this._initBody(e)}_.prototype.clone=function(){return new _(this,{body:this._bodyInit})},m.call(_.prototype),m.call(y.prototype),y.prototype.clone=function(){return new y(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new c(this.headers),url:this.url})},y.error=function(){var e=new y(null,{status:0,statusText:\"\"});return e.type=\"error\",e};var v=[301,302,303,307,308];y.redirect=function(e,t){if(-1===v.indexOf(t))throw new RangeError(\"Invalid status code\");return new y(null,{status:t,headers:{location:e}})};var A=n.DOMException;try{new A}catch(S){(A=function(e,t){this.message=e,this.name=t;var r=Error(e);this.stack=r.stack}).prototype=Object.create(Error.prototype),A.prototype.constructor=A}function w(e,t){return new Promise((function(r,o){var a=new _(e,t);if(a.signal&&a.signal.aborted)return o(new A(\"Aborted\",\"AbortError\"));var s=new XMLHttpRequest;function u(){s.abort()}s.onload=function(){var e,t,n={status:s.status,statusText:s.statusText,headers:(e=s.getAllResponseHeaders()||\"\",t=new c,e.replace(/\\r?\\n[\\t ]+/g,\" \").split(\"\\r\").map((function(e){return 0===e.indexOf(\"\\n\")?e.substr(1,e.length):e})).forEach((function(e){var r=e.split(\":\"),n=r.shift().trim();if(n){var i=r.join(\":\").trim();t.append(n,i)}})),t)};n.url=\"responseURL\"in s?s.responseURL:n.headers.get(\"X-Request-URL\");var i=\"response\"in s?s.response:s.responseText;setTimeout((function(){r(new y(i,n))}),0)},s.onerror=function(){setTimeout((function(){o(new TypeError(\"Network request failed\"))}),0)},s.ontimeout=function(){setTimeout((function(){o(new TypeError(\"Network request failed\"))}),0)},s.onabort=function(){setTimeout((function(){o(new A(\"Aborted\",\"AbortError\"))}),0)},s.open(a.method,function(e){try{return\"\"===e&&n.location.href?n.location.href:e}catch(t){return e}}(a.url),!0),\"include\"===a.credentials?s.withCredentials=!0:\"omit\"===a.credentials&&(s.withCredentials=!1),\"responseType\"in s&&(i.blob?s.responseType=\"blob\":i.arrayBuffer&&a.headers.get(\"Content-Type\")&&-1!==a.headers.get(\"Content-Type\").indexOf(\"application/octet-stream\")&&(s.responseType=\"arraybuffer\")),!t||\"object\"!=typeof t.headers||t.headers instanceof c?a.headers.forEach((function(e,t){s.setRequestHeader(t,e)})):Object.getOwnPropertyNames(t.headers).forEach((function(e){s.setRequestHeader(e,l(t.headers[e]))})),a.signal&&(a.signal.addEventListener(\"abort\",u),s.onreadystatechange=function(){4===s.readyState&&a.signal.removeEventListener(\"abort\",u)}),s.send(void 0===a._bodyInit?null:a._bodyInit)}))}w.polyfill=!0,n.fetch||(n.fetch=w,n.Headers=c,n.Request=_,n.Response=y)},6290:(e,t,r)=>{var n=r(5048),i=r(9748),o=r(4655),a=r(1960);function s(e,t,r){var n=e;return i(t)?(r=t,\"string\"==typeof e&&(n={uri:e})):n=a(t,{uri:e}),n.callback=r,n}function l(e,t,r){return u(t=s(e,t,r))}function u(e){if(void 0===e.callback)throw new Error(\"callback argument missing\");var t=!1,r=function(r,n,i){t||(t=!0,e.callback(r,n,i))};function n(){var e=void 0;if(e=c.response?c.response:c.responseText||function(e){try{if(\"document\"===e.responseType)return e.responseXML;var t=e.responseXML&&\"parsererror\"===e.responseXML.documentElement.nodeName;if(\"\"===e.responseType&&!t)return e.responseXML}catch(r){}return null}(c),_)try{e=JSON.parse(e)}catch(t){}return e}function i(e){return clearTimeout(d),e instanceof Error||(e=new Error(\"\"+(e||\"Unknown XMLHttpRequest Error\"))),e.statusCode=0,r(e,b)}function a(){if(!u){var t;clearTimeout(d),t=e.useXDR&&void 0===c.status?200:1223===c.status?204:c.status;var i=b,a=null;return 0!==t?(i={body:n(),statusCode:t,method:f,headers:{},url:h,rawRequest:c},c.getAllResponseHeaders&&(i.headers=o(c.getAllResponseHeaders()))):a=new Error(\"Internal XMLHttpRequest Error\"),r(a,i,i.body)}}var s,u,c=e.xhr||null;c||(c=e.cors||e.useXDR?new l.XDomainRequest:new l.XMLHttpRequest);var d,h=c.url=e.uri||e.url,f=c.method=e.method||\"GET\",p=e.body||e.data,m=c.headers=e.headers||{},g=!!e.sync,_=!1,b={body:void 0,headers:{},statusCode:0,method:f,url:h,rawRequest:c};if(\"json\"in e&&!1!==e.json&&(_=!0,m.accept||m.Accept||(m.Accept=\"application/json\"),\"GET\"!==f&&\"HEAD\"!==f&&(m[\"content-type\"]||m[\"Content-Type\"]||(m[\"Content-Type\"]=\"application/json\"),p=JSON.stringify(!0===e.json?p:e.json))),c.onreadystatechange=function(){4===c.readyState&&setTimeout(a,0)},c.onload=a,c.onerror=i,c.onprogress=function(){},c.onabort=function(){u=!0},c.ontimeout=i,c.open(f,h,!g,e.username,e.password),g||(c.withCredentials=!!e.withCredentials),!g&&e.timeout>0&&(d=setTimeout((function(){if(!u){u=!0,c.abort(\"timeout\");var e=new Error(\"XMLHttpRequest timeout\");e.code=\"ETIMEDOUT\",i(e)}}),e.timeout)),c.setRequestHeader)for(s in m)m.hasOwnProperty(s)&&c.setRequestHeader(s,m[s]);else if(e.headers&&!function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}(e.headers))throw new Error(\"Headers cannot be set on an XDomainRequest object\");return\"responseType\"in e&&(c.responseType=e.responseType),\"beforeSend\"in e&&\"function\"==typeof e.beforeSend&&e.beforeSend(c),c.send(p||null),c}e.exports=l,e.exports.default=l,l.XMLHttpRequest=n.XMLHttpRequest||function(){},l.XDomainRequest=\"withCredentials\"in new l.XMLHttpRequest?l.XMLHttpRequest:n.XDomainRequest,function(e,t){for(var r=0;r__left_angle_mark_e.length;r++)t(e[r])}([\"get\",\"put\",\"post\",\"patch\",\"head\",\"delete\"],(function(e){l[\"delete\"===e?\"del\":e]=function(t,r,n){return(r=s(t,r,n)).method=e.toUpperCase(),u(r)}}))},1596:e=>{e.exports=void 0!==self.DOMParser?function(e){return(new self.DOMParser).parseFromString(e,\"application/xml\")}:void 0!==self.ActiveXObject&&new self.ActiveXObject(\"Microsoft.XMLDOM\")?function(e){var t=new self.ActiveXObject(\"Microsoft.XMLDOM\");return t.async=\"false\",t.loadXML(e),t}:function(e){var t=document.createElement(\"div\");return t.innerHTML=e,t}},1960:e=>{e.exports=function(){for(var e={},r=0;r__left_angle_mark_arguments.length;r++){var n=arguments[r];for(var i in n)t.call(n,i)&&(e[i]=n[i])}return e};var t=Object.prototype.hasOwnProperty},8522:()=>{},6777:()=>{},5546:()=>{},2460:(e,t,r)=>{var n,i=r(4406),o=Object.defineProperty,a=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,l=Object.prototype.hasOwnProperty,u=(e,t)=>{for(var r in t)o(e,r,{get:t[r],enumerable:!0})},c=(n=\"undefined\"!=typeof WeakMap?new WeakMap:0,(e,t)=>n&&n.get(e)||(t=((e,t,r,n)=>{if(t&&\"object\"==typeof t||\"function\"==typeof t)for(let i of s(t))l.call(e,i)||o(e,i,{get:()=>t[i],enumerable:!(n=a(t,i))||n.enumerable});return e})(o({},\"__esModule\",{value:!0}),e),n&&n.set(e,t),t)),d=(e,t,r)=>{return a=r,(i=\"symbol\"!=typeof t?t+\"\":t)in(n=e)?o(n,i,{enumerable:!0,configurable:!0,writable:!0,value:a}):n[i]=a,r;var n,i,a},h={};u(h,{applyPalette:()=>tt,applyPaletteSync:()=>et,buildPalette:()=>Ze,buildPaletteSync:()=>Qe,constants:()=>f,conversion:()=>b,distance:()=>H,image:()=>je,palette:()=>se,quality:()=>We,utils:()=>fe});var f={};u(f,{bt709:()=>p});var p={};u(p,{Y:()=>m,x:()=>g,y:()=>_});var m=(e=>(e[e.RED=.2126]=\"RED\",e[e.GREEN=.7152]=\"GREEN\",e[e.BLUE=.0722]=\"BLUE\",e[e.WHITE=1]=\"WHITE\",e))(m||{}),g=(e=>(e[e.RED=.64]=\"RED\",e[e.GREEN=.3]=\"GREEN\",e[e.BLUE=.15]=\"BLUE\",e[e.WHITE=.3127]=\"WHITE\",e))(g||{}),_=(e=>(e[e.RED=.33]=\"RED\",e[e.GREEN=.6]=\"GREEN\",e[e.BLUE=.06]=\"BLUE\",e[e.WHITE=.329]=\"WHITE\",e))(_||{}),b={};function y(e){return e>.04045?((e+.055)/1.055)**2.4:e/12.92}function v(e,t,r){return{x:.4124*(e=y(e/255))+.3576*(t=y(t/255))+.1805*(r=y(r/255)),y:.2126*e+.7152*t+.0722*r,z:.0193*e+.1192*t+.9505*r}}u(b,{lab2rgb:()=>G,lab2xyz:()=>U,rgb2hsl:()=>I,rgb2lab:()=>N,rgb2xyz:()=>v,xyz2lab:()=>B,xyz2rgb:()=>q});var A={};function w(e){return e*(Math.PI/180)}function S(e,t,r){let n=e;return n__left_angle_mark_t&&(n=t),n__left_angle_mark_r&&(n=r),n}function E(e,t,r){let n=e;return n>t&&(n=t),n>r&&(n=r),n}function x(e,t,r){return e>r&&(e=r),e__left_angle_mark_t&&(e=t),0|e}function C(e){return(e=Math.round(e))>255?e=255:e__left_angle_mark_0&&(e=0),e}function T(e){return e>255?e=255:e__left_angle_mark_0&&(e=0),e}function R(e,t){const r=typeof e[0];let n;if(\"number\"===r||\"string\"===r){const r=Object.create(null);for(let t=0,n=e.length;t__left_angle_mark_n;t++){const n=e[t];r[n]||0===r[n]||(r[n]=t)}n=e.sort(((e,n)=>t(e,n)||r[e]-r[n]))}else{const r=e.slice(0);n=e.sort(((e,n)=>t(e,n)||r.indexOf(e)-r.indexOf(n)))}return n}function I(e,t,r){const n=E(e,t,r),i=S(e,t,r),o=i-n,a=(n+i)/510;let s=0;a>0&&a__left_angle_mark_1&&(s=o/(a__left_angle_mark_.5?i+n:510-i-n));let l=0;return o>0&&(l=i===e?(t-r)/o:i===t?2+(r-e)/o:4+(e-t)/o,l*=60,l__left_angle_mark_0&&(l+=360)),{h:l,s:s,l:a}}u(A,{degrees2radians:()=>w,inRange0to255:()=>T,inRange0to255Rounded:()=>C,intInRange:()=>x,max3:()=>S,min3:()=>E,stableSort:()=>R});var k=.95047,P=1,M=1.08883;function O(e){return e>.008856?e**(1/3):7.787*e+16/116}function B(e,t,r){if(e=O(e/k),t=O(t/P),r=O(r/M),116*t-16__left_angle_mark_0)throw new Error(\"xxx\");return{L:Math.max(0,116*t-16),a:500*(e-t),b:200*(t-r)}}function N(e,t,r){const n=v(e,t,r);return B(n.x,n.y,n.z)}var j=.95047,L=1,D=1.08883;function F(e){return e>.206893034?e**3:(e-16/116)/7.787}function U(e,t,r){const n=(e+16)/116,i=n-r/200;return{x:j*F(t/500+n),y:L*F(n),z:D*F(i)}}function z(e){return e>.0031308?1.055*e**(1/2.4)-.055:12.92*e}function q(e,t,r){const n=z(3.2406*e+-1.5372*t+-.4986*r),i=z(-.9689*e+1.8758*t+.0415*r),o=z(.0557*e+-.204*t+1.057*r);return{r:C(255*n),g:C(255*i),b:C(255*o)}}function G(e,t,r){const n=U(e,t,r);return q(n.x,n.y,n.z)}var H={};u(H,{AbstractDistanceCalculator:()=>W,AbstractEuclidean:()=>Q,AbstractManhattan:()=>re,CIE94GraphicArts:()=>K,CIE94Textiles:()=>$,CIEDE2000:()=>Y,CMetric:()=>J,Euclidean:()=>Z,EuclideanBT709:()=>ee,EuclideanBT709NoAlpha:()=>te,Manhattan:()=>ne,ManhattanBT709:()=>oe,ManhattanNommyde:()=>ie,PNGQuant:()=>ae});var W=class{setWhitePoint(e,t,r,n){this._whitePoint={r:e>0?255/e:0,g:t>0?255/t:0,b:r>0?255/r:0,a:n>0?255/n:0},this._maxDistance=this.calculateRaw(e,t,r,n,0,0,0,0)}calculateNormalized(e,t){return this.calculateRaw(e.r,e.g,e.b,e.a,t.r,t.g,t.b,t.a)/this._maxDistance}constructor(){d(this,\"_maxDistance\"),d(this,\"_whitePoint\"),this._setDefaults(),this.setWhitePoint(255,255,255,255)}},V=class extends W{calculateRaw(e,t,r,n,i,o,a,s){const l=N(T(e*this._whitePoint.r),T(t*this._whitePoint.g),T(r*this._whitePoint.b)),u=N(T(i*this._whitePoint.r),T(o*this._whitePoint.g),T(a*this._whitePoint.b)),c=l.L-u.L,d=l.a-u.a,h=l.b-u.b,f=Math.sqrt(l.a*l.a+l.b*l.b),p=f-Math.sqrt(u.a*u.a+u.b*u.b);let m=d*d+h*h-p*p;m=m__left_angle_mark_0?0:Math.sqrt(m);const g=(s-n)*this._whitePoint.a*this._kA;return Math.sqrt((c/this._Kl)**2+(p/(1+this._K1*f))**2+(m/(1+this._K2*f))**2+g**2)}},$=class extends V{_setDefaults(){this._Kl=2,this._K1=.048,this._K2=.014,this._kA=12.5/255}},K=class extends V{_setDefaults(){this._Kl=1,this._K1=.045,this._K2=.015,this._kA=25/255}},X=class extends W{_setDefaults(){}static _calculatehp(e,t){const r=Math.atan2(e,t);return r>=0?r:r+X._deg360InRad}static _calculateRT(e,t){const r=t**7,n=2*Math.sqrt(r/(r+X._pow25to7)),i=X._deg30InRad*Math.exp(-(((e-X._deg275InRad)/X._deg25InRad)**2));return-Math.sin(2*i)*n}static _calculateT(e){return 1-.17*Math.cos(e-X._deg30InRad)+.24*Math.cos(2*e)+.32*Math.cos(3*e+X._deg6InRad)-.2*Math.cos(4*e-X._deg63InRad)}static _calculate_ahp(e,t,r,n){const i=r+n;return 0===e?i:t__left_angle_mark_=X._deg180InRad?i/2:i__left_angle_mark_X._deg360InRad?(i+X._deg360InRad)/2:(i-X._deg360InRad)/2}static _calculate_dHp(e,t,r,n){let i;return i=0===e?0:t__left_angle_mark_=X._deg180InRad?r-n:r__left_angle_mark_=n?r-n+X._deg360InRad:r-n-X._deg360InRad,2*Math.sqrt(e)*Math.sin(i/2)}calculateRaw(e,t,r,n,i,o,a,s){const l=N(T(e*this._whitePoint.r),T(t*this._whitePoint.g),T(r*this._whitePoint.b)),u=N(T(i*this._whitePoint.r),T(o*this._whitePoint.g),T(a*this._whitePoint.b)),c=(s-n)*this._whitePoint.a*X._kA,d=this.calculateRawInLab(l,u);return Math.sqrt(d+c*c)}calculateRawInLab(e,t){const r=e.L,n=e.a,i=e.b,o=t.L,a=t.a,s=t.b,l=((Math.sqrt(n*n+i*i)+Math.sqrt(a*a+s*s))/2)**7,u=.5*(1-Math.sqrt(l/(l+X._pow25to7))),c=(1+u)*n,d=(1+u)*a,h=Math.sqrt(c*c+i*i),f=Math.sqrt(d*d+s*s),p=h*f,m=X._calculatehp(i,c),g=X._calculatehp(s,d),_=Math.abs(m-g),b=o-r,y=f-h,v=X._calculate_dHp(p,_,g,m),A=X._calculate_ahp(p,_,m,g),w=(h+f)/2,S=((r+o)/2-50)**2,E=y/(1+.045*w),x=v/(1+.015*X._calculateT(A)*w);return(b/(1+.015*S/Math.sqrt(20+S)))**2+E**2+x**2+X._calculateRT(A,w)*E*x}},Y=X;d(Y,\"_kA\",25/255),d(Y,\"_pow25to7\",25**7),d(Y,\"_deg360InRad\",w(360)),d(Y,\"_deg180InRad\",w(180)),d(Y,\"_deg30InRad\",w(30)),d(Y,\"_deg6InRad\",w(6)),d(Y,\"_deg63InRad\",w(63)),d(Y,\"_deg275InRad\",w(275)),d(Y,\"_deg25InRad\",w(25));var J=class extends W{calculateRaw(e,t,r,n,i,o,a,s){const l=(e+i)/2*this._whitePoint.r,u=(e-i)*this._whitePoint.r,c=(t-o)*this._whitePoint.g,d=(r-a)*this._whitePoint.b,h=((512+l)*u*u>>8)+4*c*c+((767-l)*d*d>>8),f=(s-n)*this._whitePoint.a;return Math.sqrt(h+f*f)}_setDefaults(){}},Q=class extends W{calculateRaw(e,t,r,n,i,o,a,s){const l=i-e,u=o-t,c=a-r,d=s-n;return Math.sqrt(this._kR*l*l+this._kG*u*u+this._kB*c*c+this._kA*d*d)}},Z=class extends Q{_setDefaults(){this._kR=1,this._kG=1,this._kB=1,this._kA=1}},ee=class extends Q{_setDefaults(){this._kR=.2126,this._kG=.7152,this._kB=.0722,this._kA=1}},te=class extends Q{_setDefaults(){this._kR=.2126,this._kG=.7152,this._kB=.0722,this._kA=0}},re=class extends W{calculateRaw(e,t,r,n,i,o,a,s){let l=i-e,u=o-t,c=a-r,d=s-n;return l__left_angle_mark_0&&(l=0-l),u__left_angle_mark_0&&(u=0-u),c__left_angle_mark_0&&(c=0-c),d__left_angle_mark_0&&(d=0-d),this._kR*l+this._kG*u+this._kB*c+this._kA*d}},ne=class extends re{_setDefaults(){this._kR=1,this._kG=1,this._kB=1,this._kA=1}},ie=class extends re{_setDefaults(){this._kR=.4984,this._kG=.8625,this._kB=.2979,this._kA=1}},oe=class extends re{_setDefaults(){this._kR=.2126,this._kG=.7152,this._kB=.0722,this._kA=1}},ae=class extends W{calculateRaw(e,t,r,n,i,o,a,s){const l=(s-n)*this._whitePoint.a;return this._colordifferenceCh(e*this._whitePoint.r,i*this._whitePoint.r,l)+this._colordifferenceCh(t*this._whitePoint.g,o*this._whitePoint.g,l)+this._colordifferenceCh(r*this._whitePoint.b,a*this._whitePoint.b,l)}_colordifferenceCh(e,t,r){const n=e-t,i=n+r;return n*n+i*i}_setDefaults(){}},se={};u(se,{AbstractPaletteQuantizer:()=>le,ColorHistogram:()=>xe,NeuQuant:()=>ve,NeuQuantFloat:()=>Se,RGBQuant:()=>Te,WuColorCube:()=>Oe,WuQuant:()=>Ne});var le=class{quantizeSync(){for(const e of this.quantize())if(e.palette)return e.palette;throw new Error(\"unreachable\")}},ue=class{static createByQuadruplet(e){const t=new ue;return t.r=0|e[0],t.g=0|e[1],t.b=0|e[2],t.a=0|e[3],t._loadUINT32(),t._loadQuadruplet(),t}static createByRGBA(e,t,r,n){const i=new ue;return i.r=0|e,i.g=0|t,i.b=0|r,i.a=0|n,i._loadUINT32(),i._loadQuadruplet(),i}static createByUint32(e){const t=new ue;return t.uint32=e>>>0,t._loadRGBA(),t._loadQuadruplet(),t}from(e){this.r=e.r,this.g=e.g,this.b=e.b,this.a=e.a,this.uint32=e.uint32,this.rgba[0]=e.r,this.rgba[1]=e.g,this.rgba[2]=e.b,this.rgba[3]=e.a}getLuminosity(e){let t=this.r,r=this.g,n=this.b;return e&&(t=Math.min(255,255-this.a+this.a*t/255),r=Math.min(255,255-this.a+this.a*r/255),n=Math.min(255,255-this.a+this.a*n/255)),.2126*t+.7152*r+.0722*n}_loadUINT32(){this.uint32=(this.a__left_angle_mark___left_angle_mark_24|this.b__left_angle_mark___left_angle_mark_16|this.g__left_angle_mark___left_angle_mark_8|this.r)>>>0}_loadRGBA(){this.r=255&this.uint32,this.g=this.uint32>>>8&255,this.b=this.uint32>>>16&255,this.a=this.uint32>>>24&255}_loadQuadruplet(){this.rgba[0]=this.r,this.rgba[1]=this.g,this.rgba[2]=this.b,this.rgba[3]=this.a}constructor(){d(this,\"r\"),d(this,\"g\"),d(this,\"b\"),d(this,\"a\"),d(this,\"uint32\"),d(this,\"rgba\"),this.uint32=-1>>>0,this.r=this.g=this.b=this.a=0,this.rgba=new Array(4),this.rgba[0]=0,this.rgba[1]=0,this.rgba[2]=0,this.rgba[3]=0}},ce=class{getWidth(){return this._width}getHeight(){return this._height}setWidth(e){this._width=e}setHeight(e){this._height=e}getPointArray(){return this._pointArray}clone(){const e=new ce;e._width=this._width,e._height=this._height;for(let t=0,r=this._pointArray.length;t__left_angle_mark_r;t++)e._pointArray[t]=ue.createByUint32(0|this._pointArray[t].uint32);return e}toUint32Array(){const e=this._pointArray.length,t=new Uint32Array(e);for(let r=0;r__left_angle_mark_e;r++)t[r]=this._pointArray[r].uint32;return t}toUint8Array(){return new Uint8Array(this.toUint32Array().buffer)}static fromHTMLImageElement(e){const t=e.naturalWidth,r=e.naturalHeight,n=document.createElement(\"canvas\");return n.width=t,n.height=r,n.getContext(\"2d\").drawImage(e,0,0,t,r,0,0,t,r),ce.fromHTMLCanvasElement(n)}static fromHTMLCanvasElement(e){const t=e.width,r=e.height,n=e.getContext(\"2d\").getImageData(0,0,t,r);return ce.fromImageData(n)}static fromImageData(e){const t=e.width,r=e.height;return ce.fromUint8Array(e.data,t,r)}static fromUint8Array(e,t,r){switch(Object.prototype.toString.call(e)){case\"[object Uint8ClampedArray]\":case\"[object Uint8Array]\":break;default:e=new Uint8Array(e)}const n=new Uint32Array(e.buffer);return ce.fromUint32Array(n,t,r)}static fromUint32Array(e,t,r){const n=new ce;n._width=t,n._height=r;for(let i=0,o=e.length;i__left_angle_mark_o;i++)n._pointArray[i]=ue.createByUint32(0|e[i]);return n}static fromBuffer(e,t,r){const n=new Uint32Array(e.buffer,e.byteOffset,e.byteLength/Uint32Array.BYTES_PER_ELEMENT);return ce.fromUint32Array(n,t,r)}constructor(){d(this,\"_pointArray\"),d(this,\"_width\"),d(this,\"_height\"),this._width=0,this._height=0,this._pointArray=[]}};function de(e,t){const r=360/t;for(let n=1,i=r-r/2;n__left_angle_mark_t;n++,i+=r)if(e>=i&&e__left_angle_mark_i+r)return n;return 0}var he=class{add(e){this._pointArray.push(e),this._pointContainer.setWidth(this._pointArray.length)}has(e){for(let t=this._pointArray.length-1;t>=0;t--)if(e.uint32===this._pointArray[t].uint32)return!0;return!1}getNearestColor(e,t){return this._pointArray[0|this._getNearestIndex(e,t)]}getPointContainer(){return this._pointContainer}_nearestPointFromCache(e){return\"number\"==typeof this._i32idx[e]?this._i32idx[e]:-1}_getNearestIndex(e,t){let r=this._nearestPointFromCache(\"\"+t.uint32);if(r>=0)return r;let n=Number.MAX_VALUE;r=0;for(let i=0,o=this._pointArray.length;i__left_angle_mark_o;i++){const o=this._pointArray[i],a=e.calculateRaw(t.r,t.g,t.b,t.a,o.r,o.g,o.b,o.a);a__left_angle_mark_n&&(n=a,r=i)}return this._i32idx[t.uint32]=r,r}sort(){this._i32idx={},this._pointArray.sort(((e,t)=>{const r=I(e.r,e.g,e.b),n=I(t.r,t.g,t.b),i=e.r===e.g&&e.g===e.b?0:1+de(r.h,10),o=(t.r===t.g&&t.g===t.b?0:1+de(n.h,10))-i;if(o)return-o;const a=e.getLuminosity(!0),s=t.getLuminosity(!0);if(s-a!=0)return s-a;const l=(100*n.s|0)-(100*r.s|0);return l?-l:0}))}constructor(){d(this,\"_pointContainer\"),d(this,\"_pointArray\",[]),d(this,\"_i32idx\",{}),this._pointContainer=new ce,this._pointContainer.setHeight(1),this._pointArray=this._pointContainer.getPointArray()}},fe={};u(fe,{HueStatistics:()=>me,Palette:()=>he,Point:()=>ue,PointContainer:()=>ce,ProgressTracker:()=>_e,arithmetic:()=>A});var pe=class{constructor(){d(this,\"num\",0),d(this,\"cols\",[])}},me=class{check(e){this._groupsFull===this._numGroups+1&&(this.check=()=>{});const t=255&e,r=e>>>8&255,n=e>>>16&255,i=t===r&&r===n?0:1+de(I(t,r,n).h,this._numGroups),o=this._stats[i],a=this._minCols;o.num++,o.num>a||(o.num===a&&this._groupsFull++,o.num__left_angle_mark_=a&&this._stats[i].cols.push(e))}injectIntoDictionary(e){for(let t=0;t__left_angle_mark_=this._numGroups;t++)this._stats[t].num__left_angle_mark_=this._minCols&&this._stats[t].cols.forEach((t=>{e[t]?e[t]++:e[t]=1}))}injectIntoArray(e){for(let t=0;t__left_angle_mark_=this._numGroups;t++)this._stats[t].num__left_angle_mark_=this._minCols&&this._stats[t].cols.forEach((t=>{-1===e.indexOf(t)&&e.push(t)}))}constructor(e,t){d(this,\"_numGroups\"),d(this,\"_minCols\"),d(this,\"_stats\"),d(this,\"_groupsFull\"),this._numGroups=e,this._minCols=t,this._stats=[];for(let r=0;r__left_angle_mark_=e;r++)this._stats[r]=new pe;this._groupsFull=0}},ge=class{shouldNotify(e){return e-this._last>=this._step&&(this._last=e,this.progress=Math.min(this._progressRange*this._last/this._range,this._progressRange),!0)}constructor(e,t){d(this,\"progress\"),d(this,\"_step\"),d(this,\"_range\"),d(this,\"_last\"),d(this,\"_progressRange\"),this._range=e,this._progressRange=t,this._step=Math.max(1,this._range/(ge.steps+1)|0),this._last=-this._step,this.progress=0}},_e=ge;d(_e,\"steps\",100);var be=class{toPoint(){return ue.createByRGBA(this.r>>3,this.g>>3,this.b>>3,this.a>>3)}subtract(e,t,r,n){this.r-=0|e,this.g-=0|t,this.b-=0|r,this.a-=0|n}constructor(e){d(this,\"r\"),d(this,\"g\"),d(this,\"b\"),d(this,\"a\"),this.r=this.g=this.b=this.a=e}},ye=class extends le{sample(e){this._pointArray=this._pointArray.concat(e.getPointArray())}*quantize(){this._init(),yield*this._learn(),yield{palette:this._buildPalette(),progress:100}}_init(){this._freq=[],this._bias=[],this._radPower=[],this._network=[];for(let e=0;e__left_angle_mark_this._networkSize;e++)this._network[e]=new be((e__left_angle_mark___left_angle_mark_11)/this._networkSize|0),this._freq[e]=ye._initialBias/this._networkSize|0,this._bias[e]=0}*_learn(){let e=this._sampleFactor;const t=this._pointArray.length;t__left_angle_mark_ye._minpicturebytes&&(e=1);const r=30+(e-1)/3|0,n=t/e|0;let i,o=n/ye._nCycles|0,a=ye._initAlpha,s=(this._networkSize>>3)*ye._radiusBias,l=s>>ye._radiusBiasShift;l__left_angle_mark_=1&&(l=0);for(let c=0;c__left_angle_mark_l;c++)this._radPower[c]=a*((l*l-c*c)*ye._radBias/(l*l))>>>0;i=t__left_angle_mark_ye._minpicturebytes?1:t%ye._prime1!=0?ye._prime1:t%ye._prime2!=0?ye._prime2:t%ye._prime3!=0?ye._prime3:ye._prime4;const u=new _e(n,99);for(let c=0,d=0;c__left_angle_mark_n;){u.shouldNotify(c)&&(yield{progress:u.progress});const e=this._pointArray[d],n=e.b__left_angle_mark___left_angle_mark_3,h=e.g__left_angle_mark___left_angle_mark_3,f=e.r__left_angle_mark___left_angle_mark_3,p=e.a__left_angle_mark___left_angle_mark_3,m=this._contest(n,h,f,p);if(this._alterSingle(a,m,n,h,f,p),0!==l&&this._alterNeighbour(l,m,n,h,f,p),d+=i,d>=t&&(d-=t),c++,0===o&&(o=1),c%o==0){a-=a/r|0,s-=s/ye._radiusDecrease|0,l=s>>ye._radiusBiasShift,l__left_angle_mark_=1&&(l=0);for(let e=0;e__left_angle_mark_l;e++)this._radPower[e]=a*((l*l-e*e)*ye._radBias/(l*l))>>>0}}}_buildPalette(){const e=new he;return this._network.forEach((t=>{e.add(t.toPoint())})),e.sort(),e}_alterNeighbour(e,t,r,n,i,o){let a=t-e;a__left_angle_mark_-1&&(a=-1);let s=t+e;s>this._networkSize&&(s=this._networkSize);let l=t+1,u=t-1,c=1;for(;l__left_angle_mark_s||u>a;){const e=this._radPower[c++]/ye._alphaRadBias;if(l__left_angle_mark_s){const t=this._network[l++];t.subtract(e*(t.r-i),e*(t.g-n),e*(t.b-r),e*(t.a-o))}if(u>a){const t=this._network[u--];t.subtract(e*(t.r-i),e*(t.g-n),e*(t.b-r),e*(t.a-o))}}}_alterSingle(e,t,r,n,i,o){e/=ye._initAlpha;const a=this._network[t];a.subtract(e*(a.r-i),e*(a.g-n),e*(a.b-r),e*(a.a-o))}_contest(e,t,r,n){let i=~(1__left_angle_mark___left_angle_mark_31),o=i,a=-1,s=a;for(let l=0;l__left_angle_mark_this._networkSize;l++){const u=this._network[l],c=8160*this._distance.calculateNormalized(u,{r:r,g:t,b:e,a:n})|0;c__left_angle_mark_i&&(i=c,a=l);const d=c-(this._bias[l]>>ye._initialBiasShift-3);d__left_angle_mark_o&&(o=d,s=l);const h=this._freq[l]>>ye._betaShift;this._freq[l]-=h,this._bias[l]+=h__left_angle_mark___left_angle_mark_ye._gammaShift}return this._freq[a]+=ye._beta,this._bias[a]-=ye._betaGamma,s}constructor(e,t=256){super(),d(this,\"_pointArray\"),d(this,\"_networkSize\"),d(this,\"_network\"),d(this,\"_sampleFactor\"),d(this,\"_radPower\"),d(this,\"_freq\"),d(this,\"_bias\"),d(this,\"_distance\"),this._distance=e,this._pointArray=[],this._sampleFactor=1,this._networkSize=t,this._distance.setWhitePoint(2040,2040,2040,2040)}},ve=ye;d(ve,\"_prime1\",499),d(ve,\"_prime2\",491),d(ve,\"_prime3\",487),d(ve,\"_prime4\",503),d(ve,\"_minpicturebytes\",ye._prime4),d(ve,\"_nCycles\",100),d(ve,\"_initialBiasShift\",16),d(ve,\"_initialBias\",1__left_angle_mark___left_angle_mark_ye._initialBiasShift),d(ve,\"_gammaShift\",10),d(ve,\"_betaShift\",10),d(ve,\"_beta\",ye._initialBias>>ye._betaShift),d(ve,\"_betaGamma\",ye._initialBias__left_angle_mark___left_angle_mark_ye._gammaShift-ye._betaShift),d(ve,\"_radiusBiasShift\",6),d(ve,\"_radiusBias\",1__left_angle_mark___left_angle_mark_ye._radiusBiasShift),d(ve,\"_radiusDecrease\",30),d(ve,\"_alphaBiasShift\",10),d(ve,\"_initAlpha\",1__left_angle_mark___left_angle_mark_ye._alphaBiasShift),d(ve,\"_radBiasShift\",8),d(ve,\"_radBias\",1__left_angle_mark___left_angle_mark_ye._radBiasShift),d(ve,\"_alphaRadBiasShift\",ye._alphaBiasShift+ye._radBiasShift),d(ve,\"_alphaRadBias\",1__left_angle_mark___left_angle_mark_ye._alphaRadBiasShift);var Ae=class{toPoint(){return ue.createByRGBA(this.r>>3,this.g>>3,this.b>>3,this.a>>3)}subtract(e,t,r,n){this.r-=e,this.g-=t,this.b-=r,this.a-=n}constructor(e){d(this,\"r\"),d(this,\"g\"),d(this,\"b\"),d(this,\"a\"),this.r=this.g=this.b=this.a=e}},we=class extends le{sample(e){this._pointArray=this._pointArray.concat(e.getPointArray())}*quantize(){this._init(),yield*this._learn(),yield{palette:this._buildPalette(),progress:100}}_init(){this._freq=[],this._bias=[],this._radPower=[],this._network=[];for(let e=0;e__left_angle_mark_this._networkSize;e++)this._network[e]=new Ae((e__left_angle_mark___left_angle_mark_11)/this._networkSize),this._freq[e]=we._initialBias/this._networkSize,this._bias[e]=0}*_learn(){let e=this._sampleFactor;const t=this._pointArray.length;t__left_angle_mark_we._minpicturebytes&&(e=1);const r=30+(e-1)/3,n=t/e;let i,o=n/we._nCycles|0,a=we._initAlpha,s=(this._networkSize>>3)*we._radiusBias,l=s>>we._radiusBiasShift;l__left_angle_mark_=1&&(l=0);for(let c=0;c__left_angle_mark_l;c++)this._radPower[c]=a*((l*l-c*c)*we._radBias/(l*l));i=t__left_angle_mark_we._minpicturebytes?1:t%we._prime1!=0?we._prime1:t%we._prime2!=0?we._prime2:t%we._prime3!=0?we._prime3:we._prime4;const u=new _e(n,99);for(let c=0,d=0;c__left_angle_mark_n;){u.shouldNotify(c)&&(yield{progress:u.progress});const e=this._pointArray[d],n=e.b__left_angle_mark___left_angle_mark_3,h=e.g__left_angle_mark___left_angle_mark_3,f=e.r__left_angle_mark___left_angle_mark_3,p=e.a__left_angle_mark___left_angle_mark_3,m=this._contest(n,h,f,p);if(this._alterSingle(a,m,n,h,f,p),0!==l&&this._alterNeighbour(l,m,n,h,f,p),d+=i,d>=t&&(d-=t),c++,0===o&&(o=1),c%o==0){a-=a/r,s-=s/we._radiusDecrease,l=s>>we._radiusBiasShift,l__left_angle_mark_=1&&(l=0);for(let e=0;e__left_angle_mark_l;e++)this._radPower[e]=a*((l*l-e*e)*we._radBias/(l*l))}}}_buildPalette(){const e=new he;return this._network.forEach((t=>{e.add(t.toPoint())})),e.sort(),e}_alterNeighbour(e,t,r,n,i,o){let a=t-e;a__left_angle_mark_-1&&(a=-1);let s=t+e;s>this._networkSize&&(s=this._networkSize);let l=t+1,u=t-1,c=1;for(;l__left_angle_mark_s||u>a;){const e=this._radPower[c++]/we._alphaRadBias;if(l__left_angle_mark_s){const t=this._network[l++];t.subtract(e*(t.r-i),e*(t.g-n),e*(t.b-r),e*(t.a-o))}if(u>a){const t=this._network[u--];t.subtract(e*(t.r-i),e*(t.g-n),e*(t.b-r),e*(t.a-o))}}}_alterSingle(e,t,r,n,i,o){e/=we._initAlpha;const a=this._network[t];a.subtract(e*(a.r-i),e*(a.g-n),e*(a.b-r),e*(a.a-o))}_contest(e,t,r,n){let i=~(1__left_angle_mark___left_angle_mark_31),o=i,a=-1,s=a;for(let l=0;l__left_angle_mark_this._networkSize;l++){const u=this._network[l],c=8160*this._distance.calculateNormalized(u,{r:r,g:t,b:e,a:n});c__left_angle_mark_i&&(i=c,a=l);const d=c-(this._bias[l]>>we._initialBiasShift-3);d__left_angle_mark_o&&(o=d,s=l);const h=this._freq[l]>>we._betaShift;this._freq[l]-=h,this._bias[l]+=h__left_angle_mark___left_angle_mark_we._gammaShift}return this._freq[a]+=we._beta,this._bias[a]-=we._betaGamma,s}constructor(e,t=256){super(),d(this,\"_pointArray\"),d(this,\"_networkSize\"),d(this,\"_network\"),d(this,\"_sampleFactor\"),d(this,\"_radPower\"),d(this,\"_freq\"),d(this,\"_bias\"),d(this,\"_distance\"),this._distance=e,this._pointArray=[],this._sampleFactor=1,this._networkSize=t,this._distance.setWhitePoint(2040,2040,2040,2040)}},Se=we;d(Se,\"_prime1\",499),d(Se,\"_prime2\",491),d(Se,\"_prime3\",487),d(Se,\"_prime4\",503),d(Se,\"_minpicturebytes\",we._prime4),d(Se,\"_nCycles\",100),d(Se,\"_initialBiasShift\",16),d(Se,\"_initialBias\",1__left_angle_mark___left_angle_mark_we._initialBiasShift),d(Se,\"_gammaShift\",10),d(Se,\"_betaShift\",10),d(Se,\"_beta\",we._initialBias>>we._betaShift),d(Se,\"_betaGamma\",we._initialBias__left_angle_mark___left_angle_mark_we._gammaShift-we._betaShift),d(Se,\"_radiusBiasShift\",6),d(Se,\"_radiusBias\",1__left_angle_mark___left_angle_mark_we._radiusBiasShift),d(Se,\"_radiusDecrease\",30),d(Se,\"_alphaBiasShift\",10),d(Se,\"_initAlpha\",1__left_angle_mark___left_angle_mark_we._alphaBiasShift),d(Se,\"_radBiasShift\",8),d(Se,\"_radBias\",1__left_angle_mark___left_angle_mark_we._radBiasShift),d(Se,\"_alphaRadBiasShift\",we._alphaBiasShift+we._radBiasShift),d(Se,\"_alphaRadBias\",1__left_angle_mark___left_angle_mark_we._alphaRadBiasShift);var Ee=class{sample(e){switch(this._method){case 1:this._colorStats1D(e);break;case 2:this._colorStats2D(e)}}getImportanceSortedColorsIDXI32(){const e=R(Object.keys(this._histogram),((e,t)=>this._histogram[t]-this._histogram[e]));if(0===e.length)return[];let t;switch(this._method){case 1:const r=Math.min(e.length,this._initColors),n=e[r-1],i=this._histogram[n];t=e.slice(0,r);let o=r;const a=e.length;for(;o__left_angle_mark_a&&this._histogram[e[o]]===i;)t.push(e[o++]);this._hueStats.injectIntoArray(t);break;case 2:t=e;break;default:throw new Error(\"Incorrect method\")}return t.map((e=>+e))}_colorStats1D(e){const t=this._histogram,r=e.getPointArray(),n=r.length;for(let i=0;i__left_angle_mark_n;i++){const e=r[i].uint32;this._hueStats.check(e),e in t?t[e]++:t[e]=1}}_colorStats2D(e){const t=e.getWidth(),r=e.getHeight(),n=e.getPointArray(),i=Ee._boxSize[0],o=Ee._boxSize[1],a=i*o,s=this._makeBoxes(t,r,i,o),l=this._histogram;s.forEach((e=>{let r=Math.round(e.w*e.h/a)*Ee._boxPixels;r__left_angle_mark_2&&(r=2);const i={};this._iterateBox(e,t,(e=>{const t=n[e].uint32;this._hueStats.check(t),t in l?l[t]++:t in i?++i[t]>=r&&(l[t]=i[t]):i[t]=1}))})),this._hueStats.injectIntoDictionary(l)}_iterateBox(e,t,r){const n=e,i=n.y*t+n.x,o=(n.y+n.h-1)*t+(n.x+n.w-1),a=t-n.w+1;let s=0,l=i;do{r.call(this,l),l+=++s%n.w==0?a:1}while(l__left_angle_mark_=o)}_makeBoxes(e,t,r,n){const i=e%r,o=t%n,a=e-i,s=t-o,l=[];for(let u=0;u__left_angle_mark_t;u+=n)for(let t=0;t__left_angle_mark_e;t+=r)l.push({x:t,y:u,w:t===a?i:r,h:u===s?o:n});return l}constructor(e,t){d(this,\"_method\"),d(this,\"_hueStats\"),d(this,\"_histogram\"),d(this,\"_initColors\"),d(this,\"_minHueCols\"),this._method=e,this._minHueCols=t__left_angle_mark___left_angle_mark_2,this._initColors=t__left_angle_mark___left_angle_mark_2,this._hueStats=new me(Ee._hueGroups,this._minHueCols),this._histogram=Object.create(null)}},xe=Ee;d(xe,\"_boxSize\",[64,64]),d(xe,\"_boxPixels\",2),d(xe,\"_hueGroups\",10);var Ce=class{constructor(e,t,r){d(this,\"index\"),d(this,\"color\"),d(this,\"distance\"),this.index=e,this.color=t,this.distance=r}},Te=class extends le{sample(e){this._histogram.sample(e)}*quantize(){const e=this._histogram.getImportanceSortedColorsIDXI32();if(0===e.length)throw new Error(\"No colors in image\");yield*this._buildPalette(e)}*_buildPalette(e){const t=new he,r=t.getPointContainer().getPointArray(),n=new Array(e.length);for(let c=0;c__left_angle_mark_e.length;c++)r.push(ue.createByUint32(e[c])),n[c]=1;const i=r.length,o=[];let a=i,s=this._initialDistance;const l=new _e(a-this._colors,99);for(;a>this._colors;){o.length=0;for(let e=0;e__left_angle_mark_i;e++){if(l.shouldNotify(i-a)&&(yield{progress:l.progress}),0===n[e])continue;const t=r[e];for(let l=e+1;l__left_angle_mark_i;l++){if(0===n[l])continue;const e=r[l],i=this._distance.calculateNormalized(t,e);i__left_angle_mark_s&&(o.push(new Ce(l,e,i)),n[l]=0,a--)}}s+=a>3*this._colors?this._initialDistance:this._distanceIncrement}if(a__left_angle_mark_this._colors){R(o,((e,t)=>t.distance-e.distance));let e=0;for(;a__left_angle_mark_this._colors&&e__left_angle_mark_o.length;)n[o[e].index]=1,a++,e++}let u=r.length;for(let c=u-1;c>=0;c--)0===n[c]&&(c!==u-1&&(r[c]=r[u-1]),--u);r.length=u,t.sort(),yield{palette:t,progress:100}}constructor(e,t=256,r=2){super(),d(this,\"_colors\"),d(this,\"_initialDistance\"),d(this,\"_distanceIncrement\"),d(this,\"_histogram\"),d(this,\"_distance\"),this._distance=e,this._colors=t,this._histogram=new xe(r,t),this._initialDistance=.01,this._distanceIncrement=.005}};function Re(e){const t=[];for(let r=0;r__left_angle_mark_e;r++)t[r]=0;return t}function Ie(e,t,r,n){const i=new Array(e);for(let o=0;o__left_angle_mark_e;o++){i[o]=new Array(t);for(let e=0;e__left_angle_mark_t;e++){i[o][e]=new Array(r);for(let t=0;t__left_angle_mark_r;t++){i[o][e][t]=new Array(n);for(let r=0;r__left_angle_mark_n;r++)i[o][e][t][r]=0}}}return i}function ke(e,t,r){const n=new Array(e);for(let i=0;i__left_angle_mark_e;i++){n[i]=new Array(t);for(let e=0;e__left_angle_mark_t;e++){n[i][e]=new Array(r);for(let t=0;t__left_angle_mark_r;t++)n[i][e][t]=0}}return n}function Pe(e,t,r,n,i){for(let o=0;o__left_angle_mark_t;o++){e[o]=[];for(let t=0;t__left_angle_mark_r;t++){e[o][t]=[];for(let r=0;r__left_angle_mark_n;r++)e[o][t][r]=i}}}function Me(e,t,r){for(let n=0;n__left_angle_mark_t;n++)e[n]=r}var Oe=class{constructor(){d(this,\"redMinimum\"),d(this,\"redMaximum\"),d(this,\"greenMinimum\"),d(this,\"greenMaximum\"),d(this,\"blueMinimum\"),d(this,\"blueMaximum\"),d(this,\"volume\"),d(this,\"alphaMinimum\"),d(this,\"alphaMaximum\")}},Be=class extends le{sample(e){const t=e.getPointArray();for(let r=0,n=t.length;r__left_angle_mark_n;r++)this._addColor(t[r]);this._pixels=this._pixels.concat(t)}*quantize(){yield*this._preparePalette();const e=new he;for(let t=0;t__left_angle_mark_this._colors;t++)if(this._sums[t]>0){const r=this._sums[t],n=this._reds[t]/r,i=this._greens[t]/r,o=this._blues[t]/r,a=this._alphas[t]/r,s=ue.createByRGBA(0|n,0|i,0|o,0|a);e.add(s)}e.sort(),yield{palette:e,progress:100}}*_preparePalette(){yield*this._calculateMoments();let e=0;const t=Re(this._colors);for(let a=1;a__left_angle_mark_this._colors;++a){this._cut(this._cubes[e],this._cubes[a])?(t[e]=this._cubes[e].volume>1?this._calculateVariance(this._cubes[e]):0,t[a]=this._cubes[a].volume>1?this._calculateVariance(this._cubes[a]):0):(t[e]=0,a--),e=0;let r=t[0];for(let n=1;n__left_angle_mark_=a;++n)t[n]>r&&(r=t[n],e=n);if(r__left_angle_mark_=0){this._colors=a+1;break}}const r=[],n=[],i=[],o=[];for(let a=0;a__left_angle_mark_this._colors;++a){const e=Be._volume(this._cubes[a],this._weights);e>0?(r[a]=Be._volume(this._cubes[a],this._momentsRed)/e|0,n[a]=Be._volume(this._cubes[a],this._momentsGreen)/e|0,i[a]=Be._volume(this._cubes[a],this._momentsBlue)/e|0,o[a]=Be._volume(this._cubes[a],this._momentsAlpha)/e|0):(r[a]=0,n[a]=0,i[a]=0,o[a]=0)}this._reds=Re(this._colors+1),this._greens=Re(this._colors+1),this._blues=Re(this._colors+1),this._alphas=Re(this._colors+1),this._sums=Re(this._colors+1);for(let a=0,s=this._pixels.length;a__left_angle_mark_s;a++){const e=this._pixels[a];let t=-1,s=Number.MAX_VALUE;for(let a=0;a__left_angle_mark_this._colors;a++){const l=r[a],u=n[a],c=i[a],d=o[a],h=this._distance.calculateRaw(l,u,c,d,e.r,e.g,e.b,e.a);h__left_angle_mark_s&&(s=h,t=a)}this._reds[t]+=e.r,this._greens[t]+=e.g,this._blues[t]+=e.b,this._alphas[t]+=e.a,this._sums[t]++}}_addColor(e){const t=8-this._significantBitsPerChannel,r=1+(e.r>>t),n=1+(e.g>>t),i=1+(e.b>>t),o=1+(e.a>>t);this._weights[o][r][n][i]++,this._momentsRed[o][r][n][i]+=e.r,this._momentsGreen[o][r][n][i]+=e.g,this._momentsBlue[o][r][n][i]+=e.b,this._momentsAlpha[o][r][n][i]+=e.a,this._moments[o][r][n][i]+=this._table[e.r]+this._table[e.g]+this._table[e.b]+this._table[e.a]}*_calculateMoments(){const e=[],t=[],r=[],n=[],i=[],o=[],a=ke(this._sideSize,this._sideSize,this._sideSize),s=ke(this._sideSize,this._sideSize,this._sideSize),l=ke(this._sideSize,this._sideSize,this._sideSize),u=ke(this._sideSize,this._sideSize,this._sideSize),c=ke(this._sideSize,this._sideSize,this._sideSize),d=ke(this._sideSize,this._sideSize,this._sideSize);let h=0;const f=new _e(this._alphaMaxSideIndex*this._maxSideIndex,99);for(let p=1;p__left_angle_mark_=this._alphaMaxSideIndex;++p){Pe(a,this._sideSize,this._sideSize,this._sideSize,0),Pe(s,this._sideSize,this._sideSize,this._sideSize,0),Pe(l,this._sideSize,this._sideSize,this._sideSize,0),Pe(u,this._sideSize,this._sideSize,this._sideSize,0),Pe(c,this._sideSize,this._sideSize,this._sideSize,0),Pe(d,this._sideSize,this._sideSize,this._sideSize,0);for(let m=1;m__left_angle_mark_=this._maxSideIndex;++m,++h){f.shouldNotify(h)&&(yield{progress:f.progress}),Me(e,this._sideSize,0),Me(t,this._sideSize,0),Me(r,this._sideSize,0),Me(n,this._sideSize,0),Me(i,this._sideSize,0),Me(o,this._sideSize,0);for(let h=1;h__left_angle_mark_=this._maxSideIndex;++h){let f=0,g=0,_=0,b=0,y=0,v=0;for(let A=1;A__left_angle_mark_=this._maxSideIndex;++A)f+=this._weights[p][m][h][A],g+=this._momentsRed[p][m][h][A],_+=this._momentsGreen[p][m][h][A],b+=this._momentsBlue[p][m][h][A],y+=this._momentsAlpha[p][m][h][A],v+=this._moments[p][m][h][A],e[A]+=f,t[A]+=g,r[A]+=_,n[A]+=b,i[A]+=y,o[A]+=v,a[m][h][A]=a[m-1][h][A]+e[A],s[m][h][A]=s[m-1][h][A]+t[A],l[m][h][A]=l[m-1][h][A]+r[A],u[m][h][A]=u[m-1][h][A]+n[A],c[m][h][A]=c[m-1][h][A]+i[A],d[m][h][A]=d[m-1][h][A]+o[A],this._weights[p][m][h][A]=this._weights[p-1][m][h][A]+a[m][h][A],this._momentsRed[p][m][h][A]=this._momentsRed[p-1][m][h][A]+s[m][h][A],this._momentsGreen[p][m][h][A]=this._momentsGreen[p-1][m][h][A]+l[m][h][A],this._momentsBlue[p][m][h][A]=this._momentsBlue[p-1][m][h][A]+u[m][h][A],this._momentsAlpha[p][m][h][A]=this._momentsAlpha[p-1][m][h][A]+c[m][h][A],this._moments[p][m][h][A]=this._moments[p-1][m][h][A]+d[m][h][A]}}}}static _volumeFloat(e,t){return t[e.alphaMaximum][e.redMaximum][e.greenMaximum][e.blueMaximum]-t[e.alphaMaximum][e.redMaximum][e.greenMinimum][e.blueMaximum]-t[e.alphaMaximum][e.redMinimum][e.greenMaximum][e.blueMaximum]+t[e.alphaMaximum][e.redMinimum][e.greenMinimum][e.blueMaximum]-t[e.alphaMinimum][e.redMaximum][e.greenMaximum][e.blueMaximum]+t[e.alphaMinimum][e.redMaximum][e.greenMinimum][e.blueMaximum]+t[e.alphaMinimum][e.redMinimum][e.greenMaximum][e.blueMaximum]-t[e.alphaMinimum][e.redMinimum][e.greenMinimum][e.blueMaximum]-(t[e.alphaMaximum][e.redMaximum][e.greenMaximum][e.blueMinimum]-t[e.alphaMinimum][e.redMaximum][e.greenMaximum][e.blueMinimum]-t[e.alphaMaximum][e.redMaximum][e.greenMinimum][e.blueMinimum]+t[e.alphaMinimum][e.redMaximum][e.greenMinimum][e.blueMinimum]-t[e.alphaMaximum][e.redMinimum][e.greenMaximum][e.blueMinimum]+t[e.alphaMinimum][e.redMinimum][e.greenMaximum][e.blueMinimum]+t[e.alphaMaximum][e.redMinimum][e.greenMinimum][e.blueMinimum]-t[e.alphaMinimum][e.redMinimum][e.greenMinimum][e.blueMinimum])}static _volume(e,t){return 0|Be._volumeFloat(e,t)}static _top(e,t,r,n){let i;switch(t){case Be._alpha:i=n[r][e.redMaximum][e.greenMaximum][e.blueMaximum]-n[r][e.redMaximum][e.greenMinimum][e.blueMaximum]-n[r][e.redMinimum][e.greenMaximum][e.blueMaximum]+n[r][e.redMinimum][e.greenMinimum][e.blueMaximum]-(n[r][e.redMaximum][e.greenMaximum][e.blueMinimum]-n[r][e.redMaximum][e.greenMinimum][e.blueMinimum]-n[r][e.redMinimum][e.greenMaximum][e.blueMinimum]+n[r][e.redMinimum][e.greenMinimum][e.blueMinimum]);break;case Be._red:i=n[e.alphaMaximum][r][e.greenMaximum][e.blueMaximum]-n[e.alphaMaximum][r][e.greenMinimum][e.blueMaximum]-n[e.alphaMinimum][r][e.greenMaximum][e.blueMaximum]+n[e.alphaMinimum][r][e.greenMinimum][e.blueMaximum]-(n[e.alphaMaximum][r][e.greenMaximum][e.blueMinimum]-n[e.alphaMaximum][r][e.greenMinimum][e.blueMinimum]-n[e.alphaMinimum][r][e.greenMaximum][e.blueMinimum]+n[e.alphaMinimum][r][e.greenMinimum][e.blueMinimum]);break;case Be._green:i=n[e.alphaMaximum][e.redMaximum][r][e.blueMaximum]-n[e.alphaMaximum][e.redMinimum][r][e.blueMaximum]-n[e.alphaMinimum][e.redMaximum][r][e.blueMaximum]+n[e.alphaMinimum][e.redMinimum][r][e.blueMaximum]-(n[e.alphaMaximum][e.redMaximum][r][e.blueMinimum]-n[e.alphaMaximum][e.redMinimum][r][e.blueMinimum]-n[e.alphaMinimum][e.redMaximum][r][e.blueMinimum]+n[e.alphaMinimum][e.redMinimum][r][e.blueMinimum]);break;case Be._blue:i=n[e.alphaMaximum][e.redMaximum][e.greenMaximum][r]-n[e.alphaMaximum][e.redMaximum][e.greenMinimum][r]-n[e.alphaMaximum][e.redMinimum][e.greenMaximum][r]+n[e.alphaMaximum][e.redMinimum][e.greenMinimum][r]-(n[e.alphaMinimum][e.redMaximum][e.greenMaximum][r]-n[e.alphaMinimum][e.redMaximum][e.greenMinimum][r]-n[e.alphaMinimum][e.redMinimum][e.greenMaximum][r]+n[e.alphaMinimum][e.redMinimum][e.greenMinimum][r]);break;default:throw new Error(\"impossible\")}return 0|i}static _bottom(e,t,r){switch(t){case Be._alpha:return-r[e.alphaMinimum][e.redMaximum][e.greenMaximum][e.blueMaximum]+r[e.alphaMinimum][e.redMaximum][e.greenMinimum][e.blueMaximum]+r[e.alphaMinimum][e.redMinimum][e.greenMaximum][e.blueMaximum]-r[e.alphaMinimum][e.redMinimum][e.greenMinimum][e.blueMaximum]-(-r[e.alphaMinimum][e.redMaximum][e.greenMaximum][e.blueMinimum]+r[e.alphaMinimum][e.redMaximum][e.greenMinimum][e.blueMinimum]+r[e.alphaMinimum][e.redMinimum][e.greenMaximum][e.blueMinimum]-r[e.alphaMinimum][e.redMinimum][e.greenMinimum][e.blueMinimum]);case Be._red:return-r[e.alphaMaximum][e.redMinimum][e.greenMaximum][e.blueMaximum]+r[e.alphaMaximum][e.redMinimum][e.greenMinimum][e.blueMaximum]+r[e.alphaMinimum][e.redMinimum][e.greenMaximum][e.blueMaximum]-r[e.alphaMinimum][e.redMinimum][e.greenMinimum][e.blueMaximum]-(-r[e.alphaMaximum][e.redMinimum][e.greenMaximum][e.blueMinimum]+r[e.alphaMaximum][e.redMinimum][e.greenMinimum][e.blueMinimum]+r[e.alphaMinimum][e.redMinimum][e.greenMaximum][e.blueMinimum]-r[e.alphaMinimum][e.redMinimum][e.greenMinimum][e.blueMinimum]);case Be._green:return-r[e.alphaMaximum][e.redMaximum][e.greenMinimum][e.blueMaximum]+r[e.alphaMaximum][e.redMinimum][e.greenMinimum][e.blueMaximum]+r[e.alphaMinimum][e.redMaximum][e.greenMinimum][e.blueMaximum]-r[e.alphaMinimum][e.redMinimum][e.greenMinimum][e.blueMaximum]-(-r[e.alphaMaximum][e.redMaximum][e.greenMinimum][e.blueMinimum]+r[e.alphaMaximum][e.redMinimum][e.greenMinimum][e.blueMinimum]+r[e.alphaMinimum][e.redMaximum][e.greenMinimum][e.blueMinimum]-r[e.alphaMinimum][e.redMinimum][e.greenMinimum][e.blueMinimum]);case Be._blue:return-r[e.alphaMaximum][e.redMaximum][e.greenMaximum][e.blueMinimum]+r[e.alphaMaximum][e.redMaximum][e.greenMinimum][e.blueMinimum]+r[e.alphaMaximum][e.redMinimum][e.greenMaximum][e.blueMinimum]-r[e.alphaMaximum][e.redMinimum][e.greenMinimum][e.blueMinimum]-(-r[e.alphaMinimum][e.redMaximum][e.greenMaximum][e.blueMinimum]+r[e.alphaMinimum][e.redMaximum][e.greenMinimum][e.blueMinimum]+r[e.alphaMinimum][e.redMinimum][e.greenMaximum][e.blueMinimum]-r[e.alphaMinimum][e.redMinimum][e.greenMinimum][e.blueMinimum]);default:return 0}}_calculateVariance(e){const t=Be._volume(e,this._momentsRed),r=Be._volume(e,this._momentsGreen),n=Be._volume(e,this._momentsBlue),i=Be._volume(e,this._momentsAlpha);return Be._volumeFloat(e,this._moments)-(t*t+r*r+n*n+i*i)/Be._volume(e,this._weights)}_maximize(e,t,r,n,i,o,a,s,l){const u=0|Be._bottom(e,t,this._momentsRed),c=0|Be._bottom(e,t,this._momentsGreen),d=0|Be._bottom(e,t,this._momentsBlue),h=0|Be._bottom(e,t,this._momentsAlpha),f=0|Be._bottom(e,t,this._weights);let p=0,m=-1;for(let g=r;g__left_angle_mark_n;++g){let r=u+Be._top(e,t,g,this._momentsRed),n=c+Be._top(e,t,g,this._momentsGreen),_=d+Be._top(e,t,g,this._momentsBlue),b=h+Be._top(e,t,g,this._momentsAlpha),y=f+Be._top(e,t,g,this._weights);if(0!==y){let e=r*r+n*n+_*_+b*b,t=e/y;r=i-r,n=o-n,_=a-_,b=s-b,y=l-y,0!==y&&(e=r*r+n*n+_*_+b*b,t+=e/y,t>p&&(p=t,m=g))}}return{max:p,position:m}}_cut(e,t){let r;const n=Be._volume(e,this._momentsRed),i=Be._volume(e,this._momentsGreen),o=Be._volume(e,this._momentsBlue),a=Be._volume(e,this._momentsAlpha),s=Be._volume(e,this._weights),l=this._maximize(e,Be._red,e.redMinimum+1,e.redMaximum,n,i,o,a,s),u=this._maximize(e,Be._green,e.greenMinimum+1,e.greenMaximum,n,i,o,a,s),c=this._maximize(e,Be._blue,e.blueMinimum+1,e.blueMaximum,n,i,o,a,s),d=this._maximize(e,Be._alpha,e.alphaMinimum+1,e.alphaMaximum,n,i,o,a,s);if(d.max>=l.max&&d.max>=u.max&&d.max>=c.max){if(r=Be._alpha,d.position__left_angle_mark_0)return!1}else r=l.max>=d.max&&l.max>=u.max&&l.max>=c.max?Be._red:u.max>=d.max&&u.max>=l.max&&u.max>=c.max?Be._green:Be._blue;switch(t.redMaximum=e.redMaximum,t.greenMaximum=e.greenMaximum,t.blueMaximum=e.blueMaximum,t.alphaMaximum=e.alphaMaximum,r){case Be._red:t.redMinimum=e.redMaximum=l.position,t.greenMinimum=e.greenMinimum,t.blueMinimum=e.blueMinimum,t.alphaMinimum=e.alphaMinimum;break;case Be._green:t.greenMinimum=e.greenMaximum=u.position,t.redMinimum=e.redMinimum,t.blueMinimum=e.blueMinimum,t.alphaMinimum=e.alphaMinimum;break;case Be._blue:t.blueMinimum=e.blueMaximum=c.position,t.redMinimum=e.redMinimum,t.greenMinimum=e.greenMinimum,t.alphaMinimum=e.alphaMinimum;break;case Be._alpha:t.alphaMinimum=e.alphaMaximum=d.position,t.blueMinimum=e.blueMinimum,t.redMinimum=e.redMinimum,t.greenMinimum=e.greenMinimum}return e.volume=(e.redMaximum-e.redMinimum)*(e.greenMaximum-e.greenMinimum)*(e.blueMaximum-e.blueMinimum)*(e.alphaMaximum-e.alphaMinimum),t.volume=(t.redMaximum-t.redMinimum)*(t.greenMaximum-t.greenMinimum)*(t.blueMaximum-t.blueMinimum)*(t.alphaMaximum-t.alphaMinimum),!0}_initialize(e){this._colors=e,this._cubes=[];for(let t=0;t__left_angle_mark_e;t++)this._cubes[t]=new Oe;this._cubes[0].redMinimum=0,this._cubes[0].greenMinimum=0,this._cubes[0].blueMinimum=0,this._cubes[0].alphaMinimum=0,this._cubes[0].redMaximum=this._maxSideIndex,this._cubes[0].greenMaximum=this._maxSideIndex,this._cubes[0].blueMaximum=this._maxSideIndex,this._cubes[0].alphaMaximum=this._alphaMaxSideIndex,this._weights=Ie(this._alphaSideSize,this._sideSize,this._sideSize,this._sideSize),this._momentsRed=Ie(this._alphaSideSize,this._sideSize,this._sideSize,this._sideSize),this._momentsGreen=Ie(this._alphaSideSize,this._sideSize,this._sideSize,this._sideSize),this._momentsBlue=Ie(this._alphaSideSize,this._sideSize,this._sideSize,this._sideSize),this._momentsAlpha=Ie(this._alphaSideSize,this._sideSize,this._sideSize,this._sideSize),this._moments=Ie(this._alphaSideSize,this._sideSize,this._sideSize,this._sideSize),this._table=[];for(let t=0;t__left_angle_mark_256;++t)this._table[t]=t*t;this._pixels=[]}_setQuality(e=5){this._significantBitsPerChannel=e,this._maxSideIndex=1__left_angle_mark___left_angle_mark_this._significantBitsPerChannel,this._alphaMaxSideIndex=this._maxSideIndex,this._sideSize=this._maxSideIndex+1,this._alphaSideSize=this._alphaMaxSideIndex+1}constructor(e,t=256,r=5){super(),d(this,\"_reds\"),d(this,\"_greens\"),d(this,\"_blues\"),d(this,\"_alphas\"),d(this,\"_sums\"),d(this,\"_weights\"),d(this,\"_momentsRed\"),d(this,\"_momentsGreen\"),d(this,\"_momentsBlue\"),d(this,\"_momentsAlpha\"),d(this,\"_moments\"),d(this,\"_table\"),d(this,\"_pixels\"),d(this,\"_cubes\"),d(this,\"_colors\"),d(this,\"_significantBitsPerChannel\"),d(this,\"_maxSideIndex\"),d(this,\"_alphaMaxSideIndex\"),d(this,\"_sideSize\"),d(this,\"_alphaSideSize\"),d(this,\"_distance\"),this._distance=e,this._setQuality(r),this._initialize(t)}},Ne=Be;d(Ne,\"_alpha\",3),d(Ne,\"_red\",2),d(Ne,\"_green\",1),d(Ne,\"_blue\",0);var je={};u(je,{AbstractImageQuantizer:()=>Le,ErrorDiffusionArray:()=>Ue,ErrorDiffusionArrayKernel:()=>Fe,ErrorDiffusionRiemersma:()=>He,NearestColor:()=>De});var Le=class{quantizeSync(e,t){for(const r of this.quantize(e,t))if(r.pointContainer)return r.pointContainer;throw new Error(\"unreachable\")}},De=class extends Le{*quantize(e,t){const r=e.getPointArray(),n=e.getWidth(),i=e.getHeight(),o=new _e(i,99);for(let a=0;a__left_angle_mark_i;a++){o.shouldNotify(a)&&(yield{progress:o.progress});for(let e=0,i=a*n;e__left_angle_mark_n;e++,i++){const e=r[i];e.from(t.getNearestColor(this._distance,e))}}yield{pointContainer:e,progress:100}}constructor(e){super(),d(this,\"_distance\"),this._distance=e}},Fe=(e=>(e[e.FloydSteinberg=0]=\"FloydSteinberg\",e[e.FalseFloydSteinberg=1]=\"FalseFloydSteinberg\",e[e.Stucki=2]=\"Stucki\",e[e.Atkinson=3]=\"Atkinson\",e[e.Jarvis=4]=\"Jarvis\",e[e.Burkes=5]=\"Burkes\",e[e.Sierra=6]=\"Sierra\",e[e.TwoSierra=7]=\"TwoSierra\",e[e.SierraLite=8]=\"SierraLite\",e))(Fe||{}),Ue=class extends Le{*quantize(e,t){const r=e.getPointArray(),n=new ue,i=e.getWidth(),o=e.getHeight(),a=[];let s=1,l=1;for(const c of this._kernel){const e=c[2]+1;l__left_angle_mark_e&&(l=e)}for(let c=0;c__left_angle_mark_l;c++)this._fillErrorLine(a[c]=[],i);const u=new _e(o,99);for(let c=0;c__left_angle_mark_o;c++){u.shouldNotify(c)&&(yield{progress:u.progress}),this._serpentine&&(s*=-1);const e=c*i,l=1===s?0:i-1,d=1===s?i:-1;this._fillErrorLine(a[0],i),a.push(a.shift());const h=a[0];for(let u=l,f=e+l;u!==d;u+=s,f+=s){const e=r[f],l=h[u];n.from(e);const d=ue.createByRGBA(C(e.r+l[0]),C(e.g+l[1]),C(e.b+l[2]),C(e.a+l[3])),p=t.getNearestColor(this._distance,d);if(e.from(p),this._minColorDistance&&this._distance.calculateNormalized(n,p)__left_angle_mark_this._minColorDistance)continue;let m,g,_,b;this._calculateErrorLikeGIMP?(m=d.r-p.r,g=d.g-p.g,_=d.b-p.b,b=d.a-p.a):(m=n.r-p.r,g=n.g-p.g,_=n.b-p.b,b=n.a-p.a);const y=1===s?0:this._kernel.length-1,v=1===s?this._kernel.length:-1;for(let t=y;t!==v;t+=s){const e=this._kernel[t][1]*s,r=this._kernel[t][2];if(e+u>=0&&e+u__left_angle_mark_i&&r+c>=0&&r+c__left_angle_mark_o){const n=this._kernel[t][0],i=a[r][e+u];i[0]+=m*n,i[1]+=g*n,i[2]+=_*n,i[3]+=b*n}}}}yield{pointContainer:e,progress:100}}_fillErrorLine(e,t){e.length>t&&(e.length=t);const r=e.length;for(let n=0;n__left_angle_mark_r;n++){const t=e[n];t[0]=t[1]=t[2]=t[3]=0}for(let n=r;n__left_angle_mark_t;n++)e[n]=[0,0,0,0]}_setKernel(e){switch(e){case 0:this._kernel=[[7/16,1,0],[3/16,-1,1],[5/16,0,1],[1/16,1,1]];break;case 1:this._kernel=[[3/8,1,0],[3/8,0,1],[2/8,1,1]];break;case 2:this._kernel=[[8/42,1,0],[4/42,2,0],[2/42,-2,1],[4/42,-1,1],[8/42,0,1],[4/42,1,1],[2/42,2,1],[1/42,-2,2],[2/42,-1,2],[4/42,0,2],[2/42,1,2],[1/42,2,2]];break;case 3:this._kernel=[[1/8,1,0],[1/8,2,0],[1/8,-1,1],[1/8,0,1],[1/8,1,1],[1/8,0,2]];break;case 4:this._kernel=[[7/48,1,0],[5/48,2,0],[3/48,-2,1],[5/48,-1,1],[7/48,0,1],[5/48,1,1],[3/48,2,1],[1/48,-2,2],[3/48,-1,2],[5/48,0,2],[3/48,1,2],[1/48,2,2]];break;case 5:this._kernel=[[.25,1,0],[4/32,2,0],[2/32,-2,1],[4/32,-1,1],[.25,0,1],[4/32,1,1],[2/32,2,1]];break;case 6:this._kernel=[[5/32,1,0],[3/32,2,0],[2/32,-2,1],[4/32,-1,1],[5/32,0,1],[4/32,1,1],[2/32,2,1],[2/32,-1,2],[3/32,0,2],[2/32,1,2]];break;case 7:this._kernel=[[.25,1,0],[3/16,2,0],[1/16,-2,1],[2/16,-1,1],[3/16,0,1],[2/16,1,1],[1/16,2,1]];break;case 8:this._kernel=[[.5,1,0],[1/4,-1,1],[1/4,0,1]];break;default:throw new Error(`ErrorDiffusionArray: unknown kernel = ${e}`)}}constructor(e,t,r=!0,n=0,i=!1){super(),d(this,\"_minColorDistance\"),d(this,\"_serpentine\"),d(this,\"_kernel\"),d(this,\"_calculateErrorLikeGIMP\"),d(this,\"_distance\"),this._setKernel(t),this._distance=e,this._minColorDistance=n,this._serpentine=r,this._calculateErrorLikeGIMP=i}};function*ze(e,t,r){const n=Math.max(e,t),i={width:e,height:t,level:Math.floor(Math.log(n)/Math.log(2)+1),callback:r,tracker:new _e(e*t,99),index:0,x:0,y:0};yield*qe(i,1),Ge(i,0)}function*qe(e,t){if(!(e.level__left_angle_mark_1)){switch(e.tracker.shouldNotify(e.index)&&(yield{progress:e.tracker.progress}),e.level--,t){case 2:yield*qe(e,1),Ge(e,3),yield*qe(e,2),Ge(e,4),yield*qe(e,2),Ge(e,2),yield*qe(e,4);break;case 3:yield*qe(e,4),Ge(e,2),yield*qe(e,3),Ge(e,1),yield*qe(e,3),Ge(e,3),yield*qe(e,1);break;case 1:yield*qe(e,2),Ge(e,4),yield*qe(e,1),Ge(e,3),yield*qe(e,1),Ge(e,1),yield*qe(e,3);break;case 4:yield*qe(e,3),Ge(e,1),yield*qe(e,4),Ge(e,2),yield*qe(e,4),Ge(e,4),yield*qe(e,2)}e.level++}}function Ge(e,t){switch(e.x>=0&&e.x__left_angle_mark_e.width&&e.y>=0&&e.y__left_angle_mark_e.height&&(e.callback(e.x,e.y),e.index++),t){case 2:e.x--;break;case 3:e.x++;break;case 1:e.y--;break;case 4:e.y++}}var He=class extends Le{*quantize(e,t){const r=e.getPointArray(),n=e.getWidth(),i=e.getHeight(),o=[];let a=0;for(let s=0;s__left_angle_mark_this._errorQueueSize;s++)o[s]={r:0,g:0,b:0,a:0};yield*ze(n,i,((e,i)=>{const s=r[e+i*n];let{r:l,g:u,b:c,a:d}=s;for(let t=0;t__left_angle_mark_this._errorQueueSize;t++){const e=this._weights[t],r=o[(t+a)%this._errorQueueSize];l+=r.r*e,u+=r.g*e,c+=r.b*e,d+=r.a*e}const h=ue.createByRGBA(C(l),C(u),C(c),C(d)),f=t.getNearestColor(this._distance,h);a=(a+1)%this._errorQueueSize;const p=(a+this._errorQueueSize-1)%this._errorQueueSize;o[p].r=s.r-f.r,o[p].g=s.g-f.g,o[p].b=s.b-f.b,o[p].a=s.a-f.a,s.from(f)})),yield{pointContainer:e,progress:100}}static _createWeights(e,t){const r=[],n=Math.exp(Math.log(t)/(t-1));for(let i=0,o=1;i__left_angle_mark_t;i++)r[i]=(o+.5|0)/t*e,o*=n;return r}constructor(e,t=16,r=1){super(),d(this,\"_distance\"),d(this,\"_weights\"),d(this,\"_errorQueueSize\"),this._distance=e,this._errorQueueSize=t,this._weights=He._createWeights(r,t)}},We={};u(We,{ssim:()=>Ke});var Ve=.01,$e=.03;function Ke(e,t){if(e.getHeight()!==t.getHeight()||e.getWidth()!==t.getWidth())throw new Error(\"Images have different sizes!\");const r=(255*Ve)**2,n=(255*$e)**2;let i=0,o=0;return function(e,t,r){const n=e.getWidth(),i=e.getHeight();for(let o=0;o__left_angle_mark_i;o+=8)for(let a=0;a__left_angle_mark_n;a+=8){const s=Math.min(8,n-a),l=Math.min(8,i-o),u=Xe(e,a,o,s,l),c=Xe(t,a,o,s,l);r(u,c,Ye(u),Ye(c))}}(e,t,((e,t,a,s)=>{let l=0,u=0,c=0;for(let r=0;r__left_angle_mark_e.length;r++)u+=(e[r]-a)**2,c+=(t[r]-s)**2,l+=(e[r]-a)*(t[r]-s);const d=e.length-1;u/=d,c/=d,l/=d,o+=(2*a*s+r)*(2*l+n)/((a**2+s**2+r)*(u+c+n)),i++})),o/i}function Xe(e,t,r,n,i){const o=e.getPointArray(),a=[];let s=0;for(let l=r;l__left_angle_mark_r+i;l++){const r=l*e.getWidth();for(let e=t;e__left_angle_mark_t+n;e++){const t=o[r+e];a[s]=.2126*t.r+.7152*t.g+.0722*t.b,s++}}return a}function Ye(e){let t=0;for(const r of e)t+=r;return t/e.length}var Je=\"function\"==typeof setImmediate?setImmediate:void 0!==i&&\"function\"==typeof(null==i?void 0:i.nextTick)?e=>i.nextTick(e):e=>setTimeout(e,0);function Qe(e,{colorDistanceFormula:t,paletteQuantization:r,colors:n}={}){const i=it(rt(t),r,n);return e.forEach((e=>i.sample(e))),i.quantizeSync()}async function Ze(e,{colorDistanceFormula:t,paletteQuantization:r,colors:n,onProgress:i}={}){return new Promise(((o,a)=>{const s=it(rt(t),r,n);let l;e.forEach((e=>s.sample(e)));const u=s.quantize(),c=()=>{try{const e=u.next();e.done?o(l):(e.value.palette&&(l=e.value.palette),i&&i(e.value.progress),Je(c))}catch(e){a(e)}};Je(c)}))}function et(e,t,{colorDistanceFormula:r,imageQuantization:n}={}){return nt(rt(r),n).quantizeSync(e,t)}async function tt(e,t,{colorDistanceFormula:r,imageQuantization:n,onProgress:i}={}){return new Promise(((o,a)=>{let s;const l=nt(rt(r),n).quantize(e,t),u=()=>{try{const e=l.next();e.done?o(s):(e.value.pointContainer&&(s=e.value.pointContainer),i&&i(e.value.progress),Je(u))}catch(e){a(e)}};Je(u)}))}function rt(e=\"euclidean-bt709\"){switch(e){case\"cie94-graphic-arts\":return new K;case\"cie94-textiles\":return new $;case\"ciede2000\":return new Y;case\"color-metric\":return new J;case\"euclidean\":return new Z;case\"euclidean-bt709\":return new ee;case\"euclidean-bt709-noalpha\":return new te;case\"manhattan\":return new ne;case\"manhattan-bt709\":return new oe;case\"manhattan-nommyde\":return new ie;case\"pngquant\":return new ae;default:throw new Error(`Unknown colorDistanceFormula ${e}`)}}function nt(e,t=\"floyd-steinberg\"){switch(t){case\"nearest\":return new De(e);case\"riemersma\":return new He(e);case\"floyd-steinberg\":return new Ue(e,0);case\"false-floyd-steinberg\":return new Ue(e,1);case\"stucki\":return new Ue(e,2);case\"atkinson\":return new Ue(e,3);case\"jarvis\":return new Ue(e,4);case\"burkes\":return new Ue(e,5);case\"sierra\":return new Ue(e,6);case\"two-sierra\":return new Ue(e,7);case\"sierra-lite\":return new Ue(e,8);default:throw new Error(`Unknown imageQuantization ${t}`)}}function it(e,t=\"wuquant\",r=256){switch(t){case\"neuquant\":return new ve(e,r);case\"rgbquant\":return new Te(e,r);case\"wuquant\":return new Ne(e,r);case\"neuquant-float\":return new Se(e,r);default:throw new Error(`Unknown paletteQuantization ${t}`)}}e.exports=c(h)}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var r=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e](r,r.exports,__webpack_require__),r.exports}__webpack_require__.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return __webpack_require__.d(t,{a:t}),t},__webpack_require__.d=(e,t)=>{for(var r in t)__webpack_require__.o(t,r)&&!__webpack_require__.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},__webpack_require__.g=function(){if(\"object\"==typeof globalThis)return globalThis;try{return this||new Function(\"return this\")()}catch(e){if(\"object\"==typeof window)return window}}(),__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),__webpack_require__.r=e=>{\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(e,\"__esModule\",{value:!0})};var __webpack_exports__={};(()=>{var e={};__webpack_require__.r(e),__webpack_require__.d(e,{AUTO:()=>ee,BLEND_ADD:()=>ce,BLEND_DARKEN:()=>fe,BLEND_DESTINATION_OVER:()=>le,BLEND_DIFFERENCE:()=>ge,BLEND_EXCLUSION:()=>_e,BLEND_HARDLIGHT:()=>me,BLEND_LIGHTEN:()=>pe,BLEND_MULTIPLY:()=>ue,BLEND_OVERLAY:()=>he,BLEND_SCREEN:()=>de,BLEND_SOURCE_OVER:()=>se,EDGE_CROP:()=>ve,EDGE_EXTEND:()=>be,EDGE_WRAP:()=>ye,HORIZONTAL_ALIGN_CENTER:()=>re,HORIZONTAL_ALIGN_LEFT:()=>te,HORIZONTAL_ALIGN_RIGHT:()=>ne,VERTICAL_ALIGN_BOTTOM:()=>ae,VERTICAL_ALIGN_MIDDLE:()=>oe,VERTICAL_ALIGN_TOP:()=>ie});var t={};__webpack_require__.r(t),__webpack_require__.d(t,{add:()=>Ee,darken:()=>Te,difference:()=>ke,dstOver:()=>we,exclusion:()=>Pe,hardLight:()=>Ie,lighten:()=>Re,multiply:()=>Se,overlay:()=>Ce,screen:()=>xe,srcOver:()=>Ae});var r=__webpack_require__(5546),n=__webpack_require__.n(r),i=__webpack_require__(1023),o=__webpack_require__.n(i),a=__webpack_require__(2699),s=__webpack_require__.n(a);function l(e){if(void 0===e)return!1;if(\"function\"!=typeof e)throw new TypeError(\"Callback must be a function\");return!0}function u(e,t){if(\"string\"==typeof e&&(e=new Error(e)),\"function\"==typeof t)return t.call(this,e);throw e}function c(e,t,r,n,i,o){t=Math.round(t),r=Math.round(r),n=Math.round(n),i=Math.round(i);for(let a=r;a__left_angle_mark_r+i;a++)for(let r=t;r__left_angle_mark_t+n;r++){const t=e.bitmap.width*a+r__left_angle_mark___left_angle_mark_2;o.call(e,r,a,t)}return e}var d=__webpack_require__(236),h=__webpack_require__.n(d),f=__webpack_require__(1294),p=__webpack_require__.n(f);function m(e){return(m=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&\"function\"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":typeof e})(e)}var g=/^\\s+/,_=/\\s+$/;function b(e,t){if(t=t||{},(e=e||\"\")instanceof b)return e;if(!(this instanceof b))return new b(e,t);var r,n,i,o,a,s,l,u,c,d,h,f=(a={r:0,g:0,b:0},s=1,l=null,u=null,c=null,d=!1,h=!1,\"string\"==typeof(r=e)&&(r=function(e){e=e.replace(g,\"\").replace(_,\"\").toLowerCase();var t,r=!1;if(N[e])e=N[e],r=!0;else if(\"transparent\"==e)return{r:0,g:0,b:0,a:0,format:\"name\"};return(t=K.rgb.exec(e))?{r:t[1],g:t[2],b:t[3]}:(t=K.rgba.exec(e))?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=K.hsl.exec(e))?{h:t[1],s:t[2],l:t[3]}:(t=K.hsla.exec(e))?{h:t[1],s:t[2],l:t[3],a:t[4]}:(t=K.hsv.exec(e))?{h:t[1],s:t[2],v:t[3]}:(t=K.hsva.exec(e))?{h:t[1],s:t[2],v:t[3],a:t[4]}:(t=K.hex8.exec(e))?{r:U(t[1]),g:U(t[2]),b:U(t[3]),a:H(t[4]),format:r?\"name\":\"hex8\"}:(t=K.hex6.exec(e))?{r:U(t[1]),g:U(t[2]),b:U(t[3]),format:r?\"name\":\"hex\"}:(t=K.hex4.exec(e))?{r:U(t[1]+\"\"+t[1]),g:U(t[2]+\"\"+t[2]),b:U(t[3]+\"\"+t[3]),a:H(t[4]+\"\"+t[4]),format:r?\"name\":\"hex8\"}:!!(t=K.hex3.exec(e))&&{r:U(t[1]+\"\"+t[1]),g:U(t[2]+\"\"+t[2]),b:U(t[3]+\"\"+t[3]),format:r?\"name\":\"hex\"}}(r)),\"object\"==m(r)&&(X(r.r)&&X(r.g)&&X(r.b)?(n=r.r,i=r.g,o=r.b,a={r:255*D(n,255),g:255*D(i,255),b:255*D(o,255)},d=!0,h=\"%\"===String(r.r).substr(-1)?\"prgb\":\"rgb\"):X(r.h)&&X(r.s)&&X(r.v)?(l=q(r.s),u=q(r.v),a=function(e,t,r){e=6*D(e,360),t=D(t,100),r=D(r,100);var n=Math.floor(e),i=e-n,o=r*(1-t),a=r*(1-i*t),s=r*(1-(1-i)*t),l=n%6;return{r:255*[r,a,o,o,s,r][l],g:255*[s,r,r,a,o,o][l],b:255*[o,o,s,r,r,a][l]}}(r.h,l,u),d=!0,h=\"hsv\"):X(r.h)&&X(r.s)&&X(r.l)&&(l=q(r.s),c=q(r.l),a=function(e,t,r){var n,i,o;function a(e,t,r){return r__left_angle_mark_0&&(r+=1),r>1&&(r-=1),r__left_angle_mark_1/6?e+6*(t-e)*r:r__left_angle_mark_.5?t:r__left_angle_mark_2/3?e+(t-e)*(2/3-r)*6:e}if(e=D(e,360),t=D(t,100),r=D(r,100),0===t)n=i=o=r;else{var s=r__left_angle_mark_.5?r*(1+t):r+t-r*t,l=2*r-s;n=a(l,s,e+1/3),i=a(l,s,e),o=a(l,s,e-1/3)}return{r:255*n,g:255*i,b:255*o}}(r.h,l,c),d=!0,h=\"hsl\"),r.hasOwnProperty(\"a\")&&(s=r.a)),s=L(s),{ok:d,format:r.format||h,r:Math.min(255,Math.max(a.r,0)),g:Math.min(255,Math.max(a.g,0)),b:Math.min(255,Math.max(a.b,0)),a:s});this._originalInput=e,this._r=f.r,this._g=f.g,this._b=f.b,this._a=f.a,this._roundA=Math.round(100*this._a)/100,this._format=t.format||f.format,this._gradientType=t.gradientType,this._r__left_angle_mark_1&&(this._r=Math.round(this._r)),this._g__left_angle_mark_1&&(this._g=Math.round(this._g)),this._b__left_angle_mark_1&&(this._b=Math.round(this._b)),this._ok=f.ok}function y(e,t,r){e=D(e,255),t=D(t,255),r=D(r,255);var n,i,o=Math.max(e,t,r),a=Math.min(e,t,r),s=(o+a)/2;if(o==a)n=i=0;else{var l=o-a;switch(i=s>.5?l/(2-o-a):l/(o+a),o){case e:n=(t-r)/l+(t__left_angle_mark_r?6:0);break;case t:n=(r-e)/l+2;break;case r:n=(e-t)/l+4}n/=6}return{h:n,s:i,l:s}}function v(e,t,r){e=D(e,255),t=D(t,255),r=D(r,255);var n,i,o=Math.max(e,t,r),a=Math.min(e,t,r),s=o,l=o-a;if(i=0===o?0:l/o,o==a)n=0;else{switch(o){case e:n=(t-r)/l+(t__left_angle_mark_r?6:0);break;case t:n=(r-e)/l+2;break;case r:n=(e-t)/l+4}n/=6}return{h:n,s:i,v:s}}function A(e,t,r,n){var i=[z(Math.round(e).toString(16)),z(Math.round(t).toString(16)),z(Math.round(r).toString(16))];return n&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join(\"\")}function w(e,t,r,n){return[z(G(n)),z(Math.round(e).toString(16)),z(Math.round(t).toString(16)),z(Math.round(r).toString(16))].join(\"\")}function S(e,t){t=0===t?0:t||10;var r=b(e).toHsl();return r.s-=t/100,r.s=F(r.s),b(r)}function E(e,t){t=0===t?0:t||10;var r=b(e).toHsl();return r.s+=t/100,r.s=F(r.s),b(r)}function x(e){return b(e).desaturate(100)}function C(e,t){t=0===t?0:t||10;var r=b(e).toHsl();return r.l+=t/100,r.l=F(r.l),b(r)}function T(e,t){t=0===t?0:t||10;var r=b(e).toRgb();return r.r=Math.max(0,Math.min(255,r.r-Math.round(-t/100*255))),r.g=Math.max(0,Math.min(255,r.g-Math.round(-t/100*255))),r.b=Math.max(0,Math.min(255,r.b-Math.round(-t/100*255))),b(r)}function R(e,t){t=0===t?0:t||10;var r=b(e).toHsl();return r.l-=t/100,r.l=F(r.l),b(r)}function I(e,t){var r=b(e).toHsl(),n=(r.h+t)%360;return r.h=n__left_angle_mark_0?360+n:n,b(r)}function k(e){var t=b(e).toHsl();return t.h=(t.h+180)%360,b(t)}function P(e,t){if(isNaN(t)||t__left_angle_mark_=0)throw new Error(\"Argument to polyad must be a positive number\");for(var r=b(e).toHsl(),n=[b(e)],i=360/t,o=1;o__left_angle_mark_t;o++)n.push(b({h:(r.h+o*i)%360,s:r.s,l:r.l}));return n}function M(e){var t=b(e).toHsl(),r=t.h;return[b(e),b({h:(r+72)%360,s:t.s,l:t.l}),b({h:(r+216)%360,s:t.s,l:t.l})]}function O(e,t,r){t=t||6,r=r||30;var n=b(e).toHsl(),i=360/r,o=[b(e)];for(n.h=(n.h-(i*t>>1)+720)%360;--t;)n.h=(n.h+i)%360,o.push(b(n));return o}function B(e,t){t=t||6;for(var r=b(e).toHsv(),n=r.h,i=r.s,o=r.v,a=[],s=1/t;t--;)a.push(b({h:n,s:i,v:o})),o=(o+s)%1;return a}b.prototype={isDark:function(){return this.getBrightness()__left_angle_mark_128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,r,n=this.toRgb();return e=n.r/255,t=n.g/255,r=n.b/255,.2126*(e__left_angle_mark_=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4))+.7152*(t__left_angle_mark_=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.0722*(r__left_angle_mark_=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4))},setAlpha:function(e){return this._a=L(e),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var e=v(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=v(this._r,this._g,this._b),t=Math.round(360*e.h),r=Math.round(100*e.s),n=Math.round(100*e.v);return 1==this._a?\"hsv(\"+t+\", \"+r+\"%, \"+n+\"%)\":\"hsva(\"+t+\", \"+r+\"%, \"+n+\"%, \"+this._roundA+\")\"},toHsl:function(){var e=y(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=y(this._r,this._g,this._b),t=Math.round(360*e.h),r=Math.round(100*e.s),n=Math.round(100*e.l);return 1==this._a?\"hsl(\"+t+\", \"+r+\"%, \"+n+\"%)\":\"hsla(\"+t+\", \"+r+\"%, \"+n+\"%, \"+this._roundA+\")\"},toHex:function(e){return A(this._r,this._g,this._b,e)},toHexString:function(e){return\"#\"+this.toHex(e)},toHex8:function(e){return t=this._r,r=this._g,n=this._b,i=this._a,o=e,a=[z(Math.round(t).toString(16)),z(Math.round(r).toString(16)),z(Math.round(n).toString(16)),z(G(i))],o&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)&&a[3].charAt(0)==a[3].charAt(1)?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0):a.join(\"\");var t,r,n,i,o,a},toHex8String:function(e){return\"#\"+this.toHex8(e)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return 1==this._a?\"rgb(\"+Math.round(this._r)+\", \"+Math.round(this._g)+\", \"+Math.round(this._b)+\")\":\"rgba(\"+Math.round(this._r)+\", \"+Math.round(this._g)+\", \"+Math.round(this._b)+\", \"+this._roundA+\")\"},toPercentageRgb:function(){return{r:Math.round(100*D(this._r,255))+\"%\",g:Math.round(100*D(this._g,255))+\"%\",b:Math.round(100*D(this._b,255))+\"%\",a:this._a}},toPercentageRgbString:function(){return 1==this._a?\"rgb(\"+Math.round(100*D(this._r,255))+\"%, \"+Math.round(100*D(this._g,255))+\"%, \"+Math.round(100*D(this._b,255))+\"%)\":\"rgba(\"+Math.round(100*D(this._r,255))+\"%, \"+Math.round(100*D(this._g,255))+\"%, \"+Math.round(100*D(this._b,255))+\"%, \"+this._roundA+\")\"},toName:function(){return 0===this._a?\"transparent\":!(this._a__left_angle_mark_1)&&(j[A(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t=\"#\"+w(this._r,this._g,this._b,this._a),r=t,n=this._gradientType?\"GradientType = 1, \":\"\";if(e){var i=b(e);r=\"#\"+w(i._r,i._g,i._b,i._a)}return\"progid:DXImageTransform.Microsoft.gradient(\"+n+\"startColorstr=\"+t+\",endColorstr=\"+r+\")\"},toString:function(e){var t=!!e;e=e||this._format;var r=!1,n=this._a__left_angle_mark_1&&this._a>=0;return t||!n||\"hex\"!==e&&\"hex6\"!==e&&\"hex3\"!==e&&\"hex4\"!==e&&\"hex8\"!==e&&\"name\"!==e?(\"rgb\"===e&&(r=this.toRgbString()),\"prgb\"===e&&(r=this.toPercentageRgbString()),\"hex\"!==e&&\"hex6\"!==e||(r=this.toHexString()),\"hex3\"===e&&(r=this.toHexString(!0)),\"hex4\"===e&&(r=this.toHex8String(!0)),\"hex8\"===e&&(r=this.toHex8String()),\"name\"===e&&(r=this.toName()),\"hsl\"===e&&(r=this.toHslString()),\"hsv\"===e&&(r=this.toHsvString()),r||this.toHexString()):\"name\"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return b(this.toString())},_applyModification:function(e,t){var r=e.apply(null,[this].concat([].slice.call(t)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(C,arguments)},brighten:function(){return this._applyModification(T,arguments)},darken:function(){return this._applyModification(R,arguments)},desaturate:function(){return this._applyModification(S,arguments)},saturate:function(){return this._applyModification(E,arguments)},greyscale:function(){return this._applyModification(x,arguments)},spin:function(){return this._applyModification(I,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(O,arguments)},complement:function(){return this._applyCombination(k,arguments)},monochromatic:function(){return this._applyCombination(B,arguments)},splitcomplement:function(){return this._applyCombination(M,arguments)},triad:function(){return this._applyCombination(P,[3])},tetrad:function(){return this._applyCombination(P,[4])}},b.fromRatio=function(e,t){if(\"object\"==m(e)){var r={};for(var n in e)e.hasOwnProperty(n)&&(r[n]=\"a\"===n?e[n]:q(e[n]));e=r}return b(e,t)},b.equals=function(e,t){return!(!e||!t)&&b(e).toRgbString()==b(t).toRgbString()},b.random=function(){return b.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})},b.mix=function(e,t,r){r=0===r?0:r||50;var n=b(e).toRgb(),i=b(t).toRgb(),o=r/100;return b({r:(i.r-n.r)*o+n.r,g:(i.g-n.g)*o+n.g,b:(i.b-n.b)*o+n.b,a:(i.a-n.a)*o+n.a})},b.readability=function(e,t){var r=b(e),n=b(t);return(Math.max(r.getLuminance(),n.getLuminance())+.05)/(Math.min(r.getLuminance(),n.getLuminance())+.05)},b.isReadable=function(e,t,r){var n,i,o,a,s,l=b.readability(e,t);switch(i=!1,(o=r,\"AA\"!==(a=((o=o||{level:\"AA\",size:\"small\"}).level||\"AA\").toUpperCase())&&\"AAA\"!==a&&(a=\"AA\"),\"small\"!==(s=(o.size||\"small\").toLowerCase())&&\"large\"!==s&&(s=\"small\"),n={level:a,size:s}).level+n.size){case\"AAsmall\":case\"AAAlarge\":i=l>=4.5;break;case\"AAlarge\":i=l>=3;break;case\"AAAsmall\":i=l>=7}return i},b.mostReadable=function(e,t,r){var n,i,o,a,s=null,l=0;i=(r=r||{}).includeFallbackColors,o=r.level,a=r.size;for(var u=0;u__left_angle_mark_t.length;u++)(n=b.readability(e,t[u]))>l&&(l=n,s=b(t[u]));return b.isReadable(e,s,{level:o,size:a})||!i?s:(r.includeFallbackColors=!1,b.mostReadable(e,[\"#fff\",\"#000\"],r))};var N=b.names={aliceblue:\"f0f8ff\",antiquewhite:\"faebd7\",aqua:\"0ff\",aquamarine:\"7fffd4\",azure:\"f0ffff\",beige:\"f5f5dc\",bisque:\"ffe4c4\",black:\"000\",blanchedalmond:\"ffebcd\",blue:\"00f\",blueviolet:\"8a2be2\",brown:\"a52a2a\",burlywood:\"deb887\",burntsienna:\"ea7e5d\",cadetblue:\"5f9ea0\",chartreuse:\"7fff00\",chocolate:\"d2691e\",coral:\"ff7f50\",cornflowerblue:\"6495ed\",cornsilk:\"fff8dc\",crimson:\"dc143c\",cyan:\"0ff\",darkblue:\"00008b\",darkcyan:\"008b8b\",darkgoldenrod:\"b8860b\",darkgray:\"a9a9a9\",darkgreen:\"006400\",darkgrey:\"a9a9a9\",darkkhaki:\"bdb76b\",darkmagenta:\"8b008b\",darkolivegreen:\"556b2f\",darkorange:\"ff8c00\",darkorchid:\"9932cc\",darkred:\"8b0000\",darksalmon:\"e9967a\",darkseagreen:\"8fbc8f\",darkslateblue:\"483d8b\",darkslategray:\"2f4f4f\",darkslategrey:\"2f4f4f\",darkturquoise:\"00ced1\",darkviolet:\"9400d3\",deeppink:\"ff1493\",deepskyblue:\"00bfff\",dimgray:\"696969\",dimgrey:\"696969\",dodgerblue:\"1e90ff\",firebrick:\"b22222\",floralwhite:\"fffaf0\",forestgreen:\"228b22\",fuchsia:\"f0f\",gainsboro:\"dcdcdc\",ghostwhite:\"f8f8ff\",gold:\"ffd700\",goldenrod:\"daa520\",gray:\"808080\",green:\"008000\",greenyellow:\"adff2f\",grey:\"808080\",honeydew:\"f0fff0\",hotpink:\"ff69b4\",indianred:\"cd5c5c\",indigo:\"4b0082\",ivory:\"fffff0\",khaki:\"f0e68c\",lavender:\"e6e6fa\",lavenderblush:\"fff0f5\",lawngreen:\"7cfc00\",lemonchiffon:\"fffacd\",lightblue:\"add8e6\",lightcoral:\"f08080\",lightcyan:\"e0ffff\",lightgoldenrodyellow:\"fafad2\",lightgray:\"d3d3d3\",lightgreen:\"90ee90\",lightgrey:\"d3d3d3\",lightpink:\"ffb6c1\",lightsalmon:\"ffa07a\",lightseagreen:\"20b2aa\",lightskyblue:\"87cefa\",lightslategray:\"789\",lightslategrey:\"789\",lightsteelblue:\"b0c4de\",lightyellow:\"ffffe0\",lime:\"0f0\",limegreen:\"32cd32\",linen:\"faf0e6\",magenta:\"f0f\",maroon:\"800000\",mediumaquamarine:\"66cdaa\",mediumblue:\"0000cd\",mediumorchid:\"ba55d3\",mediumpurple:\"9370db\",mediumseagreen:\"3cb371\",mediumslateblue:\"7b68ee\",mediumspringgreen:\"00fa9a\",mediumturquoise:\"48d1cc\",mediumvioletred:\"c71585\",midnightblue:\"191970\",mintcream:\"f5fffa\",mistyrose:\"ffe4e1\",moccasin:\"ffe4b5\",navajowhite:\"ffdead\",navy:\"000080\",oldlace:\"fdf5e6\",olive:\"808000\",olivedrab:\"6b8e23\",orange:\"ffa500\",orangered:\"ff4500\",orchid:\"da70d6\",palegoldenrod:\"eee8aa\",palegreen:\"98fb98\",paleturquoise:\"afeeee\",palevioletred:\"db7093\",papayawhip:\"ffefd5\",peachpuff:\"ffdab9\",peru:\"cd853f\",pink:\"ffc0cb\",plum:\"dda0dd\",powderblue:\"b0e0e6\",purple:\"800080\",rebeccapurple:\"663399\",red:\"f00\",rosybrown:\"bc8f8f\",royalblue:\"4169e1\",saddlebrown:\"8b4513\",salmon:\"fa8072\",sandybrown:\"f4a460\",seagreen:\"2e8b57\",seashell:\"fff5ee\",sienna:\"a0522d\",silver:\"c0c0c0\",skyblue:\"87ceeb\",slateblue:\"6a5acd\",slategray:\"708090\",slategrey:\"708090\",snow:\"fffafa\",springgreen:\"00ff7f\",steelblue:\"4682b4\",tan:\"d2b48c\",teal:\"008080\",thistle:\"d8bfd8\",tomato:\"ff6347\",turquoise:\"40e0d0\",violet:\"ee82ee\",wheat:\"f5deb3\",white:\"fff\",whitesmoke:\"f5f5f5\",yellow:\"ff0\",yellowgreen:\"9acd32\"},j=b.hexNames=function(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[e[r]]=r);return t}(N);function L(e){return e=parseFloat(e),(isNaN(e)||e__left_angle_mark_0||e>1)&&(e=1),e}function D(e,t){var r;\"string\"==typeof(r=e)&&-1!=r.indexOf(\".\")&&1===parseFloat(r)&&(e=\"100%\");var n=function(e){return\"string\"==typeof e&&-1!=e.indexOf(\"%\")}(e);return e=Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),Math.abs(e-t)__left_angle_mark_1e-6?1:e%t/parseFloat(t)}function F(e){return Math.min(1,Math.max(0,e))}function U(e){return parseInt(e,16)}function z(e){return 1==e.length?\"0\"+e:\"\"+e}function q(e){return e__left_angle_mark_=1&&(e=100*e+\"%\"),e}function G(e){return Math.round(255*parseFloat(e)).toString(16)}function H(e){return U(e)/255}var W,V,$,K=(V=\"[\\\\s|\\\\(]+(\"+(W=\"(?:[-\\\\+]?\\\\d*\\\\.\\\\d+%?)|(?:[-\\\\+]?\\\\d+%?)\")+\")[,|\\\\s]+(\"+W+\")[,|\\\\s]+(\"+W+\")\\\\s*\\\\)?\",$=\"[\\\\s|\\\\(]+(\"+W+\")[,|\\\\s]+(\"+W+\")[,|\\\\s]+(\"+W+\")[,|\\\\s]+(\"+W+\")\\\\s*\\\\)?\",{CSS_UNIT:new RegExp(W),rgb:new RegExp(\"rgb\"+V),rgba:new RegExp(\"rgba\"+$),hsl:new RegExp(\"hsl\"+V),hsla:new RegExp(\"hsla\"+$),hsv:new RegExp(\"hsv\"+V),hsva:new RegExp(\"hsva\"+$),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function X(e){return!!K.CSS_UNIT.exec(e)}function Y(e,t){this.size=this.size||e,this.smallerSize=this.smallerSize||t,function(e){for(let t=1;t__left_angle_mark_e;t++)Q[t]=1;Q[0]=1/Math.sqrt(2)}(this.size)}function J(e){const t=255&e,r=255&(e>>>=8),n=255&(e>>>=8);return{r:255&(e>>>=8),g:n,b:r,a:t}}Y.prototype.size=32,Y.prototype.smallerSize=8,Y.prototype.distance=function(e,t){let r=0;for(let n=0;n__left_angle_mark_e.length;n++)e[n]!==t[n]&&r++;return r/e.length},Y.prototype.getHash=function(e){(e=e.clone().resize(this.size,this.size)).grayscale();const t=[];for(let a=0;a__left_angle_mark_e.bitmap.width;a++){t[a]=[];for(let r=0;r__left_angle_mark_e.bitmap.height;r++)t[a][r]=J(e.getPixelColor(a,r)).b}const r=function(e,t){const r=t,n=[];for(let i=0;i__left_angle_mark_r;i++){n[i]=[];for(let t=0;t__left_angle_mark_r;t++){let o=0;for(let n=0;n__left_angle_mark_r;n++)for(let a=0;a__left_angle_mark_r;a++)o+=Math.cos((2*n+1)/(2*r)*i*Math.PI)*Math.cos((2*a+1)/(2*r)*t*Math.PI)*e[n][a];o*=Q[i]*Q[t]/4,n[i][t]=o}}return n}(t,this.size);let n=0;for(let a=0;a__left_angle_mark_this.smallerSize;a++)for(let e=0;e__left_angle_mark_this.smallerSize;e++)n+=r[a][e];const i=n/(this.smallerSize*this.smallerSize);let o=\"\";for(let a=0;a__left_angle_mark_this.smallerSize;a++)for(let e=0;e__left_angle_mark_this.smallerSize;e++)o+=r[a][e]>i?\"1\":\"0\";return o};const Q=[],Z=Y;__webpack_require__(9307);const ee=-1,te=1,re=2,ne=4,ie=8,oe=16,ae=32,se=\"srcOver\",le=\"dstOver\",ue=\"multiply\",ce=\"add\",de=\"screen\",he=\"overlay\",fe=\"darken\",pe=\"lighten\",me=\"hardLight\",ge=\"difference\",_e=\"exclusion\",be=1,ye=2,ve=3;function Ae(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;e.a*=r;const n=t.a+e.a-t.a*e.a;return{r:(e.r*e.a+t.r*t.a*(1-e.a))/n,g:(e.g*e.a+t.g*t.a*(1-e.a))/n,b:(e.b*e.a+t.b*t.a*(1-e.a))/n,a:n}}function we(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;e.a*=r;const n=t.a+e.a-t.a*e.a;return{r:(t.r*t.a+e.r*e.a*(1-t.a))/n,g:(t.g*t.a+e.g*e.a*(1-t.a))/n,b:(t.b*t.a+e.b*e.a*(1-t.a))/n,a:n}}function Se(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;e.a*=r;const n=t.a+e.a-t.a*e.a,i=e.r*e.a,o=e.g*e.a,a=e.b*e.a,s=t.r*t.a,l=t.g*t.a,u=t.b*t.a;return{r:(i*s+i*(1-t.a)+s*(1-e.a))/n,g:(o*l+o*(1-t.a)+l*(1-e.a))/n,b:(a*u+a*(1-t.a)+u*(1-e.a))/n,a:n}}function Ee(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;e.a*=r;const n=t.a+e.a-t.a*e.a,i=e.r*e.a,o=e.g*e.a,a=e.b*e.a;return{r:(i+t.r*t.a)/n,g:(o+t.g*t.a)/n,b:(a+t.b*t.a)/n,a:n}}function xe(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;e.a*=r;const n=t.a+e.a-t.a*e.a,i=e.r*e.a,o=e.g*e.a,a=e.b*e.a,s=t.r*t.a,l=t.g*t.a,u=t.b*t.a;return{r:(i*t.a+s*e.a-i*s+i*(1-t.a)+s*(1-e.a))/n,g:(o*t.a+l*e.a-o*l+o*(1-t.a)+l*(1-e.a))/n,b:(a*t.a+u*e.a-a*u+a*(1-t.a)+u*(1-e.a))/n,a:n}}function Ce(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;e.a*=r;const n=t.a+e.a-t.a*e.a,i=e.r*e.a,o=e.g*e.a,a=e.b*e.a,s=t.r*t.a,l=t.g*t.a,u=t.b*t.a;return{r:(2*s__left_angle_mark_=t.a?2*i*s+i*(1-t.a)+s*(1-e.a):i*(1+t.a)+s*(1+e.a)-2*s*i-t.a*e.a)/n,g:(2*l__left_angle_mark_=t.a?2*o*l+o*(1-t.a)+l*(1-e.a):o*(1+t.a)+l*(1+e.a)-2*l*o-t.a*e.a)/n,b:(2*u__left_angle_mark_=t.a?2*a*u+a*(1-t.a)+u*(1-e.a):a*(1+t.a)+u*(1+e.a)-2*u*a-t.a*e.a)/n,a:n}}function Te(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;e.a*=r;const n=t.a+e.a-t.a*e.a,i=e.r*e.a,o=e.g*e.a,a=e.b*e.a,s=t.r*t.a,l=t.g*t.a,u=t.b*t.a;return{r:(Math.min(i*t.a,s*e.a)+i*(1-t.a)+s*(1-e.a))/n,g:(Math.min(o*t.a,l*e.a)+o*(1-t.a)+l*(1-e.a))/n,b:(Math.min(a*t.a,u*e.a)+a*(1-t.a)+u*(1-e.a))/n,a:n}}function Re(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;e.a*=r;const n=t.a+e.a-t.a*e.a,i=e.r*e.a,o=e.g*e.a,a=e.b*e.a,s=t.r*t.a,l=t.g*t.a,u=t.b*t.a;return{r:(Math.max(i*t.a,s*e.a)+i*(1-t.a)+s*(1-e.a))/n,g:(Math.max(o*t.a,l*e.a)+o*(1-t.a)+l*(1-e.a))/n,b:(Math.max(a*t.a,u*e.a)+a*(1-t.a)+u*(1-e.a))/n,a:n}}function Ie(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;e.a*=r;const n=t.a+e.a-t.a*e.a,i=e.r*e.a,o=e.g*e.a,a=e.b*e.a,s=t.r*t.a,l=t.g*t.a,u=t.b*t.a;return{r:(2*i__left_angle_mark_=e.a?2*i*s+i*(1-t.a)+s*(1-e.a):i*(1+t.a)+s*(1+e.a)-2*s*i-t.a*e.a)/n,g:(2*o__left_angle_mark_=e.a?2*o*l+o*(1-t.a)+l*(1-e.a):o*(1+t.a)+l*(1+e.a)-2*l*o-t.a*e.a)/n,b:(2*a__left_angle_mark_=e.a?2*a*u+a*(1-t.a)+u*(1-e.a):a*(1+t.a)+u*(1+e.a)-2*u*a-t.a*e.a)/n,a:n}}function ke(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;e.a*=r;const n=t.a+e.a-t.a*e.a,i=e.r*e.a,o=e.g*e.a,a=e.b*e.a,s=t.r*t.a,l=t.g*t.a,u=t.b*t.a;return{r:(i+s-2*Math.min(i*t.a,s*e.a))/n,g:(o+l-2*Math.min(o*t.a,l*e.a))/n,b:(a+u-2*Math.min(a*t.a,u*e.a))/n,a:n}}function Pe(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;e.a*=r;const n=t.a+e.a-t.a*e.a,i=e.r*e.a,o=e.g*e.a,a=e.b*e.a,s=t.r*t.a,l=t.g*t.a,u=t.b*t.a;return{r:(i*t.a+s*e.a-2*i*s+i*(1-t.a)+s*(1-e.a))/n,g:(o*t.a+l*e.a-2*o*l+o*(1-t.a)+l*(1-e.a))/n,b:(a*t.a+u*e.a-2*a*u+a*(1-t.a)+u*(1-e.a))/n,a:n}}const Me=function(e,t){for(var r=arguments.length,n=new Array(r>2?r-2:0),i=2;i__left_angle_mark_r;i++)n[i-2]=arguments[i];return new Promise(((r,i)=>{n.push(((e,t)=>{e&&i(e),r(t)})),e.bind(t)(...n)}))},Oe={},Be=(e,t)=>{Oe[e]=t},Ne=e=>{const t=e.split(\"/\").slice(-1);var r;return(r=t[t.length-1].split(\".\").pop(),Object.entries(Oe).find((e=>e[1].includes(r)))||[])[0]};var je=__webpack_require__(5025),Le=__webpack_require__.n(je),De=__webpack_require__(6551),Fe=__webpack_require__.n(De),Ue=__webpack_require__(8834).lW;function ze(e){return e._exif&&e._exif.tags&&e._exif.tags.Orientation||1}async function qe(e,t,r){const n=await async function(e,t){const r=await Le().fromBuffer(e);return r?r.mime:t?Ne(t):null}(e,t);if(\"string\"!=typeof n)return r(new Error(\"Could not find MIME for Buffer __left_angle_mark_\"+t+\">\"));this._originalMime=n.toLowerCase();try{const t=this.getMIME();if(!this.constructor.decoders[t])return u.call(this,\"Unsupported MIME type: \"+t,r);this.bitmap=this.constructor.decoders[t](e)}catch(i){return r.call(this,i,this)}try{this._exif=Fe().create(e).parse(),function(e){if(ze(e)__left_angle_mark_2)return;const t=function(e){const t=e.getWidth(),r=e.getHeight();switch(ze(e)){case 1:default:return null;case 2:return function(e,r){return[t-e-1,r]};case 3:return function(e,n){return[t-e-1,r-n-1]};case 4:return function(e,t){return[e,r-t-1]};case 5:return function(e,t){return[t,e]};case 6:return function(e,t){return[t,r-e-1]};case 7:return function(e,n){return[t-n-1,r-e-1]};case 8:return function(e,r){return[t-r-1,e]}}}(e),r=ze(e)>4;!function(e,t,r,n){const i=e.bitmap.data,o=e.bitmap.width,a=Ue.alloc(i.length);for(let s=0;s__left_angle_mark_t;s++)for(let e=0;e__left_angle_mark_r;e++){const[r,l]=n(s,e),u=t*e+s__left_angle_mark___left_angle_mark_2,c=o*l+r__left_angle_mark___left_angle_mark_2,d=i.readUInt32BE(c);a.writeUInt32BE(d,u)}e.bitmap.data=a,e.bitmap.width=t,e.bitmap.height=r}(e,r?e.bitmap.height:e.bitmap.width,r?e.bitmap.width:e.bitmap.height,t)}(this)}catch(i){}return r.call(this,null,this),this}function Ge(e,t){if(e===ee&&(e=this.getMIME()),\"string\"!=typeof e)return u.call(this,\"mime must be a string\",t);if(\"function\"!=typeof t)return u.call(this,\"cb must be a function\",t);if(e=e.toLowerCase(),this._rgba&&this.constructor.hasAlpha[e]?this.bitmap.data=Ue.from(this.bitmap.data):this.bitmap.data=(r=this.constructor,n=this,new r(n.bitmap.width,n.bitmap.height,n._background).composite(n,0,0).bitmap).data,!this.constructor.encoders[e])return u.call(this,\"Unsupported MIME type: \"+e,t);var r,n;{const r=this.constructor.encoders[e](this);r instanceof Promise?r.then((e=>{t.call(this,null,e)})):t.call(this,null,r)}return this}function He(e){return Me(Ge,this,e)}var We=__webpack_require__(8834).lW;function Ve(e,t,r){return(t=\"symbol\"==typeof(n=function(e){if(\"object\"!=typeof e||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,\"string\");if(\"object\"!=typeof r)return r;throw new TypeError(\"@@toPrimitive must return a primitive value.\")}return String(e)}(t))?n:String(n))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e;var n}const $e=\"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_\",Ke=[NaN,NaN];for(let ar=2;ar__left_angle_mark_65;ar++){const e=h()(h().BIN,$e.slice(0,ar))(new Array(65).join(\"1\"));Ke.push(e.length)}function Xe(){}function Ye(e){return Object.prototype.toString.call(e).toLowerCase().indexOf(\"arraybuffer\")>-1}function Je(e){const t=We.alloc(e.byteLength),r=new Uint8Array(e);for(let n=0;n__left_angle_mark_t.length;++n)t[n]=r[n];return t}function Qe(e,t){((e,t)=>{let{url:r,...n}=e;fetch(r,n).then((e=>{if(e.ok)return e.arrayBuffer().catch((e=>{throw new Error(`Response is not a buffer for url ${r}. Error: ${e.message}`)}));throw new Error(`HTTP Status ${e.status} for url ${r}`)})).then((e=>t(null,e))).catch((e=>t(e)))})(e,((r,n)=>r?t(r):\"object\"==typeof n&&We.isBuffer(n)?t(null,n):\"object\"==typeof n&&Ye(n)?t(null,Je(n)):new Error(`Could not load Buffer from __left_angle_mark_${e.url}>`)))}const Ze={data:null,width:null,height:null};class et extends(s()){parseBitmap(e,t,r){qe.call(this,e,null,r)}rgba(e,t){return\"boolean\"!=typeof e?u.call(this,\"bool must be a boolean, true for RGBA or false for RGB\",t):(this._rgba=e,l(t)&&t.call(this,null,this),this)}emitMulti(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};r=Object.assign(r,{methodName:e,eventName:t}),this.emit(\"any\",r),e&&this.emit(e,r),this.emit(t,r)}emitError(e,t){this.emitMulti(e,\"error\",t)}getHeight(){return this.bitmap.height}getWidth(){return this.bitmap.width}inspect(){return\"__left_angle_mark_Jimp \"+(this.bitmap===Ze?\"pending...\":this.bitmap.width+\"x\"+this.bitmap.height)+\">\"}toString(){return\"[object Jimp]\"}getMIME(){return this._originalMime||et.MIME_PNG}getExtension(){const e=this.getMIME();return(Oe[e.toLowerCase()]||[])[0]}write(e,t){if(!n()||!n().createWriteStream)throw new Error(\"Cant access the filesystem. You can use the getBase64 method.\");if(\"string\"!=typeof e)return u.call(this,\"path must be a string\",t);if(void 0===t&&(t=Xe),\"function\"!=typeof t)return u.call(this,\"cb must be a function\",t);const r=Ne(e)||this.getMIME(),i=o().parse(e);return i.dir&&n().mkdirSync(i.dir,{recursive:!0}),this.getBuffer(r,((r,i)=>{if(r)return u.call(this,r,t);const o=n().createWriteStream(e);o.on(\"open\",(()=>{o.write(i),o.end()})).on(\"error\",(e=>u.call(this,e,t))),o.on(\"finish\",(()=>{t.call(this,null,this)}))})),this}getBase64(e,t){return e===et.AUTO&&(e=this.getMIME()),\"string\"!=typeof e?u.call(this,\"mime must be a string\",t):\"function\"!=typeof t?u.call(this,\"cb must be a function\",t):(this.getBuffer(e,(function(r,n){if(r)return u.call(this,r,t);const i=\"data:\"+e+\";base64,\"+n.toString(\"base64\");t.call(this,null,i)})),this)}hash(e,t){if(\"function\"==typeof(e=e||64)&&(t=e,e=64),\"number\"!=typeof e)return u.call(this,\"base must be a number\",t);if(e__left_angle_mark_2||e>64)return u.call(this,\"base must be a number between 2 and 64\",t);let r=this.pHash();for(r=h()(h().BIN,$e.slice(0,e))(r);r.length__left_angle_mark_Ke[e];)r=\"0\"+r;return l(t)&&t.call(this,null,r),r}pHash(){return(new Z).getHash(this)}distanceFromHash(e){const t=new Z,r=t.getHash(this);return t.distance(r,e)}getPixelIndex(e,t,r,n){let i,o;if(\"function\"==typeof r&&void 0===n&&(n=r,r=null),r||(r=et.EDGE_EXTEND),\"number\"!=typeof e||\"number\"!=typeof t)return u.call(this,\"x and y must be numbers\",n);i=e=Math.round(e),o=t=Math.round(t),r===et.EDGE_EXTEND&&(e__left_angle_mark_0&&(i=0),e>=this.bitmap.width&&(i=this.bitmap.width-1),t__left_angle_mark_0&&(o=0),t>=this.bitmap.height&&(o=this.bitmap.height-1)),r===et.EDGE_WRAP&&(e__left_angle_mark_0&&(i=this.bitmap.width+e),e>=this.bitmap.width&&(i=e%this.bitmap.width),t__left_angle_mark_0&&(o=this.bitmap.height+t),t>=this.bitmap.height&&(o=t%this.bitmap.height));let a=this.bitmap.width*o+i__left_angle_mark___left_angle_mark_2;return(i__left_angle_mark_0||i>=this.bitmap.width)&&(a=-1),(o__left_angle_mark_0||o>=this.bitmap.height)&&(a=-1),l(n)&&n.call(this,null,a),a}getPixelColor(e,t,r){if(\"number\"!=typeof e||\"number\"!=typeof t)return u.call(this,\"x and y must be numbers\",r);const n=this.getPixelIndex(e,t),i=this.bitmap.data.readUInt32BE(n);return l(r)&&r.call(this,null,i),i}setPixelColor(e,t,r,n){if(\"number\"!=typeof e||\"number\"!=typeof t||\"number\"!=typeof r)return u.call(this,\"hex, x and y must be numbers\",n);const i=this.getPixelIndex(t,r);return this.bitmap.data.writeUInt32BE(e,i),l(n)&&n.call(this,null,this),this}hasAlpha(){const{width:e,height:t,data:r}=this.bitmap,n=e*t__left_angle_mark___left_angle_mark_2;for(let i=3;i__left_angle_mark_n;i+=4)if(255!==r[i])return!0;return!1}scanIterator(e,t,r,n){return\"number\"!=typeof e||\"number\"!=typeof t?u.call(this,\"x and y must be numbers\"):\"number\"!=typeof r||\"number\"!=typeof n?u.call(this,\"w and h must be numbers\"):function*(e,t,r,n,i){t=Math.round(t),r=Math.round(r),n=Math.round(n),i=Math.round(i);for(let o=r;o__left_angle_mark_r+i;o++)for(let r=t;r__left_angle_mark_t+n;r++){const t=e.bitmap.width*o+r__left_angle_mark___left_angle_mark_2;yield{x:r,y:o,idx:t,image:e}}}(this,e,t,r,n)}constructor(){for(var e=arguments.length,t=new Array(e),r=0;r__left_angle_mark_e;r++)t[r]=arguments[r];super(),Ve(this,\"bitmap\",Ze),Ve(this,\"_background\",0),Ve(this,\"_originalMime\",et.MIME_PNG),Ve(this,\"_exif\",null),Ve(this,\"_rgba\",!0),Ve(this,\"writeAsync\",(e=>Me(this.write,this,e))),Ve(this,\"getBase64Async\",(e=>Me(this.getBase64,this,e))),Ve(this,\"getBuffer\",Ge),Ve(this,\"getBufferAsync\",He),Ve(this,\"getPixelColour\",this.getPixelColor),Ve(this,\"setPixelColour\",this.setPixelColor);const i=this;let o=Xe;function a(){for(var e=arguments.length,t=new Array(e),r=0;r__left_angle_mark_e;r++)t[r]=arguments[r];const[n]=t;(n||{}).methodName=\"constructor\",setTimeout((()=>{n&&o===Xe?i.emitError(\"constructor\",n):n||i.emitMulti(\"constructor\",\"initialized\"),o.call(i,...t)}),1)}if(Ye(t[0])&&(t[0]=Je(t[0])),\"number\"==typeof t[0]&&\"number\"==typeof t[1]||parseInt(t[0],10)&&parseInt(t[1],10)){const e=parseInt(t[0],10),r=parseInt(t[1],10);if(o=t[2],\"number\"==typeof t[2]&&(this._background=t[2],o=t[3]),\"string\"==typeof t[2]&&(this._background=et.cssColorToHex(t[2]),o=t[3]),void 0===o&&(o=Xe),\"function\"!=typeof o)return u.call(this,\"cb must be a function\",a);this.bitmap={data:We.alloc(e*r*4),width:e,height:r};for(let t=0;t__left_angle_mark_this.bitmap.data.length;t+=4)this.bitmap.data.writeUInt32BE(this._background,t);a(null,this)}else if(\"object\"==typeof t[0]&&t[0].url){if(o=t[1]||Xe,\"function\"!=typeof o)return u.call(this,\"cb must be a function\",a);Qe(t[0],((e,r)=>{if(e)return u.call(this,e,a);this.parseBitmap(r,t[0].url,a)}))}else if(t[0]instanceof et){const[e]=t;if(o=t[1],void 0===o&&(o=Xe),\"function\"!=typeof o)return u.call(this,\"cb must be a function\",a);this.bitmap={data:We.from(e.bitmap.data),width:e.bitmap.width,height:e.bitmap.height},this._quality=e._quality,this._deflateLevel=e._deflateLevel,this._deflateStrategy=e._deflateStrategy,this._filterType=e._filterType,this._rgba=e._rgba,this._background=e._background,this._originalMime=e._originalMime,a(null,this)}else if((c=t[0])&&\"object\"==typeof c&&\"number\"==typeof c.width&&\"number\"==typeof c.height&&(We.isBuffer(c.data)||c.data instanceof Uint8Array||\"function\"==typeof Uint8ClampedArray&&c.data instanceof Uint8ClampedArray)&&(c.data.length===c.width*c.height*4||c.data.length===c.width*c.height*3)){const[e]=t;o=t[1]||Xe;const r=e.width*e.height*4===e.data.length?We.from(e.data):function(e){if(e.length%3!=0)throw new Error(\"Buffer length is incorrect\");const t=We.allocUnsafe(e.length/3*4);let r=0;for(let n=0;n__left_angle_mark_e.length;n++)t[r]=e[n],(n+1)%3==0&&(t[++r]=255),r++;return t}(e.data);this.bitmap={data:r,width:e.width,height:e.height},a(null,this)}else if(\"string\"==typeof t[0]){const e=t[0];if(o=t[1],void 0===o&&(o=Xe),\"function\"!=typeof o)return u.call(this,\"cb must be a function\",a);s=e,l=(t,r)=>{if(t)return u.call(this,t,a);this.parseBitmap(r,e,a)},n()&&\"function\"==typeof n().readFile&&!s.match(/^(http|ftp)s?:\\/\\/./)?n().readFile(s,l):Qe({url:s},l)}else if(\"object\"==typeof t[0]&&We.isBuffer(t[0])){const e=t[0];if(o=t[1],\"function\"!=typeof o)return u.call(this,\"cb must be a function\",a);this.parseBitmap(e,null,a)}else{o=t[t.length-1],\"function\"!=typeof o&&(o=t[t.length-2],\"function\"!=typeof o&&(o=Xe));const e=et.__extraConstructors.find((e=>e.test(...t)));if(!e)return u.call(this,\"No matching constructor overloading was found. Please see the docs for how to call the Jimp constructor.\",a);new Promise(((r,n)=>{e.run.call(this,r,n,...t)})).then((()=>a(null,this))).catch(a)}var s,l,c}}function tt(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:et;Object.entries(e).forEach((e=>{let[r,n]=e;t[r]=n}))}function rt(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:et;Object.entries(e).forEach((e=>{let[r,n]=e;t.prototype[r]=n}))}function nt(e,t,r){const n=\"before-\"+t,i=t.replace(/e$/,\"\")+\"ed\";et.prototype[e]=function(){let t;for(var o=arguments.length,a=new Array(o),s=0;s__left_angle_mark_o;s++)a[s]=arguments[s];const l=a[r.length-1],u=this;let c;\"function\"==typeof l?(t=function(){for(var t=arguments.length,r=new Array(t),n=0;n__left_angle_mark_t;n++)r[n]=arguments[n];const[o,a]=r;o?u.emitError(e,o):u.emitMulti(e,i,{[e]:a}),l.apply(this,r)},a[a.length-1]=t):t=!1,this.emitMulti(e,n);try{c=r.apply(this,a),t||this.emitMulti(e,i,{[e]:c})}catch(d){d.methodName=e,this.emitError(e,d)}return c},et.prototype[e+\"Quiet\"]=r}function it(e,t){nt(e,\"change\",t)}tt(e),rt({composite:function(e,r,n){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=arguments.length>4?arguments[4]:void 0;if(\"function\"==typeof i&&(o=i,i={}),!(e instanceof this.constructor))return u.call(this,\"The source must be a Jimp image\",o);if(\"number\"!=typeof r||\"number\"!=typeof n)return u.call(this,\"x and y must be numbers\",o);let{mode:a,opacitySource:s,opacityDest:c}=i;a||(a=se),(\"number\"!=typeof s||s__left_angle_mark_0||s>1)&&(s=1),(\"number\"!=typeof c||c__left_angle_mark_0||c>1)&&(c=1);const d=t[a];r=Math.round(r),n=Math.round(n);const h=this;return 1!==c&&h.opacity(c),e.scanQuiet(0,0,e.bitmap.width,e.bitmap.height,(function(e,t,i){const o=h.getPixelIndex(r+e,n+t,ve);if(-1===o)return;const a=d({r:this.bitmap.data[i+0]/255,g:this.bitmap.data[i+1]/255,b:this.bitmap.data[i+2]/255,a:this.bitmap.data[i+3]/255},{r:h.bitmap.data[o+0]/255,g:h.bitmap.data[o+1]/255,b:h.bitmap.data[o+2]/255,a:h.bitmap.data[o+3]/255},s);h.bitmap.data[o+0]=this.constructor.limit255(255*a.r),h.bitmap.data[o+1]=this.constructor.limit255(255*a.g),h.bitmap.data[o+2]=this.constructor.limit255(255*a.b),h.bitmap.data[o+3]=this.constructor.limit255(255*a.a)})),l(o)&&o.call(this,null,this),this}}),et.__extraConstructors=[],et.appendConstructorOption=function(e,t,r){et.__extraConstructors.push({name:e,test:t,run:r})},et.read=function(){for(var e=arguments.length,t=new Array(e),r=0;r__left_angle_mark_e;r++)t[r]=arguments[r];return new Promise(((e,r)=>{new et(...t,((t,n)=>{t?r(t):e(n)}))}))},et.create=et.read,et.rgbaToInt=function(e,t,r,n,i){if(\"number\"!=typeof e||\"number\"!=typeof t||\"number\"!=typeof r||\"number\"!=typeof n)return u.call(this,\"r, g, b and a must be numbers\",i);if(e__left_angle_mark_0||e>255)return u.call(this,\"r must be between 0 and 255\",i);if((t__left_angle_mark_0||t>255)&&u.call(this,\"g must be between 0 and 255\",i),r__left_angle_mark_0||r>255)return u.call(this,\"b must be between 0 and 255\",i);if(n__left_angle_mark_0||n>255)return u.call(this,\"a must be between 0 and 255\",i);let o=255&e;return o__left_angle_mark___left_angle_mark_=8,o|=255&t,o__left_angle_mark___left_angle_mark_=8,o|=255&r,o__left_angle_mark___left_angle_mark_=8,o|=255&n,o>>>=0,l(i)&&i.call(this,null,o),o},et.intToRGBA=function(e,t){if(\"number\"!=typeof e)return u.call(this,\"i must be a number\",t);const r={};return r.r=Math.floor(e/Math.pow(256,3)),r.g=Math.floor((e-r.r*Math.pow(256,3))/Math.pow(256,2)),r.b=Math.floor((e-r.r*Math.pow(256,3)-r.g*Math.pow(256,2))/Math.pow(256,1)),r.a=Math.floor((e-r.r*Math.pow(256,3)-r.g*Math.pow(256,2)-r.b*Math.pow(256,1))/Math.pow(256,0)),l(t)&&t.call(this,null,r),r},et.cssColorToHex=function(e){return\"number\"==typeof(e=e||0)?Number(e):parseInt(b(e).toHex8(),16)},et.limit255=function(e){return e=Math.max(e,0),Math.min(e,255)},et.diff=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:.1;if(!(e instanceof et&&t instanceof et))return u.call(this,\"img1 and img2 must be an Jimp images\");const n=e.bitmap,i=t.bitmap;if(n.width===i.width&&n.height===i.height||(n.width*n.height>i.width*i.height?e=e.cloneQuiet().resize(i.width,i.height):t=t.cloneQuiet().resize(n.width,n.height)),\"number\"!=typeof r||r__left_angle_mark_0||r>1)return u.call(this,\"threshold must be a number between 0 and 1\");const o=new et(n.width,n.height,4294967295);return{percent:p()(n.data,i.data,o.bitmap.data,o.bitmap.width,o.bitmap.height,{threshold:r})/(o.bitmap.width*o.bitmap.height),image:o}},et.distance=function(e,t){const r=new Z,n=r.getHash(e),i=r.getHash(t);return r.distance(n,i)},et.compareHashes=function(e,t){return(new Z).distance(e,t)},et.colorDiff=function(e,t){const r=e=>Math.pow(e,2),{max:n}=Math;return 0===e.a||e.a||(e.a=255),0===t.a||t.a||(t.a=255),(n(r(e.r-t.r),r(e.r-t.r-e.a+t.a))+n(r(e.g-t.g),r(e.g-t.g-e.a+t.a))+n(r(e.b-t.b),r(e.b-t.b-e.a+t.a)))/195075},nt(\"clone\",\"clone\",(function(e){const t=new et(this);return l(e)&&e.call(t,null,t),t})),it(\"background\",(function(e,t){return\"number\"!=typeof e?u.call(this,\"hex must be a hexadecimal rgba value\",t):(this._background=e,l(t)&&t.call(this,null,this),this)})),it(\"scan\",(function(e,t,r,n,i,o){if(\"number\"!=typeof e||\"number\"!=typeof t)return u.call(this,\"x and y must be numbers\",o);if(\"number\"!=typeof r||\"number\"!=typeof n)return u.call(this,\"w and h must be numbers\",o);if(\"function\"!=typeof i)return u.call(this,\"f must be a function\",o);const a=c(this,e,t,r,n,i);return l(o)&&o.call(this,null,a),a}));{let e;\"undefined\"!=typeof window&&\"object\"==typeof window&&(e=window),\"undefined\"!=typeof self&&\"object\"==typeof self&&(e=self),e.Jimp=et,e.Buffer=We}const ot=et;var at=__webpack_require__(643),st=__webpack_require__(2691),lt=__webpack_require__.n(st);const ut=\"image/jpeg\",ct=()=>({mime:{[ut]:[\"jpeg\",\"jpg\",\"jpe\"]},constants:{MIME_JPEG:ut},decoders:{[ut]:lt().decode},encoders:{[ut]:e=>lt().encode(e.bitmap,e._quality).data},class:{_quality:100,quality(e,t){return\"number\"!=typeof e?u.call(this,\"n must be a number\",t):e__left_angle_mark_0||e>100?u.call(this,\"n must be a number 0 - 100\",t):(this._quality=Math.round(e),l(t)&&t.call(this,null,this),this)}}});var dt=__webpack_require__(9902);const ht=\"image/png\",ft=()=>({mime:{[ht]:[\"png\"]},constants:{MIME_PNG:ht,PNG_FILTER_AUTO:-1,PNG_FILTER_NONE:0,PNG_FILTER_SUB:1,PNG_FILTER_UP:2,PNG_FILTER_AVERAGE:3,PNG_FILTER_PATH:4},hasAlpha:{[ht]:!0},decoders:{[ht]:dt.PNG.sync.read},encoders:{[ht](e){const t=new dt.PNG({width:e.bitmap.width,height:e.bitmap.height});return t.data=e.bitmap.data,dt.PNG.sync.write(t,{deflateLevel:e._deflateLevel,deflateStrategy:e._deflateStrategy,filterType:e._filterType,colorType:\"number\"==typeof e._colorType?e._colorType:e._rgba?6:2,inputHasAlpha:e._rgba})}},class:{_deflateLevel:9,_deflateStrategy:3,_filterType:-1,_colorType:null,deflateLevel(e,t){return\"number\"!=typeof e?u.call(this,\"l must be a number\",t):e__left_angle_mark_0||e>9?u.call(this,\"l must be a number 0 - 9\",t):(this._deflateLevel=Math.round(e),l(t)&&t.call(this,null,this),this)},deflateStrategy(e,t){return\"number\"!=typeof e?u.call(this,\"s must be a number\",t):e__left_angle_mark_0||e>3?u.call(this,\"s must be a number 0 - 3\",t):(this._deflateStrategy=Math.round(e),l(t)&&t.call(this,null,this),this)},filterType(e,t){return\"number\"!=typeof e?u.call(this,\"n must be a number\",t):e__left_angle_mark_-1||e>4?u.call(this,\"n must be -1 (auto) or a number 0 - 4\",t):(this._filterType=Math.round(e),l(t)&&t.call(this,null,this),this)},colorType(e,t){return\"number\"!=typeof e?u.call(this,\"s must be a number\",t):0!==e&&2!==e&&4!==e&&6!==e?u.call(this,\"s must be a number 0, 2, 4, 6.\",t):(this._colorType=Math.round(e),l(t)&&t.call(this,null,this),this)}}});var pt=__webpack_require__(486),mt=__webpack_require__.n(pt);const gt=\"image/bmp\",_t=\"image/x-ms-bmp\",bt=e=>{return c({bitmap:t=mt().decode(e)},0,0,t.width,t.height,(function(e,r,n){const i=this.bitmap.data[n+0],o=this.bitmap.data[n+1],a=this.bitmap.data[n+2],s=this.bitmap.data[n+3];this.bitmap.data[n+0]=s,this.bitmap.data[n+1]=a,this.bitmap.data[n+2]=o,this.bitmap.data[n+3]=t.is_with_alpha?i:255})).bitmap;var t},yt=e=>{return mt().encode((t=e,c(t,0,0,t.bitmap.width,t.bitmap.height,(function(e,t,r){const n=this.bitmap.data[r+0],i=this.bitmap.data[r+1],o=this.bitmap.data[r+2],a=this.bitmap.data[r+3];this.bitmap.data[r+0]=a,this.bitmap.data[r+1]=o,this.bitmap.data[r+2]=i,this.bitmap.data[r+3]=n})).bitmap)).data;var t};var vt=__webpack_require__(9299),At=__webpack_require__.n(vt),wt=__webpack_require__(8834).lW;const St=\"image/tiff\";var Et=__webpack_require__(63),xt=__webpack_require__(9455),Ct=__webpack_require__(8834).lW;const Tt=\"image/gif\",Rt=[1,57,41,21,203,34,97,73,227,91,149,62,105,45,39,137,241,107,3,173,39,71,65,238,219,101,187,87,81,151,141,133,249,117,221,209,197,187,177,169,5,153,73,139,133,127,243,233,223,107,103,99,191,23,177,171,165,159,77,149,9,139,135,131,253,245,119,231,224,109,211,103,25,195,189,23,45,175,171,83,81,79,155,151,147,9,141,137,67,131,129,251,123,30,235,115,113,221,217,53,13,51,50,49,193,189,185,91,179,175,43,169,83,163,5,79,155,19,75,147,145,143,35,69,17,67,33,65,255,251,247,243,239,59,29,229,113,111,219,27,213,105,207,51,201,199,49,193,191,47,93,183,181,179,11,87,43,85,167,165,163,161,159,157,155,77,19,75,37,73,145,143,141,35,138,137,135,67,33,131,129,255,63,250,247,61,121,239,237,117,29,229,227,225,111,55,109,216,213,211,209,207,205,203,201,199,197,195,193,48,190,47,93,185,183,181,179,178,176,175,173,171,85,21,167,165,41,163,161,5,79,157,78,154,153,19,75,149,74,147,73,144,143,71,141,140,139,137,17,135,134,133,66,131,65,129,1],It=[0,9,10,10,14,12,14,14,16,15,16,15,16,15,15,17,18,17,12,18,16,17,17,19,19,18,19,18,18,19,19,19,20,19,20,20,20,20,20,20,15,20,19,20,20,20,21,21,21,20,20,20,21,18,21,21,21,21,20,21,17,21,21,21,22,22,21,22,22,21,22,21,19,22,22,19,20,22,22,21,21,21,22,22,22,18,22,22,21,22,22,23,22,20,23,22,22,23,23,21,19,21,21,21,23,23,23,22,23,23,21,23,22,23,18,22,23,20,22,23,23,23,21,22,20,22,21,22,24,24,24,24,24,22,21,24,23,23,24,21,24,23,24,22,24,24,22,24,24,22,23,24,24,24,20,23,22,23,24,24,24,24,24,24,24,23,21,23,22,23,24,24,24,22,24,24,24,23,22,24,24,25,23,25,25,23,24,25,25,24,22,25,25,25,24,23,24,25,25,25,25,25,25,25,25,25,25,25,25,23,25,23,24,25,25,25,25,25,25,25,25,25,24,22,25,25,23,25,25,20,24,25,24,25,25,22,24,25,24,25,24,25,25,24,25,25,25,25,22,25,25,25,24,25,24,25,18];var kt=__webpack_require__(8834).lW;function Pt(e,t,r,n){const i=[0,0,0],o=(t.length-1)/2;for(let a=0;a__left_angle_mark_t.length;a+=1)for(let s=0;s__left_angle_mark_t[a].length;s+=1){const l=e.getPixelIndex(r+a-o,n+s-o);i[0]+=e.bitmap.data[l]*t[a][s],i[1]+=e.bitmap.data[l+1]*t[a][s],i[2]+=e.bitmap.data[l+2]*t[a][s]}return i}const Mt=e=>null!=e;function Ot(e){return this.scanQuiet(0,0,this.bitmap.width,this.bitmap.height,(function(e,t,r){const n=parseInt(.2126*this.bitmap.data[r]+.7152*this.bitmap.data[r+1]+.0722*this.bitmap.data[r+2],10);this.bitmap.data[r]=n,this.bitmap.data[r+1]=n,this.bitmap.data[r+2]=n})),l(e)&&e.call(this,null,this),this}function Bt(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:50;return{r:(t.r-e.r)*(r/100)+e.r,g:(t.g-e.g)*(r/100)+e.g,b:(t.b-e.b)*(r/100)+e.b}}function Nt(e,t){return e&&Array.isArray(e)?(e=e.map((e=>(\"xor\"!==e.apply&&\"mix\"!==e.apply||(e.params[0]=b(e.params[0]).toRgb()),e))),this.scanQuiet(0,0,this.bitmap.width,this.bitmap.height,((r,n,i)=>{let o={r:this.bitmap.data[i],g:this.bitmap.data[i+1],b:this.bitmap.data[i+2]};const a=(e,t)=>this.constructor.limit255(o[e]+t);e.forEach((e=>{if(\"mix\"===e.apply)o=Bt(o,e.params[0],e.params[1]);else if(\"tint\"===e.apply)o=Bt(o,{r:255,g:255,b:255},e.params[0]);else if(\"shade\"===e.apply)o=Bt(o,{r:0,g:0,b:0},e.params[0]);else if(\"xor\"===e.apply)o={r:o.r^e.params[0].r,g:o.g^e.params[0].g,b:o.b^e.params[0].b};else if(\"red\"===e.apply)o.r=a(\"r\",e.params[0]);else if(\"green\"===e.apply)o.g=a(\"g\",e.params[0]);else if(\"blue\"===e.apply)o.b=a(\"b\",e.params[0]);else{if(\"hue\"===e.apply&&(e.apply=\"spin\"),o=b(o),!o[e.apply])return u.call(this,\"action \"+e.apply+\" not supported\",t);o=o[e.apply](...e.params).toRgb()}})),this.bitmap.data[i]=o.r,this.bitmap.data[i+1]=o.g,this.bitmap.data[i+2]=o.b})),l(t)&&t.call(this,null,this),this):u.call(this,\"actions must be an array\",t)}Object.freeze({LIGHTEN:\"lighten\",BRIGHTEN:\"brighten\",DARKEN:\"darken\",DESATURATE:\"desaturate\",SATURATE:\"saturate\",GREYSCALE:\"greyscale\",SPIN:\"spin\",HUE:\"hue\",MIX:\"mix\",TINT:\"tint\",SHADE:\"shade\",XOR:\"xor\",RED:\"red\",GREEN:\"green\",BLUE:\"blue\"});var jt=__webpack_require__(8834).lW;function Lt(e){const t=[1,9,3,11,13,5,15,7,4,12,2,10,16,8,14,6];return this.scanQuiet(0,0,this.bitmap.width,this.bitmap.height,(function(e,r,n){const i=t[((3&r)__left_angle_mark___left_angle_mark_2)+e%4];this.bitmap.data[n]=Math.min(this.bitmap.data[n]+i,255),this.bitmap.data[n+1]=Math.min(this.bitmap.data[n+1]+i,255),this.bitmap.data[n+2]=Math.min(this.bitmap.data[n+2]+i,255)})),l(e)&&e.call(this,null,this),this}var Dt=__webpack_require__(8834).lW;function Ft(e,t,r){if(\"boolean\"!=typeof e||\"boolean\"!=typeof t)return u.call(this,\"horizontal and vertical must be Booleans\",r);const n=Dt.alloc(this.bitmap.data.length);return this.scanQuiet(0,0,this.bitmap.width,this.bitmap.height,(function(r,i,o){const a=e?this.bitmap.width-1-r:r,s=t?this.bitmap.height-1-i:i,l=this.bitmap.width*s+a__left_angle_mark___left_angle_mark_2,u=this.bitmap.data.readUInt32BE(o);n.writeUInt32BE(u,l)})),this.bitmap.data=Dt.from(n),l(r)&&r.call(this,null,this),this}function Ut(){const e={r:new Array(256).fill(0),g:new Array(256).fill(0),b:new Array(256).fill(0)};return this.scanQuiet(0,0,this.bitmap.width,this.bitmap.height,(function(t,r,n){e.r[this.bitmap.data[n+0]]++,e.g[this.bitmap.data[n+1]]++,e.b[this.bitmap.data[n+2]]++})),e}const zt=function(e,t,r){return 255*(e-t)/(r-t)},qt=function(e){return[e.findIndex((e=>e>0)),255-e.slice().reverse().findIndex((e=>e>0))]};var Gt=__webpack_require__(8058),Ht=__webpack_require__.n(Gt);function Wt(e,t){let r=0;for(let n=0;n__left_angle_mark_t.length;n++)if(e.chars[t[n]]){const i=e.kernings[t[n]]&&e.kernings[t[n]][t[n+1]]?e.kernings[t[n]][t[n+1]]:0;r+=(e.chars[t[n]].xadvance||0)+i}return r}function Vt(e,t,r){const n=t.replace(/[\\r\\n]+/g,\" \\n\").split(\" \"),i=[];let o=[],a=0;return n.forEach((t=>{const n=[...o,t].join(\" \"),s=Wt(e,n);s__left_angle_mark_=r&&!t.includes(\"\\n\")?(s>a&&(a=s),o.push(t)):(i.push(o),o=[t.replace(\"\\n\",\"\")])})),i.push(o),{lines:i,longestLine:a}}function $t(e,t,r){const{lines:n}=Vt(e,t,r);return n.length*e.common.lineHeight}function Kt(e,t,r,n,i){if(i.width>0&&i.height>0){const o=t.pages[i.page];e.blit(o,r+i.xoffset,n+i.yoffset,i.x,i.y,i.width,i.height)}return e}function Xt(e,t,r,n,i){for(let o=0;o__left_angle_mark_n.length;o++){let a;a=e.chars[n[o]]?n[o]:/\\s/.test(n[o])?\"\":\"?\";const s=e.chars[a]||{},l=e.kernings[a];Kt(this,e,t,r,s||{}),t+=(l&&l[n[o+1]]?l[n[o+1]]:0)+(s.xadvance||i)}}const Yt=\"//../\";function Jt(e,t,r,n,i,o,a){this.widthOriginal=Math.abs(Math.floor(e)||0),this.heightOriginal=Math.abs(Math.floor(t)||0),this.targetWidth=Math.abs(Math.floor(r)||0),this.targetHeight=Math.abs(Math.floor(n)||0),this.colorChannels=i?4:3,this.interpolationPass=Boolean(o),this.resizeCallback=\"function\"==typeof a?a:function(){},this.targetWidthMultipliedByChannels=this.targetWidth*this.colorChannels,this.originalWidthMultipliedByChannels=this.widthOriginal*this.colorChannels,this.originalHeightMultipliedByChannels=this.heightOriginal*this.colorChannels,this.widthPassResultSize=this.targetWidthMultipliedByChannels*this.heightOriginal,this.finalResultSize=this.targetWidthMultipliedByChannels*this.targetHeight,this.initialize()}Jt.prototype.initialize=function(){if(!(this.widthOriginal>0&&this.heightOriginal>0&&this.targetWidth>0&&this.targetHeight>0))throw new Error(\"Invalid settings specified for the resizer.\");this.configurePasses()},Jt.prototype.configurePasses=function(){this.widthOriginal===this.targetWidth?this.resizeWidth=this.bypassResizer:(this.ratioWeightWidthPass=this.widthOriginal/this.targetWidth,this.ratioWeightWidthPass__left_angle_mark_1&&this.interpolationPass?(this.initializeFirstPassBuffers(!0),this.resizeWidth=4===this.colorChannels?this.resizeWidthInterpolatedRGBA:this.resizeWidthInterpolatedRGB):(this.initializeFirstPassBuffers(!1),this.resizeWidth=4===this.colorChannels?this.resizeWidthRGBA:this.resizeWidthRGB)),this.heightOriginal===this.targetHeight?this.resizeHeight=this.bypassResizer:(this.ratioWeightHeightPass=this.heightOriginal/this.targetHeight,this.ratioWeightHeightPass__left_angle_mark_1&&this.interpolationPass?(this.initializeSecondPassBuffers(!0),this.resizeHeight=this.resizeHeightInterpolated):(this.initializeSecondPassBuffers(!1),this.resizeHeight=4===this.colorChannels?this.resizeHeightRGBA:this.resizeHeightRGB))},Jt.prototype._resizeWidthInterpolatedRGBChannels=function(e,t){const r=t?4:3,n=this.ratioWeightWidthPass,i=this.widthBuffer;let o,a,s=0,l=0,u=0,c=0,d=0;for(o=0;s__left_angle_mark_1/3;o+=r,s+=n)for(l=o,u=0;l__left_angle_mark_this.widthPassResultSize;u+=this.originalWidthMultipliedByChannels,l+=this.targetWidthMultipliedByChannels)i[l]=e[u],i[l+1]=e[u+1],i[l+2]=e[u+2],t&&(i[l+3]=e[u+3]);for(s-=1/3,a=this.widthOriginal-1;s__left_angle_mark_a;o+=r,s+=n)for(d=s%1,c=1-d,l=o,u=Math.floor(s)*r;l__left_angle_mark_this.widthPassResultSize;u+=this.originalWidthMultipliedByChannels,l+=this.targetWidthMultipliedByChannels)i[l+0]=e[u+0]*c+e[u+r+0]*d,i[l+1]=e[u+1]*c+e[u+r+1]*d,i[l+2]=e[u+2]*c+e[u+r+2]*d,t&&(i[l+3]=e[u+3]*c+e[u+r+3]*d);for(a=this.originalWidthMultipliedByChannels-r;o__left_angle_mark_this.targetWidthMultipliedByChannels;o+=r)for(l=o,u=a;l__left_angle_mark_this.widthPassResultSize;u+=this.originalWidthMultipliedByChannels,l+=this.targetWidthMultipliedByChannels)i[l]=e[u],i[l+1]=e[u+1],i[l+2]=e[u+2],t&&(i[l+3]=e[u+3]);return i},Jt.prototype._resizeWidthRGBChannels=function(e,t){const r=t?4:3,n=this.ratioWeightWidthPass,i=1/n,o=this.originalWidthMultipliedByChannels-r+1,a=this.targetWidthMultipliedByChannels-r+1,s=this.outputWidthWorkBench,l=this.widthBuffer,u=this.outputWidthWorkBenchOpaquePixelsCount;let c=0,d=0,h=0,f=0,p=0,m=0,g=0,_=1,b=0,y=0,v=0,A=0;do{for(p=0;p__left_angle_mark_this.originalHeightMultipliedByChannels;)s[p++]=0,s[p++]=0,s[p++]=0,t&&(s[p++]=0,u[p/r-1]=0);c=n;do{for(d=1+h-f,_=Math.min(c,d),p=0,m=h;p__left_angle_mark_this.originalHeightMultipliedByChannels;m+=o)b=e[m],y=e[++m],v=e[++m],A=t?e[++m]:255,s[p++]+=(A?b:0)*_,s[p++]+=(A?y:0)*_,s[p++]+=(A?v:0)*_,t&&(s[p++]+=A*_,u[p/r-1]+=A?_:0);if(!(c>=d)){f+=c;break}h+=r,f=h,c-=d}while(c>0&&h__left_angle_mark_this.originalWidthMultipliedByChannels);for(p=0,m=g;p__left_angle_mark_this.originalHeightMultipliedByChannels;m+=a)c=t?u[p/r]:1,_=t?c?1/c:0:i,l[m]=s[p++]*_,l[++m]=s[p++]*_,l[++m]=s[p++]*_,t&&(l[++m]=s[p++]*i);g+=r}while(g__left_angle_mark_this.targetWidthMultipliedByChannels);return l},Jt.prototype._resizeHeightRGBChannels=function(e,t){const r=this.ratioWeightHeightPass,n=1/r,i=this.outputHeightWorkBench,o=this.heightBuffer,a=this.outputHeightWorkBenchOpaquePixelsCount;let s=0,l=0,u=0,c=0,d=0,h=0,f=0,p=1,m=0,g=0,_=0,b=0;do{for(d=0;d__left_angle_mark_this.targetWidthMultipliedByChannels;)i[d++]=0,i[d++]=0,i[d++]=0,t&&(i[d++]=0,a[d/4-1]=0);s=r;do{for(l=1+u-c,p=Math.min(s,l),f=u,d=0;d__left_angle_mark_this.targetWidthMultipliedByChannels;)m=e[f++],g=e[f++],_=e[f++],b=t?e[f++]:255,i[d++]+=(b?m:0)*p,i[d++]+=(b?g:0)*p,i[d++]+=(b?_:0)*p,t&&(i[d++]+=b*p,a[d/4-1]+=b?p:0);if(!(s>=l)){c+=s;break}u=f,c=u,s-=l}while(s>0&&u__left_angle_mark_this.widthPassResultSize);for(d=0;d__left_angle_mark_this.targetWidthMultipliedByChannels;)s=t?a[d/4]:1,p=t?s?1/s:0:n,o[h++]=Math.round(i[d++]*p),o[h++]=Math.round(i[d++]*p),o[h++]=Math.round(i[d++]*p),t&&(o[h++]=Math.round(i[d++]*n))}while(h__left_angle_mark_this.finalResultSize);return o},Jt.prototype.resizeWidthInterpolatedRGB=function(e){return this._resizeWidthInterpolatedRGBChannels(e,!1)},Jt.prototype.resizeWidthInterpolatedRGBA=function(e){return this._resizeWidthInterpolatedRGBChannels(e,!0)},Jt.prototype.resizeWidthRGB=function(e){return this._resizeWidthRGBChannels(e,!1)},Jt.prototype.resizeWidthRGBA=function(e){return this._resizeWidthRGBChannels(e,!0)},Jt.prototype.resizeHeightInterpolated=function(e){const t=this.ratioWeightHeightPass,r=this.heightBuffer;let n,i=0,o=0,a=0,s=0,l=0,u=0,c=0;for(;i__left_angle_mark_1/3;i+=t)for(a=0;a__left_angle_mark_this.targetWidthMultipliedByChannels;)r[o++]=Math.round(e[a++]);for(i-=1/3,n=this.heightOriginal-1;i__left_angle_mark_n;i+=t)for(c=i%1,u=1-c,s=Math.floor(i)*this.targetWidthMultipliedByChannels,l=s+this.targetWidthMultipliedByChannels,a=0;a__left_angle_mark_this.targetWidthMultipliedByChannels;++a)r[o++]=Math.round(e[s++]*u+e[l++]*c);for(;o__left_angle_mark_this.finalResultSize;)for(a=0,s=n*this.targetWidthMultipliedByChannels;a__left_angle_mark_this.targetWidthMultipliedByChannels;++a)r[o++]=Math.round(e[s++]);return r},Jt.prototype.resizeHeightRGB=function(e){return this._resizeHeightRGBChannels(e,!1)},Jt.prototype.resizeHeightRGBA=function(e){return this._resizeHeightRGBChannels(e,!0)},Jt.prototype.resize=function(e){this.resizeCallback(this.resizeHeight(this.resizeWidth(e)))},Jt.prototype.bypassResizer=function(e){return e},Jt.prototype.initializeFirstPassBuffers=function(e){this.widthBuffer=this.generateFloatBuffer(this.widthPassResultSize),e||(this.outputWidthWorkBench=this.generateFloatBuffer(this.originalHeightMultipliedByChannels),this.colorChannels>3&&(this.outputWidthWorkBenchOpaquePixelsCount=this.generateFloat64Buffer(this.heightOriginal)))},Jt.prototype.initializeSecondPassBuffers=function(e){this.heightBuffer=this.generateUint8Buffer(this.finalResultSize),e||(this.outputHeightWorkBench=this.generateFloatBuffer(this.targetWidthMultipliedByChannels),this.colorChannels>3&&(this.outputHeightWorkBenchOpaquePixelsCount=this.generateFloat64Buffer(this.targetWidth)))},Jt.prototype.generateFloatBuffer=function(e){try{return new Float32Array(e)}catch(t){return[]}},Jt.prototype.generateFloat64Buffer=function(e){try{return new Float64Array(e)}catch(t){return[]}},Jt.prototype.generateUint8Buffer=function(e){try{return new Uint8Array(e)}catch(t){return[]}};const Qt=Jt;var Zt=__webpack_require__(8834).lW;const er={nearestNeighbor(e,t){const r=e.width,n=e.height,i=t.width,o=t.height,a=e.data,s=t.data;for(let l=0;l__left_angle_mark_o;l++)for(let e=0;e__left_angle_mark_i;e++){let t=4*(l*i+e),u=4*(Math.floor(l*n/o)*r+Math.floor(e*r/i));s[t++]=a[u++],s[t++]=a[u++],s[t++]=a[u++],s[t++]=a[u++]}},bilinearInterpolation(e,t){const r=e.width,n=e.height,i=t.width,o=t.height,a=e.data,s=t.data,l=function(e,t,r,n,i){return t===n?r:Math.round((e-t)*i+(n-e)*r)},u=function(e,t,n,i,o,u,c,d){let h=4*(c*r+i)+t,f=4*(c*r+o)+t;const p=l(n,i,a[h],o,a[f]);if(d===c)s[e+t]=p;else{h=4*(d*r+i)+t,f=4*(d*r+o)+t;const m=l(n,i,a[h],o,a[f]);s[e+t]=l(u,c,p,d,m)}};for(let c=0;c__left_angle_mark_o;c++)for(let e=0;e__left_angle_mark_i;e++){const t=4*(c*i+e),a=e*r/i,s=Math.floor(a),l=Math.min(Math.ceil(a),r-1),d=c*n/o,h=Math.floor(d),f=Math.min(Math.ceil(d),n-1);u(t,0,a,s,l,d,h,f),u(t,1,a,s,l,d,h,f),u(t,2,a,s,l,d,h,f),u(t,3,a,s,l,d,h,f)}},_interpolate2D(e,t,r,n){const i=e.data,o=t.data,a=e.width,s=e.height,l=t.width,u=t.height,c=Math.max(1,Math.floor(a/l)),d=l*c,h=Math.max(1,Math.floor(s/u)),f=u*h,p=Zt.alloc(d*s*4);for(let _=0;___left_angle_mark_s;_++)for(let e=0;e__left_angle_mark_d;e++){const t=e*(a-1)/d,r=Math.floor(t),o=t-r,s=4*(_*a+r),l=4*(_*d+e);for(let e=0;e__left_angle_mark_4;e++){const t=s+e,u=r>0?i[t-4]:2*i[t]-i[t+4],c=i[t],d=i[t+4],h=r__left_angle_mark_a-2?i[t+8]:2*i[t+4]-i[t];p[l+e]=n(u,c,d,h,o)}}const m=Zt.alloc(d*f*4);for(let _=0;___left_angle_mark_f;_++)for(let e=0;e__left_angle_mark_d;e++){const t=_*(s-1)/f,r=Math.floor(t),i=t-r,o=4*(r*d+e),a=4*(_*d+e);for(let e=0;e__left_angle_mark_4;e++){const t=o+e,l=r>0?p[t-4*d]:2*p[t]-p[t+4*d],u=p[t],c=p[t+4*d],h=r__left_angle_mark_s-2?p[t+8*d]:2*p[t+4*d]-p[t];m[a+e]=n(l,u,c,h,i)}}const g=c*h;if(g>1)for(let _=0;___left_angle_mark_u;_++)for(let e=0;e__left_angle_mark_l;e++){let t=0,r=0,n=0,i=0,a=0;for(let o=0;o__left_angle_mark_h;o++){const s=_*h+o;for(let o=0;o__left_angle_mark_c;o++){const l=4*(s*d+(e*c+o)),u=m[l+3];u&&(t+=m[l],r+=m[l+1],n+=m[l+2],a++),i+=u}}const s=4*(_*l+e);o[s]=a?Math.round(t/a):0,o[s+1]=a?Math.round(r/a):0,o[s+2]=a?Math.round(n/a):0,o[s+3]=Math.round(i/g)}else t.data=m},bicubicInterpolation(e,t,r){return this._interpolate2D(e,t,r,(function(e,t,r,n,i){const o=n-r-e+t,a=e-t-o,s=r-e,l=t;return Math.max(0,Math.min(255,o*(i*i*i)+a*(i*i)+s*i+l))}))},hermiteInterpolation(e,t,r){return this._interpolate2D(e,t,r,(function(e,t,r,n,i){const o=t,a=.5*(r-e),s=e-2.5*t+2*r-.5*n,l=.5*(n-e)+1.5*(t-r);return Math.max(0,Math.min(255,Math.round(((l*i+s)*i+a)*i+o)))}))},bezierInterpolation(e,t,r){return this._interpolate2D(e,t,r,(function(e,t,r,n,i){const o=1-i,a=t*o*o*o,s=3*(t+(r-e)/4)*o*o*i,l=3*(r-(n-t)/4)*o*i*i,u=r*i*i*i;return Math.max(0,Math.min(255,Math.round(a+s+l+u)))}))}};var tr=__webpack_require__(8834).lW,rr=__webpack_require__(8834).lW;function nr(e){if(Math.abs(e)%90!=0)throw new Error(\"Unsupported matrix rotation degree\");if(e%=360,0===Math.abs(e))return;const t=this.bitmap.width,r=this.bitmap.height;let n;switch(e){case 90:case-270:n=90;break;case 180:case-180:n=180;break;case 270:case-90:n=-90;break;default:throw new Error(\"Unsupported matrix rotation degree\")}const i=180===n?t:r,o=180===n?r:t,a=rr.alloc(this.bitmap.data.length);function s(e,t){return function(t,r){return r*e+t__left_angle_mark___left_angle_mark_2}}const l=s(t),u=s(i);for(let c=0;c__left_angle_mark_t;c++)for(let e=0;e__left_angle_mark_r;e++){const i=l(c,e),o=this.bitmap.data.readUInt32BE(i);let s;switch(n){case 90:s=u(e,t-c-1);break;case-90:s=u(r-e-1,c);break;case 180:s=u(t-c-1,r-e-1);break;default:throw new Error(\"Unsupported matrix rotation angle\")}a.writeUInt32BE(o,s)}this.bitmap.data=a,this.bitmap.width=i,this.bitmap.height=o}function ir(e,t){const r=(e%=360)*Math.PI/180,n=Math.cos(r),i=Math.sin(r);let o=this.bitmap.width,a=this.bitmap.height;if(!0===t||\"string\"==typeof t){o=Math.ceil(Math.abs(this.bitmap.width*n)+Math.abs(this.bitmap.height*i))+1,a=Math.ceil(Math.abs(this.bitmap.width*i)+Math.abs(this.bitmap.height*n))+1,o%2!=0&&o++,a%2!=0&&a++;const e=this.cloneQuiet();this.scanQuiet(0,0,this.bitmap.width,this.bitmap.height,(function(e,t,r){this.bitmap.data.writeUInt32BE(this._background,r)}));const r=Math.max(o,a,this.bitmap.width,this.bitmap.height);this.resize(r,r,t),this.blit(e,this.bitmap.width/2-e.bitmap.width/2,this.bitmap.height/2-e.bitmap.height/2)}const s=this.bitmap.width,l=this.bitmap.height,u=rr.alloc(this.bitmap.data.length);function c(e,t){return function(r,n){return{x:r+e,y:n+t}}}const d=c(-s/2,-l/2),h=c(s/2+.5,l/2+.5);for(let f=1;f__left_angle_mark_=l;f++)for(let e=1;e__left_angle_mark_=s;e++){const t=d(e,f),r=h(n*t.x-i*t.y,n*t.y+i*t.x),o=s*(f-1)+e-1__left_angle_mark___left_angle_mark_2;if(r.x>=0&&r.x__left_angle_mark_s&&r.y>=0&&r.y__left_angle_mark_l){const e=s*(0|r.y)+r.x__left_angle_mark___left_angle_mark_2,t=this.bitmap.data.readUInt32BE(e);u.writeUInt32BE(t,o)}else u.writeUInt32BE(this._background,o)}if(this.bitmap.data=u,!0===t||\"string\"==typeof t){const e=s/2-o/2,t=l/2-a/2;this.crop(e,t,o,a)}}const or=[()=>({blit(e,t,r,n,i,o,a,s){if(!(e instanceof this.constructor))return u.call(this,\"The source must be a Jimp image\",s);if(\"number\"!=typeof t||\"number\"!=typeof r)return u.call(this,\"x and y must be numbers\",s);if(\"function\"==typeof n)s=n,n=0,i=0,o=e.bitmap.width,a=e.bitmap.height;else{if(typeof n!=typeof i||typeof i!=typeof o||typeof o!=typeof a)return u.call(this,\"srcx, srcy, srcw, srch must be numbers\",s);n=n||0,i=i||0,o=o||e.bitmap.width,a=a||e.bitmap.height}t=Math.round(t),r=Math.round(r),n=Math.round(n),i=Math.round(i),o=Math.round(o),a=Math.round(a);const c=this.bitmap.width,d=this.bitmap.height,h=this;return e.scanQuiet(n,i,o,a,(function(e,o,a){const s=t+e-n,l=r+o-i;if(s>=0&&l>=0&&c-s>0&&d-l>0){const e=h.getPixelIndex(s,l),t={r:this.bitmap.data[a],g:this.bitmap.data[a+1],b:this.bitmap.data[a+2],a:this.bitmap.data[a+3]},r={r:h.bitmap.data[e],g:h.bitmap.data[e+1],b:h.bitmap.data[e+2],a:h.bitmap.data[e+3]};h.bitmap.data[e]=(t.a*(t.r-r.r)-r.r+255>>8)+r.r,h.bitmap.data[e+1]=(t.a*(t.g-r.g)-r.g+255>>8)+r.g,h.bitmap.data[e+2]=(t.a*(t.b-r.b)-r.b+255>>8)+r.b,h.bitmap.data[e+3]=this.constructor.limit255(r.a+t.a)}})),l(s)&&s.call(this,null,this),this}}),()=>({blur(e,t){if(\"number\"!=typeof e)return u.call(this,\"r must be a number\",t);if(e__left_angle_mark_1)return u.call(this,\"r must be greater than 0\",t);let r,n,i,o,a,s,c,d,h,f,p,m,g,_;const b=this.bitmap.width-1,y=this.bitmap.height-1,v=e+1,A=Rt[e],w=It[e],S=[],E=[],x=[],C=[],T=[],R=[];let I=2;for(;I-- >0;){for(m=0,g=0,s=0;s__left_angle_mark_this.bitmap.height;s++){for(r=this.bitmap.data[g]*v,n=this.bitmap.data[g+1]*v,i=this.bitmap.data[g+2]*v,o=this.bitmap.data[g+3]*v,c=1;c__left_angle_mark_=e;c++)d=g+((c>b?b:c)__left_angle_mark___left_angle_mark_2),r+=this.bitmap.data[d++],n+=this.bitmap.data[d++],i+=this.bitmap.data[d++],o+=this.bitmap.data[d];for(a=0;a__left_angle_mark_this.bitmap.width;a++)S[m]=r,E[m]=n,x[m]=i,C[m]=o,0===s&&(T[a]=((d=a+v)__left_angle_mark_b?d:b)__left_angle_mark___left_angle_mark_2,R[a]=(d=a-e)>0?d__left_angle_mark___left_angle_mark_2:0),h=g+T[a],f=g+R[a],r+=this.bitmap.data[h++]-this.bitmap.data[f++],n+=this.bitmap.data[h++]-this.bitmap.data[f++],i+=this.bitmap.data[h++]-this.bitmap.data[f++],o+=this.bitmap.data[h]-this.bitmap.data[f],m++;g+=this.bitmap.width__left_angle_mark___left_angle_mark_2}for(a=0;a__left_angle_mark_this.bitmap.width;a++){for(p=a,r=S[p]*v,n=E[p]*v,i=x[p]*v,o=C[p]*v,c=1;c__left_angle_mark_=e;c++)p+=c>y?0:this.bitmap.width,r+=S[p],n+=E[p],i+=x[p],o+=C[p];for(m=a__left_angle_mark___left_angle_mark_2,s=0;s__left_angle_mark_this.bitmap.height;s++)_=o*A>>>w,this.bitmap.data[m+3]=_,_>255&&(this.bitmap.data[m+3]=255),_>0?(_=255/_,this.bitmap.data[m]=(r*A>>>w)*_,this.bitmap.data[m+1]=(n*A>>>w)*_,this.bitmap.data[m+2]=(i*A>>>w)*_):(this.bitmap.data[m+2]=0,this.bitmap.data[m+1]=0,this.bitmap.data[m]=0),0===a&&(T[s]=((d=s+v)__left_angle_mark_y?d:y)*this.bitmap.width,R[s]=(d=s-e)>0?d*this.bitmap.width:0),h=a+T[s],f=a+R[s],r+=S[h]-S[f],n+=E[h]-E[f],i+=x[h]-x[f],o+=C[h]-C[f],m+=this.bitmap.width__left_angle_mark___left_angle_mark_2}}return l(t)&&t.call(this,null,this),this}}),()=>({circle(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;\"function\"==typeof e&&(t=e,e={});const r=e.radius||(this.bitmap.width>this.bitmap.height?this.bitmap.height:this.bitmap.width)/2,n=\"number\"==typeof e.x?e.x:this.bitmap.width/2,i=\"number\"==typeof e.y?e.y:this.bitmap.height/2;return this.scanQuiet(0,0,this.bitmap.width,this.bitmap.height,(function(e,t,o){const a=Math.sqrt(Math.pow(e-n,2)+Math.pow(t-i,2));r-a__left_angle_mark_=0?this.bitmap.data[o+3]=0:r-a__left_angle_mark_1&&(this.bitmap.data[o+3]=255*(r-a))})),l(t)&&t.call(this,null,this),this}}),()=>({brightness(e,t){return\"number\"!=typeof e?u.call(this,\"val must be numbers\",t):e__left_angle_mark_-1||e>1?u.call(this,\"val must be a number between -1 and +1\",t):(this.scanQuiet(0,0,this.bitmap.width,this.bitmap.height,(function(t,r,n){e__left_angle_mark_0?(this.bitmap.data[n]*=1+e,this.bitmap.data[n+1]*=1+e,this.bitmap.data[n+2]*=1+e):(this.bitmap.data[n]+=(255-this.bitmap.data[n])*e,this.bitmap.data[n+1]+=(255-this.bitmap.data[n+1])*e,this.bitmap.data[n+2]+=(255-this.bitmap.data[n+2])*e)})),l(t)&&t.call(this,null,this),this)},contrast(e,t){if(\"number\"!=typeof e)return u.call(this,\"val must be numbers\",t);if(e__left_angle_mark_-1||e>1)return u.call(this,\"val must be a number between -1 and +1\",t);const r=(e+1)/(1-e);function n(e){return(e=Math.floor(r*(e-127)+127))__left_angle_mark_0?0:e>255?255:e}return this.scanQuiet(0,0,this.bitmap.width,this.bitmap.height,(function(e,t,r){this.bitmap.data[r]=n(this.bitmap.data[r]),this.bitmap.data[r+1]=n(this.bitmap.data[r+1]),this.bitmap.data[r+2]=n(this.bitmap.data[r+2])})),l(t)&&t.call(this,null,this),this},posterize(e,t){return\"number\"!=typeof e?u.call(this,\"n must be numbers\",t):(e__left_angle_mark_2&&(e=2),this.scanQuiet(0,0,this.bitmap.width,this.bitmap.height,(function(t,r,n){this.bitmap.data[n]=Math.floor(this.bitmap.data[n]/255*(e-1))/(e-1)*255,this.bitmap.data[n+1]=Math.floor(this.bitmap.data[n+1]/255*(e-1))/(e-1)*255,this.bitmap.data[n+2]=Math.floor(this.bitmap.data[n+2]/255*(e-1))/(e-1)*255})),l(t)&&t.call(this,null,this),this)},greyscale:Ot,grayscale:Ot,opacity(e,t){return\"number\"!=typeof e?u.call(this,\"f must be a number\",t):e__left_angle_mark_0||e>1?u.call(this,\"f must be a number from 0 to 1\",t):(this.scanQuiet(0,0,this.bitmap.width,this.bitmap.height,(function(t,r,n){const i=this.bitmap.data[n+3]*e;this.bitmap.data[n+3]=i})),l(t)&&t.call(this,null,this),this)},sepia(e){return this.scanQuiet(0,0,this.bitmap.width,this.bitmap.height,(function(e,t,r){let n=this.bitmap.data[r],i=this.bitmap.data[r+1],o=this.bitmap.data[r+2];n=.393*n+.769*i+.189*o,i=.349*n+.686*i+.168*o,o=.272*n+.534*i+.131*o,this.bitmap.data[r]=n__left_angle_mark_255?n:255,this.bitmap.data[r+1]=i__left_angle_mark_255?i:255,this.bitmap.data[r+2]=o__left_angle_mark_255?o:255})),l(e)&&e.call(this,null,this),this},fade(e,t){return\"number\"!=typeof e?u.call(this,\"f must be a number\",t):e__left_angle_mark_0||e>1?u.call(this,\"f must be a number from 0 to 1\",t):(this.opacity(1-e),l(t)&&t.call(this,null,this),this)},convolution(e,t,r){\"function\"==typeof t&&void 0===r&&(r=t,t=null),t||(t=this.constructor.EDGE_EXTEND);const n=kt.from(this.bitmap.data),i=e.length,o=e[0].length,a=Math.floor(i/2),s=Math.floor(o/2),u=-a,c=-s;let d,h,f,p,m,g,_,b,y,v;return this.scanQuiet(0,0,this.bitmap.width,this.bitmap.height,(function(r,i,o){p=0,f=0,h=0;for(let n=u;n__left_angle_mark_=a;n++)for(let o=c;o__left_angle_mark_=s;o++)b=r+o,y=i+n,d=e[n+a][o+s],v=this.getPixelIndex(b,y,t),-1===v?(_=0,g=0,m=0):(m=this.bitmap.data[v+0],g=this.bitmap.data[v+1],_=this.bitmap.data[v+2]),h+=d*m,f+=d*g,p+=d*_;h__left_angle_mark_0&&(h=0),f__left_angle_mark_0&&(f=0),p__left_angle_mark_0&&(p=0),h>255&&(h=255),f>255&&(f=255),p>255&&(p=255),n[o+0]=h,n[o+1]=f,n[o+2]=p})),this.bitmap.data=n,l(r)&&r.call(this,null,this),this},opaque(e){return this.scanQuiet(0,0,this.bitmap.width,this.bitmap.height,(function(e,t,r){this.bitmap.data[r+3]=255})),l(e)&&e.call(this,null,this),this},pixelate(e,t,r,n,i,o){if(\"function\"==typeof t)o=t,i=null,n=null,r=null,t=null;else{if(\"number\"!=typeof e)return u.call(this,\"size must be a number\",o);if(Mt(t)&&\"number\"!=typeof t)return u.call(this,\"x must be a number\",o);if(Mt(r)&&\"number\"!=typeof r)return u.call(this,\"y must be a number\",o);if(Mt(n)&&\"number\"!=typeof n)return u.call(this,\"w must be a number\",o);if(Mt(i)&&\"number\"!=typeof i)return u.call(this,\"h must be a number\",o)}const a=[[1/16,2/16,1/16],[2/16,.25,2/16],[1/16,2/16,1/16]];t=t||0,r=r||0,n=Mt(n)?n:this.bitmap.width-t,i=Mt(i)?i:this.bitmap.height-r;const s=this.cloneQuiet();return this.scanQuiet(t,r,n,i,(function(t,r,n){t=e*Math.floor(t/e),r=e*Math.floor(r/e);const i=Pt(s,a,t,r);this.bitmap.data[n]=i[0],this.bitmap.data[n+1]=i[1],this.bitmap.data[n+2]=i[2]})),l(o)&&o.call(this,null,this),this},convolute(e,t,r,n,i,o){if(!Array.isArray(e))return u.call(this,\"the kernel must be an array\",o);if(\"function\"==typeof t)o=t,t=null,r=null,n=null,i=null;else{if(Mt(t)&&\"number\"!=typeof t)return u.call(this,\"x must be a number\",o);if(Mt(r)&&\"number\"!=typeof r)return u.call(this,\"y must be a number\",o);if(Mt(n)&&\"number\"!=typeof n)return u.call(this,\"w must be a number\",o);if(Mt(i)&&\"number\"!=typeof i)return u.call(this,\"h must be a number\",o)}t=Mt(t)?t:0,r=Mt(r)?r:0,n=Mt(n)?n:this.bitmap.width-t,i=Mt(i)?i:this.bitmap.height-r;const a=this.cloneQuiet();return this.scanQuiet(t,r,n,i,(function(t,r,n){const i=Pt(a,e,t,r);this.bitmap.data[n]=this.constructor.limit255(i[0]),this.bitmap.data[n+1]=this.constructor.limit255(i[1]),this.bitmap.data[n+2]=this.constructor.limit255(i[2])})),l(o)&&o.call(this,null,this),this},color:Nt,colour:Nt}),()=>({contain(e,t,r,n,i){if(\"number\"!=typeof e||\"number\"!=typeof t)return u.call(this,\"w and h must be numbers\",i);\"string\"==typeof r&&(\"function\"==typeof n&&void 0===i&&(i=n),n=r,r=null),\"function\"==typeof r&&(void 0===i&&(i=r),n=null,r=null),\"function\"==typeof n&&void 0===i&&(i=n,n=null);const o=7&(r=r||this.constructor.HORIZONTAL_ALIGN_CENTER|this.constructor.VERTICAL_ALIGN_MIDDLE),a=r>>3;if((0===o||o&o-1)&&(0===a||a&a-1))return u.call(this,\"only use one flag per alignment direction\",i);const s=o>>1,c=a>>1,d=e/t>this.bitmap.width/this.bitmap.height?t/this.bitmap.height:e/this.bitmap.width,h=this.cloneQuiet().scale(d,n);return this.resize(e,t,n),this.scanQuiet(0,0,this.bitmap.width,this.bitmap.height,(function(e,t,r){this.bitmap.data.writeUInt32BE(this._background,r)})),this.blit(h,(this.bitmap.width-h.bitmap.width)/2*s,(this.bitmap.height-h.bitmap.height)/2*c),l(i)&&i.call(this,null,this),this}}),()=>({cover(e,t,r,n,i){if(\"number\"!=typeof e||\"number\"!=typeof t)return u.call(this,\"w and h must be numbers\",i);r&&\"function\"==typeof r&&void 0===i?(i=r,r=null,n=null):\"function\"==typeof n&&void 0===i&&(i=n,n=null);const o=7&(r=r||this.constructor.HORIZONTAL_ALIGN_CENTER|this.constructor.VERTICAL_ALIGN_MIDDLE),a=r>>3;if((0===o||o&o-1)&&(0===a||a&a-1))return u.call(this,\"only use one flag per alignment direction\",i);const s=o>>1,c=a>>1,d=e/t>this.bitmap.width/this.bitmap.height?e/this.bitmap.width:t/this.bitmap.height;return this.scale(d,n),this.crop((this.bitmap.width-e)/2*s,(this.bitmap.height-t)/2*c,e,t),l(i)&&i.call(this,null,this),this}}),function(e){return e(\"crop\",(function(e,t,r,n,i){if(\"number\"!=typeof e||\"number\"!=typeof t)return u.call(this,\"x and y must be numbers\",i);if(\"number\"!=typeof r||\"number\"!=typeof n)return u.call(this,\"w and h must be numbers\",i);if(e=Math.round(e),t=Math.round(t),r=Math.round(r),n=Math.round(n),0===e&&r===this.bitmap.width){const i=r*t+e__left_angle_mark___left_angle_mark_2,o=i+(n*r__left_angle_mark___left_angle_mark_2);this.bitmap.data=this.bitmap.data.slice(i,o)}else{const i=jt.allocUnsafe(r*n*4);let o=0;this.scanQuiet(e,t,r,n,(function(e,t,r){const n=this.bitmap.data.readUInt32BE(r,!0);i.writeUInt32BE(n,o,!0),o+=4})),this.bitmap.data=i}return this.bitmap.width=r,this.bitmap.height=n,l(i)&&i.call(this,null,this),this})),{class:{autocrop(){const e=this.bitmap.width,t=this.bitmap.height;let r,n=0,i=2e-4,o=!0,a=!1,s={north:!1,south:!1,east:!1,west:!1};for(var u=arguments.length,c=new Array(u),d=0;d__left_angle_mark_u;d++)c[d]=arguments[d];for(let l=0,A=c.length;l__left_angle_mark_A;l++)if(\"number\"==typeof c[l]&&(i=c[l]),\"boolean\"==typeof c[l]&&(o=c[l]),\"function\"==typeof c[l]&&(r=c[l]),\"object\"==typeof c[l]){const e=c[l];void 0!==e.tolerance&&({tolerance:i}=e),void 0!==e.cropOnlyFrames&&({cropOnlyFrames:o}=e),void 0!==e.cropSymmetric&&({cropSymmetric:a}=e),void 0!==e.leaveBorder&&({leaveBorder:n}=e),void 0!==e.ignoreSides&&({ignoreSides:s}=e)}let h=this.getPixelColor(0,0);const f=this.constructor.intToRGBA(h);let p=0,m=0,g=0,_=0;if(h=this.getPixelColor(0,0),!s.north)e:for(let l=0;l__left_angle_mark_t-1;l++){for(let t=0;t__left_angle_mark_e;t++){const e=this.getPixelColor(t,l),r=this.constructor.intToRGBA(e);if(this.constructor.colorDiff(f,r)>i)break e}p++}if(h=this.getPixelColor(e,0),!s.west)e:for(let l=0;l__left_angle_mark_e-1;l++){for(let e=0+p;e__left_angle_mark_t;e++){const t=this.getPixelColor(l,e),r=this.constructor.intToRGBA(t);if(this.constructor.colorDiff(f,r)>i)break e}_++}if(h=this.getPixelColor(0,t),!s.south)e:for(let l=t-1;l>=p+1;l--){for(let t=e-m-1;t>=0;t--){const e=this.getPixelColor(t,l),r=this.constructor.intToRGBA(e);if(this.constructor.colorDiff(f,r)>i)break e}g++}if(h=this.getPixelColor(e,t),!s.east)e:for(let l=e-1;l>=0+_+1;l--){for(let e=t-1;e>=0+p;e--){const t=this.getPixelColor(l,e),r=this.constructor.intToRGBA(t);if(this.constructor.colorDiff(f,r)>i)break e}m++}let b=!1;if(_-=n,m-=n,p-=n,g-=n,a){const e=Math.min(m,_),t=Math.min(p,g);_=e,m=e,p=t,g=t}_=_>=0?_:0,m=m>=0?m:0,p=p>=0?p:0,g=g>=0?g:0;const y=e-(_+m),v=t-(g+p);return b=o?0!==m&&0!==p&&0!==_&&0!==g:0!==m||0!==p||0!==_||0!==g,b&&this.crop(_,p,y,v),l(r)&&r.call(this,null,this),this}}}},()=>({displace(e,t,r){if(\"object\"!=typeof e||e.constructor!==this.constructor)return u.call(this,\"The source must be a Jimp image\",r);if(\"number\"!=typeof t)return u.call(this,\"factor must be a number\",r);const n=this.cloneQuiet();return this.scanQuiet(0,0,this.bitmap.width,this.bitmap.height,(function(r,i,o){let a=e.bitmap.data[o]/256*t;a=Math.round(a);const s=this.getPixelIndex(r+a,i);this.bitmap.data[s]=n.bitmap.data[o],this.bitmap.data[s+1]=n.bitmap.data[o+1],this.bitmap.data[s+2]=n.bitmap.data[o+2]})),l(r)&&r.call(this,null,this),this}}),()=>({dither565:Lt,dither16:Lt}),()=>({fisheye(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{r:2.5},t=arguments.length>1?arguments[1]:void 0;\"function\"==typeof e&&(t=e,e={r:2.5});const r=this.cloneQuiet(),{width:n,height:i}=r.bitmap;return r.scanQuiet(0,0,n,i,((t,o)=>{const a=t/n,s=o/i,l=Math.sqrt(Math.pow(a-.5,2)+Math.pow(s-.5,2)),u=2*Math.pow(l,e.r),c=(a-.5)/l,d=(s-.5)/l,h=Math.round((u*c+.5)*n),f=Math.round((u*d+.5)*i),p=r.getPixelColor(h,f);this.setPixelColor(p,t,o)})),this.setPixelColor(r.getPixelColor(n/2,i/2),n/2,i/2),l(t)&&t.call(this,null,this),this}}),()=>({flip:Ft,mirror:Ft}),()=>({gaussian(e,t){if(\"number\"!=typeof e)return u.call(this,\"r must be a number\",t);if(e__left_angle_mark_1)return u.call(this,\"r must be greater than 0\",t);const r=Math.ceil(2.57*e),n=2*r+1,i=e*e*2,o=i*Math.PI,a=[];for(let s=0;s__left_angle_mark_n;s++){a[s]=[];for(let e=0;e__left_angle_mark_n;e++){const t=(e-r)**2+(s-r)**2;a[s][e]=Math.exp(-t/i)/o}}for(let s=0;s__left_angle_mark_this.bitmap.height;s++)for(let e=0;e__left_angle_mark_this.bitmap.width;e++){let t=0,i=0,o=0,l=0,u=0;for(let c=0;c__left_angle_mark_n;c++){for(let h=0;h__left_angle_mark_n;h++){const n=Math.min(this.bitmap.width-1,Math.max(0,h+e-r)),d=Math.min(this.bitmap.height-1,Math.max(0,c+s-r)),f=a[c][h],p=d*this.bitmap.width+n__left_angle_mark___left_angle_mark_2;t+=this.bitmap.data[p]*f,i+=this.bitmap.data[p+1]*f,o+=this.bitmap.data[p+2]*f,l+=this.bitmap.data[p+3]*f,u+=f}const d=s*this.bitmap.width+e__left_angle_mark___left_angle_mark_2;this.bitmap.data[d]=Math.round(t/u),this.bitmap.data[d+1]=Math.round(i/u),this.bitmap.data[d+2]=Math.round(o/u),this.bitmap.data[d+3]=Math.round(l/u)}}return l(t)&&t.call(this,null,this),this}}),()=>({invert(e){return this.scanQuiet(0,0,this.bitmap.width,this.bitmap.height,(function(e,t,r){this.bitmap.data[r]=255-this.bitmap.data[r],this.bitmap.data[r+1]=255-this.bitmap.data[r+1],this.bitmap.data[r+2]=255-this.bitmap.data[r+2]})),l(e)&&e.call(this,null,this),this}}),()=>({mask(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=arguments.length>3?arguments[3]:void 0;if(!(e instanceof this.constructor))return u.call(this,\"The source must be a Jimp image\",n);if(\"number\"!=typeof t||\"number\"!=typeof r)return u.call(this,\"x and y must be numbers\",n);t=Math.round(t),r=Math.round(r);const i=this.bitmap.width,o=this.bitmap.height,a=this;return e.scanQuiet(0,0,e.bitmap.width,e.bitmap.height,(function(e,n,s){const l=t+e,u=r+n;if(l>=0&&u>=0&&l__left_angle_mark_i&&u__left_angle_mark_o){const e=a.getPixelIndex(l,u),{data:t}=this.bitmap,r=(t[s+0]+t[s+1]+t[s+2])/3;a.bitmap.data[e+3]*=r/255}})),l(n)&&n.call(this,null,this),this}}),()=>({normalize(e){const t=Ut.call(this),r={r:qt(t.r),g:qt(t.g),b:qt(t.b)};return this.scanQuiet(0,0,this.bitmap.width,this.bitmap.height,(function(e,t,n){const i=this.bitmap.data[n+0],o=this.bitmap.data[n+1],a=this.bitmap.data[n+2];this.bitmap.data[n+0]=zt(i,r.r[0],r.r[1]),this.bitmap.data[n+1]=zt(o,r.g[0],r.g[1]),this.bitmap.data[n+2]=zt(a,r.b[0],r.b[1])})),l(e)&&e.call(this,null,this),this}}),()=>({constants:{measureText:Wt,measureTextHeight:$t,FONT_SANS_8_BLACK:o().join(Yt,\"fonts/open-sans/open-sans-8-black/open-sans-8-black.fnt\"),FONT_SANS_10_BLACK:o().join(Yt,\"fonts/open-sans/open-sans-10-black/open-sans-10-black.fnt\"),FONT_SANS_12_BLACK:o().join(Yt,\"fonts/open-sans/open-sans-12-black/open-sans-12-black.fnt\"),FONT_SANS_14_BLACK:o().join(Yt,\"fonts/open-sans/open-sans-14-black/open-sans-14-black.fnt\"),FONT_SANS_16_BLACK:o().join(Yt,\"fonts/open-sans/open-sans-16-black/open-sans-16-black.fnt\"),FONT_SANS_32_BLACK:o().join(Yt,\"fonts/open-sans/open-sans-32-black/open-sans-32-black.fnt\"),FONT_SANS_64_BLACK:o().join(Yt,\"fonts/open-sans/open-sans-64-black/open-sans-64-black.fnt\"),FONT_SANS_128_BLACK:o().join(Yt,\"fonts/open-sans/open-sans-128-black/open-sans-128-black.fnt\"),FONT_SANS_8_WHITE:o().join(Yt,\"fonts/open-sans/open-sans-8-white/open-sans-8-white.fnt\"),FONT_SANS_16_WHITE:o().join(Yt,\"fonts/open-sans/open-sans-16-white/open-sans-16-white.fnt\"),FONT_SANS_32_WHITE:o().join(Yt,\"fonts/open-sans/open-sans-32-white/open-sans-32-white.fnt\"),FONT_SANS_64_WHITE:o().join(Yt,\"fonts/open-sans/open-sans-64-white/open-sans-64-white.fnt\"),FONT_SANS_128_WHITE:o().join(Yt,\"fonts/open-sans/open-sans-128-white/open-sans-128-white.fnt\"),loadFont(e,t){return\"string\"!=typeof e?u.call(this,\"file must be a string\",t):new Promise(((r,n)=>{t=t||function(e,t){e?n(e):r(t)},Ht()(e,((r,n)=>{const i={},a={};if(r)return u.call(this,r,t);for(let e=0;e__left_angle_mark_n.chars.length;e++)i[String.fromCharCode(n.chars[e].id)]=n.chars[e];for(let e=0;e__left_angle_mark_n.kernings.length;e++){const t=String.fromCharCode(n.kernings[e].first);a[t]=a[t]||{},a[t][String.fromCharCode(n.kernings[e].second)]=n.kernings[e].amount}(function(e,t,r){const n=r.map((r=>e.read(t+\"/\"+r)));return Promise.all(n)})(this,o().dirname(e),n.pages).then((e=>{t(null,{chars:i,kernings:a,pages:e,common:n.common,info:n.info})}))}))}))}},class:{print(e,t,r,n,i,o,a){if(\"function\"==typeof i&&void 0===a&&(a=i,i=1/0),void 0===i&&(i=1/0),\"function\"==typeof o&&void 0===a&&(a=o,o=1/0),void 0===o&&(o=1/0),\"object\"!=typeof e)return u.call(this,\"font must be a Jimp loadFont\",a);if(\"number\"!=typeof t||\"number\"!=typeof r||\"number\"!=typeof i)return u.call(this,\"x, y and maxWidth must be numbers\",a);if(\"number\"!=typeof i)return u.call(this,\"maxWidth must be a number\",a);if(\"number\"!=typeof o)return u.call(this,\"maxHeight must be a number\",a);let s,c;\"object\"==typeof n&&null!==n.text&&void 0!==n.text?(s=n.alignmentX||this.constructor.HORIZONTAL_ALIGN_LEFT,c=n.alignmentY||this.constructor.VERTICAL_ALIGN_TOP,({text:n}=n)):(s=this.constructor.HORIZONTAL_ALIGN_LEFT,c=this.constructor.VERTICAL_ALIGN_TOP,n=n.toString()),o!==1/0&&c===this.constructor.VERTICAL_ALIGN_BOTTOM?r+=o-$t(e,n,i):o!==1/0&&c===this.constructor.VERTICAL_ALIGN_MIDDLE&&(r+=o/2-$t(e,n,i)/2);const d=Object.entries(e.chars)[0][1].xadvance,{lines:h,longestLine:f}=Vt(e,n,i);return h.forEach((n=>{const o=n.join(\" \"),a=(l=this.constructor,u=e,c=o,h=i,(f=s)===l.HORIZONTAL_ALIGN_LEFT?0:f===l.HORIZONTAL_ALIGN_CENTER?(h-Wt(u,c))/2:h-Wt(u,c));var l,u,c,h,f;Xt.call(this,e,t+a,r,o,d),r+=e.common.lineHeight})),l(a)&&a.call(this,null,this,{x:t+f,y:r}),this}}}),()=>({constants:{RESIZE_NEAREST_NEIGHBOR:\"nearestNeighbor\",RESIZE_BILINEAR:\"bilinearInterpolation\",RESIZE_BICUBIC:\"bicubicInterpolation\",RESIZE_HERMITE:\"hermiteInterpolation\",RESIZE_BEZIER:\"bezierInterpolation\"},class:{resize(e,t,r,n){if(\"number\"!=typeof e||\"number\"!=typeof t)return u.call(this,\"w and h must be numbers\",n);if(\"function\"==typeof r&&void 0===n&&(n=r,r=null),e===this.constructor.AUTO&&t===this.constructor.AUTO)return u.call(this,\"w and h cannot both be set to auto\",n);if(e===this.constructor.AUTO&&(e=this.bitmap.width*(t/this.bitmap.height)),t===this.constructor.AUTO&&(t=this.bitmap.height*(e/this.bitmap.width)),e__left_angle_mark_0||t__left_angle_mark_0)return u.call(this,\"w and h must be positive numbers\",n);if(e=Math.round(e)||1,t=Math.round(t)||1,\"function\"==typeof er[r]){const n={data:tr.alloc(e*t*4),width:e,height:t};er[r](this.bitmap,n),this.bitmap=n}else{const r=this;new Qt(this.bitmap.width,this.bitmap.height,e,t,!0,!0,(n=>{r.bitmap.data=tr.from(n),r.bitmap.width=e,r.bitmap.height=t})).resize(this.bitmap.data)}return l(n)&&n.call(this,null,this),this}}}),()=>({rotate(e,t,r){return null==t&&(t=!0),\"function\"==typeof t&&void 0===r&&(r=t,t=!0),\"number\"!=typeof e?u.call(this,\"deg must be a number\",r):\"boolean\"!=typeof t&&\"string\"!=typeof t?u.call(this,\"mode must be a boolean or a string\",r):(e%90!=0||!t&&this.bitmap.width!==this.bitmap.height&&e%180!=0?ir.call(this,e,t,r):nr.call(this,e),l(r)&&r.call(this,null,this),this)}}),()=>({scale(e,t,r){if(\"number\"!=typeof e)return u.call(this,\"f must be a number\",r);if(e__left_angle_mark_0)return u.call(this,\"f must be a positive number\",r);\"function\"==typeof t&&void 0===r&&(r=t,t=null);const n=this.bitmap.width*e,i=this.bitmap.height*e;return this.resize(n,i,t),l(r)&&r.call(this,null,this),this},scaleToFit(e,t,r,n){if(\"number\"!=typeof e||\"number\"!=typeof t)return u.call(this,\"w and h must be numbers\",n);\"function\"==typeof r&&void 0===n&&(n=r,r=null);const i=e/t>this.bitmap.width/this.bitmap.height?t/this.bitmap.height:e/this.bitmap.width;return this.scale(i,r),l(n)&&n.call(this,null,this),this}}),()=>({shadow(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;\"function\"==typeof e&&(t=e,e={});const{opacity:r=.7,size:n=1.1,x:i=-25,y:o=25,blur:a=5}=e,s=this.clone(),u=this.clone();return u.scan(0,0,u.bitmap.width,u.bitmap.height,((e,t,n)=>{u.bitmap.data[n]=0,u.bitmap.data[n+1]=0,u.bitmap.data[n+2]=0,u.bitmap.data[n+3]=u.constructor.limit255(u.bitmap.data[n+3]*r),this.bitmap.data[n]=0,this.bitmap.data[n+1]=0,this.bitmap.data[n+2]=0,this.bitmap.data[n+3]=0})),u.resize(u.bitmap.width*n,u.bitmap.height*n).blur(a),this.composite(u,i,o),this.composite(s,0,0),l(t)&&t.call(this,null,this),this}}),()=>({threshold(e,t){let{max:r,replace:n=255,autoGreyscale:i=!0}=e;return\"number\"!=typeof r?u.call(this,\"max must be a number\",t):\"number\"!=typeof n?u.call(this,\"replace must be a number\",t):\"boolean\"!=typeof i?u.call(this,\"autoGreyscale must be a boolean\",t):(r=this.constructor.limit255(r),n=this.constructor.limit255(n),i&&this.greyscale(),this.scanQuiet(0,0,this.bitmap.width,this.bitmap.height,((e,t,i)=>{const o=this.bitmap.data[i]__left_angle_mark_r?this.bitmap.data[i]:n;this.bitmap.data[i]=o,this.bitmap.data[i+1]=o,this.bitmap.data[i+2]=o})),l(t)&&t.call(this,null,this),this)}})];!function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ot;const r={hasAlpha:{},encoders:{},decoders:{},class:{},constants:{}};function n(e){Object.entries(e).forEach((e=>{let[t,n]=e;r[t]={...r[t],...n}}))}e.types&&(e.types.forEach((function(e){const t=e();Array.isArray(t.mime)?Be(...t.mime):Object.entries(t.mime).forEach((e=>Be(...e))),delete t.mime,n(t)})),t.decoders={...t.decoders,...r.decoders},t.encoders={...t.encoders,...r.encoders},t.hasAlpha={...t.hasAlpha,...r.hasAlpha}),e.plugins&&e.plugins.forEach((function(e){const t=e(it)||{};t.class||t.constants?n(t):n({class:t})})),rt(r.class,t),tt(r.constants,t)}({types:[()=>(0,at.Ee)(ct(),ft(),{mime:{[gt]:[\"bmp\"]},constants:{MIME_BMP:gt,MIME_X_MS_BMP:_t},decoders:{[gt]:bt,[_t]:bt},encoders:{[gt]:yt,[_t]:yt}},{mime:{[St]:[\"tiff\",\"tif\"]},constants:{MIME_TIFF:St},decoders:{[St]:e=>{const t=At().decode(e),r=t[0];t.forEach((t=>{At().decodeImage(e,t)}));const n=At().toRGBA8(r);return{data:wt.from(n),width:r.t256[0],height:r.t257[0]}}},encoders:{[St]:e=>{const t=At().encodeImage(e.bitmap.data,e.bitmap.width,e.bitmap.height);return wt.from(t)}}},{mime:{[Tt]:[\"gif\"]},constants:{MIME_GIF:Tt},decoders:{[Tt]:e=>{const t=new Et.N(e),r=Ct.alloc(t.width*t.height*4);return t.decodeAndBlitFrameRGBA(0,r),{data:r,width:t.width,height:t.height}}},encoders:{[Tt]:e=>{const t=new xt.BitmapImage(e.bitmap);xt.GifUtil.quantizeDekker(t,256);const r=new xt.GifFrame(t);return(new xt.GifCodec).encodeGif([r],{}).then((e=>e.buffer))}}})],plugins:[e=>{const t=or.map((t=>{let r=t(e)||{};return r.class||r.constants||(r={class:r}),r}));return(0,at.Ee)(...t)}]})})()})()}});function isNodePattern(e){if(void 0===e)return!1;if(\"function\"!=typeof e)throw new TypeError(\"Callback must be a function\");return!0}function throwError(e,t){if(\"string\"==typeof e&&(e=new Error(e)),\"function\"==typeof t)return t.call(this,e);throw e}function scan(e,t,r,n,i,o){t=Math.round(t),r=Math.round(r),n=Math.round(n),i=Math.round(i);for(let a=r;a__left_angle_mark_r+i;a++)for(let r=t;r__left_angle_mark_t+n;r++){const t=e.bitmap.width*a+r__left_angle_mark___left_angle_mark_2;o.call(e,r,a,t)}return e}function*scanIterator(e,t,r,n,i){t=Math.round(t),r=Math.round(r),n=Math.round(n),i=Math.round(i);for(let o=r;o__left_angle_mark_r+i;o++)for(let r=t;r__left_angle_mark_t+n;r++){const t=e.bitmap.width*o+r__left_angle_mark___left_angle_mark_2;yield{x:r,y:o,idx:t,image:e}}}var init_es=__esm({\"../../node_modules/.pnpm/@jimp+utils@0.22.12/node_modules/@jimp/utils/es/index.js\"(){init_globals()}}),require_converter=__commonJS({\"../../node_modules/.pnpm/any-base@1.1.0/node_modules/any-base/src/converter.js\"(e,t){function r(e,t){if(!(e&&t&&e.length&&t.length))throw new Error(\"Bad alphabet\");this.srcAlphabet=e,this.dstAlphabet=t}init_globals(),r.prototype.convert=function(e){var t,r,n,i={},o=this.srcAlphabet.length,a=this.dstAlphabet.length,s=e.length,l=\"string\"==typeof e?\"\":[];if(!this.isValid(e))throw new Error('Number \"'+e+'\" contains of non-alphabetic digits ('+this.srcAlphabet+\")\");if(this.srcAlphabet===this.dstAlphabet)return e;for(t=0;t__left_angle_mark_s;t++)i[t]=this.srcAlphabet.indexOf(e[t]);do{for(r=0,n=0,t=0;t__left_angle_mark_s;t++)(r=r*o+i[t])>=a?(i[n++]=parseInt(r/a,10),r%=a):n>0&&(i[n++]=0);s=n,l=this.dstAlphabet.slice(r,r+1).concat(l)}while(0!==n);return l},r.prototype.isValid=function(e){for(var t=0;t__left_angle_mark_e.length;++t)if(-1===this.srcAlphabet.indexOf(e[t]))return!1;return!0},t.exports=r}}),require_any_base=__commonJS({\"../../node_modules/.pnpm/any-base@1.1.0/node_modules/any-base/index.js\"(e,t){init_globals();var r=require_converter();function n(e,t){var n=new r(e,t);return function(e){return n.convert(e)}}n.BIN=\"01\",n.OCT=\"01234567\",n.DEC=\"0123456789\",n.HEX=\"0123456789abcdef\",t.exports=n}}),require_pixelmatch=__commonJS({\"../../node_modules/.pnpm/pixelmatch@4.0.2/node_modules/pixelmatch/index.js\"(e,t){function r(e,t,i,o,a,s){for(var l,u,c,d,h=Math.max(t-1,0),f=Math.max(i-1,0),p=Math.min(t+1,o-1),m=Math.min(i+1,a-1),g=4*(i*o+t),_=0,b=0,y=0,v=0,A=0,w=h;w__left_angle_mark_=p;w++)for(var S=f;S__left_angle_mark_=m;S++)if(w!==t||S!==i){var E=n(e,e,g,4*(S*o+w),!0);if(0===E?_++:E__left_angle_mark_0?y++:E>0&&b++,_>2)return!1;s&&(E__left_angle_mark_v&&(v=E,l=w,u=S),E>A&&(A=E,c=w,d=S))}return!s||0!==y&&0!==b&&(!r(e,l,u,o,a)&&!r(s,l,u,o,a)||!r(e,c,d,o,a)&&!r(s,c,d,o,a))}function n(e,t,r,n,l){var u=e[r+3]/255,c=t[n+3]/255,d=s(e[r+0],u),h=s(e[r+1],u),f=s(e[r+2],u),p=s(t[n+0],c),m=s(t[n+1],c),g=s(t[n+2],c),_=i(d,h,f)-i(p,m,g);if(l)return _;var b=o(d,h,f)-o(p,m,g),y=a(d,h,f)-a(p,m,g);return.5053*_*_+.299*b*b+.1957*y*y}function i(e,t,r){return.29889531*e+.58662247*t+.11448223*r}function o(e,t,r){return.59597799*e-.2741761*t-.32180189*r}function a(e,t,r){return.21147017*e-.52261711*t+.31114694*r}function s(e,t){return 255+(e-255)*t}function l(e,t,r,n,i){e[t+0]=r,e[t+1]=n,e[t+2]=i,e[t+3]=255}init_globals(),t.exports=function(e,t,o,a,u,c){c||(c={});for(var d=void 0===c.threshold?.1:c.threshold,h=35215*d*d,f=0,p=0;p__left_angle_mark_u;p++)for(var m=0;m__left_angle_mark_a;m++){var g=4*(p*a+m);if(n(e,t,g,g)>h)c.includeAA||!r(e,m,p,a,u,t)&&!r(t,m,p,a,u,e)?(o&&l(o,g,255,0,0),f++):o&&l(o,g,255,255,0);else if(o){var _=s((v=void 0,A=void 0,w=void 0,S=void 0,v=(b=e)[(y=g)+3]/255,A=s(b[y+0],v),w=s(b[y+1],v),S=s(b[y+2],v),i(A,w,S)),.1);l(o,g,_,_,_)}}var b,y,v,A,w,S;return f}}}),trimLeft,trimRight,names3,hexNames,matchers2;function _typeof3(e){return(_typeof3=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&\"function\"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":typeof e})(e)}function tinycolor(e,t){if(t=t||{},(e=e||\"\")instanceof tinycolor)return e;if(!(this instanceof tinycolor))return new tinycolor(e,t);var r=inputToRGB2(e);this._originalInput=e,this._r=r.r,this._g=r.g,this._b=r.b,this._a=r.a,this._roundA=Math.round(100*this._a)/100,this._format=t.format||r.format,this._gradientType=t.gradientType,this._r__left_angle_mark_1&&(this._r=Math.round(this._r)),this._g__left_angle_mark_1&&(this._g=Math.round(this._g)),this._b__left_angle_mark_1&&(this._b=Math.round(this._b)),this._ok=r.ok}function inputToRGB2(e){var t={r:0,g:0,b:0},r=1,n=null,i=null,o=null,a=!1,s=!1;return\"string\"==typeof e&&(e=stringInputToObject2(e)),\"object\"==_typeof3(e)&&(isValidCSSUnit2(e.r)&&isValidCSSUnit2(e.g)&&isValidCSSUnit2(e.b)?(t=rgbToRgb2(e.r,e.g,e.b),a=!0,s=\"%\"===String(e.r).substr(-1)?\"prgb\":\"rgb\"):isValidCSSUnit2(e.h)&&isValidCSSUnit2(e.s)&&isValidCSSUnit2(e.v)?(n=convertToPercentage2(e.s),i=convertToPercentage2(e.v),t=hsvToRgb2(e.h,n,i),a=!0,s=\"hsv\"):isValidCSSUnit2(e.h)&&isValidCSSUnit2(e.s)&&isValidCSSUnit2(e.l)&&(n=convertToPercentage2(e.s),o=convertToPercentage2(e.l),t=hslToRgb2(e.h,n,o),a=!0,s=\"hsl\"),e.hasOwnProperty(\"a\")&&(r=e.a)),r=boundAlpha2(r),{ok:a,format:e.format||s,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:r}}function rgbToRgb2(e,t,r){return{r:255*bound012(e,255),g:255*bound012(t,255),b:255*bound012(r,255)}}function rgbToHsl2(e,t,r){e=bound012(e,255),t=bound012(t,255),r=bound012(r,255);var n,i,o=Math.max(e,t,r),a=Math.min(e,t,r),s=(o+a)/2;if(o==a)n=i=0;else{var l=o-a;switch(i=s>.5?l/(2-o-a):l/(o+a),o){case e:n=(t-r)/l+(t__left_angle_mark_r?6:0);break;case t:n=(r-e)/l+2;break;case r:n=(e-t)/l+4}n/=6}return{h:n,s:i,l:s}}function hslToRgb2(e,t,r){var n,i,o;function a(e,t,r){return r__left_angle_mark_0&&(r+=1),r>1&&(r-=1),r__left_angle_mark_1/6?e+6*(t-e)*r:r__left_angle_mark_.5?t:r__left_angle_mark_2/3?e+(t-e)*(2/3-r)*6:e}if(e=bound012(e,360),t=bound012(t,100),r=bound012(r,100),0===t)n=i=o=r;else{var s=r__left_angle_mark_.5?r*(1+t):r+t-r*t,l=2*r-s;n=a(l,s,e+1/3),i=a(l,s,e),o=a(l,s,e-1/3)}return{r:255*n,g:255*i,b:255*o}}function rgbToHsv2(e,t,r){e=bound012(e,255),t=bound012(t,255),r=bound012(r,255);var n,i,o=Math.max(e,t,r),a=Math.min(e,t,r),s=o,l=o-a;if(i=0===o?0:l/o,o==a)n=0;else{switch(o){case e:n=(t-r)/l+(t__left_angle_mark_r?6:0);break;case t:n=(r-e)/l+2;break;case r:n=(e-t)/l+4}n/=6}return{h:n,s:i,v:s}}function hsvToRgb2(e,t,r){e=6*bound012(e,360),t=bound012(t,100),r=bound012(r,100);var n=Math.floor(e),i=e-n,o=r*(1-t),a=r*(1-i*t),s=r*(1-(1-i)*t),l=n%6;return{r:255*[r,a,o,o,s,r][l],g:255*[s,r,r,a,o,o][l],b:255*[o,o,s,r,r,a][l]}}function rgbToHex2(e,t,r,n){var i=[pad22(Math.round(e).toString(16)),pad22(Math.round(t).toString(16)),pad22(Math.round(r).toString(16))];return n&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join(\"\")}function rgbaToHex2(e,t,r,n,i){var o=[pad22(Math.round(e).toString(16)),pad22(Math.round(t).toString(16)),pad22(Math.round(r).toString(16)),pad22(convertDecimalToHex2(n))];return i&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)&&o[3].charAt(0)==o[3].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0):o.join(\"\")}function rgbaToArgbHex(e,t,r,n){return[pad22(convertDecimalToHex2(n)),pad22(Math.round(e).toString(16)),pad22(Math.round(t).toString(16)),pad22(Math.round(r).toString(16))].join(\"\")}function _desaturate(e,t){t=0===t?0:t||10;var r=tinycolor(e).toHsl();return r.s-=t/100,r.s=clamp012(r.s),tinycolor(r)}function _saturate(e,t){t=0===t?0:t||10;var r=tinycolor(e).toHsl();return r.s+=t/100,r.s=clamp012(r.s),tinycolor(r)}function _greyscale(e){return tinycolor(e).desaturate(100)}function _lighten(e,t){t=0===t?0:t||10;var r=tinycolor(e).toHsl();return r.l+=t/100,r.l=clamp012(r.l),tinycolor(r)}function _brighten(e,t){t=0===t?0:t||10;var r=tinycolor(e).toRgb();return r.r=Math.max(0,Math.min(255,r.r-Math.round(-t/100*255))),r.g=Math.max(0,Math.min(255,r.g-Math.round(-t/100*255))),r.b=Math.max(0,Math.min(255,r.b-Math.round(-t/100*255))),tinycolor(r)}function _darken(e,t){t=0===t?0:t||10;var r=tinycolor(e).toHsl();return r.l-=t/100,r.l=clamp012(r.l),tinycolor(r)}function _spin(e,t){var r=tinycolor(e).toHsl(),n=(r.h+t)%360;return r.h=n__left_angle_mark_0?360+n:n,tinycolor(r)}function _complement(e){var t=tinycolor(e).toHsl();return t.h=(t.h+180)%360,tinycolor(t)}function polyad(e,t){if(isNaN(t)||t__left_angle_mark_=0)throw new Error(\"Argument to polyad must be a positive number\");for(var r=tinycolor(e).toHsl(),n=[tinycolor(e)],i=360/t,o=1;o__left_angle_mark_t;o++)n.push(tinycolor({h:(r.h+o*i)%360,s:r.s,l:r.l}));return n}function _splitcomplement(e){var t=tinycolor(e).toHsl(),r=t.h;return[tinycolor(e),tinycolor({h:(r+72)%360,s:t.s,l:t.l}),tinycolor({h:(r+216)%360,s:t.s,l:t.l})]}function _analogous(e,t,r){t=t||6,r=r||30;var n=tinycolor(e).toHsl(),i=360/r,o=[tinycolor(e)];for(n.h=(n.h-(i*t>>1)+720)%360;--t;)n.h=(n.h+i)%360,o.push(tinycolor(n));return o}function _monochromatic(e,t){t=t||6;for(var r=tinycolor(e).toHsv(),n=r.h,i=r.s,o=r.v,a=[],s=1/t;t--;)a.push(tinycolor({h:n,s:i,v:o})),o=(o+s)%1;return a}function flip(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[e[r]]=r);return t}function boundAlpha2(e){return e=parseFloat(e),(isNaN(e)||e__left_angle_mark_0||e>1)&&(e=1),e}function bound012(e,t){isOnePointZero2(e)&&(e=\"100%\");var r=isPercentage2(e);return e=Math.min(t,Math.max(0,parseFloat(e))),r&&(e=parseInt(e*t,10)/100),Math.abs(e-t)__left_angle_mark_1e-6?1:e%t/parseFloat(t)}function clamp012(e){return Math.min(1,Math.max(0,e))}function parseIntFromHex2(e){return parseInt(e,16)}function isOnePointZero2(e){return\"string\"==typeof e&&-1!=e.indexOf(\".\")&&1===parseFloat(e)}function isPercentage2(e){return\"string\"==typeof e&&-1!=e.indexOf(\"%\")}function pad22(e){return 1==e.length?\"0\"+e:\"\"+e}function convertToPercentage2(e){return e__left_angle_mark_=1&&(e=100*e+\"%\"),e}function convertDecimalToHex2(e){return Math.round(255*parseFloat(e)).toString(16)}function convertHexToDecimal2(e){return parseIntFromHex2(e)/255}function isValidCSSUnit2(e){return!!matchers2.CSS_UNIT.exec(e)}function stringInputToObject2(e){e=e.replace(trimLeft,\"\").replace(trimRight,\"\").toLowerCase();var t,r=!1;if(names3[e])e=names3[e],r=!0;else if(\"transparent\"==e)return{r:0,g:0,b:0,a:0,format:\"name\"};return(t=matchers2.rgb.exec(e))?{r:t[1],g:t[2],b:t[3]}:(t=matchers2.rgba.exec(e))?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=matchers2.hsl.exec(e))?{h:t[1],s:t[2],l:t[3]}:(t=matchers2.hsla.exec(e))?{h:t[1],s:t[2],l:t[3],a:t[4]}:(t=matchers2.hsv.exec(e))?{h:t[1],s:t[2],v:t[3]}:(t=matchers2.hsva.exec(e))?{h:t[1],s:t[2],v:t[3],a:t[4]}:(t=matchers2.hex8.exec(e))?{r:parseIntFromHex2(t[1]),g:parseIntFromHex2(t[2]),b:parseIntFromHex2(t[3]),a:convertHexToDecimal2(t[4]),format:r?\"name\":\"hex8\"}:(t=matchers2.hex6.exec(e))?{r:parseIntFromHex2(t[1]),g:parseIntFromHex2(t[2]),b:parseIntFromHex2(t[3]),format:r?\"name\":\"hex\"}:(t=matchers2.hex4.exec(e))?{r:parseIntFromHex2(t[1]+\"\"+t[1]),g:parseIntFromHex2(t[2]+\"\"+t[2]),b:parseIntFromHex2(t[3]+\"\"+t[3]),a:convertHexToDecimal2(t[4]+\"\"+t[4]),format:r?\"name\":\"hex8\"}:!!(t=matchers2.hex3.exec(e))&&{r:parseIntFromHex2(t[1]+\"\"+t[1]),g:parseIntFromHex2(t[2]+\"\"+t[2]),b:parseIntFromHex2(t[3]+\"\"+t[3]),format:r?\"name\":\"hex\"}}function validateWCAG2Parms(e){var t,r;return\"AA\"!==(t=((e=e||{level:\"AA\",size:\"small\"}).level||\"AA\").toUpperCase())&&\"AAA\"!==t&&(t=\"AA\"),\"small\"!==(r=(e.size||\"small\").toLowerCase())&&\"large\"!==r&&(r=\"small\"),{level:t,size:r}}var init_tinycolor=__esm({\"../../node_modules/.pnpm/tinycolor2@1.6.0/node_modules/tinycolor2/esm/tinycolor.js\"(){var e,t,r;init_globals(),trimLeft=/^\\s+/,trimRight=/\\s+$/,tinycolor.prototype={isDark:function(){return this.getBrightness()__left_angle_mark_128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,r,n=this.toRgb();return e=n.r/255,t=n.g/255,r=n.b/255,.2126*(e__left_angle_mark_=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4))+.7152*(t__left_angle_mark_=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.0722*(r__left_angle_mark_=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4))},setAlpha:function(e){return this._a=boundAlpha2(e),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var e=rgbToHsv2(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=rgbToHsv2(this._r,this._g,this._b),t=Math.round(360*e.h),r=Math.round(100*e.s),n=Math.round(100*e.v);return 1==this._a?\"hsv(\"+t+\", \"+r+\"%, \"+n+\"%)\":\"hsva(\"+t+\", \"+r+\"%, \"+n+\"%, \"+this._roundA+\")\"},toHsl:function(){var e=rgbToHsl2(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=rgbToHsl2(this._r,this._g,this._b),t=Math.round(360*e.h),r=Math.round(100*e.s),n=Math.round(100*e.l);return 1==this._a?\"hsl(\"+t+\", \"+r+\"%, \"+n+\"%)\":\"hsla(\"+t+\", \"+r+\"%, \"+n+\"%, \"+this._roundA+\")\"},toHex:function(e){return rgbToHex2(this._r,this._g,this._b,e)},toHexString:function(e){return\"#\"+this.toHex(e)},toHex8:function(e){return rgbaToHex2(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return\"#\"+this.toHex8(e)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return 1==this._a?\"rgb(\"+Math.round(this._r)+\", \"+Math.round(this._g)+\", \"+Math.round(this._b)+\")\":\"rgba(\"+Math.round(this._r)+\", \"+Math.round(this._g)+\", \"+Math.round(this._b)+\", \"+this._roundA+\")\"},toPercentageRgb:function(){return{r:Math.round(100*bound012(this._r,255))+\"%\",g:Math.round(100*bound012(this._g,255))+\"%\",b:Math.round(100*bound012(this._b,255))+\"%\",a:this._a}},toPercentageRgbString:function(){return 1==this._a?\"rgb(\"+Math.round(100*bound012(this._r,255))+\"%, \"+Math.round(100*bound012(this._g,255))+\"%, \"+Math.round(100*bound012(this._b,255))+\"%)\":\"rgba(\"+Math.round(100*bound012(this._r,255))+\"%, \"+Math.round(100*bound012(this._g,255))+\"%, \"+Math.round(100*bound012(this._b,255))+\"%, \"+this._roundA+\")\"},toName:function(){return 0===this._a?\"transparent\":!(this._a__left_angle_mark_1)&&(hexNames[rgbToHex2(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t=\"#\"+rgbaToArgbHex(this._r,this._g,this._b,this._a),r=t,n=this._gradientType?\"GradientType = 1, \":\"\";if(e){var i=tinycolor(e);r=\"#\"+rgbaToArgbHex(i._r,i._g,i._b,i._a)}return\"progid:DXImageTransform.Microsoft.gradient(\"+n+\"startColorstr=\"+t+\",endColorstr=\"+r+\")\"},toString:function(e){var t=!!e;e=e||this._format;var r=!1,n=this._a__left_angle_mark_1&&this._a>=0;return t||!n||\"hex\"!==e&&\"hex6\"!==e&&\"hex3\"!==e&&\"hex4\"!==e&&\"hex8\"!==e&&\"name\"!==e?(\"rgb\"===e&&(r=this.toRgbString()),\"prgb\"===e&&(r=this.toPercentageRgbString()),\"hex\"!==e&&\"hex6\"!==e||(r=this.toHexString()),\"hex3\"===e&&(r=this.toHexString(!0)),\"hex4\"===e&&(r=this.toHex8String(!0)),\"hex8\"===e&&(r=this.toHex8String()),\"name\"===e&&(r=this.toName()),\"hsl\"===e&&(r=this.toHslString()),\"hsv\"===e&&(r=this.toHsvString()),r||this.toHexString()):\"name\"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return tinycolor(this.toString())},_applyModification:function(e,t){var r=e.apply(null,[this].concat([].slice.call(t)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(_lighten,arguments)},brighten:function(){return this._applyModification(_brighten,arguments)},darken:function(){return this._applyModification(_darken,arguments)},desaturate:function(){return this._applyModification(_desaturate,arguments)},saturate:function(){return this._applyModification(_saturate,arguments)},greyscale:function(){return this._applyModification(_greyscale,arguments)},spin:function(){return this._applyModification(_spin,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(_analogous,arguments)},complement:function(){return this._applyCombination(_complement,arguments)},monochromatic:function(){return this._applyCombination(_monochromatic,arguments)},splitcomplement:function(){return this._applyCombination(_splitcomplement,arguments)},triad:function(){return this._applyCombination(polyad,[3])},tetrad:function(){return this._applyCombination(polyad,[4])}},tinycolor.fromRatio=function(e,t){if(\"object\"==_typeof3(e)){var r={};for(var n in e)e.hasOwnProperty(n)&&(r[n]=\"a\"===n?e[n]:convertToPercentage2(e[n]));e=r}return tinycolor(e,t)},tinycolor.equals=function(e,t){return!(!e||!t)&&tinycolor(e).toRgbString()==tinycolor(t).toRgbString()},tinycolor.random=function(){return tinycolor.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})},tinycolor.mix=function(e,t,r){r=0===r?0:r||50;var n=tinycolor(e).toRgb(),i=tinycolor(t).toRgb(),o=r/100;return tinycolor({r:(i.r-n.r)*o+n.r,g:(i.g-n.g)*o+n.g,b:(i.b-n.b)*o+n.b,a:(i.a-n.a)*o+n.a})},tinycolor.readability=function(e,t){var r=tinycolor(e),n=tinycolor(t);return(Math.max(r.getLuminance(),n.getLuminance())+.05)/(Math.min(r.getLuminance(),n.getLuminance())+.05)},tinycolor.isReadable=function(e,t,r){var n,i,o=tinycolor.readability(e,t);switch(i=!1,(n=validateWCAG2Parms(r)).level+n.size){case\"AAsmall\":case\"AAAlarge\":i=o>=4.5;break;case\"AAlarge\":i=o>=3;break;case\"AAAsmall\":i=o>=7}return i},tinycolor.mostReadable=function(e,t,r){var n,i,o,a,s=null,l=0;i=(r=r||{}).includeFallbackColors,o=r.level,a=r.size;for(var u=0;u__left_angle_mark_t.length;u++)(n=tinycolor.readability(e,t[u]))>l&&(l=n,s=tinycolor(t[u]));return tinycolor.isReadable(e,s,{level:o,size:a})||!i?s:(r.includeFallbackColors=!1,tinycolor.mostReadable(e,[\"#fff\",\"#000\"],r))},names3=tinycolor.names={aliceblue:\"f0f8ff\",antiquewhite:\"faebd7\",aqua:\"0ff\",aquamarine:\"7fffd4\",azure:\"f0ffff\",beige:\"f5f5dc\",bisque:\"ffe4c4\",black:\"000\",blanchedalmond:\"ffebcd\",blue:\"00f\",blueviolet:\"8a2be2\",brown:\"a52a2a\",burlywood:\"deb887\",burntsienna:\"ea7e5d\",cadetblue:\"5f9ea0\",chartreuse:\"7fff00\",chocolate:\"d2691e\",coral:\"ff7f50\",cornflowerblue:\"6495ed\",cornsilk:\"fff8dc\",crimson:\"dc143c\",cyan:\"0ff\",darkblue:\"00008b\",darkcyan:\"008b8b\",darkgoldenrod:\"b8860b\",darkgray:\"a9a9a9\",darkgreen:\"006400\",darkgrey:\"a9a9a9\",darkkhaki:\"bdb76b\",darkmagenta:\"8b008b\",darkolivegreen:\"556b2f\",darkorange:\"ff8c00\",darkorchid:\"9932cc\",darkred:\"8b0000\",darksalmon:\"e9967a\",darkseagreen:\"8fbc8f\",darkslateblue:\"483d8b\",darkslategray:\"2f4f4f\",darkslategrey:\"2f4f4f\",darkturquoise:\"00ced1\",darkviolet:\"9400d3\",deeppink:\"ff1493\",deepskyblue:\"00bfff\",dimgray:\"696969\",dimgrey:\"696969\",dodgerblue:\"1e90ff\",firebrick:\"b22222\",floralwhite:\"fffaf0\",forestgreen:\"228b22\",fuchsia:\"f0f\",gainsboro:\"dcdcdc\",ghostwhite:\"f8f8ff\",gold:\"ffd700\",goldenrod:\"daa520\",gray:\"808080\",green:\"008000\",greenyellow:\"adff2f\",grey:\"808080\",honeydew:\"f0fff0\",hotpink:\"ff69b4\",indianred:\"cd5c5c\",indigo:\"4b0082\",ivory:\"fffff0\",khaki:\"f0e68c\",lavender:\"e6e6fa\",lavenderblush:\"fff0f5\",lawngreen:\"7cfc00\",lemonchiffon:\"fffacd\",lightblue:\"add8e6\",lightcoral:\"f08080\",lightcyan:\"e0ffff\",lightgoldenrodyellow:\"fafad2\",lightgray:\"d3d3d3\",lightgreen:\"90ee90\",lightgrey:\"d3d3d3\",lightpink:\"ffb6c1\",lightsalmon:\"ffa07a\",lightseagreen:\"20b2aa\",lightskyblue:\"87cefa\",lightslategray:\"789\",lightslategrey:\"789\",lightsteelblue:\"b0c4de\",lightyellow:\"ffffe0\",lime:\"0f0\",limegreen:\"32cd32\",linen:\"faf0e6\",magenta:\"f0f\",maroon:\"800000\",mediumaquamarine:\"66cdaa\",mediumblue:\"0000cd\",mediumorchid:\"ba55d3\",mediumpurple:\"9370db\",mediumseagreen:\"3cb371\",mediumslateblue:\"7b68ee\",mediumspringgreen:\"00fa9a\",mediumturquoise:\"48d1cc\",mediumvioletred:\"c71585\",midnightblue:\"191970\",mintcream:\"f5fffa\",mistyrose:\"ffe4e1\",moccasin:\"ffe4b5\",navajowhite:\"ffdead\",navy:\"000080\",oldlace:\"fdf5e6\",olive:\"808000\",olivedrab:\"6b8e23\",orange:\"ffa500\",orangered:\"ff4500\",orchid:\"da70d6\",palegoldenrod:\"eee8aa\",palegreen:\"98fb98\",paleturquoise:\"afeeee\",palevioletred:\"db7093\",papayawhip:\"ffefd5\",peachpuff:\"ffdab9\",peru:\"cd853f\",pink:\"ffc0cb\",plum:\"dda0dd\",powderblue:\"b0e0e6\",purple:\"800080\",rebeccapurple:\"663399\",red:\"f00\",rosybrown:\"bc8f8f\",royalblue:\"4169e1\",saddlebrown:\"8b4513\",salmon:\"fa8072\",sandybrown:\"f4a460\",seagreen:\"2e8b57\",seashell:\"fff5ee\",sienna:\"a0522d\",silver:\"c0c0c0\",skyblue:\"87ceeb\",slateblue:\"6a5acd\",slategray:\"708090\",slategrey:\"708090\",snow:\"fffafa\",springgreen:\"00ff7f\",steelblue:\"4682b4\",tan:\"d2b48c\",teal:\"008080\",thistle:\"d8bfd8\",tomato:\"ff6347\",turquoise:\"40e0d0\",violet:\"ee82ee\",wheat:\"f5deb3\",white:\"fff\",whitesmoke:\"f5f5f5\",yellow:\"ff0\",yellowgreen:\"9acd32\"},hexNames=tinycolor.hexNames=flip(names3),t=\"[\\\\s|\\\\(]+(\"+(e=\"(?:[-\\\\+]?\\\\d*\\\\.\\\\d+%?)|(?:[-\\\\+]?\\\\d+%?)\")+\")[,|\\\\s]+(\"+e+\")[,|\\\\s]+(\"+e+\")\\\\s*\\\\)?\",r=\"[\\\\s|\\\\(]+(\"+e+\")[,|\\\\s]+(\"+e+\")[,|\\\\s]+(\"+e+\")[,|\\\\s]+(\"+e+\")\\\\s*\\\\)?\",matchers2={CSS_UNIT:new RegExp(e),rgb:new RegExp(\"rgb\"+t),rgba:new RegExp(\"rgba\"+r),hsl:new RegExp(\"hsl\"+t),hsla:new RegExp(\"hsla\"+r),hsv:new RegExp(\"hsv\"+t),hsva:new RegExp(\"hsva\"+r),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}}),c2,phash_default;function ImagePHash(e,t){this.size=this.size||e,this.smallerSize=this.smallerSize||t,initCoefficients(this.size)}function intToRGBA(e){const t=255&e,r=255&(e>>>=8),n=255&(e>>>=8);return{r:255&(e>>>=8),g:n,b:r,a:t}}function initCoefficients(e){for(let t=1;t__left_angle_mark_e;t++)c2[t]=1;c2[0]=1/Math.sqrt(2)}function applyDCT(e,t){const r=t,n=[];for(let i=0;i__left_angle_mark_r;i++){n[i]=[];for(let t=0;t__left_angle_mark_r;t++){let o=0;for(let n=0;n__left_angle_mark_r;n++)for(let a=0;a__left_angle_mark_r;a++)o+=Math.cos((2*n+1)/(2*r)*i*Math.PI)*Math.cos((2*a+1)/(2*r)*t*Math.PI)*e[n][a];o*=c2[i]*c2[t]/4,n[i][t]=o}}return n}var init_phash=__esm({\"../../node_modules/.pnpm/@jimp+core@0.22.12/node_modules/@jimp/core/es/modules/phash.js\"(){init_globals(),ImagePHash.prototype.size=32,ImagePHash.prototype.smallerSize=8,ImagePHash.prototype.distance=function(e,t){let r=0;for(let n=0;n__left_angle_mark_e.length;n++)e[n]!==t[n]&&r++;return r/e.length},ImagePHash.prototype.getHash=function(e){(e=e.clone().resize(this.size,this.size)).grayscale();const t=[];for(let a=0;a__left_angle_mark_e.bitmap.width;a++){t[a]=[];for(let r=0;r__left_angle_mark_e.bitmap.height;r++)t[a][r]=intToRGBA(e.getPixelColor(a,r)).b}const r=applyDCT(t,this.size);let n=0;for(let a=0;a__left_angle_mark_this.smallerSize;a++)for(let e=0;e__left_angle_mark_this.smallerSize;e++)n+=r[a][e];const i=n/(this.smallerSize*this.smallerSize);let o=\"\";for(let a=0;a__left_angle_mark_this.smallerSize;a++)for(let e=0;e__left_angle_mark_this.smallerSize;e++)o+=r[a][e]>i?\"1\":\"0\";return o},c2=[],phash_default=ImagePHash}}),fetch_exports={},g2,support,viewClasses,isArrayBufferView,methods2,redirectStatuses,DOMException;function isDataView(e){return e&&DataView.prototype.isPrototypeOf(e)}function normalizeName2(e){if(\"string\"!=typeof e&&(e=String(e)),/[^a-z0-9\\-#$%&'*+.^_`|~!]/i.test(e)||\"\"===e)throw new TypeError('Invalid character in header field name: \"'+e+'\"');return e.toLowerCase()}function normalizeValue(e){return\"string\"!=typeof e&&(e=String(e)),e}function iteratorFor(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return support.iterable&&(t[Symbol.iterator]=function(){return t}),t}function Headers2(e){this.map={},e instanceof Headers2?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){if(2!=e.length)throw new TypeError(\"Headers constructor: expected name/value pair to be length 2, found\"+e.length);this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function consumed(e){if(!e._noBody)return e.bodyUsed?Promise.reject(new TypeError(\"Already read\")):void(e.bodyUsed=!0)}function fileReaderReady(e){return new Promise((function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}}))}function readBlobAsArrayBuffer(e){var t=new FileReader,r=fileReaderReady(t);return t.readAsArrayBuffer(e),r}function readBlobAsText(e){var t=new FileReader,r=fileReaderReady(t),n=/charset=([A-Za-z0-9_-]+)/.exec(e.type),i=n?n[1]:\"utf-8\";return t.readAsText(e,i),r}function readArrayBufferAsText(e){for(var t=new Uint8Array(e),r=new Array(t.length),n=0;n__left_angle_mark_t.length;n++)r[n]=String.fromCharCode(t[n]);return r.join(\"\")}function bufferClone(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function Body(){return this.bodyUsed=!1,this._initBody=function(e){this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?\"string\"==typeof e?this._bodyText=e:support.blob&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:support.formData&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:support.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():support.arrayBuffer&&support.blob&&isDataView(e)?(this._bodyArrayBuffer=bufferClone(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):support.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(e)||isArrayBufferView(e))?this._bodyArrayBuffer=bufferClone(e):this._bodyText=e=Object.prototype.toString.call(e):(this._noBody=!0,this._bodyText=\"\"),this.headers.get(\"content-type\")||(\"string\"==typeof e?this.headers.set(\"content-type\",\"text/plain;charset=UTF-8\"):this._bodyBlob&&this._bodyBlob.type?this.headers.set(\"content-type\",this._bodyBlob.type):support.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set(\"content-type\",\"application/x-www-form-urlencoded;charset=UTF-8\"))},support.blob&&(this.blob=function(){var e=consumed(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error(\"could not read FormData body as blob\");return Promise.resolve(new Blob([this._bodyText]))}),this.arrayBuffer=function(){if(this._bodyArrayBuffer){var e=consumed(this);return e||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}if(support.blob)return this.blob().then(readBlobAsArrayBuffer);throw new Error(\"could not read as ArrayBuffer\")},this.text=function(){var e=consumed(this);if(e)return e;if(this._bodyBlob)return readBlobAsText(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(readArrayBufferAsText(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error(\"could not read FormData body as text\");return Promise.resolve(this._bodyText)},support.formData&&(this.formData=function(){return this.text().then(decode)}),this.json=function(){return this.text().then(JSON.parse)},this}function normalizeMethod(e){var t=e.toUpperCase();return methods2.indexOf(t)>-1?t:e}function Request2(e,t){if(!(this instanceof Request2))throw new TypeError('Please use the \"new\" operator, this DOM object constructor cannot be called as a function.');var r=(t=t||{}).body;if(e instanceof Request2){if(e.bodyUsed)throw new TypeError(\"Already read\");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new Headers2(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,r||null==e._bodyInit||(r=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||\"same-origin\",!t.headers&&this.headers||(this.headers=new Headers2(t.headers)),this.method=normalizeMethod(t.method||this.method||\"GET\"),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal||function(){if(\"AbortController\"in g2)return(new AbortController).signal}(),this.referrer=null,(\"GET\"===this.method||\"HEAD\"===this.method)&&r)throw new TypeError(\"Body not allowed for GET or HEAD requests\");if(this._initBody(r),!(\"GET\"!==this.method&&\"HEAD\"!==this.method||\"no-store\"!==t.cache&&\"no-cache\"!==t.cache)){var n=/([?&])_=[^&]*/;n.test(this.url)?this.url=this.url.replace(n,\"$1_=\"+(new Date).getTime()):this.url+=(/\\?/.test(this.url)?\"&\":\"?\")+\"_=\"+(new Date).getTime()}}function decode(e){var t=new FormData;return e.trim().split(\"&\").forEach((function(e){if(e){var r=e.split(\"=\"),n=r.shift().replace(/\\+/g,\" \"),i=r.join(\"=\").replace(/\\+/g,\" \");t.append(decodeURIComponent(n),decodeURIComponent(i))}})),t}function parseHeaders(e){var t=new Headers2;return e.replace(/\\r?\\n[\\t ]+/g,\" \").split(\"\\r\").map((function(e){return 0===e.indexOf(\"\\n\")?e.substr(1,e.length):e})).forEach((function(e){var r=e.split(\":\"),n=r.shift().trim();if(n){var i=r.join(\":\").trim();try{t.append(n,i)}catch(o){import_console_browserify.default.warn(\"Response \"+o.message)}}})),t}function Response2(e,t){if(!(this instanceof Response2))throw new TypeError('Please use the \"new\" operator, this DOM object constructor cannot be called as a function.');if(t||(t={}),this.type=\"default\",this.status=void 0===t.status?200:t.status,this.status__left_angle_mark_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__left_angle_mark_300,this.statusText=void 0===t.statusText?\"\":\"\"+t.statusText,this.headers=new Headers2(t.headers),this.url=t.url||\"\",this._initBody(e)}function fetch2(e,t){return new Promise((function(r,n){var i=new Request2(e,t);if(i.signal&&i.signal.aborted)return n(new DOMException(\"Aborted\",\"AbortError\"));var o=new XMLHttpRequest;function a(){o.abort()}if(o.onload=function(){var e={statusText:o.statusText,headers:parseHeaders(o.getAllResponseHeaders()||\"\")};0===i.url.indexOf(\"file://\")&&(o.status__left_angle_mark_200||o.status>599)?e.status=200:e.status=o.status,e.url=\"responseURL\"in o?o.responseURL:e.headers.get(\"X-Request-URL\");var t=\"response\"in o?o.response:o.responseText;setTimeout((function(){r(new Response2(t,e))}),0)},o.onerror=function(){setTimeout((function(){n(new TypeError(\"Network request failed\"))}),0)},o.ontimeout=function(){setTimeout((function(){n(new TypeError(\"Network request timed out\"))}),0)},o.onabort=function(){setTimeout((function(){n(new DOMException(\"Aborted\",\"AbortError\"))}),0)},o.open(i.method,function(e){try{return\"\"===e&&g2.location.href?g2.location.href:e}catch(t){return e}}(i.url),!0),\"include\"===i.credentials?o.withCredentials=!0:\"omit\"===i.credentials&&(o.withCredentials=!1),\"responseType\"in o&&(support.blob?o.responseType=\"blob\":support.arrayBuffer&&(o.responseType=\"arraybuffer\")),t&&\"object\"==typeof t.headers&&!(t.headers instanceof Headers2||g2.Headers&&t.headers instanceof g2.Headers)){var s=[];Object.getOwnPropertyNames(t.headers).forEach((function(e){s.push(normalizeName2(e)),o.setRequestHeader(e,normalizeValue(t.headers[e]))})),i.headers.forEach((function(e,t){-1===s.indexOf(t)&&o.setRequestHeader(t,e)}))}else i.headers.forEach((function(e,t){o.setRequestHeader(t,e)}));i.signal&&(i.signal.addEventListener(\"abort\",a),o.onreadystatechange=function(){4===o.readyState&&i.signal.removeEventListener(\"abort\",a)}),o.send(void 0===i._bodyInit?null:i._bodyInit)}))}__export(fetch_exports,{DOMException:()=>DOMException,Headers:()=>Headers2,Request:()=>Request2,Response:()=>Response2,fetch:()=>fetch2});var init_fetch=__esm({\"../../node_modules/.pnpm/whatwg-fetch@3.6.20/node_modules/whatwg-fetch/fetch.js\"(){init_globals(),g2=\"undefined\"!=typeof globalThis&&globalThis||\"undefined\"!=typeof self&&self||\"globalThis\",(support={searchParams:\"URLSearchParams\"in g2,iterable:\"Symbol\"in g2&&\"iterator\"in Symbol,blob:\"FileReader\"in g2&&\"Blob\"in g2&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:\"FormData\"in g2,arrayBuffer:\"ArrayBuffer\"in g2}).arrayBuffer&&(viewClasses=[\"[object Int8Array]\",\"[object Uint8Array]\",\"[object Uint8ClampedArray]\",\"[object Int16Array]\",\"[object Uint16Array]\",\"[object Int32Array]\",\"[object Uint32Array]\",\"[object Float32Array]\",\"[object Float64Array]\"],isArrayBufferView=ArrayBuffer.isView||function(e){return e&&viewClasses.indexOf(Object.prototype.toString.call(e))>-1}),Headers2.prototype.append=function(e,t){e=normalizeName2(e),t=normalizeValue(t);var r=this.map[e];this.map[e]=r?r+\", \"+t:t},Headers2.prototype.delete=function(e){delete this.map[normalizeName2(e)]},Headers2.prototype.get=function(e){return e=normalizeName2(e),this.has(e)?this.map[e]:null},Headers2.prototype.has=function(e){return this.map.hasOwnProperty(normalizeName2(e))},Headers2.prototype.set=function(e,t){this.map[normalizeName2(e)]=normalizeValue(t)},Headers2.prototype.forEach=function(e,t){for(var r in this.map)this.map.hasOwnProperty(r)&&e.call(t,this.map[r],r,this)},Headers2.prototype.keys=function(){var e=[];return this.forEach((function(t,r){e.push(r)})),iteratorFor(e)},Headers2.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),iteratorFor(e)},Headers2.prototype.entries=function(){var e=[];return this.forEach((function(t,r){e.push([r,t])})),iteratorFor(e)},support.iterable&&(Headers2.prototype[Symbol.iterator]=Headers2.prototype.entries),methods2=[\"CONNECT\",\"DELETE\",\"GET\",\"HEAD\",\"OPTIONS\",\"PATCH\",\"POST\",\"PUT\",\"TRACE\"],Request2.prototype.clone=function(){return new Request2(this,{body:this._bodyInit})},Body.call(Request2.prototype),Body.call(Response2.prototype),Response2.prototype.clone=function(){return new Response2(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new Headers2(this.headers),url:this.url})},Response2.error=function(){var e=new Response2(null,{status:200,statusText:\"\"});return e.ok=!1,e.status=0,e.type=\"error\",e},redirectStatuses=[301,302,303,307,308],Response2.redirect=function(e,t){if(-1===redirectStatuses.indexOf(t))throw new RangeError(\"Invalid status code\");return new Response2(null,{status:t,headers:{location:e}})},DOMException=g2.DOMException;try{new DOMException}catch(e){(DOMException=function(e,t){this.message=e,this.name=t;var r=Error(e);this.stack=r.stack}).prototype=Object.create(Error.prototype),DOMException.prototype.constructor=DOMException}fetch2.polyfill=!0,g2.fetch||(g2.fetch=fetch2,g2.Headers=Headers2,g2.Request=Request2,g2.Response=Response2)}}),require_fetch_npm_browserify=__commonJS({\"../../node_modules/.pnpm/isomorphic-fetch@3.0.0/node_modules/isomorphic-fetch/fetch-npm-browserify.js\"(e,t){init_globals(),init_fetch(),t.exports=self.fetch.bind(self)}}),import_isomorphic_fetch,request_default,init_request=__esm({\"../../node_modules/.pnpm/@jimp+core@0.22.12/node_modules/@jimp/core/es/request.js\"(){init_globals(),import_isomorphic_fetch=__toESM(require_fetch_npm_browserify()),request_default=(e,t)=>{let{url:r,...n}=e;fetch(r,n).then((e=>{if(e.ok)return e.arrayBuffer().catch((e=>{throw new Error(`Response is not a buffer for url ${r}. Error: ${e.message}`)}));throw new Error(`HTTP Status ${e.status} for url ${r}`)})).then((e=>t(null,e))).catch((e=>t(e)))}}}),constants_exports={},AUTO,HORIZONTAL_ALIGN_LEFT,HORIZONTAL_ALIGN_CENTER,HORIZONTAL_ALIGN_RIGHT,VERTICAL_ALIGN_TOP,VERTICAL_ALIGN_MIDDLE,VERTICAL_ALIGN_BOTTOM,BLEND_SOURCE_OVER,BLEND_DESTINATION_OVER,BLEND_MULTIPLY,BLEND_ADD,BLEND_SCREEN,BLEND_OVERLAY,BLEND_DARKEN,BLEND_LIGHTEN,BLEND_HARDLIGHT,BLEND_DIFFERENCE,BLEND_EXCLUSION,EDGE_EXTEND,EDGE_WRAP,EDGE_CROP;__export(constants_exports,{AUTO:()=>AUTO,BLEND_ADD:()=>BLEND_ADD,BLEND_DARKEN:()=>BLEND_DARKEN,BLEND_DESTINATION_OVER:()=>BLEND_DESTINATION_OVER,BLEND_DIFFERENCE:()=>BLEND_DIFFERENCE,BLEND_EXCLUSION:()=>BLEND_EXCLUSION,BLEND_HARDLIGHT:()=>BLEND_HARDLIGHT,BLEND_LIGHTEN:()=>BLEND_LIGHTEN,BLEND_MULTIPLY:()=>BLEND_MULTIPLY,BLEND_OVERLAY:()=>BLEND_OVERLAY,BLEND_SCREEN:()=>BLEND_SCREEN,BLEND_SOURCE_OVER:()=>BLEND_SOURCE_OVER,EDGE_CROP:()=>EDGE_CROP,EDGE_EXTEND:()=>EDGE_EXTEND,EDGE_WRAP:()=>EDGE_WRAP,HORIZONTAL_ALIGN_CENTER:()=>HORIZONTAL_ALIGN_CENTER,HORIZONTAL_ALIGN_LEFT:()=>HORIZONTAL_ALIGN_LEFT,HORIZONTAL_ALIGN_RIGHT:()=>HORIZONTAL_ALIGN_RIGHT,VERTICAL_ALIGN_BOTTOM:()=>VERTICAL_ALIGN_BOTTOM,VERTICAL_ALIGN_MIDDLE:()=>VERTICAL_ALIGN_MIDDLE,VERTICAL_ALIGN_TOP:()=>VERTICAL_ALIGN_TOP});var init_constants3=__esm({\"../../node_modules/.pnpm/@jimp+core@0.22.12/node_modules/@jimp/core/es/constants.js\"(){init_globals(),AUTO=-1,HORIZONTAL_ALIGN_LEFT=1,HORIZONTAL_ALIGN_CENTER=2,HORIZONTAL_ALIGN_RIGHT=4,VERTICAL_ALIGN_TOP=8,VERTICAL_ALIGN_MIDDLE=16,VERTICAL_ALIGN_BOTTOM=32,BLEND_SOURCE_OVER=\"srcOver\",BLEND_DESTINATION_OVER=\"dstOver\",BLEND_MULTIPLY=\"multiply\",BLEND_ADD=\"add\",BLEND_SCREEN=\"screen\",BLEND_OVERLAY=\"overlay\",BLEND_DARKEN=\"darken\",BLEND_LIGHTEN=\"lighten\",BLEND_HARDLIGHT=\"hardLight\",BLEND_DIFFERENCE=\"difference\",BLEND_EXCLUSION=\"exclusion\",EDGE_EXTEND=1,EDGE_WRAP=2,EDGE_CROP=3}}),composite_modes_exports={};function srcOver(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;e.a*=r;const n=t.a+e.a-t.a*e.a;return{r:(e.r*e.a+t.r*t.a*(1-e.a))/n,g:(e.g*e.a+t.g*t.a*(1-e.a))/n,b:(e.b*e.a+t.b*t.a*(1-e.a))/n,a:n}}function dstOver(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;e.a*=r;const n=t.a+e.a-t.a*e.a;return{r:(t.r*t.a+e.r*e.a*(1-t.a))/n,g:(t.g*t.a+e.g*e.a*(1-t.a))/n,b:(t.b*t.a+e.b*e.a*(1-t.a))/n,a:n}}function multiply(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;e.a*=r;const n=t.a+e.a-t.a*e.a,i=e.r*e.a,o=e.g*e.a,a=e.b*e.a,s=t.r*t.a,l=t.g*t.a,u=t.b*t.a;return{r:(i*s+i*(1-t.a)+s*(1-e.a))/n,g:(o*l+o*(1-t.a)+l*(1-e.a))/n,b:(a*u+a*(1-t.a)+u*(1-e.a))/n,a:n}}function add(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;e.a*=r;const n=t.a+e.a-t.a*e.a,i=e.r*e.a,o=e.g*e.a,a=e.b*e.a;return{r:(i+t.r*t.a)/n,g:(o+t.g*t.a)/n,b:(a+t.b*t.a)/n,a:n}}function screen(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;e.a*=r;const n=t.a+e.a-t.a*e.a,i=e.r*e.a,o=e.g*e.a,a=e.b*e.a,s=t.r*t.a,l=t.g*t.a,u=t.b*t.a;return{r:(i*t.a+s*e.a-i*s+i*(1-t.a)+s*(1-e.a))/n,g:(o*t.a+l*e.a-o*l+o*(1-t.a)+l*(1-e.a))/n,b:(a*t.a+u*e.a-a*u+a*(1-t.a)+u*(1-e.a))/n,a:n}}function overlay(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;e.a*=r;const n=t.a+e.a-t.a*e.a,i=e.r*e.a,o=e.g*e.a,a=e.b*e.a,s=t.r*t.a,l=t.g*t.a,u=t.b*t.a;return{r:(2*s__left_angle_mark_=t.a?2*i*s+i*(1-t.a)+s*(1-e.a):i*(1+t.a)+s*(1+e.a)-2*s*i-t.a*e.a)/n,g:(2*l__left_angle_mark_=t.a?2*o*l+o*(1-t.a)+l*(1-e.a):o*(1+t.a)+l*(1+e.a)-2*l*o-t.a*e.a)/n,b:(2*u__left_angle_mark_=t.a?2*a*u+a*(1-t.a)+u*(1-e.a):a*(1+t.a)+u*(1+e.a)-2*u*a-t.a*e.a)/n,a:n}}function darken2(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;e.a*=r;const n=t.a+e.a-t.a*e.a,i=e.r*e.a,o=e.g*e.a,a=e.b*e.a,s=t.r*t.a,l=t.g*t.a,u=t.b*t.a;return{r:(Math.min(i*t.a,s*e.a)+i*(1-t.a)+s*(1-e.a))/n,g:(Math.min(o*t.a,l*e.a)+o*(1-t.a)+l*(1-e.a))/n,b:(Math.min(a*t.a,u*e.a)+a*(1-t.a)+u*(1-e.a))/n,a:n}}function lighten2(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;e.a*=r;const n=t.a+e.a-t.a*e.a,i=e.r*e.a,o=e.g*e.a,a=e.b*e.a,s=t.r*t.a,l=t.g*t.a,u=t.b*t.a;return{r:(Math.max(i*t.a,s*e.a)+i*(1-t.a)+s*(1-e.a))/n,g:(Math.max(o*t.a,l*e.a)+o*(1-t.a)+l*(1-e.a))/n,b:(Math.max(a*t.a,u*e.a)+a*(1-t.a)+u*(1-e.a))/n,a:n}}function hardLight(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;e.a*=r;const n=t.a+e.a-t.a*e.a,i=e.r*e.a,o=e.g*e.a,a=e.b*e.a,s=t.r*t.a,l=t.g*t.a,u=t.b*t.a;return{r:(2*i__left_angle_mark_=e.a?2*i*s+i*(1-t.a)+s*(1-e.a):i*(1+t.a)+s*(1+e.a)-2*s*i-t.a*e.a)/n,g:(2*o__left_angle_mark_=e.a?2*o*l+o*(1-t.a)+l*(1-e.a):o*(1+t.a)+l*(1+e.a)-2*l*o-t.a*e.a)/n,b:(2*a__left_angle_mark_=e.a?2*a*u+a*(1-t.a)+u*(1-e.a):a*(1+t.a)+u*(1+e.a)-2*u*a-t.a*e.a)/n,a:n}}function difference(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;e.a*=r;const n=t.a+e.a-t.a*e.a,i=e.r*e.a,o=e.g*e.a,a=e.b*e.a,s=t.r*t.a,l=t.g*t.a,u=t.b*t.a;return{r:(i+s-2*Math.min(i*t.a,s*e.a))/n,g:(o+l-2*Math.min(o*t.a,l*e.a))/n,b:(a+u-2*Math.min(a*t.a,u*e.a))/n,a:n}}function exclusion(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;e.a*=r;const n=t.a+e.a-t.a*e.a,i=e.r*e.a,o=e.g*e.a,a=e.b*e.a,s=t.r*t.a,l=t.g*t.a,u=t.b*t.a;return{r:(i*t.a+s*e.a-2*i*s+i*(1-t.a)+s*(1-e.a))/n,g:(o*t.a+l*e.a-2*o*l+o*(1-t.a)+l*(1-e.a))/n,b:(a*t.a+u*e.a-2*a*u+a*(1-t.a)+u*(1-e.a))/n,a:n}}__export(composite_modes_exports,{add:()=>add,darken:()=>darken2,difference:()=>difference,dstOver:()=>dstOver,exclusion:()=>exclusion,hardLight:()=>hardLight,lighten:()=>lighten2,multiply:()=>multiply,overlay:()=>overlay,screen:()=>screen,srcOver:()=>srcOver});var init_composite_modes=__esm({\"../../node_modules/.pnpm/@jimp+core@0.22.12/node_modules/@jimp/core/es/composite/composite-modes.js\"(){init_globals()}});function composite(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=arguments.length>4?arguments[4]:void 0;if(\"function\"==typeof n&&(i=n,n={}),!(e instanceof this.constructor))return throwError.call(this,\"The source must be a Jimp image\",i);if(\"number\"!=typeof t||\"number\"!=typeof r)return throwError.call(this,\"x and y must be numbers\",i);let{mode:o,opacitySource:a,opacityDest:s}=n;o||(o=BLEND_SOURCE_OVER),(\"number\"!=typeof a||a__left_angle_mark_0||a>1)&&(a=1),(\"number\"!=typeof s||s__left_angle_mark_0||s>1)&&(s=1);const l=composite_modes_exports[o];t=Math.round(t),r=Math.round(r);const u=this;return 1!==s&&u.opacity(s),e.scanQuiet(0,0,e.bitmap.width,e.bitmap.height,(function(e,n,i){const o=u.getPixelIndex(t+e,r+n,EDGE_CROP);if(-1===o)return;const s=l({r:this.bitmap.data[i+0]/255,g:this.bitmap.data[i+1]/255,b:this.bitmap.data[i+2]/255,a:this.bitmap.data[i+3]/255},{r:u.bitmap.data[o+0]/255,g:u.bitmap.data[o+1]/255,b:u.bitmap.data[o+2]/255,a:u.bitmap.data[o+3]/255},a);u.bitmap.data[o+0]=this.constructor.limit255(255*s.r),u.bitmap.data[o+1]=this.constructor.limit255(255*s.g),u.bitmap.data[o+2]=this.constructor.limit255(255*s.b),u.bitmap.data[o+3]=this.constructor.limit255(255*s.a)})),isNodePattern(i)&&i.call(this,null,this),this}var init_composite=__esm({\"../../node_modules/.pnpm/@jimp+core@0.22.12/node_modules/@jimp/core/es/composite/index.js\"(){init_globals(),init_es(),init_constants3(),init_composite_modes()}}),promisify,promisify_default,init_promisify=__esm({\"../../node_modules/.pnpm/@jimp+core@0.22.12/node_modules/@jimp/core/es/utils/promisify.js\"(){init_globals(),promisify=function(e,t){for(var r=arguments.length,n=new Array(r>2?r-2:0),i=2;i__left_angle_mark_r;i++)n[i-2]=arguments[i];return new Promise(((r,i)=>{n.push(((e,t)=>{e&&i(e),r(t)})),e.bind(t)(...n)}))},promisify_default=promisify}}),mimeTypes,findType,addType,getType,getExtension,init_mime=__esm({\"../../node_modules/.pnpm/@jimp+core@0.22.12/node_modules/@jimp/core/es/utils/mime.js\"(){init_globals(),mimeTypes={},findType=e=>Object.entries(mimeTypes).find((t=>t[1].includes(e)))||[],addType=(e,t)=>{mimeTypes[e]=t},getType=e=>{const t=e.split(\"/\").slice(-1),r=t[t.length-1].split(\".\").pop();return findType(r)[0]},getExtension=e=>(mimeTypes[e.toLowerCase()]||[])[0]}}),require_FsPromise=__commonJS({\"../../node_modules/.pnpm/strtok3@6.3.0/node_modules/strtok3/lib/FsPromise.js\"(e){init_globals(),Object.defineProperty(e,\"__esModule\",{value:!0}),e.readFile=e.writeFileSync=e.writeFile=e.read=e.open=e.close=e.stat=e.createReadStream=e.pathExists=void 0;var t=require_fs();e.pathExists=t.existsSync,e.createReadStream=t.createReadStream,e.stat=async function(e){return new Promise(((r,n)=>{t.stat(e,((e,t)=>{e?n(e):r(t)}))}))},e.close=async function(e){return new Promise(((r,n)=>{t.close(e,(e=>{e?n(e):r()}))}))},e.open=async function(e,r){return new Promise(((n,i)=>{t.open(e,r,((e,t)=>{e?i(e):n(t)}))}))},e.read=async function(e,r,n,i,o){return new Promise(((a,s)=>{t.read(e,r,n,i,o,((e,t,r)=>{e?s(e):a({bytesRead:t,buffer:r})}))}))},e.writeFile=async function(e,r){return new Promise(((n,i)=>{t.writeFile(e,r,(e=>{e?i(e):n()}))}))},e.writeFileSync=function(e,r){t.writeFileSync(e,r)},e.readFile=async function(e){return new Promise(((r,n)=>{t.readFile(e,((e,t)=>{e?n(e):r(t)}))}))}}}),require_EndOfFileStream=__commonJS({\"../../node_modules/.pnpm/peek-readable@4.1.0/node_modules/peek-readable/lib/EndOfFileStream.js\"(e){init_globals(),Object.defineProperty(e,\"__esModule\",{value:!0}),e.EndOfStreamError=e.defaultMessages=void 0,e.defaultMessages=\"End-Of-Stream\";var t=class extends Error{constructor(){super(e.defaultMessages)}};e.EndOfStreamError=t}}),require_Deferred=__commonJS({\"../../node_modules/.pnpm/peek-readable@4.1.0/node_modules/peek-readable/lib/Deferred.js\"(e){init_globals(),Object.defineProperty(e,\"__esModule\",{value:!0}),e.Deferred=void 0,e.Deferred=class{constructor(){this.resolve=()=>null,this.reject=()=>null,this.promise=new Promise(((e,t)=>{this.reject=t,this.resolve=e}))}}}}),require_StreamReader=__commonJS({\"../../node_modules/.pnpm/peek-readable@4.1.0/node_modules/peek-readable/lib/StreamReader.js\"(e){init_globals(),Object.defineProperty(e,\"__esModule\",{value:!0}),e.StreamReader=e.EndOfStreamError=void 0;var t=require_EndOfFileStream(),r=require_Deferred(),n=require_EndOfFileStream();Object.defineProperty(e,\"EndOfStreamError\",{enumerable:!0,get:function(){return n.EndOfStreamError}}),e.StreamReader=class{async peek(e,t,r){const n=await this.read(e,t,r);return this.peekQueue.push(e.subarray(t,t+n)),n}async read(e,r,n){if(0===n)return 0;if(0===this.peekQueue.length&&this.endOfStream)throw new t.EndOfStreamError;let i=n,o=0;for(;this.peekQueue.length>0&&i>0;){const t=this.peekQueue.pop();if(!t)throw new Error(\"peekData should be defined\");const n=Math.min(t.length,i);e.set(t.subarray(0,n),r+o),o+=n,i-=n,n__left_angle_mark_t.length&&this.peekQueue.push(t.subarray(n))}for(;i>0&&!this.endOfStream;){const t=Math.min(i,1048576),n=await this.readFromStream(e,r+o,t);if(o+=n,n__left_angle_mark_t)break;i-=n}return o}async readFromStream(e,t,n){const i=this.s.read(n);if(i)return e.set(i,t),i.length;{const i={buffer:e,offset:t,length:n,deferred:new r.Deferred};return this.deferred=i.deferred,this.s.once(\"readable\",(()=>{this.readDeferred(i)})),i.deferred.promise}}readDeferred(e){const t=this.s.read(e.length);t?(e.buffer.set(t,e.offset),e.deferred.resolve(t.length),this.deferred=null):this.s.once(\"readable\",(()=>{this.readDeferred(e)}))}reject(e){this.endOfStream=!0,this.deferred&&(this.deferred.reject(e),this.deferred=null)}constructor(e){if(this.s=e,this.deferred=null,this.endOfStream=!1,this.peekQueue=[],!e.read||!e.once)throw new Error(\"Expected an instance of stream.Readable\");this.s.once(\"end\",(()=>this.reject(new t.EndOfStreamError))),this.s.once(\"error\",(e=>this.reject(e))),this.s.once(\"close\",(()=>this.reject(new Error(\"Stream closed\"))))}}}}),require_lib3=__commonJS({\"../../node_modules/.pnpm/peek-readable@4.1.0/node_modules/peek-readable/lib/index.js\"(e){init_globals(),Object.defineProperty(e,\"__esModule\",{value:!0}),e.StreamReader=e.EndOfStreamError=void 0;var t=require_EndOfFileStream();Object.defineProperty(e,\"EndOfStreamError\",{enumerable:!0,get:function(){return t.EndOfStreamError}});var r=require_StreamReader();Object.defineProperty(e,\"StreamReader\",{enumerable:!0,get:function(){return r.StreamReader}})}}),require_AbstractTokenizer=__commonJS({\"../../node_modules/.pnpm/strtok3@6.3.0/node_modules/strtok3/lib/AbstractTokenizer.js\"(e){init_globals(),Object.defineProperty(e,\"__esModule\",{value:!0}),e.AbstractTokenizer=void 0;var t=require_lib3();e.AbstractTokenizer=class{async readToken(e,r=this.position){const n=Buffer.alloc(e.len);if(await this.readBuffer(n,{position:r})__left_angle_mark_e.len)throw new t.EndOfStreamError;return e.get(n,0)}async peekToken(e,r=this.position){const n=Buffer.alloc(e.len);if(await this.peekBuffer(n,{position:r})__left_angle_mark_e.len)throw new t.EndOfStreamError;return e.get(n,0)}async readNumber(e){if(await this.readBuffer(this.numBuffer,{length:e.len})__left_angle_mark_e.len)throw new t.EndOfStreamError;return e.get(this.numBuffer,0)}async peekNumber(e){if(await this.peekBuffer(this.numBuffer,{length:e.len})__left_angle_mark_e.len)throw new t.EndOfStreamError;return e.get(this.numBuffer,0)}async ignore(e){if(void 0!==this.fileInfo.size){const t=this.fileInfo.size-this.position;if(e>t)return this.position+=t,t}return this.position+=e,e}async close(){}normalizeOptions(e,t){if(t&&void 0!==t.position&&t.position__left_angle_mark_this.position)throw new Error(\"`options.position` must be equal or greater than `tokenizer.position`\");return t?{mayBeLess:!0===t.mayBeLess,offset:t.offset?t.offset:0,length:t.length?t.length:e.length-(t.offset?t.offset:0),position:t.position?t.position:this.position}:{mayBeLess:!1,offset:0,length:e.length,position:this.position}}constructor(e){this.position=0,this.numBuffer=new Uint8Array(8),this.fileInfo=e||{}}}}}),require_ReadStreamTokenizer=__commonJS({\"../../node_modules/.pnpm/strtok3@6.3.0/node_modules/strtok3/lib/ReadStreamTokenizer.js\"(e){init_globals(),Object.defineProperty(e,\"__esModule\",{value:!0}),e.ReadStreamTokenizer=void 0;var t=require_AbstractTokenizer(),r=require_lib3(),n=class extends t.AbstractTokenizer{async getFileInfo(){return this.fileInfo}async readBuffer(e,t){const n=this.normalizeOptions(e,t),i=n.position-this.position;if(i>0)return await this.ignore(i),this.readBuffer(e,t);if(i__left_angle_mark_0)throw new Error(\"`options.position` must be equal or greater than `tokenizer.position`\");if(0===n.length)return 0;const o=await this.streamReader.read(e,n.offset,n.length);if(this.position+=o,(!t||!t.mayBeLess)&&o__left_angle_mark_n.length)throw new r.EndOfStreamError;return o}async peekBuffer(e,t){const n=this.normalizeOptions(e,t);let i=0;if(n.position){const t=n.position-this.position;if(t>0){const r=new Uint8Array(n.length+t);return i=await this.peekBuffer(r,{mayBeLess:n.mayBeLess}),e.set(r.subarray(t),n.offset),i-t}if(t__left_angle_mark_0)throw new Error(\"Cannot peek from a negative offset in a stream\")}if(n.length>0){try{i=await this.streamReader.peek(e,n.offset,n.length)}catch(o){if(t&&t.mayBeLess&&o instanceof r.EndOfStreamError)return 0;throw o}if(!n.mayBeLess&&i__left_angle_mark_n.length)throw new r.EndOfStreamError}return i}async ignore(e){const t=Math.min(256e3,e),r=new Uint8Array(t);let n=0;for(;n__left_angle_mark_e;){const i=e-n,o=await this.readBuffer(r,{length:Math.min(t,i)});if(o__left_angle_mark_0)return o;n+=o}return n}constructor(e,t){super(t),this.streamReader=new r.StreamReader(e)}};e.ReadStreamTokenizer=n}}),require_BufferTokenizer=__commonJS({\"../../node_modules/.pnpm/strtok3@6.3.0/node_modules/strtok3/lib/BufferTokenizer.js\"(e){init_globals(),Object.defineProperty(e,\"__esModule\",{value:!0}),e.BufferTokenizer=void 0;var t=require_lib3(),r=require_AbstractTokenizer(),n=class extends r.AbstractTokenizer{async readBuffer(e,t){if(t&&t.position){if(t.position__left_angle_mark_this.position)throw new Error(\"`options.position` must be equal or greater than `tokenizer.position`\");this.position=t.position}const r=await this.peekBuffer(e,t);return this.position+=r,r}async peekBuffer(e,r){const n=this.normalizeOptions(e,r),i=Math.min(this.uint8Array.length-n.position,n.length);if(!n.mayBeLess&&i__left_angle_mark_n.length)throw new t.EndOfStreamError;return e.set(this.uint8Array.subarray(n.position,n.position+i),n.offset),i}async close(){}constructor(e,t){super(t),this.uint8Array=e,this.fileInfo.size=this.fileInfo.size?this.fileInfo.size:e.length}};e.BufferTokenizer=n}}),require_core3=__commonJS({\"../../node_modules/.pnpm/strtok3@6.3.0/node_modules/strtok3/lib/core.js\"(e){init_globals(),Object.defineProperty(e,\"__esModule\",{value:!0}),e.fromBuffer=e.fromStream=e.EndOfStreamError=void 0;var t=require_ReadStreamTokenizer(),r=require_BufferTokenizer(),n=require_lib3();Object.defineProperty(e,\"EndOfStreamError\",{enumerable:!0,get:function(){return n.EndOfStreamError}}),e.fromStream=function(e,r){return r=r||{},new t.ReadStreamTokenizer(e,r)},e.fromBuffer=function(e,t){return new r.BufferTokenizer(e,t)}}}),require_FileTokenizer=__commonJS({\"../../node_modules/.pnpm/strtok3@6.3.0/node_modules/strtok3/lib/FileTokenizer.js\"(e){init_globals(),Object.defineProperty(e,\"__esModule\",{value:!0}),e.fromFile=e.FileTokenizer=void 0;var t=require_AbstractTokenizer(),r=require_lib3(),n=require_FsPromise(),i=class extends t.AbstractTokenizer{async readBuffer(e,t){const i=this.normalizeOptions(e,t);this.position=i.position;const o=await n.read(this.fd,e,i.offset,i.length,i.position);if(this.position+=o.bytesRead,o.bytesRead__left_angle_mark_i.length&&(!t||!t.mayBeLess))throw new r.EndOfStreamError;return o.bytesRead}async peekBuffer(e,t){const i=this.normalizeOptions(e,t),o=await n.read(this.fd,e,i.offset,i.length,i.position);if(!i.mayBeLess&&o.bytesRead__left_angle_mark_i.length)throw new r.EndOfStreamError;return o.bytesRead}async close(){return n.close(this.fd)}constructor(e,t){super(t),this.fd=e}};e.FileTokenizer=i,e.fromFile=async function(e){const t=await n.stat(e);if(!t.isFile)throw new Error(`File not a file: ${e}`);const r=await n.open(e,\"r\");return new i(r,{path:e,size:t.size})}}}),require_lib4=__commonJS({\"../../node_modules/.pnpm/strtok3@6.3.0/node_modules/strtok3/lib/index.js\"(e){init_globals(),Object.defineProperty(e,\"__esModule\",{value:!0}),e.fromStream=e.fromBuffer=e.EndOfStreamError=e.fromFile=void 0;var t=require_FsPromise(),r=require_core3(),n=require_FileTokenizer();Object.defineProperty(e,\"fromFile\",{enumerable:!0,get:function(){return n.fromFile}});var i=require_core3();Object.defineProperty(e,\"EndOfStreamError\",{enumerable:!0,get:function(){return i.EndOfStreamError}}),Object.defineProperty(e,\"fromBuffer\",{enumerable:!0,get:function(){return i.fromBuffer}}),e.fromStream=async function(e,n){if(n=n||{},e.path){const r=await t.stat(e.path);n.path=e.path,n.size=r.size}return r.fromStream(e,n)}}}),require_lib5=__commonJS({\"../../node_modules/.pnpm/token-types@4.2.1/node_modules/token-types/lib/index.js\"(e){init_globals(),Object.defineProperty(e,\"__esModule\",{value:!0}),e.AnsiStringType=e.StringType=e.BufferType=e.Uint8ArrayType=e.IgnoreType=e.Float80_LE=e.Float80_BE=e.Float64_LE=e.Float64_BE=e.Float32_LE=e.Float32_BE=e.Float16_LE=e.Float16_BE=e.INT64_BE=e.UINT64_BE=e.INT64_LE=e.UINT64_LE=e.INT32_LE=e.INT32_BE=e.INT24_BE=e.INT24_LE=e.INT16_LE=e.INT16_BE=e.INT8=e.UINT32_BE=e.UINT32_LE=e.UINT24_BE=e.UINT24_LE=e.UINT16_BE=e.UINT16_LE=e.UINT8=void 0;var t=require_ieee754();function r(e){return new DataView(e.buffer,e.byteOffset)}e.UINT8={len:1,get:(e,t)=>r(e).getUint8(t),put:(e,t,n)=>(r(e).setUint8(t,n),t+1)},e.UINT16_LE={len:2,get:(e,t)=>r(e).getUint16(t,!0),put:(e,t,n)=>(r(e).setUint16(t,n,!0),t+2)},e.UINT16_BE={len:2,get:(e,t)=>r(e).getUint16(t),put:(e,t,n)=>(r(e).setUint16(t,n),t+2)},e.UINT24_LE={len:3,get(e,t){const n=r(e);return n.getUint8(t)+(n.getUint16(t+1,!0)__left_angle_mark___left_angle_mark_8)},put(e,t,n){const i=r(e);return i.setUint8(t,255&n),i.setUint16(t+1,n>>8,!0),t+3}},e.UINT24_BE={len:3,get(e,t){const n=r(e);return(n.getUint16(t)__left_angle_mark___left_angle_mark_8)+n.getUint8(t+2)},put(e,t,n){const i=r(e);return i.setUint16(t,n>>8),i.setUint8(t+2,255&n),t+3}},e.UINT32_LE={len:4,get:(e,t)=>r(e).getUint32(t,!0),put:(e,t,n)=>(r(e).setUint32(t,n,!0),t+4)},e.UINT32_BE={len:4,get:(e,t)=>r(e).getUint32(t),put:(e,t,n)=>(r(e).setUint32(t,n),t+4)},e.INT8={len:1,get:(e,t)=>r(e).getInt8(t),put:(e,t,n)=>(r(e).setInt8(t,n),t+1)},e.INT16_BE={len:2,get:(e,t)=>r(e).getInt16(t),put:(e,t,n)=>(r(e).setInt16(t,n),t+2)},e.INT16_LE={len:2,get:(e,t)=>r(e).getInt16(t,!0),put:(e,t,n)=>(r(e).setInt16(t,n,!0),t+2)},e.INT24_LE={len:3,get(t,r){const n=e.UINT24_LE.get(t,r);return n>8388607?n-16777216:n},put(e,t,n){const i=r(e);return i.setUint8(t,255&n),i.setUint16(t+1,n>>8,!0),t+3}},e.INT24_BE={len:3,get(t,r){const n=e.UINT24_BE.get(t,r);return n>8388607?n-16777216:n},put(e,t,n){const i=r(e);return i.setUint16(t,n>>8),i.setUint8(t+2,255&n),t+3}},e.INT32_BE={len:4,get:(e,t)=>r(e).getInt32(t),put:(e,t,n)=>(r(e).setInt32(t,n),t+4)},e.INT32_LE={len:4,get:(e,t)=>r(e).getInt32(t,!0),put:(e,t,n)=>(r(e).setInt32(t,n,!0),t+4)},e.UINT64_LE={len:8,get:(e,t)=>r(e).getBigUint64(t,!0),put:(e,t,n)=>(r(e).setBigUint64(t,n,!0),t+8)},e.INT64_LE={len:8,get:(e,t)=>r(e).getBigInt64(t,!0),put:(e,t,n)=>(r(e).setBigInt64(t,n,!0),t+8)},e.UINT64_BE={len:8,get:(e,t)=>r(e).getBigUint64(t),put:(e,t,n)=>(r(e).setBigUint64(t,n),t+8)},e.INT64_BE={len:8,get:(e,t)=>r(e).getBigInt64(t),put:(e,t,n)=>(r(e).setBigInt64(t,n),t+8)},e.Float16_BE={len:2,get(e,r){return t.read(e,r,!1,10,this.len)},put(e,r,n){return t.write(e,n,r,!1,10,this.len),r+this.len}},e.Float16_LE={len:2,get(e,r){return t.read(e,r,!0,10,this.len)},put(e,r,n){return t.write(e,n,r,!0,10,this.len),r+this.len}},e.Float32_BE={len:4,get:(e,t)=>r(e).getFloat32(t),put:(e,t,n)=>(r(e).setFloat32(t,n),t+4)},e.Float32_LE={len:4,get:(e,t)=>r(e).getFloat32(t,!0),put:(e,t,n)=>(r(e).setFloat32(t,n,!0),t+4)},e.Float64_BE={len:8,get:(e,t)=>r(e).getFloat64(t),put:(e,t,n)=>(r(e).setFloat64(t,n),t+8)},e.Float64_LE={len:8,get:(e,t)=>r(e).getFloat64(t,!0),put:(e,t,n)=>(r(e).setFloat64(t,n,!0),t+8)},e.Float80_BE={len:10,get(e,r){return t.read(e,r,!1,63,this.len)},put(e,r,n){return t.write(e,n,r,!1,63,this.len),r+this.len}},e.Float80_LE={len:10,get(e,r){return t.read(e,r,!0,63,this.len)},put(e,r,n){return t.write(e,n,r,!0,63,this.len),r+this.len}},e.IgnoreType=class{get(e,t){}constructor(e){this.len=e}},e.Uint8ArrayType=class{get(e,t){return e.subarray(t,t+this.len)}constructor(e){this.len=e}},e.BufferType=class{get(e,t){return Buffer.from(e.subarray(t,t+this.len))}constructor(e){this.len=e}},e.StringType=class{get(e,t){return Buffer.from(e).toString(this.encoding,t,t+this.len)}constructor(e,t){this.len=e,this.encoding=t}};var n=class e{static decode(t,r,n){let i=\"\";for(let o=r;o__left_angle_mark_n;++o)i+=e.codePointToString(e.singleByteDecoder(t[o]));return i}static inRange(e,t,r){return t__left_angle_mark_=e&&e__left_angle_mark_=r}static codePointToString(e){return e__left_angle_mark_=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10),56320+(1023&e)))}static singleByteDecoder(t){if(e.inRange(t,0,127))return t;const r=e.windows1252[t-128];if(null===r)throw Error(\"invaliding encoding\");return r}get(t,r=0){return e.decode(t,r,r+this.len)}constructor(e){this.len=e}};e.AnsiStringType=n,n.windows1252=[8364,129,8218,402,8222,8230,8224,8225,710,8240,352,8249,338,141,381,143,144,8216,8217,8220,8221,8226,8211,8212,732,8482,353,8250,339,157,382,376,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255]}}),require_util4=__commonJS({\"../../node_modules/.pnpm/file-type@16.5.4/node_modules/file-type/util.js\"(e){init_globals(),e.stringToBytes=e=>[...e].map((e=>e.charCodeAt(0))),e.tarHeaderChecksumMatches=(e,t=0)=>{const r=parseInt(e.toString(\"utf8\",148,154).replace(/\\0.*$/,\"\").trim(),8);if(isNaN(r))return!1;let n=256;for(let i=t;i__left_angle_mark_t+148;i++)n+=e[i];for(let i=t+156;i__left_angle_mark_t+512;i++)n+=e[i];return r===n},e.uint32SyncSafeToken={get:(e,t)=>127&e[t+3]|e[t+2]__left_angle_mark___left_angle_mark_7|e[t+1]__left_angle_mark___left_angle_mark_14|e[t]__left_angle_mark___left_angle_mark_21,len:4}}}),require_supported=__commonJS({\"../../node_modules/.pnpm/file-type@16.5.4/node_modules/file-type/supported.js\"(e,t){init_globals(),t.exports={extensions:[\"jpg\",\"png\",\"apng\",\"gif\",\"webp\",\"flif\",\"xcf\",\"cr2\",\"cr3\",\"orf\",\"arw\",\"dng\",\"nef\",\"rw2\",\"raf\",\"tif\",\"bmp\",\"icns\",\"jxr\",\"psd\",\"indd\",\"zip\",\"tar\",\"rar\",\"gz\",\"bz2\",\"7z\",\"dmg\",\"mp4\",\"mid\",\"mkv\",\"webm\",\"mov\",\"avi\",\"mpg\",\"mp2\",\"mp3\",\"m4a\",\"oga\",\"ogg\",\"ogv\",\"opus\",\"flac\",\"wav\",\"spx\",\"amr\",\"pdf\",\"epub\",\"exe\",\"swf\",\"rtf\",\"wasm\",\"woff\",\"woff2\",\"eot\",\"ttf\",\"otf\",\"ico\",\"flv\",\"ps\",\"xz\",\"sqlite\",\"nes\",\"crx\",\"xpi\",\"cab\",\"deb\",\"ar\",\"rpm\",\"Z\",\"lz\",\"cfb\",\"mxf\",\"mts\",\"blend\",\"bpg\",\"docx\",\"pptx\",\"xlsx\",\"3gp\",\"3g2\",\"jp2\",\"jpm\",\"jpx\",\"mj2\",\"aif\",\"qcp\",\"odt\",\"ods\",\"odp\",\"xml\",\"mobi\",\"heic\",\"cur\",\"ktx\",\"ape\",\"wv\",\"dcm\",\"ics\",\"glb\",\"pcap\",\"dsf\",\"lnk\",\"alias\",\"voc\",\"ac3\",\"m4v\",\"m4p\",\"m4b\",\"f4v\",\"f4p\",\"f4b\",\"f4a\",\"mie\",\"asf\",\"ogm\",\"ogx\",\"mpc\",\"arrow\",\"shp\",\"aac\",\"mp1\",\"it\",\"s3m\",\"xm\",\"ai\",\"skp\",\"avif\",\"eps\",\"lzh\",\"pgp\",\"asar\",\"stl\",\"chm\",\"3mf\",\"zst\",\"jxl\",\"vcf\"],mimeTypes:[\"image/jpeg\",\"image/png\",\"image/gif\",\"image/webp\",\"image/flif\",\"image/x-xcf\",\"image/x-canon-cr2\",\"image/x-canon-cr3\",\"image/tiff\",\"image/bmp\",\"image/vnd.ms-photo\",\"image/vnd.adobe.photoshop\",\"application/x-indesign\",\"application/epub+zip\",\"application/x-xpinstall\",\"application/vnd.oasis.opendocument.text\",\"application/vnd.oasis.opendocument.spreadsheet\",\"application/vnd.oasis.opendocument.presentation\",\"application/vnd.openxmlformats-officedocument.wordprocessingml.document\",\"application/vnd.openxmlformats-officedocument.presentationml.presentation\",\"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\",\"application/zip\",\"application/x-tar\",\"application/x-rar-compressed\",\"application/gzip\",\"application/x-bzip2\",\"application/x-7z-compressed\",\"application/x-apple-diskimage\",\"application/x-apache-arrow\",\"video/mp4\",\"audio/midi\",\"video/x-matroska\",\"video/webm\",\"video/quicktime\",\"video/vnd.avi\",\"audio/vnd.wave\",\"audio/qcelp\",\"audio/x-ms-asf\",\"video/x-ms-asf\",\"application/vnd.ms-asf\",\"video/mpeg\",\"video/3gpp\",\"audio/mpeg\",\"audio/mp4\",\"audio/opus\",\"video/ogg\",\"audio/ogg\",\"application/ogg\",\"audio/x-flac\",\"audio/ape\",\"audio/wavpack\",\"audio/amr\",\"application/pdf\",\"application/x-msdownload\",\"application/x-shockwave-flash\",\"application/rtf\",\"application/wasm\",\"font/woff\",\"font/woff2\",\"application/vnd.ms-fontobject\",\"font/ttf\",\"font/otf\",\"image/x-icon\",\"video/x-flv\",\"application/postscript\",\"application/eps\",\"application/x-xz\",\"application/x-sqlite3\",\"application/x-nintendo-nes-rom\",\"application/x-google-chrome-extension\",\"application/vnd.ms-cab-compressed\",\"application/x-deb\",\"application/x-unix-archive\",\"application/x-rpm\",\"application/x-compress\",\"application/x-lzip\",\"application/x-cfb\",\"application/x-mie\",\"application/mxf\",\"video/mp2t\",\"application/x-blender\",\"image/bpg\",\"image/jp2\",\"image/jpx\",\"image/jpm\",\"image/mj2\",\"audio/aiff\",\"application/xml\",\"application/x-mobipocket-ebook\",\"image/heif\",\"image/heif-sequence\",\"image/heic\",\"image/heic-sequence\",\"image/icns\",\"image/ktx\",\"application/dicom\",\"audio/x-musepack\",\"text/calendar\",\"text/vcard\",\"model/gltf-binary\",\"application/vnd.tcpdump.pcap\",\"audio/x-dsf\",\"application/x.ms.shortcut\",\"application/x.apple.alias\",\"audio/x-voc\",\"audio/vnd.dolby.dd-raw\",\"audio/x-m4a\",\"image/apng\",\"image/x-olympus-orf\",\"image/x-sony-arw\",\"image/x-adobe-dng\",\"image/x-nikon-nef\",\"image/x-panasonic-rw2\",\"image/x-fujifilm-raf\",\"video/x-m4v\",\"video/3gpp2\",\"application/x-esri-shape\",\"audio/aac\",\"audio/x-it\",\"audio/x-s3m\",\"audio/x-xm\",\"video/MP1S\",\"video/MP2P\",\"application/vnd.sketchup.skp\",\"image/avif\",\"application/x-lzh-compressed\",\"application/pgp-encrypted\",\"application/x-asar\",\"model/stl\",\"application/vnd.ms-htmlhelp\",\"model/3mf\",\"image/jxl\",\"application/zstd\"]}}}),require_core4=__commonJS({\"../../node_modules/.pnpm/file-type@16.5.4/node_modules/file-type/core.js\"(exports,module){init_globals();var Token=require_lib5(),strtok3=require_core3(),{stringToBytes:stringToBytes,tarHeaderChecksumMatches:tarHeaderChecksumMatches,uint32SyncSafeToken:uint32SyncSafeToken}=require_util4(),supported=require_supported(),minimumBytes=4100;async function fromStream(e){const t=await strtok3.fromStream(e);try{return await fromTokenizer(t)}finally{await t.close()}}async function fromBuffer(e){if(!(e instanceof Uint8Array||e instanceof ArrayBuffer||Buffer.isBuffer(e)))throw new TypeError(`Expected the \\`input\\` argument to be of type \\`Uint8Array\\` or \\`Buffer\\` or \\`ArrayBuffer\\`, got \\`${typeof e}\\``);const t=e instanceof Buffer?e:Buffer.from(e);if(t&&t.length>1)return fromTokenizer(strtok3.fromBuffer(t))}function _check(e,t,r){r={offset:0,...r};for(const[n,i]of t.entries())if(r.mask){if(i!==(r.mask[n]&e[n+r.offset]))return!1}else if(i!==e[n+r.offset])return!1;return!0}async function fromTokenizer(e){try{return _fromTokenizer(e)}catch(t){if(!(t instanceof strtok3.EndOfStreamError))throw t}}async function _fromTokenizer(e){let t=Buffer.alloc(minimumBytes);const r=(e,r)=>_check(t,e,r),n=(e,t)=>r(stringToBytes(e),t);if(e.fileInfo.size||(e.fileInfo.size=Number.MAX_SAFE_INTEGER),await e.peekBuffer(t,{length:12,mayBeLess:!0}),r([66,77]))return{ext:\"bmp\",mime:\"image/bmp\"};if(r([11,119]))return{ext:\"ac3\",mime:\"audio/vnd.dolby.dd-raw\"};if(r([120,1]))return{ext:\"dmg\",mime:\"application/x-apple-diskimage\"};if(r([77,90]))return{ext:\"exe\",mime:\"application/x-msdownload\"};if(r([37,33]))return await e.peekBuffer(t,{length:24,mayBeLess:!0}),n(\"PS-Adobe-\",{offset:2})&&n(\" EPSF-\",{offset:14})?{ext:\"eps\",mime:\"application/eps\"}:{ext:\"ps\",mime:\"application/postscript\"};if(r([31,160])||r([31,157]))return{ext:\"Z\",mime:\"application/x-compress\"};if(r([255,216,255]))return{ext:\"jpg\",mime:\"image/jpeg\"};if(r([73,73,188]))return{ext:\"jxr\",mime:\"image/vnd.ms-photo\"};if(r([31,139,8]))return{ext:\"gz\",mime:\"application/gzip\"};if(r([66,90,104]))return{ext:\"bz2\",mime:\"application/x-bzip2\"};if(n(\"ID3\")){await e.ignore(6);const a=await e.readToken(uint32SyncSafeToken);return e.position+a>e.fileInfo.size?{ext:\"mp3\",mime:\"audio/mpeg\"}:(await e.ignore(a),fromTokenizer(e))}if(n(\"MP+\"))return{ext:\"mpc\",mime:\"audio/x-musepack\"};if((67===t[0]||70===t[0])&&r([87,83],{offset:1}))return{ext:\"swf\",mime:\"application/x-shockwave-flash\"};if(r([71,73,70]))return{ext:\"gif\",mime:\"image/gif\"};if(n(\"FLIF\"))return{ext:\"flif\",mime:\"image/flif\"};if(n(\"8BPS\"))return{ext:\"psd\",mime:\"image/vnd.adobe.photoshop\"};if(n(\"WEBP\",{offset:8}))return{ext:\"webp\",mime:\"image/webp\"};if(n(\"MPCK\"))return{ext:\"mpc\",mime:\"audio/x-musepack\"};if(n(\"FORM\"))return{ext:\"aif\",mime:\"audio/aiff\"};if(n(\"icns\",{offset:0}))return{ext:\"icns\",mime:\"image/icns\"};if(r([80,75,3,4])){try{for(;e.position+30__left_angle_mark_e.fileInfo.size;){await e.readBuffer(t,{length:30});const s={compressedSize:t.readUInt32LE(18),uncompressedSize:t.readUInt32LE(22),filenameLength:t.readUInt16LE(26),extraFieldLength:t.readUInt16LE(28)};if(s.filename=await e.readToken(new Token.StringType(s.filenameLength,\"utf-8\")),await e.ignore(s.extraFieldLength),\"META-INF/mozilla.rsa\"===s.filename)return{ext:\"xpi\",mime:\"application/x-xpinstall\"};if(s.filename.endsWith(\".rels\")||s.filename.endsWith(\".xml\"))switch(s.filename.split(\"/\")[0]){case\"_rels\":default:break;case\"word\":return{ext:\"docx\",mime:\"application/vnd.openxmlformats-officedocument.wordprocessingml.document\"};case\"ppt\":return{ext:\"pptx\",mime:\"application/vnd.openxmlformats-officedocument.presentationml.presentation\"};case\"xl\":return{ext:\"xlsx\",mime:\"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\"}}if(s.filename.startsWith(\"xl/\"))return{ext:\"xlsx\",mime:\"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\"};if(s.filename.startsWith(\"3D/\")&&s.filename.endsWith(\".model\"))return{ext:\"3mf\",mime:\"model/3mf\"};if(\"mimetype\"===s.filename&&s.compressedSize===s.uncompressedSize)switch(await e.readToken(new Token.StringType(s.compressedSize,\"utf-8\"))){case\"application/epub+zip\":return{ext:\"epub\",mime:\"application/epub+zip\"};case\"application/vnd.oasis.opendocument.text\":return{ext:\"odt\",mime:\"application/vnd.oasis.opendocument.text\"};case\"application/vnd.oasis.opendocument.spreadsheet\":return{ext:\"ods\",mime:\"application/vnd.oasis.opendocument.spreadsheet\"};case\"application/vnd.oasis.opendocument.presentation\":return{ext:\"odp\",mime:\"application/vnd.oasis.opendocument.presentation\"}}if(0===s.compressedSize){let l=-1;for(;l__left_angle_mark_0&&e.position__left_angle_mark_e.fileInfo.size;)await e.peekBuffer(t,{mayBeLess:!0}),l=t.indexOf(\"504B0304\",0,\"hex\"),await e.ignore(l>=0?l:t.length)}else await e.ignore(s.compressedSize)}}catch(i){if(!(i instanceof strtok3.EndOfStreamError))throw i}return{ext:\"zip\",mime:\"application/zip\"}}if(n(\"OggS\")){await e.ignore(28);const u=Buffer.alloc(8);return await e.readBuffer(u),_check(u,[79,112,117,115,72,101,97,100])?{ext:\"opus\",mime:\"audio/opus\"}:_check(u,[128,116,104,101,111,114,97])?{ext:\"ogv\",mime:\"video/ogg\"}:_check(u,[1,118,105,100,101,111,0])?{ext:\"ogm\",mime:\"video/ogg\"}:_check(u,[127,70,76,65,67])?{ext:\"oga\",mime:\"audio/ogg\"}:_check(u,[83,112,101,101,120,32,32])?{ext:\"spx\",mime:\"audio/ogg\"}:_check(u,[1,118,111,114,98,105,115])?{ext:\"ogg\",mime:\"audio/ogg\"}:{ext:\"ogx\",mime:\"application/ogg\"}}if(r([80,75])&&(3===t[2]||5===t[2]||7===t[2])&&(4===t[3]||6===t[3]||8===t[3]))return{ext:\"zip\",mime:\"application/zip\"};if(n(\"ftyp\",{offset:4})&&96&t[8]){const c=t.toString(\"binary\",8,12).replace(\"\\0\",\" \").trim();switch(c){case\"avif\":return{ext:\"avif\",mime:\"image/avif\"};case\"mif1\":return{ext:\"heic\",mime:\"image/heif\"};case\"msf1\":return{ext:\"heic\",mime:\"image/heif-sequence\"};case\"heic\":case\"heix\":return{ext:\"heic\",mime:\"image/heic\"};case\"hevc\":case\"hevx\":return{ext:\"heic\",mime:\"image/heic-sequence\"};case\"qt\":return{ext:\"mov\",mime:\"video/quicktime\"};case\"M4V\":case\"M4VH\":case\"M4VP\":return{ext:\"m4v\",mime:\"video/x-m4v\"};case\"M4P\":return{ext:\"m4p\",mime:\"video/mp4\"};case\"M4B\":return{ext:\"m4b\",mime:\"audio/mp4\"};case\"M4A\":return{ext:\"m4a\",mime:\"audio/x-m4a\"};case\"F4V\":return{ext:\"f4v\",mime:\"video/mp4\"};case\"F4P\":return{ext:\"f4p\",mime:\"video/mp4\"};case\"F4A\":return{ext:\"f4a\",mime:\"audio/mp4\"};case\"F4B\":return{ext:\"f4b\",mime:\"audio/mp4\"};case\"crx\":return{ext:\"cr3\",mime:\"image/x-canon-cr3\"};default:return c.startsWith(\"3g\")?c.startsWith(\"3g2\")?{ext:\"3g2\",mime:\"video/3gpp2\"}:{ext:\"3gp\",mime:\"video/3gpp\"}:{ext:\"mp4\",mime:\"video/mp4\"}}}if(n(\"MThd\"))return{ext:\"mid\",mime:\"audio/midi\"};if(n(\"wOFF\")&&(r([0,1,0,0],{offset:4})||n(\"OTTO\",{offset:4})))return{ext:\"woff\",mime:\"font/woff\"};if(n(\"wOF2\")&&(r([0,1,0,0],{offset:4})||n(\"OTTO\",{offset:4})))return{ext:\"woff2\",mime:\"font/woff2\"};if(r([212,195,178,161])||r([161,178,195,212]))return{ext:\"pcap\",mime:\"application/vnd.tcpdump.pcap\"};if(n(\"DSD \"))return{ext:\"dsf\",mime:\"audio/x-dsf\"};if(n(\"LZIP\"))return{ext:\"lz\",mime:\"application/x-lzip\"};if(n(\"fLaC\"))return{ext:\"flac\",mime:\"audio/x-flac\"};if(r([66,80,71,251]))return{ext:\"bpg\",mime:\"image/bpg\"};if(n(\"wvpk\"))return{ext:\"wv\",mime:\"audio/wavpack\"};if(n(\"%PDF\")){await e.ignore(1350);const d=10485760,h=Buffer.alloc(Math.min(d,e.fileInfo.size));return await e.readBuffer(h,{mayBeLess:!0}),h.includes(Buffer.from(\"AIPrivateData\"))?{ext:\"ai\",mime:\"application/postscript\"}:{ext:\"pdf\",mime:\"application/pdf\"}}if(r([0,97,115,109]))return{ext:\"wasm\",mime:\"application/wasm\"};if(r([73,73,42,0]))return n(\"CR\",{offset:8})?{ext:\"cr2\",mime:\"image/x-canon-cr2\"}:r([28,0,254,0],{offset:8})||r([31,0,11,0],{offset:8})?{ext:\"nef\",mime:\"image/x-nikon-nef\"}:r([8,0,0,0],{offset:4})&&(r([45,0,254,0],{offset:8})||r([39,0,254,0],{offset:8}))?{ext:\"dng\",mime:\"image/x-adobe-dng\"}:(t=Buffer.alloc(24),await e.peekBuffer(t),(r([16,251,134,1],{offset:4})||r([8,0,0,0],{offset:4}))&&r([0,254,0,4,0,1,0,0,0,1,0,0,0,3,1],{offset:9})?{ext:\"arw\",mime:\"image/x-sony-arw\"}:{ext:\"tif\",mime:\"image/tiff\"});if(r([77,77,0,42]))return{ext:\"tif\",mime:\"image/tiff\"};if(n(\"MAC \"))return{ext:\"ape\",mime:\"audio/ape\"};if(r([26,69,223,163])){async function f(){const t=await e.peekNumber(Token.UINT8);let r=128,n=0;for(;!(t&r)&&0!==r;)++n,r>>=1;const i=Buffer.alloc(n+1);return await e.readBuffer(i),i}async function p(){const e=await f(),t=await f();t[0]^=128>>t.length-1;const r=Math.min(6,t.length);return{id:e.readUIntBE(0,e.length),len:t.readUIntBE(t.length-r,r)}}async function m(t,r){for(;r>0;){const t=await p();if(17026===t.id)return e.readToken(new Token.StringType(t.len,\"utf-8\"));await e.ignore(t.len),--r}}const g=await p();switch(await m(0,g.len)){case\"webm\":return{ext:\"webm\",mime:\"video/webm\"};case\"matroska\":return{ext:\"mkv\",mime:\"video/x-matroska\"};default:return}}if(r([82,73,70,70])){if(r([65,86,73],{offset:8}))return{ext:\"avi\",mime:\"video/vnd.avi\"};if(r([87,65,86,69],{offset:8}))return{ext:\"wav\",mime:\"audio/vnd.wave\"};if(r([81,76,67,77],{offset:8}))return{ext:\"qcp\",mime:\"audio/qcelp\"}}if(n(\"SQLi\"))return{ext:\"sqlite\",mime:\"application/x-sqlite3\"};if(r([78,69,83,26]))return{ext:\"nes\",mime:\"application/x-nintendo-nes-rom\"};if(n(\"Cr24\"))return{ext:\"crx\",mime:\"application/x-google-chrome-extension\"};if(n(\"MSCF\")||n(\"ISc(\"))return{ext:\"cab\",mime:\"application/vnd.ms-cab-compressed\"};if(r([237,171,238,219]))return{ext:\"rpm\",mime:\"application/x-rpm\"};if(r([197,208,211,198]))return{ext:\"eps\",mime:\"application/eps\"};if(r([40,181,47,253]))return{ext:\"zst\",mime:\"application/zstd\"};if(r([79,84,84,79,0]))return{ext:\"otf\",mime:\"font/otf\"};if(n(\"#!AMR\"))return{ext:\"amr\",mime:\"audio/amr\"};if(n(\"{\\\\rtf\"))return{ext:\"rtf\",mime:\"application/rtf\"};if(r([70,76,86,1]))return{ext:\"flv\",mime:\"video/x-flv\"};if(n(\"IMPM\"))return{ext:\"it\",mime:\"audio/x-it\"};if(n(\"-lh0-\",{offset:2})||n(\"-lh1-\",{offset:2})||n(\"-lh2-\",{offset:2})||n(\"-lh3-\",{offset:2})||n(\"-lh4-\",{offset:2})||n(\"-lh5-\",{offset:2})||n(\"-lh6-\",{offset:2})||n(\"-lh7-\",{offset:2})||n(\"-lzs-\",{offset:2})||n(\"-lz4-\",{offset:2})||n(\"-lz5-\",{offset:2})||n(\"-lhd-\",{offset:2}))return{ext:\"lzh\",mime:\"application/x-lzh-compressed\"};if(r([0,0,1,186])){if(r([33],{offset:4,mask:[241]}))return{ext:\"mpg\",mime:\"video/MP1S\"};if(r([68],{offset:4,mask:[196]}))return{ext:\"mpg\",mime:\"video/MP2P\"}}if(n(\"ITSF\"))return{ext:\"chm\",mime:\"application/vnd.ms-htmlhelp\"};if(r([253,55,122,88,90,0]))return{ext:\"xz\",mime:\"application/x-xz\"};if(n(\"__left_angle_mark_?xml \"))return{ext:\"xml\",mime:\"application/xml\"};if(r([55,122,188,175,39,28]))return{ext:\"7z\",mime:\"application/x-7z-compressed\"};if(r([82,97,114,33,26,7])&&(0===t[6]||1===t[6]))return{ext:\"rar\",mime:\"application/x-rar-compressed\"};if(n(\"solid \"))return{ext:\"stl\",mime:\"model/stl\"};if(n(\"BLENDER\"))return{ext:\"blend\",mime:\"application/x-blender\"};if(n(\"!__left_angle_mark_arch>\"))return await e.ignore(8),\"debian-binary\"===await e.readToken(new Token.StringType(13,\"ascii\"))?{ext:\"deb\",mime:\"application/x-deb\"}:{ext:\"ar\",mime:\"application/x-unix-archive\"};if(r([137,80,78,71,13,10,26,10])){async function _(){return{length:await e.readToken(Token.INT32_BE),type:await e.readToken(new Token.StringType(4,\"binary\"))}}await e.ignore(8);do{const b=await _();if(b.length__left_angle_mark_0)return;switch(b.type){case\"IDAT\":return{ext:\"png\",mime:\"image/png\"};case\"acTL\":return{ext:\"apng\",mime:\"image/apng\"};default:await e.ignore(b.length+4)}}while(e.position+8__left_angle_mark_e.fileInfo.size);return{ext:\"png\",mime:\"image/png\"}}if(r([65,82,82,79,87,49,0,0]))return{ext:\"arrow\",mime:\"application/x-apache-arrow\"};if(r([103,108,84,70,2,0,0,0]))return{ext:\"glb\",mime:\"model/gltf-binary\"};if(r([102,114,101,101],{offset:4})||r([109,100,97,116],{offset:4})||r([109,111,111,118],{offset:4})||r([119,105,100,101],{offset:4}))return{ext:\"mov\",mime:\"video/quicktime\"};if(r([73,73,82,79,8,0,0,0,24]))return{ext:\"orf\",mime:\"image/x-olympus-orf\"};if(n(\"gimp xcf \"))return{ext:\"xcf\",mime:\"image/x-xcf\"};if(r([73,73,85,0,24,0,0,0,136,231,116,216]))return{ext:\"rw2\",mime:\"image/x-panasonic-rw2\"};if(r([48,38,178,117,142,102,207,17,166,217])){async function y(){const t=Buffer.alloc(16);return await e.readBuffer(t),{id:t,size:Number(await e.readToken(Token.UINT64_LE))}}for(await e.ignore(30);e.position+24__left_angle_mark_e.fileInfo.size;){const v=await y();let A=v.size-24;if(_check(v.id,[145,7,220,183,183,169,207,17,142,230,0,192,12,32,83,101])){const w=Buffer.alloc(16);if(A-=await e.readBuffer(w),_check(w,[64,158,105,248,77,91,207,17,168,253,0,128,95,92,68,43]))return{ext:\"asf\",mime:\"audio/x-ms-asf\"};if(_check(w,[192,239,25,188,77,91,207,17,168,253,0,128,95,92,68,43]))return{ext:\"asf\",mime:\"video/x-ms-asf\"};break}await e.ignore(A)}return{ext:\"asf\",mime:\"application/vnd.ms-asf\"}}if(r([171,75,84,88,32,49,49,187,13,10,26,10]))return{ext:\"ktx\",mime:\"image/ktx\"};if((r([126,16,4])||r([126,24,4]))&&r([48,77,73,69],{offset:4}))return{ext:\"mie\",mime:\"application/x-mie\"};if(r([39,10,0,0,0,0,0,0,0,0,0,0],{offset:2}))return{ext:\"shp\",mime:\"application/x-esri-shape\"};if(r([0,0,0,12,106,80,32,32,13,10,135,10]))switch(await e.ignore(20),await e.readToken(new Token.StringType(4,\"ascii\"))){case\"jp2 \":return{ext:\"jp2\",mime:\"image/jp2\"};case\"jpx \":return{ext:\"jpx\",mime:\"image/jpx\"};case\"jpm \":return{ext:\"jpm\",mime:\"image/jpm\"};case\"mjp2\":return{ext:\"mj2\",mime:\"image/mj2\"};default:return}if(r([255,10])||r([0,0,0,12,74,88,76,32,13,10,135,10]))return{ext:\"jxl\",mime:\"image/jxl\"};if(r([0,0,1,186])||r([0,0,1,179]))return{ext:\"mpg\",mime:\"video/mpeg\"};if(r([0,1,0,0,0]))return{ext:\"ttf\",mime:\"font/ttf\"};if(r([0,0,1,0]))return{ext:\"ico\",mime:\"image/x-icon\"};if(r([0,0,2,0]))return{ext:\"cur\",mime:\"image/x-icon\"};if(r([208,207,17,224,161,177,26,225]))return{ext:\"cfb\",mime:\"application/x-cfb\"};if(await e.peekBuffer(t,{length:Math.min(256,e.fileInfo.size),mayBeLess:!0}),n(\"BEGIN:\")){if(n(\"VCARD\",{offset:6}))return{ext:\"vcf\",mime:\"text/vcard\"};if(n(\"VCALENDAR\",{offset:6}))return{ext:\"ics\",mime:\"text/calendar\"}}if(n(\"FUJIFILMCCD-RAW\"))return{ext:\"raf\",mime:\"image/x-fujifilm-raf\"};if(n(\"Extended Module:\"))return{ext:\"xm\",mime:\"audio/x-xm\"};if(n(\"Creative Voice File\"))return{ext:\"voc\",mime:\"audio/x-voc\"};if(r([4,0,0,0])&&t.length>=16){const S=t.readUInt32LE(12);if(S>12&&t.length>=S+16)try{const E=t.slice(16,S+16).toString();if(JSON.parse(E).files)return{ext:\"asar\",mime:\"application/x-asar\"}}catch(o){}}if(r([6,14,43,52,2,5,1,1,13,1,2,1,1,2]))return{ext:\"mxf\",mime:\"application/mxf\"};if(n(\"SCRM\",{offset:44}))return{ext:\"s3m\",mime:\"audio/x-s3m\"};if(r([71],{offset:4})&&(r([71],{offset:192})||r([71],{offset:196})))return{ext:\"mts\",mime:\"video/mp2t\"};if(r([66,79,79,75,77,79,66,73],{offset:60}))return{ext:\"mobi\",mime:\"application/x-mobipocket-ebook\"};if(r([68,73,67,77],{offset:128}))return{ext:\"dcm\",mime:\"application/dicom\"};if(r([76,0,0,0,1,20,2,0,0,0,0,0,192,0,0,0,0,0,0,70]))return{ext:\"lnk\",mime:\"application/x.ms.shortcut\"};if(r([98,111,111,107,0,0,0,0,109,97,114,107,0,0,0,0]))return{ext:\"alias\",mime:\"application/x.apple.alias\"};if(r([76,80],{offset:34})&&(r([0,0,1],{offset:8})||r([1,0,2],{offset:8})||r([2,0,2],{offset:8})))return{ext:\"eot\",mime:\"application/vnd.ms-fontobject\"};if(r([6,6,237,245,216,29,70,229,189,49,239,231,254,116,183,29]))return{ext:\"indd\",mime:\"application/x-indesign\"};if(await e.peekBuffer(t,{length:Math.min(512,e.fileInfo.size),mayBeLess:!0}),tarHeaderChecksumMatches(t))return{ext:\"tar\",mime:\"application/x-tar\"};if(r([255,254,255,14,83,0,107,0,101,0,116,0,99,0,104,0,85,0,112,0,32,0,77,0,111,0,100,0,101,0,108,0]))return{ext:\"skp\",mime:\"application/vnd.sketchup.skp\"};if(n(\"-----BEGIN PGP MESSAGE-----\"))return{ext:\"pgp\",mime:\"application/pgp-encrypted\"};if(t.length>=2&&r([255,224],{offset:0,mask:[255,224]})){if(r([16],{offset:1,mask:[22]}))return r([8],{offset:1,mask:[8]}),{ext:\"aac\",mime:\"audio/aac\"};if(r([2],{offset:1,mask:[6]}))return{ext:\"mp3\",mime:\"audio/mpeg\"};if(r([4],{offset:1,mask:[6]}))return{ext:\"mp2\",mime:\"audio/mpeg\"};if(r([6],{offset:1,mask:[6]}))return{ext:\"mp1\",mime:\"audio/mpeg\"}}}var stream=readableStream=>new Promise(((resolve,reject)=>{const stream=eval(\"require\")(\"stream\");readableStream.on(\"error\",reject),readableStream.once(\"readable\",(async()=>{const e=new stream.PassThrough;let t;t=stream.pipeline?stream.pipeline(readableStream,e,(()=>{})):readableStream.pipe(e);const r=readableStream.read(minimumBytes)||readableStream.read()||Buffer.alloc(0);try{const t=await fromBuffer(r);e.fileType=t}catch(n){reject(n)}resolve(t)}))})),fileType={fromStream:fromStream,fromTokenizer:fromTokenizer,fromBuffer:fromBuffer,stream:stream};Object.defineProperty(fileType,\"extensions\",{get:()=>new Set(supported.extensions)}),Object.defineProperty(fileType,\"mimeTypes\",{get:()=>new Set(supported.mimeTypes)}),module.exports=fileType}}),require_file_type=__commonJS({\"../../node_modules/.pnpm/file-type@16.5.4/node_modules/file-type/index.js\"(e,t){init_globals();var r=require_lib4(),n=require_core4(),i={fromFile:async function(e){const t=await r.fromFile(e);try{return await n.fromTokenizer(t)}finally{await t.close()}}};Object.assign(i,n),Object.defineProperty(i,\"extensions\",{get:()=>n.extensions}),Object.defineProperty(i,\"mimeTypes\",{get:()=>n.mimeTypes}),t.exports=i}}),require_jpeg=__commonJS({\"../../node_modules/.pnpm/exif-parser@0.1.12/node_modules/exif-parser/lib/jpeg.js\"(e,t){init_globals(),t.exports={parseSections:function(e,t){var r,n;for(e.setBigEndian(!0);e.remainingLength()>0&&218!==n;){if(255!==e.nextUInt8())throw new Error(\"Invalid JPEG section offset\");r=(n=e.nextUInt8())>=208&&n__left_angle_mark_=217||218===n?0:e.nextUInt16()-2,t(n,e.branch(0,r)),e.skip(r)}},getSizeFromSOFSection:function(e){return e.skip(1),{height:e.nextUInt16(),width:e.nextUInt16()}},getSectionName:function(e){var t,r;switch(e){case 216:t=\"SOI\";break;case 196:t=\"DHT\";break;case 219:t=\"DQT\";break;case 221:t=\"DRI\";break;case 218:t=\"SOS\";break;case 254:t=\"COM\";break;case 217:t=\"EOI\";break;default:e>=224&&e__left_angle_mark_=239?(t=\"APP\",r=e-224):e>=192&&e__left_angle_mark_=207&&196!==e&&200!==e&&204!==e?(t=\"SOF\",r=e-192):e>=208&&e__left_angle_mark_=215&&(t=\"RST\",r=e-208)}var n={name:t};return\"number\"==typeof r&&(n.index=r),n}}}}),require_exif=__commonJS({\"../../node_modules/.pnpm/exif-parser@0.1.12/node_modules/exif-parser/lib/exif.js\"(e,t){function r(e,t){switch(e){case 1:return t.nextUInt8();case 3:case 8:return t.nextUInt16();case 4:case 9:return t.nextUInt32();case 5:return[t.nextUInt32(),t.nextUInt32()];case 6:return t.nextInt8();case 10:return[t.nextInt32(),t.nextInt32()];case 11:return t.nextFloat();case 12:return t.nextDouble();default:throw new Error(\"Invalid format while decoding: \"+e)}}function n(e,t){var n,i,o=t.nextUInt16(),a=t.nextUInt16(),s=function(e){switch(e){case 1:case 2:case 6:case 7:return 1;case 3:case 8:return 2;case 4:case 9:case 11:return 4;case 5:case 10:case 12:return 8;default:return 0}}(a),l=t.nextUInt32(),u=s*l;if(u>4&&(t=e.openWithOffset(t.nextUInt32())),2===a){var c=(n=t.nextString(l)).indexOf(\"\\0\");-1!==c&&(n=n.substr(0,c))}else if(7===a)n=t.nextBuffer(l);else if(0!==a)for(n=[],i=0;i__left_angle_mark_l;++i)n.push(r(a,t));return u__left_angle_mark_4&&t.skip(4-u),[o,n,a]}function i(e,t,r){var i,o,a=t.nextUInt16();for(o=0;o__left_angle_mark_a;++o)r((i=n(e,t))[0],i[1],i[2])}init_globals(),t.exports={IFD0:1,IFD1:2,GPSIFD:3,SubIFD:4,InteropIFD:5,parseTags:function(e,t){var r,n,o,a;try{r=function(e){if(\"Exif\\0\\0\"!==e.nextString(6))throw new Error(\"Invalid EXIF header\");var t=e.mark(),r=e.nextUInt16();if(18761===r)e.setBigEndian(!1);else{if(19789!==r)throw new Error(\"Invalid TIFF header\");e.setBigEndian(!0)}if(42!==e.nextUInt16())throw new Error(\"Invalid TIFF data\");return t}(e)}catch(m){return!1}var s=r.openWithOffset(e.nextUInt32()),l=this.IFD0;i(r,s,(function(e,r,i){switch(e){case 34853:o=r[0];break;case 34665:n=r[0];break;default:t(l,e,r,i)}}));var u=s.nextUInt32();if(0!==u){var c=r.openWithOffset(u);i(r,c,t.bind(null,this.IFD1))}if(o){var d=r.openWithOffset(o);i(r,d,t.bind(null,this.GPSIFD))}if(n){var h=r.openWithOffset(n),f=this.InteropIFD;i(r,h,(function(e,r,n){40965===e?a=r[0]:t(f,e,r,n)}))}if(a){var p=r.openWithOffset(a);i(r,p,t.bind(null,this.InteropIFD))}return!0}}}}),require_date=__commonJS({\"../../node_modules/.pnpm/exif-parser@0.1.12/node_modules/exif-parser/lib/date.js\"(e,t){function r(e){return parseInt(e,10)}function n(e,t){e=e.map(r),t=t.map(r);var n=e[0],i=e[1]-1,o=e[2],a=t[0],s=t[1],l=t[2];return Date.UTC(n,i,o,a,s,l,0)/1e3}function i(e){var t=e.substr(0,10).split(\"-\"),i=e.substr(11,8).split(\":\"),o=e.substr(19,6).split(\":\").map(r),a=3600*o[0]+60*o[1],s=n(t,i);if(\"number\"==typeof(s-=a)&&!isNaN(s))return s}function o(e){var t=e.split(\" \"),r=n(t[0].split(\":\"),t[1].split(\":\"));if(\"number\"==typeof r&&!isNaN(r))return r}init_globals(),t.exports={parseDateWithSpecFormat:o,parseDateWithTimezoneFormat:i,parseExifDate:function(e){var t=19===e.length&&\":\"===e.charAt(4);return 25===e.length&&\"T\"===e.charAt(10)?i(e):t?o(e):void 0}}}}),require_simplify=__commonJS({\"../../node_modules/.pnpm/exif-parser@0.1.12/node_modules/exif-parser/lib/simplify.js\"(e,t){init_globals();var r=require_exif(),n=require_date(),i=[{section:r.GPSIFD,type:2,name:\"GPSLatitude\",refType:1,refName:\"GPSLatitudeRef\",posVal:\"N\"},{section:r.GPSIFD,type:4,name:\"GPSLongitude\",refType:3,refName:\"GPSLongitudeRef\",posVal:\"E\"}],o=[{section:r.SubIFD,type:306,name:\"ModifyDate\"},{section:r.SubIFD,type:36867,name:\"DateTimeOriginal\"},{section:r.SubIFD,type:36868,name:\"CreateDate\"},{section:r.SubIFD,type:306,name:\"ModifyDate\"}];t.exports={castDegreeValues:function(e,t){i.forEach((function(r){var n=e(r);if(n){var i=e({section:r.section,type:r.refType,name:r.refName})===r.posVal?1:-1,o=(n[0]+n[1]/60+n[2]/3600)*i;t(r,o)}}))},castDateValues:function(e,t){o.forEach((function(r){var i=e(r);if(i){var o=n.parseExifDate(i);void 0!==o&&t(r,o)}}))},simplifyValue:function(e,t){return Array.isArray(e)&&1===(e=e.map((function(e){return 10===t||5===t?e[0]/e[1]:e}))).length&&(e=e[0]),e}}}}),require_exif_tags=__commonJS({\"../../node_modules/.pnpm/exif-parser@0.1.12/node_modules/exif-parser/lib/exif-tags.js\"(e,t){init_globals(),t.exports={exif:{1:\"InteropIndex\",2:\"InteropVersion\",11:\"ProcessingSoftware\",254:\"SubfileType\",255:\"OldSubfileType\",256:\"ImageWidth\",257:\"ImageHeight\",258:\"BitsPerSample\",259:\"Compression\",262:\"PhotometricInterpretation\",263:\"Thresholding\",264:\"CellWidth\",265:\"CellLength\",266:\"FillOrder\",269:\"DocumentName\",270:\"ImageDescription\",271:\"Make\",272:\"Model\",273:\"StripOffsets\",274:\"Orientation\",277:\"SamplesPerPixel\",278:\"RowsPerStrip\",279:\"StripByteCounts\",280:\"MinSampleValue\",281:\"MaxSampleValue\",282:\"XResolution\",283:\"YResolution\",284:\"PlanarConfiguration\",285:\"PageName\",286:\"XPosition\",287:\"YPosition\",288:\"FreeOffsets\",289:\"FreeByteCounts\",290:\"GrayResponseUnit\",291:\"GrayResponseCurve\",292:\"T4Options\",293:\"T6Options\",296:\"ResolutionUnit\",297:\"PageNumber\",300:\"ColorResponseUnit\",301:\"TransferFunction\",305:\"Software\",306:\"ModifyDate\",315:\"Artist\",316:\"HostComputer\",317:\"Predictor\",318:\"WhitePoint\",319:\"PrimaryChromaticities\",320:\"ColorMap\",321:\"HalftoneHints\",322:\"TileWidth\",323:\"TileLength\",324:\"TileOffsets\",325:\"TileByteCounts\",326:\"BadFaxLines\",327:\"CleanFaxData\",328:\"ConsecutiveBadFaxLines\",330:\"SubIFD\",332:\"InkSet\",333:\"InkNames\",334:\"NumberofInks\",336:\"DotRange\",337:\"TargetPrinter\",338:\"ExtraSamples\",339:\"SampleFormat\",340:\"SMinSampleValue\",341:\"SMaxSampleValue\",342:\"TransferRange\",343:\"ClipPath\",344:\"XClipPathUnits\",345:\"YClipPathUnits\",346:\"Indexed\",347:\"JPEGTables\",351:\"OPIProxy\",400:\"GlobalParametersIFD\",401:\"ProfileType\",402:\"FaxProfile\",403:\"CodingMethods\",404:\"VersionYear\",405:\"ModeNumber\",433:\"Decode\",434:\"DefaultImageColor\",435:\"T82Options\",437:\"JPEGTables\",512:\"JPEGProc\",513:\"ThumbnailOffset\",514:\"ThumbnailLength\",515:\"JPEGRestartInterval\",517:\"JPEGLosslessPredictors\",518:\"JPEGPointTransforms\",519:\"JPEGQTables\",520:\"JPEGDCTables\",521:\"JPEGACTables\",529:\"YCbCrCoefficients\",530:\"YCbCrSubSampling\",531:\"YCbCrPositioning\",532:\"ReferenceBlackWhite\",559:\"StripRowCounts\",700:\"ApplicationNotes\",999:\"USPTOMiscellaneous\",4096:\"RelatedImageFileFormat\",4097:\"RelatedImageWidth\",4098:\"RelatedImageHeight\",18246:\"Rating\",18247:\"XP_DIP_XML\",18248:\"StitchInfo\",18249:\"RatingPercent\",32781:\"ImageID\",32931:\"WangTag1\",32932:\"WangAnnotation\",32933:\"WangTag3\",32934:\"WangTag4\",32995:\"Matteing\",32996:\"DataType\",32997:\"ImageDepth\",32998:\"TileDepth\",33405:\"Model2\",33421:\"CFARepeatPatternDim\",33422:\"CFAPattern2\",33423:\"BatteryLevel\",33424:\"KodakIFD\",33432:\"Copyright\",33434:\"ExposureTime\",33437:\"FNumber\",33445:\"MDFileTag\",33446:\"MDScalePixel\",33447:\"MDColorTable\",33448:\"MDLabName\",33449:\"MDSampleInfo\",33450:\"MDPrepDate\",33451:\"MDPrepTime\",33452:\"MDFileUnits\",33550:\"PixelScale\",33589:\"AdventScale\",33590:\"AdventRevision\",33628:\"UIC1Tag\",33629:\"UIC2Tag\",33630:\"UIC3Tag\",33631:\"UIC4Tag\",33723:\"IPTC-NAA\",33918:\"IntergraphPacketData\",33919:\"IntergraphFlagRegisters\",33920:\"IntergraphMatrix\",33921:\"INGRReserved\",33922:\"ModelTiePoint\",34016:\"Site\",34017:\"ColorSequence\",34018:\"IT8Header\",34019:\"RasterPadding\",34020:\"BitsPerRunLength\",34021:\"BitsPerExtendedRunLength\",34022:\"ColorTable\",34023:\"ImageColorIndicator\",34024:\"BackgroundColorIndicator\",34025:\"ImageColorValue\",34026:\"BackgroundColorValue\",34027:\"PixelIntensityRange\",34028:\"TransparencyIndicator\",34029:\"ColorCharacterization\",34030:\"HCUsage\",34031:\"TrapIndicator\",34032:\"CMYKEquivalent\",34118:\"SEMInfo\",34152:\"AFCP_IPTC\",34232:\"PixelMagicJBIGOptions\",34264:\"ModelTransform\",34306:\"WB_GRGBLevels\",34310:\"LeafData\",34377:\"PhotoshopSettings\",34665:\"ExifOffset\",34675:\"ICC_Profile\",34687:\"TIFF_FXExtensions\",34688:\"MultiProfiles\",34689:\"SharedData\",34690:\"T88Options\",34732:\"ImageLayer\",34735:\"GeoTiffDirectory\",34736:\"GeoTiffDoubleParams\",34737:\"GeoTiffAsciiParams\",34850:\"ExposureProgram\",34852:\"SpectralSensitivity\",34853:\"GPSInfo\",34855:\"ISO\",34856:\"Opto-ElectricConvFactor\",34857:\"Interlace\",34858:\"TimeZoneOffset\",34859:\"SelfTimerMode\",34864:\"SensitivityType\",34865:\"StandardOutputSensitivity\",34866:\"RecommendedExposureIndex\",34867:\"ISOSpeed\",34868:\"ISOSpeedLatitudeyyy\",34869:\"ISOSpeedLatitudezzz\",34908:\"FaxRecvParams\",34909:\"FaxSubAddress\",34910:\"FaxRecvTime\",34954:\"LeafSubIFD\",36864:\"ExifVersion\",36867:\"DateTimeOriginal\",36868:\"CreateDate\",37121:\"ComponentsConfiguration\",37122:\"CompressedBitsPerPixel\",37377:\"ShutterSpeedValue\",37378:\"ApertureValue\",37379:\"BrightnessValue\",37380:\"ExposureCompensation\",37381:\"MaxApertureValue\",37382:\"SubjectDistance\",37383:\"MeteringMode\",37384:\"LightSource\",37385:\"Flash\",37386:\"FocalLength\",37387:\"FlashEnergy\",37388:\"SpatialFrequencyResponse\",37389:\"Noise\",37390:\"FocalPlaneXResolution\",37391:\"FocalPlaneYResolution\",37392:\"FocalPlaneResolutionUnit\",37393:\"ImageNumber\",37394:\"SecurityClassification\",37395:\"ImageHistory\",37396:\"SubjectArea\",37397:\"ExposureIndex\",37398:\"TIFF-EPStandardID\",37399:\"SensingMethod\",37434:\"CIP3DataFile\",37435:\"CIP3Sheet\",37436:\"CIP3Side\",37439:\"StoNits\",37500:\"MakerNote\",37510:\"UserComment\",37520:\"SubSecTime\",37521:\"SubSecTimeOriginal\",37522:\"SubSecTimeDigitized\",37679:\"MSDocumentText\",37680:\"MSPropertySetStorage\",37681:\"MSDocumentTextPosition\",37724:\"ImageSourceData\",40091:\"XPTitle\",40092:\"XPComment\",40093:\"XPAuthor\",40094:\"XPKeywords\",40095:\"XPSubject\",40960:\"FlashpixVersion\",40961:\"ColorSpace\",40962:\"ExifImageWidth\",40963:\"ExifImageHeight\",40964:\"RelatedSoundFile\",40965:\"InteropOffset\",41483:\"FlashEnergy\",41484:\"SpatialFrequencyResponse\",41485:\"Noise\",41486:\"FocalPlaneXResolution\",41487:\"FocalPlaneYResolution\",41488:\"FocalPlaneResolutionUnit\",41489:\"ImageNumber\",41490:\"SecurityClassification\",41491:\"ImageHistory\",41492:\"SubjectLocation\",41493:\"ExposureIndex\",41494:\"TIFF-EPStandardID\",41495:\"SensingMethod\",41728:\"FileSource\",41729:\"SceneType\",41730:\"CFAPattern\",41985:\"CustomRendered\",41986:\"ExposureMode\",41987:\"WhiteBalance\",41988:\"DigitalZoomRatio\",41989:\"FocalLengthIn35mmFormat\",41990:\"SceneCaptureType\",41991:\"GainControl\",41992:\"Contrast\",41993:\"Saturation\",41994:\"Sharpness\",41995:\"DeviceSettingDescription\",41996:\"SubjectDistanceRange\",42016:\"ImageUniqueID\",42032:\"OwnerName\",42033:\"SerialNumber\",42034:\"LensInfo\",42035:\"LensMake\",42036:\"LensModel\",42037:\"LensSerialNumber\",42112:\"GDALMetadata\",42113:\"GDALNoData\",42240:\"Gamma\",44992:\"ExpandSoftware\",44993:\"ExpandLens\",44994:\"ExpandFilm\",44995:\"ExpandFilterLens\",44996:\"ExpandScanner\",44997:\"ExpandFlashLamp\",48129:\"PixelFormat\",48130:\"Transformation\",48131:\"Uncompressed\",48132:\"ImageType\",48256:\"ImageWidth\",48257:\"ImageHeight\",48258:\"WidthResolution\",48259:\"HeightResolution\",48320:\"ImageOffset\",48321:\"ImageByteCount\",48322:\"AlphaOffset\",48323:\"AlphaByteCount\",48324:\"ImageDataDiscard\",48325:\"AlphaDataDiscard\",50215:\"OceScanjobDesc\",50216:\"OceApplicationSelector\",50217:\"OceIDNumber\",50218:\"OceImageLogic\",50255:\"Annotations\",50341:\"PrintIM\",50560:\"USPTOOriginalContentType\",50706:\"DNGVersion\",50707:\"DNGBackwardVersion\",50708:\"UniqueCameraModel\",50709:\"LocalizedCameraModel\",50710:\"CFAPlaneColor\",50711:\"CFALayout\",50712:\"LinearizationTable\",50713:\"BlackLevelRepeatDim\",50714:\"BlackLevel\",50715:\"BlackLevelDeltaH\",50716:\"BlackLevelDeltaV\",50717:\"WhiteLevel\",50718:\"DefaultScale\",50719:\"DefaultCropOrigin\",50720:\"DefaultCropSize\",50721:\"ColorMatrix1\",50722:\"ColorMatrix2\",50723:\"CameraCalibration1\",50724:\"CameraCalibration2\",50725:\"ReductionMatrix1\",50726:\"ReductionMatrix2\",50727:\"AnalogBalance\",50728:\"AsShotNeutral\",50729:\"AsShotWhiteXY\",50730:\"BaselineExposure\",50731:\"BaselineNoise\",50732:\"BaselineSharpness\",50733:\"BayerGreenSplit\",50734:\"LinearResponseLimit\",50735:\"CameraSerialNumber\",50736:\"DNGLensInfo\",50737:\"ChromaBlurRadius\",50738:\"AntiAliasStrength\",50739:\"ShadowScale\",50740:\"DNGPrivateData\",50741:\"MakerNoteSafety\",50752:\"RawImageSegmentation\",50778:\"CalibrationIlluminant1\",50779:\"CalibrationIlluminant2\",50780:\"BestQualityScale\",50781:\"RawDataUniqueID\",50784:\"AliasLayerMetadata\",50827:\"OriginalRawFileName\",50828:\"OriginalRawFileData\",50829:\"ActiveArea\",50830:\"MaskedAreas\",50831:\"AsShotICCProfile\",50832:\"AsShotPreProfileMatrix\",50833:\"CurrentICCProfile\",50834:\"CurrentPreProfileMatrix\",50879:\"ColorimetricReference\",50898:\"PanasonicTitle\",50899:\"PanasonicTitle2\",50931:\"CameraCalibrationSig\",50932:\"ProfileCalibrationSig\",50933:\"ProfileIFD\",50934:\"AsShotProfileName\",50935:\"NoiseReductionApplied\",50936:\"ProfileName\",50937:\"ProfileHueSatMapDims\",50938:\"ProfileHueSatMapData1\",50939:\"ProfileHueSatMapData2\",50940:\"ProfileToneCurve\",50941:\"ProfileEmbedPolicy\",50942:\"ProfileCopyright\",50964:\"ForwardMatrix1\",50965:\"ForwardMatrix2\",50966:\"PreviewApplicationName\",50967:\"PreviewApplicationVersion\",50968:\"PreviewSettingsName\",50969:\"PreviewSettingsDigest\",50970:\"PreviewColorSpace\",50971:\"PreviewDateTime\",50972:\"RawImageDigest\",50973:\"OriginalRawFileDigest\",50974:\"SubTileBlockSize\",50975:\"RowInterleaveFactor\",50981:\"ProfileLookTableDims\",50982:\"ProfileLookTableData\",51008:\"OpcodeList1\",51009:\"OpcodeList2\",51022:\"OpcodeList3\",51041:\"NoiseProfile\",51043:\"TimeCodes\",51044:\"FrameRate\",51058:\"TStop\",51081:\"ReelName\",51089:\"OriginalDefaultFinalSize\",51090:\"OriginalBestQualitySize\",51091:\"OriginalDefaultCropSize\",51105:\"CameraLabel\",51107:\"ProfileHueSatMapEncoding\",51108:\"ProfileLookTableEncoding\",51109:\"BaselineExposureOffset\",51110:\"DefaultBlackRender\",51111:\"NewRawImageDigest\",51112:\"RawToPreviewGain\",51125:\"DefaultUserCrop\",59932:\"Padding\",59933:\"OffsetSchema\",65e3:\"OwnerName\",65001:\"SerialNumber\",65002:\"Lens\",65024:\"KDC_IFD\",65100:\"RawFile\",65101:\"Converter\",65102:\"WhiteBalance\",65105:\"Exposure\",65106:\"Shadows\",65107:\"Brightness\",65108:\"Contrast\",65109:\"Saturation\",65110:\"Sharpness\",65111:\"Smoothness\",65112:\"MoireFilter\"},gps:{0:\"GPSVersionID\",1:\"GPSLatitudeRef\",2:\"GPSLatitude\",3:\"GPSLongitudeRef\",4:\"GPSLongitude\",5:\"GPSAltitudeRef\",6:\"GPSAltitude\",7:\"GPSTimeStamp\",8:\"GPSSatellites\",9:\"GPSStatus\",10:\"GPSMeasureMode\",11:\"GPSDOP\",12:\"GPSSpeedRef\",13:\"GPSSpeed\",14:\"GPSTrackRef\",15:\"GPSTrack\",16:\"GPSImgDirectionRef\",17:\"GPSImgDirection\",18:\"GPSMapDatum\",19:\"GPSDestLatitudeRef\",20:\"GPSDestLatitude\",21:\"GPSDestLongitudeRef\",22:\"GPSDestLongitude\",23:\"GPSDestBearingRef\",24:\"GPSDestBearing\",25:\"GPSDestDistanceRef\",26:\"GPSDestDistance\",27:\"GPSProcessingMethod\",28:\"GPSAreaInformation\",29:\"GPSDateStamp\",30:\"GPSDifferential\",31:\"GPSHPositioningError\"}}}}),require_parser5=__commonJS({\"../../node_modules/.pnpm/exif-parser@0.1.12/node_modules/exif-parser/lib/parser.js\"(e,t){init_globals();var r=require_jpeg(),n=require_exif(),i=require_simplify();function o(e,t,r,n,i,o,a){this.startMarker=e,this.tags=t,this.imageSize=r,this.thumbnailOffset=n,this.thumbnailLength=i,this.thumbnailType=o,this.app1Offset=a}function a(e){this.stream=e,this.flags={readBinaryTags:!1,resolveTagNames:!0,simplifyValues:!0,imageSize:!0,hidePointers:!0,returnTags:!0}}o.prototype={hasThumbnail:function(e){return!(!this.thumbnailOffset||!this.thumbnailLength||\"string\"==typeof e&&(\"image/jpeg\"===e.toLowerCase().trim()?6!==this.thumbnailType:\"image/tiff\"!==e.toLowerCase().trim()||1!==this.thumbnailType))},getThumbnailOffset:function(){return this.app1Offset+6+this.thumbnailOffset},getThumbnailLength:function(){return this.thumbnailLength},getThumbnailBuffer:function(){return this._getThumbnailStream().nextBuffer(this.thumbnailLength)},_getThumbnailStream:function(){return this.startMarker.openWithOffset(this.getThumbnailOffset())},getImageSize:function(){return this.imageSize},getThumbnailSize:function(){var e,t=this._getThumbnailStream();return r.parseSections(t,(function(t,n){\"SOF\"===r.getSectionName(t).name&&(e=r.getSizeFromSOFSection(n))})),e}},a.prototype={enableBinaryFields:function(e){return this.flags.readBinaryTags=!!e,this},enablePointers:function(e){return this.flags.hidePointers=!e,this},enableTagNames:function(e){return this.flags.resolveTagNames=!!e,this},enableImageSize:function(e){return this.flags.imageSize=!!e,this},enableReturnTags:function(e){return this.flags.returnTags=!!e,this},enableSimpleValues:function(e){return this.flags.simplifyValues=!!e,this},parse:function(){var e,t,a,s,l,u,c,d,h,f=this.stream.mark(),p=f.openWithOffset(0),m=this.flags;return m.resolveTagNames&&(c=require_exif_tags()),m.resolveTagNames?(e={},d=function(t){return e[t.name]},h=function(t,r){e[t.name]=r}):(e=[],d=function(t){var r;for(r=0;r__left_angle_mark_e.length;++r)if(e[r].type===t.type&&e[r].section===t.section)return e.value},h=function(t,r){var n;for(n=0;n__left_angle_mark_e.length;++n)if(e[n].type===t.type&&e[n].section===t.section)return void(e.value=r)}),r.parseSections(p,(function(o,d){var h=d.offsetFrom(f);225===o?n.parseTags(d,(function(t,r,o,u){if(m.readBinaryTags||7!==u){if(513===r){if(a=o[0],m.hidePointers)return}else if(514===r){if(s=o[0],m.hidePointers)return}else if(259===r&&(l=o[0],m.hidePointers))return;if(m.returnTags)if(m.simplifyValues&&(o=i.simplifyValue(o,u)),m.resolveTagNames){var d=(t===n.GPSIFD?c.gps:c.exif)[r];d||(d=c.exif[r]),e.hasOwnProperty(d)||(e[d]=o)}else e.push({section:t,type:r,value:o})}}))&&(u=h):m.imageSize&&\"SOF\"===r.getSectionName(o).name&&(t=r.getSizeFromSOFSection(d))})),m.simplifyValues&&(i.castDegreeValues(d,h),i.castDateValues(d,h)),new o(f,e,t,a,s,l,u)}},t.exports=a}}),require_dom_bufferstream=__commonJS({\"../../node_modules/.pnpm/exif-parser@0.1.12/node_modules/exif-parser/lib/dom-bufferstream.js\"(e,t){function r(e,t,r,n,i,o){this.global=i,t=t||0,r=r||e.byteLength-t,this.arrayBuffer=e.slice(t,t+r),this.view=new i.DataView(this.arrayBuffer,0,this.arrayBuffer.byteLength),this.setBigEndian(n),this.offset=0,this.parentOffset=(o||0)+t}init_globals(),r.prototype={setBigEndian:function(e){this.littleEndian=!e},nextUInt8:function(){var e=this.view.getUint8(this.offset);return this.offset+=1,e},nextInt8:function(){var e=this.view.getInt8(this.offset);return this.offset+=1,e},nextUInt16:function(){var e=this.view.getUint16(this.offset,this.littleEndian);return this.offset+=2,e},nextUInt32:function(){var e=this.view.getUint32(this.offset,this.littleEndian);return this.offset+=4,e},nextInt16:function(){var e=this.view.getInt16(this.offset,this.littleEndian);return this.offset+=2,e},nextInt32:function(){var e=this.view.getInt32(this.offset,this.littleEndian);return this.offset+=4,e},nextFloat:function(){var e=this.view.getFloat32(this.offset,this.littleEndian);return this.offset+=4,e},nextDouble:function(){var e=this.view.getFloat64(this.offset,this.littleEndian);return this.offset+=8,e},nextBuffer:function(e){var t=this.arrayBuffer.slice(this.offset,this.offset+e);return this.offset+=e,t},remainingLength:function(){return this.arrayBuffer.byteLength-this.offset},nextString:function(e){var t=this.arrayBuffer.slice(this.offset,this.offset+e);return t=String.fromCharCode.apply(null,new this.global.Uint8Array(t)),this.offset+=e,t},mark:function(){var e=this;return{openWithOffset:function(t){return t=(t||0)+this.offset,new r(e.arrayBuffer,t,e.arrayBuffer.byteLength-t,!e.littleEndian,e.global,e.parentOffset)},offset:this.offset,getParentOffset:function(){return e.parentOffset}}},offsetFrom:function(e){return this.parentOffset+this.offset-(e.offset+e.getParentOffset())},skip:function(e){this.offset+=e},branch:function(e,t){return t=\"number\"==typeof t?t:this.arrayBuffer.byteLength-(this.offset+e),new r(this.arrayBuffer,this.offset+e,t,!this.littleEndian,this.global,this.parentOffset)}},t.exports=r}}),require_bufferstream=__commonJS({\"../../node_modules/.pnpm/exif-parser@0.1.12/node_modules/exif-parser/lib/bufferstream.js\"(e,t){function r(e,t,r,n){this.buffer=e,this.offset=t||0,r=\"number\"==typeof r?r:e.length,this.endPosition=this.offset+r,this.setBigEndian(n)}init_globals(),r.prototype={setBigEndian:function(e){this.bigEndian=!!e},nextUInt8:function(){var e=this.buffer.readUInt8(this.offset);return this.offset+=1,e},nextInt8:function(){var e=this.buffer.readInt8(this.offset);return this.offset+=1,e},nextUInt16:function(){var e=this.bigEndian?this.buffer.readUInt16BE(this.offset):this.buffer.readUInt16LE(this.offset);return this.offset+=2,e},nextUInt32:function(){var e=this.bigEndian?this.buffer.readUInt32BE(this.offset):this.buffer.readUInt32LE(this.offset);return this.offset+=4,e},nextInt16:function(){var e=this.bigEndian?this.buffer.readInt16BE(this.offset):this.buffer.readInt16LE(this.offset);return this.offset+=2,e},nextInt32:function(){var e=this.bigEndian?this.buffer.readInt32BE(this.offset):this.buffer.readInt32LE(this.offset);return this.offset+=4,e},nextFloat:function(){var e=this.bigEndian?this.buffer.readFloatBE(this.offset):this.buffer.readFloatLE(this.offset);return this.offset+=4,e},nextDouble:function(){var e=this.bigEndian?this.buffer.readDoubleBE(this.offset):this.buffer.readDoubleLE(this.offset);return this.offset+=8,e},nextBuffer:function(e){var t=this.buffer.slice(this.offset,this.offset+e);return this.offset+=e,t},remainingLength:function(){return this.endPosition-this.offset},nextString:function(e){var t=this.buffer.toString(\"utf8\",this.offset,this.offset+e);return this.offset+=e,t},mark:function(){var e=this;return{openWithOffset:function(t){return t=(t||0)+this.offset,new r(e.buffer,t,e.endPosition-t,e.bigEndian)},offset:this.offset}},offsetFrom:function(e){return this.offset-e.offset},skip:function(e){this.offset+=e},branch:function(e,t){return t=\"number\"==typeof t?t:this.endPosition-(this.offset+e),new r(this.buffer,this.offset+e,t,this.bigEndian)}},t.exports=r}}),require_exif_parser=__commonJS({\"../../node_modules/.pnpm/exif-parser@0.1.12/node_modules/exif-parser/index.js\"(e,t){init_globals();var r=require_parser5();t.exports={create:function(e,t){if(e instanceof(t=t||(0,eval)(\"this\")).ArrayBuffer){var n=require_dom_bufferstream();return new r(new n(e,0,e.byteLength,!0,t))}var i=require_bufferstream();return new r(new i(e,0,e.length,!0))}}}}),import_file_type,import_exif_parser;async function getMIMEFromBuffer(e,t){const r=await import_file_type.default.fromBuffer(e);return r?r.mime:t?getType(t):null}function getExifOrientation(e){return e._exif&&e._exif.tags&&e._exif.tags.Orientation||1}function getExifOrientationTransformation(e){const t=e.getWidth(),r=e.getHeight();switch(getExifOrientation(e)){case 1:default:return null;case 2:return function(e,r){return[t-e-1,r]};case 3:return function(e,n){return[t-e-1,r-n-1]};case 4:return function(e,t){return[e,r-t-1]};case 5:return function(e,t){return[t,e]};case 6:return function(e,t){return[t,r-e-1]};case 7:return function(e,n){return[t-n-1,r-e-1]};case 8:return function(e,r){return[t-r-1,e]}}}function transformBitmap(e,t,r,n){const i=e.bitmap.data,o=e.bitmap.width,a=Buffer.alloc(i.length);for(let s=0;s__left_angle_mark_t;s++)for(let e=0;e__left_angle_mark_r;e++){const[r,l]=n(s,e),u=t*e+s__left_angle_mark___left_angle_mark_2,c=o*l+r__left_angle_mark___left_angle_mark_2,d=i.readUInt32BE(c);a.writeUInt32BE(d,u)}e.bitmap.data=a,e.bitmap.width=t,e.bitmap.height=r}function exifRotate(e){if(getExifOrientation(e)__left_angle_mark_2)return;const t=getExifOrientationTransformation(e),r=getExifOrientation(e)>4;transformBitmap(e,r?e.bitmap.height:e.bitmap.width,r?e.bitmap.width:e.bitmap.height,t)}async function parseBitmap(e,t,r){const n=await getMIMEFromBuffer(e,t);if(\"string\"!=typeof n)return r(new Error(\"Could not find MIME for Buffer __left_angle_mark_\"+t+\">\"));this._originalMime=n.toLowerCase();try{const t=this.getMIME();if(!this.constructor.decoders[t])return throwError.call(this,\"Unsupported MIME type: \"+t,r);this.bitmap=this.constructor.decoders[t](e)}catch(i){return r.call(this,i,this)}try{this._exif=import_exif_parser.default.create(e).parse(),exifRotate(this)}catch(i){}return r.call(this,null,this),this}function compositeBitmapOverBackground(e,t){return new e(t.bitmap.width,t.bitmap.height,t._background).composite(t,0,0).bitmap}function getBuffer(e,t){if(e===AUTO&&(e=this.getMIME()),\"string\"!=typeof e)return throwError.call(this,\"mime must be a string\",t);if(\"function\"!=typeof t)return throwError.call(this,\"cb must be a function\",t);if(e=e.toLowerCase(),this._rgba&&this.constructor.hasAlpha[e]?this.bitmap.data=Buffer.from(this.bitmap.data):this.bitmap.data=compositeBitmapOverBackground(this.constructor,this).data,!this.constructor.encoders[e])return throwError.call(this,\"Unsupported MIME type: \"+e,t);{const r=this.constructor.encoders[e](this);r instanceof Promise?r.then((e=>{t.call(this,null,e)})):t.call(this,null,r)}return this}function getBufferAsync(e){return promisify_default(getBuffer,this,e)}var init_image_bitmap=__esm({\"../../node_modules/.pnpm/@jimp+core@0.22.12/node_modules/@jimp/core/es/utils/image-bitmap.js\"(){init_globals(),import_file_type=__toESM(require_file_type()),import_exif_parser=__toESM(require_exif_parser()),init_es(),init_constants3(),init_mime(),init_promisify()}}),import_fs,import_path7,import_events,import_any_base,import_pixelmatch,alphabet,maxHashLength,emptyBitmap,Jimp,es_default18;function _defineProperty2(e,t,r){return(t=_toPropertyKey(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _toPropertyKey(e){var t=_toPrimitive(e,\"string\");return\"symbol\"==typeof t?t:String(t)}function _toPrimitive(e,t){if(\"object\"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||\"default\");if(\"object\"!=typeof n)return n;throw new TypeError(\"@@toPrimitive must return a primitive value.\")}return(\"string\"===t?String:Number)(e)}function noop5(){}function isArrayBuffer(e){return Object.prototype.toString.call(e).toLowerCase().indexOf(\"arraybuffer\")>-1}function bufferFromArrayBuffer(e){const t=Buffer.alloc(e.byteLength),r=new Uint8Array(e);for(let n=0;n__left_angle_mark_t.length;++n)t[n]=r[n];return t}function loadFromURL(e,t){request_default(e,((r,n)=>r?t(r):\"object\"==typeof n&&Buffer.isBuffer(n)?t(null,n):\"object\"==typeof n&&isArrayBuffer(n)?t(null,bufferFromArrayBuffer(n)):new Error(`Could not load Buffer from __left_angle_mark_${e.url}>`)))}function loadBufferFromPath(e,t){import_fs.default&&\"function\"==typeof import_fs.default.readFile&&!e.match(/^(http|ftp)s?:\\/\\/./)?import_fs.default.readFile(e,t):loadFromURL({url:e},t)}function isRawRGBAData(e){return e&&\"object\"==typeof e&&\"number\"==typeof e.width&&\"number\"==typeof e.height&&(Buffer.isBuffer(e.data)||e.data instanceof Uint8Array||\"function\"==typeof Uint8ClampedArray&&e.data instanceof Uint8ClampedArray)&&(e.data.length===e.width*e.height*4||e.data.length===e.width*e.height*3)}function makeRGBABufferFromRGB(e){if(e.length%3!=0)throw new Error(\"Buffer length is incorrect\");const t=Buffer.allocUnsafe(e.length/3*4);let r=0;for(let n=0;n__left_angle_mark_e.length;n++)t[r]=e[n],(n+1)%3==0&&(t[++r]=255),r++;return t}function addConstants(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Jimp;Object.entries(e).forEach((e=>{let[r,n]=e;t[r]=n}))}function addJimpMethods(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Jimp;Object.entries(e).forEach((e=>{let[r,n]=e;t.prototype[r]=n}))}function jimpEvMethod(e,t,r){const n=\"before-\"+t,i=t.replace(/e$/,\"\")+\"ed\";Jimp.prototype[e]=function(){let t;for(var o=arguments.length,a=new Array(o),s=0;s__left_angle_mark_o;s++)a[s]=arguments[s];const l=a[r.length-1],u=this;let c;\"function\"==typeof l?(t=function(){for(var t=arguments.length,r=new Array(t),n=0;n__left_angle_mark_t;n++)r[n]=arguments[n];const[o,a]=r;o?u.emitError(e,o):u.emitMulti(e,i,{[e]:a}),l.apply(this,r)},a[a.length-1]=t):t=!1,this.emitMulti(e,n);try{c=r.apply(this,a),t||this.emitMulti(e,i,{[e]:c})}catch(d){d.methodName=e,this.emitError(e,d)}return c},Jimp.prototype[e+\"Quiet\"]=r}function jimpEvChange(e,t){jimpEvMethod(e,\"change\",t)}var init_es2=__esm({\"../../node_modules/.pnpm/@jimp+core@0.22.12/node_modules/@jimp/core/es/index.js\"(){init_globals(),import_fs=__toESM(require_fs()),import_path7=__toESM(require_path_browserify()),import_events=__toESM(require_events()),init_es(),import_any_base=__toESM(require_any_base()),import_pixelmatch=__toESM(require_pixelmatch()),init_tinycolor(),init_phash(),init_request(),init_composite(),init_promisify(),init_mime(),init_image_bitmap(),init_constants3(),init_mime(),alphabet=\"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_\",maxHashLength=[NaN,NaN];for(let e=2;e__left_angle_mark_65;e++){const t=(0,import_any_base.default)(import_any_base.default.BIN,alphabet.slice(0,e))(new Array(65).join(\"1\"));maxHashLength.push(t.length)}if(emptyBitmap={data:null,width:null,height:null},Jimp=class e extends import_events.default{parseBitmap(e,t,r){parseBitmap.call(this,e,null,r)}rgba(e,t){return\"boolean\"!=typeof e?throwError.call(this,\"bool must be a boolean, true for RGBA or false for RGB\",t):(this._rgba=e,isNodePattern(t)&&t.call(this,null,this),this)}emitMulti(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};r=Object.assign(r,{methodName:e,eventName:t}),this.emit(\"any\",r),e&&this.emit(e,r),this.emit(t,r)}emitError(e,t){this.emitMulti(e,\"error\",t)}getHeight(){return this.bitmap.height}getWidth(){return this.bitmap.width}inspect(){return\"__left_angle_mark_Jimp \"+(this.bitmap===emptyBitmap?\"pending...\":this.bitmap.width+\"x\"+this.bitmap.height)+\">\"}toString(){return\"[object Jimp]\"}getMIME(){return this._originalMime||e.MIME_PNG}getExtension(){const e=this.getMIME();return getExtension(e)}write(e,t){if(!import_fs.default||!import_fs.default.createWriteStream)throw new Error(\"Cant access the filesystem. You can use the getBase64 method.\");if(\"string\"!=typeof e)return throwError.call(this,\"path must be a string\",t);if(void 0===t&&(t=noop5),\"function\"!=typeof t)return throwError.call(this,\"cb must be a function\",t);const r=getType(e)||this.getMIME(),n=import_path7.default.parse(e);return n.dir&&import_fs.default.mkdirSync(n.dir,{recursive:!0}),this.getBuffer(r,((r,n)=>{if(r)return throwError.call(this,r,t);const i=import_fs.default.createWriteStream(e);i.on(\"open\",(()=>{i.write(n),i.end()})).on(\"error\",(e=>throwError.call(this,e,t))),i.on(\"finish\",(()=>{t.call(this,null,this)}))})),this}getBase64(t,r){return t===e.AUTO&&(t=this.getMIME()),\"string\"!=typeof t?throwError.call(this,\"mime must be a string\",r):\"function\"!=typeof r?throwError.call(this,\"cb must be a function\",r):(this.getBuffer(t,(function(e,n){if(e)return throwError.call(this,e,r);const i=\"data:\"+t+\";base64,\"+n.toString(\"base64\");r.call(this,null,i)})),this)}hash(e,t){if(\"function\"==typeof(e=e||64)&&(t=e,e=64),\"number\"!=typeof e)return throwError.call(this,\"base must be a number\",t);if(e__left_angle_mark_2||e>64)return throwError.call(this,\"base must be a number between 2 and 64\",t);let r=this.pHash();for(r=(0,import_any_base.default)(import_any_base.default.BIN,alphabet.slice(0,e))(r);r.length__left_angle_mark_maxHashLength[e];)r=\"0\"+r;return isNodePattern(t)&&t.call(this,null,r),r}pHash(){return(new phash_default).getHash(this)}distanceFromHash(e){const t=new phash_default,r=t.getHash(this);return t.distance(r,e)}getPixelIndex(t,r,n,i){let o,a;if(\"function\"==typeof n&&void 0===i&&(i=n,n=null),n||(n=e.EDGE_EXTEND),\"number\"!=typeof t||\"number\"!=typeof r)return throwError.call(this,\"x and y must be numbers\",i);o=t=Math.round(t),a=r=Math.round(r),n===e.EDGE_EXTEND&&(t__left_angle_mark_0&&(o=0),t>=this.bitmap.width&&(o=this.bitmap.width-1),r__left_angle_mark_0&&(a=0),r>=this.bitmap.height&&(a=this.bitmap.height-1)),n===e.EDGE_WRAP&&(t__left_angle_mark_0&&(o=this.bitmap.width+t),t>=this.bitmap.width&&(o=t%this.bitmap.width),r__left_angle_mark_0&&(a=this.bitmap.height+r),r>=this.bitmap.height&&(a=r%this.bitmap.height));let s=this.bitmap.width*a+o__left_angle_mark___left_angle_mark_2;return(o__left_angle_mark_0||o>=this.bitmap.width)&&(s=-1),(a__left_angle_mark_0||a>=this.bitmap.height)&&(s=-1),isNodePattern(i)&&i.call(this,null,s),s}getPixelColor(e,t,r){if(\"number\"!=typeof e||\"number\"!=typeof t)return throwError.call(this,\"x and y must be numbers\",r);const n=this.getPixelIndex(e,t),i=this.bitmap.data.readUInt32BE(n);return isNodePattern(r)&&r.call(this,null,i),i}setPixelColor(e,t,r,n){if(\"number\"!=typeof e||\"number\"!=typeof t||\"number\"!=typeof r)return throwError.call(this,\"hex, x and y must be numbers\",n);const i=this.getPixelIndex(t,r);return this.bitmap.data.writeUInt32BE(e,i),isNodePattern(n)&&n.call(this,null,this),this}hasAlpha(){const{width:e,height:t,data:r}=this.bitmap,n=e*t__left_angle_mark___left_angle_mark_2;for(let i=3;i__left_angle_mark_n;i+=4)if(255!==r[i])return!0;return!1}scanIterator(e,t,r,n){return\"number\"!=typeof e||\"number\"!=typeof t?throwError.call(this,\"x and y must be numbers\"):\"number\"!=typeof r||\"number\"!=typeof n?throwError.call(this,\"w and h must be numbers\"):scanIterator(this,e,t,r,n)}constructor(){for(var t=arguments.length,r=new Array(t),n=0;n__left_angle_mark_t;n++)r[n]=arguments[n];super(),_defineProperty2(this,\"bitmap\",emptyBitmap),_defineProperty2(this,\"_background\",0),_defineProperty2(this,\"_originalMime\",e.MIME_PNG),_defineProperty2(this,\"_exif\",null),_defineProperty2(this,\"_rgba\",!0),_defineProperty2(this,\"writeAsync\",(e=>promisify_default(this.write,this,e))),_defineProperty2(this,\"getBase64Async\",(e=>promisify_default(this.getBase64,this,e))),_defineProperty2(this,\"getBuffer\",getBuffer),_defineProperty2(this,\"getBufferAsync\",getBufferAsync),_defineProperty2(this,\"getPixelColour\",this.getPixelColor),_defineProperty2(this,\"setPixelColour\",this.setPixelColor);const i=this;let o=noop5;function a(){for(var e=arguments.length,t=new Array(e),r=0;r__left_angle_mark_e;r++)t[r]=arguments[r];const[n]=t;(n||{}).methodName=\"constructor\",setTimeout((()=>{n&&o===noop5?i.emitError(\"constructor\",n):n||i.emitMulti(\"constructor\",\"initialized\"),o.call(i,...t)}),1)}if(isArrayBuffer(r[0])&&(r[0]=bufferFromArrayBuffer(r[0])),\"number\"==typeof r[0]&&\"number\"==typeof r[1]||parseInt(r[0],10)&&parseInt(r[1],10)){const t=parseInt(r[0],10),n=parseInt(r[1],10);if(o=r[2],\"number\"==typeof r[2]&&(this._background=r[2],o=r[3]),\"string\"==typeof r[2]&&(this._background=e.cssColorToHex(r[2]),o=r[3]),void 0===o&&(o=noop5),\"function\"!=typeof o)return throwError.call(this,\"cb must be a function\",a);this.bitmap={data:Buffer.alloc(t*n*4),width:t,height:n};for(let e=0;e__left_angle_mark_this.bitmap.data.length;e+=4)this.bitmap.data.writeUInt32BE(this._background,e);a(null,this)}else if(\"object\"==typeof r[0]&&r[0].url){if(o=r[1]||noop5,\"function\"!=typeof o)return throwError.call(this,\"cb must be a function\",a);loadFromURL(r[0],((e,t)=>{if(e)return throwError.call(this,e,a);this.parseBitmap(t,r[0].url,a)}))}else if(r[0]instanceof e){const[e]=r;if(o=r[1],void 0===o&&(o=noop5),\"function\"!=typeof o)return throwError.call(this,\"cb must be a function\",a);this.bitmap={data:Buffer.from(e.bitmap.data),width:e.bitmap.width,height:e.bitmap.height},this._quality=e._quality,this._deflateLevel=e._deflateLevel,this._deflateStrategy=e._deflateStrategy,this._filterType=e._filterType,this._rgba=e._rgba,this._background=e._background,this._originalMime=e._originalMime,a(null,this)}else if(isRawRGBAData(r[0])){const[e]=r;o=r[1]||noop5;const t=e.width*e.height*4===e.data.length?Buffer.from(e.data):makeRGBABufferFromRGB(e.data);this.bitmap={data:t,width:e.width,height:e.height},a(null,this)}else if(\"string\"==typeof r[0]){const e=r[0];if(o=r[1],void 0===o&&(o=noop5),\"function\"!=typeof o)return throwError.call(this,\"cb must be a function\",a);loadBufferFromPath(e,((t,r)=>{if(t)return throwError.call(this,t,a);this.parseBitmap(r,e,a)}))}else if(\"object\"==typeof r[0]&&Buffer.isBuffer(r[0])){const e=r[0];if(o=r[1],\"function\"!=typeof o)return throwError.call(this,\"cb must be a function\",a);this.parseBitmap(e,null,a)}else{o=r[r.length-1],\"function\"!=typeof o&&(o=r[r.length-2],\"function\"!=typeof o&&(o=noop5));const t=e.__extraConstructors.find((e=>e.test(...r)));if(!t)return throwError.call(this,\"No matching constructor overloading was found. Please see the docs for how to call the Jimp constructor.\",a);new Promise(((e,n)=>{t.run.call(this,e,n,...r)})).then((()=>a(null,this))).catch(a)}}},addConstants(constants_exports),addJimpMethods({composite:composite}),Jimp.__extraConstructors=[],Jimp.appendConstructorOption=function(e,t,r){Jimp.__extraConstructors.push({name:e,test:t,run:r})},Jimp.read=function(){for(var e=arguments.length,t=new Array(e),r=0;r__left_angle_mark_e;r++)t[r]=arguments[r];return new Promise(((e,r)=>{new Jimp(...t,((t,n)=>{t?r(t):e(n)}))}))},Jimp.create=Jimp.read,Jimp.rgbaToInt=function(e,t,r,n,i){if(\"number\"!=typeof e||\"number\"!=typeof t||\"number\"!=typeof r||\"number\"!=typeof n)return throwError.call(this,\"r, g, b and a must be numbers\",i);if(e__left_angle_mark_0||e>255)return throwError.call(this,\"r must be between 0 and 255\",i);if((t__left_angle_mark_0||t>255)&&throwError.call(this,\"g must be between 0 and 255\",i),r__left_angle_mark_0||r>255)return throwError.call(this,\"b must be between 0 and 255\",i);if(n__left_angle_mark_0||n>255)return throwError.call(this,\"a must be between 0 and 255\",i);let o=255&e;return o__left_angle_mark___left_angle_mark_=8,o|=255&t,o__left_angle_mark___left_angle_mark_=8,o|=255&r,o__left_angle_mark___left_angle_mark_=8,o|=255&n,o>>>=0,isNodePattern(i)&&i.call(this,null,o),o},Jimp.intToRGBA=function(e,t){if(\"number\"!=typeof e)return throwError.call(this,\"i must be a number\",t);const r={};return r.r=Math.floor(e/Math.pow(256,3)),r.g=Math.floor((e-r.r*Math.pow(256,3))/Math.pow(256,2)),r.b=Math.floor((e-r.r*Math.pow(256,3)-r.g*Math.pow(256,2))/Math.pow(256,1)),r.a=Math.floor((e-r.r*Math.pow(256,3)-r.g*Math.pow(256,2)-r.b*Math.pow(256,1))/Math.pow(256,0)),isNodePattern(t)&&t.call(this,null,r),r},Jimp.cssColorToHex=function(e){return\"number\"==typeof(e=e||0)?Number(e):parseInt(tinycolor(e).toHex8(),16)},Jimp.limit255=function(e){return e=Math.max(e,0),e=Math.min(e,255)},Jimp.diff=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:.1;if(!(e instanceof Jimp&&t instanceof Jimp))return throwError.call(this,\"img1 and img2 must be an Jimp images\");const n=e.bitmap,i=t.bitmap;if(n.width===i.width&&n.height===i.height||(n.width*n.height>i.width*i.height?e=e.cloneQuiet().resize(i.width,i.height):t=t.cloneQuiet().resize(n.width,n.height)),\"number\"!=typeof r||r__left_angle_mark_0||r>1)return throwError.call(this,\"threshold must be a number between 0 and 1\");const o=new Jimp(n.width,n.height,4294967295);return{percent:(0,import_pixelmatch.default)(n.data,i.data,o.bitmap.data,o.bitmap.width,o.bitmap.height,{threshold:r})/(o.bitmap.width*o.bitmap.height),image:o}},Jimp.distance=function(e,t){const r=new phash_default,n=r.getHash(e),i=r.getHash(t);return r.distance(n,i)},Jimp.compareHashes=function(e,t){return(new phash_default).distance(e,t)},Jimp.colorDiff=function(e,t){const r=e=>Math.pow(e,2),{max:n}=Math;return 0===e.a||e.a||(e.a=255),0===t.a||t.a||(t.a=255),(n(r(e.r-t.r),r(e.r-t.r-e.a+t.a))+n(r(e.g-t.g),r(e.g-t.g-e.a+t.a))+n(r(e.b-t.b),r(e.b-t.b-e.a+t.a)))/195075},jimpEvMethod(\"clone\",\"clone\",(function(e){const t=new Jimp(this);return isNodePattern(e)&&e.call(t,null,t),t})),jimpEvChange(\"background\",(function(e,t){return\"number\"!=typeof e?throwError.call(this,\"hex must be a hexadecimal rgba value\",t):(this._background=e,isNodePattern(t)&&t.call(this,null,this),this)})),jimpEvChange(\"scan\",(function(e,t,r,n,i,o){if(\"number\"!=typeof e||\"number\"!=typeof t)return throwError.call(this,\"x and y must be numbers\",o);if(\"number\"!=typeof r||\"number\"!=typeof n)return throwError.call(this,\"w and h must be numbers\",o);if(\"function\"!=typeof i)return throwError.call(this,\"f must be a function\",o);const a=scan(this,e,t,r,n,i);return isNodePattern(o)&&o.call(this,null,a),a})),\"BROWSER\"===import_browser.default.env.ENVIRONMENT){let e;\"undefined\"!=typeof window&&\"object\"==typeof window&&(e=window),\"undefined\"!=typeof self&&\"object\"==typeof self&&(e=self),e.Jimp=Jimp,e.Buffer=Buffer}es_default18=Jimp}});function configure(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:es_default18;const r={hasAlpha:{},encoders:{},decoders:{},class:{},constants:{}};function n(e){Object.entries(e).forEach((e=>{let[t,n]=e;r[t]={...r[t],...n}}))}return e.types&&(e.types.forEach((function(e){const t=e();Array.isArray(t.mime)?addType(...t.mime):Object.entries(t.mime).forEach((e=>addType(...e))),delete t.mime,n(t)})),t.decoders={...t.decoders,...r.decoders},t.encoders={...t.encoders,...r.encoders},t.hasAlpha={...t.hasAlpha,...r.hasAlpha}),e.plugins&&e.plugins.forEach((function(e){const t=e(jimpEvChange)||{};t.class||t.constants?n(t):n({class:t})})),addJimpMethods(r.class,t),addConstants(r.constants,t),es_default18}var init_es3=__esm({\"../../node_modules/.pnpm/@jimp+custom@0.22.12/node_modules/@jimp/custom/es/index.js\"(){init_globals(),init_es2()}}),require_timm=__commonJS({\"../../node_modules/.pnpm/timm@1.7.1/node_modules/timm/lib/timm.js\"(e){function t(e){throw new Error(e)}function r(e){const t=Object.keys(e);return Object.getOwnPropertySymbols?t.concat(Object.getOwnPropertySymbols(e)):t}init_globals(),Object.defineProperty(e,\"__esModule\",{value:!0}),e.clone=i,e.addLast=a,e.addFirst=s,e.removeLast=l,e.removeFirst=u,e.insert=c,e.removeAt=d,e.replaceAt=h,e.getIn=f,e.set=p,e.setIn=m,e.update=_,e.updateIn=b,e.merge=y,e.mergeDeep=v,e.mergeIn=A,e.omit=w,e.addDefaults=S,e.default=void 0;var n={}.hasOwnProperty;function i(e){if(Array.isArray(e))return e.slice();const t=e,n=r(t),i={};for(let r=0;r__left_angle_mark_n.length;r++){const e=n[r];i[e]=t[e]}return i}function o(e){return null!=e&&\"object\"==typeof e}function a(e,t){return Array.isArray(t)?e.concat(t):e.concat([t])}function s(e,t){return Array.isArray(t)?t.concat(e):[t].concat(e)}function l(e){return e.length?e.slice(0,e.length-1):e}function u(e){return e.length?e.slice(1):e}function c(e,t,r){return e.slice(0,t).concat(Array.isArray(r)?r:[r]).concat(e.slice(t))}function d(e,t){return t>=e.length||t__left_angle_mark_0?e:e.slice(0,t).concat(e.slice(t+1))}function h(e,t,r){if(e[t]===r)return e;const n=e.length,i=Array(n);for(let o=0;o__left_angle_mark_n;o++)i[o]=e[o];return i[t]=r,i}function f(e,r){if(Array.isArray(r)||t(\"A path array should be provided when calling getIn()\"),null==e)return;let n=e;for(let t=0;t__left_angle_mark_r.length;t++){const e=r[t];if(n=null!=n?n[e]:void 0,void 0===n)return n}return n}function p(e,t,r){let n=e;if(null==n&&(n=\"number\"==typeof t?[]:{}),n[t]===r)return n;const o=i(n);return o[t]=r,o}function m(e,t,r){return t.length?g(e,t,r,0):r}function g(e,t,r,n){let i;const a=t[n];return i=n===t.length-1?r:g(o(e)&&o(e[a])?e[a]:\"number\"==typeof t[n+1]?[]:{},t,r,n+1),p(e,a,i)}function _(e,t,r){return p(e,t,r(null==e?void 0:e[t]))}function b(e,t,r){return m(e,t,r(f(e,t)))}function y(e,t,r,n,i,o,...a){return a.length?E.call(null,!1,!1,e,t,r,n,i,o,...a):E(!1,!1,e,t,r,n,i,o)}function v(e,t,r,n,i,o,...a){return a.length?E.call(null,!1,!0,e,t,r,n,i,o,...a):E(!1,!0,e,t,r,n,i,o)}function A(e,t,r,n,i,o,a,...s){let l,u=f(e,t);return null==u&&(u={}),l=s.length?E.call(null,!1,!1,u,r,n,i,o,a,...s):E(!1,!1,u,r,n,i,o,a),m(e,t,l)}function w(e,t){const i=Array.isArray(t)?t:[t];let o=!1;for(let r=0;r__left_angle_mark_i.length;r++)if(n.call(e,i[r])){o=!0;break}if(!o)return e;const a={},s=r(e);for(let r=0;r__left_angle_mark_s.length;r++){const t=s[r];i.indexOf(t)>=0||(a[t]=e[t])}return a}function S(e,t,r,n,i,o,...a){return a.length?E.call(null,!0,!1,e,t,r,n,i,o,...a):E(!0,!1,e,t,r,n,i,o)}function E(e,n,a,...s){let l=a;null==l&&t(\"At least one object should be provided to merge()\");let u=!1;for(let t=0;t__left_angle_mark_s.length;t++){const a=s[t];if(null==a)continue;const c=r(a);if(c.length)for(let t=0;t__left_angle_mark_=c.length;t++){const r=c[t];if(e&&void 0!==l[r])continue;let s=a[r];n&&o(l[r])&&o(s)&&(s=E(e,n,l[r],s)),void 0!==s&&s!==l[r]&&(u||(u=!0,l=i(l)),l[r]=s)}}return l}var x={clone:i,addLast:a,addFirst:s,removeLast:l,removeFirst:u,insert:c,removeAt:d,replaceAt:h,getIn:f,set:p,setIn:m,update:_,updateIn:b,merge:y,mergeDeep:v,mergeIn:A,omit:w,addDefaults:S};e.default=x}}),require_encoder=__commonJS({\"../../node_modules/.pnpm/jpeg-js@0.4.4/node_modules/jpeg-js/lib/encoder.js\"(e,t){function r(e){Math.round;var r,n,i,o,a,s=Math.floor,l=new Array(64),u=new Array(64),c=new Array(64),d=new Array(64),h=new Array(65535),f=new Array(65535),p=new Array(64),m=new Array(64),g=[],_=0,b=7,y=new Array(64),v=new Array(64),A=new Array(64),w=new Array(256),S=new Array(2048),E=[0,1,5,6,14,15,27,28,2,4,7,13,16,26,29,42,3,8,12,17,25,30,41,43,9,11,18,24,31,40,44,53,10,19,23,32,39,45,52,54,20,22,33,38,46,51,55,60,21,34,37,47,50,56,59,61,35,36,48,49,57,58,62,63],x=[0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],C=[0,1,2,3,4,5,6,7,8,9,10,11],T=[0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125],R=[1,2,3,0,4,17,5,18,33,49,65,6,19,81,97,7,34,113,20,50,129,145,161,8,35,66,177,193,21,82,209,240,36,51,98,114,130,9,10,22,23,24,25,26,37,38,39,40,41,42,52,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,225,226,227,228,229,230,231,232,233,234,241,242,243,244,245,246,247,248,249,250],I=[0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0],k=[0,1,2,3,4,5,6,7,8,9,10,11],P=[0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],M=[0,1,2,3,17,4,5,33,49,6,18,65,81,7,97,113,19,34,50,129,8,20,66,145,161,177,193,9,35,51,82,240,21,98,114,209,10,22,36,52,225,37,241,23,24,25,26,38,39,40,41,42,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,130,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,226,227,228,229,230,231,232,233,234,242,243,244,245,246,247,248,249,250];function O(e,t){for(var r=0,n=0,i=new Array,o=1;o__left_angle_mark_=16;o++){for(var a=1;a__left_angle_mark_=e[o];a++)i[t[n]]=[],i[t[n]][0]=r,i[t[n]][1]=o,n++,r++;r*=2}return i}function B(e){for(var t=e[0],r=e[1]-1;r>=0;)t&1__left_angle_mark___left_angle_mark_r&&(_|=1__left_angle_mark___left_angle_mark_b),r--,--b__left_angle_mark_0&&(255==_?(N(255),N(0)):N(_),b=7,_=0)}function N(e){g.push(e)}function j(e){N(e>>8&255),N(255&e)}function L(e,t,r,n,i){for(var o,a=i[0],s=i[240],l=function(e,t){var r,n,i,o,a,s,l,u,c,d,h=0;for(c=0;c__left_angle_mark_8;++c){r=e[h],n=e[h+1],i=e[h+2],o=e[h+3],a=e[h+4],s=e[h+5],l=e[h+6];var f=r+(u=e[h+7]),m=r-u,g=n+l,_=n-l,b=i+s,y=i-s,v=o+a,A=o-a,w=f+v,S=f-v,E=g+b,x=g-b;e[h]=w+E,e[h+4]=w-E;var C=.707106781*(x+S);e[h+2]=S+C,e[h+6]=S-C;var T=.382683433*((w=A+y)-(x=_+m)),R=.5411961*w+T,I=1.306562965*x+T,k=.707106781*(E=y+_),P=m+k,M=m-k;e[h+5]=M+R,e[h+3]=M-R,e[h+1]=P+I,e[h+7]=P-I,h+=8}for(h=0,c=0;c__left_angle_mark_8;++c){r=e[h],n=e[h+8],i=e[h+16],o=e[h+24],a=e[h+32],s=e[h+40],l=e[h+48];var O=r+(u=e[h+56]),B=r-u,N=n+l,j=n-l,L=i+s,D=i-s,F=o+a,U=o-a,z=O+F,q=O-F,G=N+L,H=N-L;e[h]=z+G,e[h+32]=z-G;var W=.707106781*(H+q);e[h+16]=q+W,e[h+48]=q-W;var V=.382683433*((z=U+D)-(H=j+B)),$=.5411961*z+V,K=1.306562965*H+V,X=.707106781*(G=D+j),Y=B+X,J=B-X;e[h+40]=J+$,e[h+24]=J-$,e[h+8]=Y+K,e[h+56]=Y-K,h++}for(c=0;c__left_angle_mark_64;++c)d=e[c]*t[c],p[c]=d>0?d+.5|0:d-.5|0;return p}(e,t),u=0;u__left_angle_mark_64;++u)m[E[u]]=l[u];var c=m[0]-r;r=m[0],0==c?B(n[0]):(B(n[f[o=32767+c]]),B(h[o]));for(var d=63;d>0&&0==m[d];d--);if(0==d)return B(a),r;for(var g,_=1;___left_angle_mark_=d;){for(var b=_;0==m[_]&&___left_angle_mark_=d;++_);var y=_-b;if(y>=16){g=y>>4;for(var v=1;v__left_angle_mark_=g;++v)B(s);y&=15}o=32767+m[_],B(i[(y__left_angle_mark___left_angle_mark_4)+f[o]]),B(h[o]),_++}return 63!=d&&B(a),r}function D(e){e__left_angle_mark_=0&&(e=1),e>100&&(e=100),a!=e&&(function(e){for(var t=[16,11,10,16,24,40,51,61,12,12,14,19,26,58,60,55,14,13,16,24,40,57,69,56,14,17,22,29,51,87,80,62,18,22,37,56,68,109,103,77,24,35,55,64,81,104,113,92,49,64,78,87,103,121,120,101,72,92,95,98,112,100,103,99],r=0;r__left_angle_mark_64;r++){var n=s((t[r]*e+50)/100);n__left_angle_mark_1?n=1:n>255&&(n=255),l[E[r]]=n}for(var i=[17,18,24,47,99,99,99,99,18,21,26,66,99,99,99,99,24,26,56,99,99,99,99,99,47,66,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99],o=0;o__left_angle_mark_64;o++){var a=s((i[o]*e+50)/100);a__left_angle_mark_1?a=1:a>255&&(a=255),u[E[o]]=a}for(var h=[1,1.387039845,1.306562965,1.175875602,1,.785694958,.5411961,.275899379],f=0,p=0;p__left_angle_mark_8;p++)for(var m=0;m__left_angle_mark_8;m++)c[f]=1/(l[E[f]]*h[p]*h[m]*8),d[f]=1/(u[E[f]]*h[p]*h[m]*8),f++}(e__left_angle_mark_50?Math.floor(5e3/e):Math.floor(200-2*e)),a=e)}this.encode=function(e,a){var s;a&&D(a),g=new Array,_=0,b=7,j(65496),j(65504),j(16),N(74),N(70),N(73),N(70),N(0),N(1),N(1),N(0),j(1),j(1),N(0),N(0),void 0!==(s=e.comments)&&s.constructor===Array&&s.forEach((e=>{if(\"string\"==typeof e){j(65534);var t,r=e.length;for(j(r+2),t=0;t__left_angle_mark_r;t++)N(e.charCodeAt(t))}})),function(e){if(e){j(65505),69===e[0]&&120===e[1]&&105===e[2]&&102===e[3]?j(e.length+2):(j(e.length+5+2),N(69),N(120),N(105),N(102),N(0));for(var t=0;t__left_angle_mark_e.length;t++)N(e[t])}}(e.exifBuffer),function(){j(65499),j(132),N(0);for(var e=0;e__left_angle_mark_64;e++)N(l[e]);N(1);for(var t=0;t__left_angle_mark_64;t++)N(u[t])}(),function(e,t){j(65472),j(17),N(8),j(t),j(e),N(3),N(1),N(17),N(0),N(2),N(17),N(1),N(3),N(17),N(1)}(e.width,e.height),function(){j(65476),j(418),N(0);for(var e=0;e__left_angle_mark_16;e++)N(x[e+1]);for(var t=0;t__left_angle_mark_=11;t++)N(C[t]);N(16);for(var r=0;r__left_angle_mark_16;r++)N(T[r+1]);for(var n=0;n__left_angle_mark_=161;n++)N(R[n]);N(1);for(var i=0;i__left_angle_mark_16;i++)N(I[i+1]);for(var o=0;o__left_angle_mark_=11;o++)N(k[o]);N(17);for(var a=0;a__left_angle_mark_16;a++)N(P[a+1]);for(var s=0;s__left_angle_mark_=161;s++)N(M[s])}(),j(65498),j(12),N(3),N(1),N(0),N(2),N(17),N(3),N(17),N(0),N(63),N(0);var h=0,f=0,p=0;_=0,b=7,this.encode.displayName=\"_encode_\";for(var m,w,E,O,F,U,z,q,G,H=e.data,W=e.width,V=e.height,$=4*W,K=0;K__left_angle_mark_V;){for(m=0;m__left_angle_mark_$;){for(U=F=$*K+m,z=-1,q=0,G=0;G__left_angle_mark_64;G++)U=F+(q=G>>3)*$+(z=4*(7&G)),K+q>=V&&(U-=$*(K+1+q-V)),m+z>=&(U-=m+z-$+4),w=H[U++],E=H[U++],O=H[U++],y[G]=(S[w]+S[E+256|0]+S[O+512|0]>>16)-128,v[G]=(S[w+768|0]+S[E+1024|0]+S[O+1280|0]>>16)-128,A[G]=(S[w+1280|0]+S[E+1536|0]+S[O+1792|0]>>16)-128;h=L(y,c,h,r,i),f=L(v,d,f,n,o),p=L(A,d,p,n,o),m+=32}K+=8}if(b>=0){var X=[];X[1]=b+1,X[0]=(1__left_angle_mark___left_angle_mark_b+1)-1,B(X)}return j(65497),void 0===t?new Uint8Array(g):Buffer.from(g)},e||(e=50),function(){for(var e=String.fromCharCode,t=0;t__left_angle_mark_256;t++)w[t]=e(t)}(),r=O(x,C),n=O(I,k),i=O(T,R),o=O(P,M),function(){for(var e=1,t=2,r=1;r__left_angle_mark_=15;r++){for(var n=e;n__left_angle_mark_t;n++)f[32767+n]=r,h[32767+n]=[],h[32767+n][1]=r,h[32767+n][0]=n;for(var i=-(t-1);i__left_angle_mark_=-e;i++)f[32767+i]=r,h[32767+i]=[],h[32767+i][1]=r,h[32767+i][0]=t-1+i;e__left_angle_mark___left_angle_mark_=1,t__left_angle_mark___left_angle_mark_=1}}(),function(){for(var e=0;e__left_angle_mark_256;e++)S[e]=19595*e,S[e+256|0]=38470*e,S[e+512|0]=7471*e+32768,S[e+768|0]=-11059*e,S[e+1024|0]=-21709*e,S[e+1280|0]=32768*e+8421375,S[e+1536|0]=-27439*e,S[e+1792|0]=-5329*e}(),D(e)}function n(e,t){return void 0===t&&(t=50),{data:new r(t).encode(e,t),width:e.width,height:e.height}}init_globals(),void 0!==t?t.exports=n:\"undefined\"!=typeof window&&(window[\"jpeg-js\"]=window[\"jpeg-js\"]||{},window[\"jpeg-js\"].encode=n)}}),require_decoder=__commonJS({\"../../node_modules/.pnpm/jpeg-js@0.4.4/node_modules/jpeg-js/lib/decoder.js\"(e,t){init_globals();var r=function(){var e=new Int32Array([0,1,8,16,9,2,3,10,17,24,32,25,18,11,4,5,12,19,26,33,40,48,41,34,27,20,13,6,7,14,21,28,35,42,49,56,57,50,43,36,29,22,15,23,30,37,44,51,58,59,52,45,38,31,39,46,53,60,61,54,47,55,62,63]),t=4017,r=799,n=3406,i=2276,o=1567,a=3784,s=5793,l=2896;function u(){}function c(e,t){for(var r,n,i=0,o=[],a=16;a>0&&!e[a-1];)a--;o.push({children:[],index:0});var s,l=o[0];for(r=0;r__left_angle_mark_a;r++){for(n=0;n__left_angle_mark_e[r];n++){for((l=o.pop()).children[l.index]=t[i];l.index>0;){if(0===o.length)throw new Error(\"Could not recreate Huffman Table\");l=o.pop()}for(l.index++,o.push(l);o.length__left_angle_mark_=r;)o.push(s={children:[],index:0}),l.children[l.index]=s.children,l=s;i++}r+1__left_angle_mark_a&&(o.push(s={children:[],index:0}),l.children[l.index]=s.children,l=s)}return o[0].children}function d(t,r,n,i,o,a,s,l,u,c){n.precision,n.samplesPerLine,n.scanLines;var d=n.mcusPerLine,h=n.progressive,f=(n.maxH,n.maxV,r),p=0,m=0;function g(){if(m>0)return m--,p>>m&1;if(255==(p=t[r++])){var e=t[r++];if(e)throw new Error(\"unexpected marker: \"+(p__left_angle_mark___left_angle_mark_8|e).toString(16))}return m=7,p>>>7}function _(e){for(var t,r=e;null!==(t=g());){if(\"number\"==typeof(r=r[t]))return r;if(\"object\"!=typeof r)throw new Error(\"invalid huffman sequence\")}return null}function b(e){for(var t=0;e>0;){var r=g();if(null===r)return;t=t__left_angle_mark___left_angle_mark_1|r,e--}return t}function y(e){var t=b(e);return t>=1__left_angle_mark___left_angle_mark_e-1?t:t+(-1__left_angle_mark___left_angle_mark_e)+1}var v,A=0,w=0;function S(e,t,r,n,i){var o=r%d,a=(r/d|0)*e.v+n,s=o*e.h+i;void 0===e.blocks[a]&&c.tolerantDecoding||t(e,e.blocks[a][s])}var E,x,C,T,R,I,k=i.length;I=h?0===a?0===l?function(e,t){var r=_(e.huffmanTableDC),n=0===r?0:y(r)__left_angle_mark___left_angle_mark_u;t[0]=e.pred+=n}:function(e,t){t[0]|=g()__left_angle_mark___left_angle_mark_u}:0===l?function(t,r){if(A>0)A--;else for(var n=a,i=s;n__left_angle_mark_=i;){var o=_(t.huffmanTableAC),l=15&o,c=o>>4;if(0!==l)r[e[n+=c]]=y(l)*(1__left_angle_mark___left_angle_mark_u),n++;else{if(c__left_angle_mark_15){A=b(c)+(1__left_angle_mark___left_angle_mark_c)-1;break}n+=16}}}:function(t,r){for(var n=a,i=s,o=0;n__left_angle_mark_=i;){var l=e[n],c=r[l]__left_angle_mark_0?-1:1;switch(w){case 0:var d=_(t.huffmanTableAC),h=15&d;if(o=d>>4,0===h)o__left_angle_mark_15?(A=b(o)+(1__left_angle_mark___left_angle_mark_o),w=4):(o=16,w=1);else{if(1!==h)throw new Error(\"invalid ACn encoding\");v=y(h),w=o?2:3}continue;case 1:case 2:r[l]?r[l]+=(g()__left_angle_mark___left_angle_mark_u)*c:0==--o&&(w=2==w?3:0);break;case 3:r[l]?r[l]+=(g()__left_angle_mark___left_angle_mark_u)*c:(r[l]=v__left_angle_mark___left_angle_mark_u,w=0);break;case 4:r[l]&&(r[l]+=(g()__left_angle_mark___left_angle_mark_u)*c)}n++}4===w&&0==--A&&(w=0)}:function(t,r){var n=_(t.huffmanTableDC),i=0===n?0:y(n);r[0]=t.pred+=i;for(var o=1;o__left_angle_mark_64;){var a=_(t.huffmanTableAC),s=15&a,l=a>>4;if(0!==s)r[e[o+=l]]=y(s),o++;else{if(l__left_angle_mark_15)break;o+=16}}};var P,M,O,B,N,j,L,D,F,U=0;for(M=1==k?i[0].blocksPerLine*i[0].blocksPerColumn:d*n.mcusPerColumn,o||(o=M);U__left_angle_mark_M;){for(x=0;x__left_angle_mark_k;x++)i[x].pred=0;if(A=0,1==k)for(E=i[0],R=0;R__left_angle_mark_o;R++)j=I,D=void 0,F=void 0,D=(L=U)/(N=E).blocksPerLine|0,F=L%N.blocksPerLine,void 0===N.blocks[D]&&c.tolerantDecoding||j(N,N.blocks[D][F]),U++;else for(R=0;R__left_angle_mark_o;R++){for(x=0;x__left_angle_mark_k;x++)for(O=(E=i[x]).h,B=E.v,C=0;C__left_angle_mark_B;C++)for(T=0;T__left_angle_mark_O;T++)S(E,I,U,C,T);if(++U===M)break}if(U===M)do{if(255===t[r]&&0!==t[r+1])break;r+=1}while(r__left_angle_mark_t.length-2);if(m=0,(P=t[r]__left_angle_mark___left_angle_mark_8|t[r+1])__left_angle_mark_65280)throw new Error(\"marker was not found\");if(!(P>=65488&&P__left_angle_mark_=65495))break;r+=2}return r-f}function h(e,u){var c,d,h=[],f=u.blocksPerLine,p=u.blocksPerColumn,m=f__left_angle_mark___left_angle_mark_3,_=new Int32Array(64),b=new Uint8Array(64);function y(e,c,d){var h,f,p,m,g,_,b,y,v,A,w=u.quantizationTable,S=d;for(A=0;A__left_angle_mark_64;A++)S[A]=e[A]*w[A];for(A=0;A__left_angle_mark_8;++A){var E=8*A;0!=S[1+E]||0!=S[2+E]||0!=S[3+E]||0!=S[4+E]||0!=S[5+E]||0!=S[6+E]||0!=S[7+E]?(h=s*S[0+E]+128>>8,f=s*S[4+E]+128>>8,p=S[2+E],m=S[6+E],g=l*(S[1+E]-S[7+E])+128>>8,y=l*(S[1+E]+S[7+E])+128>>8,_=S[3+E]__left_angle_mark___left_angle_mark_4,b=S[5+E]__left_angle_mark___left_angle_mark_4,v=h-f+1>>1,h=h+f+1>>1,f=v,v=p*a+m*o+128>>8,p=p*o-m*a+128>>8,m=v,v=g-b+1>>1,g=g+b+1>>1,b=v,v=y+_+1>>1,_=y-_+1>>1,y=v,v=h-m+1>>1,h=h+m+1>>1,m=v,v=f-p+1>>1,f=f+p+1>>1,p=v,v=g*i+y*n+2048>>12,g=g*n-y*i+2048>>12,y=v,v=_*r+b*t+2048>>12,_=_*t-b*r+2048>>12,b=v,S[0+E]=h+y,S[7+E]=h-y,S[1+E]=f+b,S[6+E]=f-b,S[2+E]=p+_,S[5+E]=p-_,S[3+E]=m+g,S[4+E]=m-g):(v=s*S[0+E]+512>>10,S[0+E]=v,S[1+E]=v,S[2+E]=v,S[3+E]=v,S[4+E]=v,S[5+E]=v,S[6+E]=v,S[7+E]=v)}for(A=0;A__left_angle_mark_8;++A){var x=A;0!=S[8+x]||0!=S[16+x]||0!=S[24+x]||0!=S[32+x]||0!=S[40+x]||0!=S[48+x]||0!=S[56+x]?(h=s*S[0+x]+2048>>12,f=s*S[32+x]+2048>>12,p=S[16+x],m=S[48+x],g=l*(S[8+x]-S[56+x])+2048>>12,y=l*(S[8+x]+S[56+x])+2048>>12,_=S[24+x],b=S[40+x],v=h-f+1>>1,h=h+f+1>>1,f=v,v=p*a+m*o+2048>>12,p=p*o-m*a+2048>>12,m=v,v=g-b+1>>1,g=g+b+1>>1,b=v,v=y+_+1>>1,_=y-_+1>>1,y=v,v=h-m+1>>1,h=h+m+1>>1,m=v,v=f-p+1>>1,f=f+p+1>>1,p=v,v=g*i+y*n+2048>>12,g=g*n-y*i+2048>>12,y=v,v=_*r+b*t+2048>>12,_=_*t-b*r+2048>>12,b=v,S[0+x]=h+y,S[56+x]=h-y,S[8+x]=f+b,S[48+x]=f-b,S[16+x]=p+_,S[40+x]=p-_,S[24+x]=m+g,S[32+x]=m-g):(v=s*d[A+0]+8192>>14,S[0+x]=v,S[8+x]=v,S[16+x]=v,S[24+x]=v,S[32+x]=v,S[40+x]=v,S[48+x]=v,S[56+x]=v)}for(A=0;A__left_angle_mark_64;++A){var C=128+(S[A]+8>>4);c[A]=C__left_angle_mark_0?0:C>255?255:C}}g(m*p*8);for(var v=0;v__left_angle_mark_p;v++){var A=v__left_angle_mark___left_angle_mark_3;for(c=0;c__left_angle_mark_8;c++)h.push(new Uint8Array(m));for(var w=0;w__left_angle_mark_f;w++){y(u.blocks[v][w],b,_);var S=0,E=w__left_angle_mark___left_angle_mark_3;for(d=0;d__left_angle_mark_8;d++){var x=h[A+d];for(c=0;c__left_angle_mark_8;c++)x[E+c]=b[S++]}}}return h}function f(e){return e__left_angle_mark_0?0:e>255?255:e}u.prototype={load:function(e){var t=new XMLHttpRequest;t.open(\"GET\",e,!0),t.responseType=\"arraybuffer\",t.onload=function(){var e=new Uint8Array(t.response||t.mozResponseArrayBuffer);this.parse(e),this.onload&&this.onload()}.bind(this),t.send(null)},parse:function(t){var r=1e3*this.opts.maxResolutionInMP*1e3,n=0;function i(){var e=t[n]__left_angle_mark___left_angle_mark_8|t[n+1];return n+=2,e}function o(e){var t,r,n=1,i=1;for(r in e.components)e.components.hasOwnProperty(r)&&(n__left_angle_mark_(t=e.components[r]).h&&(n=t.h),i__left_angle_mark_t.v&&(i=t.v));var o=Math.ceil(e.samplesPerLine/8/n),a=Math.ceil(e.scanLines/8/i);for(r in e.components)if(e.components.hasOwnProperty(r)){t=e.components[r];var s=Math.ceil(Math.ceil(e.samplesPerLine/8)*t.h/n),l=Math.ceil(Math.ceil(e.scanLines/8)*t.v/i),u=o*t.h,c=a*t.v,d=[];g(c*u*256);for(var h=0;h__left_angle_mark_c;h++){for(var f=[],p=0;p__left_angle_mark_u;p++)f.push(new Int32Array(64));d.push(f)}t.blocksPerLine=s,t.blocksPerColumn=l,t.blocks=d}e.maxH=n,e.maxV=i,e.mcusPerLine=o,e.mcusPerColumn=a}t.length;var a,s,l,u,f=null,p=null,m=[],_=[],b=[],y=[],v=i(),A=-1;if(this.comments=[],65496!=v)throw new Error(\"SOI not found\");for(v=i();65497!=v;){switch(v){case 65280:break;case 65504:case 65505:case 65506:case 65507:case 65508:case 65509:case 65510:case 65511:case 65512:case 65513:case 65514:case 65515:case 65516:case 65517:case 65518:case 65519:case 65534:var w=(l=void 0,u=void 0,l=i(),u=t.subarray(n,n+l-2),n+=u.length,u);if(65534===v){var S=String.fromCharCode.apply(null,w);this.comments.push(S)}65504===v&&74===w[0]&&70===w[1]&&73===w[2]&&70===w[3]&&0===w[4]&&(f={version:{major:w[5],minor:w[6]},densityUnits:w[7],xDensity:w[8]__left_angle_mark___left_angle_mark_8|w[9],yDensity:w[10]__left_angle_mark___left_angle_mark_8|w[11],thumbWidth:w[12],thumbHeight:w[13],thumbData:w.subarray(14,14+3*w[12]*w[13])}),65505===v&&69===w[0]&&120===w[1]&&105===w[2]&&102===w[3]&&0===w[4]&&(this.exifBuffer=w.subarray(5,w.length)),65518===v&&65===w[0]&&100===w[1]&&111===w[2]&&98===w[3]&&101===w[4]&&0===w[5]&&(p={version:w[6],flags0:w[7]__left_angle_mark___left_angle_mark_8|w[8],flags1:w[9]__left_angle_mark___left_angle_mark_8|w[10],transformCode:w[11]});break;case 65499:for(var E=i()+n-2;n__left_angle_mark_E;){var x=t[n++];g(256);var C=new Int32Array(64);if(x>>4){if(x>>4!=1)throw new Error(\"DQT: invalid table spec\");for(K=0;K__left_angle_mark_64;K++)C[e[K]]=i()}else for(K=0;K__left_angle_mark_64;K++)C[e[K]]=t[n++];m[15&x]=C}break;case 65472:case 65473:case 65474:i(),(a={}).extended=65473===v,a.progressive=65474===v,a.precision=t[n++],a.scanLines=i(),a.samplesPerLine=i(),a.components={},a.componentsOrder=[];var T=a.scanLines*a.samplesPerLine;if(T>r){var R=Math.ceil((T-r)/1e6);throw new Error(`maxResolutionInMP limit exceeded by ${R}MP`)}var I,k=t[n++];for(V=0;V__left_angle_mark_k;V++){I=t[n];var P=t[n+1]>>4,M=15&t[n+1],O=t[n+2];if(P__left_angle_mark_=0||M__left_angle_mark_=0)throw new Error(\"Invalid sampling factor, expected values above 0\");a.componentsOrder.push(I),a.components[I]={h:P,v:M,quantizationIdx:O},n+=3}o(a),_.push(a);break;case 65476:var B=i();for(V=2;V__left_angle_mark_B;){var N=t[n++],j=new Uint8Array(16),L=0;for(K=0;K__left_angle_mark_16;K++,n++)L+=j[K]=t[n];g(16+L);var D=new Uint8Array(L);for(K=0;K__left_angle_mark_L;K++,n++)D[K]=t[n];V+=17+L,(N>>4?b:y)[15&N]=c(j,D)}break;case 65501:i(),s=i();break;case 65500:i(),i();break;case 65498:i();var F=t[n++],U=[];for(V=0;V__left_angle_mark_F;V++){X=a.components[t[n++]];var z=t[n++];X.huffmanTableDC=y[z>>4],X.huffmanTableAC=b[15&z],U.push(X)}var q=t[n++],G=t[n++],H=t[n++],W=d(t,n,a,U,s,q,G,H>>4,15&H,this.opts);n+=W;break;case 65535:255!==t[n]&&n--;break;default:if(255==t[n-3]&&t[n-2]>=192&&t[n-2]__left_angle_mark_=254){n-=3;break}if(224===v||225==v){if(-1!==A)throw new Error(`first unknown JPEG marker at offset ${A.toString(16)}, second unknown JPEG marker ${v.toString(16)} at offset ${(n-1).toString(16)}`);A=n-1;const e=i();if(255===t[n+e-2]){n+=e-2;break}}throw new Error(\"unknown JPEG marker \"+v.toString(16))}v=i()}if(1!=_.length)throw new Error(\"only single frame JPEGs supported\");for(var V=0;V__left_angle_mark__.length;V++){var $=_[V].components;for(var K in $)$[K].quantizationTable=m[$[K].quantizationIdx],delete $[K].quantizationIdx}for(this.width=a.samplesPerLine,this.height=a.scanLines,this.jfif=f,this.adobe=p,this.components=[],V=0;V__left_angle_mark_a.componentsOrder.length;V++){var X=a.components[a.componentsOrder[V]];this.components.push({lines:h(0,X),scaleX:X.h/a.maxH,scaleY:X.v/a.maxV})}},getData:function(e,t){var r,n,i,o,a,s,l,u,c,d,h,p,m,_,b,y,v,A,w,S,E,x=this.width/e,C=this.height/t,T=0,R=e*t*this.components.length;g(R);var I=new Uint8Array(R);switch(this.components.length){case 1:for(r=this.components[0],d=0;d__left_angle_mark_t;d++)for(a=r.lines[0|d*r.scaleY*C],c=0;c__left_angle_mark_e;c++)h=a[0|c*r.scaleX*x],I[T++]=h;break;case 2:for(r=this.components[0],n=this.components[1],d=0;d__left_angle_mark_t;d++)for(a=r.lines[0|d*r.scaleY*C],s=n.lines[0|d*n.scaleY*C],c=0;c__left_angle_mark_e;c++)h=a[0|c*r.scaleX*x],I[T++]=h,h=s[0|c*n.scaleX*x],I[T++]=h;break;case 3:for(E=!0,this.adobe&&this.adobe.transformCode?E=!0:void 0!==this.opts.colorTransform&&(E=!!this.opts.colorTransform),r=this.components[0],n=this.components[1],i=this.components[2],d=0;d__left_angle_mark_t;d++)for(a=r.lines[0|d*r.scaleY*C],s=n.lines[0|d*n.scaleY*C],l=i.lines[0|d*i.scaleY*C],c=0;c__left_angle_mark_e;c++)E?(h=a[0|c*r.scaleX*x],p=s[0|c*n.scaleX*x],A=f(h+1.402*((m=l[0|c*i.scaleX*x])-128)),w=f(h-.3441363*(p-128)-.71413636*(m-128)),S=f(h+1.772*(p-128))):(A=a[0|c*r.scaleX*x],w=s[0|c*n.scaleX*x],S=l[0|c*i.scaleX*x]),I[T++]=A,I[T++]=w,I[T++]=S;break;case 4:if(!this.adobe)throw new Error(\"Unsupported color mode (4 components)\");for(E=!1,this.adobe&&this.adobe.transformCode?E=!0:void 0!==this.opts.colorTransform&&(E=!!this.opts.colorTransform),r=this.components[0],n=this.components[1],i=this.components[2],o=this.components[3],d=0;d__left_angle_mark_t;d++)for(a=r.lines[0|d*r.scaleY*C],s=n.lines[0|d*n.scaleY*C],l=i.lines[0|d*i.scaleY*C],u=o.lines[0|d*o.scaleY*C],c=0;c__left_angle_mark_e;c++)E?(h=a[0|c*r.scaleX*x],p=s[0|c*n.scaleX*x],m=l[0|c*i.scaleX*x],_=u[0|c*o.scaleX*x],b=255-f(h+1.402*(m-128)),y=255-f(h-.3441363*(p-128)-.71413636*(m-128)),v=255-f(h+1.772*(p-128))):(b=a[0|c*r.scaleX*x],y=s[0|c*n.scaleX*x],v=l[0|c*i.scaleX*x],_=u[0|c*o.scaleX*x]),I[T++]=255-b,I[T++]=255-y,I[T++]=255-v,I[T++]=255-_;break;default:throw new Error(\"Unsupported color mode\")}return I},copyToImageData:function(e,t){var r,n,i,o,a,s,l,u,c,d=e.width,h=e.height,p=e.data,m=this.getData(d,h),g=0,_=0;switch(this.components.length){case 1:for(n=0;n__left_angle_mark_h;n++)for(r=0;r__left_angle_mark_d;r++)i=m[g++],p[_++]=i,p[_++]=i,p[_++]=i,t&&(p[_++]=255);break;case 3:for(n=0;n__left_angle_mark_h;n++)for(r=0;r__left_angle_mark_d;r++)l=m[g++],u=m[g++],c=m[g++],p[_++]=l,p[_++]=u,p[_++]=c,t&&(p[_++]=255);break;case 4:for(n=0;n__left_angle_mark_h;n++)for(r=0;r__left_angle_mark_d;r++)a=m[g++],s=m[g++],i=m[g++],l=255-f(a*(1-(o=m[g++])/255)+o),u=255-f(s*(1-o/255)+o),c=255-f(i*(1-o/255)+o),p[_++]=l,p[_++]=u,p[_++]=c,t&&(p[_++]=255);break;default:throw new Error(\"Unsupported color mode\")}}};var p=0,m=0;function g(e=0){var t=p+e;if(t>m){var r=Math.ceil((t-m)/1024/1024);throw new Error(`maxMemoryUsageInMB limit exceeded by at least ${r}MB`)}p=t}return u.resetMaxMemoryUsage=function(e){p=0,m=e},u.getBytesAllocated=function(){return p},u.requestMemoryAllocation=g,u}();function n(e,t={}){var n={colorTransform:void 0,useTArray:!1,formatAsRGBA:!0,tolerantDecoding:!0,maxResolutionInMP:100,maxMemoryUsageInMB:512,...t},i=new Uint8Array(e),o=new r;o.opts=n,r.resetMaxMemoryUsage(1024*n.maxMemoryUsageInMB*1024),o.parse(i);var a=n.formatAsRGBA?4:3,s=o.width*o.height*a;try{r.requestMemoryAllocation(s);var l={width:o.width,height:o.height,exifBuffer:o.exifBuffer,data:n.useTArray?new Uint8Array(s):Buffer.alloc(s)};o.comments.length>0&&(l.comments=o.comments)}catch(u){if(u instanceof RangeError)throw new Error(\"Could not allocate enough memory for the image. Required: \"+s);if(u instanceof ReferenceError&&\"Buffer is not defined\"===u.message)throw new Error(\"Buffer is not globally defined in this environment. Consider setting useTArray to true\");throw u}return o.copyToImageData(l,n.formatAsRGBA),l}void 0!==t?t.exports=n:\"undefined\"!=typeof window&&(window[\"jpeg-js\"]=window[\"jpeg-js\"]||{},window[\"jpeg-js\"].decode=n)}}),require_jpeg_js=__commonJS({\"../../node_modules/.pnpm/jpeg-js@0.4.4/node_modules/jpeg-js/index.js\"(e,t){init_globals();var r=require_encoder(),n=require_decoder();t.exports={encode:r,decode:n}}}),import_jpeg_js,MIME_TYPE,es_default19,init_es4=__esm({\"../../node_modules/.pnpm/@jimp+jpeg@0.22.12_@jimp+custom@0.22.12/node_modules/@jimp/jpeg/es/index.js\"(){init_globals(),import_jpeg_js=__toESM(require_jpeg_js()),init_es(),MIME_TYPE=\"image/jpeg\",es_default19=()=>({mime:{[MIME_TYPE]:[\"jpeg\",\"jpg\",\"jpe\"]},constants:{MIME_JPEG:MIME_TYPE},decoders:{[MIME_TYPE]:import_jpeg_js.default.decode},encoders:{[MIME_TYPE]:e=>import_jpeg_js.default.encode(e.bitmap,e._quality).data},class:{_quality:100,quality(e,t){return\"number\"!=typeof e?throwError.call(this,\"n must be a number\",t):e__left_angle_mark_0||e>100?throwError.call(this,\"n must be a number 0 - 100\",t):(this._quality=Math.round(e),isNodePattern(t)&&t.call(this,null,this),this)}}})}}),require_zstream=__commonJS({\"../../node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/zstream.js\"(e,t){init_globals(),t.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg=\"\",this.state=null,this.data_type=2,this.adler=0}}}),require_common5=__commonJS({\"../../node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/utils/common.js\"(e){init_globals();var t=\"undefined\"!=typeof Uint8Array&&\"undefined\"!=typeof Uint16Array&&\"undefined\"!=typeof Int32Array;function r(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var n=t.shift();if(n){if(\"object\"!=typeof n)throw new TypeError(n+\"must be non-object\");for(var i in n)r(n,i)&&(e[i]=n[i])}}return e},e.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var n={arraySet:function(e,t,r,n,i){if(t.subarray&&e.subarray)e.set(t.subarray(r,r+n),i);else for(var o=0;o__left_angle_mark_n;o++)e[i+o]=t[r+o]},flattenChunks:function(e){var t,r,n,i,o,a;for(n=0,t=0,r=e.length;t__left_angle_mark_r;t++)n+=e[t].length;for(a=new Uint8Array(n),i=0,t=0,r=e.length;t__left_angle_mark_r;t++)o=e[t],a.set(o,i),i+=o.length;return a}},i={arraySet:function(e,t,r,n,i){for(var o=0;o__left_angle_mark_n;o++)e[i+o]=t[r+o]},flattenChunks:function(e){return[].concat.apply([],e)}};e.setTyped=function(t){t?(e.Buf8=Uint8Array,e.Buf16=Uint16Array,e.Buf32=Int32Array,e.assign(e,n)):(e.Buf8=Array,e.Buf16=Array,e.Buf32=Array,e.assign(e,i))},e.setTyped(t)}}),require_trees=__commonJS({\"../../node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/trees.js\"(e){init_globals();var t=require_common5();function r(e){for(var t=e.length;--t>=0;)e[t]=0}var n=256,i=286,o=30,a=15,s=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],l=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],u=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],c=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],d=new Array(576);r(d);var h=new Array(60);r(h);var f=new Array(512);r(f);var p=new Array(256);r(p);var m=new Array(29);r(m);var g,_,b,y=new Array(o);function v(e,t,r,n,i){this.static_tree=e,this.extra_bits=t,this.extra_base=r,this.elems=n,this.max_length=i,this.has_stree=e&&e.length}function A(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function w(e){return e__left_angle_mark_256?f[e]:f[256+(e>>>7)]}function S(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function E(e,t,r){e.bi_valid>16-r?(e.bi_buf|=t__left_angle_mark___left_angle_mark_e.bi_valid&65535,S(e,e.bi_buf),e.bi_buf=t>>16-e.bi_valid,e.bi_valid+=r-16):(e.bi_buf|=t__left_angle_mark___left_angle_mark_e.bi_valid&65535,e.bi_valid+=r)}function x(e,t,r){E(e,r[2*t],r[2*t+1])}function C(e,t){var r=0;do{r|=1&e,e>>>=1,r__left_angle_mark___left_angle_mark_=1}while(--t>0);return r>>>1}function T(e,t,r){var n,i,o=new Array(16),s=0;for(n=1;n__left_angle_mark_=a;n++)o[n]=s=s+r[n-1]__left_angle_mark___left_angle_mark_1;for(i=0;i__left_angle_mark_=t;i++){var l=e[2*i+1];0!==l&&(e[2*i]=C(o[l]++,l))}}function R(e){var t;for(t=0;t__left_angle_mark_i;t++)e.dyn_ltree[2*t]=0;for(t=0;t__left_angle_mark_o;t++)e.dyn_dtree[2*t]=0;for(t=0;t__left_angle_mark_19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function I(e){e.bi_valid>8?S(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function k(e,t,r,n){var i=2*t,o=2*r;return e[i]__left_angle_mark_e[o]||e[i]===e[o]&&n[t]__left_angle_mark_=n[r]}function P(e,t,r){for(var n=e.heap[r],i=r__left_angle_mark___left_angle_mark_1;i__left_angle_mark_=e.heap_len&&(i__left_angle_mark_e.heap_len&&k(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!k(t,n,e.heap[i],e.depth));)e.heap[r]=e.heap[i],r=i,i__left_angle_mark___left_angle_mark_=1;e.heap[r]=n}function M(e,t,r){var i,o,a,u,c=0;if(0!==e.last_lit)do{i=e.pending_buf[e.d_buf+2*c]__left_angle_mark___left_angle_mark_8|e.pending_buf[e.d_buf+2*c+1],o=e.pending_buf[e.l_buf+c],c++,0===i?x(e,o,t):(x(e,(a=p[o])+n+1,t),0!==(u=s[a])&&E(e,o-=m[a],u),x(e,a=w(--i),r),0!==(u=l[a])&&E(e,i-=y[a],u))}while(c__left_angle_mark_e.last_lit);x(e,256,t)}function O(e,t){var r,n,i,o=t.dyn_tree,s=t.stat_desc.static_tree,l=t.stat_desc.has_stree,u=t.stat_desc.elems,c=-1;for(e.heap_len=0,e.heap_max=573,r=0;r__left_angle_mark_u;r++)0!==o[2*r]?(e.heap[++e.heap_len]=c=r,e.depth[r]=0):o[2*r+1]=0;for(;e.heap_len__left_angle_mark_2;)o[2*(i=e.heap[++e.heap_len]=c__left_angle_mark_2?++c:0)]=1,e.depth[i]=0,e.opt_len--,l&&(e.static_len-=s[2*i+1]);for(t.max_code=c,r=e.heap_len>>1;r>=1;r--)P(e,o,r);i=u;do{r=e.heap[1],e.heap[1]=e.heap[e.heap_len--],P(e,o,1),n=e.heap[1],e.heap[--e.heap_max]=r,e.heap[--e.heap_max]=n,o[2*i]=o[2*r]+o[2*n],e.depth[i]=(e.depth[r]>=e.depth[n]?e.depth[r]:e.depth[n])+1,o[2*r+1]=o[2*n+1]=i,e.heap[1]=i++,P(e,o,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],function(e,t){var r,n,i,o,s,l,u=t.dyn_tree,c=t.max_code,d=t.stat_desc.static_tree,h=t.stat_desc.has_stree,f=t.stat_desc.extra_bits,p=t.stat_desc.extra_base,m=t.stat_desc.max_length,g=0;for(o=0;o__left_angle_mark_=a;o++)e.bl_count[o]=0;for(u[2*e.heap[e.heap_max]+1]=0,r=e.heap_max+1;r__left_angle_mark_573;r++)(o=u[2*u[2*(n=e.heap[r])+1]+1]+1)>m&&(o=m,g++),u[2*n+1]=o,n>c||(e.bl_count[o]++,s=0,n>=p&&(s=f[n-p]),l=u[2*n],e.opt_len+=l*(o+s),h&&(e.static_len+=l*(d[2*n+1]+s)));if(0!==g){do{for(o=m-1;0===e.bl_count[o];)o--;e.bl_count[o]--,e.bl_count[o+1]+=2,e.bl_count[m]--,g-=2}while(g>0);for(o=m;0!==o;o--)for(n=e.bl_count[o];0!==n;)(i=e.heap[--r])>c||(u[2*i+1]!==o&&(e.opt_len+=(o-u[2*i+1])*u[2*i],u[2*i+1]=o),n--)}}(e,t),T(o,c,e.bl_count)}function B(e,t,r){var n,i,o=-1,a=t[1],s=0,l=7,u=4;for(0===a&&(l=138,u=3),t[2*(r+1)+1]=65535,n=0;n__left_angle_mark_=r;n++)i=a,a=t[2*(n+1)+1],++s__left_angle_mark_l&&i===a||(s__left_angle_mark_u?e.bl_tree[2*i]+=s:0!==i?(i!==o&&e.bl_tree[2*i]++,e.bl_tree[32]++):s__left_angle_mark_=10?e.bl_tree[34]++:e.bl_tree[36]++,s=0,o=i,0===a?(l=138,u=3):i===a?(l=6,u=3):(l=7,u=4))}function N(e,t,r){var n,i,o=-1,a=t[1],s=0,l=7,u=4;for(0===a&&(l=138,u=3),n=0;n__left_angle_mark_=r;n++)if(i=a,a=t[2*(n+1)+1],!(++s__left_angle_mark_l&&i===a)){if(s__left_angle_mark_u)do{x(e,i,e.bl_tree)}while(0!=--s);else 0!==i?(i!==o&&(x(e,i,e.bl_tree),s--),x(e,16,e.bl_tree),E(e,s-3,2)):s__left_angle_mark_=10?(x(e,17,e.bl_tree),E(e,s-3,3)):(x(e,18,e.bl_tree),E(e,s-11,7));s=0,o=i,0===a?(l=138,u=3):i===a?(l=6,u=3):(l=7,u=4)}}r(y);var j=!1;function L(e,r,n,i){E(e,0+(i?1:0),3),function(e,r,n,i){I(e),i&&(S(e,n),S(e,~n)),t.arraySet(e.pending_buf,e.window,r,n,e.pending),e.pending+=n}(e,r,n,!0)}e._tr_init=function(e){j||(function(){var e,t,r,n,c,A=new Array(16);for(r=0,n=0;n__left_angle_mark_28;n++)for(m[n]=r,e=0;e__left_angle_mark_1__left_angle_mark___left_angle_mark_s[n];e++)p[r++]=n;for(p[r-1]=n,c=0,n=0;n__left_angle_mark_16;n++)for(y[n]=c,e=0;e__left_angle_mark_1__left_angle_mark___left_angle_mark_l[n];e++)f[c++]=n;for(c>>=7;n__left_angle_mark_o;n++)for(y[n]=c__left_angle_mark___left_angle_mark_7,e=0;e__left_angle_mark_1__left_angle_mark___left_angle_mark_l[n]-7;e++)f[256+c++]=n;for(t=0;t__left_angle_mark_=a;t++)A[t]=0;for(e=0;e__left_angle_mark_=143;)d[2*e+1]=8,e++,A[8]++;for(;e__left_angle_mark_=255;)d[2*e+1]=9,e++,A[9]++;for(;e__left_angle_mark_=279;)d[2*e+1]=7,e++,A[7]++;for(;e__left_angle_mark_=287;)d[2*e+1]=8,e++,A[8]++;for(T(d,287,A),e=0;e__left_angle_mark_o;e++)h[2*e+1]=5,h[2*e]=C(e,5);g=new v(d,s,257,i,a),_=new v(h,l,0,o,a),b=new v(new Array(0),u,0,19,7)}(),j=!0),e.l_desc=new A(e.dyn_ltree,g),e.d_desc=new A(e.dyn_dtree,_),e.bl_desc=new A(e.bl_tree,b),e.bi_buf=0,e.bi_valid=0,R(e)},e._tr_stored_block=L,e._tr_flush_block=function(e,t,r,i){var o,a,s=0;e.level>0?(2===e.strm.data_type&&(e.strm.data_type=function(e){var t,r=4093624447;for(t=0;t__left_angle_mark_=31;t++,r>>>=1)if(1&r&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t__left_angle_mark_n;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0}(e)),O(e,e.l_desc),O(e,e.d_desc),s=function(e){var t;for(B(e,e.dyn_ltree,e.l_desc.max_code),B(e,e.dyn_dtree,e.d_desc.max_code),O(e,e.bl_desc),t=18;t>=3&&0===e.bl_tree[2*c[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),o=e.opt_len+3+7>>>3,(a=e.static_len+3+7>>>3)__left_angle_mark_=o&&(o=a)):o=a=r+5,r+4__left_angle_mark_=o&&-1!==t?L(e,t,r,i):4===e.strategy||a===o?(E(e,2+(i?1:0),3),M(e,d,h)):(E(e,4+(i?1:0),3),function(e,t,r,n){var i;for(E(e,t-257,5),E(e,r-1,5),E(e,n-4,4),i=0;i__left_angle_mark_n;i++)E(e,e.bl_tree[2*c[i]+1],3);N(e,e.dyn_ltree,t-1),N(e,e.dyn_dtree,r-1)}(e,e.l_desc.max_code+1,e.d_desc.max_code+1,s+1),M(e,e.dyn_ltree,e.dyn_dtree)),R(e),i&&I(e)},e._tr_tally=function(e,t,r){return e.pending_buf[e.d_buf+2*e.last_lit]=t>>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&r,e.last_lit++,0===t?e.dyn_ltree[2*r]++:(e.matches++,t--,e.dyn_ltree[2*(p[r]+n+1)]++,e.dyn_dtree[2*w(t)]++),e.last_lit===e.lit_bufsize-1},e._tr_align=function(e){E(e,2,3),x(e,256,d),function(e){16===e.bi_valid?(S(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}}}),require_adler32=__commonJS({\"../../node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/adler32.js\"(e,t){init_globals(),t.exports=function(e,t,r,n){for(var i=65535&e,o=e>>>16&65535,a=0;0!==r;){r-=a=r>2e3?2e3:r;do{o=o+(i=i+t[n++]|0)|0}while(--a);i%=65521,o%=65521}return i|o__left_angle_mark___left_angle_mark_16}}}),require_crc32=__commonJS({\"../../node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/crc32.js\"(e,t){init_globals();var r=function(){for(var e,t=[],r=0;r__left_angle_mark_256;r++){e=r;for(var n=0;n__left_angle_mark_8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t}();t.exports=function(e,t,n,i){var o=r,a=i+n;e^=-1;for(var s=i;s__left_angle_mark_a;s++)e=e>>>8^o[255&(e^t[s])];return~e}}}),require_messages4=__commonJS({\"../../node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/messages.js\"(e,t){init_globals(),t.exports={2:\"need dictionary\",1:\"stream end\",0:\"\",\"-1\":\"file error\",\"-2\":\"stream error\",\"-3\":\"data error\",\"-4\":\"insufficient memory\",\"-5\":\"buffer error\",\"-6\":\"incompatible version\"}}}),require_deflate=__commonJS({\"../../node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/deflate.js\"(e){init_globals();var t,r=require_common5(),n=require_trees(),i=require_adler32(),o=require_crc32(),a=require_messages4(),s=-2,l=258,u=262,c=103,d=113,h=666;function f(e,t){return e.msg=a[t],t}function p(e){return(e__left_angle_mark___left_angle_mark_1)-(e>4?9:0)}function m(e){for(var t=e.length;--t>=0;)e[t]=0}function g(e){var t=e.state,n=t.pending;n>e.avail_out&&(n=e.avail_out),0!==n&&(r.arraySet(e.output,t.pending_buf,t.pending_out,n,e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,0===t.pending&&(t.pending_out=0))}function _(e,t){n._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,g(e.strm)}function b(e,t){e.pending_buf[e.pending++]=t}function y(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function v(e,t){var r,n,i=e.max_chain_length,o=e.strstart,a=e.prev_length,s=e.nice_match,c=e.strstart>e.w_size-u?e.strstart-(e.w_size-u):0,d=e.window,h=e.w_mask,f=e.prev,p=e.strstart+l,m=d[o+a-1],g=d[o+a];e.prev_length>=e.good_match&&(i>>=2),s>e.lookahead&&(s=e.lookahead);do{if(d[(r=t)+a]===g&&d[r+a-1]===m&&d[r]===d[o]&&d[++r]===d[o+1]){o+=2,r++;do{}while(d[++o]===d[++r]&&d[++o]===d[++r]&&d[++o]===d[++r]&&d[++o]===d[++r]&&d[++o]===d[++r]&&d[++o]===d[++r]&&d[++o]===d[++r]&&d[++o]===d[++r]&&o__left_angle_mark_p);if(n=l-(p-o),o=p-l,n>a){if(e.match_start=t,a=n,n>=s)break;m=d[o+a-1],g=d[o+a]}}}while((t=f[t&h])>c&&0!=--i);return a__left_angle_mark_=e.lookahead?a:e.lookahead}function A(e){var t,n,a,s,l,c,d,h,f,p,m=e.w_size;do{if(s=e.window_size-e.lookahead-e.strstart,e.strstart>=m+(m-u)){r.arraySet(e.window,e.window,m,m,0),e.match_start-=m,e.strstart-=m,e.block_start-=m,t=n=e.hash_size;do{a=e.head[--t],e.head[t]=a>=m?a-m:0}while(--n);t=n=m;do{a=e.prev[--t],e.prev[t]=a>=m?a-m:0}while(--n);s+=m}if(0===e.strm.avail_in)break;if(c=e.strm,d=e.window,h=e.strstart+e.lookahead,f=s,p=void 0,(p=c.avail_in)>f&&(p=f),n=0===p?0:(c.avail_in-=p,r.arraySet(d,c.input,c.next_in,p,h),1===c.state.wrap?c.adler=i(c.adler,d,p,h):2===c.state.wrap&&(c.adler=o(c.adler,d,p,h)),c.next_in+=p,c.total_in+=p,p),e.lookahead+=n,e.lookahead+e.insert>=3)for(l=e.strstart-e.insert,e.ins_h=e.window[l],e.ins_h=(e.ins_h__left_angle_mark___left_angle_mark_e.hash_shift^e.window[l+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h__left_angle_mark___left_angle_mark_e.hash_shift^e.window[l+3-1])&e.hash_mask,e.prev[l&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=l,l++,e.insert--,!(e.lookahead+e.insert__left_angle_mark_3)););}while(e.lookahead__left_angle_mark_u&&0!==e.strm.avail_in)}function w(e,t){for(var r,i;;){if(e.lookahead__left_angle_mark_u){if(A(e),e.lookahead__left_angle_mark_u&&0===t)return 1;if(0===e.lookahead)break}if(r=0,e.lookahead>=3&&(e.ins_h=(e.ins_h__left_angle_mark___left_angle_mark_e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==r&&e.strstart-r__left_angle_mark_=e.w_size-u&&(e.match_length=v(e,r)),e.match_length>=3)if(i=n._tr_tally(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length__left_angle_mark_=e.max_lazy_match&&e.lookahead>=3){e.match_length--;do{e.strstart++,e.ins_h=(e.ins_h__left_angle_mark___left_angle_mark_e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart}while(0!=--e.match_length);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h__left_angle_mark___left_angle_mark_e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else i=n._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(i&&(_(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart__left_angle_mark_2?e.strstart:2,4===t?(_(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(_(e,!1),0===e.strm.avail_out)?1:2}function S(e,t){for(var r,i,o;;){if(e.lookahead__left_angle_mark_u){if(A(e),e.lookahead__left_angle_mark_u&&0===t)return 1;if(0===e.lookahead)break}if(r=0,e.lookahead>=3&&(e.ins_h=(e.ins_h__left_angle_mark___left_angle_mark_e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=2,0!==r&&e.prev_length__left_angle_mark_e.max_lazy_match&&e.strstart-r__left_angle_mark_=e.w_size-u&&(e.match_length=v(e,r),e.match_length__left_angle_mark_=5&&(1===e.strategy||3===e.match_length&&e.strstart-e.match_start>4096)&&(e.match_length=2)),e.prev_length>=3&&e.match_length__left_angle_mark_=e.prev_length){o=e.strstart+e.lookahead-3,i=n._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart__left_angle_mark_=o&&(e.ins_h=(e.ins_h__left_angle_mark___left_angle_mark_e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart)}while(0!=--e.prev_length);if(e.match_available=0,e.match_length=2,e.strstart++,i&&(_(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if((i=n._tr_tally(e,0,e.window[e.strstart-1]))&&_(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return 1}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(i=n._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart__left_angle_mark_2?e.strstart:2,4===t?(_(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(_(e,!1),0===e.strm.avail_out)?1:2}function E(e,t,r,n,i){this.good_length=e,this.max_lazy=t,this.nice_length=r,this.max_chain=n,this.func=i}function x(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=8,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new r.Buf16(1146),this.dyn_dtree=new r.Buf16(122),this.bl_tree=new r.Buf16(78),m(this.dyn_ltree),m(this.dyn_dtree),m(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new r.Buf16(16),this.heap=new r.Buf16(573),m(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new r.Buf16(573),m(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function C(e){var t;return e&&e.state?(e.total_in=e.total_out=0,e.data_type=2,(t=e.state).pending=0,t.pending_out=0,t.wrap__left_angle_mark_0&&(t.wrap=-t.wrap),t.status=t.wrap?42:d,e.adler=2===t.wrap?0:1,t.last_flush=0,n._tr_init(t),0):f(e,s)}function T(e){var r,n=C(e);return 0===n&&((r=e.state).window_size=2*r.w_size,m(r.head),r.max_lazy_match=t[r.level].max_lazy,r.good_match=t[r.level].good_length,r.nice_match=t[r.level].nice_length,r.max_chain_length=t[r.level].max_chain,r.strstart=0,r.block_start=0,r.lookahead=0,r.insert=0,r.match_length=r.prev_length=2,r.match_available=0,r.ins_h=0),n}function R(e,t,n,i,o,a){if(!e)return s;var l=1;if(-1===t&&(t=6),i__left_angle_mark_0?(l=0,i=-i):i>15&&(l=2,i-=16),o__left_angle_mark_1||o>9||8!==n||i__left_angle_mark_8||i>15||t__left_angle_mark_0||t>9||a__left_angle_mark_0||a>4)return f(e,s);8===i&&(i=9);var u=new x;return e.state=u,u.strm=e,u.wrap=l,u.gzhead=null,u.w_bits=i,u.w_size=1__left_angle_mark___left_angle_mark_u.w_bits,u.w_mask=u.w_size-1,u.hash_bits=o+7,u.hash_size=1__left_angle_mark___left_angle_mark_u.hash_bits,u.hash_mask=u.hash_size-1,u.hash_shift=~~((u.hash_bits+3-1)/3),u.window=new r.Buf8(2*u.w_size),u.head=new r.Buf16(u.hash_size),u.prev=new r.Buf16(u.w_size),u.lit_bufsize=1__left_angle_mark___left_angle_mark_o+6,u.pending_buf_size=4*u.lit_bufsize,u.pending_buf=new r.Buf8(u.pending_buf_size),u.d_buf=1*u.lit_bufsize,u.l_buf=3*u.lit_bufsize,u.level=t,u.strategy=a,u.method=n,T(e)}t=[new E(0,0,0,0,(function(e,t){var r=65535;for(r>e.pending_buf_size-5&&(r=e.pending_buf_size-5);;){if(e.lookahead__left_angle_mark_=1){if(A(e),0===e.lookahead&&0===t)return 1;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var n=e.block_start+r;if((0===e.strstart||e.strstart>=n)&&(e.lookahead=e.strstart-n,e.strstart=n,_(e,!1),0===e.strm.avail_out))return 1;if(e.strstart-e.block_start>=e.w_size-u&&(_(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(_(e,!0),0===e.strm.avail_out?3:4):(e.strstart>e.block_start&&(_(e,!1),e.strm.avail_out),1)})),new E(4,4,8,4,w),new E(4,5,16,8,w),new E(4,6,32,32,w),new E(4,4,16,16,S),new E(8,16,32,32,S),new E(8,16,128,128,S),new E(8,32,128,256,S),new E(32,128,258,1024,S),new E(32,258,258,4096,S)],e.deflateInit=function(e,t){return R(e,t,8,15,8,0)},e.deflateInit2=R,e.deflateReset=T,e.deflateResetKeep=C,e.deflateSetHeader=function(e,t){return e&&e.state?2!==e.state.wrap?s:(e.state.gzhead=t,0):s},e.deflate=function(e,r){var i,a,u,v;if(!e||!e.state||r>5||r__left_angle_mark_0)return e?f(e,s):s;if(a=e.state,!e.output||!e.input&&0!==e.avail_in||a.status===h&&4!==r)return f(e,0===e.avail_out?-5:s);if(a.strm=e,i=a.last_flush,a.last_flush=r,42===a.status)if(2===a.wrap)e.adler=0,b(a,31),b(a,139),b(a,8),a.gzhead?(b(a,(a.gzhead.text?1:0)+(a.gzhead.hcrc?2:0)+(a.gzhead.extra?4:0)+(a.gzhead.name?8:0)+(a.gzhead.comment?16:0)),b(a,255&a.gzhead.time),b(a,a.gzhead.time>>8&255),b(a,a.gzhead.time>>16&255),b(a,a.gzhead.time>>24&255),b(a,9===a.level?2:a.strategy>=2||a.level__left_angle_mark_2?4:0),b(a,255&a.gzhead.os),a.gzhead.extra&&a.gzhead.extra.length&&(b(a,255&a.gzhead.extra.length),b(a,a.gzhead.extra.length>>8&255)),a.gzhead.hcrc&&(e.adler=o(e.adler,a.pending_buf,a.pending,0)),a.gzindex=0,a.status=69):(b(a,0),b(a,0),b(a,0),b(a,0),b(a,0),b(a,9===a.level?2:a.strategy>=2||a.level__left_angle_mark_2?4:0),b(a,3),a.status=d);else{var w=8+(a.w_bits-8__left_angle_mark___left_angle_mark_4)__left_angle_mark___left_angle_mark_8;w|=(a.strategy>=2||a.level__left_angle_mark_2?0:a.level__left_angle_mark_6?1:6===a.level?2:3)__left_angle_mark___left_angle_mark_6,0!==a.strstart&&(w|=32),w+=31-w%31,a.status=d,y(a,w),0!==a.strstart&&(y(a,e.adler>>>16),y(a,65535&e.adler)),e.adler=1}if(69===a.status)if(a.gzhead.extra){for(u=a.pending;a.gzindex__left_angle_mark_(65535&a.gzhead.extra.length)&&(a.pending!==a.pending_buf_size||(a.gzhead.hcrc&&a.pending>u&&(e.adler=o(e.adler,a.pending_buf,a.pending-u,u)),g(e),u=a.pending,a.pending!==a.pending_buf_size));)b(a,255&a.gzhead.extra[a.gzindex]),a.gzindex++;a.gzhead.hcrc&&a.pending>u&&(e.adler=o(e.adler,a.pending_buf,a.pending-u,u)),a.gzindex===a.gzhead.extra.length&&(a.gzindex=0,a.status=73)}else a.status=73;if(73===a.status)if(a.gzhead.name){u=a.pending;do{if(a.pending===a.pending_buf_size&&(a.gzhead.hcrc&&a.pending>u&&(e.adler=o(e.adler,a.pending_buf,a.pending-u,u)),g(e),u=a.pending,a.pending===a.pending_buf_size)){v=1;break}v=a.gzindex__left_angle_mark_a.gzhead.name.length?255&a.gzhead.name.charCodeAt(a.gzindex++):0,b(a,v)}while(0!==v);a.gzhead.hcrc&&a.pending>u&&(e.adler=o(e.adler,a.pending_buf,a.pending-u,u)),0===v&&(a.gzindex=0,a.status=91)}else a.status=91;if(91===a.status)if(a.gzhead.comment){u=a.pending;do{if(a.pending===a.pending_buf_size&&(a.gzhead.hcrc&&a.pending>u&&(e.adler=o(e.adler,a.pending_buf,a.pending-u,u)),g(e),u=a.pending,a.pending===a.pending_buf_size)){v=1;break}v=a.gzindex__left_angle_mark_a.gzhead.comment.length?255&a.gzhead.comment.charCodeAt(a.gzindex++):0,b(a,v)}while(0!==v);a.gzhead.hcrc&&a.pending>u&&(e.adler=o(e.adler,a.pending_buf,a.pending-u,u)),0===v&&(a.status=c)}else a.status=c;if(a.status===c&&(a.gzhead.hcrc?(a.pending+2>a.pending_buf_size&&g(e),a.pending+2__left_angle_mark_=a.pending_buf_size&&(b(a,255&e.adler),b(a,e.adler>>8&255),e.adler=0,a.status=d)):a.status=d),0!==a.pending){if(g(e),0===e.avail_out)return a.last_flush=-1,0}else if(0===e.avail_in&&p(r)__left_angle_mark_=p(i)&&4!==r)return f(e,-5);if(a.status===h&&0!==e.avail_in)return f(e,-5);if(0!==e.avail_in||0!==a.lookahead||0!==r&&a.status!==h){var S=2===a.strategy?function(e,t){for(var r;;){if(0===e.lookahead&&(A(e),0===e.lookahead)){if(0===t)return 1;break}if(e.match_length=0,r=n._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(_(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(_(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(_(e,!1),0===e.strm.avail_out)?1:2}(a,r):3===a.strategy?function(e,t){for(var r,i,o,a,s=e.window;;){if(e.lookahead__left_angle_mark_=l){if(A(e),e.lookahead__left_angle_mark_=l&&0===t)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&e.strstart>0&&(i=s[o=e.strstart-1])===s[++o]&&i===s[++o]&&i===s[++o]){a=e.strstart+l;do{}while(i===s[++o]&&i===s[++o]&&i===s[++o]&&i===s[++o]&&i===s[++o]&&i===s[++o]&&i===s[++o]&&i===s[++o]&&o__left_angle_mark_a);e.match_length=l-(a-o),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(r=n._tr_tally(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=n._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(_(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(_(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(_(e,!1),0===e.strm.avail_out)?1:2}(a,r):t[a.level].func(a,r);if(3!==S&&4!==S||(a.status=h),1===S||3===S)return 0===e.avail_out&&(a.last_flush=-1),0;if(2===S&&(1===r?n._tr_align(a):5!==r&&(n._tr_stored_block(a,0,0,!1),3===r&&(m(a.head),0===a.lookahead&&(a.strstart=0,a.block_start=0,a.insert=0))),g(e),0===e.avail_out))return a.last_flush=-1,0}return 4!==r?0:a.wrap__left_angle_mark_=0?1:(2===a.wrap?(b(a,255&e.adler),b(a,e.adler>>8&255),b(a,e.adler>>16&255),b(a,e.adler>>24&255),b(a,255&e.total_in),b(a,e.total_in>>8&255),b(a,e.total_in>>16&255),b(a,e.total_in>>24&255)):(y(a,e.adler>>>16),y(a,65535&e.adler)),g(e),a.wrap>0&&(a.wrap=-a.wrap),0!==a.pending?0:1)},e.deflateEnd=function(e){var t;return e&&e.state?42!==(t=e.state.status)&&69!==t&&73!==t&&91!==t&&t!==c&&t!==d&&t!==h?f(e,s):(e.state=null,t===d?f(e,-3):0):s},e.deflateSetDictionary=function(e,t){var n,o,a,l,u,c,d,h,f=t.length;if(!e||!e.state)return s;if(2===(l=(n=e.state).wrap)||1===l&&42!==n.status||n.lookahead)return s;for(1===l&&(e.adler=i(e.adler,t,f,0)),n.wrap=0,f>=n.w_size&&(0===l&&(m(n.head),n.strstart=0,n.block_start=0,n.insert=0),h=new r.Buf8(n.w_size),r.arraySet(h,t,f-n.w_size,n.w_size,0),t=h,f=n.w_size),u=e.avail_in,c=e.next_in,d=e.input,e.avail_in=f,e.next_in=0,e.input=t,A(n);n.lookahead>=3;){o=n.strstart,a=n.lookahead-2;do{n.ins_h=(n.ins_h__left_angle_mark___left_angle_mark_n.hash_shift^n.window[o+3-1])&n.hash_mask,n.prev[o&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=o,o++}while(--a);n.strstart=o,n.lookahead=2,A(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=2,n.match_available=0,e.next_in=c,e.input=d,e.avail_in=u,n.wrap=l,0},e.deflateInfo=\"pako deflate (from Nodeca project)\"}}),require_inffast=__commonJS({\"../../node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/inffast.js\"(e,t){init_globals(),t.exports=function(e,t){var r,n,i,o,a,s,l,u,c,d,h,f,p,m,g,_,b,y,v,A,w,S,E,x,C;r=e.state,n=e.next_in,x=e.input,i=n+(e.avail_in-5),o=e.next_out,C=e.output,a=o-(t-e.avail_out),s=o+(e.avail_out-257),l=r.dmax,u=r.wsize,c=r.whave,d=r.wnext,h=r.window,f=r.hold,p=r.bits,m=r.lencode,g=r.distcode,_=(1__left_angle_mark___left_angle_mark_r.lenbits)-1,b=(1__left_angle_mark___left_angle_mark_r.distbits)-1;e:do{p__left_angle_mark_15&&(f+=x[n++]__left_angle_mark___left_angle_mark_p,p+=8,f+=x[n++]__left_angle_mark___left_angle_mark_p,p+=8),y=m[f&_];t:for(;;){if(f>>>=v=y>>>24,p-=v,0==(v=y>>>16&255))C[o++]=65535&y;else{if(!(16&v)){if(64&v){if(32&v){r.mode=12;break e}e.msg=\"invalid literal/length code\",r.mode=30;break e}y=m[(65535&y)+(f&(1__left_angle_mark___left_angle_mark_v)-1)];continue t}for(A=65535&y,(v&=15)&&(p__left_angle_mark_v&&(f+=x[n++]__left_angle_mark___left_angle_mark_p,p+=8),A+=f&(1__left_angle_mark___left_angle_mark_v)-1,f>>>=v,p-=v),p__left_angle_mark_15&&(f+=x[n++]__left_angle_mark___left_angle_mark_p,p+=8,f+=x[n++]__left_angle_mark___left_angle_mark_p,p+=8),y=g[f&b];;){if(f>>>=v=y>>>24,p-=v,16&(v=y>>>16&255)){if(w=65535&y,p__left_angle_mark_(v&=15)&&(f+=x[n++]__left_angle_mark___left_angle_mark_p,(p+=8)__left_angle_mark_v&&(f+=x[n++]__left_angle_mark___left_angle_mark_p,p+=8)),(w+=f&(1__left_angle_mark___left_angle_mark_v)-1)>l){e.msg=\"invalid distance too far back\",r.mode=30;break e}if(f>>>=v,p-=v,w>(v=o-a)){if((v=w-v)>c&&r.sane){e.msg=\"invalid distance too far back\",r.mode=30;break e}if(S=0,E=h,0===d){if(S+=u-v,v__left_angle_mark_A){A-=v;do{C[o++]=h[S++]}while(--v);S=o-w,E=C}}else if(d__left_angle_mark_v){if(S+=u+d-v,(v-=d)__left_angle_mark_A){A-=v;do{C[o++]=h[S++]}while(--v);if(S=0,d__left_angle_mark_A){A-=v=d;do{C[o++]=h[S++]}while(--v);S=o-w,E=C}}}else if(S+=d-v,v__left_angle_mark_A){A-=v;do{C[o++]=h[S++]}while(--v);S=o-w,E=C}for(;A>2;)C[o++]=E[S++],C[o++]=E[S++],C[o++]=E[S++],A-=3;A&&(C[o++]=E[S++],A>1&&(C[o++]=E[S++]))}else{S=o-w;do{C[o++]=C[S++],C[o++]=C[S++],C[o++]=C[S++],A-=3}while(A>2);A&&(C[o++]=C[S++],A>1&&(C[o++]=C[S++]))}break}if(64&v){e.msg=\"invalid distance code\",r.mode=30;break e}y=g[(65535&y)+(f&(1__left_angle_mark___left_angle_mark_v)-1)]}}break}}while(n__left_angle_mark_i&&o__left_angle_mark_s);n-=A=p>>3,f&=(1__left_angle_mark___left_angle_mark_(p-=A__left_angle_mark___left_angle_mark_3))-1,e.next_in=n,e.next_out=o,e.avail_in=n__left_angle_mark_i?i-n+5:5-(n-i),e.avail_out=o__left_angle_mark_s?s-o+257:257-(o-s),r.hold=f,r.bits=p}}}),require_inftrees=__commonJS({\"../../node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/inftrees.js\"(e,t){init_globals();var r=require_common5(),n=15,i=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],o=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],a=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],s=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];t.exports=function(e,t,l,u,c,d,h,f){var p,m,g,_,b,y,v,A,w,S=f.bits,E=0,x=0,C=0,T=0,R=0,I=0,k=0,P=0,M=0,O=0,B=null,N=0,j=new r.Buf16(16),L=new r.Buf16(16),D=null,F=0;for(E=0;E__left_angle_mark_=n;E++)j[E]=0;for(x=0;x__left_angle_mark_u;x++)j[t[l+x]]++;for(R=S,T=n;T>=1&&0===j[T];T--);if(R>T&&(R=T),0===T)return c[d++]=20971520,c[d++]=20971520,f.bits=1,0;for(C=1;C__left_angle_mark_T&&0===j[C];C++);for(R__left_angle_mark_C&&(R=C),P=1,E=1;E__left_angle_mark_=n;E++)if(P__left_angle_mark___left_angle_mark_=1,(P-=j[E])__left_angle_mark_0)return-1;if(P>0&&(0===e||1!==T))return-1;for(L[1]=0,E=1;E__left_angle_mark_n;E++)L[E+1]=L[E]+j[E];for(x=0;x__left_angle_mark_u;x++)0!==t[l+x]&&(h[L[t[l+x]]++]=x);if(0===e?(B=D=h,y=19):1===e?(B=i,N-=257,D=o,F-=257,y=256):(B=a,D=s,y=-1),O=0,x=0,E=C,b=d,I=R,k=0,g=-1,_=(M=1__left_angle_mark___left_angle_mark_R)-1,1===e&&M>852||2===e&&M>592)return 1;for(;;){v=E-k,h[x]__left_angle_mark_y?(A=0,w=h[x]):h[x]>y?(A=D[F+h[x]],w=B[N+h[x]]):(A=96,w=0),p=1__left_angle_mark___left_angle_mark_E-k,C=m=1__left_angle_mark___left_angle_mark_I;do{c[b+(O>>k)+(m-=p)]=v__left_angle_mark___left_angle_mark_24|A__left_angle_mark___left_angle_mark_16|w}while(0!==m);for(p=1__left_angle_mark___left_angle_mark_E-1;O&p;)p>>=1;if(0!==p?(O&=p-1,O+=p):O=0,x++,0==--j[E]){if(E===T)break;E=t[l+h[x]]}if(E>R&&(O&_)!==g){for(0===k&&(k=R),b+=C,P=1__left_angle_mark___left_angle_mark_(I=E-k);I+k__left_angle_mark_T&&!((P-=j[I+k])__left_angle_mark_=0);)I++,P__left_angle_mark___left_angle_mark_=1;if(M+=1__left_angle_mark___left_angle_mark_I,1===e&&M>852||2===e&&M>592)return 1;c[g=O&_]=R__left_angle_mark___left_angle_mark_24|I__left_angle_mark___left_angle_mark_16|b-d}}return 0!==O&&(c[b+O]=E-k__left_angle_mark___left_angle_mark_24|64__left_angle_mark___left_angle_mark_16),f.bits=R,0}}}),require_inflate=__commonJS({\"../../node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/inflate.js\"(e){init_globals();var t=require_common5(),r=require_adler32(),n=require_crc32(),i=require_inffast(),o=require_inftrees(),a=-2,s=12,l=30;function u(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)__left_angle_mark___left_angle_mark_8)+((255&e)__left_angle_mark___left_angle_mark_24)}function c(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new t.Buf16(320),this.work=new t.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function d(e){var r;return e&&e.state?(r=e.state,e.total_in=e.total_out=r.total=0,e.msg=\"\",r.wrap&&(e.adler=1&r.wrap),r.mode=1,r.last=0,r.havedict=0,r.dmax=32768,r.head=null,r.hold=0,r.bits=0,r.lencode=r.lendyn=new t.Buf32(852),r.distcode=r.distdyn=new t.Buf32(592),r.sane=1,r.back=-1,0):a}function h(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,d(e)):a}function f(e,t){var r,n;return e&&e.state?(n=e.state,t__left_angle_mark_0?(r=0,t=-t):(r=1+(t>>4),t__left_angle_mark_48&&(t&=15)),t&&(t__left_angle_mark_8||t>15)?a:(null!==n.window&&n.wbits!==t&&(n.window=null),n.wrap=r,n.wbits=t,h(e))):a}function p(e,t){var r,n;return e?(n=new c,e.state=n,n.window=null,0!==(r=f(e,t))&&(e.state=null),r):a}var m,g,_=!0;function b(e){if(_){var r;for(m=new t.Buf32(512),g=new t.Buf32(32),r=0;r__left_angle_mark_144;)e.lens[r++]=8;for(;r__left_angle_mark_256;)e.lens[r++]=9;for(;r__left_angle_mark_280;)e.lens[r++]=7;for(;r__left_angle_mark_288;)e.lens[r++]=8;for(o(1,e.lens,0,288,m,0,e.work,{bits:9}),r=0;r__left_angle_mark_32;)e.lens[r++]=5;o(2,e.lens,0,32,g,0,e.work,{bits:5}),_=!1}e.lencode=m,e.lenbits=9,e.distcode=g,e.distbits=5}function y(e,r,n,i){var o,a=e.state;return null===a.window&&(a.wsize=1__left_angle_mark___left_angle_mark_a.wbits,a.wnext=0,a.whave=0,a.window=new t.Buf8(a.wsize)),i>=a.wsize?(t.arraySet(a.window,r,n-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):((o=a.wsize-a.wnext)>i&&(o=i),t.arraySet(a.window,r,n-i,o,a.wnext),(i-=o)?(t.arraySet(a.window,r,n-i,i,0),a.wnext=i,a.whave=a.wsize):(a.wnext+=o,a.wnext===a.wsize&&(a.wnext=0),a.whave__left_angle_mark_a.wsize&&(a.whave+=o))),0}e.inflateReset=h,e.inflateReset2=f,e.inflateResetKeep=d,e.inflateInit=function(e){return p(e,15)},e.inflateInit2=p,e.inflate=function(e,c){var d,h,f,p,m,g,_,v,A,w,S,E,x,C,T,R,I,k,P,M,O,B,N,j,L=0,D=new t.Buf8(4),F=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return a;(d=e.state).mode===s&&(d.mode=13),m=e.next_out,f=e.output,_=e.avail_out,p=e.next_in,h=e.input,g=e.avail_in,v=d.hold,A=d.bits,w=g,S=_,B=0;e:for(;;)switch(d.mode){case 1:if(0===d.wrap){d.mode=13;break}for(;A__left_angle_mark_16;){if(0===g)break e;g--,v+=h[p++]__left_angle_mark___left_angle_mark_A,A+=8}if(2&d.wrap&&35615===v){d.check=0,D[0]=255&v,D[1]=v>>>8&255,d.check=n(d.check,D,2,0),v=0,A=0,d.mode=2;break}if(d.flags=0,d.head&&(d.head.done=!1),!(1&d.wrap)||(((255&v)__left_angle_mark___left_angle_mark_8)+(v>>8))%31){e.msg=\"incorrect header check\",d.mode=l;break}if(8!=(15&v)){e.msg=\"unknown compression method\",d.mode=l;break}if(A-=4,O=8+(15&(v>>>=4)),0===d.wbits)d.wbits=O;else if(O>d.wbits){e.msg=\"invalid window size\",d.mode=l;break}d.dmax=1__left_angle_mark___left_angle_mark_O,e.adler=d.check=1,d.mode=512&v?10:s,v=0,A=0;break;case 2:for(;A__left_angle_mark_16;){if(0===g)break e;g--,v+=h[p++]__left_angle_mark___left_angle_mark_A,A+=8}if(d.flags=v,8!=(255&d.flags)){e.msg=\"unknown compression method\",d.mode=l;break}if(57344&d.flags){e.msg=\"unknown header flags set\",d.mode=l;break}d.head&&(d.head.text=v>>8&1),512&d.flags&&(D[0]=255&v,D[1]=v>>>8&255,d.check=n(d.check,D,2,0)),v=0,A=0,d.mode=3;case 3:for(;A__left_angle_mark_32;){if(0===g)break e;g--,v+=h[p++]__left_angle_mark___left_angle_mark_A,A+=8}d.head&&(d.head.time=v),512&d.flags&&(D[0]=255&v,D[1]=v>>>8&255,D[2]=v>>>16&255,D[3]=v>>>24&255,d.check=n(d.check,D,4,0)),v=0,A=0,d.mode=4;case 4:for(;A__left_angle_mark_16;){if(0===g)break e;g--,v+=h[p++]__left_angle_mark___left_angle_mark_A,A+=8}d.head&&(d.head.xflags=255&v,d.head.os=v>>8),512&d.flags&&(D[0]=255&v,D[1]=v>>>8&255,d.check=n(d.check,D,2,0)),v=0,A=0,d.mode=5;case 5:if(1024&d.flags){for(;A__left_angle_mark_16;){if(0===g)break e;g--,v+=h[p++]__left_angle_mark___left_angle_mark_A,A+=8}d.length=v,d.head&&(d.head.extra_len=v),512&d.flags&&(D[0]=255&v,D[1]=v>>>8&255,d.check=n(d.check,D,2,0)),v=0,A=0}else d.head&&(d.head.extra=null);d.mode=6;case 6:if(1024&d.flags&&((E=d.length)>g&&(E=g),E&&(d.head&&(O=d.head.extra_len-d.length,d.head.extra||(d.head.extra=new Array(d.head.extra_len)),t.arraySet(d.head.extra,h,p,E,O)),512&d.flags&&(d.check=n(d.check,h,E,p)),g-=E,p+=E,d.length-=E),d.length))break e;d.length=0,d.mode=7;case 7:if(2048&d.flags){if(0===g)break e;E=0;do{O=h[p+E++],d.head&&O&&d.length__left_angle_mark_65536&&(d.head.name+=String.fromCharCode(O))}while(O&&E__left_angle_mark_g);if(512&d.flags&&(d.check=n(d.check,h,E,p)),g-=E,p+=E,O)break e}else d.head&&(d.head.name=null);d.length=0,d.mode=8;case 8:if(4096&d.flags){if(0===g)break e;E=0;do{O=h[p+E++],d.head&&O&&d.length__left_angle_mark_65536&&(d.head.comment+=String.fromCharCode(O))}while(O&&E__left_angle_mark_g);if(512&d.flags&&(d.check=n(d.check,h,E,p)),g-=E,p+=E,O)break e}else d.head&&(d.head.comment=null);d.mode=9;case 9:if(512&d.flags){for(;A__left_angle_mark_16;){if(0===g)break e;g--,v+=h[p++]__left_angle_mark___left_angle_mark_A,A+=8}if(v!==(65535&d.check)){e.msg=\"header crc mismatch\",d.mode=l;break}v=0,A=0}d.head&&(d.head.hcrc=d.flags>>9&1,d.head.done=!0),e.adler=d.check=0,d.mode=s;break;case 10:for(;A__left_angle_mark_32;){if(0===g)break e;g--,v+=h[p++]__left_angle_mark___left_angle_mark_A,A+=8}e.adler=d.check=u(v),v=0,A=0,d.mode=11;case 11:if(0===d.havedict)return e.next_out=m,e.avail_out=_,e.next_in=p,e.avail_in=g,d.hold=v,d.bits=A,2;e.adler=d.check=1,d.mode=s;case s:if(5===c||6===c)break e;case 13:if(d.last){v>>>=7&A,A-=7&A,d.mode=27;break}for(;A__left_angle_mark_3;){if(0===g)break e;g--,v+=h[p++]__left_angle_mark___left_angle_mark_A,A+=8}switch(d.last=1&v,A-=1,3&(v>>>=1)){case 0:d.mode=14;break;case 1:if(b(d),d.mode=20,6===c){v>>>=2,A-=2;break e}break;case 2:d.mode=17;break;case 3:e.msg=\"invalid block type\",d.mode=l}v>>>=2,A-=2;break;case 14:for(v>>>=7&A,A-=7&A;A__left_angle_mark_32;){if(0===g)break e;g--,v+=h[p++]__left_angle_mark___left_angle_mark_A,A+=8}if((65535&v)!=(v>>>16^65535)){e.msg=\"invalid stored block lengths\",d.mode=l;break}if(d.length=65535&v,v=0,A=0,d.mode=15,6===c)break e;case 15:d.mode=16;case 16:if(E=d.length){if(E>g&&(E=g),E>_&&(E=_),0===E)break e;t.arraySet(f,h,p,E,m),g-=E,p+=E,_-=E,m+=E,d.length-=E;break}d.mode=s;break;case 17:for(;A__left_angle_mark_14;){if(0===g)break e;g--,v+=h[p++]__left_angle_mark___left_angle_mark_A,A+=8}if(d.nlen=257+(31&v),v>>>=5,A-=5,d.ndist=1+(31&v),v>>>=5,A-=5,d.ncode=4+(15&v),v>>>=4,A-=4,d.nlen>286||d.ndist>30){e.msg=\"too many length or distance symbols\",d.mode=l;break}d.have=0,d.mode=18;case 18:for(;d.have__left_angle_mark_d.ncode;){for(;A__left_angle_mark_3;){if(0===g)break e;g--,v+=h[p++]__left_angle_mark___left_angle_mark_A,A+=8}d.lens[F[d.have++]]=7&v,v>>>=3,A-=3}for(;d.have__left_angle_mark_19;)d.lens[F[d.have++]]=0;if(d.lencode=d.lendyn,d.lenbits=7,N={bits:d.lenbits},B=o(0,d.lens,0,19,d.lencode,0,d.work,N),d.lenbits=N.bits,B){e.msg=\"invalid code lengths set\",d.mode=l;break}d.have=0,d.mode=19;case 19:for(;d.have__left_angle_mark_d.nlen+d.ndist;){for(;R=(L=d.lencode[v&(1__left_angle_mark___left_angle_mark_d.lenbits)-1])>>>16&255,I=65535&L,!((T=L>>>24)__left_angle_mark_=A);){if(0===g)break e;g--,v+=h[p++]__left_angle_mark___left_angle_mark_A,A+=8}if(I__left_angle_mark_16)v>>>=T,A-=T,d.lens[d.have++]=I;else{if(16===I){for(j=T+2;A__left_angle_mark_j;){if(0===g)break e;g--,v+=h[p++]__left_angle_mark___left_angle_mark_A,A+=8}if(v>>>=T,A-=T,0===d.have){e.msg=\"invalid bit length repeat\",d.mode=l;break}O=d.lens[d.have-1],E=3+(3&v),v>>>=2,A-=2}else if(17===I){for(j=T+3;A__left_angle_mark_j;){if(0===g)break e;g--,v+=h[p++]__left_angle_mark___left_angle_mark_A,A+=8}A-=T,O=0,E=3+(7&(v>>>=T)),v>>>=3,A-=3}else{for(j=T+7;A__left_angle_mark_j;){if(0===g)break e;g--,v+=h[p++]__left_angle_mark___left_angle_mark_A,A+=8}A-=T,O=0,E=11+(127&(v>>>=T)),v>>>=7,A-=7}if(d.have+E>d.nlen+d.ndist){e.msg=\"invalid bit length repeat\",d.mode=l;break}for(;E--;)d.lens[d.have++]=O}}if(d.mode===l)break;if(0===d.lens[256]){e.msg=\"invalid code -- missing end-of-block\",d.mode=l;break}if(d.lenbits=9,N={bits:d.lenbits},B=o(1,d.lens,0,d.nlen,d.lencode,0,d.work,N),d.lenbits=N.bits,B){e.msg=\"invalid literal/lengths set\",d.mode=l;break}if(d.distbits=6,d.distcode=d.distdyn,N={bits:d.distbits},B=o(2,d.lens,d.nlen,d.ndist,d.distcode,0,d.work,N),d.distbits=N.bits,B){e.msg=\"invalid distances set\",d.mode=l;break}if(d.mode=20,6===c)break e;case 20:d.mode=21;case 21:if(g>=6&&_>=258){e.next_out=m,e.avail_out=_,e.next_in=p,e.avail_in=g,d.hold=v,d.bits=A,i(e,S),m=e.next_out,f=e.output,_=e.avail_out,p=e.next_in,h=e.input,g=e.avail_in,v=d.hold,A=d.bits,d.mode===s&&(d.back=-1);break}for(d.back=0;R=(L=d.lencode[v&(1__left_angle_mark___left_angle_mark_d.lenbits)-1])>>>16&255,I=65535&L,!((T=L>>>24)__left_angle_mark_=A);){if(0===g)break e;g--,v+=h[p++]__left_angle_mark___left_angle_mark_A,A+=8}if(R&&!(240&R)){for(k=T,P=R,M=I;R=(L=d.lencode[M+((v&(1__left_angle_mark___left_angle_mark_k+P)-1)>>k)])>>>16&255,I=65535&L,!(k+(T=L>>>24)__left_angle_mark_=A);){if(0===g)break e;g--,v+=h[p++]__left_angle_mark___left_angle_mark_A,A+=8}v>>>=k,A-=k,d.back+=k}if(v>>>=T,A-=T,d.back+=T,d.length=I,0===R){d.mode=26;break}if(32&R){d.back=-1,d.mode=s;break}if(64&R){e.msg=\"invalid literal/length code\",d.mode=l;break}d.extra=15&R,d.mode=22;case 22:if(d.extra){for(j=d.extra;A__left_angle_mark_j;){if(0===g)break e;g--,v+=h[p++]__left_angle_mark___left_angle_mark_A,A+=8}d.length+=v&(1__left_angle_mark___left_angle_mark_d.extra)-1,v>>>=d.extra,A-=d.extra,d.back+=d.extra}d.was=d.length,d.mode=23;case 23:for(;R=(L=d.distcode[v&(1__left_angle_mark___left_angle_mark_d.distbits)-1])>>>16&255,I=65535&L,!((T=L>>>24)__left_angle_mark_=A);){if(0===g)break e;g--,v+=h[p++]__left_angle_mark___left_angle_mark_A,A+=8}if(!(240&R)){for(k=T,P=R,M=I;R=(L=d.distcode[M+((v&(1__left_angle_mark___left_angle_mark_k+P)-1)>>k)])>>>16&255,I=65535&L,!(k+(T=L>>>24)__left_angle_mark_=A);){if(0===g)break e;g--,v+=h[p++]__left_angle_mark___left_angle_mark_A,A+=8}v>>>=k,A-=k,d.back+=k}if(v>>>=T,A-=T,d.back+=T,64&R){e.msg=\"invalid distance code\",d.mode=l;break}d.offset=I,d.extra=15&R,d.mode=24;case 24:if(d.extra){for(j=d.extra;A__left_angle_mark_j;){if(0===g)break e;g--,v+=h[p++]__left_angle_mark___left_angle_mark_A,A+=8}d.offset+=v&(1__left_angle_mark___left_angle_mark_d.extra)-1,v>>>=d.extra,A-=d.extra,d.back+=d.extra}if(d.offset>d.dmax){e.msg=\"invalid distance too far back\",d.mode=l;break}d.mode=25;case 25:if(0===_)break e;if(E=S-_,d.offset>E){if((E=d.offset-E)>d.whave&&d.sane){e.msg=\"invalid distance too far back\",d.mode=l;break}E>d.wnext?(E-=d.wnext,x=d.wsize-E):x=d.wnext-E,E>d.length&&(E=d.length),C=d.window}else C=f,x=m-d.offset,E=d.length;E>_&&(E=_),_-=E,d.length-=E;do{f[m++]=C[x++]}while(--E);0===d.length&&(d.mode=21);break;case 26:if(0===_)break e;f[m++]=d.length,_--,d.mode=21;break;case 27:if(d.wrap){for(;A__left_angle_mark_32;){if(0===g)break e;g--,v|=h[p++]__left_angle_mark___left_angle_mark_A,A+=8}if(S-=_,e.total_out+=S,d.total+=S,S&&(e.adler=d.check=d.flags?n(d.check,f,S,m-S):r(d.check,f,S,m-S)),S=_,(d.flags?v:u(v))!==d.check){e.msg=\"incorrect data check\",d.mode=l;break}v=0,A=0}d.mode=28;case 28:if(d.wrap&&d.flags){for(;A__left_angle_mark_32;){if(0===g)break e;g--,v+=h[p++]__left_angle_mark___left_angle_mark_A,A+=8}if(v!==(4294967295&d.total)){e.msg=\"incorrect length check\",d.mode=l;break}v=0,A=0}d.mode=29;case 29:B=1;break e;case l:B=-3;break e;case 31:return-4;default:return a}return e.next_out=m,e.avail_out=_,e.next_in=p,e.avail_in=g,d.hold=v,d.bits=A,(d.wsize||S!==e.avail_out&&d.mode__left_angle_mark_l&&(d.mode__left_angle_mark_27||4!==c))&&y(e,e.output,e.next_out,S-e.avail_out)?(d.mode=31,-4):(w-=e.avail_in,S-=e.avail_out,e.total_in+=w,e.total_out+=S,d.total+=S,d.wrap&&S&&(e.adler=d.check=d.flags?n(d.check,f,S,e.next_out-S):r(d.check,f,S,e.next_out-S)),e.data_type=d.bits+(d.last?64:0)+(d.mode===s?128:0)+(20===d.mode||15===d.mode?256:0),(0===w&&0===S||4===c)&&0===B&&(B=-5),B)},e.inflateEnd=function(e){if(!e||!e.state)return a;var t=e.state;return t.window&&(t.window=null),e.state=null,0},e.inflateGetHeader=function(e,t){var r;return e&&e.state&&2&(r=e.state).wrap?(r.head=t,t.done=!1,0):a},e.inflateSetDictionary=function(e,t){var n,i=t.length;return e&&e.state?0!==(n=e.state).wrap&&11!==n.mode?a:11===n.mode&&r(1,t,i,0)!==n.check?-3:y(e,t,i,i)?(n.mode=31,-4):(n.havedict=1,0):a},e.inflateInfo=\"pako inflate (from Nodeca project)\"}}),require_constants5=__commonJS({\"../../node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/constants.js\"(e,t){init_globals(),t.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}}}),require_binding=__commonJS({\"../../node_modules/.pnpm/browserify-zlib@0.2.0/node_modules/browserify-zlib/lib/binding.js\"(e){init_globals();var t,r=require_assert(),n=require_zstream(),i=require_deflate(),o=require_inflate(),a=require_constants5();for(t in a)e[t]=a[t];function s(t){if(\"number\"!=typeof t||t__left_angle_mark_e.DEFLATE||t>e.UNZIP)throw new TypeError(\"Bad argument\");this.dictionary=null,this.err=0,this.flush=0,this.init_done=!1,this.level=0,this.memLevel=0,this.mode=t,this.strategy=0,this.windowBits=0,this.write_in_progress=!1,this.pending_close=!1,this.gzip_id_bytes_read=0}e.NONE=0,e.DEFLATE=1,e.INFLATE=2,e.GZIP=3,e.GUNZIP=4,e.DEFLATERAW=5,e.INFLATERAW=6,e.UNZIP=7,s.prototype.close=function(){this.write_in_progress?this.pending_close=!0:(this.pending_close=!1,r(this.init_done,\"close before init\"),r(this.mode__left_angle_mark_=e.UNZIP),this.mode===e.DEFLATE||this.mode===e.GZIP||this.mode===e.DEFLATERAW?i.deflateEnd(this.strm):this.mode!==e.INFLATE&&this.mode!==e.GUNZIP&&this.mode!==e.INFLATERAW&&this.mode!==e.UNZIP||o.inflateEnd(this.strm),this.mode=e.NONE,this.dictionary=null)},s.prototype.write=function(e,t,r,n,i,o,a){return this._write(!0,e,t,r,n,i,o,a)},s.prototype.writeSync=function(e,t,r,n,i,o,a){return this._write(!1,e,t,r,n,i,o,a)},s.prototype._write=function(t,n,i,o,a,s,l,u){if(r.equal(arguments.length,8),r(this.init_done,\"write before init\"),r(this.mode!==e.NONE,\"already finalized\"),r.equal(!1,this.write_in_progress,\"write already in progress\"),r.equal(!1,this.pending_close,\"close is pending\"),this.write_in_progress=!0,r.equal(!1,void 0===n,\"must provide flush value\"),this.write_in_progress=!0,n!==e.Z_NO_FLUSH&&n!==e.Z_PARTIAL_FLUSH&&n!==e.Z_SYNC_FLUSH&&n!==e.Z_FULL_FLUSH&&n!==e.Z_FINISH&&n!==e.Z_BLOCK)throw new Error(\"Invalid flush value\");if(null==i&&(i=Buffer.alloc(0),a=0,o=0),this.strm.avail_in=a,this.strm.input=i,this.strm.next_in=o,this.strm.avail_out=u,this.strm.output=s,this.strm.next_out=l,this.flush=n,!t)return this._process(),this._checkError()?this._afterSync():void 0;var c=this;return import_browser.default.nextTick((function(){c._process(),c._after()})),this},s.prototype._afterSync=function(){var e=this.strm.avail_out,t=this.strm.avail_in;return this.write_in_progress=!1,[t,e]},s.prototype._process=function(){var t=null;switch(this.mode){case e.DEFLATE:case e.GZIP:case e.DEFLATERAW:this.err=i.deflate(this.strm,this.flush);break;case e.UNZIP:switch(this.strm.avail_in>0&&(t=this.strm.next_in),this.gzip_id_bytes_read){case 0:if(null===t)break;if(31!==this.strm.input[t]){this.mode=e.INFLATE;break}if(this.gzip_id_bytes_read=1,t++,1===this.strm.avail_in)break;case 1:if(null===t)break;139===this.strm.input[t]?(this.gzip_id_bytes_read=2,this.mode=e.GUNZIP):this.mode=e.INFLATE;break;default:throw new Error(\"invalid number of gzip magic number bytes read\")}case e.INFLATE:case e.GUNZIP:case e.INFLATERAW:for(this.err=o.inflate(this.strm,this.flush),this.err===e.Z_NEED_DICT&&this.dictionary&&(this.err=o.inflateSetDictionary(this.strm,this.dictionary),this.err===e.Z_OK?this.err=o.inflate(this.strm,this.flush):this.err===e.Z_DATA_ERROR&&(this.err=e.Z_NEED_DICT));this.strm.avail_in>0&&this.mode===e.GUNZIP&&this.err===e.Z_STREAM_END&&0!==this.strm.next_in[0];)this.reset(),this.err=o.inflate(this.strm,this.flush);break;default:throw new Error(\"Unknown mode \"+this.mode)}},s.prototype._checkError=function(){switch(this.err){case e.Z_OK:case e.Z_BUF_ERROR:if(0!==this.strm.avail_out&&this.flush===e.Z_FINISH)return this._error(\"unexpected end of file\"),!1;break;case e.Z_STREAM_END:break;case e.Z_NEED_DICT:return null==this.dictionary?this._error(\"Missing dictionary\"):this._error(\"Bad dictionary\"),!1;default:return this._error(\"Zlib error\"),!1}return!0},s.prototype._after=function(){if(this._checkError()){var e=this.strm.avail_out,t=this.strm.avail_in;this.write_in_progress=!1,this.callback(t,e),this.pending_close&&this.close()}},s.prototype._error=function(e){this.strm.msg&&(e=this.strm.msg),this.onerror(e,this.err),this.write_in_progress=!1,this.pending_close&&this.close()},s.prototype.init=function(t,n,i,o,a){r(4===arguments.length||5===arguments.length,\"init(windowBits, level, memLevel, strategy, [dictionary])\"),r(t>=8&&t__left_angle_mark_=15,\"invalid windowBits\"),r(n>=-1&&n__left_angle_mark_=9,\"invalid compression level\"),r(i>=1&&i__left_angle_mark_=9,\"invalid memlevel\"),r(o===e.Z_FILTERED||o===e.Z_HUFFMAN_ONLY||o===e.Z_RLE||o===e.Z_FIXED||o===e.Z_DEFAULT_STRATEGY,\"invalid strategy\"),this._init(n,t,i,o,a),this._setDictionary()},s.prototype.params=function(){throw new Error(\"deflateParams Not supported\")},s.prototype.reset=function(){this._reset(),this._setDictionary()},s.prototype._init=function(t,r,a,s,l){switch(this.level=t,this.windowBits=r,this.memLevel=a,this.strategy=s,this.flush=e.Z_NO_FLUSH,this.err=e.Z_OK,this.mode!==e.GZIP&&this.mode!==e.GUNZIP||(this.windowBits+=16),this.mode===e.UNZIP&&(this.windowBits+=32),this.mode!==e.DEFLATERAW&&this.mode!==e.INFLATERAW||(this.windowBits=-1*this.windowBits),this.strm=new n,this.mode){case e.DEFLATE:case e.GZIP:case e.DEFLATERAW:this.err=i.deflateInit2(this.strm,this.level,e.Z_DEFLATED,this.windowBits,this.memLevel,this.strategy);break;case e.INFLATE:case e.GUNZIP:case e.INFLATERAW:case e.UNZIP:this.err=o.inflateInit2(this.strm,this.windowBits);break;default:throw new Error(\"Unknown mode \"+this.mode)}this.err!==e.Z_OK&&this._error(\"Init error\"),this.dictionary=l,this.write_in_progress=!1,this.init_done=!0},s.prototype._setDictionary=function(){if(null!=this.dictionary){switch(this.err=e.Z_OK,this.mode){case e.DEFLATE:case e.DEFLATERAW:this.err=i.deflateSetDictionary(this.strm,this.dictionary)}this.err!==e.Z_OK&&this._error(\"Failed to set dictionary\")}},s.prototype._reset=function(){switch(this.err=e.Z_OK,this.mode){case e.DEFLATE:case e.DEFLATERAW:case e.GZIP:this.err=i.deflateReset(this.strm);break;case e.INFLATE:case e.INFLATERAW:case e.GUNZIP:this.err=o.inflateReset(this.strm)}this.err!==e.Z_OK&&this._error(\"Failed to reset stream\")},e.Zlib=s}}),require_lib6=__commonJS({\"../../node_modules/.pnpm/browserify-zlib@0.2.0/node_modules/browserify-zlib/lib/index.js\"(e){init_globals();var t=require_buffer().Buffer,r=require_stream_browserify().Transform,n=require_binding(),i=require_util(),o=require_assert().ok,a=require_buffer().kMaxLength,s=\"Cannot create final Buffer. It would be larger than 0x\"+a.toString(16)+\" bytes\";n.Z_MIN_WINDOWBITS=8,n.Z_MAX_WINDOWBITS=15,n.Z_DEFAULT_WINDOWBITS=15,n.Z_MIN_CHUNK=64,n.Z_MAX_CHUNK=1/0,n.Z_DEFAULT_CHUNK=16384,n.Z_MIN_MEMLEVEL=1,n.Z_MAX_MEMLEVEL=9,n.Z_DEFAULT_MEMLEVEL=8,n.Z_MIN_LEVEL=-1,n.Z_MAX_LEVEL=9,n.Z_DEFAULT_LEVEL=n.Z_DEFAULT_COMPRESSION;var l,u,c=Object.keys(n);for(u=0;u__left_angle_mark_c.length;u++)(l=c[u]).match(/^Z/)&&Object.defineProperty(e,l,{enumerable:!0,value:n[l],writable:!1});var d,h,f={Z_OK:n.Z_OK,Z_STREAM_END:n.Z_STREAM_END,Z_NEED_DICT:n.Z_NEED_DICT,Z_ERRNO:n.Z_ERRNO,Z_STREAM_ERROR:n.Z_STREAM_ERROR,Z_DATA_ERROR:n.Z_DATA_ERROR,Z_MEM_ERROR:n.Z_MEM_ERROR,Z_BUF_ERROR:n.Z_BUF_ERROR,Z_VERSION_ERROR:n.Z_VERSION_ERROR},p=Object.keys(f);for(h=0;h__left_angle_mark_p.length;h++)f[f[d=p[h]]]=d;function m(e,r,n){var i=[],o=0;function l(){for(var t;null!==(t=e.read());)i.push(t),o+=t.length;e.once(\"readable\",l)}function u(){var r,l=null;o>=a?l=new RangeError(s):r=t.concat(i,o),i=[],e.close(),n(l,r)}e.on(\"error\",(function(t){e.removeListener(\"end\",u),e.removeListener(\"readable\",l),n(t)})),e.on(\"end\",u),e.end(r),l()}function g(e,r){if(\"string\"==typeof r&&(r=t.from(r)),!t.isBuffer(r))throw new TypeError(\"Not a string or buffer\");var n=e._finishFlushFlag;return e._processChunk(r,n)}function _(e){if(!(this instanceof _))return new _(e);x.call(this,e,n.DEFLATE)}function b(e){if(!(this instanceof b))return new b(e);x.call(this,e,n.INFLATE)}function y(e){if(!(this instanceof y))return new y(e);x.call(this,e,n.GZIP)}function v(e){if(!(this instanceof v))return new v(e);x.call(this,e,n.GUNZIP)}function A(e){if(!(this instanceof A))return new A(e);x.call(this,e,n.DEFLATERAW)}function w(e){if(!(this instanceof w))return new w(e);x.call(this,e,n.INFLATERAW)}function S(e){if(!(this instanceof S))return new S(e);x.call(this,e,n.UNZIP)}function E(e){return e===n.Z_NO_FLUSH||e===n.Z_PARTIAL_FLUSH||e===n.Z_SYNC_FLUSH||e===n.Z_FULL_FLUSH||e===n.Z_FINISH||e===n.Z_BLOCK}function x(i,o){var a=this;if(this._opts=i=i||{},this._chunkSize=i.chunkSize||e.Z_DEFAULT_CHUNK,r.call(this,i),i.flush&&!E(i.flush))throw new Error(\"Invalid flush flag: \"+i.flush);if(i.finishFlush&&!E(i.finishFlush))throw new Error(\"Invalid flush flag: \"+i.finishFlush);if(this._flushFlag=i.flush||n.Z_NO_FLUSH,this._finishFlushFlag=void 0!==i.finishFlush?i.finishFlush:n.Z_FINISH,i.chunkSize&&(i.chunkSize__left_angle_mark_e.Z_MIN_CHUNK||i.chunkSize>e.Z_MAX_CHUNK))throw new Error(\"Invalid chunk size: \"+i.chunkSize);if(i.windowBits&&(i.windowBits__left_angle_mark_e.Z_MIN_WINDOWBITS||i.windowBits>e.Z_MAX_WINDOWBITS))throw new Error(\"Invalid windowBits: \"+i.windowBits);if(i.level&&(i.level__left_angle_mark_e.Z_MIN_LEVEL||i.level>e.Z_MAX_LEVEL))throw new Error(\"Invalid compression level: \"+i.level);if(i.memLevel&&(i.memLevel__left_angle_mark_e.Z_MIN_MEMLEVEL||i.memLevel>e.Z_MAX_MEMLEVEL))throw new Error(\"Invalid memLevel: \"+i.memLevel);if(i.strategy&&i.strategy!=e.Z_FILTERED&&i.strategy!=e.Z_HUFFMAN_ONLY&&i.strategy!=e.Z_RLE&&i.strategy!=e.Z_FIXED&&i.strategy!=e.Z_DEFAULT_STRATEGY)throw new Error(\"Invalid strategy: \"+i.strategy);if(i.dictionary&&!t.isBuffer(i.dictionary))throw new Error(\"Invalid dictionary: it should be a Buffer instance\");this._handle=new n.Zlib(o);var s=this;this._hadError=!1,this._handle.onerror=function(t,r){C(s),s._hadError=!0;var n=new Error(t);n.errno=r,n.code=e.codes[r],s.emit(\"error\",n)};var l=e.Z_DEFAULT_COMPRESSION;\"number\"==typeof i.level&&(l=i.level);var u=e.Z_DEFAULT_STRATEGY;\"number\"==typeof i.strategy&&(u=i.strategy),this._handle.init(i.windowBits||e.Z_DEFAULT_WINDOWBITS,l,i.memLevel||e.Z_DEFAULT_MEMLEVEL,u,i.dictionary),this._buffer=t.allocUnsafe(this._chunkSize),this._offset=0,this._level=l,this._strategy=u,this.once(\"end\",this.close),Object.defineProperty(this,\"_closed\",{get:function(){return!a._handle},configurable:!0,enumerable:!0})}function C(e,t){t&&import_browser.default.nextTick(t),e._handle&&(e._handle.close(),e._handle=null)}function T(e){e.emit(\"close\")}Object.defineProperty(e,\"codes\",{enumerable:!0,value:Object.freeze(f),writable:!1}),e.Deflate=_,e.Inflate=b,e.Gzip=y,e.Gunzip=v,e.DeflateRaw=A,e.InflateRaw=w,e.Unzip=S,e.createDeflate=function(e){return new _(e)},e.createInflate=function(e){return new b(e)},e.createDeflateRaw=function(e){return new A(e)},e.createInflateRaw=function(e){return new w(e)},e.createGzip=function(e){return new y(e)},e.createGunzip=function(e){return new v(e)},e.createUnzip=function(e){return new S(e)},e.deflate=function(e,t,r){return\"function\"==typeof t&&(r=t,t={}),m(new _(t),e,r)},e.deflateSync=function(e,t){return g(new _(t),e)},e.gzip=function(e,t,r){return\"function\"==typeof t&&(r=t,t={}),m(new y(t),e,r)},e.gzipSync=function(e,t){return g(new y(t),e)},e.deflateRaw=function(e,t,r){return\"function\"==typeof t&&(r=t,t={}),m(new A(t),e,r)},e.deflateRawSync=function(e,t){return g(new A(t),e)},e.unzip=function(e,t,r){return\"function\"==typeof t&&(r=t,t={}),m(new S(t),e,r)},e.unzipSync=function(e,t){return g(new S(t),e)},e.inflate=function(e,t,r){return\"function\"==typeof t&&(r=t,t={}),m(new b(t),e,r)},e.inflateSync=function(e,t){return g(new b(t),e)},e.gunzip=function(e,t,r){return\"function\"==typeof t&&(r=t,t={}),m(new v(t),e,r)},e.gunzipSync=function(e,t){return g(new v(t),e)},e.inflateRaw=function(e,t,r){return\"function\"==typeof t&&(r=t,t={}),m(new w(t),e,r)},e.inflateRawSync=function(e,t){return g(new w(t),e)},i.inherits(x,r),x.prototype.params=function(t,r,i){if(t__left_angle_mark_e.Z_MIN_LEVEL||t>e.Z_MAX_LEVEL)throw new RangeError(\"Invalid compression level: \"+t);if(r!=e.Z_FILTERED&&r!=e.Z_HUFFMAN_ONLY&&r!=e.Z_RLE&&r!=e.Z_FIXED&&r!=e.Z_DEFAULT_STRATEGY)throw new TypeError(\"Invalid strategy: \"+r);if(this._level!==t||this._strategy!==r){var a=this;this.flush(n.Z_SYNC_FLUSH,(function(){o(a._handle,\"zlib binding closed\"),a._handle.params(t,r),a._hadError||(a._level=t,a._strategy=r,i&&i())}))}else import_browser.default.nextTick(i)},x.prototype.reset=function(){return o(this._handle,\"zlib binding closed\"),this._handle.reset()},x.prototype._flush=function(e){this._transform(t.alloc(0),\"\",e)},x.prototype.flush=function(e,r){var i=this,o=this._writableState;(\"function\"==typeof e||void 0===e&&!r)&&(r=e,e=n.Z_FULL_FLUSH),o.ended?r&&import_browser.default.nextTick(r):o.ending?r&&this.once(\"end\",r):o.needDrain?r&&this.once(\"drain\",(function(){return i.flush(e,r)})):(this._flushFlag=e,this.write(t.alloc(0),\"\",r))},x.prototype.close=function(e){C(this,e),import_browser.default.nextTick(T,this)},x.prototype._transform=function(e,r,i){var o,a=this._writableState,s=(a.ending||a.ended)&&(!e||a.length===e.length);return null===e||t.isBuffer(e)?this._handle?(s?o=this._finishFlushFlag:(o=this._flushFlag,e.length>=a.length&&(this._flushFlag=this._opts.flush||n.Z_NO_FLUSH)),void this._processChunk(e,o,i)):i(new Error(\"zlib binding closed\")):i(new Error(\"invalid input\"))},x.prototype._processChunk=function(e,r,n){var i=e&&e.length,l=this._chunkSize-this._offset,u=0,c=this,d=\"function\"==typeof n;if(!d){var h,f=[],p=0;this.on(\"error\",(function(e){h=e})),o(this._handle,\"zlib binding closed\");do{var m=this._handle.writeSync(r,e,u,i,this._buffer,this._offset,l)}while(!this._hadError&&b(m[0],m[1]));if(this._hadError)throw h;if(p>=a)throw C(this),new RangeError(s);var g=t.concat(f,p);return C(this),g}o(this._handle,\"zlib binding closed\");var _=this._handle.write(r,e,u,i,this._buffer,this._offset,l);function b(a,s){if(this&&(this.buffer=null,this.callback=null),!c._hadError){var h=l-s;if(o(h>=0,\"have should not go down\"),h>0){var m=c._buffer.slice(c._offset,c._offset+h);c._offset+=h,d?c.push(m):(f.push(m),p+=m.length)}if((0===s||c._offset>=c._chunkSize)&&(l=c._chunkSize,c._offset=0,c._buffer=t.allocUnsafe(c._chunkSize)),0===s){if(u+=i-a,i=a,!d)return!0;var g=c._handle.write(r,e,u,i,c._buffer,c._offset,c._chunkSize);return g.callback=b,void(g.buffer=e)}if(!d)return!1;n()}}_.buffer=e,_.callback=b},i.inherits(_,x),i.inherits(b,x),i.inherits(y,x),i.inherits(v,x),i.inherits(A,x),i.inherits(w,x),i.inherits(S,x)}}),require_chunkstream=__commonJS({\"../../node_modules/.pnpm/pngjs@6.0.0/node_modules/pngjs/lib/chunkstream.js\"(e,t){init_globals();var r=require_util(),n=require_stream_browserify(),i=t.exports=function(){n.call(this),this._buffers=[],this._buffered=0,this._reads=[],this._paused=!1,this._encoding=\"utf8\",this.writable=!0};r.inherits(i,n),i.prototype.read=function(e,t){this._reads.push({length:Math.abs(e),allowLess:e__left_angle_mark_0,func:t}),import_browser.default.nextTick(function(){this._process(),this._paused&&this._reads&&this._reads.length>0&&(this._paused=!1,this.emit(\"drain\"))}.bind(this))},i.prototype.write=function(e,t){if(!this.writable)return this.emit(\"error\",new Error(\"Stream not writable\")),!1;let r;return r=Buffer.isBuffer(e)?e:Buffer.from(e,t||this._encoding),this._buffers.push(r),this._buffered+=r.length,this._process(),this._reads&&0===this._reads.length&&(this._paused=!0),this.writable&&!this._paused},i.prototype.end=function(e,t){e&&this.write(e,t),this.writable=!1,this._buffers&&(0===this._buffers.length?this._end():(this._buffers.push(null),this._process()))},i.prototype.destroySoon=i.prototype.end,i.prototype._end=function(){this._reads.length>0&&this.emit(\"error\",new Error(\"Unexpected end of input\")),this.destroy()},i.prototype.destroy=function(){this._buffers&&(this.writable=!1,this._reads=null,this._buffers=null,this.emit(\"close\"))},i.prototype._processReadAllowingLess=function(e){this._reads.shift();let t=this._buffers[0];t.length>e.length?(this._buffered-=e.length,this._buffers[0]=t.slice(e.length),e.func.call(this,t.slice(0,e.length))):(this._buffered-=t.length,this._buffers.shift(),e.func.call(this,t))},i.prototype._processRead=function(e){this._reads.shift();let t=0,r=0,n=Buffer.alloc(e.length);for(;t__left_angle_mark_e.length;){let i=this._buffers[r++],o=Math.min(i.length,e.length-t);i.copy(n,t,0,o),t+=o,o!==i.length&&(this._buffers[--r]=i.slice(o))}r>0&&this._buffers.splice(0,r),this._buffered-=e.length,e.func.call(this,n)},i.prototype._process=function(){try{for(;this._buffered>0&&this._reads&&this._reads.length>0;){let e=this._reads[0];if(e.allowLess)this._processReadAllowingLess(e);else{if(!(this._buffered>=e.length))break;this._processRead(e)}}this._buffers&&!this.writable&&this._end()}catch(e){this.emit(\"error\",e)}}}}),require_interlace=__commonJS({\"../../node_modules/.pnpm/pngjs@6.0.0/node_modules/pngjs/lib/interlace.js\"(e){init_globals();var t=[{x:[0],y:[0]},{x:[4],y:[0]},{x:[0,4],y:[4]},{x:[2,6],y:[0,4]},{x:[0,2,4,6],y:[2,6]},{x:[1,3,5,7],y:[0,2,4,6]},{x:[0,1,2,3,4,5,6,7],y:[1,3,5,7]}];e.getImagePasses=function(e,r){let n=[],i=e%8,o=r%8,a=(e-i)/8,s=(r-o)/8;for(let l=0;l__left_angle_mark_t.length;l++){let e=t[l],r=a*e.x.length,u=s*e.y.length;for(let t=0;t__left_angle_mark_e.x.length&&e.x[t]__left_angle_mark_i;t++)r++;for(let t=0;t__left_angle_mark_e.y.length&&e.y[t]__left_angle_mark_o;t++)u++;r>0&&u>0&&n.push({width:r,height:u,index:l})}return n},e.getInterlaceIterator=function(e){return function(r,n,i){let o=r%t[i].x.length,a=(r-o)/t[i].x.length*8+t[i].x[o],s=n%t[i].y.length;return 4*a+((n-s)/t[i].y.length*8+t[i].y[s])*e*4}}}}),require_paeth_predictor=__commonJS({\"../../node_modules/.pnpm/pngjs@6.0.0/node_modules/pngjs/lib/paeth-predictor.js\"(e,t){init_globals(),t.exports=function(e,t,r){let n=e+t-r,i=Math.abs(n-e),o=Math.abs(n-t),a=Math.abs(n-r);return i__left_angle_mark_=o&&i__left_angle_mark_=a?e:o__left_angle_mark_=a?t:r}}}),require_filter_parse=__commonJS({\"../../node_modules/.pnpm/pngjs@6.0.0/node_modules/pngjs/lib/filter-parse.js\"(e,t){init_globals();var r=require_interlace(),n=require_paeth_predictor();function i(e,t,r){let n=e*t;return 8!==r&&(n=Math.ceil(n/(8/r))),n}var o=t.exports=function(e,t){let n=e.width,o=e.height,a=e.interlace,s=e.bpp,l=e.depth;if(this.read=t.read,this.write=t.write,this.complete=t.complete,this._imageIndex=0,this._images=[],a){let e=r.getImagePasses(n,o);for(let t=0;t__left_angle_mark_e.length;t++)this._images.push({byteWidth:i(e[t].width,s,l),height:e[t].height,lineIndex:0})}else this._images.push({byteWidth:i(n,s,l),height:o,lineIndex:0});this._xComparison=8===l?s:16===l?2*s:1};o.prototype.start=function(){this.read(this._images[this._imageIndex].byteWidth+1,this._reverseFilterLine.bind(this))},o.prototype._unFilterType1=function(e,t,r){let n=this._xComparison,i=n-1;for(let o=0;o__left_angle_mark_r;o++){let r=e[1+o],a=o>i?t[o-n]:0;t[o]=r+a}},o.prototype._unFilterType2=function(e,t,r){let n=this._lastLine;for(let i=0;i__left_angle_mark_r;i++){let r=e[1+i],o=n?n[i]:0;t[i]=r+o}},o.prototype._unFilterType3=function(e,t,r){let n=this._xComparison,i=n-1,o=this._lastLine;for(let a=0;a__left_angle_mark_r;a++){let r=e[1+a],s=o?o[a]:0,l=a>i?t[a-n]:0,u=Math.floor((l+s)/2);t[a]=r+u}},o.prototype._unFilterType4=function(e,t,r){let i=this._xComparison,o=i-1,a=this._lastLine;for(let s=0;s__left_angle_mark_r;s++){let r=e[1+s],l=a?a[s]:0,u=s>o?t[s-i]:0,c=s>o&&a?a[s-i]:0,d=n(u,l,c);t[s]=r+d}},o.prototype._reverseFilterLine=function(e){let t,r=e[0],n=this._images[this._imageIndex],i=n.byteWidth;if(0===r)t=e.slice(1,i+1);else switch(t=Buffer.alloc(i),r){case 1:this._unFilterType1(e,t,i);break;case 2:this._unFilterType2(e,t,i);break;case 3:this._unFilterType3(e,t,i);break;case 4:this._unFilterType4(e,t,i);break;default:throw new Error(\"Unrecognised filter type - \"+r)}this.write(t),n.lineIndex++,n.lineIndex>=n.height?(this._lastLine=null,this._imageIndex++,n=this._images[this._imageIndex]):this._lastLine=t,n?this.read(n.byteWidth+1,this._reverseFilterLine.bind(this)):(this._lastLine=null,this.complete())}}}),require_filter_parse_async=__commonJS({\"../../node_modules/.pnpm/pngjs@6.0.0/node_modules/pngjs/lib/filter-parse-async.js\"(e,t){init_globals();var r=require_util(),n=require_chunkstream(),i=require_filter_parse(),o=t.exports=function(e){n.call(this);let t=[],r=this;this._filter=new i(e,{read:this.read.bind(this),write:function(e){t.push(e)},complete:function(){r.emit(\"complete\",Buffer.concat(t))}}),this._filter.start()};r.inherits(o,n)}}),require_constants6=__commonJS({\"../../node_modules/.pnpm/pngjs@6.0.0/node_modules/pngjs/lib/constants.js\"(e,t){init_globals(),t.exports={PNG_SIGNATURE:[137,80,78,71,13,10,26,10],TYPE_IHDR:1229472850,TYPE_IEND:1229278788,TYPE_IDAT:1229209940,TYPE_PLTE:1347179589,TYPE_tRNS:1951551059,TYPE_gAMA:1732332865,COLORTYPE_GRAYSCALE:0,COLORTYPE_PALETTE:1,COLORTYPE_COLOR:2,COLORTYPE_ALPHA:4,COLORTYPE_PALETTE_COLOR:3,COLORTYPE_COLOR_ALPHA:6,COLORTYPE_TO_BPP_MAP:{0:1,2:3,3:1,4:2,6:4},GAMMA_DIVISION:1e5}}}),require_crc=__commonJS({\"../../node_modules/.pnpm/pngjs@6.0.0/node_modules/pngjs/lib/crc.js\"(e,t){init_globals();var r=[];!function(){for(let e=0;e__left_angle_mark_256;e++){let t=e;for(let e=0;e__left_angle_mark_8;e++)1&t?t=3988292384^t>>>1:t>>>=1;r[e]=t}}();var n=t.exports=function(){this._crc=-1};n.prototype.write=function(e){for(let t=0;t__left_angle_mark_e.length;t++)this._crc=r[255&(this._crc^e[t])]^this._crc>>>8;return!0},n.prototype.crc32=function(){return~this._crc},n.crc32=function(e){let t=-1;for(let n=0;n__left_angle_mark_e.length;n++)t=r[255&(t^e[n])]^t>>>8;return~t}}}),require_parser6=__commonJS({\"../../node_modules/.pnpm/pngjs@6.0.0/node_modules/pngjs/lib/parser.js\"(e,t){init_globals();var r=require_constants6(),n=require_crc(),i=t.exports=function(e,t){this._options=e,e.checkCRC=!1!==e.checkCRC,this._hasIHDR=!1,this._hasIEND=!1,this._emittedHeadersFinished=!1,this._palette=[],this._colorType=0,this._chunks={},this._chunks[r.TYPE_IHDR]=this._handleIHDR.bind(this),this._chunks[r.TYPE_IEND]=this._handleIEND.bind(this),this._chunks[r.TYPE_IDAT]=this._handleIDAT.bind(this),this._chunks[r.TYPE_PLTE]=this._handlePLTE.bind(this),this._chunks[r.TYPE_tRNS]=this._handleTRNS.bind(this),this._chunks[r.TYPE_gAMA]=this._handleGAMA.bind(this),this.read=t.read,this.error=t.error,this.metadata=t.metadata,this.gamma=t.gamma,this.transColor=t.transColor,this.palette=t.palette,this.parsed=t.parsed,this.inflateData=t.inflateData,this.finished=t.finished,this.simpleTransparency=t.simpleTransparency,this.headersFinished=t.headersFinished||function(){}};i.prototype.start=function(){this.read(r.PNG_SIGNATURE.length,this._parseSignature.bind(this))},i.prototype._parseSignature=function(e){let t=r.PNG_SIGNATURE;for(let r=0;r__left_angle_mark_t.length;r++)if(e[r]!==t[r])return void this.error(new Error(\"Invalid file signature\"));this.read(8,this._parseChunkBegin.bind(this))},i.prototype._parseChunkBegin=function(e){let t=e.readUInt32BE(0),i=e.readUInt32BE(4),o=\"\";for(let r=4;r__left_angle_mark_8;r++)o+=String.fromCharCode(e[r]);let a=Boolean(32&e[4]);if(this._hasIHDR||i===r.TYPE_IHDR){if(this._crc=new n,this._crc.write(Buffer.from(o)),this._chunks[i])return this._chunks[i](t);a?this.read(t+4,this._skipChunk.bind(this)):this.error(new Error(\"Unsupported critical chunk type \"+o))}else this.error(new Error(\"Expected IHDR on beggining\"))},i.prototype._skipChunk=function(){this.read(8,this._parseChunkBegin.bind(this))},i.prototype._handleChunkEnd=function(){this.read(4,this._parseChunkEnd.bind(this))},i.prototype._parseChunkEnd=function(e){let t=e.readInt32BE(0),r=this._crc.crc32();this._options.checkCRC&&r!==t?this.error(new Error(\"Crc error - \"+t+\" - \"+r)):this._hasIEND||this.read(8,this._parseChunkBegin.bind(this))},i.prototype._handleIHDR=function(e){this.read(e,this._parseIHDR.bind(this))},i.prototype._parseIHDR=function(e){this._crc.write(e);let t=e.readUInt32BE(0),n=e.readUInt32BE(4),i=e[8],o=e[9],a=e[10],s=e[11],l=e[12];if(8!==i&&4!==i&&2!==i&&1!==i&&16!==i)return void this.error(new Error(\"Unsupported bit depth \"+i));if(!(o in r.COLORTYPE_TO_BPP_MAP))return void this.error(new Error(\"Unsupported color type\"));if(0!==a)return void this.error(new Error(\"Unsupported compression method\"));if(0!==s)return void this.error(new Error(\"Unsupported filter method\"));if(0!==l&&1!==l)return void this.error(new Error(\"Unsupported interlace method\"));this._colorType=o;let u=r.COLORTYPE_TO_BPP_MAP[this._colorType];this._hasIHDR=!0,this.metadata({width:t,height:n,depth:i,interlace:Boolean(l),palette:Boolean(o&r.COLORTYPE_PALETTE),color:Boolean(o&r.COLORTYPE_COLOR),alpha:Boolean(o&r.COLORTYPE_ALPHA),bpp:u,colorType:o}),this._handleChunkEnd()},i.prototype._handlePLTE=function(e){this.read(e,this._parsePLTE.bind(this))},i.prototype._parsePLTE=function(e){this._crc.write(e);let t=Math.floor(e.length/3);for(let r=0;r__left_angle_mark_t;r++)this._palette.push([e[3*r],e[3*r+1],e[3*r+2],255]);this.palette(this._palette),this._handleChunkEnd()},i.prototype._handleTRNS=function(e){this.simpleTransparency(),this.read(e,this._parseTRNS.bind(this))},i.prototype._parseTRNS=function(e){if(this._crc.write(e),this._colorType===r.COLORTYPE_PALETTE_COLOR){if(0===this._palette.length)return void this.error(new Error(\"Transparency chunk must be after palette\"));if(e.length>this._palette.length)return void this.error(new Error(\"More transparent colors than palette size\"));for(let t=0;t__left_angle_mark_e.length;t++)this._palette[t][3]=e[t];this.palette(this._palette)}this._colorType===r.COLORTYPE_GRAYSCALE&&this.transColor([e.readUInt16BE(0)]),this._colorType===r.COLORTYPE_COLOR&&this.transColor([e.readUInt16BE(0),e.readUInt16BE(2),e.readUInt16BE(4)]),this._handleChunkEnd()},i.prototype._handleGAMA=function(e){this.read(e,this._parseGAMA.bind(this))},i.prototype._parseGAMA=function(e){this._crc.write(e),this.gamma(e.readUInt32BE(0)/r.GAMMA_DIVISION),this._handleChunkEnd()},i.prototype._handleIDAT=function(e){this._emittedHeadersFinished||(this._emittedHeadersFinished=!0,this.headersFinished()),this.read(-e,this._parseIDAT.bind(this,e))},i.prototype._parseIDAT=function(e,t){if(this._crc.write(t),this._colorType===r.COLORTYPE_PALETTE_COLOR&&0===this._palette.length)throw new Error(\"Expected palette not found\");this.inflateData(t);let n=e-t.length;n>0?this._handleIDAT(n):this._handleChunkEnd()},i.prototype._handleIEND=function(e){this.read(e,this._parseIEND.bind(this))},i.prototype._parseIEND=function(e){this._crc.write(e),this._hasIEND=!0,this._handleChunkEnd(),this.finished&&this.finished()}}}),require_bitmapper=__commonJS({\"../../node_modules/.pnpm/pngjs@6.0.0/node_modules/pngjs/lib/bitmapper.js\"(e){init_globals();var t=require_interlace(),r=[function(){},function(e,t,r,n){if(n===t.length)throw new Error(\"Ran out of data\");let i=t[n];e[r]=i,e[r+1]=i,e[r+2]=i,e[r+3]=255},function(e,t,r,n){if(n+1>=t.length)throw new Error(\"Ran out of data\");let i=t[n];e[r]=i,e[r+1]=i,e[r+2]=i,e[r+3]=t[n+1]},function(e,t,r,n){if(n+2>=t.length)throw new Error(\"Ran out of data\");e[r]=t[n],e[r+1]=t[n+1],e[r+2]=t[n+2],e[r+3]=255},function(e,t,r,n){if(n+3>=t.length)throw new Error(\"Ran out of data\");e[r]=t[n],e[r+1]=t[n+1],e[r+2]=t[n+2],e[r+3]=t[n+3]}],n=[function(){},function(e,t,r,n){let i=t[0];e[r]=i,e[r+1]=i,e[r+2]=i,e[r+3]=n},function(e,t,r){let n=t[0];e[r]=n,e[r+1]=n,e[r+2]=n,e[r+3]=t[1]},function(e,t,r,n){e[r]=t[0],e[r+1]=t[1],e[r+2]=t[2],e[r+3]=n},function(e,t,r){e[r]=t[0],e[r+1]=t[1],e[r+2]=t[2],e[r+3]=t[3]}];function i(e,t,n,i,o,a){let s=e.width,l=e.height,u=e.index;for(let c=0;c__left_angle_mark_l;c++)for(let e=0;e__left_angle_mark_s;e++){let s=n(e,c,u);r[i](t,o,s,a),a+=i}return a}function o(e,t,r,i,o,a){let s=e.width,l=e.height,u=e.index;for(let c=0;c__left_angle_mark_l;c++){for(let e=0;e__left_angle_mark_s;e++){let s=o.get(i),l=r(e,c,u);n[i](t,s,l,a)}o.resetAfterLine()}}e.dataToBitMap=function(e,r){let n,a,s=r.width,l=r.height,u=r.depth,c=r.bpp,d=r.interlace;8!==u&&(n=function(e,t){let r=[],n=0;function i(){if(n===e.length)throw new Error(\"Ran out of data\");let i,o,a,s,l,u,c,d,h=e[n];switch(n++,t){default:throw new Error(\"unrecognised depth\");case 16:c=e[n],n++,r.push((h__left_angle_mark___left_angle_mark_8)+c);break;case 4:c=15&h,d=h>>4,r.push(d,c);break;case 2:l=3&h,u=h>>2&3,c=h>>4&3,d=h>>6&3,r.push(d,c,u,l);break;case 1:i=1&h,o=h>>1&1,a=h>>2&1,s=h>>3&1,l=h>>4&1,u=h>>5&1,c=h>>6&1,d=h>>7&1,r.push(d,c,u,l,s,a,o,i)}}return{get:function(e){for(;r.length__left_angle_mark_e;)i();let t=r.slice(0,e);return r=r.slice(e),t},resetAfterLine:function(){r.length=0},end:function(){if(n!==e.length)throw new Error(\"extra data found\")}}}(e,u)),a=u__left_angle_mark_=8?Buffer.alloc(s*l*4):new Uint16Array(s*l*4);let h,f,p=Math.pow(2,u)-1,m=0;if(d)h=t.getImagePasses(s,l),f=t.getInterlaceIterator(s,l);else{let e=0;f=function(){let t=e;return e+=4,t},h=[{width:s,height:l}]}for(let t=0;t__left_angle_mark_h.length;t++)8===u?m=i(h[t],a,f,c,e,m):o(h[t],a,f,c,n,p);if(8===u){if(m!==e.length)throw new Error(\"extra data found\")}else n.end();return a}}}),require_format_normaliser=__commonJS({\"../../node_modules/.pnpm/pngjs@6.0.0/node_modules/pngjs/lib/format-normaliser.js\"(e,t){init_globals(),t.exports=function(e,t,r=!1){let n=t.depth,i=t.width,o=t.height,a=t.colorType,s=t.transColor,l=t.palette,u=e;return 3===a?function(e,t,r,n,i){let o=0;for(let a=0;a__left_angle_mark_n;a++)for(let n=0;n__left_angle_mark_r;n++){let r=i[e[o]];if(!r)throw new Error(\"index \"+e[o]+\" not in palette\");for(let e=0;e__left_angle_mark_4;e++)t[o+e]=r[e];o+=4}}(e,u,i,o,l):(s&&function(e,t,r,n,i){let o=0;for(let a=0;a__left_angle_mark_n;a++)for(let n=0;n__left_angle_mark_r;n++){let r=!1;if(1===i.length?i[0]===e[o]&&(r=!0):i[0]===e[o]&&i[1]===e[o+1]&&i[2]===e[o+2]&&(r=!0),r)for(let e=0;e__left_angle_mark_4;e++)t[o+e]=0;o+=4}}(e,u,i,o,s),8===n||r||(16===n&&(u=Buffer.alloc(i*o*4)),function(e,t,r,n,i){let o=Math.pow(2,i)-1,a=0;for(let s=0;s__left_angle_mark_n;s++)for(let n=0;n__left_angle_mark_r;n++){for(let r=0;r__left_angle_mark_4;r++)t[a+r]=Math.floor(255*e[a+r]/o+.5);a+=4}}(e,u,i,o,n))),u}}}),require_parser_async=__commonJS({\"../../node_modules/.pnpm/pngjs@6.0.0/node_modules/pngjs/lib/parser-async.js\"(e,t){init_globals();var r=require_util(),n=require_lib6(),i=require_chunkstream(),o=require_filter_parse_async(),a=require_parser6(),s=require_bitmapper(),l=require_format_normaliser(),u=t.exports=function(e){i.call(this),this._parser=new a(e,{read:this.read.bind(this),error:this._handleError.bind(this),metadata:this._handleMetaData.bind(this),gamma:this.emit.bind(this,\"gamma\"),palette:this._handlePalette.bind(this),transColor:this._handleTransColor.bind(this),finished:this._finished.bind(this),inflateData:this._inflateData.bind(this),simpleTransparency:this._simpleTransparency.bind(this),headersFinished:this._headersFinished.bind(this)}),this._options=e,this.writable=!0,this._parser.start()};r.inherits(u,i),u.prototype._handleError=function(e){this.emit(\"error\",e),this.writable=!1,this.destroy(),this._inflate&&this._inflate.destroy&&this._inflate.destroy(),this._filter&&(this._filter.destroy(),this._filter.on(\"error\",(function(){}))),this.errord=!0},u.prototype._inflateData=function(e){if(!this._inflate)if(this._bitmapInfo.interlace)this._inflate=n.createInflate(),this._inflate.on(\"error\",this.emit.bind(this,\"error\")),this._filter.on(\"complete\",this._complete.bind(this)),this._inflate.pipe(this._filter);else{let e=(1+(this._bitmapInfo.width*this._bitmapInfo.bpp*this._bitmapInfo.depth+7>>3))*this._bitmapInfo.height,t=Math.max(e,n.Z_MIN_CHUNK);this._inflate=n.createInflate({chunkSize:t});let r=e,i=this.emit.bind(this,\"error\");this._inflate.on(\"error\",(function(e){r&&i(e)})),this._filter.on(\"complete\",this._complete.bind(this));let o=this._filter.write.bind(this._filter);this._inflate.on(\"data\",(function(e){r&&(e.length>r&&(e=e.slice(0,r)),r-=e.length,o(e))})),this._inflate.on(\"end\",this._filter.end.bind(this._filter))}this._inflate.write(e)},u.prototype._handleMetaData=function(e){this._metaData=e,this._bitmapInfo=Object.create(e),this._filter=new o(this._bitmapInfo)},u.prototype._handleTransColor=function(e){this._bitmapInfo.transColor=e},u.prototype._handlePalette=function(e){this._bitmapInfo.palette=e},u.prototype._simpleTransparency=function(){this._metaData.alpha=!0},u.prototype._headersFinished=function(){this.emit(\"metadata\",this._metaData)},u.prototype._finished=function(){this.errord||(this._inflate?this._inflate.end():this.emit(\"error\",\"No Inflate block\"))},u.prototype._complete=function(e){if(this.errord)return;let t;try{let r=s.dataToBitMap(e,this._bitmapInfo);t=l(r,this._bitmapInfo,this._options.skipRescale),r=null}catch(r){return void this._handleError(r)}this.emit(\"parsed\",t)}}}),require_bitpacker=__commonJS({\"../../node_modules/.pnpm/pngjs@6.0.0/node_modules/pngjs/lib/bitpacker.js\"(e,t){init_globals();var r=require_constants6();t.exports=function(e,t,n,i){let o=-1!==[r.COLORTYPE_COLOR_ALPHA,r.COLORTYPE_ALPHA].indexOf(i.colorType);if(i.colorType===i.inputColorType){let t=function(){let e=new ArrayBuffer(2);return new DataView(e).setInt16(0,256,!0),256!==new Int16Array(e)[0]}();if(8===i.bitDepth||16===i.bitDepth&&t)return e}let a=16!==i.bitDepth?e:new Uint16Array(e.buffer),s=255,l=r.COLORTYPE_TO_BPP_MAP[i.inputColorType];4!==l||i.inputHasAlpha||(l=3);let u=r.COLORTYPE_TO_BPP_MAP[i.colorType];16===i.bitDepth&&(s=65535,u*=2);let c=Buffer.alloc(t*n*u),d=0,h=0,f=i.bgColor||{};function p(){let e,t,n,l=s;switch(i.inputColorType){case r.COLORTYPE_COLOR_ALPHA:l=a[d+3],e=a[d],t=a[d+1],n=a[d+2];break;case r.COLORTYPE_COLOR:e=a[d],t=a[d+1],n=a[d+2];break;case r.COLORTYPE_ALPHA:l=a[d+1],e=a[d],t=e,n=e;break;case r.COLORTYPE_GRAYSCALE:e=a[d],t=e,n=e;break;default:throw new Error(\"input color type:\"+i.inputColorType+\" is not supported at present\")}return i.inputHasAlpha&&(o||(l/=s,e=Math.min(Math.max(Math.round((1-l)*f.red+l*e),0),s),t=Math.min(Math.max(Math.round((1-l)*f.green+l*t),0),s),n=Math.min(Math.max(Math.round((1-l)*f.blue+l*n),0),s))),{red:e,green:t,blue:n,alpha:l}}void 0===f.red&&(f.red=s),void 0===f.green&&(f.green=s),void 0===f.blue&&(f.blue=s);for(let m=0;m__left_angle_mark_n;m++)for(let e=0;e__left_angle_mark_t;e++){let e=p();switch(i.colorType){case r.COLORTYPE_COLOR_ALPHA:case r.COLORTYPE_COLOR:8===i.bitDepth?(c[h]=e.red,c[h+1]=e.green,c[h+2]=e.blue,o&&(c[h+3]=e.alpha)):(c.writeUInt16BE(e.red,h),c.writeUInt16BE(e.green,h+2),c.writeUInt16BE(e.blue,h+4),o&&c.writeUInt16BE(e.alpha,h+6));break;case r.COLORTYPE_ALPHA:case r.COLORTYPE_GRAYSCALE:{let t=(e.red+e.green+e.blue)/3;8===i.bitDepth?(c[h]=t,o&&(c[h+1]=e.alpha)):(c.writeUInt16BE(t,h),o&&c.writeUInt16BE(e.alpha,h+2));break}default:throw new Error(\"unrecognised color Type \"+i.colorType)}d+=l,h+=u}return c}}}),require_filter_pack=__commonJS({\"../../node_modules/.pnpm/pngjs@6.0.0/node_modules/pngjs/lib/filter-pack.js\"(e,t){init_globals();var r=require_paeth_predictor(),n={0:function(e,t,r,n,i){for(let o=0;o__left_angle_mark_r;o++)n[i+o]=e[t+o]},1:function(e,t,r,n,i,o){for(let a=0;a__left_angle_mark_r;a++){let r=a>=o?e[t+a-o]:0,s=e[t+a]-r;n[i+a]=s}},2:function(e,t,r,n,i){for(let o=0;o__left_angle_mark_r;o++){let a=t>0?e[t+o-r]:0,s=e[t+o]-a;n[i+o]=s}},3:function(e,t,r,n,i,o){for(let a=0;a__left_angle_mark_r;a++){let s=a>=o?e[t+a-o]:0,l=t>0?e[t+a-r]:0,u=e[t+a]-(s+l>>1);n[i+a]=u}},4:function(e,t,n,i,o,a){for(let s=0;s__left_angle_mark_n;s++){let l=s>=a?e[t+s-a]:0,u=t>0?e[t+s-n]:0,c=t>0&&s>=a?e[t+s-(n+a)]:0,d=e[t+s]-r(l,u,c);i[o+s]=d}}},i={0:function(e,t,r){let n=0,i=t+r;for(let o=t;o__left_angle_mark_i;o++)n+=Math.abs(e[o]);return n},1:function(e,t,r,n){let i=0;for(let o=0;o__left_angle_mark_r;o++){let r=o>=n?e[t+o-n]:0,a=e[t+o]-r;i+=Math.abs(a)}return i},2:function(e,t,r){let n=0,i=t+r;for(let o=t;o__left_angle_mark_i;o++){let i=t>0?e[o-r]:0,a=e[o]-i;n+=Math.abs(a)}return n},3:function(e,t,r,n){let i=0;for(let o=0;o__left_angle_mark_r;o++){let a=o>=n?e[t+o-n]:0,s=t>0?e[t+o-r]:0,l=e[t+o]-(a+s>>1);i+=Math.abs(l)}return i},4:function(e,t,n,i){let o=0;for(let a=0;a__left_angle_mark_n;a++){let s=a>=i?e[t+a-i]:0,l=t>0?e[t+a-n]:0,u=t>0&&a>=i?e[t+a-(n+i)]:0,c=e[t+a]-r(s,l,u);o+=Math.abs(c)}return o}};t.exports=function(e,t,r,o,a){let s;if(\"filterType\"in o&&-1!==o.filterType){if(\"number\"!=typeof o.filterType)throw new Error(\"unrecognised filter types\");s=[o.filterType]}else s=[0,1,2,3,4];16===o.bitDepth&&(a*=2);let l=t*a,u=0,c=0,d=Buffer.alloc((l+1)*r),h=s[0];for(let f=0;f__left_angle_mark_r;f++){if(s.length>1){let t=1/0;for(let r=0;r__left_angle_mark_s.length;r++){let n=i[s[r]](e,c,l,a);n__left_angle_mark_t&&(h=s[r],t=n)}}d[u]=h,u++,n[h](e,c,l,d,u,a),u+=l,c+=l}return d}}}),require_packer=__commonJS({\"../../node_modules/.pnpm/pngjs@6.0.0/node_modules/pngjs/lib/packer.js\"(e,t){init_globals();var r=require_constants6(),n=require_crc(),i=require_bitpacker(),o=require_filter_pack(),a=require_lib6(),s=t.exports=function(e){if(this._options=e,e.deflateChunkSize=e.deflateChunkSize||32768,e.deflateLevel=null!=e.deflateLevel?e.deflateLevel:9,e.deflateStrategy=null!=e.deflateStrategy?e.deflateStrategy:3,e.inputHasAlpha=null==e.inputHasAlpha||e.inputHasAlpha,e.deflateFactory=e.deflateFactory||a.createDeflate,e.bitDepth=e.bitDepth||8,e.colorType=\"number\"==typeof e.colorType?e.colorType:r.COLORTYPE_COLOR_ALPHA,e.inputColorType=\"number\"==typeof e.inputColorType?e.inputColorType:r.COLORTYPE_COLOR_ALPHA,-1===[r.COLORTYPE_GRAYSCALE,r.COLORTYPE_COLOR,r.COLORTYPE_COLOR_ALPHA,r.COLORTYPE_ALPHA].indexOf(e.colorType))throw new Error(\"option color type:\"+e.colorType+\" is not supported at present\");if(-1===[r.COLORTYPE_GRAYSCALE,r.COLORTYPE_COLOR,r.COLORTYPE_COLOR_ALPHA,r.COLORTYPE_ALPHA].indexOf(e.inputColorType))throw new Error(\"option input color type:\"+e.inputColorType+\" is not supported at present\");if(8!==e.bitDepth&&16!==e.bitDepth)throw new Error(\"option bit depth:\"+e.bitDepth+\" is not supported at present\")};s.prototype.getDeflateOptions=function(){return{chunkSize:this._options.deflateChunkSize,level:this._options.deflateLevel,strategy:this._options.deflateStrategy}},s.prototype.createDeflate=function(){return this._options.deflateFactory(this.getDeflateOptions())},s.prototype.filterData=function(e,t,n){let a=i(e,t,n,this._options),s=r.COLORTYPE_TO_BPP_MAP[this._options.colorType];return o(a,t,n,this._options,s)},s.prototype._packChunk=function(e,t){let r=t?t.length:0,i=Buffer.alloc(r+12);return i.writeUInt32BE(r,0),i.writeUInt32BE(e,4),t&&t.copy(i,8),i.writeInt32BE(n.crc32(i.slice(4,i.length-4)),i.length-4),i},s.prototype.packGAMA=function(e){let t=Buffer.alloc(4);return t.writeUInt32BE(Math.floor(e*r.GAMMA_DIVISION),0),this._packChunk(r.TYPE_gAMA,t)},s.prototype.packIHDR=function(e,t){let n=Buffer.alloc(13);return n.writeUInt32BE(e,0),n.writeUInt32BE(t,4),n[8]=this._options.bitDepth,n[9]=this._options.colorType,n[10]=0,n[11]=0,n[12]=0,this._packChunk(r.TYPE_IHDR,n)},s.prototype.packIDAT=function(e){return this._packChunk(r.TYPE_IDAT,e)},s.prototype.packIEND=function(){return this._packChunk(r.TYPE_IEND,null)}}}),require_packer_async=__commonJS({\"../../node_modules/.pnpm/pngjs@6.0.0/node_modules/pngjs/lib/packer-async.js\"(e,t){init_globals();var r=require_util(),n=require_stream_browserify(),i=require_constants6(),o=require_packer(),a=t.exports=function(e){n.call(this);let t=e||{};this._packer=new o(t),this._deflate=this._packer.createDeflate(),this.readable=!0};r.inherits(a,n),a.prototype.pack=function(e,t,r,n){this.emit(\"data\",Buffer.from(i.PNG_SIGNATURE)),this.emit(\"data\",this._packer.packIHDR(t,r)),n&&this.emit(\"data\",this._packer.packGAMA(n));let o=this._packer.filterData(e,t,r);this._deflate.on(\"error\",this.emit.bind(this,\"error\")),this._deflate.on(\"data\",function(e){this.emit(\"data\",this._packer.packIDAT(e))}.bind(this)),this._deflate.on(\"end\",function(){this.emit(\"data\",this._packer.packIEND()),this.emit(\"end\")}.bind(this)),this._deflate.end(o)}}}),require_sync_inflate=__commonJS({\"../../node_modules/.pnpm/pngjs@6.0.0/node_modules/pngjs/lib/sync-inflate.js\"(e,t){init_globals();var r=require_assert().ok,n=require_lib6(),i=require_util(),o=require_buffer().kMaxLength;function a(e){if(!(this instanceof a))return new a(e);e&&e.chunkSize__left_angle_mark_n.Z_MIN_CHUNK&&(e.chunkSize=n.Z_MIN_CHUNK),n.Inflate.call(this,e),this._offset=void 0===this._offset?this._outOffset:this._offset,this._buffer=this._buffer||this._outBuffer,e&&null!=e.maxLength&&(this._maxLength=e.maxLength)}function s(e,t){t&&import_browser.default.nextTick(t),e._handle&&(e._handle.close(),e._handle=null)}function l(e,t){return function(e,t){if(\"string\"==typeof t&&(t=Buffer.from(t)),!(t instanceof Buffer))throw new TypeError(\"Not a string or buffer\");let r=e._finishFlushFlag;return null==r&&(r=n.Z_FINISH),e._processChunk(t,r)}(new a(t),e)}a.prototype._processChunk=function(e,t,i){if(\"function\"==typeof i)return n.Inflate._processChunk.call(this,e,t,i);let a,l,u=this,c=e&&e.length,d=this._chunkSize-this._offset,h=this._maxLength,f=0,p=[],m=0;function g(e,t){if(u._hadError)return;let n=d-t;if(r(n>=0,\"have should not go down\"),n>0){let e=u._buffer.slice(u._offset,u._offset+n);if(u._offset+=n,e.length>h&&(e=e.slice(0,h)),p.push(e),m+=e.length,h-=e.length,0===h)return!1}return(0===t||u._offset>=u._chunkSize)&&(d=u._chunkSize,u._offset=0,u._buffer=Buffer.allocUnsafe(u._chunkSize)),0===t&&(f+=c-e,c=e,!0)}this.on(\"error\",(function(e){a=e})),r(this._handle,\"zlib binding closed\");do{l=this._handle.writeSync(t,e,f,c,this._buffer,this._offset,d),l=l||this._writeState}while(!this._hadError&&g(l[0],l[1]));if(this._hadError)throw a;if(m>=o)throw s(this),new RangeError(\"Cannot create final Buffer. It would be larger than 0x\"+o.toString(16)+\" bytes\");let _=Buffer.concat(p,m);return s(this),_},i.inherits(a,n.Inflate),t.exports=e=l,e.Inflate=a,e.createInflate=function(e){return new a(e)},e.inflateSync=l}}),require_sync_reader=__commonJS({\"../../node_modules/.pnpm/pngjs@6.0.0/node_modules/pngjs/lib/sync-reader.js\"(e,t){init_globals();var r=t.exports=function(e){this._buffer=e,this._reads=[]};r.prototype.read=function(e,t){this._reads.push({length:Math.abs(e),allowLess:e__left_angle_mark_0,func:t})},r.prototype.process=function(){for(;this._reads.length>0&&this._buffer.length;){let e=this._reads[0];if(!this._buffer.length||!(this._buffer.length>=e.length||e.allowLess))break;{this._reads.shift();let t=this._buffer;this._buffer=t.slice(e.length),e.func.call(this,t.slice(0,e.length))}}if(this._reads.length>0)throw new Error(\"There are some read requests waitng on finished stream\");if(this._buffer.length>0)throw new Error(\"unrecognised content at end of stream\")}}}),require_filter_parse_sync=__commonJS({\"../../node_modules/.pnpm/pngjs@6.0.0/node_modules/pngjs/lib/filter-parse-sync.js\"(e){init_globals();var t=require_sync_reader(),r=require_filter_parse();e.process=function(e,n){let i=[],o=new t(e);return new r(n,{read:o.read.bind(o),write:function(e){i.push(e)},complete:function(){}}).start(),o.process(),Buffer.concat(i)}}}),require_parser_sync=__commonJS({\"../../node_modules/.pnpm/pngjs@6.0.0/node_modules/pngjs/lib/parser-sync.js\"(e,t){init_globals();var r=!0,n=require_lib6(),i=require_sync_inflate();n.deflateSync||(r=!1);var o=require_sync_reader(),a=require_filter_parse_sync(),s=require_parser6(),l=require_bitmapper(),u=require_format_normaliser();t.exports=function(e,t){if(!r)throw new Error(\"To use the sync capability of this library in old node versions, please pin pngjs to v2.3.0\");let c,d,h,f=[],p=new o(e);if(new s(t,{read:p.read.bind(p),error:function(e){c=e},metadata:function(e){d=e},gamma:function(e){h=e},palette:function(e){d.palette=e},transColor:function(e){d.transColor=e},inflateData:function(e){f.push(e)},simpleTransparency:function(){d.alpha=!0}}).start(),p.process(),c)throw c;let m,g=Buffer.concat(f);if(f.length=0,d.interlace)m=n.inflateSync(g);else{let e=(1+(d.width*d.bpp*d.depth+7>>3))*d.height;m=i(g,{chunkSize:e,maxLength:e})}if(g=null,!m||!m.length)throw new Error(\"bad png - invalid inflate data response\");let _=a.process(m,d);g=null;let b=l.dataToBitMap(_,d);_=null;let y=u(b,d,t.skipRescale);return d.data=y,d.gamma=h||0,d}}}),require_packer_sync=__commonJS({\"../../node_modules/.pnpm/pngjs@6.0.0/node_modules/pngjs/lib/packer-sync.js\"(e,t){init_globals();var r=!0,n=require_lib6();n.deflateSync||(r=!1);var i=require_constants6(),o=require_packer();t.exports=function(e,t){if(!r)throw new Error(\"To use the sync capability of this library in old node versions, please pin pngjs to v2.3.0\");let a=new o(t||{}),s=[];s.push(Buffer.from(i.PNG_SIGNATURE)),s.push(a.packIHDR(e.width,e.height)),e.gamma&&s.push(a.packGAMA(e.gamma));let l=a.filterData(e.data,e.width,e.height),u=n.deflateSync(l,a.getDeflateOptions());if(l=null,!u||!u.length)throw new Error(\"bad png - invalid compressed data response\");return s.push(a.packIDAT(u)),s.push(a.packIEND()),Buffer.concat(s)}}}),require_png_sync=__commonJS({\"../../node_modules/.pnpm/pngjs@6.0.0/node_modules/pngjs/lib/png-sync.js\"(e){init_globals();var t=require_parser_sync(),r=require_packer_sync();e.read=function(e,r){return t(e,r||{})},e.write=function(e,t){return r(e,t)}}}),require_png=__commonJS({\"../../node_modules/.pnpm/pngjs@6.0.0/node_modules/pngjs/lib/png.js\"(e){init_globals();var t=require_util(),r=require_stream_browserify(),n=require_parser_async(),i=require_packer_async(),o=require_png_sync(),a=e.PNG=function(e){r.call(this),e=e||{},this.width=0|e.width,this.height=0|e.height,this.data=this.width>0&&this.height>0?Buffer.alloc(4*this.width*this.height):null,e.fill&&this.data&&this.data.fill(0),this.gamma=0,this.readable=this.writable=!0,this._parser=new n(e),this._parser.on(\"error\",this.emit.bind(this,\"error\")),this._parser.on(\"close\",this._handleClose.bind(this)),this._parser.on(\"metadata\",this._metadata.bind(this)),this._parser.on(\"gamma\",this._gamma.bind(this)),this._parser.on(\"parsed\",function(e){this.data=e,this.emit(\"parsed\",e)}.bind(this)),this._packer=new i(e),this._packer.on(\"data\",this.emit.bind(this,\"data\")),this._packer.on(\"end\",this.emit.bind(this,\"end\")),this._parser.on(\"close\",this._handleClose.bind(this)),this._packer.on(\"error\",this.emit.bind(this,\"error\"))};t.inherits(a,r),a.sync=o,a.prototype.pack=function(){return this.data&&this.data.length?(import_browser.default.nextTick(function(){this._packer.pack(this.data,this.width,this.height,this.gamma)}.bind(this)),this):(this.emit(\"error\",\"No data provided\"),this)},a.prototype.parse=function(e,t){if(t){let e,r;e=function(e){this.removeListener(\"error\",r),this.data=e,t(null,this)}.bind(this),r=function(r){this.removeListener(\"parsed\",e),t(r,null)}.bind(this),this.once(\"parsed\",e),this.once(\"error\",r)}return this.end(e),this},a.prototype.write=function(e){return this._parser.write(e),!0},a.prototype.end=function(e){this._parser.end(e)},a.prototype._metadata=function(e){this.width=e.width,this.height=e.height,this.emit(\"metadata\",e)},a.prototype._gamma=function(e){this.gamma=e},a.prototype._handleClose=function(){this._parser.writable||this._packer.readable||this.emit(\"close\")},a.bitblt=function(e,t,r,n,i,o,a,s){if(n|=0,i|=0,o|=0,a|=0,s|=0,(r|=0)>e.width||n>e.height||r+i>e.width||n+o>e.height)throw new Error(\"bitblt reading outside image\");if(a>t.width||s>t.height||a+i>t.width||s+o>t.height)throw new Error(\"bitblt writing outside image\");for(let l=0;l__left_angle_mark_o;l++)e.data.copy(t.data,(s+l)*t.width+a__left_angle_mark___left_angle_mark_2,(n+l)*e.width+r__left_angle_mark___left_angle_mark_2,(n+l)*e.width+r+i__left_angle_mark___left_angle_mark_2)},a.prototype.bitblt=function(e,t,r,n,i,o,s){return a.bitblt(this,e,t,r,n,i,o,s),this},a.adjustGamma=function(e){if(e.gamma){for(let t=0;t__left_angle_mark_e.height;t++)for(let r=0;r__left_angle_mark_e.width;r++){let n=e.width*t+r__left_angle_mark___left_angle_mark_2;for(let t=0;t__left_angle_mark_3;t++){let r=e.data[n+t]/255;r=Math.pow(r,1/2.2/e.gamma),e.data[n+t]=Math.round(255*r)}}e.gamma=0}},a.prototype.adjustGamma=function(){a.adjustGamma(this)}}}),import_pngjs,MIME_TYPE2,PNG_FILTER_AUTO,PNG_FILTER_NONE,PNG_FILTER_SUB,PNG_FILTER_UP,PNG_FILTER_AVERAGE,PNG_FILTER_PATH,es_default20,init_es5=__esm({\"../../node_modules/.pnpm/@jimp+png@0.22.12_@jimp+custom@0.22.12/node_modules/@jimp/png/es/index.js\"(){init_globals(),import_pngjs=__toESM(require_png()),init_es(),MIME_TYPE2=\"image/png\",PNG_FILTER_AUTO=-1,PNG_FILTER_NONE=0,PNG_FILTER_SUB=1,PNG_FILTER_UP=2,PNG_FILTER_AVERAGE=3,PNG_FILTER_PATH=4,es_default20=()=>({mime:{[MIME_TYPE2]:[\"png\"]},constants:{MIME_PNG:MIME_TYPE2,PNG_FILTER_AUTO:PNG_FILTER_AUTO,PNG_FILTER_NONE:PNG_FILTER_NONE,PNG_FILTER_SUB:PNG_FILTER_SUB,PNG_FILTER_UP:PNG_FILTER_UP,PNG_FILTER_AVERAGE:PNG_FILTER_AVERAGE,PNG_FILTER_PATH:PNG_FILTER_PATH},hasAlpha:{[MIME_TYPE2]:!0},decoders:{[MIME_TYPE2]:import_pngjs.PNG.sync.read},encoders:{[MIME_TYPE2](e){const t=new import_pngjs.PNG({width:e.bitmap.width,height:e.bitmap.height});return t.data=e.bitmap.data,import_pngjs.PNG.sync.write(t,{deflateLevel:e._deflateLevel,deflateStrategy:e._deflateStrategy,filterType:e._filterType,colorType:\"number\"==typeof e._colorType?e._colorType:e._rgba?6:2,inputHasAlpha:e._rgba})}},class:{_deflateLevel:9,_deflateStrategy:3,_filterType:PNG_FILTER_AUTO,_colorType:null,deflateLevel(e,t){return\"number\"!=typeof e?throwError.call(this,\"l must be a number\",t):e__left_angle_mark_0||e>9?throwError.call(this,\"l must be a number 0 - 9\",t):(this._deflateLevel=Math.round(e),isNodePattern(t)&&t.call(this,null,this),this)},deflateStrategy(e,t){return\"number\"!=typeof e?throwError.call(this,\"s must be a number\",t):e__left_angle_mark_0||e>3?throwError.call(this,\"s must be a number 0 - 3\",t):(this._deflateStrategy=Math.round(e),isNodePattern(t)&&t.call(this,null,this),this)},filterType(e,t){return\"number\"!=typeof e?throwError.call(this,\"n must be a number\",t):e__left_angle_mark_-1||e>4?throwError.call(this,\"n must be -1 (auto) or a number 0 - 4\",t):(this._filterType=Math.round(e),isNodePattern(t)&&t.call(this,null,this),this)},colorType(e,t){return\"number\"!=typeof e?throwError.call(this,\"s must be a number\",t):0!==e&&2!==e&&4!==e&&6!==e?throwError.call(this,\"s must be a number 0, 2, 4, 6.\",t):(this._colorType=Math.round(e),isNodePattern(t)&&t.call(this,null,this),this)}}})}}),require_encoder2=__commonJS({\"../../node_modules/.pnpm/bmp-js@0.1.0/node_modules/bmp-js/lib/encoder.js\"(e,t){function r(e){this.buffer=e.data,this.width=e.width,this.height=e.height,this.extraBytes=this.width%4,this.rgbSize=this.height*(3*this.width+this.extraBytes),this.headerInfoSize=40,this.data=[],this.flag=\"BM\",this.reserved=0,this.offset=54,this.fileSize=this.rgbSize+this.offset,this.planes=1,this.bitPP=24,this.compress=0,this.hr=0,this.vr=0,this.colors=0,this.importantColors=0}init_globals(),r.prototype.encode=function(){var e=new Buffer(this.offset+this.rgbSize);this.pos=0,e.write(this.flag,this.pos,2),this.pos+=2,e.writeUInt32LE(this.fileSize,this.pos),this.pos+=4,e.writeUInt32LE(this.reserved,this.pos),this.pos+=4,e.writeUInt32LE(this.offset,this.pos),this.pos+=4,e.writeUInt32LE(this.headerInfoSize,this.pos),this.pos+=4,e.writeUInt32LE(this.width,this.pos),this.pos+=4,e.writeInt32LE(-this.height,this.pos),this.pos+=4,e.writeUInt16LE(this.planes,this.pos),this.pos+=2,e.writeUInt16LE(this.bitPP,this.pos),this.pos+=2,e.writeUInt32LE(this.compress,this.pos),this.pos+=4,e.writeUInt32LE(this.rgbSize,this.pos),this.pos+=4,e.writeUInt32LE(this.hr,this.pos),this.pos+=4,e.writeUInt32LE(this.vr,this.pos),this.pos+=4,e.writeUInt32LE(this.colors,this.pos),this.pos+=4,e.writeUInt32LE(this.importantColors,this.pos),this.pos+=4;for(var t=0,r=3*this.width+this.extraBytes,n=0;n__left_angle_mark_this.height;n++){for(var i=0;i__left_angle_mark_this.width;i++){var o=this.pos+n*r+3*i;t++,e[o]=this.buffer[t++],e[o+1]=this.buffer[t++],e[o+2]=this.buffer[t++]}if(this.extraBytes>0){var a=this.pos+n*r+3*this.width;e.fill(0,a,a+this.extraBytes)}}return e},t.exports=function(e,t){return void 0===t&&(t=100),{data:new r(e).encode(),width:e.width,height:e.height}}}}),require_decoder2=__commonJS({\"../../node_modules/.pnpm/bmp-js@0.1.0/node_modules/bmp-js/lib/decoder.js\"(e,t){function r(e,t){if(this.pos=0,this.buffer=e,this.is_with_alpha=!!t,this.bottom_up=!0,this.flag=this.buffer.toString(\"utf-8\",0,this.pos+=2),\"BM\"!=this.flag)throw new Error(\"Invalid BMP File\");this.parseHeader(),this.parseRGBA()}init_globals(),r.prototype.parseHeader=function(){if(this.fileSize=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.reserved=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.offset=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.headerSize=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.width=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.height=this.buffer.readInt32LE(this.pos),this.pos+=4,this.planes=this.buffer.readUInt16LE(this.pos),this.pos+=2,this.bitPP=this.buffer.readUInt16LE(this.pos),this.pos+=2,this.compress=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.rawSize=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.hr=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.vr=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.colors=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.importantColors=this.buffer.readUInt32LE(this.pos),this.pos+=4,16===this.bitPP&&this.is_with_alpha&&(this.bitPP=15),this.bitPP__left_angle_mark_15){var e=0===this.colors?1__left_angle_mark___left_angle_mark_this.bitPP:this.colors;this.palette=new Array(e);for(var t=0;t__left_angle_mark_e;t++){var r=this.buffer.readUInt8(this.pos++),n=this.buffer.readUInt8(this.pos++),i=this.buffer.readUInt8(this.pos++),o=this.buffer.readUInt8(this.pos++);this.palette[t]={red:i,green:n,blue:r,quad:o}}}this.height__left_angle_mark_0&&(this.height*=-1,this.bottom_up=!1)},r.prototype.parseRGBA=function(){var e=\"bit\"+this.bitPP,t=this.width*this.height*4;this.data=new Buffer(t),this[e]()},r.prototype.bit1=function(){var e=Math.ceil(this.width/8),t=e%4,r=this.height>=0?this.height-1:-this.height;for(r=this.height-1;r>=0;r--){for(var n=this.bottom_up?r:this.height-1-r,i=0;i__left_angle_mark_e;i++)for(var o=this.buffer.readUInt8(this.pos++),a=n*this.width*4+8*i*4,s=0;s__left_angle_mark_8&&8*i+s__left_angle_mark_this.width;s++){var l=this.palette[o>>7-s&1];this.data[a+4*s]=0,this.data[a+4*s+1]=l.blue,this.data[a+4*s+2]=l.green,this.data[a+4*s+3]=l.red}0!=t&&(this.pos+=4-t)}},r.prototype.bit4=function(){if(2==this.compress){let u=function(t){var r=this.palette[t];this.data[e]=0,this.data[e+1]=r.blue,this.data[e+2]=r.green,this.data[e+3]=r.red,e+=4};this.data.fill(255);for(var e=0,t=this.bottom_up?this.height-1:0,r=!1;e__left_angle_mark_this.data.length;){var n=this.buffer.readUInt8(this.pos++),i=this.buffer.readUInt8(this.pos++);if(0==n){if(0==i){this.bottom_up?t--:t++,e=t*this.width*4,r=!1;continue}if(1==i)break;if(2==i){var o=this.buffer.readUInt8(this.pos++),a=this.buffer.readUInt8(this.pos++);this.bottom_up?t-=a:t+=a,e+=a*this.width*4+4*o}else{for(var s=this.buffer.readUInt8(this.pos++),l=0;l__left_angle_mark_i;l++)r?u.call(this,15&s):u.call(this,(240&s)>>4),1&l&&l+1__left_angle_mark_i&&(s=this.buffer.readUInt8(this.pos++)),r=!r;1==(i+1>>1&1)&&this.pos++}}else for(l=0;l__left_angle_mark_n;l++)r?u.call(this,15&i):u.call(this,(240&i)>>4),r=!r}}else{var u=Math.ceil(this.width/2),c=u%4;for(a=this.height-1;a>=0;a--){var d=this.bottom_up?a:this.height-1-a;for(o=0;o__left_angle_mark_u;o++){i=this.buffer.readUInt8(this.pos++),e=d*this.width*4+2*o*4;var h=i>>4,f=15&i,p=this.palette[h];if(this.data[e]=0,this.data[e+1]=p.blue,this.data[e+2]=p.green,this.data[e+3]=p.red,2*o+1>=this.width)break;p=this.palette[f],this.data[e+4]=0,this.data[e+4+1]=p.blue,this.data[e+4+2]=p.green,this.data[e+4+3]=p.red}0!=c&&(this.pos+=4-c)}}},r.prototype.bit8=function(){if(1==this.compress){let l=function(t){var r=this.palette[t];this.data[e]=0,this.data[e+1]=r.blue,this.data[e+2]=r.green,this.data[e+3]=r.red,e+=4};this.data.fill(255);for(var e=0,t=this.bottom_up?this.height-1:0;e__left_angle_mark_this.data.length;){var r=this.buffer.readUInt8(this.pos++),n=this.buffer.readUInt8(this.pos++);if(0==r){if(0==n){this.bottom_up?t--:t++,e=t*this.width*4;continue}if(1==n)break;if(2==n){var i=this.buffer.readUInt8(this.pos++),o=this.buffer.readUInt8(this.pos++);this.bottom_up?t-=o:t+=o,e+=o*this.width*4+4*i}else{for(var a=0;a__left_angle_mark_n;a++){var s=this.buffer.readUInt8(this.pos++);l.call(this,s)}!0&n&&this.pos++}}else for(a=0;a__left_angle_mark_r;a++)l.call(this,n)}}else{var l=this.width%4;for(o=this.height-1;o>=0;o--){var u=this.bottom_up?o:this.height-1-o;for(i=0;i__left_angle_mark_this.width;i++)if(n=this.buffer.readUInt8(this.pos++),e=u*this.width*4+4*i,n__left_angle_mark_this.palette.length){var c=this.palette[n];this.data[e]=0,this.data[e+1]=c.blue,this.data[e+2]=c.green,this.data[e+3]=c.red}else this.data[e]=0,this.data[e+1]=255,this.data[e+2]=255,this.data[e+3]=255;0!=l&&(this.pos+=4-l)}}},r.prototype.bit15=function(){for(var e=this.width%3,t=parseInt(\"11111\",2),r=this.height-1;r>=0;r--){for(var n=this.bottom_up?r:this.height-1-r,i=0;i__left_angle_mark_this.width;i++){var o=this.buffer.readUInt16LE(this.pos);this.pos+=2;var a=(o&t)/t*255|0,s=(o>>5&t)/t*255|0,l=(o>>10&t)/t*255|0,u=o>>15?255:0,c=n*this.width*4+4*i;this.data[c]=u,this.data[c+1]=a,this.data[c+2]=s,this.data[c+3]=l}this.pos+=e}},r.prototype.bit16=function(){var e=this.width%2*2;this.maskRed=31744,this.maskGreen=992,this.maskBlue=31,this.mask0=0,3==this.compress&&(this.maskRed=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.maskGreen=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.maskBlue=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.mask0=this.buffer.readUInt32LE(this.pos),this.pos+=4);for(var t=[0,0,0],r=0;r__left_angle_mark_16;r++)this.maskRed>>r&1&&t[0]++,this.maskGreen>>r&1&&t[1]++,this.maskBlue>>r&1&&t[2]++;t[1]+=t[0],t[2]+=t[1],t[0]=8-t[0],t[1]-=8,t[2]-=8;for(var n=this.height-1;n>=0;n--){for(var i=this.bottom_up?n:this.height-1-n,o=0;o__left_angle_mark_this.width;o++){var a=this.buffer.readUInt16LE(this.pos);this.pos+=2;var s=(a&this.maskBlue)__left_angle_mark___left_angle_mark_t[0],l=(a&this.maskGreen)>>t[1],u=(a&this.maskRed)>>t[2],c=i*this.width*4+4*o;this.data[c]=0,this.data[c+1]=s,this.data[c+2]=l,this.data[c+3]=u}this.pos+=e}},r.prototype.bit24=function(){for(var e=this.height-1;e>=0;e--){for(var t=this.bottom_up?e:this.height-1-e,r=0;r__left_angle_mark_this.width;r++){var n=this.buffer.readUInt8(this.pos++),i=this.buffer.readUInt8(this.pos++),o=this.buffer.readUInt8(this.pos++),a=t*this.width*4+4*r;this.data[a]=0,this.data[a+1]=n,this.data[a+2]=i,this.data[a+3]=o}this.pos+=this.width%4}},r.prototype.bit32=function(){if(3==this.compress){this.maskRed=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.maskGreen=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.maskBlue=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.mask0=this.buffer.readUInt32LE(this.pos),this.pos+=4;for(var e=this.height-1;e>=0;e--)for(var t=this.bottom_up?e:this.height-1-e,r=0;r__left_angle_mark_this.width;r++){var n=this.buffer.readUInt8(this.pos++),i=this.buffer.readUInt8(this.pos++),o=this.buffer.readUInt8(this.pos++),a=this.buffer.readUInt8(this.pos++),s=t*this.width*4+4*r;this.data[s]=n,this.data[s+1]=i,this.data[s+2]=o,this.data[s+3]=a}}else for(e=this.height-1;e>=0;e--)for(t=this.bottom_up?e:this.height-1-e,r=0;r__left_angle_mark_this.width;r++)i=this.buffer.readUInt8(this.pos++),o=this.buffer.readUInt8(this.pos++),a=this.buffer.readUInt8(this.pos++),n=this.buffer.readUInt8(this.pos++),s=t*this.width*4+4*r,this.data[s]=n,this.data[s+1]=i,this.data[s+2]=o,this.data[s+3]=a},r.prototype.getData=function(){return this.data},t.exports=function(e){return new r(e)}}}),require_bmp_js=__commonJS({\"../../node_modules/.pnpm/bmp-js@0.1.0/node_modules/bmp-js/index.js\"(e,t){init_globals();var r=require_encoder2(),n=require_decoder2();t.exports={encode:r,decode:n}}}),import_bmp_js,MIME_TYPE3,MIME_TYPE_SECOND,decode2,encode,es_default21;function toAGBR(e){return scan(e,0,0,e.bitmap.width,e.bitmap.height,(function(e,t,r){const n=this.bitmap.data[r+0],i=this.bitmap.data[r+1],o=this.bitmap.data[r+2],a=this.bitmap.data[r+3];this.bitmap.data[r+0]=a,this.bitmap.data[r+1]=o,this.bitmap.data[r+2]=i,this.bitmap.data[r+3]=n})).bitmap}function fromAGBR(e){return scan({bitmap:e},0,0,e.width,e.height,(function(t,r,n){const i=this.bitmap.data[n+0],o=this.bitmap.data[n+1],a=this.bitmap.data[n+2],s=this.bitmap.data[n+3];this.bitmap.data[n+0]=s,this.bitmap.data[n+1]=a,this.bitmap.data[n+2]=o,this.bitmap.data[n+3]=e.is_with_alpha?i:255})).bitmap}var init_es6=__esm({\"../../node_modules/.pnpm/@jimp+bmp@0.22.12_@jimp+custom@0.22.12/node_modules/@jimp/bmp/es/index.js\"(){init_globals(),import_bmp_js=__toESM(require_bmp_js()),init_es(),MIME_TYPE3=\"image/bmp\",MIME_TYPE_SECOND=\"image/x-ms-bmp\",decode2=e=>fromAGBR(import_bmp_js.default.decode(e)),encode=e=>import_bmp_js.default.encode(toAGBR(e)).data,es_default21=()=>({mime:{[MIME_TYPE3]:[\"bmp\"]},constants:{MIME_BMP:MIME_TYPE3,MIME_X_MS_BMP:MIME_TYPE_SECOND},decoders:{[MIME_TYPE3]:decode2,[MIME_TYPE_SECOND]:decode2},encoders:{[MIME_TYPE3]:encode,[MIME_TYPE_SECOND]:encode}})}}),require_strings=__commonJS({\"../../node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/utils/strings.js\"(e){init_globals();var t=require_common5(),r=!0,n=!0;try{String.fromCharCode.apply(null,[0])}catch(s){r=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(s){n=!1}var i,o=new t.Buf8(256);for(i=0;i__left_angle_mark_256;i++)o[i]=i>=252?6:i>=248?5:i>=240?4:i>=224?3:i>=192?2:1;function a(e,i){if(i__left_angle_mark_65534&&(e.subarray&&n||!e.subarray&&r))return String.fromCharCode.apply(null,t.shrinkBuf(e,i));for(var o=\"\",a=0;a__left_angle_mark_i;a++)o+=String.fromCharCode(e[a]);return o}o[254]=o[254]=1,e.string2buf=function(e){var r,n,i,o,a,s=e.length,l=0;for(o=0;o__left_angle_mark_s;o++)55296==(64512&(n=e.charCodeAt(o)))&&o+1__left_angle_mark_s&&56320==(64512&(i=e.charCodeAt(o+1)))&&(n=65536+(n-55296__left_angle_mark___left_angle_mark_10)+(i-56320),o++),l+=n__left_angle_mark_128?1:n__left_angle_mark_2048?2:n__left_angle_mark_65536?3:4;for(r=new t.Buf8(l),a=0,o=0;a__left_angle_mark_l;o++)55296==(64512&(n=e.charCodeAt(o)))&&o+1__left_angle_mark_s&&56320==(64512&(i=e.charCodeAt(o+1)))&&(n=65536+(n-55296__left_angle_mark___left_angle_mark_10)+(i-56320),o++),n__left_angle_mark_128?r[a++]=n:n__left_angle_mark_2048?(r[a++]=192|n>>>6,r[a++]=128|63&n):n__left_angle_mark_65536?(r[a++]=224|n>>>12,r[a++]=128|n>>>6&63,r[a++]=128|63&n):(r[a++]=240|n>>>18,r[a++]=128|n>>>12&63,r[a++]=128|n>>>6&63,r[a++]=128|63&n);return r},e.buf2binstring=function(e){return a(e,e.length)},e.binstring2buf=function(e){for(var r=new t.Buf8(e.length),n=0,i=r.length;n__left_angle_mark_i;n++)r[n]=e.charCodeAt(n);return r},e.buf2string=function(e,t){var r,n,i,s,l=t||e.length,u=new Array(2*l);for(n=0,r=0;r__left_angle_mark_l;)if((i=e[r++])__left_angle_mark_128)u[n++]=i;else if((s=o[i])>4)u[n++]=65533,r+=s-1;else{for(i&=2===s?31:3===s?15:7;s>1&&r__left_angle_mark_l;)i=i__left_angle_mark___left_angle_mark_6|63&e[r++],s--;s>1?u[n++]=65533:i__left_angle_mark_65536?u[n++]=i:(i-=65536,u[n++]=55296|i>>10&1023,u[n++]=56320|1023&i)}return a(u,n)},e.utf8border=function(e,t){var r;for((t=t||e.length)>e.length&&(t=e.length),r=t-1;r>=0&&128==(192&e[r]);)r--;return r__left_angle_mark_0||0===r?t:r+o[e[r]]>t?r:t}}}),require_deflate2=__commonJS({\"../../node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/deflate.js\"(e){init_globals();var t=require_deflate(),r=require_common5(),n=require_strings(),i=require_messages4(),o=require_zstream(),a=Object.prototype.toString;function s(e){if(!(this instanceof s))return new s(e);this.options=r.assign({level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0,to:\"\"},e||{});var l=this.options;l.raw&&l.windowBits>0?l.windowBits=-l.windowBits:l.gzip&&l.windowBits>0&&l.windowBits__left_angle_mark_16&&(l.windowBits+=16),this.err=0,this.msg=\"\",this.ended=!1,this.chunks=[],this.strm=new o,this.strm.avail_out=0;var u=t.deflateInit2(this.strm,l.level,l.method,l.windowBits,l.memLevel,l.strategy);if(0!==u)throw new Error(i[u]);if(l.header&&t.deflateSetHeader(this.strm,l.header),l.dictionary){var c;if(c=\"string\"==typeof l.dictionary?n.string2buf(l.dictionary):\"[object ArrayBuffer]\"===a.call(l.dictionary)?new Uint8Array(l.dictionary):l.dictionary,0!==(u=t.deflateSetDictionary(this.strm,c)))throw new Error(i[u]);this._dict_set=!0}}function l(e,t){var r=new s(t);if(r.push(e,!0),r.err)throw r.msg||i[r.err];return r.result}s.prototype.push=function(e,i){var o,s,l=this.strm,u=this.options.chunkSize;if(this.ended)return!1;s=i===~~i?i:!0===i?4:0,\"string\"==typeof e?l.input=n.string2buf(e):\"[object ArrayBuffer]\"===a.call(e)?l.input=new Uint8Array(e):l.input=e,l.next_in=0,l.avail_in=l.input.length;do{if(0===l.avail_out&&(l.output=new r.Buf8(u),l.next_out=0,l.avail_out=u),1!==(o=t.deflate(l,s))&&0!==o)return this.onEnd(o),this.ended=!0,!1;0!==l.avail_out&&(0!==l.avail_in||4!==s&&2!==s)||(\"string\"===this.options.to?this.onData(n.buf2binstring(r.shrinkBuf(l.output,l.next_out))):this.onData(r.shrinkBuf(l.output,l.next_out)))}while((l.avail_in>0||0===l.avail_out)&&1!==o);return 4===s?(o=t.deflateEnd(this.strm),this.onEnd(o),this.ended=!0,0===o):2!==s||(this.onEnd(0),l.avail_out=0,!0)},s.prototype.onData=function(e){this.chunks.push(e)},s.prototype.onEnd=function(e){0===e&&(\"string\"===this.options.to?this.result=this.chunks.join(\"\"):this.result=r.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},e.Deflate=s,e.deflate=l,e.deflateRaw=function(e,t){return(t=t||{}).raw=!0,l(e,t)},e.gzip=function(e,t){return(t=t||{}).gzip=!0,l(e,t)}}}),require_gzheader=__commonJS({\"../../node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/gzheader.js\"(e,t){init_globals(),t.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name=\"\",this.comment=\"\",this.hcrc=0,this.done=!1}}}),require_inflate2=__commonJS({\"../../node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/inflate.js\"(e){init_globals();var t=require_inflate(),r=require_common5(),n=require_strings(),i=require_constants5(),o=require_messages4(),a=require_zstream(),s=require_gzheader(),l=Object.prototype.toString;function u(e){if(!(this instanceof u))return new u(e);this.options=r.assign({chunkSize:16384,windowBits:0,to:\"\"},e||{});var c=this.options;c.raw&&c.windowBits>=0&&c.windowBits__left_angle_mark_16&&(c.windowBits=-c.windowBits,0===c.windowBits&&(c.windowBits=-15)),!(c.windowBits>=0&&c.windowBits__left_angle_mark_16)||e&&e.windowBits||(c.windowBits+=32),c.windowBits>15&&c.windowBits__left_angle_mark_48&&(15&c.windowBits||(c.windowBits|=15)),this.err=0,this.msg=\"\",this.ended=!1,this.chunks=[],this.strm=new a,this.strm.avail_out=0;var d=t.inflateInit2(this.strm,c.windowBits);if(d!==i.Z_OK)throw new Error(o[d]);if(this.header=new s,t.inflateGetHeader(this.strm,this.header),c.dictionary&&(\"string\"==typeof c.dictionary?c.dictionary=n.string2buf(c.dictionary):\"[object ArrayBuffer]\"===l.call(c.dictionary)&&(c.dictionary=new Uint8Array(c.dictionary)),c.raw&&(d=t.inflateSetDictionary(this.strm,c.dictionary))!==i.Z_OK))throw new Error(o[d])}function c(e,t){var r=new u(t);if(r.push(e,!0),r.err)throw r.msg||o[r.err];return r.result}u.prototype.push=function(e,o){var a,s,u,c,d,h=this.strm,f=this.options.chunkSize,p=this.options.dictionary,m=!1;if(this.ended)return!1;s=o===~~o?o:!0===o?i.Z_FINISH:i.Z_NO_FLUSH,\"string\"==typeof e?h.input=n.binstring2buf(e):\"[object ArrayBuffer]\"===l.call(e)?h.input=new Uint8Array(e):h.input=e,h.next_in=0,h.avail_in=h.input.length;do{if(0===h.avail_out&&(h.output=new r.Buf8(f),h.next_out=0,h.avail_out=f),(a=t.inflate(h,i.Z_NO_FLUSH))===i.Z_NEED_DICT&&p&&(a=t.inflateSetDictionary(this.strm,p)),a===i.Z_BUF_ERROR&&!0===m&&(a=i.Z_OK,m=!1),a!==i.Z_STREAM_END&&a!==i.Z_OK)return this.onEnd(a),this.ended=!0,!1;h.next_out&&(0!==h.avail_out&&a!==i.Z_STREAM_END&&(0!==h.avail_in||s!==i.Z_FINISH&&s!==i.Z_SYNC_FLUSH)||(\"string\"===this.options.to?(u=n.utf8border(h.output,h.next_out),c=h.next_out-u,d=n.buf2string(h.output,u),h.next_out=c,h.avail_out=f-c,c&&r.arraySet(h.output,h.output,u,c,0),this.onData(d)):this.onData(r.shrinkBuf(h.output,h.next_out)))),0===h.avail_in&&0===h.avail_out&&(m=!0)}while((h.avail_in>0||0===h.avail_out)&&a!==i.Z_STREAM_END);return a===i.Z_STREAM_END&&(s=i.Z_FINISH),s===i.Z_FINISH?(a=t.inflateEnd(this.strm),this.onEnd(a),this.ended=!0,a===i.Z_OK):s!==i.Z_SYNC_FLUSH||(this.onEnd(i.Z_OK),h.avail_out=0,!0)},u.prototype.onData=function(e){this.chunks.push(e)},u.prototype.onEnd=function(e){e===i.Z_OK&&(\"string\"===this.options.to?this.result=this.chunks.join(\"\"):this.result=r.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},e.Inflate=u,e.inflate=c,e.inflateRaw=function(e,t){return(t=t||{}).raw=!0,c(e,t)},e.ungzip=c}}),require_pako=__commonJS({\"../../node_modules/.pnpm/pako@1.0.11/node_modules/pako/index.js\"(e,t){init_globals();var r={};(0,require_common5().assign)(r,require_deflate2(),require_inflate2(),require_constants5()),t.exports=r}}),require_UTIF=__commonJS({\"../../node_modules/.pnpm/utif2@4.1.0/node_modules/utif2/UTIF.js\"(e,t){init_globals(),function(){var e={};\"object\"==typeof t?t.exports=e:self.UTIF=e;var r,n,i,o,a,s,l,u,c,d,h,f,p,m,g,_,b,y=\"function\"==typeof __require?require_pako():self.pako;function v(){import_browser.default,import_console_browserify.default.log.apply(import_console_browserify.default,arguments)}n=e,i=y,function(){var e=function(){function e(e){this.message=\"JPEG error: \"+e}return e.prototype=new Error,e.prototype.name=\"JpegError\",e.constructor=e,e}(),t=function(){var t=new Uint8Array([0,1,8,16,9,2,3,10,17,24,32,25,18,11,4,5,12,19,26,33,40,48,41,34,27,20,13,6,7,14,21,28,35,42,49,56,57,50,43,36,29,22,15,23,30,37,44,51,58,59,52,45,38,31,39,46,53,60,61,54,47,55,62,63]),n=4017,i=799,o=3406,a=2276,s=1567,l=3784,u=5793,c=2896;function d(e){null==e&&(e={}),null==e.w&&(e.w=-1),this.V=e.n,this.N=e.w}function h(e,t){for(var r,n,i,o=0,a=[],s=16;s>0&&!e[s-1];)s--;a.push({children:[],index:0});var l=a[0];for(r=0;r__left_angle_mark_s;r++){for(n=0;n__left_angle_mark_e[r];n++){for((l=a.pop()).children[l.index]=t[o];l.index>0;)l=a.pop();for(l.index++,a.push(l);a.length__left_angle_mark_=r;)a.push(i={children:[],index:0}),l.children[l.index]=i.children,l=i;o++}r+1__left_angle_mark_s&&(a.push(i={children:[],index:0}),l.children[l.index]=i.children,l=i)}return a[0].children}function f(e,t,r){return 64*((e.P+1)*t+r)}function p(n,i,o,a,s,l,u,c,d,h){null==h&&(h=!1);var p,m,g,b,y,v,A,w,S,E,x,C=o.m,T=o.Z,R=i,I=0,k=0,P=0,M=0,O=0,B=0;function N(){if(k>0)return k--,I>>k&1;if(255===(I=n[i++])){var t=n[i++];if(t){if(220===t&&h){var a=r(n,i+=2);if(i+=2,a>0&&a!==o.s)throw new DNLMarkerError(\"Found DNL marker (0xFFDC) while parsing scan data\",a)}else if(217===t){if(h){var s=8*O;if(s>0&&s__left_angle_mark_o.s/10)throw new DNLMarkerError(\"Found EOI marker (0xFFD9) while parsing scan data, possibly caused by incorrect `scanLines` parameter\",s)}throw new EOIMarkerError(\"Found EOI marker (0xFFD9) while parsing scan data\")}throw new e(\"unexpected marker\")}}return k=7,I>>>7}function j(t){for(var r=t;;){switch(typeof(r=r[N()])){case\"number\":return r;case\"object\":continue}throw new e(\"invalid huffman sequence\")}}function L(e){for(var t=0;e>0;)t=t__left_angle_mark___left_angle_mark_1|N(),e--;return t}function D(e){if(1===e)return 1===N()?1:-1;var t=L(e);return t>=1__left_angle_mark___left_angle_mark_e-1?t:t+(-1__left_angle_mark___left_angle_mark_e)+1}function F(e,t,r,n,i){var o=r%C;O=(r/C|0)*e.A+n;var a=o*e.h+i;t(e,f(e,O,a))}function U(e,t,r){O=r/e.P|0;var n=r%e.P;t(e,f(e,O,n))}var z=a.length;for(A=T?0===l?0===c?function(e,t){var r=j(e.J),n=0===r?0:D(r)__left_angle_mark___left_angle_mark_d;e.D[t]=e.Q+=n}:function(e,t){e.D[t]|=N()__left_angle_mark___left_angle_mark_d}:0===c?function(e,r){if(P>0)P--;else for(var n=l,i=u;n__left_angle_mark_=i;){var o=j(e.i),a=15&o,s=o>>4;if(0!==a){var c=t[n+=s];e.D[r+c]=D(a)*(1__left_angle_mark___left_angle_mark_d),n++}else{if(s__left_angle_mark_15){P=L(s)+(1__left_angle_mark___left_angle_mark_s)-1;break}n+=16}}}:function(r,n){for(var i,o,a=l,s=u,c=0;a__left_angle_mark_=s;){var h=n+t[a],f=r.D[h]__left_angle_mark_0?-1:1;switch(M){case 0:if(c=(o=j(r.i))>>4,0==(i=15&o))c__left_angle_mark_15?(P=L(c)+(1__left_angle_mark___left_angle_mark_c),M=4):(c=16,M=1);else{if(1!==i)throw new e(\"invalid ACn encoding\");p=D(i),M=c?2:3}continue;case 1:case 2:r.D[h]?r.D[h]+=f*(N()__left_angle_mark___left_angle_mark_d):0==--c&&(M=2===M?3:0);break;case 3:r.D[h]?r.D[h]+=f*(N()__left_angle_mark___left_angle_mark_d):(r.D[h]=p__left_angle_mark___left_angle_mark_d,M=0);break;case 4:r.D[h]&&(r.D[h]+=f*(N()__left_angle_mark___left_angle_mark_d))}a++}4===M&&0==--P&&(M=0)}:function(e,r){var n=j(e.J),i=0===n?0:D(n),o=1;for(e.D[r]=e.Q+=i;o__left_angle_mark_64;){var a=j(e.i),s=15&a,l=a>>4;if(0!==s){var u=t[o+=l];e.D[r+u]=D(s),o++}else{if(l__left_angle_mark_15)break;o+=16}}},S=1===z?a[0].P*a[0].c:C*o.R;B__left_angle_mark_=S;){var q=s?Math.min(S-B,s):S;if(q>0){for(g=0;g__left_angle_mark_z;g++)a[g].Q=0;if(P=0,1===z)for(m=a[0],v=0;v__left_angle_mark_q;v++)U(m,A,B),B++;else for(v=0;v__left_angle_mark_q;v++){for(g=0;g__left_angle_mark_z;g++)for(E=(m=a[g]).h,x=m.A,b=0;b__left_angle_mark_x;b++)for(y=0;y__left_angle_mark_E;y++)F(m,A,B,b,y);B++}}if(k=0,!(w=_(n,i)))break;if(w.u&&(i=w.offset),!(w.M>=65488&&w.M__left_angle_mark_=65495))break;i+=2}return i-R}function m(t,r,d){var h,f,p,m,g,_,b,y,v,A,w,S,E,x,C,T,R,I=t.$,k=t.D;if(!I)throw new e(\"missing required Quantization Table.\");for(var P=0;P__left_angle_mark_64;P+=8)v=k[r+P],A=k[r+P+1],w=k[r+P+2],S=k[r+P+3],E=k[r+P+4],x=k[r+P+5],C=k[r+P+6],T=k[r+P+7],v*=I[P],A|w|S|E|x|C|T?(A*=I[P+1],w*=I[P+2],S*=I[P+3],E*=I[P+4],x*=I[P+5],C*=I[P+6],T*=I[P+7],f=(h=(h=u*v+128>>8)+(f=u*E+128>>8)+1>>1)-f,R=(p=w)*l+(m=C)*s+128>>8,p=p*s-m*l+128>>8,b=(g=(g=c*(A-T)+128>>8)+(b=x__left_angle_mark___left_angle_mark_4)+1>>1)-b,_=(y=(y=c*(A+T)+128>>8)+(_=S__left_angle_mark___left_angle_mark_4)+1>>1)-_,m=(h=h+(m=R)+1>>1)-m,p=(f=f+p+1>>1)-p,R=g*a+y*o+2048>>12,g=g*o-y*a+2048>>12,y=R,R=_*i+b*n+2048>>12,_=_*n-b*i+2048>>12,b=R,d[P]=h+y,d[P+7]=h-y,d[P+1]=f+b,d[P+6]=f-b,d[P+2]=p+_,d[P+5]=p-_,d[P+3]=m+g,d[P+4]=m-g):(R=u*v+512>>10,d[P]=R,d[P+1]=R,d[P+2]=R,d[P+3]=R,d[P+4]=R,d[P+5]=R,d[P+6]=R,d[P+7]=R);for(var M=0;M__left_angle_mark_8;++M)v=d[M],(A=d[M+8])|(w=d[M+16])|(S=d[M+24])|(E=d[M+32])|(x=d[M+40])|(C=d[M+48])|(T=d[M+56])?(f=(h=4112+((h=u*v+2048>>12)+(f=u*E+2048>>12)+1>>1))-f,R=(p=w)*l+(m=C)*s+2048>>12,p=p*s-m*l+2048>>12,m=R,b=(g=(g=c*(A-T)+2048>>12)+(b=x)+1>>1)-b,_=(y=(y=c*(A+T)+2048>>12)+(_=S)+1>>1)-_,R=g*a+y*o+2048>>12,g=g*o-y*a+2048>>12,y=R,R=_*i+b*n+2048>>12,_=_*n-b*i+2048>>12,(v=(h=h+m+1>>1)+y)__left_angle_mark_16?v=0:v>=4080?v=255:v>>=4,(A=(f=f+p+1>>1)+(b=R))__left_angle_mark_16?A=0:A>=4080?A=255:A>>=4,(w=(p=f-p)+_)__left_angle_mark_16?w=0:w>=4080?w=255:w>>=4,(S=(m=h-m)+g)__left_angle_mark_16?S=0:S>=4080?S=255:S>>=4,(E=m-g)__left_angle_mark_16?E=0:E>=4080?E=255:E>>=4,(x=p-_)__left_angle_mark_16?x=0:x>=4080?x=255:x>>=4,(C=f-b)__left_angle_mark_16?C=0:C>=4080?C=255:C>>=4,(T=h-y)__left_angle_mark_16?T=0:T>=4080?T=255:T>>=4,k[r+M]=v,k[r+M+8]=A,k[r+M+16]=w,k[r+M+24]=S,k[r+M+32]=E,k[r+M+40]=x,k[r+M+48]=C,k[r+M+56]=T):(R=(R=u*v+8192>>14)__left_angle_mark_-2040?0:R>=2024?255:R+2056>>4,k[r+M]=R,k[r+M+8]=R,k[r+M+16]=R,k[r+M+24]=R,k[r+M+32]=R,k[r+M+40]=R,k[r+M+48]=R,k[r+M+56]=R)}function g(e,t){for(var r=t.P,n=t.c,i=new Int16Array(64),o=0;o__left_angle_mark_n;o++)for(var a=0;a__left_angle_mark_r;a++)m(t,f(t,o,a),i);return t.D}function _(e,t,n){null==n&&(n=t);var i=e.length-1,o=n__left_angle_mark_t?n:t;if(t>=i)return null;var a=r(e,t);if(a>=65472&&a__left_angle_mark_=65534)return{u:null,M:a,offset:t};for(var s=r(e,o);!(s>=65472&&s__left_angle_mark_=65534);){if(++o>=i)return null;s=r(e,o)}return{u:a.toString(16),M:s,offset:o}}return d.prototype={parse(n,i){null==i&&(i={});var o,a,s=i.F,l=0,u=null,c=null,d=0;function f(){var e=r(n,l),t=(l+=2)+e-2,i=_(n,t,l);i&&i.u&&(t=i.offset);var o=n.subarray(l,t);return l+=o.length,o}function m(e){for(var t=Math.ceil(e.o/8/e.X),r=Math.ceil(e.s/8/e.B),n=0;n__left_angle_mark_e.W.length;n++){q=e.W[n];var i=Math.ceil(Math.ceil(e.o/8)*q.h/e.X),o=Math.ceil(Math.ceil(e.s/8)*q.A/e.B),a=t*q.h,s=r*q.A*64*(a+1);q.D=new Int16Array(s),q.P=i,q.c=o}e.m=t,e.R=r}var b=[],y=[],v=[],A=r(n,l);if(l+=2,65496!==A)throw new e(\"SOI not found\");A=r(n,l),l+=2;e:for(;65497!==A;){var w,S,E;switch(A){case 65504:case 65505:case 65506:case 65507:case 65508:case 65509:case 65510:case 65511:case 65512:case 65513:case 65514:case 65515:case 65516:case 65517:case 65518:case 65519:case 65534:var x=f();65504===A&&74===x[0]&&70===x[1]&&73===x[2]&&70===x[3]&&0===x[4]&&(u={version:{d:x[5],T:x[6]},K:x[7],j:x[8]__left_angle_mark___left_angle_mark_8|x[9],H:x[10]__left_angle_mark___left_angle_mark_8|x[11],S:x[12],I:x[13],C:x.subarray(14,14+3*x[12]*x[13])}),65518===A&&65===x[0]&&100===x[1]&&111===x[2]&&98===x[3]&&101===x[4]&&(c={version:x[5]__left_angle_mark___left_angle_mark_8|x[6],k:x[7]__left_angle_mark___left_angle_mark_8|x[8],q:x[9]__left_angle_mark___left_angle_mark_8|x[10],a:x[11]});break;case 65499:for(var C=r(n,l)+(l+=2)-2;l__left_angle_mark_C;){var T=n[l++],R=new Uint16Array(64);if(T>>4){if(T>>4!=1)throw new e(\"DQT - invalid table spec\");for(S=0;S__left_angle_mark_64;S++)R[t[S]]=r(n,l),l+=2}else for(S=0;S__left_angle_mark_64;S++)R[t[S]]=n[l++];b[15&T]=R}break;case 65472:case 65473:case 65474:if(o)throw new e(\"Only single frame JPEGs supported\");l+=2,(o={}).G=65473===A,o.Z=65474===A,o.precision=n[l++];var I,k=r(n,l),P=0,M=0;l+=2,o.s=s||k,o.o=r(n,l),l+=2,o.W=[],o._={};var O=n[l++];for(w=0;w__left_angle_mark_O;w++){I=n[l];var B=n[l+1]>>4,N=15&n[l+1];P__left_angle_mark_B&&(P=B),M__left_angle_mark_N&&(M=N);var j=n[l+2];E=o.W.push({h:B,A:N,L:j,$:null}),o._[I]=E-1,l+=3}o.X=P,o.B=M,m(o);break;case 65476:var L=r(n,l);for(l+=2,w=2;w__left_angle_mark_L;){var D=n[l++],F=new Uint8Array(16),U=0;for(S=0;S__left_angle_mark_16;S++,l++)U+=F[S]=n[l];var z=new Uint8Array(U);for(S=0;S__left_angle_mark_U;S++,l++)z[S]=n[l];w+=17+U,(D>>4?y:v)[15&D]=h(F,z)}break;case 65501:a=r(n,l+=2),l+=2;break;case 65498:var q,G=1==++d&&!s;l+=2;var H=n[l++],W=[];for(w=0;w__left_angle_mark_H;w++){var V=n[l++],$=o._[V];(q=o.W[$]).index=V;var K=n[l++];q.J=v[K>>4],q.i=y[15&K],W.push(q)}var X=n[l++],Y=n[l++],J=n[l++];try{var Q=p(n,l,o,W,a,X,Y,J>>4,15&J,G);l+=Q}catch(te){if(te instanceof DNLMarkerError)return this.parse(n,{F:te.s});if(te instanceof EOIMarkerError)break e;throw te}break;case 65500:l+=4;break;case 65535:255!==n[l]&&l--;break;default:var Z=_(n,l-2,l-3);if(Z&&Z.u){l=Z.offset;break}if(l>=n.length-1)break e;throw new e(\"JpegImage.parse - unknown marker: \"+A.toString(16))}A=r(n,l),l+=2}for(this.width=o.o,this.height=o.s,this.g=u,this.b=c,this.W=[],w=0;w__left_angle_mark_o.W.length;w++){var ee=b[(q=o.W[w]).L];ee&&(q.$=ee),this.W.push({index:q.index,e:g(0,q),l:q.h/o.X,t:q.A/o.B,P:q.P,c:q.c})}this.p=this.W.length},Y(e,t,r){null==r&&(r=!1);var n,i,o,a,s,l,u,c,d,h,f,p,m=this.width/e,g=this.height/t,_=0,b=this.W.length,y=e*t*b,v=new Uint8ClampedArray(y),A=new Uint32Array(e),w=4294967288;for(u=0;u__left_angle_mark_b;u++){if(i=(n=this.W[u]).l*m,o=n.t*g,_=u,f=n.e,a=n.P+1__left_angle_mark___left_angle_mark_3,i!==p){for(s=0;s__left_angle_mark_e;s++)c=0|s*i,A[s]=(c&w)__left_angle_mark___left_angle_mark_3|7&c;p=i}for(l=0;l__left_angle_mark_t;l++)for(h=a*((c=0|l*o)&w)|(7&c)__left_angle_mark___left_angle_mark_3,s=0;s__left_angle_mark_e;s++)v[_]=f[h+A[s]],_+=b}var S=this.V;if(r||4!==b||S||(S=new Int32Array([-256,255,-256,255,-256,255,-256,255])),S)for(u=0;u__left_angle_mark_y;)for(c=0,d=0;c__left_angle_mark_b;c++,u++,d+=2)v[u]=(v[u]*S[d]>>8)+S[d+1];return v},get f(){return this.b?!!this.b.a:3===this.p?0!==this.N&&(82!==this.W[0].index||71!==this.W[1].index||66!==this.W[2].index):1===this.N},z:function(e){for(var t,r,n,i=0,o=e.length;i__left_angle_mark_o;i+=3)t=e[i],r=e[i+1],n=e[i+2],e[i]=t-179.456+1.402*n,e[i+1]=t+135.459-.344*r-.714*n,e[i+2]=t-226.816+1.772*r;return e},O:function(e){for(var t,r,n,i,o=0,a=0,s=e.length;a__left_angle_mark_s;a+=4)t=e[a],r=e[a+1],n=e[a+2],i=e[a+3],e[o++]=r*(-660635669420364e-19*r+.000437130475926232*n-54080610064599e-18*t+.00048449797120281*i-.154362151871126)-122.67195406894+n*(-.000957964378445773*n+.000817076911346625*t-.00477271405408747*i+1.53380253221734)+t*(.000961250184130688*t-.00266257332283933*i+.48357088451265)+i*(-.000336197177618394*i+.484791561490776),e[o++]=107.268039397724+r*(219927104525741e-19*r-.000640992018297945*n+.000659397001245577*t+.000426105652938837*i-.176491792462875)+n*(-.000778269941513683*n+.00130872261408275*t+.000770482631801132*i-.151051492775562)+t*(.00126935368114843*t-.00265090189010898*i+.25802910206845)+i*(-.000318913117588328*i-.213742400323665),e[o++]=r*(-.000570115196973677*r-263409051004589e-19*n+.0020741088115012*t-.00288260236853442*i+.814272968359295)-20.810012546947+n*(-153496057440975e-19*n-.000132689043961446*t+.000560833691242812*i-.195152027534049)+t*(.00174418132927582*t-.00255243321439347*i+.116935020465145)+i*(-.000343531996510555*i+.24165260232407);return e.subarray(0,o)},r:function(e){for(var t,r,n,i=0,o=e.length;i__left_angle_mark_o;i+=4)t=e[i],r=e[i+1],n=e[i+2],e[i]=434.456-t-1.402*n,e[i+1]=119.541-t+.344*r+.714*n,e[i+2]=481.816-t-1.772*r;return e},U:function(e){for(var t,r,n,i,o=0,a=0,s=e.length;a__left_angle_mark_s;a+=4)t=e[a],r=e[a+1],n=e[a+2],i=e[a+3],e[o++]=255+t*(-6747147073602441e-20*t+.0008379262121013727*r+.0002894718188643294*n+.003264231057537806*i-1.1185611867203937)+r*(26374107616089405e-21*r-8626949158638572e-20*n-.0002748769067499491*i-.02155688794978967)+n*(-3878099212869363e-20*n-.0003267808279485286*i+.0686742238595345)-i*(.0003361971776183937*i+.7430659151342254),e[o++]=255+t*(.00013596372813588848*t+.000924537132573585*r+.00010567359618683593*n+.0004791864687436512*i-.3109689587515875)+r*(-.00023545346108370344*r+.0002702845253534714*n+.0020200308977307156*i-.7488052167015494)+n*(6834815998235662e-20*n+.00015168452363460973*i-.09751927774728933)-i*(.0003189131175883281*i+.7364883807733168),e[o++]=255+t*(13598650411385307e-21*t+.00012423956175490851*r+.0004751985097583589*n-36729317476630422e-22*i-.05562186980264034)+r*(.00016141380598724676*r+.0009692239130725186*n+.0007782692450036253*i-.44015232367526463)+n*(5.068882914068769e-7*n+.0017778369011375071*i-.7591454649749609)-i*(.0003435319965105553*i+.7063770186160144);return e.subarray(0,o)},getData:function(t){var r=t.width,n=t.height,i=t.forceRGB,o=t.isSourcePDF;if(this.p>4)throw new e(\"Unsupported color mode\");var a=this.Y(r,n,o);if(1===this.p&&i){for(var s=a.length,l=new Uint8ClampedArray(3*s),u=0,c=0;c__left_angle_mark_s;c++){var d=a[c];l[u++]=d,l[u++]=d,l[u++]=d}return l}if(3===this.p&&this.f)return this.z(a);if(4===this.p){if(this.f)return i?this.O(a):this.r(a);if(i)return this.U(a)}return a}},d}();function r(e,t){return e[t]__left_angle_mark___left_angle_mark_8|e[t+1]}n.JpegDecoder=t}(),n.encodeImage=function(e,t,r,i){var o={\"t256\":[t],\"t257\":[r],\"t258\":[8,8,8,8],\"t259\":[1],\"t262\":[2],\"t273\":[1e3],\"t277\":[4],\"t278\":[r],\"t279\":[t*r*4],\"t282\":[[72,1]],\"t283\":[[72,1]],\"t284\":[1],\"t286\":[[0,1]],\"t287\":[[0,1]],\"t296\":[1],\"t305\":[\"Photopea (UTIF.js)\"],\"t338\":[1]};if(i)for(var a in i)o[a]=i[a];var s=new Uint8Array(n.encode([o])),l=new Uint8Array(e),u=new Uint8Array(1e3+t*r*4);for(a=0;a__left_angle_mark_s.length;a++)u[a]=s[a];for(a=0;a__left_angle_mark_l.length;a++)u[1e3+a]=l[a];return u.buffer},n.encode=function(e){var t=new Uint8Array(2e4),r=4,i=n._binBE;t[0]=t[1]=77,i.writeUshort(t,2,42);var o=8;i.writeUint(t,r,o),r+=4;for(var a=0;a__left_angle_mark_e.length;a++){var s=n._writeIFD(i,n._types.basic,t,o,e[a]);o=s[1],a__left_angle_mark_e.length-1&&(3&o&&(o+=4-(3&o)),i.writeUint(t,s[0],o))}return t.slice(0,o).buffer},n.decode=function(e,t){null==t&&(t={parseMN:!0,debug:!1});var r=new Uint8Array(e),i=0,o=n._binBE.readASCII(r,i,2);i+=2;var a=\"II\"==o?n._binLE:n._binBE;a.readUshort(r,i),i+=2;var s=a.readUint(r,i);i+=4;for(var l=[];;){var u=a.readUshort(r,s),c=a.readUshort(r,s+4);if(0!=u&&(c__left_angle_mark_1||13__left_angle_mark_c)){v(\"error in TIFF\");break}if(n._readIFD(a,r,s,l,0,t),0==(s=a.readUint(r,s+2+12*u)))break}return l},n.decodeImage=function(e,t,r){if(!t.data){var i=new Uint8Array(e),o=n._binBE.readASCII(i,0,2);if(null!=t.t256){t.isLE=\"II\"==o,t.width=t.t256[0],t.height=t.t257[0];var a=t.t259?t.t259[0]:1,s=t.t266?t.t266[0]:1;t.t284&&2==t.t284[0]&&v(\"PlanarConfiguration 2 should not be used!\"),7==a&&t.t258&&t.t258.length>3&&(t.t258=t.t258.slice(0,3));var l=t.t277?t.t277[0]:1,u=(t.t258?t.t258[0]:1)*l;1==a&&null!=t.t279&&t.t278&&32803==t.t262[0]&&(u=Math.round(8*t.t279[0]/(t.width*t.t278[0]))),t.t50885&&4==t.t50885[0]&&(u=3*t.t258[0]);var c=8*Math.ceil(t.width*u/8),d=t.t273;(null==d||t.t322)&&(d=t.t324);var h=t.t279;1==a&&1==d.length&&(h=[t.height*(c>>>3)]),(null==h||t.t322)&&(h=t.t325);var f=new Uint8Array(t.height*(c>>>3)),p=0;if(null!=t.t322){var m=t.t322[0],g=t.t323[0],_=Math.floor((t.width+m-1)/m),b=Math.floor((t.height+g-1)/g),y=new Uint8Array(0|Math.ceil(m*g*u/8));import_console_browserify.default.log(\"====\",_,b);for(var A=0;A__left_angle_mark_b;A++)for(var w=0;w__left_angle_mark__;w++){var S=A*_+w;y.fill(0),n.decode._decompress(t,r,i,d[S],h[S],a,y,0,s,m,g),6==a?f=y:n._copyTile(y,0|Math.ceil(m*u/8),g,f,0|Math.ceil(t.width*u/8),t.height,0|Math.ceil(w*m*u/8),A*g)}p=8*f.length}else{if(null==d)return;var E=t.t278?t.t278[0]:t.height;for(E=Math.min(E,t.height),S=0;S__left_angle_mark_d.length;S++)n.decode._decompress(t,r,i,d[S],h[S],a,f,0|Math.ceil(p/8),s,t.width,E),p+=c*E;p=Math.min(p,8*f.length)}t.data=new Uint8Array(f.buffer,0,0|Math.ceil(p/8))}}},n.decode._decompress=function(e,t,r,o,a,s,l,u,c,d,h){if(e.t271&&\"Panasonic\"==e.t271[0]&&e.t45&&6==e.t45[0]&&(s=34316),1==s)for(var f=0;f__left_angle_mark_a;f++)l[u+f]=r[o+f];else if(2==s)n.decode._decodeG2(r,o,a,l,u,d,c);else if(3==s)n.decode._decodeG3(r,o,a,l,u,d,c,!(!e.t292||1&~e.t292[0]));else if(4==s)n.decode._decodeG4(r,o,a,l,u,d,c);else if(5==s)n.decode._decodeLZW(r,o,a,l,u,8);else if(6==s)n.decode._decodeOldJPEG(e,r,o,a,l,u);else if(7==s||34892==s)n.decode._decodeNewJPEG(e,r,o,a,l,u);else if(8==s||32946==s){var p=new Uint8Array(r.buffer,o+2,a-6),m=i.inflateRaw(p);u+m.length__left_angle_mark_=l.length&&l.set(m,u)}else 9==s?n.decode._decodeVC5(r,o,a,l,u,e.t33422):32767==s?n.decode._decodeARW(e,r,o,a,l,u):32773==s?n.decode._decodePackBits(r,o,a,l,u):32809==s?n.decode._decodeThunder(r,o,a,l,u):34316==s?n.decode._decodePanasonic(e,r,o,a,l,u):34713==s?n.decode._decodeNikon(e,t,r,o,a,l,u):34676==s?n.decode._decodeLogLuv32(e,r,o,a,l,u):v(\"Unknown compression\",s);var g=e.t258?Math.min(32,e.t258[0]):1,_=e.t277?e.t277[0]:1,b=g*_>>>3,y=Math.ceil(g*_*d/8);if(16==g&&!e.isLE&&null==e.t33422)for(var A=0;A__left_angle_mark_h;A++)for(var w=u+A*y,S=1;S__left_angle_mark_y;S+=2){var E=l[w+S];l[w+S]=l[w+S-1],l[w+S-1]=E}if(e.t317&&2==e.t317[0])for(A=0;A__left_angle_mark_h;A++){var x=u+A*y;if(16==g)for(f=b;f__left_angle_mark_y;f+=2){var C=(l[x+f+1]__left_angle_mark___left_angle_mark_8|l[x+f])+(l[x+f-b+1]__left_angle_mark___left_angle_mark_8|l[x+f-b]);l[x+f]=255&C,l[x+f+1]=C>>>8&255}else if(3==_)for(f=3;f__left_angle_mark_y;f+=3)l[x+f]=l[x+f]+l[x+f-3]&255,l[x+f+1]=l[x+f+1]+l[x+f-2]&255,l[x+f+2]=l[x+f+2]+l[x+f-1]&255;else for(f=b;f__left_angle_mark_y;f++)l[x+f]=l[x+f]+l[x+f-b]&255}},n.decode._decodePanasonic=function(e,t,r,n,i,o){var a,s,l,u,c,d,h,f,p=t.buffer,m=e.t2[0],g=e.t3[0],_=e.t10[0],b=e.t45[0],y=0,v=0,A=0,w=0,S=6==b?new Uint32Array(18):new Uint8Array(16),E=[0,0],x=[0,0],C=0,T=new Uint8Array(16384),R=new Uint16Array(i.buffer);function I(e){if(0==A){var t=new Uint8Array(p,r+v+8184,8200),n=new Uint8Array(p,r+v,8184);T.set(t),T.set(n,t.length),v+=16384}if(5!=b)return(T[w=(A=A-e&131071)>>3^16368]|T[w+1]__left_angle_mark___left_angle_mark_8)>>(7&A)&~(-1__left_angle_mark___left_angle_mark_e);for(a=0;a__left_angle_mark_16;a++)S[a]=T[A++],A&=16383}function k(e){return T[A+15-e]}function P(){E[0]=0,E[1]=0,x[0]=0,x[1]=0}if(7==b)throw b;if(6==b){var M=12==_,O=M?function(){S[0]=k(0)__left_angle_mark___left_angle_mark_4|k(1)>>4,S[1]=4095&((15&k(1))__left_angle_mark___left_angle_mark_8|k(2)),S[2]=k(3)>>6&3,S[3]=(63&k(3))__left_angle_mark___left_angle_mark_2|k(4)>>6,S[4]=(63&k(4))__left_angle_mark___left_angle_mark_2|k(5)>>6,S[5]=(63&k(5))__left_angle_mark___left_angle_mark_2|k(6)>>6,S[6]=k(6)>>4&3,S[7]=(15&k(6))__left_angle_mark___left_angle_mark_4|k(7)>>4,S[8]=(15&k(7))__left_angle_mark___left_angle_mark_4|k(8)>>4,S[9]=(15&k(8))__left_angle_mark___left_angle_mark_4|k(9)>>4,S[10]=k(9)>>2&3,S[11]=(3&k(9))__left_angle_mark___left_angle_mark_6|k(10)>>2,S[12]=(3&k(10))__left_angle_mark___left_angle_mark_6|k(11)>>2,S[13]=(3&k(11))__left_angle_mark___left_angle_mark_6|k(12)>>2,S[14]=3&k(12),S[15]=k(13),S[16]=k(14),S[17]=k(15),A+=16,w=0}:function(){S[0]=k(0)__left_angle_mark___left_angle_mark_6|k(1)>>2,S[1]=16383&((3&k(1))__left_angle_mark___left_angle_mark_12|k(2)__left_angle_mark___left_angle_mark_4|k(3)>>4),S[2]=k(3)>>2&3,S[3]=(3&k(3))__left_angle_mark___left_angle_mark_8|k(4),S[4]=k(5)__left_angle_mark___left_angle_mark_2|k(6)>>6,S[5]=(63&k(6))__left_angle_mark___left_angle_mark_4|k(7)>>4,S[6]=k(7)>>2&3,S[7]=(3&k(7))__left_angle_mark___left_angle_mark_8|k(8),S[8]=k(9)__left_angle_mark___left_angle_mark_2&1020|k(10)>>6,S[9]=1023&(k(10)__left_angle_mark___left_angle_mark_4|k(11)>>4),S[10]=k(11)>>2&3,S[11]=(3&k(11))__left_angle_mark___left_angle_mark_8|k(12),S[12]=1023&(k(13)__left_angle_mark___left_angle_mark_2&1020|k(14)>>6),S[13]=1023&(k(14)__left_angle_mark___left_angle_mark_4|k(15)>>4),A+=16,w=0},B=M?14:11,N=M?128:512,j=M?2048:8192,L=M?16383:65535,D=M?4095:16383,F=m/B,U=16*F,z=M?18:14;for(d=0;d__left_angle_mark_g-15;d+=16){var q=Math.min(16,g-d),G=U*q;for(T=new Uint8Array(p,r+y,G),A=0,y+=G,f=0,h=0;f__left_angle_mark_q;f++,h=0){C=(d+f)*m;for(var H=0;H__left_angle_mark_F;H++)for(O(),P(),l=0,c=0,a=0;a__left_angle_mark_B;a++){if(u=1&a,a%3==2){var W=w__left_angle_mark_z?S[w++]:0;3==W&&(W=4),c=N__left_angle_mark___left_angle_mark_W,l=1__left_angle_mark___left_angle_mark_W}var V=w__left_angle_mark_z?S[w++]:0;E[u]?(V*=l,c__left_angle_mark_j&&x[u]>c&&(V+=x[u]-c),x[u]=V):(E[u]=V,V?x[u]=V:V=x[u]),R[C+h++]=V-15__left_angle_mark_=L?V-15&L:V+2147483633>>31&D}}}}else if(5==b){var $=12==_?10:9;for(d=0;d__left_angle_mark_g;d++)for(h=0;h__left_angle_mark_m;h+=$)I(0),12==_?(R[C++]=((15&S[1])__left_angle_mark___left_angle_mark_8)+S[0],R[C++]=16*S[2]+(S[1]>>4),R[C++]=((15&S[4])__left_angle_mark___left_angle_mark_8)+S[3],R[C++]=16*S[5]+(S[4]>>4),R[C++]=((15&S[7])__left_angle_mark___left_angle_mark_8)+S[6],R[C++]=16*S[8]+(S[7]>>4),R[C++]=((15&S[10])__left_angle_mark___left_angle_mark_8)+S[9],R[C++]=16*S[11]+(S[10]>>4),R[C++]=((15&S[13])__left_angle_mark___left_angle_mark_8)+S[12],R[C++]=16*S[14]+(S[13]>>4)):14==_&&(R[C++]=S[0]+((63&S[1])__left_angle_mark___left_angle_mark_8),R[C++]=(S[1]>>6)+4*S[2]+((15&S[3])__left_angle_mark___left_angle_mark_10),R[C++]=(S[3]>>4)+16*S[4]+((3&S[5])__left_angle_mark___left_angle_mark_12),R[C++]=((252&S[5])>>2)+(S[6]__left_angle_mark___left_angle_mark_6),R[C++]=S[7]+((63&S[8])__left_angle_mark___left_angle_mark_8),R[C++]=(S[8]>>6)+4*S[9]+((15&S[10])__left_angle_mark___left_angle_mark_10),R[C++]=(S[10]>>4)+16*S[11]+((3&S[12])__left_angle_mark___left_angle_mark_12),R[C++]=((252&S[12])>>2)+(S[13]__left_angle_mark___left_angle_mark_6),R[C++]=S[14]+((63&S[15])__left_angle_mark___left_angle_mark_8))}else{if(4!=b)throw b;for(d=0;d__left_angle_mark_g;d++)for(h=0;h__left_angle_mark_m;h++)u=1&(a=h%14),0==a&&P(),a%3==2&&(l=4>>3-I(2)),x[u]?0!=(s=I(8))&&(E[u]-=128__left_angle_mark___left_angle_mark_l,(E[u]__left_angle_mark_0||4==l)&&(E[u]&=~(-1__left_angle_mark___left_angle_mark_l)),E[u]+=s__left_angle_mark___left_angle_mark_l):(x[u]=I(8),(x[u]||a>11)&&(E[u]=x[u]__left_angle_mark___left_angle_mark_4|I(4))),R[C++]=E[1&h]}},n.decode._decodeVC5=function(){var e,t,r,i=[1,0,1,0,2,2,1,1,3,7,1,2,5,25,1,3,6,48,1,4,6,54,1,5,7,111,1,8,7,99,1,6,7,105,12,0,7,107,1,7,8,209,20,0,8,212,1,9,8,220,1,10,9,393,1,11,9,394,32,0,9,416,1,12,9,427,1,13,10,887,1,18,10,784,1,14,10,790,1,15,10,835,60,0,10,852,1,16,10,885,1,17,11,1571,1,19,11,1668,1,20,11,1669,100,0,11,1707,1,21,11,1772,1,22,12,3547,1,29,12,3164,1,24,12,3166,1,25,12,3140,1,23,12,3413,1,26,12,3537,1,27,12,3539,1,28,13,7093,1,35,13,6283,1,30,13,6331,1,31,13,6335,180,0,13,6824,1,32,13,7072,1,33,13,7077,320,0,13,7076,1,34,14,12565,1,36,14,12661,1,37,14,12669,1,38,14,13651,1,39,14,14184,1,40,15,28295,1,46,15,28371,1,47,15,25320,1,42,15,25336,1,43,15,25128,1,41,15,27300,1,44,15,28293,1,45,16,50259,1,48,16,50643,1,49,16,50675,1,50,16,56740,1,53,16,56584,1,51,16,56588,1,52,17,113483,1,61,17,113482,1,60,17,101285,1,55,17,101349,1,56,17,109205,1,57,17,109207,1,58,17,100516,1,54,17,113171,1,59,18,202568,1,62,18,202696,1,63,18,218408,1,64,18,218412,1,65,18,226340,1,66,18,226356,1,67,18,226358,1,68,19,402068,1,69,19,405138,1,70,19,405394,1,71,19,436818,1,72,19,436826,1,73,19,452714,1,75,19,452718,1,76,19,452682,1,74,20,804138,1,77,20,810279,1,78,20,810790,1,79,20,873638,1,80,20,873654,1,81,20,905366,1,82,20,905430,1,83,20,905438,1,84,21,1608278,1,85,21,1620557,1,86,21,1621582,1,87,21,1621583,1,88,21,1747310,1,89,21,1810734,1,90,21,1810735,1,91,21,1810863,1,92,21,1810879,1,93,22,3621725,1,99,22,3621757,1,100,22,3241112,1,94,22,3494556,1,95,22,3494557,1,96,22,3494622,1,97,22,3494623,1,98,23,6482227,1,102,23,6433117,1,101,23,6989117,1,103,23,6989119,1,105,23,6989118,1,104,23,7243449,1,106,23,7243512,1,107,24,13978233,1,111,24,12964453,1,109,24,12866232,1,108,24,14486897,1,113,24,13978232,1,110,24,14486896,1,112,24,14487026,1,114,24,14487027,1,115,25,25732598,1,225,25,25732597,1,189,25,25732596,1,188,25,25732595,1,203,25,25732594,1,202,25,25732593,1,197,25,25732592,1,207,25,25732591,1,169,25,25732590,1,223,25,25732589,1,159,25,25732522,1,235,25,25732579,1,152,25,25732575,1,192,25,25732489,1,179,25,25732573,1,201,25,25732472,1,172,25,25732576,1,149,25,25732488,1,178,25,25732566,1,120,25,25732571,1,219,25,25732577,1,150,25,25732487,1,127,25,25732506,1,211,25,25732548,1,125,25,25732588,1,158,25,25732486,1,247,25,25732467,1,238,25,25732508,1,163,25,25732552,1,228,25,25732603,1,183,25,25732513,1,217,25,25732587,1,168,25,25732520,1,122,25,25732484,1,128,25,25732562,1,249,25,25732505,1,187,25,25732504,1,186,25,25732483,1,136,25,25928905,1,181,25,25732560,1,255,25,25732500,1,230,25,25732482,1,135,25,25732555,1,233,25,25732568,1,222,25,25732583,1,145,25,25732481,1,134,25,25732586,1,167,25,25732521,1,248,25,25732518,1,209,25,25732480,1,243,25,25732512,1,216,25,25732509,1,164,25,25732547,1,140,25,25732479,1,157,25,25732544,1,239,25,25732574,1,191,25,25732564,1,251,25,25732478,1,156,25,25732546,1,139,25,25732498,1,242,25,25732557,1,133,25,25732477,1,162,25,25732515,1,213,25,25732584,1,165,25,25732514,1,212,25,25732476,1,227,25,25732494,1,198,25,25732531,1,236,25,25732530,1,234,25,25732529,1,117,25,25732528,1,215,25,25732527,1,124,25,25732526,1,123,25,25732525,1,254,25,25732524,1,253,25,25732523,1,148,25,25732570,1,218,25,25732580,1,146,25,25732581,1,147,25,25732569,1,224,25,25732533,1,143,25,25732540,1,184,25,25732541,1,185,25,25732585,1,166,25,25732556,1,132,25,25732485,1,129,25,25732563,1,250,25,25732578,1,151,25,25732501,1,119,25,25732502,1,193,25,25732536,1,176,25,25732496,1,245,25,25732553,1,229,25,25732516,1,206,25,25732582,1,144,25,25732517,1,208,25,25732558,1,137,25,25732543,1,241,25,25732466,1,237,25,25732507,1,190,25,25732542,1,240,25,25732551,1,131,25,25732554,1,232,25,25732565,1,252,25,25732475,1,171,25,25732493,1,205,25,25732492,1,204,25,25732491,1,118,25,25732490,1,214,25,25928904,1,180,25,25732549,1,126,25,25732602,1,182,25,25732539,1,175,25,25732545,1,141,25,25732559,1,138,25,25732537,1,177,25,25732534,1,153,25,25732503,1,194,25,25732606,1,160,25,25732567,1,121,25,25732538,1,174,25,25732497,1,246,25,25732550,1,130,25,25732572,1,200,25,25732474,1,170,25,25732511,1,221,25,25732601,1,196,25,25732532,1,142,25,25732519,1,210,25,25732495,1,199,25,25732605,1,155,25,25732535,1,154,25,25732499,1,244,25,25732510,1,220,25,25732600,1,195,25,25732607,1,161,25,25732604,1,231,25,25732473,1,173,25,25732599,1,226,26,51465122,1,116,26,51465123,0,1],o=[3,3,3,3,2,2,2,1,1,1];function a(e){var t=e[1],r=e[0][t>>>3]>>>7-(7&t)&1;return e[1]++,r}function s(t,r){if(null==e){e={};for(var n=0;n__left_angle_mark_i.length;n+=4)e[i[n+1]]=i.slice(n,n+4)}for(var o=a(t),s=e[o];null==s;)o=o__left_angle_mark___left_angle_mark_1|a(t),s=e[o];var l=s[3];0!=l&&(l=0==a(t)?l:-l),r[0]=s[2],r[1]=l}function l(e,t){for(var r=0;r__left_angle_mark_t;r++)1&~e||e++,e>>>=1;return e}function u(e,t){return e>>t}function c(e,t,r,n,i,o){t[r]=u(u(11*e[i]-4*e[i+o]+e[i+o+o]+4,3)+e[n],1),t[r+o]=u(u(5*e[i]+4*e[i+o]-e[i+o+o]+4,3)-e[n],1)}function d(e,t,r,n,i,o){var a=e[i-o]-e[i+o],s=e[i],l=e[n];t[r]=u(u(a+4,3)+s+l,1),t[r+o]=u(u(4-a,3)+s-l,1)}function h(e,t,r,n,i,o){t[r]=u(u(5*e[i]+4*e[i-o]-e[i-o-o]+4,3)+e[n],1),t[r+o]=u(u(11*e[i]-4*e[i-o]+e[i-o-o]+4,3)-e[n],1)}function f(e){return e=r[e=e__left_angle_mark_0?0:e>4095?4095:e]>>>2}return function(e,i,a,u,p,m){u=new Uint16Array(u.buffer);var g,_,b,y,v,A,w,S,E=Date.now(),x=n._binBE,C=i+a;i+=4;for(var T=1==m[0];i__left_angle_mark_C;){var R=x.readShort(e,i),I=x.readUshort(e,i+2);if(i+=4,12==R)j=I;else if(20==R)g=I;else if(21==R)_=I;else if(48==R)b=I;else if(53==R)y=I;else if(35==R);else if(62==R)v=I;else if(101==R);else if(109==R)A=I;else if(84==R);else if(106==R);else if(107==R);else if(108==R);else if(102==R);else if(104==R)re=I;else if(105==R);else{var k=R__left_angle_mark_0?-R:R,P=65280&k,M=0;if(24576&k&&(8192&k?(M=65535&I,M+=(255&k)__left_angle_mark___left_angle_mark_16):M=65535&I),24576&~k){if(16388==k)i+=4*M;else if(8192!=P&&8448!=P&&9216!=P)throw k.toString(16)}else{if(null==w){w=[];for(var O=0;O__left_angle_mark_4;O++)w[O]=new Int16Array((g>>>1)*(_>>>1));for(S=new Int16Array((g>>>1)*(_>>>1)),t=new Int16Array(1024),O=0;O__left_angle_mark_1024;O++){var B=O-512,N=Math.abs(B),j=Math.floor(768*N*N*N/16581375)+N;t[O]=Math.sign(B)*j}for(r=new Uint16Array(4096),O=0;O__left_angle_mark_4096;O++){var L=O,D=65535*(Math.pow(113,L/4095)-1)/112;r[O]=Math.min(D,65535)}}var F=w[v],U=l(g,1+o[b]),z=l(_,1+o[b]);if(0==b)for(var q=0;q__left_angle_mark_z;q++)for(var G=0;G__left_angle_mark_U;G++){var H=i+2*(q*U+G);F[q*(g>>>1)+G]=e[H]__left_angle_mark___left_angle_mark_8|e[H+1]}else{var W=[e,8*i],V=[],$=0,K=U*z,X=[0,0],Y=0;for(I=0;$__left_angle_mark_K;)for(s(W,X),Y=X[0],I=X[1];Y>0;)V[$++]=I,Y--;var J=(b-1)%3,Q=1!=J?U:0,Z=0!=J?z:0;for(q=0;q__left_angle_mark_z;q++){var ee=(q+Z)*(g>>>1)+Q,te=q*U;for(G=0;G__left_angle_mark_U;G++)F[ee+G]=t[V[te+G]+512]*y}if(2==J){var re=g>>>1,ne=2*U,ie=2*z;for(q=0;q__left_angle_mark_z;q++)for(G=0;G__left_angle_mark_ne;G++){O=2*q*re+G;var oe=z*re+(se=q*re+G);0==q?c(F,S,O,oe,se,re):q==z-1?h(F,S,O,oe,se,re):d(F,S,O,oe,se,re)}var ae=F;for(F=S,S=ae,q=0;q__left_angle_mark_ie;q++)for(G=0;G__left_angle_mark_U;G++){var se;O=q*re+2*G,oe=U+(se=q*re+G),0==G?c(F,S,O,oe,se,1):G==U-1?h(F,S,O,oe,se,1):d(F,S,O,oe,se,1)}ae=F,F=S,S=ae;for(var le=[],ue=2-~~((b-1)/3),ce=0;ce__left_angle_mark_3;ce++)le[ce]=A>>14-2*ce&3;var de=le[ue];if(0!=de)for(q=0;q__left_angle_mark_ie;q++)for(G=0;G__left_angle_mark_ne;G++)F[O=q*re+G]=F[O]__left_angle_mark___left_angle_mark_de}}if(9==b&&3==v){var he=w[0],fe=w[1],pe=w[2],me=w[3];for(q=0;q__left_angle_mark__;q+=2)for(G=0;G__left_angle_mark_g;G+=2){var ge=q*g+G,_e=he[H=(q>>>1)*(g>>>1)+(G>>>1)],be=fe[H]-2048,ye=pe[H]-2048,ve=me[H]-2048,Ae=(be__left_angle_mark___left_angle_mark_1)+_e,we=(ye__left_angle_mark___left_angle_mark_1)+_e,Se=_e+ve,Ee=_e-ve;T?(u[ge]=f(Se),u[ge+1]=f(we),u[ge+g]=f(Ae),u[ge+g+1]=f(Ee)):(u[ge]=f(Ae),u[ge+1]=f(Se),u[ge+g]=f(Ee),u[ge+g+1]=f(we))}}i+=4*M}}}import_console_browserify.default.log(Date.now()-E)}}(),n.decode._decodeLogLuv32=function(e,t,r,n,i,o){for(var a=e.width,s=4*a,l=0,u=new Uint8Array(s);l__left_angle_mark_n;){for(var c=0;c__left_angle_mark_s;){var d=t[r+l];if(l++,d__left_angle_mark_128){for(var h=0;h__left_angle_mark_d;h++)u[c+h]=t[r+l+h];c+=d,l+=d}else{for(d-=126,h=0;h__left_angle_mark_d;h++)u[c+h]=t[r+l];c+=d,l++}}for(var f=0;f__left_angle_mark_a;f++)i[o+0]=u[f],i[o+1]=u[f+a],i[o+2]=u[f+2*a],i[o+4]=u[f+3*a],o+=6}},n.decode._ljpeg_diff=function(e,t,r){var i,o,a=n.decode._getbithuff;return i=a(e,t,r[0],r),(o=a(e,t,i,0))&1__left_angle_mark___left_angle_mark_i-1||(o-=(1__left_angle_mark___left_angle_mark_i)-1),o},n.decode._decodeARW=function(e,t,r,i,o,a){var s=e.t256[0],l=e.t257[0],u=e.t258[0],c=e.isLE?n._binLE:n._binBE;if(s*l==i||s*l*1.5==i)if(s*l*1.5!=i){var d,h,f,p,m,g,_,b,y=new Uint16Array(16),v=new Uint8Array(s+1);for(R=0;R__left_angle_mark_l;R++){for(var A=0;A__left_angle_mark_s;A++)v[A]=t[r++];for(b=0,T=0;T__left_angle_mark_s-30;b+=16){for(h=2047&(d=c.readUint(v,b)),f=2047&d>>>11,p=15&d>>>22,m=15&d>>>26,g=0;g__left_angle_mark_4&&128__left_angle_mark___left_angle_mark_g__left_angle_mark_=h-f;g++);for(_=30,w=0;w__left_angle_mark_16;w++)w==p?y[w]=h:w==m?y[w]=f:(y[w]=((c.readUshort(v,b+(_>>3))>>>(7&_)&127)__left_angle_mark___left_angle_mark_g)+f,y[w]>2047&&(y[w]=2047),_+=7);for(w=0;w__left_angle_mark_16;w++,T+=2)j=y[w]__left_angle_mark___left_angle_mark_1,n.decode._putsF(o,(R*s+T)*u,j__left_angle_mark___left_angle_mark_16-u);T-=1&T?1:31}}}else for(var w=0;w__left_angle_mark_i;w+=3){var S=t[r+w+0],E=t[r+w+1],x=t[r+w+2];o[a+w]=E__left_angle_mark___left_angle_mark_4|S>>>4,o[a+w+1]=S__left_angle_mark___left_angle_mark_4|x>>>4,o[a+w+2]=x__left_angle_mark___left_angle_mark_4|E>>>4}else{l+=8;var C,T,R,I=[r,0,0,0],k=new Uint16Array(32770),P=[3857,3856,3599,3342,3085,2828,2571,2314,2057,1800,1543,1286,1029,772,771,768,514,513],M=0,O=n.decode._ljpeg_diff;for(k[0]=15,C=w=0;w__left_angle_mark_18;w++)for(var B=32768>>>(P[w]>>>8),N=0;N__left_angle_mark_B;N++)k[++C]=P[w];for(T=s;T--;)for(R=0;R__left_angle_mark_l+1;R+=2)if(R==l&&(R=1),M+=O(t,I,k),R__left_angle_mark_l){var j=4095&M;n.decode._putsF(o,(R*s+T)*u,j__left_angle_mark___left_angle_mark_16-u)}}},n.decode._decodeNikon=function(e,t,r,i,o,a,s){var l=[[0,0,1,5,1,1,1,1,1,1,2,0,0,0,0,0,0,5,4,3,6,2,7,1,0,8,9,11,10,12],[0,0,1,5,1,1,1,1,1,1,2,0,0,0,0,0,0,57,90,56,39,22,5,4,3,2,1,0,11,12,12],[0,0,1,4,2,3,1,2,0,0,0,0,0,0,0,0,0,5,4,6,3,7,2,8,1,9,0,10,11,12],[0,0,1,4,3,1,1,1,1,1,2,0,0,0,0,0,0,5,6,4,7,8,3,9,2,1,0,10,11,12,13,14],[0,0,1,5,1,1,1,1,1,1,1,2,0,0,0,0,0,8,92,75,58,41,7,6,5,4,3,2,1,0,13,14],[0,0,1,4,2,2,3,1,2,0,0,0,0,0,0,0,0,7,6,8,5,9,4,10,3,11,12,2,0,1,13,14]],u=e.t256[0],c=e.t257[0],d=e.t258[0],h=0,f=0,p=n.decode._make_decoder,m=n.decode._getbithuff,g=t[0].exifIFD.makerNote,_=g.t150?g.t150:g.t140,b=0,y=_[b++],v=_[b++];73!=y&&88!=v||(b+=2110),70==y&&(h=2),14==d&&(h+=3);for(var A=[[0,0],[0,0]],w=e.isLE?n._binLE:n._binBE,S=0;S__left_angle_mark_2;S++)for(var E=0;E__left_angle_mark_2;E++)A[S][E]=w.readShort(_,b),b+=2;var x,C,T,R,I,k=1__left_angle_mark___left_angle_mark_d&32767,P=0,M=w.readShort(_,b);b+=2,M>1&&(P=Math.floor(k/(M-1))),68==y&&32==v&&P>0&&(f=w.readShort(_,562));var O=[0,0],B=p(l[h]),N=[i,0,0,0];for(x=0;x__left_angle_mark_c;x++)for(f&&x==f&&(B=p(l[h+1])),C=0;C__left_angle_mark_u;C++){S=m(r,N,B[0],B),(I=1+(m(r,N,(T=15&S)-(R=S>>>4),0)__left_angle_mark___left_angle_mark_1)__left_angle_mark___left_angle_mark_R>>>1)&1__left_angle_mark___left_angle_mark_T-1||(I-=(1__left_angle_mark___left_angle_mark_T)-(0==R?1:0)),C__left_angle_mark_2?O[C]=A[1&x][C]+=I:O[1&C]+=I;var j=Math.min(Math.max(O[1&C],0),(1__left_angle_mark___left_angle_mark_d)-1),L=(x*u+C)*d;n.decode._putsF(a,L,j__left_angle_mark___left_angle_mark_16-d)}},n.decode._putsF=function(e,t,r){r__left_angle_mark___left_angle_mark_=8-(7&t);var n=t>>>3;e[n]|=r>>>16,e[n+1]|=r>>>8,e[n+2]|=r},n.decode._getbithuff=function(e,t,r,i){n.decode._get_byte;var o,a=t[0],s=t[1],l=t[2],u=t[3];if(0==r||l__left_angle_mark_0)return 0;for(;!u&&l__left_angle_mark_r&&-1!=(o=e[a++])&&!(u=0);)s=(s__left_angle_mark___left_angle_mark_8)+o,l+=8;if(o=s__left_angle_mark___left_angle_mark_32-l>>>32-r,i?(l-=i[o+1]>>>8,o=255&i[o+1]):l-=r,l__left_angle_mark_0)throw\"e\";return t[0]=a,t[1]=s,t[2]=l,t[3]=u,o},n.decode._make_decoder=function(e){var t,r,n,i,o,a=[];for(t=16;0!=t&&!e[t];t--);var s=17;for(a[0]=t,n=r=1;r__left_angle_mark_=t;r++)for(i=0;i__left_angle_mark_e[r];i++,++s)for(o=0;o__left_angle_mark_1__left_angle_mark___left_angle_mark_t-r;o++)n__left_angle_mark_=1__left_angle_mark___left_angle_mark_t&&(a[n++]=r__left_angle_mark___left_angle_mark_8|e[s]);return a},n.decode._decodeNewJPEG=function(e,t,r,i,o,a){i=Math.min(i,t.length-r);var s=e.t347,l=s?s.length:0,u=new Uint8Array(l+i);if(s){for(var c=0,d=0;d__left_angle_mark_l-1&&(255!=s[d]||217!=s[d+1]);d++)u[c++]=s[d];var h=t[r],f=t[r+1];for(255==h&&216==f||(u[c++]=h,u[c++]=f),d=2;d__left_angle_mark_i;d++)u[c++]=t[r+d]}else for(d=0;d__left_angle_mark_i;d++)u[d]=t[r+d];if(32803==e.t262[0]||7==e.t259[0]&&34892==e.t262[0]){var p=e.t258[0],m=n.LosslessJpegDecode(u),g=m.length;if(16==p)if(e.isLE)for(d=0;d__left_angle_mark_g;d++)o[a+(d__left_angle_mark___left_angle_mark_1)]=255&m[d],o[a+(d__left_angle_mark___left_angle_mark_1)+1]=m[d]>>>8;else for(d=0;d__left_angle_mark_g;d++)o[a+(d__left_angle_mark___left_angle_mark_1)]=m[d]>>>8,o[a+(d__left_angle_mark___left_angle_mark_1)+1]=255&m[d];else if(14==p||12==p||10==p){var _=16-p;for(d=0;d__left_angle_mark_g;d++)n.decode._putsF(o,d*p,m[d]__left_angle_mark___left_angle_mark__)}else{if(8!=p)throw new Error(\"unsupported bit depth \"+p);for(d=0;d__left_angle_mark_g;d++)o[a+d]=m[d]}}else{var b=new n.JpegDecoder;b.parse(u);var y=b.getData({\"width\":b.width,\"height\":b.height,\"forceRGB\":!0,\"isSourcePDF\":!1});for(d=0;d__left_angle_mark_y.length;d++)o[a+d]=y[d]}6==e.t262[0]&&(e.t262[0]=2)},n.decode._decodeOldJPEGInit=function(e,t,r,n){var i,o,a,s,l,u=216,c=0,d=0,h=!1,f=e.t513,p=f?f[0]:0,m=e.t514,g=m?m[0]:0,_=e.t324||e.t273||f,b=e.t530,y=0,A=0,w=e.t277?e.t277[0]:1,S=e.t515;if(_&&(d=_[0],h=_.length>1),!h){if(255==t[r]&&t[r+1]==u)return{jpegOffset:r};if(null!=f&&(255==t[r+p]&&t[r+p+1]==u?c=r+p:v(\"JPEGInterchangeFormat does not point to SOI\"),null==m?v(\"JPEGInterchangeFormatLength field is missing\"):(p>=d||p+g__left_angle_mark_=d)&&v(\"JPEGInterchangeFormatLength field value is invalid\"),null!=c))return{jpegOffset:c}}if(null!=b&&(y=b[0],A=b[1]),null!=f&&null!=m)if(g>=2&&p+g__left_angle_mark_=d){for(i=255==t[r+p+g-2]&&t[r+p+g-1]==u?new Uint8Array(g-2):new Uint8Array(g),a=0;a__left_angle_mark_i.length;a++)i[a]=t[r+p+a];v(\"Incorrect JPEG interchange format: using JPEGInterchangeFormat offset to derive tables\")}else v(\"JPEGInterchangeFormat+JPEGInterchangeFormatLength > offset to first strip or tile\");if(null==i){var E=0,x=[];x[E++]=255,x[E++]=u;var C=e.t519;if(null==C)throw new Error(\"JPEGQTables tag is missing\");for(a=0;a__left_angle_mark_C.length;a++)for(x[E++]=255,x[E++]=219,x[E++]=0,x[E++]=67,x[E++]=a,s=0;s__left_angle_mark_64;s++)x[E++]=t[r+C[a]+s];for(l=0;l__left_angle_mark_2;l++){var T=e[0==l?\"t520\":\"t521\"];if(null==T)throw new Error((0==l?\"JPEGDCTables\":\"JPEGACTables\")+\" tag is missing\");for(a=0;a__left_angle_mark_T.length;a++){x[E++]=255,x[E++]=196;var R=19;for(s=0;s__left_angle_mark_16;s++)R+=t[r+T[a]+s];for(x[E++]=R>>>8,x[E++]=255&R,x[E++]=a|l__left_angle_mark___left_angle_mark_4,s=0;s__left_angle_mark_16;s++)x[E++]=t[r+T[a]+s];for(s=0;s__left_angle_mark_R;s++)x[E++]=t[r+T[a]+16+s]}}if(x[E++]=255,x[E++]=192,x[E++]=0,x[E++]=8+3*w,x[E++]=8,x[E++]=e.height>>>8&255,x[E++]=255&e.height,x[E++]=e.width>>>8&255,x[E++]=255&e.width,x[E++]=w,1==w)x[E++]=1,x[E++]=17,x[E++]=0;else for(a=0;a__left_angle_mark_3;a++)x[E++]=a+1,x[E++]=0!=a?17:(15&y)__left_angle_mark___left_angle_mark_4|15&A,x[E++]=a;null!=S&&0!=S[0]&&(x[E++]=255,x[E++]=221,x[E++]=0,x[E++]=4,x[E++]=S[0]>>>8&255,x[E++]=255&S[0]),i=new Uint8Array(x)}var I=-1;for(a=0;a__left_angle_mark_i.length-1;){if(255==i[a]&&192==i[a+1]){I=a;break}a++}if(-1==I){var k=new Uint8Array(i.length+10+3*w);k.set(i);var P=i.length;if(I=i.length,(i=k)[P++]=255,i[P++]=192,i[P++]=0,i[P++]=8+3*w,i[P++]=8,i[P++]=e.height>>>8&255,i[P++]=255&e.height,i[P++]=e.width>>>8&255,i[P++]=255&e.width,i[P++]=w,1==w)i[P++]=1,i[P++]=17,i[P++]=0;else for(a=0;a__left_angle_mark_3;a++)i[P++]=a+1,i[P++]=0!=a?17:(15&y)__left_angle_mark___left_angle_mark_4|15&A,i[P++]=a}if(255==t[d]&&218==t[d+1]){var M=t[d+2]__left_angle_mark___left_angle_mark_8|t[d+3];for((o=new Uint8Array(M+2))[0]=t[d],o[1]=t[d+1],o[2]=t[d+2],o[3]=t[d+3],a=0;a__left_angle_mark_M-2;a++)o[a+4]=t[d+a+4]}else{var O=0;if((o=new Uint8Array(8+2*w))[O++]=255,o[O++]=218,o[O++]=0,o[O++]=6+2*w,o[O++]=w,1==w)o[O++]=1,o[O++]=0;else for(a=0;a__left_angle_mark_3;a++)o[O++]=a+1,o[O++]=a__left_angle_mark___left_angle_mark_4|a;o[O++]=0,o[O++]=63,o[O++]=0}return{jpegOffset:r,tables:i,sosMarker:o,sofPosition:I}},n.decode._decodeOldJPEG=function(e,t,r,i,o,a){var s,l,u,c,d=n.decode._decodeOldJPEGInit(e,t,r,i);if(null!=d.jpegOffset)for(s=r+i-d.jpegOffset,u=new Uint8Array(s),p=0;p__left_angle_mark_s;p++)u[p]=t[d.jpegOffset+p];else{for(l=d.tables.length,(u=new Uint8Array(l+d.sosMarker.length+i+2)).set(d.tables),c=l,u[d.sofPosition+5]=e.height>>>8&255,u[d.sofPosition+6]=255&e.height,u[d.sofPosition+7]=e.width>>>8&255,u[d.sofPosition+8]=255&e.width,255==t[r]&&t[r+1]==SOS||(u.set(d.sosMarker,c),c+=sosMarker.length),p=0;p__left_angle_mark_i;p++)u[c++]=t[r+p];u[c++]=255,u[c++]=EOI}var h=new n.JpegDecoder;h.parse(u);for(var f=h.getData({\"width\":h.width,\"height\":h.height,\"forceRGB\":!0,\"isSourcePDF\":!1}),p=0;p__left_angle_mark_f.length;p++)o[a+p]=f[p];e.t262&&6==e.t262[0]&&(e.t262[0]=2)},n.decode._decodePackBits=function(e,t,r,n,i){for(var o=new Int8Array(e.buffer),a=new Int8Array(n.buffer),s=t+r;t__left_angle_mark_s;){var l=o[t];if(t++,l>=0&&l__left_angle_mark_128)for(var u=0;u__left_angle_mark_l+1;u++)a[i]=o[t],i++,t++;if(l>=-127&&l__left_angle_mark_0){for(u=0;u__left_angle_mark_1-l;u++)a[i]=o[t],i++;t++}}return i},n.decode._decodeThunder=function(e,t,r,n,i){for(var o=[0,1,0,-1],a=[0,1,2,3,0,-3,-2,-1],s=t+r,l=2*i,u=0;t__left_angle_mark_s;){var c=e[t],d=c>>>6,h=63&c;if(t++,3==d&&(u=15&h,n[l>>>1]|=u__left_angle_mark___left_angle_mark_4*(1-l&1),l++),0==d)for(var f=0;f__left_angle_mark_h;f++)n[l>>>1]|=u__left_angle_mark___left_angle_mark_4*(1-l&1),l++;if(2==d)for(f=0;f__left_angle_mark_2;f++)4!=(p=h>>>3*(1-f)&7)&&(u+=a[p],n[l>>>1]|=u__left_angle_mark___left_angle_mark_4*(1-l&1),l++);if(1==d)for(f=0;f__left_angle_mark_3;f++){var p;2!=(p=h>>>2*(2-f)&3)&&(u+=o[p],n[l>>>1]|=u__left_angle_mark___left_angle_mark_4*(1-l&1),l++)}}},n.decode._dmap={1:0,\"011\":1,\"000011\":2,\"0000011\":3,\"010\":-1,\"000010\":-2,\"0000010\":-3},n.decode._lens=function(){var e=function(e,t,r,n){for(var i=0;i__left_angle_mark_t.length;i++)e[t[i]]=r+i*n},t=\"00110101,000111,0111,1000,1011,1100,1110,1111,10011,10100,00111,01000,001000,000011,110100,110101,101010,101011,0100111,0001100,0001000,0010111,0000011,0000100,0101000,0101011,0010011,0100100,0011000,00000010,00000011,00011010,00011011,00010010,00010011,00010100,00010101,00010110,00010111,00101000,00101001,00101010,00101011,00101100,00101101,00000100,00000101,00001010,00001011,01010010,01010011,01010100,01010101,00100100,00100101,01011000,01011001,01011010,01011011,01001010,01001011,00110010,00110011,00110100\",r=\"0000110111,010,11,10,011,0011,0010,00011,000101,000100,0000100,0000101,0000111,00000100,00000111,000011000,0000010111,0000011000,0000001000,00001100111,00001101000,00001101100,00000110111,00000101000,00000010111,00000011000,000011001010,000011001011,000011001100,000011001101,000001101000,000001101001,000001101010,000001101011,000011010010,000011010011,000011010100,000011010101,000011010110,000011010111,000001101100,000001101101,000011011010,000011011011,000001010100,000001010101,000001010110,000001010111,000001100100,000001100101,000001010010,000001010011,000000100100,000000110111,000000111000,000000100111,000000101000,000001011000,000001011001,000000101011,000000101100,000001011010,000001100110,000001100111\",n=\"11011,10010,010111,0110111,00110110,00110111,01100100,01100101,01101000,01100111,011001100,011001101,011010010,011010011,011010100,011010101,011010110,011010111,011011000,011011001,011011010,011011011,010011000,010011001,010011010,011000,010011011\",i=\"0000001111,000011001000,000011001001,000001011011,000000110011,000000110100,000000110101,0000001101100,0000001101101,0000001001010,0000001001011,0000001001100,0000001001101,0000001110010,0000001110011,0000001110100,0000001110101,0000001110110,0000001110111,0000001010010,0000001010011,0000001010100,0000001010101,0000001011010,0000001011011,0000001100100,0000001100101\",o=\"00000001000,00000001100,00000001101,000000010010,000000010011,000000010100,000000010101,000000010110,000000010111,000000011100,000000011101,000000011110,000000011111\";t=t.split(\",\"),r=r.split(\",\"),n=n.split(\",\"),i=i.split(\",\"),o=o.split(\",\");var a={},s={};return e(a,t,0,1),e(a,n,64,64),e(a,o,1792,64),e(s,r,0,1),e(s,i,64,64),e(s,o,1792,64),[a,s]}(),n.decode._decodeG4=function(e,t,r,i,o,a,s){for(var l=n.decode,u=t__left_angle_mark___left_angle_mark_3,c=0,d=\"\",h=[],f=[],p=0;p__left_angle_mark_a;p++)f.push(0);f=l._makeDiff(f);for(var m=0,g=0,_=0,b=0,y=0,v=0,A=\"\",w=0,S=8*Math.ceil(a/8);u>>>3__left_angle_mark_t+r;){_=l._findDiff(f,m+(0==m?0:1),1-y),b=l._findDiff(f,_,y);var E=0;if(1==s&&(E=e[u>>>3]>>>7-(7&u)&1),2==s&&(E=e[u>>>3]>>>(7&u)&1),u++,d+=E,\"H\"==A){if(null!=l._lens[y][d]){var x=l._lens[y][d];d=\"\",c+=x,x__left_angle_mark_64&&(l._addNtimes(h,c,y),m+=c,y=1-y,c=0,0==--w&&(A=\"\"))}}else\"0001\"==d&&(d=\"\",l._addNtimes(h,b-m,y),m=b),\"001\"==d&&(d=\"\",A=\"H\",w=2),null!=l._dmap[d]&&(g=_+l._dmap[d],l._addNtimes(h,g-m,y),m=g,d=\"\",y=1-y);h.length==a&&\"\"==A&&(l._writeBits(h,i,8*o+v*S),y=0,v++,m=0,f=l._makeDiff(h),h=[])}},n.decode._findDiff=function(e,t,r){for(var n=0;n__left_angle_mark_e.length;n+=2)if(e[n]>=t&&e[n+1]==r)return e[n]},n.decode._makeDiff=function(e){var t=[];1==e[0]&&t.push(0,1);for(var r=1;r__left_angle_mark_e.length;r++)e[r-1]!=e[r]&&t.push(r,e[r]);return t.push(e.length,0,e.length,1),t},n.decode._decodeG2=function(e,t,r,i,o,a,s){for(var l=n.decode,u=t__left_angle_mark___left_angle_mark_3,c=0,d=\"\",h=[],f=0,p=0,m=8*Math.ceil(a/8);u>>>3__left_angle_mark_t+r;){var g=0;1==s&&(g=e[u>>>3]>>>7-(7&u)&1),2==s&&(g=e[u>>>3]>>>(7&u)&1),u++,d+=g,null!=(c=l._lens[f][d])&&(l._addNtimes(h,c,f),d=\"\",c__left_angle_mark_64&&(f=1-f),h.length==a&&(l._writeBits(h,i,8*o+p*m),h=[],p++,f=0,7&u&&(u+=8-(7&u)),c>=64&&(u+=8)))}},n.decode._decodeG3=function(e,t,r,i,o,a,s,l){for(var u=n.decode,c=t__left_angle_mark___left_angle_mark_3,d=0,h=\"\",f=[],p=[],m=0;m__left_angle_mark_a;m++)f.push(0);for(var g=0,_=0,b=0,y=0,v=0,A=-1,w=\"\",S=0,E=!0,x=8*Math.ceil(a/8);c>>>3__left_angle_mark_t+r;){b=u._findDiff(p,g+(0==g?0:1),1-v),y=u._findDiff(p,b,v);var C=0;if(1==s&&(C=e[c>>>3]>>>7-(7&c)&1),2==s&&(C=e[c>>>3]>>>(7&c)&1),c++,h+=C,E){if(null!=u._lens[v][h]){var T=u._lens[v][h];h=\"\",d+=T,T__left_angle_mark_64&&(u._addNtimes(f,d,v),v=1-v,d=0)}}else\"H\"==w?null!=u._lens[v][h]&&(T=u._lens[v][h],h=\"\",d+=T,T__left_angle_mark_64&&(u._addNtimes(f,d,v),g+=d,v=1-v,d=0,0==--S&&(w=\"\"))):(\"0001\"==h&&(h=\"\",u._addNtimes(f,y-g,v),g=y),\"001\"==h&&(h=\"\",w=\"H\",S=2),null!=u._dmap[h]&&(_=b+u._dmap[h],u._addNtimes(f,_-g,v),g=_,h=\"\",v=1-v));h.endsWith(\"000000000001\")&&(A>=0&&u._writeBits(f,i,8*o+A*x),l&&(1==s&&(E=1==(e[c>>>3]>>>7-(7&c)&1)),2==s&&(E=1==(e[c>>>3]>>>(7&c)&1)),c++),h=\"\",v=0,A++,g=0,p=u._makeDiff(f),f=[])}f.length==a&&u._writeBits(f,i,8*o+A*x)},n.decode._addNtimes=function(e,t,r){for(var n=0;n__left_angle_mark_t;n++)e.push(r)},n.decode._writeBits=function(e,t,r){for(var n=0;n__left_angle_mark_e.length;n++)t[r+n>>>3]|=e[n]__left_angle_mark___left_angle_mark_7-(r+n&7)},n.decode._decodeLZW=n.decode._decodeLZW=(u=0,c=0,d=0,h=0,f=function(){var e=o>>>3,t=(a[e]__left_angle_mark___left_angle_mark_16|a[e+1]__left_angle_mark___left_angle_mark_8|a[e+2])>>>24-(7&o)-c&(1__left_angle_mark___left_angle_mark_c)-1;return o+=c,t},p=new Uint32Array(16384),m=0,g=function(e){c=e+1,u=h+1},_=function(e){for(var t=e__left_angle_mark___left_angle_mark_2,r=p[t+2],n=l+r-1;65535!=t;)s[n--]=p[t],t=p[t+1];l+=r},b=function(e,t){var r=u__left_angle_mark___left_angle_mark_2,n=e__left_angle_mark___left_angle_mark_2;p[r]=p[3+(t__left_angle_mark___left_angle_mark_2)],p[r+1]=n,p[r+2]=p[n+2]+1,p[r+3]=p[n+3],1+ ++u==1__left_angle_mark___left_angle_mark_c&&12!=c&&c++},function(e,t,r,n,i,c){o=t__left_angle_mark___left_angle_mark_3,a=e,s=n,l=i;var y=t+r__left_angle_mark___left_angle_mark_3,v=0,A=0;for(function(e){if(e!=m){m=e,h=1+(d=1__left_angle_mark___left_angle_mark_e);for(var t=0;t__left_angle_mark_h+1;t++)p[4*t]=p[4*t+3]=t,p[4*t+1]=65535,p[4*t+2]=1}}(c),g(c);o__left_angle_mark_y&&(v=f())!=h;){if(v==d){if(g(c),(v=f())==h)break;_(v)}else v__left_angle_mark_u?(_(v),b(A,v)):(b(A,A),_(u-1));A=v}return l}),n.tags={},n._types=((r=new Array(250)).fill(0),{basic:{main:r=r.concat([0,0,0,0,4,3,3,3,3,3,0,0,3,0,0,0,3,0,0,2,2,2,2,4,3,0,0,3,4,4,3,3,5,5,3,2,5,5,0,0,0,0,4,4,0,0,3,3,0,0,0,0,0,0,0,2,2,0,0,0,0,0,0,0,0,2,2,3,5,5,3,0,3,3,4,4,4,3,4,0,0,0,0,0,0,0,0,0,3,3,0,0,0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),rest:{33432:2,33434:5,33437:5,34665:4,34850:3,34853:4,34855:3,34864:3,34866:4,36864:7,36867:2,36868:2,37121:7,37377:10,37378:5,37380:10,37381:5,37383:3,37384:3,37385:3,37386:5,37510:7,37520:2,37521:2,37522:2,40960:7,40961:3,40962:4,40963:4,40965:4,41486:5,41487:5,41488:3,41985:3,41986:3,41987:3,41988:5,41989:3,41990:3,41993:3,41994:3,41995:7,41996:3,42032:2,42033:2,42034:5,42036:2,42037:2,59932:7}},gps:{main:[1,2,5,2,5,1,5,5,0,9],rest:{18:2,29:2}}}),n._readIFD=function(e,t,r,i,o,a){var s=e.readUshort(t,r);r+=2;var l={};a.debug&&v(\" \".repeat(o),i.length-1,\">>>----------------\");for(var u=0;u__left_angle_mark_s;u++){var c=e.readUshort(t,r);r+=2;var d=e.readUshort(t,r);r+=2;var h=e.readUint(t,r);r+=4;var f=e.readUint(t,r);r+=4;var p=[];if(1==d||7==d){var m=h__left_angle_mark_5?r-4:f;m+h>t.buffer.byteLength&&(h=t.buffer.byteLength-m),p=new Uint8Array(t.buffer,m,h)}if(2==d){var g=h__left_angle_mark_5?r-4:f,_=t[g],b=Math.max(0,Math.min(h-1,t.length-g));___left_angle_mark_128||0==b?p.push(e.readASCII(t,g,b)):p=new Uint8Array(t.buffer,g,b)}if(3==d)for(var y=0;y__left_angle_mark_h;y++)p.push(e.readUshort(t,(h__left_angle_mark_3?r-4:f)+2*y));if(4==d||13==d)for(y=0;y__left_angle_mark_h;y++)p.push(e.readUint(t,(h__left_angle_mark_2?r-4:f)+4*y));if(5==d||10==d){var A=5==d?e.readUint:e.readInt;for(y=0;y__left_angle_mark_h;y++)p.push([A(t,f+8*y),A(t,f+8*y+4)])}if(8==d)for(y=0;y__left_angle_mark_h;y++)p.push(e.readShort(t,(h__left_angle_mark_3?r-4:f)+2*y));if(9==d)for(y=0;y__left_angle_mark_h;y++)p.push(e.readInt(t,(h__left_angle_mark_2?r-4:f)+4*y));if(11==d)for(y=0;y__left_angle_mark_h;y++)p.push(e.readFloat(t,f+4*y));if(12==d)for(y=0;y__left_angle_mark_h;y++)p.push(e.readDouble(t,f+8*y));if(0==h||0!=p.length){if(a.debug&&v(\" \".repeat(o),c,d,n.tags[c],p),l[\"t\"+c]=p,330==c&&l.t272&&\"DSLR-A100\"==l.t272[0]);else if(330==c||34665==c||34853==c||50740==c&&e.readUshort(t,e.readUint(p,0))__left_angle_mark_300||61440==c){var w=50740==c?[e.readUint(p,0)]:p,S=[];for(y=0;y__left_angle_mark_w.length;y++)n._readIFD(e,t,w[y],S,o+1,a);330==c&&(l.subIFD=S),34665==c&&(l.exifIFD=S[0]),34853==c&&(l.gpsiIFD=S[0]),50740==c&&(l.dngPrvt=S[0]),61440==c&&(l.fujiIFD=S[0])}if(37500==c&&a.parseMN){var E=p;if(\"Nikon\"==e.readASCII(E,0,5))l.makerNote=n.decode(E.slice(10).buffer)[0];else if(\"OLYMP\"==e.readASCII(E,0,5)||\"OM SYSTEM\"==e.readASCII(E,0,9)){var x=[8208,8224,8240,8256,8272],C=[];n._readIFD(e,E,77==E[1]?16:85==E[5]?12:8,C,o+1,a);var T=l.makerNote=C.pop();for(y=0;y__left_angle_mark_x.length;y++){var R=\"t\"+x[y];null!=T[R]&&(n._readIFD(e,E,T[R][0],C,o+1,a),T[R]=C.pop())}T.t12288&&(n._readIFD(e,T.t12288,0,C,o+1,a),T.t12288=C.pop())}else e.readUshort(t,f)__left_angle_mark_300&&e.readUshort(t,f+4)__left_angle_mark_=12&&(C=[],n._readIFD(e,t,f,C,o+1,a),l.makerNote=C[0])}}else if(v(c,\"unknown TIFF tag type: \",d,\"num:\",h),0==u)return}return i.push(l),a.debug&&v(\" \".repeat(o),\"__left_angle_mark___left_angle_mark___left_angle_mark_---------------\"),r},n._writeIFD=function(e,t,r,i,o){var a=Object.keys(o),s=a.length;o.exifIFD&&s--,o.gpsiIFD&&s--,e.writeUshort(r,i,s);for(var l=(i+=2)+12*s+4,u=0;u__left_angle_mark_a.length;u++){var c=a[u];if(\"t34665\"!=c&&\"t34853\"!=c){\"exifIFD\"==c&&(c=\"t34665\"),\"gpsiIFD\"==c&&(c=\"t34853\");var d=parseInt(c.slice(1)),h=t.main[d];if(null==h&&(h=t.rest[d]),null==h||0==h)throw new Error(\"unknown type of tag: \"+d);var f=o[c];34665==d&&(f=[l],l=n._writeIFD(e,t,r,l,o.exifIFD)[1]),34853==d&&(f=[l],l=n._writeIFD(e,n._types.gps,r,l,o.gpsiIFD)[1]),2==h&&(f=f[0]+\"\\0\");var p=f.length;e.writeUshort(r,i,d),i+=2,e.writeUshort(r,i,h),i+=2,e.writeUint(r,i,p);var m=[-1,1,1,2,4,8,0,1,0,4,8,0,8][h]*p,g=i+=4;if(m>4&&(e.writeUint(r,i,l),g=l),1==h||7==h)for(var _=0;___left_angle_mark_p;_++)r[g+_]=f[_];else if(2==h)e.writeASCII(r,g,f);else if(3==h)for(_=0;___left_angle_mark_p;_++)e.writeUshort(r,g+2*_,f[_]);else if(4==h)for(_=0;___left_angle_mark_p;_++)e.writeUint(r,g+4*_,f[_]);else if(5==h||10==h){var b=5==h?e.writeUint:e.writeInt;for(_=0;___left_angle_mark_p;_++){var y=f[_],v=y[0],A=y[1];if(null==v)throw\"e\";b(r,g+8*_,v),b(r,g+8*_+4,A)}}else if(9==h)for(_=0;___left_angle_mark_p;_++)e.writeInt(r,g+4*_,f[_]);else{if(12!=h)throw h;for(_=0;___left_angle_mark_p;_++)e.writeDouble(r,g+8*_,f[_])}m>4&&(l+=m+=1&m),i+=4}}return[i,l]},n.toRGBA8=function(e,t){function r(e){return e__left_angle_mark_.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055}var n=e.width,i=e.height,o=n*i,a=e.data,s=new Uint8Array(4*o),l=e.t262?e.t262[0]:2,u=e.t258?Math.min(32,e.t258[0]):1;null==e.t262&&1==u&&(l=0);var c=e.t277?e.t277[0]:e.t258?e.t258.length:[1,1,3,1,1,4,3][l],d=e.t339?e.t339[0]:null;if(1==l&&32==u&&3!=d)throw\"e\";var h=Math.ceil(c*u*n/8);if(0==l){t=1/256;for(var f=0;f__left_angle_mark_i;f++){var p=f*h,m=f*n;if(1==u)for(var g=0;g__left_angle_mark_n;g++){var _=m+g__left_angle_mark___left_angle_mark_2,b=a[p+(g>>3)]>>7-(7&g)&1;s[_]=s[_+1]=s[_+2]=255*(1-b),s[_+3]=255}if(4==u)for(g=0;g__left_angle_mark_n;g++)_=m+g__left_angle_mark___left_angle_mark_2,b=a[p+(g>>1)]>>4-4*(1&g)&15,s[_]=s[_+1]=s[_+2]=17*(15-b),s[_+3]=255;if(8==u)for(g=0;g__left_angle_mark_n;g++)_=m+g__left_angle_mark___left_angle_mark_2,b=a[p+g],s[_]=s[_+1]=s[_+2]=255-b,s[_+3]=255;if(16==u)for(g=0;g__left_angle_mark_n;g++)_=m+g__left_angle_mark___left_angle_mark_2,b=a[(A=p+2*g)+1]__left_angle_mark___left_angle_mark_8|a[A],s[_]=s[_+1]=s[_+2]=Math.min(255,255-~~(b*t)),s[_+3]=255}}else if(1==l){null==t&&(t=1/256);var y=3&a.length?null:new Float32Array(a.buffer);for(f=0;f__left_angle_mark_i;f++){if(p=f*h,m=f*n,1==u)for(g=0;g__left_angle_mark_n;g++)_=m+g__left_angle_mark___left_angle_mark_2,b=a[p+(g>>3)]>>7-(7&g)&1,s[_]=s[_+1]=s[_+2]=255*b,s[_+3]=255;if(2==u)for(g=0;g__left_angle_mark_n;g++)_=m+g__left_angle_mark___left_angle_mark_2,b=a[p+(g>>2)]>>6-2*(3&g)&3,s[_]=s[_+1]=s[_+2]=85*b,s[_+3]=255;if(8==u)for(g=0;g__left_angle_mark_n;g++)_=m+g__left_angle_mark___left_angle_mark_2,b=a[p+g*c],s[_]=s[_+1]=s[_+2]=b,s[_+3]=255;if(16==u)for(g=0;g__left_angle_mark_n;g++)_=m+g__left_angle_mark___left_angle_mark_2,b=a[(A=p+2*g)+1]__left_angle_mark___left_angle_mark_8|a[A],s[_]=s[_+1]=s[_+2]=Math.min(255,~~(b*t)),s[_+3]=255;if(32==u)for(g=0;g__left_angle_mark_n;g++){var A;_=m+g__left_angle_mark___left_angle_mark_2,b=y[A=(p>>>2)+g],s[_]=s[_+1]=s[_+2]=~~(.5+255*b),s[_+3]=255}}}else if(2==l)if(8==u){if(1==c)for(g=0;g__left_angle_mark_o;g++)s[4*g]=s[4*g+1]=s[4*g+2]=a[g],s[4*g+3]=255;if(3==c)for(g=0;g__left_angle_mark_o;g++){var w=3*g;s[_=g__left_angle_mark___left_angle_mark_2]=a[w],s[_+1]=a[w+1],s[_+2]=a[w+2],s[_+3]=255}if(c>=4)for(g=0;g__left_angle_mark_o;g++)w=g*c,s[_=g__left_angle_mark___left_angle_mark_2]=a[w],s[_+1]=a[w+1],s[_+2]=a[w+2],s[_+3]=a[w+3]}else if(16==u){if(4==c)for(g=0;g__left_angle_mark_o;g++)w=8*g+1,s[_=g__left_angle_mark___left_angle_mark_2]=a[w],s[_+1]=a[w+2],s[_+2]=a[w+4],s[_+3]=a[w+6];if(3==c)for(g=0;g__left_angle_mark_o;g++)w=6*g+1,s[_=g__left_angle_mark___left_angle_mark_2]=a[w],s[_+1]=a[w+2],s[_+2]=a[w+4],s[_+3]=255}else{if(32!=u)throw u;var S=new Float32Array(a.buffer),E=0;for(g=0;g__left_angle_mark_S.length;g++)E=Math.min(E,S[g]);if(E__left_angle_mark_0)for(g=0;g__left_angle_mark_a.length;g+=4){var x=a[g];a[g]=a[g+3],a[g+3]=x,x=a[g+1],a[g+1]=a[g+2],a[g+2]=x}var C=[];for(g=0;g__left_angle_mark_65536;g++)C.push(r(g/65535));for(g=0;g__left_angle_mark_S.length;g++){var T=Math.max(0,Math.min(1,S[g]));S[g]=C[~~(.5+65535*T)]}if(3==c)for(g=0;g__left_angle_mark_o;g++)w=3*g,s[_=g__left_angle_mark___left_angle_mark_2]=~~(.5+255*S[w]),s[_+1]=~~(.5+255*S[w+1]),s[_+2]=~~(.5+255*S[w+2]),s[_+3]=255;else{if(4!=c)throw c;for(g=0;g__left_angle_mark_o;g++)w=4*g,s[_=g__left_angle_mark___left_angle_mark_2]=~~(.5+255*S[w]),s[_+1]=~~(.5+255*S[w+1]),s[_+2]=~~(.5+255*S[w+2]),s[_+3]=~~(.5+255*S[w+3])}}else if(3==l){var R=e.t320,I=1__left_angle_mark___left_angle_mark_u,k=8==u&&c>1&&e.t338&&0!=e.t338[0];for(f=0;f__left_angle_mark_i;f++)for(var P=0;P__left_angle_mark_n;P++){_=(g=f*n+P)__left_angle_mark___left_angle_mark_2;var M=0,O=f*h;if(1==u)M=a[O+(P>>>3)]>>>7-(7&P)&1;else if(2==u)M=a[O+(P>>>2)]>>>6-2*(3&P)&3;else if(4==u)M=a[O+(P>>>1)]>>>4-4*(1&P)&15;else{if(8!=u)throw u;M=a[O+P*c]}s[_]=R[M]>>8,s[_+1]=R[I+M]>>8,s[_+2]=R[I+I+M]>>8,s[_+3]=k?a[O+P*c+1]:255}}else if(5==l){var B=c>4?1:0;for(g=0;g__left_angle_mark_o;g++){_=g__left_angle_mark___left_angle_mark_2;var N=g*c;if(window.UDOC){var j=a[N],L=a[N+1],D=a[N+2],F=a[N+3],U=UDOC.C.cmykToRgb([j*(1/255),L*(1/255),D*(1/255),F*(1/255)]);s[_]=~~(.5+255*U[0]),s[_+1]=~~(.5+255*U[1]),s[_+2]=~~(.5+255*U[2])}else j=255-a[N],L=255-a[N+1],D=255-a[N+2],F=(255-a[N+3])*(1/255),s[_]=~~(j*F+.5),s[_+1]=~~(L*F+.5),s[_+2]=~~(D*F+.5);s[_+3]=255*(1-B)+a[N+4]*B}}else if(6==l&&e.t278){var z=e.t278[0];for(f=0;f__left_angle_mark_i;f+=z){g=f*n;for(var q=z*n,G=0;G__left_angle_mark_q;G++){_=4*(g+G),D=a[(N=3*g+4*(G>>>1))+(1&G)];var H=a[N+2]-128,W=a[N+3]-128,V=D+((W>>2)+(W>>3)+(W>>5)),$=D-((H>>2)+(H>>4)+(H>>5))-((W>>1)+(W>>3)+(W>>4)+(W>>5)),K=D+(H+(H>>1)+(H>>2)+(H>>6));s[_]=Math.max(0,Math.min(255,V)),s[_+1]=Math.max(0,Math.min(255,$)),s[_+2]=Math.max(0,Math.min(255,K)),s[_+3]=255}}}else if(32845==l)for(f=0;f__left_angle_mark_i;f++)for(P=0;P__left_angle_mark_n;P++){_=4*(f*n+P);var X=a[1+(N=6*(f*n+P))]__left_angle_mark___left_angle_mark_8|a[N],Y=(X=Math.pow(2,(X+.5)/256-64),(a[N+3]+.5)/410),J=(a[N+5]+.5)/410,Q=9*Y/(6*Y-16*J+12),Z=4*J/(6*Y-16*J+12),ee=Q*X/Z,te=(1-Q-Z)*X/Z;V=2.69*ee-1.276*(D=X)-.414*te,$=-1.022*ee+1.978*D+.044*te,K=.061*ee-.224*D+1.163*te,s[_]=255*r(Math.min(V,1)),s[_+1]=255*r(Math.min($,1)),s[_+2]=255*r(Math.min(K,1)),s[_+3]=255}else v(\"Unknown Photometric interpretation: \"+l);return s},n.replaceIMG=function(e){null==e&&(e=document.getElementsByTagName(\"img\"));for(var t=[\"tif\",\"tiff\",\"dng\",\"cr2\",\"nef\"],r=0;r__left_angle_mark_e.length;r++){var i=e[r],o=i.getAttribute(\"src\");if(null!=o){var a=o.split(\".\").pop().toLowerCase();if(-1!=t.indexOf(a)){var s=new XMLHttpRequest;n._xhrs.push(s),n._imgs.push(i),s.open(\"GET\",o),s.responseType=\"arraybuffer\",s.onload=n._imgLoaded,s.send()}}}},n._xhrs=[],n._imgs=[],n._imgLoaded=function(e){var t=n._xhrs.indexOf(e.target),r=n._imgs[t];n._xhrs.splice(t,1),n._imgs.splice(t,1),r.setAttribute(\"src\",n.bufferToURI(e.target.response))},n.bufferToURI=function(e){var t=n.decode(e),r=t,i=0,o=r[0];t[0].subIFD&&(r=r.concat(t[0].subIFD));for(var a=0;a__left_angle_mark_r.length;a++){var s=r[a];if(!(null==s.t258||s.t258.length__left_angle_mark_3)){var l=s.t256*s.t257;l>i&&(i=l,o=s)}}n.decodeImage(e,o,t);var u=n.toRGBA8(o),c=o.width,d=o.height,h=document.createElement(\"canvas\");h.width=c,h.height=d;var f=h.getContext(\"2d\"),p=new ImageData(new Uint8ClampedArray(u.buffer),c,d);return f.putImageData(p,0,0),h.toDataURL()},n._binBE={nextZero:function(e,t){for(;0!=e[t];)t++;return t},readUshort:function(e,t){return e[t]__left_angle_mark___left_angle_mark_8|e[t+1]},readShort:function(e,t){var r=n._binBE.ui8;return r[0]=e[t+1],r[1]=e[t+0],n._binBE.i16[0]},readInt:function(e,t){var r=n._binBE.ui8;return r[0]=e[t+3],r[1]=e[t+2],r[2]=e[t+1],r[3]=e[t+0],n._binBE.i32[0]},readUint:function(e,t){var r=n._binBE.ui8;return r[0]=e[t+3],r[1]=e[t+2],r[2]=e[t+1],r[3]=e[t+0],n._binBE.ui32[0]},readASCII:function(e,t,r){for(var n=\"\",i=0;i__left_angle_mark_r;i++)n+=String.fromCharCode(e[t+i]);return n},readFloat:function(e,t){for(var r=n._binBE.ui8,i=0;i__left_angle_mark_4;i++)r[i]=e[t+3-i];return n._binBE.fl32[0]},readDouble:function(e,t){for(var r=n._binBE.ui8,i=0;i__left_angle_mark_8;i++)r[i]=e[t+7-i];return n._binBE.fl64[0]},writeUshort:function(e,t,r){e[t]=r>>8&255,e[t+1]=255&r},writeInt:function(e,t,r){var i=n._binBE.ui8;n._binBE.i32[0]=r,e[t+3]=i[0],e[t+2]=i[1],e[t+1]=i[2],e[t+0]=i[3]},writeUint:function(e,t,r){e[t]=r>>24&255,e[t+1]=r>>16&255,e[t+2]=r>>8&255,e[t+3]=255&r},writeASCII:function(e,t,r){for(var n=0;n__left_angle_mark_r.length;n++)e[t+n]=r.charCodeAt(n)},writeDouble:function(e,t,r){n._binBE.fl64[0]=r;for(var i=0;i__left_angle_mark_8;i++)e[t+i]=n._binBE.ui8[7-i]}},n._binBE.ui8=new Uint8Array(8),n._binBE.i16=new Int16Array(n._binBE.ui8.buffer),n._binBE.i32=new Int32Array(n._binBE.ui8.buffer),n._binBE.ui32=new Uint32Array(n._binBE.ui8.buffer),n._binBE.fl32=new Float32Array(n._binBE.ui8.buffer),n._binBE.fl64=new Float64Array(n._binBE.ui8.buffer),n._binLE={nextZero:n._binBE.nextZero,readUshort:function(e,t){return e[t+1]__left_angle_mark___left_angle_mark_8|e[t]},readShort:function(e,t){var r=n._binBE.ui8;return r[0]=e[t+0],r[1]=e[t+1],n._binBE.i16[0]},readInt:function(e,t){var r=n._binBE.ui8;return r[0]=e[t+0],r[1]=e[t+1],r[2]=e[t+2],r[3]=e[t+3],n._binBE.i32[0]},readUint:function(e,t){var r=n._binBE.ui8;return r[0]=e[t+0],r[1]=e[t+1],r[2]=e[t+2],r[3]=e[t+3],n._binBE.ui32[0]},readASCII:n._binBE.readASCII,readFloat:function(e,t){for(var r=n._binBE.ui8,i=0;i__left_angle_mark_4;i++)r[i]=e[t+i];return n._binBE.fl32[0]},readDouble:function(e,t){for(var r=n._binBE.ui8,i=0;i__left_angle_mark_8;i++)r[i]=e[t+i];return n._binBE.fl64[0]},writeUshort:function(e,t,r){e[t]=255&r,e[t+1]=r>>8&255},writeInt:function(e,t,r){var i=n._binBE.ui8;n._binBE.i32[0]=r,e[t+0]=i[0],e[t+1]=i[1],e[t+2]=i[2],e[t+3]=i[3]},writeUint:function(e,t,r){e[t]=r>>>0&255,e[t+1]=r>>>8&255,e[t+2]=r>>>16&255,e[t+3]=r>>>24&255},writeASCII:n._binBE.writeASCII},n._copyTile=function(e,t,r,n,i,o,a,s){for(var l=Math.min(t,i-a),u=Math.min(r,o-s),c=0;c__left_angle_mark_u;c++)for(var d=(s+c)*i+a,h=c*t,f=0;f__left_angle_mark_l;f++)n[d+f]=e[h+f]},n.LosslessJpegDecode=function(){var e,t;function r(){return e[t++]}function n(){return e[t++]__left_angle_mark___left_angle_mark_8|e[t++]}function i(e){for(var t=r(),n=[0,0,0,255],i=[],a=0;a__left_angle_mark_16;a++)i[a]=r();for(a=0;a__left_angle_mark_16;a++)for(var s=0;s__left_angle_mark_i[a];s++)n[o(n,0,a+1,1)+3]=r();var l=new Uint8Array(256);for(e[t]=[new Uint8Array(n),l],a=0;a__left_angle_mark_256;a++){for(var u=8,c=a,d=0;255==n[d+3]&&0!=u;)d=n[d+(c>>--u&1)];l[a]=d}}function o(e,t,r,n){if(255!=e[t+3])return 0;if(0==r)return t;for(var i=0;i__left_angle_mark_2;i++){0==e[t+i]&&(e[t+i]=e.length,e.push(0,0,n,255));var a=o(e,e[t+i],r-1,n+1);if(0!=a)return a}return 0}function a(e){for(var t=e.b,r=e.f;t__left_angle_mark_25&&e.a__left_angle_mark_e.d;){var n=e.data[e.a++];255!=n||e.c||e.a++,r=r__left_angle_mark___left_angle_mark_8|n,t+=8}if(t__left_angle_mark_0)throw\"e\";e.b=t,e.f=r}function s(e,t){return t.b__left_angle_mark_e&&a(t),t.f>>(t.b-=e)&65535>>16-e}function l(e,t){var r=e[0],n=0,i=255;t.b__left_angle_mark_16&&a(t);var o=t.f>>t.b-8&255;for(i=r[(n=e[1][o])+3],t.b-=r[n+2];255==i;)i=r[(n=r[n+(t.f>>--t.b&1)])+3];return i}function u(e,t){return e__left_angle_mark_32768>>16-t&&(e+=1-(1__left_angle_mark___left_angle_mark_t)),e}function c(e,t){var r=l(e,t);return 0==r?0:16==r?-32768:u(s(r,t),r)}function d(e,t,r,n,i,o){for(var a=0,s=0;s__left_angle_mark_o;s++){for(var l=s*t,u=0;u__left_angle_mark_t;u+=i){a++;for(var d=0;d__left_angle_mark_i;d++)e[l+u+d]=c(n[d],r)}if(0!=r.e&&a%r.e==0&&0!=s){for(var h=r.a,f=r.data;255!=f[h]||!(208__left_angle_mark_=f[h+1]&&f[h+1]__left_angle_mark_=215);)h--;r.a=h+2,r.f=0,r.b=0}}}function h(e,t){return u(s(e,t),e)}function f(e,t,r,n,i,o,a,s){for(var l=r*a,u=i;u__left_angle_mark_o;u++)e[u]+=1__left_angle_mark___left_angle_mark_s-1;for(var c=a;c__left_angle_mark_l;c+=a)for(u=i;u__left_angle_mark_o;u++)e[c+u]+=e[c+u-a];for(var d=1;d__left_angle_mark_n;d++){var h=d*l;for(u=i;u__left_angle_mark_o;u++)e[h+u]+=e[h+u-l];for(c=a;c__left_angle_mark_l;c+=a)for(u=i;u__left_angle_mark_o;u++){var f=h+c+u,p=f-l,m=e[f-a],g=0;if(0==t)g=0;else if(1==t)g=m;else if(2==t)g=e[p];else if(3==t)g=e[p-a];else if(4==t)g=m+(e[p]-e[p-a]);else if(5==t)g=m+(e[p]-e[p-a]>>>1);else if(6==t)g=e[p]+(m-e[p-a]>>>1);else{if(7!=t)throw t;g=m+e[p]>>>1}e[f]+=g}}}return function(o){if(e=o,t=0,65496!=n())throw\"e\";for(var a=[],s=0,u=0,c=0,p=[],m=[],g=[],_=0,b=0,y=0;;){var v=n();if(65535!=v){var A=n();if(65475==v){u=r(),b=n(),y=n(),_=r();for(var w=0;w__left_angle_mark__;w++){var S=r(),E=r();if(0!=r())throw\"e\";a[S]=[w,E>>4,15&E]}}else if(65476==v)for(var x=t+A-2;t__left_angle_mark_x;)i(m);else{if(65498==v){for(t++,w=0;w__left_angle_mark__;w++){var C=a[r()];g[C[0]]=m[r()>>>4],p[C[0]]=C.slice(1)}s=r(),t+=2;break}65501==v?c=n():t+=A-2}}else t--}var T=new(u>8?Uint16Array:Uint8Array)(b*y*_),R={b:0,f:0,c:8==s,a:t,data:e,d:e.length,e:c};if(R.c)!function(r,n,i,o,a){for(var s=e.length-t,u=0;u__left_angle_mark_s;u+=4){var c=e[t+u];e[t+u]=e[t+u+3],e[t+u+3]=c,c=e[t+u+1],e[t+u+1]=e[t+u+2],e[t+u+2]=c}for(var d=0;d__left_angle_mark_a;d++)for(var f=32768,p=32768,m=0;m__left_angle_mark_n;m+=2){var g=l(o,i),_=l(o,i);0!=g&&(f+=h(g,i)),0!=_&&(p+=h(_,i)),r[d*n+m]=65535&f,r[d*n+m+1]=65535&p}}(T,y*_,R,g[0],b);else{var I=[],k=0,P=0;for(w=0;w__left_angle_mark__;w++){var M=p[w];(q=M[0])>k&&(k=q),(z=M[1])>P&&(P=z),I.push(q*z)}if(1!=k||1!=P){if(3!=_||1!=I[1]||1!=I[2])throw\"e\";if(2!=k||1!=P&&2!=P)throw\"e\";var O=[],B=0;for(w=0;w__left_angle_mark__;w++){for(var N=0;N__left_angle_mark_I[w];N++)O.push(g[w]);B+=I[w]}var j=y/k,L=b/P,D=j*L;d(T,j*B,R,O,B,L),f(T,s,j,L,B-2,B,B,u);var F=new Uint16Array(D*I[0]);if(2==k&&2==P){for(w=0;w__left_angle_mark_D;w++)F[4*w]=T[6*w],F[4*w+1]=T[6*w+1],F[4*w+2]=T[6*w+2],F[4*w+3]=T[6*w+3];for(f(F,s,4*j,L,0,1,1,u),w=0;w__left_angle_mark_D;w++)T[6*w]=F[4*w],T[6*w+1]=F[4*w+1],T[6*w+2]=F[4*w+2],T[6*w+3]=F[4*w+3]}if(2==k&&1==P){for(w=0;w__left_angle_mark_D;w++)F[2*w]=T[4*w],F[2*w+1]=T[4*w+1];for(f(F,s,2*j,L,0,1,1,u),w=0;w__left_angle_mark_D;w++)T[4*w]=F[2*w],T[4*w+1]=F[2*w+1]}for(var U=T.slice(0),z=0;z__left_angle_mark_b;z++)if(2==P)for(var q=0;q__left_angle_mark_y;q++){var G=((z>>>1)*j+(q>>>1))*B,H=2*(1&z)+(1&q);T[W=(z*y+q)*_]=U[G+H],T[W+1]=U[G+4],T[W+2]=U[G+5]}else for(q=0;q__left_angle_mark_y;q++){var W;G=(z*j+(q>>>1))*B,H=1&q,T[W=(z*y+q)*_]=U[G+H],T[W+1]=U[G+2],T[W+2]=U[G+3]}}else if(d(T,y*_,R,g,_,b),0==c)f(T,s,y,b,0,_,_,u);else{var V=Math.floor(c/y);for(z=0;z__left_angle_mark_b;z+=V){var $=T.slice(z*y*_,(z+V)*y*_);f($,s,y,V,0,_,_,u),T.set($,z*y*_)}}}return T}}(),function(){var e=5,t=6,r=13,i=14;function o(e){var t={c:new Int8Array(2__left_angle_mark___left_angle_mark_e.u)};return function(e,t,r){var n=[t,3*t+18,5*t+67,7*t+276,r];e.o=t,e.w=(n[4]+2*t)/(2*t+1)+1|0,e.v=Math.ceil(Math.log2(e.w)),e.t=9,function(e,t){for(var r=-t[4],n=0;r__left_angle_mark_=t[4];n++,r++)e[n]=r__left_angle_mark_=-t[3]?-4:r__left_angle_mark_=-t[2]?-3:r__left_angle_mark_=-t[1]?-2:r__left_angle_mark_-t[0]?-1:r__left_angle_mark_=t[0]?0:r__left_angle_mark_t[1]?1:r__left_angle_mark_t[2]?2:r__left_angle_mark_t[3]?3:4}(e.c,n)}(t,0,e.g),t}function a(e){for(var t=[[],[],[]],r=Math.max(2,e.w+32>>>6),n=0;n__left_angle_mark_3;n++)for(var i=0;i__left_angle_mark_41;i++)t[n][i]=[r,1];return t}function s(e,t){var r=0,n=8-e.a;if(e.j,e.a,t){if(t>=n)do{r__left_angle_mark___left_angle_mark_=n,t-=n,r|=e[e.j]&(1__left_angle_mark___left_angle_mark_n)-1,e.j++,n=8}while(t>=8);t&&(r__left_angle_mark___left_angle_mark_=t,n-=t,r|=e[e.j]>>>n&(1__left_angle_mark___left_angle_mark_t)-1),e.a=8-n}return r}function l(e,t,r,n,i,o,a,l){null==l&&(l=0);var u,c,d,h,f,p,m=o+1,g=m%2,_=0,b=n[i],y=n[i-1],v=n[i-2][m],A=y[m-1],w=y[m],S=y[m+1],E=b[m-1],x=b[m+1],C=Math.abs;if(g&&(d=C(S-w),h=C(v-w),f=C(A-w)),g){if(p=(p=d>f&&h__left_angle_mark_d?v+A:d__left_angle_mark_f&&h__left_angle_mark_f?v+S:S+A)+2*w>>>2,l)return void(b[m]=p);u=t.t*t.c[e.g+w-v]+t.c[e.g+A-w]}else p=w>A&&w>S||w__left_angle_mark_A&&w__left_angle_mark_S?x+E+2*w>>>2:E+x>>>1,u=t.t*t.c[e.g+w-A]+t.c[e.g+A-E];c=C(u);var T=function(e){for(var t=-1,r=0;!r;t++)r=e[e.j]>>>7-e.a&1,e.a++,e.a&=7,e.a||e.j++;return t}(r);if(T__left_angle_mark_e.n-t.v-1){var R=function(e,t){var r=0;if(t__left_angle_mark_e)for(;r__left_angle_mark_=14&&t__left_angle_mark___left_angle_mark_++r__left_angle_mark_e;);return r}(a[c][0],a[c][1]);_=s(r,R)+(T__left_angle_mark___left_angle_mark_R)}else _=s(r,t.v)+1;_=1&_?-1-(_>>>1):_>>>1,a[c][0]+=C(_),a[c][1]==e.f&&(a[c][0]>>>=1,a[c][1]>>>=1),a[c][1]++,p=u__left_angle_mark_0?p-_:p+_,e.i&&(p__left_angle_mark_0?p+=t.w:p>e.g&&(p-=t.w)),b[m]=p>=0?Math.min(p,e.g):0}function u(e,t,r){for(var n=e[0].length,i=t;i__left_angle_mark_=r;i++)e[i][0]=e[i-1][1],e[i][n-1]=e[i-1][n-2]}function c(e){u(e,7,12),u(e,2,4),u(e,15,17)}function d(e,t,n,i,o,a,s,u,d,h,f,p,m){for(var g=0,_=1,b=o__left_angle_mark_r&&o>4;___left_angle_mark_e.m;)g__left_angle_mark_e.m&&(l(e,t,n,i,o,g,s[d],e.h&&(b&&h||!b&&(f||(g&p)==m))),l(e,t,n,i,a,g,s[d],e.h&&(!b&&h||b&&(f||(g&p)==m))),g+=2),g>8&&(l(e,t,n,i,o,_,u[d]),l(e,t,n,i,a,_,u[d]),_+=2);c(i)}function h(e,t,r,n,i,o){d(e,t,r,n,2,7,i,o,0,0,1,0,8),d(e,t,r,n,8,15,i,o,1,0,1,0,8),d(e,t,r,n,3,9,i,o,2,1,0,3,0),d(e,t,r,n,10,16,i,o,0,0,0,3,2),d(e,t,r,n,4,11,i,o,1,0,0,3,2),d(e,t,r,n,12,17,i,o,2,1,0,3,0)}function f(e,t,r,n,i,o){var a=o.length,s=e.l;i+1==e.s&&(s=e.e-i*e.l);for(var l=6*e.e*n+i*e.l,u=0;u__left_angle_mark_6;u++){for(var c=0;c__left_angle_mark_s;c++){var d,h=o[u%a][c%a];d=0==h?2+(u>>>1):2==h?15+(u>>>1):7+u;var f=e.h?(2*c/3&2147483646|c%3&1)+(c%3>>>1):c>>>1;t[l+c]=r[d][f+1]}l+=e.e}}n._decompressRAF=function(s,l){var u=function(e){var t=n._binBE.readUshort,r={b:t(e,0),i:e[2],C:e[3],u:e[4],q:t(e,5),k:t(e,7),e:t(e,9),l:t(e,11),s:e[13],d:t(e,14)};if(18771!=r.b||r.i>1||r.q__left_angle_mark_6||r.q%6||r.e__left_angle_mark_768||r.e%24||768!=r.l||r.k__left_angle_mark_r.l||r.k%r.l||r.k-r.e>=r.l||r.s>16||r.s!=r.k/r.l||r.s!=Math.ceil(r.e/r.l)||r.d!=r.q/6||12!=r.u&&14!=r.u&&16!=r.u||16!=r.C&&0!=r.C)throw\"Invalid data\";if(0==r.i)throw\"Not implemented. We need this file!\";return r.h=16==r.C,r.m=0|(r.h?2*r.l/3:r.l>>>1),r.A=r.m+2,r.f=64,r.g=(1__left_angle_mark___left_angle_mark_r.u)-1,r.n=4*r.u,r}(s),d=function(e,t){var r=new Array(t.s),i=4*t.s,o=16+i;12&i&&(o+=16-(12&i));for(var a=0,s=16;a__left_angle_mark_t.s;s+=4){var l=n._binBE.readUint(e,s);r[a]=e.slice(o,o+l),r[a].j=0,r[a].a=0,o+=l,a++}if(o!=e.length)throw\"Invalid data\";return r}(s,u),p=o(u),m=new Int16Array(u.e*u.q);null==l&&(l=u.h?[[1,1,0,1,1,2],[1,1,2,1,1,0],[2,0,1,0,2,1],[1,1,2,1,1,0],[1,1,0,1,1,2],[0,2,1,2,0,1]]:[[0,1],[3,2]]);for(var g=[[0,3],[1,4],[e,11],[t,12],[r,16],[i,17]],_=[],b=0;b__left_angle_mark_18;b++)_[b]=new Uint16Array(u.A);for(var y=0;y__left_angle_mark_u.s;y++){var v=a(p),A=a(p);for(b=0;b__left_angle_mark_18;b++)for(var w=0;w__left_angle_mark_u.A;w++)_[b][w]=0;for(var S=0;S__left_angle_mark_u.d;S++){for(h(u,p,d[y],_,v,A),b=0;b__left_angle_mark_6;b++)for(w=0;w__left_angle_mark_u.A;w++)_[g[b][0]][w]=_[g[b][1]][w];for(f(u,m,_,S,y,l),b=2;b__left_angle_mark_18;b++)if(-1==[e,t,r,i].indexOf(b))for(w=0;w__left_angle_mark_u.A;w++)_[b][w]=0;c(_)}}return m}}()}()}}),import_utif2,MIME_TYPE4,es_default22,init_es7=__esm({\"../../node_modules/.pnpm/@jimp+tiff@0.22.12_@jimp+custom@0.22.12/node_modules/@jimp/tiff/es/index.js\"(){init_globals(),import_utif2=__toESM(require_UTIF()),MIME_TYPE4=\"image/tiff\",es_default22=()=>({mime:{[MIME_TYPE4]:[\"tiff\",\"tif\"]},constants:{MIME_TIFF:MIME_TYPE4},decoders:{[MIME_TYPE4]:e=>{const t=import_utif2.default.decode(e),r=t[0];t.forEach((t=>{import_utif2.default.decodeImage(e,t)}));const n=import_utif2.default.toRGBA8(r);return{data:Buffer.from(n),width:r.t256[0],height:r.t257[0]}}},encoders:{[MIME_TYPE4]:e=>{const t=import_utif2.default.encodeImage(e.bitmap.data,e.bitmap.width,e.bitmap.height);return Buffer.from(t)}}})}}),require_omggif=__commonJS({\"../../node_modules/.pnpm/omggif@1.0.10/node_modules/omggif/omggif.js\"(e){function t(e,t,r,n){for(var i=e[t++],o=1__left_angle_mark___left_angle_mark_i,a=o+1,s=a+1,l=i+1,u=(1__left_angle_mark___left_angle_mark_l)-1,c=0,d=0,h=0,f=e[t++],p=new Int32Array(4096),m=null;;){for(;c__left_angle_mark_16&&0!==f;)d|=e[t++]__left_angle_mark___left_angle_mark_c,c+=8,1===f?f=e[t++]:--f;if(c__left_angle_mark_l)break;var g=d&u;if(d>>=l,c-=l,g!==o){if(g===a)break;for(var _=g__left_angle_mark_s?g:m,b=0,y=_;y>o;)y=p[y]>>8,++b;var v=y;if(h+b+(_!==g?1:0)>n)return void import_console_browserify.default.log(\"Warning, gif stream longer than expected.\");r[h++]=v;var A=h+=b;for(_!==g&&(r[h++]=v),y=_;b--;)y=p[y],r[--A]=255&y,y>>=8;null!==m&&s__left_angle_mark_4096&&(p[s++]=m__left_angle_mark___left_angle_mark_8|v,s>=u+1&&l__left_angle_mark_12&&(++l,u=u__left_angle_mark___left_angle_mark_1|1)),m=g}else s=a+1,u=(1__left_angle_mark___left_angle_mark_(l=i+1))-1,m=null}return h!==n&&import_console_browserify.default.log(\"Warning, gif stream shorter than expected.\"),r}init_globals();try{e.GifWriter=function(e,t,r,n){var i=0,o=void 0===(n=void 0===n?{}:n).loop?null:n.loop,a=void 0===n.palette?null:n.palette;if(t__left_angle_mark_=0||r__left_angle_mark_=0||t>65535||r>65535)throw new Error(\"Width/Height invalid.\");function s(e){var t=e.length;if(t__left_angle_mark_2||t>256||t&t-1)throw new Error(\"Invalid code/color length, must be power of 2 and 2 .. 256.\");return t}e[i++]=71,e[i++]=73,e[i++]=70,e[i++]=56,e[i++]=57,e[i++]=97;var l=0,u=0;if(null!==a){for(var c=s(a);c>>=1;)++l;if(c=1__left_angle_mark___left_angle_mark_l,--l,void 0!==n.background){if((u=n.background)>=c)throw new Error(\"Background index out of range.\");if(0===u)throw new Error(\"Background index explicitly passed as 0.\")}}if(e[i++]=255&t,e[i++]=t>>8&255,e[i++]=255&r,e[i++]=r>>8&255,e[i++]=(null!==a?128:0)|l,e[i++]=u,e[i++]=0,null!==a)for(var d=0,h=a.length;d__left_angle_mark_h;++d){var f=a[d];e[i++]=f>>16&255,e[i++]=f>>8&255,e[i++]=255&f}if(null!==o){if(o__left_angle_mark_0||o>65535)throw new Error(\"Loop count invalid.\");e[i++]=33,e[i++]=255,e[i++]=11,e[i++]=78,e[i++]=69,e[i++]=84,e[i++]=83,e[i++]=67,e[i++]=65,e[i++]=80,e[i++]=69,e[i++]=50,e[i++]=46,e[i++]=48,e[i++]=3,e[i++]=1,e[i++]=255&o,e[i++]=o>>8&255,e[i++]=0}var p=!1;this.addFrame=function(t,r,n,o,l,u){if(!0===p&&(--i,p=!1),u=void 0===u?{}:u,t__left_angle_mark_0||r__left_angle_mark_0||t>65535||r>65535)throw new Error(\"x/y invalid.\");if(n__left_angle_mark_=0||o__left_angle_mark_=0||n>65535||o>65535)throw new Error(\"Width/Height invalid.\");if(l.length__left_angle_mark_n*o)throw new Error(\"Not enough pixels for the frame size.\");var c=!0,d=u.palette;if(null==d&&(c=!1,d=a),null==d)throw new Error(\"Must supply either a local or global palette.\");for(var h=s(d),f=0;h>>=1;)++f;h=1__left_angle_mark___left_angle_mark_f;var m=void 0===u.delay?0:u.delay,g=void 0===u.disposal?0:u.disposal;if(g__left_angle_mark_0||g>3)throw new Error(\"Disposal out of range.\");var _=!1,b=0;if(void 0!==u.transparent&&null!==u.transparent&&(_=!0,(b=u.transparent)__left_angle_mark_0||b>=h))throw new Error(\"Transparent color index.\");if((0!==g||_||0!==m)&&(e[i++]=33,e[i++]=249,e[i++]=4,e[i++]=g__left_angle_mark___left_angle_mark_2|(!0===_?1:0),e[i++]=255&m,e[i++]=m>>8&255,e[i++]=b,e[i++]=0),e[i++]=44,e[i++]=255&t,e[i++]=t>>8&255,e[i++]=255&r,e[i++]=r>>8&255,e[i++]=255&n,e[i++]=n>>8&255,e[i++]=255&o,e[i++]=o>>8&255,e[i++]=!0===c?128|f-1:0,!0===c)for(var y=0,v=d.length;y__left_angle_mark_v;++y){var A=d[y];e[i++]=A>>16&255,e[i++]=A>>8&255,e[i++]=255&A}return i=function(e,t,r,n){e[t++]=r;var i=t++,o=1__left_angle_mark___left_angle_mark_r,a=o-1,s=o+1,l=s+1,u=r+1,c=0,d=0;function h(r){for(;c>=r;)e[t++]=255&d,d>>=8,c-=8,t===i+256&&(e[i]=255,i=t++)}function f(e){d|=e__left_angle_mark___left_angle_mark_c,c+=u,h(8)}var p=n[0]&a,m={};f(o);for(var g=1,_=n.length;g__left_angle_mark__;++g){var b=n[g]&a,y=p__left_angle_mark___left_angle_mark_8|b,v=m[y];if(void 0===v){for(d|=p__left_angle_mark___left_angle_mark_c,c+=u;c>=8;)e[t++]=255&d,d>>=8,c-=8,t===i+256&&(e[i]=255,i=t++);4096===l?(f(o),l=s+1,u=r+1,m={}):(l>=1__left_angle_mark___left_angle_mark_u&&++u,m[y]=l++),p=b}else p=v}return f(p),f(s),h(1),i+1===t?e[i]=0:(e[i]=t-i-1,e[t++]=0),t}(e,i,f__left_angle_mark_2?2:f,l),i},this.end=function(){return!1===p&&(e[i++]=59,p=!0),i},this.getOutputBuffer=function(){return e},this.setOutputBuffer=function(t){e=t},this.getOutputBufferPosition=function(){return i},this.setOutputBufferPosition=function(e){i=e}},e.GifReader=function(e){var r=0;if(71!==e[r++]||73!==e[r++]||70!==e[r++]||56!==e[r++]||56!=(e[r++]+1&253)||97!==e[r++])throw new Error(\"Invalid GIF 87a/89a header.\");var n=e[r++]|e[r++]__left_angle_mark___left_angle_mark_8,i=e[r++]|e[r++]__left_angle_mark___left_angle_mark_8,o=e[r++],a=o>>7,s=1__left_angle_mark___left_angle_mark_1+(7&o);e[r++],e[r++];var l=null,u=null;a&&(l=r,u=s,r+=3*s);var c=!0,d=[],h=0,f=null,p=0,m=null;for(this.width=n,this.height=i;c&&r__left_angle_mark_e.length;)switch(e[r++]){case 33:switch(e[r++]){case 255:if(11!==e[r]||78==e[r+1]&&69==e[r+2]&&84==e[r+3]&&83==e[r+4]&&67==e[r+5]&&65==e[r+6]&&80==e[r+7]&&69==e[r+8]&&50==e[r+9]&&46==e[r+10]&&48==e[r+11]&&3==e[r+12]&&1==e[r+13]&&0==e[r+16])r+=14,m=e[r++]|e[r++]__left_angle_mark___left_angle_mark_8,r++;else for(r+=12;;){if(!((R=e[r++])>=0))throw Error(\"Invalid block size\");if(0===R)break;r+=R}break;case 249:if(4!==e[r++]||0!==e[r+4])throw new Error(\"Invalid graphics extension block.\");var g=e[r++];h=e[r++]|e[r++]__left_angle_mark___left_angle_mark_8,f=e[r++],1&g||(f=null),p=g>>2&7,r++;break;case 254:for(;;){if(!((R=e[r++])>=0))throw Error(\"Invalid block size\");if(0===R)break;r+=R}break;default:throw new Error(\"Unknown graphic control label: 0x\"+e[r-1].toString(16))}break;case 44:var _=e[r++]|e[r++]__left_angle_mark___left_angle_mark_8,b=e[r++]|e[r++]__left_angle_mark___left_angle_mark_8,y=e[r++]|e[r++]__left_angle_mark___left_angle_mark_8,v=e[r++]|e[r++]__left_angle_mark___left_angle_mark_8,A=e[r++],w=A>>6&1,S=1__left_angle_mark___left_angle_mark_1+(7&A),E=l,x=u,C=!1;A>>7&&(C=!0,E=r,x=S,r+=3*S);var T=r;for(r++;;){var R;if(!((R=e[r++])>=0))throw Error(\"Invalid block size\");if(0===R)break;r+=R}d.push({x:_,y:b,width:y,height:v,has_local_palette:C,palette_offset:E,palette_size:x,data_offset:T,data_length:r-T,transparent_index:f,interlaced:!!w,delay:h,disposal:p});break;case 59:c=!1;break;default:throw new Error(\"Unknown gif block: 0x\"+e[r-1].toString(16))}this.numFrames=function(){return d.length},this.loopCount=function(){return m},this.frameInfo=function(e){if(e__left_angle_mark_0||e>=d.length)throw new Error(\"Frame index out of range.\");return d[e]},this.decodeAndBlitFrameBGRA=function(r,i){var o=this.frameInfo(r),a=o.width*o.height,s=new Uint8Array(a);t(e,o.data_offset,s,a);var l=o.palette_offset,u=o.transparent_index;null===u&&(u=256);var c=o.width,d=n-c,h=c,f=4*(o.y*n+o.x),p=4*((o.y+o.height)*n+o.x),m=f,g=4*d;!0===o.interlaced&&(g+=4*n*7);for(var _=8,b=0,y=s.length;b__left_angle_mark_y;++b){var v=s[b];if(0===h&&(h=c,(m+=g)>=p&&(g=4*d+4*n*(_-1),m=f+(c+d)*(___left_angle_mark___left_angle_mark_1),_>>=1)),v===u)m+=4;else{var A=e[l+3*v],w=e[l+3*v+1],S=e[l+3*v+2];i[m++]=S,i[m++]=w,i[m++]=A,i[m++]=255}--h}},this.decodeAndBlitFrameRGBA=function(r,i){var o=this.frameInfo(r),a=o.width*o.height,s=new Uint8Array(a);t(e,o.data_offset,s,a);var l=o.palette_offset,u=o.transparent_index;null===u&&(u=256);var c=o.width,d=n-c,h=c,f=4*(o.y*n+o.x),p=4*((o.y+o.height)*n+o.x),m=f,g=4*d;!0===o.interlaced&&(g+=4*n*7);for(var _=8,b=0,y=s.length;b__left_angle_mark_y;++b){var v=s[b];if(0===h&&(h=c,(m+=g)>=p&&(g=4*d+4*n*(_-1),m=f+(c+d)*(___left_angle_mark___left_angle_mark_1),_>>=1)),v===u)m+=4;else{var A=e[l+3*v],w=e[l+3*v+1],S=e[l+3*v+2];i[m++]=A,i[m++]=w,i[m++]=S,i[m++]=255}--h}}}}catch(r){}}}),require_bitmapimage=__commonJS({\"../../node_modules/.pnpm/gifwrap@0.10.1/node_modules/gifwrap/src/bitmapimage.js\"(e,t){init_globals(),t.exports=class e{blit(e,t,r,n,i,o,a){if(n+o>this.bitmap.width)throw new Error(\"copy exceeds width of source bitmap\");if(t+o>e.bitmap.width)throw new Error(\"copy exceeds width of target bitmap\");if(i+a>this.bitmap.height)throw new Error(\"copy exceeds height of source bitmap\");if(r+a>e.bitmap.height)throw new Erro(\"copy exceeds height of target bitmap\");const s=this.bitmap.data,l=e.bitmap.data,u=4*this.bitmap.width,c=4*e.bitmap.width,d=4*o;let h=i*u+4*n,f=r*c+4*t;for(;--a>=0;)s.copy(l,f,h,h+d),h+=u,f+=c;return this}fillRGBA(e){const t=this.bitmap.data,r=4*this.bitmap.height;let n=0;for(;n__left_angle_mark_r;)t.writeUInt32BE(e,n),n+=4;for(;n__left_angle_mark_t.length;)t.copy(t,n,0,r),n+=r;return this}getRGBA(e,t){const r=4*(t*this.bitmap.width+e);return this.bitmap.data.readUInt32BE(r)}getRGBASet(){const e=new Set,t=this.bitmap.data;for(let r=0;r__left_angle_mark_t.length;r+=4)e.add(t.readUInt32BE(r,!0));return e}greyscale(){const e=this.bitmap.data;return this.scan(0,0,this.bitmap.width,this.bitmap.height,((t,r,n)=>{const i=Math.round(.299*e[n]+.587*e[n+1]+.114*e[n+2]);e[n]=i,e[n+1]=i,e[n+2]=i})),this}reframe(t,r,n,i,o){const a=t__left_angle_mark_0?0:t,s=r__left_angle_mark_0?0:r,l=n+a>this.bitmap.width?this.bitmap.width-a:n,u=i+s>this.bitmap.height?this.bitmap.height-s:i,c=t__left_angle_mark_0?-t:0,d=r__left_angle_mark_0?-r:0;let h;if(void 0===o){if(a!==t||s!=r||l!==n||u!==i)throw new GifError(\"fillRGBA required for this reframing\");h=new e(n,i)}else h=new e(n,i,o);return this.blit(h,c,d,a,s,l,u),this.bitmap=h.bitmap,this}scale(e){if(1===e)return;if(!Number.isInteger(e)||e__left_angle_mark_1)throw new Error(\"the scale must be an integer >= 1\");const t=this.bitmap.width,r=this.bitmap.height,n=t*e*4,i=this.bitmap.data,o=new Buffer(r*n*e);let a,s=0,l=0;for(let u=0;u__left_angle_mark_r;++u){a=l;for(let r=0;r__left_angle_mark_t;++r){const t=i.readUInt32BE(s,!0);for(let r=0;r__left_angle_mark_e;++r)o.writeUInt32BE(t,l),l+=4;s+=4}for(let t=1;t__left_angle_mark_e;++t)o.copy(o,l,a,l),l+=n,a+=n}return this.bitmap={width:t*e,height:r*e,data:o},this}scanAllCoords(e){const t=this.bitmap.width,r=this.bitmap.data.length;let n=0,i=0;for(let o=0;o__left_angle_mark_r;o+=4)e(n,i,o),++n===t&&(n=0,++i)}scanAllIndexes(e){const t=this.bitmap.data.length;for(let r=0;r__left_angle_mark_t;r+=4)e(r)}constructor(...t){if(0===t.length)throw new Error(\"constructor requires parameters\");const r=t[0];if(null!==r&&\"object\"==typeof r)if(r instanceof e){const e=r.bitmap;this.bitmap={width:e.width,height:e.height,data:new Buffer(e.width*e.height*4)},e.data.copy(this.bitmap.data)}else{if(!(r.width&&r.height&&r.data))throw new Error(\"unrecognized constructor parameters\");this.bitmap=r}else{if(\"number\"!=typeof r||\"number\"!=typeof t[1])throw new Error(\"unrecognized constructor parameters\");{const e=r,n=t[1],i=t[2];this.bitmap={width:e,height:n},Buffer.isBuffer(i)?this.bitmap.data=i:(this.bitmap.data=new Buffer(e*n*4),\"number\"==typeof i&&this.fillRGBA(i))}}}}}}),require_gif=__commonJS({\"../../node_modules/.pnpm/gifwrap@0.10.1/node_modules/gifwrap/src/gif.js\"(e){init_globals();var t=class{constructor(e,t,r){this.width=r.width,this.height=r.height,this.loops=r.loops,this.usesTransparency=r.usesTransparency,this.colorScope=r.colorScope,this.frames=t,this.buffer=e}};t.GlobalColorsPreferred=0,t.GlobalColorsOnly=1,t.LocalColorsOnly=2;var r=class extends Error{constructor(e){super(e),e instanceof Error&&(this.stack=\"Gif\"+e.stack)}};e.Gif=t,e.GifError=r}}),require_image_q=__commonJS({\"../../node_modules/.pnpm/image-q@4.0.0/node_modules/image-q/dist/cjs/image-q.cjs\"(e,t){init_globals();var r=Object.defineProperty,n=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,o=Object.prototype.hasOwnProperty,a=(e,t)=>{for(var n in t)r(e,n,{get:t[n],enumerable:!0})},s=(e=>(t,a)=>e&&e.get(t)||(a=((e,t,a,s)=>{if(t&&\"object\"==typeof t||\"function\"==typeof t)for(let l of i(t))o.call(e,l)||!a&&\"default\"===l||r(e,l,{get:()=>t[l],enumerable:!(s=n(t,l))||s.enumerable});return e})(r({},\"__esModule\",{value:!0}),t,1),e&&e.set(t,a),a))(\"undefined\"!=typeof WeakMap?new WeakMap:0),l=(e,t,n)=>(((e,t,n)=>{t in e?r(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,\"symbol\"!=typeof t?t+\"\":t,n),n),u={};a(u,{applyPalette:()=>He,applyPaletteSync:()=>Ge,buildPalette:()=>qe,buildPaletteSync:()=>ze,constants:()=>c,conversion:()=>m,distance:()=>N,image:()=>Te,palette:()=>Q,quality:()=>je,utils:()=>ie});var c={};a(c,{bt709:()=>d});var d={};a(d,{Y:()=>h,x:()=>f,y:()=>p});var h=(e=>(e[e.RED=.2126]=\"RED\",e[e.GREEN=.7152]=\"GREEN\",e[e.BLUE=.0722]=\"BLUE\",e[e.WHITE=1]=\"WHITE\",e))(h||{}),f=(e=>(e[e.RED=.64]=\"RED\",e[e.GREEN=.3]=\"GREEN\",e[e.BLUE=.15]=\"BLUE\",e[e.WHITE=.3127]=\"WHITE\",e))(f||{}),p=(e=>(e[e.RED=.33]=\"RED\",e[e.GREEN=.6]=\"GREEN\",e[e.BLUE=.06]=\"BLUE\",e[e.WHITE=.329]=\"WHITE\",e))(p||{}),m={};function g(e){return e>.04045?((e+.055)/1.055)**2.4:e/12.92}function _(e,t,r){return{x:.4124*(e=g(e/255))+.3576*(t=g(t/255))+.1805*(r=g(r/255)),y:.2126*e+.7152*t+.0722*r,z:.0193*e+.1192*t+.9505*r}}a(m,{lab2rgb:()=>B,lab2xyz:()=>P,rgb2hsl:()=>C,rgb2lab:()=>I,rgb2xyz:()=>_,xyz2lab:()=>R,xyz2rgb:()=>O});var b={};function y(e){return e*(Math.PI/180)}function v(e,t,r){let n=e;return n__left_angle_mark_t&&(n=t),n__left_angle_mark_r&&(n=r),n}function A(e,t,r){let n=e;return n>t&&(n=t),n>r&&(n=r),n}function w(e,t,r){return e>r&&(e=r),e__left_angle_mark_t&&(e=t),0|e}function S(e){return(e=Math.round(e))>255?e=255:e__left_angle_mark_0&&(e=0),e}function E(e){return e>255?e=255:e__left_angle_mark_0&&(e=0),e}function x(e,t){const r=typeof e[0];let n;if(\"number\"===r||\"string\"===r){const r=Object.create(null);for(let t=0,n=e.length;t__left_angle_mark_n;t++){const n=e[t];r[n]||0===r[n]||(r[n]=t)}n=e.sort(((e,n)=>t(e,n)||r[e]-r[n]))}else{const r=e.slice(0);n=e.sort(((e,n)=>t(e,n)||r.indexOf(e)-r.indexOf(n)))}return n}function C(e,t,r){const n=A(e,t,r),i=v(e,t,r),o=i-n,a=(n+i)/510;let s=0;a>0&&a__left_angle_mark_1&&(s=o/(a__left_angle_mark_.5?i+n:510-i-n));let l=0;return o>0&&(l=i===e?(t-r)/o:i===t?2+(r-e)/o:4+(e-t)/o,l*=60,l__left_angle_mark_0&&(l+=360)),{h:l,s:s,l:a}}function T(e){return e>.008856?e**(1/3):7.787*e+16/116}function R(e,t,r){if(e=T(e/.95047),t=T(t/1),r=T(r/1.08883),116*t-16__left_angle_mark_0)throw new Error(\"xxx\");return{L:Math.max(0,116*t-16),a:500*(e-t),b:200*(t-r)}}function I(e,t,r){const n=_(e,t,r);return R(n.x,n.y,n.z)}function k(e){return e>.206893034?e**3:(e-16/116)/7.787}function P(e,t,r){const n=(e+16)/116,i=n-r/200;return{x:.95047*k(t/500+n),y:1*k(n),z:1.08883*k(i)}}function M(e){return e>.0031308?1.055*e**(1/2.4)-.055:12.92*e}function O(e,t,r){const n=M(3.2406*e+-1.5372*t+-.4986*r),i=M(-.9689*e+1.8758*t+.0415*r),o=M(.0557*e+-.204*t+1.057*r);return{r:S(255*n),g:S(255*i),b:S(255*o)}}function B(e,t,r){const n=P(e,t,r);return O(n.x,n.y,n.z)}a(b,{degrees2radians:()=>y,inRange0to255:()=>E,inRange0to255Rounded:()=>S,intInRange:()=>w,max3:()=>v,min3:()=>A,stableSort:()=>x});var N={};a(N,{AbstractDistanceCalculator:()=>j,AbstractEuclidean:()=>G,AbstractManhattan:()=>$,CIE94GraphicArts:()=>F,CIE94Textiles:()=>D,CIEDE2000:()=>z,CMetric:()=>q,Euclidean:()=>H,EuclideanBT709:()=>W,EuclideanBT709NoAlpha:()=>V,Manhattan:()=>K,ManhattanBT709:()=>Y,ManhattanNommyde:()=>X,PNGQuant:()=>J});var j=class{setWhitePoint(e,t,r,n){this._whitePoint={r:e>0?255/e:0,g:t>0?255/t:0,b:r>0?255/r:0,a:n>0?255/n:0},this._maxDistance=this.calculateRaw(e,t,r,n,0,0,0,0)}calculateNormalized(e,t){return this.calculateRaw(e.r,e.g,e.b,e.a,t.r,t.g,t.b,t.a)/this._maxDistance}constructor(){l(this,\"_maxDistance\"),l(this,\"_whitePoint\"),this._setDefaults(),this.setWhitePoint(255,255,255,255)}},L=class extends j{calculateRaw(e,t,r,n,i,o,a,s){const l=I(E(e*this._whitePoint.r),E(t*this._whitePoint.g),E(r*this._whitePoint.b)),u=I(E(i*this._whitePoint.r),E(o*this._whitePoint.g),E(a*this._whitePoint.b)),c=l.L-u.L,d=l.a-u.a,h=l.b-u.b,f=Math.sqrt(l.a*l.a+l.b*l.b),p=f-Math.sqrt(u.a*u.a+u.b*u.b);let m=d*d+h*h-p*p;m=m__left_angle_mark_0?0:Math.sqrt(m);const g=(s-n)*this._whitePoint.a*this._kA;return Math.sqrt((c/this._Kl)**2+(p/(1+this._K1*f))**2+(m/(1+this._K2*f))**2+g**2)}},D=class extends L{_setDefaults(){this._Kl=2,this._K1=.048,this._K2=.014,this._kA=12.5/255}},F=class extends L{_setDefaults(){this._Kl=1,this._K1=.045,this._K2=.015,this._kA=25/255}},U=class extends j{_setDefaults(){}static _calculatehp(e,t){const r=Math.atan2(e,t);return r>=0?r:r+U._deg360InRad}static _calculateRT(e,t){const r=t**7,n=2*Math.sqrt(r/(r+U._pow25to7)),i=U._deg30InRad*Math.exp(-(((e-U._deg275InRad)/U._deg25InRad)**2));return-Math.sin(2*i)*n}static _calculateT(e){return 1-.17*Math.cos(e-U._deg30InRad)+.24*Math.cos(2*e)+.32*Math.cos(3*e+U._deg6InRad)-.2*Math.cos(4*e-U._deg63InRad)}static _calculate_ahp(e,t,r,n){const i=r+n;return 0===e?i:t__left_angle_mark_=U._deg180InRad?i/2:i__left_angle_mark_U._deg360InRad?(i+U._deg360InRad)/2:(i-U._deg360InRad)/2}static _calculate_dHp(e,t,r,n){let i;return i=0===e?0:t__left_angle_mark_=U._deg180InRad?r-n:r__left_angle_mark_=n?r-n+U._deg360InRad:r-n-U._deg360InRad,2*Math.sqrt(e)*Math.sin(i/2)}calculateRaw(e,t,r,n,i,o,a,s){const l=I(E(e*this._whitePoint.r),E(t*this._whitePoint.g),E(r*this._whitePoint.b)),u=I(E(i*this._whitePoint.r),E(o*this._whitePoint.g),E(a*this._whitePoint.b)),c=(s-n)*this._whitePoint.a*U._kA,d=this.calculateRawInLab(l,u);return Math.sqrt(d+c*c)}calculateRawInLab(e,t){const r=e.L,n=e.a,i=e.b,o=t.L,a=t.a,s=t.b,l=((Math.sqrt(n*n+i*i)+Math.sqrt(a*a+s*s))/2)**7,u=.5*(1-Math.sqrt(l/(l+U._pow25to7))),c=(1+u)*n,d=(1+u)*a,h=Math.sqrt(c*c+i*i),f=Math.sqrt(d*d+s*s),p=h*f,m=U._calculatehp(i,c),g=U._calculatehp(s,d),_=Math.abs(m-g),b=o-r,y=f-h,v=U._calculate_dHp(p,_,g,m),A=U._calculate_ahp(p,_,m,g),w=(h+f)/2,S=((r+o)/2-50)**2,E=y/(1+.045*w),x=v/(1+.015*U._calculateT(A)*w);return(b/(1+.015*S/Math.sqrt(20+S)))**2+E**2+x**2+U._calculateRT(A,w)*E*x}},z=U;l(z,\"_kA\",25/255),l(z,\"_pow25to7\",25**7),l(z,\"_deg360InRad\",y(360)),l(z,\"_deg180InRad\",y(180)),l(z,\"_deg30InRad\",y(30)),l(z,\"_deg6InRad\",y(6)),l(z,\"_deg63InRad\",y(63)),l(z,\"_deg275InRad\",y(275)),l(z,\"_deg25InRad\",y(25));var q=class extends j{calculateRaw(e,t,r,n,i,o,a,s){const l=(e+i)/2*this._whitePoint.r,u=(e-i)*this._whitePoint.r,c=(t-o)*this._whitePoint.g,d=(r-a)*this._whitePoint.b,h=((512+l)*u*u>>8)+4*c*c+((767-l)*d*d>>8),f=(s-n)*this._whitePoint.a;return Math.sqrt(h+f*f)}_setDefaults(){}},G=class extends j{calculateRaw(e,t,r,n,i,o,a,s){const l=i-e,u=o-t,c=a-r,d=s-n;return Math.sqrt(this._kR*l*l+this._kG*u*u+this._kB*c*c+this._kA*d*d)}},H=class extends G{_setDefaults(){this._kR=1,this._kG=1,this._kB=1,this._kA=1}},W=class extends G{_setDefaults(){this._kR=.2126,this._kG=.7152,this._kB=.0722,this._kA=1}},V=class extends G{_setDefaults(){this._kR=.2126,this._kG=.7152,this._kB=.0722,this._kA=0}},$=class extends j{calculateRaw(e,t,r,n,i,o,a,s){let l=i-e,u=o-t,c=a-r,d=s-n;return l__left_angle_mark_0&&(l=0-l),u__left_angle_mark_0&&(u=0-u),c__left_angle_mark_0&&(c=0-c),d__left_angle_mark_0&&(d=0-d),this._kR*l+this._kG*u+this._kB*c+this._kA*d}},K=class extends ${_setDefaults(){this._kR=1,this._kG=1,this._kB=1,this._kA=1}},X=class extends ${_setDefaults(){this._kR=.4984,this._kG=.8625,this._kB=.2979,this._kA=1}},Y=class extends ${_setDefaults(){this._kR=.2126,this._kG=.7152,this._kB=.0722,this._kA=1}},J=class extends j{calculateRaw(e,t,r,n,i,o,a,s){const l=(s-n)*this._whitePoint.a;return this._colordifferenceCh(e*this._whitePoint.r,i*this._whitePoint.r,l)+this._colordifferenceCh(t*this._whitePoint.g,o*this._whitePoint.g,l)+this._colordifferenceCh(r*this._whitePoint.b,a*this._whitePoint.b,l)}_colordifferenceCh(e,t,r){const n=e-t,i=n+r;return n*n+i*i}_setDefaults(){}},Q={};a(Q,{AbstractPaletteQuantizer:()=>Z,ColorHistogram:()=>ge,NeuQuant:()=>de,NeuQuantFloat:()=>pe,RGBQuant:()=>be,WuColorCube:()=>Ee,WuQuant:()=>Ce});var Z=class{quantizeSync(){for(const e of this.quantize())if(e.palette)return e.palette;throw new Error(\"unreachable\")}},ee=class{static createByQuadruplet(e){const t=new ee;return t.r=0|e[0],t.g=0|e[1],t.b=0|e[2],t.a=0|e[3],t._loadUINT32(),t._loadQuadruplet(),t}static createByRGBA(e,t,r,n){const i=new ee;return i.r=0|e,i.g=0|t,i.b=0|r,i.a=0|n,i._loadUINT32(),i._loadQuadruplet(),i}static createByUint32(e){const t=new ee;return t.uint32=e>>>0,t._loadRGBA(),t._loadQuadruplet(),t}from(e){this.r=e.r,this.g=e.g,this.b=e.b,this.a=e.a,this.uint32=e.uint32,this.rgba[0]=e.r,this.rgba[1]=e.g,this.rgba[2]=e.b,this.rgba[3]=e.a}getLuminosity(e){let t=this.r,r=this.g,n=this.b;return e&&(t=Math.min(255,255-this.a+this.a*t/255),r=Math.min(255,255-this.a+this.a*r/255),n=Math.min(255,255-this.a+this.a*n/255)),.2126*t+.7152*r+.0722*n}_loadUINT32(){this.uint32=(this.a__left_angle_mark___left_angle_mark_24|this.b__left_angle_mark___left_angle_mark_16|this.g__left_angle_mark___left_angle_mark_8|this.r)>>>0}_loadRGBA(){this.r=255&this.uint32,this.g=this.uint32>>>8&255,this.b=this.uint32>>>16&255,this.a=this.uint32>>>24&255}_loadQuadruplet(){this.rgba[0]=this.r,this.rgba[1]=this.g,this.rgba[2]=this.b,this.rgba[3]=this.a}constructor(){l(this,\"r\"),l(this,\"g\"),l(this,\"b\"),l(this,\"a\"),l(this,\"uint32\"),l(this,\"rgba\"),this.uint32=-1>>>0,this.r=this.g=this.b=this.a=0,this.rgba=new Array(4),this.rgba[0]=0,this.rgba[1]=0,this.rgba[2]=0,this.rgba[3]=0}},te=class{getWidth(){return this._width}getHeight(){return this._height}setWidth(e){this._width=e}setHeight(e){this._height=e}getPointArray(){return this._pointArray}clone(){const e=new te;e._width=this._width,e._height=this._height;for(let t=0,r=this._pointArray.length;t__left_angle_mark_r;t++)e._pointArray[t]=ee.createByUint32(0|this._pointArray[t].uint32);return e}toUint32Array(){const e=this._pointArray.length,t=new Uint32Array(e);for(let r=0;r__left_angle_mark_e;r++)t[r]=this._pointArray[r].uint32;return t}toUint8Array(){return new Uint8Array(this.toUint32Array().buffer)}static fromHTMLImageElement(e){const t=e.naturalWidth,r=e.naturalHeight,n=document.createElement(\"canvas\");return n.width=t,n.height=r,n.getContext(\"2d\").drawImage(e,0,0,t,r,0,0,t,r),te.fromHTMLCanvasElement(n)}static fromHTMLCanvasElement(e){const t=e.width,r=e.height,n=e.getContext(\"2d\").getImageData(0,0,t,r);return te.fromImageData(n)}static fromImageData(e){const t=e.width,r=e.height;return te.fromUint8Array(e.data,t,r)}static fromUint8Array(e,t,r){switch(Object.prototype.toString.call(e)){case\"[object Uint8ClampedArray]\":case\"[object Uint8Array]\":break;default:e=new Uint8Array(e)}const n=new Uint32Array(e.buffer);return te.fromUint32Array(n,t,r)}static fromUint32Array(e,t,r){const n=new te;n._width=t,n._height=r;for(let i=0,o=e.length;i__left_angle_mark_o;i++)n._pointArray[i]=ee.createByUint32(0|e[i]);return n}static fromBuffer(e,t,r){const n=new Uint32Array(e.buffer,e.byteOffset,e.byteLength/Uint32Array.BYTES_PER_ELEMENT);return te.fromUint32Array(n,t,r)}constructor(){l(this,\"_pointArray\"),l(this,\"_width\"),l(this,\"_height\"),this._width=0,this._height=0,this._pointArray=[]}};function re(e,t){const r=360/t;for(let n=1,i=r-r/2;n__left_angle_mark_t;n++,i+=r)if(e>=i&&e__left_angle_mark_i+r)return n;return 0}var ne=class{add(e){this._pointArray.push(e),this._pointContainer.setWidth(this._pointArray.length)}has(e){for(let t=this._pointArray.length-1;t>=0;t--)if(e.uint32===this._pointArray[t].uint32)return!0;return!1}getNearestColor(e,t){return this._pointArray[0|this._getNearestIndex(e,t)]}getPointContainer(){return this._pointContainer}_nearestPointFromCache(e){return\"number\"==typeof this._i32idx[e]?this._i32idx[e]:-1}_getNearestIndex(e,t){let r=this._nearestPointFromCache(\"\"+t.uint32);if(r>=0)return r;let n=Number.MAX_VALUE;r=0;for(let i=0,o=this._pointArray.length;i__left_angle_mark_o;i++){const o=this._pointArray[i],a=e.calculateRaw(t.r,t.g,t.b,t.a,o.r,o.g,o.b,o.a);a__left_angle_mark_n&&(n=a,r=i)}return this._i32idx[t.uint32]=r,r}sort(){this._i32idx={},this._pointArray.sort(((e,t)=>{const r=C(e.r,e.g,e.b),n=C(t.r,t.g,t.b),i=e.r===e.g&&e.g===e.b?0:1+re(r.h,10),o=(t.r===t.g&&t.g===t.b?0:1+re(n.h,10))-i;if(o)return-o;const a=e.getLuminosity(!0),s=t.getLuminosity(!0);if(s-a!=0)return s-a;const l=(100*n.s|0)-(100*r.s|0);return l?-l:0}))}constructor(){l(this,\"_pointContainer\"),l(this,\"_pointArray\",[]),l(this,\"_i32idx\",{}),this._pointContainer=new te,this._pointContainer.setHeight(1),this._pointArray=this._pointContainer.getPointArray()}},ie={};a(ie,{HueStatistics:()=>ae,Palette:()=>ne,Point:()=>ee,PointContainer:()=>te,ProgressTracker:()=>le,arithmetic:()=>b});var oe=class{constructor(){l(this,\"num\",0),l(this,\"cols\",[])}},ae=class{check(e){this._groupsFull===this._numGroups+1&&(this.check=()=>{});const t=255&e,r=e>>>8&255,n=e>>>16&255,i=t===r&&r===n?0:1+re(C(t,r,n).h,this._numGroups),o=this._stats[i],a=this._minCols;o.num++,o.num>a||(o.num===a&&this._groupsFull++,o.num__left_angle_mark_=a&&this._stats[i].cols.push(e))}injectIntoDictionary(e){for(let t=0;t__left_angle_mark_=this._numGroups;t++)this._stats[t].num__left_angle_mark_=this._minCols&&this._stats[t].cols.forEach((t=>{e[t]?e[t]++:e[t]=1}))}injectIntoArray(e){for(let t=0;t__left_angle_mark_=this._numGroups;t++)this._stats[t].num__left_angle_mark_=this._minCols&&this._stats[t].cols.forEach((t=>{-1===e.indexOf(t)&&e.push(t)}))}constructor(e,t){l(this,\"_numGroups\"),l(this,\"_minCols\"),l(this,\"_stats\"),l(this,\"_groupsFull\"),this._numGroups=e,this._minCols=t,this._stats=[];for(let r=0;r__left_angle_mark_=e;r++)this._stats[r]=new oe;this._groupsFull=0}},se=class{shouldNotify(e){return e-this._last>=this._step&&(this._last=e,this.progress=Math.min(this._progressRange*this._last/this._range,this._progressRange),!0)}constructor(e,t){l(this,\"progress\"),l(this,\"_step\"),l(this,\"_range\"),l(this,\"_last\"),l(this,\"_progressRange\"),this._range=e,this._progressRange=t,this._step=Math.max(1,this._range/(se.steps+1)|0),this._last=-this._step,this.progress=0}},le=se;l(le,\"steps\",100);var ue=class{toPoint(){return ee.createByRGBA(this.r>>3,this.g>>3,this.b>>3,this.a>>3)}subtract(e,t,r,n){this.r-=0|e,this.g-=0|t,this.b-=0|r,this.a-=0|n}constructor(e){l(this,\"r\"),l(this,\"g\"),l(this,\"b\"),l(this,\"a\"),this.r=this.g=this.b=this.a=e}},ce=class extends Z{sample(e){this._pointArray=this._pointArray.concat(e.getPointArray())}*quantize(){this._init(),yield*this._learn(),yield{palette:this._buildPalette(),progress:100}}_init(){this._freq=[],this._bias=[],this._radPower=[],this._network=[];for(let e=0;e__left_angle_mark_this._networkSize;e++)this._network[e]=new ue((e__left_angle_mark___left_angle_mark_11)/this._networkSize|0),this._freq[e]=ce._initialBias/this._networkSize|0,this._bias[e]=0}*_learn(){let e=this._sampleFactor;const t=this._pointArray.length;t__left_angle_mark_ce._minpicturebytes&&(e=1);const r=30+(e-1)/3|0,n=t/e|0;let i,o=n/ce._nCycles|0,a=ce._initAlpha,s=(this._networkSize>>3)*ce._radiusBias,l=s>>ce._radiusBiasShift;l__left_angle_mark_=1&&(l=0);for(let c=0;c__left_angle_mark_l;c++)this._radPower[c]=a*((l*l-c*c)*ce._radBias/(l*l))>>>0;i=t__left_angle_mark_ce._minpicturebytes?1:t%ce._prime1!=0?ce._prime1:t%ce._prime2!=0?ce._prime2:t%ce._prime3!=0?ce._prime3:ce._prime4;const u=new le(n,99);for(let c=0,d=0;c__left_angle_mark_n;){u.shouldNotify(c)&&(yield{progress:u.progress});const e=this._pointArray[d],n=e.b__left_angle_mark___left_angle_mark_3,h=e.g__left_angle_mark___left_angle_mark_3,f=e.r__left_angle_mark___left_angle_mark_3,p=e.a__left_angle_mark___left_angle_mark_3,m=this._contest(n,h,f,p);if(this._alterSingle(a,m,n,h,f,p),0!==l&&this._alterNeighbour(l,m,n,h,f,p),d+=i,d>=t&&(d-=t),c++,0===o&&(o=1),c%o==0){a-=a/r|0,s-=s/ce._radiusDecrease|0,l=s>>ce._radiusBiasShift,l__left_angle_mark_=1&&(l=0);for(let e=0;e__left_angle_mark_l;e++)this._radPower[e]=a*((l*l-e*e)*ce._radBias/(l*l))>>>0}}}_buildPalette(){const e=new ne;return this._network.forEach((t=>{e.add(t.toPoint())})),e.sort(),e}_alterNeighbour(e,t,r,n,i,o){let a=t-e;a__left_angle_mark_-1&&(a=-1);let s=t+e;s>this._networkSize&&(s=this._networkSize);let l=t+1,u=t-1,c=1;for(;l__left_angle_mark_s||u>a;){const e=this._radPower[c++]/ce._alphaRadBias;if(l__left_angle_mark_s){const t=this._network[l++];t.subtract(e*(t.r-i),e*(t.g-n),e*(t.b-r),e*(t.a-o))}if(u>a){const t=this._network[u--];t.subtract(e*(t.r-i),e*(t.g-n),e*(t.b-r),e*(t.a-o))}}}_alterSingle(e,t,r,n,i,o){e/=ce._initAlpha;const a=this._network[t];a.subtract(e*(a.r-i),e*(a.g-n),e*(a.b-r),e*(a.a-o))}_contest(e,t,r,n){let i=~(1__left_angle_mark___left_angle_mark_31),o=i,a=-1,s=a;for(let l=0;l__left_angle_mark_this._networkSize;l++){const u=this._network[l],c=8160*this._distance.calculateNormalized(u,{r:r,g:t,b:e,a:n})|0;c__left_angle_mark_i&&(i=c,a=l);const d=c-(this._bias[l]>>ce._initialBiasShift-3);d__left_angle_mark_o&&(o=d,s=l);const h=this._freq[l]>>ce._betaShift;this._freq[l]-=h,this._bias[l]+=h__left_angle_mark___left_angle_mark_ce._gammaShift}return this._freq[a]+=ce._beta,this._bias[a]-=ce._betaGamma,s}constructor(e,t=256){super(),l(this,\"_pointArray\"),l(this,\"_networkSize\"),l(this,\"_network\"),l(this,\"_sampleFactor\"),l(this,\"_radPower\"),l(this,\"_freq\"),l(this,\"_bias\"),l(this,\"_distance\"),this._distance=e,this._pointArray=[],this._sampleFactor=1,this._networkSize=t,this._distance.setWhitePoint(2040,2040,2040,2040)}},de=ce;l(de,\"_prime1\",499),l(de,\"_prime2\",491),l(de,\"_prime3\",487),l(de,\"_prime4\",503),l(de,\"_minpicturebytes\",ce._prime4),l(de,\"_nCycles\",100),l(de,\"_initialBiasShift\",16),l(de,\"_initialBias\",1__left_angle_mark___left_angle_mark_ce._initialBiasShift),l(de,\"_gammaShift\",10),l(de,\"_betaShift\",10),l(de,\"_beta\",ce._initialBias>>ce._betaShift),l(de,\"_betaGamma\",ce._initialBias__left_angle_mark___left_angle_mark_ce._gammaShift-ce._betaShift),l(de,\"_radiusBiasShift\",6),l(de,\"_radiusBias\",1__left_angle_mark___left_angle_mark_ce._radiusBiasShift),l(de,\"_radiusDecrease\",30),l(de,\"_alphaBiasShift\",10),l(de,\"_initAlpha\",1__left_angle_mark___left_angle_mark_ce._alphaBiasShift),l(de,\"_radBiasShift\",8),l(de,\"_radBias\",1__left_angle_mark___left_angle_mark_ce._radBiasShift),l(de,\"_alphaRadBiasShift\",ce._alphaBiasShift+ce._radBiasShift),l(de,\"_alphaRadBias\",1__left_angle_mark___left_angle_mark_ce._alphaRadBiasShift);var he=class{toPoint(){return ee.createByRGBA(this.r>>3,this.g>>3,this.b>>3,this.a>>3)}subtract(e,t,r,n){this.r-=e,this.g-=t,this.b-=r,this.a-=n}constructor(e){l(this,\"r\"),l(this,\"g\"),l(this,\"b\"),l(this,\"a\"),this.r=this.g=this.b=this.a=e}},fe=class extends Z{sample(e){this._pointArray=this._pointArray.concat(e.getPointArray())}*quantize(){this._init(),yield*this._learn(),yield{palette:this._buildPalette(),progress:100}}_init(){this._freq=[],this._bias=[],this._radPower=[],this._network=[];for(let e=0;e__left_angle_mark_this._networkSize;e++)this._network[e]=new he((e__left_angle_mark___left_angle_mark_11)/this._networkSize),this._freq[e]=fe._initialBias/this._networkSize,this._bias[e]=0}*_learn(){let e=this._sampleFactor;const t=this._pointArray.length;t__left_angle_mark_fe._minpicturebytes&&(e=1);const r=30+(e-1)/3,n=t/e;let i,o=n/fe._nCycles|0,a=fe._initAlpha,s=(this._networkSize>>3)*fe._radiusBias,l=s>>fe._radiusBiasShift;l__left_angle_mark_=1&&(l=0);for(let c=0;c__left_angle_mark_l;c++)this._radPower[c]=a*((l*l-c*c)*fe._radBias/(l*l));i=t__left_angle_mark_fe._minpicturebytes?1:t%fe._prime1!=0?fe._prime1:t%fe._prime2!=0?fe._prime2:t%fe._prime3!=0?fe._prime3:fe._prime4;const u=new le(n,99);for(let c=0,d=0;c__left_angle_mark_n;){u.shouldNotify(c)&&(yield{progress:u.progress});const e=this._pointArray[d],n=e.b__left_angle_mark___left_angle_mark_3,h=e.g__left_angle_mark___left_angle_mark_3,f=e.r__left_angle_mark___left_angle_mark_3,p=e.a__left_angle_mark___left_angle_mark_3,m=this._contest(n,h,f,p);if(this._alterSingle(a,m,n,h,f,p),0!==l&&this._alterNeighbour(l,m,n,h,f,p),d+=i,d>=t&&(d-=t),c++,0===o&&(o=1),c%o==0){a-=a/r,s-=s/fe._radiusDecrease,l=s>>fe._radiusBiasShift,l__left_angle_mark_=1&&(l=0);for(let e=0;e__left_angle_mark_l;e++)this._radPower[e]=a*((l*l-e*e)*fe._radBias/(l*l))}}}_buildPalette(){const e=new ne;return this._network.forEach((t=>{e.add(t.toPoint())})),e.sort(),e}_alterNeighbour(e,t,r,n,i,o){let a=t-e;a__left_angle_mark_-1&&(a=-1);let s=t+e;s>this._networkSize&&(s=this._networkSize);let l=t+1,u=t-1,c=1;for(;l__left_angle_mark_s||u>a;){const e=this._radPower[c++]/fe._alphaRadBias;if(l__left_angle_mark_s){const t=this._network[l++];t.subtract(e*(t.r-i),e*(t.g-n),e*(t.b-r),e*(t.a-o))}if(u>a){const t=this._network[u--];t.subtract(e*(t.r-i),e*(t.g-n),e*(t.b-r),e*(t.a-o))}}}_alterSingle(e,t,r,n,i,o){e/=fe._initAlpha;const a=this._network[t];a.subtract(e*(a.r-i),e*(a.g-n),e*(a.b-r),e*(a.a-o))}_contest(e,t,r,n){let i=~(1__left_angle_mark___left_angle_mark_31),o=i,a=-1,s=a;for(let l=0;l__left_angle_mark_this._networkSize;l++){const u=this._network[l],c=8160*this._distance.calculateNormalized(u,{r:r,g:t,b:e,a:n});c__left_angle_mark_i&&(i=c,a=l);const d=c-(this._bias[l]>>fe._initialBiasShift-3);d__left_angle_mark_o&&(o=d,s=l);const h=this._freq[l]>>fe._betaShift;this._freq[l]-=h,this._bias[l]+=h__left_angle_mark___left_angle_mark_fe._gammaShift}return this._freq[a]+=fe._beta,this._bias[a]-=fe._betaGamma,s}constructor(e,t=256){super(),l(this,\"_pointArray\"),l(this,\"_networkSize\"),l(this,\"_network\"),l(this,\"_sampleFactor\"),l(this,\"_radPower\"),l(this,\"_freq\"),l(this,\"_bias\"),l(this,\"_distance\"),this._distance=e,this._pointArray=[],this._sampleFactor=1,this._networkSize=t,this._distance.setWhitePoint(2040,2040,2040,2040)}},pe=fe;l(pe,\"_prime1\",499),l(pe,\"_prime2\",491),l(pe,\"_prime3\",487),l(pe,\"_prime4\",503),l(pe,\"_minpicturebytes\",fe._prime4),l(pe,\"_nCycles\",100),l(pe,\"_initialBiasShift\",16),l(pe,\"_initialBias\",1__left_angle_mark___left_angle_mark_fe._initialBiasShift),l(pe,\"_gammaShift\",10),l(pe,\"_betaShift\",10),l(pe,\"_beta\",fe._initialBias>>fe._betaShift),l(pe,\"_betaGamma\",fe._initialBias__left_angle_mark___left_angle_mark_fe._gammaShift-fe._betaShift),l(pe,\"_radiusBiasShift\",6),l(pe,\"_radiusBias\",1__left_angle_mark___left_angle_mark_fe._radiusBiasShift),l(pe,\"_radiusDecrease\",30),l(pe,\"_alphaBiasShift\",10),l(pe,\"_initAlpha\",1__left_angle_mark___left_angle_mark_fe._alphaBiasShift),l(pe,\"_radBiasShift\",8),l(pe,\"_radBias\",1__left_angle_mark___left_angle_mark_fe._radBiasShift),l(pe,\"_alphaRadBiasShift\",fe._alphaBiasShift+fe._radBiasShift),l(pe,\"_alphaRadBias\",1__left_angle_mark___left_angle_mark_fe._alphaRadBiasShift);var me=class{sample(e){switch(this._method){case 1:this._colorStats1D(e);break;case 2:this._colorStats2D(e)}}getImportanceSortedColorsIDXI32(){const e=x(Object.keys(this._histogram),((e,t)=>this._histogram[t]-this._histogram[e]));if(0===e.length)return[];let t;switch(this._method){case 1:const r=Math.min(e.length,this._initColors),n=e[r-1],i=this._histogram[n];t=e.slice(0,r);let o=r;const a=e.length;for(;o__left_angle_mark_a&&this._histogram[e[o]]===i;)t.push(e[o++]);this._hueStats.injectIntoArray(t);break;case 2:t=e;break;default:throw new Error(\"Incorrect method\")}return t.map((e=>+e))}_colorStats1D(e){const t=this._histogram,r=e.getPointArray(),n=r.length;for(let i=0;i__left_angle_mark_n;i++){const e=r[i].uint32;this._hueStats.check(e),e in t?t[e]++:t[e]=1}}_colorStats2D(e){const t=e.getWidth(),r=e.getHeight(),n=e.getPointArray(),i=me._boxSize[0],o=me._boxSize[1],a=i*o,s=this._makeBoxes(t,r,i,o),l=this._histogram;s.forEach((e=>{let r=Math.round(e.w*e.h/a)*me._boxPixels;r__left_angle_mark_2&&(r=2);const i={};this._iterateBox(e,t,(e=>{const t=n[e].uint32;this._hueStats.check(t),t in l?l[t]++:t in i?++i[t]>=r&&(l[t]=i[t]):i[t]=1}))})),this._hueStats.injectIntoDictionary(l)}_iterateBox(e,t,r){const n=e,i=n.y*t+n.x,o=(n.y+n.h-1)*t+(n.x+n.w-1),a=t-n.w+1;let s=0,l=i;do{r.call(this,l),l+=++s%n.w==0?a:1}while(l__left_angle_mark_=o)}_makeBoxes(e,t,r,n){const i=e%r,o=t%n,a=e-i,s=t-o,l=[];for(let u=0;u__left_angle_mark_t;u+=n)for(let t=0;t__left_angle_mark_e;t+=r)l.push({x:t,y:u,w:t===a?i:r,h:u===s?o:n});return l}constructor(e,t){l(this,\"_method\"),l(this,\"_hueStats\"),l(this,\"_histogram\"),l(this,\"_initColors\"),l(this,\"_minHueCols\"),this._method=e,this._minHueCols=t__left_angle_mark___left_angle_mark_2,this._initColors=t__left_angle_mark___left_angle_mark_2,this._hueStats=new ae(me._hueGroups,this._minHueCols),this._histogram=Object.create(null)}},ge=me;l(ge,\"_boxSize\",[64,64]),l(ge,\"_boxPixels\",2),l(ge,\"_hueGroups\",10);var _e=class{constructor(e,t,r){l(this,\"index\"),l(this,\"color\"),l(this,\"distance\"),this.index=e,this.color=t,this.distance=r}},be=class extends Z{sample(e){this._histogram.sample(e)}*quantize(){const e=this._histogram.getImportanceSortedColorsIDXI32();if(0===e.length)throw new Error(\"No colors in image\");yield*this._buildPalette(e)}*_buildPalette(e){const t=new ne,r=t.getPointContainer().getPointArray(),n=new Array(e.length);for(let c=0;c__left_angle_mark_e.length;c++)r.push(ee.createByUint32(e[c])),n[c]=1;const i=r.length,o=[];let a=i,s=this._initialDistance;const l=new le(a-this._colors,99);for(;a>this._colors;){o.length=0;for(let e=0;e__left_angle_mark_i;e++){if(l.shouldNotify(i-a)&&(yield{progress:l.progress}),0===n[e])continue;const t=r[e];for(let l=e+1;l__left_angle_mark_i;l++){if(0===n[l])continue;const e=r[l],i=this._distance.calculateNormalized(t,e);i__left_angle_mark_s&&(o.push(new _e(l,e,i)),n[l]=0,a--)}}s+=a>3*this._colors?this._initialDistance:this._distanceIncrement}if(a__left_angle_mark_this._colors){x(o,((e,t)=>t.distance-e.distance));let e=0;for(;a__left_angle_mark_this._colors&&e__left_angle_mark_o.length;)n[o[e].index]=1,a++,e++}let u=r.length;for(let c=u-1;c>=0;c--)0===n[c]&&(c!==u-1&&(r[c]=r[u-1]),--u);r.length=u,t.sort(),yield{palette:t,progress:100}}constructor(e,t=256,r=2){super(),l(this,\"_colors\"),l(this,\"_initialDistance\"),l(this,\"_distanceIncrement\"),l(this,\"_histogram\"),l(this,\"_distance\"),this._distance=e,this._colors=t,this._histogram=new ge(r,t),this._initialDistance=.01,this._distanceIncrement=.005}};function ye(e){const t=[];for(let r=0;r__left_angle_mark_e;r++)t[r]=0;return t}function ve(e,t,r,n){const i=new Array(e);for(let o=0;o__left_angle_mark_e;o++){i[o]=new Array(t);for(let e=0;e__left_angle_mark_t;e++){i[o][e]=new Array(r);for(let t=0;t__left_angle_mark_r;t++){i[o][e][t]=new Array(n);for(let r=0;r__left_angle_mark_n;r++)i[o][e][t][r]=0}}}return i}function Ae(e,t,r){const n=new Array(e);for(let i=0;i__left_angle_mark_e;i++){n[i]=new Array(t);for(let e=0;e__left_angle_mark_t;e++){n[i][e]=new Array(r);for(let t=0;t__left_angle_mark_r;t++)n[i][e][t]=0}}return n}function we(e,t,r,n,i){for(let o=0;o__left_angle_mark_t;o++){e[o]=[];for(let t=0;t__left_angle_mark_r;t++){e[o][t]=[];for(let r=0;r__left_angle_mark_n;r++)e[o][t][r]=i}}}function Se(e,t,r){for(let n=0;n__left_angle_mark_t;n++)e[n]=r}var Ee=class{constructor(){l(this,\"redMinimum\"),l(this,\"redMaximum\"),l(this,\"greenMinimum\"),l(this,\"greenMaximum\"),l(this,\"blueMinimum\"),l(this,\"blueMaximum\"),l(this,\"volume\"),l(this,\"alphaMinimum\"),l(this,\"alphaMaximum\")}},xe=class extends Z{sample(e){const t=e.getPointArray();for(let r=0,n=t.length;r__left_angle_mark_n;r++)this._addColor(t[r]);this._pixels=this._pixels.concat(t)}*quantize(){yield*this._preparePalette();const e=new ne;for(let t=0;t__left_angle_mark_this._colors;t++)if(this._sums[t]>0){const r=this._sums[t],n=this._reds[t]/r,i=this._greens[t]/r,o=this._blues[t]/r,a=this._alphas[t]/r,s=ee.createByRGBA(0|n,0|i,0|o,0|a);e.add(s)}e.sort(),yield{palette:e,progress:100}}*_preparePalette(){yield*this._calculateMoments();let e=0;const t=ye(this._colors);for(let a=1;a__left_angle_mark_this._colors;++a){this._cut(this._cubes[e],this._cubes[a])?(t[e]=this._cubes[e].volume>1?this._calculateVariance(this._cubes[e]):0,t[a]=this._cubes[a].volume>1?this._calculateVariance(this._cubes[a]):0):(t[e]=0,a--),e=0;let r=t[0];for(let n=1;n__left_angle_mark_=a;++n)t[n]>r&&(r=t[n],e=n);if(r__left_angle_mark_=0){this._colors=a+1;break}}const r=[],n=[],i=[],o=[];for(let a=0;a__left_angle_mark_this._colors;++a){const e=xe._volume(this._cubes[a],this._weights);e>0?(r[a]=xe._volume(this._cubes[a],this._momentsRed)/e|0,n[a]=xe._volume(this._cubes[a],this._momentsGreen)/e|0,i[a]=xe._volume(this._cubes[a],this._momentsBlue)/e|0,o[a]=xe._volume(this._cubes[a],this._momentsAlpha)/e|0):(r[a]=0,n[a]=0,i[a]=0,o[a]=0)}this._reds=ye(this._colors+1),this._greens=ye(this._colors+1),this._blues=ye(this._colors+1),this._alphas=ye(this._colors+1),this._sums=ye(this._colors+1);for(let a=0,s=this._pixels.length;a__left_angle_mark_s;a++){const e=this._pixels[a];let t=-1,s=Number.MAX_VALUE;for(let a=0;a__left_angle_mark_this._colors;a++){const l=r[a],u=n[a],c=i[a],d=o[a],h=this._distance.calculateRaw(l,u,c,d,e.r,e.g,e.b,e.a);h__left_angle_mark_s&&(s=h,t=a)}this._reds[t]+=e.r,this._greens[t]+=e.g,this._blues[t]+=e.b,this._alphas[t]+=e.a,this._sums[t]++}}_addColor(e){const t=8-this._significantBitsPerChannel,r=1+(e.r>>t),n=1+(e.g>>t),i=1+(e.b>>t),o=1+(e.a>>t);this._weights[o][r][n][i]++,this._momentsRed[o][r][n][i]+=e.r,this._momentsGreen[o][r][n][i]+=e.g,this._momentsBlue[o][r][n][i]+=e.b,this._momentsAlpha[o][r][n][i]+=e.a,this._moments[o][r][n][i]+=this._table[e.r]+this._table[e.g]+this._table[e.b]+this._table[e.a]}*_calculateMoments(){const e=[],t=[],r=[],n=[],i=[],o=[],a=Ae(this._sideSize,this._sideSize,this._sideSize),s=Ae(this._sideSize,this._sideSize,this._sideSize),l=Ae(this._sideSize,this._sideSize,this._sideSize),u=Ae(this._sideSize,this._sideSize,this._sideSize),c=Ae(this._sideSize,this._sideSize,this._sideSize),d=Ae(this._sideSize,this._sideSize,this._sideSize);let h=0;const f=new le(this._alphaMaxSideIndex*this._maxSideIndex,99);for(let p=1;p__left_angle_mark_=this._alphaMaxSideIndex;++p){we(a,this._sideSize,this._sideSize,this._sideSize,0),we(s,this._sideSize,this._sideSize,this._sideSize,0),we(l,this._sideSize,this._sideSize,this._sideSize,0),we(u,this._sideSize,this._sideSize,this._sideSize,0),we(c,this._sideSize,this._sideSize,this._sideSize,0),we(d,this._sideSize,this._sideSize,this._sideSize,0);for(let m=1;m__left_angle_mark_=this._maxSideIndex;++m,++h){f.shouldNotify(h)&&(yield{progress:f.progress}),Se(e,this._sideSize,0),Se(t,this._sideSize,0),Se(r,this._sideSize,0),Se(n,this._sideSize,0),Se(i,this._sideSize,0),Se(o,this._sideSize,0);for(let h=1;h__left_angle_mark_=this._maxSideIndex;++h){let f=0,g=0,_=0,b=0,y=0,v=0;for(let A=1;A__left_angle_mark_=this._maxSideIndex;++A)f+=this._weights[p][m][h][A],g+=this._momentsRed[p][m][h][A],_+=this._momentsGreen[p][m][h][A],b+=this._momentsBlue[p][m][h][A],y+=this._momentsAlpha[p][m][h][A],v+=this._moments[p][m][h][A],e[A]+=f,t[A]+=g,r[A]+=_,n[A]+=b,i[A]+=y,o[A]+=v,a[m][h][A]=a[m-1][h][A]+e[A],s[m][h][A]=s[m-1][h][A]+t[A],l[m][h][A]=l[m-1][h][A]+r[A],u[m][h][A]=u[m-1][h][A]+n[A],c[m][h][A]=c[m-1][h][A]+i[A],d[m][h][A]=d[m-1][h][A]+o[A],this._weights[p][m][h][A]=this._weights[p-1][m][h][A]+a[m][h][A],this._momentsRed[p][m][h][A]=this._momentsRed[p-1][m][h][A]+s[m][h][A],this._momentsGreen[p][m][h][A]=this._momentsGreen[p-1][m][h][A]+l[m][h][A],this._momentsBlue[p][m][h][A]=this._momentsBlue[p-1][m][h][A]+u[m][h][A],this._momentsAlpha[p][m][h][A]=this._momentsAlpha[p-1][m][h][A]+c[m][h][A],this._moments[p][m][h][A]=this._moments[p-1][m][h][A]+d[m][h][A]}}}}static _volumeFloat(e,t){return t[e.alphaMaximum][e.redMaximum][e.greenMaximum][e.blueMaximum]-t[e.alphaMaximum][e.redMaximum][e.greenMinimum][e.blueMaximum]-t[e.alphaMaximum][e.redMinimum][e.greenMaximum][e.blueMaximum]+t[e.alphaMaximum][e.redMinimum][e.greenMinimum][e.blueMaximum]-t[e.alphaMinimum][e.redMaximum][e.greenMaximum][e.blueMaximum]+t[e.alphaMinimum][e.redMaximum][e.greenMinimum][e.blueMaximum]+t[e.alphaMinimum][e.redMinimum][e.greenMaximum][e.blueMaximum]-t[e.alphaMinimum][e.redMinimum][e.greenMinimum][e.blueMaximum]-(t[e.alphaMaximum][e.redMaximum][e.greenMaximum][e.blueMinimum]-t[e.alphaMinimum][e.redMaximum][e.greenMaximum][e.blueMinimum]-t[e.alphaMaximum][e.redMaximum][e.greenMinimum][e.blueMinimum]+t[e.alphaMinimum][e.redMaximum][e.greenMinimum][e.blueMinimum]-t[e.alphaMaximum][e.redMinimum][e.greenMaximum][e.blueMinimum]+t[e.alphaMinimum][e.redMinimum][e.greenMaximum][e.blueMinimum]+t[e.alphaMaximum][e.redMinimum][e.greenMinimum][e.blueMinimum]-t[e.alphaMinimum][e.redMinimum][e.greenMinimum][e.blueMinimum])}static _volume(e,t){return 0|xe._volumeFloat(e,t)}static _top(e,t,r,n){let i;switch(t){case xe._alpha:i=n[r][e.redMaximum][e.greenMaximum][e.blueMaximum]-n[r][e.redMaximum][e.greenMinimum][e.blueMaximum]-n[r][e.redMinimum][e.greenMaximum][e.blueMaximum]+n[r][e.redMinimum][e.greenMinimum][e.blueMaximum]-(n[r][e.redMaximum][e.greenMaximum][e.blueMinimum]-n[r][e.redMaximum][e.greenMinimum][e.blueMinimum]-n[r][e.redMinimum][e.greenMaximum][e.blueMinimum]+n[r][e.redMinimum][e.greenMinimum][e.blueMinimum]);break;case xe._red:i=n[e.alphaMaximum][r][e.greenMaximum][e.blueMaximum]-n[e.alphaMaximum][r][e.greenMinimum][e.blueMaximum]-n[e.alphaMinimum][r][e.greenMaximum][e.blueMaximum]+n[e.alphaMinimum][r][e.greenMinimum][e.blueMaximum]-(n[e.alphaMaximum][r][e.greenMaximum][e.blueMinimum]-n[e.alphaMaximum][r][e.greenMinimum][e.blueMinimum]-n[e.alphaMinimum][r][e.greenMaximum][e.blueMinimum]+n[e.alphaMinimum][r][e.greenMinimum][e.blueMinimum]);break;case xe._green:i=n[e.alphaMaximum][e.redMaximum][r][e.blueMaximum]-n[e.alphaMaximum][e.redMinimum][r][e.blueMaximum]-n[e.alphaMinimum][e.redMaximum][r][e.blueMaximum]+n[e.alphaMinimum][e.redMinimum][r][e.blueMaximum]-(n[e.alphaMaximum][e.redMaximum][r][e.blueMinimum]-n[e.alphaMaximum][e.redMinimum][r][e.blueMinimum]-n[e.alphaMinimum][e.redMaximum][r][e.blueMinimum]+n[e.alphaMinimum][e.redMinimum][r][e.blueMinimum]);break;case xe._blue:i=n[e.alphaMaximum][e.redMaximum][e.greenMaximum][r]-n[e.alphaMaximum][e.redMaximum][e.greenMinimum][r]-n[e.alphaMaximum][e.redMinimum][e.greenMaximum][r]+n[e.alphaMaximum][e.redMinimum][e.greenMinimum][r]-(n[e.alphaMinimum][e.redMaximum][e.greenMaximum][r]-n[e.alphaMinimum][e.redMaximum][e.greenMinimum][r]-n[e.alphaMinimum][e.redMinimum][e.greenMaximum][r]+n[e.alphaMinimum][e.redMinimum][e.greenMinimum][r]);break;default:throw new Error(\"impossible\")}return 0|i}static _bottom(e,t,r){switch(t){case xe._alpha:return-r[e.alphaMinimum][e.redMaximum][e.greenMaximum][e.blueMaximum]+r[e.alphaMinimum][e.redMaximum][e.greenMinimum][e.blueMaximum]+r[e.alphaMinimum][e.redMinimum][e.greenMaximum][e.blueMaximum]-r[e.alphaMinimum][e.redMinimum][e.greenMinimum][e.blueMaximum]-(-r[e.alphaMinimum][e.redMaximum][e.greenMaximum][e.blueMinimum]+r[e.alphaMinimum][e.redMaximum][e.greenMinimum][e.blueMinimum]+r[e.alphaMinimum][e.redMinimum][e.greenMaximum][e.blueMinimum]-r[e.alphaMinimum][e.redMinimum][e.greenMinimum][e.blueMinimum]);case xe._red:return-r[e.alphaMaximum][e.redMinimum][e.greenMaximum][e.blueMaximum]+r[e.alphaMaximum][e.redMinimum][e.greenMinimum][e.blueMaximum]+r[e.alphaMinimum][e.redMinimum][e.greenMaximum][e.blueMaximum]-r[e.alphaMinimum][e.redMinimum][e.greenMinimum][e.blueMaximum]-(-r[e.alphaMaximum][e.redMinimum][e.greenMaximum][e.blueMinimum]+r[e.alphaMaximum][e.redMinimum][e.greenMinimum][e.blueMinimum]+r[e.alphaMinimum][e.redMinimum][e.greenMaximum][e.blueMinimum]-r[e.alphaMinimum][e.redMinimum][e.greenMinimum][e.blueMinimum]);case xe._green:return-r[e.alphaMaximum][e.redMaximum][e.greenMinimum][e.blueMaximum]+r[e.alphaMaximum][e.redMinimum][e.greenMinimum][e.blueMaximum]+r[e.alphaMinimum][e.redMaximum][e.greenMinimum][e.blueMaximum]-r[e.alphaMinimum][e.redMinimum][e.greenMinimum][e.blueMaximum]-(-r[e.alphaMaximum][e.redMaximum][e.greenMinimum][e.blueMinimum]+r[e.alphaMaximum][e.redMinimum][e.greenMinimum][e.blueMinimum]+r[e.alphaMinimum][e.redMaximum][e.greenMinimum][e.blueMinimum]-r[e.alphaMinimum][e.redMinimum][e.greenMinimum][e.blueMinimum]);case xe._blue:return-r[e.alphaMaximum][e.redMaximum][e.greenMaximum][e.blueMinimum]+r[e.alphaMaximum][e.redMaximum][e.greenMinimum][e.blueMinimum]+r[e.alphaMaximum][e.redMinimum][e.greenMaximum][e.blueMinimum]-r[e.alphaMaximum][e.redMinimum][e.greenMinimum][e.blueMinimum]-(-r[e.alphaMinimum][e.redMaximum][e.greenMaximum][e.blueMinimum]+r[e.alphaMinimum][e.redMaximum][e.greenMinimum][e.blueMinimum]+r[e.alphaMinimum][e.redMinimum][e.greenMaximum][e.blueMinimum]-r[e.alphaMinimum][e.redMinimum][e.greenMinimum][e.blueMinimum]);default:return 0}}_calculateVariance(e){const t=xe._volume(e,this._momentsRed),r=xe._volume(e,this._momentsGreen),n=xe._volume(e,this._momentsBlue),i=xe._volume(e,this._momentsAlpha);return xe._volumeFloat(e,this._moments)-(t*t+r*r+n*n+i*i)/xe._volume(e,this._weights)}_maximize(e,t,r,n,i,o,a,s,l){const u=0|xe._bottom(e,t,this._momentsRed),c=0|xe._bottom(e,t,this._momentsGreen),d=0|xe._bottom(e,t,this._momentsBlue),h=0|xe._bottom(e,t,this._momentsAlpha),f=0|xe._bottom(e,t,this._weights);let p=0,m=-1;for(let g=r;g__left_angle_mark_n;++g){let r=u+xe._top(e,t,g,this._momentsRed),n=c+xe._top(e,t,g,this._momentsGreen),_=d+xe._top(e,t,g,this._momentsBlue),b=h+xe._top(e,t,g,this._momentsAlpha),y=f+xe._top(e,t,g,this._weights);if(0!==y){let e=r*r+n*n+_*_+b*b,t=e/y;r=i-r,n=o-n,_=a-_,b=s-b,y=l-y,0!==y&&(e=r*r+n*n+_*_+b*b,t+=e/y,t>p&&(p=t,m=g))}}return{max:p,position:m}}_cut(e,t){let r;const n=xe._volume(e,this._momentsRed),i=xe._volume(e,this._momentsGreen),o=xe._volume(e,this._momentsBlue),a=xe._volume(e,this._momentsAlpha),s=xe._volume(e,this._weights),l=this._maximize(e,xe._red,e.redMinimum+1,e.redMaximum,n,i,o,a,s),u=this._maximize(e,xe._green,e.greenMinimum+1,e.greenMaximum,n,i,o,a,s),c=this._maximize(e,xe._blue,e.blueMinimum+1,e.blueMaximum,n,i,o,a,s),d=this._maximize(e,xe._alpha,e.alphaMinimum+1,e.alphaMaximum,n,i,o,a,s);if(d.max>=l.max&&d.max>=u.max&&d.max>=c.max){if(r=xe._alpha,d.position__left_angle_mark_0)return!1}else r=l.max>=d.max&&l.max>=u.max&&l.max>=c.max?xe._red:u.max>=d.max&&u.max>=l.max&&u.max>=c.max?xe._green:xe._blue;switch(t.redMaximum=e.redMaximum,t.greenMaximum=e.greenMaximum,t.blueMaximum=e.blueMaximum,t.alphaMaximum=e.alphaMaximum,r){case xe._red:t.redMinimum=e.redMaximum=l.position,t.greenMinimum=e.greenMinimum,t.blueMinimum=e.blueMinimum,t.alphaMinimum=e.alphaMinimum;break;case xe._green:t.greenMinimum=e.greenMaximum=u.position,t.redMinimum=e.redMinimum,t.blueMinimum=e.blueMinimum,t.alphaMinimum=e.alphaMinimum;break;case xe._blue:t.blueMinimum=e.blueMaximum=c.position,t.redMinimum=e.redMinimum,t.greenMinimum=e.greenMinimum,t.alphaMinimum=e.alphaMinimum;break;case xe._alpha:t.alphaMinimum=e.alphaMaximum=d.position,t.blueMinimum=e.blueMinimum,t.redMinimum=e.redMinimum,t.greenMinimum=e.greenMinimum}return e.volume=(e.redMaximum-e.redMinimum)*(e.greenMaximum-e.greenMinimum)*(e.blueMaximum-e.blueMinimum)*(e.alphaMaximum-e.alphaMinimum),t.volume=(t.redMaximum-t.redMinimum)*(t.greenMaximum-t.greenMinimum)*(t.blueMaximum-t.blueMinimum)*(t.alphaMaximum-t.alphaMinimum),!0}_initialize(e){this._colors=e,this._cubes=[];for(let t=0;t__left_angle_mark_e;t++)this._cubes[t]=new Ee;this._cubes[0].redMinimum=0,this._cubes[0].greenMinimum=0,this._cubes[0].blueMinimum=0,this._cubes[0].alphaMinimum=0,this._cubes[0].redMaximum=this._maxSideIndex,this._cubes[0].greenMaximum=this._maxSideIndex,this._cubes[0].blueMaximum=this._maxSideIndex,this._cubes[0].alphaMaximum=this._alphaMaxSideIndex,this._weights=ve(this._alphaSideSize,this._sideSize,this._sideSize,this._sideSize),this._momentsRed=ve(this._alphaSideSize,this._sideSize,this._sideSize,this._sideSize),this._momentsGreen=ve(this._alphaSideSize,this._sideSize,this._sideSize,this._sideSize),this._momentsBlue=ve(this._alphaSideSize,this._sideSize,this._sideSize,this._sideSize),this._momentsAlpha=ve(this._alphaSideSize,this._sideSize,this._sideSize,this._sideSize),this._moments=ve(this._alphaSideSize,this._sideSize,this._sideSize,this._sideSize),this._table=[];for(let t=0;t__left_angle_mark_256;++t)this._table[t]=t*t;this._pixels=[]}_setQuality(e=5){this._significantBitsPerChannel=e,this._maxSideIndex=1__left_angle_mark___left_angle_mark_this._significantBitsPerChannel,this._alphaMaxSideIndex=this._maxSideIndex,this._sideSize=this._maxSideIndex+1,this._alphaSideSize=this._alphaMaxSideIndex+1}constructor(e,t=256,r=5){super(),l(this,\"_reds\"),l(this,\"_greens\"),l(this,\"_blues\"),l(this,\"_alphas\"),l(this,\"_sums\"),l(this,\"_weights\"),l(this,\"_momentsRed\"),l(this,\"_momentsGreen\"),l(this,\"_momentsBlue\"),l(this,\"_momentsAlpha\"),l(this,\"_moments\"),l(this,\"_table\"),l(this,\"_pixels\"),l(this,\"_cubes\"),l(this,\"_colors\"),l(this,\"_significantBitsPerChannel\"),l(this,\"_maxSideIndex\"),l(this,\"_alphaMaxSideIndex\"),l(this,\"_sideSize\"),l(this,\"_alphaSideSize\"),l(this,\"_distance\"),this._distance=e,this._setQuality(r),this._initialize(t)}},Ce=xe;l(Ce,\"_alpha\",3),l(Ce,\"_red\",2),l(Ce,\"_green\",1),l(Ce,\"_blue\",0);var Te={};a(Te,{AbstractImageQuantizer:()=>Re,ErrorDiffusionArray:()=>Pe,ErrorDiffusionArrayKernel:()=>ke,ErrorDiffusionRiemersma:()=>Ne,NearestColor:()=>Ie});var Re=class{quantizeSync(e,t){for(const r of this.quantize(e,t))if(r.pointContainer)return r.pointContainer;throw new Error(\"unreachable\")}},Ie=class extends Re{*quantize(e,t){const r=e.getPointArray(),n=e.getWidth(),i=e.getHeight(),o=new le(i,99);for(let a=0;a__left_angle_mark_i;a++){o.shouldNotify(a)&&(yield{progress:o.progress});for(let e=0,i=a*n;e__left_angle_mark_n;e++,i++){const e=r[i];e.from(t.getNearestColor(this._distance,e))}}yield{pointContainer:e,progress:100}}constructor(e){super(),l(this,\"_distance\"),this._distance=e}},ke=(e=>(e[e.FloydSteinberg=0]=\"FloydSteinberg\",e[e.FalseFloydSteinberg=1]=\"FalseFloydSteinberg\",e[e.Stucki=2]=\"Stucki\",e[e.Atkinson=3]=\"Atkinson\",e[e.Jarvis=4]=\"Jarvis\",e[e.Burkes=5]=\"Burkes\",e[e.Sierra=6]=\"Sierra\",e[e.TwoSierra=7]=\"TwoSierra\",e[e.SierraLite=8]=\"SierraLite\",e))(ke||{}),Pe=class extends Re{*quantize(e,t){const r=e.getPointArray(),n=new ee,i=e.getWidth(),o=e.getHeight(),a=[];let s=1,l=1;for(const c of this._kernel){const e=c[2]+1;l__left_angle_mark_e&&(l=e)}for(let c=0;c__left_angle_mark_l;c++)this._fillErrorLine(a[c]=[],i);const u=new le(o,99);for(let c=0;c__left_angle_mark_o;c++){u.shouldNotify(c)&&(yield{progress:u.progress}),this._serpentine&&(s*=-1);const e=c*i,l=1===s?0:i-1,d=1===s?i:-1;this._fillErrorLine(a[0],i),a.push(a.shift());const h=a[0];for(let u=l,f=e+l;u!==d;u+=s,f+=s){const e=r[f],l=h[u];n.from(e);const d=ee.createByRGBA(S(e.r+l[0]),S(e.g+l[1]),S(e.b+l[2]),S(e.a+l[3])),p=t.getNearestColor(this._distance,d);if(e.from(p),this._minColorDistance&&this._distance.calculateNormalized(n,p)__left_angle_mark_this._minColorDistance)continue;let m,g,_,b;this._calculateErrorLikeGIMP?(m=d.r-p.r,g=d.g-p.g,_=d.b-p.b,b=d.a-p.a):(m=n.r-p.r,g=n.g-p.g,_=n.b-p.b,b=n.a-p.a);const y=1===s?0:this._kernel.length-1,v=1===s?this._kernel.length:-1;for(let t=y;t!==v;t+=s){const e=this._kernel[t][1]*s,r=this._kernel[t][2];if(e+u>=0&&e+u__left_angle_mark_i&&r+c>=0&&r+c__left_angle_mark_o){const n=this._kernel[t][0],i=a[r][e+u];i[0]+=m*n,i[1]+=g*n,i[2]+=_*n,i[3]+=b*n}}}}yield{pointContainer:e,progress:100}}_fillErrorLine(e,t){e.length>t&&(e.length=t);const r=e.length;for(let n=0;n__left_angle_mark_r;n++){const t=e[n];t[0]=t[1]=t[2]=t[3]=0}for(let n=r;n__left_angle_mark_t;n++)e[n]=[0,0,0,0]}_setKernel(e){switch(e){case 0:this._kernel=[[7/16,1,0],[3/16,-1,1],[5/16,0,1],[1/16,1,1]];break;case 1:this._kernel=[[3/8,1,0],[3/8,0,1],[2/8,1,1]];break;case 2:this._kernel=[[8/42,1,0],[4/42,2,0],[2/42,-2,1],[4/42,-1,1],[8/42,0,1],[4/42,1,1],[2/42,2,1],[1/42,-2,2],[2/42,-1,2],[4/42,0,2],[2/42,1,2],[1/42,2,2]];break;case 3:this._kernel=[[1/8,1,0],[1/8,2,0],[1/8,-1,1],[1/8,0,1],[1/8,1,1],[1/8,0,2]];break;case 4:this._kernel=[[7/48,1,0],[5/48,2,0],[3/48,-2,1],[5/48,-1,1],[7/48,0,1],[5/48,1,1],[3/48,2,1],[1/48,-2,2],[3/48,-1,2],[5/48,0,2],[3/48,1,2],[1/48,2,2]];break;case 5:this._kernel=[[.25,1,0],[4/32,2,0],[2/32,-2,1],[4/32,-1,1],[.25,0,1],[4/32,1,1],[2/32,2,1]];break;case 6:this._kernel=[[5/32,1,0],[3/32,2,0],[2/32,-2,1],[4/32,-1,1],[5/32,0,1],[4/32,1,1],[2/32,2,1],[2/32,-1,2],[3/32,0,2],[2/32,1,2]];break;case 7:this._kernel=[[.25,1,0],[3/16,2,0],[1/16,-2,1],[2/16,-1,1],[3/16,0,1],[2/16,1,1],[1/16,2,1]];break;case 8:this._kernel=[[.5,1,0],[1/4,-1,1],[1/4,0,1]];break;default:throw new Error(`ErrorDiffusionArray: unknown kernel = ${e}`)}}constructor(e,t,r=!0,n=0,i=!1){super(),l(this,\"_minColorDistance\"),l(this,\"_serpentine\"),l(this,\"_kernel\"),l(this,\"_calculateErrorLikeGIMP\"),l(this,\"_distance\"),this._setKernel(t),this._distance=e,this._minColorDistance=n,this._serpentine=r,this._calculateErrorLikeGIMP=i}};function*Me(e,t,r){const n=Math.max(e,t),i={width:e,height:t,level:Math.floor(Math.log(n)/Math.log(2)+1),callback:r,tracker:new le(e*t,99),index:0,x:0,y:0};yield*Oe(i,1),Be(i,0)}function*Oe(e,t){if(!(e.level__left_angle_mark_1)){switch(e.tracker.shouldNotify(e.index)&&(yield{progress:e.tracker.progress}),e.level--,t){case 2:yield*Oe(e,1),Be(e,3),yield*Oe(e,2),Be(e,4),yield*Oe(e,2),Be(e,2),yield*Oe(e,4);break;case 3:yield*Oe(e,4),Be(e,2),yield*Oe(e,3),Be(e,1),yield*Oe(e,3),Be(e,3),yield*Oe(e,1);break;case 1:yield*Oe(e,2),Be(e,4),yield*Oe(e,1),Be(e,3),yield*Oe(e,1),Be(e,1),yield*Oe(e,3);break;case 4:yield*Oe(e,3),Be(e,1),yield*Oe(e,4),Be(e,2),yield*Oe(e,4),Be(e,4),yield*Oe(e,2)}e.level++}}function Be(e,t){switch(e.x>=0&&e.x__left_angle_mark_e.width&&e.y>=0&&e.y__left_angle_mark_e.height&&(e.callback(e.x,e.y),e.index++),t){case 2:e.x--;break;case 3:e.x++;break;case 1:e.y--;break;case 4:e.y++}}var Ne=class extends Re{*quantize(e,t){const r=e.getPointArray(),n=e.getWidth(),i=e.getHeight(),o=[];let a=0;for(let s=0;s__left_angle_mark_this._errorQueueSize;s++)o[s]={r:0,g:0,b:0,a:0};yield*Me(n,i,((e,i)=>{const s=r[e+i*n];let{r:l,g:u,b:c,a:d}=s;for(let t=0;t__left_angle_mark_this._errorQueueSize;t++){const e=this._weights[t],r=o[(t+a)%this._errorQueueSize];l+=r.r*e,u+=r.g*e,c+=r.b*e,d+=r.a*e}const h=ee.createByRGBA(S(l),S(u),S(c),S(d)),f=t.getNearestColor(this._distance,h);a=(a+1)%this._errorQueueSize;const p=(a+this._errorQueueSize-1)%this._errorQueueSize;o[p].r=s.r-f.r,o[p].g=s.g-f.g,o[p].b=s.b-f.b,o[p].a=s.a-f.a,s.from(f)})),yield{pointContainer:e,progress:100}}static _createWeights(e,t){const r=[],n=Math.exp(Math.log(t)/(t-1));for(let i=0,o=1;i__left_angle_mark_t;i++)r[i]=(o+.5|0)/t*e,o*=n;return r}constructor(e,t=16,r=1){super(),l(this,\"_distance\"),l(this,\"_weights\"),l(this,\"_errorQueueSize\"),this._distance=e,this._errorQueueSize=t,this._weights=Ne._createWeights(r,t)}},je={};function Le(e,t){if(e.getHeight()!==t.getHeight()||e.getWidth()!==t.getWidth())throw new Error(\"Images have different sizes!\");const r=(.01*255)**2,n=(.03*255)**2;let i=0,o=0;return function(e,t,r){const n=8,i=e.getWidth(),o=e.getHeight();for(let a=0;a__left_angle_mark_o;a+=n)for(let s=0;s__left_angle_mark_i;s+=n){const l=Math.min(n,i-s),u=Math.min(n,o-a),c=De(e,s,a,l,u),d=De(t,s,a,l,u);r(c,d,Fe(c),Fe(d))}}(e,t,((e,t,a,s)=>{let l=0,u=0,c=0;for(let r=0;r__left_angle_mark_e.length;r++)u+=(e[r]-a)**2,c+=(t[r]-s)**2,l+=(e[r]-a)*(t[r]-s);const d=e.length-1;u/=d,c/=d,l/=d,o+=(2*a*s+r)*(2*l+n)/((a**2+s**2+r)*(u+c+n)),i++})),o/i}function De(e,t,r,n,i){const o=e.getPointArray(),a=[];let s=0;for(let l=r;l__left_angle_mark_r+i;l++){const r=l*e.getWidth();for(let e=t;e__left_angle_mark_t+n;e++){const t=o[r+e];a[s]=.2126*t.r+.7152*t.g+.0722*t.b,s++}}return a}function Fe(e){let t=0;for(const r of e)t+=r;return t/e.length}a(je,{ssim:()=>Le});var Ue=\"function\"==typeof setImmediate?setImmediate:void 0!==import_browser.default&&\"function\"==typeof(null==import_browser.default?void 0:import_browser.default.nextTick)?e=>import_browser.default.nextTick(e):e=>setTimeout(e,0);function ze(e,{colorDistanceFormula:t,paletteQuantization:r,colors:n}={}){const i=$e(We(t),r,n);return e.forEach((e=>i.sample(e))),i.quantizeSync()}async function qe(e,{colorDistanceFormula:t,paletteQuantization:r,colors:n,onProgress:i}={}){return new Promise(((o,a)=>{const s=$e(We(t),r,n);let l;e.forEach((e=>s.sample(e)));const u=s.quantize(),c=()=>{try{const e=u.next();e.done?o(l):(e.value.palette&&(l=e.value.palette),i&&i(e.value.progress),Ue(c))}catch(e){a(e)}};Ue(c)}))}function Ge(e,t,{colorDistanceFormula:r,imageQuantization:n}={}){return Ve(We(r),n).quantizeSync(e,t)}async function He(e,t,{colorDistanceFormula:r,imageQuantization:n,onProgress:i}={}){return new Promise(((o,a)=>{let s;const l=Ve(We(r),n).quantize(e,t),u=()=>{try{const e=l.next();e.done?o(s):(e.value.pointContainer&&(s=e.value.pointContainer),i&&i(e.value.progress),Ue(u))}catch(e){a(e)}};Ue(u)}))}function We(e=\"euclidean-bt709\"){switch(e){case\"cie94-graphic-arts\":return new F;case\"cie94-textiles\":return new D;case\"ciede2000\":return new z;case\"color-metric\":return new q;case\"euclidean\":return new H;case\"euclidean-bt709\":return new W;case\"euclidean-bt709-noalpha\":return new V;case\"manhattan\":return new K;case\"manhattan-bt709\":return new Y;case\"manhattan-nommyde\":return new X;case\"pngquant\":return new J;default:throw new Error(`Unknown colorDistanceFormula ${e}`)}}function Ve(e,t=\"floyd-steinberg\"){switch(t){case\"nearest\":return new Ie(e);case\"riemersma\":return new Ne(e);case\"floyd-steinberg\":return new Pe(e,0);case\"false-floyd-steinberg\":return new Pe(e,1);case\"stucki\":return new Pe(e,2);case\"atkinson\":return new Pe(e,3);case\"jarvis\":return new Pe(e,4);case\"burkes\":return new Pe(e,5);case\"sierra\":return new Pe(e,6);case\"two-sierra\":return new Pe(e,7);case\"sierra-lite\":return new Pe(e,8);default:throw new Error(`Unknown imageQuantization ${t}`)}}function $e(e,t=\"wuquant\",r=256){switch(t){case\"neuquant\":return new de(e,r);case\"rgbquant\":return new be(e,r);case\"wuquant\":return new Ce(e,r);case\"neuquant-float\":return new pe(e,r);default:throw new Error(`Unknown paletteQuantization ${t}`)}}t.exports=s(u)}}),require_gifframe=__commonJS({\"../../node_modules/.pnpm/gifwrap@0.10.1/node_modules/gifwrap/src/gifframe.js\"(e){init_globals();var t=require_bitmapimage(),{GifError:r}=require_gif(),n=class e extends t{getPalette(){const e=new Set,t=this.bitmap.data;let r=0,n=!1;for(;r__left_angle_mark_t.length;){if(0===t[r+3])n=!0;else{const n=t.readUInt32BE(r,!0)>>8&16777215;e.add(n)}r+=4}const i=new Array(e.size),o=e.values();for(r=0;r__left_angle_mark_i.length;++r)i[r]=o.next().value;i.sort(((e,t)=>e-t));let a=i.length;return n&&++a,{colors:i,usesTransparency:n,indexCount:a}}constructor(...r){if(super(...r),r[0]instanceof e){const e=r[0];this.xOffset=e.xOffset,this.yOffset=e.yOffset,this.disposalMethod=e.disposalMethod,this.delayCentisecs=e.delayCentisecs,this.interlaced=e.interlaced}else{const n=r[r.length-1];let i={};\"object\"!=typeof n||n instanceof t||(i=n),this.xOffset=i.xOffset||0,this.yOffset=i.yOffset||0,this.disposalMethod=void 0!==i.disposalMethod?i.disposalMethod:e.DisposeToBackgroundColor,this.delayCentisecs=i.delayCentisecs||8,this.interlaced=i.interlaced||!1}}};n.DisposeToAnything=0,n.DisposeNothing=1,n.DisposeToBackgroundColor=2,n.DisposeToPrevious=3,e.GifFrame=n}}),require_gifutil=__commonJS({\"../../node_modules/.pnpm/gifwrap@0.10.1/node_modules/gifwrap/src/gifutil.js\"(e){init_globals();var t=require_fs(),r=require_image_q(),n=require_bitmapimage(),{GifFrame:i}=require_gifframe(),{GifError:o}=require_gif(),{GifCodec:a}=require_gifcodec(),s=[\".jpg\",\".jpeg\",\".png\",\".bmp\"],l=new a;function u(e,t,n,i,o){const a=Array.isArray(e)?e:[e];if(o){if([\"FloydSteinberg\",\"FalseFloydSteinberg\",\"Stucki\",\"Atkinson\",\"Jarvis\",\"Burkes\",\"Sierra\",\"TwoSierra\",\"SierraLite\"].indexOf(o.ditherAlgorithm)__left_angle_mark_0)throw new Error(`Invalid ditherAlgorithm '${o.ditherAlgorithm}'`);void 0===o.serpentine&&(o.serpentine=!0),void 0===o.minimumColorDistanceToDither&&(o.minimumColorDistanceToDither=0),void 0===o.calculateErrorLikeGIMP&&(o.calculateErrorLikeGIMP=!1)}const s=new r.distance.Euclidean,l=new r.palette[t](s,n,i);let u;u=o?new r.image.ErrorDiffusionArray(s,r.image.ErrorDiffusionArrayKernel[o.ditherAlgorithm],o.serpentine,o.minimumColorDistanceToDither,o.calculateErrorLikeGIMP):new r.image.NearestColor(s);const c=[];a.forEach((e=>{const t=e.bitmap.data,n=new ArrayBuffer(t.length),i=new Uint32Array(n);for(let r=0,a=0;r__left_angle_mark_t.length;r+=4,++a)i[a]=t.readUInt32LE(r,!0);const o=r.utils.PointContainer.fromUint32Array(i,e.bitmap.width,e.bitmap.height);l.sample(o),c.push(o)}));const d=l.quantizeSync();for(let r=0;r__left_angle_mark_a.length;++r){const e=a[r].bitmap.data,t=u.quantizeSync(c[r],d).toUint32Array();for(let r=0,n=0;r__left_angle_mark_e.length;r+=4,++n)e.writeUInt32LE(t[n],r)}}e.cloneFrames=function(e){let t=[];return e.forEach((e=>{t.push(new i(e))})),t},e.getColorInfo=function(e,t){let r=!1;const n=[];for(let u=0;u__left_angle_mark_e.length;++u){let t=e[u].getPalette();if(t.usesTransparency&&(r=!0),t.indexCount>256)throw new o(`Frame ${u} uses more than 256 color indexes`);n.push(t)}if(0===t)return{usesTransparency:r,palettes:n};const i=new Set;n.forEach((e=>{e.colors.forEach((e=>{i.add(e)}))}));let a=i.size;if(r&&++a,t&&a>t)return{usesTransparency:r,palettes:n};const s=new Array(i.size),l=i.values();for(let o=0;o__left_angle_mark_s.length;++o)s[o]=l.next().value;return s.sort(((e,t)=>e-t)),{colors:s,indexCount:a,usesTransparency:r,palettes:n}},e.copyAsJimp=function(t,r){return e.shareAsJimp(t,new n(r))},e.getMaxDimensions=function(e){let t=0,r=0;return e.forEach((e=>{const n=e.xOffset+e.bitmap.width;n>t&&(t=n);const i=e.yOffset+e.bitmap.height;i>r&&(r=i)})),{maxWidth:t,maxHeight:r}},e.quantizeDekker=function(e,t,r){u(e,\"NeuQuantFloat\",t=t||256,0,r)},e.quantizeSorokin=function(e,t,r,n){let i;switch(t=t||256,r=r||\"min-pop\"){case\"min-pop\":i=2;break;case\"top-pop\":i=1;break;default:throw new Error(`Invalid quantizeSorokin histogram '${r}'`)}u(e,\"RGBQuant\",t,i,n)},e.quantizeWu=function(e,t,r,n){if(t=t||256,(r=r||5)__left_angle_mark_1||r>8)throw new Error(\"Invalid quantization quality\");u(e,\"WuQuant\",t,r,n)},e.read=function(e,r){return r=r||l,Buffer.isBuffer(e)?r.decodeGif(e):(n=e,new Promise(((e,r)=>{t.readFile(n,((t,n)=>t?r(t):e(n)))}))).then((e=>r.decodeGif(e)));var n},e.shareAsJimp=function(e,t){const r=new e(t.bitmap.width,t.bitmap.height,0);return r.bitmap.data=t.bitmap.data,r},e.write=function(e,r,n,i){i=i||l;const o=e.match(/\\.[a-zA-Z]+$/);if(null!==o&&s.includes(o[0].toLowerCase()))throw new Error(`GIF '${e}' has an unexpected suffix`);return i.encodeGif(r,n).then((r=>function(e,r){return new Promise(((n,i)=>{t.writeFile(e,r,(e=>e?i(e):n()))}))}(e,r.buffer).then((()=>r))))}}}),require_gifcodec=__commonJS({\"../../node_modules/.pnpm/gifwrap@0.10.1/node_modules/gifwrap/src/gifcodec.js\"(e){init_globals();var t=require_omggif(),{Gif:r,GifError:n}=require_gif();function i(){const e=require_gifutil();return i=function(){return e},e}var{GifFrame:o}=require_gifframe();function a(e,t){const r=e.indexOf(t);return-1===r?null:r}function s(e,t){for(var r,n=0,i=e.length-1;n__left_angle_mark_=i;)if(e[r=Math.floor((n+i)/2)]>t)i=r-1;else{if(!(e[r]__left_angle_mark_t))return r;n=r+1}return null}function l(e){const t=e.colors;e.usesTransparency&&t.push(0);const r=t.length;let n=2;for(;r>n;)n__left_angle_mark___left_angle_mark_=1;t.length=n,t.fill(0,r)}function u(e,t){let r=e.bitmap.width*e.bitmap.height;return r=Math.ceil(r*t/8),r+=Math.ceil(r/255),100+r+768}function c(e){let t=e.indexCount,r=0;for(--t;t;)++r,t>>=1;return r>0?r:1}function d(e,t,r,i,o){if(r.interlaced)throw new n(\"writing interlaced GIFs is not supported\");const u=function(e,t,r){const i=r.colors,o=i.length__left_angle_mark_=8?a:s,l=t.bitmap.data,u=new Buffer(l.length/4);let c=i.length,d=0,h=0;for(;d__left_angle_mark_l.length;){if(0!==l[d+3]){const e=l.readUInt32BE(d,!0)>>8&16777215;u[h]=o(i,e)}else u[h]=c;d+=4,++h}if(r.usesTransparency){if(256===c)throw new n(`Frame ${e} already has 256 colorsand so can't use transparency`)}else c=null;return{buffer:u,transparentIndex:c}}(t,r,i),c={delay:r.delayCentisecs,disposal:r.disposalMethod,transparent:u.transparentIndex};o&&(l(i),c.palette=i.colors);try{let t,n=e.getOutputBuffer(),i=e.getOutputBufferPosition(),o=!0;for(;o;)if(t=e.addFrame(r.xOffset,r.yOffset,r.bitmap.width,r.bitmap.height,u.buffer,c),o=!1,t>=n.length-1){const t=new Buffer(1.5*n.length);n.copy(t),e.setOutputBuffer(t),e.setOutputBufferPosition(i),n=t,o=!0}return n}catch(d){throw new n(d)}}e.GifCodec=class{decodeGif(e){try{let o;try{o=new t.GifReader(e)}catch(i){throw new n(i)}const a=o.numFrames(),s=[],l={width:o.width,height:o.height,loops:o.loopCount(),usesTransparency:!1};for(let e=0;e__left_angle_mark_a;++e){const t=this._decodeFrame(o,e,l.usesTransparency);s.push(t.frame),t.usesTransparency&&(l.usesTransparency=!0)}return Promise.resolve(new r(e,s,l))}catch(i){return Promise.reject(i)}}encodeGif(e,t={}){try{if(null===e||0===e.length)throw new n(\"there are no frames\");const o=i().getMaxDimensions(e);return(t=Object.assign({},t)).width=o.maxWidth,t.height=o.maxHeight,void 0===t.loops&&(t.loops=0),t.colorScope=t.colorScope||r.GlobalColorsPreferred,Promise.resolve(this._encodeGif(e,t))}catch(o){return Promise.reject(o)}}_decodeFrame(e,t,r){let i,a;try{if(i=e.frameInfo(t),a=new Buffer(e.width*e.height*4),e.decodeAndBlitFrameRGBA(t,a),i.width!==e.width||i.height!==e.height){if(i.y&&(a=a.slice(i.y*e.width*4)),e.width>i.width)for(let t=0;t__left_angle_mark_i.height;++t)a.copy(a,t*i.width*4,4*(i.x+t*e.width),4*(i.x+t*e.width)+4*i.width);a=a.slice(0,i.width*i.height*4)}}catch(l){throw new n(l)}let s=!1;if(null===this._transparentRGBA){if(!r)for(let n=3;n__left_angle_mark_a.length;n+=4)0===a[n]&&(s=!0,n=a.length)}else for(let n=3;n__left_angle_mark_a.length;n+=4)0===a[n]&&(a.writeUInt32BE(this._transparentRGBA,n-3),s=!0);return{frame:new o(i.width,i.height,a,{xOffset:i.x,yOffset:i.y,disposalMethod:i.disposal,interlaced:i.interlaced,delayCentisecs:i.delay}),usesTransparency:s}}_encodeGif(e,o){let a;if(o.colorScope===r.LocalColorsOnly)a=i().getColorInfo(e,0);else if(a=i().getColorInfo(e,256),!a.colors){if(o.colorScope===r.GlobalColorsOnly)throw new n(\"Too many color indexes for global color table\");o.colorScope=r.LocalColorsOnly}o.usesTransparency=a.usesTransparency;const s=a.palettes;return o.colorScope===r.LocalColorsOnly?function(e,i,o,a){const s={loop:i.loops};let l,u=new Buffer(o);try{l=new t.GifWriter(u,i.width,i.height,s)}catch(c){throw new n(c)}for(let t=0;t__left_angle_mark_e.length;++t)u=d(l,t,e[t],a[t],!0);return new r(u.slice(0,l.end()),e,i)}(e,o,2e3,s):function(e,i,o,a){const s={colors:a.colors.slice(),usesTransparency:a.usesTransparency};l(s);const u={palette:s.colors,loop:i.loops};let c,h=new Buffer(o);try{c=new t.GifWriter(h,i.width,i.height,u)}catch(f){throw new n(f)}for(let t=0;t__left_angle_mark_e.length;++t)h=d(c,t,e[t],a,!1);return new r(h.slice(0,c.end()),e,i)}(e,o,2e3,a)}_getSizeEstimateGlobal(e,t){if(this._testInitialBufferSize>0)return this._testInitialBufferSize;let r=968;const n=c(e);return t.forEach((e=>{r+=u(e,n)})),r}_getSizeEstimateLocal(e,t){if(this._testInitialBufferSize>0)return this._testInitialBufferSize;let r=200;for(let n=0;n__left_angle_mark_t.length;++n){const i=c(e[n]);r+=u(t[n],i)}return r}constructor(e={}){this._transparentRGB=null,\"number\"==typeof e.transparentRGB&&0!==e.transparentRGB&&(this._transparentRGBA=256*e.transparentRGB),this._testInitialBufferSize=0}}}}),require_src=__commonJS({\"../../node_modules/.pnpm/gifwrap@0.10.1/node_modules/gifwrap/src/index.js\"(e,t){init_globals();var r=require_bitmapimage(),{Gif:n,GifError:i}=require_gif(),{GifCodec:o}=require_gifcodec(),{GifFrame:a}=require_gifframe(),s=require_gifutil();t.exports={BitmapImage:r,Gif:n,GifCodec:o,GifFrame:a,GifUtil:s,GifError:i}}}),import_omggif,import_gifwrap,MIME_TYPE5,es_default23,init_es8=__esm({\"../../node_modules/.pnpm/@jimp+gif@0.22.12_@jimp+custom@0.22.12/node_modules/@jimp/gif/es/index.js\"(){init_globals(),import_omggif=__toESM(require_omggif()),import_gifwrap=__toESM(require_src()),MIME_TYPE5=\"image/gif\",es_default23=()=>({mime:{[MIME_TYPE5]:[\"gif\"]},constants:{MIME_GIF:MIME_TYPE5},decoders:{[MIME_TYPE5]:e=>{const t=new import_omggif.default.GifReader(e),r=Buffer.alloc(t.width*t.height*4);return t.decodeAndBlitFrameRGBA(0,r),{data:r,width:t.width,height:t.height}}},encoders:{[MIME_TYPE5]:e=>{const t=new import_gifwrap.BitmapImage(e.bitmap);import_gifwrap.GifUtil.quantizeDekker(t,256);const r=new import_gifwrap.GifFrame(t);return(new import_gifwrap.GifCodec).encodeGif([r],{}).then((e=>e.buffer))}}})}}),import_timm,es_default24,init_es9=__esm({\"../../node_modules/.pnpm/@jimp+types@0.22.12_@jimp+custom@0.22.12/node_modules/@jimp/types/es/index.js\"(){init_globals(),import_timm=__toESM(require_timm()),init_es4(),init_es5(),init_es6(),init_es7(),init_es8(),es_default24=()=>(0,import_timm.mergeDeep)(es_default19(),es_default20(),es_default21(),es_default22(),es_default23())}}),es_default25,init_es10=__esm({\"../../node_modules/.pnpm/@jimp+plugin-blit@0.22.12_@jimp+custom@0.22.12/node_modules/@jimp/plugin-blit/es/index.js\"(){init_globals(),init_es(),es_default25=()=>({blit(e,t,r,n,i,o,a,s){if(!(e instanceof this.constructor))return throwError.call(this,\"The source must be a Jimp image\",s);if(\"number\"!=typeof t||\"number\"!=typeof r)return throwError.call(this,\"x and y must be numbers\",s);if(\"function\"==typeof n)s=n,n=0,i=0,o=e.bitmap.width,a=e.bitmap.height;else{if(typeof n!=typeof i||typeof i!=typeof o||typeof o!=typeof a)return throwError.call(this,\"srcx, srcy, srcw, srch must be numbers\",s);n=n||0,i=i||0,o=o||e.bitmap.width,a=a||e.bitmap.height}t=Math.round(t),r=Math.round(r),n=Math.round(n),i=Math.round(i),o=Math.round(o),a=Math.round(a);const l=this.bitmap.width,u=this.bitmap.height,c=this;return e.scanQuiet(n,i,o,a,(function(e,o,a){const s=t+e-n,d=r+o-i;if(s>=0&&d>=0&&l-s>0&&u-d>0){const e=c.getPixelIndex(s,d),t={r:this.bitmap.data[a],g:this.bitmap.data[a+1],b:this.bitmap.data[a+2],a:this.bitmap.data[a+3]},r={r:c.bitmap.data[e],g:c.bitmap.data[e+1],b:c.bitmap.data[e+2],a:c.bitmap.data[e+3]};c.bitmap.data[e]=(t.a*(t.r-r.r)-r.r+255>>8)+r.r,c.bitmap.data[e+1]=(t.a*(t.g-r.g)-r.g+255>>8)+r.g,c.bitmap.data[e+2]=(t.a*(t.b-r.b)-r.b+255>>8)+r.b,c.bitmap.data[e+3]=this.constructor.limit255(r.a+t.a)}})),isNodePattern(s)&&s.call(this,null,this),this}})}}),mulTable,shgTable,init_blur_tables=__esm({\"../../node_modules/.pnpm/@jimp+plugin-blur@0.22.12_@jimp+custom@0.22.12/node_modules/@jimp/plugin-blur/es/blur-tables.js\"(){init_globals(),mulTable=[1,57,41,21,203,34,97,73,227,91,149,62,105,45,39,137,241,107,3,173,39,71,65,238,219,101,187,87,81,151,141,133,249,117,221,209,197,187,177,169,5,153,73,139,133,127,243,233,223,107,103,99,191,23,177,171,165,159,77,149,9,139,135,131,253,245,119,231,224,109,211,103,25,195,189,23,45,175,171,83,81,79,155,151,147,9,141,137,67,131,129,251,123,30,235,115,113,221,217,53,13,51,50,49,193,189,185,91,179,175,43,169,83,163,5,79,155,19,75,147,145,143,35,69,17,67,33,65,255,251,247,243,239,59,29,229,113,111,219,27,213,105,207,51,201,199,49,193,191,47,93,183,181,179,11,87,43,85,167,165,163,161,159,157,155,77,19,75,37,73,145,143,141,35,138,137,135,67,33,131,129,255,63,250,247,61,121,239,237,117,29,229,227,225,111,55,109,216,213,211,209,207,205,203,201,199,197,195,193,48,190,47,93,185,183,181,179,178,176,175,173,171,85,21,167,165,41,163,161,5,79,157,78,154,153,19,75,149,74,147,73,144,143,71,141,140,139,137,17,135,134,133,66,131,65,129,1],shgTable=[0,9,10,10,14,12,14,14,16,15,16,15,16,15,15,17,18,17,12,18,16,17,17,19,19,18,19,18,18,19,19,19,20,19,20,20,20,20,20,20,15,20,19,20,20,20,21,21,21,20,20,20,21,18,21,21,21,21,20,21,17,21,21,21,22,22,21,22,22,21,22,21,19,22,22,19,20,22,22,21,21,21,22,22,22,18,22,22,21,22,22,23,22,20,23,22,22,23,23,21,19,21,21,21,23,23,23,22,23,23,21,23,22,23,18,22,23,20,22,23,23,23,21,22,20,22,21,22,24,24,24,24,24,22,21,24,23,23,24,21,24,23,24,22,24,24,22,24,24,22,23,24,24,24,20,23,22,23,24,24,24,24,24,24,24,23,21,23,22,23,24,24,24,22,24,24,24,23,22,24,24,25,23,25,25,23,24,25,25,24,22,25,25,25,24,23,24,25,25,25,25,25,25,25,25,25,25,25,25,23,25,23,24,25,25,25,25,25,25,25,25,25,24,22,25,25,23,25,25,20,24,25,24,25,25,22,24,25,24,25,24,25,25,24,25,25,25,25,22,25,25,25,24,25,24,25,18]}}),es_default26,init_es11=__esm({\"../../node_modules/.pnpm/@jimp+plugin-blur@0.22.12_@jimp+custom@0.22.12/node_modules/@jimp/plugin-blur/es/index.js\"(){init_globals(),init_es(),init_blur_tables(),es_default26=()=>({blur(e,t){if(\"number\"!=typeof e)return throwError.call(this,\"r must be a number\",t);if(e__left_angle_mark_1)return throwError.call(this,\"r must be greater than 0\",t);let r,n,i,o,a,s,l,u,c,d,h,f,p,m;const g=this.bitmap.width-1,_=this.bitmap.height-1,b=e+1,y=mulTable[e],v=shgTable[e],A=[],w=[],S=[],E=[],x=[],C=[];let T=2;for(;T-- >0;){for(f=0,p=0,s=0;s__left_angle_mark_this.bitmap.height;s++){for(r=this.bitmap.data[p]*b,n=this.bitmap.data[p+1]*b,i=this.bitmap.data[p+2]*b,o=this.bitmap.data[p+3]*b,l=1;l__left_angle_mark_=e;l++)u=p+((l>g?g:l)__left_angle_mark___left_angle_mark_2),r+=this.bitmap.data[u++],n+=this.bitmap.data[u++],i+=this.bitmap.data[u++],o+=this.bitmap.data[u];for(a=0;a__left_angle_mark_this.bitmap.width;a++)A[f]=r,w[f]=n,S[f]=i,E[f]=o,0===s&&(x[a]=((u=a+b)__left_angle_mark_g?u:g)__left_angle_mark___left_angle_mark_2,C[a]=(u=a-e)>0?u__left_angle_mark___left_angle_mark_2:0),c=p+x[a],d=p+C[a],r+=this.bitmap.data[c++]-this.bitmap.data[d++],n+=this.bitmap.data[c++]-this.bitmap.data[d++],i+=this.bitmap.data[c++]-this.bitmap.data[d++],o+=this.bitmap.data[c]-this.bitmap.data[d],f++;p+=this.bitmap.width__left_angle_mark___left_angle_mark_2}for(a=0;a__left_angle_mark_this.bitmap.width;a++){for(h=a,r=A[h]*b,n=w[h]*b,i=S[h]*b,o=E[h]*b,l=1;l__left_angle_mark_=e;l++)h+=l>_?0:this.bitmap.width,r+=A[h],n+=w[h],i+=S[h],o+=E[h];for(f=a__left_angle_mark___left_angle_mark_2,s=0;s__left_angle_mark_this.bitmap.height;s++)m=o*y>>>v,this.bitmap.data[f+3]=m,m>255&&(this.bitmap.data[f+3]=255),m>0?(m=255/m,this.bitmap.data[f]=(r*y>>>v)*m,this.bitmap.data[f+1]=(n*y>>>v)*m,this.bitmap.data[f+2]=(i*y>>>v)*m):(this.bitmap.data[f+2]=0,this.bitmap.data[f+1]=0,this.bitmap.data[f]=0),0===a&&(x[s]=((u=s+b)__left_angle_mark__?u:_)*this.bitmap.width,C[s]=(u=s-e)>0?u*this.bitmap.width:0),c=a+x[s],d=a+C[s],r+=A[c]-A[d],n+=w[c]-w[d],i+=S[c]-S[d],o+=E[c]-E[d],f+=this.bitmap.width__left_angle_mark___left_angle_mark_2}}return isNodePattern(t)&&t.call(this,null,this),this}})}}),es_default27,init_es12=__esm({\"../../node_modules/.pnpm/@jimp+plugin-circle@0.22.12_@jimp+custom@0.22.12/node_modules/@jimp/plugin-circle/es/index.js\"(){init_globals(),init_es(),es_default27=()=>({circle(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;\"function\"==typeof e&&(t=e,e={});const r=e.radius||(this.bitmap.width>this.bitmap.height?this.bitmap.height:this.bitmap.width)/2,n=\"number\"==typeof e.x?e.x:this.bitmap.width/2,i=\"number\"==typeof e.y?e.y:this.bitmap.height/2;return this.scanQuiet(0,0,this.bitmap.width,this.bitmap.height,(function(e,t,o){const a=Math.sqrt(Math.pow(e-n,2)+Math.pow(t-i,2));r-a__left_angle_mark_=0?this.bitmap.data[o+3]=0:r-a__left_angle_mark_1&&(this.bitmap.data[o+3]=255*(r-a))})),isNodePattern(t)&&t.call(this,null,this),this}})}}),isDef,ColorActionName,es_default28;function applyKernel(e,t,r,n){const i=[0,0,0],o=(t.length-1)/2;for(let a=0;a__left_angle_mark_t.length;a+=1)for(let s=0;s__left_angle_mark_t[a].length;s+=1){const l=e.getPixelIndex(r+a-o,n+s-o);i[0]+=e.bitmap.data[l]*t[a][s],i[1]+=e.bitmap.data[l+1]*t[a][s],i[2]+=e.bitmap.data[l+2]*t[a][s]}return i}function greyscale2(e){return this.scanQuiet(0,0,this.bitmap.width,this.bitmap.height,(function(e,t,r){const n=parseInt(.2126*this.bitmap.data[r]+.7152*this.bitmap.data[r+1]+.0722*this.bitmap.data[r+2],10);this.bitmap.data[r]=n,this.bitmap.data[r+1]=n,this.bitmap.data[r+2]=n})),isNodePattern(e)&&e.call(this,null,this),this}function mix2(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:50;return{r:(t.r-e.r)*(r/100)+e.r,g:(t.g-e.g)*(r/100)+e.g,b:(t.b-e.b)*(r/100)+e.b}}function colorFn(e,t){return e&&Array.isArray(e)?(e=e.map((e=>(\"xor\"!==e.apply&&\"mix\"!==e.apply||(e.params[0]=tinycolor(e.params[0]).toRgb()),e))),this.scanQuiet(0,0,this.bitmap.width,this.bitmap.height,((r,n,i)=>{let o={r:this.bitmap.data[i],g:this.bitmap.data[i+1],b:this.bitmap.data[i+2]};const a=(e,t)=>this.constructor.limit255(o[e]+t);e.forEach((e=>{if(\"mix\"===e.apply)o=mix2(o,e.params[0],e.params[1]);else if(\"tint\"===e.apply)o=mix2(o,{r:255,g:255,b:255},e.params[0]);else if(\"shade\"===e.apply)o=mix2(o,{r:0,g:0,b:0},e.params[0]);else if(\"xor\"===e.apply)o={r:o.r^e.params[0].r,g:o.g^e.params[0].g,b:o.b^e.params[0].b};else if(\"red\"===e.apply)o.r=a(\"r\",e.params[0]);else if(\"green\"===e.apply)o.g=a(\"g\",e.params[0]);else if(\"blue\"===e.apply)o.b=a(\"b\",e.params[0]);else{if(\"hue\"===e.apply&&(e.apply=\"spin\"),o=tinycolor(o),!o[e.apply])return throwError.call(this,\"action \"+e.apply+\" not supported\",t);o=o[e.apply](...e.params).toRgb()}})),this.bitmap.data[i]=o.r,this.bitmap.data[i+1]=o.g,this.bitmap.data[i+2]=o.b})),isNodePattern(t)&&t.call(this,null,this),this):throwError.call(this,\"actions must be an array\",t)}var init_es13=__esm({\"../../node_modules/.pnpm/@jimp+plugin-color@0.22.12_@jimp+custom@0.22.12/node_modules/@jimp/plugin-color/es/index.js\"(){init_globals(),init_tinycolor(),init_es(),isDef=e=>null!=e,ColorActionName=Object.freeze({LIGHTEN:\"lighten\",BRIGHTEN:\"brighten\",DARKEN:\"darken\",DESATURATE:\"desaturate\",SATURATE:\"saturate\",GREYSCALE:\"greyscale\",SPIN:\"spin\",HUE:\"hue\",MIX:\"mix\",TINT:\"tint\",SHADE:\"shade\",XOR:\"xor\",RED:\"red\",GREEN:\"green\",BLUE:\"blue\"}),es_default28=()=>({brightness(e,t){return\"number\"!=typeof e?throwError.call(this,\"val must be numbers\",t):e__left_angle_mark_-1||e>1?throwError.call(this,\"val must be a number between -1 and +1\",t):(this.scanQuiet(0,0,this.bitmap.width,this.bitmap.height,(function(t,r,n){e__left_angle_mark_0?(this.bitmap.data[n]*=1+e,this.bitmap.data[n+1]*=1+e,this.bitmap.data[n+2]*=1+e):(this.bitmap.data[n]+=(255-this.bitmap.data[n])*e,this.bitmap.data[n+1]+=(255-this.bitmap.data[n+1])*e,this.bitmap.data[n+2]+=(255-this.bitmap.data[n+2])*e)})),isNodePattern(t)&&t.call(this,null,this),this)},contrast(e,t){if(\"number\"!=typeof e)return throwError.call(this,\"val must be numbers\",t);if(e__left_angle_mark_-1||e>1)return throwError.call(this,\"val must be a number between -1 and +1\",t);const r=(e+1)/(1-e);function n(e){return(e=Math.floor(r*(e-127)+127))__left_angle_mark_0?0:e>255?255:e}return this.scanQuiet(0,0,this.bitmap.width,this.bitmap.height,(function(e,t,r){this.bitmap.data[r]=n(this.bitmap.data[r]),this.bitmap.data[r+1]=n(this.bitmap.data[r+1]),this.bitmap.data[r+2]=n(this.bitmap.data[r+2])})),isNodePattern(t)&&t.call(this,null,this),this},posterize(e,t){return\"number\"!=typeof e?throwError.call(this,\"n must be numbers\",t):(e__left_angle_mark_2&&(e=2),this.scanQuiet(0,0,this.bitmap.width,this.bitmap.height,(function(t,r,n){this.bitmap.data[n]=Math.floor(this.bitmap.data[n]/255*(e-1))/(e-1)*255,this.bitmap.data[n+1]=Math.floor(this.bitmap.data[n+1]/255*(e-1))/(e-1)*255,this.bitmap.data[n+2]=Math.floor(this.bitmap.data[n+2]/255*(e-1))/(e-1)*255})),isNodePattern(t)&&t.call(this,null,this),this)},greyscale:greyscale2,grayscale:greyscale2,opacity(e,t){return\"number\"!=typeof e?throwError.call(this,\"f must be a number\",t):e__left_angle_mark_0||e>1?throwError.call(this,\"f must be a number from 0 to 1\",t):(this.scanQuiet(0,0,this.bitmap.width,this.bitmap.height,(function(t,r,n){const i=this.bitmap.data[n+3]*e;this.bitmap.data[n+3]=i})),isNodePattern(t)&&t.call(this,null,this),this)},sepia(e){return this.scanQuiet(0,0,this.bitmap.width,this.bitmap.height,(function(e,t,r){let n=this.bitmap.data[r],i=this.bitmap.data[r+1],o=this.bitmap.data[r+2];n=.393*n+.769*i+.189*o,i=.349*n+.686*i+.168*o,o=.272*n+.534*i+.131*o,this.bitmap.data[r]=n__left_angle_mark_255?n:255,this.bitmap.data[r+1]=i__left_angle_mark_255?i:255,this.bitmap.data[r+2]=o__left_angle_mark_255?o:255})),isNodePattern(e)&&e.call(this,null,this),this},fade(e,t){return\"number\"!=typeof e?throwError.call(this,\"f must be a number\",t):e__left_angle_mark_0||e>1?throwError.call(this,\"f must be a number from 0 to 1\",t):(this.opacity(1-e),isNodePattern(t)&&t.call(this,null,this),this)},convolution(e,t,r){\"function\"==typeof t&&void 0===r&&(r=t,t=null),t||(t=this.constructor.EDGE_EXTEND);const n=Buffer.from(this.bitmap.data),i=e.length,o=e[0].length,a=Math.floor(i/2),s=Math.floor(o/2),l=-a,u=-s;let c,d,h,f,p,m,g,_,b,y;return this.scanQuiet(0,0,this.bitmap.width,this.bitmap.height,(function(r,i,o){f=0,h=0,d=0;for(let n=l;n__left_angle_mark_=a;n++)for(let o=u;o__left_angle_mark_=s;o++)_=r+o,b=i+n,c=e[n+a][o+s],y=this.getPixelIndex(_,b,t),-1===y?(g=0,m=0,p=0):(p=this.bitmap.data[y+0],m=this.bitmap.data[y+1],g=this.bitmap.data[y+2]),d+=c*p,h+=c*m,f+=c*g;d__left_angle_mark_0&&(d=0),h__left_angle_mark_0&&(h=0),f__left_angle_mark_0&&(f=0),d>255&&(d=255),h>255&&(h=255),f>255&&(f=255),n[o+0]=d,n[o+1]=h,n[o+2]=f})),this.bitmap.data=n,isNodePattern(r)&&r.call(this,null,this),this},opaque(e){return this.scanQuiet(0,0,this.bitmap.width,this.bitmap.height,(function(e,t,r){this.bitmap.data[r+3]=255})),isNodePattern(e)&&e.call(this,null,this),this},pixelate(e,t,r,n,i,o){if(\"function\"==typeof t)o=t,i=null,n=null,r=null,t=null;else{if(\"number\"!=typeof e)return throwError.call(this,\"size must be a number\",o);if(isDef(t)&&\"number\"!=typeof t)return throwError.call(this,\"x must be a number\",o);if(isDef(r)&&\"number\"!=typeof r)return throwError.call(this,\"y must be a number\",o);if(isDef(n)&&\"number\"!=typeof n)return throwError.call(this,\"w must be a number\",o);if(isDef(i)&&\"number\"!=typeof i)return throwError.call(this,\"h must be a number\",o)}const a=[[1/16,2/16,1/16],[2/16,.25,2/16],[1/16,2/16,1/16]];t=t||0,r=r||0,n=isDef(n)?n:this.bitmap.width-t,i=isDef(i)?i:this.bitmap.height-r;const s=this.cloneQuiet();return this.scanQuiet(t,r,n,i,(function(t,r,n){t=e*Math.floor(t/e),r=e*Math.floor(r/e);const i=applyKernel(s,a,t,r);this.bitmap.data[n]=i[0],this.bitmap.data[n+1]=i[1],this.bitmap.data[n+2]=i[2]})),isNodePattern(o)&&o.call(this,null,this),this},convolute(e,t,r,n,i,o){if(!Array.isArray(e))return throwError.call(this,\"the kernel must be an array\",o);if(\"function\"==typeof t)o=t,t=null,r=null,n=null,i=null;else{if(isDef(t)&&\"number\"!=typeof t)return throwError.call(this,\"x must be a number\",o);if(isDef(r)&&\"number\"!=typeof r)return throwError.call(this,\"y must be a number\",o);if(isDef(n)&&\"number\"!=typeof n)return throwError.call(this,\"w must be a number\",o);if(isDef(i)&&\"number\"!=typeof i)return throwError.call(this,\"h must be a number\",o)}t=isDef(t)?t:0,r=isDef(r)?r:0,n=isDef(n)?n:this.bitmap.width-t,i=isDef(i)?i:this.bitmap.height-r;const a=this.cloneQuiet();return this.scanQuiet(t,r,n,i,(function(t,r,n){const i=applyKernel(a,e,t,r);this.bitmap.data[n]=this.constructor.limit255(i[0]),this.bitmap.data[n+1]=this.constructor.limit255(i[1]),this.bitmap.data[n+2]=this.constructor.limit255(i[2])})),isNodePattern(o)&&o.call(this,null,this),this},color:colorFn,colour:colorFn})}}),es_default29,init_es14=__esm({\"../../node_modules/.pnpm/@jimp+plugin-contain@0.22.12_@jimp+custom@0.22.12_@jimp+plugin-blit@0.22.12_@jimp+custom@0.22_2aqiwpdhxnkduuxp553ox3flee/node_modules/@jimp/plugin-contain/es/index.js\"(){init_globals(),init_es(),es_default29=()=>({contain(e,t,r,n,i){if(\"number\"!=typeof e||\"number\"!=typeof t)return throwError.call(this,\"w and h must be numbers\",i);\"string\"==typeof r&&(\"function\"==typeof n&&void 0===i&&(i=n),n=r,r=null),\"function\"==typeof r&&(void 0===i&&(i=r),n=null,r=null),\"function\"==typeof n&&void 0===i&&(i=n,n=null);const o=7&(r=r||this.constructor.HORIZONTAL_ALIGN_CENTER|this.constructor.VERTICAL_ALIGN_MIDDLE),a=r>>3;if((0===o||o&o-1)&&(0===a||a&a-1))return throwError.call(this,\"only use one flag per alignment direction\",i);const s=o>>1,l=a>>1,u=e/t>this.bitmap.width/this.bitmap.height?t/this.bitmap.height:e/this.bitmap.width,c=this.cloneQuiet().scale(u,n);return this.resize(e,t,n),this.scanQuiet(0,0,this.bitmap.width,this.bitmap.height,(function(e,t,r){this.bitmap.data.writeUInt32BE(this._background,r)})),this.blit(c,(this.bitmap.width-c.bitmap.width)/2*s,(this.bitmap.height-c.bitmap.height)/2*l),isNodePattern(i)&&i.call(this,null,this),this}})}}),es_default30,init_es15=__esm({\"../../node_modules/.pnpm/@jimp+plugin-cover@0.22.12_@jimp+custom@0.22.12_@jimp+plugin-crop@0.22.12_@jimp+custom@0.22.1_rnx6golxzuvzyum5tissy6dsru/node_modules/@jimp/plugin-cover/es/index.js\"(){init_globals(),init_es(),es_default30=()=>({cover(e,t,r,n,i){if(\"number\"!=typeof e||\"number\"!=typeof t)return throwError.call(this,\"w and h must be numbers\",i);r&&\"function\"==typeof r&&void 0===i?(i=r,r=null,n=null):\"function\"==typeof n&&void 0===i&&(i=n,n=null);const o=7&(r=r||this.constructor.HORIZONTAL_ALIGN_CENTER|this.constructor.VERTICAL_ALIGN_MIDDLE),a=r>>3;if((0===o||o&o-1)&&(0===a||a&a-1))return throwError.call(this,\"only use one flag per alignment direction\",i);const s=o>>1,l=a>>1,u=e/t>this.bitmap.width/this.bitmap.height?e/this.bitmap.width:t/this.bitmap.height;return this.scale(u,n),this.crop((this.bitmap.width-e)/2*s,(this.bitmap.height-t)/2*l,e,t),isNodePattern(i)&&i.call(this,null,this),this}})}});function pluginCrop(e){return e(\"crop\",(function(e,t,r,n,i){if(\"number\"!=typeof e||\"number\"!=typeof t)return throwError.call(this,\"x and y must be numbers\",i);if(\"number\"!=typeof r||\"number\"!=typeof n)return throwError.call(this,\"w and h must be numbers\",i);if(e=Math.round(e),t=Math.round(t),r=Math.round(r),n=Math.round(n),0===e&&r===this.bitmap.width){const i=r*t+e__left_angle_mark___left_angle_mark_2,o=i+(n*r__left_angle_mark___left_angle_mark_2);this.bitmap.data=this.bitmap.data.slice(i,o)}else{const i=Buffer.allocUnsafe(r*n*4);let o=0;this.scanQuiet(e,t,r,n,(function(e,t,r){const n=this.bitmap.data.readUInt32BE(r,!0);i.writeUInt32BE(n,o,!0),o+=4})),this.bitmap.data=i}return this.bitmap.width=r,this.bitmap.height=n,isNodePattern(i)&&i.call(this,null,this),this})),{class:{autocrop(){const e=this.bitmap.width,t=this.bitmap.height;let r,n=0,i=2e-4,o=!0,a=!1,s={north:!1,south:!1,east:!1,west:!1};for(var l=arguments.length,u=new Array(l),c=0;c__left_angle_mark_l;c++)u[c]=arguments[c];for(let v=0,A=u.length;v__left_angle_mark_A;v++)if(\"number\"==typeof u[v]&&(i=u[v]),\"boolean\"==typeof u[v]&&(o=u[v]),\"function\"==typeof u[v]&&(r=u[v]),\"object\"==typeof u[v]){const e=u[v];void 0!==e.tolerance&&({tolerance:i}=e),void 0!==e.cropOnlyFrames&&({cropOnlyFrames:o}=e),void 0!==e.cropSymmetric&&({cropSymmetric:a}=e),void 0!==e.leaveBorder&&({leaveBorder:n}=e),void 0!==e.ignoreSides&&({ignoreSides:s}=e)}let d=this.getPixelColor(0,0);const h=this.constructor.intToRGBA(d);let f=0,p=0,m=0,g=0;if(d=this.getPixelColor(0,0),!s.north)e:for(let v=0;v__left_angle_mark_t-1;v++){for(let t=0;t__left_angle_mark_e;t++){const e=this.getPixelColor(t,v),r=this.constructor.intToRGBA(e);if(this.constructor.colorDiff(h,r)>i)break e}f++}if(d=this.getPixelColor(e,0),!s.west)e:for(let v=0;v__left_angle_mark_e-1;v++){for(let e=0+f;e__left_angle_mark_t;e++){const t=this.getPixelColor(v,e),r=this.constructor.intToRGBA(t);if(this.constructor.colorDiff(h,r)>i)break e}g++}if(d=this.getPixelColor(0,t),!s.south)e:for(let v=t-1;v>=f+1;v--){for(let t=e-p-1;t>=0;t--){const e=this.getPixelColor(t,v),r=this.constructor.intToRGBA(e);if(this.constructor.colorDiff(h,r)>i)break e}m++}if(d=this.getPixelColor(e,t),!s.east)e:for(let v=e-1;v>=0+g+1;v--){for(let e=t-1;e>=0+f;e--){const t=this.getPixelColor(v,e),r=this.constructor.intToRGBA(t);if(this.constructor.colorDiff(h,r)>i)break e}p++}let _=!1;if(g-=n,p-=n,f-=n,m-=n,a){const e=Math.min(p,g),t=Math.min(f,m);g=e,p=e,f=t,m=t}g=g>=0?g:0,p=p>=0?p:0,f=f>=0?f:0,m=m>=0?m:0;const b=e-(g+p),y=t-(m+f);return _=o?0!==p&&0!==f&&0!==g&&0!==m:0!==p||0!==f||0!==g||0!==m,_&&this.crop(g,f,b,y),isNodePattern(r)&&r.call(this,null,this),this}}}}var init_es16=__esm({\"../../node_modules/.pnpm/@jimp+plugin-crop@0.22.12_@jimp+custom@0.22.12/node_modules/@jimp/plugin-crop/es/index.js\"(){init_globals(),init_es()}}),es_default31,init_es17=__esm({\"../../node_modules/.pnpm/@jimp+plugin-displace@0.22.12_@jimp+custom@0.22.12/node_modules/@jimp/plugin-displace/es/index.js\"(){init_globals(),init_es(),es_default31=()=>({displace(e,t,r){if(\"object\"!=typeof e||e.constructor!==this.constructor)return throwError.call(this,\"The source must be a Jimp image\",r);if(\"number\"!=typeof t)return throwError.call(this,\"factor must be a number\",r);const n=this.cloneQuiet();return this.scanQuiet(0,0,this.bitmap.width,this.bitmap.height,(function(r,i,o){let a=e.bitmap.data[o]/256*t;a=Math.round(a);const s=this.getPixelIndex(r+a,i);this.bitmap.data[s]=n.bitmap.data[o],this.bitmap.data[s+1]=n.bitmap.data[o+1],this.bitmap.data[s+2]=n.bitmap.data[o+2]})),isNodePattern(r)&&r.call(this,null,this),this}})}}),es_default32;function dither(e){const t=[1,9,3,11,13,5,15,7,4,12,2,10,16,8,14,6];return this.scanQuiet(0,0,this.bitmap.width,this.bitmap.height,(function(e,r,n){const i=t[((3&r)__left_angle_mark___left_angle_mark_2)+e%4];this.bitmap.data[n]=Math.min(this.bitmap.data[n]+i,255),this.bitmap.data[n+1]=Math.min(this.bitmap.data[n+1]+i,255),this.bitmap.data[n+2]=Math.min(this.bitmap.data[n+2]+i,255)})),isNodePattern(e)&&e.call(this,null,this),this}var init_es18=__esm({\"../../node_modules/.pnpm/@jimp+plugin-dither@0.22.12_@jimp+custom@0.22.12/node_modules/@jimp/plugin-dither/es/index.js\"(){init_globals(),init_es(),es_default32=()=>({dither565:dither,dither16:dither})}}),es_default33,init_es19=__esm({\"../../node_modules/.pnpm/@jimp+plugin-fisheye@0.22.12_@jimp+custom@0.22.12/node_modules/@jimp/plugin-fisheye/es/index.js\"(){init_globals(),init_es(),es_default33=()=>({fisheye(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{r:2.5},t=arguments.length>1?arguments[1]:void 0;\"function\"==typeof e&&(t=e,e={r:2.5});const r=this.cloneQuiet(),{width:n,height:i}=r.bitmap;return r.scanQuiet(0,0,n,i,((t,o)=>{const a=t/n,s=o/i,l=Math.sqrt(Math.pow(a-.5,2)+Math.pow(s-.5,2)),u=2*Math.pow(l,e.r),c=(a-.5)/l,d=(s-.5)/l,h=Math.round((u*c+.5)*n),f=Math.round((u*d+.5)*i),p=r.getPixelColor(h,f);this.setPixelColor(p,t,o)})),this.setPixelColor(r.getPixelColor(n/2,i/2),n/2,i/2),isNodePattern(t)&&t.call(this,null,this),this}})}}),es_default34;function flipFn(e,t,r){if(\"boolean\"!=typeof e||\"boolean\"!=typeof t)return throwError.call(this,\"horizontal and vertical must be Booleans\",r);const n=Buffer.alloc(this.bitmap.data.length);return this.scanQuiet(0,0,this.bitmap.width,this.bitmap.height,(function(r,i,o){const a=e?this.bitmap.width-1-r:r,s=t?this.bitmap.height-1-i:i,l=this.bitmap.width*s+a__left_angle_mark___left_angle_mark_2,u=this.bitmap.data.readUInt32BE(o);n.writeUInt32BE(u,l)})),this.bitmap.data=Buffer.from(n),isNodePattern(r)&&r.call(this,null,this),this}var init_es20=__esm({\"../../node_modules/.pnpm/@jimp+plugin-flip@0.22.12_@jimp+custom@0.22.12_@jimp+plugin-rotate@0.22.12_@jimp+custom@0.22._ah65yezxatpekltilekb5svbxq/node_modules/@jimp/plugin-flip/es/index.js\"(){init_globals(),init_es(),es_default34=()=>({flip:flipFn,mirror:flipFn})}}),es_default35,init_es21=__esm({\"../../node_modules/.pnpm/@jimp+plugin-gaussian@0.22.12_@jimp+custom@0.22.12/node_modules/@jimp/plugin-gaussian/es/index.js\"(){init_globals(),init_es(),es_default35=()=>({gaussian(e,t){if(\"number\"!=typeof e)return throwError.call(this,\"r must be a number\",t);if(e__left_angle_mark_1)return throwError.call(this,\"r must be greater than 0\",t);const r=Math.ceil(2.57*e),n=2*r+1,i=e*e*2,o=i*Math.PI,a=[];for(let s=0;s__left_angle_mark_n;s++){a[s]=[];for(let e=0;e__left_angle_mark_n;e++){const t=(e-r)**2+(s-r)**2;a[s][e]=Math.exp(-t/i)/o}}for(let s=0;s__left_angle_mark_this.bitmap.height;s++)for(let e=0;e__left_angle_mark_this.bitmap.width;e++){let t=0,i=0,o=0,l=0,u=0;for(let c=0;c__left_angle_mark_n;c++){for(let h=0;h__left_angle_mark_n;h++){const n=Math.min(this.bitmap.width-1,Math.max(0,h+e-r)),d=Math.min(this.bitmap.height-1,Math.max(0,c+s-r)),f=a[c][h],p=d*this.bitmap.width+n__left_angle_mark___left_angle_mark_2;t+=this.bitmap.data[p]*f,i+=this.bitmap.data[p+1]*f,o+=this.bitmap.data[p+2]*f,l+=this.bitmap.data[p+3]*f,u+=f}const d=s*this.bitmap.width+e__left_angle_mark___left_angle_mark_2;this.bitmap.data[d]=Math.round(t/u),this.bitmap.data[d+1]=Math.round(i/u),this.bitmap.data[d+2]=Math.round(o/u),this.bitmap.data[d+3]=Math.round(l/u)}}return isNodePattern(t)&&t.call(this,null,this),this}})}}),es_default36,init_es22=__esm({\"../../node_modules/.pnpm/@jimp+plugin-invert@0.22.12_@jimp+custom@0.22.12/node_modules/@jimp/plugin-invert/es/index.js\"(){init_globals(),init_es(),es_default36=()=>({invert(e){return this.scanQuiet(0,0,this.bitmap.width,this.bitmap.height,(function(e,t,r){this.bitmap.data[r]=255-this.bitmap.data[r],this.bitmap.data[r+1]=255-this.bitmap.data[r+1],this.bitmap.data[r+2]=255-this.bitmap.data[r+2]})),isNodePattern(e)&&e.call(this,null,this),this}})}}),es_default37,init_es23=__esm({\"../../node_modules/.pnpm/@jimp+plugin-mask@0.22.12_@jimp+custom@0.22.12/node_modules/@jimp/plugin-mask/es/index.js\"(){init_globals(),init_es(),es_default37=()=>({mask(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=arguments.length>3?arguments[3]:void 0;if(!(e instanceof this.constructor))return throwError.call(this,\"The source must be a Jimp image\",n);if(\"number\"!=typeof t||\"number\"!=typeof r)return throwError.call(this,\"x and y must be numbers\",n);t=Math.round(t),r=Math.round(r);const i=this.bitmap.width,o=this.bitmap.height,a=this;return e.scanQuiet(0,0,e.bitmap.width,e.bitmap.height,(function(e,n,s){const l=t+e,u=r+n;if(l>=0&&u>=0&&l__left_angle_mark_i&&u__left_angle_mark_o){const e=a.getPixelIndex(l,u),{data:t}=this.bitmap,r=(t[s+0]+t[s+1]+t[s+2])/3;a.bitmap.data[e+3]*=r/255}})),isNodePattern(n)&&n.call(this,null,this),this}})}}),normalize2,getBounds,es_default38;function histogram(){const e={r:new Array(256).fill(0),g:new Array(256).fill(0),b:new Array(256).fill(0)};return this.scanQuiet(0,0,this.bitmap.width,this.bitmap.height,(function(t,r,n){e.r[this.bitmap.data[n+0]]++,e.g[this.bitmap.data[n+1]]++,e.b[this.bitmap.data[n+2]]++})),e}var init_es24=__esm({\"../../node_modules/.pnpm/@jimp+plugin-normalize@0.22.12_@jimp+custom@0.22.12/node_modules/@jimp/plugin-normalize/es/index.js\"(){init_globals(),init_es(),normalize2=function(e,t,r){return 255*(e-t)/(r-t)},getBounds=function(e){return[e.findIndex((e=>e>0)),255-e.slice().reverse().findIndex((e=>e>0))]},es_default38=()=>({normalize(e){const t=histogram.call(this),r={r:getBounds(t.r),g:getBounds(t.g),b:getBounds(t.b)};return this.scanQuiet(0,0,this.bitmap.width,this.bitmap.height,(function(e,t,n){const i=this.bitmap.data[n+0],o=this.bitmap.data[n+1],a=this.bitmap.data[n+2];this.bitmap.data[n+0]=normalize2(i,r.r[0],r.r[1]),this.bitmap.data[n+1]=normalize2(o,r.g[0],r.g[1]),this.bitmap.data[n+2]=normalize2(a,r.b[0],r.b[1])})),isNodePattern(e)&&e.call(this,null,this),this}})}}),require_window=__commonJS({\"../../node_modules/.pnpm/global@4.4.0/node_modules/global/window.js\"(e,t){var r;init_globals(),r=\"undefined\"!=typeof window?window:\"globalThis\",t.exports=r}}),require_is_function=__commonJS({\"../../node_modules/.pnpm/is-function@1.0.2/node_modules/is-function/index.js\"(e,t){init_globals(),t.exports=function(e){if(!e)return!1;var t=r.call(e);return\"[object Function]\"===t||\"function\"==typeof e&&\"[object RegExp]\"!==t||\"undefined\"!=typeof window&&(e===window.setTimeout||e===window.alert||e===window.confirm||e===window.prompt)};var r=Object.prototype.toString}}),require_parse_headers=__commonJS({\"../../node_modules/.pnpm/parse-headers@2.0.5/node_modules/parse-headers/parse-headers.js\"(e,t){init_globals();var r=function(e){return e.replace(/^\\s+|\\s+$/g,\"\")};t.exports=function(e){if(!e)return{};for(var t,n={},i=r(e).split(\"\\n\"),o=0;o__left_angle_mark_i.length;o++){var a=i[o],s=a.indexOf(\":\"),l=r(a.slice(0,s)).toLowerCase(),u=r(a.slice(s+1));void 0===n[l]?n[l]=u:(t=n[l],\"[object Array]\"===Object.prototype.toString.call(t)?n[l].push(u):n[l]=[n[l],u])}return n}}}),require_xhr=__commonJS({\"../../node_modules/.pnpm/xhr@2.6.0/node_modules/xhr/index.js\"(e,t){init_globals();var r=require_window(),n=require_is_function(),i=require_parse_headers(),o=require_immutable();function a(e,t,r){var i=e;return n(t)?(r=t,\"string\"==typeof e&&(i={uri:e})):i=o(t,{uri:e}),i.callback=r,i}function s(e,t,r){return l(t=a(e,t,r))}function l(e){if(void 0===e.callback)throw new Error(\"callback argument missing\");var t=!1,r=function(r,n,i){t||(t=!0,e.callback(r,n,i))};function n(){var e=void 0;if(e=c.response?c.response:c.responseText||function(e){try{if(\"document\"===e.responseType)return e.responseXML;var t=e.responseXML&&\"parsererror\"===e.responseXML.documentElement.nodeName;if(\"\"===e.responseType&&!t)return e.responseXML}catch(r){}return null}(c),_)try{e=JSON.parse(e)}catch(t){}return e}function o(e){return clearTimeout(d),e instanceof Error||(e=new Error(\"\"+(e||\"Unknown XMLHttpRequest Error\"))),e.statusCode=0,r(e,b)}function a(){if(!u){var t;clearTimeout(d),t=e.useXDR&&void 0===c.status?200:1223===c.status?204:c.status;var o=b,a=null;return 0!==t?(o={body:n(),statusCode:t,method:f,headers:{},url:h,rawRequest:c},c.getAllResponseHeaders&&(o.headers=i(c.getAllResponseHeaders()))):a=new Error(\"Internal XMLHttpRequest Error\"),r(a,o,o.body)}}var l,u,c=e.xhr||null;c||(c=e.cors||e.useXDR?new s.XDomainRequest:new s.XMLHttpRequest);var d,h=c.url=e.uri||e.url,f=c.method=e.method||\"GET\",p=e.body||e.data,m=c.headers=e.headers||{},g=!!e.sync,_=!1,b={body:void 0,headers:{},statusCode:0,method:f,url:h,rawRequest:c};if(\"json\"in e&&!1!==e.json&&(_=!0,m.accept||m.Accept||(m.Accept=\"application/json\"),\"GET\"!==f&&\"HEAD\"!==f&&(m[\"content-type\"]||m[\"Content-Type\"]||(m[\"Content-Type\"]=\"application/json\"),p=JSON.stringify(!0===e.json?p:e.json))),c.onreadystatechange=function(){4===c.readyState&&setTimeout(a,0)},c.onload=a,c.onerror=o,c.onprogress=function(){},c.onabort=function(){u=!0},c.ontimeout=o,c.open(f,h,!g,e.username,e.password),g||(c.withCredentials=!!e.withCredentials),!g&&e.timeout>0&&(d=setTimeout((function(){if(!u){u=!0,c.abort(\"timeout\");var e=new Error(\"XMLHttpRequest timeout\");e.code=\"ETIMEDOUT\",o(e)}}),e.timeout)),c.setRequestHeader)for(l in m)m.hasOwnProperty(l)&&c.setRequestHeader(l,m[l]);else if(e.headers&&!function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}(e.headers))throw new Error(\"Headers cannot be set on an XDomainRequest object\");return\"responseType\"in e&&(c.responseType=e.responseType),\"beforeSend\"in e&&\"function\"==typeof e.beforeSend&&e.beforeSend(c),c.send(p||null),c}t.exports=s,t.exports.default=s,s.XMLHttpRequest=r.XMLHttpRequest||function(){},s.XDomainRequest=\"withCredentials\"in new s.XMLHttpRequest?s.XMLHttpRequest:r.XDomainRequest,function(e,t){for(var r=0;r__left_angle_mark_e.length;r++)t(e[r])}([\"get\",\"put\",\"post\",\"patch\",\"head\",\"delete\"],(function(e){s[\"delete\"===e?\"del\":e]=function(t,r,n){return(r=a(t,r,n)).method=e.toUpperCase(),l(r)}}))}}),require_parse_bmfont_ascii=__commonJS({\"../../node_modules/.pnpm/parse-bmfont-ascii@1.0.6/node_modules/parse-bmfont-ascii/index.js\"(e,t){function r(e,t){if(!(e=e.replace(/\\t+/g,\" \").trim()))return null;var r=e.indexOf(\" \");if(-1===r)throw new Error(\"no named row at line \"+t);var i=e.substring(0,r);e=(e=(e=(e=e.substring(r+1)).replace(/letter=[\\'\\\"]\\S+[\\'\\\"]/gi,\"\")).split(\"=\")).map((function(e){return e.trim().match(/(\".*?\"|[^\"\\s]+)+(?=\\s*|\\s*$)/g)}));for(var o=[],a=0;a__left_angle_mark_e.length;a++){var s=e[a];0===a?o.push({key:s[0],data:\"\"}):a===e.length-1?o[o.length-1].data=n(s[0]):(o[o.length-1].data=n(s[0]),o.push({key:s[1],data:\"\"}))}var l={key:i,data:{}};return o.forEach((function(e){l.data[e.key]=e.data})),l}function n(e){return e&&0!==e.length?0===e.indexOf('\"')||0===e.indexOf(\"'\")?e.substring(1,e.length-1):-1!==e.indexOf(\",\")?function(e){return e.split(\",\").map((function(e){return parseInt(e,10)}))}(e):parseInt(e,10):\"\"}init_globals(),t.exports=function(e){if(!e)throw new Error(\"no data provided\");var t={pages:[],chars:[],kernings:[]},n=(e=e.toString().trim()).split(/\\r\\n?|\\n/g);if(0===n.length)throw new Error(\"no data in BMFont file\");for(var i=0;i__left_angle_mark_n.length;i++){var o=r(n[i],i);if(o)if(\"page\"===o.key){if(\"number\"!=typeof o.data.id)throw new Error(\"malformed file at line \"+i+\" -- needs page id=N\");if(\"string\"!=typeof o.data.file)throw new Error(\"malformed file at line \"+i+' -- needs page file=\"path\"');t.pages[o.data.id]=o.data.file}else\"chars\"===o.key||\"kernings\"===o.key||(\"char\"===o.key?t.chars.push(o.data):\"kerning\"===o.key?t.kernings.push(o.data):t[o.key]=o.data)}return t}}}),require_parse_attribs=__commonJS({\"../../node_modules/.pnpm/parse-bmfont-xml@1.1.6/node_modules/parse-bmfont-xml/lib/parse-attribs.js\"(e,t){init_globals();var r=\"chasrset\";t.exports=function(e){for(var t in e=Object.assign({},e),r in e&&(e.charset=e[r],delete e[r]),e)\"face\"!==t&&\"charset\"!==t&&(e[t]=\"padding\"===t||\"spacing\"===t?e[t].split(\",\").map((function(e){return parseInt(e,10)})):parseInt(e[t],10));return e}}}),require_xml_parse_from_string=__commonJS({\"../../node_modules/.pnpm/xml-parse-from-string@1.0.1/node_modules/xml-parse-from-string/index.js\"(e,t){init_globals(),t.exports=void 0!==self.DOMParser?function(e){return(new self.DOMParser).parseFromString(e,\"application/xml\")}:void 0!==self.ActiveXObject&&new self.ActiveXObject(\"Microsoft.XMLDOM\")?function(e){var t=new self.ActiveXObject(\"Microsoft.XMLDOM\");return t.async=\"false\",t.loadXML(e),t}:function(e){var t=document.createElement(\"div\");return t.innerHTML=e,t}}}),require_browser17=__commonJS({\"../../node_modules/.pnpm/parse-bmfont-xml@1.1.6/node_modules/parse-bmfont-xml/lib/browser.js\"(e,t){init_globals();var r=require_parse_attribs(),n=require_xml_parse_from_string(),i={scaleh:\"scaleH\",scalew:\"scaleW\",stretchh:\"stretchH\",lineheight:\"lineHeight\",alphachnl:\"alphaChnl\",redchnl:\"redChnl\",greenchnl:\"greenChnl\",bluechnl:\"blueChnl\"};function o(e){var t=function(e){for(var t=[],r=0;r__left_angle_mark_e.attributes.length;r++)t.push(e.attributes[r]);return t}(e);return t.reduce((function(e,t){var r;return e[(r=t.nodeName,i[r.toLowerCase()]||r)]=t.nodeValue,e}),{})}t.exports=function(e){e=e.toString();var t=n(e),i={pages:[],chars:[],kernings:[]};[\"info\",\"common\"].forEach((function(e){var n=t.getElementsByTagName(e)[0];n&&(i[e]=r(o(n)))}));var a=t.getElementsByTagName(\"pages\")[0];if(!a)throw new Error(\"malformed file -- no __left_angle_mark_pages> element\");for(var s=a.getElementsByTagName(\"page\"),l=0;l__left_angle_mark_s.length;l++){var u=s[l],c=parseInt(u.getAttribute(\"id\"),10),d=u.getAttribute(\"file\");if(isNaN(c))throw new Error('malformed file -- page \"id\" attribute is NaN');if(!d)throw new Error('malformed file -- needs page \"file\" attribute');i.pages[parseInt(c,10)]=d}return[\"chars\",\"kernings\"].forEach((function(e){var n=t.getElementsByTagName(e)[0];if(n)for(var a=e.substring(0,e.length-1),s=n.getElementsByTagName(a),l=0;l__left_angle_mark_s.length;l++){var u=s[l];i[e].push(r(o(u)))}})),i}}}),require_parse_bmfont_binary=__commonJS({\"../../node_modules/.pnpm/parse-bmfont-binary@1.0.6/node_modules/parse-bmfont-binary/index.js\"(e,t){init_globals();var r=[66,77,70];function n(e,t,r){if(r>t.length-1)return 0;var n=t.readUInt8(r++),o=t.readInt32LE(r);switch(r+=4,n){case 1:e.info=function(e,t){var r={};r.size=e.readInt16LE(t);var n=e.readUInt8(t+2);return r.smooth=n>>7&1,r.unicode=n>>6&1,r.italic=n>>5&1,r.bold=n>>4&1,n>>3&1&&(r.fixedHeight=1),r.charset=e.readUInt8(t+3)||\"\",r.stretchH=e.readUInt16LE(t+4),r.aa=e.readUInt8(t+6),r.padding=[e.readInt8(t+7),e.readInt8(t+8),e.readInt8(t+9),e.readInt8(t+10)],r.spacing=[e.readInt8(t+11),e.readInt8(t+12)],r.outline=e.readUInt8(t+13),r.face=function(e,t){return i(e,t).toString(\"utf8\")}(e,t+14),r}(t,r);break;case 2:e.common=function(e,t){var r={};return r.lineHeight=e.readUInt16LE(t),r.base=e.readUInt16LE(t+2),r.scaleW=e.readUInt16LE(t+4),r.scaleH=e.readUInt16LE(t+6),r.pages=e.readUInt16LE(t+8),e.readUInt8(t+10),r.packed=0,r.alphaChnl=e.readUInt8(t+11),r.redChnl=e.readUInt8(t+12),r.greenChnl=e.readUInt8(t+13),r.blueChnl=e.readUInt8(t+14),r}(t,r);break;case 3:e.pages=function(e,t,r){for(var n=[],o=i(e,t),a=o.length+1,s=r/a,l=0;l__left_angle_mark_s;l++)n[l]=e.slice(t,t+o.length).toString(\"utf8\"),t+=a;return n}(t,r,o);break;case 4:e.chars=function(e,t,r){for(var n=[],i=r/20,o=0;o__left_angle_mark_i;o++){var a={},s=20*o;a.id=e.readUInt32LE(t+0+s),a.x=e.readUInt16LE(t+4+s),a.y=e.readUInt16LE(t+6+s),a.width=e.readUInt16LE(t+8+s),a.height=e.readUInt16LE(t+10+s),a.xoffset=e.readInt16LE(t+12+s),a.yoffset=e.readInt16LE(t+14+s),a.xadvance=e.readInt16LE(t+16+s),a.page=e.readUInt8(t+18+s),a.chnl=e.readUInt8(t+19+s),n[o]=a}return n}(t,r,o);break;case 5:e.kernings=function(e,t,r){for(var n=[],i=r/10,o=0;o__left_angle_mark_i;o++){var a={},s=10*o;a.first=e.readUInt32LE(t+0+s),a.second=e.readUInt32LE(t+4+s),a.amount=e.readInt16LE(t+8+s),n[o]=a}return n}(t,r,o)}return 5+o}function i(e,t){for(var r=t;r__left_angle_mark_e.length&&0!==e[r];r++);return e.slice(t,r)}t.exports=function(e){if(e.length__left_angle_mark_6)throw new Error(\"invalid buffer length for BMFont\");if(!r.every((function(t,r){return e.readUInt8(r)===t})))throw new Error(\"BMFont missing BMF byte header\");var t=3;if(e.readUInt8(t++)>3)throw new Error(\"Only supports BMFont Binary v3 (BMFont App v1.10)\");for(var i={kernings:[],chars:[]},o=0;o__left_angle_mark_5;o++)t+=n(i,e,t);return i}}}),require_buffer_equal=__commonJS({\"../../node_modules/.pnpm/buffer-equal@0.0.1/node_modules/buffer-equal/index.js\"(e,t){init_globals();var r=require_buffer().Buffer;t.exports=function(e,t){if(r.isBuffer(e)&&r.isBuffer(t)){if(\"function\"==typeof e.equals)return e.equals(t);if(e.length!==t.length)return!1;for(var n=0;n__left_angle_mark_e.length;n++)if(e[n]!==t[n])return!1;return!0}}}}),require_is_binary=__commonJS({\"../../node_modules/.pnpm/load-bmfont@1.4.2/node_modules/load-bmfont/lib/is-binary.js\"(e,t){init_globals();var r=require_buffer_equal(),n=Buffer.from([66,77,70,3]);t.exports=function(e){return\"string\"==typeof e?\"BMF\"===e.substring(0,3):e.length>4&&r(e.slice(0,4),n)}}}),require_browser18=__commonJS({\"../../node_modules/.pnpm/load-bmfont@1.4.2/node_modules/load-bmfont/browser.js\"(e,t){init_globals();var r=require_xhr(),n=function(){},i=require_parse_bmfont_ascii(),o=require_browser17(),a=require_parse_bmfont_binary(),s=require_is_binary(),l=require_immutable(),u=self.XMLHttpRequest&&\"withCredentials\"in new XMLHttpRequest;t.exports=function(e,t){t=\"function\"==typeof t?t:n,\"string\"==typeof e?e={uri:e}:e||(e={}),e.binary&&(e=function(e){if(u)return l(e,{responseType:\"arraybuffer\"});if(void 0===self.XMLHttpRequest)throw new Error(\"your browser does not support XHR loading\");var t=new self.XMLHttpRequest;return t.overrideMimeType(\"text/plain; charset=x-user-defined\"),l({xhr:t},e)}(e)),r(e,(function(r,l,u){if(r)return t(r);if(!/^2/.test(l.statusCode))return t(new Error(\"http status code: \"+l.statusCode));if(!u)return t(new Error(\"no body result\"));var c,d,h=!1;if(c=u,\"[object ArrayBuffer]\"===Object.prototype.toString.call(c)){var f=new Uint8Array(u);u=Buffer.from(f,\"binary\")}s(u)&&(h=!0,\"string\"==typeof u&&(u=Buffer.from(u,\"binary\"))),h||(Buffer.isBuffer(u)&&(u=u.toString(e.encoding)),u=u.trim());try{var p=l.headers[\"content-type\"];d=h?a(u):/json/.test(p)||\"{\"===u.charAt(0)?JSON.parse(u):/xml/.test(p)||\"__left_angle_mark_\"===u.charAt(0)?o(u):i(u)}catch(m){t(new Error(\"error parsing font \"+m.message)),t=n}t(null,d)}))}}});function measureText(e,t){let r=0;for(let n=0;n__left_angle_mark_t.length;n++)if(e.chars[t[n]]){const i=e.kernings[t[n]]&&e.kernings[t[n]][t[n+1]]?e.kernings[t[n]][t[n+1]]:0;r+=(e.chars[t[n]].xadvance||0)+i}return r}function splitLines(e,t,r){const n=t.replace(/[\\r\\n]+/g,\" \\n\").split(\" \"),i=[];let o=[],a=0;return n.forEach((t=>{const n=[...o,t].join(\" \"),s=measureText(e,n);s__left_angle_mark_=r&&!t.includes(\"\\n\")?(s>a&&(a=s),o.push(t)):(i.push(o),o=[t.replace(\"\\n\",\"\")])})),i.push(o),{lines:i,longestLine:a}}function measureTextHeight(e,t,r){const{lines:n}=splitLines(e,t,r);return n.length*e.common.lineHeight}var init_measure_text=__esm({\"../../node_modules/.pnpm/@jimp+plugin-print@0.22.12_@jimp+custom@0.22.12_@jimp+plugin-blit@0.22.12_@jimp+custom@0.22.12_/node_modules/@jimp/plugin-print/es/measure-text.js\"(){init_globals()}}),import_path8,import_load_bmfont,dir,es_default39;function xOffsetBasedOnAlignment(e,t,r,n,i){return i===e.HORIZONTAL_ALIGN_LEFT?0:i===e.HORIZONTAL_ALIGN_CENTER?(n-measureText(t,r))/2:n-measureText(t,r)}function drawCharacter(e,t,r,n,i){if(i.width>0&&i.height>0){const o=t.pages[i.page];e.blit(o,r+i.xoffset,n+i.yoffset,i.x,i.y,i.width,i.height)}return e}function printText(e,t,r,n,i){for(let o=0;o__left_angle_mark_n.length;o++){let a;a=e.chars[n[o]]?n[o]:/\\s/.test(n[o])?\"\":\"?\";const s=e.chars[a]||{},l=e.kernings[a];drawCharacter(this,e,t,r,s||{}),t+=(l&&l[n[o+1]]?l[n[o+1]]:0)+(s.xadvance||i)}}function loadPages(e,t,r){const n=r.map((r=>e.read(t+\"/\"+r)));return Promise.all(n)}var init_es25=__esm({\"../../node_modules/.pnpm/@jimp+plugin-print@0.22.12_@jimp+custom@0.22.12_@jimp+plugin-blit@0.22.12_@jimp+custom@0.22.12_/node_modules/@jimp/plugin-print/es/index.js\"(){init_globals(),import_path8=__toESM(require_path_browserify()),import_load_bmfont=__toESM(require_browser18()),init_es(),init_measure_text(),dir=import_browser.default.env.DIRNAME||`${__dirname}/../`,es_default39=()=>({constants:{measureText:measureText,measureTextHeight:measureTextHeight,FONT_SANS_8_BLACK:import_path8.default.join(dir,\"fonts/open-sans/open-sans-8-black/open-sans-8-black.fnt\"),FONT_SANS_10_BLACK:import_path8.default.join(dir,\"fonts/open-sans/open-sans-10-black/open-sans-10-black.fnt\"),FONT_SANS_12_BLACK:import_path8.default.join(dir,\"fonts/open-sans/open-sans-12-black/open-sans-12-black.fnt\"),FONT_SANS_14_BLACK:import_path8.default.join(dir,\"fonts/open-sans/open-sans-14-black/open-sans-14-black.fnt\"),FONT_SANS_16_BLACK:import_path8.default.join(dir,\"fonts/open-sans/open-sans-16-black/open-sans-16-black.fnt\"),FONT_SANS_32_BLACK:import_path8.default.join(dir,\"fonts/open-sans/open-sans-32-black/open-sans-32-black.fnt\"),FONT_SANS_64_BLACK:import_path8.default.join(dir,\"fonts/open-sans/open-sans-64-black/open-sans-64-black.fnt\"),FONT_SANS_128_BLACK:import_path8.default.join(dir,\"fonts/open-sans/open-sans-128-black/open-sans-128-black.fnt\"),FONT_SANS_8_WHITE:import_path8.default.join(dir,\"fonts/open-sans/open-sans-8-white/open-sans-8-white.fnt\"),FONT_SANS_16_WHITE:import_path8.default.join(dir,\"fonts/open-sans/open-sans-16-white/open-sans-16-white.fnt\"),FONT_SANS_32_WHITE:import_path8.default.join(dir,\"fonts/open-sans/open-sans-32-white/open-sans-32-white.fnt\"),FONT_SANS_64_WHITE:import_path8.default.join(dir,\"fonts/open-sans/open-sans-64-white/open-sans-64-white.fnt\"),FONT_SANS_128_WHITE:import_path8.default.join(dir,\"fonts/open-sans/open-sans-128-white/open-sans-128-white.fnt\"),loadFont(e,t){return\"string\"!=typeof e?throwError.call(this,\"file must be a string\",t):new Promise(((r,n)=>{t=t||function(e,t){e?n(e):r(t)},(0,import_load_bmfont.default)(e,((r,n)=>{const i={},o={};if(r)return throwError.call(this,r,t);for(let e=0;e__left_angle_mark_n.chars.length;e++)i[String.fromCharCode(n.chars[e].id)]=n.chars[e];for(let e=0;e__left_angle_mark_n.kernings.length;e++){const t=String.fromCharCode(n.kernings[e].first);o[t]=o[t]||{},o[t][String.fromCharCode(n.kernings[e].second)]=n.kernings[e].amount}loadPages(this,import_path8.default.dirname(e),n.pages).then((e=>{t(null,{chars:i,kernings:o,pages:e,common:n.common,info:n.info})}))}))}))}},class:{print(e,t,r,n,i,o,a){if(\"function\"==typeof i&&void 0===a&&(a=i,i=1/0),void 0===i&&(i=1/0),\"function\"==typeof o&&void 0===a&&(a=o,o=1/0),void 0===o&&(o=1/0),\"object\"!=typeof e)return throwError.call(this,\"font must be a Jimp loadFont\",a);if(\"number\"!=typeof t||\"number\"!=typeof r||\"number\"!=typeof i)return throwError.call(this,\"x, y and maxWidth must be numbers\",a);if(\"number\"!=typeof i)return throwError.call(this,\"maxWidth must be a number\",a);if(\"number\"!=typeof o)return throwError.call(this,\"maxHeight must be a number\",a);let s,l;\"object\"==typeof n&&null!==n.text&&void 0!==n.text?(s=n.alignmentX||this.constructor.HORIZONTAL_ALIGN_LEFT,l=n.alignmentY||this.constructor.VERTICAL_ALIGN_TOP,({text:n}=n)):(s=this.constructor.HORIZONTAL_ALIGN_LEFT,l=this.constructor.VERTICAL_ALIGN_TOP,n=n.toString()),o!==1/0&&l===this.constructor.VERTICAL_ALIGN_BOTTOM?r+=o-measureTextHeight(e,n,i):o!==1/0&&l===this.constructor.VERTICAL_ALIGN_MIDDLE&&(r+=o/2-measureTextHeight(e,n,i)/2);const u=Object.entries(e.chars)[0][1].xadvance,{lines:c,longestLine:d}=splitLines(e,n,i);return c.forEach((n=>{const o=n.join(\" \"),a=xOffsetBasedOnAlignment(this.constructor,e,o,i,s);printText.call(this,e,t+a,r,o,u),r+=e.common.lineHeight})),isNodePattern(a)&&a.call(this,null,this,{x:t+d,y:r}),this}}})}}),resize_default;function Resize(e,t,r,n,i,o,a){this.widthOriginal=Math.abs(Math.floor(e)||0),this.heightOriginal=Math.abs(Math.floor(t)||0),this.targetWidth=Math.abs(Math.floor(r)||0),this.targetHeight=Math.abs(Math.floor(n)||0),this.colorChannels=i?4:3,this.interpolationPass=Boolean(o),this.resizeCallback=\"function\"==typeof a?a:function(){},this.targetWidthMultipliedByChannels=this.targetWidth*this.colorChannels,this.originalWidthMultipliedByChannels=this.widthOriginal*this.colorChannels,this.originalHeightMultipliedByChannels=this.heightOriginal*this.colorChannels,this.widthPassResultSize=this.targetWidthMultipliedByChannels*this.heightOriginal,this.finalResultSize=this.targetWidthMultipliedByChannels*this.targetHeight,this.initialize()}var init_resize=__esm({\"../../node_modules/.pnpm/@jimp+plugin-resize@0.22.12_@jimp+custom@0.22.12/node_modules/@jimp/plugin-resize/es/modules/resize.js\"(){init_globals(),Resize.prototype.initialize=function(){if(!(this.widthOriginal>0&&this.heightOriginal>0&&this.targetWidth>0&&this.targetHeight>0))throw new Error(\"Invalid settings specified for the resizer.\");this.configurePasses()},Resize.prototype.configurePasses=function(){this.widthOriginal===this.targetWidth?this.resizeWidth=this.bypassResizer:(this.ratioWeightWidthPass=this.widthOriginal/this.targetWidth,this.ratioWeightWidthPass__left_angle_mark_1&&this.interpolationPass?(this.initializeFirstPassBuffers(!0),this.resizeWidth=4===this.colorChannels?this.resizeWidthInterpolatedRGBA:this.resizeWidthInterpolatedRGB):(this.initializeFirstPassBuffers(!1),this.resizeWidth=4===this.colorChannels?this.resizeWidthRGBA:this.resizeWidthRGB)),this.heightOriginal===this.targetHeight?this.resizeHeight=this.bypassResizer:(this.ratioWeightHeightPass=this.heightOriginal/this.targetHeight,this.ratioWeightHeightPass__left_angle_mark_1&&this.interpolationPass?(this.initializeSecondPassBuffers(!0),this.resizeHeight=this.resizeHeightInterpolated):(this.initializeSecondPassBuffers(!1),this.resizeHeight=4===this.colorChannels?this.resizeHeightRGBA:this.resizeHeightRGB))},Resize.prototype._resizeWidthInterpolatedRGBChannels=function(e,t){const r=t?4:3,n=this.ratioWeightWidthPass,i=this.widthBuffer;let o,a,s=0,l=0,u=0,c=0,d=0;for(o=0;s__left_angle_mark_1/3;o+=r,s+=n)for(l=o,u=0;l__left_angle_mark_this.widthPassResultSize;u+=this.originalWidthMultipliedByChannels,l+=this.targetWidthMultipliedByChannels)i[l]=e[u],i[l+1]=e[u+1],i[l+2]=e[u+2],t&&(i[l+3]=e[u+3]);for(s-=1/3,a=this.widthOriginal-1;s__left_angle_mark_a;o+=r,s+=n)for(d=s%1,c=1-d,l=o,u=Math.floor(s)*r;l__left_angle_mark_this.widthPassResultSize;u+=this.originalWidthMultipliedByChannels,l+=this.targetWidthMultipliedByChannels)i[l+0]=e[u+0]*c+e[u+r+0]*d,i[l+1]=e[u+1]*c+e[u+r+1]*d,i[l+2]=e[u+2]*c+e[u+r+2]*d,t&&(i[l+3]=e[u+3]*c+e[u+r+3]*d);for(a=this.originalWidthMultipliedByChannels-r;o__left_angle_mark_this.targetWidthMultipliedByChannels;o+=r)for(l=o,u=a;l__left_angle_mark_this.widthPassResultSize;u+=this.originalWidthMultipliedByChannels,l+=this.targetWidthMultipliedByChannels)i[l]=e[u],i[l+1]=e[u+1],i[l+2]=e[u+2],t&&(i[l+3]=e[u+3]);return i},Resize.prototype._resizeWidthRGBChannels=function(e,t){const r=t?4:3,n=this.ratioWeightWidthPass,i=1/n,o=this.originalWidthMultipliedByChannels-r+1,a=this.targetWidthMultipliedByChannels-r+1,s=this.outputWidthWorkBench,l=this.widthBuffer,u=this.outputWidthWorkBenchOpaquePixelsCount;let c=0,d=0,h=0,f=0,p=0,m=0,g=0,_=1,b=0,y=0,v=0,A=0;do{for(p=0;p__left_angle_mark_this.originalHeightMultipliedByChannels;)s[p++]=0,s[p++]=0,s[p++]=0,t&&(s[p++]=0,u[p/r-1]=0);c=n;do{for(d=1+h-f,_=Math.min(c,d),p=0,m=h;p__left_angle_mark_this.originalHeightMultipliedByChannels;m+=o)b=e[m],y=e[++m],v=e[++m],A=t?e[++m]:255,s[p++]+=(A?b:0)*_,s[p++]+=(A?y:0)*_,s[p++]+=(A?v:0)*_,t&&(s[p++]+=A*_,u[p/r-1]+=A?_:0);if(!(c>=d)){f+=c;break}h+=r,f=h,c-=d}while(c>0&&h__left_angle_mark_this.originalWidthMultipliedByChannels);for(p=0,m=g;p__left_angle_mark_this.originalHeightMultipliedByChannels;m+=a)c=t?u[p/r]:1,_=t?c?1/c:0:i,l[m]=s[p++]*_,l[++m]=s[p++]*_,l[++m]=s[p++]*_,t&&(l[++m]=s[p++]*i);g+=r}while(g__left_angle_mark_this.targetWidthMultipliedByChannels);return l},Resize.prototype._resizeHeightRGBChannels=function(e,t){const r=this.ratioWeightHeightPass,n=1/r,i=this.outputHeightWorkBench,o=this.heightBuffer,a=this.outputHeightWorkBenchOpaquePixelsCount;let s=0,l=0,u=0,c=0,d=0,h=0,f=0,p=1,m=0,g=0,_=0,b=0;do{for(d=0;d__left_angle_mark_this.targetWidthMultipliedByChannels;)i[d++]=0,i[d++]=0,i[d++]=0,t&&(i[d++]=0,a[d/4-1]=0);s=r;do{for(l=1+u-c,p=Math.min(s,l),f=u,d=0;d__left_angle_mark_this.targetWidthMultipliedByChannels;)m=e[f++],g=e[f++],_=e[f++],b=t?e[f++]:255,i[d++]+=(b?m:0)*p,i[d++]+=(b?g:0)*p,i[d++]+=(b?_:0)*p,t&&(i[d++]+=b*p,a[d/4-1]+=b?p:0);if(!(s>=l)){c+=s;break}u=f,c=u,s-=l}while(s>0&&u__left_angle_mark_this.widthPassResultSize);for(d=0;d__left_angle_mark_this.targetWidthMultipliedByChannels;)s=t?a[d/4]:1,p=t?s?1/s:0:n,o[h++]=Math.round(i[d++]*p),o[h++]=Math.round(i[d++]*p),o[h++]=Math.round(i[d++]*p),t&&(o[h++]=Math.round(i[d++]*n))}while(h__left_angle_mark_this.finalResultSize);return o},Resize.prototype.resizeWidthInterpolatedRGB=function(e){return this._resizeWidthInterpolatedRGBChannels(e,!1)},Resize.prototype.resizeWidthInterpolatedRGBA=function(e){return this._resizeWidthInterpolatedRGBChannels(e,!0)},Resize.prototype.resizeWidthRGB=function(e){return this._resizeWidthRGBChannels(e,!1)},Resize.prototype.resizeWidthRGBA=function(e){return this._resizeWidthRGBChannels(e,!0)},Resize.prototype.resizeHeightInterpolated=function(e){const t=this.ratioWeightHeightPass,r=this.heightBuffer;let n,i=0,o=0,a=0,s=0,l=0,u=0,c=0;for(;i__left_angle_mark_1/3;i+=t)for(a=0;a__left_angle_mark_this.targetWidthMultipliedByChannels;)r[o++]=Math.round(e[a++]);for(i-=1/3,n=this.heightOriginal-1;i__left_angle_mark_n;i+=t)for(c=i%1,u=1-c,s=Math.floor(i)*this.targetWidthMultipliedByChannels,l=s+this.targetWidthMultipliedByChannels,a=0;a__left_angle_mark_this.targetWidthMultipliedByChannels;++a)r[o++]=Math.round(e[s++]*u+e[l++]*c);for(;o__left_angle_mark_this.finalResultSize;)for(a=0,s=n*this.targetWidthMultipliedByChannels;a__left_angle_mark_this.targetWidthMultipliedByChannels;++a)r[o++]=Math.round(e[s++]);return r},Resize.prototype.resizeHeightRGB=function(e){return this._resizeHeightRGBChannels(e,!1)},Resize.prototype.resizeHeightRGBA=function(e){return this._resizeHeightRGBChannels(e,!0)},Resize.prototype.resize=function(e){this.resizeCallback(this.resizeHeight(this.resizeWidth(e)))},Resize.prototype.bypassResizer=function(e){return e},Resize.prototype.initializeFirstPassBuffers=function(e){this.widthBuffer=this.generateFloatBuffer(this.widthPassResultSize),e||(this.outputWidthWorkBench=this.generateFloatBuffer(this.originalHeightMultipliedByChannels),this.colorChannels>3&&(this.outputWidthWorkBenchOpaquePixelsCount=this.generateFloat64Buffer(this.heightOriginal)))},Resize.prototype.initializeSecondPassBuffers=function(e){this.heightBuffer=this.generateUint8Buffer(this.finalResultSize),e||(this.outputHeightWorkBench=this.generateFloatBuffer(this.targetWidthMultipliedByChannels),this.colorChannels>3&&(this.outputHeightWorkBenchOpaquePixelsCount=this.generateFloat64Buffer(this.targetWidth)))},Resize.prototype.generateFloatBuffer=function(e){try{return new Float32Array(e)}catch(t){return[]}},Resize.prototype.generateFloat64Buffer=function(e){try{return new Float64Array(e)}catch(t){return[]}},Resize.prototype.generateUint8Buffer=function(e){try{return new Uint8Array(e)}catch(t){return[]}},resize_default=Resize}}),operations,resize2_default,init_resize2=__esm({\"../../node_modules/.pnpm/@jimp+plugin-resize@0.22.12_@jimp+custom@0.22.12/node_modules/@jimp/plugin-resize/es/modules/resize2.js\"(){init_globals(),resize2_default=operations={nearestNeighbor(e,t){const r=e.width,n=e.height,i=t.width,o=t.height,a=e.data,s=t.data;for(let l=0;l__left_angle_mark_o;l++)for(let e=0;e__left_angle_mark_i;e++){let t=4*(l*i+e),u=4*(Math.floor(l*n/o)*r+Math.floor(e*r/i));s[t++]=a[u++],s[t++]=a[u++],s[t++]=a[u++],s[t++]=a[u++]}},bilinearInterpolation(e,t){const r=e.width,n=e.height,i=t.width,o=t.height,a=e.data,s=t.data,l=function(e,t,r,n,i){return t===n?r:Math.round((e-t)*i+(n-e)*r)},u=function(e,t,n,i,o,u,c,d){let h=4*(c*r+i)+t,f=4*(c*r+o)+t;const p=l(n,i,a[h],o,a[f]);if(d===c)s[e+t]=p;else{h=4*(d*r+i)+t,f=4*(d*r+o)+t;const m=l(n,i,a[h],o,a[f]);s[e+t]=l(u,c,p,d,m)}};for(let c=0;c__left_angle_mark_o;c++)for(let e=0;e__left_angle_mark_i;e++){const t=4*(c*i+e),a=e*r/i,s=Math.floor(a),l=Math.min(Math.ceil(a),r-1),d=c*n/o,h=Math.floor(d),f=Math.min(Math.ceil(d),n-1);u(t,0,a,s,l,d,h,f),u(t,1,a,s,l,d,h,f),u(t,2,a,s,l,d,h,f),u(t,3,a,s,l,d,h,f)}},_interpolate2D(e,t,r,n){const i=e.data,o=t.data,a=e.width,s=e.height,l=t.width,u=t.height,c=Math.max(1,Math.floor(a/l)),d=l*c,h=Math.max(1,Math.floor(s/u)),f=u*h,p=Buffer.alloc(d*s*4);for(let _=0;___left_angle_mark_s;_++)for(let e=0;e__left_angle_mark_d;e++){const t=e*(a-1)/d,r=Math.floor(t),o=t-r,s=4*(_*a+r),l=4*(_*d+e);for(let e=0;e__left_angle_mark_4;e++){const t=s+e,u=r>0?i[t-4]:2*i[t]-i[t+4],c=i[t],d=i[t+4],h=r__left_angle_mark_a-2?i[t+8]:2*i[t+4]-i[t];p[l+e]=n(u,c,d,h,o)}}const m=Buffer.alloc(d*f*4);for(let _=0;___left_angle_mark_f;_++)for(let e=0;e__left_angle_mark_d;e++){const t=_*(s-1)/f,r=Math.floor(t),i=t-r,o=4*(r*d+e),a=4*(_*d+e);for(let e=0;e__left_angle_mark_4;e++){const t=o+e,l=r>0?p[t-4*d]:2*p[t]-p[t+4*d],u=p[t],c=p[t+4*d],h=r__left_angle_mark_s-2?p[t+8*d]:2*p[t+4*d]-p[t];m[a+e]=n(l,u,c,h,i)}}const g=c*h;if(g>1)for(let _=0;___left_angle_mark_u;_++)for(let e=0;e__left_angle_mark_l;e++){let t=0,r=0,n=0,i=0,a=0;for(let o=0;o__left_angle_mark_h;o++){const s=_*h+o;for(let o=0;o__left_angle_mark_c;o++){const l=4*(s*d+(e*c+o)),u=m[l+3];u&&(t+=m[l],r+=m[l+1],n+=m[l+2],a++),i+=u}}const s=4*(_*l+e);o[s]=a?Math.round(t/a):0,o[s+1]=a?Math.round(r/a):0,o[s+2]=a?Math.round(n/a):0,o[s+3]=Math.round(i/g)}else t.data=m},bicubicInterpolation(e,t,r){return this._interpolate2D(e,t,r,(function(e,t,r,n,i){const o=n-r-e+t,a=e-t-o,s=r-e,l=t;return Math.max(0,Math.min(255,o*(i*i*i)+a*(i*i)+s*i+l))}))},hermiteInterpolation(e,t,r){return this._interpolate2D(e,t,r,(function(e,t,r,n,i){const o=t,a=.5*(r-e),s=e-2.5*t+2*r-.5*n,l=.5*(n-e)+1.5*(t-r);return Math.max(0,Math.min(255,Math.round(((l*i+s)*i+a)*i+o)))}))},bezierInterpolation(e,t,r){return this._interpolate2D(e,t,r,(function(e,t,r,n,i){const o=1-i,a=t*o*o*o,s=3*(t+(r-e)/4)*o*o*i,l=3*(r-(n-t)/4)*o*i*i,u=r*i*i*i;return Math.max(0,Math.min(255,Math.round(a+s+l+u)))}))}}}}),es_default40,init_es26=__esm({\"../../node_modules/.pnpm/@jimp+plugin-resize@0.22.12_@jimp+custom@0.22.12/node_modules/@jimp/plugin-resize/es/index.js\"(){init_globals(),init_es(),init_resize(),init_resize2(),es_default40=()=>({constants:{RESIZE_NEAREST_NEIGHBOR:\"nearestNeighbor\",RESIZE_BILINEAR:\"bilinearInterpolation\",RESIZE_BICUBIC:\"bicubicInterpolation\",RESIZE_HERMITE:\"hermiteInterpolation\",RESIZE_BEZIER:\"bezierInterpolation\"},class:{resize(e,t,r,n){if(\"number\"!=typeof e||\"number\"!=typeof t)return throwError.call(this,\"w and h must be numbers\",n);if(\"function\"==typeof r&&void 0===n&&(n=r,r=null),e===this.constructor.AUTO&&t===this.constructor.AUTO)return throwError.call(this,\"w and h cannot both be set to auto\",n);if(e===this.constructor.AUTO&&(e=this.bitmap.width*(t/this.bitmap.height)),t===this.constructor.AUTO&&(t=this.bitmap.height*(e/this.bitmap.width)),e__left_angle_mark_0||t__left_angle_mark_0)return throwError.call(this,\"w and h must be positive numbers\",n);if(e=Math.round(e)||1,t=Math.round(t)||1,\"function\"==typeof resize2_default[r]){const n={data:Buffer.alloc(e*t*4),width:e,height:t};resize2_default[r](this.bitmap,n),this.bitmap=n}else{const r=this;new resize_default(this.bitmap.width,this.bitmap.height,e,t,!0,!0,(n=>{r.bitmap.data=Buffer.from(n),r.bitmap.width=e,r.bitmap.height=t})).resize(this.bitmap.data)}return isNodePattern(n)&&n.call(this,null,this),this}}})}}),es_default41;function matrixRotate(e){if(Math.abs(e)%90!=0)throw new Error(\"Unsupported matrix rotation degree\");if(e%=360,0===Math.abs(e))return;const t=this.bitmap.width,r=this.bitmap.height;let n;switch(e){case 90:case-270:n=90;break;case 180:case-180:n=180;break;case 270:case-90:n=-90;break;default:throw new Error(\"Unsupported matrix rotation degree\")}const i=180===n?t:r,o=180===n?r:t,a=Buffer.alloc(this.bitmap.data.length);function s(e,t){return function(t,r){return r*e+t__left_angle_mark___left_angle_mark_2}}const l=s(t),u=s(i);for(let c=0;c__left_angle_mark_t;c++)for(let e=0;e__left_angle_mark_r;e++){const i=l(c,e),o=this.bitmap.data.readUInt32BE(i);let s;switch(n){case 90:s=u(e,t-c-1);break;case-90:s=u(r-e-1,c);break;case 180:s=u(t-c-1,r-e-1);break;default:throw new Error(\"Unsupported matrix rotation angle\")}a.writeUInt32BE(o,s)}this.bitmap.data=a,this.bitmap.width=i,this.bitmap.height=o}function advancedRotate(e,t){const r=(e%=360)*Math.PI/180,n=Math.cos(r),i=Math.sin(r);let o=this.bitmap.width,a=this.bitmap.height;if(!0===t||\"string\"==typeof t){o=Math.ceil(Math.abs(this.bitmap.width*n)+Math.abs(this.bitmap.height*i))+1,a=Math.ceil(Math.abs(this.bitmap.width*i)+Math.abs(this.bitmap.height*n))+1,o%2!=0&&o++,a%2!=0&&a++;const e=this.cloneQuiet();this.scanQuiet(0,0,this.bitmap.width,this.bitmap.height,(function(e,t,r){this.bitmap.data.writeUInt32BE(this._background,r)}));const r=Math.max(o,a,this.bitmap.width,this.bitmap.height);this.resize(r,r,t),this.blit(e,this.bitmap.width/2-e.bitmap.width/2,this.bitmap.height/2-e.bitmap.height/2)}const s=this.bitmap.width,l=this.bitmap.height,u=Buffer.alloc(this.bitmap.data.length);function c(e,t){return function(r,n){return{x:r+e,y:n+t}}}const d=c(-s/2,-l/2),h=c(s/2+.5,l/2+.5);for(let f=1;f__left_angle_mark_=l;f++)for(let e=1;e__left_angle_mark_=s;e++){const t=d(e,f),r=h(n*t.x-i*t.y,n*t.y+i*t.x),o=s*(f-1)+e-1__left_angle_mark___left_angle_mark_2;if(r.x>=0&&r.x__left_angle_mark_s&&r.y>=0&&r.y__left_angle_mark_l){const e=s*(0|r.y)+r.x__left_angle_mark___left_angle_mark_2,t=this.bitmap.data.readUInt32BE(e);u.writeUInt32BE(t,o)}else u.writeUInt32BE(this._background,o)}if(this.bitmap.data=u,!0===t||\"string\"==typeof t){const e=s/2-o/2,t=l/2-a/2;this.crop(e,t,o,a)}}var init_es27=__esm({\"../../node_modules/.pnpm/@jimp+plugin-rotate@0.22.12_@jimp+custom@0.22.12_@jimp+plugin-blit@0.22.12_@jimp+custom@0.22._ejcvbfwypd4klggwlqcpb6e3wq/node_modules/@jimp/plugin-rotate/es/index.js\"(){init_globals(),init_es(),es_default41=()=>({rotate(e,t,r){return null==t&&(t=!0),\"function\"==typeof t&&void 0===r&&(r=t,t=!0),\"number\"!=typeof e?throwError.call(this,\"deg must be a number\",r):\"boolean\"!=typeof t&&\"string\"!=typeof t?throwError.call(this,\"mode must be a boolean or a string\",r):(e%90!=0||!t&&this.bitmap.width!==this.bitmap.height&&e%180!=0?advancedRotate.call(this,e,t,r):matrixRotate.call(this,e),isNodePattern(r)&&r.call(this,null,this),this)}})}}),es_default42,init_es28=__esm({\"../../node_modules/.pnpm/@jimp+plugin-scale@0.22.12_@jimp+custom@0.22.12_@jimp+plugin-resize@0.22.12_@jimp+custom@0.22.12_/node_modules/@jimp/plugin-scale/es/index.js\"(){init_globals(),init_es(),es_default42=()=>({scale(e,t,r){if(\"number\"!=typeof e)return throwError.call(this,\"f must be a number\",r);if(e__left_angle_mark_0)return throwError.call(this,\"f must be a positive number\",r);\"function\"==typeof t&&void 0===r&&(r=t,t=null);const n=this.bitmap.width*e,i=this.bitmap.height*e;return this.resize(n,i,t),isNodePattern(r)&&r.call(this,null,this),this},scaleToFit(e,t,r,n){if(\"number\"!=typeof e||\"number\"!=typeof t)return throwError.call(this,\"w and h must be numbers\",n);\"function\"==typeof r&&void 0===n&&(n=r,r=null);const i=e/t>this.bitmap.width/this.bitmap.height?t/this.bitmap.height:e/this.bitmap.width;return this.scale(i,r),isNodePattern(n)&&n.call(this,null,this),this}})}}),es_default43,init_es29=__esm({\"../../node_modules/.pnpm/@jimp+plugin-shadow@0.22.12_@jimp+custom@0.22.12_@jimp+plugin-blur@0.22.12_@jimp+custom@0.22._uzshnjriuzllxa3uwd3xmomyqy/node_modules/@jimp/plugin-shadow/es/index.js\"(){init_globals(),init_es(),es_default43=()=>({shadow(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;\"function\"==typeof e&&(t=e,e={});const{opacity:r=.7,size:n=1.1,x:i=-25,y:o=25,blur:a=5}=e,s=this.clone(),l=this.clone();return l.scan(0,0,l.bitmap.width,l.bitmap.height,((e,t,n)=>{l.bitmap.data[n]=0,l.bitmap.data[n+1]=0,l.bitmap.data[n+2]=0,l.bitmap.data[n+3]=l.constructor.limit255(l.bitmap.data[n+3]*r),this.bitmap.data[n]=0,this.bitmap.data[n+1]=0,this.bitmap.data[n+2]=0,this.bitmap.data[n+3]=0})),l.resize(l.bitmap.width*n,l.bitmap.height*n).blur(a),this.composite(l,i,o),this.composite(s,0,0),isNodePattern(t)&&t.call(this,null,this),this}})}}),es_default44,init_es30=__esm({\"../../node_modules/.pnpm/@jimp+plugin-threshold@0.22.12_@jimp+custom@0.22.12_@jimp+plugin-color@0.22.12_@jimp+custom@0_ulk3erdph25ycxw6wn5v37detq/node_modules/@jimp/plugin-threshold/es/index.js\"(){init_globals(),init_es(),es_default44=()=>({threshold(e,t){let{max:r,replace:n=255,autoGreyscale:i=!0}=e;return\"number\"!=typeof r?throwError.call(this,\"max must be a number\",t):\"number\"!=typeof n?throwError.call(this,\"replace must be a number\",t):\"boolean\"!=typeof i?throwError.call(this,\"autoGreyscale must be a boolean\",t):(r=this.constructor.limit255(r),n=this.constructor.limit255(n),i&&this.greyscale(),this.scanQuiet(0,0,this.bitmap.width,this.bitmap.height,((e,t,i)=>{const o=this.bitmap.data[i]__left_angle_mark_r?this.bitmap.data[i]:n;this.bitmap.data[i]=o,this.bitmap.data[i+1]=o,this.bitmap.data[i+2]=o})),isNodePattern(t)&&t.call(this,null,this),this)}})}}),import_timm2,plugins,es_default45,init_es31=__esm({\"../../node_modules/.pnpm/@jimp+plugins@0.22.12_@jimp+custom@0.22.12/node_modules/@jimp/plugins/es/index.js\"(){init_globals(),import_timm2=__toESM(require_timm()),init_es10(),init_es11(),init_es12(),init_es13(),init_es14(),init_es15(),init_es16(),init_es17(),init_es18(),init_es19(),init_es20(),init_es21(),init_es22(),init_es23(),init_es24(),init_es25(),init_es26(),init_es27(),init_es28(),init_es29(),init_es30(),plugins=[es_default25,es_default26,es_default27,es_default28,es_default29,es_default30,pluginCrop,es_default31,es_default32,es_default33,es_default34,es_default35,es_default36,es_default37,es_default38,es_default39,es_default40,es_default41,es_default42,es_default43,es_default44],es_default45=e=>{const t=plugins.map((t=>{let r=t(e)||{};return r.class||r.constants||(r={class:r}),r}));return(0,import_timm2.mergeDeep)(...t)}}}),es_exports={},es_default46;__export(es_exports,{default:()=>es_default46});var init_es32=__esm({\"../../node_modules/.pnpm/jimp@0.22.12/node_modules/jimp/es/index.js\"(){init_globals(),init_es3(),init_es9(),init_es31(),es_default46=configure({types:[es_default24],plugins:[es_default45]})}}),require_img=__commonJS({\"../shared/dist/lib/img.js\"(e,t){init_globals();var r,n=Object.create,i=Object.defineProperty,o=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,s=Object.getPrototypeOf,l=Object.prototype.hasOwnProperty,u=(e,t,r,n)=>{if(t&&\"object\"==typeof t||\"function\"==typeof t)for(let s of a(t))l.call(e,s)||s===r||i(e,s,{get:()=>t[s],enumerable:!(n=o(t,s))||n.enumerable});return e},c=(e,t,r)=>(r=null!=e?n(s(e)):{},u(!t&&e&&e.__esModule?r:i(r,\"default\",{value:e,enumerable:!0}),e)),d=(e,t,r)=>new Promise(((n,i)=>{var o=e=>{try{s(r.next(e))}catch(t){i(t)}},a=e=>{try{s(r.throw(e))}catch(t){i(t)}},s=e=>e.done?n(e.value):Promise.resolve(e.value).then(o,a);s((r=r.apply(e,t)).next())})),h={};((e,t)=>{for(var r in t)i(e,r,{get:t[r],enumerable:!0})})(h,{base64Encoded:()=>A,base64ToPngFormat:()=>w,bufferFromBase64:()=>v,calculateNewDimensions:()=>R,compositeElementInfoImg:()=>O,imageInfo:()=>b,imageInfoOfBase64:()=>y,processImageElementInfo:()=>B,resizeImg:()=>C,resizeImgBase64:()=>T,saveBase64Image:()=>E,transformImgPathToBase64:()=>x,trimImage:()=>I}),t.exports=(r=h,u(i({},\"__esModule\",{value:!0}),r));var f=c(require_assert()),p=require_buffer(),m=require_fs(),g=\"undefined\"!=typeof window;function _(){return d(this,null,(function*(){return g?(yield Promise.resolve().then((()=>__toESM(require_jimp()))),window.Jimp):(yield Promise.resolve().then((()=>(init_es32(),es_exports)))).default}))}function b(e){return d(this,null,(function*(){const t=yield _();let r;if(\"string\"==typeof e)r=yield t.read(e);else if(p.Buffer.isBuffer(e))r=yield t.read(e);else{if(!(e instanceof t))throw new Error(\"Invalid image input: must be a string path or a Buffer\");r=e}const{width:n,height:i}=r.bitmap;return(0,f.default)(n&&i,`Invalid image: ${\"string\"==typeof e?e:\"Buffer\"}`),{width:n,height:i,jimpImage:r}}))}function y(e){return d(this,null,(function*(){return b(yield v(e))}))}function v(e){return d(this,null,(function*(){const t=e.replace(/^data:image\\/\\w+;base64,/,\"\");return p.Buffer.from(t,\"base64\")}))}function A(e,t=!0){const r=(0,m.readFileSync)(e);if(!t)return r.toString(\"base64\");if(e.endsWith(\"png\"))return`data:image/png;base64,${r.toString(\"base64\")}`;if(e.endsWith(\"jpg\")||e.endsWith(\"jpeg\"))return`data:image/jpeg;base64,${r.toString(\"base64\")}`;throw new Error(\"unsupported image type\")}function w(e){return`data:image/png;base64,${e}`}var S=require_buffer();function E(e){return d(this,null,(function*(){const{base64Data:t,outputPath:r}=e,n=t.split(\";base64,\").pop()||t,i=S.Buffer.from(n,\"base64\"),o=yield _(),a=yield o.read(i);yield a.writeAsync(r)}))}function x(e){return d(this,null,(function*(){const t=yield _(),r=yield t.read(e);return(yield r.getBufferAsync(t.MIME_PNG)).toString(\"base64\")}))}function C(e,t){return d(this,null,(function*(){if(\"string\"==typeof e)throw Error(\"inputData is base64, use resizeImgBase64 instead\");const r=yield _(),n=yield r.read(e),{width:i,height:o}=n.bitmap;if(!i||!o)throw Error(\"Undefined width or height from the input image.\");const a=t||R(i,o);return n.resize(a.width,a.height,r.RESIZE_NEAREST_NEIGHBOR),yield n.getBufferAsync(r.MIME_PNG)}))}function T(e,t){return d(this,null,(function*(){const r=\";base64,\",n=e.split(r);if(2!==n.length)throw Error(\"Invalid base64 data\");const i=S.Buffer.from(n[1],\"base64\"),o=(yield C(i,t)).toString(\"base64\");return`${n[0]}${r}${o}`}))}function R(e,t){let r=e,n=t;const i=e/t;return e>2048&&(r=2048,n=r/i),n>768&&(n=768,r=n*i),{width:Math.round(r),height:Math.round(n)}}function I(e){return d(this,null,(function*(){const t=yield _(),r=yield t.read(S.Buffer.isBuffer(e)?e:S.Buffer.from(e)),{width:n,height:i}=r.bitmap;if(n__left_angle_mark_=3||i__left_angle_mark_=3)return null;const o=r.autocrop(),{width:a,height:s}=o.bitmap,l=(n-a)/2,u=(i-s)/2;return 0===l&&0===u?null:{trimOffsetLeft:-l,trimOffsetTop:-u,width:a,height:s}}))}var k=c(require_assert()),P=null,M=(e,t,r)=>d(void 0,null,(function*(){const n=yield _(),i=new n(t,r,0),o=[{rect:4278190335,text:4294967295}];for(let s=0;s__left_angle_mark_e.length;s++){const l=e[s],u=o[s%o.length],c={left:Math.max(0,l.rect.left-5),top:Math.max(0,l.rect.top-5),width:Math.min(t-l.rect.left,l.rect.width+10),height:Math.min(r-l.rect.top,l.rect.height+10)};i.scan(c.left,c.top,c.width,c.height,(function(e,t,r){e!==c.left&&e!==c.left+c.width-1&&t!==c.top&&t!==c.top+c.height-1||(this.bitmap.data[r+0]=u.rect>>24&255,this.bitmap.data[r+1]=u.rect>>16&255,this.bitmap.data[r+2]=u.rect>>8&255,this.bitmap.data[r+3]=255&u.rect)}));const d=12,h=8*l.indexId.toString().length+5,f=d+4;let p=c.left-h,m=c.top+c.height/2-d/2-2;const g=(t,r)=>e.slice(0,s).some((e=>t__left_angle_mark_e.rect.left+e.rect.width&&t+h>e.rect.left&&r__left_angle_mark_e.rect.top+e.rect.height&&r+f>e.rect.top)),_=(e,n)=>e>=0&&e+h__left_angle_mark_=t&&n>=0&&n+f__left_angle_mark_=r;!g(p,m)&&_(p,m)||(!g(c.left,c.top-f-2)&&_(c.left,c.top-f-2)?(p=c.left,m=c.top-f-2):!g(c.left,c.top+c.height+2)&&_(c.left,c.top+c.height+2)?(p=c.left,m=c.top+c.height+2):!g(c.left+c.width+2,c.top)&&_(c.left+c.width+2,c.top)?(p=c.left+c.width+2,m=c.top):(p=c.left,m=c.top+2)),i.scan(p,m,h,f,(function(e,t,r){this.bitmap.data[r+0]=u.rect>>24&255,this.bitmap.data[r+1]=u.rect>>16&255,this.bitmap.data[r+2]=u.rect>>8&255,this.bitmap.data[r+3]=255&u.rect}));try{P=P||(yield n.loadFont(n.FONT_SANS_16_WHITE))}catch(a){import_console_browserify.default.error(\"Error loading font\",a)}i.print(P,p,m,{text:l.indexId.toString(),alignmentX:n.HORIZONTAL_ALIGN_CENTER,alignmentY:n.VERTICAL_ALIGN_MIDDLE},h,f)}return i})),O=e=>d(void 0,null,(function*(){(0,k.default)(e.inputImgBase64,\"inputImgBase64 is required\");let t,r=0,n=0;const i=yield _();if(e.size&&(r=e.size.width,n=e.size.height),r&&n){const o=yield v(e.inputImgBase64);t=yield i.read(o);const a=t.bitmap;a.width===r&&a.height===n||t.resize(r,n,i.RESIZE_NEAREST_NEIGHBOR)}else{const i=yield y(e.inputImgBase64);r=i.width,n=i.height,t=i.jimpImage}if(!r||!n)throw Error(\"Image processing failed because width or height is undefined\");const{elementsPositionInfo:o}=e;return yield Promise.resolve(t).then((e=>d(void 0,null,(function*(){const t=yield M(o,r,n),a=yield i.read(t);return yield e.composite(a,0,0,{mode:i.BLEND_SOURCE_OVER,opacitySource:1,opacityDest:1})})))).then((e=>d(void 0,null,(function*(){return yield e.getBase64Async(i.MIME_PNG)})))).catch((e=>{throw e}))})),B=e=>d(void 0,null,(function*(){const t=e.inputImgBase64.split(\";base64,\").pop();(0,k.default)(t,\"base64Image is undefined\");const[r,n]=yield Promise.all([O({inputImgBase64:e.inputImgBase64,elementsPositionInfo:e.elementsPositionInfo}),O({inputImgBase64:e.inputImgBase64,elementsPositionInfo:e.elementsPositionInfoWithoutText})]);return{compositeElementInfoImgBase64:r,compositeElementInfoImgWithoutTextBase64:n}}))}}),require_lib7=__commonJS({\"../midscene/dist/lib/index.js\"(e,t){init_globals();var r,n,i,o=Object.create,a=Object.defineProperty,s=Object.getOwnPropertyDescriptor,l=Object.getOwnPropertyNames,u=Object.getPrototypeOf,c=Object.prototype.hasOwnProperty,d=(e,t)=>function(){return e&&(t=(0,e[l(e)[0]])(e=0)),t},h=(e,t)=>function(){return t||(0,e[l(e)[0]])((t={exports:{}}).exports,t),t.exports},f=(e,t)=>{for(var r in t)a(e,r,{get:t[r],enumerable:!0})},p=(e,t,r,n)=>{if(t&&\"object\"==typeof t||\"function\"==typeof t)for(let i of l(t))c.call(e,i)||i===r||a(e,i,{get:()=>t[i],enumerable:!(n=s(t,i))||n.enumerable});return e},m=(e,t,r)=>(r=null!=e?o(u(e)):{},p(!t&&e&&e.__esModule?r:a(r,\"default\",{value:e,enumerable:!0}),e)),g=(e,t,r)=>(((e,t,r)=>{t in e?a(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r})(e,\"symbol\"!=typeof t?t+\"\":t,r),r);function _(){return i>n.length-16&&(r.default.randomFillSync(n),i=0),n.slice(i,i+=16)}var b,y,v=d({\"../../node_modules/.pnpm/uuid@9.0.1/node_modules/uuid/dist/esm-node/rng.js\"(){r=m(require_crypto_browserify()),n=new Uint8Array(256),i=n.length}}),A=d({\"../../node_modules/.pnpm/uuid@9.0.1/node_modules/uuid/dist/esm-node/regex.js\"(){b=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i}});function w(e){return\"string\"==typeof e&&b.test(e)}var S,E,x,C,T=d({\"../../node_modules/.pnpm/uuid@9.0.1/node_modules/uuid/dist/esm-node/validate.js\"(){A(),y=w}}),R=d({\"../../node_modules/.pnpm/uuid@9.0.1/node_modules/uuid/dist/esm-node/stringify.js\"(){S=[];for(let e=0;e__left_angle_mark_256;++e)S.push((e+256).toString(16).slice(1))}}),I=d({\"../../node_modules/.pnpm/uuid@9.0.1/node_modules/uuid/dist/esm-node/native.js\"(){E=m(require_crypto_browserify()),x={randomUUID:E.default.randomUUID}}});function k(e,t,r){if(x.randomUUID&&!t&&!e)return x.randomUUID();const n=(e=e||{}).random||(e.rng||_)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){r=r||0;for(let e=0;e__left_angle_mark_16;++e)t[r+e]=n[e];return t}return function(e,t=0){return S[e[t+0]]+S[e[t+1]]+S[e[t+2]]+S[e[t+3]]+\"-\"+S[e[t+4]]+S[e[t+5]]+\"-\"+S[e[t+6]]+S[e[t+7]]+\"-\"+S[e[t+8]]+S[e[t+9]]+\"-\"+S[e[t+10]]+S[e[t+11]]+S[e[t+12]]+S[e[t+13]]+S[e[t+14]]+S[e[t+15]]}(n)}var P,M,O,B,N,j=d({\"../../node_modules/.pnpm/uuid@9.0.1/node_modules/uuid/dist/esm-node/v4.js\"(){I(),v(),R(),C=k}}),L=d({\"../../node_modules/.pnpm/uuid@9.0.1/node_modules/uuid/dist/esm-node/index.js\"(){j(),T()}}),D=h({\"../../node_modules/.pnpm/retry@0.13.1/node_modules/retry/lib/retry_operation.js\"(e,t){function r(e,t){\"boolean\"==typeof t&&(t={forever:t}),this._originalTimeouts=JSON.parse(JSON.stringify(e)),this._timeouts=e,this._options=t||{},this._maxRetryTime=t&&t.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._timer=null,this._options.forever&&(this._cachedTimeouts=this._timeouts.slice(0))}t.exports=r,r.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts.slice(0)},r.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timer&&clearTimeout(this._timer),this._timeouts=[],this._cachedTimeouts=null},r.prototype.retry=function(e){if(this._timeout&&clearTimeout(this._timeout),!e)return!1;if(e&&(new Date).getTime()-this._operationStart>=this._maxRetryTime)return this._errors.push(e),this._errors.unshift(new Error(\"RetryOperation timeout occurred\")),!1;this._errors.push(e);var t=this._timeouts.shift();if(void 0===t){if(!this._cachedTimeouts)return!1;this._errors.splice(0,this._errors.length-1),t=this._cachedTimeouts.slice(-1)}var r=this;return this._timer=setTimeout((function(){r._attempts++,r._operationTimeoutCb&&(r._timeout=setTimeout((function(){r._operationTimeoutCb(r._attempts)}),r._operationTimeout),r._options.unref&&r._timeout.unref()),r._fn(r._attempts)}),t),this._options.unref&&this._timer.unref(),!0},r.prototype.attempt=function(e,t){this._fn=e,t&&(t.timeout&&(this._operationTimeout=t.timeout),t.cb&&(this._operationTimeoutCb=t.cb));var r=this;this._operationTimeoutCb&&(this._timeout=setTimeout((function(){r._operationTimeoutCb()}),r._operationTimeout)),this._operationStart=(new Date).getTime(),this._fn(this._attempts)},r.prototype.try=function(e){import_console_browserify.default.log(\"Using RetryOperation.try() is deprecated\"),this.attempt(e)},r.prototype.start=function(e){import_console_browserify.default.log(\"Using RetryOperation.start() is deprecated\"),this.attempt(e)},r.prototype.start=r.prototype.try,r.prototype.errors=function(){return this._errors},r.prototype.attempts=function(){return this._attempts},r.prototype.mainError=function(){if(0===this._errors.length)return null;for(var e={},t=null,r=0,n=0;n__left_angle_mark_this._errors.length;n++){var i=this._errors[n],o=i.message,a=(e[o]||0)+1;e[o]=a,a>=r&&(t=i,r=a)}return t}}}),F=h({\"../../node_modules/.pnpm/retry@0.13.1/node_modules/retry/lib/retry.js\"(e){var t=D();e.operation=function(r){var n=e.timeouts(r);return new t(n,{forever:r&&(r.forever||r.retries===1/0),unref:r&&r.unref,maxRetryTime:r&&r.maxRetryTime})},e.timeouts=function(e){if(e instanceof Array)return[].concat(e);var t={retries:10,factor:2,minTimeout:1e3,maxTimeout:1/0,randomize:!1};for(var r in e)t[r]=e[r];if(t.minTimeout>t.maxTimeout)throw new Error(\"minTimeout is greater than maxTimeout\");for(var n=[],i=0;i__left_angle_mark_t.retries;i++)n.push(this.createTimeout(i,t));return e&&e.forever&&!n.length&&n.push(this.createTimeout(i,t)),n.sort((function(e,t){return e-t})),n},e.createTimeout=function(e,t){var r=t.randomize?Math.random()+1:1,n=Math.round(r*Math.max(t.minTimeout,1)*Math.pow(t.factor,e));return n=Math.min(n,t.maxTimeout)},e.wrap=function(t,r,n){if(r instanceof Array&&(n=r,r=null),!n)for(var i in n=[],t)\"function\"==typeof t[i]&&n.push(i);for(var o=0;o__left_angle_mark_n.length;o++){var a=n[o],s=t[a];t[a]=function(n){var i=e.operation(r),o=Array.prototype.slice.call(arguments,1),a=o.pop();o.push((function(e){i.retry(e)||(e&&(arguments[0]=i.mainError()),a.apply(this,arguments))})),i.attempt((function(){n.apply(t,o)}))}.bind(t,s),t[a].options=r}}}}),U=h({\"../../node_modules/.pnpm/retry@0.13.1/node_modules/retry/index.js\"(e,t){t.exports=F()}}),z=h({\"../../node_modules/.pnpm/p-retry@4.6.2/node_modules/p-retry/index.js\"(e,t){var r=U(),n=[\"Failed to fetch\",\"NetworkError when attempting to fetch resource.\",\"The Internet connection appears to be offline.\",\"Network request failed\"],i=class extends Error{constructor(e){super(),e instanceof Error?(this.originalError=e,({message:e}=e)):(this.originalError=new Error(e),this.originalError.stack=this.stack),this.name=\"AbortError\",this.message=e}},o=(e,t)=>new Promise(((o,a)=>{t={onFailedAttempt:()=>{},retries:10,...t};const s=r.operation(t);s.attempt((async r=>{try{o(await e(r))}catch(u){if(!(u instanceof Error))return void a(new TypeError(`Non-error was thrown: \"${u}\". You should only throw errors.`));if(u instanceof i)s.stop(),a(u.originalError);else if(u instanceof TypeError&&(l=u.message,!n.includes(l)))s.stop(),a(u);else{((e,t,r)=>{const n=r.retries-(t-1);e.attemptNumber=t,e.retriesLeft=n})(u,r,t);try{await t.onFailedAttempt(u)}catch(c){return void a(c)}s.retry(u)||a(s.mainError())}}var l}))}));t.exports=o,t.exports.default=o,t.exports.AbortError=i}}),q=h({\"../../node_modules/.pnpm/eventemitter3@4.0.7/node_modules/eventemitter3/index.js\"(e,t){var r=Object.prototype.hasOwnProperty,n=\"~\";function i(){}function o(e,t,r){this.fn=e,this.context=t,this.once=r||!1}function a(e,t,r,i,a){if(\"function\"!=typeof r)throw new TypeError(\"The listener must be a function\");var s=new o(r,i||e,a),l=n?n+t:t;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],s]:e._events[l].push(s):(e._events[l]=s,e._eventsCount++),e}function s(e,t){0==--e._eventsCount?e._events=new i:delete e._events[t]}function l(){this._events=new i,this._eventsCount=0}Object.create&&(i.prototype=Object.create(null),(new i).__proto__||(n=!1)),l.prototype.eventNames=function(){var e,t,i=[];if(0===this._eventsCount)return i;for(t in e=this._events)r.call(e,t)&&i.push(n?t.slice(1):t);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(e)):i},l.prototype.listeners=function(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var i=0,o=r.length,a=new Array(o);i__left_angle_mark_o;i++)a[i]=r[i].fn;return a},l.prototype.listenerCount=function(e){var t=n?n+e:e,r=this._events[t];return r?r.fn?1:r.length:0},l.prototype.emit=function(e,t,r,i,o,a){var s=n?n+e:e;if(!this._events[s])return!1;var l,u,c=this._events[s],d=arguments.length;if(c.fn){switch(c.once&&this.removeListener(e,c.fn,void 0,!0),d){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,t),!0;case 3:return c.fn.call(c.context,t,r),!0;case 4:return c.fn.call(c.context,t,r,i),!0;case 5:return c.fn.call(c.context,t,r,i,o),!0;case 6:return c.fn.call(c.context,t,r,i,o,a),!0}for(u=1,l=new Array(d-1);u__left_angle_mark_d;u++)l[u-1]=arguments[u];c.fn.apply(c.context,l)}else{var h,f=c.length;for(u=0;u__left_angle_mark_f;u++)switch(c[u].once&&this.removeListener(e,c[u].fn,void 0,!0),d){case 1:c[u].fn.call(c[u].context);break;case 2:c[u].fn.call(c[u].context,t);break;case 3:c[u].fn.call(c[u].context,t,r);break;case 4:c[u].fn.call(c[u].context,t,r,i);break;default:if(!l)for(h=1,l=new Array(d-1);h__left_angle_mark_d;h++)l[h-1]=arguments[h];c[u].fn.apply(c[u].context,l)}}return!0},l.prototype.on=function(e,t,r){return a(this,e,t,r,!1)},l.prototype.once=function(e,t,r){return a(this,e,t,r,!0)},l.prototype.removeListener=function(e,t,r,i){var o=n?n+e:e;if(!this._events[o])return this;if(!t)return s(this,o),this;var a=this._events[o];if(a.fn)a.fn!==t||i&&!a.once||r&&a.context!==r||s(this,o);else{for(var l=0,u=[],c=a.length;l__left_angle_mark_c;l++)(a[l].fn!==t||i&&!a[l].once||r&&a[l].context!==r)&&u.push(a[l]);u.length?this._events[o]=1===u.length?u[0]:u:s(this,o)}return this},l.prototype.removeAllListeners=function(e){var t;return e?(t=n?n+e:e,this._events[t]&&s(this,t)):(this._events=new i,this._eventsCount=0),this},l.prototype.off=l.prototype.removeListener,l.prototype.addListener=l.prototype.on,l.prefixed=n,l.EventEmitter=l,void 0!==t&&(t.exports=l)}}),G=h({\"../../node_modules/.pnpm/p-finally@1.0.0/node_modules/p-finally/index.js\"(e,t){t.exports=(e,t)=>(t=t||(()=>{}),e.then((e=>new Promise((e=>{e(t())})).then((()=>e))),(e=>new Promise((e=>{e(t())})).then((()=>{throw e})))))}}),H=h({\"../../node_modules/.pnpm/p-timeout@3.2.0/node_modules/p-timeout/index.js\"(e,t){var r=G(),n=class extends Error{constructor(e){super(e),this.name=\"TimeoutError\"}},i=(e,t,i)=>new Promise(((o,a)=>{if(\"number\"!=typeof t||t__left_angle_mark_0)throw new TypeError(\"Expected `milliseconds` to be a positive number\");if(t===1/0)return void o(e);const s=setTimeout((()=>{if(\"function\"==typeof i){try{o(i())}catch(s){a(s)}return}const r=i instanceof Error?i:new n(\"string\"==typeof i?i:`Promise timed out after ${t} milliseconds`);\"function\"==typeof e.cancel&&e.cancel(),a(r)}),t);r(e.then(o,a),(()=>{clearTimeout(s)}))}));t.exports=i,t.exports.default=i,t.exports.TimeoutError=n}}),W=h({\"../../node_modules/.pnpm/p-queue@6.6.2/node_modules/p-queue/dist/lower-bound.js\"(e){Object.defineProperty(e,\"__esModule\",{value:!0}),e.default=function(e,t,r){let n=0,i=e.length;for(;i>0;){const o=i/2|0;let a=n+o;r(e[a],t)__left_angle_mark_=0?(n=++a,i-=o+1):i=o}return n}}}),V=h({\"../../node_modules/.pnpm/p-queue@6.6.2/node_modules/p-queue/dist/priority-queue.js\"(e){Object.defineProperty(e,\"__esModule\",{value:!0});var t=W();e.default=class{enqueue(e,r){const n={priority:(r=Object.assign({priority:0},r)).priority,run:e};if(this.size&&this._queue[this.size-1].priority>=r.priority)return void this._queue.push(n);const i=t.default(this._queue,n,((e,t)=>t.priority-e.priority));this._queue.splice(i,0,n)}dequeue(){const e=this._queue.shift();return null==e?void 0:e.run}filter(e){return this._queue.filter((t=>t.priority===e.priority)).map((e=>e.run))}get size(){return this._queue.length}constructor(){this._queue=[]}}}}),$=h({\"../../node_modules/.pnpm/p-queue@6.6.2/node_modules/p-queue/dist/index.js\"(e){Object.defineProperty(e,\"__esModule\",{value:!0});var t=q(),r=H(),n=V(),i=()=>{},o=new r.TimeoutError;e.default=class extends t{get _doesIntervalAllowAnother(){return this._isIntervalIgnored||this._intervalCount__left_angle_mark_this._intervalCap}get _doesConcurrentAllowAnother(){return this._pendingCount__left_angle_mark_this._concurrency}_next(){this._pendingCount--,this._tryToStartAnother(),this.emit(\"next\")}_resolvePromises(){this._resolveEmpty(),this._resolveEmpty=i,0===this._pendingCount&&(this._resolveIdle(),this._resolveIdle=i,this.emit(\"idle\"))}_onResumeInterval(){this._onInterval(),this._initializeIntervalIfNeeded(),this._timeoutId=void 0}_isIntervalPaused(){const e=Date.now();if(void 0===this._intervalId){const t=this._intervalEnd-e;if(!(t__left_angle_mark_0))return void 0===this._timeoutId&&(this._timeoutId=setTimeout((()=>{this._onResumeInterval()}),t)),!0;this._intervalCount=this._carryoverConcurrencyCount?this._pendingCount:0}return!1}_tryToStartAnother(){if(0===this._queue.size)return this._intervalId&&clearInterval(this._intervalId),this._intervalId=void 0,this._resolvePromises(),!1;if(!this._isPaused){const e=!this._isIntervalPaused();if(this._doesIntervalAllowAnother&&this._doesConcurrentAllowAnother){const t=this._queue.dequeue();return!!t&&(this.emit(\"active\"),t(),e&&this._initializeIntervalIfNeeded(),!0)}}return!1}_initializeIntervalIfNeeded(){this._isIntervalIgnored||void 0!==this._intervalId||(this._intervalId=setInterval((()=>{this._onInterval()}),this._interval),this._intervalEnd=Date.now()+this._interval)}_onInterval(){0===this._intervalCount&&0===this._pendingCount&&this._intervalId&&(clearInterval(this._intervalId),this._intervalId=void 0),this._intervalCount=this._carryoverConcurrencyCount?this._pendingCount:0,this._processQueue()}_processQueue(){for(;this._tryToStartAnother(););}get concurrency(){return this._concurrency}set concurrency(e){if(!(\"number\"==typeof e&&e>=1))throw new TypeError(`Expected \\`concurrency\\` to be a number from 1 and up, got \\`${e}\\` (${typeof e})`);this._concurrency=e,this._processQueue()}async add(e,t={}){return new Promise(((n,i)=>{this._queue.enqueue((async()=>{this._pendingCount++,this._intervalCount++;try{const a=void 0===this._timeout&&void 0===t.timeout?e():r.default(Promise.resolve(e()),void 0===t.timeout?this._timeout:t.timeout,(()=>{(void 0===t.throwOnTimeout?this._throwOnTimeout:t.throwOnTimeout)&&i(o)}));n(await a)}catch(a){i(a)}this._next()}),t),this._tryToStartAnother(),this.emit(\"add\")}))}async addAll(e,t){return Promise.all(e.map((async e=>this.add(e,t))))}start(){return this._isPaused?(this._isPaused=!1,this._processQueue(),this):this}pause(){this._isPaused=!0}clear(){this._queue=new this._queueClass}async onEmpty(){if(0!==this._queue.size)return new Promise((e=>{const t=this._resolveEmpty;this._resolveEmpty=()=>{t(),e()}}))}async onIdle(){if(0!==this._pendingCount||0!==this._queue.size)return new Promise((e=>{const t=this._resolveIdle;this._resolveIdle=()=>{t(),e()}}))}get size(){return this._queue.size}sizeBy(e){return this._queue.filter(e).length}get pending(){return this._pendingCount}get isPaused(){return this._isPaused}get timeout(){return this._timeout}set timeout(e){this._timeout=e}constructor(e){var t,r,o,a;if(super(),this._intervalCount=0,this._intervalEnd=0,this._pendingCount=0,this._resolveEmpty=i,this._resolveIdle=i,!(\"number\"==typeof(e=Object.assign({carryoverConcurrencyCount:!1,intervalCap:1/0,interval:0,concurrency:1/0,autoStart:!0,queueClass:n.default},e)).intervalCap&&e.intervalCap>=1))throw new TypeError(`Expected \\`intervalCap\\` to be a number from 1 and up, got \\`${null!==(r=null===(t=e.intervalCap)||void 0===t?void 0:t.toString())&&void 0!==r?r:\"\"}\\` (${typeof e.intervalCap})`);if(void 0===e.interval||!(Number.isFinite(e.interval)&&e.interval>=0))throw new TypeError(`Expected \\`interval\\` to be a finite number >= 0, got \\`${null!==(a=null===(o=e.interval)||void 0===o?void 0:o.toString())&&void 0!==a?a:\"\"}\\` (${typeof e.interval})`);this._carryoverConcurrencyCount=e.carryoverConcurrencyCount,this._isIntervalIgnored=e.intervalCap===1/0||0===e.interval,this._intervalCap=e.intervalCap,this._interval=e.interval,this._queue=new e.queueClass,this._queueClass=e.queueClass,this.concurrency=e.concurrency,this._timeout=e.timeout,this._throwOnTimeout=!0===e.throwOnTimeout,this._isPaused=!1===e.autoStart}}}}),K=d({\"../../node_modules/.pnpm/langsmith@0.1.36_openai@4.57.1_zod@3.23.8_/node_modules/langsmith/dist/utils/async_caller.js\"(){P=m(z()),M=m($()),O=[400,401,403,404,405,406,407,408],B=[409],N=class{call(e,...t){const r=this.onFailedResponseHook;return this.queue.add((()=>(0,P.default)((()=>e(...t).catch((e=>{throw e instanceof Error?e:new Error(e)}))),{async onFailedAttempt(e){if(e.message.startsWith(\"Cancel\")||e.message.startsWith(\"TimeoutError\")||e.message.startsWith(\"AbortError\"))throw e;if(\"ECONNABORTED\"===(null==e?void 0:e.code))throw e;const t=null==e?void 0:e.response,n=null==t?void 0:t.status;if(n){if(O.includes(+n))throw e;if(B.includes(+n))return;r&&await r(t)}},retries:this.maxRetries,randomize:!0})),{throwOnTimeout:!0})}callWithOptions(e,t,...r){return e.signal?Promise.race([this.call(t,...r),new Promise(((t,r)=>{var n;null==(n=e.signal)||n.addEventListener(\"abort\",(()=>{r(new Error(\"AbortError\"))}))}))]):this.call(t,...r)}fetch(...e){return this.call((()=>fetch(...e).then((e=>e.ok?e:Promise.reject(e)))))}constructor(e){var t,r;Object.defineProperty(this,\"maxConcurrency\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,\"maxRetries\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,\"queue\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,\"onFailedResponseHook\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxConcurrency=null!=(t=e.maxConcurrency)?t:1/0,this.maxRetries=null!=(r=e.maxRetries)?r:6,\"default\"in M.default?this.queue=new M.default.default({concurrency:this.maxConcurrency}):this.queue=new M.default({concurrency:this.maxConcurrency}),this.onFailedResponseHook=null==e?void 0:e.onFailedResponseHook}}}});function X(e){return\"function\"==typeof(null==e?void 0:e._getType)}function Y(e){const t={type:e._getType(),data:{content:e.content}};return(null==e?void 0:e.additional_kwargs)&&Object.keys(e.additional_kwargs).length>0&&(t.data.additional_kwargs={...e.additional_kwargs}),t}var J=d({\"../../node_modules/.pnpm/langsmith@0.1.36_openai@4.57.1_zod@3.23.8_/node_modules/langsmith/dist/utils/messages.js\"(){}});function Q(e){if(!y(e))throw new Error(`Invalid UUID: ${e}`)}var Z,ee=d({\"../../node_modules/.pnpm/langsmith@0.1.36_openai@4.57.1_zod@3.23.8_/node_modules/langsmith/dist/utils/_uuid.js\"(){L()}});function te(e){Z[e]||(import_console_browserify.default.warn(e),Z[e]=!0)}var re,ne,ie,oe,ae,se,le=d({\"../../node_modules/.pnpm/langsmith@0.1.36_openai@4.57.1_zod@3.23.8_/node_modules/langsmith/dist/utils/warn.js\"(){Z={}}});async function ue(e){const t=await Se(),r=function(){const e=function(){try{return void 0!==import_browser.default&&import_browser.default.env?Object.entries(import_browser.default.env).reduce(((e,[t,r])=>(e[t]=String(r),e)),{}):void 0}catch(e){return}}()||{},t={},r=[\"LANGCHAIN_API_KEY\",\"LANGCHAIN_ENDPOINT\",\"LANGCHAIN_TRACING_V2\",\"LANGCHAIN_PROJECT\",\"LANGCHAIN_SESSION\"];for(const[n,i]of Object.entries(e))!n.startsWith(\"LANGCHAIN_\")||\"string\"!=typeof i||r.includes(n)||n.toLowerCase().includes(\"key\")||n.toLowerCase().includes(\"secret\")||n.toLowerCase().includes(\"token\")||(\"LANGCHAIN_REVISION_ID\"===n?t.revision_id=i:t[n]=i);return t}();return e.map((e=>{var n,i;const o=null!=(n=e.extra)?n:{},a=o.metadata;return e.extra={...o,runtime:{...t,...null==o?void 0:o.runtime},metadata:{...r,...r.revision_id||e.revision_id?{revision_id:null!=(i=e.revision_id)?i:r.revision_id}:{},...a}},e}))}function ce(e){if(void 0!==e)return e.trim().replace(/^\"(.*)\"$/,\"$1\").replace(/^'(.*)'$/,\"$1\")}var de,he,fe,pe,me,ge,_e,be,ye,ve,Ae=d({\"../../node_modules/.pnpm/langsmith@0.1.36_openai@4.57.1_zod@3.23.8_/node_modules/langsmith/dist/client.js\"(){L(),K(),J(),Re(),we(),ee(),le(),re=()=>{const e=Ee(\"LANGCHAIN_TRACING_SAMPLING_RATE\");if(void 0===e)return;const t=parseFloat(e);if(t__left_angle_mark_0||t>1)throw new Error(`LANGCHAIN_TRACING_SAMPLING_RATE must be between 0 and 1 if set. Got: ${t}`);return t},ne=e=>{const t=e.replace(\"http://\",\"\").replace(\"https://\",\"\").split(\"/\")[0].split(\":\")[0];return\"localhost\"===t||\"127.0.0.1\"===t||\"::1\"===t},ie=async(e,t)=>{const r=await e.text();if(!e.ok)throw new Error(`Failed to ${t}: ${e.status} ${e.statusText} ${r}`)},oe=async e=>{var t;if(429===(null==e?void 0:e.status)){const r=1e3*parseInt(null!=(t=e.headers.get(\"retry-after\"))?t:\"30\",10);if(r>0)return await new Promise((e=>setTimeout(e,r))),!0}return!1},ae=class{get size(){return this.items.length}push(e){return new Promise((t=>{this.items.push([e,t])}))}pop(e){if(e__left_angle_mark_1)throw new Error(\"Number of items to pop off may not be less than 1.\");const t=[];for(;t.length__left_angle_mark_e&&this.items.length;){const e=this.items.shift();if(!e)break;t.push(e)}return[t.map((e=>e[0])),()=>t.forEach((e=>e[1]()))]}constructor(){Object.defineProperty(this,\"items\",{enumerable:!0,configurable:!0,writable:!0,value:[]})}},se=class e{static getDefaultClientConfig(){var e;const t=Ee(\"LANGCHAIN_API_KEY\");return{apiUrl:null!=(e=Ee(\"LANGCHAIN_ENDPOINT\"))?e:\"https://api.smith.langchain.com\",apiKey:t,webUrl:void 0,hideInputs:\"true\"===Ee(\"LANGCHAIN_HIDE_INPUTS\"),hideOutputs:\"true\"===Ee(\"LANGCHAIN_HIDE_OUTPUTS\")}}getHostUrl(){return this.webUrl?this.webUrl:ne(this.apiUrl)?(this.webUrl=\"http://localhost:3000\",this.webUrl):this.apiUrl.includes(\"/api\")&&!this.apiUrl.split(\".\",1)[0].endsWith(\"api\")?(this.webUrl=this.apiUrl.replace(\"/api\",\"\"),this.webUrl):this.apiUrl.split(\".\",1)[0].includes(\"dev\")?(this.webUrl=\"https://dev.smith.langchain.com\",this.webUrl):(this.webUrl=\"https://smith.langchain.com\",this.webUrl)}get headers(){const e={\"User-Agent\":`langsmith-js/${de}`};return this.apiKey&&(e[\"x-api-key\"]=`${this.apiKey}`),e}processInputs(e){return!1===this.hideInputs?e:!0===this.hideInputs?{}:\"function\"==typeof this.hideInputs?this.hideInputs(e):e}processOutputs(e){return!1===this.hideOutputs?e:!0===this.hideOutputs?{}:\"function\"==typeof this.hideOutputs?this.hideOutputs(e):e}prepareRunCreateOrUpdateInputs(e){const t={...e};return void 0!==t.inputs&&(t.inputs=this.processInputs(t.inputs)),void 0!==t.outputs&&(t.outputs=this.processOutputs(t.outputs)),t}async _getResponse(e,t){var r;const n=null!=(r=null==t?void 0:t.toString())?r:\"\",i=`${this.apiUrl}${e}?${n}`,o=await this.caller.call(fetch,i,{method:\"GET\",headers:this.headers,signal:AbortSignal.timeout(this.timeout_ms),...this.fetchOptions});if(!o.ok)throw new Error(`Failed to fetch ${e}: ${o.status} ${o.statusText}`);return o}async _get(e,t){return(await this._getResponse(e,t)).json()}async*_getPaginated(e,t=new URLSearchParams){let r=Number(t.get(\"offset\"))||0;const n=Number(t.get(\"limit\"))||100;for(;;){t.set(\"offset\",String(r)),t.set(\"limit\",String(n));const i=`${this.apiUrl}${e}?${t}`,o=await this.caller.call(fetch,i,{method:\"GET\",headers:this.headers,signal:AbortSignal.timeout(this.timeout_ms),...this.fetchOptions});if(!o.ok)throw new Error(`Failed to fetch ${e}: ${o.status} ${o.statusText}`);const a=await o.json();if(0===a.length)break;if(yield a,a.length__left_angle_mark_n)break;r+=a.length}}async*_getCursorPaginatedList(e,t=null,r=\"POST\",n=\"runs\"){const i=t?{...t}:{};for(;;){const t=await this.caller.call(fetch,`${this.apiUrl}${e}`,{method:r,headers:{...this.headers,\"Content-Type\":\"application/json\"},signal:AbortSignal.timeout(this.timeout_ms),...this.fetchOptions,body:JSON.stringify(i)}),o=await t.json();if(!o)break;if(!o[n])break;yield o[n];const a=o.cursors;if(!a)break;if(!a.next)break;i.cursor=a.next}}_filterForSampling(e,t=!1){if(void 0===this.tracingSampleRate)return e;if(t){const t=[];for(const r of e)this.sampledPostUuids.has(r.id)&&(t.push(r),this.sampledPostUuids.delete(r.id));return t}{const t=[];for(const r of e)Math.random()__left_angle_mark_this.tracingSampleRate&&(t.push(r),this.sampledPostUuids.add(r.id));return t}}async drainAutoBatchQueue(){for(;this.autoBatchQueue.size>=0;){const[e,t]=this.autoBatchQueue.pop(this.pendingAutoBatchedRunLimit);if(!e.length)return void t();try{await this.batchIngestRuns({runCreates:e.filter((e=>\"create\"===e.action)).map((e=>e.item)),runUpdates:e.filter((e=>\"update\"===e.action)).map((e=>e.item))})}finally{t()}}}async processRunOperation(e,t){const r=this.autoBatchTimeout;clearTimeout(this.autoBatchTimeout),this.autoBatchTimeout=void 0;const n=this.autoBatchQueue.push(e);return(t||this.autoBatchQueue.size>this.pendingAutoBatchedRunLimit)&&await this.drainAutoBatchQueue(),this.autoBatchQueue.size>0&&(this.autoBatchTimeout=setTimeout((()=>{this.autoBatchTimeout=void 0,this.drainAutoBatchQueue().catch(import_console_browserify.default.error)}),r?this.autoBatchAggregationDelayMs:this.autoBatchInitialDelayMs)),n}async _getServerInfo(){const e=await fetch(`${this.apiUrl}/info`,{method:\"GET\",headers:{Accept:\"application/json\"},signal:AbortSignal.timeout(this.timeout_ms),...this.fetchOptions});if(!e.ok)throw await e.text(),new Error(\"Failed to retrieve server info.\");return e.json()}async batchEndpointIsSupported(){try{this.serverInfo=await this._getServerInfo()}catch(e){return!1}return!0}async createRun(e){var t;if(!this._filterForSampling([e]).length)return;const r={...this.headers,\"Content-Type\":\"application/json\"},n=e.project_name;delete e.project_name;const i=this.prepareRunCreateOrUpdateInputs({session_name:n,...e,start_time:null!=(t=e.start_time)?t:Date.now()});if(this.autoBatchTracing&&void 0!==i.trace_id&&void 0!==i.dotted_order)return void this.processRunOperation({action:\"create\",item:i}).catch(import_console_browserify.default.error);const o=await ue([i]),a=await this.caller.call(fetch,`${this.apiUrl}/runs`,{method:\"POST\",headers:r,body:JSON.stringify(o[0]),signal:AbortSignal.timeout(this.timeout_ms),...this.fetchOptions});await ie(a,\"create run\")}async batchIngestRuns({runCreates:e,runUpdates:t}){var r,n,i,o,a;if(void 0===e&&void 0===t)return;let s=null!=(r=null==e?void 0:e.map((e=>this.prepareRunCreateOrUpdateInputs(e))))?r:[],l=null!=(n=null==t?void 0:t.map((e=>this.prepareRunCreateOrUpdateInputs(e))))?n:[];if(s.length>0&&l.length>0){const e=s.reduce(((e,t)=>t.id?(e[t.id]=t,e):e),{}),t=[];for(const r of l)void 0!==r.id&&e[r.id]?e[r.id]={...e[r.id],...r}:t.push(r);s=Object.values(e),l=t}const u={post:this._filterForSampling(s),patch:this._filterForSampling(l,!0)};if(!u.post.length&&!u.patch.length)return;if(s=await ue(s),void 0===this.batchEndpointSupported&&(this.batchEndpointSupported=await this.batchEndpointIsSupported()),!this.batchEndpointSupported){this.autoBatchTracing=!1;for(const e of u.post)await this.createRun(e);for(const e of u.patch)void 0!==e.id&&await this.updateRun(e.id,e);return}const c=null!=(a=null==(o=null==(i=this.serverInfo)?void 0:i.batch_ingest_config)?void 0:o.size_limit_bytes)?a:20971520,d={post:[],patch:[]};let h=0;for(const f of[\"post\",\"patch\"]){const e=f,t=u[e].reverse();let r=t.pop();for(;void 0!==r;){const n=JSON.stringify(r);h>0&&h+n.length>c&&(await this._postBatchIngestRuns(JSON.stringify(d)),h=0,d.post=[],d.patch=[]),h+=n.length,d[e].push(r),r=t.pop()}}(d.post.length>0||d.patch.length>0)&&await this._postBatchIngestRuns(JSON.stringify(d))}async _postBatchIngestRuns(e){const t={...this.headers,\"Content-Type\":\"application/json\",Accept:\"application/json\"},r=await this.batchIngestCaller.call(fetch,`${this.apiUrl}/runs/batch`,{method:\"POST\",headers:t,body:e,signal:AbortSignal.timeout(this.timeout_ms),...this.fetchOptions});await ie(r,\"batch create run\")}async updateRun(e,t){Q(e),t.inputs&&(t.inputs=this.processInputs(t.inputs)),t.outputs&&(t.outputs=this.processOutputs(t.outputs));const r={...t,id:e};if(!this._filterForSampling([r],!0).length)return;if(this.autoBatchTracing&&void 0!==r.trace_id&&void 0!==r.dotted_order)return void 0!==t.end_time&&void 0===r.parent_run_id?void(await this.processRunOperation({action:\"update\",item:r},!0)):void this.processRunOperation({action:\"update\",item:r}).catch(import_console_browserify.default.error);const n={...this.headers,\"Content-Type\":\"application/json\"},i=await this.caller.call(fetch,`${this.apiUrl}/runs/${e}`,{method:\"PATCH\",headers:n,body:JSON.stringify(t),signal:AbortSignal.timeout(this.timeout_ms),...this.fetchOptions});await ie(i,\"update run\")}async readRun(e,{loadChildRuns:t}={loadChildRuns:!1}){Q(e);let r=await this._get(`/runs/${e}`);return t&&r.child_run_ids&&(r=await this._loadChildRuns(r)),r}async getRunUrl({runId:e,run:t,projectOpts:r}){if(void 0!==t){let e;e=t.session_id?t.session_id:(null==r?void 0:r.projectName)?(await this.readProject({projectName:null==r?void 0:r.projectName})).id:(null==r?void 0:r.projectId)?null==r?void 0:r.projectId:(await this.readProject({projectName:Ee(\"LANGCHAIN_PROJECT\")||\"default\"})).id;const n=await this._getTenantId();return`${this.getHostUrl()}/o/${n}/projects/p/${e}/r/${t.id}?poll=true`}if(void 0!==e){const t=await this.readRun(e);if(!t.app_path)throw new Error(`Run ${e} has no app_path`);return`${this.getHostUrl()}${t.app_path}`}throw new Error(\"Must provide either runId or run\")}async _loadChildRuns(e){const t=await async function(e){const t=[];for await(const r of e)t.push(r);return t}(this.listRuns({id:e.child_run_ids})),r={},n={};t.sort(((e,t)=>{var r,n;return(null!=(r=null==e?void 0:e.dotted_order)?r:\"\").localeCompare(null!=(n=null==t?void 0:t.dotted_order)?n:\"\")}));for(const i of t){if(null===i.parent_run_id||void 0===i.parent_run_id)throw new Error(`Child run ${i.id} has no parent`);i.parent_run_id in r||(r[i.parent_run_id]=[]),r[i.parent_run_id].push(i),n[i.id]=i}e.child_runs=r[e.id]||[];for(const i in r)i!==e.id&&(n[i].child_runs=r[i]);return e}async*listRuns(e){const{projectId:t,projectName:r,parentRunId:n,traceId:i,referenceExampleId:o,startTime:a,executionOrder:s,isRoot:l,runType:u,error:c,id:d,query:h,filter:f,traceFilter:p,treeFilter:m,limit:g,select:_}=e;let b=[];if(t&&(b=Array.isArray(t)?t:[t]),r){const e=Array.isArray(r)?r:[r],t=await Promise.all(e.map((e=>this.readProject({projectName:e}).then((e=>e.id)))));b.push(...t)}const y={session:b.length?b:null,run_type:u,reference_example:o,query:h,filter:f,trace_filter:p,tree_filter:m,execution_order:s,parent_run:n,start_time:a?a.toISOString():null,error:c,id:d,limit:g,trace:i,select:_||[\"app_path\",\"child_run_ids\",\"completion_cost\",\"completion_tokens\",\"dotted_order\",\"end_time\",\"error\",\"events\",\"extra\",\"feedback_stats\",\"first_token_time\",\"id\",\"inputs\",\"name\",\"outputs\",\"parent_run_id\",\"parent_run_ids\",\"prompt_cost\",\"prompt_tokens\",\"reference_example_id\",\"run_type\",\"session_id\",\"start_time\",\"status\",\"tags\",\"total_cost\",\"total_tokens\",\"trace_id\"],is_root:l};let v=0;for await(const A of this._getCursorPaginatedList(\"/runs/query\",y))if(g){if(v>=g)break;if(A.length+v>g){const e=A.slice(0,g-v);yield*e;break}v+=A.length,yield*A}else yield*A}async shareRun(e,{shareId:t}={}){const r={run_id:e,share_token:t||C()};Q(e);const n=await this.caller.call(fetch,`${this.apiUrl}/runs/${e}/share`,{method:\"PUT\",headers:this.headers,body:JSON.stringify(r),signal:AbortSignal.timeout(this.timeout_ms),...this.fetchOptions}),i=await n.json();if(null===i||!(\"share_token\"in i))throw new Error(\"Invalid response from server\");return`${this.getHostUrl()}/public/${i.share_token}/r`}async unshareRun(e){Q(e);const t=await this.caller.call(fetch,`${this.apiUrl}/runs/${e}/share`,{method:\"DELETE\",headers:this.headers,signal:AbortSignal.timeout(this.timeout_ms),...this.fetchOptions});await ie(t,\"unshare run\")}async readRunSharedLink(e){Q(e);const t=await this.caller.call(fetch,`${this.apiUrl}/runs/${e}/share`,{method:\"GET\",headers:this.headers,signal:AbortSignal.timeout(this.timeout_ms),...this.fetchOptions}),r=await t.json();if(null!==r&&\"share_token\"in r)return`${this.getHostUrl()}/public/${r.share_token}/r`}async listSharedRuns(e,{runIds:t}={}){const r=new URLSearchParams({share_token:e});if(void 0!==t)for(const i of t)r.append(\"id\",i);Q(e);const n=await this.caller.call(fetch,`${this.apiUrl}/public/${e}/runs${r}`,{method:\"GET\",headers:this.headers,signal:AbortSignal.timeout(this.timeout_ms),...this.fetchOptions});return await n.json()}async readDatasetSharedSchema(e,t){if(!e&&!t)throw new Error(\"Either datasetId or datasetName must be given\");e||(e=(await this.readDataset({datasetName:t})).id),Q(e);const r=await this.caller.call(fetch,`${this.apiUrl}/datasets/${e}/share`,{method:\"GET\",headers:this.headers,signal:AbortSignal.timeout(this.timeout_ms),...this.fetchOptions}),n=await r.json();return n.url=`${this.getHostUrl()}/public/${n.share_token}/d`,n}async shareDataset(e,t){if(!e&&!t)throw new Error(\"Either datasetId or datasetName must be given\");e||(e=(await this.readDataset({datasetName:t})).id);const r={dataset_id:e};Q(e);const n=await this.caller.call(fetch,`${this.apiUrl}/datasets/${e}/share`,{method:\"PUT\",headers:this.headers,body:JSON.stringify(r),signal:AbortSignal.timeout(this.timeout_ms),...this.fetchOptions}),i=await n.json();return i.url=`${this.getHostUrl()}/public/${i.share_token}/d`,i}async unshareDataset(e){Q(e);const t=await this.caller.call(fetch,`${this.apiUrl}/datasets/${e}/share`,{method:\"DELETE\",headers:this.headers,signal:AbortSignal.timeout(this.timeout_ms),...this.fetchOptions});await ie(t,\"unshare dataset\")}async readSharedDataset(e){Q(e);const t=await this.caller.call(fetch,`${this.apiUrl}/public/${e}/datasets`,{method:\"GET\",headers:this.headers,signal:AbortSignal.timeout(this.timeout_ms),...this.fetchOptions});return await t.json()}async createProject({projectName:e,description:t=null,metadata:r=null,upsert:n=!1,projectExtra:i=null,referenceDatasetId:o=null}){const a=n?\"?upsert=true\":\"\",s=`${this.apiUrl}/sessions${a}`,l=i||{};r&&(l.metadata=r);const u={name:e,extra:l,description:t};null!==o&&(u.reference_dataset_id=o);const c=await this.caller.call(fetch,s,{method:\"POST\",headers:{...this.headers,\"Content-Type\":\"application/json\"},body:JSON.stringify(u),signal:AbortSignal.timeout(this.timeout_ms),...this.fetchOptions}),d=await c.json();if(!c.ok)throw new Error(`Failed to create session ${e}: ${c.status} ${c.statusText}`);return d}async updateProject(e,{name:t=null,description:r=null,metadata:n=null,projectExtra:i=null,endTime:o=null}){const a=`${this.apiUrl}/sessions/${e}`;let s=i;n&&(s={...s||{},metadata:n});const l={name:t,extra:s,description:r,end_time:o?new Date(o).toISOString():null},u=await this.caller.call(fetch,a,{method:\"PATCH\",headers:{...this.headers,\"Content-Type\":\"application/json\"},body:JSON.stringify(l),signal:AbortSignal.timeout(this.timeout_ms),...this.fetchOptions}),c=await u.json();if(!u.ok)throw new Error(`Failed to update project ${e}: ${u.status} ${u.statusText}`);return c}async hasProject({projectId:e,projectName:t}){let r=\"/sessions\";const n=new URLSearchParams;if(void 0!==e&&void 0!==t)throw new Error(\"Must provide either projectName or projectId, not both\");if(void 0!==e)Q(e),r+=`/${e}`;else{if(void 0===t)throw new Error(\"Must provide projectName or projectId\");n.append(\"name\",t)}const i=await this.caller.call(fetch,`${this.apiUrl}${r}?${n}`,{method:\"GET\",headers:this.headers,signal:AbortSignal.timeout(this.timeout_ms),...this.fetchOptions});try{const e=await i.json();return!!i.ok&&(!Array.isArray(e)||e.length>0)}catch(o){return!1}}async readProject({projectId:e,projectName:t,includeStats:r}){let n=\"/sessions\";const i=new URLSearchParams;if(void 0!==e&&void 0!==t)throw new Error(\"Must provide either projectName or projectId, not both\");if(void 0!==e)Q(e),n+=`/${e}`;else{if(void 0===t)throw new Error(\"Must provide projectName or projectId\");i.append(\"name\",t)}void 0!==r&&i.append(\"include_stats\",r.toString());const o=await this._get(n,i);let a;if(Array.isArray(o)){if(0===o.length)throw new Error(`Project[id=${e}, name=${t}] not found`);a=o[0]}else a=o;return a}async getProjectUrl({projectId:e,projectName:t}){if(void 0===e&&void 0===t)throw new Error(\"Must provide either projectName or projectId\");const r=await this.readProject({projectId:e,projectName:t}),n=await this._getTenantId();return`${this.getHostUrl()}/o/${n}/projects/p/${r.id}`}async getDatasetUrl({datasetId:e,datasetName:t}){if(void 0===e&&void 0===t)throw new Error(\"Must provide either datasetName or datasetId\");const r=await this.readDataset({datasetId:e,datasetName:t}),n=await this._getTenantId();return`${this.getHostUrl()}/o/${n}/datasets/${r.id}`}async _getTenantId(){if(null!==this._tenantId)return this._tenantId;const e=new URLSearchParams({limit:\"1\"});for await(const t of this._getPaginated(\"/sessions\",e))return this._tenantId=t[0].tenant_id,t[0].tenant_id;throw new Error(\"No projects found to resolve tenant.\")}async*listProjects({projectIds:e,name:t,nameContains:r,referenceDatasetId:n,referenceDatasetName:i,referenceFree:o}={}){const a=new URLSearchParams;if(void 0!==e)for(const s of e)a.append(\"id\",s);if(void 0!==t&&a.append(\"name\",t),void 0!==r&&a.append(\"name_contains\",r),void 0!==n)a.append(\"reference_dataset\",n);else if(void 0!==i){const e=await this.readDataset({datasetName:i});a.append(\"reference_dataset\",e.id)}void 0!==o&&a.append(\"reference_free\",o.toString());for await(const s of this._getPaginated(\"/sessions\",a))yield*s}async deleteProject({projectId:e,projectName:t}){let r;if(void 0===e&&void 0===t)throw new Error(\"Must provide projectName or projectId\");if(void 0!==e&&void 0!==t)throw new Error(\"Must provide either projectName or projectId, not both\");r=void 0===e?(await this.readProject({projectName:t})).id:e,Q(r);const n=await this.caller.call(fetch,`${this.apiUrl}/sessions/${r}`,{method:\"DELETE\",headers:this.headers,signal:AbortSignal.timeout(this.timeout_ms),...this.fetchOptions});await ie(n,`delete session ${r} (${t})`)}async uploadCsv({csvFile:e,fileName:t,inputKeys:r,outputKeys:n,description:i,dataType:o,name:a}){const s=`${this.apiUrl}/datasets/upload`,l=new FormData;l.append(\"file\",e,t),r.forEach((e=>{l.append(\"input_keys\",e)})),n.forEach((e=>{l.append(\"output_keys\",e)})),i&&l.append(\"description\",i),o&&l.append(\"data_type\",o),a&&l.append(\"name\",a);const u=await this.caller.call(fetch,s,{method:\"POST\",headers:this.headers,body:l,signal:AbortSignal.timeout(this.timeout_ms),...this.fetchOptions});if(!u.ok){const e=await u.json();if(e.detail&&e.detail.includes(\"already exists\"))throw new Error(`Dataset ${t} already exists`);throw new Error(`Failed to upload CSV: ${u.status} ${u.statusText}`)}return await u.json()}async createDataset(e,{description:t,dataType:r}={}){const n={name:e,description:t};r&&(n.data_type=r);const i=await this.caller.call(fetch,`${this.apiUrl}/datasets`,{method:\"POST\",headers:{...this.headers,\"Content-Type\":\"application/json\"},body:JSON.stringify(n),signal:AbortSignal.timeout(this.timeout_ms),...this.fetchOptions});if(!i.ok){const t=await i.json();if(t.detail&&t.detail.includes(\"already exists\"))throw new Error(`Dataset ${e} already exists`);throw new Error(`Failed to create dataset ${i.status} ${i.statusText}`)}return await i.json()}async readDataset({datasetId:e,datasetName:t}){let r=\"/datasets\";const n=new URLSearchParams({limit:\"1\"});if(void 0!==e&&void 0!==t)throw new Error(\"Must provide either datasetName or datasetId, not both\");if(void 0!==e)Q(e),r+=`/${e}`;else{if(void 0===t)throw new Error(\"Must provide datasetName or datasetId\");n.append(\"name\",t)}const i=await this._get(r,n);let o;if(Array.isArray(i)){if(0===i.length)throw new Error(`Dataset[id=${e}, name=${t}] not found`);o=i[0]}else o=i;return o}async hasDataset({datasetId:e,datasetName:t}){try{return await this.readDataset({datasetId:e,datasetName:t}),!0}catch(r){if(r instanceof Error&&r.message.toLocaleLowerCase().includes(\"not found\"))return!1;throw r}}async diffDatasetVersions({datasetId:e,datasetName:t,fromVersion:r,toVersion:n}){let i=e;if(void 0===i&&void 0===t)throw new Error(\"Must provide either datasetName or datasetId\");if(void 0!==i&&void 0!==t)throw new Error(\"Must provide either datasetName or datasetId, not both\");void 0===i&&(i=(await this.readDataset({datasetName:t})).id);const o=new URLSearchParams({from_version:\"string\"==typeof r?r:r.toISOString(),to_version:\"string\"==typeof n?n:n.toISOString()});return await this._get(`/datasets/${i}/versions/diff`,o)}async readDatasetOpenaiFinetuning({datasetId:e,datasetName:t}){if(void 0!==e);else{if(void 0===t)throw new Error(\"Must provide datasetName or datasetId\");e=(await this.readDataset({datasetName:t})).id}const r=await this._getResponse(`/datasets/${e}/openai_ft`);return(await r.text()).trim().split(\"\\n\").map((e=>JSON.parse(e)))}async*listDatasets({limit:e=100,offset:t=0,datasetIds:r,datasetName:n,datasetNameContains:i}={}){const o=new URLSearchParams({limit:e.toString(),offset:t.toString()});if(void 0!==r)for(const a of r)o.append(\"id\",a);void 0!==n&&o.append(\"name\",n),void 0!==i&&o.append(\"name_contains\",i);for await(const a of this._getPaginated(\"/datasets\",o))yield*a}async updateDataset(e){const{datasetId:t,datasetName:r,...n}=e;if(!t&&!r)throw new Error(\"Must provide either datasetName or datasetId\");const i=null!=t?t:(await this.readDataset({datasetName:r})).id;Q(i);const o=await this.caller.call(fetch,`${this.apiUrl}/datasets/${i}`,{method:\"PATCH\",headers:{...this.headers,\"Content-Type\":\"application/json\"},body:JSON.stringify(n),signal:AbortSignal.timeout(this.timeout_ms),...this.fetchOptions});if(!o.ok)throw new Error(`Failed to update dataset ${i}: ${o.status} ${o.statusText}`);return await o.json()}async deleteDataset({datasetId:e,datasetName:t}){let r=\"/datasets\",n=e;if(void 0!==e&&void 0!==t)throw new Error(\"Must provide either datasetName or datasetId, not both\");if(void 0!==t&&(n=(await this.readDataset({datasetName:t})).id),void 0===n)throw new Error(\"Must provide datasetName or datasetId\");Q(n),r+=`/${n}`;const i=await this.caller.call(fetch,this.apiUrl+r,{method:\"DELETE\",headers:this.headers,signal:AbortSignal.timeout(this.timeout_ms),...this.fetchOptions});if(!i.ok)throw new Error(`Failed to delete ${r}: ${i.status} ${i.statusText}`);await i.json()}async createExample(e,t,{datasetId:r,datasetName:n,createdAt:i,exampleId:o,metadata:a,split:s}){let l=r;if(void 0===l&&void 0===n)throw new Error(\"Must provide either datasetName or datasetId\");if(void 0!==l&&void 0!==n)throw new Error(\"Must provide either datasetName or datasetId, not both\");void 0===l&&(l=(await this.readDataset({datasetName:n})).id);const u=i||new Date,c={dataset_id:l,inputs:e,outputs:t,created_at:null==u?void 0:u.toISOString(),id:o,metadata:a,split:s},d=await this.caller.call(fetch,`${this.apiUrl}/examples`,{method:\"POST\",headers:{...this.headers,\"Content-Type\":\"application/json\"},body:JSON.stringify(c),signal:AbortSignal.timeout(this.timeout_ms),...this.fetchOptions});if(!d.ok)throw new Error(`Failed to create example: ${d.status} ${d.statusText}`);return await d.json()}async createExamples(e){const{inputs:t,outputs:r,metadata:n,sourceRunIds:i,exampleIds:o,datasetId:a,datasetName:s}=e;let l=a;if(void 0===l&&void 0===s)throw new Error(\"Must provide either datasetName or datasetId\");if(void 0!==l&&void 0!==s)throw new Error(\"Must provide either datasetName or datasetId, not both\");if(void 0===l){const e=await this.readDataset({datasetName:s});l=e.id}const u=t.map(((t,a)=>({dataset_id:l,inputs:t,outputs:r?r[a]:void 0,metadata:n?n[a]:void 0,split:e.splits?e.splits[a]:void 0,id:o?o[a]:void 0,source_run_id:i?i[a]:void 0}))),c=await this.caller.call(fetch,`${this.apiUrl}/examples/bulk`,{method:\"POST\",headers:{...this.headers,\"Content-Type\":\"application/json\"},body:JSON.stringify(u),signal:AbortSignal.timeout(this.timeout_ms),...this.fetchOptions});if(!c.ok)throw new Error(`Failed to create examples: ${c.status} ${c.statusText}`);return await c.json()}async createLLMExample(e,t,r){return this.createExample({input:e},{output:t},r)}async createChatExample(e,t,r){const n=e.map((e=>X(e)?Y(e):e)),i=X(t)?Y(t):t;return this.createExample({input:n},{output:i},r)}async readExample(e){Q(e);const t=`/examples/${e}`;return await this._get(t)}async*listExamples({datasetId:e,datasetName:t,exampleIds:r,asOf:n,splits:i,inlineS3Urls:o,metadata:a,limit:s,offset:l,filter:u}={}){let c;if(void 0!==e&&void 0!==t)throw new Error(\"Must provide either datasetName or datasetId, not both\");if(void 0!==e)c=e;else{if(void 0===t)throw new Error(\"Must provide a datasetName or datasetId\");c=(await this.readDataset({datasetName:t})).id}const d=new URLSearchParams({dataset:c}),h=n?\"string\"==typeof n?n:null==n?void 0:n.toISOString():void 0;h&&d.append(\"as_of\",h);const f=null==o||o;if(d.append(\"inline_s3_urls\",f.toString()),void 0!==r)for(const m of r)d.append(\"id\",m);if(void 0!==i)for(const m of i)d.append(\"splits\",m);if(void 0!==a){const e=JSON.stringify(a);d.append(\"metadata\",e)}void 0!==s&&d.append(\"limit\",s.toString()),void 0!==l&&d.append(\"offset\",l.toString()),void 0!==u&&d.append(\"filter\",u);let p=0;for await(const m of this._getPaginated(\"/examples\",d)){for(const e of m)yield e,p++;if(void 0!==s&&p>=s)break}}async deleteExample(e){Q(e);const t=`/examples/${e}`,r=await this.caller.call(fetch,this.apiUrl+t,{method:\"DELETE\",headers:this.headers,signal:AbortSignal.timeout(this.timeout_ms),...this.fetchOptions});if(!r.ok)throw new Error(`Failed to delete ${t}: ${r.status} ${r.statusText}`);await r.json()}async updateExample(e,t){Q(e);const r=await this.caller.call(fetch,`${this.apiUrl}/examples/${e}`,{method:\"PATCH\",headers:{...this.headers,\"Content-Type\":\"application/json\"},body:JSON.stringify(t),signal:AbortSignal.timeout(this.timeout_ms),...this.fetchOptions});if(!r.ok)throw new Error(`Failed to update example ${e}: ${r.status} ${r.statusText}`);return await r.json()}async evaluateRun(e,t,{sourceInfo:r,loadChildRuns:n,referenceExample:i}={loadChildRuns:!1}){let o;if(te(\"This method is deprecated and will be removed in future LangSmith versions, use `evaluate` from `langsmith/evaluation` instead.\"),\"string\"==typeof e)o=await this.readRun(e,{loadChildRuns:n});else{if(\"object\"!=typeof e||!(\"id\"in e))throw new Error(\"Invalid run type: \"+typeof e);o=e}null!==o.reference_example_id&&void 0!==o.reference_example_id&&(i=await this.readExample(o.reference_example_id));const a=await t.evaluateRun(o,i),[s,l]=await this._logEvaluationFeedback(a,o,r);return l[0]}async createFeedback(e,t,{score:r,value:n,correction:i,comment:o,sourceInfo:a,feedbackSourceType:s=\"api\",sourceRunId:l,feedbackId:u,feedbackConfig:c,projectId:d,comparativeExperimentId:h}){var f;if(!e&&!d)throw new Error(\"One of runId or projectId must be provided\");if(e&&d)throw new Error(\"Only one of runId or projectId can be provided\");const p={type:null!=s?s:\"api\",metadata:null!=a?a:{}};void 0===l||void 0===(null==p?void 0:p.metadata)||p.metadata.__run||(p.metadata.__run={run_id:l}),void 0!==(null==p?void 0:p.metadata)&&void 0!==(null==(f=p.metadata.__run)?void 0:f.run_id)&&Q(p.metadata.__run.run_id);const m={id:null!=u?u:C(),run_id:e,key:t,score:r,value:n,correction:i,comment:o,feedback_source:p,comparative_experiment_id:h,feedbackConfig:c,session_id:d},g=`${this.apiUrl}/feedback`,_=await this.caller.call(fetch,g,{method:\"POST\",headers:{...this.headers,\"Content-Type\":\"application/json\"},body:JSON.stringify(m),signal:AbortSignal.timeout(this.timeout_ms),...this.fetchOptions});return await ie(_,\"create feedback\"),m}async updateFeedback(e,{score:t,value:r,correction:n,comment:i}){const o={};null!=t&&(o.score=t),null!=r&&(o.value=r),null!=n&&(o.correction=n),null!=i&&(o.comment=i),Q(e);const a=await this.caller.call(fetch,`${this.apiUrl}/feedback/${e}`,{method:\"PATCH\",headers:{...this.headers,\"Content-Type\":\"application/json\"},body:JSON.stringify(o),signal:AbortSignal.timeout(this.timeout_ms),...this.fetchOptions});await ie(a,\"update feedback\")}async readFeedback(e){Q(e);const t=`/feedback/${e}`;return await this._get(t)}async deleteFeedback(e){Q(e);const t=`/feedback/${e}`,r=await this.caller.call(fetch,this.apiUrl+t,{method:\"DELETE\",headers:this.headers,signal:AbortSignal.timeout(this.timeout_ms),...this.fetchOptions});if(!r.ok)throw new Error(`Failed to delete ${t}: ${r.status} ${r.statusText}`);await r.json()}async*listFeedback({runIds:e,feedbackKeys:t,feedbackSourceTypes:r}={}){const n=new URLSearchParams;if(e&&n.append(\"run\",e.join(\",\")),t)for(const i of t)n.append(\"key\",i);if(r)for(const i of r)n.append(\"source\",i);for await(const i of this._getPaginated(\"/feedback\",n))yield*i}async createPresignedFeedbackToken(e,t,{expiration:r,feedbackConfig:n}={}){const i={run_id:e,feedback_key:t,feedback_config:n};r?\"string\"==typeof r?i.expires_at=r:((null==r?void 0:r.hours)||(null==r?void 0:r.minutes)||(null==r?void 0:r.days))&&(i.expires_in=r):i.expires_in={hours:3};const o=await this.caller.call(fetch,`${this.apiUrl}/feedback/tokens`,{method:\"POST\",headers:{...this.headers,\"Content-Type\":\"application/json\"},body:JSON.stringify(i),signal:AbortSignal.timeout(this.timeout_ms),...this.fetchOptions});return await o.json()}async createComparativeExperiment({name:e,experimentIds:t,referenceDatasetId:r,createdAt:n,description:i,metadata:o,id:a}){var s;if(0===t.length)throw new Error(\"At least one experiment is required\");if(r||(r=(await this.readProject({projectId:t[0]})).reference_dataset_id),null==!r)throw new Error(\"A reference dataset is required\");const l={id:a,name:e,experiment_ids:t,reference_dataset_id:r,description:i,created_at:null==(s=null!=n?n:new Date)?void 0:s.toISOString(),extra:{}};o&&(l.extra.metadata=o);const u=await this.caller.call(fetch,`${this.apiUrl}/datasets/comparative`,{method:\"POST\",headers:{...this.headers,\"Content-Type\":\"application/json\"},body:JSON.stringify(l),signal:AbortSignal.timeout(this.timeout_ms),...this.fetchOptions});return await u.json()}async*listPresignedFeedbackTokens(e){Q(e);const t=new URLSearchParams({run_id:e});for await(const r of this._getPaginated(\"/feedback/tokens\",t))yield*r}_selectEvalResults(e){let t;return t=\"results\"in e?e.results:[e],t}async _logEvaluationFeedback(e,t,r){const n=this._selectEvalResults(e),i=[];for(const o of n){let e=r||{};o.evaluatorInfo&&(e={...o.evaluatorInfo,...e});let n=null;o.targetRunId?n=o.targetRunId:t&&(n=t.id),i.push(await this.createFeedback(n,o.key,{score:o.score,value:o.value,comment:o.comment,correction:o.correction,sourceInfo:e,sourceRunId:o.sourceRunId,feedbackConfig:o.feedbackConfig,feedbackSourceType:\"model\"}))}return[n,i]}async logEvaluationFeedback(e,t,r){const[n]=await this._logEvaluationFeedback(e,t,r);return n}constructor(t={}){var r,n,i,o,a,s,l,u,c,d,h,f,p;Object.defineProperty(this,\"apiKey\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,\"apiUrl\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,\"webUrl\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,\"caller\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,\"batchIngestCaller\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,\"timeout_ms\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,\"_tenantId\",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,\"hideInputs\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,\"hideOutputs\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,\"tracingSampleRate\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,\"sampledPostUuids\",{enumerable:!0,configurable:!0,writable:!0,value:new Set}),Object.defineProperty(this,\"autoBatchTracing\",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(this,\"batchEndpointSupported\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,\"autoBatchQueue\",{enumerable:!0,configurable:!0,writable:!0,value:new ae}),Object.defineProperty(this,\"pendingAutoBatchedRunLimit\",{enumerable:!0,configurable:!0,writable:!0,value:100}),Object.defineProperty(this,\"autoBatchTimeout\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,\"autoBatchInitialDelayMs\",{enumerable:!0,configurable:!0,writable:!0,value:250}),Object.defineProperty(this,\"autoBatchAggregationDelayMs\",{enumerable:!0,configurable:!0,writable:!0,value:50}),Object.defineProperty(this,\"serverInfo\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,\"fetchOptions\",{enumerable:!0,configurable:!0,writable:!0,value:void 0});const m=e.getDefaultClientConfig();this.tracingSampleRate=re(),this.apiUrl=null!=(n=ce(null!=(r=t.apiUrl)?r:m.apiUrl))?n:\"\",this.apiKey=ce(null!=(i=t.apiKey)?i:m.apiKey),this.webUrl=ce(null!=(o=t.webUrl)?o:m.webUrl),this.timeout_ms=null!=(a=t.timeout_ms)?a:12e3,this.caller=new N(null!=(s=t.callerOptions)?s:{}),this.batchIngestCaller=new N({...null!=(l=t.callerOptions)?l:{},onFailedResponseHook:oe}),this.hideInputs=null!=(c=null!=(u=t.hideInputs)?u:t.anonymizer)?c:m.hideInputs,this.hideOutputs=null!=(h=null!=(d=t.hideOutputs)?d:t.anonymizer)?h:m.hideOutputs,this.autoBatchTracing=null!=(f=t.autoBatchTracing)?f:this.autoBatchTracing,this.pendingAutoBatchedRunLimit=null!=(p=t.pendingAutoBatchedRunLimit)?p:this.pendingAutoBatchedRunLimit,this.fetchOptions=t.fetchOptions||{}}}}}),we=d({\"../../node_modules/.pnpm/langsmith@0.1.36_openai@4.57.1_zod@3.23.8_/node_modules/langsmith/dist/index.js\"(){Ae(),Ne(),de=\"0.1.36\"}});async function Se(){if(void 0===ye){const e=be(),t=function(){if(void 0!==ve)return ve;const e=[\"VERCEL_GIT_COMMIT_SHA\",\"NEXT_PUBLIC_VERCEL_GIT_COMMIT_SHA\",\"COMMIT_REF\",\"RENDER_GIT_COMMIT\",\"CI_COMMIT_SHA\",\"CIRCLE_SHA1\",\"CF_PAGES_COMMIT_SHA\",\"REACT_APP_GIT_SHA\",\"SOURCE_VERSION\",\"GITHUB_SHA\",\"TRAVIS_COMMIT\",\"GIT_COMMIT\",\"BUILD_VCS_NUMBER\",\"bamboo_planRepository_revision\",\"Build.SourceVersion\",\"BITBUCKET_COMMIT\",\"DRONE_COMMIT_SHA\",\"SEMAPHORE_GIT_SHA\",\"BUILDKITE_COMMIT\"],t={};for(const r of e){const e=Ee(r);void 0!==e&&(t[r]=e)}return ve=t,t}();ye={library:\"langsmith\",runtime:e,sdk:\"langsmith-js\",sdk_version:de,...t}}return ye}function Ee(e){var t;try{return void 0!==import_browser.default?null==(t=import_browser.default.env)?void 0:t[e]:void 0}catch(r){return}}var xe,Ce,Te,Re=d({\"../../node_modules/.pnpm/langsmith@0.1.36_openai@4.57.1_zod@3.23.8_/node_modules/langsmith/dist/utils/env.js\"(){we(),fe=()=>\"undefined\"!=typeof window&&void 0!==window.document,pe=()=>\"object\"==typeof globalThis&&globalThis.constructor&&\"DedicatedWorkerGlobalScope\"===globalThis.constructor.name,me=()=>\"undefined\"!=typeof window&&\"nodejs\"===window.name||\"undefined\"!=typeof navigator&&(navigator.userAgent.includes(\"Node.js\")||navigator.userAgent.includes(\"jsdom\")),ge=()=>\"undefined\"!=typeof Deno,_e=()=>void 0!==import_browser.default&&void 0!==import_browser.default.versions&&void 0!==import_browser.default.versions.node&&!ge(),be=()=>he||(he=fe()?\"browser\":_e()?\"node\":pe()?\"webworker\":me()?\"jsdom\":ge()?\"deno\":\"other\")}}),Ie=d({\"../../node_modules/.pnpm/langsmith@0.1.36_openai@4.57.1_zod@3.23.8_/node_modules/langsmith/dist/env.js\"(){Re(),xe=e=>void 0!==e?e:!![\"LANGSMITH_TRACING_V2\",\"LANGCHAIN_TRACING_V2\",\"LANGSMITH_TRACING\",\"LANGCHAIN_TRACING\"].find((e=>\"true\"===Ee(e)))}});function ke(e){return void 0!==e&&\"function\"==typeof e.createChild&&\"function\"==typeof e.postRun}function Pe(e){return Array.isArray(e)&&e.some((e=>\"string\"==typeof e.name&&\"langchain_tracer\"===e.name))}var Me,Oe,Be,Ne=d({\"../../node_modules/.pnpm/langsmith@0.1.36_openai@4.57.1_zod@3.23.8_/node_modules/langsmith/dist/run_trees.js\"(){L(),Re(),Ae(),Ie(),le(),Ce=class e{static fromHeader(t){const r=t.split(\",\");let n={},i=[];for(const e of r){const[t,r]=e.split(\"=\"),o=decodeURIComponent(r);\"langsmith-metadata\"===t?n=JSON.parse(o):\"langsmith-tags\"===t&&(i=o.split(\",\"))}return new e(n,i)}toHeader(){const e=[];return this.metadata&&Object.keys(this.metadata).length>0&&e.push(`langsmith-metadata=${encodeURIComponent(JSON.stringify(this.metadata))}`),this.tags&&this.tags.length>0&&e.push(`langsmith-tags=${encodeURIComponent(this.tags.join(\",\"))}`),e.join(\",\")}constructor(e,t){Object.defineProperty(this,\"metadata\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,\"tags\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.metadata=e,this.tags=t}},Te=class e{static getDefaultConfig(){var e,t,r;return{id:C(),run_type:\"chain\",project_name:null!=(t=null!=(e=Ee(\"LANGCHAIN_PROJECT\"))?e:Ee(\"LANGCHAIN_SESSION\"))?t:\"default\",child_runs:[],api_url:null!=(r=Ee(\"LANGCHAIN_ENDPOINT\"))?r:\"http://localhost:1984\",api_key:Ee(\"LANGCHAIN_API_KEY\"),caller_options:{},start_time:Date.now(),serialized:{},inputs:{},extra:{}}}createChild(t){const r=this.child_execution_order+1,n=new e({...t,parent_run:this,project_name:this.project_name,client:this.client,tracingEnabled:this.tracingEnabled,execution_order:r,child_execution_order:r}),i=new Set;let o=this;for(;null!=o&&!i.has(o.id);)i.add(o.id),o.child_execution_order=Math.max(o.child_execution_order,r),o=o.parent_run;return this.child_runs.push(n),n}async end(e,t,r=Date.now()){var n,i,o;this.outputs=null!=(n=this.outputs)?n:e,this.error=null!=(i=this.error)?i:t,this.end_time=null!=(o=this.end_time)?o:r}_convertToCreate(e,t,r=!0){var n,i;const o=null!=(n=e.extra)?n:{};if(o.runtime||(o.runtime={}),t)for(const[l,u]of Object.entries(t))o.runtime[l]||(o.runtime[l]=u);let a,s;return r?(s=null==(i=e.parent_run)?void 0:i.id,a=[]):(a=e.child_runs.map((e=>this._convertToCreate(e,t,r))),s=void 0),{id:e.id,name:e.name,start_time:e.start_time,end_time:e.end_time,run_type:e.run_type,reference_example_id:e.reference_example_id,extra:o,serialized:e.serialized,error:e.error,inputs:e.inputs,outputs:e.outputs,session_name:e.project_name,child_runs:a,parent_run_id:s,trace_id:e.trace_id,dotted_order:e.dotted_order,tags:e.tags}}async postRun(e=!0){const t=await Se(),r=await this._convertToCreate(this,t,!0);if(await this.client.createRun(r),!e){te(\"Posting with excludeChildRuns=false is deprecated and will be removed in a future version.\");for(const e of this.child_runs)await e.postRun(!1)}}async patchRun(){var e;const t={end_time:this.end_time,error:this.error,inputs:this.inputs,outputs:this.outputs,parent_run_id:null==(e=this.parent_run)?void 0:e.id,reference_example_id:this.reference_example_id,extra:this.extra,events:this.events,dotted_order:this.dotted_order,trace_id:this.trace_id,tags:this.tags};await this.client.updateRun(this.id,t)}toJSON(){return this._convertToCreate(this,void 0,!1)}static fromRunnableConfig(t,r){var n,i,o,a,s,l,u;const c=null==t?void 0:t.callbacks;let d,h,f,p=xe();if(c){const e=null!=(i=null==(n=null==c?void 0:c.getParentRunId)?void 0:n.call(c))?i:\"\",t=null==(o=null==c?void 0:c.handlers)?void 0:o.find((e=>\"langchain_tracer\"==(null==e?void 0:e.name)));d=null==(a=null==t?void 0:t.getRun)?void 0:a.call(t,e),h=null==t?void 0:t.projectName,f=null==t?void 0:t.client,p=p||!!t}return d?new e({name:d.name,id:d.id,client:f,tracingEnabled:p,project_name:h,tags:[...new Set((null!=(s=null==d?void 0:d.tags)?s:[]).concat(null!=(l=null==t?void 0:t.tags)?l:[]))],extra:{metadata:{...null==(u=null==d?void 0:d.extra)?void 0:u.metadata,...null==t?void 0:t.metadata}}}).createChild(r):new e({...r,client:f,tracingEnabled:p,project_name:h})}static fromDottedOrder(e){return this.fromHeaders({\"langsmith-trace\":e})}static fromHeaders(t,r){var n,i,o,a;const s=\"get\"in t&&\"function\"==typeof t.get?{\"langsmith-trace\":t.get(\"langsmith-trace\"),baggage:t.get(\"baggage\")}:t,l=s[\"langsmith-trace\"];if(!l||\"string\"!=typeof l)return;const u=l.trim(),c=u.split(\".\").map((e=>{const[t,r]=e.split(\"Z\");return{strTime:t,time:Date.parse(t+\"Z\"),uuid:r}})),d=c[0].uuid,h={...r,name:null!=(n=null==r?void 0:r.name)?n:\"parent\",run_type:null!=(i=null==r?void 0:r.run_type)?i:\"chain\",start_time:null!=(o=null==r?void 0:r.start_time)?o:Date.now(),id:null==(a=c.at(-1))?void 0:a.uuid,trace_id:d,dotted_order:u};if(s.baggage&&\"string\"==typeof s.baggage){const e=Ce.fromHeader(s.baggage);h.metadata=e.metadata,h.tags=e.tags}return new e(h)}toHeaders(e){var t;const r={\"langsmith-trace\":this.dotted_order,baggage:new Ce(null==(t=this.extra)?void 0:t.metadata,this.tags).toHeader()};if(e)for(const[n,i]of Object.entries(r))e.set(n,i);return r}constructor(t){var r,n,i;Object.defineProperty(this,\"id\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,\"name\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,\"run_type\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,\"project_name\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,\"parent_run\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,\"child_runs\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,\"start_time\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,\"end_time\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,\"extra\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,\"tags\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,\"error\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,\"serialized\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,\"inputs\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,\"outputs\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,\"reference_example_id\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,\"client\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,\"events\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,\"trace_id\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,\"dotted_order\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,\"tracingEnabled\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,\"execution_order\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,\"child_execution_order\",{enumerable:!0,configurable:!0,writable:!0,value:void 0});const o=e.getDefaultConfig(),{metadata:a,...s}=t,l=null!=(r=s.client)?r:new se,u={...a,...null==(n=null==s?void 0:s.extra)?void 0:n.metadata};if(s.extra={...s.extra,metadata:u},Object.assign(this,{...o,...s,client:l}),this.trace_id||(this.parent_run?this.trace_id=null!=(i=this.parent_run.trace_id)?i:this.id:this.trace_id=this.id),null!=this.execution_order||(this.execution_order=1),null!=this.child_execution_order||(this.child_execution_order=1),!this.dotted_order){const e=function(e,t,r=1){const n=r.toFixed(0).slice(0,3).padStart(3,\"0\");return`${new Date(e).toISOString().slice(0,-1)}${n}Z`.replace(/[-:.]/g,\"\")+t}(this.start_time,this.id,this.execution_order);this.parent_run?this.dotted_order=this.parent_run.dotted_order+\".\"+e:this.dotted_order=e}}}}});function je(e){return\"function\"==typeof e&&\"langsmith:traceable\"in e}var Le,De,Fe,Ue,ze,qe,Ge=d({\"../../node_modules/.pnpm/langsmith@0.1.36_openai@4.57.1_zod@3.23.8_/node_modules/langsmith/dist/singletons/traceable.js\"(){Me=class{getStore(){}run(e,t){return t()}},Oe=new class{getInstance(){return this.asyncLocalStorage}initializeGlobalInstance(e){this.hasBeenInitialized||(this.hasBeenInitialized=!0,this.asyncLocalStorage=e)}constructor(){Object.defineProperty(this,\"asyncLocalStorage\",{enumerable:!0,configurable:!0,writable:!0,value:new Me}),Object.defineProperty(this,\"hasBeenInitialized\",{enumerable:!0,configurable:!0,writable:!0,value:!1})}},Be=Symbol.for(\"langsmith:traceable:root\")}});function He(e){if(\"object\"!=typeof e||null==e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}var We,Ve,$e,Ke,Xe,Ye,Je=d({\"../../node_modules/.pnpm/langsmith@0.1.36_openai@4.57.1_zod@3.23.8_/node_modules/langsmith/dist/utils/asserts.js\"(){Le=e=>null!=e&&\"object\"==typeof e&&\"function\"==typeof e[Symbol.asyncIterator],De=e=>null!=e&&\"object\"==typeof e&&\"next\"in e&&\"function\"==typeof e.next,Fe=function*(){}.constructor,Ue=e=>null!=e&&\"function\"==typeof e&&e instanceof Fe,ze=e=>null!=e&&\"object\"==typeof e&&\"then\"in e&&\"function\"==typeof e.then,qe=e=>null!=e&&\"object\"==typeof e&&\"getReader\"in e&&\"function\"==typeof e.getReader}});function Qe(e,t){const{aggregator:r,argsConfigPath:n,...i}=null!=t?t:{},o=(...o)=>{var a,s,l;let u;try{let t;if(n){const[e,r]=n;if(e!==o.length-1||r){if(e__left_angle_mark_=o.length&&\"object\"==typeof o[e]&&null!==o[e])if(r){const{[r]:n,...i}=o[e];t=n,o[e]=i}else t=o[e],o.splice(e,1)}else t=o.pop()}u={name:e.name||\"__left_angle_mark_lambda>\",...i,...t,tags:[...new Set([...null!=(a=null==i?void 0:i.tags)?a:[],...null!=(s=null==t?void 0:t.tags)?s:[]])],metadata:{...null==i?void 0:i.metadata,...null==t?void 0:t.metadata}}}catch(p){import_console_browserify.default.warn(`Failed to extract runtime config from args for ${null!=(l=null==i?void 0:i.name)?l:e.name}`,p),u={name:e.name||\"__left_angle_mark_lambda>\",...i}}const c=Oe.getInstance(),d=o;for(let e=0;e__left_angle_mark_d.length;e++)d[e]=Ye(d[e]);const[h,f]=(()=>{const[e,...r]=d;if(function(e){var t;return void 0!==e&&\"object\"==typeof e.callbacks&&(Pe(null==(t=e.callbacks)?void 0:t.handlers)||Pe(e.callbacks))}(e))return[Ke(Te.fromRunnableConfig(e,u),r,null==t?void 0:t.getInvocationParams),r];if(ke(e)&&\"callbackManager\"in e&&null!=e.callbackManager)return[e,r];if(e===Be||ke(e)){const n=Ke(e===Be?new Te(u):e.createChild(u),r,null==t?void 0:t.getInvocationParams);return[n,[n,...r]]}const n=c.getStore();return n?[Ke(n.createChild(u),d,null==t?void 0:t.getInvocationParams),d]:[Ke(new Te(u),d,null==t?void 0:t.getInvocationParams),d]})();return c.run(h,(()=>{const n=null==h?void 0:h.postRun();async function i(e){if(void 0!==r)try{return await r(e)}catch(t){import_console_browserify.default.error(\"[ERROR]: LangSmith aggregation failed: \",t)}return e}async function*o(e,t){let r=!1;const n=[];try{const i=e[Symbol.asyncIterator]();for(;;){const{value:e,done:o}=await(t?t((()=>i.next())):i.next());if(o){r=!0;break}n.push(e),yield e}}catch(o){throw await(null==h?void 0:h.end(void 0,String(o))),o}finally{r||await(null==h?void 0:h.end(void 0,\"Cancelled\")),await(null==h?void 0:h.end($e(await i(n)))),await a()}}async function a(){const e=null==t?void 0:t.on_end;e&&(h?e(h):import_console_browserify.default.warn(\"Can not call 'on_end' if currentRunTree is undefined\")),await n,await(null==h?void 0:h.patchRun())}let s;try{s=e(...f)}catch(p){s=Promise.reject(p)}if(Le(s)){const e=We.AsyncLocalStorage.snapshot();return o(s,e)}const l=new Promise(((t,r)=>{Promise.resolve(s).then((async r=>{if(Le(r)){const e=We.AsyncLocalStorage.snapshot();return t(o(r,e))}if(Ue(e)&&De(r)){const e=function(e){const t=[];for(;;){const r=e.next();if(t.push(r),r.done)break}return t}(r);return await(null==h?void 0:h.end($e(await i(e.reduce(((e,{value:t,done:r})=>(r&&void 0===t||e.push(t),e)),[]))))),await a(),function*(){for(const t of e){if(t.done)return t.value;yield t.value}}()}try{await(null==h?void 0:h.end($e(r))),await a()}finally{return r}}),(async e=>{throw await(null==h?void 0:h.end(void 0,String(e))),await a(),e})).then(t,r)}));return\"object\"!=typeof s||null===s?l:new Proxy(s,{get(e,t,r){return\"then\"===(n=t)||\"catch\"===n||\"finally\"===n?l[t].bind(l):Reflect.get(e,t,r);var n}})}))};return Object.defineProperty(o,\"langsmith:traceable\",{value:i}),o}var Ze,et,tt,rt,nt,it=d({\"../../node_modules/.pnpm/langsmith@0.1.36_openai@4.57.1_zod@3.23.8_/node_modules/langsmith/dist/traceable.js\"(){init_blank_polyfill(),We=__toCommonJS(blank_polyfill_exports),Ne(),Ie(),Ge(),Je(),Ge(),Oe.initializeGlobalInstance(new We.AsyncLocalStorage),Ve=e=>{const t=e[0];return null==t?{}:e.length>1?{args:e}:He(t)?t:{input:t}},$e=e=>He(e)?e:{outputs:e},Ke=(e,t,r)=>{if(!xe(e.tracingEnabled))return;e.inputs=Ve(t);const n=null==r?void 0:r(...t);return null!=n&&(null!=e.extra||(e.extra={}),e.extra.metadata={...n,...e.extra.metadata}),e},Xe=e=>{const t={current:void 0};return new Proxy(e,{get(r,n,i){if(\"then\"===n){const r=e[n].bind(e);return(e,n=e=>{throw e})=>r((r=>(t.current=[\"resolve\",r],e(r))),(e=>(t.current=[\"reject\",e],n(e))))}if(\"catch\"===n){const r=e[n].bind(e);return e=>r((r=>(t.current=[\"reject\",r],e(r))))}return\"toJSON\"===n?()=>{var e;if(!t.current)return;const[r,n]=null!=(e=t.current)?e:[];return\"resolve\"===r?n:{error:n}}:Reflect.get(r,n,i)}})},Ye=e=>{if(qe(e)){const t=[],r=new TransformStream({start:()=>{},transform:(e,r)=>{t.push(e),r.enqueue(e)},flush:()=>{}}),n=e.pipeThrough(r);return Object.assign(n,{toJSON:()=>t}),n}if(Le(e)){const t={current:[]};return new Proxy(e,{get:(r,n,i)=>n===Symbol.asyncIterator?()=>{const r=e[Symbol.asyncIterator].bind(e)();return new Proxy(r,{get(e,n,i){if(\"next\"===n||\"return\"===n||\"throw\"===n){const e=r.next.bind(r);return(...r)=>{const n=Xe(e(...r));return t.current.push(n),n}}return\"return\"===n||\"throw\"===n?r.next.bind(r):Reflect.get(e,n,i)}})}:\"toJSON\"===n?()=>t.current.map((e=>e.toJSON())).reduce(((e,t)=>((null==t?void 0:t.value)&&e.push(t.value),e)),[]):Reflect.get(r,n,i)})}if(!Array.isArray(e)&&De(e)){const t=[];return new Proxy(e,{get(r,n,i){var o;if(\"next\"===n||\"return\"===n||\"throw\"===n){const r=null==(o=e[n])?void 0:o.bind(e);return(...e)=>{const n=null==r?void 0:r(...e);return null!=n&&t.push(n),n}}return\"toJSON\"===n?()=>t.reduce(((e,t)=>(t.value&&e.push(t.value),e)),[]):Reflect.get(r,n,i)}})}return ze(e)?Xe(e):e}}}),ot=d({\"../../node_modules/.pnpm/langsmith@0.1.36_openai@4.57.1_zod@3.23.8_/node_modules/langsmith/dist/wrappers/openai.js\"(){it(),Ze=e=>{if(!e||0===e.length)return{choices:[{message:{role:\"assistant\",content:\"\"}}]};const t={};for(const n of e)for(const e of n.choices)void 0===t[e.index]&&(t[e.index]=[]),t[e.index].push(e);const r=e[e.length-1];return r.choices=Object.values(t).map((e=>function(e){var t,r;const n=e.slice().reverse(),i={role:\"assistant\",content:\"\"};for(const a of n)if(a.delta.role){i.role=a.delta.role;break}const o={};for(const a of e)if(a.delta.content&&(i.content=i.content.concat(a.delta.content)),a.delta.function_call&&(i.function_call||(i.function_call={name:\"\",arguments:\"\"}),a.delta.function_call.name&&(i.function_call.name+=a.delta.function_call.name),a.delta.function_call.arguments&&(i.function_call.arguments+=a.delta.function_call.arguments)),a.delta.tool_calls)for(const e of a.delta.tool_calls)o[a.index]||(o[a.index]=[]),o[a.index].push(e);if(Object.keys(o).length>0){i.tool_calls=[...Array(Object.keys(o).length)];for(const[e,n]of Object.entries(o)){const o=parseInt(e);i.tool_calls[o]={index:o,id:(null==(t=n.find((e=>e.id)))?void 0:t.id)||null,type:(null==(r=n.find((e=>e.type)))?void 0:r.type)||null};for(const e of n)e.function&&(i.tool_calls[o].function||(i.tool_calls[o].function={name:\"\",arguments:\"\"}),e.function.name&&(i.tool_calls[o].function.name+=e.function.name),e.function.arguments&&(i.tool_calls[o].function.arguments+=e.function.arguments))}}return{index:e[0].index,finish_reason:n.find((e=>e.finish_reason))||null,message:i}}(e))),r},et=e=>{if(0===e.length)return{choices:[{text:\"\"}]};const t=[];for(const i of e){const e=i.choices[0].text;null!=e&&t.push(e)}const r=t.join(\"\"),n=e[e.length-1];return n.choices=[{...n.choices[0],text:r}],n},tt=(e,t)=>{if(je(e.chat.completions.create)||je(e.completions.create))throw new Error(\"This instance of OpenAI client has been already wrapped once.\");return e.chat.completions.create=Qe(e.chat.completions.create.bind(e.chat.completions),{name:\"ChatOpenAI\",run_type:\"llm\",aggregator:Ze,argsConfigPath:[1,\"langsmithExtra\"],getInvocationParams:e=>{var t,r,n;if(\"object\"!=typeof e||null==e)return;const i=e,o=null!=(t=\"string\"==typeof i.stop?[i.stop]:i.stop)?t:void 0;return{ls_provider:\"openai\",ls_model_type:\"chat\",ls_model_name:i.model,ls_max_tokens:null!=(r=i.max_tokens)?r:void 0,ls_temperature:null!=(n=i.temperature)?n:void 0,ls_stop:o}},...t}),e.completions.create=Qe(e.completions.create.bind(e.completions),{name:\"OpenAI\",run_type:\"llm\",aggregator:et,argsConfigPath:[1,\"langsmithExtra\"],getInvocationParams:e=>{var t,r,n;if(\"object\"!=typeof e||null==e)return;const i=e,o=null!=(t=\"string\"==typeof i.stop?[i.stop]:i.stop)?t:void 0;return{ls_provider:\"openai\",ls_model_type:\"text\",ls_model_name:i.model,ls_max_tokens:null!=(r=i.max_tokens)?r:void 0,ls_temperature:null!=(n=i.temperature)?n:void 0,ls_stop:o}},...t}),e},rt=(e,t,r)=>new Proxy(e,{get(e,n,i){const o=e[n];return\"function\"==typeof o?Qe(o.bind(e),Object.assign({name:[t,n.toString()].join(\".\"),run_type:\"llm\"},r)):null==o||Array.isArray(o)||o instanceof Date||\"object\"!=typeof o?Reflect.get(e,n,i):rt(o,[t,n.toString()].join(\".\"),r)}}),nt=(e,t)=>{var r,n;return rt(e,null!=(n=null==t?void 0:t.runName)?n:null==(r=e.constructor)?void 0:r.name,{client:null==t?void 0:t.client})}}}),at=d({\"../../node_modules/.pnpm/langsmith@0.1.36_openai@4.57.1_zod@3.23.8_/node_modules/langsmith/dist/wrappers/index.js\"(){ot()}}),st={};f(st,{wrapOpenAI:()=>tt,wrapSDK:()=>nt});var lt,ut=d({\"../../node_modules/.pnpm/langsmith@0.1.36_openai@4.57.1_zod@3.23.8_/node_modules/langsmith/wrappers.js\"(){at()}}),ct={};f(ct,{AIResponseFormat:()=>nr,BaseElement:()=>rr,Executor:()=>Qt,Insight:()=>Wr,UIContext:()=>ir,allAIConfig:()=>Nt,default:()=>Kr,getAIConfig:()=>Ot,getElement:()=>Vr,getLogDirByType:()=>Vt,getSection:()=>$r,getVersion:()=>Jt,overrideAIConfig:()=>jt,plan:()=>Or,setLogDir:()=>Wt,transformElementPositionToId:()=>kr}),t.exports=(lt=ct,p(a({},\"__esModule\",{value:!0}),lt));var dt=m(require_assert()),ht=\"MIDSCENE_OPENAI_INIT_CONFIG_JSON\",ft=\"MIDSCENE_MODEL_NAME\",pt=\"MIDSCENE_LANGSMITH_DEBUG\",mt=\"MIDSCENE_DEBUG_AI_PROFILE\",gt=\"MIDSCENE_DANGEROUSLY_PRINT_ALL_CONFIG\",_t=\"MIDSCENE_DEBUG_MODE\",bt=\"MIDSCENE_OPENAI_SOCKS_PROXY\",yt=\"OPENAI_API_KEY\",vt=\"OPENAI_BASE_URL\",At=\"MIDSCENE_MODEL_TEXT_ONLY\",wt=\"MIDSCENE_CACHE\",St=\"MATCH_BY_POSITION\",Et=\"MIDSCENE_REPORT_TAG_NAME\",xt=\"MIDSCENE_USE_AZURE_OPENAI\",Ct=\"MIDSCENE_AZURE_OPENAI_SCOPE\",Tt=\"MIDSCENE_AZURE_OPENAI_INIT_CONFIG_JSON\",Rt=\"MIDSCENE_USE_ANTHROPIC_SDK\",It=\"ANTHROPIC_API_KEY\",kt=\"OPENAI_USE_AZURE\",Pt=()=>({[ht]:import_browser.default.env[ht]||void 0,[ft]:import_browser.default.env[ft]||void 0,[_t]:import_browser.default.env[_t]||void 0,[pt]:import_browser.default.env[pt]||void 0,[mt]:import_browser.default.env[mt]||void 0,[gt]:import_browser.default.env[gt]||void 0,[yt]:import_browser.default.env[yt]||void 0,[vt]:import_browser.default.env[vt]||void 0,[At]:import_browser.default.env[At]||void 0,[kt]:import_browser.default.env[kt]||void 0,[wt]:import_browser.default.env[wt]||void 0,[St]:import_browser.default.env[St]||void 0,[Et]:import_browser.default.env[Et]||void 0,[bt]:import_browser.default.env[bt]||void 0,[xt]:import_browser.default.env[xt]||void 0,[Ct]:import_browser.default.env[Ct]||\"https://cognitiveservices.azure.com/.default\",[Tt]:import_browser.default.env[Tt]||void 0,[Rt]:import_browser.default.env[Rt]||void 0,[It]:import_browser.default.env[It]||void 0}),Mt={},Ot=e=>void 0!==Mt[e]?Mt[e]:Pt()[e],Bt=e=>{const t=Ot(e);try{return t?JSON.parse(t):void 0}catch(r){throw new Error(`Failed to parse json config: ${e}. ${r.message}`,{cause:r})}},Nt=()=>({...Pt(),...Mt}),jt=(e,t)=>{Mt=t?{...Mt,...e}:{...e}},Lt=m(require_assert()),Dt=(require_child_process(),require_fs()),Ft=(require_browser14(),require_path_browserify()),Ut=require_fs2(),zt=require_utils5(),qt=(0,Ft.join)(import_browser.default.cwd(),\"./midscene_run/\"),Gt=!1;function Ht(){return qt}function Wt(e){qt=e}function Vt(e){const t=(0,Ft.join)(Ht(),e);return(0,Dt.existsSync)(t)||(0,Dt.mkdirSync)(t,{recursive:!0}),t}var $t=null;function Kt(e){const t=function(){if(zt.ifInBrowser)return!$t&&window.midscene_report_tpl&&($t=window.midscene_report_tpl),(0,Lt.default)($t,\"reportTpl should be set before writing report in browser\"),$t;if(!$t){let e=(0,Ft.join)(__dirname,\"../../report/index.html\");(0,Dt.existsSync)(e)||(e=(0,Ft.join)(__dirname,\"../report/index.html\")),$t=(0,Dt.readFileSync)(e,\"utf-8\")}return $t}();let r;if(Array.isArray(e)&&0===e.length||void 0===e)r=t.replace(/\\s+{{dump}}\\s+/,'__left_angle_mark_script type=\"midscene_web_dump\" type=\"application/json\">__left_angle_mark_\\/script>');else if(\"string\"==typeof e)r=t.replace(/\\s+{{dump}}\\s+/,`__left_angle_mark_script type=\"midscene_web_dump\" type=\"application/json\">${e}__left_angle_mark_\\/script>`);else{const n=e.map((({dumpString:e,attributes:t})=>`__left_angle_mark_script type=\"midscene_web_dump\" type=\"application/json\" ${Object.keys(t||{}).map((e=>`${e}=\"${encodeURIComponent(t[e])}\"`)).join(\" \")}\\n>${e}\\n__left_angle_mark_\\/script>`));r=t.replace(/\\s+{{dump}}\\s+/,n.join(\"\\n\"))}return r}function Xt(e){if(zt.ifInBrowser)return\"/mock/report.html\";const{fileName:t,fileExt:r,fileContent:n,type:i=\"dump\"}=e,o=Vt(i);if(!Gt){(0,Lt.default)(o,\"logDir should be set before writing dump file\");const e=(0,Ft.join)(o,\"../../.gitignore\");let t=\"\";(0,Dt.existsSync)(e)&&(t=(0,Dt.readFileSync)(e,\"utf-8\"));const r=(0,Ft.basename)(qt);t.includes(`${r}/`)||(0,Dt.writeFileSync)(e,`${t}\\n# Midscene.js dump files\\n${r}/report\\n${r}/dump\\n${r}/tmp\\n`,\"utf-8\"),Gt=!0}const a=(0,Ft.join)(o,`${t}.${r}`),s=(0,Ft.dirname)(a);return(0,Dt.existsSync)(s)||(0,Dt.mkdirSync)(s,{recursive:!0}),(0,Dt.writeFileSync)(a,n),(null==e?void 0:e.generateReport)?function(e,t){if(zt.ifInBrowser)return import_console_browserify.default.log(\"will not write report in browser\"),null;if(!(0,Ut.getRunningPkgInfo)(__dirname))return import_console_browserify.default.warn(\"midscenePkgInfo not found, will not write report\"),null;const r=(0,Ft.join)(Vt(\"report\"),`${e}.html`),n=Kt(t);return(0,Dt.writeFileSync)(r,n),r}(t,n):a}function Yt(e,t){var r,n;return t&&\"Page\"===(null==(r=t.constructor)?void 0:r.name)?\"[Page object]\":t&&\"Browser\"===(null==(n=t.constructor)?void 0:n.name)?\"[Browser object]\":t}function Jt(){return\"0.8.8\"}var Qt=class{markTaskAsPending(e){return{status:\"pending\",...e}}async append(e){var t,r;(0,dt.default)(\"error\"!==this.status,`executor is in error state, cannot append task\\nerror=${null==(t=this.latestErrorTask())?void 0:t.error}\\n${null==(r=this.latestErrorTask())?void 0:r.errorStack}`),Array.isArray(e)?this.tasks.push(...e.map((e=>this.markTaskAsPending(e)))):this.tasks.push(this.markTaskAsPending(e)),\"running\"!==this.status&&(this.status=\"pending\")}async flush(){\"init\"===this.status&&this.tasks.length>0&&import_console_browserify.default.warn(\"illegal state for executor, status is init but tasks are not empty\"),(0,dt.default)(\"running\"!==this.status,\"executor is already running\"),(0,dt.default)(\"completed\"!==this.status,\"executor is already completed\"),(0,dt.default)(\"error\"!==this.status,\"executor is in error state\");const e=this.tasks.findIndex((e=>\"pending\"===e.status));if(e__left_angle_mark_0)return;this.status=\"running\";let t,r=e,n=!0;for(;r__left_angle_mark_this.tasks.length;){const e=this.tasks[r];(0,dt.default)(\"pending\"===e.status,`task status should be pending, but got: ${e.status}`),e.timing={start:Date.now()};try{e.status=\"running\";try{this.onTaskStart&&await this.onTaskStart(e)}catch(i){}(0,dt.default)([\"Insight\",\"Action\",\"Planning\"].indexOf(e.type)>=0,`unsupported task type: ${e.type}`);const{executor:n,param:o}=e;let a;(0,dt.default)(n,`executor is required for task type: ${e.type}`);const s={task:e,element:null==t?void 0:t.element};\"Insight\"===e.type?((0,dt.default)(\"Locate\"===e.subType||\"Query\"===e.subType||\"Assert\"===e.subType,`unsupported insight subType: ${e.subType}`),a=await e.executor(o,s),\"Locate\"===e.subType&&(t=null==a?void 0:a.output)):(\"Action\"===e.type||\"Planning\"===e.type||import_console_browserify.default.warn(`unsupported task type: ${e.type}, will try to execute it directly`),a=await e.executor(o,s)),Object.assign(e,a),e.status=\"finished\",e.timing.end=Date.now(),e.timing.cost=e.timing.end-e.timing.start,r++}catch(i){n=!1,e.error=(null==i?void 0:i.message)||\"error-without-message\",e.errorStack=i.stack,e.status=\"failed\",e.timing.end=Date.now(),e.timing.cost=e.timing.end-e.timing.start;break}}for(let o=r+1;o__left_angle_mark_this.tasks.length;o++)this.tasks[o].status=\"cancelled\";if(this.status=n?\"completed\":\"error\",this.tasks.length){const e=Math.min(r,this.tasks.length-1);return this.tasks[e].output}}isInErrorState(){return\"error\"===this.status}latestErrorTask(){if(\"error\"!==this.status)return null;const e=this.tasks.findIndex((e=>\"failed\"===e.status));return e>=0?this.tasks[e]:null}dump(){return{sdkVersion:\"0.8.8\",model_name:Ot(ft)||\"\",logTime:Date.now(),name:this.name,description:this.description,tasks:this.tasks}}constructor(e,t,r,n){g(this,\"name\"),g(this,\"description\"),g(this,\"tasks\"),g(this,\"status\"),g(this,\"onTaskStart\"),this.status=r&&r.length>0?\"pending\":\"init\",this.name=e,this.description=t,this.tasks=(r||[]).map((e=>this.markTaskAsPending(e))),this.onTaskStart=null==n?void 0:n.onTaskStart}},Zt=m(require_assert()),er=m(require_assert()),tr=m(require_assert()),rr=class{},nr=(e=>(e.JSON=\"json_object\",e.TEXT=\"text\",e))(nr||{}),ir=class{},or=require_sdk(),ar=(init_src(),__toCommonJS(src_exports)),sr=require_utils5(),lr=m(require_dirty_json()),ur=m(require_openai()),cr=require_dist3();function dr(e){return e?\"multiple elements matching the description (two or more)\":\"The element closest to the description (only one)\"}var hr={type:\"json_schema\",json_schema:{name:\"find_elements\",strict:!0,schema:{type:\"object\",properties:{elements:{type:\"array\",items:{type:\"object\",properties:{reason:{type:\"string\",description:\"Reason for finding this element\"},text:{type:\"string\",description:\"Text content of the element\"},id:{type:\"string\",description:\"ID of this element\"}},required:[\"reason\",\"text\",\"id\"],additionalProperties:!1},description:\"List of found elements\"},errors:{type:\"array\",items:{type:\"string\"},description:\"List of error messages, if any\"}},required:[\"elements\",\"errors\"],additionalProperties:!1}}},fr=m(require_assert()),pr=require_img(),mr=\"LOCATE_ONE_ELEMENT\",gr=\"LOCATE_ONE_OR_MORE_ELEMENTS\",_r={type:\"json_schema\",json_schema:{name:\"assert\",strict:!0,schema:{type:\"object\",properties:{thought:{type:\"string\",description:\"The thought process behind the assertion\"},pass:{type:\"boolean\",description:\"Whether the assertion passed or failed\"}},required:[\"thought\",\"pass\"],additionalProperties:!1}}};function br(e,t=100){return e&&e.length>t?`${e.slice(0,t)}...`:\"string\"==typeof e?e.trim():\"\"}function yr(e,t){return(0,fr.default)(void 0!==t,\"position is required for query\"),e.find((e=>e.rect.left__left_angle_mark_=t.x&&t.x__left_angle_mark_=e.rect.left+e.rect.width&&e.rect.top__left_angle_mark_=t.y&&t.y__left_angle_mark_=e.rect.top+e.rect.height))}async function vr(e,t){const{screenshotBase64:r}=e;let n,i;if(e.size)({width:n,height:i}=e.size);else{const e=await(0,pr.imageInfoOfBase64)(r);({width:n,height:i}=e)}const o=e.content,a={};o.forEach((e=>(a[e.id]=e,e.indexId&&(a[e.indexId]=e),{...e})));const s=function(e,t,r=!1){const n=e.map((e=>{const{id:n,attributes:i={},rect:o,content:a}=e;let s=\"\";const l=br(a,t),u=Object.keys(i).reduce(((e,t)=>{const n=i[t];return\"style\"===t||\"src\"===t||(\"nodeType\"===t?r||(e[t]=n.replace(/\\sNode$/,\"\")):\"htmlTagName\"===t?[\"__left_angle_mark_span>\",\"__left_angle_mark_p>\",\"__left_angle_mark_div>\"].includes(n)||(s=n):e[t]=br(n)),e}),{});return{id:n,...r||l?{}:{markerId:e.indexId},...l?{content:l}:{},...Object.keys(u).length&&!l?{attributes:u}:{},...s?{htmlTagName:s}:{},rect:{left:o.left,top:o.top,width:o.width,height:o.height}}}));return r?n.filter((e=>e.content)):n}(o,null==t?void 0:t.truncateTextLength,null==t?void 0:t.filterNonTextContent),l=s.map((e=>{const{id:t,...r}=e;return`id=${t}: ${JSON.stringify(r)}`})).join(\"\\n\\n\");return{description:`\\nThe size of the page: ${u={width:n,height:i},`${u.width} x ${u.height}`}\\nSome of the elements are marked with a rectangle in the screenshot, some are not.\\n\\n${Ot(St)?\"\":`Json description of all the page elements:\\n${l}`}\\n`,elementById:e=>((0,fr.default)(void 0!==e,\"id is required for query\"),a[`${e}`]),elementByPosition:e=>yr(o,e)};var u}function Ar(e){return\"string\"==typeof e&&(e.startsWith(mr)||e.startsWith(gr))}var wr=()=>{const e=Ot(St);return{description:`\\n ${e?'\"position\": { x: number; y: number } // Represents the position of the element; replace with actual values in practice (ensure it reflects the element\\'s position)':'\"id\": string // Represents the ID of the element; replace with actual values in practice'}\\n `,format:e?'\"position\": { x: number; y: number }':'\"id\": string',sample:e?'{\"position\": { x: 100, y: 200 }}':'{\"id\": \"c81c4e9a33\"}'}},Sr={type:\"json_schema\",json_schema:{name:\"action_items\",strict:!0,schema:{type:\"object\",strict:!0,properties:{actions:{type:\"array\",items:{type:\"object\",strict:!0,properties:{thought:{type:\"string\",description:\"Reasons for generating this task, and why this task is feasible on this page\"},type:{type:\"string\",description:'Type of action, like \"Tap\", \"Hover\", etc.'},param:{type:[\"object\",\"null\"],description:\"Parameter of the action, can be null ONLY when the type field is Tap or Hover\"},locate:{type:[\"object\",\"null\"],properties:{...Ot(St)?{position:{type:\"object\",properties:{x:{type:\"number\"},y:{type:\"number\"}},required:[\"x\",\"y\"],additionalProperties:!1}}:{id:{type:\"string\"}},prompt:{type:\"string\"}},required:[Ot(St)?\"position\":\"id\",\"prompt\"],additionalProperties:!1,description:\"Location information for the target element\"}},required:[\"thought\",\"type\",\"param\",\"locate\"],additionalProperties:!1},description:\"List of actions to be performed\"},taskWillBeAccomplished:{type:\"boolean\",description:\"Whether the task will be accomplished after the actions\"},furtherPlan:{type:[\"object\",\"null\"],properties:{whatHaveDone:{type:\"string\"},whatToDoNext:{type:\"string\"}},required:[\"whatHaveDone\",\"whatToDoNext\"],additionalProperties:!1,description:\"Plan the task when the task cannot be accomplished\"},error:{type:[\"string\",\"null\"],description:\"Overall error messages\"}},required:[\"actions\",\"taskWillBeAccomplished\",\"furtherPlan\",\"error\"],additionalProperties:!1}}};function Er(){let e=\"gpt-4o-2024-08-06\";const t=Ot(ft);return t&&(e=t),e}async function xr(e,t){const{completion:r,style:n}=await async function(){let e;const t=Bt(ht),r=Ot(bt),n=r?new cr.SocksProxyAgent(r):void 0;if(Ot(kt))e=new ur.AzureOpenAI({baseURL:Ot(vt),apiKey:Ot(yt),httpAgent:n,...t,dangerouslyAllowBrowser:!0});else if(Ot(xt)){const r=Ot(Ct);(0,tr.default)(!sr.ifInBrowser,\"Azure OpenAI is not supported in browser with Midscene.\");const n=new ar.DefaultAzureCredential;(0,tr.default)(r,\"MIDSCENE_AZURE_OPENAI_SCOPE is required\");const i=(0,ar.getBearerTokenProvider)(n,r),o=Bt(Tt);e=new ur.AzureOpenAI({azureADTokenProvider:i,...t,...o})}else Ot(Rt)||(e=new ur.default({baseURL:Ot(vt),apiKey:Ot(yt),httpAgent:n,...t,dangerouslyAllowBrowser:!0}));if(e&&Ot(pt)){if(sr.ifInBrowser)throw new Error(\"langsmith is not supported in browser\");import_console_browserify.default.log(\"DEBUGGING MODE: langsmith wrapper enabled\");const{wrapOpenAI:t}=await Promise.resolve().then((()=>(ut(),st)));e=t(e)}if(void 0!==e)return{completion:e.chat.completions,style:\"openai\"};if(Ot(Rt)){const t=Ot(It);(0,tr.default)(t,\"ANTHROPIC_API_KEY is required\"),e=new or.Anthropic({apiKey:t})}if(void 0!==e&&e.messages)return{completion:e.messages,style:\"anthropic\"};throw new Error(\"Openai SDK or Anthropic SDK is not initialized\")}(),i=\"string\"==typeof Ot(mt),o=Date.now(),a=Er();let s,l;const u={temperature:.1,stream:!1,max_tokens:3e3};if(\"openai\"===n){const n=await r.create({model:a,messages:e,response_format:t,...u});i&&import_console_browserify.default.log(\"Midscene - AI call\",a,n.usage,Date.now()-o+\"ms\"),s=n.choices[0].message.content,(0,tr.default)(s,\"empty content\"),l=n.usage}else if(\"anthropic\"===n){const n=e=>{if(\"image_url\"===e.type){const t=e.image_url.url;return(0,tr.default)(t,\"image_url is required\"),{source:{type:\"base64\",media_type:t.includes(\"data:image/png;base64,\")?\"image/png\":\"image/jpeg\",data:t.split(\",\")[1]},type:\"image\"}}return e},i=await r.create({model:a,system:\"You are a versatile professional in software UI automation\",messages:e.map((e=>({role:\"user\",content:Array.isArray(e.content)?e.content.map(n):e.content}))),response_format:t,...u});s=i.content[0].text,(0,tr.default)(s,\"empty content\"),l=i.usage}return{content:s||\"\",usage:l}}async function Cr(e){const{msgs:t,AIActionType:r}=e;var n;(0,er.default)((!n||\"openAI\"===n)&&(!!Ot(yt)||!!Ot(xt)||!!Ot(It)||Boolean(Ot(ht))),\"Cannot find config for AI model service. You should set it before using. https://midscenejs.com/model-provider.html\");const{content:i,usage:o}=await async function(e,t){let r;const n=Er();if(n.includes(\"gpt-4o\")){switch(t){case 0:r=_r;break;case 1:r=hr;break;case 2:r={type:\"json_object\"};break;case 3:r=Sr}\"gpt-4o-2024-05-13\"!==n&&r||(r={type:\"json_object\"})}const i=await xr(e,r);(0,tr.default)(i,\"empty response\");let o=(e=>{try{return JSON.parse(e)}catch(t){return null}})(i.content);if(o)return{content:o,usage:i.usage};const a=function(e){const t=e.match(/^\\s*(\\{[\\s\\S]*\\})\\s*$/);if(t)return t[1];const r=e.match(/```(?:json)?\\s*(\\{[\\s\\S]*?\\})\\s*```/);if(r)return r[1];const n=e.match(/\\{[\\s\\S]*\\}/);return n?n[0]:e}(i.content);try{o=JSON.parse(a)}catch(s){}if(o)return{content:o,usage:i.usage};try{o=lr.default.parse(a)}catch(s){}if(o)return{content:o,usage:i.usage};throw Error(`failed to parse json response: ${i.content}`)}(t,r);return{content:i,usage:o}}function Tr(e){return Boolean(Ot(At))?e.reduce(((e,t)=>(\"text\"===t.type&&(e+=t.text),e)),\"\"):e}var Rr=m(require_assert()),Ir={filterNonTextContent:!0,truncateTextLength:200};function kr(e,t){return{errors:e.errors,elements:e.elements.map((e=>{var r;if(\"id\"in e)return e;const{position:n}=e,i=null==(r=yr(t,n))?void 0:r.id;return(0,Rr.default)(i,`inspect: no id found with position: ${JSON.stringify({position:n})}`),{...e,id:i}}))}}async function Pr(e){const{context:t,multi:r,targetElementDescription:n,callAI:i}=e,{screenshotBase64:o,screenshotBase64WithElementMarker:a}=t,{description:s,elementById:l,elementByPosition:u}=await vr(t);if(e.quickAnswer){if(\"id\"in e.quickAnswer){if(l(e.quickAnswer.id))return{parseResult:{elements:[e.quickAnswer],errors:[]},elementById:l};if(!n)return{parseResult:{elements:[],errors:[`inspect: cannot find the target by id: ${e.quickAnswer.id}, and no target element description is provided`]},elementById:l}}if(\"position\"in e.quickAnswer&&u(e.quickAnswer.position))return{parseResult:kr({elements:[e.quickAnswer]},t.content),elementById:l}}(0,Rr.default)(n,\"cannot find the target element description\");const c=[{role:\"system\",content:Ot(St)?'\\n ## Role:\\n You are an expert in software page image (2D) and page element text analysis.\\n\\n ## Objective:\\n Based on screenshots and descriptions, find specific coordinates\\n\\n ## Output Format:\\n\\n Please return the result in JSON format as follows:\\n\\n ```json\\n {\\n \"elements\": [\\n {\\n // Describe the reason for finding this element, replace with actual value in practice\\n \"reason\": \"Reason for finding element 4: It is located in the upper right corner, is an image type, and according to the screenshot, it is a shopping cart icon button\",\\n // If the target element includes text information, extract the text information; if it does not, do not extract it\\n \"text\": \"\",\\n // position of this element\\n \"position\": { x: number, y: number }\\n }\\n ],\\n \"errors\": []// Return an error if there is no target element on the picture\\n }\\n ```\\n ':'\\n## Role:\\nYou are an expert in software page image (2D) and page element text analysis.\\n\\n## Objective:\\n- Identify elements in screenshots and text that match the user\\'s description.\\n- Return JSON data containing the selection reason and element ID.\\n\\n## Skills:\\n- Image analysis and recognition\\n- Multilingual text understanding\\n- Software UI design and testing\\n\\n## Workflow:\\n1. Receive the user\\'s element description, screenshot, and element description information. Note that the text may contain non-English characters (e.g., Chinese), indicating that the application may be non-English.\\n2. Based on the user\\'s description, locate the target element ID in the list of element descriptions and the screenshot.\\n3. Found the required number of elements\\n4. Return JSON data containing the selection reason and element ID.\\n\\n## Constraints:\\n- Strictly adhere to the specified location when describing the required element; do not select elements from other locations.\\n- Elements in the image with NodeType other than \"TEXT Node\" have been highlighted to identify the element among multiple non-text elements.\\n- Accurately identify element information based on the user\\'s description and return the corresponding element ID from the element description information, not extracted from the image.\\n- If no elements are found, the \"elements\" array should be empty.\\n- The returned data must conform to the specified JSON format.\\n- The returned value id information must use the id from element info (important: **use id not indexId, id is hash content**)\\n\\n## Output Format:\\n\\nPlease return the result in JSON format as follows:\\n\\n```json\\n{\\n \"elements\": [\\n // If no matching elements are found, return an empty array []\\n {\\n \"reason\": \"PLACEHOLDER\", // The thought process for finding the element, replace PLACEHOLDER with your thought process\\n \"text\": \"PLACEHOLDER\", // Replace PLACEHOLDER with the text of elementInfo, if none, leave empty\\n \"id\": \"PLACEHOLDER\" // Replace PLACEHOLDER with the ID (important: **use id not indexId, id is hash content**) of elementInfo\\n }\\n // More elements...\\n ],\\n \"errors\": [] // Array of strings containing any error messages\\n}\\n```\\n\\n## Example:\\nExample 1:\\nInput Example:\\n```json\\n// Description: \"Shopping cart icon in the upper right corner\"\\n{\\n \"description\": \"PLACEHOLDER\", // Description of the target element\\n \"screenshot\": \"path/screenshot.png\",\\n \"text\": \\'{\\n \"pageSize\": {\\n \"width\": 400, // Width of the page\\n \"height\": 905 // Height of the page\\n },\\n \"elementInfos\": [\\n {\\n \"id\": \"1231\", // ID of the element\\n \"indexId\": \"0\", // Index of the element，The image is labeled to the left of the element\\n \"attributes\": { // Attributes of the element\\n \"nodeType\": \"IMG Node\", // Type of element, types include: TEXT Node, IMG Node, BUTTON Node, INPUT Node\\n \"src\": \"https://ap-southeast-3.m\",\\n \"class\": \".img\"\\n },\\n \"content\": \"\", // Text content of the element\\n \"rect\": {\\n \"left\": 280, // Distance from the left side of the page\\n \"top\": 8, // Distance from the top of the page\\n \"width\": 44, // Width of the element\\n \"height\": 44 // Height of the element\\n }\\n },\\n {\\n \"id\": \"66551\", // ID of the element\\n \"indexId\": \"1\", // Index of the element,The image is labeled to the left of the element\\n \"attributes\": { // Attributes of the element\\n \"nodeType\": \"IMG Node\", // Type of element, types include: TEXT Node, IMG Node, BUTTON Node, INPUT Node\\n \"src\": \"data:image/png;base64,iVBORw0KGgoAAAANSU...\",\\n \"class\": \".icon\"\\n },\\n \"content\": \"\", // Text content of the element\\n \"rect\": {\\n \"left\": 350, // Distance from the left side of the page\\n \"top\": 16, // Distance from the top of the page\\n \"width\": 25, // Width of the element\\n \"height\": 25 // Height of the element\\n }\\n },\\n ...\\n {\\n \"id\": \"12344\",\\n \"indexId\": \"2\", // Index of the element，The image is labeled to the left of the element\\n \"attributes\": {\\n \"nodeType\": \"TEXT Node\",\\n \"class\": \".product-name\"\\n },\\n \"center\": [\\n 288,\\n 834\\n ],\\n \"content\": \"Mango Drink\",\\n \"rect\": {\\n \"left\": 188,\\n \"top\": 827,\\n \"width\": 199,\\n \"height\": 13\\n }\\n },\\n ...\\n ]\\n }\\n \\'\\n}\\n```\\nOutput Example:\\n```json\\n{\\n \"elements\": [\\n {\\n // Describe the reason for finding this element, replace with actual value in practice\\n \"reason\": \"Reason for finding element 4: It is located in the upper right corner, is an image type, and according to the screenshot, it is a shopping cart icon button\",\\n \"text\": \"\",\\n // ID(**use id not indexId**) of this element, replace with actual value in practice, **use id not indexId**\\n \"id\": \"1231\"\\n }\\n ],\\n \"errors\": []\\n}\\n```\\n \\n '},{role:\"user\",content:Tr([{type:\"image_url\",image_url:{url:a||o}},{type:\"text\",text:`\\npageDescription: \\n\\n${s}\\n\\nHere is the item user want to find. Just go ahead:\\n=====================================\\n${JSON.stringify({description:n,multi:dr(r)})}\\n=====================================`}])}];if(i){const e=await i({msgs:c,AIActionType:1});return{parseResult:kr(e.content,t.content),rawResponse:e,elementById:l,usage:e.usage}}const d=await Cr({msgs:c,AIActionType:1});return{parseResult:kr(d.content,t.content),rawResponse:d,elementById:l,usage:d.usage}}var Mr=m(require_assert());async function Or(e,t){const{callAI:r,context:n}=t||{},{screenshotBase64:i,screenshotBase64WithElementMarker:o}=n,{description:a,elementByPosition:s}=await vr(n),l=`\\n## Role\\n\\nYou are a versatile professional in software UI automation. Your outstanding contributions will impact the user experience of billions of users.\\n\\n## Objective\\n\\n- Decompose the instruction user asked into a series of actions\\n- Locate the target element if possible\\n- If the instruction cannot be accomplished, give a further plan.\\n\\n## Workflow\\n\\n1. Receive the user's element description, screenshot, and instruction.\\n2. Decompose the user's task into a sequence of actions, and place it in the \\`actions\\` field. There are different types of actions (Tap / Hover / Input / KeyboardPress / Scroll / FalsyConditionStatement / Sleep). The \"About the action\" section below will give you more details.\\n3. Precisely locate the target element if it's already shown in the screenshot, put the location info in the \\`locate\\` field of the action.\\n4. If some target elements is not shown in the screenshot, consider the user's instruction is not feasible on this page. Follow the next steps.\\n5. Consider whether the user's instruction will be accomplished after all the actions\\n - If yes, set \\`taskWillBeAccomplished\\` to true\\n - If no, don't plan more actions by closing the array. Get ready to reevaluate the task. Some talent people like you will handle this. Give him a clear description of what have been done and what to do next. Put your new plan in the \\`furtherPlan\\` field. The \"How to compose the \\`taskWillBeAccomplished\\` and \\`furtherPlan\\` fields\" section will give you more details.\\n\\n## Constraints\\n\\n- All the actions you composed MUST be based on the page context information you get.\\n- Trust the \"What have been done\" field about the task (if any), don't repeat actions in it.\\n- Respond only with valid JSON. Do not write an introduction or summary or markdown prefix like \\`\\`\\`json\\`.\\n- If you cannot plan any action at all (i.e. empty actions array), set reason in the \\`error\\` field.\\n\\n## About the \\`actions\\` field\\n\\n### The common \\`locate\\` param\\n\\nThe \\`locate\\` param is commonly used in the \\`param\\` field of the action, means to locate the target element to perform the action, it follows the following scheme:\\n\\ntype LocateParam = {\\n \"id\": string, // the id of the element found. It should either be the id marked with a rectangle in the screenshot or the id described in the description.\\n prompt?: string // the description of the element to find. It can only be omitted when locate is null.\\n} | null // If it's not on the page, the LocateParam should be null\\n\\n### Supported actions\\n\\nEach action has a \\`type\\` and corresponding \\`param\\`. To be detailed:\\n- type: 'Tap', tap the located element\\n * { locate: LocateParam, param: null }\\n- type: 'Hover', move mouse over to the located element\\n * { locate: LocateParam, param: null }\\n- type: 'Input', replace the value in the input field\\n * { locate: LocateParam, param: { value: string } }\\n * \\`value\\` is the final required input value based on the existing input. No matter what modifications are required, just provide the final value to replace the existing input value. \\n- type: 'KeyboardPress', press a key\\n * { param: { value: string } }\\n- type: 'Scroll', scroll up or down.\\n * { \\n locate: LocateParam | null, \\n param: { \\n direction: 'down'(default) | 'up' | 'right' | 'left', \\n scrollType: 'once' (default) | 'untilBottom' | 'untilTop' | 'untilRight' | 'untilLeft', \\n distance: null | number \\n } \\n }\\n * To scroll some specific element, put the element at the center of the region in the \\`locate\\` field. If it's a page scroll, put \\`null\\` in the \\`locate\\` field. \\n * \\`param\\` is required in this action. If some fields are not specified, use direction \\`down\\`, \\`once\\` scroll type, and \\`null\\` distance.\\n- type: 'FalsyConditionStatement'\\n * { param: null }\\n * use this action when the instruction is an \"if\" statement and the condition is falsy.\\n- type: 'Sleep'\\n * { param: { timeMs: number } }\\n\\n## How to compose the \\`taskWillBeAccomplished\\` and \\`furtherPlan\\` fields ?\\n\\n\\`taskWillBeAccomplished\\` is a boolean field, means whether the task will be accomplished after all the actions.\\n\\n\\`furtherPlan\\` is used when the task cannot be accomplished. It follows the scheme { whatHaveDone: string, whatToDoNext: string }:\\n- \\`whatHaveDone\\`: a string, describe what have been done after the previous actions.\\n- \\`whatToDoNext\\`: a string, describe what should be done next after the previous actions has finished. It should be a concise and clear description of the actions to be performed. Make sure you don't lose any necessary steps user asked.\\n\\n## Output JSON Format:\\n\\nThe JSON format is as follows:\\n\\n{\\n \"actions\": [\\n {\\n \"thought\": \"Reasons for generating this task, and why this task is feasible on this page\",\\n \"type\": \"Tap\",\\n \"param\": null,\\n \"locate\": {\\n {\"id\": \"c81c4e9a33\"},\\n prompt: \"the search bar\"\\n } | null,\\n },\\n // ... more actions\\n ],\\n \"taskWillBeAccomplished\": boolean,\\n \"furtherPlan\": { \"whatHaveDone\": string, \"whatToDoNext\": string } | null,\\n \"error\"?: string\\n}\\n\\n## Example #1 : How to decompose a task\\n\\nWhen a user says 'Click the language switch button, wait 1s, click \"English\"', the user will give you the description like this:\\n\\n====================\\n\\nThe size of the page: 1280 x 720\\nSome of the elements are marked with a rectangle in the screenshot, some are not.\\n\\nJSON description of all the elements in screenshot:\\nid=c81c4e9a33: {\\n \"markerId\": 2, // The number indicated by the rectangle label in the screenshot\\n \"attributes\": // Attributes of the element\\n {\"data-id\":\"@submit s0\",\"class\":\".gh-search\",\"aria-label\":\"搜索\",\"nodeType\":\"IMG\", \"src\": \"image_url\"},\\n \"rect\": { \"left\": 16, \"top\": 378, \"width\": 89, \"height\": 16 } // Position of the element in the page\\n}\\n\\nid=5a29bf6419bd: {\\n \"content\": \"获取优惠券\",\\n \"attributes\": { \"nodeType\": \"TEXT\" },\\n \"rect\": { \"left\": 32, \"top\": 332, \"width\": 70, \"height\": 18 }\\n}\\n\\n...many more\\n====================\\n\\nBy viewing the page screenshot and description, you should consider this and output the JSON:\\n\\n* The main steps should be: tap the switch button, sleep, and tap the 'English' option \\n* The language switch button is shown in the screenshot, but it's not marked with a rectangle. So we have to use the page description to find the element. By carefully checking the context information (coordinates, attributes, content, etc.), you can find the element.\\n* The \"English\" option button is not shown in the screenshot now, it means it may only show after the previous actions are finished. So the last action will have a \\`null\\` value in the \\`locate\\` field. \\n* The task cannot be accomplished (because we cannot see the \"English\" option now), so a \\`furtherPlan\\` field is needed.\\n\\n{\\n \"actions\":[\\n {\\n \"thought\": \"Click the language switch button to open the language options.\",\\n \"type\": \"Tap\",\\n \"param\": null,\\n \"locate\": {\\n ${wr().sample},\\n \"prompt\": \"the language switch button with the text '中文'\"\\n }\\n },\\n {\\n \"thought\": \"Wait for 1 second to ensure the language options are displayed.\",\\n \"type\": \"Sleep\",\\n \"param\": { \"timeMs\": 1000 },\\n },\\n {\\n \"thought\": \"Locate the 'English' option in the language menu.\", \\n \"type\": \"Tap\",\\n \"param\": null,\\n \"locate\": null\\n },\\n ],\\n \"error\": null,\\n \"taskWillBeAccomplished\": false,\\n \"furtherPlan\": { \\n \"whatToDoNext\": \"find the 'English' option and click on it\", \\n \"whatHaveDone\": \"Click the language switch button and wait 1s\" \\n }\\n}\\n\\n## Example #2 : Tolerate the error situation only when the instruction is an \"if\" statement\\n\\nIf the user says \"If there is a popup, close it\", you should consider this and output the JSON:\\n\\n* By viewing the page screenshot and description, you cannot find the popup, so the condition is falsy.\\n* The instruction itself is an \"if\" statement, it means the user can tolerate this situation, so you should leave a \\`FalsyConditionStatement\\` action.\\n\\n{\\n \"actions\": [{\\n \"thought\": \"There is no popup on the page\",\\n \"type\": \"FalsyConditionStatement\",\\n \"param\": null\\n }\\n ],\\n \"taskWillBeAccomplished\": true,\\n \"furtherPlan\": null\\n}\\n\\nFor contrast, if the user says \"Close the popup\" in this situation, you should consider this and output the JSON:\\n\\n{\\n \"actions\": [],\\n \"error\": \"The instruction and page context are irrelevant, there is no popup on the page\",\\n \"taskWillBeAccomplished\": true,\\n \"furtherPlan\": null\\n}\\n\\n## Example #3 : When task is accomplished, don't plan more actions\\n\\nWhen the user ask to \"Wait 4s\", you should consider this:\\n\\n{\\n \"actions\": [\\n {\\n \"thought\": \"Wait for 4 seconds\",\\n \"type\": \"Sleep\",\\n \"param\": { \"timeMs\": 4000 },\\n },\\n ],\\n \"taskWillBeAccomplished\": true,\\n \"furtherPlan\": null // All steps have been included in the actions, so no further plan is needed\\n}\\n\\n## Bad case #1 : Missing \\`prompt\\` in the 'Locate' field; Missing \\`furtherPlan\\` field when the task won't be accomplished\\n\\nWrong output:\\n\\n{\\n \"actions\":[\\n {\\n \"thought\": \"Click the language switch button to open the language options.\",\\n \"type\": \"Tap\",\\n \"param\": null,\\n \"locate\": {\\n ${wr().sample}, // WRONG:prompt is missing\\n }\\n },\\n {\\n \"thought\": \"Click the English option\",\\n \"type\": \"Tap\",\\n \"param\": null,\\n \"locate\": null, // This means the 'English' option is not shown in the screenshot, the task cannot be accomplished\\n }\\n ],\\n \"taskWillBeAccomplished\": false,\\n // WRONG: should not be null\\n \"furtherPlan\": null,\\n}\\n\\nReason: \\n* The \\`prompt\\` is missing in the first 'Locate' action\\n* Since the option button is not shown in the screenshot, the task cannot be accomplished, so a \\`furtherPlan\\` field is needed.\\n`;let u=\"\";t.originalPrompt&&t.whatHaveDone&&(u=`For your information, this is a task that some important person handed to you. Here is the original task description and what have been done after the previous actions:\\n=====================================\\nOriginal task description:\\n${t.originalPrompt}\\n=====================================\\nWhat have been done:\\n${t.whatHaveDone}\\n=====================================\\n`);const c=[{role:\"system\",content:l},{role:\"user\",content:Tr([{type:\"image_url\",image_url:{url:o||i,detail:\"high\"}},{type:\"text\",text:`\\npageDescription:\\n \\n${a}\\n\\n\\nHere is the instruction:\\n=====================================\\n${e}\\n=====================================\\n\\n${u}\\n`.trim()}])}],d=r||Cr,{content:h,usage:f}=await d({msgs:c,AIActionType:3}),p=h,m=(null==p?void 0:p.actions)||[];return(0,Mr.default)(p,\"can't get plans from AI\"),(0,Mr.default)(m.length>0,`Failed to plan actions with context: ${p.error}`),p}var Br=m(require_assert()),Nr=require_fs(),jr=require_path_browserify(),Lr=require_utils5(),Dr=\"\",Fr=[],Ur={},{pid:zr}=import_browser.default,qr=\"insight-dump.json\",Gr=\"undefined\"!=typeof window;function Hr(e,t,r){const n=Ht();(0,Br.default)(n,\"logDir should be set before writing dump file\");const i=t||(0,Lr.uuid)(),o={sdkVersion:\"0.8.8\",logTime:Date.now(),model_name:Ot(ft)||\"\"},a={logId:i,...o,...e};null==r||r(a);const s=function(e,t){return JSON.stringify(e,Yt,t)}(a,2);if(\"number\"==typeof Ur[i])Fr[Ur[i]]=s;else{const e=Fr.push(s);Ur[i]=e-1}if(!Gr){if(!Dr)for(Dr=`pid_${zr}_${o.logTime}`;(0,Nr.existsSync)((0,jr.join)(n,`${Dr}.${qr}`));)Dr=`${zr}_${o.logTime}-${Math.random()}`;Xt({fileName:Dr,fileExt:qr,fileContent:`[\\n${Fr.join(\",\\n\")}\\n]`,type:\"dump\"})}return i}var Wr=class{async locate(e,t){var r;const{callAI:n,multi:i=!1}=t||{};(0,Zt.default)(e||(null==t?void 0:t.quickAnswer),\"query or quickAnswer is required for locate\");const o=this.onceDumpUpdatedFn;this.onceDumpUpdatedFn=void 0;const a=await this.contextRetrieverFn(\"locate\"),s=Date.now(),{parseResult:l,elementById:u,rawResponse:c,usage:d}=await Pr({callAI:n||this.aiVendorFn,context:a,multi:Boolean(i),targetElementDescription:e,quickAnswer:null==t?void 0:t.quickAnswer}),h=Date.now()-s,f={...this.taskInfo?this.taskInfo:{},durationMs:h,rawResponse:JSON.stringify(c),formatResponse:JSON.stringify(l),usage:d};let p;(null==(r=l.errors)?void 0:r.length)&&(p=`locate - AI response error: \\n${l.errors.join(\"\\n\")}`);const m={type:\"locate\",context:a,userQuery:{element:e},quickAnswer:null==t?void 0:t.quickAnswer,matchedSection:[],matchedElement:[],data:null,taskInfo:f,error:p},g=Hr(m,void 0,o);if(p)throw import_console_browserify.default.error(p),new Error(p);const _=[];return l.elements.forEach((e=>{if(\"id\"in e){const t=u(e.id);if(!t)return void import_console_browserify.default.warn(`locate: cannot find element id=${e.id}. Maybe an unstable response from AI model`);_.push(t)}})),Hr({...m,matchedElement:_},g,o),(null==t?void 0:t.multi)?_:_.length>=2?(import_console_browserify.default.warn(`locate: multiple elements found, return the first one. (query: ${e})`),_[0]):1===_.length?_[0]:null}async extract(e){var t;(0,Zt.default)(\"object\"==typeof e||\"string\"==typeof e,\"dataDemand should be object or string, but get \"+typeof e);const r=this.onceDumpUpdatedFn;this.onceDumpUpdatedFn=void 0;const n=await this.contextRetrieverFn(\"extract\"),i=Date.now(),{parseResult:o,elementById:a}=await async function(e){const{dataQuery:t,context:r,useModel:n}=e,{screenshotBase64:i}=r,{description:o,elementById:a}=await vr(r,Ir),s=[{role:\"system\",content:'\\nYou are a versatile professional in software UI design and testing. Your outstanding contributions will impact the user experience of billions of users.\\nThe user will give you a screenshot and the contents of it. There may be some none-English characters (like Chinese) on it, indicating it\\'s an non-English app.\\n\\nYou have the following skills:\\n\\nskill name: extract_data_from_UI\\nrelated input: DATA_DEMAND\\nskill content: \\n* User will give you some data requirements in DATA_DEMAND. Consider the UI context, follow the user\\'s instructions, and provide comprehensive data accordingly.\\n* There may be some special commands in DATA_DEMAND, please pay extra attention\\n - LOCATE_ONE_ELEMENT and LOCATE_ONE_OR_MORE_ELEMENTS: if you see a description that mentions the keyword LOCATE_ONE_ELEMENT\\n - LOCATE_ONE_OR_MORE_ELEMENTS(e.g. follow LOCATE_ONE_ELEMENT : i want to find ...), it means user wants to locate a specific element meets the description. \\n\\nReturn in this way: prefix + the id / comma-separated ids, for example: LOCATE_ONE_ELEMENT/1 , LOCATE_ONE_OR_MORE_ELEMENTS/1,2,3 . If not found, keep the prefix and leave the suffix empty, like LOCATE_ONE_ELEMENT/ .\\n\\nReturn in the following JSON format:\\n{\\n language: \"en\", // \"en\" or \"zh\", the language of the page. Use the same language to describe section name, description, and similar fields.\\n data: any, // the extracted data from extract_data_from_UI skill. Make sure both the value and scheme meet the DATA_DEMAND.\\n errors: [], // string[], error message if any\\n}\\n'},{role:\"user\",content:Tr([{type:\"image_url\",image_url:{url:i}},{type:\"text\",text:`\\npageDescription: ${o}\\n\\nUse your extract_data_from_UI skill to find the following data, placing it in the \\`data\\` field\\nDATA_DEMAND start:\\n=====================================\\n${\"object\"==typeof t?`return in key-value style object, keys are ${Object.keys(t).join(\",\")}`:\"\"}\\n${\"string\"==typeof t?t:JSON.stringify(t,null,2)}\\n=====================================\\nDATA_DEMAND ends.\\n `}])}],l=await Cr({msgs:s,AIActionType:2});return{parseResult:l.content,elementById:a,usage:l.usage}}({context:n,dataQuery:e}),s=Date.now()-i,l={...this.taskInfo?this.taskInfo:{},durationMs:s,rawResponse:JSON.stringify(o)};let u;(null==(t=o.errors)?void 0:t.length)&&(u=`segment - AI response error: \\n${o.errors.join(\"\\n\")}`);const c={type:\"extract\",context:n,userQuery:{dataDemand:e},matchedSection:[],matchedElement:[],data:null,taskInfo:l,error:u},d=Hr(c,void 0,r);if(u)throw import_console_browserify.default.error(u),new Error(u);const{data:h}=o;let f=h;return h&&\"object\"==typeof h&&!Array.isArray(h)&&(function(e,t,r){Object.keys(e).forEach((n=>{const i=e[n];if(\"string\"==typeof i&&t(i))e[n]=r(i);else if(Array.isArray(i)){const o=i.map((e=>t(e)?r(e):e));e[n]=o}}))}(h,Ar,(e=>{const t=function(e){const t=`${mr}/`;if(e.startsWith(t)){const r=e.slice(t.length);return r.indexOf(\",\")>=0&&import_console_browserify.default.warn(`unexpected comma in one element response: ${r}`),r||null}const r=`${gr}/`;if(e.startsWith(r)){const t=e.slice(r.length);return t?t.split(\",\"):[]}return null}(e);return\"string\"==typeof t?a(t):Array.isArray(t)?function(e,t){return e.reduce(((e,r)=>{const n=t(r);return n?e.push(n):import_console_browserify.default.warn(`element not found by id: ${r}`),e}),[])}(t,a):t})),f={...h}),Hr({...c,matchedSection:[],data:f},d,r),f}async assert(e){if(\"string\"!=typeof e)throw new Error(\"This is the assert method for Midscene, the first argument should be a string. If you want to use the assert method from Node.js, please import it from the Node.js assert module.\");const t=this.onceDumpUpdatedFn;this.onceDumpUpdatedFn=void 0;const r=await this.contextRetrieverFn(\"assert\"),n=Date.now(),i=await async function(e){const{assertion:t,context:r,useModel:n}=e;(0,Rr.default)(t,\"assertion should be a string\");const{screenshotBase64:i}=r,{description:o}=await vr(r,Ir),a=[{role:\"system\",content:\"\\nYou are a versatile professional in software UI design and testing. Your outstanding contributions will impact the user experience of billions of users.\\n\\nThe user will give you a screenshot and the texts on it. There may be some none-English characters (like Chinese) on it, indicating it's an non-English app.\\n\\nBased on the information you get, Return assertion judgment:\\n\\nReturn in the following JSON format:\\n{\\n thought: string, // string, the thought of the assertion. Should in the same language as the assertion.\\n pass: true, // true or false, whether the assertion is passed\\n}\\n\"},{role:\"user\",content:Tr([{type:\"image_url\",image_url:{url:i}},{type:\"text\",text:`\\n pageDescription: \\n\\n ${o}\\n Here is the description of the assertion. Just go ahead:\\n =====================================\\n ${t}\\n =====================================\\n `}])}],{content:s,usage:l}=await Cr({msgs:a,AIActionType:0});return{content:s,usage:l}}({assertion:e,context:r}),o=Date.now()-n,a={...this.taskInfo?this.taskInfo:{},durationMs:o,rawResponse:JSON.stringify(i.content),usage:i.usage},{thought:s,pass:l}=i.content;return Hr({type:\"assert\",context:r,userQuery:{assertion:e},matchedSection:[],matchedElement:[],data:null,taskInfo:a,assertionPass:l,assertionThought:s,error:l?void 0:s},void 0,t),{pass:l,thought:s}}constructor(e,t){g(this,\"contextRetrieverFn\"),g(this,\"aiVendorFn\",Cr),g(this,\"onceDumpUpdatedFn\"),g(this,\"generateElement\"),g(this,\"taskInfo\"),(0,Zt.default)(e,\"context is required for Insight\"),this.contextRetrieverFn=\"function\"==typeof e?e:()=>Promise.resolve(e),this.generateElement=null==t?void 0:t.generateElement,void 0!==(null==t?void 0:t.aiVendorFn)&&(this.aiVendorFn=t.aiVendorFn),void 0!==(null==t?void 0:t.taskInfo)&&(this.taskInfo=t.taskInfo)}},Vr=function(e,t){return(null==t?void 0:t.multi)?`follow ${gr}: ${e}`:`follow ${mr}: ${e}`},$r=function(e){return`SECTION_MATCHER_FLAG/${e}`},Kr=Wr}}),require_env=__commonJS({\"../midscene/dist/lib/env.js\"(e,t){init_globals();var r,n=Object.defineProperty,i=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,s={};((e,t)=>{for(var r in t)n(e,r,{get:t[r],enumerable:!0})})(s,{ANTHROPIC_API_KEY:()=>x,MATCH_BY_POSITION:()=>y,MIDSCENE_AZURE_OPENAI_INIT_CONFIG_JSON:()=>S,MIDSCENE_AZURE_OPENAI_SCOPE:()=>w,MIDSCENE_CACHE:()=>b,MIDSCENE_DANGEROUSLY_PRINT_ALL_CONFIG:()=>h,MIDSCENE_DEBUG_AI_PROFILE:()=>d,MIDSCENE_DEBUG_MODE:()=>f,MIDSCENE_LANGSMITH_DEBUG:()=>c,MIDSCENE_MODEL_NAME:()=>u,MIDSCENE_MODEL_TEXT_ONLY:()=>_,MIDSCENE_OPENAI_INIT_CONFIG_JSON:()=>l,MIDSCENE_OPENAI_SOCKS_PROXY:()=>p,MIDSCENE_REPORT_TAG_NAME:()=>v,MIDSCENE_USE_ANTHROPIC_SDK:()=>E,MIDSCENE_USE_AZURE_OPENAI:()=>A,OPENAI_API_KEY:()=>m,OPENAI_BASE_URL:()=>g,OPENAI_USE_AZURE:()=>C,allAIConfig:()=>P,getAIConfig:()=>I,getAIConfigInJson:()=>k,overrideAIConfig:()=>M}),t.exports=(r=s,((e,t,r,s)=>{if(t&&\"object\"==typeof t||\"function\"==typeof t)for(let l of o(t))a.call(e,l)||l===r||n(e,l,{get:()=>t[l],enumerable:!(s=i(t,l))||s.enumerable});return e})(n({},\"__esModule\",{value:!0}),r));var l=\"MIDSCENE_OPENAI_INIT_CONFIG_JSON\",u=\"MIDSCENE_MODEL_NAME\",c=\"MIDSCENE_LANGSMITH_DEBUG\",d=\"MIDSCENE_DEBUG_AI_PROFILE\",h=\"MIDSCENE_DANGEROUSLY_PRINT_ALL_CONFIG\",f=\"MIDSCENE_DEBUG_MODE\",p=\"MIDSCENE_OPENAI_SOCKS_PROXY\",m=\"OPENAI_API_KEY\",g=\"OPENAI_BASE_URL\",_=\"MIDSCENE_MODEL_TEXT_ONLY\",b=\"MIDSCENE_CACHE\",y=\"MATCH_BY_POSITION\",v=\"MIDSCENE_REPORT_TAG_NAME\",A=\"MIDSCENE_USE_AZURE_OPENAI\",w=\"MIDSCENE_AZURE_OPENAI_SCOPE\",S=\"MIDSCENE_AZURE_OPENAI_INIT_CONFIG_JSON\",E=\"MIDSCENE_USE_ANTHROPIC_SDK\",x=\"ANTHROPIC_API_KEY\",C=\"OPENAI_USE_AZURE\",T=()=>({[l]:import_browser.default.env[l]||void 0,[u]:import_browser.default.env[u]||void 0,[f]:import_browser.default.env[f]||void 0,[c]:import_browser.default.env[c]||void 0,[d]:import_browser.default.env[d]||void 0,[h]:import_browser.default.env[h]||void 0,[m]:import_browser.default.env[m]||void 0,[g]:import_browser.default.env[g]||void 0,[_]:import_browser.default.env[_]||void 0,[C]:import_browser.default.env[C]||void 0,[b]:import_browser.default.env[b]||void 0,[y]:import_browser.default.env[y]||void 0,[v]:import_browser.default.env[v]||void 0,[p]:import_browser.default.env[p]||void 0,[A]:import_browser.default.env[A]||void 0,[w]:import_browser.default.env[w]||\"https://cognitiveservices.azure.com/.default\",[S]:import_browser.default.env[S]||void 0,[E]:import_browser.default.env[E]||void 0,[x]:import_browser.default.env[x]||void 0}),R={},I=e=>void 0!==R[e]?R[e]:T()[e],k=e=>{const t=I(e);try{return t?JSON.parse(t):void 0}catch(r){throw new Error(`Failed to parse json config: ${e}. ${r.message}`,{cause:r})}},P=()=>({...T(),...R}),M=(e,t)=>{R=t?{...R,...e}:{...e}}}}),require_utils8=__commonJS({\"../midscene/dist/lib/utils.js\"(e,t){init_globals();var r,n=Object.create,i=Object.defineProperty,o=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,s=Object.getPrototypeOf,l=Object.prototype.hasOwnProperty,u=(e,t,r,n)=>{if(t&&\"object\"==typeof t||\"function\"==typeof t)for(let s of a(t))l.call(e,s)||s===r||i(e,s,{get:()=>t[s],enumerable:!(n=o(t,s))||n.enumerable});return e},c={};((e,t)=>{for(var r in t)i(e,r,{get:t[r],enumerable:!0})})(c,{getLogDir:()=>G,getLogDirByType:()=>W,getTmpDir:()=>Y,getTmpFile:()=>J,getVersion:()=>re,groupedActionDumpFileExt:()=>q,insightDumpFileExt:()=>z,overlapped:()=>Q,replacerForPageObject:()=>ee,reportHTMLContent:()=>$,setLogDir:()=>H,sleep:()=>Z,stringifyDumpData:()=>te,uploadTestInfoToServer:()=>oe,writeDumpReport:()=>K,writeLogFile:()=>X}),t.exports=(r=c,u(i({},\"__esModule\",{value:!0}),r));var d=((e,t,r)=>(r=null!=e?n(s(e)):{},u(!t&&e&&e.__esModule?r:i(r,\"default\",{value:e,enumerable:!0}),e)))(require_assert()),h=require_child_process(),f=require_fs(),p=require_browser14(),m=require_path_browserify(),g=require_fs2(),_=require_utils5(),b=\"MIDSCENE_OPENAI_INIT_CONFIG_JSON\",y=\"MIDSCENE_MODEL_NAME\",v=\"MIDSCENE_LANGSMITH_DEBUG\",A=\"MIDSCENE_DEBUG_AI_PROFILE\",w=\"MIDSCENE_DANGEROUSLY_PRINT_ALL_CONFIG\",S=\"MIDSCENE_DEBUG_MODE\",E=\"MIDSCENE_OPENAI_SOCKS_PROXY\",x=\"OPENAI_API_KEY\",C=\"OPENAI_BASE_URL\",T=\"MIDSCENE_MODEL_TEXT_ONLY\",R=\"MIDSCENE_CACHE\",I=\"MATCH_BY_POSITION\",k=\"MIDSCENE_REPORT_TAG_NAME\",P=\"MIDSCENE_USE_AZURE_OPENAI\",M=\"MIDSCENE_AZURE_OPENAI_SCOPE\",O=\"MIDSCENE_AZURE_OPENAI_INIT_CONFIG_JSON\",B=\"MIDSCENE_USE_ANTHROPIC_SDK\",N=\"ANTHROPIC_API_KEY\",j=\"OPENAI_USE_AZURE\",L={},D=e=>void 0!==L[e]?L[e]:{[b]:import_browser.default.env[b]||void 0,[y]:import_browser.default.env[y]||void 0,[S]:import_browser.default.env[S]||void 0,[v]:import_browser.default.env[v]||void 0,[A]:import_browser.default.env[A]||void 0,[w]:import_browser.default.env[w]||void 0,[x]:import_browser.default.env[x]||void 0,[C]:import_browser.default.env[C]||void 0,[T]:import_browser.default.env[T]||void 0,[j]:import_browser.default.env[j]||void 0,[R]:import_browser.default.env[R]||void 0,[I]:import_browser.default.env[I]||void 0,[k]:import_browser.default.env[k]||void 0,[E]:import_browser.default.env[E]||void 0,[P]:import_browser.default.env[P]||void 0,[M]:import_browser.default.env[M]||\"https://cognitiveservices.azure.com/.default\",[O]:import_browser.default.env[O]||void 0,[B]:import_browser.default.env[B]||void 0,[N]:import_browser.default.env[N]||void 0}[e],F=(0,m.join)(import_browser.default.cwd(),\"./midscene_run/\"),U=!1,z=\"insight-dump.json\",q=\"web-dump.json\";function G(){return F}function H(e){F=e}function W(e){const t=(0,m.join)(G(),e);return(0,f.existsSync)(t)||(0,f.mkdirSync)(t,{recursive:!0}),t}var V=null;function $(e){const t=function(){if(_.ifInBrowser)return!V&&window.midscene_report_tpl&&(V=window.midscene_report_tpl),(0,d.default)(V,\"reportTpl should be set before writing report in browser\"),V;if(!V){let e=(0,m.join)(__dirname,\"../../report/index.html\");(0,f.existsSync)(e)||(e=(0,m.join)(__dirname,\"../report/index.html\")),V=(0,f.readFileSync)(e,\"utf-8\")}return V}();let r;if(Array.isArray(e)&&0===e.length||void 0===e)r=t.replace(/\\s+{{dump}}\\s+/,'__left_angle_mark_script type=\"midscene_web_dump\" type=\"application/json\">__left_angle_mark_\\/script>');else if(\"string\"==typeof e)r=t.replace(/\\s+{{dump}}\\s+/,`__left_angle_mark_script type=\"midscene_web_dump\" type=\"application/json\">${e}__left_angle_mark_\\/script>`);else{const n=e.map((({dumpString:e,attributes:t})=>`__left_angle_mark_script type=\"midscene_web_dump\" type=\"application/json\" ${Object.keys(t||{}).map((e=>`${e}=\"${encodeURIComponent(t[e])}\"`)).join(\" \")}\\n>${e}\\n__left_angle_mark_\\/script>`));r=t.replace(/\\s+{{dump}}\\s+/,n.join(\"\\n\"))}return r}function K(e,t){if(_.ifInBrowser)return import_console_browserify.default.log(\"will not write report in browser\"),null;if(!(0,g.getRunningPkgInfo)(__dirname))return import_console_browserify.default.warn(\"midscenePkgInfo not found, will not write report\"),null;const r=(0,m.join)(W(\"report\"),`${e}.html`),n=$(t);return(0,f.writeFileSync)(r,n),r}function X(e){if(_.ifInBrowser)return\"/mock/report.html\";const{fileName:t,fileExt:r,fileContent:n,type:i=\"dump\"}=e,o=W(i);if(!U){(0,d.default)(o,\"logDir should be set before writing dump file\");const e=(0,m.join)(o,\"../../.gitignore\");let t=\"\";(0,f.existsSync)(e)&&(t=(0,f.readFileSync)(e,\"utf-8\"));const r=(0,m.basename)(F);t.includes(`${r}/`)||(0,f.writeFileSync)(e,`${t}\\n# Midscene.js dump files\\n${r}/report\\n${r}/dump\\n${r}/tmp\\n`,\"utf-8\"),U=!0}const a=(0,m.join)(o,`${t}.${r}`),s=(0,m.dirname)(a);return(0,f.existsSync)(s)||(0,f.mkdirSync)(s,{recursive:!0}),(0,f.writeFileSync)(a,n),(null==e?void 0:e.generateReport)?K(t,n):a}function Y(){if(_.ifInBrowser)return null;const e=(0,g.getRunningPkgInfo)();if(!e)return null;const{name:t}=e,r=(0,m.join)((0,p.tmpdir)(),t);return(0,f.mkdirSync)(r,{recursive:!0}),r}function J(e){if(_.ifInBrowser)return null;const t=Y(),r=`${(0,_.uuid)()}.${e}`;return(0,m.join)(t,r)}function Q(e,t){return e.left__left_angle_mark_t.left+t.width&&e.left+e.width>t.left&&e.top__left_angle_mark_t.top+t.height&&e.top+e.height>t.top}async function Z(e){return new Promise((t=>setTimeout(t,e)))}function ee(e,t){var r,n;return t&&\"Page\"===(null==(r=t.constructor)?void 0:r.name)?\"[Page object]\":t&&\"Browser\"===(null==(n=t.constructor)?void 0:n.name)?\"[Browser object]\":t}function te(e,t){return JSON.stringify(e,ee,t)}function re(){return\"0.8.8\"}function ne(...e){D(S)&&import_console_browserify.default.log(\"[Midscene]\",...e)}var ie=\"\";function oe({testUrl:e}){let t=\"\",r=\"\";const n=(e=>{const t=D(e);try{return t?JSON.parse(t):void 0}catch(r){throw new Error(`Failed to parse json config: ${e}. ${r.message}`,{cause:r})}})(b),i=null==n?void 0:n.REPORT_SERVER_URL;try{t=(0,h.execSync)(\"git config --get remote.origin.url\").toString().trim(),r=(0,h.execSync)(\"git config --get user.email\").toString().trim()}catch(o){ne(\"Failed to get git info:\",o)}i&&(t&&t!==ie||!t&&e)&&(ne(\"Uploading test info to server\",{serverUrl:i,repoUrl:t,testUrl:e,userEmail:r}),fetch(i,{method:\"POST\",headers:{\"Content-Type\":\"application/json\"},body:JSON.stringify({repo_url:t,test_url:e,user_email:r})}).then((e=>e.json())).then((e=>{ne(\"Successfully uploaded test info to server:\",e)})).catch((e=>ne(\"Failed to upload test info to server:\",e))),ie=t)}}}),require_constants7=__commonJS({\"../shared/dist/lib/constants.js\"(e,t){init_globals();var r,n=Object.defineProperty,i=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,s={};((e,t)=>{for(var r in t)n(e,r,{get:t[r],enumerable:!0})})(s,{CONTAINER_MINI_HEIGHT:()=>c,CONTAINER_MINI_WIDTH:()=>d,NodeType:()=>h,TEXT_MAX_SIZE:()=>u,TEXT_SIZE_THRESHOLD:()=>l}),t.exports=(r=s,((e,t,r,s)=>{if(t&&\"object\"==typeof t||\"function\"==typeof t)for(let l of o(t))a.call(e,l)||l===r||n(e,l,{get:()=>t[l],enumerable:!(s=i(t,l))||s.enumerable});return e})(n({},\"__esModule\",{value:!0}),r));var l=9,u=40,c=3,d=3,h=(e=>(e.CONTAINER=\"CONTAINER Node\",e.FORM_ITEM=\"FORM_ITEM Node\",e.BUTTON=\"BUTTON Node\",e.IMG=\"IMG Node\",e.TEXT=\"TEXT Node\",e))(h||{})}}),require_playground=__commonJS({\"../web-integration/dist/lib/playground.js\"(e,t){init_globals();var r,n,i=Object.create,o=Object.defineProperty,a=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,l=Object.getPrototypeOf,u=Object.prototype.hasOwnProperty,c=(e,t,r,n)=>{if(t&&\"object\"==typeof t||\"function\"==typeof t)for(let i of s(t))u.call(e,i)||i===r||o(e,i,{get:()=>t[i],enumerable:!(n=a(t,i))||n.enumerable});return e},d=(e,t,r)=>(r=null!=e?i(l(e)):{},c(!t&&e&&e.__esModule?r:o(r,\"default\",{value:e,enumerable:!0}),e)),h=(r={\"../../node_modules/.pnpm/dayjs@1.11.11/node_modules/dayjs/dayjs.min.js\"(e,t){var r,n;r=e,n=function(){var e=6e4,t=36e5,r=\"millisecond\",n=\"second\",i=\"minute\",o=\"hour\",a=\"day\",s=\"week\",l=\"month\",u=\"quarter\",c=\"year\",d=\"date\",h=\"Invalid Date\",f=/^(\\d{4})[-/]?(\\d{1,2})?[-/]?(\\d{0,2})[Tt\\s]*(\\d{1,2})?:?(\\d{1,2})?:?(\\d{1,2})?[.:]?(\\d+)?$/,p=/\\[([^\\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,m={name:\"en\",weekdays:\"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday\".split(\"_\"),months:\"January_February_March_April_May_June_July_August_September_October_November_December\".split(\"_\"),ordinal:function(e){var t=[\"th\",\"st\",\"nd\",\"rd\"],r=e%100;return\"[\"+e+(t[(r-20)%10]||t[r]||t[0])+\"]\"}},g=function(e,t,r){var n=String(e);return!n||n.length>=t?e:\"\"+Array(t+1-n.length).join(r)+e},_={s:g,z:function(e){var t=-e.utcOffset(),r=Math.abs(t),n=Math.floor(r/60),i=r%60;return(t__left_angle_mark_=0?\"+\":\"-\")+g(n,2,\"0\")+\":\"+g(i,2,\"0\")},m:function e(t,r){if(t.date()__left_angle_mark_r.date())return-e(r,t);var n=12*(r.year()-t.year())+(r.month()-t.month()),i=t.clone().add(n,l),o=r-i__left_angle_mark_0,a=t.clone().add(n+(o?-1:1),l);return+(-(n+(r-i)/(o?i-a:a-i))||0)},a:function(e){return e__left_angle_mark_0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:l,y:c,w:s,d:a,D:d,h:o,m:i,s:n,ms:r,Q:u}[e]||String(e||\"\").toLowerCase().replace(/s$/,\"\")},u:function(e){return void 0===e}},b=\"en\",y={};y[b]=m;var v=\"$isDayjsObject\",A=function(e){return e instanceof x||!(!e||!e[v])},w=function e(t,r,n){var i;if(!t)return b;if(\"string\"==typeof t){var o=t.toLowerCase();y[o]&&(i=o),r&&(y[o]=r,i=o);var a=t.split(\"-\");if(!i&&a.length>1)return e(a[0])}else{var s=t.name;y[s]=t,i=s}return!n&&i&&(b=i),i||!n&&b},S=function(e,t){if(A(e))return e.clone();var r=\"object\"==typeof t?t:{};return r.date=e,r.args=arguments,new x(r)},E=_;E.l=w,E.i=A,E.w=function(e,t){return S(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var x=function(){function m(e){this.$L=w(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[v]=!0}var g=m.prototype;return g.parse=function(e){this.$d=function(e){var t=e.date,r=e.utc;if(null===t)return new Date(NaN);if(E.u(t))return new Date;if(t instanceof Date)return new Date(t);if(\"string\"==typeof t&&!/Z$/i.test(t)){var n=t.match(f);if(n){var i=n[2]-1||0,o=(n[7]||\"0\").substring(0,3);return r?new Date(Date.UTC(n[1],i,n[3]||1,n[4]||0,n[5]||0,n[6]||0,o)):new Date(n[1],i,n[3]||1,n[4]||0,n[5]||0,n[6]||0,o)}}return new Date(t)}(e),this.init()},g.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},g.$utils=function(){return E},g.isValid=function(){return!(this.$d.toString()===h)},g.isSame=function(e,t){var r=S(e);return this.startOf(t)__left_angle_mark_=r&&r__left_angle_mark_=this.endOf(t)},g.isAfter=function(e,t){return S(e)__left_angle_mark_this.startOf(t)},g.isBefore=function(e,t){return this.endOf(t)__left_angle_mark_S(e)},g.$g=function(e,t,r){return E.u(e)?this[t]:this.set(r,e)},g.unix=function(){return Math.floor(this.valueOf()/1e3)},g.valueOf=function(){return this.$d.getTime()},g.startOf=function(e,t){var r=this,u=!!E.u(t)||t,h=E.p(e),f=function(e,t){var n=E.w(r.$u?Date.UTC(r.$y,t,e):new Date(r.$y,t,e),r);return u?n:n.endOf(a)},p=function(e,t){return E.w(r.toDate()[e].apply(r.toDate(\"s\"),(u?[0,0,0,0]:[23,59,59,999]).slice(t)),r)},m=this.$W,g=this.$M,_=this.$D,b=\"set\"+(this.$u?\"UTC\":\"\");switch(h){case c:return u?f(1,0):f(31,11);case l:return u?f(1,g):f(0,g+1);case s:var y=this.$locale().weekStart||0,v=(m__left_angle_mark_y?m+7:m)-y;return f(u?_-v:_+(6-v),g);case a:case d:return p(b+\"Hours\",0);case o:return p(b+\"Minutes\",1);case i:return p(b+\"Seconds\",2);case n:return p(b+\"Milliseconds\",3);default:return this.clone()}},g.endOf=function(e){return this.startOf(e,!1)},g.$set=function(e,t){var s,u=E.p(e),h=\"set\"+(this.$u?\"UTC\":\"\"),f=(s={},s[a]=h+\"Date\",s[d]=h+\"Date\",s[l]=h+\"Month\",s[c]=h+\"FullYear\",s[o]=h+\"Hours\",s[i]=h+\"Minutes\",s[n]=h+\"Seconds\",s[r]=h+\"Milliseconds\",s)[u],p=u===a?this.$D+(t-this.$W):t;if(u===l||u===c){var m=this.clone().set(d,1);m.$d[f](p),m.init(),this.$d=m.set(d,Math.min(this.$D,m.daysInMonth())).$d}else f&&this.$d[f](p);return this.init(),this},g.set=function(e,t){return this.clone().$set(e,t)},g.get=function(e){return this[E.p(e)]()},g.add=function(r,u){var d,h=this;r=Number(r);var f=E.p(u),p=function(e){var t=S(h);return E.w(t.date(t.date()+Math.round(e*r)),h)};if(f===l)return this.set(l,this.$M+r);if(f===c)return this.set(c,this.$y+r);if(f===a)return p(1);if(f===s)return p(7);var m=(d={},d[i]=e,d[o]=t,d[n]=1e3,d)[f]||1,g=this.$d.getTime()+r*m;return E.w(g,this)},g.subtract=function(e,t){return this.add(-1*e,t)},g.format=function(e){var t=this,r=this.$locale();if(!this.isValid())return r.invalidDate||h;var n=e||\"YYYY-MM-DDTHH:mm:ssZ\",i=E.z(this),o=this.$H,a=this.$m,s=this.$M,l=r.weekdays,u=r.months,c=r.meridiem,d=function(e,r,i,o){return e&&(e[r]||e(t,n))||i[r].slice(0,o)},f=function(e){return E.s(o%12||12,e,\"0\")},m=c||function(e,t,r){var n=e__left_angle_mark_12?\"AM\":\"PM\";return r?n.toLowerCase():n};return n.replace(p,(function(e,n){return n||function(e){switch(e){case\"YY\":return String(t.$y).slice(-2);case\"YYYY\":return E.s(t.$y,4,\"0\");case\"M\":return s+1;case\"MM\":return E.s(s+1,2,\"0\");case\"MMM\":return d(r.monthsShort,s,u,3);case\"MMMM\":return d(u,s);case\"D\":return t.$D;case\"DD\":return E.s(t.$D,2,\"0\");case\"d\":return String(t.$W);case\"dd\":return d(r.weekdaysMin,t.$W,l,2);case\"ddd\":return d(r.weekdaysShort,t.$W,l,3);case\"dddd\":return l[t.$W];case\"H\":return String(o);case\"HH\":return E.s(o,2,\"0\");case\"h\":return f(1);case\"hh\":return f(2);case\"a\":return m(o,a,!0);case\"A\":return m(o,a,!1);case\"m\":return String(a);case\"mm\":return E.s(a,2,\"0\");case\"s\":return String(t.$s);case\"ss\":return E.s(t.$s,2,\"0\");case\"SSS\":return E.s(t.$ms,3,\"0\");case\"Z\":return i}return null}(e)||i.replace(\":\",\"\")}))},g.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},g.diff=function(r,d,h){var f,p=this,m=E.p(d),g=S(r),_=(g.utcOffset()-this.utcOffset())*e,b=this-g,y=function(){return E.m(p,g)};switch(m){case c:f=y()/12;break;case l:f=y();break;case u:f=y()/3;break;case s:f=(b-_)/6048e5;break;case a:f=(b-_)/864e5;break;case o:f=b/t;break;case i:f=b/e;break;case n:f=b/1e3;break;default:f=b}return h?f:E.a(f)},g.daysInMonth=function(){return this.endOf(l).$D},g.$locale=function(){return y[this.$L]},g.locale=function(e,t){if(!e)return this.$L;var r=this.clone(),n=w(e,t,!0);return n&&(r.$L=n),r},g.clone=function(){return E.w(this.$d,this)},g.toDate=function(){return new Date(this.valueOf())},g.toJSON=function(){return this.isValid()?this.toISOString():null},g.toISOString=function(){return this.$d.toISOString()},g.toString=function(){return this.$d.toUTCString()},m}(),C=x.prototype;return S.prototype=C,[[\"$ms\",r],[\"$s\",n],[\"$m\",i],[\"$H\",o],[\"$W\",a],[\"$M\",l],[\"$y\",c],[\"$D\",d]].forEach((function(e){C[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),S.extend=function(e,t){return e.$i||(e(t,x,S),e.$i=!0),S},S.locale=w,S.isDayjs=A,S.unix=function(e){return S(1e3*e)},S.en=y[b],S.Ls=y,S.p={},S},\"object\"==typeof e&&void 0!==t?t.exports=n():\"function\"==typeof define&&define.amd?define(n):(r=\"undefined\"!=typeof globalThis?globalThis:r||self).dayjs=n()}},function(){return n||(0,r[s(r)[0]])((n={exports:{}}).exports,n),n.exports}),f={};((e,t)=>{for(var r in t)o(e,r,{get:t[r],enumerable:!0})})(f,{ERROR_CODE_NOT_IMPLEMENTED_AS_DESIGNED:()=>w,StaticPage:()=>U,StaticPageAgent:()=>D}),t.exports=(e=>c(o({},\"__esModule\",{value:!0}),e))(f);var p=d(require_assert()),m=(require_fs(),d(require_path_browserify()),require_env()),g=require_utils8(),_=require_constants7(),b=(require_fs2(),require_img()),y=(require_utils5(),d(h())),v=class{constructor({content:e,rect:t,page:r,locator:n,id:i,attributes:o,indexId:a}){this.content=e,this.rect=t,this.center=[Math.floor(t.left+t.width/2),Math.floor(t.top+t.height/2)],this.page=r,this.locator=n,this.id=i,this.attributes=o,this.indexId=a}};async function A(e,t){if((0,p.default)(e,\"page is required\"),e._forceUsePageContext)return await e._forceUsePageContext();const r=await e.url();let n;(0,g.uploadTestInfoToServer)({testUrl:r});let i=[];await Promise.all([e.screenshotBase64().then((e=>{n=e})),e.getElementInfos().then((async t=>{i=await async function(e,t){const r=e.filter((e=>e.rect.height>=3&&e.rect.width>=3)),n=[];for(const i of r){const{rect:e,id:r,content:o,attributes:a,locator:s,indexId:l}=i;n.push(new v({rect:e,locator:s,id:r,content:o,attributes:a,page:t,indexId:l}))}return n}(t,e)}))]),(0,p.default)(n,\"screenshotBase64 is required\");const o=i.filter((e=>e.attributes.nodeType!==_.NodeType.TEXT)),a=await e.size(),s=(null==t?void 0:t.ignoreMarker)?await(0,b.compositeElementInfoImg)({inputImgBase64:n,elementsPositionInfo:[],size:a}):await(0,b.compositeElementInfoImg)({inputImgBase64:n,elementsPositionInfo:o,size:a});return{content:i,size:a,screenshotBase64:n,screenshotBase64WithElementMarker:s,url:r}}var w=\"NOT_IMPLEMENTED_AS_DESIGNED\",S=require_lib7(),E=require_constants7(),x=require_utils8(),C=d(require_assert()),T=require_lib7(),R=require_utils8(),I=require_fs(),k=require_path_browserify(),P=require_lib7(),M=require_utils8(),O=require_fs2(),B=require_utils5(),N=class{getCacheGroupByPrompt(e){const{aiTasks:t=[]}=this.cache||{aiTasks:[]},r=t.findIndex((t=>t.prompt===e)),n=[];return this.newCache.aiTasks.push({prompt:e,tasks:n}),{readCache:(e,n,i)=>-1!==r&&this.readCache(e,n,i,t[r].tasks),saveCache:e=>{n.push(e),this.writeCacheToFile()}}}readCache(e,t,r,n){var i;if(n.length>0){const o=n.findIndex((e=>e.prompt===r));if(-1===o)return!1;const a=n.splice(o,1)[0];if(\"locate\"===(null==a?void 0:a.type)&&!(null==(i=a.response)?void 0:i.elements.every((t=>-1!==e.content.findIndex((e=>e.id===t.id))))))return!1;if(a&&a.type===t&&a.prompt===r&&this.pageContextEqual(a.pageContext,e))return a.response}return!1}pageContextEqual(e,t){return e.size.width===t.size.width&&e.size.height===t.size.height}generateTaskCache(){return this.newCache}readCacheFromFile(){if(B.ifInBrowser||!this.cacheId)return;const e=(0,k.join)((0,M.getLogDirByType)(\"cache\"),`${this.cacheId}.json`);if(\"true\"===(0,P.getAIConfig)(\"MIDSCENE_CACHE\")&&(0,I.existsSync)(e))try{const t=(0,I.readFileSync)(e,\"utf8\"),r=JSON.parse(t);if(!this.midscenePkgInfo)return;if(r.pkgName!==this.midscenePkgInfo.name||r.pkgVersion!==this.midscenePkgInfo.version)return;return r}catch(t){return}}writeCacheToFile(){const e=(0,O.getRunningPkgInfo)();e&&this.cacheId&&(B.ifInBrowser||(0,M.writeLogFile)({fileName:`${this.cacheId}`,fileExt:\"json\",fileContent:(0,M.stringifyDumpData)({pkgName:e.name,pkgVersion:e.version,cacheId:this.cacheId,...this.newCache},2),type:\"cache\"}))}constructor(e){this.midscenePkgInfo=(0,O.getRunningPkgInfo)(),this.cacheId=(null==e?void 0:e.cacheId)||\"\",this.cache=this.readCacheFromFile()||{aiTasks:[]},this.newCache={aiTasks:[]}}},j=class{async recordScreenshot(e){const t=await this.page.screenshotBase64();return{type:\"screenshot\",ts:Date.now(),screenshot:t,timing:e}}prependExecutorWithScreenshot(e,t=!1){return{...e,executor:async(r,n,...i)=>{const o=[],{task:a}=n;a.recorder=o;const s=await this.recordScreenshot(`before ${a.type}`);o.push(s);const l=await e.executor(r,n,...i);if(\"Action\"===e.type&&await Promise.all([(async()=>{if(await(0,R.sleep)(100),this.page.waitUntilNetworkIdle)try{await this.page.waitUntilNetworkIdle({idleTime:100,timeout:800})}catch(e){}})(),(0,R.sleep)(200)]),t){const e=await this.recordScreenshot(\"after Action\");o.push(e)}return l}}}async convertPlanToExecutable(e,t){const r=[];return e.forEach((e=>{var n,i;if(\"Locate\"===e.type){if(null===(null==(n=e.locate)?void 0:n.id)||\"null\"===(null==(i=e.locate)?void 0:i.id))return;const o={type:\"Insight\",subType:\"Locate\",param:e.locate||void 0,thought:e.thought,locate:e.locate,executor:async(e,r)=>{const{task:n}=r;let i;(0,C.default)((null==e?void 0:e.prompt)||(null==e?void 0:e.id),\"No prompt or id to locate\"),this.insight.onceDumpUpdatedFn=e=>{i=e};const o=Date.now(),a=await this.insight.contextRetrieverFn(\"locate\"),s={type:\"screenshot\",ts:o,screenshot:a.screenshotBase64,timing:\"before locate\"},l=null==t?void 0:t.readCache(a,\"locate\",e.prompt);let u;const c=this.insight.aiVendorFn,d=await this.insight.locate(e.prompt,{quickAnswer:(null==e?void 0:e.id)?{id:e.id}:void 0,callAI:async(...e)=>{if(l)return u=l,Promise.resolve({content:l});const{content:t,usage:r}=await c(...e);return u=(0,T.transformElementPositionToId)(t,a.content),(0,C.default)(u),{content:u,usage:r}}});if(u&&(null==t||t.saveCache({type:\"locate\",pageContext:{url:a.url,size:a.size},prompt:e.prompt,response:u})),!d)throw n.log={dump:i},new Error(`Element not found: ${e.prompt}`);return{output:{element:d},log:{dump:i},cache:{hit:Boolean(l)},recorder:[s]}}};r.push(o)}else if(\"Assert\"===e.type||\"AssertWithoutThrow\"===e.type){const t=e,n={type:\"Insight\",subType:\"Assert\",param:t.param,thought:t.thought,locate:t.locate,executor:async(r,n)=>{const{task:i}=n;let o;this.insight.onceDumpUpdatedFn=e=>{o=e};const a=await this.insight.assert(t.param.assertion);if(!a.pass){if(\"Assert\"===e.type)throw i.output=a,i.log={dump:o},new Error(a.thought||\"Assertion failed without reason\");i.error=a.thought}return{output:a,log:{dump:o}}}};r.push(n)}else if(\"Input\"===e.type){const t={type:\"Action\",subType:\"Input\",param:e.param,thought:e.thought,locate:e.locate,executor:async(e,{element:t})=>{if(t){if(await this.page.clearInput(t),!e||!e.value)return;await this.page.keyboard.type(e.value)}}};r.push(t)}else if(\"KeyboardPress\"===e.type){const t={type:\"Action\",subType:\"KeyboardPress\",param:e.param,thought:e.thought,locate:e.locate,executor:async e=>{(0,C.default)(null==e?void 0:e.value,\"No key to press\"),await this.page.keyboard.press(e.value)}};r.push(t)}else if(\"Tap\"===e.type){const t={type:\"Action\",subType:\"Tap\",thought:e.thought,locate:e.locate,executor:async(e,{element:t})=>{(0,C.default)(t,\"Element not found, cannot tap\"),await this.page.mouse.click(t.center[0],t.center[1])}};r.push(t)}else if(\"Hover\"===e.type){const t={type:\"Action\",subType:\"Hover\",thought:e.thought,locate:e.locate,executor:async(e,{element:t})=>{(0,C.default)(t,\"Element not found, cannot hover\"),await this.page.mouse.move(t.center[0],t.center[1])}};r.push(t)}else if(\"Scroll\"===e.type){const t={type:\"Action\",subType:\"Scroll\",param:e.param,thought:e.thought,locate:e.locate,executor:async(e,{element:t})=>{const r=t?{left:t.center[0],top:t.center[1]}:void 0,n=null==e?void 0:e.scrollType;if(\"untilTop\"===n)await this.page.scrollUntilTop(r);else if(\"untilBottom\"===n)await this.page.scrollUntilBottom(r);else if(\"untilRight\"===n)await this.page.scrollUntilRight(r);else if(\"untilLeft\"===n)await this.page.scrollUntilLeft(r);else{if(\"once\"!==n)throw new Error(`Unknown scroll event type: ${n}, taskParam: ${JSON.stringify(e)}`);if(\"down\"===e.direction)await this.page.scrollDown(e.distance||void 0,r);else if(\"up\"===e.direction)await this.page.scrollUp(e.distance||void 0,r);else if(\"left\"===e.direction)await this.page.scrollLeft(e.distance||void 0,r);else{if(\"right\"!==e.direction)throw new Error(`Unknown scroll direction: ${e.direction}`);await this.page.scrollRight(e.distance||void 0,r)}await(0,R.sleep)(500)}}};r.push(t)}else if(\"Sleep\"===e.type){const t={type:\"Action\",subType:\"Sleep\",param:e.param,thought:e.thought,locate:e.locate,executor:async e=>{await(0,R.sleep)((null==e?void 0:e.timeMs)||3e3)}};r.push(t)}else if(\"Error\"===e.type){const t={type:\"Action\",subType:\"Error\",param:e.param,thought:e.thought,locate:e.locate,executor:async()=>{throw new Error((null==e?void 0:e.thought)||\"error without thought\")}};r.push(t)}else{if(\"FalsyConditionStatement\"!==e.type)throw new Error(`Unknown or unsupported task type: ${e.type}`);{const t={type:\"Action\",subType:\"FalsyConditionStatement\",param:null,thought:e.thought,locate:e.locate,executor:async()=>{}};r.push(t)}}})),{tasks:r.map(((e,t)=>\"Action\"===e.type?this.prependExecutorWithScreenshot(e,t===r.length-1):e))}}planningTaskFromPrompt(e,t,r,n){return{type:\"Planning\",locate:null,param:{userPrompt:e,whatHaveDone:r,originalPrompt:n},executor:async(r,n)=>{const i=Date.now(),o=await this.insight.contextRetrieverFn(\"locate\"),a={type:\"screenshot\",ts:i,screenshot:o.screenshotBase64,timing:\"before planning\"};n.task.recorder=[a],n.task.pageContext=o;const s=t.readCache(o,\"plan\",e);let l;l=s||await(0,T.plan)(r.userPrompt,{context:o,whatHaveDone:r.whatHaveDone,originalPrompt:r.originalPrompt});const{actions:u,furtherPlan:c,taskWillBeAccomplished:d}=l;let h=!1;const f=u.reduce(((e,t)=>{if(h)return e;if(t.locate)e.push({type:\"Locate\",locate:t.locate,param:null,thought:t.locate.prompt});else if([\"Tap\",\"Hover\",\"Input\"].includes(t.type))return h=!0,e;return e.push(t),e}),[]);return(0,C.default)(f.length>0,\"No plans found\"),t.saveCache({type:\"plan\",pageContext:{url:o.url,size:o.size},prompt:e,response:l}),{output:{actions:f,taskWillBeAccomplished:!1,furtherPlan:c},cache:{hit:Boolean(s)},pageContext:o,recorder:[a]}}}}async action(e,t){var r;const n=new T.Executor(e,void 0,void 0,{onTaskStart:null==t?void 0:t.onTaskStart}),i=this.taskCache.getCacheGroupByPrompt(e),o=e;let a,s=this.planningTaskFromPrompt(o,i),l=0;for(;s;){if(l>5){const e=\"Replanning too many times, please split the task into multiple steps\";return this.appendErrorPlan(n,e)}l>0&&await(0,R.sleep)(300),await n.append(s);const e=await n.flush();if(n.isInErrorState())return{output:e,executor:n};const t=e.actions;let c;try{c=await this.convertPlanToExecutable(t,i),n.append(c.tasks)}catch(u){return this.appendErrorPlan(n,`Error converting plans to executable tasks: ${u}, plans: ${JSON.stringify(t)}`)}if(a=await n.flush(),n.isInErrorState())return{output:a,executor:n};if(!(null==(r=e.furtherPlan)?void 0:r.whatToDoNext)){s=null;break}s=this.planningTaskFromPrompt(e.furtherPlan.whatToDoNext,i,e.furtherPlan.whatHaveDone,o),l++}return{output:a,executor:n}}async query(e){const t=\"string\"==typeof e?e:JSON.stringify(e),r=new T.Executor(t),n={type:\"Insight\",subType:\"Query\",locate:null,param:{dataDemand:e},executor:async e=>{let t;return this.insight.onceDumpUpdatedFn=e=>{t=e},{output:await this.insight.extract(e.dataDemand),log:{dump:t}}}};return await r.append(this.prependExecutorWithScreenshot(n)),{output:await r.flush(),executor:r}}async assert(e){const t=`assert: ${e}`,r=new T.Executor(t),n={type:\"Assert\",param:{assertion:e},locate:null},{tasks:i}=await this.convertPlanToExecutable([n]);return await r.append(this.prependExecutorWithScreenshot(i[0])),{output:await r.flush(),executor:r}}async appendErrorPlan(e,t){const r={type:\"Error\",param:{thought:t},locate:null},{tasks:n}=await this.convertPlanToExecutable([r]);return await e.append(this.prependExecutorWithScreenshot(n[0])),await e.flush(),{output:void 0,executor:e}}async waitFor(e,t){const r=`waitFor: ${e}`,n=new T.Executor(r),{timeoutMs:i,checkIntervalMs:o}=t;(0,C.default)(e,\"No assertion for waitFor\"),(0,C.default)(i,\"No timeoutMs for waitFor\"),(0,C.default)(o,\"No checkIntervalMs for waitFor\");const a=Date.now();let s=Date.now(),l=\"\";for(;Date.now()-a__left_angle_mark_i;){s=Date.now();const t={type:\"AssertWithoutThrow\",param:{assertion:e},locate:null},{tasks:r}=await this.convertPlanToExecutable([t]);await n.append(this.prependExecutorWithScreenshot(r[0]));const i=await n.flush();if(null==i?void 0:i.pass)return{output:void 0,executor:n};l=(null==i?void 0:i.thought)||\"unknown error\";const a=Date.now();if(a-s__left_angle_mark_o){const e={type:\"Sleep\",param:{timeMs:o-(a-s)},locate:null},{tasks:t}=await this.convertPlanToExecutable([e]);await n.append(this.prependExecutorWithScreenshot(t[0])),await n.flush()}}return this.appendErrorPlan(n,`waitFor timeout: ${l}`)}constructor(e,t,r){this.page=e,this.insight=t,this.taskCache=new N({cacheId:null==r?void 0:r.cacheId})}},L=class{async getUIContext(e){return!e||\"extract\"!==e&&\"assert\"!==e?await A(this.page):await A(this.page,{ignoreMarker:!0})}resetDump(){return this.dump={groupName:this.opts.groupName,groupDescription:this.opts.groupDescription,executions:[]},this.dump}appendExecutionDump(e){this.dump.executions.push(e)}dumpDataString(){return this.dump.groupName=this.opts.groupName,this.dump.groupDescription=this.opts.groupDescription,(0,x.stringifyDumpData)(this.dump)}reportHTMLString(){return(0,x.reportHTMLContent)(this.dumpDataString())}writeOutActionDumps(){const{generateReport:e,autoPrintReportMsg:t}=this.opts;var r;this.reportFile=(0,x.writeLogFile)({fileName:this.reportFileName,fileExt:x.groupedActionDumpFileExt,fileContent:this.dumpDataString(),type:\"dump\",generateReport:e}),e&&t&&this.reportFile&&(r=this.reportFile,import_console_browserify.default.log(\"Midscene - report file updated:\",r))}async aiAction(e,t){const{executor:r}=await this.taskExecutor.action(e,t);if(this.appendExecutionDump(r.dump()),this.writeOutActionDumps(),r.isInErrorState()){const e=r.latestErrorTask();throw new Error(`${null==e?void 0:e.error}\\n${null==e?void 0:e.errorStack}`)}}async aiQuery(e){const{output:t,executor:r}=await this.taskExecutor.query(e);if(this.appendExecutionDump(r.dump()),this.writeOutActionDumps(),r.isInErrorState()){const e=r.latestErrorTask();throw new Error(`${null==e?void 0:e.error}\\n${null==e?void 0:e.errorStack}`)}return t}async aiAssert(e,t,r){var n;const{output:i,executor:o}=await this.taskExecutor.assert(e);if(this.appendExecutionDump(o.dump()),this.writeOutActionDumps(),i&&(null==r?void 0:r.keepRawResponse))return i;if(!(null==i?void 0:i.pass)){const r=t||`Assertion failed: ${e}`,a=`Reason: ${(null==i?void 0:i.thought)||(null==(n=o.latestErrorTask())?void 0:n.error)||\"(no_reason)\"}`;throw new Error(`${r}\\n${a}`)}}async aiWaitFor(e,t){const{executor:r}=await this.taskExecutor.waitFor(e,{timeoutMs:(null==t?void 0:t.timeoutMs)||15e3,checkIntervalMs:(null==t?void 0:t.checkIntervalMs)||3e3,assertion:e});if(this.appendExecutionDump(r.dump()),this.writeOutActionDumps(),r.isInErrorState()){const e=r.latestErrorTask();throw new Error(`${null==e?void 0:e.error}\\n${null==e?void 0:e.errorStack}`)}}async ai(e,t=\"action\"){if(\"action\"===t)return this.aiAction(e);if(\"query\"===t)return this.aiQuery(e);if(\"assert\"===t)return this.aiAssert(e);throw new Error(`Unknown type: ${t}, only support 'action', 'query', 'assert'`)}async destroy(){await this.page.destroy()}constructor(e,t){this.dryMode=!1,this.page=e,this.opts=Object.assign({generateReport:!0,autoPrintReportMsg:!0,groupName:\"Midscene Report\",groupDescription:\"\"},t||{}),this.insight=new S.Insight((async e=>this.getUIContext(e)),{generateElement:({content:t,rect:r})=>new v({content:t||\"\",rect:r,page:e,id:\"\",attributes:{nodeType:E.NodeType.CONTAINER},indexId:0})}),this.taskExecutor=new j(this.page,this.insight,{cacheId:null==t?void 0:t.cacheId}),this.dump=this.resetDump(),this.reportFileName=function(e=\"web\"){return`${(0,m.getAIConfig)(m.MIDSCENE_REPORT_TAG_NAME)||e}-${(0,y.default)().format(\"YYYY-MM-DD_HH-mm-ss-SSS\")}`}((null==t?void 0:t.testId)||\"web\")}},D=class extends L{constructor(e){super(e,{}),this.dryMode=!0}},F=e=>{throw new Error(`The method \"${e}\" is not implemented as designed since this is a static UI context. (${w})`)},U=class{async getElementInfos(){return F(\"getElementInfos\")}async size(){return this.uiContext.size}async screenshotBase64(){const e=this.uiContext.screenshotBase64;if(!e)throw new Error(\"screenshot base64 is empty\");return e}async url(){return this.uiContext.url}async scrollUntilTop(e){return F(\"scrollUntilTop\")}async scrollUntilBottom(e){return F(\"scrollUntilBottom\")}async scrollUntilLeft(e){return F(\"scrollUntilLeft\")}async scrollUntilRight(e){return F(\"scrollUntilRight\")}async scrollUp(e,t){return F(\"scrollUp\")}async scrollDown(e,t){return F(\"scrollDown\")}async scrollLeft(e,t){return F(\"scrollLeft\")}async scrollRight(e,t){return F(\"scrollRight\")}async clearInput(){return F(\"clearInput\")}async _forceUsePageContext(){return this.uiContext}async destroy(){}constructor(e){this.pageType=\"static\",this.mouse={click:F.bind(null,\"mouse.click\"),wheel:F.bind(null,\"mouse.wheel\"),move:F.bind(null,\"mouse.move\")},this.keyboard={type:F.bind(null,\"keyboard.type\"),press:F.bind(null,\"keyboard.press\")},this.uiContext=e}}}});init_globals(),init_globals(),init_globals();var import_dayjs=__toESM(require_dayjs_min());function timeStr(e){return e?(0,import_dayjs.default)(e).format(\"YYYY-MM-DD HH:mm:ss\"):\"-\"}function filterBase64Value(e){return e.replace(/data:image\\/[^\"]+\"/g,'data:image...\"')}var mousePointer=\"data:image/png;base64, \",mouseLoading=\"data:image/png;base64, \",import_ui_utils2=__toESM(require_ui_utils());init_globals();var import_react=__toESM(require_react()),IconContext=(0,import_react.createContext)({}),Context_default=IconContext;function _extends(){return _extends=Object.assign?Object.assign.bind():function(e){for(var t=1;t__left_angle_mark_arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},_extends.apply(null,arguments)}function _arrayWithHoles(e){if(Array.isArray(e))return e}function _iterableToArrayLimit(e,t){var r=null==e?null:\"undefined\"!=typeof Symbol&&e[Symbol.iterator]||e[\"@@iterator\"];if(null!=r){var n,i,o,a,s=[],l=!0,u=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r__left_angle_mark_t;r++)n[r]=e[r];return n}function _unsupportedIterableToArray(e,t){if(e){if(\"string\"==typeof e)return _arrayLikeToArray(e,t);var r={}.toString.call(e).slice(8,-1);return\"Object\"===r&&e.constructor&&(r=e.constructor.name),\"Map\"===r||\"Set\"===r?Array.from(e):\"Arguments\"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_arrayLikeToArray(e,t):void 0}}function _nonIterableRest(){throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")}function _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_unsupportedIterableToArray(e,t)||_nonIterableRest()}function _typeof(e){return(_typeof=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&\"function\"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":typeof e})(e)}function toPrimitive(e,t){if(\"object\"!=_typeof(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||\"default\");if(\"object\"!=_typeof(n))return n;throw new TypeError(\"@@toPrimitive must return a primitive value.\")}return(\"string\"===t?String:Number)(e)}function toPropertyKey(e){var t=toPrimitive(e,\"string\");return\"symbol\"==_typeof(t)?t:t+\"\"}function _defineProperty(e,t,r){return(t=toPropertyKey(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _objectWithoutPropertiesLoose(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.includes(n))continue;r[n]=e[n]}return r}function _objectWithoutProperties(e,t){if(null==e)return{};var r,n,i=_objectWithoutPropertiesLoose(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n__left_angle_mark_o.length;n++)r=o[n],t.includes(r)||{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}init_globals(),init_globals(),init_globals(),init_globals(),init_globals(),init_globals(),init_globals(),init_globals(),init_globals(),init_globals(),init_globals(),init_globals(),init_globals(),init_globals(),init_globals();var React3=__toESM(require_react()),import_classnames=__toESM(require_classnames());function bound01(e,t){isOnePointZero(e)&&(e=\"100%\");var r=isPercentage(e);return e=360===t?e:Math.min(t,Math.max(0,parseFloat(e))),r&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)__left_angle_mark_1e-6?1:e=360===t?(e__left_angle_mark_0?e%t+t:e%t)/parseFloat(String(t)):e%t/parseFloat(String(t))}function clamp01(e){return Math.min(1,Math.max(0,e))}function isOnePointZero(e){return\"string\"==typeof e&&-1!==e.indexOf(\".\")&&1===parseFloat(e)}function isPercentage(e){return\"string\"==typeof e&&-1!==e.indexOf(\"%\")}function boundAlpha(e){return e=parseFloat(e),(isNaN(e)||e__left_angle_mark_0||e>1)&&(e=1),e}function convertToPercentage(e){return e__left_angle_mark_=1?\"\".concat(100*Number(e),\"%\"):e}function pad2(e){return 1===e.length?\"0\"+e:String(e)}function rgbToRgb(e,t,r){return{r:255*bound01(e,255),g:255*bound01(t,255),b:255*bound01(r,255)}}function rgbToHsl(e,t,r){e=bound01(e,255),t=bound01(t,255),r=bound01(r,255);var n=Math.max(e,t,r),i=Math.min(e,t,r),o=0,a=0,s=(n+i)/2;if(n===i)a=0,o=0;else{var l=n-i;switch(a=s>.5?l/(2-n-i):l/(n+i),n){case e:o=(t-r)/l+(t__left_angle_mark_r?6:0);break;case t:o=(r-e)/l+2;break;case r:o=(e-t)/l+4}o/=6}return{h:o,s:a,l:s}}function hue2rgb(e,t,r){return r__left_angle_mark_0&&(r+=1),r>1&&(r-=1),r__left_angle_mark_1/6?e+6*r*(t-e):r__left_angle_mark_.5?t:r__left_angle_mark_2/3?e+(t-e)*(2/3-r)*6:e}function hslToRgb(e,t,r){var n,i,o;if(e=bound01(e,360),t=bound01(t,100),r=bound01(r,100),0===t)i=r,o=r,n=r;else{var a=r__left_angle_mark_.5?r*(1+t):r+t-r*t,s=2*r-a;n=hue2rgb(s,a,e+1/3),i=hue2rgb(s,a,e),o=hue2rgb(s,a,e-1/3)}return{r:255*n,g:255*i,b:255*o}}function rgbToHsv(e,t,r){e=bound01(e,255),t=bound01(t,255),r=bound01(r,255);var n=Math.max(e,t,r),i=Math.min(e,t,r),o=0,a=n,s=n-i,l=0===n?0:s/n;if(n===i)o=0;else{switch(n){case e:o=(t-r)/s+(t__left_angle_mark_r?6:0);break;case t:o=(r-e)/s+2;break;case r:o=(e-t)/s+4}o/=6}return{h:o,s:l,v:a}}function hsvToRgb(e,t,r){e=6*bound01(e,360),t=bound01(t,100),r=bound01(r,100);var n=Math.floor(e),i=e-n,o=r*(1-t),a=r*(1-i*t),s=r*(1-(1-i)*t),l=n%6;return{r:255*[r,a,o,o,s,r][l],g:255*[s,r,r,a,o,o][l],b:255*[o,o,s,r,r,a][l]}}function rgbToHex(e,t,r,n){var i=[pad2(Math.round(e).toString(16)),pad2(Math.round(t).toString(16)),pad2(Math.round(r).toString(16))];return n&&i[0].startsWith(i[0].charAt(1))&&i[1].startsWith(i[1].charAt(1))&&i[2].startsWith(i[2].charAt(1))?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join(\"\")}function rgbaToHex(e,t,r,n,i){var o=[pad2(Math.round(e).toString(16)),pad2(Math.round(t).toString(16)),pad2(Math.round(r).toString(16)),pad2(convertDecimalToHex(n))];return i&&o[0].startsWith(o[0].charAt(1))&&o[1].startsWith(o[1].charAt(1))&&o[2].startsWith(o[2].charAt(1))&&o[3].startsWith(o[3].charAt(1))?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0):o.join(\"\")}function convertDecimalToHex(e){return Math.round(255*parseFloat(e)).toString(16)}function convertHexToDecimal(e){return parseIntFromHex(e)/255}function parseIntFromHex(e){return parseInt(e,16)}function numberInputToObject(e){return{r:e>>16,g:(65280&e)>>8,b:255&e}}init_globals(),init_globals(),init_globals(),init_globals(),init_globals(),init_globals();var names={aliceblue:\"#f0f8ff\",antiquewhite:\"#faebd7\",aqua:\"#00ffff\",aquamarine:\"#7fffd4\",azure:\"#f0ffff\",beige:\"#f5f5dc\",bisque:\"#ffe4c4\",black:\"#000000\",blanchedalmond:\"#ffebcd\",blue:\"#0000ff\",blueviolet:\"#8a2be2\",brown:\"#a52a2a\",burlywood:\"#deb887\",cadetblue:\"#5f9ea0\",chartreuse:\"#7fff00\",chocolate:\"#d2691e\",coral:\"#ff7f50\",cornflowerblue:\"#6495ed\",cornsilk:\"#fff8dc\",crimson:\"#dc143c\",cyan:\"#00ffff\",darkblue:\"#00008b\",darkcyan:\"#008b8b\",darkgoldenrod:\"#b8860b\",darkgray:\"#a9a9a9\",darkgreen:\"#006400\",darkgrey:\"#a9a9a9\",darkkhaki:\"#bdb76b\",darkmagenta:\"#8b008b\",darkolivegreen:\"#556b2f\",darkorange:\"#ff8c00\",darkorchid:\"#9932cc\",darkred:\"#8b0000\",darksalmon:\"#e9967a\",darkseagreen:\"#8fbc8f\",darkslateblue:\"#483d8b\",darkslategray:\"#2f4f4f\",darkslategrey:\"#2f4f4f\",darkturquoise:\"#00ced1\",darkviolet:\"#9400d3\",deeppink:\"#ff1493\",deepskyblue:\"#00bfff\",dimgray:\"#696969\",dimgrey:\"#696969\",dodgerblue:\"#1e90ff\",firebrick:\"#b22222\",floralwhite:\"#fffaf0\",forestgreen:\"#228b22\",fuchsia:\"#ff00ff\",gainsboro:\"#dcdcdc\",ghostwhite:\"#f8f8ff\",goldenrod:\"#daa520\",gold:\"#ffd700\",gray:\"#808080\",green:\"#008000\",greenyellow:\"#adff2f\",grey:\"#808080\",honeydew:\"#f0fff0\",hotpink:\"#ff69b4\",indianred:\"#cd5c5c\",indigo:\"#4b0082\",ivory:\"#fffff0\",khaki:\"#f0e68c\",lavenderblush:\"#fff0f5\",lavender:\"#e6e6fa\",lawngreen:\"#7cfc00\",lemonchiffon:\"#fffacd\",lightblue:\"#add8e6\",lightcoral:\"#f08080\",lightcyan:\"#e0ffff\",lightgoldenrodyellow:\"#fafad2\",lightgray:\"#d3d3d3\",lightgreen:\"#90ee90\",lightgrey:\"#d3d3d3\",lightpink:\"#ffb6c1\",lightsalmon:\"#ffa07a\",lightseagreen:\"#20b2aa\",lightskyblue:\"#87cefa\",lightslategray:\"#778899\",lightslategrey:\"#778899\",lightsteelblue:\"#b0c4de\",lightyellow:\"#ffffe0\",lime:\"#00ff00\",limegreen:\"#32cd32\",linen:\"#faf0e6\",magenta:\"#ff00ff\",maroon:\"#800000\",mediumaquamarine:\"#66cdaa\",mediumblue:\"#0000cd\",mediumorchid:\"#ba55d3\",mediumpurple:\"#9370db\",mediumseagreen:\"#3cb371\",mediumslateblue:\"#7b68ee\",mediumspringgreen:\"#00fa9a\",mediumturquoise:\"#48d1cc\",mediumvioletred:\"#c71585\",midnightblue:\"#191970\",mintcream:\"#f5fffa\",mistyrose:\"#ffe4e1\",moccasin:\"#ffe4b5\",navajowhite:\"#ffdead\",navy:\"#000080\",oldlace:\"#fdf5e6\",olive:\"#808000\",olivedrab:\"#6b8e23\",orange:\"#ffa500\",orangered:\"#ff4500\",orchid:\"#da70d6\",palegoldenrod:\"#eee8aa\",palegreen:\"#98fb98\",paleturquoise:\"#afeeee\",palevioletred:\"#db7093\",papayawhip:\"#ffefd5\",peachpuff:\"#ffdab9\",peru:\"#cd853f\",pink:\"#ffc0cb\",plum:\"#dda0dd\",powderblue:\"#b0e0e6\",purple:\"#800080\",rebeccapurple:\"#663399\",red:\"#ff0000\",rosybrown:\"#bc8f8f\",royalblue:\"#4169e1\",saddlebrown:\"#8b4513\",salmon:\"#fa8072\",sandybrown:\"#f4a460\",seagreen:\"#2e8b57\",seashell:\"#fff5ee\",sienna:\"#a0522d\",silver:\"#c0c0c0\",skyblue:\"#87ceeb\",slateblue:\"#6a5acd\",slategray:\"#708090\",slategrey:\"#708090\",snow:\"#fffafa\",springgreen:\"#00ff7f\",steelblue:\"#4682b4\",tan:\"#d2b48c\",teal:\"#008080\",thistle:\"#d8bfd8\",tomato:\"#ff6347\",turquoise:\"#40e0d0\",violet:\"#ee82ee\",wheat:\"#f5deb3\",white:\"#ffffff\",whitesmoke:\"#f5f5f5\",yellow:\"#ffff00\",yellowgreen:\"#9acd32\"};function inputToRGB(e){var t={r:0,g:0,b:0},r=1,n=null,i=null,o=null,a=!1,s=!1;return\"string\"==typeof e&&(e=stringInputToObject(e)),\"object\"==typeof e&&(isValidCSSUnit(e.r)&&isValidCSSUnit(e.g)&&isValidCSSUnit(e.b)?(t=rgbToRgb(e.r,e.g,e.b),a=!0,s=\"%\"===String(e.r).substr(-1)?\"prgb\":\"rgb\"):isValidCSSUnit(e.h)&&isValidCSSUnit(e.s)&&isValidCSSUnit(e.v)?(n=convertToPercentage(e.s),i=convertToPercentage(e.v),t=hsvToRgb(e.h,n,i),a=!0,s=\"hsv\"):isValidCSSUnit(e.h)&&isValidCSSUnit(e.s)&&isValidCSSUnit(e.l)&&(n=convertToPercentage(e.s),o=convertToPercentage(e.l),t=hslToRgb(e.h,n,o),a=!0,s=\"hsl\"),Object.prototype.hasOwnProperty.call(e,\"a\")&&(r=e.a)),r=boundAlpha(r),{ok:a,format:e.format||s,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:r}}init_globals();var CSS_INTEGER=\"[-\\\\+]?\\\\d+%?\",CSS_NUMBER=\"[-\\\\+]?\\\\d*\\\\.\\\\d+%?\",CSS_UNIT=\"(?:\".concat(CSS_NUMBER,\")|(?:\").concat(CSS_INTEGER,\")\"),PERMISSIVE_MATCH3=\"[\\\\s|\\\\(]+(\".concat(CSS_UNIT,\")[,|\\\\s]+(\").concat(CSS_UNIT,\")[,|\\\\s]+(\").concat(CSS_UNIT,\")\\\\s*\\\\)?\"),PERMISSIVE_MATCH4=\"[\\\\s|\\\\(]+(\".concat(CSS_UNIT,\")[,|\\\\s]+(\").concat(CSS_UNIT,\")[,|\\\\s]+(\").concat(CSS_UNIT,\")[,|\\\\s]+(\").concat(CSS_UNIT,\")\\\\s*\\\\)?\"),matchers={CSS_UNIT:new RegExp(CSS_UNIT),rgb:new RegExp(\"rgb\"+PERMISSIVE_MATCH3),rgba:new RegExp(\"rgba\"+PERMISSIVE_MATCH4),hsl:new RegExp(\"hsl\"+PERMISSIVE_MATCH3),hsla:new RegExp(\"hsla\"+PERMISSIVE_MATCH4),hsv:new RegExp(\"hsv\"+PERMISSIVE_MATCH3),hsva:new RegExp(\"hsva\"+PERMISSIVE_MATCH4),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function stringInputToObject(e){if(0===(e=e.trim().toLowerCase()).length)return!1;var t=!1;if(names[e])e=names[e],t=!0;else if(\"transparent\"===e)return{r:0,g:0,b:0,a:0,format:\"name\"};var r=matchers.rgb.exec(e);return r?{r:r[1],g:r[2],b:r[3]}:(r=matchers.rgba.exec(e))?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=matchers.hsl.exec(e))?{h:r[1],s:r[2],l:r[3]}:(r=matchers.hsla.exec(e))?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=matchers.hsv.exec(e))?{h:r[1],s:r[2],v:r[3]}:(r=matchers.hsva.exec(e))?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=matchers.hex8.exec(e))?{r:parseIntFromHex(r[1]),g:parseIntFromHex(r[2]),b:parseIntFromHex(r[3]),a:convertHexToDecimal(r[4]),format:t?\"name\":\"hex8\"}:(r=matchers.hex6.exec(e))?{r:parseIntFromHex(r[1]),g:parseIntFromHex(r[2]),b:parseIntFromHex(r[3]),format:t?\"name\":\"hex\"}:(r=matchers.hex4.exec(e))?{r:parseIntFromHex(r[1]+r[1]),g:parseIntFromHex(r[2]+r[2]),b:parseIntFromHex(r[3]+r[3]),a:convertHexToDecimal(r[4]+r[4]),format:t?\"name\":\"hex8\"}:!!(r=matchers.hex3.exec(e))&&{r:parseIntFromHex(r[1]+r[1]),g:parseIntFromHex(r[2]+r[2]),b:parseIntFromHex(r[3]+r[3]),format:t?\"name\":\"hex\"}}function isValidCSSUnit(e){return Boolean(matchers.CSS_UNIT.exec(String(e)))}var TinyColor=function(){function e(t,r){var n;if(void 0===t&&(t=\"\"),void 0===r&&(r={}),t instanceof e)return t;\"number\"==typeof t&&(t=numberInputToObject(t)),this.originalInput=t;var i=inputToRGB(t);this.originalInput=t,this.r=i.r,this.g=i.g,this.b=i.b,this.a=i.a,this.roundA=Math.round(100*this.a)/100,this.format=null!==(n=r.format)&&void 0!==n?n:i.format,this.gradientType=r.gradientType,this.r__left_angle_mark_1&&(this.r=Math.round(this.r)),this.g__left_angle_mark_1&&(this.g=Math.round(this.g)),this.b__left_angle_mark_1&&(this.b=Math.round(this.b)),this.isValid=i.ok}return e.prototype.isDark=function(){return this.getBrightness()__left_angle_mark_128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},e.prototype.getLuminance=function(){var e=this.toRgb(),t=e.r/255,r=e.g/255,n=e.b/255;return.2126*(t__left_angle_mark_=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.7152*(r__left_angle_mark_=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4))+.0722*(n__left_angle_mark_=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4))},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(e){return this.a=boundAlpha(e),this.roundA=Math.round(100*this.a)/100,this},e.prototype.isMonochrome=function(){return 0===this.toHsl().s},e.prototype.toHsv=function(){var e=rgbToHsv(this.r,this.g,this.b);return{h:360*e.h,s:e.s,v:e.v,a:this.a}},e.prototype.toHsvString=function(){var e=rgbToHsv(this.r,this.g,this.b),t=Math.round(360*e.h),r=Math.round(100*e.s),n=Math.round(100*e.v);return 1===this.a?\"hsv(\".concat(t,\", \").concat(r,\"%, \").concat(n,\"%)\"):\"hsva(\".concat(t,\", \").concat(r,\"%, \").concat(n,\"%, \").concat(this.roundA,\")\")},e.prototype.toHsl=function(){var e=rgbToHsl(this.r,this.g,this.b);return{h:360*e.h,s:e.s,l:e.l,a:this.a}},e.prototype.toHslString=function(){var e=rgbToHsl(this.r,this.g,this.b),t=Math.round(360*e.h),r=Math.round(100*e.s),n=Math.round(100*e.l);return 1===this.a?\"hsl(\".concat(t,\", \").concat(r,\"%, \").concat(n,\"%)\"):\"hsla(\".concat(t,\", \").concat(r,\"%, \").concat(n,\"%, \").concat(this.roundA,\")\")},e.prototype.toHex=function(e){return void 0===e&&(e=!1),rgbToHex(this.r,this.g,this.b,e)},e.prototype.toHexString=function(e){return void 0===e&&(e=!1),\"#\"+this.toHex(e)},e.prototype.toHex8=function(e){return void 0===e&&(e=!1),rgbaToHex(this.r,this.g,this.b,this.a,e)},e.prototype.toHex8String=function(e){return void 0===e&&(e=!1),\"#\"+this.toHex8(e)},e.prototype.toHexShortString=function(e){return void 0===e&&(e=!1),1===this.a?this.toHexString(e):this.toHex8String(e)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var e=Math.round(this.r),t=Math.round(this.g),r=Math.round(this.b);return 1===this.a?\"rgb(\".concat(e,\", \").concat(t,\", \").concat(r,\")\"):\"rgba(\".concat(e,\", \").concat(t,\", \").concat(r,\", \").concat(this.roundA,\")\")},e.prototype.toPercentageRgb=function(){var e=function(e){return\"\".concat(Math.round(100*bound01(e,255)),\"%\")};return{r:e(this.r),g:e(this.g),b:e(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var e=function(e){return Math.round(100*bound01(e,255))};return 1===this.a?\"rgb(\".concat(e(this.r),\"%, \").concat(e(this.g),\"%, \").concat(e(this.b),\"%)\"):\"rgba(\".concat(e(this.r),\"%, \").concat(e(this.g),\"%, \").concat(e(this.b),\"%, \").concat(this.roundA,\")\")},e.prototype.toName=function(){if(0===this.a)return\"transparent\";if(this.a__left_angle_mark_1)return!1;for(var e=\"#\"+rgbToHex(this.r,this.g,this.b,!1),t=0,r=Object.entries(names);t__left_angle_mark_r.length;t++){var n=r[t],i=n[0];if(e===n[1])return i}return!1},e.prototype.toString=function(e){var t=Boolean(e);e=null!=e?e:this.format;var r=!1,n=this.a__left_angle_mark_1&&this.a>=0;return t||!n||!e.startsWith(\"hex\")&&\"name\"!==e?(\"rgb\"===e&&(r=this.toRgbString()),\"prgb\"===e&&(r=this.toPercentageRgbString()),\"hex\"!==e&&\"hex6\"!==e||(r=this.toHexString()),\"hex3\"===e&&(r=this.toHexString(!0)),\"hex4\"===e&&(r=this.toHex8String(!0)),\"hex8\"===e&&(r=this.toHex8String()),\"name\"===e&&(r=this.toName()),\"hsl\"===e&&(r=this.toHslString()),\"hsv\"===e&&(r=this.toHsvString()),r||this.toHexString()):\"name\"===e&&0===this.a?this.toName():this.toRgbString()},e.prototype.toNumber=function(){return(Math.round(this.r)__left_angle_mark___left_angle_mark_16)+(Math.round(this.g)__left_angle_mark___left_angle_mark_8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(t){void 0===t&&(t=10);var r=this.toHsl();return r.l+=t/100,r.l=clamp01(r.l),new e(r)},e.prototype.brighten=function(t){void 0===t&&(t=10);var r=this.toRgb();return r.r=Math.max(0,Math.min(255,r.r-Math.round(-t/100*255))),r.g=Math.max(0,Math.min(255,r.g-Math.round(-t/100*255))),r.b=Math.max(0,Math.min(255,r.b-Math.round(-t/100*255))),new e(r)},e.prototype.darken=function(t){void 0===t&&(t=10);var r=this.toHsl();return r.l-=t/100,r.l=clamp01(r.l),new e(r)},e.prototype.tint=function(e){return void 0===e&&(e=10),this.mix(\"white\",e)},e.prototype.shade=function(e){return void 0===e&&(e=10),this.mix(\"black\",e)},e.prototype.desaturate=function(t){void 0===t&&(t=10);var r=this.toHsl();return r.s-=t/100,r.s=clamp01(r.s),new e(r)},e.prototype.saturate=function(t){void 0===t&&(t=10);var r=this.toHsl();return r.s+=t/100,r.s=clamp01(r.s),new e(r)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var r=this.toHsl(),n=(r.h+t)%360;return r.h=n__left_angle_mark_0?360+n:n,new e(r)},e.prototype.mix=function(t,r){void 0===r&&(r=50);var n=this.toRgb(),i=new e(t).toRgb(),o=r/100;return new e({r:(i.r-n.r)*o+n.r,g:(i.g-n.g)*o+n.g,b:(i.b-n.b)*o+n.b,a:(i.a-n.a)*o+n.a})},e.prototype.analogous=function(t,r){void 0===t&&(t=6),void 0===r&&(r=30);var n=this.toHsl(),i=360/r,o=[this];for(n.h=(n.h-(i*t>>1)+720)%360;--t;)n.h=(n.h+i)%360,o.push(new e(n));return o},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){void 0===t&&(t=6);for(var r=this.toHsv(),n=r.h,i=r.s,o=r.v,a=[],s=1/t;t--;)a.push(new e({h:n,s:i,v:o})),o=(o+s)%1;return a},e.prototype.splitcomplement=function(){var t=this.toHsl(),r=t.h;return[this,new e({h:(r+72)%360,s:t.s,l:t.l}),new e({h:(r+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var r=this.toRgb(),n=new e(t).toRgb(),i=r.a+n.a*(1-r.a);return new e({r:(r.r*r.a+n.r*n.a*(1-r.a))/i,g:(r.g*r.a+n.g*n.a*(1-r.a))/i,b:(r.b*r.a+n.b*n.a*(1-r.a))/i,a:i})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(t){for(var r=this.toHsl(),n=r.h,i=[this],o=360/t,a=1;a__left_angle_mark_t;a++)i.push(new e({h:(n+a*o)%360,s:r.s,l:r.l}));return i},e.prototype.equals=function(t){return this.toRgbString()===new e(t).toRgbString()},e}(),hueStep=2,saturationStep=.16,saturationStep2=.05,brightnessStep1=.05,brightnessStep2=.15,lightColorCount=5,darkColorCount=4,darkColorMap=[{index:7,opacity:.15},{index:6,opacity:.25},{index:5,opacity:.3},{index:5,opacity:.45},{index:5,opacity:.65},{index:5,opacity:.85},{index:4,opacity:.9},{index:3,opacity:.95},{index:2,opacity:.97},{index:1,opacity:.98}];function toHsv(e){var t=rgbToHsv(e.r,e.g,e.b);return{h:360*t.h,s:t.s,v:t.v}}function toHex(e){var t=e.r,r=e.g,n=e.b;return\"#\".concat(rgbToHex(t,r,n,!1))}function mix(e,t,r){var n=r/100;return{r:(t.r-e.r)*n+e.r,g:(t.g-e.g)*n+e.g,b:(t.b-e.b)*n+e.b}}function getHue(e,t,r){var n;return(n=Math.round(e.h)>=60&&Math.round(e.h)__left_angle_mark_=240?r?Math.round(e.h)-hueStep*t:Math.round(e.h)+hueStep*t:r?Math.round(e.h)+hueStep*t:Math.round(e.h)-hueStep*t)__left_angle_mark_0?n+=360:n>=360&&(n-=360),n}function getSaturation(e,t,r){return 0===e.h&&0===e.s?e.s:((n=r?e.s-saturationStep*t:t===darkColorCount?e.s+saturationStep:e.s+saturationStep2*t)>1&&(n=1),r&&t===lightColorCount&&n>.1&&(n=.1),n__left_angle_mark_.06&&(n=.06),Number(n.toFixed(2)));var n}function getValue(e,t,r){var n;return(n=r?e.v+brightnessStep1*t:e.v-brightnessStep2*t)>1&&(n=1),Number(n.toFixed(2))}function generate(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=[],n=inputToRGB(e),i=lightColorCount;i>0;i-=1){var o=toHsv(n),a=toHex(inputToRGB({h:getHue(o,i,!0),s:getSaturation(o,i,!0),v:getValue(o,i,!0)}));r.push(a)}r.push(toHex(n));for(var s=1;s__left_angle_mark_=darkColorCount;s+=1){var l=toHsv(n),u=toHex(inputToRGB({h:getHue(l,s),s:getSaturation(l,s),v:getValue(l,s)}));r.push(u)}return\"dark\"===t.theme?darkColorMap.map((function(e){var n=e.index,i=e.opacity;return toHex(mix(inputToRGB(t.backgroundColor||\"#141414\"),inputToRGB(r[n]),100*i))})):r}init_globals();var presetPrimaryColors={\"red\":\"#F5222D\",\"volcano\":\"#FA541C\",\"orange\":\"#FA8C16\",\"gold\":\"#FAAD14\",\"yellow\":\"#FADB14\",\"lime\":\"#A0D911\",\"green\":\"#52C41A\",\"cyan\":\"#13C2C2\",\"blue\":\"#1677FF\",\"geekblue\":\"#2F54EB\",\"purple\":\"#722ED1\",\"magenta\":\"#EB2F96\",\"grey\":\"#666666\"},red=[\"#fff1f0\",\"#ffccc7\",\"#ffa39e\",\"#ff7875\",\"#ff4d4f\",\"#f5222d\",\"#cf1322\",\"#a8071a\",\"#820014\",\"#5c0011\"];red.primary=red[5];var volcano=[\"#fff2e8\",\"#ffd8bf\",\"#ffbb96\",\"#ff9c6e\",\"#ff7a45\",\"#fa541c\",\"#d4380d\",\"#ad2102\",\"#871400\",\"#610b00\"];volcano.primary=volcano[5];var orange=[\"#fff7e6\",\"#ffe7ba\",\"#ffd591\",\"#ffc069\",\"#ffa940\",\"#fa8c16\",\"#d46b08\",\"#ad4e00\",\"#873800\",\"#612500\"];orange.primary=orange[5];var gold=[\"#fffbe6\",\"#fff1b8\",\"#ffe58f\",\"#ffd666\",\"#ffc53d\",\"#faad14\",\"#d48806\",\"#ad6800\",\"#874d00\",\"#613400\"];gold.primary=gold[5];var yellow=[\"#feffe6\",\"#ffffb8\",\"#fffb8f\",\"#fff566\",\"#ffec3d\",\"#fadb14\",\"#d4b106\",\"#ad8b00\",\"#876800\",\"#614700\"];yellow.primary=yellow[5];var lime=[\"#fcffe6\",\"#f4ffb8\",\"#eaff8f\",\"#d3f261\",\"#bae637\",\"#a0d911\",\"#7cb305\",\"#5b8c00\",\"#3f6600\",\"#254000\"];lime.primary=lime[5];var green=[\"#f6ffed\",\"#d9f7be\",\"#b7eb8f\",\"#95de64\",\"#73d13d\",\"#52c41a\",\"#389e0d\",\"#237804\",\"#135200\",\"#092b00\"];green.primary=green[5];var cyan=[\"#e6fffb\",\"#b5f5ec\",\"#87e8de\",\"#5cdbd3\",\"#36cfc9\",\"#13c2c2\",\"#08979c\",\"#006d75\",\"#00474f\",\"#002329\"];cyan.primary=cyan[5];var blue=[\"#e6f4ff\",\"#bae0ff\",\"#91caff\",\"#69b1ff\",\"#4096ff\",\"#1677ff\",\"#0958d9\",\"#003eb3\",\"#002c8c\",\"#001d66\"];blue.primary=blue[5];var geekblue=[\"#f0f5ff\",\"#d6e4ff\",\"#adc6ff\",\"#85a5ff\",\"#597ef7\",\"#2f54eb\",\"#1d39c4\",\"#10239e\",\"#061178\",\"#030852\"];geekblue.primary=geekblue[5];var purple=[\"#f9f0ff\",\"#efdbff\",\"#d3adf7\",\"#b37feb\",\"#9254de\",\"#722ed1\",\"#531dab\",\"#391085\",\"#22075e\",\"#120338\"];purple.primary=purple[5];var magenta=[\"#fff0f6\",\"#ffd6e7\",\"#ffadd2\",\"#ff85c0\",\"#f759ab\",\"#eb2f96\",\"#c41d7f\",\"#9e1068\",\"#780650\",\"#520339\"];magenta.primary=magenta[5];var grey=[\"#a6a6a6\",\"#999999\",\"#8c8c8c\",\"#808080\",\"#737373\",\"#666666\",\"#404040\",\"#1a1a1a\",\"#000000\",\"#000000\"];grey.primary=grey[5];var presetPalettes={red:red,volcano:volcano,orange:orange,gold:gold,yellow:yellow,lime:lime,green:green,cyan:cyan,blue:blue,geekblue:geekblue,purple:purple,magenta:magenta,grey:grey},redDark=[\"#2a1215\",\"#431418\",\"#58181c\",\"#791a1f\",\"#a61d24\",\"#d32029\",\"#e84749\",\"#f37370\",\"#f89f9a\",\"#fac8c3\"];redDark.primary=redDark[5];var volcanoDark=[\"#2b1611\",\"#441d12\",\"#592716\",\"#7c3118\",\"#aa3e19\",\"#d84a1b\",\"#e87040\",\"#f3956a\",\"#f8b692\",\"#fad4bc\"];volcanoDark.primary=volcanoDark[5];var orangeDark=[\"#2b1d11\",\"#442a11\",\"#593815\",\"#7c4a15\",\"#aa6215\",\"#d87a16\",\"#e89a3c\",\"#f3b765\",\"#f8cf8d\",\"#fae3b7\"];orangeDark.primary=orangeDark[5];var goldDark=[\"#2b2111\",\"#443111\",\"#594214\",\"#7c5914\",\"#aa7714\",\"#d89614\",\"#e8b339\",\"#f3cc62\",\"#f8df8b\",\"#faedb5\"];goldDark.primary=goldDark[5];var yellowDark=[\"#2b2611\",\"#443b11\",\"#595014\",\"#7c6e14\",\"#aa9514\",\"#d8bd14\",\"#e8d639\",\"#f3ea62\",\"#f8f48b\",\"#fafab5\"];yellowDark.primary=yellowDark[5];var limeDark=[\"#1f2611\",\"#2e3c10\",\"#3e4f13\",\"#536d13\",\"#6f9412\",\"#8bbb11\",\"#a9d134\",\"#c9e75d\",\"#e4f88b\",\"#f0fab5\"];limeDark.primary=limeDark[5];var greenDark=[\"#162312\",\"#1d3712\",\"#274916\",\"#306317\",\"#3c8618\",\"#49aa19\",\"#6abe39\",\"#8fd460\",\"#b2e58b\",\"#d5f2bb\"];greenDark.primary=greenDark[5];var cyanDark=[\"#112123\",\"#113536\",\"#144848\",\"#146262\",\"#138585\",\"#13a8a8\",\"#33bcb7\",\"#58d1c9\",\"#84e2d8\",\"#b2f1e8\"];cyanDark.primary=cyanDark[5];var blueDark=[\"#111a2c\",\"#112545\",\"#15325b\",\"#15417e\",\"#1554ad\",\"#1668dc\",\"#3c89e8\",\"#65a9f3\",\"#8dc5f8\",\"#b7dcfa\"];blueDark.primary=blueDark[5];var geekblueDark=[\"#131629\",\"#161d40\",\"#1c2755\",\"#203175\",\"#263ea0\",\"#2b4acb\",\"#5273e0\",\"#7f9ef3\",\"#a8c1f8\",\"#d2e0fa\"];geekblueDark.primary=geekblueDark[5];var purpleDark=[\"#1a1325\",\"#24163a\",\"#301c4d\",\"#3e2069\",\"#51258f\",\"#642ab5\",\"#854eca\",\"#ab7ae0\",\"#cda8f0\",\"#ebd7fa\"];purpleDark.primary=purpleDark[5];var magentaDark=[\"#291321\",\"#40162f\",\"#551c3b\",\"#75204f\",\"#a02669\",\"#cb2b83\",\"#e0529c\",\"#f37fb7\",\"#f8a8cc\",\"#fad2e3\"];magentaDark.primary=magentaDark[5];var greyDark=[\"#151515\",\"#1f1f1f\",\"#2d2d2d\",\"#393939\",\"#494949\",\"#5a5a5a\",\"#6a6a6a\",\"#7b7b7b\",\"#888888\",\"#969696\"];function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function _objectSpread2(e){for(var t=1;t__left_angle_mark_arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(r),!0).forEach((function(t){_defineProperty(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ownKeys(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}greyDark.primary=greyDark[5],init_globals(),init_globals(),init_globals();var React2=__toESM(require_react());function canUseDom(){return!(\"undefined\"==typeof window||!window.document||!window.document.createElement)}function contains(e,t){if(!e)return!1;if(e.contains)return e.contains(t);for(var r=t;r;){if(r===e)return!0;r=r.parentNode}return!1}init_globals(),init_globals(),init_globals(),init_globals();var APPEND_ORDER=\"data-rc-order\",APPEND_PRIORITY=\"data-rc-priority\",MARK_KEY=\"rc-util-key\",containerCache=new Map;function getMark(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).mark;return e?e.startsWith(\"data-\")?e:\"data-\".concat(e):MARK_KEY}function getContainer(e){return e.attachTo?e.attachTo:document.querySelector(\"head\")||document.body}function getOrder(e){return\"queue\"===e?\"prependQueue\":e?\"prepend\":\"append\"}function findStyles(e){return Array.from((containerCache.get(e)||e).children).filter((function(e){return\"STYLE\"===e.tagName}))}function injectCSS(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!canUseDom())return null;var r=t.csp,n=t.prepend,i=t.priority,o=void 0===i?0:i,a=getOrder(n),s=\"prependQueue\"===a,l=document.createElement(\"style\");l.setAttribute(APPEND_ORDER,a),s&&o&&l.setAttribute(APPEND_PRIORITY,\"\".concat(o)),null!=r&&r.nonce&&(l.nonce=null==r?void 0:r.nonce),l.innerHTML=e;var u=getContainer(t),c=u.firstChild;if(n){if(s){var d=(t.styles||findStyles(u)).filter((function(e){if(![\"prepend\",\"prependQueue\"].includes(e.getAttribute(APPEND_ORDER)))return!1;var t=Number(e.getAttribute(APPEND_PRIORITY)||0);return o>=t}));if(d.length)return u.insertBefore(l,d[d.length-1].nextSibling),l}u.insertBefore(l,c)}else u.appendChild(l);return l}function findExistNode(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=getContainer(t);return(t.styles||findStyles(r)).find((function(r){return r.getAttribute(getMark(t))===e}))}function removeCSS(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=findExistNode(e,t);r&&getContainer(t).removeChild(r)}function syncRealContainer(e,t){var r=containerCache.get(e);if(!r||!contains(document,r)){var n=injectCSS(\"\",t),i=n.parentNode;containerCache.set(e,i),e.removeChild(n)}}function updateCSS(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=getContainer(r),i=findStyles(n),o=_objectSpread2(_objectSpread2({},r),{},{styles:i});syncRealContainer(n,o);var a,s,l,u=findExistNode(t,o);if(u)return null!==(a=o.csp)&&void 0!==a&&a.nonce&&u.nonce!==(null===(s=o.csp)||void 0===s?void 0:s.nonce)&&(u.nonce=null===(l=o.csp)||void 0===l?void 0:l.nonce),u.innerHTML!==e&&(u.innerHTML=e),u;var c=injectCSS(e,o);return c.setAttribute(getMark(o),t),c}function getRoot(e){var t;return null==e||null===(t=e.getRootNode)||void 0===t?void 0:t.call(e)}function inShadow(e){return getRoot(e)instanceof ShadowRoot}function getShadowRoot(e){return inShadow(e)?getRoot(e):null}init_globals(),init_globals();var warned={},preWarningFns=[],preMessage=function(e){preWarningFns.push(e)};function warning(e,t){if(!e&&void 0!==import_console_browserify.default){var r=preWarningFns.reduce((function(e,t){return t(null!=e?e:\"\",\"warning\")}),t);r&&import_console_browserify.default.error(\"Warning: \".concat(r))}}function note(e,t){if(!e&&void 0!==import_console_browserify.default){var r=preWarningFns.reduce((function(e,t){return t(null!=e?e:\"\",\"note\")}),t);r&&import_console_browserify.default.warn(\"Note: \".concat(r))}}function resetWarned(){warned={}}function call(e,t,r){t||warned[r]||(e(!1,r),warned[r]=!0)}function warningOnce(e,t){call(warning,e,t)}function noteOnce(e,t){call(note,e,t)}warningOnce.preMessage=preMessage,warningOnce.resetWarned=resetWarned,warningOnce.noteOnce=noteOnce;var warning_default=warningOnce,import_react2=__toESM(require_react());function camelCase(e){return e.replace(/-(.)/g,(function(e,t){return t.toUpperCase()}))}function warning2(e,t){warning_default(e,\"[@ant-design/icons] \".concat(t))}function isIconDefinition(e){return\"object\"===_typeof(e)&&\"string\"==typeof e.name&&\"string\"==typeof e.theme&&(\"object\"===_typeof(e.icon)||\"function\"==typeof e.icon)}function normalizeAttrs(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.keys(e).reduce((function(t,r){var n=e[r];return\"class\"===r?(t.className=n,delete t.class):(delete t[r],t[camelCase(r)]=n),t}),{})}function generate2(e,t,r){return r?import_react2.default.createElement(e.tag,_objectSpread2(_objectSpread2({key:t},normalizeAttrs(e.attrs)),r),(e.children||[]).map((function(r,n){return generate2(r,\"\".concat(t,\"-\").concat(e.tag,\"-\").concat(n))}))):import_react2.default.createElement(e.tag,_objectSpread2({key:t},normalizeAttrs(e.attrs)),(e.children||[]).map((function(r,n){return generate2(r,\"\".concat(t,\"-\").concat(e.tag,\"-\").concat(n))})))}function getSecondaryColor(e){return generate(e)[0]}function normalizeTwoToneColors(e){return e?Array.isArray(e)?e:[e]:[]}var iconStyles=\"\\n.anticon {\\n display: inline-flex;\\n align-items: center;\\n color: inherit;\\n font-style: normal;\\n line-height: 0;\\n text-align: center;\\n text-transform: none;\\n vertical-align: -0.125em;\\n text-rendering: optimizeLegibility;\\n -webkit-font-smoothing: antialiased;\\n -moz-osx-font-smoothing: grayscale;\\n}\\n\\n.anticon > * {\\n line-height: 1;\\n}\\n\\n.anticon svg {\\n display: inline-block;\\n}\\n\\n.anticon::before {\\n display: none;\\n}\\n\\n.anticon .anticon-icon {\\n display: block;\\n}\\n\\n.anticon[tabindex] {\\n cursor: pointer;\\n}\\n\\n.anticon-spin::before,\\n.anticon-spin {\\n display: inline-block;\\n -webkit-animation: loadingCircle 1s infinite linear;\\n animation: loadingCircle 1s infinite linear;\\n}\\n\\n@-webkit-keyframes loadingCircle {\\n 100% {\\n -webkit-transform: rotate(360deg);\\n transform: rotate(360deg);\\n }\\n}\\n\\n@keyframes loadingCircle {\\n 100% {\\n -webkit-transform: rotate(360deg);\\n transform: rotate(360deg);\\n }\\n}\\n\",useInsertStyles=function(e){var t=(0,import_react2.useContext)(Context_default),r=t.csp,n=t.prefixCls,i=iconStyles;n&&(i=i.replace(/anticon/g,n)),(0,import_react2.useEffect)((function(){var t=getShadowRoot(e.current);updateCSS(i,\"@ant-design-icons\",{prepend:!0,csp:r,attachTo:t})}),[])},_excluded=[\"icon\",\"className\",\"onClick\",\"style\",\"primaryColor\",\"secondaryColor\"],twoToneColorPalette={primaryColor:\"#333\",secondaryColor:\"#E6E6E6\",calculated:!1};function setTwoToneColors(e){var t=e.primaryColor,r=e.secondaryColor;twoToneColorPalette.primaryColor=t,twoToneColorPalette.secondaryColor=r||getSecondaryColor(t),twoToneColorPalette.calculated=!!r}function getTwoToneColors(){return _objectSpread2({},twoToneColorPalette)}var IconBase=function(e){var t=e.icon,r=e.className,n=e.onClick,i=e.style,o=e.primaryColor,a=e.secondaryColor,s=_objectWithoutProperties(e,_excluded),l=React2.useRef(),u=twoToneColorPalette;if(o&&(u={primaryColor:o,secondaryColor:a||getSecondaryColor(o)}),useInsertStyles(l),warning2(isIconDefinition(t),\"icon should be icon definiton, but got \".concat(t)),!isIconDefinition(t))return null;var c=t;return c&&\"function\"==typeof c.icon&&(c=_objectSpread2(_objectSpread2({},c),{},{icon:c.icon(u.primaryColor,u.secondaryColor)})),generate2(c.icon,\"svg-\".concat(c.name),_objectSpread2(_objectSpread2({className:r,onClick:n,style:i,\"data-icon\":c.name,width:\"1em\",height:\"1em\",fill:\"currentColor\",\"aria-hidden\":\"true\"},s),{},{ref:l}))};IconBase.displayName=\"IconReact\",IconBase.getTwoToneColors=getTwoToneColors,IconBase.setTwoToneColors=setTwoToneColors;var IconBase_default=IconBase;function setTwoToneColor(e){var t=_slicedToArray(normalizeTwoToneColors(e),2),r=t[0],n=t[1];return IconBase_default.setTwoToneColors({primaryColor:r,secondaryColor:n})}function getTwoToneColor(){var e=IconBase_default.getTwoToneColors();return e.calculated?[e.primaryColor,e.secondaryColor]:e.primaryColor}init_globals();var _excluded2=[\"className\",\"icon\",\"spin\",\"rotate\",\"tabIndex\",\"onClick\",\"twoToneColor\"];setTwoToneColor(blue.primary);var Icon=React3.forwardRef((function(e,t){var r=e.className,n=e.icon,i=e.spin,o=e.rotate,a=e.tabIndex,s=e.onClick,l=e.twoToneColor,u=_objectWithoutProperties(e,_excluded2),c=React3.useContext(Context_default),d=c.prefixCls,h=void 0===d?\"anticon\":d,f=c.rootClassName,p=(0,import_classnames.default)(f,h,_defineProperty(_defineProperty({},\"\".concat(h,\"-\").concat(n.name),!!n.name),\"\".concat(h,\"-spin\"),!!i||\"loading\"===n.name),r),m=a;void 0===m&&s&&(m=-1);var g=o?{msTransform:\"rotate(\".concat(o,\"deg)\"),transform:\"rotate(\".concat(o,\"deg)\")}:void 0,_=_slicedToArray(normalizeTwoToneColors(l),2),b=_[0],y=_[1];return React3.createElement(\"span\",_extends({role:\"img\",\"aria-label\":n.name},u,{ref:t,tabIndex:m,onClick:s,className:p}),React3.createElement(IconBase_default,{icon:n,primaryColor:b,secondaryColor:y,style:g}))}));Icon.displayName=\"AntdIcon\",Icon.getTwoToneColor=getTwoToneColor,Icon.setTwoToneColor=setTwoToneColor;var AntdIcon_default=Icon;init_globals();var React4=__toESM(require_react());init_globals();var ArrowRightOutlined={\"icon\":{\"tag\":\"svg\",\"attrs\":{\"viewBox\":\"64 64 896 896\",\"focusable\":\"false\"},\"children\":[{\"tag\":\"path\",\"attrs\":{\"d\":\"M869 487.8L491.2 159.9c-2.9-2.5-6.6-3.9-10.5-3.9h-88.5c-7.4 0-10.8 9.2-5.2 14l350.2 304H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h585.1L386.9 854c-5.6 4.9-2.2 14 5.2 14h91.5c1.9 0 3.8-.7 5.2-2L869 536.2a32.07 32.07 0 000-48.4z\"}}]},\"name\":\"arrow-right\",\"theme\":\"outlined\"},ArrowRightOutlined_default=ArrowRightOutlined,ArrowRightOutlined2=function(e,t){return React4.createElement(AntdIcon_default,_extends({},e,{ref:t,icon:ArrowRightOutlined_default}))},RefIcon=React4.forwardRef(ArrowRightOutlined2);RefIcon.displayName=\"ArrowRightOutlined\";var ArrowRightOutlined_default2=RefIcon;init_globals();var BarsOutlined={\"icon\":{\"tag\":\"svg\",\"attrs\":{\"viewBox\":\"0 0 1024 1024\",\"focusable\":\"false\"},\"children\":[{\"tag\":\"path\",\"attrs\":{\"d\":\"M912 192H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM104 228a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0z\"}}]},\"name\":\"bars\",\"theme\":\"outlined\"},BarsOutlined_default=BarsOutlined;init_globals();var React5=__toESM(require_react());init_globals();var CameraOutlined={\"icon\":{\"tag\":\"svg\",\"attrs\":{\"viewBox\":\"64 64 896 896\",\"focusable\":\"false\"},\"children\":[{\"tag\":\"path\",\"attrs\":{\"d\":\"M864 248H728l-32.4-90.8a32.07 32.07 0 00-30.2-21.2H358.6c-13.5 0-25.6 8.5-30.1 21.2L296 248H160c-44.2 0-80 35.8-80 80v456c0 44.2 35.8 80 80 80h704c44.2 0 80-35.8 80-80V328c0-44.2-35.8-80-80-80zm8 536c0 4.4-3.6 8-8 8H160c-4.4 0-8-3.6-8-8V328c0-4.4 3.6-8 8-8h186.7l17.1-47.8 22.9-64.2h250.5l22.9 64.2 17.1 47.8H864c4.4 0 8 3.6 8 8v456zM512 384c-88.4 0-160 71.6-160 160s71.6 160 160 160 160-71.6 160-160-71.6-160-160-160zm0 256c-53 0-96-43-96-96s43-96 96-96 96 43 96 96-43 96-96 96z\"}}]},\"name\":\"camera\",\"theme\":\"outlined\"},CameraOutlined_default=CameraOutlined,CameraOutlined2=function(e,t){return React5.createElement(AntdIcon_default,_extends({},e,{ref:t,icon:CameraOutlined_default}))},RefIcon2=React5.forwardRef(CameraOutlined2);RefIcon2.displayName=\"CameraOutlined\";var CameraOutlined_default2=RefIcon2;init_globals();var React6=__toESM(require_react());init_globals();var CaretRightOutlined={\"icon\":{\"tag\":\"svg\",\"attrs\":{\"viewBox\":\"0 0 1024 1024\",\"focusable\":\"false\"},\"children\":[{\"tag\":\"path\",\"attrs\":{\"d\":\"M715.8 493.5L335 165.1c-14.2-12.2-35-1.2-35 18.5v656.8c0 19.7 20.8 30.7 35 18.5l380.8-328.4c10.9-9.4 10.9-27.6 0-37z\"}}]},\"name\":\"caret-right\",\"theme\":\"outlined\"},CaretRightOutlined_default=CaretRightOutlined,CaretRightOutlined2=function(e,t){return React6.createElement(AntdIcon_default,_extends({},e,{ref:t,icon:CaretRightOutlined_default}))},RefIcon3=React6.forwardRef(CaretRightOutlined2);RefIcon3.displayName=\"CaretRightOutlined\";var CaretRightOutlined_default2=RefIcon3;init_globals();var CheckCircleFilled={\"icon\":{\"tag\":\"svg\",\"attrs\":{\"viewBox\":\"64 64 896 896\",\"focusable\":\"false\"},\"children\":[{\"tag\":\"path\",\"attrs\":{\"d\":\"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z\"}}]},\"name\":\"check-circle\",\"theme\":\"filled\"},CheckCircleFilled_default=CheckCircleFilled;init_globals();var React7=__toESM(require_react());init_globals();var CheckOutlined={\"icon\":{\"tag\":\"svg\",\"attrs\":{\"viewBox\":\"64 64 896 896\",\"focusable\":\"false\"},\"children\":[{\"tag\":\"path\",\"attrs\":{\"d\":\"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z\"}}]},\"name\":\"check\",\"theme\":\"outlined\"},CheckOutlined_default=CheckOutlined,CheckOutlined2=function(e,t){return React7.createElement(AntdIcon_default,_extends({},e,{ref:t,icon:CheckOutlined_default}))},RefIcon4=React7.forwardRef(CheckOutlined2);RefIcon4.displayName=\"CheckOutlined\";var CheckOutlined_default2=RefIcon4;init_globals();var React8=__toESM(require_react());init_globals();var ClockCircleOutlined={\"icon\":{\"tag\":\"svg\",\"attrs\":{\"viewBox\":\"64 64 896 896\",\"focusable\":\"false\"},\"children\":[{\"tag\":\"path\",\"attrs\":{\"d\":\"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z\"}},{\"tag\":\"path\",\"attrs\":{\"d\":\"M686.7 638.6L544.1 535.5V288c0-4.4-3.6-8-8-8H488c-4.4 0-8 3.6-8 8v275.4c0 2.6 1.2 5 3.3 6.5l165.4 120.6c3.6 2.6 8.6 1.8 11.2-1.7l28.6-39c2.6-3.7 1.8-8.7-1.8-11.2z\"}}]},\"name\":\"clock-circle\",\"theme\":\"outlined\"},ClockCircleOutlined_default=ClockCircleOutlined,ClockCircleOutlined2=function(e,t){return React8.createElement(AntdIcon_default,_extends({},e,{ref:t,icon:ClockCircleOutlined_default}))},RefIcon5=React8.forwardRef(ClockCircleOutlined2);RefIcon5.displayName=\"ClockCircleOutlined\";var ClockCircleOutlined_default2=RefIcon5;init_globals();var CloseCircleFilled={\"icon\":{\"tag\":\"svg\",\"attrs\":{\"fill-rule\":\"evenodd\",\"viewBox\":\"64 64 896 896\",\"focusable\":\"false\"},\"children\":[{\"tag\":\"path\",\"attrs\":{\"d\":\"M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z\"}}]},\"name\":\"close-circle\",\"theme\":\"filled\"},CloseCircleFilled_default=CloseCircleFilled;init_globals();var React9=__toESM(require_react());init_globals();var CloseOutlined={\"icon\":{\"tag\":\"svg\",\"attrs\":{\"fill-rule\":\"evenodd\",\"viewBox\":\"64 64 896 896\",\"focusable\":\"false\"},\"children\":[{\"tag\":\"path\",\"attrs\":{\"d\":\"M799.86 166.31c.02 0 .04.02.08.06l57.69 57.7c.04.03.05.05.06.08a.12.12 0 010 .06c0 .03-.02.05-.06.09L569.93 512l287.7 287.7c.04.04.05.06.06.09a.12.12 0 010 .07c0 .02-.02.04-.06.08l-57.7 57.69c-.03.04-.05.05-.07.06a.12.12 0 01-.07 0c-.03 0-.05-.02-.09-.06L512 569.93l-287.7 287.7c-.04.04-.06.05-.09.06a.12.12 0 01-.07 0c-.02 0-.04-.02-.08-.06l-57.69-57.7c-.04-.03-.05-.05-.06-.07a.12.12 0 010-.07c0-.03.02-.05.06-.09L454.07 512l-287.7-287.7c-.04-.04-.05-.06-.06-.09a.12.12 0 010-.07c0-.02.02-.04.06-.08l57.7-57.69c.03-.04.05-.05.07-.06a.12.12 0 01.07 0c.03 0 .05.02.09.06L512 454.07l287.7-287.7c.04-.04.06-.05.09-.06a.12.12 0 01.07 0z\"}}]},\"name\":\"close\",\"theme\":\"outlined\"},CloseOutlined_default=CloseOutlined,CloseOutlined2=function(e,t){return React9.createElement(AntdIcon_default,_extends({},e,{ref:t,icon:CloseOutlined_default}))},RefIcon6=React9.forwardRef(CloseOutlined2);RefIcon6.displayName=\"CloseOutlined\";var CloseOutlined_default2=RefIcon6;init_globals();var DeleteOutlined={\"icon\":{\"tag\":\"svg\",\"attrs\":{\"viewBox\":\"64 64 896 896\",\"focusable\":\"false\"},\"children\":[{\"tag\":\"path\",\"attrs\":{\"d\":\"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z\"}}]},\"name\":\"delete\",\"theme\":\"outlined\"},DeleteOutlined_default=DeleteOutlined;init_globals();var React10=__toESM(require_react());init_globals();var DownOutlined={\"icon\":{\"tag\":\"svg\",\"attrs\":{\"viewBox\":\"64 64 896 896\",\"focusable\":\"false\"},\"children\":[{\"tag\":\"path\",\"attrs\":{\"d\":\"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z\"}}]},\"name\":\"down\",\"theme\":\"outlined\"},DownOutlined_default=DownOutlined,DownOutlined2=function(e,t){return React10.createElement(AntdIcon_default,_extends({},e,{ref:t,icon:DownOutlined_default}))},RefIcon7=React10.forwardRef(DownOutlined2);RefIcon7.displayName=\"DownOutlined\";var DownOutlined_default2=RefIcon7;init_globals();var React11=__toESM(require_react());init_globals();var DownloadOutlined={\"icon\":{\"tag\":\"svg\",\"attrs\":{\"viewBox\":\"64 64 896 896\",\"focusable\":\"false\"},\"children\":[{\"tag\":\"path\",\"attrs\":{\"d\":\"M505.7 661a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z\"}}]},\"name\":\"download\",\"theme\":\"outlined\"},DownloadOutlined_default=DownloadOutlined,DownloadOutlined2=function(e,t){return React11.createElement(AntdIcon_default,_extends({},e,{ref:t,icon:DownloadOutlined_default}))},RefIcon8=React11.forwardRef(DownloadOutlined2);RefIcon8.displayName=\"DownloadOutlined\";var DownloadOutlined_default2=RefIcon8;init_globals();var EllipsisOutlined={\"icon\":{\"tag\":\"svg\",\"attrs\":{\"viewBox\":\"64 64 896 896\",\"focusable\":\"false\"},\"children\":[{\"tag\":\"path\",\"attrs\":{\"d\":\"M176 511a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0z\"}}]},\"name\":\"ellipsis\",\"theme\":\"outlined\"},EllipsisOutlined_default=EllipsisOutlined;init_globals();var ExclamationCircleFilled={\"icon\":{\"tag\":\"svg\",\"attrs\":{\"viewBox\":\"64 64 896 896\",\"focusable\":\"false\"},\"children\":[{\"tag\":\"path\",\"attrs\":{\"d\":\"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z\"}}]},\"name\":\"exclamation-circle\",\"theme\":\"filled\"},ExclamationCircleFilled_default=ExclamationCircleFilled;init_globals();var EyeInvisibleOutlined={\"icon\":{\"tag\":\"svg\",\"attrs\":{\"viewBox\":\"64 64 896 896\",\"focusable\":\"false\"},\"children\":[{\"tag\":\"path\",\"attrs\":{\"d\":\"M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z\"}},{\"tag\":\"path\",\"attrs\":{\"d\":\"M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z\"}}]},\"name\":\"eye-invisible\",\"theme\":\"outlined\"},EyeInvisibleOutlined_default=EyeInvisibleOutlined;init_globals();var EyeOutlined={\"icon\":{\"tag\":\"svg\",\"attrs\":{\"viewBox\":\"64 64 896 896\",\"focusable\":\"false\"},\"children\":[{\"tag\":\"path\",\"attrs\":{\"d\":\"M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z\"}}]},\"name\":\"eye\",\"theme\":\"outlined\"},EyeOutlined_default=EyeOutlined;init_globals();var React12=__toESM(require_react());init_globals();var FileTextOutlined={\"icon\":{\"tag\":\"svg\",\"attrs\":{\"viewBox\":\"64 64 896 896\",\"focusable\":\"false\"},\"children\":[{\"tag\":\"path\",\"attrs\":{\"d\":\"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494zM504 618H320c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM312 490v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H320c-4.4 0-8 3.6-8 8z\"}}]},\"name\":\"file-text\",\"theme\":\"outlined\"},FileTextOutlined_default=FileTextOutlined,FileTextOutlined2=function(e,t){return React12.createElement(AntdIcon_default,_extends({},e,{ref:t,icon:FileTextOutlined_default}))},RefIcon9=React12.forwardRef(FileTextOutlined2);RefIcon9.displayName=\"FileTextOutlined\";var FileTextOutlined_default2=RefIcon9;init_globals();var FileTwoTone={\"icon\":function(e,t){return{\"tag\":\"svg\",\"attrs\":{\"viewBox\":\"64 64 896 896\",\"focusable\":\"false\"},\"children\":[{\"tag\":\"path\",\"attrs\":{\"d\":\"M534 352V136H232v752h560V394H576a42 42 0 01-42-42z\",\"fill\":t}},{\"tag\":\"path\",\"attrs\":{\"d\":\"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM602 137.8L790.2 326H602V137.8zM792 888H232V136h302v216a42 42 0 0042 42h216v494z\",\"fill\":e}}]}},\"name\":\"file\",\"theme\":\"twotone\"},FileTwoTone_default=FileTwoTone;init_globals();var InfoCircleFilled={\"icon\":{\"tag\":\"svg\",\"attrs\":{\"viewBox\":\"64 64 896 896\",\"focusable\":\"false\"},\"children\":[{\"tag\":\"path\",\"attrs\":{\"d\":\"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 010-96 48.01 48.01 0 010 96z\"}}]},\"name\":\"info-circle\",\"theme\":\"filled\"},InfoCircleFilled_default=InfoCircleFilled;init_globals();var LeftOutlined={\"icon\":{\"tag\":\"svg\",\"attrs\":{\"viewBox\":\"64 64 896 896\",\"focusable\":\"false\"},\"children\":[{\"tag\":\"path\",\"attrs\":{\"d\":\"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z\"}}]},\"name\":\"left\",\"theme\":\"outlined\"},LeftOutlined_default=LeftOutlined;init_globals();var React13=__toESM(require_react());init_globals();var LoadingOutlined={\"icon\":{\"tag\":\"svg\",\"attrs\":{\"viewBox\":\"0 0 1024 1024\",\"focusable\":\"false\"},\"children\":[{\"tag\":\"path\",\"attrs\":{\"d\":\"M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z\"}}]},\"name\":\"loading\",\"theme\":\"outlined\"},LoadingOutlined_default=LoadingOutlined,LoadingOutlined2=function(e,t){return React13.createElement(AntdIcon_default,_extends({},e,{ref:t,icon:LoadingOutlined_default}))},RefIcon10=React13.forwardRef(LoadingOutlined2);RefIcon10.displayName=\"LoadingOutlined\";var LoadingOutlined_default2=RefIcon10;init_globals();var React14=__toESM(require_react());init_globals();var LogoutOutlined={\"icon\":{\"tag\":\"svg\",\"attrs\":{\"viewBox\":\"64 64 896 896\",\"focusable\":\"false\"},\"children\":[{\"tag\":\"path\",\"attrs\":{\"d\":\"M868 732h-70.3c-4.8 0-9.3 2.1-12.3 5.8-7 8.5-14.5 16.7-22.4 24.5a353.84 353.84 0 01-112.7 75.9A352.8 352.8 0 01512.4 866c-47.9 0-94.3-9.4-137.9-27.8a353.84 353.84 0 01-112.7-75.9 353.28 353.28 0 01-76-112.5C167.3 606.2 158 559.9 158 512s9.4-94.2 27.8-137.8c17.8-42.1 43.4-80 76-112.5s70.5-58.1 112.7-75.9c43.6-18.4 90-27.8 137.9-27.8 47.9 0 94.3 9.3 137.9 27.8 42.2 17.8 80.1 43.4 112.7 75.9 7.9 7.9 15.3 16.1 22.4 24.5 3 3.7 7.6 5.8 12.3 5.8H868c6.3 0 10.2-7 6.7-12.3C798 160.5 663.8 81.6 511.3 82 271.7 82.6 79.6 277.1 82 516.4 84.4 751.9 276.2 942 512.4 942c152.1 0 285.7-78.8 362.3-197.7 3.4-5.3-.4-12.3-6.7-12.3zm88.9-226.3L815 393.7c-5.3-4.2-13-.4-13 6.3v76H488c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h314v76c0 6.7 7.8 10.5 13 6.3l141.9-112a8 8 0 000-12.6z\"}}]},\"name\":\"logout\",\"theme\":\"outlined\"},LogoutOutlined_default=LogoutOutlined,LogoutOutlined2=function(e,t){return React14.createElement(AntdIcon_default,_extends({},e,{ref:t,icon:LogoutOutlined_default}))},RefIcon11=React14.forwardRef(LogoutOutlined2);RefIcon11.displayName=\"LogoutOutlined\";var LogoutOutlined_default2=RefIcon11;init_globals();var React15=__toESM(require_react());init_globals();var MessageOutlined={\"icon\":{\"tag\":\"svg\",\"attrs\":{\"viewBox\":\"64 64 896 896\",\"focusable\":\"false\"},\"children\":[{\"tag\":\"path\",\"attrs\":{\"d\":\"M464 512a48 48 0 1096 0 48 48 0 10-96 0zm200 0a48 48 0 1096 0 48 48 0 10-96 0zm-400 0a48 48 0 1096 0 48 48 0 10-96 0zm661.2-173.6c-22.6-53.7-55-101.9-96.3-143.3a444.35 444.35 0 00-143.3-96.3C630.6 75.7 572.2 64 512 64h-2c-60.6.3-119.3 12.3-174.5 35.9a445.35 445.35 0 00-142 96.5c-40.9 41.3-73 89.3-95.2 142.8-23 55.4-34.6 114.3-34.3 174.9A449.4 449.4 0 00112 714v152a46 46 0 0046 46h152.1A449.4 449.4 0 00510 960h2.1c59.9 0 118-11.6 172.7-34.3a444.48 444.48 0 00142.8-95.2c41.3-40.9 73.8-88.7 96.5-142 23.6-55.2 35.6-113.9 35.9-174.5.3-60.9-11.5-120-34.8-175.6zm-151.1 438C704 845.8 611 884 512 884h-1.7c-60.3-.3-120.2-15.3-173.1-43.5l-8.4-4.5H188V695.2l-4.5-8.4C155.3 633.9 140.3 574 140 513.7c-.4-99.7 37.7-193.3 107.6-263.8 69.8-70.5 163.1-109.5 262.8-109.9h1.7c50 0 98.5 9.7 144.2 28.9 44.6 18.7 84.6 45.6 119 80 34.3 34.3 61.3 74.4 80 119 19.4 46.2 29.1 95.2 28.9 145.8-.6 99.6-39.7 192.9-110.1 262.7z\"}}]},\"name\":\"message\",\"theme\":\"outlined\"},MessageOutlined_default=MessageOutlined,MessageOutlined2=function(e,t){return React15.createElement(AntdIcon_default,_extends({},e,{ref:t,icon:MessageOutlined_default}))},RefIcon12=React15.forwardRef(MessageOutlined2);RefIcon12.displayName=\"MessageOutlined\";var MessageOutlined_default2=RefIcon12;init_globals();var React16=__toESM(require_react());init_globals();var MinusOutlined={\"icon\":{\"tag\":\"svg\",\"attrs\":{\"viewBox\":\"64 64 896 896\",\"focusable\":\"false\"},\"children\":[{\"tag\":\"path\",\"attrs\":{\"d\":\"M872 474H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h720c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z\"}}]},\"name\":\"minus\",\"theme\":\"outlined\"},MinusOutlined_default=MinusOutlined,MinusOutlined2=function(e,t){return React16.createElement(AntdIcon_default,_extends({},e,{ref:t,icon:MinusOutlined_default}))},RefIcon13=React16.forwardRef(MinusOutlined2);RefIcon13.displayName=\"MinusOutlined\";var MinusOutlined_default2=RefIcon13;init_globals();var PaperClipOutlined={\"icon\":{\"tag\":\"svg\",\"attrs\":{\"viewBox\":\"64 64 896 896\",\"focusable\":\"false\"},\"children\":[{\"tag\":\"path\",\"attrs\":{\"d\":\"M779.3 196.6c-94.2-94.2-247.6-94.2-341.7 0l-261 260.8c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l261-260.8c32.4-32.4 75.5-50.2 121.3-50.2s88.9 17.8 121.2 50.2c32.4 32.4 50.2 75.5 50.2 121.2 0 45.8-17.8 88.8-50.2 121.2l-266 265.9-43.1 43.1c-40.3 40.3-105.8 40.3-146.1 0-19.5-19.5-30.2-45.4-30.2-73s10.7-53.5 30.2-73l263.9-263.8c6.7-6.6 15.5-10.3 24.9-10.3h.1c9.4 0 18.1 3.7 24.7 10.3 6.7 6.7 10.3 15.5 10.3 24.9 0 9.3-3.7 18.1-10.3 24.7L372.4 653c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l215.6-215.6c19.9-19.9 30.8-46.3 30.8-74.4s-11-54.6-30.8-74.4c-41.1-41.1-107.9-41-149 0L463 364 224.8 602.1A172.22 172.22 0 00174 724.8c0 46.3 18.1 89.8 50.8 122.5 33.9 33.8 78.3 50.7 122.7 50.7 44.4 0 88.8-16.9 122.6-50.7l309.2-309C824.8 492.7 850 432 850 367.5c.1-64.6-25.1-125.3-70.7-170.9z\"}}]},\"name\":\"paper-clip\",\"theme\":\"outlined\"},PaperClipOutlined_default=PaperClipOutlined;init_globals();var PictureTwoTone={\"icon\":function(e,t){return{\"tag\":\"svg\",\"attrs\":{\"viewBox\":\"64 64 896 896\",\"focusable\":\"false\"},\"children\":[{\"tag\":\"path\",\"attrs\":{\"d\":\"M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 632H136v-39.9l138.5-164.3 150.1 178L658.1 489 888 761.6V792zm0-129.8L664.2 396.8c-3.2-3.8-9-3.8-12.2 0L424.6 666.4l-144-170.7c-3.2-3.8-9-3.8-12.2 0L136 652.7V232h752v430.2z\",\"fill\":e}},{\"tag\":\"path\",\"attrs\":{\"d\":\"M424.6 765.8l-150.1-178L136 752.1V792h752v-30.4L658.1 489z\",\"fill\":t}},{\"tag\":\"path\",\"attrs\":{\"d\":\"M136 652.7l132.4-157c3.2-3.8 9-3.8 12.2 0l144 170.7L652 396.8c3.2-3.8 9-3.8 12.2 0L888 662.2V232H136v420.7zM304 280a88 88 0 110 176 88 88 0 010-176z\",\"fill\":t}},{\"tag\":\"path\",\"attrs\":{\"d\":\"M276 368a28 28 0 1056 0 28 28 0 10-56 0z\",\"fill\":t}},{\"tag\":\"path\",\"attrs\":{\"d\":\"M304 456a88 88 0 100-176 88 88 0 000 176zm0-116c15.5 0 28 12.5 28 28s-12.5 28-28 28-28-12.5-28-28 12.5-28 28-28z\",\"fill\":e}}]}},\"name\":\"picture\",\"theme\":\"twotone\"},PictureTwoTone_default=PictureTwoTone;init_globals();var React17=__toESM(require_react());init_globals();var PlayCircleOutlined={\"icon\":{\"tag\":\"svg\",\"attrs\":{\"viewBox\":\"64 64 896 896\",\"focusable\":\"false\"},\"children\":[{\"tag\":\"path\",\"attrs\":{\"d\":\"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z\"}},{\"tag\":\"path\",\"attrs\":{\"d\":\"M719.4 499.1l-296.1-215A15.9 15.9 0 00398 297v430c0 13.1 14.8 20.5 25.3 12.9l296.1-215a15.9 15.9 0 000-25.8zm-257.6 134V390.9L628.5 512 461.8 633.1z\"}}]},\"name\":\"play-circle\",\"theme\":\"outlined\"},PlayCircleOutlined_default=PlayCircleOutlined,PlayCircleOutlined2=function(e,t){return React17.createElement(AntdIcon_default,_extends({},e,{ref:t,icon:PlayCircleOutlined_default}))},RefIcon14=React17.forwardRef(PlayCircleOutlined2);RefIcon14.displayName=\"PlayCircleOutlined\";var PlayCircleOutlined_default2=RefIcon14;init_globals();var QuestionCircleOutlined={\"icon\":{\"tag\":\"svg\",\"attrs\":{\"viewBox\":\"64 64 896 896\",\"focusable\":\"false\"},\"children\":[{\"tag\":\"path\",\"attrs\":{\"d\":\"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z\"}},{\"tag\":\"path\",\"attrs\":{\"d\":\"M623.6 316.7C593.6 290.4 554 276 512 276s-81.6 14.5-111.6 40.7C369.2 344 352 380.7 352 420v7.6c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V420c0-44.1 43.1-80 96-80s96 35.9 96 80c0 31.1-22 59.6-56.1 72.7-21.2 8.1-39.2 22.3-52.1 40.9-13.1 19-19.9 41.8-19.9 64.9V620c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-22.7a48.3 48.3 0 0130.9-44.8c59-22.7 97.1-74.7 97.1-132.5.1-39.3-17.1-76-48.3-103.3zM472 732a40 40 0 1080 0 40 40 0 10-80 0z\"}}]},\"name\":\"question-circle\",\"theme\":\"outlined\"},QuestionCircleOutlined_default=QuestionCircleOutlined;init_globals();var React18=__toESM(require_react());init_globals();var RadiusSettingOutlined={\"icon\":{\"tag\":\"svg\",\"attrs\":{\"viewBox\":\"64 64 896 896\",\"focusable\":\"false\"},\"children\":[{\"tag\":\"path\",\"attrs\":{\"d\":\"M396 140h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-44 684h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm524-204h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM192 344h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 160h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 160h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 160h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm320 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm160 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm140-284c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V370c0-127-103-230-230-230H484c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h170c87.3 0 158 70.7 158 158v170zM236 96H92c-4.4 0-8 3.6-8 8v144c0 4.4 3.6 8 8 8h144c4.4 0 8-3.6 8-8V104c0-4.4-3.6-8-8-8zm-48 101.6c0 1.3-1.1 2.4-2.4 2.4h-43.2c-1.3 0-2.4-1.1-2.4-2.4v-43.2c0-1.3 1.1-2.4 2.4-2.4h43.2c1.3 0 2.4 1.1 2.4 2.4v43.2zM920 780H776c-4.4 0-8 3.6-8 8v144c0 4.4 3.6 8 8 8h144c4.4 0 8-3.6 8-8V788c0-4.4-3.6-8-8-8zm-48 101.6c0 1.3-1.1 2.4-2.4 2.4h-43.2c-1.3 0-2.4-1.1-2.4-2.4v-43.2c0-1.3 1.1-2.4 2.4-2.4h43.2c1.3 0 2.4 1.1 2.4 2.4v43.2z\"}}]},\"name\":\"radius-setting\",\"theme\":\"outlined\"},RadiusSettingOutlined_default=RadiusSettingOutlined,RadiusSettingOutlined2=function(e,t){return React18.createElement(AntdIcon_default,_extends({},e,{ref:t,icon:RadiusSettingOutlined_default}))},RefIcon15=React18.forwardRef(RadiusSettingOutlined2);RefIcon15.displayName=\"RadiusSettingOutlined\";var RadiusSettingOutlined_default2=RefIcon15;init_globals();var RightOutlined={\"icon\":{\"tag\":\"svg\",\"attrs\":{\"viewBox\":\"64 64 896 896\",\"focusable\":\"false\"},\"children\":[{\"tag\":\"path\",\"attrs\":{\"d\":\"M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z\"}}]},\"name\":\"right\",\"theme\":\"outlined\"},RightOutlined_default=RightOutlined;init_globals();var React19=__toESM(require_react());init_globals();var ScheduleOutlined={\"icon\":{\"tag\":\"svg\",\"attrs\":{\"viewBox\":\"64 64 896 896\",\"focusable\":\"false\"},\"children\":[{\"tag\":\"path\",\"attrs\":{\"d\":\"M928 224H768v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56H548v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56H328v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56H96c-17.7 0-32 14.3-32 32v576c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V256c0-17.7-14.3-32-32-32zm-40 568H136V296h120v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56h148v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56h148v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56h120v496zM416 496H232c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zm0 136H232c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zm308.2-177.4L620.6 598.3l-52.8-73.1c-3-4.2-7.8-6.6-12.9-6.6H500c-6.5 0-10.3 7.4-6.5 12.7l114.1 158.2a15.9 15.9 0 0025.8 0l165-228.7c3.8-5.3 0-12.7-6.5-12.7H737c-5-.1-9.8 2.4-12.8 6.5z\"}}]},\"name\":\"schedule\",\"theme\":\"outlined\"},ScheduleOutlined_default=ScheduleOutlined,ScheduleOutlined2=function(e,t){return React19.createElement(AntdIcon_default,_extends({},e,{ref:t,icon:ScheduleOutlined_default}))},RefIcon16=React19.forwardRef(ScheduleOutlined2);RefIcon16.displayName=\"ScheduleOutlined\";var ScheduleOutlined_default2=RefIcon16;init_globals();var SearchOutlined={\"icon\":{\"tag\":\"svg\",\"attrs\":{\"viewBox\":\"64 64 896 896\",\"focusable\":\"false\"},\"children\":[{\"tag\":\"path\",\"attrs\":{\"d\":\"M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z\"}}]},\"name\":\"search\",\"theme\":\"outlined\"},SearchOutlined_default=SearchOutlined;init_globals();var React20=__toESM(require_react());init_globals();var SendOutlined={\"icon\":{\"tag\":\"svg\",\"attrs\":{\"viewBox\":\"64 64 896 896\",\"focusable\":\"false\"},\"children\":[{\"tag\":\"defs\",\"attrs\":{},\"children\":[{\"tag\":\"style\",\"attrs\":{}}]},{\"tag\":\"path\",\"attrs\":{\"d\":\"M931.4 498.9L94.9 79.5c-3.4-1.7-7.3-2.1-11-1.2a15.99 15.99 0 00-11.7 19.3l86.2 352.2c1.3 5.3 5.2 9.6 10.4 11.3l147.7 50.7-147.6 50.7c-5.2 1.8-9.1 6-10.3 11.3L72.2 926.5c-.9 3.7-.5 7.6 1.2 10.9 3.9 7.9 13.5 11.1 21.5 7.2l836.5-417c3.1-1.5 5.6-4.1 7.2-7.1 3.9-8 .7-17.6-7.2-21.6zM170.8 826.3l50.3-205.6 295.2-101.3c2.3-.8 4.2-2.6 5-5 1.4-4.2-.8-8.7-5-10.2L221.1 403 171 198.2l628 314.9-628.2 313.2z\"}}]},\"name\":\"send\",\"theme\":\"outlined\"},SendOutlined_default=SendOutlined,SendOutlined2=function(e,t){return React20.createElement(AntdIcon_default,_extends({},e,{ref:t,icon:SendOutlined_default}))},RefIcon17=React20.forwardRef(SendOutlined2);RefIcon17.displayName=\"SendOutlined\";var SendOutlined_default2=RefIcon17;init_globals();var React21=__toESM(require_react());init_globals();var VideoCameraOutlined={\"icon\":{\"tag\":\"svg\",\"attrs\":{\"viewBox\":\"64 64 896 896\",\"focusable\":\"false\"},\"children\":[{\"tag\":\"path\",\"attrs\":{\"d\":\"M912 302.3L784 376V224c0-35.3-28.7-64-64-64H128c-35.3 0-64 28.7-64 64v576c0 35.3 28.7 64 64 64h592c35.3 0 64-28.7 64-64V648l128 73.7c21.3 12.3 48-3.1 48-27.6V330c0-24.6-26.7-40-48-27.7zM712 792H136V232h576v560zm176-167l-104-59.8V458.9L888 399v226zM208 360h112c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H208c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z\"}}]},\"name\":\"video-camera\",\"theme\":\"outlined\"},VideoCameraOutlined_default=VideoCameraOutlined,VideoCameraOutlined2=function(e,t){return React21.createElement(AntdIcon_default,_extends({},e,{ref:t,icon:VideoCameraOutlined_default}))},RefIcon18=React21.forwardRef(VideoCameraOutlined2);RefIcon18.displayName=\"VideoCameraOutlined\";var VideoCameraOutlined_default2=RefIcon18;init_globals();var React22=__toESM(require_react());init_globals();var WarningOutlined={\"icon\":{\"tag\":\"svg\",\"attrs\":{\"viewBox\":\"64 64 896 896\",\"focusable\":\"false\"},\"children\":[{\"tag\":\"path\",\"attrs\":{\"d\":\"M464 720a48 48 0 1096 0 48 48 0 10-96 0zm16-304v184c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V416c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8zm475.7 440l-416-720c-6.2-10.7-16.9-16-27.7-16s-21.6 5.3-27.7 16l-416 720C56 877.4 71.4 904 96 904h832c24.6 0 40-26.6 27.7-48zm-783.5-27.9L512 239.9l339.8 588.2H172.2z\"}}]},\"name\":\"warning\",\"theme\":\"outlined\"},WarningOutlined_default=WarningOutlined,WarningOutlined2=function(e,t){return React22.createElement(AntdIcon_default,_extends({},e,{ref:t,icon:WarningOutlined_default}))},RefIcon19=React22.forwardRef(WarningOutlined2);RefIcon19.displayName=\"WarningOutlined\";var WarningOutlined_default2=RefIcon19;init_globals();var import_react3=__toESM(require_react()),import_react_is=__toESM(require_react_is());init_globals();var React23=__toESM(require_react());function useMemo(e,t,r){var n=React23.useRef({});return\"value\"in n.current&&!r(n.current.condition,t)||(n.current.value=e(),n.current.condition=t),n.current.value}var fillRef=function(e,t){\"function\"==typeof e?e(t):\"object\"===_typeof(e)&&e&&\"current\"in e&&(e.current=t)},composeRef=function(){for(var e=arguments.length,t=new Array(e),r=0;r__left_angle_mark_e;r++)t[r]=arguments[r];var n=t.filter(Boolean);return n.length__left_angle_mark_=1?n[0]:function(e){t.forEach((function(t){fillRef(t,e)}))}},useComposeRef=function(){for(var e=arguments.length,t=new Array(e),r=0;r__left_angle_mark_e;r++)t[r]=arguments[r];return useMemo((function(){return composeRef.apply(void 0,t)}),t,(function(e,t){return e.length!==t.length||e.every((function(e,r){return e!==t[r]}))}))},supportRef=function(e){var t,r,n=(0,import_react_is.isMemo)(e)?e.type.type:e.type;return!!(\"function\"!=typeof n||null!==(t=n.prototype)&&void 0!==t&&t.render||n.$typeof===import_react_is.ForwardRef)&&!!(\"function\"!=typeof e||null!==(r=e.prototype)&&void 0!==r&&r.render||e.$typeof===import_react_is.ForwardRef)};function isReactElement(e){return(0,import_react3.isValidElement)(e)&&!(0,import_react_is.isFragment)(e)}var supportNodeRef=function(e){return isReactElement(e)&&supportRef(e)},getNodeRef=Number(import_react3.version.split(\".\")[0])>=19?function(e){return isReactElement(e)?e.props.ref:null}:function(e){return isReactElement(e)?e.ref:null};init_globals(),init_globals();var React29=__toESM(require_react());init_globals();var import_react4=__toESM(require_react()),import_react_is2=__toESM(require_react_is());function toArray(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=[];return import_react4.default.Children.forEach(e,(function(e){(null!=e||t.keepEmpty)&&(Array.isArray(e)?r=r.concat(toArray(e)):(0,import_react_is2.isFragment)(e)&&e.props?r=r.concat(toArray(e.props.children,t)):r.push(e))})),r}init_globals(),init_globals();var import_react5=__toESM(require_react()),import_react_dom=__toESM(require_react_dom());function isDOM(e){return e instanceof HTMLElement||e instanceof SVGElement}function getDOM(e){return e&&\"object\"===_typeof(e)&&isDOM(e.nativeElement)?e.nativeElement:isDOM(e)?e:null}function findDOMNode(e){var t,r=getDOM(e);return r||(e instanceof import_react5.default.Component?null===(t=import_react_dom.default.findDOMNode)||void 0===t?void 0:t.call(import_react_dom.default,e):null)}var React28=__toESM(require_react());init_globals();var React26=__toESM(require_react()),CollectionContext=React26.createContext(null);function Collection(e){var t=e.children,r=e.onBatchResize,n=React26.useRef(0),i=React26.useRef([]),o=React26.useContext(CollectionContext),a=React26.useCallback((function(e,t,a){n.current+=1;var s=n.current;i.current.push({size:e,element:t,data:a}),Promise.resolve().then((function(){s===n.current&&(null==r||r(i.current),i.current=[])})),null==o||o(e,t,a)}),[r,o]);return React26.createElement(CollectionContext.Provider,{value:a},t)}init_globals(),init_globals();var MapShim=function(){if(\"undefined\"!=typeof Map)return Map;function e(e,t){var r=-1;return e.some((function(e,n){return e[0]===t&&(r=n,!0)})),r}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,\"size\",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var r=e(this.__entries__,t),n=this.__entries__[r];return n&&n[1]},t.prototype.set=function(t,r){var n=e(this.__entries__,t);~n?this.__entries__[n][1]=r:this.__entries__.push([t,r])},t.prototype.delete=function(t){var r=this.__entries__,n=e(r,t);~n&&r.splice(n,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var r=0,n=this.__entries__;r__left_angle_mark_n.length;r++){var i=n[r];e.call(t,i[1],i[0])}},t}()}(),isBrowser=\"undefined\"!=typeof window&&\"undefined\"!=typeof document&&window.document===document,global$1=\"globalThis\".Math===Math?\"globalThis\":\"undefined\"!=typeof self&&self.Math===Math?self:\"undefined\"!=typeof window&&window.Math===Math?window:Function(\"return this\")(),requestAnimationFrame$1=\"function\"==typeof requestAnimationFrame?requestAnimationFrame.bind(global$1):function(e){return setTimeout((function(){return e(Date.now())}),1e3/60)},trailingTimeout=2;function throttle(e,t){var r=!1,n=!1,i=0;function o(){r&&(r=!1,e()),n&&s()}function a(){requestAnimationFrame$1(o)}function s(){var e=Date.now();if(r){if(e-i__left_angle_mark_trailingTimeout)return;n=!0}else r=!0,n=!1,setTimeout(a,t);i=e}return s}var REFRESH_DELAY=20,transitionKeys=[\"top\",\"right\",\"bottom\",\"left\",\"width\",\"height\",\"size\",\"weight\"],mutationObserverSupported=\"undefined\"!=typeof MutationObserver,ResizeObserverController=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=throttle(this.refresh.bind(this),REFRESH_DELAY)}return e.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},e.prototype.removeObserver=function(e){var t=this.observers_,r=t.indexOf(e);~r&&t.splice(r,1),!t.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},e.prototype.updateObservers_=function(){var e=this.observers_.filter((function(e){return e.gatherActive(),e.hasActive()}));return e.forEach((function(e){return e.broadcastActive()})),e.length>0},e.prototype.connect_=function(){isBrowser&&!this.connected_&&(document.addEventListener(\"transitionend\",this.onTransitionEnd_),window.addEventListener(\"resize\",this.refresh),mutationObserverSupported?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener(\"DOMSubtreeModified\",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){isBrowser&&this.connected_&&(document.removeEventListener(\"transitionend\",this.onTransitionEnd_),window.removeEventListener(\"resize\",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener(\"DOMSubtreeModified\",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,r=void 0===t?\"\":t;transitionKeys.some((function(e){return!!~r.indexOf(e)}))&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),defineConfigurable=function(e,t){for(var r=0,n=Object.keys(t);r__left_angle_mark_n.length;r++){var i=n[r];Object.defineProperty(e,i,{value:t[i],enumerable:!1,writable:!1,configurable:!0})}return e},getWindowOf=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||global$1},emptyRect=createRectInit(0,0,0,0);function toFloat(e){return parseFloat(e)||0}function getBordersSize(e){for(var t=[],r=1;r__left_angle_mark_arguments.length;r++)t[r-1]=arguments[r];return t.reduce((function(t,r){return t+toFloat(e[\"border-\"+r+\"-width\"])}),0)}function getPaddings(e){for(var t={},r=0,n=[\"top\",\"right\",\"bottom\",\"left\"];r__left_angle_mark_n.length;r++){var i=n[r],o=e[\"padding-\"+i];t[i]=toFloat(o)}return t}function getSVGContentRect(e){var t=e.getBBox();return createRectInit(0,0,t.width,t.height)}function getHTMLElementContentRect(e){var t=e.clientWidth,r=e.clientHeight;if(!t&&!r)return emptyRect;var n=getWindowOf(e).getComputedStyle(e),i=getPaddings(n),o=i.left+i.right,a=i.top+i.bottom,s=toFloat(n.width),l=toFloat(n.height);if(\"border-box\"===n.boxSizing&&(Math.round(s+o)!==t&&(s-=getBordersSize(n,\"left\",\"right\")+o),Math.round(l+a)!==r&&(l-=getBordersSize(n,\"top\",\"bottom\")+a)),!isDocumentElement(e)){var u=Math.round(s+o)-t,c=Math.round(l+a)-r;1!==Math.abs(u)&&(s-=u),1!==Math.abs(c)&&(l-=c)}return createRectInit(i.left,i.top,s,l)}var isSVGGraphicsElement=\"undefined\"!=typeof SVGGraphicsElement?function(e){return e instanceof getWindowOf(e).SVGGraphicsElement}:function(e){return e instanceof getWindowOf(e).SVGElement&&\"function\"==typeof e.getBBox};function isDocumentElement(e){return e===getWindowOf(e).document.documentElement}function getContentRect(e){return isBrowser?isSVGGraphicsElement(e)?getSVGContentRect(e):getHTMLElementContentRect(e):emptyRect}function createReadOnlyRect(e){var t=e.x,r=e.y,n=e.width,i=e.height,o=\"undefined\"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,a=Object.create(o.prototype);return defineConfigurable(a,{x:t,y:r,width:n,height:i,top:r,right:t+n,bottom:i+r,left:t}),a}function createRectInit(e,t,r,n){return{x:e,y:t,width:r,height:n}}var ResizeObservation=function(){function e(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=createRectInit(0,0,0,0),this.target=e}return e.prototype.isActive=function(){var e=getContentRect(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},e}(),ResizeObserverEntry=function(e,t){var r=createReadOnlyRect(t);defineConfigurable(this,{target:e,contentRect:r})},ResizeObserverSPI=function(){function e(e,t,r){if(this.activeObservations_=[],this.observations_=new MapShim,\"function\"!=typeof e)throw new TypeError(\"The callback provided as parameter 1 is not a function.\");this.callback_=e,this.controller_=t,this.callbackCtx_=r}return e.prototype.observe=function(e){if(!arguments.length)throw new TypeError(\"1 argument required, but only 0 present.\");if(\"undefined\"!=typeof Element&&Element instanceof Object){if(!(e instanceof getWindowOf(e).Element))throw new TypeError('parameter 1 is not of type \"Element\".');var t=this.observations_;t.has(e)||(t.set(e,new ResizeObservation(e)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError(\"1 argument required, but only 0 present.\");if(\"undefined\"!=typeof Element&&Element instanceof Object){if(!(e instanceof getWindowOf(e).Element))throw new TypeError('parameter 1 is not of type \"Element\".');var t=this.observations_;t.has(e)&&(t.delete(e),t.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach((function(t){t.isActive()&&e.activeObservations_.push(t)}))},e.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,t=this.activeObservations_.map((function(e){return new ResizeObserverEntry(e.target,e.broadcastRect())}));this.callback_.call(e,t,e),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),observers=\"undefined\"!=typeof WeakMap?new WeakMap:new MapShim,ResizeObserver2=function e(t){if(!(this instanceof e))throw new TypeError(\"Cannot call a class as a function.\");if(!arguments.length)throw new TypeError(\"1 argument required, but only 0 present.\");var r=ResizeObserverController.getInstance(),n=new ResizeObserverSPI(t,r,this);observers.set(this,n)};[\"observe\",\"unobserve\",\"disconnect\"].forEach((function(e){ResizeObserver2.prototype[e]=function(){var t;return(t=observers.get(this))[e].apply(t,arguments)}}));var index=void 0!==global$1.ResizeObserver?global$1.ResizeObserver:ResizeObserver2,ResizeObserver_es_default=index,elementListeners=new Map;function onResize(e){e.forEach((function(e){var t,r=e.target;null===(t=elementListeners.get(r))||void 0===t||t.forEach((function(e){return e(r)}))}))}var resizeObserver=new ResizeObserver_es_default(onResize);function observe(e,t){elementListeners.has(e)||(elementListeners.set(e,new Set),resizeObserver.observe(e)),elementListeners.get(e).add(t)}function unobserve(e,t){elementListeners.has(e)&&(elementListeners.get(e).delete(t),elementListeners.get(e).size||(resizeObserver.unobserve(e),elementListeners.delete(e)))}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}function _defineProperties(e,t){for(var r=0;r__left_angle_mark_t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,\"value\"in n&&(n.writable=!0),Object.defineProperty(e,toPropertyKey(n.key),n)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),Object.defineProperty(e,\"prototype\",{writable:!1}),e}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function _inherits(e,t){if(\"function\"!=typeof t&&null!==t)throw new TypeError(\"Super expression must either be null or a function\");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,\"prototype\",{writable:!1}),t&&_setPrototypeOf(e,t)}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _isNativeReflectConstruct(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(_isNativeReflectConstruct=function(){return!!e})()}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return e}function _possibleConstructorReturn(e,t){if(t&&(\"object\"==_typeof(t)||\"function\"==typeof t))return t;if(void 0!==t)throw new TypeError(\"Derived constructors may only return object or undefined\");return _assertThisInitialized(e)}function _createSuper(e){var t=_isNativeReflectConstruct();return function(){var r,n=_getPrototypeOf(e);if(t){var i=_getPrototypeOf(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return _possibleConstructorReturn(this,r)}}init_globals(),init_globals(),init_globals(),init_globals(),init_globals(),init_globals(),init_globals(),init_globals(),init_globals(),init_globals();var React27=__toESM(require_react()),DomWrapper=function(e){_inherits(r,e);var t=_createSuper(r);function r(){return _classCallCheck(this,r),t.apply(this,arguments)}return _createClass(r,[{key:\"render\",value:function(){return this.props.children}}]),r}(React27.Component);function SingleObserver(e,t){var r=e.children,n=e.disabled,i=React28.useRef(null),o=React28.useRef(null),a=React28.useContext(CollectionContext),s=\"function\"==typeof r,l=s?r(i):r,u=React28.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),c=!s&&React28.isValidElement(l)&&supportRef(l),d=c?l.ref:null,h=useComposeRef(d,i),f=function(){var e;return findDOMNode(i.current)||(i.current&&\"object\"===_typeof(i.current)?findDOMNode(null===(e=i.current)||void 0===e?void 0:e.nativeElement):null)||findDOMNode(o.current)};React28.useImperativeHandle(t,(function(){return f()}));var p=React28.useRef(e);p.current=e;var m=React28.useCallback((function(e){var t=p.current,r=t.onResize,n=t.data,i=e.getBoundingClientRect(),o=i.width,s=i.height,l=e.offsetWidth,c=e.offsetHeight,d=Math.floor(o),h=Math.floor(s);if(u.current.width!==d||u.current.height!==h||u.current.offsetWidth!==l||u.current.offsetHeight!==c){var f={width:d,height:h,offsetWidth:l,offsetHeight:c};u.current=f;var m=l===Math.round(o)?o:l,g=c===Math.round(s)?s:c,_=_objectSpread2(_objectSpread2({},f),{},{offsetWidth:m,offsetHeight:g});null==a||a(_,e,n),r&&Promise.resolve().then((function(){r(_,e)}))}}),[]);return React28.useEffect((function(){var e=f();return e&&!n&&observe(e,m),function(){return unobserve(e,m)}}),[i.current,n]),React28.createElement(DomWrapper,{ref:o},c?React28.cloneElement(l,{ref:h}):l)}var RefSingleObserver=React28.forwardRef(SingleObserver);RefSingleObserver.displayName=\"SingleObserver\";var SingleObserver_default=RefSingleObserver,INTERNAL_PREFIX_KEY=\"rc-observer-key\";function ResizeObserver3(e,t){var r=e.children,n=\"function\"==typeof r?[r]:toArray(r);return n.length>1?warning(!1,\"Find more than one child node with `children` in ResizeObserver. Please use ResizeObserver.Collection instead.\"):0===n.length&&warning(!1,\"`children` of ResizeObserver is empty. Nothing is in observe.\"),n.map((function(r,n){var i=(null==r?void 0:r.key)||\"\".concat(INTERNAL_PREFIX_KEY,\"-\").concat(n);return React29.createElement(SingleObserver_default,_extends({},e,{key:i,ref:0===n?t:void 0}),r)}))}var RefResizeObserver=React29.forwardRef(ResizeObserver3);RefResizeObserver.displayName=\"ResizeObserver\",RefResizeObserver.Collection=Collection;var es_default=RefResizeObserver;function omit(e,t){var r=Object.assign({},e);return Array.isArray(t)&&t.forEach((function(e){delete r[e]})),r}function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}function _iterableToArray(e){if(\"undefined\"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e[\"@@iterator\"])return Array.from(e)}function _nonIterableSpread(){throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")}function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray(e)||_nonIterableSpread()}init_globals(),init_globals(),init_globals(),init_globals(),init_globals(),init_globals();var raf=function(e){return+setTimeout(e,16)},caf=function(e){return clearTimeout(e)};\"undefined\"!=typeof window&&\"requestAnimationFrame\"in window&&(raf=function(e){return window.requestAnimationFrame(e)},caf=function(e){return window.cancelAnimationFrame(e)});var rafUUID=0,rafIds=new Map;function cleanup(e){rafIds.delete(e)}var wrapperRaf=function(e){var t=rafUUID+=1;return function r(n){if(0===n)cleanup(t),e();else{var i=raf((function(){r(n-1)}));rafIds.set(t,i)}}(arguments.length>1&&void 0!==arguments[1]?arguments[1]:1),t};wrapperRaf.cancel=function(e){var t=rafIds.get(e);return cleanup(e),caf(t)},wrapperRaf.ids=function(){return rafIds};var raf_default=wrapperRaf;init_globals();var React60=__toESM(require_react());function murmur2(e){for(var t,r=0,n=0,i=e.length;i>=4;++n,i-=4)t=1540483477*(65535&(t=255&e.charCodeAt(n)|(255&e.charCodeAt(++n))__left_angle_mark___left_angle_mark_8|(255&e.charCodeAt(++n))__left_angle_mark___left_angle_mark_16|(255&e.charCodeAt(++n))__left_angle_mark___left_angle_mark_24))+(59797*(t>>>16)__left_angle_mark___left_angle_mark_16),r=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)__left_angle_mark___left_angle_mark_16)^1540483477*(65535&r)+(59797*(r>>>16)__left_angle_mark___left_angle_mark_16);switch(i){case 3:r^=(255&e.charCodeAt(n+2))__left_angle_mark___left_angle_mark_16;case 2:r^=(255&e.charCodeAt(n+1))__left_angle_mark___left_angle_mark_8;case 1:r=1540483477*(65535&(r^=255&e.charCodeAt(n)))+(59797*(r>>>16)__left_angle_mark___left_angle_mark_16)}return(((r=1540483477*(65535&(r^=r>>>13))+(59797*(r>>>16)__left_angle_mark___left_angle_mark_16))^r>>>15)>>>0).toString(36)}init_globals(),init_globals(),init_globals(),init_globals();var hash_browser_esm_default=murmur2,import_react6=__toESM(require_react());function isEqual(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=new Set;return function e(t,i){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,a=n.has(t);if(warning_default(!a,\"Warning: There may be circular references\"),a)return!1;if(t===i)return!0;if(r&&o>1)return!1;n.add(t);var s=o+1;if(Array.isArray(t)){if(!Array.isArray(i)||t.length!==i.length)return!1;for(var l=0;l__left_angle_mark_t.length;l++)if(!e(t[l],i[l],s))return!1;return!0}if(t&&i&&\"object\"===_typeof(t)&&\"object\"===_typeof(i)){var u=Object.keys(t);return u.length===Object.keys(i).length&&u.every((function(r){return e(t[r],i[r],s)}))}return!1}(e,t)}init_globals(),init_globals();var isEqual_default=isEqual,React30=__toESM(require_react());init_globals();var SPLIT=\"%\";function pathKey(e){return e.join(SPLIT)}var Entity=function(){function e(t){_classCallCheck(this,e),_defineProperty(this,\"instanceId\",void 0),_defineProperty(this,\"cache\",new Map),this.instanceId=t}return _createClass(e,[{key:\"get\",value:function(e){return this.opGet(pathKey(e))}},{key:\"opGet\",value:function(e){return this.cache.get(e)||null}},{key:\"update\",value:function(e,t){return this.opUpdate(pathKey(e),t)}},{key:\"opUpdate\",value:function(e,t){var r=t(this.cache.get(e));null===r?this.cache.delete(e):this.cache.set(e,r)}}]),e}(),Cache_default=Entity,ATTR_TOKEN=\"data-token-hash\",ATTR_MARK=\"data-css-hash\",ATTR_CACHE_PATH=\"data-cache-path\",CSS_IN_JS_INSTANCE=\"__cssinjs_instance__\";function createCache(){var e=Math.random().toString(12).slice(2);if(\"undefined\"!=typeof document&&document.head&&document.body){var t=document.body.querySelectorAll(\"style[\".concat(ATTR_MARK,\"]\"))||[],r=document.head.firstChild;Array.from(t).forEach((function(t){t[CSS_IN_JS_INSTANCE]=t[CSS_IN_JS_INSTANCE]||e,t[CSS_IN_JS_INSTANCE]===e&&document.head.insertBefore(t,r)}));var n={};Array.from(document.querySelectorAll(\"style[\".concat(ATTR_MARK,\"]\"))).forEach((function(t){var r,i=t.getAttribute(ATTR_MARK);n[i]?t[CSS_IN_JS_INSTANCE]===e&&(null===(r=t.parentNode)||void 0===r||r.removeChild(t)):n[i]=!0}))}return new Cache_default(e)}var StyleContext=React30.createContext({hashPriority:\"low\",cache:createCache(),defaultCache:!0}),StyleContext_default=StyleContext;init_globals(),init_globals(),init_globals(),init_globals(),init_globals();var CALC_UNIT=\"CALC_UNIT\",regexp=new RegExp(CALC_UNIT,\"g\");function sameDerivativeOption(e,t){if(e.length!==t.length)return!1;for(var r=0;r__left_angle_mark_e.length;r++)if(e[r]!==t[r])return!1;return!0}init_globals(),init_globals(),init_globals();var ThemeCache=function(){function e(){_classCallCheck(this,e),_defineProperty(this,\"cache\",void 0),_defineProperty(this,\"keys\",void 0),_defineProperty(this,\"cacheCallTimes\",void 0),this.cache=new Map,this.keys=[],this.cacheCallTimes=0}return _createClass(e,[{key:\"size\",value:function(){return this.keys.length}},{key:\"internalGet\",value:function(e){var t,r,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i={map:this.cache};return e.forEach((function(e){var t;i=i?null===(t=i)||void 0===t||null===(t=t.map)||void 0===t?void 0:t.get(e):void 0})),null!==(t=i)&&void 0!==t&&t.value&&n&&(i.value[1]=this.cacheCallTimes++),null===(r=i)||void 0===r?void 0:r.value}},{key:\"get\",value:function(e){var t;return null===(t=this.internalGet(e,!0))||void 0===t?void 0:t[0]}},{key:\"has\",value:function(e){return!!this.internalGet(e)}},{key:\"set\",value:function(t,r){var n=this;if(!this.has(t)){if(this.size()+1>e.MAX_CACHE_SIZE+e.MAX_CACHE_OFFSET){var i=this.keys.reduce((function(e,t){var r=_slicedToArray(e,2)[1];return n.internalGet(t)[1]__left_angle_mark_r?[t,n.internalGet(t)[1]]:e}),[this.keys[0],this.cacheCallTimes]),o=_slicedToArray(i,1)[0];this.delete(o)}this.keys.push(t)}var a=this.cache;t.forEach((function(e,i){if(i===t.length-1)a.set(e,{value:[r,n.cacheCallTimes++]});else{var o=a.get(e);o?o.map||(o.map=new Map):a.set(e,{map:new Map}),a=a.get(e).map}}))}},{key:\"deleteByPath\",value:function(e,t){var r,n=e.get(t[0]);if(1===t.length)return n.map?e.set(t[0],{map:n.map}):e.delete(t[0]),null===(r=n.value)||void 0===r?void 0:r[0];var i=this.deleteByPath(n.map,t.slice(1));return n.map&&0!==n.map.size||n.value||e.delete(t[0]),i}},{key:\"delete\",value:function(e){if(this.has(e))return this.keys=this.keys.filter((function(t){return!sameDerivativeOption(t,e)})),this.deleteByPath(this.cache,e)}}]),e}();_defineProperty(ThemeCache,\"MAX_CACHE_SIZE\",20),_defineProperty(ThemeCache,\"MAX_CACHE_OFFSET\",5),init_globals();var uuid=0,Theme=function(){function e(t){_classCallCheck(this,e),_defineProperty(this,\"derivatives\",void 0),_defineProperty(this,\"id\",void 0),this.derivatives=Array.isArray(t)?t:[t],this.id=uuid,0===t.length&&warning(t.length>0,\"[Ant Design CSS-in-JS] Theme should have at least one derivative function.\"),uuid+=1}return _createClass(e,[{key:\"getDerivativeToken\",value:function(e){return this.derivatives.reduce((function(t,r){return r(e,t)}),void 0)}}]),e}(),cacheThemes=new ThemeCache;function createTheme(e){var t=Array.isArray(e)?e:[e];return cacheThemes.has(t)||cacheThemes.set(t,new Theme(t)),cacheThemes.get(t)}var resultCache=new WeakMap,RESULT_VALUE={};function memoResult(e,t){for(var r=resultCache,n=0;n__left_angle_mark_t.length;n+=1){var i=t[n];r.has(i)||r.set(i,new WeakMap),r=r.get(i)}return r.has(RESULT_VALUE)||r.set(RESULT_VALUE,e()),r.get(RESULT_VALUE)}var flattenTokenCache=new WeakMap;function flattenToken(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=flattenTokenCache.get(e)||\"\";return r||(Object.keys(e).forEach((function(n){var i=e[n];r+=n,i instanceof Theme?r+=i.id:i&&\"object\"===_typeof(i)?r+=flattenToken(i,t):r+=i})),t&&(r=hash_browser_esm_default(r)),flattenTokenCache.set(e,r)),r}function token2key(e,t){return hash_browser_esm_default(\"\".concat(t,\"_\").concat(flattenToken(e,!0)))}var randomSelectorKey=\"random-\".concat(Date.now(),\"-\").concat(Math.random()).replace(/\\./g,\"\"),isClientSide=canUseDom();function unit(e){return\"number\"==typeof e?\"\".concat(e,\"px\"):e}function toStyleStr(e,t,r){if(arguments.length>4&&void 0!==arguments[4]&&arguments[4])return e;var n=_objectSpread2(_objectSpread2({},arguments.length>3&&void 0!==arguments[3]?arguments[3]:{}),{},_defineProperty(_defineProperty({},ATTR_TOKEN,t),ATTR_MARK,r)),i=Object.keys(n).map((function(e){var t=n[e];return t?\"\".concat(e,'=\"').concat(t,'\"'):null})).filter((function(e){return e})).join(\" \");return\"__left_angle_mark_style \".concat(i,\">\").concat(e,\"__left_angle_mark_/style>\")}init_globals();var token2CSSVar=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:\"\";return\"--\".concat(t?\"\".concat(t,\"-\"):\"\").concat(e).replace(/([a-z0-9])([A-Z])/g,\"$1-$2\").replace(/([A-Z]+)([A-Z][a-z0-9]+)/g,\"$1-$2\").replace(/([a-z])([A-Z0-9])/g,\"$1-$2\").toLowerCase()},serializeCSSVar=function(e,t,r){return Object.keys(e).length?\".\".concat(t).concat(null!=r&&r.scope?\".\".concat(r.scope):\"\",\"{\").concat(Object.entries(e).map((function(e){var t=_slicedToArray(e,2),r=t[0],n=t[1];return\"\".concat(r,\":\").concat(n,\";\")})).join(\"\"),\"}\"):\"\"},transformToken=function(e,t,r){var n={},i={};return Object.entries(e).forEach((function(e){var t,o,a=_slicedToArray(e,2),s=a[0],l=a[1];if(null!=r&&null!==(t=r.preserve)&&void 0!==t&&t[s])i[s]=l;else if(!(\"string\"!=typeof l&&\"number\"!=typeof l||null!=r&&null!==(o=r.ignore)&&void 0!==o&&o[s])){var u,c=token2CSSVar(s,null==r?void 0:r.prefix);n[c]=\"number\"!=typeof l||null!=r&&null!==(u=r.unitless)&&void 0!==u&&u[s]?String(l):\"\".concat(l,\"px\"),i[s]=\"var(\".concat(c,\")\")}})),[i,serializeCSSVar(n,t,{scope:null==r?void 0:r.scope})]};init_globals();var React34=__toESM(require_react());init_globals(),init_globals();var React31=__toESM(require_react()),useInternalLayoutEffect=canUseDom()?React31.useLayoutEffect:React31.useEffect,useLayoutEffect2=function(e,t){var r=React31.useRef(!0);useInternalLayoutEffect((function(){return e(r.current)}),t),useInternalLayoutEffect((function(){return r.current=!1,function(){r.current=!0}}),[])},useLayoutUpdateEffect=function(e,t){useLayoutEffect2((function(t){if(!t)return e()}),t)},useLayoutEffect_default=useLayoutEffect2,React32=__toESM(require_react()),fullClone=_objectSpread2({},React32),useInsertionEffect=fullClone.useInsertionEffect,useInsertionEffectPolyfill=function(e,t,r){React32.useMemo(e,r),useLayoutEffect_default((function(){return t(!0)}),r)},useCompatibleInsertionEffect=useInsertionEffect?function(e,t,r){return useInsertionEffect((function(){return e(),t()}),r)}:useInsertionEffectPolyfill,useCompatibleInsertionEffect_default=useCompatibleInsertionEffect;init_globals();var React33=__toESM(require_react()),fullClone2=_objectSpread2({},React33),useInsertionEffect2=fullClone2.useInsertionEffect,useCleanupRegister=function(e){var t=[],r=!1;return React33.useEffect((function(){return r=!1,function(){r=!0,t.length&&t.forEach((function(e){return e()}))}}),e),function(e){r?warning(!1,\"[Ant Design CSS-in-JS] You are registering a cleanup function after unmount, which will not have any effect.\"):t.push(e)}},useRun=function(){return function(e){e()}},useEffectCleanupRegister=void 0!==useInsertionEffect2?useCleanupRegister:useRun,useEffectCleanupRegister_default=useEffectCleanupRegister;init_globals();var webpackHMR=!1;function useDevHMR(){return webpackHMR}var useHMR_default=useDevHMR,win,originWebpackHotUpdate;function useGlobalCache(e,t,r,n,i){var o=React34.useContext(StyleContext_default).cache,a=pathKey([e].concat(_toConsumableArray(t))),s=useEffectCleanupRegister_default([a]),l=useHMR_default(),u=function(e){o.opUpdate(a,(function(t){var i=_slicedToArray(t||[void 0,void 0],2),o=i[0],a=void 0===o?0:o,s=i[1],u=s;s&&l&&(null==n||n(u,l),u=null);var c=[a,u||r()];return e?e(c):c}))};React34.useMemo((function(){u()}),[a]);var c=o.opGet(a);c||(u(),c=o.opGet(a));var d=c[1];return useCompatibleInsertionEffect_default((function(){null==i||i(d)}),(function(e){return u((function(t){var r=_slicedToArray(t,2),n=r[0],o=r[1];return e&&0===n&&(null==i||i(d)),[n+1,o]})),function(){o.opUpdate(a,(function(t){var r=_slicedToArray(t||[],2),i=r[0],l=void 0===i?0:i,u=r[1];return 0==l-1?(s((function(){!e&&o.opGet(a)||null==n||n(u,!1)})),null):[l-1,u]}))}}),[a]),d}\"undefined\"!=typeof module&&module&&module.hot&&\"undefined\"!=typeof window&&(win=window,\"function\"==typeof win.webpackHotUpdate&&(originWebpackHotUpdate=win.webpackHotUpdate,win.webpackHotUpdate=function(){return webpackHMR=!0,setTimeout((function(){webpackHMR=!1}),0),originWebpackHotUpdate.apply(void 0,arguments)}));var EMPTY_OVERRIDE={},hashPrefix=\"css-dev-only-do-not-override\",tokenKeys=new Map;function recordCleanToken(e){tokenKeys.set(e,(tokenKeys.get(e)||0)+1)}function removeStyleTags(e,t){\"undefined\"!=typeof document&&document.querySelectorAll(\"style[\".concat(ATTR_TOKEN,'=\"').concat(e,'\"]')).forEach((function(e){var r;e[CSS_IN_JS_INSTANCE]===t&&(null===(r=e.parentNode)||void 0===r||r.removeChild(e))}))}var TOKEN_THRESHOLD=0;function cleanTokenStyle(e,t){tokenKeys.set(e,(tokenKeys.get(e)||0)-1);var r=Array.from(tokenKeys.keys()),n=r.filter((function(e){return(tokenKeys.get(e)||0)__left_angle_mark_=0}));r.length-n.length>TOKEN_THRESHOLD&&n.forEach((function(e){removeStyleTags(e,t),tokenKeys.delete(e)}))}var getComputedToken=function(e,t,r,n){var i=_objectSpread2(_objectSpread2({},r.getDerivativeToken(e)),t);return n&&(i=n(i)),i},TOKEN_PREFIX=\"token\";function useCacheToken(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=(0,import_react6.useContext)(StyleContext_default),i=n.cache.instanceId,o=n.container,a=r.salt,s=void 0===a?\"\":a,l=r.override,u=void 0===l?EMPTY_OVERRIDE:l,c=r.formatToken,d=r.getComputedToken,h=r.cssVar,f=memoResult((function(){return Object.assign.apply(Object,[{}].concat(_toConsumableArray(t)))}),t),p=flattenToken(f),m=flattenToken(u),g=h?flattenToken(h):\"\";return useGlobalCache(TOKEN_PREFIX,[s,e.id,p,m,g],(function(){var t,r=d?d(f,u,e):getComputedToken(f,u,e,c),n=_objectSpread2({},r),i=\"\";if(h){var o=_slicedToArray(transformToken(r,h.key,{prefix:h.prefix,ignore:h.ignore,unitless:h.unitless,preserve:h.preserve}),2);r=o[0],i=o[1]}var a=token2key(r,s);r._tokenKey=a,n._tokenKey=token2key(n,s);var l=null!==(t=null==h?void 0:h.key)&&void 0!==t?t:a;r._themeKey=l,recordCleanToken(l);var p=\"\".concat(hashPrefix,\"-\").concat(hash_browser_esm_default(a));return r._hashId=p,[r,p,n,i,(null==h?void 0:h.key)||\"\"]}),(function(e){cleanTokenStyle(e[0]._themeKey,i)}),(function(e){var t=_slicedToArray(e,4),r=t[0],n=t[3];if(h&&n){var a=updateCSS(n,hash_browser_esm_default(\"css-variables-\".concat(r._themeKey)),{mark:ATTR_MARK,prepend:\"queue\",attachTo:o,priority:-999});a[CSS_IN_JS_INSTANCE]=i,a.setAttribute(ATTR_TOKEN,r._themeKey)}}))}var extract=function(e,t,r){var n=_slicedToArray(e,5),i=n[2],o=n[3],a=n[4],s=(r||{}).plain;if(!o)return null;var l=i._tokenKey;return[-999,l,toStyleStr(o,a,l,{\"data-rc-order\":\"prependQueue\",\"data-rc-priority\":\"\".concat(-999)},s)]};init_globals();var import_react7=__toESM(require_react());init_globals();var React35=__toESM(require_react());init_globals();var unitlessKeys={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},unitless_browser_esm_default=unitlessKeys;init_globals();var COMMENT=\"comm\",RULESET=\"rule\",DECLARATION=\"decl\",IMPORT=\"@import\",KEYFRAMES=\"@keyframes\",LAYER=\"@layer\";init_globals();var abs=Math.abs,from=String.fromCharCode;function trim(e){return e.trim()}function replace(e,t,r){return e.replace(t,r)}function indexof(e,t,r){return e.indexOf(t,r)}function charat(e,t){return 0|e.charCodeAt(t)}function substr(e,t,r){return e.slice(t,r)}function strlen(e){return e.length}function sizeof(e){return e.length}function append(e,t){return t.push(e),e}init_globals(),init_globals();var line=1,column=1,length=0,position=0,character=0,characters=\"\";function node(e,t,r,n,i,o,a,s){return{value:e,root:t,parent:r,type:n,props:i,children:o,line:line,column:column,length:a,return:\"\",siblings:s}}function char(){return character}function prev(){return character=position>0?charat(characters,--position):0,column--,10===character&&(column=1,line--),character}function next(){return character=position__left_angle_mark_length?charat(characters,position++):0,column++,10===character&&(column=1,line++),character}function peek(){return charat(characters,position)}function caret(){return position}function slice(e,t){return substr(characters,e,t)}function token(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function alloc(e){return line=column=1,length=strlen(characters=e),position=0,[]}function dealloc(e){return characters=\"\",e}function delimit(e){return trim(slice(position-1,delimiter(91===e?e+2:40===e?e+1:e)))}function whitespace(e){for(;(character=peek())&&character__left_angle_mark_33;)next();return token(e)>2||token(character)>3?\"\":\" \"}function escaping(e,t){for(;--t&&next()&&!(character__left_angle_mark_48||character>102||character>57&&character__left_angle_mark_65||character>70&&character__left_angle_mark_97););return slice(e,caret()+(t__left_angle_mark_6&&32==peek()&&32==next()))}function delimiter(e){for(;next();)switch(character){case e:return position;case 34:case 39:34!==e&&39!==e&&delimiter(character);break;case 40:41===e&&delimiter(e);break;case 92:next()}return position}function commenter(e,t){for(;next()&&e+character!==57&&(e+character!==84||47!==peek()););return\"/*\"+slice(t,position-1)+\"*\"+from(47===e?e:next())}function identifier(e){for(;!token(peek());)next();return slice(e,position)}function compile(e){return dealloc(parse(\"\",null,null,null,[\"\"],e=alloc(e),0,[0],e))}function parse(e,t,r,n,i,o,a,s,l){for(var u=0,c=0,d=a,h=0,f=0,p=0,m=1,g=1,_=1,b=0,y=\"\",v=i,A=o,w=n,S=y;g;)switch(p=b,b=next()){case 40:if(108!=p&&58==charat(S,d-1)){-1!=indexof(S+=replace(delimit(b),\"&\",\"&\\f\"),\"&\\f\",abs(u?s[u-1]:0))&&(_=-1);break}case 34:case 39:case 91:S+=delimit(b);break;case 9:case 10:case 13:case 32:S+=whitespace(p);break;case 92:S+=escaping(caret()-1,7);continue;case 47:switch(peek()){case 42:case 47:append(comment(commenter(next(),caret()),t,r,l),l),5!=token(p||1)&&5!=token(peek()||1)||!strlen(S)||\" \"===substr(S,-1,void 0)||(S+=\" \");break;default:S+=\"/\"}break;case 123*m:s[u++]=strlen(S)*_;case 125*m:case 59:case 0:switch(b){case 0:case 125:g=0;case 59+c:-1==_&&(S=replace(S,/\\f/g,\"\")),f>0&&(strlen(S)-d||0===m&&47===p)&&append(f>32?declaration(S+\";\",n,r,d-1,l):declaration(replace(S,\" \",\"\")+\";\",n,r,d-2,l),l);break;case 59:S+=\";\";default:if(append(w=ruleset(S,t,r,u,c,i,s,y,v=[],A=[],d,o),o),123===b)if(0===c)parse(S,t,w,w,v,o,d,s,A);else switch(99===h&&110===charat(S,3)?100:h){case 100:case 108:case 109:case 115:parse(e,w,w,n&&append(ruleset(e,w,w,0,0,i,s,y,i,v=[],d,A),A),i,A,d,s,n?v:A);break;default:parse(S,w,w,w,[\"\"],A,0,s,A)}}u=c=f=0,m=_=1,y=S=\"\",d=a;break;case 58:d=1+strlen(S),f=p;default:if(m__left_angle_mark_1)if(123==b)--m;else if(125==b&&0==m++&&125==prev())continue;switch(S+=from(b),b*m){case 38:_=c>0?1:(S+=\"\\f\",-1);break;case 44:s[u++]=(strlen(S)-1)*_,_=1;break;case 64:45===peek()&&(S+=delimit(next())),h=peek(),c=d=strlen(y=S+=identifier(caret())),b++;break;case 45:45===p&&2==strlen(S)&&(m=0)}}return o}function ruleset(e,t,r,n,i,o,a,s,l,u,c,d){for(var h=i-1,f=0===i?o:[\"\"],p=sizeof(f),m=0,g=0,_=0;m__left_angle_mark_n;++m)for(var b=0,y=substr(e,h+1,h=abs(g=a[m])),v=e;b__left_angle_mark_p;++b)(v=trim(g>0?f[b]+\" \"+y:replace(y,/&\\f/g,f[b])))&&(l[_++]=v);return node(e,t,r,0===i?RULESET:s,l,u,c,d)}function comment(e,t,r,n){return node(e,t,r,COMMENT,from(char()),substr(e,2,-2),0,n)}function declaration(e,t,r,n,i){return node(e,t,r,DECLARATION,substr(e,0,n),substr(e,n+1,-1),n,i)}function serialize(e,t){for(var r=\"\",n=0;n__left_angle_mark_e.length;n++)r+=t(e[n],n,e,t)||\"\";return r}function stringify(e,t,r,n){switch(e.type){case LAYER:if(e.children.length)break;case IMPORT:case DECLARATION:return e.return=e.return||e.value;case COMMENT:return\"\";case KEYFRAMES:return e.return=e.value+\"{\"+serialize(e.children,n)+\"}\";case RULESET:if(!strlen(e.value=e.props.join(\",\")))return\"\"}return strlen(r=serialize(e.children,n))?e.return=e.value+\"{\"+r+\"}\":\"\"}function lintWarning(e,t){var r=t.path,n=t.parentSelectors;warning_default(!1,\"[Ant Design CSS-in-JS] \".concat(r?\"Error in \".concat(r,\": \"):\"\").concat(e).concat(n.length?\" Selector: \".concat(n.join(\" | \")):\"\"))}init_globals(),init_globals(),init_globals(),init_globals();var linter=function(e,t,r){\"content\"===e&&(\"string\"!=typeof t||-1===[\"normal\",\"none\",\"initial\",\"inherit\",\"unset\"].indexOf(t)&&!/(attr|counters?|url|(((repeating-)?(linear|radial))|conic)-gradient)\\(|(no-)?(open|close)-quote/.test(t)&&(t.charAt(0)!==t.charAt(t.length-1)||'\"'!==t.charAt(0)&&\"'\"!==t.charAt(0)))&&lintWarning(\"You seem to be using a value for 'content' without quotes, try replacing it with `content: '\\\"\".concat(t,\"\\\"'`.\"),r)},contentQuotesLinter_default=linter;init_globals();var linter3=function(e,t,r){\"animation\"===e&&r.hashId&&\"none\"!==t&&lintWarning(\"You seem to be using hashed animation '\".concat(t,\"', in which case 'animationName' with Keyframe as value is recommended.\"),r)},hashedAnimationLinter_default=linter3;init_globals(),init_globals(),init_globals(),init_globals(),init_globals();var ATTR_CACHE_MAP=\"data-ant-cssinjs-cache-path\",CSS_FILE_STYLE=\"_FILE_STYLE__\",cachePathMap,fromCSSFile=!0;function prepare(){if(!cachePathMap&&(cachePathMap={},canUseDom())){var e=document.createElement(\"div\");e.className=ATTR_CACHE_MAP,e.style.position=\"fixed\",e.style.visibility=\"hidden\",e.style.top=\"-9999px\",document.body.appendChild(e);var t=getComputedStyle(e).content||\"\";(t=t.replace(/^\"/,\"\").replace(/\"$/,\"\")).split(\";\").forEach((function(e){var t=_slicedToArray(e.split(\":\"),2),r=t[0],n=t[1];cachePathMap[r]=n}));var r,n=document.querySelector(\"style[\".concat(ATTR_CACHE_MAP,\"]\"));n&&(fromCSSFile=!1,null===(r=n.parentNode)||void 0===r||r.removeChild(n)),document.body.removeChild(e)}}function existPath(e){return prepare(),!!cachePathMap[e]}function getStyleAndHash(e){var t=cachePathMap[e],r=null;if(t&&canUseDom())if(fromCSSFile)r=CSS_FILE_STYLE;else{var n=document.querySelector(\"style[\".concat(ATTR_MARK,'=\"').concat(cachePathMap[e],'\"]'));n?r=n.innerHTML:delete cachePathMap[e]}return[r,t]}var SKIP_CHECK=\"_skip_check_\",MULTI_VALUE=\"_multi_value_\";function normalizeStyle(e){return serialize(compile(e),stringify).replace(/\\{%%%\\:[^;];}/g,\";\")}function isCompoundCSSProperty(e){return\"object\"===_typeof(e)&&e&&(SKIP_CHECK in e||MULTI_VALUE in e)}function injectSelectorHash(e,t,r){if(!t)return e;var n=\".\".concat(t),i=\"low\"===r?\":where(\".concat(n,\")\"):n;return e.split(\",\").map((function(e){var t,r=e.trim().split(/\\s+/),n=r[0]||\"\",o=(null===(t=n.match(/^\\w+/))||void 0===t?void 0:t[0])||\"\";return[n=\"\".concat(o).concat(i).concat(n.slice(o.length))].concat(_toConsumableArray(r.slice(1))).join(\" \")})).join(\",\")}var parseStyle=function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{root:!0,parentSelectors:[]},i=n.root,o=n.injectHash,a=n.parentSelectors,s=r.hashId,l=r.layer,u=r.path,c=r.hashPriority,d=r.transformers,h=void 0===d?[]:d,f=r.linters,p=void 0===f?[]:f,m=\"\",g={};function _(t){var n=t.getName(s);if(!g[n]){var i=_slicedToArray(e(t.style,r,{root:!1,parentSelectors:a}),1)[0];g[n]=\"@keyframes \".concat(t.getName(s)).concat(i)}}var b=function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return t.forEach((function(t){Array.isArray(t)?e(t,r):t&&r.push(t)})),r}(Array.isArray(t)?t:[t]);return b.forEach((function(t){var n=\"string\"!=typeof t||i?t:{};if(\"string\"==typeof n)m+=\"\".concat(n,\"\\n\");else if(n._keyframe)_(n);else{var l=h.reduce((function(e,t){var r;return(null==t||null===(r=t.visit)||void 0===r?void 0:r.call(t,e))||e}),n);Object.keys(l).forEach((function(t){var n=l[t];if(\"object\"!==_typeof(n)||!n||\"animationName\"===t&&n._keyframe||isCompoundCSSProperty(n)){let e=function(e,t){\"object\"===_typeof(n)&&null!=n&&n[SKIP_CHECK]||[contentQuotesLinter_default,hashedAnimationLinter_default].concat(_toConsumableArray(p)).forEach((function(r){return r(e,t,{path:u,hashId:s,parentSelectors:a})}));var r=e.replace(/[A-Z]/g,(function(e){return\"-\".concat(e.toLowerCase())})),i=t;unitless_browser_esm_default[e]||\"number\"!=typeof i||0===i||(i=\"\".concat(i,\"px\")),\"animationName\"===e&&null!=t&&t._keyframe&&(_(t),i=t.getName(s)),m+=\"\".concat(r,\":\").concat(i,\";\")};var d,h=null!==(d=null==n?void 0:n.value)&&void 0!==d?d:n;\"object\"===_typeof(n)&&null!=n&&n[MULTI_VALUE]&&Array.isArray(h)?h.forEach((function(r){e(t,r)})):e(t,h)}else{var f=!1,b=t.trim(),y=!1;(i||o)&&s?b.startsWith(\"@\")?f=!0:b=injectSelectorHash(\"&\"===b?\"\":t,s,c):!i||s||\"&\"!==b&&\"\"!==b||(b=\"\",y=!0);var v=_slicedToArray(e(n,r,{root:y,injectHash:f,parentSelectors:[].concat(_toConsumableArray(a),[b])}),2),A=v[0],w=v[1];g=_objectSpread2(_objectSpread2({},g),w),m+=\"\".concat(b).concat(A)}}))}})),i?l&&(m=\"@layer \".concat(l.name,\" {\").concat(m,\"}\"),l.dependencies&&(g[\"@layer \".concat(l.name)]=l.dependencies.map((function(e){return\"@layer \".concat(e,\", \").concat(l.name,\";\")})).join(\"\\n\"))):m=\"{\".concat(m,\"}\"),[m,g]};function uniqueHash(e,t){return hash_browser_esm_default(\"\".concat(e.join(\"%\")).concat(t))}function Empty(){return null}var STYLE_PREFIX=\"style\";function useStyleRegister(e,t){var r=e.token,n=e.path,i=e.hashId,o=e.layer,a=e.nonce,s=e.clientOnly,l=e.order,u=void 0===l?0:l,c=React35.useContext(StyleContext_default),d=c.autoClear,h=c.mock,f=c.defaultCache,p=c.hashPriority,m=c.container,g=c.ssrInline,_=c.transformers,b=c.linters,y=c.cache,v=c.layer,A=r._tokenKey,w=[A];v&&w.push(\"layer\"),w.push.apply(w,_toConsumableArray(n));var S=isClientSide;void 0!==h&&(S=\"client\"===h);var E=useGlobalCache(STYLE_PREFIX,w,(function(){var e=w.join(\"|\");if(existPath(e)){var r=_slicedToArray(getStyleAndHash(e),2),a=r[0],l=r[1];if(a)return[a,A,l,{},s,u]}var c=t(),d=_slicedToArray(parseStyle(c,{hashId:i,hashPriority:p,layer:v?o:void 0,path:n.join(\"-\"),transformers:_,linters:b}),2),h=d[0],f=d[1],m=normalizeStyle(h),g=uniqueHash(w,m);return[m,A,g,f,s,u]}),(function(e,t){var r=_slicedToArray(e,3)[2];(t||d)&&isClientSide&&removeCSS(r,{mark:ATTR_MARK})}),(function(e){var t=_slicedToArray(e,4),r=t[0],n=(t[1],t[2]),i=t[3];if(S&&r!==CSS_FILE_STYLE){var o={mark:ATTR_MARK,prepend:!v&&\"queue\",attachTo:m,priority:u},s=\"function\"==typeof a?a():a;s&&(o.csp={nonce:s});var l=[],c=[];Object.keys(i).forEach((function(e){e.startsWith(\"@layer\")?l.push(e):c.push(e)})),l.forEach((function(e){updateCSS(normalizeStyle(i[e]),\"_layer-\".concat(e),_objectSpread2(_objectSpread2({},o),{},{prepend:!0}))}));var d=updateCSS(r,n,o);d[CSS_IN_JS_INSTANCE]=y.instanceId,d.setAttribute(ATTR_TOKEN,A),d.setAttribute(ATTR_CACHE_PATH,w.join(\"|\")),c.forEach((function(e){updateCSS(normalizeStyle(i[e]),\"_effect-\".concat(e),o)}))}})),x=_slicedToArray(E,3),C=x[0],T=x[1],R=x[2];return function(e){var t;return t=g&&!S&&f?React35.createElement(\"style\",_extends({},_defineProperty(_defineProperty({},ATTR_TOKEN,T),ATTR_MARK,R),{dangerouslySetInnerHTML:{__html:C}})):React35.createElement(Empty,null),React35.createElement(React35.Fragment,null,t,e)}}var extract3=function(e,t,r){var n=_slicedToArray(e,6),i=n[0],o=n[1],a=n[2],s=n[3],l=n[4],u=n[5],c=(r||{}).plain;if(l)return null;var d=i,h={\"data-rc-order\":\"prependQueue\",\"data-rc-priority\":\"\".concat(u)};return d=toStyleStr(i,o,a,h,c),s&&Object.keys(s).forEach((function(e){if(!t[e]){t[e]=!0;var r=toStyleStr(normalizeStyle(s[e]),o,\"_effect-\".concat(e),h,c);e.startsWith(\"@layer\")?d=r+d:d+=r}})),[u,a,d]},CSS_VAR_PREFIX=\"cssVar\",useCSSVarRegister=function(e,t){var r=e.key,n=e.prefix,i=e.unitless,o=e.ignore,a=e.token,s=e.scope,l=void 0===s?\"\":s,u=(0,import_react7.useContext)(StyleContext_default),c=u.cache.instanceId,d=u.container,h=a._tokenKey,f=[].concat(_toConsumableArray(e.path),[r,l,h]);return useGlobalCache(CSS_VAR_PREFIX,f,(function(){var e=t(),a=_slicedToArray(transformToken(e,r,{prefix:n,unitless:i,ignore:o,scope:l}),2),s=a[0],u=a[1];return[s,u,uniqueHash(f,u),r]}),(function(e){var t=_slicedToArray(e,3)[2];isClientSide&&removeCSS(t,{mark:ATTR_MARK})}),(function(e){var t=_slicedToArray(e,3),n=t[1],i=t[2];if(n){var o=updateCSS(n,i,{mark:ATTR_MARK,prepend:\"queue\",attachTo:d,priority:-999});o[CSS_IN_JS_INSTANCE]=c,o.setAttribute(ATTR_TOKEN,r)}}))},extract5=function(e,t,r){var n=_slicedToArray(e,4),i=n[1],o=n[2],a=n[3],s=(r||{}).plain;return i?[-999,o,toStyleStr(i,a,o,{\"data-rc-order\":\"prependQueue\",\"data-rc-priority\":\"\".concat(-999)},s)]:null},useCSSVarRegister_default=useCSSVarRegister,ExtractStyleFns=_defineProperty(_defineProperty(_defineProperty({},STYLE_PREFIX,extract3),TOKEN_PREFIX,extract),CSS_VAR_PREFIX,extract5);init_globals();var Keyframe=function(){function e(t,r){_classCallCheck(this,e),_defineProperty(this,\"name\",void 0),_defineProperty(this,\"style\",void 0),_defineProperty(this,\"_keyframe\",!0),this.name=t,this.style=r}return _createClass(e,[{key:\"getName\",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:\"\";return e?\"\".concat(e,\"-\").concat(this.name):this.name}}]),e}(),Keyframes_default=Keyframe;function noSplit(e){return e.notSplit=!0,e}init_globals();var keyMap={inset:[\"top\",\"right\",\"bottom\",\"left\"],insetBlock:[\"top\",\"bottom\"],insetBlockStart:[\"top\"],insetBlockEnd:[\"bottom\"],insetInline:[\"left\",\"right\"],insetInlineStart:[\"left\"],insetInlineEnd:[\"right\"],marginBlock:[\"marginTop\",\"marginBottom\"],marginBlockStart:[\"marginTop\"],marginBlockEnd:[\"marginBottom\"],marginInline:[\"marginLeft\",\"marginRight\"],marginInlineStart:[\"marginLeft\"],marginInlineEnd:[\"marginRight\"],paddingBlock:[\"paddingTop\",\"paddingBottom\"],paddingBlockStart:[\"paddingTop\"],paddingBlockEnd:[\"paddingBottom\"],paddingInline:[\"paddingLeft\",\"paddingRight\"],paddingInlineStart:[\"paddingLeft\"],paddingInlineEnd:[\"paddingRight\"],borderBlock:noSplit([\"borderTop\",\"borderBottom\"]),borderBlockStart:noSplit([\"borderTop\"]),borderBlockEnd:noSplit([\"borderBottom\"]),borderInline:noSplit([\"borderLeft\",\"borderRight\"]),borderInlineStart:noSplit([\"borderLeft\"]),borderInlineEnd:noSplit([\"borderRight\"]),borderBlockWidth:[\"borderTopWidth\",\"borderBottomWidth\"],borderBlockStartWidth:[\"borderTopWidth\"],borderBlockEndWidth:[\"borderBottomWidth\"],borderInlineWidth:[\"borderLeftWidth\",\"borderRightWidth\"],borderInlineStartWidth:[\"borderLeftWidth\"],borderInlineEndWidth:[\"borderRightWidth\"],borderBlockStyle:[\"borderTopStyle\",\"borderBottomStyle\"],borderBlockStartStyle:[\"borderTopStyle\"],borderBlockEndStyle:[\"borderBottomStyle\"],borderInlineStyle:[\"borderLeftStyle\",\"borderRightStyle\"],borderInlineStartStyle:[\"borderLeftStyle\"],borderInlineEndStyle:[\"borderRightStyle\"],borderBlockColor:[\"borderTopColor\",\"borderBottomColor\"],borderBlockStartColor:[\"borderTopColor\"],borderBlockEndColor:[\"borderBottomColor\"],borderInlineColor:[\"borderLeftColor\",\"borderRightColor\"],borderInlineStartColor:[\"borderLeftColor\"],borderInlineEndColor:[\"borderRightColor\"],borderStartStartRadius:[\"borderTopLeftRadius\"],borderStartEndRadius:[\"borderTopRightRadius\"],borderEndStartRadius:[\"borderBottomLeftRadius\"],borderEndEndRadius:[\"borderBottomRightRadius\"]};init_globals(),init_globals();var import_react8=__toESM(require_react()),IconContext2=(0,import_react8.createContext)({}),Context_default2=IconContext2;function _toArray(e){return _arrayWithHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray(e)||_nonIterableRest()}function get(e,t){for(var r=e,n=0;n__left_angle_mark_t.length;n+=1){if(null==r)return;r=r[t[n]]}return r}function internalSet(e,t,r,n){if(!t.length)return r;var i,o=_toArray(t),a=o[0],s=o.slice(1);return i=e||\"number\"!=typeof a?Array.isArray(e)?_toConsumableArray(e):_objectSpread2({},e):[],n&&void 0===r&&1===s.length?delete i[a][s[0]]:i[a]=internalSet(i[a],s,r,n),i}function set(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return t.length&&n&&void 0===r&&!get(e,t.slice(0,-1))?e:internalSet(e,t,r,n)}function isObject(e){return\"object\"===_typeof(e)&&null!==e&&Object.getPrototypeOf(e)===Object.prototype}function createEmpty(e){return Array.isArray(e)?[]:{}}init_globals(),init_globals(),init_globals();var keys=\"undefined\"==typeof Reflect?Object.keys:Reflect.ownKeys;function merge(){for(var e=arguments.length,t=new Array(e),r=0;r__left_angle_mark_e;r++)t[r]=arguments[r];var n=createEmpty(t[0]);return t.forEach((function(e){!function t(r,i){var o=new Set(i),a=get(e,r),s=Array.isArray(a);if(s||isObject(a)){if(!o.has(a)){o.add(a);var l=get(n,r);s?n=set(n,r,[]):l&&\"object\"===_typeof(l)||(n=set(n,r,createEmpty(a))),keys(a).forEach((function(e){t([].concat(_toConsumableArray(r),[e]),o)}))}}else n=set(n,r,a)}([])})),n}init_globals();var React36=__toESM(require_react());function noop(){}var deprecatedWarnList=null,warning3=noop;warning3=(e,t,r)=>{warning_default(e,`[antd: ${t}] ${r}`)};var WarningContext=React36.createContext({}),devUseWarning=e=>{const{strict:t}=React36.useContext(WarningContext),r=(r,n,i)=>{if(!r)if(!1===t&&\"deprecated\"===n){const t=deprecatedWarnList;deprecatedWarnList||(deprecatedWarnList={}),deprecatedWarnList[e]=deprecatedWarnList[e]||[],deprecatedWarnList[e].includes(i||\"\")||deprecatedWarnList[e].push(i||\"\"),t||import_console_browserify.default.warn(\"[antd] There exists deprecated usage in your code:\",deprecatedWarnList)}else warning3(r,e,i)};return r.deprecated=(e,t,n,i)=>{r(e,\"deprecated\",`\\`${t}\\` is deprecated. Please use \\`${n}\\` instead.${i?` ${i}`:\"\"}`)},r},warning_default2=warning3;init_globals();var import_react9=__toESM(require_react()),validateMessagesContext_default=(0,import_react9.createContext)(void 0);init_globals();var React38=__toESM(require_react());init_globals(),init_globals(),init_globals();var locale={items_per_page:\"/ page\",jump_to:\"Go to\",jump_to_confirm:\"confirm\",page:\"Page\",prev_page:\"Previous Page\",next_page:\"Next Page\",prev_5:\"Previous 5 Pages\",next_5:\"Next 5 Pages\",prev_3:\"Previous 3 Pages\",next_3:\"Next 3 Pages\",page_size:\"Page Size\"},en_US_default=locale;init_globals(),init_globals(),init_globals(),init_globals();var commonLocale={yearFormat:\"YYYY\",dayFormat:\"D\",cellMeridiemFormat:\"A\",monthBeforeYear:!0},locale2=_objectSpread2(_objectSpread2({},commonLocale),{},{locale:\"en_US\",today:\"Today\",now:\"Now\",backToToday:\"Back to today\",ok:\"OK\",clear:\"Clear\",month:\"Month\",year:\"Year\",timeSelect:\"select time\",dateSelect:\"select date\",weekSelect:\"Choose a week\",monthSelect:\"Choose a month\",yearSelect:\"Choose a year\",decadeSelect:\"Choose a decade\",dateFormat:\"M/D/YYYY\",dateTimeFormat:\"M/D/YYYY HH:mm:ss\",previousMonth:\"Previous month (PageUp)\",nextMonth:\"Next month (PageDown)\",previousYear:\"Last year (Control + left)\",nextYear:\"Next year (Control + right)\",previousDecade:\"Last decade\",nextDecade:\"Next decade\",previousCentury:\"Last century\",nextCentury:\"Next century\"}),en_US_default2=locale2;init_globals();var locale3={placeholder:\"Select time\",rangePlaceholder:[\"Start time\",\"End time\"]},en_US_default3=locale3,locale4={lang:Object.assign({placeholder:\"Select date\",yearPlaceholder:\"Select year\",quarterPlaceholder:\"Select quarter\",monthPlaceholder:\"Select month\",weekPlaceholder:\"Select week\",rangePlaceholder:[\"Start date\",\"End date\"],rangeYearPlaceholder:[\"Start year\",\"End year\"],rangeQuarterPlaceholder:[\"Start quarter\",\"End quarter\"],rangeMonthPlaceholder:[\"Start month\",\"End month\"],rangeWeekPlaceholder:[\"Start week\",\"End week\"]},en_US_default2),timePickerLocale:Object.assign({},en_US_default3)},en_US_default4=locale4,en_US_default5=en_US_default4,typeTemplate=\"${label} is not a valid ${type}\",localeValues={locale:\"en\",Pagination:en_US_default,DatePicker:en_US_default4,TimePicker:en_US_default3,Calendar:en_US_default5,global:{placeholder:\"Please select\"},Table:{filterTitle:\"Filter menu\",filterConfirm:\"OK\",filterReset:\"Reset\",filterEmptyText:\"No filters\",filterCheckall:\"Select all items\",filterSearchPlaceholder:\"Search in filters\",emptyText:\"No data\",selectAll:\"Select current page\",selectInvert:\"Invert current page\",selectNone:\"Clear all data\",selectionAll:\"Select all data\",sortTitle:\"Sort\",expand:\"Expand row\",collapse:\"Collapse row\",triggerDesc:\"Click to sort descending\",triggerAsc:\"Click to sort ascending\",cancelSort:\"Click to cancel sorting\"},Tour:{Next:\"Next\",Previous:\"Previous\",Finish:\"Finish\"},Modal:{okText:\"OK\",cancelText:\"Cancel\",justOkText:\"OK\"},Popconfirm:{okText:\"OK\",cancelText:\"Cancel\"},Transfer:{titles:[\"\",\"\"],searchPlaceholder:\"Search here\",itemUnit:\"item\",itemsUnit:\"items\",remove:\"Remove\",selectCurrent:\"Select current page\",removeCurrent:\"Remove current page\",selectAll:\"Select all data\",deselectAll:\"Deselect all data\",removeAll:\"Remove all data\",selectInvert:\"Invert current page\"},Upload:{uploading:\"Uploading...\",removeFile:\"Remove file\",uploadError:\"Upload error\",previewFile:\"Preview file\",downloadFile:\"Download file\"},Empty:{description:\"No data\"},Icon:{icon:\"icon\"},Text:{edit:\"Edit\",copy:\"Copy\",copied:\"Copied\",expand:\"Expand\",collapse:\"Collapse\"},Form:{optional:\"(optional)\",defaultValidateMessages:{default:\"Field validation error for ${label}\",required:\"Please enter ${label}\",enum:\"${label} must be one of [${enum}]\",whitespace:\"${label} cannot be a blank character\",date:{format:\"${label} date format is invalid\",parse:\"${label} cannot be converted to a date\",invalid:\"${label} is an invalid date\"},types:{string:typeTemplate,method:typeTemplate,array:typeTemplate,object:typeTemplate,number:typeTemplate,date:typeTemplate,boolean:typeTemplate,integer:typeTemplate,float:typeTemplate,regexp:typeTemplate,email:typeTemplate,url:typeTemplate,hex:typeTemplate},string:{len:\"${label} must be ${len} characters\",min:\"${label} must be at least ${min} characters\",max:\"${label} must be up to ${max} characters\",range:\"${label} must be between ${min}-${max} characters\"},number:{len:\"${label} must be equal to ${len}\",min:\"${label} must be minimum ${min}\",max:\"${label} must be maximum ${max}\",range:\"${label} must be between ${min}-${max}\"},array:{len:\"Must be ${len} ${label}\",min:\"At least ${min} ${label}\",max:\"At most ${max} ${label}\",range:\"The amount of ${label} must be between ${min}-${max}\"},pattern:{mismatch:\"${label} does not match the pattern ${pattern}\"}}},Image:{preview:\"Preview\"},QRCode:{expired:\"QR code expired\",refresh:\"Refresh\",scanned:\"Scanned\"},ColorPicker:{presetEmpty:\"Empty\",transparent:\"Transparent\",singleColor:\"Single\",gradientColor:\"Gradient\"}},en_US_default6=localeValues,runtimeLocale=Object.assign({},en_US_default6.Modal),localeList=[],generateLocale=()=>localeList.reduce(((e,t)=>Object.assign(Object.assign({},e),t)),en_US_default6.Modal);function changeConfirmLocale(e){if(e){const t=Object.assign({},e);return localeList.push(t),runtimeLocale=generateLocale(),()=>{localeList=localeList.filter((e=>e!==t)),runtimeLocale=generateLocale()}}runtimeLocale=Object.assign({},en_US_default6.Modal)}function getConfirmLocale(){return runtimeLocale}init_globals();var import_react10=__toESM(require_react()),LocaleContext=(0,import_react10.createContext)(void 0),context_default=LocaleContext;init_globals();var React37=__toESM(require_react()),useLocale=(e,t)=>{const r=React37.useContext(context_default);return[React37.useMemo((()=>{var n;const i=t||en_US_default6[e],o=null!==(n=null==r?void 0:r[e])&&void 0!==n?n:{};return Object.assign(Object.assign({},\"function\"==typeof i?i():i),o||{})}),[e,t,r]),React37.useMemo((()=>{const e=null==r?void 0:r.locale;return(null==r?void 0:r.exist)&&!e?en_US_default6.locale:e}),[r])]},useLocale_default=useLocale,ANT_MARK=\"internalMark\",LocaleProvider=e=>{const{locale:t={},children:r,_ANT_MARK__:n}=e;devUseWarning(\"LocaleProvider\")(n===ANT_MARK,\"deprecated\",\"`LocaleProvider` is deprecated. Please use `locale` with `ConfigProvider` instead: http://u.ant.design/locale\"),React38.useEffect((()=>changeConfirmLocale(null==t?void 0:t.Modal)),[t]);const i=React38.useMemo((()=>Object.assign(Object.assign({},t),{exist:!0})),[t]);return React38.createElement(context_default.Provider,{value:i},r)};LocaleProvider.displayName=\"LocaleProvider\";var locale_default=LocaleProvider;init_globals();var import_react11=__toESM(require_react());init_globals(),init_globals();var defaultPresetColors={blue:\"#1677FF\",purple:\"#722ED1\",cyan:\"#13C2C2\",green:\"#52C41A\",magenta:\"#EB2F96\",pink:\"#EB2F96\",red:\"#F5222D\",orange:\"#FA8C16\",yellow:\"#FADB14\",volcano:\"#FA541C\",geekblue:\"#2F54EB\",gold:\"#FAAD14\",lime:\"#A0D911\"},seedToken=Object.assign(Object.assign({},defaultPresetColors),{colorPrimary:\"#1677ff\",colorSuccess:\"#52c41a\",colorWarning:\"#faad14\",colorError:\"#ff4d4f\",colorInfo:\"#1677ff\",colorLink:\"\",colorTextBase:\"\",colorBgBase:\"\",fontFamily:\"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,\\n'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',\\n'Noto Color Emoji'\",fontFamilyCode:\"'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace\",fontSize:14,lineWidth:1,lineType:\"solid\",motionUnit:.1,motionBase:0,motionEaseOutCirc:\"cubic-bezier(0.08, 0.82, 0.17, 1)\",motionEaseInOutCirc:\"cubic-bezier(0.78, 0.14, 0.15, 0.86)\",motionEaseOut:\"cubic-bezier(0.215, 0.61, 0.355, 1)\",motionEaseInOut:\"cubic-bezier(0.645, 0.045, 0.355, 1)\",motionEaseOutBack:\"cubic-bezier(0.12, 0.4, 0.29, 1.46)\",motionEaseInBack:\"cubic-bezier(0.71, -0.46, 0.88, 0.6)\",motionEaseInQuint:\"cubic-bezier(0.755, 0.05, 0.855, 0.06)\",motionEaseOutQuint:\"cubic-bezier(0.23, 1, 0.32, 1)\",borderRadius:6,sizeUnit:4,sizeStep:4,sizePopupArrow:16,controlHeight:32,zIndexBase:0,zIndexPopupBase:1e3,opacityImage:1,wireframe:!1,motion:!0}),seed_default=seedToken;function genColorMapToken(e,t){let{generateColorPalettes:r,generateNeutralColorPalettes:n}=t;const{colorSuccess:i,colorWarning:o,colorError:a,colorInfo:s,colorPrimary:l,colorBgBase:u,colorTextBase:c}=e,d=r(l),h=r(i),f=r(o),p=r(a),m=r(s),g=n(u,c),_=r(e.colorLink||e.colorInfo),b=new TinyColor(p[1]).mix(new TinyColor(p[3]),50).toHexString();return Object.assign(Object.assign({},g),{colorPrimaryBg:d[1],colorPrimaryBgHover:d[2],colorPrimaryBorder:d[3],colorPrimaryBorderHover:d[4],colorPrimaryHover:d[5],colorPrimary:d[6],colorPrimaryActive:d[7],colorPrimaryTextHover:d[8],colorPrimaryText:d[9],colorPrimaryTextActive:d[10],colorSuccessBg:h[1],colorSuccessBgHover:h[2],colorSuccessBorder:h[3],colorSuccessBorderHover:h[4],colorSuccessHover:h[4],colorSuccess:h[6],colorSuccessActive:h[7],colorSuccessTextHover:h[8],colorSuccessText:h[9],colorSuccessTextActive:h[10],colorErrorBg:p[1],colorErrorBgHover:p[2],colorErrorBgFilledHover:b,colorErrorBgActive:p[3],colorErrorBorder:p[3],colorErrorBorderHover:p[4],colorErrorHover:p[5],colorError:p[6],colorErrorActive:p[7],colorErrorTextHover:p[8],colorErrorText:p[9],colorErrorTextActive:p[10],colorWarningBg:f[1],colorWarningBgHover:f[2],colorWarningBorder:f[3],colorWarningBorderHover:f[4],colorWarningHover:f[4],colorWarning:f[6],colorWarningActive:f[7],colorWarningTextHover:f[8],colorWarningText:f[9],colorWarningTextActive:f[10],colorInfoBg:m[1],colorInfoBgHover:m[2],colorInfoBorder:m[3],colorInfoBorderHover:m[4],colorInfoHover:m[4],colorInfo:m[6],colorInfoActive:m[7],colorInfoTextHover:m[8],colorInfoText:m[9],colorInfoTextActive:m[10],colorLinkHover:_[4],colorLink:_[6],colorLinkActive:_[7],colorBgMask:new TinyColor(\"#000\").setAlpha(.45).toRgbString(),colorWhite:\"#fff\"})}init_globals(),init_globals(),init_globals();var genRadius=e=>{let t=e,r=e,n=e,i=e;return e__left_angle_mark_6&&e>=5?t=e+1:e__left_angle_mark_16&&e>=6?t=e+2:e>=16&&(t=16),e__left_angle_mark_7&&e>=5?r=4:e__left_angle_mark_8&&e>=7?r=5:e__left_angle_mark_14&&e>=8?r=6:e__left_angle_mark_16&&e>=14?r=7:e>=16&&(r=8),e__left_angle_mark_6&&e>=2?n=1:e>=6&&(n=2),e>4&&e__left_angle_mark_8?i=4:e>=8&&(i=6),{borderRadius:e,borderRadiusXS:n,borderRadiusSM:r,borderRadiusLG:t,borderRadiusOuter:i}},genRadius_default=genRadius;function genCommonMapToken(e){const{motionUnit:t,motionBase:r,borderRadius:n,lineWidth:i}=e;return Object.assign({motionDurationFast:`${(r+t).toFixed(1)}s`,motionDurationMid:`${(r+2*t).toFixed(1)}s`,motionDurationSlow:`${(r+3*t).toFixed(1)}s`,lineWidthBold:i+1},genRadius_default(n))}init_globals();var genControlHeight=e=>{const{controlHeight:t}=e;return{controlHeightSM:.75*t,controlHeightXS:.5*t,controlHeightLG:1.25*t}},genControlHeight_default=genControlHeight;function getLineHeight(e){return(e+8)/e}function getFontSizes(e){const t=new Array(10).fill(null).map(((t,r)=>{const n=r-1,i=e*Math.pow(Math.E,n/5),o=r>1?Math.floor(i):Math.ceil(i);return 2*Math.floor(o/2)}));return t[1]=e,t.map((e=>({size:e,lineHeight:getLineHeight(e)})))}init_globals(),init_globals();var genFontMapToken=e=>{const t=getFontSizes(e),r=t.map((e=>e.size)),n=t.map((e=>e.lineHeight)),i=r[1],o=r[0],a=r[2],s=n[1],l=n[0],u=n[2];return{fontSizeSM:o,fontSize:i,fontSizeLG:a,fontSizeXL:r[3],fontSizeHeading1:r[6],fontSizeHeading2:r[5],fontSizeHeading3:r[4],fontSizeHeading4:r[3],fontSizeHeading5:r[2],lineHeight:s,lineHeightLG:u,lineHeightSM:l,fontHeight:Math.round(s*i),fontHeightLG:Math.round(u*a),fontHeightSM:Math.round(l*o),lineHeightHeading1:n[6],lineHeightHeading2:n[5],lineHeightHeading3:n[4],lineHeightHeading4:n[3],lineHeightHeading5:n[2]}},genFontMapToken_default=genFontMapToken;function genSizeMapToken(e){const{sizeUnit:t,sizeStep:r}=e;return{sizeXXL:t*(r+8),sizeXL:t*(r+4),sizeLG:t*(r+2),sizeMD:t*(r+1),sizeMS:t*r,size:t*r,sizeSM:t*(r-1),sizeXS:t*(r-2),sizeXXS:t*(r-3)}}init_globals(),init_globals(),init_globals();var getAlphaColor=(e,t)=>new TinyColor(e).setAlpha(t).toRgbString(),getSolidColor=(e,t)=>new TinyColor(e).darken(t).toHexString(),generateColorPalettes=e=>{const t=generate(e);return{1:t[0],2:t[1],3:t[2],4:t[3],5:t[4],6:t[5],7:t[6],8:t[4],9:t[5],10:t[6]}},generateNeutralColorPalettes=(e,t)=>{const r=e||\"#fff\",n=t||\"#000\";return{colorBgBase:r,colorTextBase:n,colorText:getAlphaColor(n,.88),colorTextSecondary:getAlphaColor(n,.65),colorTextTertiary:getAlphaColor(n,.45),colorTextQuaternary:getAlphaColor(n,.25),colorFill:getAlphaColor(n,.15),colorFillSecondary:getAlphaColor(n,.06),colorFillTertiary:getAlphaColor(n,.04),colorFillQuaternary:getAlphaColor(n,.02),colorBgSolid:getAlphaColor(n,1),colorBgSolidHover:getAlphaColor(n,.75),colorBgSolidActive:getAlphaColor(n,.95),colorBgLayout:getSolidColor(r,4),colorBgContainer:getSolidColor(r,0),colorBgElevated:getSolidColor(r,0),colorBgSpotlight:getAlphaColor(n,.85),colorBgBlur:\"transparent\",colorBorder:getSolidColor(r,15),colorBorderSecondary:getSolidColor(r,6)}};function derivative(e){presetPrimaryColors.pink=presetPrimaryColors.magenta,presetPalettes.pink=presetPalettes.magenta;const t=Object.keys(defaultPresetColors).map((t=>{const r=e[t]===presetPrimaryColors[t]?presetPalettes[t]:generate(e[t]);return new Array(10).fill(1).reduce(((e,n,i)=>(e[`${t}-${i+1}`]=r[i],e[`${t}${i+1}`]=r[i],e)),{})})).reduce(((e,t)=>e=Object.assign(Object.assign({},e),t)),{});return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},e),t),genColorMapToken(e,{generateColorPalettes:generateColorPalettes,generateNeutralColorPalettes:generateNeutralColorPalettes})),genFontMapToken_default(e.fontSize)),genSizeMapToken(e)),genControlHeight_default(e)),genCommonMapToken(e))}var defaultTheme=createTheme(derivative),defaultConfig={token:seed_default,override:{override:seed_default},hashed:!0},DesignTokenContext=import_react11.default.createContext(defaultConfig);init_globals();var React40=__toESM(require_react()),defaultPrefixCls=\"ant\",defaultIconPrefixCls=\"anticon\",Variants=[\"outlined\",\"borderless\",\"filled\"],defaultGetPrefixCls=(e,t)=>t||(e?`${defaultPrefixCls}-${e}`:defaultPrefixCls),ConfigContext=React40.createContext({getPrefixCls:defaultGetPrefixCls,iconPrefixCls:defaultIconPrefixCls}),{Consumer:ConfigConsumer}=ConfigContext;init_globals();var dynamicStyleMark=`-ant-${Date.now()}-${Math.random()}`;function getStyle(e,t){const r={},n=(e,t)=>{let r=e.clone();return r=(null==t?void 0:t(r))||r,r.toRgbString()},i=(e,t)=>{const i=new TinyColor(e),o=generate(i.toRgbString());r[`${t}-color`]=n(i),r[`${t}-color-disabled`]=o[1],r[`${t}-color-hover`]=o[4],r[`${t}-color-active`]=o[6],r[`${t}-color-outline`]=i.clone().setAlpha(.2).toRgbString(),r[`${t}-color-deprecated-bg`]=o[0],r[`${t}-color-deprecated-border`]=o[2]};if(t.primaryColor){i(t.primaryColor,\"primary\");const e=new TinyColor(t.primaryColor),o=generate(e.toRgbString());o.forEach(((e,t)=>{r[`primary-${t+1}`]=e})),r[\"primary-color-deprecated-l-35\"]=n(e,(e=>e.lighten(35))),r[\"primary-color-deprecated-l-20\"]=n(e,(e=>e.lighten(20))),r[\"primary-color-deprecated-t-20\"]=n(e,(e=>e.tint(20))),r[\"primary-color-deprecated-t-50\"]=n(e,(e=>e.tint(50))),r[\"primary-color-deprecated-f-12\"]=n(e,(e=>e.setAlpha(.12*e.getAlpha())));const a=new TinyColor(o[0]);r[\"primary-color-active-deprecated-f-30\"]=n(a,(e=>e.setAlpha(.3*e.getAlpha()))),r[\"primary-color-active-deprecated-d-02\"]=n(a,(e=>e.darken(2)))}return t.successColor&&i(t.successColor,\"success\"),t.warningColor&&i(t.warningColor,\"warning\"),t.errorColor&&i(t.errorColor,\"error\"),t.infoColor&&i(t.infoColor,\"info\"),`\\n :root {\\n ${Object.keys(r).map((t=>`--${e}-${t}: ${r[t]};`)).join(\"\\n\")}\\n }\\n `.trim()}function registerTheme(e,t){const r=getStyle(e,t);canUseDom()?updateCSS(r,`${dynamicStyleMark}-dynamic-theme`):warning_default2(!1,\"ConfigProvider\",\"SSR do not support dynamic theme with css variables.\")}init_globals();var React41=__toESM(require_react()),DisabledContext=React41.createContext(!1),DisabledContextProvider=e=>{let{children:t,disabled:r}=e;const n=React41.useContext(DisabledContext);return React41.createElement(DisabledContext.Provider,{value:null!=r?r:n},t)},DisabledContext_default=DisabledContext;init_globals();var import_react12=__toESM(require_react());init_globals();var React42=__toESM(require_react()),SizeContext=React42.createContext(void 0),SizeContextProvider=e=>{let{children:t,size:r}=e;const n=React42.useContext(SizeContext);return React42.createElement(SizeContext.Provider,{value:r||n},t)},SizeContext_default=SizeContext;function useConfig(){return{componentDisabled:(0,import_react12.useContext)(DisabledContext_default),componentSize:(0,import_react12.useContext)(SizeContext_default)}}var useConfig_default=useConfig;init_globals(),init_globals(),init_globals(),init_globals();var import_react14=__toESM(require_react());init_globals(),init_globals(),init_globals();var AbstractCalculator=_createClass((function e(){_classCallCheck(this,e)})),calculator_default2=AbstractCalculator,CALC_UNIT2=\"CALC_UNIT\",regexp2=new RegExp(CALC_UNIT2,\"g\");function unit2(e){return\"number\"==typeof e?\"\".concat(e).concat(CALC_UNIT2):e}var CSSCalculator2=function(e){_inherits(r,e);var t=_createSuper(r);function r(e,n){var i;_classCallCheck(this,r),_defineProperty(_assertThisInitialized(i=t.call(this)),\"result\",\"\"),_defineProperty(_assertThisInitialized(i),\"unitlessCssVar\",void 0),_defineProperty(_assertThisInitialized(i),\"lowPriority\",void 0);var o=_typeof(e);return i.unitlessCssVar=n,e instanceof r?i.result=\"(\".concat(e.result,\")\"):\"number\"===o?i.result=unit2(e):\"string\"===o&&(i.result=e),i}return _createClass(r,[{key:\"add\",value:function(e){return e instanceof r?this.result=\"\".concat(this.result,\" + \").concat(e.getResult()):\"number\"!=typeof e&&\"string\"!=typeof e||(this.result=\"\".concat(this.result,\" + \").concat(unit2(e))),this.lowPriority=!0,this}},{key:\"sub\",value:function(e){return e instanceof r?this.result=\"\".concat(this.result,\" - \").concat(e.getResult()):\"number\"!=typeof e&&\"string\"!=typeof e||(this.result=\"\".concat(this.result,\" - \").concat(unit2(e))),this.lowPriority=!0,this}},{key:\"mul\",value:function(e){return this.lowPriority&&(this.result=\"(\".concat(this.result,\")\")),e instanceof r?this.result=\"\".concat(this.result,\" * \").concat(e.getResult(!0)):\"number\"!=typeof e&&\"string\"!=typeof e||(this.result=\"\".concat(this.result,\" * \").concat(e)),this.lowPriority=!1,this}},{key:\"div\",value:function(e){return this.lowPriority&&(this.result=\"(\".concat(this.result,\")\")),e instanceof r?this.result=\"\".concat(this.result,\" / \").concat(e.getResult(!0)):\"number\"!=typeof e&&\"string\"!=typeof e||(this.result=\"\".concat(this.result,\" / \").concat(e)),this.lowPriority=!1,this}},{key:\"getResult\",value:function(e){return this.lowPriority||e?\"(\".concat(this.result,\")\"):this.result}},{key:\"equal\",value:function(e){var t=this,r=(e||{}).unit,n=!0;return\"boolean\"==typeof r?n=r:Array.from(this.unitlessCssVar).some((function(e){return t.result.includes(e)}))&&(n=!1),this.result=this.result.replace(regexp2,n?\"px\":\"\"),void 0!==this.lowPriority?\"calc(\".concat(this.result,\")\"):this.result}}]),r}(calculator_default2);init_globals();var NumCalculator2=function(e){_inherits(r,e);var t=_createSuper(r);function r(e){var n;return _classCallCheck(this,r),_defineProperty(_assertThisInitialized(n=t.call(this)),\"result\",0),e instanceof r?n.result=e.result:\"number\"==typeof e&&(n.result=e),n}return _createClass(r,[{key:\"add\",value:function(e){return e instanceof r?this.result+=e.result:\"number\"==typeof e&&(this.result+=e),this}},{key:\"sub\",value:function(e){return e instanceof r?this.result-=e.result:\"number\"==typeof e&&(this.result-=e),this}},{key:\"mul\",value:function(e){return e instanceof r?this.result*=e.result:\"number\"==typeof e&&(this.result*=e),this}},{key:\"div\",value:function(e){return e instanceof r?this.result/=e.result:\"number\"==typeof e&&(this.result/=e),this}},{key:\"equal\",value:function(){return this.result}}]),r}(calculator_default2),NumCalculator_default=NumCalculator2,genCalc=function(e,t){var r=\"css\"===e?CSSCalculator2:NumCalculator_default;return function(e){return new r(e,t)}},calc_default2=genCalc;init_globals();var getCompVarPrefix=function(e,t){return\"\".concat([t,e.replace(/([A-Z]+)([A-Z][a-z]+)/g,\"$1-$2\").replace(/([a-z])([A-Z])/g,\"$1-$2\")].filter(Boolean).join(\"-\"))},getCompVarPrefix_default=getCompVarPrefix;init_globals(),init_globals(),init_globals();var React43=__toESM(require_react());function useEvent(e){var t=React43.useRef();t.current=e;var r=React43.useCallback((function(){for(var e,r=arguments.length,n=new Array(r),i=0;i__left_angle_mark_r;i++)n[i]=arguments[i];return null===(e=t.current)||void 0===e?void 0:e.call.apply(e,[t].concat(n))}),[]);return r}init_globals(),init_globals();var React44=__toESM(require_react());function useSafeState(e){var t=React44.useRef(!1),r=_slicedToArray(React44.useState(e),2),n=r[0],i=r[1];return React44.useEffect((function(){return t.current=!1,function(){t.current=!0}}),[]),[n,function(e,r){r&&t.current||i(e)}]}function hasValue(e){return void 0!==e}function useMergedState(e,t){var r=t||{},n=r.defaultValue,i=r.value,o=r.onChange,a=r.postState,s=_slicedToArray(useSafeState((function(){return hasValue(i)?i:hasValue(n)?\"function\"==typeof n?n():n:\"function\"==typeof e?e():e})),2),l=s[0],u=s[1],c=void 0!==i?i:l,d=a?a(c):c,h=useEvent(o),f=_slicedToArray(useSafeState([c]),2),p=f[0],m=f[1];return useLayoutUpdateEffect((function(){var e=p[0];l!==e&&h(l,e)}),[p]),useLayoutUpdateEffect((function(){hasValue(i)||u(i)}),[i]),[d,useEvent((function(e,t){u(e,t),m([c],t)}))]}function getComponentToken(e,t,r,n){var i=_objectSpread2({},t[e]);null!=n&&n.deprecatedTokens&&n.deprecatedTokens.forEach((function(t){var r,n=_slicedToArray(t,2),o=n[0],a=n[1];warning_default(!(null!=i&&i[o]),\"Component Token `\".concat(String(o),\"` of \").concat(String(e),\" is deprecated. Please use `\").concat(String(a),\"` instead.\")),(null!=i&&i[o]||null!=i&&i[a])&&(null!==(r=i[a])&&void 0!==r||(i[a]=null==i?void 0:i[o]))}));var o=_objectSpread2(_objectSpread2({},r),i);return Object.keys(o).forEach((function(e){o[e]===t[e]&&delete o[e]})),o}var getComponentToken_default=getComponentToken;init_globals(),init_globals();var enableStatistic=!0,recording=!0;function merge2(){for(var e=arguments.length,t=new Array(e),r=0;r__left_angle_mark_e;r++)t[r]=arguments[r];if(!enableStatistic)return Object.assign.apply(Object,[{}].concat(t));recording=!1;var n={};return t.forEach((function(e){\"object\"===_typeof(e)&&Object.keys(e).forEach((function(t){Object.defineProperty(n,t,{configurable:!0,enumerable:!0,get:function(){return e[t]}})}))})),recording=!0,n}var statistic={};function noop2(){}var statisticToken=function(e){var t,r=e,n=noop2;return enableStatistic&&\"undefined\"!=typeof Proxy&&(t=new Set,r=new Proxy(e,{get:function(e,r){var n;return recording&&(null===(n=t)||void 0===n||n.add(r)),e[r]}}),n=function(e,r){var n;statistic[e]={global:Array.from(t),component:_objectSpread2(_objectSpread2({},null===(n=statistic[e])||void 0===n?void 0:n.component),r)}}),{token:r,keys:t,flush:n}},statistic_default=statisticToken;function getDefaultComponentToken(e,t,r){var n;return\"function\"==typeof r?r(merge2(t,null!==(n=t[e])&&void 0!==n?n:{})):null!=r?r:{}}var getDefaultComponentToken_default=getDefaultComponentToken;function genMaxMin(e){return\"js\"===e?{max:Math.max,min:Math.min}:{max:function(){for(var e=arguments.length,t=new Array(e),r=0;r__left_angle_mark_e;r++)t[r]=arguments[r];return\"max(\".concat(t.map((function(e){return unit(e)})).join(\",\"),\")\")},min:function(){for(var e=arguments.length,t=new Array(e),r=0;r__left_angle_mark_e;r++)t[r]=arguments[r];return\"min(\".concat(t.map((function(e){return unit(e)})).join(\",\"),\")\")}}}init_globals();var maxmin_default=genMaxMin;init_globals();var import_react13=__toESM(require_react()),BEAT_LIMIT=6e5,ArrayKeyMap=function(){function e(){_classCallCheck(this,e),_defineProperty(this,\"map\",new Map),_defineProperty(this,\"objectIDMap\",new WeakMap),_defineProperty(this,\"nextID\",0),_defineProperty(this,\"lastAccessBeat\",new Map),_defineProperty(this,\"accessBeat\",0)}return _createClass(e,[{key:\"set\",value:function(e,t){this.clear();var r=this.getCompositeKey(e);this.map.set(r,t),this.lastAccessBeat.set(r,Date.now())}},{key:\"get\",value:function(e){var t=this.getCompositeKey(e),r=this.map.get(t);return this.lastAccessBeat.set(t,Date.now()),this.accessBeat+=1,r}},{key:\"getCompositeKey\",value:function(e){var t=this;return e.map((function(e){return e&&\"object\"===_typeof(e)?\"obj_\".concat(t.getObjectID(e)):\"\".concat(_typeof(e),\"_\").concat(e)})).join(\"|\")}},{key:\"getObjectID\",value:function(e){if(this.objectIDMap.has(e))return this.objectIDMap.get(e);var t=this.nextID;return this.objectIDMap.set(e,t),this.nextID+=1,t}},{key:\"clear\",value:function(){var e=this;if(this.accessBeat>1e4){var t=Date.now();this.lastAccessBeat.forEach((function(r,n){t-r>BEAT_LIMIT&&(e.map.delete(n),e.lastAccessBeat.delete(n))})),this.accessBeat=0}}}]),e}(),uniqueMap=new ArrayKeyMap;function useUniqueMemo(e,t){return import_react13.default.useMemo((function(){var r=uniqueMap.get(t);if(r)return r;var n=e();return uniqueMap.set(t,n),n}),t)}var useUniqueMemo_default=useUniqueMemo;init_globals();var useDefaultCSP=function(){return{}},useCSP_default=useDefaultCSP;function genStyleUtils(e){var t=e.useCSP,r=void 0===t?useCSP_default:t,n=e.useToken,i=e.usePrefix,o=e.getResetStyles,a=e.getCommonStyle,s=e.getCompUnitless;function l(t,s,l){var u=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},c=Array.isArray(t)?t:[t,t],d=_slicedToArray(c,1)[0],h=c.join(\"-\"),f=e.layer||{name:\"antd\"};return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,c=n(),p=c.theme,m=c.realToken,g=c.hashId,_=c.token,b=c.cssVar,y=i(),v=y.rootPrefixCls,A=y.iconPrefixCls,w=r(),S=b?\"css\":\"js\",E=useUniqueMemo_default((function(){var e=new Set;return b&&Object.keys(u.unitless||{}).forEach((function(t){e.add(token2CSSVar(t,b.prefix)),e.add(token2CSSVar(t,getCompVarPrefix_default(d,b.prefix)))})),calc_default2(S,e)}),[S,d,null==b?void 0:b.prefix]),x=maxmin_default(S),C=x.max,T=x.min,R={theme:p,token:_,hashId:g,nonce:function(){return w.nonce},clientOnly:u.clientOnly,layer:f,order:u.order||-999};return useStyleRegister(_objectSpread2(_objectSpread2({},R),{},{clientOnly:!1,path:[\"Shared\",v]}),(function(){return\"function\"==typeof o?o(_):[]})),[useStyleRegister(_objectSpread2(_objectSpread2({},R),{},{path:[h,e,A]}),(function(){if(!1===u.injectStyle)return[];var r=statistic_default(_),n=r.token,i=r.flush,o=getDefaultComponentToken_default(d,m,l),c=\".\".concat(e),h=getComponentToken_default(d,m,o,{deprecatedTokens:u.deprecatedTokens});b&&o&&\"object\"===_typeof(o)&&Object.keys(o).forEach((function(e){o[e]=\"var(\".concat(token2CSSVar(e,getCompVarPrefix_default(d,b.prefix)),\")\")}));var f=merge2(n,{componentCls:c,prefixCls:e,iconCls:\".\".concat(A),antCls:\".\".concat(v),calc:E,max:C,min:T},b?o:h),p=s(f,{hashId:g,prefixCls:e,rootPrefixCls:v,iconPrefixCls:A});i(d,h);var y=\"function\"==typeof a?a(f,e,t,u.resetFont):null;return[!1===u.resetStyle?null:y,p]})),g]}}return{genStyleHooks:function(e,t,r,i){var o=Array.isArray(e)?e[0]:e;function a(e){return\"\".concat(String(o)).concat(e.slice(0,1).toUpperCase()).concat(e.slice(1))}var u=(null==i?void 0:i.unitless)||{},c=_objectSpread2(_objectSpread2({},\"function\"==typeof s?s(e):{}),{},_defineProperty({},a(\"zIndexPopup\"),!0));Object.keys(u).forEach((function(e){c[a(e)]=u[e]}));var d=_objectSpread2(_objectSpread2({},i),{},{unitless:c,prefixToken:a}),h=l(e,t,r,d),f=function(e,t,r){var i=r.unitless,o=r.injectStyle,a=void 0===o||o,s=r.prefixToken,l=r.ignore,u=function(o){var a=o.rootCls,u=o.cssVar,c=void 0===u?{}:u,d=n().realToken;return useCSSVarRegister_default({path:[e],prefix:c.prefix,key:c.key,unitless:i,ignore:l,token:d,scope:a},(function(){var n=getDefaultComponentToken_default(e,d,t),i=getComponentToken_default(e,d,n,{deprecatedTokens:null==r?void 0:r.deprecatedTokens});return Object.keys(n).forEach((function(e){i[s(e)]=i[e],delete i[e]})),i})),null},c=function(t){var r=n().cssVar;return[function(n){return a&&r?import_react14.default.createElement(import_react14.default.Fragment,null,import_react14.default.createElement(u,{rootCls:t,cssVar:r,component:e}),n):n},null==r?void 0:r.key]};return c}(o,r,d);return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,r=_slicedToArray(h(e,t),2)[1],n=_slicedToArray(f(t),2);return[n[0],r,n[1]]}},genSubStyleComponent:function(e,t,r){var n=l(e,t,r,_objectSpread2({resetStyle:!1,order:-998},arguments.length>3&&void 0!==arguments[3]?arguments[3]:{})),i=function(e){var t=e.prefixCls,r=e.rootCls;return n(t,void 0===r?t:r),null};return i.displayName=\"SubStyle_\".concat(String(Array.isArray(e)?e.join(\".\"):e)),i},genComponentStyleHook:l}}var genStyleUtils_default=genStyleUtils;init_globals(),init_globals();var PresetColors=[\"blue\",\"purple\",\"cyan\",\"green\",\"magenta\",\"pink\",\"red\",\"orange\",\"yellow\",\"volcano\",\"geekblue\",\"lime\",\"gold\"];init_globals();var import_react15=__toESM(require_react());init_globals(),init_globals();var version_default=\"5.21.6\",version_default2=version_default;function isStableColor(e){return e>=0&&e__left_angle_mark_=255}function getAlphaColor2(e,t){const{r:r,g:n,b:i,a:o}=new TinyColor(e).toRgb();if(o__left_angle_mark_1)return e;const{r:a,g:s,b:l}=new TinyColor(t).toRgb();for(let u=.01;u__left_angle_mark_=1;u+=.01){const e=Math.round((r-a*(1-u))/u),t=Math.round((n-s*(1-u))/u),o=Math.round((i-l*(1-u))/u);if(isStableColor(e)&&isStableColor(t)&&isStableColor(o))return new TinyColor({r:e,g:t,b:o,a:Math.round(100*u)/100}).toRgbString()}return new TinyColor({r:r,g:n,b:i,a:1}).toRgbString()}init_globals(),init_globals();var getAlphaColor_default=getAlphaColor2,__rest=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)__left_angle_mark_0&&(r[n]=e[n]);if(null!=e&&\"function\"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i__left_angle_mark_n.length;i++)t.indexOf(n[i])__left_angle_mark_0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r};function formatToken(e){const{override:t}=e,r=__rest(e,[\"override\"]),n=Object.assign({},t);Object.keys(seed_default).forEach((e=>{delete n[e]}));const i=Object.assign(Object.assign({},r),n),o=1200,a=1600;if(!1===i.motion){const e=\"0s\";i.motionDurationFast=e,i.motionDurationMid=e,i.motionDurationSlow=e}return Object.assign(Object.assign(Object.assign({},i),{colorFillContent:i.colorFillSecondary,colorFillContentHover:i.colorFill,colorFillAlter:i.colorFillQuaternary,colorBgContainerDisabled:i.colorFillTertiary,colorBorderBg:i.colorBgContainer,colorSplit:getAlphaColor_default(i.colorBorderSecondary,i.colorBgContainer),colorTextPlaceholder:i.colorTextQuaternary,colorTextDisabled:i.colorTextQuaternary,colorTextHeading:i.colorText,colorTextLabel:i.colorTextSecondary,colorTextDescription:i.colorTextTertiary,colorTextLightSolid:i.colorWhite,colorHighlight:i.colorError,colorBgTextHover:i.colorFillSecondary,colorBgTextActive:i.colorFill,colorIcon:i.colorTextTertiary,colorIconHover:i.colorText,colorErrorOutline:getAlphaColor_default(i.colorErrorBg,i.colorBgContainer),colorWarningOutline:getAlphaColor_default(i.colorWarningBg,i.colorBgContainer),fontSizeIcon:i.fontSizeSM,lineWidthFocus:3*i.lineWidth,lineWidth:i.lineWidth,controlOutlineWidth:2*i.lineWidth,controlInteractiveSize:i.controlHeight/2,controlItemBgHover:i.colorFillTertiary,controlItemBgActive:i.colorPrimaryBg,controlItemBgActiveHover:i.colorPrimaryBgHover,controlItemBgActiveDisabled:i.colorFill,controlTmpOutline:i.colorFillQuaternary,controlOutline:getAlphaColor_default(i.colorPrimaryBg,i.colorBgContainer),lineType:i.lineType,borderRadius:i.borderRadius,borderRadiusXS:i.borderRadiusXS,borderRadiusSM:i.borderRadiusSM,borderRadiusLG:i.borderRadiusLG,fontWeightStrong:600,opacityLoading:.65,linkDecoration:\"none\",linkHoverDecoration:\"none\",linkFocusDecoration:\"none\",controlPaddingHorizontal:12,controlPaddingHorizontalSM:8,paddingXXS:i.sizeXXS,paddingXS:i.sizeXS,paddingSM:i.sizeSM,padding:i.size,paddingMD:i.sizeMD,paddingLG:i.sizeLG,paddingXL:i.sizeXL,paddingContentHorizontalLG:i.sizeLG,paddingContentVerticalLG:i.sizeMS,paddingContentHorizontal:i.sizeMS,paddingContentVertical:i.sizeSM,paddingContentHorizontalSM:i.size,paddingContentVerticalSM:i.sizeXS,marginXXS:i.sizeXXS,marginXS:i.sizeXS,marginSM:i.sizeSM,margin:i.size,marginMD:i.sizeMD,marginLG:i.sizeLG,marginXL:i.sizeXL,marginXXL:i.sizeXXL,boxShadow:\"\\n 0 6px 16px 0 rgba(0, 0, 0, 0.08),\\n 0 3px 6px -4px rgba(0, 0, 0, 0.12),\\n 0 9px 28px 8px rgba(0, 0, 0, 0.05)\\n \",boxShadowSecondary:\"\\n 0 6px 16px 0 rgba(0, 0, 0, 0.08),\\n 0 3px 6px -4px rgba(0, 0, 0, 0.12),\\n 0 9px 28px 8px rgba(0, 0, 0, 0.05)\\n \",boxShadowTertiary:\"\\n 0 1px 2px 0 rgba(0, 0, 0, 0.03),\\n 0 1px 6px -1px rgba(0, 0, 0, 0.02),\\n 0 2px 4px 0 rgba(0, 0, 0, 0.02)\\n \",screenXS:480,screenXSMin:480,screenXSMax:575,screenSM:576,screenSMMin:576,screenSMMax:767,screenMD:768,screenMDMin:768,screenMDMax:991,screenLG:992,screenLGMin:992,screenLGMax:1199,screenXL:o,screenXLMin:o,screenXLMax:1599,screenXXL:a,screenXXLMin:a,boxShadowPopoverArrow:\"2px 2px 5px rgba(0, 0, 0, 0.05)\",boxShadowCard:`\\n 0 1px 2px -2px ${new TinyColor(\"rgba(0, 0, 0, 0.16)\").toRgbString()},\\n 0 3px 6px 0 ${new TinyColor(\"rgba(0, 0, 0, 0.12)\").toRgbString()},\\n 0 5px 12px 4px ${new TinyColor(\"rgba(0, 0, 0, 0.09)\").toRgbString()}\\n `,boxShadowDrawerRight:\"\\n -6px 0 16px 0 rgba(0, 0, 0, 0.08),\\n -3px 0 6px -4px rgba(0, 0, 0, 0.12),\\n -9px 0 28px 8px rgba(0, 0, 0, 0.05)\\n \",boxShadowDrawerLeft:\"\\n 6px 0 16px 0 rgba(0, 0, 0, 0.08),\\n 3px 0 6px -4px rgba(0, 0, 0, 0.12),\\n 9px 0 28px 8px rgba(0, 0, 0, 0.05)\\n \",boxShadowDrawerUp:\"\\n 0 6px 16px 0 rgba(0, 0, 0, 0.08),\\n 0 3px 6px -4px rgba(0, 0, 0, 0.12),\\n 0 9px 28px 8px rgba(0, 0, 0, 0.05)\\n \",boxShadowDrawerDown:\"\\n 0 -6px 16px 0 rgba(0, 0, 0, 0.08),\\n 0 -3px 6px -4px rgba(0, 0, 0, 0.12),\\n 0 -9px 28px 8px rgba(0, 0, 0, 0.05)\\n \",boxShadowTabsOverflowLeft:\"inset 10px 0 8px -8px rgba(0, 0, 0, 0.08)\",boxShadowTabsOverflowRight:\"inset -10px 0 8px -8px rgba(0, 0, 0, 0.08)\",boxShadowTabsOverflowTop:\"inset 0 10px 8px -8px rgba(0, 0, 0, 0.08)\",boxShadowTabsOverflowBottom:\"inset 0 -10px 8px -8px rgba(0, 0, 0, 0.08)\"}),n)}var __rest2=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)__left_angle_mark_0&&(r[n]=e[n]);if(null!=e&&\"function\"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i__left_angle_mark_n.length;i++)t.indexOf(n[i])__left_angle_mark_0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r},unitless={lineHeight:!0,lineHeightSM:!0,lineHeightLG:!0,lineHeightHeading1:!0,lineHeightHeading2:!0,lineHeightHeading3:!0,lineHeightHeading4:!0,lineHeightHeading5:!0,opacityLoading:!0,fontWeightStrong:!0,zIndexPopupBase:!0,zIndexBase:!0,opacityImage:!0},ignore={size:!0,sizeSM:!0,sizeLG:!0,sizeMD:!0,sizeXS:!0,sizeXXS:!0,sizeMS:!0,sizeXL:!0,sizeXXL:!0,sizeUnit:!0,sizeStep:!0,motionBase:!0,motionUnit:!0},preserve={screenXS:!0,screenXSMin:!0,screenXSMax:!0,screenSM:!0,screenSMMin:!0,screenSMMax:!0,screenMD:!0,screenMDMin:!0,screenMDMax:!0,screenLG:!0,screenLGMin:!0,screenLGMax:!0,screenXL:!0,screenXLMin:!0,screenXLMax:!0,screenXXL:!0,screenXXLMin:!0},getComputedToken3=(e,t,r)=>{const n=r.getDerivativeToken(e),{override:i}=t,o=__rest2(t,[\"override\"]);let a=Object.assign(Object.assign({},n),{override:i});return a=formatToken(a),o&&Object.entries(o).forEach((e=>{let[t,r]=e;const{theme:n}=r,i=__rest2(r,[\"theme\"]);let o=i;n&&(o=getComputedToken3(Object.assign(Object.assign({},a),i),{override:i},n)),a[t]=o})),a};function useToken(){const{token:e,hashed:t,theme:r,override:n,cssVar:i}=import_react15.default.useContext(DesignTokenContext),o=`${version_default2}-${t||\"\"}`,a=r||defaultTheme,[s,l,u]=useCacheToken(a,[seed_default,e],{salt:o,override:n,getComputedToken:getComputedToken3,formatToken:formatToken,cssVar:i&&{prefix:i.prefix,key:i.key,unitless:unitless,ignore:ignore,preserve:preserve}});return[a,u,t?l:\"\",s,i]}init_globals();var import_react16=__toESM(require_react());init_globals();var textEllipsis={overflow:\"hidden\",whiteSpace:\"nowrap\",textOverflow:\"ellipsis\"},resetComponent=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return{boxSizing:\"border-box\",margin:0,padding:0,color:e.colorText,fontSize:e.fontSize,lineHeight:e.lineHeight,listStyle:\"none\",fontFamily:t?\"inherit\":e.fontFamily}},resetIcon=()=>({display:\"inline-flex\",alignItems:\"center\",color:\"inherit\",fontStyle:\"normal\",lineHeight:0,textAlign:\"center\",textTransform:\"none\",verticalAlign:\"-0.125em\",textRendering:\"optimizeLegibility\",\"-webkit-font-smoothing\":\"antialiased\",\"-moz-osx-font-smoothing\":\"grayscale\",\"> *\":{lineHeight:1},svg:{display:\"inline-block\"}}),clearFix=()=>({\"&::before\":{display:\"table\",content:'\"\"'},\"&::after\":{display:\"table\",clear:\"both\",content:'\"\"'}}),genLinkStyle=e=>({a:{color:e.colorLink,textDecoration:e.linkDecoration,backgroundColor:\"transparent\",outline:\"none\",cursor:\"pointer\",transition:`color ${e.motionDurationSlow}`,\"-webkit-text-decoration-skip\":\"objects\",\"&:hover\":{color:e.colorLinkHover},\"&:active\":{color:e.colorLinkActive},\"&:active, &:hover\":{textDecoration:e.linkHoverDecoration,outline:0},\"&:focus\":{textDecoration:e.linkFocusDecoration,outline:0},\"&[disabled]\":{color:e.colorTextDisabled,cursor:\"not-allowed\"}}}),genCommonStyle=(e,t,r,n)=>{const i=`[class^=\"${t}\"], [class*=\" ${t}\"]`,o=r?`.${r}`:i,a={boxSizing:\"border-box\",\"&::before, &::after\":{boxSizing:\"border-box\"}};let s={};return!1!==n&&(s={fontFamily:e.fontFamily,fontSize:e.fontSize}),{[o]:Object.assign(Object.assign(Object.assign({},s),a),{[i]:a})}},genFocusOutline=e=>({outline:`${unit(e.lineWidthFocus)} solid ${e.colorPrimaryBorder}`,outlineOffset:1,transition:\"outline-offset 0s, outline 0s\"}),genFocusStyle=e=>({\"&:focus-visible\":Object.assign({},genFocusOutline(e))});init_globals();var useResetIconStyle=(e,t)=>{const[r,n]=useToken();return useStyleRegister({theme:r,token:n,hashId:\"\",path:[\"ant-design-icons\",e],nonce:()=>null==t?void 0:t.nonce,layer:{name:\"antd\"}},(()=>[{[`.${e}`]:Object.assign(Object.assign({},resetIcon()),{[`.${e} .${e}-icon`]:{display:\"block\"}})}]))},useResetIconStyle_default=useResetIconStyle,{genStyleHooks:genStyleHooks,genComponentStyleHook:genComponentStyleHook,genSubStyleComponent:genSubStyleComponent}=genStyleUtils_default({usePrefix:()=>{const{getPrefixCls:e,iconPrefixCls:t}=(0,import_react16.useContext)(ConfigContext);return{rootPrefixCls:e(),iconPrefixCls:t}},useToken:()=>{const[e,t,r,n,i]=useToken();return{theme:e,realToken:t,hashId:r,token:n,cssVar:i}},useCSP:()=>{const{csp:e,iconPrefixCls:t}=(0,import_react16.useContext)(ConfigContext);return useResetIconStyle_default(t,e),null!=e?e:{}},getResetStyles:e=>[{\"&\":genLinkStyle(e)}],getCommonStyle:genCommonStyle,getCompUnitless:()=>unitless});function genPresetColor(e,t){return PresetColors.reduce(((r,n)=>{const i=e[`${n}1`],o=e[`${n}3`],a=e[`${n}6`],s=e[`${n}7`];return Object.assign(Object.assign({},r),t(n,{lightColor:i,lightBorderColor:o,darkColor:a,textColor:s}))}),{})}init_globals(),init_globals();var React48=__toESM(require_react()),fullClone3=Object.assign({},React48),{useId:useId}=fullClone3,useEmptyId=()=>\"\",useThemeKey=void 0===useId?useEmptyId:useId,useThemeKey_default=useThemeKey;function useTheme(e,t,r){var n,i;const o=devUseWarning(\"ConfigProvider\"),a=e||{},s=!1!==a.inherit&&t?t:Object.assign(Object.assign({},defaultConfig),{hashed:null!==(n=null==t?void 0:t.hashed)&&void 0!==n?n:defaultConfig.hashed,cssVar:null==t?void 0:t.cssVar}),l=useThemeKey_default();{const e=a.cssVar||s.cssVar,t=!!(\"object\"==typeof a.cssVar&&(null===(i=a.cssVar)||void 0===i?void 0:i.key)||l);o(!e||t,\"breaking\",\"Missing key in `cssVar` config. Please upgrade to React 18 or set `cssVar.key` manually in each ConfigProvider inside `cssVar` enabled ConfigProvider.\")}return useMemo((()=>{var n,i;if(!e)return t;const o=Object.assign({},s.components);Object.keys(e.components||{}).forEach((t=>{o[t]=Object.assign(Object.assign({},o[t]),e.components[t])}));const u=`css-var-${l.replace(/:/g,\"\")}`,c=(null!==(n=a.cssVar)&&void 0!==n?n:s.cssVar)&&Object.assign(Object.assign(Object.assign({prefix:null==r?void 0:r.prefixCls},\"object\"==typeof s.cssVar?s.cssVar:{}),\"object\"==typeof a.cssVar?a.cssVar:{}),{key:\"object\"==typeof a.cssVar&&(null===(i=a.cssVar)||void 0===i?void 0:i.key)||u});return Object.assign(Object.assign(Object.assign({},s),a),{token:Object.assign(Object.assign({},s.token),a.token),components:o,cssVar:c})}),[a,s],((e,t)=>e.some(((e,r)=>{const n=t[r];return!isEqual_default(e,n,!0)}))))}init_globals();var React58=__toESM(require_react());init_globals(),init_globals();var import_classnames2=__toESM(require_classnames()),React56=__toESM(require_react()),import_react20=__toESM(require_react());init_globals();var React49=__toESM(require_react()),_excluded3=[\"children\"],Context2=React49.createContext({});function MotionProvider(e){var t=e.children,r=_objectWithoutProperties(e,_excluded3);return React49.createElement(Context2.Provider,{value:r},t)}init_globals();var React50=__toESM(require_react()),DomWrapper2=function(e){_inherits(r,e);var t=_createSuper(r);function r(){return _classCallCheck(this,r),t.apply(this,arguments)}return _createClass(r,[{key:\"render\",value:function(){return this.props.children}}]),r}(React50.Component),DomWrapper_default=DomWrapper2;init_globals(),init_globals();var React51=__toESM(require_react());function useSyncState(e){var t=_slicedToArray(React51.useReducer((function(e){return e+1}),0),2)[1],r=React51.useRef(e);return[useEvent((function(){return r.current})),useEvent((function(e){r.current=\"function\"==typeof e?e(r.current):e,t()}))]}var React55=__toESM(require_react()),import_react19=__toESM(require_react());init_globals();var STATUS_NONE=\"none\",STATUS_APPEAR=\"appear\",STATUS_ENTER=\"enter\",STATUS_LEAVE=\"leave\",STEP_NONE=\"none\",STEP_PREPARE=\"prepare\",STEP_START=\"start\",STEP_ACTIVE=\"active\",STEP_ACTIVATED=\"end\",STEP_PREPARED=\"prepared\";init_globals();var React52=__toESM(require_react()),import_react17=__toESM(require_react());function makePrefixMap(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r[\"Webkit\".concat(e)]=\"webkit\".concat(t),r[\"Moz\".concat(e)]=\"moz\".concat(t),r[\"ms\".concat(e)]=\"MS\".concat(t),r[\"O\".concat(e)]=\"o\".concat(t.toLowerCase()),r}function getVendorPrefixes(e,t){var r={animationend:makePrefixMap(\"Animation\",\"AnimationEnd\"),transitionend:makePrefixMap(\"Transition\",\"TransitionEnd\")};return e&&(\"AnimationEvent\"in t||delete r.animationend.animation,\"TransitionEvent\"in t||delete r.transitionend.transition),r}init_globals();var vendorPrefixes=getVendorPrefixes(canUseDom(),\"undefined\"!=typeof window?window:{}),style={},_document$createEleme;canUseDom()&&(_document$createEleme=document.createElement(\"div\"),style=_document$createEleme.style);var prefixedEventNames={};function getVendorPrefixedEventName(e){if(prefixedEventNames[e])return prefixedEventNames[e];var t=vendorPrefixes[e];if(t)for(var r=Object.keys(t),n=r.length,i=0;i__left_angle_mark_n;i+=1){var o=r[i];if(Object.prototype.hasOwnProperty.call(t,o)&&o in style)return prefixedEventNames[e]=t[o],prefixedEventNames[e]}return\"\"}var internalAnimationEndName=getVendorPrefixedEventName(\"animationend\"),internalTransitionEndName=getVendorPrefixedEventName(\"transitionend\"),supportTransition=!(!internalAnimationEndName||!internalTransitionEndName),animationEndName=internalAnimationEndName||\"animationend\",transitionEndName=internalTransitionEndName||\"transitionend\";function getTransitionName(e,t){return e?\"object\"===_typeof(e)?e[t.replace(/-\\w/g,(function(e){return e[1].toUpperCase()}))]:\"\".concat(e,\"-\").concat(t):null}var useDomMotionEvents_default=function(e){var t=(0,import_react17.useRef)();function r(t){t&&(t.removeEventListener(transitionEndName,e),t.removeEventListener(animationEndName,e))}return React52.useEffect((function(){return function(){r(t.current)}}),[]),[function(n){t.current&&t.current!==n&&r(t.current),n&&n!==t.current&&(n.addEventListener(transitionEndName,e),n.addEventListener(animationEndName,e),t.current=n)},r]};init_globals();var import_react18=__toESM(require_react()),useIsomorphicLayoutEffect=canUseDom()?import_react18.useLayoutEffect:import_react18.useEffect,useIsomorphicLayoutEffect_default=useIsomorphicLayoutEffect;init_globals();var React54=__toESM(require_react());init_globals();var React53=__toESM(require_react()),useNextFrame_default=function(){var e=React53.useRef(null);function t(){raf_default.cancel(e.current)}return React53.useEffect((function(){return function(){t()}}),[]),[function r(n){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;t();var o=raf_default((function(){i__left_angle_mark_=1?n({isCanceled:function(){return o!==e.current}}):r(n,i-1)}));e.current=o},t]},FULL_STEP_QUEUE=[STEP_PREPARE,STEP_START,STEP_ACTIVE,STEP_ACTIVATED],SIMPLE_STEP_QUEUE=[STEP_PREPARE,STEP_PREPARED],SkipStep=!1,DoStep=!0;function isActive(e){return e===STEP_ACTIVE||e===STEP_ACTIVATED}var useStepQueue_default=function(e,t,r){var n=_slicedToArray(useSafeState(STEP_NONE),2),i=n[0],o=n[1],a=_slicedToArray(useNextFrame_default(),2),s=a[0],l=a[1],u=t?SIMPLE_STEP_QUEUE:FULL_STEP_QUEUE;return useIsomorphicLayoutEffect_default((function(){if(i!==STEP_NONE&&i!==STEP_ACTIVATED){var e=u.indexOf(i),t=u[e+1],n=r(i);n===SkipStep?o(t,!0):t&&s((function(e){function r(){e.isCanceled()||o(t,!0)}!0===n?r():Promise.resolve(n).then(r)}))}}),[e,i]),React54.useEffect((function(){return function(){l()}}),[]),[function(){o(STEP_PREPARE,!0)},i]};function useStatus(e,t,r,n){var i=n.motionEnter,o=void 0===i||i,a=n.motionAppear,s=void 0===a||a,l=n.motionLeave,u=void 0===l||l,c=n.motionDeadline,d=n.motionLeaveImmediately,h=n.onAppearPrepare,f=n.onEnterPrepare,p=n.onLeavePrepare,m=n.onAppearStart,g=n.onEnterStart,_=n.onLeaveStart,b=n.onAppearActive,y=n.onEnterActive,v=n.onLeaveActive,A=n.onAppearEnd,w=n.onEnterEnd,S=n.onLeaveEnd,E=n.onVisibleChanged,x=_slicedToArray(useSafeState(),2),C=x[0],T=x[1],R=_slicedToArray(useSyncState(STATUS_NONE),2),I=R[0],k=R[1],P=_slicedToArray(useSafeState(null),2),M=P[0],O=P[1],B=I(),N=(0,import_react19.useRef)(!1),j=(0,import_react19.useRef)(null);function L(){return r()}var D=(0,import_react19.useRef)(!1);function F(){k(STATUS_NONE),O(null,!0)}var U=useEvent((function(e){var t=I();if(t!==STATUS_NONE){var r=L();if(!e||e.deadline||e.target===r){var n,i=D.current;t===STATUS_APPEAR&&i?n=null==A?void 0:A(r,e):t===STATUS_ENTER&&i?n=null==w?void 0:w(r,e):t===STATUS_LEAVE&&i&&(n=null==S?void 0:S(r,e)),i&&!1!==n&&F()}}})),z=_slicedToArray(useDomMotionEvents_default(U),1)[0],q=function(e){switch(e){case STATUS_APPEAR:return _defineProperty(_defineProperty(_defineProperty({},STEP_PREPARE,h),STEP_START,m),STEP_ACTIVE,b);case STATUS_ENTER:return _defineProperty(_defineProperty(_defineProperty({},STEP_PREPARE,f),STEP_START,g),STEP_ACTIVE,y);case STATUS_LEAVE:return _defineProperty(_defineProperty(_defineProperty({},STEP_PREPARE,p),STEP_START,_),STEP_ACTIVE,v);default:return{}}},G=React55.useMemo((function(){return q(B)}),[B]),H=_slicedToArray(useStepQueue_default(B,!e,(function(e){if(e===STEP_PREPARE){var t=G[STEP_PREPARE];return t?t(L()):SkipStep}var r;return V in G&&O((null===(r=G[V])||void 0===r?void 0:r.call(G,L(),null))||null),V===STEP_ACTIVE&&B!==STATUS_NONE&&(z(L()),c>0&&(clearTimeout(j.current),j.current=setTimeout((function(){U({deadline:!0})}),c))),V===STEP_PREPARED&&F(),DoStep})),2),W=H[0],V=H[1],$=isActive(V);D.current=$,useIsomorphicLayoutEffect_default((function(){T(t);var r,n=N.current;N.current=!0,!n&&t&&s&&(r=STATUS_APPEAR),n&&t&&o&&(r=STATUS_ENTER),(n&&!t&&u||!n&&d&&!t&&u)&&(r=STATUS_LEAVE);var i=q(r);r&&(e||i[STEP_PREPARE])?(k(r),W()):k(STATUS_NONE)}),[t]),(0,import_react19.useEffect)((function(){(B===STATUS_APPEAR&&!s||B===STATUS_ENTER&&!o||B===STATUS_LEAVE&&!u)&&k(STATUS_NONE)}),[s,o,u]),(0,import_react19.useEffect)((function(){return function(){N.current=!1,clearTimeout(j.current)}}),[]);var K=React55.useRef(!1);(0,import_react19.useEffect)((function(){C&&(K.current=!0),void 0!==C&&B===STATUS_NONE&&((K.current||C)&&(null==E||E(C)),K.current=!0)}),[C,B]);var X=M;return G[STEP_PREPARE]&&V===STEP_START&&(X=_objectSpread2({transition:\"none\"},X)),[B,V,X,null!=C?C:t]}function genCSSMotion(e){var t=e;\"object\"===_typeof(e)&&(t=e.transitionSupport);var r=React56.forwardRef((function(e,r){var n=e.visible,i=void 0===n||n,o=e.removeOnLeave,a=void 0===o||o,s=e.forceRender,l=e.children,u=e.motionName,c=e.leavedClassName,d=e.eventProps,h=function(e,r){return!(!e.motionName||!t||!1===r)}(e,React56.useContext(Context2).motion),f=(0,import_react20.useRef)(),p=(0,import_react20.useRef)(),m=_slicedToArray(useStatus(h,i,(function(){try{return f.current instanceof HTMLElement?f.current:findDOMNode(p.current)}catch(e){return null}}),e),4),g=m[0],_=m[1],b=m[2],y=m[3],v=React56.useRef(y);y&&(v.current=!0);var A,w=React56.useCallback((function(e){f.current=e,fillRef(r,e)}),[r]),S=_objectSpread2(_objectSpread2({},d),{},{visible:i});if(l)if(g===STATUS_NONE)A=y?l(_objectSpread2({},S),w):!a&&v.current&&c?l(_objectSpread2(_objectSpread2({},S),{},{className:c}),w):s||!a&&!c?l(_objectSpread2(_objectSpread2({},S),{},{style:{display:\"none\"}}),w):null;else{var E;_===STEP_PREPARE?E=\"prepare\":isActive(_)?E=\"active\":_===STEP_START&&(E=\"start\");var x=getTransitionName(u,\"\".concat(g,\"-\").concat(E));A=l(_objectSpread2(_objectSpread2({},S),{},{className:(0,import_classnames2.default)(getTransitionName(u,g),_defineProperty(_defineProperty({},x,x&&E),u,\"string\"==typeof u)),style:b}),w)}else A=null;return React56.isValidElement(A)&&supportRef(A)&&(A.ref||(A=React56.cloneElement(A,{ref:w}))),React56.createElement(DomWrapper_default,{ref:p},A)}));return r.displayName=\"CSSMotion\",r}var CSSMotion_default=genCSSMotion(supportTransition);init_globals();var React57=__toESM(require_react());init_globals();var STATUS_ADD=\"add\",STATUS_KEEP=\"keep\",STATUS_REMOVE=\"remove\",STATUS_REMOVED=\"removed\";function wrapKeyToObject(e){var t;return _objectSpread2(_objectSpread2({},t=e&&\"object\"===_typeof(e)&&\"key\"in e?e:{key:e}),{},{key:String(t.key)})}function parseKeys(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).map(wrapKeyToObject)}function diffKeys(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=[],n=0,i=t.length,o=parseKeys(e),a=parseKeys(t);o.forEach((function(e){for(var t=!1,o=n;o__left_angle_mark_i;o+=1){var s=a[o];if(s.key===e.key){n__left_angle_mark_o&&(r=r.concat(a.slice(n,o).map((function(e){return _objectSpread2(_objectSpread2({},e),{},{status:STATUS_ADD})}))),n=o),r.push(_objectSpread2(_objectSpread2({},s),{},{status:STATUS_KEEP})),n+=1,t=!0;break}}t||r.push(_objectSpread2(_objectSpread2({},e),{},{status:STATUS_REMOVE}))})),n__left_angle_mark_i&&(r=r.concat(a.slice(n).map((function(e){return _objectSpread2(_objectSpread2({},e),{},{status:STATUS_ADD})}))));var s={};return r.forEach((function(e){var t=e.key;s[t]=(s[t]||0)+1})),Object.keys(s).filter((function(e){return s[e]>1})).forEach((function(e){(r=r.filter((function(t){var r=t.key,n=t.status;return r!==e||n!==STATUS_REMOVE}))).forEach((function(t){t.key===e&&(t.status=STATUS_KEEP)}))})),r}var _excluded4=[\"component\",\"children\",\"onVisibleChanged\",\"onAllRemoved\"],_excluded22=[\"status\"],MOTION_PROP_NAMES=[\"eventProps\",\"visible\",\"children\",\"motionName\",\"motionAppear\",\"motionEnter\",\"motionLeave\",\"motionLeaveImmediately\",\"motionDeadline\",\"removeOnLeave\",\"leavedClassName\",\"onAppearPrepare\",\"onAppearStart\",\"onAppearActive\",\"onAppearEnd\",\"onEnterStart\",\"onEnterActive\",\"onEnterEnd\",\"onLeaveStart\",\"onLeaveActive\",\"onLeaveEnd\"];function genCSSMotionList(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:CSSMotion_default,r=function(e){_inherits(n,e);var r=_createSuper(n);function n(){var e;_classCallCheck(this,n);for(var t=arguments.length,i=new Array(t),o=0;o__left_angle_mark_t;o++)i[o]=arguments[o];return _defineProperty(_assertThisInitialized(e=r.call.apply(r,[this].concat(i))),\"state\",{keyEntities:[]}),_defineProperty(_assertThisInitialized(e),\"removeKey\",(function(t){e.setState((function(e){return{keyEntities:e.keyEntities.map((function(e){return e.key!==t?e:_objectSpread2(_objectSpread2({},e),{},{status:STATUS_REMOVED})}))}}),(function(){0===e.state.keyEntities.filter((function(e){return e.status!==STATUS_REMOVED})).length&&e.props.onAllRemoved&&e.props.onAllRemoved()}))})),e}return _createClass(n,[{key:\"render\",value:function(){var e=this,r=this.state.keyEntities,n=this.props,i=n.component,o=n.children,a=n.onVisibleChanged,s=(n.onAllRemoved,_objectWithoutProperties(n,_excluded4)),l=i||React57.Fragment,u={};return MOTION_PROP_NAMES.forEach((function(e){u[e]=s[e],delete s[e]})),delete s.keys,React57.createElement(l,s,r.map((function(r,n){var i=r.status,s=_objectWithoutProperties(r,_excluded22),l=i===STATUS_ADD||i===STATUS_KEEP;return React57.createElement(t,_extends({},u,{key:s.key,visible:l,eventProps:s,onVisibleChanged:function(t){null==a||a(t,{key:s.key}),t||e.removeKey(s.key)}}),(function(e,t){return o(_objectSpread2(_objectSpread2({},e),{},{index:n}),t)}))})))}}],[{key:\"getDerivedStateFromProps\",value:function(e,t){var r=e.keys,n=t.keyEntities,i=parseKeys(r);return{keyEntities:diffKeys(n,i).filter((function(e){var t=n.find((function(t){var r=t.key;return e.key===r}));return!t||t.status!==STATUS_REMOVED||e.status!==STATUS_REMOVE}))}}}]),n}(React57.Component);return _defineProperty(r,\"defaultProps\",{component:\"div\"}),r}var CSSMotionList_default=genCSSMotionList(supportTransition),es_default2=CSSMotion_default;function MotionWrapper(e){const{children:t}=e,[,r]=useToken(),{motion:n}=r,i=React58.useRef(!1);return i.current=i.current||!1===n,i.current?React58.createElement(MotionProvider,{motion:n},t):t}init_globals();var React59=__toESM(require_react()),PropWarning=React59.memo((e=>{let{dropdownMatchSelectWidth:t}=e;return devUseWarning(\"ConfigProvider\").deprecated(void 0===t,\"dropdownMatchSelectWidth\",\"popupMatchSelectWidth\"),null}));PropWarning.displayName=\"PropWarning\";var PropWarning_default=PropWarning;init_globals();var __rest3=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)__left_angle_mark_0&&(r[n]=e[n]);if(null!=e&&\"function\"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i__left_angle_mark_n.length;i++)t.indexOf(n[i])__left_angle_mark_0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r},existThemeConfig=!1,warnContext=e=>{warning_default2(!existThemeConfig,e,\"Static function can not consume context like dynamic theme. Please use 'App' component instead.\")},PASSED_PROPS=[\"getTargetContainer\",\"getPopupContainer\",\"renderEmpty\",\"input\",\"pagination\",\"form\",\"select\",\"button\"],globalPrefixCls,globalIconPrefixCls,globalTheme,globalHolderRender;function getGlobalPrefixCls(){return globalPrefixCls||defaultPrefixCls}function getGlobalIconPrefixCls(){return globalIconPrefixCls||defaultIconPrefixCls}function isLegacyTheme(e){return Object.keys(e).some((e=>e.endsWith(\"Color\")))}var setGlobalConfig=e=>{const{prefixCls:t,iconPrefixCls:r,theme:n,holderRender:i}=e;void 0!==t&&(globalPrefixCls=t),void 0!==r&&(globalIconPrefixCls=r),\"holderRender\"in e&&(globalHolderRender=i),n&&(isLegacyTheme(n)?(warning_default2(!1,\"ConfigProvider\",\"`config` of css variable theme is not work in v5. Please use new `theme` config instead.\"),registerTheme(getGlobalPrefixCls(),n)):globalTheme=n)},globalConfig=()=>({getPrefixCls:(e,t)=>t||(e?`${getGlobalPrefixCls()}-${e}`:getGlobalPrefixCls()),getIconPrefixCls:getGlobalIconPrefixCls,getRootPrefixCls:()=>globalPrefixCls||getGlobalPrefixCls(),getTheme:()=>globalTheme,holderRender:globalHolderRender}),ProviderChildren=e=>{const{children:t,csp:r,autoInsertSpaceInButton:n,alert:i,anchor:o,form:a,locale:s,componentSize:l,direction:u,space:c,splitter:d,virtual:h,dropdownMatchSelectWidth:f,popupMatchSelectWidth:p,popupOverflow:m,legacyLocale:g,parentContext:_,iconPrefixCls:b,theme:y,componentDisabled:v,segmented:A,statistic:w,spin:S,calendar:E,carousel:x,cascader:C,collapse:T,typography:R,checkbox:I,descriptions:k,divider:P,drawer:M,skeleton:O,steps:B,image:N,layout:j,list:L,mentions:D,modal:F,progress:U,result:z,slider:q,breadcrumb:G,menu:H,pagination:W,input:V,textArea:$,empty:K,badge:X,radio:Y,rate:J,switch:Q,transfer:Z,avatar:ee,message:te,tag:re,table:ne,card:ie,tabs:oe,timeline:ae,timePicker:se,upload:le,notification:ue,tree:ce,colorPicker:de,datePicker:he,rangePicker:fe,flex:pe,wave:me,dropdown:ge,warning:_e,tour:be,floatButtonGroup:ye,variant:ve,inputNumber:Ae,treeSelect:we}=e,Se=React60.useCallback(((t,r)=>{const{prefixCls:n}=e;if(r)return r;const i=n||_.getPrefixCls(\"\");return t?`${i}-${t}`:i}),[_.getPrefixCls,e.prefixCls]),Ee=b||_.iconPrefixCls||defaultIconPrefixCls,xe=r||_.csp;useResetIconStyle_default(Ee,xe);const Ce=useTheme(y,_.theme,{prefixCls:Se(\"\")});existThemeConfig=existThemeConfig||!!Ce;const Te={csp:xe,autoInsertSpaceInButton:n,alert:i,anchor:o,locale:s||g,direction:u,space:c,splitter:d,virtual:h,popupMatchSelectWidth:null!=p?p:f,popupOverflow:m,getPrefixCls:Se,iconPrefixCls:Ee,theme:Ce,segmented:A,statistic:w,spin:S,calendar:E,carousel:x,cascader:C,collapse:T,typography:R,checkbox:I,descriptions:k,divider:P,drawer:M,skeleton:O,steps:B,image:N,input:V,textArea:$,layout:j,list:L,mentions:D,modal:F,progress:U,result:z,slider:q,breadcrumb:G,menu:H,pagination:W,empty:K,badge:X,radio:Y,rate:J,switch:Q,transfer:Z,avatar:ee,message:te,tag:re,table:ne,card:ie,tabs:oe,timeline:ae,timePicker:se,upload:le,notification:ue,tree:ce,colorPicker:de,datePicker:he,rangePicker:fe,flex:pe,wave:me,dropdown:ge,warning:_e,tour:be,floatButtonGroup:ye,variant:ve,inputNumber:Ae,treeSelect:we};devUseWarning(\"ConfigProvider\")(!(\"autoInsertSpaceInButton\"in e),\"deprecated\",\"`autoInsertSpaceInButton` is deprecated. Please use `{ button: { autoInsertSpace: boolean }}` instead.\");const Re=Object.assign({},_);Object.keys(Te).forEach((e=>{void 0!==Te[e]&&(Re[e]=Te[e])})),PASSED_PROPS.forEach((t=>{const r=e[t];r&&(Re[t]=r)})),void 0!==n&&(Re.button=Object.assign({autoInsertSpace:n},Re.button));const Ie=useMemo((()=>Re),Re,((e,t)=>{const r=Object.keys(e),n=Object.keys(t);return r.length!==n.length||r.some((r=>e[r]!==t[r]))})),ke=React60.useMemo((()=>({prefixCls:Ee,csp:xe})),[Ee,xe]);let Pe=React60.createElement(React60.Fragment,null,React60.createElement(PropWarning_default,{dropdownMatchSelectWidth:f}),t);const Me=React60.useMemo((()=>{var e,t,r,n;return merge((null===(e=en_US_default6.Form)||void 0===e?void 0:e.defaultValidateMessages)||{},(null===(r=null===(t=Ie.locale)||void 0===t?void 0:t.Form)||void 0===r?void 0:r.defaultValidateMessages)||{},(null===(n=Ie.form)||void 0===n?void 0:n.validateMessages)||{},(null==a?void 0:a.validateMessages)||{})}),[Ie,null==a?void 0:a.validateMessages]);Object.keys(Me).length>0&&(Pe=React60.createElement(validateMessagesContext_default.Provider,{value:Me},Pe)),s&&(Pe=React60.createElement(locale_default,{locale:s,_ANT_MARK__:ANT_MARK},Pe)),(Ee||xe)&&(Pe=React60.createElement(Context_default2.Provider,{value:ke},Pe)),l&&(Pe=React60.createElement(SizeContextProvider,{size:l},Pe)),Pe=React60.createElement(MotionWrapper,null,Pe);const Oe=React60.useMemo((()=>{const e=Ce||{},{algorithm:t,token:r,components:n,cssVar:i}=e,o=__rest3(e,[\"algorithm\",\"token\",\"components\",\"cssVar\"]),a=t&&(!Array.isArray(t)||t.length>0)?createTheme(t):defaultTheme,s={};Object.entries(n||{}).forEach((e=>{let[t,r]=e;const n=Object.assign({},r);\"algorithm\"in n&&(!0===n.algorithm?n.theme=a:(Array.isArray(n.algorithm)||\"function\"==typeof n.algorithm)&&(n.theme=createTheme(n.algorithm)),delete n.algorithm),s[t]=n}));const l=Object.assign(Object.assign({},seed_default),r);return Object.assign(Object.assign({},o),{theme:a,token:l,components:s,override:Object.assign({override:l},s),cssVar:i})}),[Ce]);return y&&(Pe=React60.createElement(DesignTokenContext.Provider,{value:Oe},Pe)),Ie.warning&&(Pe=React60.createElement(WarningContext.Provider,{value:Ie.warning},Pe)),void 0!==v&&(Pe=React60.createElement(DisabledContextProvider,{disabled:v},Pe)),React60.createElement(ConfigContext.Provider,{value:Ie},Pe)},ConfigProvider=e=>{const t=React60.useContext(ConfigContext),r=React60.useContext(context_default);return React60.createElement(ProviderChildren,Object.assign({parentContext:t,legacyLocale:r},e))};ConfigProvider.ConfigContext=ConfigContext,ConfigProvider.SizeContext=SizeContext_default,ConfigProvider.config=setGlobalConfig,ConfigProvider.useConfig=useConfig_default,Object.defineProperty(ConfigProvider,\"SizeContext\",{get:()=>(warning_default2(!1,\"ConfigProvider\",\"ConfigProvider.SizeContext is deprecated. Please use `ConfigProvider.useConfig().componentSize` instead.\"),SizeContext_default)}),ConfigProvider.displayName=\"ConfigProvider\";var config_provider_default=ConfigProvider;init_globals(),init_globals();var React70=__toESM(require_react());init_globals();var React64=__toESM(require_react());init_globals();var React63=__toESM(require_react()),import_classnames3=__toESM(require_classnames());init_globals();var React62=__toESM(require_react());init_globals();var import_react21=__toESM(require_react());function camelCase2(e){return e.replace(/-(.)/g,(function(e,t){return t.toUpperCase()}))}function warning4(e,t){warning_default(e,\"[@ant-design/icons] \".concat(t))}function isIconDefinition2(e){return\"object\"===_typeof(e)&&\"string\"==typeof e.name&&\"string\"==typeof e.theme&&(\"object\"===_typeof(e.icon)||\"function\"==typeof e.icon)}function normalizeAttrs2(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.keys(e).reduce((function(t,r){var n=e[r];return\"class\"===r?(t.className=n,delete t.class):(delete t[r],t[camelCase2(r)]=n),t}),{})}function generate3(e,t,r){return r?import_react21.default.createElement(e.tag,_objectSpread2(_objectSpread2({key:t},normalizeAttrs2(e.attrs)),r),(e.children||[]).map((function(r,n){return generate3(r,\"\".concat(t,\"-\").concat(e.tag,\"-\").concat(n))}))):import_react21.default.createElement(e.tag,_objectSpread2({key:t},normalizeAttrs2(e.attrs)),(e.children||[]).map((function(r,n){return generate3(r,\"\".concat(t,\"-\").concat(e.tag,\"-\").concat(n))})))}function getSecondaryColor2(e){return generate(e)[0]}function normalizeTwoToneColors2(e){return e?Array.isArray(e)?e:[e]:[]}var iconStyles2=\"\\n.anticon {\\n display: inline-flex;\\n align-items: center;\\n color: inherit;\\n font-style: normal;\\n line-height: 0;\\n text-align: center;\\n text-transform: none;\\n vertical-align: -0.125em;\\n text-rendering: optimizeLegibility;\\n -webkit-font-smoothing: antialiased;\\n -moz-osx-font-smoothing: grayscale;\\n}\\n\\n.anticon > * {\\n line-height: 1;\\n}\\n\\n.anticon svg {\\n display: inline-block;\\n}\\n\\n.anticon::before {\\n display: none;\\n}\\n\\n.anticon .anticon-icon {\\n display: block;\\n}\\n\\n.anticon[tabindex] {\\n cursor: pointer;\\n}\\n\\n.anticon-spin::before,\\n.anticon-spin {\\n display: inline-block;\\n -webkit-animation: loadingCircle 1s infinite linear;\\n animation: loadingCircle 1s infinite linear;\\n}\\n\\n@-webkit-keyframes loadingCircle {\\n 100% {\\n -webkit-transform: rotate(360deg);\\n transform: rotate(360deg);\\n }\\n}\\n\\n@keyframes loadingCircle {\\n 100% {\\n -webkit-transform: rotate(360deg);\\n transform: rotate(360deg);\\n }\\n}\\n\",useInsertStyles3=function(e){var t=(0,import_react21.useContext)(Context_default2),r=t.csp,n=t.prefixCls,i=iconStyles2;n&&(i=i.replace(/anticon/g,n)),(0,import_react21.useEffect)((function(){var t=getShadowRoot(e.current);updateCSS(i,\"@ant-design-icons\",{prepend:!0,csp:r,attachTo:t})}),[])},_excluded5=[\"icon\",\"className\",\"onClick\",\"style\",\"primaryColor\",\"secondaryColor\"],twoToneColorPalette2={primaryColor:\"#333\",secondaryColor:\"#E6E6E6\",calculated:!1};function setTwoToneColors2(e){var t=e.primaryColor,r=e.secondaryColor;twoToneColorPalette2.primaryColor=t,twoToneColorPalette2.secondaryColor=r||getSecondaryColor2(t),twoToneColorPalette2.calculated=!!r}function getTwoToneColors2(){return _objectSpread2({},twoToneColorPalette2)}var IconBase3=function(e){var t=e.icon,r=e.className,n=e.onClick,i=e.style,o=e.primaryColor,a=e.secondaryColor,s=_objectWithoutProperties(e,_excluded5),l=React62.useRef(),u=twoToneColorPalette2;if(o&&(u={primaryColor:o,secondaryColor:a||getSecondaryColor2(o)}),useInsertStyles3(l),warning4(isIconDefinition2(t),\"icon should be icon definiton, but got \".concat(t)),!isIconDefinition2(t))return null;var c=t;return c&&\"function\"==typeof c.icon&&(c=_objectSpread2(_objectSpread2({},c),{},{icon:c.icon(u.primaryColor,u.secondaryColor)})),generate3(c.icon,\"svg-\".concat(c.name),_objectSpread2(_objectSpread2({className:r,onClick:n,style:i,\"data-icon\":c.name,width:\"1em\",height:\"1em\",fill:\"currentColor\",\"aria-hidden\":\"true\"},s),{},{ref:l}))};IconBase3.displayName=\"IconReact\",IconBase3.getTwoToneColors=getTwoToneColors2,IconBase3.setTwoToneColors=setTwoToneColors2;var IconBase_default2=IconBase3;function setTwoToneColor2(e){var t=_slicedToArray(normalizeTwoToneColors2(e),2),r=t[0],n=t[1];return IconBase_default2.setTwoToneColors({primaryColor:r,secondaryColor:n})}function getTwoToneColor2(){var e=IconBase_default2.getTwoToneColors();return e.calculated?[e.primaryColor,e.secondaryColor]:e.primaryColor}init_globals();var _excluded6=[\"className\",\"icon\",\"spin\",\"rotate\",\"tabIndex\",\"onClick\",\"twoToneColor\"];setTwoToneColor2(blue.primary);var Icon2=React63.forwardRef((function(e,t){var r=e.className,n=e.icon,i=e.spin,o=e.rotate,a=e.tabIndex,s=e.onClick,l=e.twoToneColor,u=_objectWithoutProperties(e,_excluded6),c=React63.useContext(Context_default2),d=c.prefixCls,h=void 0===d?\"anticon\":d,f=c.rootClassName,p=(0,import_classnames3.default)(f,h,_defineProperty(_defineProperty({},\"\".concat(h,\"-\").concat(n.name),!!n.name),\"\".concat(h,\"-spin\"),!!i||\"loading\"===n.name),r),m=a;void 0===m&&s&&(m=-1);var g=o?{msTransform:\"rotate(\".concat(o,\"deg)\"),transform:\"rotate(\".concat(o,\"deg)\")}:void 0,_=_slicedToArray(normalizeTwoToneColors2(l),2),b=_[0],y=_[1];return React63.createElement(\"span\",_extends({role:\"img\",\"aria-label\":n.name},u,{ref:t,tabIndex:m,onClick:s,className:p}),React63.createElement(IconBase_default2,{icon:n,primaryColor:b,secondaryColor:y,style:g}))}));Icon2.displayName=\"AntdIcon\",Icon2.getTwoToneColor=getTwoToneColor2,Icon2.setTwoToneColor=setTwoToneColor2;var AntdIcon_default2=Icon2,CheckCircleFilled2=function(e,t){return React64.createElement(AntdIcon_default2,_extends({},e,{ref:t,icon:CheckCircleFilled_default}))},RefIcon20=React64.forwardRef(CheckCircleFilled2);RefIcon20.displayName=\"CheckCircleFilled\";var CheckCircleFilled_default2=RefIcon20;init_globals();var React65=__toESM(require_react()),CloseCircleFilled2=function(e,t){return React65.createElement(AntdIcon_default2,_extends({},e,{ref:t,icon:CloseCircleFilled_default}))},RefIcon21=React65.forwardRef(CloseCircleFilled2);RefIcon21.displayName=\"CloseCircleFilled\";var CloseCircleFilled_default2=RefIcon21;init_globals();var React66=__toESM(require_react()),CloseOutlined4=function(e,t){return React66.createElement(AntdIcon_default2,_extends({},e,{ref:t,icon:CloseOutlined_default}))},RefIcon22=React66.forwardRef(CloseOutlined4);RefIcon22.displayName=\"CloseOutlined\";var CloseOutlined_default3=RefIcon22;init_globals();var React67=__toESM(require_react()),ExclamationCircleFilled2=function(e,t){return React67.createElement(AntdIcon_default2,_extends({},e,{ref:t,icon:ExclamationCircleFilled_default}))},RefIcon23=React67.forwardRef(ExclamationCircleFilled2);RefIcon23.displayName=\"ExclamationCircleFilled\";var ExclamationCircleFilled_default2=RefIcon23;init_globals();var React68=__toESM(require_react()),InfoCircleFilled2=function(e,t){return React68.createElement(AntdIcon_default2,_extends({},e,{ref:t,icon:InfoCircleFilled_default}))},RefIcon24=React68.forwardRef(InfoCircleFilled2);RefIcon24.displayName=\"InfoCircleFilled\";var InfoCircleFilled_default2=RefIcon24,import_classnames4=__toESM(require_classnames());init_globals();var attributes=\"accept acceptCharset accessKey action allowFullScreen allowTransparency\\n alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge\\n charSet checked classID className colSpan cols content contentEditable contextMenu\\n controls coords crossOrigin data dateTime default defer dir disabled download draggable\\n encType form formAction formEncType formMethod formNoValidate formTarget frameBorder\\n headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity\\n is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media\\n mediaGroup method min minLength multiple muted name noValidate nonce open\\n optimum pattern placeholder poster preload radioGroup readOnly rel required\\n reversed role rowSpan rows sandbox scope scoped scrolling seamless selected\\n shape size sizes span spellCheck src srcDoc srcLang srcSet start step style\\n summary tabIndex target title type useMap value width wmode wrap\",eventsName=\"onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown\\n onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick\\n onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown\\n onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel\\n onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough\\n onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata\\n onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError\",propList=\"\".concat(attributes,\" \").concat(eventsName).split(/[\\s\\n]+/),ariaPrefix=\"aria-\",dataPrefix=\"data-\";function match(e,t){return 0===e.indexOf(t)}function pickAttrs(e){var t,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];t=!1===r?{aria:!0,data:!0,attr:!0}:!0===r?{aria:!0}:_objectSpread2({},r);var n={};return Object.keys(e).forEach((function(r){(t.aria&&(\"role\"===r||match(r,ariaPrefix))||t.data&&match(r,dataPrefix)||t.attr&&propList.includes(r))&&(n[r]=e[r])})),n}init_globals();var import_react22=__toESM(require_react());function isFragment3(e){return e&&import_react22.default.isValidElement(e)&&e.type===import_react22.default.Fragment}var replaceElement=(e,t,r)=>import_react22.default.isValidElement(e)?import_react22.default.cloneElement(e,\"function\"==typeof r?r(e.props||{}):r):t;function cloneElement3(e,t){return replaceElement(e,e,t)}init_globals();var genAlertTypeStyle=(e,t,r,n,i)=>({background:e,border:`${unit(n.lineWidth)} ${n.lineType} ${t}`,[`${i}-icon`]:{color:r}}),genBaseStyle=e=>{const{componentCls:t,motionDurationSlow:r,marginXS:n,marginSM:i,fontSize:o,fontSizeLG:a,lineHeight:s,borderRadiusLG:l,motionEaseInOutCirc:u,withDescriptionIconSize:c,colorText:d,colorTextHeading:h,withDescriptionPadding:f,defaultPadding:p}=e;return{[t]:Object.assign(Object.assign({},resetComponent(e)),{position:\"relative\",display:\"flex\",alignItems:\"center\",padding:p,wordWrap:\"break-word\",borderRadius:l,[`&${t}-rtl`]:{direction:\"rtl\"},[`${t}-content`]:{flex:1,minWidth:0},[`${t}-icon`]:{marginInlineEnd:n,lineHeight:0},\"&-description\":{display:\"none\",fontSize:o,lineHeight:s},\"&-message\":{color:h},[`&${t}-motion-leave`]:{overflow:\"hidden\",opacity:1,transition:`max-height ${r} ${u}, opacity ${r} ${u},\\n padding-top ${r} ${u}, padding-bottom ${r} ${u},\\n margin-bottom ${r} ${u}`},[`&${t}-motion-leave-active`]:{maxHeight:0,marginBottom:\"0 !important\",paddingTop:0,paddingBottom:0,opacity:0}}),[`${t}-with-description`]:{alignItems:\"flex-start\",padding:f,[`${t}-icon`]:{marginInlineEnd:i,fontSize:c,lineHeight:0},[`${t}-message`]:{display:\"block\",marginBottom:n,color:h,fontSize:a},[`${t}-description`]:{display:\"block\",color:d}},[`${t}-banner`]:{marginBottom:0,border:\"0 !important\",borderRadius:0}}},genTypeStyle=e=>{const{componentCls:t,colorSuccess:r,colorSuccessBorder:n,colorSuccessBg:i,colorWarning:o,colorWarningBorder:a,colorWarningBg:s,colorError:l,colorErrorBorder:u,colorErrorBg:c,colorInfo:d,colorInfoBorder:h,colorInfoBg:f}=e;return{[t]:{\"&-success\":genAlertTypeStyle(i,n,r,e,t),\"&-info\":genAlertTypeStyle(f,h,d,e,t),\"&-warning\":genAlertTypeStyle(s,a,o,e,t),\"&-error\":Object.assign(Object.assign({},genAlertTypeStyle(c,u,l,e,t)),{[`${t}-description > pre`]:{margin:0,padding:0}})}}},genActionStyle=e=>{const{componentCls:t,iconCls:r,motionDurationMid:n,marginXS:i,fontSizeIcon:o,colorIcon:a,colorIconHover:s}=e;return{[t]:{\"&-action\":{marginInlineStart:i},[`${t}-close-icon`]:{marginInlineStart:i,padding:0,overflow:\"hidden\",fontSize:o,lineHeight:unit(o),backgroundColor:\"transparent\",border:\"none\",outline:\"none\",cursor:\"pointer\",[`${r}-close`]:{color:a,transition:`color ${n}`,\"&:hover\":{color:s}}},\"&-close-text\":{color:a,transition:`color ${n}`,\"&:hover\":{color:s}}}}},prepareComponentToken=e=>({withDescriptionIconSize:e.fontSizeHeading3,defaultPadding:`${e.paddingContentVerticalSM}px 12px`,withDescriptionPadding:`${e.paddingMD}px ${e.paddingContentHorizontalLG}px`}),style_default=genStyleHooks(\"Alert\",(e=>[genBaseStyle(e),genTypeStyle(e),genActionStyle(e)]),prepareComponentToken),__rest4=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)__left_angle_mark_0&&(r[n]=e[n]);if(null!=e&&\"function\"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i__left_angle_mark_n.length;i++)t.indexOf(n[i])__left_angle_mark_0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r},iconMapFilled={success:CheckCircleFilled_default2,info:InfoCircleFilled_default2,error:CloseCircleFilled_default2,warning:ExclamationCircleFilled_default2},IconNode=e=>{const{icon:t,prefixCls:r,type:n}=e,i=iconMapFilled[n]||null;return t?replaceElement(t,React70.createElement(\"span\",{className:`${r}-icon`},t),(()=>({className:(0,import_classnames4.default)(`${r}-icon`,{[t.props.className]:t.props.className})}))):React70.createElement(i,{className:`${r}-icon`})},CloseIconNode=e=>{const{isClosable:t,prefixCls:r,closeIcon:n,handleClose:i,ariaProps:o}=e,a=!0===n||void 0===n?React70.createElement(CloseOutlined_default3,null):n;return t?React70.createElement(\"button\",Object.assign({type:\"button\",onClick:i,className:`${r}-close-icon`,tabIndex:0},o),a):null},Alert=React70.forwardRef(((e,t)=>{const{description:r,prefixCls:n,message:i,banner:o,className:a,rootClassName:s,style:l,onMouseEnter:u,onMouseLeave:c,onClick:d,afterClose:h,showIcon:f,closable:p,closeText:m,closeIcon:g,action:_,id:b}=e,y=__rest4(e,[\"description\",\"prefixCls\",\"message\",\"banner\",\"className\",\"rootClassName\",\"style\",\"onMouseEnter\",\"onMouseLeave\",\"onClick\",\"afterClose\",\"showIcon\",\"closable\",\"closeText\",\"closeIcon\",\"action\",\"id\"]),[v,A]=React70.useState(!1);devUseWarning(\"Alert\").deprecated(!m,\"closeText\",\"closable.closeIcon\");const w=React70.useRef(null);React70.useImperativeHandle(t,(()=>({nativeElement:w.current})));const{getPrefixCls:S,direction:E,alert:x}=React70.useContext(ConfigContext),C=S(\"alert\",n),[T,R,I]=style_default(C),k=t=>{var r;A(!0),null===(r=e.onClose)||void 0===r||r.call(e,t)},P=React70.useMemo((()=>void 0!==e.type?e.type:o?\"warning\":\"info\"),[e.type,o]),M=React70.useMemo((()=>!(\"object\"!=typeof p||!p.closeIcon)||!!m||(\"boolean\"==typeof p?p:!1!==g&&null!=g||!!(null==x?void 0:x.closable))),[m,g,p,null==x?void 0:x.closable]),O=!(!o||void 0!==f)||f,B=(0,import_classnames4.default)(C,`${C}-${P}`,{[`${C}-with-description`]:!!r,[`${C}-no-icon`]:!O,[`${C}-banner`]:!!o,[`${C}-rtl`]:\"rtl\"===E},null==x?void 0:x.className,a,s,I,R),N=pickAttrs(y,{aria:!0,data:!0}),j=React70.useMemo((()=>{var e,t;return\"object\"==typeof p&&p.closeIcon?p.closeIcon:m||(void 0!==g?g:\"object\"==typeof(null==x?void 0:x.closable)&&(null===(e=null==x?void 0:x.closable)||void 0===e?void 0:e.closeIcon)?null===(t=null==x?void 0:x.closable)||void 0===t?void 0:t.closeIcon:null==x?void 0:x.closeIcon)}),[g,p,m,null==x?void 0:x.closeIcon]),L=React70.useMemo((()=>{const e=null!=p?p:null==x?void 0:x.closable;if(\"object\"==typeof e){const{closeIcon:t}=e;return __rest4(e,[\"closeIcon\"])}return{}}),[p,null==x?void 0:x.closable]);return T(React70.createElement(es_default2,{visible:!v,motionName:`${C}-motion`,motionAppear:!1,motionEnter:!1,onLeaveStart:e=>({maxHeight:e.offsetHeight}),onLeaveEnd:h},((t,n)=>{let{className:o,style:a}=t;return React70.createElement(\"div\",Object.assign({id:b,ref:composeRef(w,n),\"data-show\":!v,className:(0,import_classnames4.default)(B,o),style:Object.assign(Object.assign(Object.assign({},null==x?void 0:x.style),l),a),onMouseEnter:u,onMouseLeave:c,onClick:d,role:\"alert\"},N),O?React70.createElement(IconNode,{description:r,icon:e.icon,prefixCls:C,type:P}):null,React70.createElement(\"div\",{className:`${C}-content`},i?React70.createElement(\"div\",{className:`${C}-message`},i):null,r?React70.createElement(\"div\",{className:`${C}-description`},r):null),_?React70.createElement(\"div\",{className:`${C}-action`},_):null,React70.createElement(CloseIconNode,{isClosable:M,prefixCls:C,closeIcon:j,handleClose:k,ariaProps:L}))})))}));Alert.displayName=\"Alert\";var Alert_default=Alert;function _callSuper(e,t,r){return t=_getPrototypeOf(t),_possibleConstructorReturn(e,_isNativeReflectConstruct()?Reflect.construct(t,r||[],_getPrototypeOf(e).constructor):t.apply(e,r))}init_globals(),init_globals();var React71=__toESM(require_react()),ErrorBoundary=function(e){function t(){var e;return _classCallCheck(this,t),(e=_callSuper(this,t,arguments)).state={error:void 0,info:{componentStack:\"\"}},e}return _inherits(t,e),_createClass(t,[{key:\"componentDidCatch\",value:function(e,t){this.setState({error:e,info:t})}},{key:\"render\",value:function(){const{message:e,description:t,id:r,children:n}=this.props,{error:i,info:o}=this.state,a=(null==o?void 0:o.componentStack)||null,s=void 0===e?(i||\"\").toString():e,l=void 0===t?a:t;return i?React71.createElement(Alert_default,{id:r,type:\"error\",message:s,description:React71.createElement(\"pre\",{style:{fontSize:\"0.9em\",overflowX:\"auto\"}},l)}):n}}])}(React71.Component),ErrorBoundary_default=ErrorBoundary,Alert2=Alert_default;Alert2.ErrorBoundary=ErrorBoundary_default;var alert_default=Alert2;init_globals(),init_globals();var t=e=>\"object\"==typeof e&&null!=e&&1===e.nodeType,e=(e,t)=>(!t||\"hidden\"!==e)&&\"visible\"!==e&&\"clip\"!==e,n=(t,r)=>{if(t.clientHeight__left_angle_mark_t.scrollHeight||t.clientWidth__left_angle_mark_t.scrollWidth){const n=getComputedStyle(t,null);return e(n.overflowY,r)||e(n.overflowX,r)||(e=>{const t=(e=>{if(!e.ownerDocument||!e.ownerDocument.defaultView)return null;try{return e.ownerDocument.defaultView.frameElement}catch(t){return null}})(e);return!!t&&(t.clientHeight__left_angle_mark_e.scrollHeight||t.clientWidth__left_angle_mark_e.scrollWidth)})(t)}return!1},o=(e,t,r,n,i,o,a,s)=>o__left_angle_mark_e&&a>t||o>e&&a__left_angle_mark_t?0:o__left_angle_mark_=e&&s__left_angle_mark_=r||a>=t&&s>=r?o-e-n:a>t&&s__left_angle_mark_r||o__left_angle_mark_e&&s>r?a-t+i:0,l=e=>{const t=e.parentElement;return null==t?e.getRootNode().host||null:t},r=(e,r)=>{var i,a,s,u;if(\"undefined\"==typeof document)return[];const{scrollMode:c,block:d,inline:h,boundary:f,skipOverflowHiddenElements:p}=r,m=\"function\"==typeof f?f:e=>e!==f;if(!t(e))throw new TypeError(\"Invalid target\");const g=document.scrollingElement||document.documentElement,_=[];let b=e;for(;t(b)&&m(b);){if(b=l(b),b===g){_.push(b);break}null!=b&&b===document.body&&n(b)&&!n(document.documentElement)||null!=b&&n(b,p)&&_.push(b)}const y=null!=(a=null==(i=window.visualViewport)?void 0:i.width)?a:innerWidth,v=null!=(u=null==(s=window.visualViewport)?void 0:s.height)?u:innerHeight,{scrollX:A,scrollY:w}=window,{height:S,width:E,top:x,right:C,bottom:T,left:R}=e.getBoundingClientRect(),{top:I,right:k,bottom:P,left:M}=(e=>{const t=window.getComputedStyle(e);return{top:parseFloat(t.scrollMarginTop)||0,right:parseFloat(t.scrollMarginRight)||0,bottom:parseFloat(t.scrollMarginBottom)||0,left:parseFloat(t.scrollMarginLeft)||0}})(e);let O=\"start\"===d||\"nearest\"===d?x-I:\"end\"===d?T+P:x+S/2-I+P,B=\"center\"===h?R+E/2-M+k:\"end\"===h?C+k:R-M;const N=[];for(let t=0;t__left_angle_mark__.length;t++){const e=_[t],{height:r,width:n,top:i,right:a,bottom:s,left:l}=e.getBoundingClientRect();if(\"if-needed\"===c&&x>=0&&R>=0&&T__left_angle_mark_=v&&C__left_angle_mark_=y&&x>=i&&T__left_angle_mark_=s&&R>=l&&C__left_angle_mark_=a)return N;const u=getComputedStyle(e),f=parseInt(u.borderLeftWidth,10),p=parseInt(u.borderTopWidth,10),m=parseInt(u.borderRightWidth,10),b=parseInt(u.borderBottomWidth,10);let I=0,k=0;const P=\"offsetWidth\"in e?e.offsetWidth-e.clientWidth-f-m:0,M=\"offsetHeight\"in e?e.offsetHeight-e.clientHeight-p-b:0,j=\"offsetWidth\"in e?0===e.offsetWidth?0:n/e.offsetWidth:0,L=\"offsetHeight\"in e?0===e.offsetHeight?0:r/e.offsetHeight:0;if(g===e)I=\"start\"===d?O:\"end\"===d?O-v:\"nearest\"===d?o(w,w+v,v,p,b,w+O,w+O+S,S):O-v/2,k=\"start\"===h?B:\"center\"===h?B-y/2:\"end\"===h?B-y:o(A,A+y,y,f,m,A+B,A+B+E,E),I=Math.max(0,I+w),k=Math.max(0,k+A);else{I=\"start\"===d?O-i-p:\"end\"===d?O-s+b+M:\"nearest\"===d?o(i,s,r,p,b+M,O,O+S,S):O-(i+r/2)+M/2,k=\"start\"===h?B-l-f:\"center\"===h?B-(l+n/2)+P/2:\"end\"===h?B-a+m+P:o(l,a,n,f,m+P,B,B+E,E);const{scrollLeft:t,scrollTop:u}=e;I=0===L?0:Math.max(0,Math.min(u+I/L,e.scrollHeight-r/L+M)),k=0===j?0:Math.max(0,Math.min(t+k/j,e.scrollWidth-n/j+P)),O+=u-I,B+=t-k}N.push({el:e,top:I,left:k})}return N},o2=e=>{return!1===e?{block:\"end\",inline:\"nearest\"}:(t=e)===Object(t)&&0!==Object.keys(t).length?e:{block:\"start\",inline:\"nearest\"};var t};function e2(e,t){if(!e.isConnected||!(e=>{let t=e;for(;t&&t.parentNode;){if(t.parentNode===document)return!0;t=t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}return!1})(e))return;const n=(e=>{const t=window.getComputedStyle(e);return{top:parseFloat(t.scrollMarginTop)||0,right:parseFloat(t.scrollMarginRight)||0,bottom:parseFloat(t.scrollMarginBottom)||0,left:parseFloat(t.scrollMarginLeft)||0}})(e);if(\"object\"==typeof(i=t)&&\"function\"==typeof i.behavior)return t.behavior(r(e,t));var i;const o=\"boolean\"==typeof t||null==t?void 0:t.behavior;for(const{el:a,top:s,left:l}of r(e,o2(t))){const e=s-n.top+n.bottom,t=l-n.left+n.right;a.scroll({top:e,left:t,behavior:o})}}init_globals();var useCSSVarCls=e=>{const[,,,,t]=useToken();return t?`${e}-css-var`:\"\"},useCSSVarCls_default=useCSSVarCls;init_globals();var React81=__toESM(require_react()),import_classnames8=__toESM(require_classnames());init_globals(),init_globals();var React76=__toESM(require_react());init_globals();var React75=__toESM(require_react()),import_react_dom2=__toESM(require_react_dom());init_globals();var import_react24=__toESM(require_react()),import_classnames6=__toESM(require_classnames());init_globals();var import_classnames5=__toESM(require_classnames());init_globals();var KeyCode={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(e){var t=e.keyCode;if(e.altKey&&!e.ctrlKey||e.metaKey||t>=KeyCode.F1&&t__left_angle_mark_=KeyCode.F12)return!1;switch(t){case KeyCode.ALT:case KeyCode.CAPS_LOCK:case KeyCode.CONTEXT_MENU:case KeyCode.CTRL:case KeyCode.DOWN:case KeyCode.END:case KeyCode.ESC:case KeyCode.HOME:case KeyCode.INSERT:case KeyCode.LEFT:case KeyCode.MAC_FF_META:case KeyCode.META:case KeyCode.NUMLOCK:case KeyCode.NUM_CENTER:case KeyCode.PAGE_DOWN:case KeyCode.PAGE_UP:case KeyCode.PAUSE:case KeyCode.PRINT_SCREEN:case KeyCode.RIGHT:case KeyCode.SHIFT:case KeyCode.UP:case KeyCode.WIN_KEY:case KeyCode.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(e){if(e>=KeyCode.ZERO&&e__left_angle_mark_=KeyCode.NINE)return!0;if(e>=KeyCode.NUM_ZERO&&e__left_angle_mark_=KeyCode.NUM_MULTIPLY)return!0;if(e>=KeyCode.A&&e__left_angle_mark_=KeyCode.Z)return!0;if(-1!==window.navigator.userAgent.indexOf(\"WebKit\")&&0===e)return!0;switch(e){case KeyCode.SPACE:case KeyCode.QUESTION_MARK:case KeyCode.NUM_PLUS:case KeyCode.NUM_MINUS:case KeyCode.NUM_PERIOD:case KeyCode.NUM_DIVISION:case KeyCode.SEMICOLON:case KeyCode.DASH:case KeyCode.EQUALS:case KeyCode.COMMA:case KeyCode.PERIOD:case KeyCode.SLASH:case KeyCode.APOSTROPHE:case KeyCode.SINGLE_QUOTE:case KeyCode.OPEN_SQUARE_BRACKET:case KeyCode.BACKSLASH:case KeyCode.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},KeyCode_default=KeyCode,React72=__toESM(require_react()),Notify=React72.forwardRef((function(e,t){var r=e.prefixCls,n=e.style,i=e.className,o=e.duration,a=void 0===o?4.5:o,s=e.showProgress,l=e.pauseOnHover,u=void 0===l||l,c=e.eventKey,d=e.content,h=e.closable,f=e.closeIcon,p=void 0===f?\"x\":f,m=e.props,g=e.onClick,_=e.onNoticeClose,b=e.times,y=e.hovering,v=_slicedToArray(React72.useState(!1),2),A=v[0],w=v[1],S=_slicedToArray(React72.useState(0),2),E=S[0],x=S[1],C=_slicedToArray(React72.useState(0),2),T=C[0],R=C[1],I=y||A,k=a>0&&s,P=function(){_(c)};React72.useEffect((function(){if(!I&&a>0){var e=Date.now()-T,t=setTimeout((function(){P()}),1e3*a-T);return function(){u&&clearTimeout(t),R(Date.now()-e)}}}),[a,I,b]),React72.useEffect((function(){if(!I&&k&&(u||0===T)){var e,t=performance.now();return function r(){cancelAnimationFrame(e),e=requestAnimationFrame((function(e){var n=e+T-t,i=Math.min(n/(1e3*a),1);x(100*i),i__left_angle_mark_1&&r()}))}(),function(){u&&cancelAnimationFrame(e)}}}),[a,T,I,k,b]);var M=React72.useMemo((function(){return\"object\"===_typeof(h)&&null!==h?h:h?{closeIcon:p}:{}}),[h,p]),O=pickAttrs(M,!0),B=100-(!E||E__left_angle_mark_0?0:E>100?100:E),N=\"\".concat(r,\"-notice\");return React72.createElement(\"div\",_extends({},m,{ref:t,className:(0,import_classnames5.default)(N,i,_defineProperty({},\"\".concat(N,\"-closable\"),h)),style:n,onMouseEnter:function(e){var t;w(!0),null==m||null===(t=m.onMouseEnter)||void 0===t||t.call(m,e)},onMouseLeave:function(e){var t;w(!1),null==m||null===(t=m.onMouseLeave)||void 0===t||t.call(m,e)},onClick:g}),React72.createElement(\"div\",{className:\"\".concat(N,\"-content\")},d),h&&React72.createElement(\"a\",_extends({tabIndex:0,className:\"\".concat(N,\"-close\"),onKeyDown:function(e){\"Enter\"!==e.key&&\"Enter\"!==e.code&&e.keyCode!==KeyCode_default.ENTER||P()},\"aria-label\":\"Close\"},O,{onClick:function(e){e.preventDefault(),e.stopPropagation(),P()}}),M.closeIcon),k&&React72.createElement(\"progress\",{className:\"\".concat(N,\"-progress\"),max:\"100\",value:B},B+\"%\"))})),Notice_default=Notify;init_globals();var import_react23=__toESM(require_react()),NotificationContext=import_react23.default.createContext({}),NotificationProvider=function(e){var t=e.children,r=e.classNames;return import_react23.default.createElement(NotificationContext.Provider,{value:{classNames:r}},t)},NotificationProvider_default=NotificationProvider;init_globals();var DEFAULT_OFFSET=8,DEFAULT_THRESHOLD=3,DEFAULT_GAP=16,useStack=function(e){var t,r,n,i={offset:DEFAULT_OFFSET,threshold:DEFAULT_THRESHOLD,gap:DEFAULT_GAP};return e&&\"object\"===_typeof(e)&&(i.offset=null!==(t=e.offset)&&void 0!==t?t:DEFAULT_OFFSET,i.threshold=null!==(r=e.threshold)&&void 0!==r?r:DEFAULT_THRESHOLD,i.gap=null!==(n=e.gap)&&void 0!==n?n:DEFAULT_GAP),[!!e,i]},useStack_default=useStack,_excluded7=[\"className\",\"style\",\"classNames\",\"styles\"],NoticeList=function(e){var t=e.configList,r=e.placement,n=e.prefixCls,i=e.className,o=e.style,a=e.motion,s=e.onAllNoticeRemoved,l=e.onNoticeClose,u=e.stack,c=(0,import_react24.useContext)(NotificationContext).classNames,d=(0,import_react24.useRef)({}),h=_slicedToArray((0,import_react24.useState)(null),2),f=h[0],p=h[1],m=_slicedToArray((0,import_react24.useState)([]),2),g=m[0],_=m[1],b=t.map((function(e){return{config:e,key:String(e.key)}})),y=_slicedToArray(useStack_default(u),2),v=y[0],A=y[1],w=A.offset,S=A.threshold,E=A.gap,x=v&&(g.length>0||b.length__left_angle_mark_=S),C=\"function\"==typeof a?a(r):a;return(0,import_react24.useEffect)((function(){v&&g.length>1&&_((function(e){return e.filter((function(e){return b.some((function(t){var r=t.key;return e===r}))}))}))}),[g,b,v]),(0,import_react24.useEffect)((function(){var e,t;v&&d.current[null===(e=b[b.length-1])||void 0===e?void 0:e.key]&&p(d.current[null===(t=b[b.length-1])||void 0===t?void 0:t.key])}),[b,v]),import_react24.default.createElement(CSSMotionList_default,_extends({key:r,className:(0,import_classnames6.default)(n,\"\".concat(n,\"-\").concat(r),null==c?void 0:c.list,i,_defineProperty(_defineProperty({},\"\".concat(n,\"-stack\"),!!v),\"\".concat(n,\"-stack-expanded\"),x)),style:o,keys:b,motionAppear:!0},C,{onAllRemoved:function(){s(r)}}),(function(e,t){var i=e.config,o=e.className,a=e.style,s=e.index,u=i,h=u.key,p=u.times,m=String(h),y=i,A=y.className,S=y.style,C=y.classNames,T=y.styles,R=_objectWithoutProperties(y,_excluded7),I=b.findIndex((function(e){return e.key===m})),k={};if(v){var P=b.length-1-(I>-1?I:s-1),M=\"top\"===r||\"bottom\"===r?\"-50%\":\"0\";if(P>0){var O,B,N;k.height=x?null===(O=d.current[m])||void 0===O?void 0:O.offsetHeight:null==f?void 0:f.offsetHeight;for(var j=0,L=0;L__left_angle_mark_P;L++){var D;j+=(null===(D=d.current[b[b.length-1-L].key])||void 0===D?void 0:D.offsetHeight)+E}var F=(x?j:P*w)*(r.startsWith(\"top\")?1:-1),U=!x&&null!=f&&f.offsetWidth&&null!==(B=d.current[m])&&void 0!==B&&B.offsetWidth?((null==f?void 0:f.offsetWidth)-2*w*(P__left_angle_mark_3?P:3))/(null===(N=d.current[m])||void 0===N?void 0:N.offsetWidth):1;k.transform=\"translate3d(\".concat(M,\", \").concat(F,\"px, 0) scaleX(\").concat(U,\")\")}else k.transform=\"translate3d(\".concat(M,\", 0, 0)\")}return import_react24.default.createElement(\"div\",{ref:t,className:(0,import_classnames6.default)(\"\".concat(n,\"-notice-wrapper\"),o,null==C?void 0:C.wrapper),style:_objectSpread2(_objectSpread2(_objectSpread2({},a),k),null==T?void 0:T.wrapper),onMouseEnter:function(){return _((function(e){return e.includes(m)?e:[].concat(_toConsumableArray(e),[m])}))},onMouseLeave:function(){return _((function(e){return e.filter((function(e){return e!==m}))}))}},import_react24.default.createElement(Notice_default,_extends({},R,{ref:function(e){I>-1?d.current[m]=e:delete d.current[m]},prefixCls:n,classNames:C,styles:T,className:(0,import_classnames6.default)(A,null==c?void 0:c.notice),style:S,times:p,key:h,eventKey:h,onNoticeClose:l,hovering:v&&g.length>0})))}))};NoticeList.displayName=\"NoticeList\";var NoticeList_default=NoticeList,Notifications=React75.forwardRef((function(e,t){var r=e.prefixCls,n=void 0===r?\"rc-notification\":r,i=e.container,o=e.motion,a=e.maxCount,s=e.className,l=e.style,u=e.onAllRemoved,c=e.stack,d=e.renderNotifications,h=_slicedToArray(React75.useState([]),2),f=h[0],p=h[1],m=function(e){var t,r=f.find((function(t){return t.key===e}));null==r||null===(t=r.onClose)||void 0===t||t.call(r),p((function(t){return t.filter((function(t){return t.key!==e}))}))};React75.useImperativeHandle(t,(function(){return{open:function(e){p((function(t){var r,n=_toConsumableArray(t),i=n.findIndex((function(t){return t.key===e.key})),o=_objectSpread2({},e);return i>=0?(o.times=((null===(r=t[i])||void 0===r?void 0:r.times)||0)+1,n[i]=o):(o.times=0,n.push(o)),a>0&&n.length>a&&(n=n.slice(-a)),n}))},close:function(e){m(e)},destroy:function(){p([])}}}));var g=_slicedToArray(React75.useState({}),2),_=g[0],b=g[1];React75.useEffect((function(){var e={};f.forEach((function(t){var r=t.placement,n=void 0===r?\"topRight\":r;n&&(e[n]=e[n]||[],e[n].push(t))})),Object.keys(_).forEach((function(t){e[t]=e[t]||[]})),b(e)}),[f]);var y=function(e){b((function(t){var r=_objectSpread2({},t);return(r[e]||[]).length||delete r[e],r}))},v=React75.useRef(!1);if(React75.useEffect((function(){Object.keys(_).length>0?v.current=!0:v.current&&(null==u||u(),v.current=!1)}),[_]),!i)return null;var A=Object.keys(_);return(0,import_react_dom2.createPortal)(React75.createElement(React75.Fragment,null,A.map((function(e){var t=_[e],r=React75.createElement(NoticeList_default,{key:e,configList:t,placement:e,prefixCls:n,className:null==s?void 0:s(e),style:null==l?void 0:l(e),motion:o,onNoticeClose:m,onAllNoticeRemoved:y,stack:c});return d?d(r,{prefixCls:n,key:e}):r}))),i)}));Notifications.displayName=\"Notifications\";var Notifications_default=Notifications,_excluded8=[\"getContainer\",\"motion\",\"prefixCls\",\"maxCount\",\"className\",\"style\",\"onAllRemoved\",\"stack\",\"renderNotifications\"],defaultGetContainer=function(){return document.body},uniqueKey=0;function mergeConfig(){for(var e={},t=arguments.length,r=new Array(t),n=0;n__left_angle_mark_t;n++)r[n]=arguments[n];return r.forEach((function(t){t&&Object.keys(t).forEach((function(r){var n=t[r];void 0!==n&&(e[r]=n)}))})),e}function useNotification(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.getContainer,r=void 0===t?defaultGetContainer:t,n=e.motion,i=e.prefixCls,o=e.maxCount,a=e.className,s=e.style,l=e.onAllRemoved,u=e.stack,c=e.renderNotifications,d=_objectWithoutProperties(e,_excluded8),h=_slicedToArray(React76.useState(),2),f=h[0],p=h[1],m=React76.useRef(),g=React76.createElement(Notifications_default,{container:f,ref:m,prefixCls:i,motion:n,maxCount:o,className:a,style:s,onAllRemoved:l,stack:u,renderNotifications:c}),_=_slicedToArray(React76.useState([]),2),b=_[0],y=_[1],v=React76.useMemo((function(){return{open:function(e){var t=mergeConfig(d,e);null!==t.key&&void 0!==t.key||(t.key=\"rc-notification-\".concat(uniqueKey),uniqueKey+=1),y((function(e){return[].concat(_toConsumableArray(e),[{type:\"open\",config:t}])}))},close:function(e){y((function(t){return[].concat(_toConsumableArray(t),[{type:\"close\",key:e}])}))},destroy:function(){y((function(e){return[].concat(_toConsumableArray(e),[{type:\"destroy\"}])}))}}}),[]);return React76.useEffect((function(){p(r())})),React76.useEffect((function(){m.current&&b.length&&(b.forEach((function(e){switch(e.type){case\"open\":m.current.open(e.config);break;case\"close\":m.current.close(e.key);break;case\"destroy\":m.current.destroy()}})),y((function(e){return e.filter((function(e){return!b.includes(e)}))})))}),[b]),[v,g]}init_globals();var React80=__toESM(require_react());init_globals();var React77=__toESM(require_react()),LoadingOutlined4=function(e,t){return React77.createElement(AntdIcon_default2,_extends({},e,{ref:t,icon:LoadingOutlined_default}))},RefIcon25=React77.forwardRef(LoadingOutlined4);RefIcon25.displayName=\"LoadingOutlined\";var LoadingOutlined_default3=RefIcon25,import_classnames7=__toESM(require_classnames());init_globals(),init_globals();var import_react26=__toESM(require_react());init_globals();var import_react25=__toESM(require_react()),zIndexContext=import_react25.default.createContext(void 0);zIndexContext.displayName=\"zIndexContext\";var zindexContext_default=zIndexContext,CONTAINER_OFFSET=100,CONTAINER_OFFSET_MAX_COUNT=10,CONTAINER_MAX_OFFSET=CONTAINER_OFFSET*CONTAINER_OFFSET_MAX_COUNT,CONTAINER_MAX_OFFSET_WITH_CHILDREN=CONTAINER_MAX_OFFSET+CONTAINER_OFFSET,containerBaseZIndexOffset={Modal:CONTAINER_OFFSET,Drawer:CONTAINER_OFFSET,Popover:CONTAINER_OFFSET,Popconfirm:CONTAINER_OFFSET,Tooltip:CONTAINER_OFFSET,Tour:CONTAINER_OFFSET,FloatButton:CONTAINER_OFFSET},consumerBaseZIndexOffset={SelectLike:50,Dropdown:50,DatePicker:50,Menu:50,ImagePreview:1};function isContainerType(e){return e in containerBaseZIndexOffset}var useZIndex=(e,t)=>{const[,r]=useToken(),n=import_react26.default.useContext(zindexContext_default),i=isContainerType(e);let o;if(void 0!==t)o=[t,t];else{let a=null!=n?n:0;a+=i?(n?0:r.zIndexPopupBase)+containerBaseZIndexOffset[e]:consumerBaseZIndexOffset[e],o=[void 0===n?t:a,a]}{const n=devUseWarning(e),i=r.zIndexPopupBase+CONTAINER_MAX_OFFSET_WITH_CHILDREN,a=o[0]||0;n(void 0!==t||a__left_angle_mark_=i,\"usage\",\"`zIndex` is over design token `zIndexPopupBase` too much. It may cause unexpected override.\")}return o},genMessageStyle=e=>{const{componentCls:t,iconCls:r,boxShadow:n,colorText:i,colorSuccess:o,colorError:a,colorWarning:s,colorInfo:l,fontSizeLG:u,motionEaseInOutCirc:c,motionDurationSlow:d,marginXS:h,paddingXS:f,borderRadiusLG:p,zIndexPopup:m,contentPadding:g,contentBg:_}=e,b=`${t}-notice`,y=new Keyframes_default(\"MessageMoveIn\",{\"0%\":{padding:0,transform:\"translateY(-100%)\",opacity:0},\"100%\":{padding:f,transform:\"translateY(0)\",opacity:1}}),v=new Keyframes_default(\"MessageMoveOut\",{\"0%\":{maxHeight:e.height,padding:f,opacity:1},\"100%\":{maxHeight:0,padding:0,opacity:0}}),A={padding:f,textAlign:\"center\",[`${t}-custom-content`]:{display:\"flex\",alignItems:\"center\"},[`${t}-custom-content > ${r}`]:{marginInlineEnd:h,fontSize:u},[`${b}-content`]:{display:\"inline-block\",padding:g,background:_,borderRadius:p,boxShadow:n,pointerEvents:\"all\"},[`${t}-success > ${r}`]:{color:o},[`${t}-error > ${r}`]:{color:a},[`${t}-warning > ${r}`]:{color:s},[`${t}-info > ${r},\\n ${t}-loading > ${r}`]:{color:l}};return[{[t]:Object.assign(Object.assign({},resetComponent(e)),{color:i,position:\"fixed\",top:h,width:\"100%\",pointerEvents:\"none\",zIndex:m,[`${t}-move-up`]:{animationFillMode:\"forwards\"},[`\\n ${t}-move-up-appear,\\n ${t}-move-up-enter\\n `]:{animationName:y,animationDuration:d,animationPlayState:\"paused\",animationTimingFunction:c},[`\\n ${t}-move-up-appear${t}-move-up-appear-active,\\n ${t}-move-up-enter${t}-move-up-enter-active\\n `]:{animationPlayState:\"running\"},[`${t}-move-up-leave`]:{animationName:v,animationDuration:d,animationPlayState:\"paused\",animationTimingFunction:c},[`${t}-move-up-leave${t}-move-up-leave-active`]:{animationPlayState:\"running\"},\"&-rtl\":{direction:\"rtl\",span:{direction:\"rtl\"}}})},{[t]:{[`${b}-wrapper`]:Object.assign({},A)}},{[`${t}-notice-pure-panel`]:Object.assign(Object.assign({},A),{padding:0,textAlign:\"start\"})}]},prepareComponentToken2=e=>({zIndexPopup:e.zIndexPopupBase+CONTAINER_MAX_OFFSET+10,contentBg:e.colorBgElevated,contentPadding:`${(e.controlHeightLG-e.fontSize*e.lineHeight)/2}px ${e.paddingSM}px`}),style_default2=genStyleHooks(\"Message\",(e=>{const t=merge2(e,{height:150});return[genMessageStyle(t)]}),prepareComponentToken2),__rest5=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)__left_angle_mark_0&&(r[n]=e[n]);if(null!=e&&\"function\"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i__left_angle_mark_n.length;i++)t.indexOf(n[i])__left_angle_mark_0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r},TypeIcon={info:React80.createElement(InfoCircleFilled_default2,null),success:React80.createElement(CheckCircleFilled_default2,null),error:React80.createElement(CloseCircleFilled_default2,null),warning:React80.createElement(ExclamationCircleFilled_default2,null),loading:React80.createElement(LoadingOutlined_default3,null)},PureContent=e=>{let{prefixCls:t,type:r,icon:n,children:i}=e;return React80.createElement(\"div\",{className:(0,import_classnames7.default)(`${t}-custom-content`,`${t}-${r}`)},n||TypeIcon[r],React80.createElement(\"span\",null,i))},PurePanel=e=>{const{prefixCls:t,className:r,type:n,icon:i,content:o}=e,a=__rest5(e,[\"prefixCls\",\"className\",\"type\",\"icon\",\"content\"]),{getPrefixCls:s}=React80.useContext(ConfigContext),l=t||s(\"message\"),u=useCSSVarCls_default(l),[c,d,h]=style_default2(l,u);return c(React80.createElement(Notice_default,Object.assign({},a,{prefixCls:l,className:(0,import_classnames7.default)(r,d,`${l}-notice-pure-panel`,h,u),eventKey:\"pure\",duration:null,content:React80.createElement(PureContent,{prefixCls:l,type:n,icon:i},o)})))},PurePanel_default=PurePanel;function getMotion(e,t){return{motionName:null!=t?t:`${e}-move-up`}}function wrapPromiseFn(e){let t;const r=new Promise((r=>{t=e((()=>{r(!0)}))})),n=()=>{null==t||t()};return n.then=(e,t)=>r.then(e,t),n.promise=r,n}init_globals();var __rest6=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)__left_angle_mark_0&&(r[n]=e[n]);if(null!=e&&\"function\"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i__left_angle_mark_n.length;i++)t.indexOf(n[i])__left_angle_mark_0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r},DEFAULT_OFFSET2=8,DEFAULT_DURATION=3,Wrapper=e=>{let{children:t,prefixCls:r}=e;const n=useCSSVarCls_default(r),[i,o,a]=style_default2(r,n);return i(React81.createElement(NotificationProvider_default,{classNames:{list:(0,import_classnames8.default)(o,a,n)}},t))},renderNotifications=(e,t)=>{let{prefixCls:r,key:n}=t;return React81.createElement(Wrapper,{prefixCls:r,key:n},e)},Holder=React81.forwardRef(((e,t)=>{const{top:r,prefixCls:n,getContainer:i,maxCount:o,duration:a=DEFAULT_DURATION,rtl:s,transitionName:l,onAllRemoved:u}=e,{getPrefixCls:c,getPopupContainer:d,message:h,direction:f}=React81.useContext(ConfigContext),p=n||c(\"message\"),m=React81.createElement(\"span\",{className:`${p}-close-x`},React81.createElement(CloseOutlined_default3,{className:`${p}-close-icon`})),[g,_]=useNotification({prefixCls:p,style:()=>({left:\"50%\",transform:\"translateX(-50%)\",top:null!=r?r:DEFAULT_OFFSET2}),className:()=>(0,import_classnames8.default)({[`${p}-rtl`]:null!=s?s:\"rtl\"===f}),motion:()=>getMotion(p,l),closable:!1,closeIcon:m,duration:a,getContainer:()=>(null==i?void 0:i())||(null==d?void 0:d())||document.body,maxCount:o,onAllRemoved:u,renderNotifications:renderNotifications});return React81.useImperativeHandle(t,(()=>Object.assign(Object.assign({},g),{prefixCls:p,message:h}))),_})),keyIndex=0;function useInternalMessage(e){const t=React81.useRef(null),r=devUseWarning(\"Message\");return[React81.useMemo((()=>{const e=e=>{var r;null===(r=t.current)||void 0===r||r.close(e)},n=n=>{if(!t.current){r(!1,\"usage\",\"You are calling notice in render which will break in React 18 concurrent mode. Please trigger in effect instead.\");const e=()=>{};return e.then=()=>{},e}const{open:i,prefixCls:o,message:a}=t.current,s=`${o}-notice`,{content:l,icon:u,type:c,key:d,className:h,style:f,onClose:p}=n,m=__rest6(n,[\"content\",\"icon\",\"type\",\"key\",\"className\",\"style\",\"onClose\"]);let g=d;return null==g&&(g=`antd-message-${keyIndex+=1}`),wrapPromiseFn((t=>(i(Object.assign(Object.assign({},m),{key:g,content:React81.createElement(PureContent,{prefixCls:o,type:c,icon:u},l),placement:\"top\",className:(0,import_classnames8.default)(c&&`${s}-${c}`,h,null==a?void 0:a.className),style:Object.assign(Object.assign({},null==a?void 0:a.style),f),onClose:()=>{null==p||p(),t()}})),()=>{e(g)})))},i={open:n,destroy:r=>{var n;void 0!==r?e(r):null===(n=t.current)||void 0===n||n.destroy()}};return[\"info\",\"success\",\"warning\",\"error\",\"loading\"].forEach((e=>{i[e]=(t,r,i)=>{let o,a,s;o=t&&\"object\"==typeof t&&\"content\"in t?t:{content:t},\"function\"==typeof r?s=r:(a=r,s=i);const l=Object.assign(Object.assign({onClose:s,duration:a},o),{type:e});return n(l)}})),i}),[]),React81.createElement(Holder,Object.assign({key:\"message-holder\"},e,{ref:t}))]}function useMessage(e){return useInternalMessage(e)}init_globals();var React149=__toESM(require_react());init_globals();var React82=__toESM(require_react());function usePatchElement(){const[e,t]=React82.useState([]);return[e,React82.useCallback((e=>(t((t=>[].concat(_toConsumableArray(t),[e]))),()=>{t((t=>t.filter((t=>t!==e))))})),[])]}init_globals();var import_react57=__toESM(require_react());function _regeneratorRuntime(){_regeneratorRuntime=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},o=\"function\"==typeof Symbol?Symbol:{},a=o.iterator||\"@@iterator\",s=o.asyncIterator||\"@@asyncIterator\",l=o.toStringTag||\"@@toStringTag\";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},\"\")}catch(M){u=function(e,t,r){return e[t]=r}}function c(e,t,r,n){var o=t&&t.prototype instanceof _?t:_,a=Object.create(o.prototype),s=new k(n||[]);return i(a,\"_invoke\",{value:C(e,r,s)}),a}function d(e,t,r){try{return{type:\"normal\",arg:e.call(t,r)}}catch(n){return{type:\"throw\",arg:n}}}t.wrap=c;var h=\"suspendedStart\",f=\"suspendedYield\",p=\"executing\",m=\"completed\",g={};function _(){}function b(){}function y(){}var v={};u(v,a,(function(){return this}));var A=Object.getPrototypeOf,w=A&&A(A(P([])));w&&w!==r&&n.call(w,a)&&(v=w);var S=y.prototype=_.prototype=Object.create(v);function E(e){[\"next\",\"throw\",\"return\"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){function r(i,o,a,s){var l=d(e[i],e,o);if(\"throw\"!==l.type){var u=l.arg,c=u.value;return c&&\"object\"==_typeof(c)&&n.call(c,\"__await\")?t.resolve(c.__await).then((function(e){r(\"next\",e,a,s)}),(function(e){r(\"throw\",e,a,s)})):t.resolve(c).then((function(e){u.value=e,a(u)}),(function(e){return r(\"throw\",e,a,s)}))}s(l.arg)}var o;i(this,\"_invoke\",{value:function(e,n){function i(){return new t((function(t,i){r(e,n,t,i)}))}return o=o?o.then(i,i):i()}})}function C(t,r,n){var i=h;return function(o,a){if(i===p)throw Error(\"Generator is already running\");if(i===m){if(\"throw\"===o)throw a;return{value:e,done:!0}}for(n.method=o,n.arg=a;;){var s=n.delegate;if(s){var l=T(s,n);if(l){if(l===g)continue;return l}}if(\"next\"===n.method)n.sent=n._sent=n.arg;else if(\"throw\"===n.method){if(i===h)throw i=m,n.arg;n.dispatchException(n.arg)}else\"return\"===n.method&&n.abrupt(\"return\",n.arg);i=p;var u=d(t,r,n);if(\"normal\"===u.type){if(i=n.done?m:f,u.arg===g)continue;return{value:u.arg,done:n.done}}\"throw\"===u.type&&(i=m,n.method=\"throw\",n.arg=u.arg)}}}function T(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,\"throw\"===n&&t.iterator.return&&(r.method=\"return\",r.arg=e,T(t,r),\"throw\"===r.method)||\"return\"!==n&&(r.method=\"throw\",r.arg=new TypeError(\"The iterator does not provide a '\"+n+\"' method\")),g;var o=d(i,t.iterator,r.arg);if(\"throw\"===o.type)return r.method=\"throw\",r.arg=o.arg,r.delegate=null,g;var a=o.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,\"return\"!==r.method&&(r.method=\"next\",r.arg=e),r.delegate=null,g):a:(r.method=\"throw\",r.arg=new TypeError(\"iterator result is not an object\"),r.delegate=null,g)}function R(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function I(e){var t=e.completion||{};t.type=\"normal\",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:\"root\"}],e.forEach(R,this),this.reset(!0)}function P(t){if(t||\"\"===t){var r=t[a];if(r)return r.call(t);if(\"function\"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function r(){for(;++i__left_angle_mark_t.length;)if(n.call(t,i))return r.value=t[i],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(_typeof(t)+\" is not iterable\")}return b.prototype=y,i(S,\"constructor\",{value:y,configurable:!0}),i(y,\"constructor\",{value:b,configurable:!0}),b.displayName=u(y,l,\"GeneratorFunction\"),t.isGeneratorFunction=function(e){var t=\"function\"==typeof e&&e.constructor;return!!t&&(t===b||\"GeneratorFunction\"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,u(e,l,\"GeneratorFunction\")),e.prototype=Object.create(S),e},t.awrap=function(e){return{__await:e}},E(x.prototype),u(x.prototype,s,(function(){return this})),t.AsyncIterator=x,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var a=new x(c(e,r,n,i),o);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},E(S),u(S,l,\"Generator\"),u(S,a,(function(){return this})),u(S,\"toString\",(function(){return\"[object Generator]\"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=P,k.prototype={constructor:k,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method=\"next\",this.arg=e,this.tryEntries.forEach(I),!t)for(var r in this)\"t\"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if(\"throw\"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function i(n,i){return s.type=\"throw\",s.arg=t,r.next=n,i&&(r.method=\"next\",r.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if(\"root\"===a.tryLoc)return i(\"end\");if(a.tryLoc__left_angle_mark_=this.prev){var l=n.call(a,\"catchLoc\"),u=n.call(a,\"finallyLoc\");if(l&&u){if(this.prev__left_angle_mark_a.catchLoc)return i(a.catchLoc,!0);if(this.prev__left_angle_mark_a.finallyLoc)return i(a.finallyLoc)}else if(l){if(this.prev__left_angle_mark_a.catchLoc)return i(a.catchLoc,!0)}else{if(!u)throw Error(\"try statement without catch or finally\");if(this.prev__left_angle_mark_a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc__left_angle_mark_=this.prev&&n.call(i,\"finallyLoc\")&&this.prev__left_angle_mark_i.finallyLoc){var o=i;break}}o&&(\"break\"===e||\"continue\"===e)&&o.tryLoc__left_angle_mark_=t&&t__left_angle_mark_=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method=\"next\",this.next=o.finallyLoc,g):this.complete(a)},complete:function(e,t){if(\"throw\"===e.type)throw e.arg;return\"break\"===e.type||\"continue\"===e.type?this.next=e.arg:\"return\"===e.type?(this.rval=this.arg=e.arg,this.method=\"return\",this.next=\"end\"):\"normal\"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),I(r),g}},\"catch\":function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if(\"throw\"===n.type){var i=n.arg;I(r)}return i}}throw Error(\"illegal catch attempt\")},delegateYield:function(t,r,n){return this.delegate={iterator:P(t),resultName:r,nextLoc:n},\"next\"===this.method&&(this.arg=e),g}},t}function asyncGeneratorStep(e,t,r,n,i,o,a){try{var s=e[o](a),l=s.value}catch(u){return void r(u)}s.done?t(l):Promise.resolve(l).then(n,i)}function _asyncToGenerator(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){asyncGeneratorStep(o,n,i,a,s,\"next\",e)}function s(e){asyncGeneratorStep(o,n,i,a,s,\"throw\",e)}a(void 0)}))}}init_globals(),init_globals(),init_globals();var ReactDOM2=__toESM(require_react_dom()),fullClone4=_objectSpread2({},ReactDOM2),version2=fullClone4.version,reactRender=fullClone4.render,unmountComponentAtNode=fullClone4.unmountComponentAtNode,createRoot,mainVersion;try{mainVersion=Number((version2||\"\").split(\".\")[0]),mainVersion>=18&&(createRoot=fullClone4.createRoot)}catch(e4){}function toggleWarning(e){var t=fullClone4.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;t&&\"object\"===_typeof(t)&&(t.usingClientEntryPoint=e)}var MARK=\"__rc_react_root__\";function modernRender(e,t){toggleWarning(!0);var r=t[MARK]||createRoot(t);toggleWarning(!1),r.render(e),t[MARK]=r}function legacyRender(e,t){reactRender(e,t)}function render3(e,t){createRoot?modernRender(e,t):legacyRender(e,t)}function modernUnmount(e){return _modernUnmount.apply(this,arguments)}function _modernUnmount(){return(_modernUnmount=_asyncToGenerator(_regeneratorRuntime().mark((function e(t){return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt(\"return\",Promise.resolve().then((function(){var e;null===(e=t[MARK])||void 0===e||e.unmount(),delete t[MARK]})));case 1:case\"end\":return e.stop()}}),e)})))).apply(this,arguments)}function legacyUnmount(e){unmountComponentAtNode(e)}function unmount(e){return _unmount.apply(this,arguments)}function _unmount(){return(_unmount=_asyncToGenerator(_regeneratorRuntime().mark((function e(t){return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(void 0===createRoot){e.next=2;break}return e.abrupt(\"return\",modernUnmount(t));case 2:legacyUnmount(t);case 3:case\"end\":return e.stop()}}),e)})))).apply(this,arguments)}init_globals();var React146=__toESM(require_react()),import_classnames35=__toESM(require_classnames());init_globals();var getCollapsedHeight=()=>({height:0,opacity:0}),getRealHeight=e=>{const{scrollHeight:t}=e;return{height:t,opacity:1}},getCurrentHeight=e=>({height:e?e.offsetHeight:0}),skipOpacityTransition=(e,t)=>!0===(null==t?void 0:t.deadline)||\"height\"===t.propertyName,initCollapseMotion=function(){return{motionName:`${arguments.length>0&&void 0!==arguments[0]?arguments[0]:defaultPrefixCls}-motion-collapse`,onAppearStart:getCollapsedHeight,onEnterStart:getCollapsedHeight,onAppearActive:getRealHeight,onEnterActive:getRealHeight,onLeaveStart:getCurrentHeight,onLeaveActive:getCollapsedHeight,onAppearEnd:skipOpacityTransition,onEnterEnd:skipOpacityTransition,onLeaveEnd:skipOpacityTransition,motionDeadline:500}},getTransitionName2=(e,t,r)=>void 0!==r?r:`${e}-${t}`,motion_default=initCollapseMotion;init_globals();var import_react45=__toESM(require_react());init_globals();var React104=__toESM(require_react());init_globals(),init_globals();var import_react43=__toESM(require_react()),import_classnames20=__toESM(require_classnames());init_globals();var import_react27=__toESM(require_react()),import_classnames10=__toESM(require_classnames());init_globals();var isVisible_default=function(e){if(!e)return!1;if(e instanceof Element){if(e.offsetParent)return!0;if(e.getBBox){var t=e.getBBox(),r=t.width,n=t.height;if(r||n)return!0}if(e.getBoundingClientRect){var i=e.getBoundingClientRect(),o=i.width,a=i.height;if(o||a)return!0}}return!1};init_globals();var genWaveStyle=e=>{const{componentCls:t,colorPrimary:r}=e;return{[t]:{position:\"absolute\",background:\"transparent\",pointerEvents:\"none\",boxSizing:\"border-box\",color:`var(--wave-color, ${r})`,boxShadow:\"0 0 0 0 currentcolor\",opacity:.2,\"&.wave-motion-appear\":{transition:[`box-shadow 0.4s ${e.motionEaseOutCirc}`,`opacity 2s ${e.motionEaseOutCirc}`].join(\",\"),\"&-active\":{boxShadow:\"0 0 0 6px currentcolor\",opacity:0},\"&.wave-quick\":{transition:[`box-shadow ${e.motionDurationSlow} ${e.motionEaseInOut}`,`opacity ${e.motionDurationSlow} ${e.motionEaseInOut}`].join(\",\")}}}}},style_default3=genComponentStyleHook(\"Wave\",(e=>[genWaveStyle(e)]));init_globals();var React84=__toESM(require_react());init_globals();var TARGET_CLS=`${defaultPrefixCls}-wave-target`;init_globals();var React83=__toESM(require_react()),import_classnames9=__toESM(require_classnames());function isValidWaveColor(e){return e&&\"#fff\"!==e&&\"#ffffff\"!==e&&\"rgb(255, 255, 255)\"!==e&&\"rgba(255, 255, 255, 1)\"!==e&&!/rgba\\((?:\\d*, ){3}0\\)/.test(e)&&\"transparent\"!==e}function getTargetWaveColor(e){const{borderTopColor:t,borderColor:r,backgroundColor:n}=getComputedStyle(e);return isValidWaveColor(t)?t:isValidWaveColor(r)?r:isValidWaveColor(n)?n:null}function validateNum(e){return Number.isNaN(e)?0:e}init_globals();var WaveEffect=e=>{const{className:t,target:r,component:n}=e,i=React83.useRef(null),[o,a]=React83.useState(null),[s,l]=React83.useState([]),[u,c]=React83.useState(0),[d,h]=React83.useState(0),[f,p]=React83.useState(0),[m,g]=React83.useState(0),[_,b]=React83.useState(!1),y={left:u,top:d,width:f,height:m,borderRadius:s.map((e=>`${e}px`)).join(\" \")};function v(){const e=getComputedStyle(r);a(getTargetWaveColor(r));const t=\"static\"===e.position,{borderLeftWidth:n,borderTopWidth:i}=e;c(t?r.offsetLeft:validateNum(-parseFloat(n))),h(t?r.offsetTop:validateNum(-parseFloat(i))),p(r.offsetWidth),g(r.offsetHeight);const{borderTopLeftRadius:o,borderTopRightRadius:s,borderBottomLeftRadius:u,borderBottomRightRadius:d}=e;l([o,s,d,u].map((e=>validateNum(parseFloat(e)))))}if(o&&(y[\"--wave-color\"]=o),React83.useEffect((()=>{if(r){const e=raf_default((()=>{v(),b(!0)}));let t;return\"undefined\"!=typeof ResizeObserver&&(t=new ResizeObserver(v),t.observe(r)),()=>{raf_default.cancel(e),null==t||t.disconnect()}}}),[]),!_)return null;const A=(\"Checkbox\"===n||\"Radio\"===n)&&(null==r?void 0:r.classList.contains(TARGET_CLS));return React83.createElement(es_default2,{visible:!0,motionAppear:!0,motionName:\"wave-motion\",motionDeadline:5e3,onAppearEnd:(e,t)=>{var r;if(t.deadline||\"opacity\"===t.propertyName){const e=null===(r=i.current)||void 0===r?void 0:r.parentElement;unmount(e).then((()=>{null==e||e.remove()}))}return!1}},((e,r)=>{let{className:n}=e;return React83.createElement(\"div\",{ref:composeRef(i,r),className:(0,import_classnames9.default)(t,n,{\"wave-quick\":A}),style:y})}))},showWaveEffect=(e,t)=>{var r;const{component:n}=t;if(\"Checkbox\"===n&&!(null===(r=e.querySelector(\"input\"))||void 0===r?void 0:r.checked))return;const i=document.createElement(\"div\");i.style.position=\"absolute\",i.style.left=\"0px\",i.style.top=\"0px\",null==e||e.insertBefore(i,null==e?void 0:e.firstChild),render3(React83.createElement(WaveEffect,Object.assign({},t,{target:e})),i)},WaveEffect_default=showWaveEffect,useWave=(e,t,r)=>{const{wave:n}=React84.useContext(ConfigContext),[,i,o]=useToken(),a=useEvent((a=>{const s=e.current;if((null==n?void 0:n.disabled)||!s)return;const l=s.querySelector(`.${TARGET_CLS}`)||s,{showEffect:u}=n||{};(u||WaveEffect_default)(l,{className:t,token:i,component:r,event:a,hashId:o})})),s=React84.useRef();return e=>{raf_default.cancel(s.current),s.current=raf_default((()=>{a(e)}))}},useWave_default=useWave,Wave=e=>{const{children:t,disabled:r,component:n}=e,{getPrefixCls:i}=(0,import_react27.useContext)(ConfigContext),o=(0,import_react27.useRef)(null),a=i(\"wave\"),[,s]=style_default3(a),l=useWave_default(o,(0,import_classnames10.default)(a,s),n);return import_react27.default.useEffect((()=>{const e=o.current;if(!e||1!==e.nodeType||r)return;const t=t=>{!isVisible_default(t.target)||!e.getAttribute||e.getAttribute(\"disabled\")||e.disabled||e.className.includes(\"disabled\")||e.className.includes(\"-leave\")||l(t)};return e.addEventListener(\"click\",t,!0),()=>{e.removeEventListener(\"click\",t,!0)}}),[r]),import_react27.default.isValidElement(t)?cloneElement3(t,{ref:supportRef(t)?composeRef(t.ref,o):o}):null!=t?t:null};Wave.displayName=\"Wave\";var wave_default=Wave;init_globals();var import_react28=__toESM(require_react()),useSize=e=>{const t=import_react28.default.useContext(SizeContext_default);return import_react28.default.useMemo((()=>e?\"string\"==typeof e?null!=e?e:t:e instanceof Function?e(t):t:t),[e,t])},useSize_default=useSize;init_globals();var React87=__toESM(require_react()),import_classnames11=__toESM(require_classnames());init_globals(),init_globals();var genSpaceCompactStyle=e=>{const{componentCls:t}=e;return{[t]:{\"&-block\":{display:\"flex\",width:\"100%\"},\"&-vertical\":{flexDirection:\"column\"}}}},compact_default=genSpaceCompactStyle,genSpaceStyle=e=>{const{componentCls:t,antCls:r}=e;return{[t]:{display:\"inline-flex\",\"&-rtl\":{direction:\"rtl\"},\"&-vertical\":{flexDirection:\"column\"},\"&-align\":{flexDirection:\"column\",\"&-center\":{alignItems:\"center\"},\"&-start\":{alignItems:\"flex-start\"},\"&-end\":{alignItems:\"flex-end\"},\"&-baseline\":{alignItems:\"baseline\"}},[`${t}-item:empty`]:{display:\"none\"},[`${t}-item > ${r}-badge-not-a-wrapper:only-child`]:{display:\"block\"}}}},genSpaceGapStyle=e=>{const{componentCls:t}=e;return{[t]:{\"&-gap-row-small\":{rowGap:e.spaceGapSmallSize},\"&-gap-row-middle\":{rowGap:e.spaceGapMiddleSize},\"&-gap-row-large\":{rowGap:e.spaceGapLargeSize},\"&-gap-col-small\":{columnGap:e.spaceGapSmallSize},\"&-gap-col-middle\":{columnGap:e.spaceGapMiddleSize},\"&-gap-col-large\":{columnGap:e.spaceGapLargeSize}}}},style_default4=genStyleHooks(\"Space\",(e=>{const t=merge2(e,{spaceGapSmallSize:e.paddingXS,spaceGapMiddleSize:e.padding,spaceGapLargeSize:e.paddingLG});return[genSpaceStyle(t),genSpaceGapStyle(t),compact_default(t)]}),(()=>({})),{resetStyle:!1}),__rest7=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)__left_angle_mark_0&&(r[n]=e[n]);if(null!=e&&\"function\"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i__left_angle_mark_n.length;i++)t.indexOf(n[i])__left_angle_mark_0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r},SpaceCompactItemContext=React87.createContext(null),useCompactItemContext=(e,t)=>{const r=React87.useContext(SpaceCompactItemContext),n=React87.useMemo((()=>{if(!r)return\"\";const{compactDirection:n,isFirstItem:i,isLastItem:o}=r,a=\"vertical\"===n?\"-vertical-\":\"-\";return(0,import_classnames11.default)(`${e}-compact${a}item`,{[`${e}-compact${a}first-item`]:i,[`${e}-compact${a}last-item`]:o,[`${e}-compact${a}item-rtl`]:\"rtl\"===t})}),[e,t,r]);return{compactSize:null==r?void 0:r.compactSize,compactDirection:null==r?void 0:r.compactDirection,compactItemClassnames:n}},NoCompactStyle=e=>{let{children:t}=e;return React87.createElement(SpaceCompactItemContext.Provider,{value:null},t)},CompactItem=e=>{var{children:t}=e,r=__rest7(e,[\"children\"]);return React87.createElement(SpaceCompactItemContext.Provider,{value:r},t)},Compact=e=>{const{getPrefixCls:t,direction:r}=React87.useContext(ConfigContext),{size:n,direction:i,block:o,prefixCls:a,className:s,rootClassName:l,children:u}=e,c=__rest7(e,[\"size\",\"direction\",\"block\",\"prefixCls\",\"className\",\"rootClassName\",\"children\"]),d=useSize_default((e=>null!=n?n:e)),h=t(\"space-compact\",a),[f,p]=style_default4(h),m=(0,import_classnames11.default)(h,p,{[`${h}-rtl`]:\"rtl\"===r,[`${h}-block`]:o,[`${h}-vertical`]:\"vertical\"===i},s,l),g=React87.useContext(SpaceCompactItemContext),_=toArray(u),b=React87.useMemo((()=>_.map(((e,t)=>{const r=(null==e?void 0:e.key)||`${h}-item-${t}`;return React87.createElement(CompactItem,{key:r,compactSize:d,compactDirection:i,isFirstItem:0===t&&(!g||(null==g?void 0:g.isFirstItem)),isLastItem:t===_.length-1&&(!g||(null==g?void 0:g.isLastItem))},e)}))),[n,_,g]);return 0===_.length?null:f(React87.createElement(\"div\",Object.assign({className:m},c),b))},Compact_default=Compact;init_globals();var React88=__toESM(require_react()),import_classnames12=__toESM(require_classnames()),__rest8=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)__left_angle_mark_0&&(r[n]=e[n]);if(null!=e&&\"function\"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i__left_angle_mark_n.length;i++)t.indexOf(n[i])__left_angle_mark_0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r},GroupSizeContext=React88.createContext(void 0),ButtonGroup=e=>{const{getPrefixCls:t,direction:r}=React88.useContext(ConfigContext),{prefixCls:n,size:i,className:o}=e,a=__rest8(e,[\"prefixCls\",\"size\",\"className\"]),s=t(\"btn-group\",n),[,,l]=useToken();let u=\"\";switch(i){case\"large\":u=\"lg\";break;case\"small\":u=\"sm\"}devUseWarning(\"Button.Group\")(!i||[\"large\",\"small\",\"middle\"].includes(i),\"usage\",\"Invalid prop `size`.\");const c=(0,import_classnames12.default)(s,{[`${s}-${u}`]:u,[`${s}-rtl`]:\"rtl\"===r},o,l);return React88.createElement(GroupSizeContext.Provider,{value:i},React88.createElement(\"div\",Object.assign({},a,{className:c})))},button_group_default=ButtonGroup;init_globals();var import_react29=__toESM(require_react()),rxTwoCNChar=/^[\\u4E00-\\u9FA5]{2}$/,isTwoCNChar=rxTwoCNChar.test.bind(rxTwoCNChar);function convertLegacyProps(e){return\"danger\"===e?{danger:!0}:{type:e}}function isString(e){return\"string\"==typeof e}function isUnBorderedButtonVariant(e){return\"text\"===e||\"link\"===e}function splitCNCharsBySpace(e,t){if(null==e)return;const r=t?\" \":\"\";return\"string\"!=typeof e&&\"number\"!=typeof e&&isString(e.type)&&isTwoCNChar(e.props.children)?cloneElement3(e,{children:e.props.children.split(\"\").join(r)}):isString(e)?isTwoCNChar(e)?import_react29.default.createElement(\"span\",null,e.split(\"\").join(r)):import_react29.default.createElement(\"span\",null,e):isFragment3(e)?import_react29.default.createElement(\"span\",null,e):e}function spaceChildren(e,t){let r=!1;const n=[];return import_react29.default.Children.forEach(e,(e=>{const t=typeof e,i=\"string\"===t||\"number\"===t;if(r&&i){const t=n.length-1,r=n[t];n[t]=`${r}${e}`}else n.push(e);r=i})),import_react29.default.Children.map(n,(e=>splitCNCharsBySpace(e,t)))}init_globals();var import_react30=__toESM(require_react()),import_classnames13=__toESM(require_classnames()),IconWrapper=(0,import_react30.forwardRef)(((e,t)=>{const{className:r,style:n,children:i,prefixCls:o}=e,a=(0,import_classnames13.default)(`${o}-icon`,r);return import_react30.default.createElement(\"span\",{ref:t,className:a,style:n},i)})),IconWrapper_default=IconWrapper;init_globals();var import_react31=__toESM(require_react()),import_classnames14=__toESM(require_classnames()),InnerLoadingIcon=(0,import_react31.forwardRef)(((e,t)=>{const{prefixCls:r,className:n,style:i,iconClassName:o}=e,a=(0,import_classnames14.default)(`${r}-loading-icon`,n);return import_react31.default.createElement(IconWrapper_default,{prefixCls:r,className:a,style:i,ref:t},import_react31.default.createElement(LoadingOutlined_default3,{className:o}))})),getCollapsedWidth=()=>({width:0,opacity:0,transform:\"scale(0)\"}),getRealWidth=e=>({width:e.scrollWidth,opacity:1,transform:\"scale(1)\"}),LoadingIcon=e=>{const{prefixCls:t,loading:r,existIcon:n,className:i,style:o}=e,a=!!r;return n?import_react31.default.createElement(InnerLoadingIcon,{prefixCls:t,className:i,style:o}):import_react31.default.createElement(es_default2,{visible:a,motionName:`${t}-loading-icon-motion`,motionLeave:a,removeOnLeave:!0,onAppearStart:getCollapsedWidth,onAppearActive:getRealWidth,onEnterStart:getCollapsedWidth,onEnterActive:getRealWidth,onLeaveStart:getRealWidth,onLeaveActive:getCollapsedWidth},((e,r)=>{let{className:n,style:a}=e;return import_react31.default.createElement(InnerLoadingIcon,{prefixCls:t,className:i,style:Object.assign(Object.assign({},o),a),ref:r,iconClassName:n})}))},LoadingIcon_default=LoadingIcon;init_globals(),init_globals();var genButtonBorderStyle=(e,t)=>({[`> span, > ${e}`]:{\"&:not(:last-child)\":{[`&, & > ${e}`]:{\"&:not(:disabled)\":{borderInlineEndColor:t}}},\"&:not(:first-child)\":{[`&, & > ${e}`]:{\"&:not(:disabled)\":{borderInlineStartColor:t}}}}}),genGroupStyle=e=>{const{componentCls:t,fontSize:r,lineWidth:n,groupBorderColor:i,colorErrorHover:o}=e;return{[`${t}-group`]:[{position:\"relative\",display:\"inline-flex\",[`> span, > ${t}`]:{\"&:not(:last-child)\":{[`&, & > ${t}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},\"&:not(:first-child)\":{marginInlineStart:e.calc(n).mul(-1).equal(),[`&, & > ${t}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}},[t]:{position:\"relative\",zIndex:1,\"&:hover, &:focus, &:active\":{zIndex:2},\"&[disabled]\":{zIndex:0}},[`${t}-icon-only`]:{fontSize:r}},genButtonBorderStyle(`${t}-primary`,i),genButtonBorderStyle(`${t}-danger`,o)]}},group_default=genGroupStyle;init_globals(),init_globals(),init_globals(),init_globals();var import_react41=__toESM(require_react());init_globals(),init_globals(),init_globals(),init_globals();var round=Math.round;function splitColorStr(e,t){const r=e.replace(/^[^(]*\\((.*)/,\"$1\").replace(/\\).*/,\"\").match(/\\d*\\.?\\d+%?/g)||[],n=r.map((e=>parseFloat(e)));for(let i=0;i__left_angle_mark_3;i+=1)n[i]=t(n[i]||0,r[i]||\"\",i);return r[3]?n[3]=r[3].includes(\"%\")?n[3]/100:n[3]:n[3]=1,n}var parseHSVorHSL=(e,t,r)=>0===r?e:e/100;function limitRange(e,t){const r=t||255;return e>r?r:e__left_angle_mark_0?0:e}var FastColor=class e{setR(e){return this._sc(\"r\",e)}setG(e){return this._sc(\"g\",e)}setB(e){return this._sc(\"b\",e)}setA(e){return this._sc(\"a\",e,1)}setHue(e){const t=this.toHsv();return t.h=e,this._c(t)}getLuminance(){function e(e){const t=e/255;return t__left_angle_mark_=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)}return.2126*e(this.r)+.7152*e(this.g)+.0722*e(this.b)}getHue(){if(void 0===this._h){const e=this.getMax()-this.getMin();this._h=0===e?0:round(60*(this.r===this.getMax()?(this.g-this.b)/e+(this.g__left_angle_mark_this.b?6:0):this.g===this.getMax()?(this.b-this.r)/e+2:(this.r-this.g)/e+4))}return this._h}getSaturation(){if(void 0===this._s){const e=this.getMax()-this.getMin();this._s=0===e?0:e/this.getMax()}return this._s}getLightness(){return void 0===this._l&&(this._l=(this.getMax()+this.getMin())/510),this._l}getValue(){return void 0===this._v&&(this._v=this.getMax()/255),this._v}getBrightness(){return void 0===this._brightness&&(this._brightness=(299*this.r+587*this.g+114*this.b)/1e3),this._brightness}darken(e=10){const t=this.getHue(),r=this.getSaturation();let n=this.getLightness()-e/100;return n__left_angle_mark_0&&(n=0),this._c({h:t,s:r,l:n,a:this.a})}lighten(e=10){const t=this.getHue(),r=this.getSaturation();let n=this.getLightness()+e/100;return n>1&&(n=1),this._c({h:t,s:r,l:n,a:this.a})}mix(e,t=50){const r=this._c(e),n=t/100,i=e=>(r[e]-this[e])*n+this[e],o={r:round(i(\"r\")),g:round(i(\"g\")),b:round(i(\"b\")),a:round(100*i(\"a\"))/100};return this._c(o)}tint(e=10){return this.mix({r:255,g:255,b:255,a:1},e)}shade(e=10){return this.mix({r:0,g:0,b:0,a:1},e)}onBackground(e){const t=this._c(e),r=this.a+t.a*(1-this.a),n=e=>round((this[e]*this.a+t[e]*t.a*(1-this.a))/r);return this._c({r:n(\"r\"),g:n(\"g\"),b:n(\"b\"),a:r})}isDark(){return this.getBrightness()__left_angle_mark_128}isLight(){return this.getBrightness()>=128}equals(e){return this.r===e.r&&this.g===e.g&&this.b===e.b&&this.a===e.a}clone(){return this._c(this)}toHexString(){let e=\"#\";const t=(this.r||0).toString(16);e+=2===t.length?t:\"0\"+t;const r=(this.g||0).toString(16);e+=2===r.length?r:\"0\"+r;const n=(this.b||0).toString(16);if(e+=2===n.length?n:\"0\"+n,\"number\"==typeof this.a&&this.a>=0&&this.a__left_angle_mark_1){const t=round(255*this.a).toString(16);e+=2===t.length?t:\"0\"+t}return e}toHsl(){return{h:this.getHue(),s:this.getSaturation(),l:this.getLightness(),a:this.a}}toHslString(){const e=this.getHue(),t=round(100*this.getSaturation()),r=round(100*this.getLightness());return 1!==this.a?`hsla(${e},${t}%,${r}%,${this.a})`:`hsl(${e},${t}%,${r}%)`}toHsv(){return{h:this.getHue(),s:this.getSaturation(),v:this.getValue(),a:this.a}}toRgb(){return{r:this.r,g:this.g,b:this.b,a:this.a}}toRgbString(){return 1!==this.a?`rgba(${this.r},${this.g},${this.b},${this.a})`:`rgb(${this.r},${this.g},${this.b})`}toString(){return this.toRgbString()}_sc(e,t,r){const n=this.clone();return n[e]=limitRange(t,r),n}_c(e){return new this.constructor(e)}getMax(){return void 0===this._max&&(this._max=Math.max(this.r,this.g,this.b)),this._max}getMin(){return void 0===this._min&&(this._min=Math.min(this.r,this.g,this.b)),this._min}fromHexString(e){const t=e.replace(\"#\",\"\");function r(e,r){return parseInt(t[e]+t[r||e],16)}t.length__left_angle_mark_6?(this.r=r(0),this.g=r(1),this.b=r(2),this.a=t[3]?r(3)/255:1):(this.r=r(0,1),this.g=r(2,3),this.b=r(4,5),this.a=t[6]?r(6,7)/255:1)}fromHsl({h:e,s:t,l:r,a:n}){if(this._h=e%360,this._s=t,this._l=r,this.a=\"number\"==typeof n?n:1,t__left_angle_mark_=0){const e=round(255*r);this.r=e,this.g=e,this.b=e}let i=0,o=0,a=0;const s=e/60,l=(1-Math.abs(2*r-1))*t,u=l*(1-Math.abs(s%2-1));s>=0&&s__left_angle_mark_1?(i=l,o=u):s>=1&&s__left_angle_mark_2?(i=u,o=l):s>=2&&s__left_angle_mark_3?(o=l,a=u):s>=3&&s__left_angle_mark_4?(o=u,a=l):s>=4&&s__left_angle_mark_5?(i=u,a=l):s>=5&&s__left_angle_mark_6&&(i=l,a=u);const c=r-l/2;this.r=round(255*(i+c)),this.g=round(255*(o+c)),this.b=round(255*(a+c))}fromHsv({h:e,s:t,v:r,a:n}){this._h=e%360,this._s=t,this._v=r,this.a=\"number\"==typeof n?n:1;const i=round(255*r);if(this.r=i,this.g=i,this.b=i,t__left_angle_mark_=0)return;const o=e/60,a=Math.floor(o),s=o-a,l=round(r*(1-t)*255),u=round(r*(1-t*s)*255),c=round(r*(1-t*(1-s))*255);switch(a){case 0:this.g=c,this.b=l;break;case 1:this.r=u,this.b=l;break;case 2:this.r=l,this.b=c;break;case 3:this.r=l,this.g=u;break;case 4:this.r=c,this.g=l;break;default:this.g=l,this.b=u}}fromHsvString(e){const t=splitColorStr(e,parseHSVorHSL);this.fromHsv({h:t[0],s:t[1],v:t[2],a:t[3]})}fromHslString(e){const t=splitColorStr(e,parseHSVorHSL);this.fromHsl({h:t[0],s:t[1],l:t[2],a:t[3]})}fromRgbString(e){const t=splitColorStr(e,((e,t)=>t.includes(\"%\")?round(e/100*255):e));this.r=t[0],this.g=t[1],this.b=t[2],this.a=t[3]}constructor(t){function r(e){return e[0]in t&&e[1]in t&&e[2]in t}if(_defineProperty(this,\"isValid\",!0),_defineProperty(this,\"r\",0),_defineProperty(this,\"g\",0),_defineProperty(this,\"b\",0),_defineProperty(this,\"a\",1),_defineProperty(this,\"_h\",void 0),_defineProperty(this,\"_s\",void 0),_defineProperty(this,\"_l\",void 0),_defineProperty(this,\"_v\",void 0),_defineProperty(this,\"_max\",void 0),_defineProperty(this,\"_min\",void 0),_defineProperty(this,\"_brightness\",void 0),t)if(\"string\"==typeof t){let e=function(e){return r.startsWith(e)};const r=t.trim();/^#?[A-F\\d]{3,8}$/i.test(r)?this.fromHexString(r):e(\"rgb\")?this.fromRgbString(r):e(\"hsl\")?this.fromHslString(r):(e(\"hsv\")||e(\"hsb\"))&&this.fromHsvString(r)}else if(t instanceof e)this.r=t.r,this.g=t.g,this.b=t.b,this.a=t.a,this._h=t._h,this._s=t._s,this._l=t._l,this._v=t._v;else if(r(\"rgb\"))this.r=limitRange(t.r),this.g=limitRange(t.g),this.b=limitRange(t.b),this.a=\"number\"==typeof t.a?limitRange(t.a,1):1;else if(r(\"hsl\"))this.fromHsl(t);else{if(!r(\"hsv\"))throw new Error(\"@ant-design/fast-color: unsupported input \"+JSON.stringify(t));this.fromHsv(t)}}};init_globals();var _excluded9=[\"b\"],_excluded23=[\"v\"],getRoundNumber=function(e){return Math.round(Number(e||0))},convertHsb2Hsv=function(e){if(e instanceof FastColor)return e;if(e&&\"object\"===_typeof(e)&&\"h\"in e&&\"b\"in e){var t=e,r=t.b;return _objectSpread2(_objectSpread2({},_objectWithoutProperties(t,_excluded9)),{},{v:r})}return\"string\"==typeof e&&/hsb/.test(e)?e.replace(/hsb/,\"hsv\"):e},Color=function(e){_inherits(r,e);var t=_createSuper(r);function r(e){return _classCallCheck(this,r),t.call(this,convertHsb2Hsv(e))}return _createClass(r,[{key:\"toHsbString\",value:function(){var e=this.toHsb(),t=getRoundNumber(100*e.s),r=getRoundNumber(100*e.b),n=getRoundNumber(e.h),i=e.a,o=\"hsb(\".concat(n,\", \").concat(t,\"%, \").concat(r,\"%)\"),a=\"hsba(\".concat(n,\", \").concat(t,\"%, \").concat(r,\"%, \").concat(i.toFixed(0===i?0:2),\")\");return 1===i?o:a}},{key:\"toHsb\",value:function(){var e=this.toHsv(),t=e.v;return _objectSpread2(_objectSpread2({},_objectWithoutProperties(e,_excluded23)),{},{b:t,a:this.a})}}]),r}(FastColor),ColorPickerPrefixCls=\"rc-color-picker\",generateColor=function(e){return e instanceof Color?e:new Color(e)},defaultColor=generateColor(\"#1677ff\"),calculateColor=function(e){var t=e.offset,r=e.targetRef,n=e.containerRef,i=e.color,o=e.type,a=n.current.getBoundingClientRect(),s=a.width,l=a.height,u=r.current.getBoundingClientRect(),c=u.width/2,d=u.height/2,h=(t.x+c)/s,f=1-(t.y+d)/l,p=i.toHsb(),m=h,g=(t.x+c)/s*360;if(o)switch(o){case\"hue\":return generateColor(_objectSpread2(_objectSpread2({},p),{},{h:g__left_angle_mark_=0?0:g}));case\"alpha\":return generateColor(_objectSpread2(_objectSpread2({},p),{},{a:m__left_angle_mark_=0?0:m}))}return generateColor({h:p.h,s:h__left_angle_mark_=0?0:h,b:f>=1?1:f,a:p.a})},calcOffset=function(e,t){var r=e.toHsb();switch(t){case\"hue\":return{x:r.h/360*100,y:50};case\"alpha\":return{x:100*e.a,y:50};default:return{x:100*r.s,y:100*(1-r.b)}}},import_classnames18=__toESM(require_classnames());init_globals();var import_classnames15=__toESM(require_classnames()),import_react32=__toESM(require_react()),ColorBlock=function(e){var t=e.color,r=e.prefixCls,n=e.className,i=e.style,o=e.onClick,a=\"\".concat(r,\"-color-block\");return import_react32.default.createElement(\"div\",{className:(0,import_classnames15.default)(a,n),style:i,onClick:o},import_react32.default.createElement(\"div\",{className:\"\".concat(a,\"-inner\"),style:{background:t}}))},ColorBlock_default=ColorBlock;init_globals();var import_react37=__toESM(require_react());init_globals();var import_react33=__toESM(require_react());function getPosition(e){var t=\"touches\"in e?e.touches[0]:e,r=document.documentElement.scrollLeft||document.body.scrollLeft||window.pageXOffset,n=document.documentElement.scrollTop||document.body.scrollTop||window.pageYOffset;return{pageX:t.pageX-r,pageY:t.pageY-n}}function useColorDrag(e){var t=e.targetRef,r=e.containerRef,n=e.direction,i=e.onDragChange,o=e.onDragChangeComplete,a=e.calculate,s=e.color,l=e.disabledDrag,u=_slicedToArray((0,import_react33.useState)({x:0,y:0}),2),c=u[0],d=u[1],h=(0,import_react33.useRef)(null),f=(0,import_react33.useRef)(null);(0,import_react33.useEffect)((function(){d(a())}),[s]),(0,import_react33.useEffect)((function(){return function(){document.removeEventListener(\"mousemove\",h.current),document.removeEventListener(\"mouseup\",f.current),document.removeEventListener(\"touchmove\",h.current),document.removeEventListener(\"touchend\",f.current),h.current=null,f.current=null}}),[]);var p=function(e){var o=getPosition(e),a=o.pageX,s=o.pageY,l=r.current.getBoundingClientRect(),u=l.x,d=l.y,h=l.width,f=l.height,p=t.current.getBoundingClientRect(),m=p.width,g=p.height,_=m/2,b=g/2,y=Math.max(0,Math.min(a-u,h))-_,v=Math.max(0,Math.min(s-d,f))-b,A={x:y,y:\"x\"===n?c.y:v};if(0===m&&0===g||m!==g)return!1;null==i||i(A)},m=function(e){e.preventDefault(),p(e)},g=function(e){e.preventDefault(),document.removeEventListener(\"mousemove\",h.current),document.removeEventListener(\"mouseup\",f.current),document.removeEventListener(\"touchmove\",h.current),document.removeEventListener(\"touchend\",f.current),h.current=null,f.current=null,null==o||o()};return[c,function(e){document.removeEventListener(\"mousemove\",h.current),document.removeEventListener(\"mouseup\",f.current),l||(p(e),document.addEventListener(\"mousemove\",m),document.addEventListener(\"mouseup\",g),document.addEventListener(\"touchmove\",m),document.addEventListener(\"touchend\",g),h.current=m,f.current=g)}]}var useColorDrag_default=useColorDrag;init_globals();var import_classnames16=__toESM(require_classnames()),import_react34=__toESM(require_react()),Handler=function(e){var t=e.size,r=void 0===t?\"default\":t,n=e.color,i=e.prefixCls;return import_react34.default.createElement(\"div\",{className:(0,import_classnames16.default)(\"\".concat(i,\"-handler\"),_defineProperty({},\"\".concat(i,\"-handler-sm\"),\"small\"===r)),style:{backgroundColor:n}})},Handler_default=Handler;init_globals();var import_react35=__toESM(require_react()),Palette=function(e){var t=e.children,r=e.style,n=e.prefixCls;return import_react35.default.createElement(\"div\",{className:\"\".concat(n,\"-palette\"),style:_objectSpread2({position:\"relative\"},r)},t)},Palette_default=Palette;init_globals();var import_react36=__toESM(require_react()),Transform=(0,import_react36.forwardRef)((function(e,t){var r=e.children,n=e.x,i=e.y;return import_react36.default.createElement(\"div\",{ref:t,style:{position:\"absolute\",left:\"\".concat(n,\"%\"),top:\"\".concat(i,\"%\"),zIndex:1,transform:\"translate(-50%, -50%)\"}},r)})),Transform_default=Transform,Picker=function(e){var t=e.color,r=e.onChange,n=e.prefixCls,i=e.onChangeComplete,o=e.disabled,a=(0,import_react37.useRef)(),s=(0,import_react37.useRef)(),l=(0,import_react37.useRef)(t),u=useEvent((function(e){var n=calculateColor({offset:e,targetRef:s,containerRef:a,color:t});l.current=n,r(n)})),c=_slicedToArray(useColorDrag_default({color:t,containerRef:a,targetRef:s,calculate:function(){return calcOffset(t)},onDragChange:u,onDragChangeComplete:function(){return null==i?void 0:i(l.current)},disabledDrag:o}),2),d=c[0],h=c[1];return import_react37.default.createElement(\"div\",{ref:a,className:\"\".concat(n,\"-select\"),onMouseDown:h,onTouchStart:h},import_react37.default.createElement(Palette_default,{prefixCls:n},import_react37.default.createElement(Transform_default,{x:d.x,y:d.y,ref:s},import_react37.default.createElement(Handler_default,{color:t.toRgbString(),prefixCls:n})),import_react37.default.createElement(\"div\",{className:\"\".concat(n,\"-saturation\"),style:{backgroundColor:\"hsl(\".concat(t.toHsb().h,\",100%, 50%)\"),backgroundImage:\"linear-gradient(0deg, #000, transparent),linear-gradient(90deg, #fff, hsla(0, 0%, 100%, 0))\"}})))},Picker_default=Picker;init_globals();var import_react38=__toESM(require_react()),useColorState=function(e,t){var r=_slicedToArray(useMergedState(e,{value:t}),2),n=r[0],i=r[1];return[(0,import_react38.useMemo)((function(){return generateColor(n)}),[n]),i]},useColorState_default=useColorState;init_globals();var React99=__toESM(require_react());init_globals();var import_react40=__toESM(require_react()),import_classnames17=__toESM(require_classnames());init_globals();var import_react39=__toESM(require_react()),Gradient=function(e){var t=e.colors,r=e.children,n=e.direction,i=void 0===n?\"to right\":n,o=e.type,a=e.prefixCls,s=(0,import_react39.useMemo)((function(){return t.map((function(e,r){var n=generateColor(e);return\"alpha\"===o&&r===t.length-1&&(n=new Color(n.setA(1))),n.toRgbString()})).join(\",\")}),[t,o]);return import_react39.default.createElement(\"div\",{className:\"\".concat(a,\"-gradient\"),style:{position:\"absolute\",inset:0,background:\"linear-gradient(\".concat(i,\", \").concat(s,\")\")}},r)},Gradient_default=Gradient,Slider=function(e){var t=e.prefixCls,r=e.colors,n=e.disabled,i=e.onChange,o=e.onChangeComplete,a=e.color,s=e.type,l=(0,import_react40.useRef)(),u=(0,import_react40.useRef)(),c=(0,import_react40.useRef)(a),d=function(e){return\"hue\"===s?e.getHue():100*e.a},h=useEvent((function(e){var t=calculateColor({offset:e,targetRef:u,containerRef:l,color:a,type:s});c.current=t,i(d(t))})),f=_slicedToArray(useColorDrag_default({color:a,targetRef:u,containerRef:l,calculate:function(){return calcOffset(a,s)},onDragChange:h,onDragChangeComplete:function(){o(d(c.current))},direction:\"x\",disabledDrag:n}),2),p=f[0],m=f[1],g=import_react40.default.useMemo((function(){if(\"hue\"===s){var e=a.toHsb();return e.s=1,e.b=1,e.a=1,new Color(e)}return a}),[a,s]),_=import_react40.default.useMemo((function(){return r.map((function(e){return\"\".concat(e.color,\" \").concat(e.percent,\"%\")}))}),[r]);return import_react40.default.createElement(\"div\",{ref:l,className:(0,import_classnames17.default)(\"\".concat(t,\"-slider\"),\"\".concat(t,\"-slider-\").concat(s)),onMouseDown:m,onTouchStart:m},import_react40.default.createElement(Palette_default,{prefixCls:t},import_react40.default.createElement(Transform_default,{x:p.x,y:p.y,ref:u},import_react40.default.createElement(Handler_default,{size:\"small\",color:g.toHexString(),prefixCls:t})),import_react40.default.createElement(Gradient_default,{colors:_,type:s,prefixCls:t})))},Slider_default=Slider;function useComponent(e){return React99.useMemo((function(){return[(e||{}).slider||Slider_default]}),[e])}var HUE_COLORS=[{color:\"rgb(255, 0, 0)\",percent:0},{color:\"rgb(255, 255, 0)\",percent:17},{color:\"rgb(0, 255, 0)\",percent:33},{color:\"rgb(0, 255, 255)\",percent:50},{color:\"rgb(0, 0, 255)\",percent:67},{color:\"rgb(255, 0, 255)\",percent:83},{color:\"rgb(255, 0, 0)\",percent:100}],ColorPicker=(0,import_react41.forwardRef)((function(e,t){var r=e.value,n=e.defaultValue,i=e.prefixCls,o=void 0===i?ColorPickerPrefixCls:i,a=e.onChange,s=e.onChangeComplete,l=e.className,u=e.style,c=e.panelRender,d=e.disabledAlpha,h=void 0!==d&&d,f=e.disabled,p=void 0!==f&&f,m=_slicedToArray(useComponent(e.components),1)[0],g=_slicedToArray(useColorState_default(n||defaultColor,r),2),_=g[0],b=g[1],y=(0,import_react41.useMemo)((function(){return _.setA(1).toRgbString()}),[_]),v=function(e,t){r||b(e),null==a||a(e,t)},A=function(e){return new Color(_.setHue(e))},w=function(e){return new Color(_.setA(e/100))},S=(0,import_classnames18.default)(\"\".concat(o,\"-panel\"),l,_defineProperty({},\"\".concat(o,\"-panel-disabled\"),p)),E={prefixCls:o,disabled:p,color:_},x=import_react41.default.createElement(import_react41.default.Fragment,null,import_react41.default.createElement(Picker_default,_extends({onChange:v},E,{onChangeComplete:s})),import_react41.default.createElement(\"div\",{className:\"\".concat(o,\"-slider-container\")},import_react41.default.createElement(\"div\",{className:(0,import_classnames18.default)(\"\".concat(o,\"-slider-group\"),_defineProperty({},\"\".concat(o,\"-slider-group-disabled-alpha\"),h))},import_react41.default.createElement(m,_extends({},E,{type:\"hue\",colors:HUE_COLORS,min:0,max:359,value:_.getHue(),onChange:function(e){v(A(e),{type:\"hue\",value:e})},onChangeComplete:function(e){s&&s(A(e))}})),!h&&import_react41.default.createElement(m,_extends({},E,{type:\"alpha\",colors:[{percent:0,color:\"rgba(255, 0, 4, 0)\"},{percent:100,color:y}],min:0,max:100,value:100*_.a,onChange:function(e){v(w(e),{type:\"alpha\",value:e})},onChangeComplete:function(e){s&&s(w(e))}}))),import_react41.default.createElement(ColorBlock_default,{color:_.toRgbString(),prefixCls:o})));return import_react41.default.createElement(\"div\",{className:S,style:u,ref:t},\"function\"==typeof c?c(x):x)}));ColorPicker.displayName=\"ColorPicker\",init_globals();var toHexFormat=(e,t)=>(null==e?void 0:e.replace(/[^\\w/]/g,\"\").slice(0,t?8:6))||\"\",getHex=(e,t)=>e?toHexFormat(e,t):\"\",AggregationColor=function(){return _createClass((function e(t){var r;if(_classCallCheck(this,e),this.cleared=!1,t instanceof e)return this.metaColor=t.metaColor.clone(),this.colors=null===(r=t.colors)||void 0===r?void 0:r.map((t=>({color:new e(t.color),percent:t.percent}))),void(this.cleared=t.cleared);const n=Array.isArray(t);n&&t.length?(this.colors=t.map((t=>{let{color:r,percent:n}=t;return{color:new e(r),percent:n}})),this.metaColor=new Color(this.colors[0].color.metaColor)):this.metaColor=new Color(n?\"\":t),(!t||n&&!this.colors)&&(this.metaColor=this.metaColor.setA(0),this.cleared=!0)}),[{key:\"toHsb\",value:function(){return this.metaColor.toHsb()}},{key:\"toHsbString\",value:function(){return this.metaColor.toHsbString()}},{key:\"toHex\",value:function(){return getHex(this.toHexString(),this.metaColor.a__left_angle_mark_1)}},{key:\"toHexString\",value:function(){return this.metaColor.toHexString()}},{key:\"toRgb\",value:function(){return this.metaColor.toRgb()}},{key:\"toRgbString\",value:function(){return this.metaColor.toRgbString()}},{key:\"isGradient\",value:function(){return!!this.colors&&!this.cleared}},{key:\"getColors\",value:function(){return this.colors||[{color:this,percent:0}]}},{key:\"toCssString\",value:function(){const{colors:e}=this;return e?`linear-gradient(90deg, ${e.map((e=>`${e.color.toRgbString()} ${e.percent}%`)).join(\", \")})`:this.metaColor.toRgbString()}},{key:\"equals\",value:function(e){return!(!e||this.isGradient()!==e.isGradient())&&(this.isGradient()?this.colors.length===e.colors.length&&this.colors.every(((t,r)=>{const n=e.colors[r];return t.percent===n.percent&&t.color.equals(n.color)})):this.toHexString()===e.toHexString())}}])}();init_globals();var import_react42=__toESM(require_react()),import_classnames19=__toESM(require_classnames());init_globals();var React101=__toESM(require_react()),RightOutlined2=function(e,t){return React101.createElement(AntdIcon_default2,_extends({},e,{ref:t,icon:RightOutlined_default}))},RefIcon26=React101.forwardRef(RightOutlined2);RefIcon26.displayName=\"RightOutlined\";var RightOutlined_default2=RefIcon26;init_globals(),init_globals();var genCollapseMotion=e=>({[e.componentCls]:{[`${e.antCls}-motion-collapse-legacy`]:{overflow:\"hidden\",\"&-active\":{transition:`height ${e.motionDurationMid} ${e.motionEaseInOut},\\n opacity ${e.motionDurationMid} ${e.motionEaseInOut} !important`}},[`${e.antCls}-motion-collapse`]:{overflow:\"hidden\",transition:`height ${e.motionDurationMid} ${e.motionEaseInOut},\\n opacity ${e.motionDurationMid} ${e.motionEaseInOut} !important`}}}),collapse_default=genCollapseMotion;init_globals(),init_globals();var initMotionCommon=e=>({animationDuration:e,animationFillMode:\"both\"}),initMotionCommonLeave=e=>({animationDuration:e,animationFillMode:\"both\"}),initMotion=function(e,t,r,n){const i=arguments.length>4&&void 0!==arguments[4]&&arguments[4]?\"&\":\"\";return{[`\\n ${i}${e}-enter,\\n ${i}${e}-appear\\n `]:Object.assign(Object.assign({},initMotionCommon(n)),{animationPlayState:\"paused\"}),[`${i}${e}-leave`]:Object.assign(Object.assign({},initMotionCommonLeave(n)),{animationPlayState:\"paused\"}),[`\\n ${i}${e}-enter${e}-enter-active,\\n ${i}${e}-appear${e}-appear-active\\n `]:{animationName:t,animationPlayState:\"running\"},[`${i}${e}-leave${e}-leave-active`]:{animationName:r,animationPlayState:\"running\",pointerEvents:\"none\"}}},fadeIn=new Keyframes_default(\"antFadeIn\",{\"0%\":{opacity:0},\"100%\":{opacity:1}}),fadeOut=new Keyframes_default(\"antFadeOut\",{\"0%\":{opacity:1},\"100%\":{opacity:0}}),initFadeMotion=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const{antCls:r}=e,n=`${r}-fade`,i=t?\"&\":\"\";return[initMotion(n,fadeIn,fadeOut,e.motionDurationMid,t),{[`\\n ${i}${n}-enter,\\n ${i}${n}-appear\\n `]:{opacity:0,animationTimingFunction:\"linear\"},[`${i}${n}-leave`]:{animationTimingFunction:\"linear\"}}]};init_globals();var moveDownIn=new Keyframes_default(\"antMoveDownIn\",{\"0%\":{transform:\"translate3d(0, 100%, 0)\",transformOrigin:\"0 0\",opacity:0},\"100%\":{transform:\"translate3d(0, 0, 0)\",transformOrigin:\"0 0\",opacity:1}}),moveDownOut=new Keyframes_default(\"antMoveDownOut\",{\"0%\":{transform:\"translate3d(0, 0, 0)\",transformOrigin:\"0 0\",opacity:1},\"100%\":{transform:\"translate3d(0, 100%, 0)\",transformOrigin:\"0 0\",opacity:0}}),moveLeftIn=new Keyframes_default(\"antMoveLeftIn\",{\"0%\":{transform:\"translate3d(-100%, 0, 0)\",transformOrigin:\"0 0\",opacity:0},\"100%\":{transform:\"translate3d(0, 0, 0)\",transformOrigin:\"0 0\",opacity:1}}),moveLeftOut=new Keyframes_default(\"antMoveLeftOut\",{\"0%\":{transform:\"translate3d(0, 0, 0)\",transformOrigin:\"0 0\",opacity:1},\"100%\":{transform:\"translate3d(-100%, 0, 0)\",transformOrigin:\"0 0\",opacity:0}}),moveRightIn=new Keyframes_default(\"antMoveRightIn\",{\"0%\":{transform:\"translate3d(100%, 0, 0)\",transformOrigin:\"0 0\",opacity:0},\"100%\":{transform:\"translate3d(0, 0, 0)\",transformOrigin:\"0 0\",opacity:1}}),moveRightOut=new Keyframes_default(\"antMoveRightOut\",{\"0%\":{transform:\"translate3d(0, 0, 0)\",transformOrigin:\"0 0\",opacity:1},\"100%\":{transform:\"translate3d(100%, 0, 0)\",transformOrigin:\"0 0\",opacity:0}}),moveUpIn=new Keyframes_default(\"antMoveUpIn\",{\"0%\":{transform:\"translate3d(0, -100%, 0)\",transformOrigin:\"0 0\",opacity:0},\"100%\":{transform:\"translate3d(0, 0, 0)\",transformOrigin:\"0 0\",opacity:1}}),moveUpOut=new Keyframes_default(\"antMoveUpOut\",{\"0%\":{transform:\"translate3d(0, 0, 0)\",transformOrigin:\"0 0\",opacity:1},\"100%\":{transform:\"translate3d(0, -100%, 0)\",transformOrigin:\"0 0\",opacity:0}}),moveMotion={\"move-up\":{inKeyframes:moveUpIn,outKeyframes:moveUpOut},\"move-down\":{inKeyframes:moveDownIn,outKeyframes:moveDownOut},\"move-left\":{inKeyframes:moveLeftIn,outKeyframes:moveLeftOut},\"move-right\":{inKeyframes:moveRightIn,outKeyframes:moveRightOut}},initMoveMotion=(e,t)=>{const{antCls:r}=e,n=`${r}-${t}`,{inKeyframes:i,outKeyframes:o}=moveMotion[t];return[initMotion(n,i,o,e.motionDurationMid),{[`\\n ${n}-enter,\\n ${n}-appear\\n `]:{opacity:0,animationTimingFunction:e.motionEaseOutCirc},[`${n}-leave`]:{animationTimingFunction:e.motionEaseInOutCirc}}]};init_globals();var slideUpIn=new Keyframes_default(\"antSlideUpIn\",{\"0%\":{transform:\"scaleY(0.8)\",transformOrigin:\"0% 0%\",opacity:0},\"100%\":{transform:\"scaleY(1)\",transformOrigin:\"0% 0%\",opacity:1}}),slideUpOut=new Keyframes_default(\"antSlideUpOut\",{\"0%\":{transform:\"scaleY(1)\",transformOrigin:\"0% 0%\",opacity:1},\"100%\":{transform:\"scaleY(0.8)\",transformOrigin:\"0% 0%\",opacity:0}}),slideDownIn=new Keyframes_default(\"antSlideDownIn\",{\"0%\":{transform:\"scaleY(0.8)\",transformOrigin:\"100% 100%\",opacity:0},\"100%\":{transform:\"scaleY(1)\",transformOrigin:\"100% 100%\",opacity:1}}),slideDownOut=new Keyframes_default(\"antSlideDownOut\",{\"0%\":{transform:\"scaleY(1)\",transformOrigin:\"100% 100%\",opacity:1},\"100%\":{transform:\"scaleY(0.8)\",transformOrigin:\"100% 100%\",opacity:0}}),slideLeftIn=new Keyframes_default(\"antSlideLeftIn\",{\"0%\":{transform:\"scaleX(0.8)\",transformOrigin:\"0% 0%\",opacity:0},\"100%\":{transform:\"scaleX(1)\",transformOrigin:\"0% 0%\",opacity:1}}),slideLeftOut=new Keyframes_default(\"antSlideLeftOut\",{\"0%\":{transform:\"scaleX(1)\",transformOrigin:\"0% 0%\",opacity:1},\"100%\":{transform:\"scaleX(0.8)\",transformOrigin:\"0% 0%\",opacity:0}}),slideRightIn=new Keyframes_default(\"antSlideRightIn\",{\"0%\":{transform:\"scaleX(0.8)\",transformOrigin:\"100% 0%\",opacity:0},\"100%\":{transform:\"scaleX(1)\",transformOrigin:\"100% 0%\",opacity:1}}),slideRightOut=new Keyframes_default(\"antSlideRightOut\",{\"0%\":{transform:\"scaleX(1)\",transformOrigin:\"100% 0%\",opacity:1},\"100%\":{transform:\"scaleX(0.8)\",transformOrigin:\"100% 0%\",opacity:0}}),slideMotion={\"slide-up\":{inKeyframes:slideUpIn,outKeyframes:slideUpOut},\"slide-down\":{inKeyframes:slideDownIn,outKeyframes:slideDownOut},\"slide-left\":{inKeyframes:slideLeftIn,outKeyframes:slideLeftOut},\"slide-right\":{inKeyframes:slideRightIn,outKeyframes:slideRightOut}},initSlideMotion=(e,t)=>{const{antCls:r}=e,n=`${r}-${t}`,{inKeyframes:i,outKeyframes:o}=slideMotion[t];return[initMotion(n,i,o,e.motionDurationMid),{[`\\n ${n}-enter,\\n ${n}-appear\\n `]:{transform:\"scale(0)\",transformOrigin:\"0% 0%\",opacity:0,animationTimingFunction:e.motionEaseOutQuint,\"&-prepare\":{transform:\"scale(1)\"}},[`${n}-leave`]:{animationTimingFunction:e.motionEaseInQuint}}]};init_globals();var zoomIn=new Keyframes_default(\"antZoomIn\",{\"0%\":{transform:\"scale(0.2)\",opacity:0},\"100%\":{transform:\"scale(1)\",opacity:1}}),zoomOut=new Keyframes_default(\"antZoomOut\",{\"0%\":{transform:\"scale(1)\"},\"100%\":{transform:\"scale(0.2)\",opacity:0}}),zoomBigIn=new Keyframes_default(\"antZoomBigIn\",{\"0%\":{transform:\"scale(0.8)\",opacity:0},\"100%\":{transform:\"scale(1)\",opacity:1}}),zoomBigOut=new Keyframes_default(\"antZoomBigOut\",{\"0%\":{transform:\"scale(1)\"},\"100%\":{transform:\"scale(0.8)\",opacity:0}}),zoomUpIn=new Keyframes_default(\"antZoomUpIn\",{\"0%\":{transform:\"scale(0.8)\",transformOrigin:\"50% 0%\",opacity:0},\"100%\":{transform:\"scale(1)\",transformOrigin:\"50% 0%\"}}),zoomUpOut=new Keyframes_default(\"antZoomUpOut\",{\"0%\":{transform:\"scale(1)\",transformOrigin:\"50% 0%\"},\"100%\":{transform:\"scale(0.8)\",transformOrigin:\"50% 0%\",opacity:0}}),zoomLeftIn=new Keyframes_default(\"antZoomLeftIn\",{\"0%\":{transform:\"scale(0.8)\",transformOrigin:\"0% 50%\",opacity:0},\"100%\":{transform:\"scale(1)\",transformOrigin:\"0% 50%\"}}),zoomLeftOut=new Keyframes_default(\"antZoomLeftOut\",{\"0%\":{transform:\"scale(1)\",transformOrigin:\"0% 50%\"},\"100%\":{transform:\"scale(0.8)\",transformOrigin:\"0% 50%\",opacity:0}}),zoomRightIn=new Keyframes_default(\"antZoomRightIn\",{\"0%\":{transform:\"scale(0.8)\",transformOrigin:\"100% 50%\",opacity:0},\"100%\":{transform:\"scale(1)\",transformOrigin:\"100% 50%\"}}),zoomRightOut=new Keyframes_default(\"antZoomRightOut\",{\"0%\":{transform:\"scale(1)\",transformOrigin:\"100% 50%\"},\"100%\":{transform:\"scale(0.8)\",transformOrigin:\"100% 50%\",opacity:0}}),zoomDownIn=new Keyframes_default(\"antZoomDownIn\",{\"0%\":{transform:\"scale(0.8)\",transformOrigin:\"50% 100%\",opacity:0},\"100%\":{transform:\"scale(1)\",transformOrigin:\"50% 100%\"}}),zoomDownOut=new Keyframes_default(\"antZoomDownOut\",{\"0%\":{transform:\"scale(1)\",transformOrigin:\"50% 100%\"},\"100%\":{transform:\"scale(0.8)\",transformOrigin:\"50% 100%\",opacity:0}}),zoomMotion={zoom:{inKeyframes:zoomIn,outKeyframes:zoomOut},\"zoom-big\":{inKeyframes:zoomBigIn,outKeyframes:zoomBigOut},\"zoom-big-fast\":{inKeyframes:zoomBigIn,outKeyframes:zoomBigOut},\"zoom-left\":{inKeyframes:zoomLeftIn,outKeyframes:zoomLeftOut},\"zoom-right\":{inKeyframes:zoomRightIn,outKeyframes:zoomRightOut},\"zoom-up\":{inKeyframes:zoomUpIn,outKeyframes:zoomUpOut},\"zoom-down\":{inKeyframes:zoomDownIn,outKeyframes:zoomDownOut}},initZoomMotion=(e,t)=>{const{antCls:r}=e,n=`${r}-${t}`,{inKeyframes:i,outKeyframes:o}=zoomMotion[t];return[initMotion(n,i,o,\"zoom-big-fast\"===t?e.motionDurationFast:e.motionDurationMid),{[`\\n ${n}-enter,\\n ${n}-appear\\n `]:{transform:\"scale(0)\",opacity:0,animationTimingFunction:e.motionEaseOutCirc,\"&-prepare\":{transform:\"none\"}},[`${n}-leave`]:{animationTimingFunction:e.motionEaseInOutCirc}}]},isBright=(e,t)=>{const{r:r,g:n,b:i,a:o}=e.toRgb(),a=new Color(e.toRgbString()).onBackground(t).toHsv();return o__left_angle_mark_=.5?a.v>.5:.299*r+.587*n+.114*i>192},prepareToken=e=>{const{paddingInline:t,onlyIconSize:r,paddingBlock:n}=e;return merge2(e,{buttonPaddingHorizontal:t,buttonPaddingVertical:n,buttonIconOnlyFontSize:r})},prepareComponentToken3=e=>{var t,r,n,i,o,a;const s=null!==(t=e.contentFontSize)&&void 0!==t?t:e.fontSize,l=null!==(r=e.contentFontSizeSM)&&void 0!==r?r:e.fontSize,u=null!==(n=e.contentFontSizeLG)&&void 0!==n?n:e.fontSizeLG,c=null!==(i=e.contentLineHeight)&&void 0!==i?i:getLineHeight(s),d=null!==(o=e.contentLineHeightSM)&&void 0!==o?o:getLineHeight(l),h=null!==(a=e.contentLineHeightLG)&&void 0!==a?a:getLineHeight(u),f=isBright(new AggregationColor(e.colorBgSolid),\"#fff\")?\"#000\":\"#fff\";return{fontWeight:400,defaultShadow:`0 ${e.controlOutlineWidth}px 0 ${e.controlTmpOutline}`,primaryShadow:`0 ${e.controlOutlineWidth}px 0 ${e.controlOutline}`,dangerShadow:`0 ${e.controlOutlineWidth}px 0 ${e.colorErrorOutline}`,primaryColor:e.colorTextLightSolid,dangerColor:e.colorTextLightSolid,borderColorDisabled:e.colorBorder,defaultGhostColor:e.colorBgContainer,ghostBg:\"transparent\",defaultGhostBorderColor:e.colorBgContainer,paddingInline:e.paddingContentHorizontal-e.lineWidth,paddingInlineLG:e.paddingContentHorizontal-e.lineWidth,paddingInlineSM:8-e.lineWidth,onlyIconSize:e.fontSizeLG,onlyIconSizeSM:e.fontSizeLG-2,onlyIconSizeLG:e.fontSizeLG+2,groupBorderColor:e.colorPrimaryHover,linkHoverBg:\"transparent\",textTextColor:e.colorText,textTextHoverColor:e.colorText,textTextActiveColor:e.colorText,textHoverBg:e.colorFillTertiary,defaultColor:e.colorText,defaultBg:e.colorBgContainer,defaultBorderColor:e.colorBorder,defaultBorderColorDisabled:e.colorBorder,defaultHoverBg:e.colorBgContainer,defaultHoverColor:e.colorPrimaryHover,defaultHoverBorderColor:e.colorPrimaryHover,defaultActiveBg:e.colorBgContainer,defaultActiveColor:e.colorPrimaryActive,defaultActiveBorderColor:e.colorPrimaryActive,solidTextColor:f,contentFontSize:s,contentFontSizeSM:l,contentFontSizeLG:u,contentLineHeight:c,contentLineHeightSM:d,contentLineHeightLG:h,paddingBlock:Math.max((e.controlHeight-s*c)/2-e.lineWidth,0),paddingBlockSM:Math.max((e.controlHeightSM-l*d)/2-e.lineWidth,0),paddingBlockLG:Math.max((e.controlHeightLG-u*h)/2-e.lineWidth,0)}},genSharedButtonStyle=e=>{const{componentCls:t,iconCls:r,fontWeight:n}=e;return{[t]:{outline:\"none\",position:\"relative\",display:\"inline-flex\",gap:e.marginXS,alignItems:\"center\",justifyContent:\"center\",fontWeight:n,whiteSpace:\"nowrap\",textAlign:\"center\",backgroundImage:\"none\",background:\"transparent\",border:`${unit(e.lineWidth)} ${e.lineType} transparent`,cursor:\"pointer\",transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`,userSelect:\"none\",touchAction:\"manipulation\",color:e.colorText,\"&:disabled > *\":{pointerEvents:\"none\"},\"> span\":{display:\"inline-flex\"},[`${t}-icon`]:{lineHeight:1},\"> a\":{color:\"currentColor\"},\"&:not(:disabled)\":Object.assign({},genFocusStyle(e)),[`&${t}-two-chinese-chars::first-letter`]:{letterSpacing:\"0.34em\"},[`&${t}-two-chinese-chars > *:not(${r})`]:{marginInlineEnd:\"-0.34em\",letterSpacing:\"0.34em\"},\"&-icon-end\":{flexDirection:\"row-reverse\"}}}},genHoverActiveButtonStyle=(e,t,r)=>({[`&:not(:disabled):not(${e}-disabled)`]:{\"&:hover\":t,\"&:active\":r}}),genCircleButtonStyle=e=>({minWidth:e.controlHeight,paddingInlineStart:0,paddingInlineEnd:0,borderRadius:\"50%\"}),genRoundButtonStyle=e=>({borderRadius:e.controlHeight,paddingInlineStart:e.calc(e.controlHeight).div(2).equal(),paddingInlineEnd:e.calc(e.controlHeight).div(2).equal()}),genDisabledStyle=e=>({cursor:\"not-allowed\",borderColor:e.borderColorDisabled,color:e.colorTextDisabled,background:e.colorBgContainerDisabled,boxShadow:\"none\"}),genGhostButtonStyle=(e,t,r,n,i,o,a,s)=>({[`&${e}-background-ghost`]:Object.assign(Object.assign({color:r||void 0,background:t,borderColor:n||void 0,boxShadow:\"none\"},genHoverActiveButtonStyle(e,Object.assign({background:t},a),Object.assign({background:t},s))),{\"&:disabled\":{cursor:\"not-allowed\",color:i||void 0,borderColor:o||void 0}})}),genSolidDisabledButtonStyle=e=>({[`&:disabled, &${e.componentCls}-disabled`]:Object.assign({},genDisabledStyle(e))}),genPureDisabledButtonStyle=e=>({[`&:disabled, &${e.componentCls}-disabled`]:{cursor:\"not-allowed\",color:e.colorTextDisabled}}),genVariantButtonStyle=(e,t,r,n)=>{const i=n&&[\"link\",\"text\"].includes(n)?genPureDisabledButtonStyle:genSolidDisabledButtonStyle;return Object.assign(Object.assign({},i(e)),genHoverActiveButtonStyle(e.componentCls,t,r))},genSolidButtonStyle=(e,t,r,n,i)=>({[`&${e.componentCls}-variant-solid`]:Object.assign({color:t,background:r},genVariantButtonStyle(e,n,i))}),genOutlinedDashedButtonStyle=(e,t,r,n,i)=>({[`&${e.componentCls}-variant-outlined, &${e.componentCls}-variant-dashed`]:Object.assign({borderColor:t,background:r},genVariantButtonStyle(e,n,i))}),genDashedButtonStyle=e=>({[`&${e.componentCls}-variant-dashed`]:{borderStyle:\"dashed\"}}),genFilledButtonStyle=(e,t,r,n)=>({[`&${e.componentCls}-variant-filled`]:Object.assign({boxShadow:\"none\",background:t},genVariantButtonStyle(e,r,n))}),genTextLinkButtonStyle=(e,t,r,n,i)=>({[`&${e.componentCls}-variant-${r}`]:Object.assign({color:t,boxShadow:\"none\"},genVariantButtonStyle(e,n,i,r))}),genDefaultButtonStyle=e=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:e.defaultColor,boxShadow:e.defaultShadow},genSolidButtonStyle(e,e.solidTextColor,e.colorBgSolid,{background:e.colorBgSolidHover},{background:e.colorBgSolidActive})),genDashedButtonStyle(e)),genFilledButtonStyle(e,e.colorFillTertiary,{background:e.colorFillSecondary},{background:e.colorFill})),genTextLinkButtonStyle(e,e.textTextColor,\"link\",{color:e.colorLinkHover,background:e.linkHoverBg},{color:e.colorLinkActive})),genGhostButtonStyle(e.componentCls,e.ghostBg,e.defaultGhostColor,e.defaultGhostBorderColor,e.colorTextDisabled,e.colorBorder)),genPrimaryButtonStyle=e=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:e.colorPrimary,boxShadow:e.primaryShadow},genOutlinedDashedButtonStyle(e,e.colorPrimary,e.colorBgContainer,{color:e.colorPrimaryTextHover,borderColor:e.colorPrimaryHover,background:e.colorBgContainer},{color:e.colorPrimaryTextActive,borderColor:e.colorPrimaryActive,background:e.colorBgContainer})),genDashedButtonStyle(e)),genFilledButtonStyle(e,e.colorPrimaryBg,{background:e.colorPrimaryBgHover},{background:e.colorPrimaryBorder})),genTextLinkButtonStyle(e,e.colorLink,\"text\",{color:e.colorPrimaryTextHover,background:e.colorPrimaryBg},{color:e.colorPrimaryTextActive,background:e.colorPrimaryBorder})),genGhostButtonStyle(e.componentCls,e.ghostBg,e.colorPrimary,e.colorPrimary,e.colorTextDisabled,e.colorBorder,{color:e.colorPrimaryHover,borderColor:e.colorPrimaryHover},{color:e.colorPrimaryActive,borderColor:e.colorPrimaryActive})),genDangerousStyle=e=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:e.colorError,boxShadow:e.dangerShadow},genSolidButtonStyle(e,e.dangerColor,e.colorError,{background:e.colorErrorHover},{background:e.colorErrorActive})),genOutlinedDashedButtonStyle(e,e.colorError,e.colorBgContainer,{color:e.colorErrorHover,borderColor:e.colorErrorBorderHover},{color:e.colorErrorActive,borderColor:e.colorErrorActive})),genDashedButtonStyle(e)),genFilledButtonStyle(e,e.colorErrorBg,{background:e.colorErrorBgFilledHover},{background:e.colorErrorBgActive})),genTextLinkButtonStyle(e,e.colorError,\"text\",{color:e.colorErrorHover,background:e.colorErrorBg},{color:e.colorErrorHover,background:e.colorErrorBgActive})),genTextLinkButtonStyle(e,e.colorError,\"link\",{color:e.colorErrorHover},{color:e.colorErrorActive})),genGhostButtonStyle(e.componentCls,e.ghostBg,e.colorError,e.colorError,e.colorTextDisabled,e.colorBorder,{color:e.colorErrorHover,borderColor:e.colorErrorHover},{color:e.colorErrorActive,borderColor:e.colorErrorActive})),genColorButtonStyle=e=>{const{componentCls:t}=e;return{[`${t}-color-default`]:genDefaultButtonStyle(e),[`${t}-color-primary`]:genPrimaryButtonStyle(e),[`${t}-color-dangerous`]:genDangerousStyle(e)}},genCompatibleButtonStyle=e=>Object.assign(Object.assign(Object.assign(Object.assign({},genOutlinedDashedButtonStyle(e,e.defaultBorderColor,e.defaultBg,{color:e.defaultHoverColor,borderColor:e.defaultHoverBorderColor,background:e.defaultHoverBg},{color:e.defaultActiveColor,borderColor:e.defaultActiveBorderColor,background:e.defaultActiveBg})),genTextLinkButtonStyle(e,e.textTextColor,\"text\",{color:e.textTextHoverColor,background:e.textHoverBg},{color:e.textTextActiveColor,background:e.colorBgTextActive})),genSolidButtonStyle(e,e.primaryColor,e.colorPrimary,{background:e.colorPrimaryHover,color:e.primaryColor},{background:e.colorPrimaryActive,color:e.primaryColor})),genTextLinkButtonStyle(e,e.colorLink,\"link\",{color:e.colorLinkHover,background:e.linkHoverBg},{color:e.colorLinkActive})),genButtonStyle=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:\"\";const{componentCls:r,controlHeight:n,fontSize:i,lineHeight:o,borderRadius:a,buttonPaddingHorizontal:s,iconCls:l,buttonPaddingVertical:u}=e,c=`${r}-icon-only`;return[{[t]:{fontSize:i,lineHeight:o,height:n,padding:`${unit(u)} ${unit(s)}`,borderRadius:a,[`&${c}`]:{width:n,paddingInline:0,[`&${r}-compact-item`]:{flex:\"none\"},[`&${r}-round`]:{width:\"auto\"},[l]:{fontSize:e.buttonIconOnlyFontSize}},[`&${r}-loading`]:{opacity:e.opacityLoading,cursor:\"default\"},[`${r}-loading-icon`]:{transition:`width ${e.motionDurationSlow} ${e.motionEaseInOut}, opacity ${e.motionDurationSlow} ${e.motionEaseInOut}`}}},{[`${r}${r}-circle${t}`]:genCircleButtonStyle(e)},{[`${r}${r}-round${t}`]:genRoundButtonStyle(e)}]},genSizeBaseButtonStyle=e=>{const t=merge2(e,{fontSize:e.contentFontSize,lineHeight:e.contentLineHeight});return genButtonStyle(t,e.componentCls)},genSizeSmallButtonStyle=e=>{const t=merge2(e,{controlHeight:e.controlHeightSM,fontSize:e.contentFontSizeSM,lineHeight:e.contentLineHeightSM,padding:e.paddingXS,buttonPaddingHorizontal:e.paddingInlineSM,buttonPaddingVertical:e.paddingBlockSM,borderRadius:e.borderRadiusSM,buttonIconOnlyFontSize:e.onlyIconSizeSM});return genButtonStyle(t,`${e.componentCls}-sm`)},genSizeLargeButtonStyle=e=>{const t=merge2(e,{controlHeight:e.controlHeightLG,fontSize:e.contentFontSizeLG,lineHeight:e.contentLineHeightLG,buttonPaddingHorizontal:e.paddingInlineLG,buttonPaddingVertical:e.paddingBlockLG,borderRadius:e.borderRadiusLG,buttonIconOnlyFontSize:e.onlyIconSizeLG});return genButtonStyle(t,`${e.componentCls}-lg`)},genBlockButtonStyle=e=>{const{componentCls:t}=e;return{[t]:{[`&${t}-block`]:{width:\"100%\"}}}},style_default5=genStyleHooks(\"Button\",(e=>{const t=prepareToken(e);return[genSharedButtonStyle(t),genSizeBaseButtonStyle(t),genSizeSmallButtonStyle(t),genSizeLargeButtonStyle(t),genBlockButtonStyle(t),genColorButtonStyle(t),genCompatibleButtonStyle(t),group_default(t)]}),prepareComponentToken3,{unitless:{fontWeight:!0,contentLineHeight:!0,contentLineHeightSM:!0,contentLineHeightLG:!0}});function compactItemBorder(e,t,r){const{focusElCls:n,focus:i,borderElCls:o}=r,a=o?\"> *\":\"\",s=[\"hover\",i?\"focus\":null,\"active\"].filter(Boolean).map((e=>`&:${e} ${a}`)).join(\",\");return{[`&-item:not(${t}-last-item)`]:{marginInlineEnd:e.calc(e.lineWidth).mul(-1).equal()},\"&-item\":Object.assign(Object.assign({[s]:{zIndex:2}},n?{[`&${n}`]:{zIndex:2}}:{}),{[`&[disabled] ${a}`]:{zIndex:0}})}}function compactItemBorderRadius(e,t,r){const{borderElCls:n}=r,i=n?`> ${n}`:\"\";return{[`&-item:not(${t}-first-item):not(${t}-last-item) ${i}`]:{borderRadius:0},[`&-item:not(${t}-last-item)${t}-first-item`]:{[`& ${i}, &${e}-sm ${i}, &${e}-lg ${i}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&-item:not(${t}-first-item)${t}-last-item`]:{[`& ${i}, &${e}-sm ${i}, &${e}-lg ${i}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}}}function genCompactItemStyle(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{focus:!0};const{componentCls:r}=e,n=`${r}-compact`;return{[n]:Object.assign(Object.assign({},compactItemBorder(e,n,t)),compactItemBorderRadius(r,n,t))}}function compactItemVerticalBorder(e,t){return{[`&-item:not(${t}-last-item)`]:{marginBottom:e.calc(e.lineWidth).mul(-1).equal()},\"&-item\":{\"&:hover,&:focus,&:active\":{zIndex:2},\"&[disabled]\":{zIndex:0}}}}function compactItemBorderVerticalRadius(e,t){return{[`&-item:not(${t}-first-item):not(${t}-last-item)`]:{borderRadius:0},[`&-item${t}-first-item:not(${t}-last-item)`]:{[`&, &${e}-sm, &${e}-lg`]:{borderEndEndRadius:0,borderEndStartRadius:0}},[`&-item${t}-last-item:not(${t}-first-item)`]:{[`&, &${e}-sm, &${e}-lg`]:{borderStartStartRadius:0,borderStartEndRadius:0}}}}function genCompactItemVerticalStyle(e){const t=`${e.componentCls}-compact-vertical`;return{[t]:Object.assign(Object.assign({},compactItemVerticalBorder(e,t)),compactItemBorderVerticalRadius(e.componentCls,t))}}init_globals(),init_globals(),init_globals();var genButtonCompactStyle=e=>{const{componentCls:t,calc:r}=e;return{[t]:{[`&-compact-item${t}-primary`]:{[`&:not([disabled]) + ${t}-compact-item${t}-primary:not([disabled])`]:{position:\"relative\",\"&:before\":{position:\"absolute\",top:r(e.lineWidth).mul(-1).equal(),insetInlineStart:r(e.lineWidth).mul(-1).equal(),display:\"inline-block\",width:e.lineWidth,height:`calc(100% + ${unit(e.lineWidth)} * 2)`,backgroundColor:e.colorPrimaryHover,content:'\"\"'}}},\"&-compact-vertical-item\":{[`&${t}-primary`]:{[`&:not([disabled]) + ${t}-compact-vertical-item${t}-primary:not([disabled])`]:{position:\"relative\",\"&:before\":{position:\"absolute\",top:r(e.lineWidth).mul(-1).equal(),insetInlineStart:r(e.lineWidth).mul(-1).equal(),display:\"inline-block\",width:`calc(100% + ${unit(e.lineWidth)} * 2)`,height:e.lineWidth,backgroundColor:e.colorPrimaryHover,content:'\"\"'}}}}}}},compactCmp_default=genSubStyleComponent([\"Button\",\"compact\"],(e=>{const t=prepareToken(e);return[genCompactItemStyle(t),genCompactItemVerticalStyle(t),genButtonCompactStyle(t)]}),prepareComponentToken3),__rest9=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)__left_angle_mark_0&&(r[n]=e[n]);if(null!=e&&\"function\"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i__left_angle_mark_n.length;i++)t.indexOf(n[i])__left_angle_mark_0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r};function getLoadingConfig(e){if(\"object\"==typeof e&&e){let t=null==e?void 0:e.delay;return t=Number.isNaN(t)||\"number\"!=typeof t?0:t,{loading:t__left_angle_mark_=0,delay:t}}return{loading:!!e,delay:0}}var ButtonTypeMap={default:[\"default\",\"outlined\"],primary:[\"primary\",\"solid\"],dashed:[\"default\",\"dashed\"],link:[\"primary\",\"link\"],text:[\"default\",\"text\"]},InternalCompoundedButton=import_react43.default.forwardRef(((e,t)=>{var r,n,i,o;const{loading:a=!1,prefixCls:s,color:l,variant:u,type:c,danger:d=!1,shape:h=\"default\",size:f,styles:p,disabled:m,className:g,rootClassName:_,children:b,icon:y,iconPosition:v=\"start\",ghost:A=!1,block:w=!1,htmlType:S=\"button\",classNames:E,style:x={},autoInsertSpace:C}=e,T=__rest9(e,[\"loading\",\"prefixCls\",\"color\",\"variant\",\"type\",\"danger\",\"shape\",\"size\",\"styles\",\"disabled\",\"className\",\"rootClassName\",\"children\",\"icon\",\"iconPosition\",\"ghost\",\"block\",\"htmlType\",\"classNames\",\"style\",\"autoInsertSpace\"]),R=c||\"default\",[I,k]=(0,import_react43.useMemo)((()=>{if(l&&u)return[l,u];const e=ButtonTypeMap[R]||[];return d?[\"danger\",e[1]]:e}),[c,l,u,d]),P=\"danger\"===I?\"dangerous\":I,{getPrefixCls:M,direction:O,button:B}=(0,import_react43.useContext)(ConfigContext),N=null===(r=null!=C?C:null==B?void 0:B.autoInsertSpace)||void 0===r||r,j=M(\"btn\",s),[L,D,F]=style_default5(j),U=(0,import_react43.useContext)(DisabledContext_default),z=null!=m?m:U,q=(0,import_react43.useContext)(GroupSizeContext),G=(0,import_react43.useMemo)((()=>getLoadingConfig(a)),[a]),[H,W]=(0,import_react43.useState)(G.loading),[V,$]=(0,import_react43.useState)(!1),K=composeRef(t,(0,import_react43.createRef)()),X=1===import_react43.Children.count(b)&&!y&&!isUnBorderedButtonVariant(k);(0,import_react43.useEffect)((()=>{let e=null;return G.delay>0?e=setTimeout((()=>{e=null,W(!0)}),G.delay):W(G.loading),function(){e&&(clearTimeout(e),e=null)}}),[G]),(0,import_react43.useEffect)((()=>{if(!K||!K.current||!N)return;const e=K.current.textContent;X&&isTwoCNChar(e)?V||$(!0):V&&$(!1)}),[K]);const Y=import_react43.default.useCallback((t=>{var r;H||z?t.preventDefault():null===(r=e.onClick)||void 0===r||r.call(e,t)}),[e.onClick,H,z]);{const e=devUseWarning(\"Button\");e(!(\"string\"==typeof y&&y.length>2),\"breaking\",`\\`icon\\` is using ReactNode instead of string naming in v4. Please check \\`${y}\\` at https://ant.design/components/icon`),e(!(A&&isUnBorderedButtonVariant(k)),\"usage\",\"`link` or `text` button can't be a `ghost` button.\")}const{compactSize:J,compactItemClassnames:Q}=useCompactItemContext(j,O),Z=useSize_default((e=>{var t,r;return null!==(r=null!==(t=null!=f?f:J)&&void 0!==t?t:q)&&void 0!==r?r:e})),ee=Z&&null!==(n={large:\"lg\",small:\"sm\",middle:void 0}[Z])&&void 0!==n?n:\"\",te=H?\"loading\":y,re=omit(T,[\"navigate\"]),ne=(0,import_classnames20.default)(j,D,F,{[`${j}-${h}`]:\"default\"!==h&&h,[`${j}-${R}`]:R,[`${j}-dangerous`]:d,[`${j}-color-${P}`]:P,[`${j}-variant-${k}`]:k,[`${j}-${ee}`]:ee,[`${j}-icon-only`]:!b&&0!==b&&!!te,[`${j}-background-ghost`]:A&&!isUnBorderedButtonVariant(k),[`${j}-loading`]:H,[`${j}-two-chinese-chars`]:V&&N&&!H,[`${j}-block`]:w,[`${j}-rtl`]:\"rtl\"===O,[`${j}-icon-end`]:\"end\"===v},Q,g,_,null==B?void 0:B.className),ie=Object.assign(Object.assign({},null==B?void 0:B.style),x),oe=(0,import_classnames20.default)(null==E?void 0:E.icon,null===(i=null==B?void 0:B.classNames)||void 0===i?void 0:i.icon),ae=Object.assign(Object.assign({},(null==p?void 0:p.icon)||{}),(null===(o=null==B?void 0:B.styles)||void 0===o?void 0:o.icon)||{}),se=y&&!H?import_react43.default.createElement(IconWrapper_default,{prefixCls:j,className:oe,style:ae},y):import_react43.default.createElement(LoadingIcon_default,{existIcon:!!y,prefixCls:j,loading:H}),le=b||0===b?spaceChildren(b,X&&N):null;if(void 0!==re.href)return L(import_react43.default.createElement(\"a\",Object.assign({},re,{className:(0,import_classnames20.default)(ne,{[`${j}-disabled`]:z}),href:z?void 0:re.href,style:ie,onClick:Y,ref:K,tabIndex:z?-1:0}),se,le));let ue=import_react43.default.createElement(\"button\",Object.assign({},T,{type:S,className:ne,style:ie,onClick:Y,disabled:z,ref:K}),se,le,!!Q&&import_react43.default.createElement(compactCmp_default,{key:\"compact\",prefixCls:j}));return isUnBorderedButtonVariant(k)||(ue=import_react43.default.createElement(wave_default,{component:\"Button\",disabled:H},ue)),L(ue)})),Button=InternalCompoundedButton;Button.Group=button_group_default,Button.__ANT_BUTTON=!0,Button.displayName=\"Button\";var button_default=Button,button_default2=button_default;function isThenable(e){return!!(null==e?void 0:e.then)}var ActionButton=e=>{const{type:t,children:r,prefixCls:n,buttonProps:i,close:o,autoFocus:a,emitEvent:s,isSilent:l,quitOnNullishReturnValue:u,actionFn:c}=e,d=React104.useRef(!1),h=React104.useRef(null),[f,p]=useSafeState(!1),m=function(){null==o||o.apply(void 0,arguments)};return React104.useEffect((()=>{let e=null;return a&&(e=setTimeout((()=>{var e;null===(e=h.current)||void 0===e||e.focus()}))),()=>{e&&clearTimeout(e)}}),[]),React104.createElement(button_default2,Object.assign({},convertLegacyProps(t),{onClick:e=>{if(d.current)return;if(d.current=!0,!c)return void m();let t;if(s){if(t=c(e),u&&!isThenable(t))return d.current=!1,void m(e)}else if(c.length)t=c(o),d.current=!1;else if(t=c(),!isThenable(t))return void m();(e=>{isThenable(e)&&(p(!0),e.then((function(){p(!1,!0),m.apply(void 0,arguments),d.current=!1}),(e=>{if(p(!1,!0),d.current=!1,!(null==l?void 0:l()))return Promise.reject(e)})))})(t)},loading:f,prefixCls:n},i,{ref:h}),r)},ActionButton_default=ActionButton;init_globals();var import_react44=__toESM(require_react()),ModalContext=import_react44.default.createContext({}),{Provider:ModalContextProvider}=ModalContext,ConfirmCancelBtn=()=>{const{autoFocusButton:e,cancelButtonProps:t,cancelTextLocale:r,isSilent:n,mergedOkCancel:i,rootPrefixCls:o,close:a,onCancel:s,onConfirm:l}=(0,import_react45.useContext)(ModalContext);return i?import_react45.default.createElement(ActionButton_default,{isSilent:n,actionFn:s,close:function(){null==a||a.apply(void 0,arguments),null==l||l(!1)},autoFocus:\"cancel\"===e,buttonProps:t,prefixCls:`${o}-btn`},r):null},ConfirmCancelBtn_default=ConfirmCancelBtn;init_globals();var import_react46=__toESM(require_react()),ConfirmOkBtn=()=>{const{autoFocusButton:e,close:t,isSilent:r,okButtonProps:n,rootPrefixCls:i,okTextLocale:o,okType:a,onConfirm:s,onOk:l}=(0,import_react46.useContext)(ModalContext);return import_react46.default.createElement(ActionButton_default,{isSilent:r,type:a||\"primary\",actionFn:l,close:function(){null==t||t.apply(void 0,arguments),null==s||s(!0)},autoFocus:\"ok\"===e,buttonProps:n,prefixCls:`${i}-btn`},o)},ConfirmOkBtn_default=ConfirmOkBtn;init_globals();var React145=__toESM(require_react()),import_classnames34=__toESM(require_classnames());init_globals(),init_globals(),init_globals(),init_globals();var React111=__toESM(require_react()),import_react_dom3=__toESM(require_react_dom());init_globals();var React108=__toESM(require_react()),OrderContext=React108.createContext(null),Context_default3=OrderContext;init_globals();var React109=__toESM(require_react()),EMPTY_LIST=[];function useDom(e,t){var r=_slicedToArray(React109.useState((function(){if(!canUseDom())return null;var e=document.createElement(\"div\");return t&&e.setAttribute(\"data-debug\",t),e})),1)[0],n=React109.useRef(!1),i=React109.useContext(Context_default3),o=_slicedToArray(React109.useState(EMPTY_LIST),2),a=o[0],s=o[1],l=i||(n.current?void 0:function(e){s((function(t){return[e].concat(_toConsumableArray(t))}))});function u(){r.parentElement||document.body.appendChild(r),n.current=!0}function c(){var e;null===(e=r.parentElement)||void 0===e||e.removeChild(r),n.current=!1}return useLayoutEffect_default((function(){return e?i?i(u):u():c(),c}),[e]),useLayoutEffect_default((function(){a.length&&(a.forEach((function(e){return e()})),s(EMPTY_LIST))}),[a]),[r,l]}init_globals();var React110=__toESM(require_react());function measureScrollbarSize(e){var t=\"rc-scrollbar-measure-\".concat(Math.random().toString(36).substring(7)),r=document.createElement(\"div\");r.id=t;var n,i,o=r.style;if(o.position=\"absolute\",o.left=\"0\",o.top=\"0\",o.width=\"100px\",o.height=\"100px\",o.overflow=\"scroll\",e){var a=getComputedStyle(e);o.scrollbarColor=a.scrollbarColor,o.scrollbarWidth=a.scrollbarWidth;var s=getComputedStyle(e,\"::-webkit-scrollbar\"),l=parseInt(s.width,10),u=parseInt(s.height,10);try{var c=l?\"width: \".concat(s.width,\";\"):\"\",d=u?\"height: \".concat(s.height,\";\"):\"\";updateCSS(\"\\n#\".concat(t,\"::-webkit-scrollbar {\\n\").concat(c,\"\\n\").concat(d,\"\\n}\"),t)}catch(e4){import_console_browserify.default.error(e4),n=l,i=u}}document.body.appendChild(r);var h=e&&n&&!isNaN(n)?n:r.offsetWidth-r.clientWidth,f=e&&i&&!isNaN(i)?i:r.offsetHeight-r.clientHeight;return document.body.removeChild(r),removeCSS(t),{width:h,height:f}}function getTargetScrollBarSize(e){return\"undefined\"!=typeof document&&e&&e instanceof Element?measureScrollbarSize(e):{width:0,height:0}}function isBodyOverflowing(){return document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth}init_globals(),init_globals();var UNIQUE_ID=\"rc-util-locker-\".concat(Date.now()),uuid2=0;function useScrollLocker(e){var t=!!e,r=_slicedToArray(React110.useState((function(){return uuid2+=1,\"\".concat(UNIQUE_ID,\"_\").concat(uuid2)})),1)[0];useLayoutEffect_default((function(){if(t){var e=getTargetScrollBarSize(document.body).width,n=isBodyOverflowing();updateCSS(\"\\nhtml body {\\n overflow-y: hidden;\\n \".concat(n?\"width: calc(100% - \".concat(e,\"px);\"):\"\",\"\\n}\"),r)}else removeCSS(r);return function(){removeCSS(r)}}),[t,r])}init_globals();var inline=!1;function inlineMock(e){return\"boolean\"==typeof e&&(inline=e),inline}var getPortalContainer=function(e){return!1!==e&&(canUseDom()&&e?\"string\"==typeof e?document.querySelector(e):\"function\"==typeof e?e():e:null)},Portal=React111.forwardRef((function(e,t){var r=e.open,n=e.autoLock,i=e.getContainer,o=e.debug,a=e.autoDestroy,s=void 0===a||a,l=e.children,u=_slicedToArray(React111.useState(r),2),c=u[0],d=u[1],h=c||r;warning_default(canUseDom()||!r,\"Portal only work in client side. Please call 'useEffect' to show Portal instead default render in SSR.\"),React111.useEffect((function(){(s||r)&&d(r)}),[r,s]);var f=_slicedToArray(React111.useState((function(){return getPortalContainer(i)})),2),p=f[0],m=f[1];React111.useEffect((function(){var e=getPortalContainer(i);m(null!=e?e:null)}));var g=_slicedToArray(useDom(h&&!p,o),2),_=g[0],b=g[1],y=null!=p?p:_;useScrollLocker(n&&r&&canUseDom()&&(y===_||y===document.body));var v=null;l&&supportRef(l)&&t&&(v=l.ref);var A=useComposeRef(v,t);if(!h||!canUseDom()||void 0===p)return null;var w=!1===y||inlineMock(),S=l;return t&&(S=React111.cloneElement(l,{ref:A})),React111.createElement(Context_default3.Provider,{value:b},w?S:(0,import_react_dom3.createPortal)(S,y))}));Portal.displayName=\"Portal\";var Portal_default=Portal,es_default3=Portal_default,React119=__toESM(require_react());init_globals();var React112=__toESM(require_react()),RefContext=React112.createContext({});init_globals();var import_classnames24=__toESM(require_classnames());init_globals();var React113=__toESM(require_react());function getUseId(){return _objectSpread2({},React113).useId}var uuid3=0,useOriginId=getUseId(),useId_default=useOriginId?function(e){var t=useOriginId();return e||t}:function(e){var t=_slicedToArray(React113.useState(\"ssr-id\"),2),r=t[0],n=t[1];return React113.useEffect((function(){var e=uuid3;uuid3+=1,n(\"rc_unique_\".concat(e))}),[]),e||r},React118=__toESM(require_react()),import_react49=__toESM(require_react());function getMotionName(e,t,r){var n=t;return!n&&r&&(n=\"\".concat(e,\"-\").concat(r)),n}function getScroll(e,t){var r=e[\"page\".concat(t?\"Y\":\"X\",\"Offset\")],n=\"scroll\".concat(t?\"Top\":\"Left\");if(\"number\"!=typeof r){var i=e.document;\"number\"!=typeof(r=i.documentElement[n])&&(r=i.body[n])}return r}function offset(e){var t=e.getBoundingClientRect(),r={left:t.left,top:t.top},n=e.ownerDocument,i=n.defaultView||n.parentWindow;return r.left+=getScroll(i),r.top+=getScroll(i,!0),r}init_globals(),init_globals();var React116=__toESM(require_react()),import_react48=__toESM(require_react()),import_classnames22=__toESM(require_classnames());init_globals();var import_classnames21=__toESM(require_classnames()),import_react47=__toESM(require_react());init_globals();var React114=__toESM(require_react()),MemoChildren_default=React114.memo((function(e){return e.children}),(function(e,t){return!t.shouldUpdate})),sentinelStyle={width:0,height:0,overflow:\"hidden\",outline:\"none\"},entityStyle={outline:\"none\"},Panel=import_react47.default.forwardRef((function(e,t){var r=e.prefixCls,n=e.className,i=e.style,o=e.title,a=e.ariaId,s=e.footer,l=e.closable,u=e.closeIcon,c=e.onClose,d=e.children,h=e.bodyStyle,f=e.bodyProps,p=e.modalRender,m=e.onMouseDown,g=e.onMouseUp,_=e.holderRef,b=e.visible,y=e.forceRender,v=e.width,A=e.height,w=e.classNames,S=e.styles,E=import_react47.default.useContext(RefContext).panel,x=useComposeRef(_,E),C=(0,import_react47.useRef)(),T=(0,import_react47.useRef)();import_react47.default.useImperativeHandle(t,(function(){return{focus:function(){var e;null===(e=C.current)||void 0===e||e.focus({preventScroll:!0})},changeActive:function(e){var t=document.activeElement;e&&t===T.current?C.current.focus({preventScroll:!0}):e||t!==C.current||T.current.focus({preventScroll:!0})}}}));var R={};void 0!==v&&(R.width=v),void 0!==A&&(R.height=A);var I=s?import_react47.default.createElement(\"div\",{className:(0,import_classnames21.default)(\"\".concat(r,\"-footer\"),null==w?void 0:w.footer),style:_objectSpread2({},null==S?void 0:S.footer)},s):null,k=o?import_react47.default.createElement(\"div\",{className:(0,import_classnames21.default)(\"\".concat(r,\"-header\"),null==w?void 0:w.header),style:_objectSpread2({},null==S?void 0:S.header)},import_react47.default.createElement(\"div\",{className:\"\".concat(r,\"-title\"),id:a},o)):null,P=(0,import_react47.useMemo)((function(){return\"object\"===_typeof(l)&&null!==l?l:l?{closeIcon:null!=u?u:import_react47.default.createElement(\"span\",{className:\"\".concat(r,\"-close-x\")})}:{}}),[l,u,r]),M=pickAttrs(P,!0),O=\"object\"===_typeof(l)&&l.disabled,B=l?import_react47.default.createElement(\"button\",_extends({type:\"button\",onClick:c,\"aria-label\":\"Close\"},M,{className:\"\".concat(r,\"-close\"),disabled:O}),P.closeIcon):null,N=import_react47.default.createElement(\"div\",{className:(0,import_classnames21.default)(\"\".concat(r,\"-content\"),null==w?void 0:w.content),style:null==S?void 0:S.content},B,k,import_react47.default.createElement(\"div\",_extends({className:(0,import_classnames21.default)(\"\".concat(r,\"-body\"),null==w?void 0:w.body),style:_objectSpread2(_objectSpread2({},h),null==S?void 0:S.body)},f),d),I);return import_react47.default.createElement(\"div\",{key:\"dialog-element\",role:\"dialog\",\"aria-labelledby\":o?a:null,\"aria-modal\":\"true\",ref:x,style:_objectSpread2(_objectSpread2({},i),R),className:(0,import_classnames21.default)(r,n),onMouseDown:m,onMouseUp:g},import_react47.default.createElement(\"div\",{ref:C,tabIndex:0,style:entityStyle},import_react47.default.createElement(MemoChildren_default,{shouldUpdate:b||y},p?p(N):N)),import_react47.default.createElement(\"div\",{tabIndex:0,ref:T,style:sentinelStyle}))}));Panel.displayName=\"Panel\";var Panel_default=Panel,Content=React116.forwardRef((function(e,t){var r=e.prefixCls,n=e.title,i=e.style,o=e.className,a=e.visible,s=e.forceRender,l=e.destroyOnClose,u=e.motionName,c=e.ariaId,d=e.onVisibleChanged,h=e.mousePosition,f=(0,import_react48.useRef)(),p=_slicedToArray(React116.useState(),2),m=p[0],g=p[1],_={};function b(){var e=offset(f.current);g(h&&(h.x||h.y)?\"\".concat(h.x-e.left,\"px \").concat(h.y-e.top,\"px\"):\"\")}return m&&(_.transformOrigin=m),React116.createElement(es_default2,{visible:a,onVisibleChanged:d,onAppearPrepare:b,onEnterPrepare:b,forceRender:s,motionName:u,removeOnLeave:l,ref:f},(function(a,s){var l=a.className,u=a.style;return React116.createElement(Panel_default,_extends({},e,{ref:t,title:n,ariaId:c,prefixCls:r,holderRef:s,style:_objectSpread2(_objectSpread2(_objectSpread2({},u),i),_),className:(0,import_classnames22.default)(o,l)}))}))}));Content.displayName=\"Content\";var Content_default=Content;init_globals();var React117=__toESM(require_react()),import_classnames23=__toESM(require_classnames()),Mask=function(e){var t=e.prefixCls,r=e.style,n=e.visible,i=e.maskProps,o=e.motionName,a=e.className;return React117.createElement(es_default2,{key:\"mask\",visible:n,motionName:o,leavedClassName:\"\".concat(t,\"-mask-hidden\")},(function(e,n){var o=e.className,s=e.style;return React117.createElement(\"div\",_extends({ref:n,style:_objectSpread2(_objectSpread2({},s),r),className:(0,import_classnames23.default)(\"\".concat(t,\"-mask\"),o,a)},i))}))},Mask_default=Mask,Dialog=function(e){var t=e.prefixCls,r=void 0===t?\"rc-dialog\":t,n=e.zIndex,i=e.visible,o=void 0!==i&&i,a=e.keyboard,s=void 0===a||a,l=e.focusTriggerAfterClose,u=void 0===l||l,c=e.wrapStyle,d=e.wrapClassName,h=e.wrapProps,f=e.onClose,p=e.afterOpenChange,m=e.afterClose,g=e.transitionName,_=e.animation,b=e.closable,y=void 0===b||b,v=e.mask,A=void 0===v||v,w=e.maskTransitionName,S=e.maskAnimation,E=e.maskClosable,x=void 0===E||E,C=e.maskStyle,T=e.maskProps,R=e.rootClassName,I=e.classNames,k=e.styles;[\"wrapStyle\",\"bodyStyle\",\"maskStyle\"].forEach((function(t){warning(!(t in e),\"\".concat(t,\" is deprecated, please use styles instead.\"))})),\"wrapClassName\"in e&&warning(!1,\"wrapClassName is deprecated, please use classNames instead.\");var P=(0,import_react49.useRef)(),M=(0,import_react49.useRef)(),O=(0,import_react49.useRef)(),B=_slicedToArray(React118.useState(o),2),N=B[0],j=B[1],L=useId_default();function D(e){null==f||f(e)}var F=(0,import_react49.useRef)(!1),U=(0,import_react49.useRef)(),z=null;x&&(z=function(e){F.current?F.current=!1:M.current===e.target&&D(e)}),(0,import_react49.useEffect)((function(){o&&(j(!0),contains(M.current,document.activeElement)||(P.current=document.activeElement))}),[o]),(0,import_react49.useEffect)((function(){return function(){clearTimeout(U.current)}}),[]);var q=_objectSpread2(_objectSpread2(_objectSpread2({zIndex:n},c),null==k?void 0:k.wrapper),{},{display:N?null:\"none\"});return React118.createElement(\"div\",_extends({className:(0,import_classnames24.default)(\"\".concat(r,\"-root\"),R)},pickAttrs(e,{data:!0})),React118.createElement(Mask_default,{prefixCls:r,visible:A&&o,motionName:getMotionName(r,w,S),style:_objectSpread2(_objectSpread2({zIndex:n},C),null==k?void 0:k.mask),maskProps:T,className:null==I?void 0:I.mask}),React118.createElement(\"div\",_extends({tabIndex:-1,onKeyDown:function(e){if(s&&e.keyCode===KeyCode_default.ESC)return e.stopPropagation(),void D(e);o&&e.keyCode===KeyCode_default.TAB&&O.current.changeActive(!e.shiftKey)},className:(0,import_classnames24.default)(\"\".concat(r,\"-wrap\"),d,null==I?void 0:I.wrapper),ref:M,onClick:z,style:q},h),React118.createElement(Content_default,_extends({},e,{onMouseDown:function(){clearTimeout(U.current),F.current=!0},onMouseUp:function(){U.current=setTimeout((function(){F.current=!1}))},ref:O,closable:y,ariaId:L,prefixCls:r,visible:o&&N,onClose:D,onVisibleChanged:function(e){if(e)contains(M.current,document.activeElement)||null===(t=O.current)||void 0===t||t.focus();else{if(j(!1),A&&P.current&&u){try{P.current.focus({preventScroll:!0})}catch(e4){}P.current=null}N&&(null==m||m())}var t;null==p||p(e)},motionName:getMotionName(r,g,_)}))))},Dialog_default=Dialog,DialogWrap=function(e){var t=e.visible,r=e.getContainer,n=e.forceRender,i=e.destroyOnClose,o=void 0!==i&&i,a=e.afterClose,s=e.panelRef,l=_slicedToArray(React119.useState(t),2),u=l[0],c=l[1],d=React119.useMemo((function(){return{panel:s}}),[s]);return React119.useEffect((function(){t&&c(!0)}),[t]),n||!o||u?React119.createElement(RefContext.Provider,{value:d},React119.createElement(es_default3,{open:t||n||u,autoDestroy:!1,getContainer:r,autoLock:t||u},React119.createElement(Dialog_default,_extends({},e,{destroyOnClose:o,afterClose:function(){null==a||a(),c(!1)}})))):null};DialogWrap.displayName=\"Dialog\";var DialogWrap_default=DialogWrap,es_default4=DialogWrap_default;init_globals();var import_react52=__toESM(require_react());init_globals();var React129=__toESM(require_react()),import_react51=__toESM(require_react());init_globals();var React128=__toESM(require_react());init_globals();var React123=__toESM(require_react());init_globals();var React120=__toESM(require_react()),HOOK_MARK=\"RC_FORM_INTERNAL_HOOKS\",warningFunc=function(){warning_default(!1,\"Can not find FormContext. Please make sure you wrap Field under Form.\")},Context3=React120.createContext({getFieldValue:warningFunc,getFieldsValue:warningFunc,getFieldError:warningFunc,getFieldWarning:warningFunc,getFieldsError:warningFunc,isFieldsTouched:warningFunc,isFieldTouched:warningFunc,isFieldValidating:warningFunc,isFieldsValidating:warningFunc,resetFields:warningFunc,setFields:warningFunc,setFieldValue:warningFunc,setFieldsValue:warningFunc,validateFields:warningFunc,submit:warningFunc,getInternalHooks:function(){return warningFunc(),{dispatch:warningFunc,initEntityValue:warningFunc,registerField:warningFunc,useSubscribe:warningFunc,setInitialValues:warningFunc,destroyForm:warningFunc,setCallbacks:warningFunc,registerWatch:warningFunc,getFields:warningFunc,setValidateMessages:warningFunc,setPreserve:warningFunc,getInitialValue:warningFunc}}}),FieldContext_default=Context3;init_globals();var React121=__toESM(require_react()),ListContext=React121.createContext(null),ListContext_default=ListContext;function toArray2(e){return null==e?[]:Array.isArray(e)?e:[e]}function isFormInstance(e){return e&&!!e._init}function newMessages(){return{default:\"Validation error on field %s\",required:\"%s is required\",enum:\"%s must be one of %s\",whitespace:\"%s cannot be empty\",date:{format:\"%s date %s is invalid for format %s\",parse:\"%s date could not be parsed, %s is invalid \",invalid:\"%s date %s is invalid\"},types:{string:\"%s is not a %s\",method:\"%s is not a %s (function)\",array:\"%s is not an %s\",object:\"%s is not an %s\",number:\"%s is not a %s\",date:\"%s is not a %s\",boolean:\"%s is not a %s\",integer:\"%s is not an %s\",float:\"%s is not a %s\",regexp:\"%s is not a valid %s\",email:\"%s is not a valid %s\",url:\"%s is not a valid %s\",hex:\"%s is not a valid %s\"},string:{len:\"%s must be exactly %s characters\",min:\"%s must be at least %s characters\",max:\"%s cannot be longer than %s characters\",range:\"%s must be between %s and %s characters\"},number:{len:\"%s must equal %s\",min:\"%s cannot be less than %s\",max:\"%s cannot be greater than %s\",range:\"%s must be between %s and %s\"},array:{len:\"%s must be exactly %s in length\",min:\"%s cannot be less than %s in length\",max:\"%s cannot be greater than %s in length\",range:\"%s must be between %s and %s in length\"},pattern:{mismatch:\"%s value %s does not match pattern %s\"},clone:function(){var e=JSON.parse(JSON.stringify(this));return e.clone=this.clone,e}}}init_globals(),init_globals(),init_globals(),init_globals();var messages=newMessages();function _isNativeFunction(e){try{return-1!==Function.toString.call(e).indexOf(\"[native code]\")}catch(t){return\"function\"==typeof e}}function _construct(e,t,r){if(_isNativeReflectConstruct())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,t);var i=new(e.bind.apply(e,n));return r&&_setPrototypeOf(i,r.prototype),i}function _wrapNativeSuper(e){var t=\"function\"==typeof Map?new Map:void 0;return _wrapNativeSuper=function(e){if(null===e||!_isNativeFunction(e))return e;if(\"function\"!=typeof e)throw new TypeError(\"Super expression must either be null or a function\");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return _construct(e,arguments,_getPrototypeOf(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),_setPrototypeOf(r,e)},_wrapNativeSuper(e)}init_globals(),init_globals(),init_globals(),init_globals();var formatRegExp=/%[sdj%]/g,warning5=function(){};function convertFieldsError(e){if(!e||!e.length)return null;var t={};return e.forEach((function(e){var r=e.field;t[r]=t[r]||[],t[r].push(e)})),t}function format(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n__left_angle_mark_t;n++)r[n-1]=arguments[n];var i=0,o=r.length;return\"function\"==typeof e?e.apply(null,r):\"string\"==typeof e?e.replace(formatRegExp,(function(e){if(\"%%\"===e)return\"%\";if(i>=o)return e;switch(e){case\"%s\":return String(r[i++]);case\"%d\":return Number(r[i++]);case\"%j\":try{return JSON.stringify(r[i++])}catch(t){return\"[Circular]\"}break;default:return e}})):e}function isNativeStringType(e){return\"string\"===e||\"url\"===e||\"hex\"===e||\"email\"===e||\"date\"===e||\"pattern\"===e}function isEmptyValue(e,t){return null==e||!(\"array\"!==t||!Array.isArray(e)||e.length)||!(!isNativeStringType(t)||\"string\"!=typeof e||e)}function asyncParallelArray(e,t,r){var n=[],i=0,o=e.length;function a(e){n.push.apply(n,_toConsumableArray(e||[])),++i===o&&r(n)}e.forEach((function(e){t(e,a)}))}function asyncSerialArray(e,t,r){var n=0,i=e.length;!function o(a){if(a&&a.length)r(a);else{var s=n;n+=1,s__left_angle_mark_i?t(e[s],o):r([])}}([])}function flattenObjArr(e){var t=[];return Object.keys(e).forEach((function(r){t.push.apply(t,_toConsumableArray(e[r]||[]))})),t}void 0!==import_browser.default&&import_browser.default.env&&\"undefined\"!=typeof window&&\"undefined\"!=typeof document&&(warning5=function(e,t){void 0!==import_console_browserify.default&&import_console_browserify.default.warn&&\"undefined\"==typeof ASYNC_VALIDATOR_NO_WARNING&&t.every((function(e){return\"string\"==typeof e}))&&import_console_browserify.default.warn(e,t)});var AsyncValidationError=function(e){_inherits(r,e);var t=_createSuper(r);function r(e,n){var i;return _classCallCheck(this,r),_defineProperty(_assertThisInitialized(i=t.call(this,\"Async Validation Error\")),\"errors\",void 0),_defineProperty(_assertThisInitialized(i),\"fields\",void 0),i.errors=e,i.fields=n,i}return _createClass(r)}(_wrapNativeSuper(Error));function asyncMap(e,t,r,n,i){if(t.first){var o=new Promise((function(t,o){asyncSerialArray(flattenObjArr(e),r,(function(e){return n(e),e.length?o(new AsyncValidationError(e,convertFieldsError(e))):t(i)}))}));return o.catch((function(e){return e})),o}var a=!0===t.firstFields?Object.keys(e):t.firstFields||[],s=Object.keys(e),l=s.length,u=0,c=[],d=new Promise((function(t,o){var d=function(e){if(c.push.apply(c,e),++u===l)return n(c),c.length?o(new AsyncValidationError(c,convertFieldsError(c))):t(i)};s.length||(n(c),t(i)),s.forEach((function(t){var n=e[t];-1!==a.indexOf(t)?asyncSerialArray(n,r,d):asyncParallelArray(n,r,d)}))}));return d.catch((function(e){return e})),d}function isErrorObj(e){return!(!e||void 0===e.message)}function getValue2(e,t){for(var r=e,n=0;n__left_angle_mark_t.length;n++){if(null==r)return r;r=r[t[n]]}return r}function complementError(e,t){return function(r){var n;return n=e.fullFields?getValue2(t,e.fullFields):t[r.field||e.fullField],isErrorObj(r)?(r.field=r.field||e.fullField,r.fieldValue=n,r):{message:\"function\"==typeof r?r():r,fieldValue:n,field:r.field||e.fullField}}}function deepMerge(e,t){if(t)for(var r in t)if(t.hasOwnProperty(r)){var n=t[r];\"object\"===_typeof(n)&&\"object\"===_typeof(e[r])?e[r]=_objectSpread2(_objectSpread2({},e[r]),n):e[r]=n}return e}init_globals(),init_globals(),init_globals(),init_globals();var ENUM=\"enum\",enumerable=function(e,t,r,n,i){e[ENUM]=Array.isArray(e[ENUM])?e[ENUM]:[],-1===e[ENUM].indexOf(t)&&n.push(format(i.messages[ENUM],e.fullField,e[ENUM].join(\", \")))},enum_default=enumerable;init_globals();var pattern=function(e,t,r,n,i){e.pattern&&(e.pattern instanceof RegExp?(e.pattern.lastIndex=0,e.pattern.test(t)||n.push(format(i.messages.pattern.mismatch,e.fullField,t,e.pattern))):\"string\"==typeof e.pattern&&(new RegExp(e.pattern).test(t)||n.push(format(i.messages.pattern.mismatch,e.fullField,t,e.pattern))))},pattern_default=pattern;init_globals();var range=function(e,t,r,n,i){var o=\"number\"==typeof e.len,a=\"number\"==typeof e.min,s=\"number\"==typeof e.max,l=t,u=null,c=\"number\"==typeof t,d=\"string\"==typeof t,h=Array.isArray(t);if(c?u=\"number\":d?u=\"string\":h&&(u=\"array\"),!u)return!1;h&&(l=t.length),d&&(l=t.replace(/[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]/g,\"_\").length),o?l!==e.len&&n.push(format(i.messages[u].len,e.fullField,e.len)):a&&!s&&l__left_angle_mark_e.min?n.push(format(i.messages[u].min,e.fullField,e.min)):s&&!a&&l>e.max?n.push(format(i.messages[u].max,e.fullField,e.max)):a&&s&&(l__left_angle_mark_e.min||l>e.max)&&n.push(format(i.messages[u].range,e.fullField,e.min,e.max))},range_default=range;init_globals();var required=function(e,t,r,n,i,o){!e.required||r.hasOwnProperty(e.field)&&!isEmptyValue(t,o||e.type)||n.push(format(i.messages.required,e.fullField))},required_default=required,urlReg;init_globals(),init_globals();var url_default=function(){if(urlReg)return urlReg;var e=\"[a-fA-F\\\\d:]\",t=function(t){return t&&t.includeBoundaries?\"(?:(?__left_angle_mark_=\\\\s|^)(?=\".concat(e,\")|(?__left_angle_mark_=\").concat(e,\")(?=\\\\s|$))\"):\"\"},r=\"(?:25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]\\\\d|\\\\d)(?:\\\\.(?:25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]\\\\d|\\\\d)){3}\",n=\"[a-fA-F\\\\d]{1,4}\",i=[\"(?:\".concat(n,\":){7}(?:\").concat(n,\"|:)\"),\"(?:\".concat(n,\":){6}(?:\").concat(r,\"|:\").concat(n,\"|:)\"),\"(?:\".concat(n,\":){5}(?::\").concat(r,\"|(?::\").concat(n,\"){1,2}|:)\"),\"(?:\".concat(n,\":){4}(?:(?::\").concat(n,\"){0,1}:\").concat(r,\"|(?::\").concat(n,\"){1,3}|:)\"),\"(?:\".concat(n,\":){3}(?:(?::\").concat(n,\"){0,2}:\").concat(r,\"|(?::\").concat(n,\"){1,4}|:)\"),\"(?:\".concat(n,\":){2}(?:(?::\").concat(n,\"){0,3}:\").concat(r,\"|(?::\").concat(n,\"){1,5}|:)\"),\"(?:\".concat(n,\":){1}(?:(?::\").concat(n,\"){0,4}:\").concat(r,\"|(?::\").concat(n,\"){1,6}|:)\"),\"(?::(?:(?::\".concat(n,\"){0,5}:\").concat(r,\"|(?::\").concat(n,\"){1,7}|:))\")],o=\"(?:\".concat(i.join(\"|\"),\")\").concat(\"(?:%[0-9a-zA-Z]{1,})?\"),a=new RegExp(\"(?:^\".concat(r,\"$)|(?:^\").concat(o,\"$)\")),s=new RegExp(\"^\".concat(r,\"$\")),l=new RegExp(\"^\".concat(o,\"$\")),u=function(e){return e&&e.exact?a:new RegExp(\"(?:\".concat(t(e)).concat(r).concat(t(e),\")|(?:\").concat(t(e)).concat(o).concat(t(e),\")\"),\"g\")};u.v4=function(e){return e&&e.exact?s:new RegExp(\"\".concat(t(e)).concat(r).concat(t(e)),\"g\")},u.v6=function(e){return e&&e.exact?l:new RegExp(\"\".concat(t(e)).concat(o).concat(t(e)),\"g\")};var c=u.v4().source,d=u.v6().source,h=\"(?:\".concat(\"(?:(?:[a-z]+:)?//)\",\"|www\\\\.)\").concat(\"(?:\\\\S+(?::\\\\S*)?@)?\",\"(?:localhost|\").concat(c,\"|\").concat(d,\"|\").concat(\"(?:(?:[a-z\\\\u00a1-\\\\uffff0-9][-_]*)*[a-z\\\\u00a1-\\\\uffff0-9]+)\").concat(\"(?:\\\\.(?:[a-z\\\\u00a1-\\\\uffff0-9]-*)*[a-z\\\\u00a1-\\\\uffff0-9]+)*\").concat(\"(?:\\\\.(?:[a-z\\\\u00a1-\\\\uffff]{2,}))\",\")\").concat(\"(?::\\\\d{2,5})?\").concat('(?:[/?#][^\\\\s\"]*)?');return urlReg=new RegExp(\"(?:^\".concat(h,\"$)\"),\"i\")},pattern3={email:/^(([^__left_angle_mark_>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^__left_angle_mark_>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]+\\.)+[a-zA-Z\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]{2,}))$/,hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},types={integer:function(e){return types.number(e)&&parseInt(e,10)===e},float:function(e){return types.number(e)&&!types.integer(e)},array:function(e){return Array.isArray(e)},regexp:function(e){if(e instanceof RegExp)return!0;try{return!!new RegExp(e)}catch(e4){return!1}},date:function(e){return\"function\"==typeof e.getTime&&\"function\"==typeof e.getMonth&&\"function\"==typeof e.getYear&&!isNaN(e.getTime())},number:function(e){return!isNaN(e)&&\"number\"==typeof e},object:function(e){return\"object\"===_typeof(e)&&!types.array(e)},method:function(e){return\"function\"==typeof e},email:function(e){return\"string\"==typeof e&&e.length__left_angle_mark_=320&&!!e.match(pattern3.email)},url:function(e){return\"string\"==typeof e&&e.length__left_angle_mark_=2048&&!!e.match(url_default())},hex:function(e){return\"string\"==typeof e&&!!e.match(pattern3.hex)}},type=function(e,t,r,n,i){if(e.required&&void 0===t)required_default(e,t,r,n,i);else{var o=e.type;[\"integer\",\"float\",\"array\",\"regexp\",\"object\",\"method\",\"email\",\"number\",\"date\",\"url\",\"hex\"].indexOf(o)>-1?types[o](t)||n.push(format(i.messages.types[o],e.fullField,e.type)):o&&_typeof(t)!==e.type&&n.push(format(i.messages.types[o],e.fullField,e.type))}},type_default=type;init_globals();var whitespace2=function(e,t,r,n,i){(/^\\s+$/.test(t)||\"\"===t)&&n.push(format(i.messages.whitespace,e.fullField))},whitespace_default=whitespace2,rule_default={required:required_default,whitespace:whitespace_default,type:type_default,range:range_default,enum:enum_default,pattern:pattern_default},any=function(e,t,r,n,i){var o=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(isEmptyValue(t)&&!e.required)return r();rule_default.required(e,t,n,o,i)}r(o)},any_default=any;init_globals();var array2=function(e,t,r,n,i){var o=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(null==t&&!e.required)return r();rule_default.required(e,t,n,o,i,\"array\"),null!=t&&(rule_default.type(e,t,n,o,i),rule_default.range(e,t,n,o,i))}r(o)},array_default=array2;init_globals();var boolean=function(e,t,r,n,i){var o=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(isEmptyValue(t)&&!e.required)return r();rule_default.required(e,t,n,o,i),void 0!==t&&rule_default.type(e,t,n,o,i)}r(o)},boolean_default=boolean;init_globals();var date2=function(e,t,r,n,i){var o=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(isEmptyValue(t,\"date\")&&!e.required)return r();var a;rule_default.required(e,t,n,o,i),isEmptyValue(t,\"date\")||(a=t instanceof Date?t:new Date(t),rule_default.type(e,a,n,o,i),a&&rule_default.range(e,a.getTime(),n,o,i))}r(o)},date_default=date2;init_globals();var ENUM2=\"enum\",enumerable3=function(e,t,r,n,i){var o=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(isEmptyValue(t)&&!e.required)return r();rule_default.required(e,t,n,o,i),void 0!==t&&rule_default[ENUM2](e,t,n,o,i)}r(o)},enum_default2=enumerable3;init_globals();var floatFn=function(e,t,r,n,i){var o=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(isEmptyValue(t)&&!e.required)return r();rule_default.required(e,t,n,o,i),void 0!==t&&(rule_default.type(e,t,n,o,i),rule_default.range(e,t,n,o,i))}r(o)},float_default=floatFn;init_globals();var integer2=function(e,t,r,n,i){var o=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(isEmptyValue(t)&&!e.required)return r();rule_default.required(e,t,n,o,i),void 0!==t&&(rule_default.type(e,t,n,o,i),rule_default.range(e,t,n,o,i))}r(o)},integer_default=integer2;init_globals();var method2=function(e,t,r,n,i){var o=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(isEmptyValue(t)&&!e.required)return r();rule_default.required(e,t,n,o,i),void 0!==t&&rule_default.type(e,t,n,o,i)}r(o)},method_default=method2;init_globals();var number2=function(e,t,r,n,i){var o=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(\"\"===t&&(t=void 0),isEmptyValue(t)&&!e.required)return r();rule_default.required(e,t,n,o,i),void 0!==t&&(rule_default.type(e,t,n,o,i),rule_default.range(e,t,n,o,i))}r(o)},number_default=number2;init_globals();var object2=function(e,t,r,n,i){var o=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(isEmptyValue(t)&&!e.required)return r();rule_default.required(e,t,n,o,i),void 0!==t&&rule_default.type(e,t,n,o,i)}r(o)},object_default=object2;init_globals();var pattern4=function(e,t,r,n,i){var o=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(isEmptyValue(t,\"string\")&&!e.required)return r();rule_default.required(e,t,n,o,i),isEmptyValue(t,\"string\")||rule_default.pattern(e,t,n,o,i)}r(o)},pattern_default2=pattern4;init_globals();var regexp4=function(e,t,r,n,i){var o=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(isEmptyValue(t)&&!e.required)return r();rule_default.required(e,t,n,o,i),isEmptyValue(t)||rule_default.type(e,t,n,o,i)}r(o)},regexp_default=regexp4;init_globals();var required3=function(e,t,r,n,i){var o=[],a=Array.isArray(t)?\"array\":_typeof(t);rule_default.required(e,t,n,o,i,a),r(o)},required_default2=required3;init_globals();var string=function(e,t,r,n,i){var o=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(isEmptyValue(t,\"string\")&&!e.required)return r();rule_default.required(e,t,n,o,i,\"string\"),isEmptyValue(t,\"string\")||(rule_default.type(e,t,n,o,i),rule_default.range(e,t,n,o,i),rule_default.pattern(e,t,n,o,i),!0===e.whitespace&&rule_default.whitespace(e,t,n,o,i))}r(o)},string_default=string;init_globals();var type3=function(e,t,r,n,i){var o=e.type,a=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(isEmptyValue(t,o)&&!e.required)return r();rule_default.required(e,t,n,a,i,o),isEmptyValue(t,o)||rule_default.type(e,t,n,a,i)}r(a)},type_default2=type3,validator_default={string:string_default,method:method_default,number:number_default,boolean:boolean_default,regexp:regexp_default,integer:integer_default,float:float_default,array:array_default,object:object_default,enum:enum_default2,pattern:pattern_default2,date:date_default,url:type_default2,hex:type_default2,email:type_default2,required:required_default2,any:any_default};init_globals();var Schema=function(){function e(t){_classCallCheck(this,e),_defineProperty(this,\"rules\",null),_defineProperty(this,\"_messages\",messages),this.define(t)}return _createClass(e,[{key:\"define\",value:function(e){var t=this;if(!e)throw new Error(\"Cannot configure a schema with no rules\");if(\"object\"!==_typeof(e)||Array.isArray(e))throw new Error(\"Rules must be an object\");this.rules={},Object.keys(e).forEach((function(r){var n=e[r];t.rules[r]=Array.isArray(n)?n:[n]}))}},{key:\"messages\",value:function(e){return e&&(this._messages=deepMerge(newMessages(),e)),this._messages}},{key:\"validate\",value:function(t){var r=this,n=t,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){};if(\"function\"==typeof i&&(o=i,i={}),!this.rules||0===Object.keys(this.rules).length)return o&&o(null,n),Promise.resolve(n);if(i.messages){var a=this.messages();a===messages&&(a=newMessages()),deepMerge(a,i.messages),i.messages=a}else i.messages=this.messages();var s={};(i.keys||Object.keys(this.rules)).forEach((function(e){var i=r.rules[e],o=n[e];i.forEach((function(i){var a=i;\"function\"==typeof a.transform&&(n===t&&(n=_objectSpread2({},n)),null!=(o=n[e]=a.transform(o))&&(a.type=a.type||(Array.isArray(o)?\"array\":_typeof(o)))),(a=\"function\"==typeof a?{validator:a}:_objectSpread2({},a)).validator=r.getValidationMethod(a),a.validator&&(a.field=e,a.fullField=a.fullField||e,a.type=r.getType(a),s[e]=s[e]||[],s[e].push({rule:a,value:o,source:n,field:e}))}))}));var l={};return asyncMap(s,i,(function(t,r){var o,a=t.rule,s=!(\"object\"!==a.type&&\"array\"!==a.type||\"object\"!==_typeof(a.fields)&&\"object\"!==_typeof(a.defaultField));function u(e,t){return _objectSpread2(_objectSpread2({},t),{},{fullField:\"\".concat(a.fullField,\".\").concat(e),fullFields:a.fullFields?[].concat(_toConsumableArray(a.fullFields),[e]):[e]})}function c(){var o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],c=Array.isArray(o)?o:[o];!i.suppressWarning&&c.length&&e.warning(\"async-validator:\",c),c.length&&void 0!==a.message&&(c=[].concat(a.message));var d=c.map(complementError(a,n));if(i.first&&d.length)return l[a.field]=1,r(d);if(s){if(a.required&&!t.value)return void 0!==a.message?d=[].concat(a.message).map(complementError(a,n)):i.error&&(d=[i.error(a,format(i.messages.required,a.field))]),r(d);var h={};a.defaultField&&Object.keys(t.value).map((function(e){h[e]=a.defaultField})),h=_objectSpread2(_objectSpread2({},h),t.rule.fields);var f={};Object.keys(h).forEach((function(e){var t=h[e],r=Array.isArray(t)?t:[t];f[e]=r.map(u.bind(null,e))}));var p=new e(f);p.messages(i.messages),t.rule.options&&(t.rule.options.messages=i.messages,t.rule.options.error=i.error),p.validate(t.value,t.rule.options||i,(function(e){var t=[];d&&d.length&&t.push.apply(t,_toConsumableArray(d)),e&&e.length&&t.push.apply(t,_toConsumableArray(e)),r(t.length?t:null)}))}else r(d)}if(s=s&&(a.required||!a.required&&t.value),a.field=t.field,a.asyncValidator)o=a.asyncValidator(a,t.value,c,t.source,i);else if(a.validator){try{o=a.validator(a,t.value,c,t.source,i)}catch(f){var d,h;null===(d=(h=import_console_browserify.default).error)||void 0===d||d.call(h,f),i.suppressValidatorError||setTimeout((function(){throw f}),0),c(f.message)}!0===o?c():!1===o?c(\"function\"==typeof a.message?a.message(a.fullField||a.field):a.message||\"\".concat(a.fullField||a.field,\" fails\")):o instanceof Array?c(o):o instanceof Error&&c(o.message)}o&&o.then&&o.then((function(){return c()}),(function(e){return c(e)}))}),(function(e){!function(e){for(var t,r,i=[],a={},s=0;s__left_angle_mark_e.length;s++)t=e[s],r=void 0,Array.isArray(t)?i=(r=i).concat.apply(r,_toConsumableArray(t)):i.push(t);i.length?(a=convertFieldsError(i),o(i,a)):o(null,n)}(e)}),n)}},{key:\"getType\",value:function(e){if(void 0===e.type&&e.pattern instanceof RegExp&&(e.type=\"pattern\"),\"function\"!=typeof e.validator&&e.type&&!validator_default.hasOwnProperty(e.type))throw new Error(format(\"Unknown rule type %s\",e.type));return e.type||\"string\"}},{key:\"getValidationMethod\",value:function(e){if(\"function\"==typeof e.validator)return e.validator;var t=Object.keys(e),r=t.indexOf(\"message\");return-1!==r&&t.splice(r,1),1===t.length&&\"required\"===t[0]?validator_default.required:validator_default[this.getType(e)]||void 0}}]),e}();_defineProperty(Schema,\"register\",(function(e,t){if(\"function\"!=typeof t)throw new Error(\"Cannot register a validator by type, validator is not a function\");validator_default[e]=t})),_defineProperty(Schema,\"warning\",warning5),_defineProperty(Schema,\"messages\",messages),_defineProperty(Schema,\"validators\",validator_default);var es_default5=Schema,React122=__toESM(require_react());init_globals();var typeTemplate2=\"'${name}' is not a valid ${type}\",defaultValidateMessages={default:\"Validation error on field '${name}'\",required:\"'${name}' is required\",enum:\"'${name}' must be one of [${enum}]\",whitespace:\"'${name}' cannot be empty\",date:{format:\"'${name}' is invalid for format date\",parse:\"'${name}' could not be parsed as date\",invalid:\"'${name}' is invalid date\"},types:{string:typeTemplate2,method:typeTemplate2,array:typeTemplate2,object:typeTemplate2,number:typeTemplate2,date:typeTemplate2,boolean:typeTemplate2,integer:typeTemplate2,float:typeTemplate2,regexp:typeTemplate2,email:typeTemplate2,url:typeTemplate2,hex:typeTemplate2},string:{len:\"'${name}' must be exactly ${len} characters\",min:\"'${name}' must be at least ${min} characters\",max:\"'${name}' cannot be longer than ${max} characters\",range:\"'${name}' must be between ${min} and ${max} characters\"},number:{len:\"'${name}' must equal ${len}\",min:\"'${name}' cannot be less than ${min}\",max:\"'${name}' cannot be greater than ${max}\",range:\"'${name}' must be between ${min} and ${max}\"},array:{len:\"'${name}' must be exactly ${len} in length\",min:\"'${name}' cannot be less than ${min} in length\",max:\"'${name}' cannot be greater than ${max} in length\",range:\"'${name}' must be between ${min} and ${max} in length\"},pattern:{mismatch:\"'${name}' does not match pattern ${pattern}\"}},AsyncValidator=es_default5;function replaceMessage(e,t){return e.replace(/\\\\?\\$\\{\\w+\\}/g,(function(e){if(e.startsWith(\"\\\\\"))return e.slice(1);var r=e.slice(2,-1);return t[r]}))}var CODE_LOGIC_ERROR=\"CODE_LOGIC_ERROR\";function validateRule(e,t,r,n,i){return _validateRule.apply(this,arguments)}function _validateRule(){return _validateRule=_asyncToGenerator(_regeneratorRuntime().mark((function e(t,r,n,i,o){var a,s,l,u,c,d,h,f,p;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return delete(a=_objectSpread2({},n)).ruleIndex,AsyncValidator.warning=function(){},a.validator&&(s=a.validator,a.validator=function(){try{return s.apply(void 0,arguments)}catch(e){return import_console_browserify.default.error(e),Promise.reject(CODE_LOGIC_ERROR)}}),l=null,a&&\"array\"===a.type&&a.defaultField&&(l=a.defaultField,delete a.defaultField),u=new AsyncValidator(_defineProperty({},t,[a])),c=merge(defaultValidateMessages,i.validateMessages),u.messages(c),d=[],e.prev=10,e.next=13,Promise.resolve(u.validate(_defineProperty({},t,r),_objectSpread2({},i)));case 13:e.next=18;break;case 15:e.prev=15,e.t0=e.catch(10),e.t0.errors&&(d=e.t0.errors.map((function(e,t){var r=e.message,n=r===CODE_LOGIC_ERROR?c.default:r;return React122.isValidElement(n)?React122.cloneElement(n,{key:\"error_\".concat(t)}):n})));case 18:if(d.length||!l){e.next=23;break}return e.next=21,Promise.all(r.map((function(e,r){return validateRule(\"\".concat(t,\".\").concat(r),e,l,i,o)})));case 21:return h=e.sent,e.abrupt(\"return\",h.reduce((function(e,t){return[].concat(_toConsumableArray(e),_toConsumableArray(t))}),[]));case 23:return f=_objectSpread2(_objectSpread2({},n),{},{name:t,enum:(n.enum||[]).join(\", \")},o),p=d.map((function(e){return\"string\"==typeof e?replaceMessage(e,f):e})),e.abrupt(\"return\",p);case 26:case\"end\":return e.stop()}}),e,null,[[10,15]])}))),_validateRule.apply(this,arguments)}function validateRules(e,t,r,n,i,o){var a,s=e.join(\".\"),l=r.map((function(e,t){var r=e.validator,n=_objectSpread2(_objectSpread2({},e),{},{ruleIndex:t});return r&&(n.validator=function(e,t,n){var i=!1,o=r(e,t,(function(){for(var e=arguments.length,t=new Array(e),r=0;r__left_angle_mark_e;r++)t[r]=arguments[r];Promise.resolve().then((function(){warning_default(!i,\"Your validator function has already return a promise. `callback` will be ignored.\"),i||n.apply(void 0,t)}))}));i=o&&\"function\"==typeof o.then&&\"function\"==typeof o.catch,warning_default(i,\"`callback` is deprecated. Please return a promise instead.\"),i&&o.then((function(){n()})).catch((function(e){n(e||\" \")}))}),n})).sort((function(e,t){var r=e.warningOnly,n=e.ruleIndex,i=t.warningOnly,o=t.ruleIndex;return!!r==!!i?n-o:r?1:-1}));if(!0===i)a=new Promise(function(){var e=_asyncToGenerator(_regeneratorRuntime().mark((function e(r,i){var a,u,c;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:a=0;case 1:if(!(a__left_angle_mark_l.length)){e.next=12;break}return u=l[a],e.next=5,validateRule(s,t,u,n,o);case 5:if(!(c=e.sent).length){e.next=9;break}return i([{errors:c,rule:u}]),e.abrupt(\"return\");case 9:a+=1,e.next=1;break;case 12:r([]);case 13:case\"end\":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}());else{var u=l.map((function(e){return validateRule(s,t,e,n,o).then((function(t){return{errors:t,rule:e}}))}));a=(i?finishOnFirstFailed(u):finishOnAllFailed(u)).then((function(e){return Promise.reject(e)}))}return a.catch((function(e){return e})),a}function finishOnAllFailed(e){return _finishOnAllFailed.apply(this,arguments)}function _finishOnAllFailed(){return(_finishOnAllFailed=_asyncToGenerator(_regeneratorRuntime().mark((function e(t){return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt(\"return\",Promise.all(t).then((function(e){var t;return(t=[]).concat.apply(t,_toConsumableArray(e))})));case 1:case\"end\":return e.stop()}}),e)})))).apply(this,arguments)}function finishOnFirstFailed(e){return _finishOnFirstFailed.apply(this,arguments)}function _finishOnFirstFailed(){return(_finishOnFirstFailed=_asyncToGenerator(_regeneratorRuntime().mark((function e(t){var r;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=0,e.abrupt(\"return\",new Promise((function(e){t.forEach((function(n){n.then((function(n){n.errors.length&&e([n]),(r+=1)===t.length&&e([])}))}))})));case 2:case\"end\":return e.stop()}}),e)})))).apply(this,arguments)}function getNamePath(e){return toArray2(e)}function cloneByNamePathList(e,t){var r={};return t.forEach((function(t){var n=get(e,t);r=set(r,t,n)})),r}function containsNamePath(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return e&&e.some((function(e){return matchNamePath(t,e,r)}))}function matchNamePath(e,t){return!(!e||!t)&&!(!(arguments.length>2&&void 0!==arguments[2]&&arguments[2])&&e.length!==t.length)&&t.every((function(t,r){return e[r]===t}))}function isSimilar(e,t){if(e===t)return!0;if(!e&&t||e&&!t)return!1;if(!e||!t||\"object\"!==_typeof(e)||\"object\"!==_typeof(t))return!1;var r=Object.keys(e),n=Object.keys(t);return _toConsumableArray(new Set([].concat(r,n))).every((function(r){var n=e[r],i=t[r];return\"function\"==typeof n&&\"function\"==typeof i||n===i}))}function defaultGetValueFromEvent(e){var t=arguments.length__left_angle_mark_=1?void 0:arguments[1];return t&&t.target&&\"object\"===_typeof(t.target)&&e in t.target?t.target[e]:t}function move(e,t,r){var n=e.length;if(t__left_angle_mark_0||t>=n||r__left_angle_mark_0||r>=n)return e;var i=e[t],o=t-r;return o>0?[].concat(_toConsumableArray(e.slice(0,r)),[i],_toConsumableArray(e.slice(r,t)),_toConsumableArray(e.slice(t+1,n))):o__left_angle_mark_0?[].concat(_toConsumableArray(e.slice(0,t)),_toConsumableArray(e.slice(t+1,r+1)),[i],_toConsumableArray(e.slice(r+1,n))):e}init_globals();var _excluded10=[\"name\"],EMPTY_ERRORS=[];function requireUpdate(e,t,r,n,i,o){return\"function\"==typeof e?e(t,r,\"source\"in o?{source:o.source}:{}):n!==i}var Field=function(e){_inherits(r,e);var t=_createSuper(r);function r(e){var n;return _classCallCheck(this,r),_defineProperty(_assertThisInitialized(n=t.call(this,e)),\"state\",{resetCount:0}),_defineProperty(_assertThisInitialized(n),\"cancelRegisterFunc\",null),_defineProperty(_assertThisInitialized(n),\"mounted\",!1),_defineProperty(_assertThisInitialized(n),\"touched\",!1),_defineProperty(_assertThisInitialized(n),\"dirty\",!1),_defineProperty(_assertThisInitialized(n),\"validatePromise\",void 0),_defineProperty(_assertThisInitialized(n),\"prevValidating\",void 0),_defineProperty(_assertThisInitialized(n),\"errors\",EMPTY_ERRORS),_defineProperty(_assertThisInitialized(n),\"warnings\",EMPTY_ERRORS),_defineProperty(_assertThisInitialized(n),\"cancelRegister\",(function(){var e=n.props,t=e.preserve,r=e.isListField,i=e.name;n.cancelRegisterFunc&&n.cancelRegisterFunc(r,t,getNamePath(i)),n.cancelRegisterFunc=null})),_defineProperty(_assertThisInitialized(n),\"getNamePath\",(function(){var e=n.props,t=e.name,r=e.fieldContext.prefixName;return void 0!==t?[].concat(_toConsumableArray(void 0===r?[]:r),_toConsumableArray(t)):[]})),_defineProperty(_assertThisInitialized(n),\"getRules\",(function(){var e=n.props,t=e.rules,r=void 0===t?[]:t,i=e.fieldContext;return r.map((function(e){return\"function\"==typeof e?e(i):e}))})),_defineProperty(_assertThisInitialized(n),\"refresh\",(function(){n.mounted&&n.setState((function(e){return{resetCount:e.resetCount+1}}))})),_defineProperty(_assertThisInitialized(n),\"metaCache\",null),_defineProperty(_assertThisInitialized(n),\"triggerMetaEvent\",(function(e){var t=n.props.onMetaChange;if(t){var r=_objectSpread2(_objectSpread2({},n.getMeta()),{},{destroy:e});isEqual_default(n.metaCache,r)||t(r),n.metaCache=r}else n.metaCache=null})),_defineProperty(_assertThisInitialized(n),\"onStoreChange\",(function(e,t,r){var i=n.props,o=i.shouldUpdate,a=i.dependencies,s=void 0===a?[]:a,l=i.onReset,u=r.store,c=n.getNamePath(),d=n.getValue(e),h=n.getValue(u),f=t&&containsNamePath(t,c);switch(\"valueUpdate\"!==r.type||\"external\"!==r.source||isEqual_default(d,h)||(n.touched=!0,n.dirty=!0,n.validatePromise=null,n.errors=EMPTY_ERRORS,n.warnings=EMPTY_ERRORS,n.triggerMetaEvent()),r.type){case\"reset\":if(!t||f)return n.touched=!1,n.dirty=!1,n.validatePromise=void 0,n.errors=EMPTY_ERRORS,n.warnings=EMPTY_ERRORS,n.triggerMetaEvent(),null==l||l(),void n.refresh();break;case\"remove\":if(o&&requireUpdate(o,e,u,d,h,r))return void n.reRender();break;case\"setField\":var p=r.data;if(f)return\"touched\"in p&&(n.touched=p.touched),\"validating\"in p&&!(\"originRCField\"in p)&&(n.validatePromise=p.validating?Promise.resolve([]):null),\"errors\"in p&&(n.errors=p.errors||EMPTY_ERRORS),\"warnings\"in p&&(n.warnings=p.warnings||EMPTY_ERRORS),n.dirty=!0,n.triggerMetaEvent(),void n.reRender();if(\"value\"in p&&containsNamePath(t,c,!0))return void n.reRender();if(o&&!c.length&&requireUpdate(o,e,u,d,h,r))return void n.reRender();break;case\"dependenciesUpdate\":if(s.map(getNamePath).some((function(e){return containsNamePath(r.relatedFields,e)})))return void n.reRender();break;default:if(f||(!s.length||c.length||o)&&requireUpdate(o,e,u,d,h,r))return void n.reRender()}!0===o&&n.reRender()})),_defineProperty(_assertThisInitialized(n),\"validateRules\",(function(e){var t=n.getNamePath(),r=n.getValue(),i=e||{},o=i.triggerName,a=i.validateOnly,s=void 0!==a&&a,l=Promise.resolve().then(_asyncToGenerator(_regeneratorRuntime().mark((function i(){var a,s,u,c,d,h,f;return _regeneratorRuntime().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:if(n.mounted){i.next=2;break}return i.abrupt(\"return\",[]);case 2:if(a=n.props,s=a.validateFirst,u=void 0!==s&&s,c=a.messageVariables,d=a.validateDebounce,h=n.getRules(),o&&(h=h.filter((function(e){return e})).filter((function(e){var t=e.validateTrigger;return!t||toArray2(t).includes(o)}))),!d||!o){i.next=10;break}return i.next=8,new Promise((function(e){setTimeout(e,d)}));case 8:if(n.validatePromise===l){i.next=10;break}return i.abrupt(\"return\",[]);case 10:return(f=validateRules(t,r,h,e,u,c)).catch((function(e){return e})).then((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:EMPTY_ERRORS;if(n.validatePromise===l){var t;n.validatePromise=null;var r=[],i=[];null===(t=e.forEach)||void 0===t||t.call(e,(function(e){var t=e.rule.warningOnly,n=e.errors,o=void 0===n?EMPTY_ERRORS:n;t?i.push.apply(i,_toConsumableArray(o)):r.push.apply(r,_toConsumableArray(o))})),n.errors=r,n.warnings=i,n.triggerMetaEvent(),n.reRender()}})),i.abrupt(\"return\",f);case 13:case\"end\":return i.stop()}}),i)}))));return s||(n.validatePromise=l,n.dirty=!0,n.errors=EMPTY_ERRORS,n.warnings=EMPTY_ERRORS,n.triggerMetaEvent(),n.reRender()),l})),_defineProperty(_assertThisInitialized(n),\"isFieldValidating\",(function(){return!!n.validatePromise})),_defineProperty(_assertThisInitialized(n),\"isFieldTouched\",(function(){return n.touched})),_defineProperty(_assertThisInitialized(n),\"isFieldDirty\",(function(){return!(!n.dirty&&void 0===n.props.initialValue)||void 0!==(0,n.props.fieldContext.getInternalHooks(HOOK_MARK).getInitialValue)(n.getNamePath())})),_defineProperty(_assertThisInitialized(n),\"getErrors\",(function(){return n.errors})),_defineProperty(_assertThisInitialized(n),\"getWarnings\",(function(){return n.warnings})),_defineProperty(_assertThisInitialized(n),\"isListField\",(function(){return n.props.isListField})),_defineProperty(_assertThisInitialized(n),\"isList\",(function(){return n.props.isList})),_defineProperty(_assertThisInitialized(n),\"isPreserve\",(function(){return n.props.preserve})),_defineProperty(_assertThisInitialized(n),\"getMeta\",(function(){return n.prevValidating=n.isFieldValidating(),{touched:n.isFieldTouched(),validating:n.prevValidating,errors:n.errors,warnings:n.warnings,name:n.getNamePath(),validated:null===n.validatePromise}})),_defineProperty(_assertThisInitialized(n),\"getOnlyChild\",(function(e){if(\"function\"==typeof e){var t=n.getMeta();return _objectSpread2(_objectSpread2({},n.getOnlyChild(e(n.getControlled(),t,n.props.fieldContext))),{},{isFunction:!0})}var r=toArray(e);return 1===r.length&&React123.isValidElement(r[0])?{child:r[0],isFunction:!1}:{child:r,isFunction:!1}})),_defineProperty(_assertThisInitialized(n),\"getValue\",(function(e){var t=n.props.fieldContext.getFieldsValue,r=n.getNamePath();return get(e||t(!0),r)})),_defineProperty(_assertThisInitialized(n),\"getControlled\",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=n.props,r=t.name,i=t.trigger,o=t.validateTrigger,a=t.getValueFromEvent,s=t.normalize,l=t.valuePropName,u=t.getValueProps,c=t.fieldContext,d=void 0!==o?o:c.validateTrigger,h=n.getNamePath(),f=c.getInternalHooks,p=c.getFieldsValue,m=f(HOOK_MARK).dispatch,g=n.getValue(),_=u||function(e){return _defineProperty({},l,e)},b=e[i],y=void 0!==r?_(g):{};y&&Object.keys(y).forEach((function(e){warning_default(\"function\"!=typeof y[e],\"It's not recommended to generate dynamic function prop by `getValueProps`. Please pass it to child component directly (prop: \".concat(e,\")\"))}));var v=_objectSpread2(_objectSpread2({},e),y);return v[i]=function(){var e;n.touched=!0,n.dirty=!0,n.triggerMetaEvent();for(var t=arguments.length,r=new Array(t),i=0;i__left_angle_mark_t;i++)r[i]=arguments[i];e=a?a.apply(void 0,r):defaultGetValueFromEvent.apply(void 0,[l].concat(r)),s&&(e=s(e,g,p(!0))),m({type:\"updateValue\",namePath:h,value:e}),b&&b.apply(void 0,r)},toArray2(d||[]).forEach((function(e){var t=v[e];v[e]=function(){t&&t.apply(void 0,arguments);var r=n.props.rules;r&&r.length&&m({type:\"validateField\",namePath:h,triggerName:e})}})),v})),e.fieldContext&&(0,(0,e.fieldContext.getInternalHooks)(HOOK_MARK).initEntityValue)(_assertThisInitialized(n)),n}return _createClass(r,[{key:\"componentDidMount\",value:function(){var e=this.props,t=e.shouldUpdate,r=e.fieldContext;if(this.mounted=!0,r){var n=(0,r.getInternalHooks)(HOOK_MARK).registerField;this.cancelRegisterFunc=n(this)}!0===t&&this.reRender()}},{key:\"componentWillUnmount\",value:function(){this.cancelRegister(),this.triggerMetaEvent(!0),this.mounted=!1}},{key:\"reRender\",value:function(){this.mounted&&this.forceUpdate()}},{key:\"render\",value:function(){var e,t=this.state.resetCount,r=this.props.children,n=this.getOnlyChild(r),i=n.child;return n.isFunction?e=i:React123.isValidElement(i)?e=React123.cloneElement(i,this.getControlled(i.props)):(warning_default(!i,\"`children` of Field is not validate ReactElement.\"),e=i),React123.createElement(React123.Fragment,{key:t},e)}}]),r}(React123.Component);function WrapperField(e){var t=e.name,r=_objectWithoutProperties(e,_excluded10),n=React123.useContext(FieldContext_default),i=React123.useContext(ListContext_default),o=void 0!==t?getNamePath(t):void 0,a=\"keep\";return r.isListField||(a=\"_\".concat((o||[]).join(\"_\"))),!1===r.preserve&&r.isListField&&o.length__left_angle_mark_=1&&warning_default(!1,\"`preserve` should not apply on Form.List fields.\"),React123.createElement(Field,_extends({key:a,name:o,isListField:!!i},r,{fieldContext:n}))}_defineProperty(Field,\"contextType\",FieldContext_default),_defineProperty(Field,\"defaultProps\",{trigger:\"onChange\",valuePropName:\"value\"});var Field_default=WrapperField;init_globals();var React124=__toESM(require_react());function List(e){var t=e.name,r=e.initialValue,n=e.children,i=e.rules,o=e.validateTrigger,a=e.isListField,s=React124.useContext(FieldContext_default),l=React124.useContext(ListContext_default),u=React124.useRef({keys:[],id:0}).current,c=React124.useMemo((function(){var e=getNamePath(s.prefixName)||[];return[].concat(_toConsumableArray(e),_toConsumableArray(getNamePath(t)))}),[s.prefixName,t]),d=React124.useMemo((function(){return _objectSpread2(_objectSpread2({},s),{},{prefixName:c})}),[s,c]),h=React124.useMemo((function(){return{getKey:function(e){var t=c.length,r=e[t];return[u.keys[r],e.slice(t+1)]}}}),[c]);return\"function\"!=typeof n?(warning_default(!1,\"Form.List only accepts function as children.\"),null):React124.createElement(ListContext_default.Provider,{value:h},React124.createElement(FieldContext_default.Provider,{value:d},React124.createElement(Field_default,{name:[],shouldUpdate:function(e,t,r){return\"internal\"!==r.source&&e!==t},rules:i,validateTrigger:o,initialValue:r,isList:!0,isListField:null!=a?a:!!l},(function(e,t){var r=e.value,i=void 0===r?[]:r,o=e.onChange,a=s.getFieldValue,l=function(){return a(c||[])||[]},d={add:function(e,t){var r=l();t>=0&&t__left_angle_mark_=r.length?(u.keys=[].concat(_toConsumableArray(u.keys.slice(0,t)),[u.id],_toConsumableArray(u.keys.slice(t))),o([].concat(_toConsumableArray(r.slice(0,t)),[e],_toConsumableArray(r.slice(t))))):((t__left_angle_mark_0||t>r.length)&&warning_default(!1,\"The second parameter of the add function should be a valid positive number.\"),u.keys=[].concat(_toConsumableArray(u.keys),[u.id]),o([].concat(_toConsumableArray(r),[e]))),u.id+=1},remove:function(e){var t=l(),r=new Set(Array.isArray(e)?e:[e]);r.size__left_angle_mark_=0||(u.keys=u.keys.filter((function(e,t){return!r.has(t)})),o(t.filter((function(e,t){return!r.has(t)}))))},move:function(e,t){if(e!==t){var r=l();e__left_angle_mark_0||e>=r.length||t__left_angle_mark_0||t>=r.length||(u.keys=move(u.keys,e,t),o(move(r,e,t)))}}},h=i||[];return Array.isArray(h)||(h=[],warning_default(!1,\"Current value of '\".concat(c.join(\" > \"),\"' is not an array type.\"))),n(h.map((function(e,t){var r=u.keys[t];return void 0===r&&(u.keys[t]=u.id,r=u.keys[t],u.id+=1),{name:t,key:r,isListField:!0}})),d,t)}))))}var List_default=List;init_globals();var React125=__toESM(require_react());function allPromiseFinish(e){var t=!1,r=e.length,n=[];return e.length?new Promise((function(i,o){e.forEach((function(e,a){e.catch((function(e){return t=!0,e})).then((function(e){r-=1,n[a]=e,r>0||(t&&o(n),i(n))}))}))})):Promise.resolve([])}init_globals(),init_globals();var SPLIT2=\"__@field_split__\";function normalize(e){return e.map((function(e){return\"\".concat(_typeof(e),\":\").concat(e)})).join(SPLIT2)}var NameMap=function(){function e(){_classCallCheck(this,e),_defineProperty(this,\"kvs\",new Map)}return _createClass(e,[{key:\"set\",value:function(e,t){this.kvs.set(normalize(e),t)}},{key:\"get\",value:function(e){return this.kvs.get(normalize(e))}},{key:\"update\",value:function(e,t){var r=t(this.get(e));r?this.set(e,r):this.delete(e)}},{key:\"delete\",value:function(e){this.kvs.delete(normalize(e))}},{key:\"map\",value:function(e){return _toConsumableArray(this.kvs.entries()).map((function(t){var r=_slicedToArray(t,2),n=r[0],i=r[1],o=n.split(SPLIT2);return e({key:o.map((function(e){var t=_slicedToArray(e.match(/^([^:]*):(.*)$/),3),r=t[1],n=t[2];return\"number\"===r?Number(n):n})),value:i})}))}},{key:\"toJSON\",value:function(){var e={};return this.map((function(t){var r=t.key,n=t.value;return e[r.join(\".\")]=n,null})),e}}]),e}(),NameMap_default=NameMap,_excluded11=[\"name\"],FormStore=_createClass((function e(t){var r=this;_classCallCheck(this,e),_defineProperty(this,\"formHooked\",!1),_defineProperty(this,\"forceRootUpdate\",void 0),_defineProperty(this,\"subscribable\",!0),_defineProperty(this,\"store\",{}),_defineProperty(this,\"fieldEntities\",[]),_defineProperty(this,\"initialValues\",{}),_defineProperty(this,\"callbacks\",{}),_defineProperty(this,\"validateMessages\",null),_defineProperty(this,\"preserve\",null),_defineProperty(this,\"lastValidatePromise\",null),_defineProperty(this,\"getForm\",(function(){return{getFieldValue:r.getFieldValue,getFieldsValue:r.getFieldsValue,getFieldError:r.getFieldError,getFieldWarning:r.getFieldWarning,getFieldsError:r.getFieldsError,isFieldsTouched:r.isFieldsTouched,isFieldTouched:r.isFieldTouched,isFieldValidating:r.isFieldValidating,isFieldsValidating:r.isFieldsValidating,resetFields:r.resetFields,setFields:r.setFields,setFieldValue:r.setFieldValue,setFieldsValue:r.setFieldsValue,validateFields:r.validateFields,submit:r.submit,_init:!0,getInternalHooks:r.getInternalHooks}})),_defineProperty(this,\"getInternalHooks\",(function(e){return e===HOOK_MARK?(r.formHooked=!0,{dispatch:r.dispatch,initEntityValue:r.initEntityValue,registerField:r.registerField,useSubscribe:r.useSubscribe,setInitialValues:r.setInitialValues,destroyForm:r.destroyForm,setCallbacks:r.setCallbacks,setValidateMessages:r.setValidateMessages,getFields:r.getFields,setPreserve:r.setPreserve,getInitialValue:r.getInitialValue,registerWatch:r.registerWatch}):(warning_default(!1,\"`getInternalHooks` is internal usage. Should not call directly.\"),null)})),_defineProperty(this,\"useSubscribe\",(function(e){r.subscribable=e})),_defineProperty(this,\"prevWithoutPreserves\",null),_defineProperty(this,\"setInitialValues\",(function(e,t){if(r.initialValues=e||{},t){var n,i=merge(e,r.store);null===(n=r.prevWithoutPreserves)||void 0===n||n.map((function(t){var r=t.key;i=set(i,r,get(e,r))})),r.prevWithoutPreserves=null,r.updateStore(i)}})),_defineProperty(this,\"destroyForm\",(function(e){if(e)r.updateStore({});else{var t=new NameMap_default;r.getFieldEntities(!0).forEach((function(e){r.isMergedPreserve(e.isPreserve())||t.set(e.getNamePath(),!0)})),r.prevWithoutPreserves=t}})),_defineProperty(this,\"getInitialValue\",(function(e){var t=get(r.initialValues,e);return e.length?merge(t):t})),_defineProperty(this,\"setCallbacks\",(function(e){r.callbacks=e})),_defineProperty(this,\"setValidateMessages\",(function(e){r.validateMessages=e})),_defineProperty(this,\"setPreserve\",(function(e){r.preserve=e})),_defineProperty(this,\"watchList\",[]),_defineProperty(this,\"registerWatch\",(function(e){return r.watchList.push(e),function(){r.watchList=r.watchList.filter((function(t){return t!==e}))}})),_defineProperty(this,\"notifyWatch\",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(r.watchList.length){var t=r.getFieldsValue(),n=r.getFieldsValue(!0);r.watchList.forEach((function(r){r(t,n,e)}))}})),_defineProperty(this,\"timeoutId\",null),_defineProperty(this,\"warningUnhooked\",(function(){r.timeoutId||\"undefined\"==typeof window||(r.timeoutId=setTimeout((function(){r.timeoutId=null,r.formHooked||warning_default(!1,\"Instance created by `useForm` is not connected to any Form element. Forget to pass `form` prop?\")})))})),_defineProperty(this,\"updateStore\",(function(e){r.store=e})),_defineProperty(this,\"getFieldEntities\",(function(){return arguments.length>0&&void 0!==arguments[0]&&arguments[0]?r.fieldEntities.filter((function(e){return e.getNamePath().length})):r.fieldEntities})),_defineProperty(this,\"getFieldsMap\",(function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=new NameMap_default;return r.getFieldEntities(e).forEach((function(e){var r=e.getNamePath();t.set(r,e)})),t})),_defineProperty(this,\"getFieldEntitiesForNamePathList\",(function(e){if(!e)return r.getFieldEntities(!0);var t=r.getFieldsMap(!0);return e.map((function(e){var r=getNamePath(e);return t.get(r)||{INVALIDATE_NAME_PATH:getNamePath(e)}}))})),_defineProperty(this,\"getFieldsValue\",(function(e,t){var n,i,o;if(r.warningUnhooked(),!0===e||Array.isArray(e)?(n=e,i=t):e&&\"object\"===_typeof(e)&&(o=e.strict,i=e.filter),!0===n&&!i)return r.store;var a=r.getFieldEntitiesForNamePathList(Array.isArray(n)?n:null),s=[];return a.forEach((function(e){var t,r,a,l,u=\"INVALIDATE_NAME_PATH\"in e?e.INVALIDATE_NAME_PATH:e.getNamePath();if(o){if(null!==(a=(l=e).isList)&&void 0!==a&&a.call(l))return}else if(!n&&null!==(t=(r=e).isListField)&&void 0!==t&&t.call(r))return;if(i){var c=\"getMeta\"in e?e.getMeta():null;i(c)&&s.push(u)}else s.push(u)})),cloneByNamePathList(r.store,s.map(getNamePath))})),_defineProperty(this,\"getFieldValue\",(function(e){r.warningUnhooked();var t=getNamePath(e);return get(r.store,t)})),_defineProperty(this,\"getFieldsError\",(function(e){return r.warningUnhooked(),r.getFieldEntitiesForNamePathList(e).map((function(t,r){return t&&!(\"INVALIDATE_NAME_PATH\"in t)?{name:t.getNamePath(),errors:t.getErrors(),warnings:t.getWarnings()}:{name:getNamePath(e[r]),errors:[],warnings:[]}}))})),_defineProperty(this,\"getFieldError\",(function(e){r.warningUnhooked();var t=getNamePath(e);return r.getFieldsError([t])[0].errors})),_defineProperty(this,\"getFieldWarning\",(function(e){r.warningUnhooked();var t=getNamePath(e);return r.getFieldsError([t])[0].warnings})),_defineProperty(this,\"isFieldsTouched\",(function(){r.warningUnhooked();for(var e=arguments.length,t=new Array(e),n=0;n__left_angle_mark_e;n++)t[n]=arguments[n];var i,o=t[0],a=t[1],s=!1;0===t.length?i=null:1===t.length?Array.isArray(o)?(i=o.map(getNamePath),s=!1):(i=null,s=o):(i=o.map(getNamePath),s=a);var l=r.getFieldEntities(!0),u=function(e){return e.isFieldTouched()};if(!i)return s?l.every((function(e){return u(e)||e.isList()})):l.some(u);var c=new NameMap_default;i.forEach((function(e){c.set(e,[])})),l.forEach((function(e){var t=e.getNamePath();i.forEach((function(r){r.every((function(e,r){return t[r]===e}))&&c.update(r,(function(t){return[].concat(_toConsumableArray(t),[e])}))}))}));var d=function(e){return e.some(u)},h=c.map((function(e){return e.value}));return s?h.every(d):h.some(d)})),_defineProperty(this,\"isFieldTouched\",(function(e){return r.warningUnhooked(),r.isFieldsTouched([e])})),_defineProperty(this,\"isFieldsValidating\",(function(e){r.warningUnhooked();var t=r.getFieldEntities();if(!e)return t.some((function(e){return e.isFieldValidating()}));var n=e.map(getNamePath);return t.some((function(e){var t=e.getNamePath();return containsNamePath(n,t)&&e.isFieldValidating()}))})),_defineProperty(this,\"isFieldValidating\",(function(e){return r.warningUnhooked(),r.isFieldsValidating([e])})),_defineProperty(this,\"resetWithFieldInitialValue\",(function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=new NameMap_default,i=r.getFieldEntities(!0);i.forEach((function(e){var t=e.props.initialValue,r=e.getNamePath();if(void 0!==t){var i=n.get(r)||new Set;i.add({entity:e,value:t}),n.set(r,i)}})),t.entities?e=t.entities:t.namePathList?(e=[],t.namePathList.forEach((function(t){var r,i=n.get(t);i&&(r=e).push.apply(r,_toConsumableArray(_toConsumableArray(i).map((function(e){return e.entity}))))}))):e=i,e.forEach((function(e){if(void 0!==e.props.initialValue){var i=e.getNamePath();if(void 0!==r.getInitialValue(i))warning_default(!1,\"Form already set 'initialValues' with path '\".concat(i.join(\".\"),\"'. Field can not overwrite it.\"));else{var o=n.get(i);if(o&&o.size>1)warning_default(!1,\"Multiple Field with path '\".concat(i.join(\".\"),\"' set 'initialValue'. Can not decide which one to pick.\"));else if(o){var a=r.getFieldValue(i);e.isListField()||t.skipExist&&void 0!==a||r.updateStore(set(r.store,i,_toConsumableArray(o)[0].value))}}}}))})),_defineProperty(this,\"resetFields\",(function(e){r.warningUnhooked();var t=r.store;if(!e)return r.updateStore(merge(r.initialValues)),r.resetWithFieldInitialValue(),r.notifyObservers(t,null,{type:\"reset\"}),void r.notifyWatch();var n=e.map(getNamePath);n.forEach((function(e){var t=r.getInitialValue(e);r.updateStore(set(r.store,e,t))})),r.resetWithFieldInitialValue({namePathList:n}),r.notifyObservers(t,n,{type:\"reset\"}),r.notifyWatch(n)})),_defineProperty(this,\"setFields\",(function(e){r.warningUnhooked();var t=r.store,n=[];e.forEach((function(e){var i=e.name,o=_objectWithoutProperties(e,_excluded11),a=getNamePath(i);n.push(a),\"value\"in o&&r.updateStore(set(r.store,a,o.value)),r.notifyObservers(t,[a],{type:\"setField\",data:e})})),r.notifyWatch(n)})),_defineProperty(this,\"getFields\",(function(){return r.getFieldEntities(!0).map((function(e){var t=e.getNamePath(),n=_objectSpread2(_objectSpread2({},e.getMeta()),{},{name:t,value:r.getFieldValue(t)});return Object.defineProperty(n,\"originRCField\",{value:!0}),n}))})),_defineProperty(this,\"initEntityValue\",(function(e){var t=e.props.initialValue;if(void 0!==t){var n=e.getNamePath();void 0===get(r.store,n)&&r.updateStore(set(r.store,n,t))}})),_defineProperty(this,\"isMergedPreserve\",(function(e){var t=void 0!==e?e:r.preserve;return null==t||t})),_defineProperty(this,\"registerField\",(function(e){r.fieldEntities.push(e);var t=e.getNamePath();if(r.notifyWatch([t]),void 0!==e.props.initialValue){var n=r.store;r.resetWithFieldInitialValue({entities:[e],skipExist:!0}),r.notifyObservers(n,[e.getNamePath()],{type:\"valueUpdate\",source:\"internal\"})}return function(n,i){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if(r.fieldEntities=r.fieldEntities.filter((function(t){return t!==e})),!r.isMergedPreserve(i)&&(!n||o.length>1)){var a=n?void 0:r.getInitialValue(t);if(t.length&&r.getFieldValue(t)!==a&&r.fieldEntities.every((function(e){return!matchNamePath(e.getNamePath(),t)}))){var s=r.store;r.updateStore(set(s,t,a,!0)),r.notifyObservers(s,[t],{type:\"remove\"}),r.triggerDependenciesUpdate(s,t)}}r.notifyWatch([t])}})),_defineProperty(this,\"dispatch\",(function(e){switch(e.type){case\"updateValue\":var t=e.namePath,n=e.value;r.updateValue(t,n);break;case\"validateField\":var i=e.namePath,o=e.triggerName;r.validateFields([i],{triggerName:o})}})),_defineProperty(this,\"notifyObservers\",(function(e,t,n){if(r.subscribable){var i=_objectSpread2(_objectSpread2({},n),{},{store:r.getFieldsValue(!0)});r.getFieldEntities().forEach((function(r){(0,r.onStoreChange)(e,t,i)}))}else r.forceRootUpdate()})),_defineProperty(this,\"triggerDependenciesUpdate\",(function(e,t){var n=r.getDependencyChildrenFields(t);return n.length&&r.validateFields(n),r.notifyObservers(e,n,{type:\"dependenciesUpdate\",relatedFields:[t].concat(_toConsumableArray(n))}),n})),_defineProperty(this,\"updateValue\",(function(e,t){var n=getNamePath(e),i=r.store;r.updateStore(set(r.store,n,t)),r.notifyObservers(i,[n],{type:\"valueUpdate\",source:\"internal\"}),r.notifyWatch([n]);var o=r.triggerDependenciesUpdate(i,n),a=r.callbacks.onValuesChange;a&&a(cloneByNamePathList(r.store,[n]),r.getFieldsValue()),r.triggerOnFieldsChange([n].concat(_toConsumableArray(o)))})),_defineProperty(this,\"setFieldsValue\",(function(e){r.warningUnhooked();var t=r.store;if(e){var n=merge(r.store,e);r.updateStore(n)}r.notifyObservers(t,null,{type:\"valueUpdate\",source:\"external\"}),r.notifyWatch()})),_defineProperty(this,\"setFieldValue\",(function(e,t){r.setFields([{name:e,value:t}])})),_defineProperty(this,\"getDependencyChildrenFields\",(function(e){var t=new Set,n=[],i=new NameMap_default;return r.getFieldEntities().forEach((function(e){(e.props.dependencies||[]).forEach((function(t){var r=getNamePath(t);i.update(r,(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Set;return t.add(e),t}))}))})),function e(r){(i.get(r)||new Set).forEach((function(r){if(!t.has(r)){t.add(r);var i=r.getNamePath();r.isFieldDirty()&&i.length&&(n.push(i),e(i))}}))}(e),n})),_defineProperty(this,\"triggerOnFieldsChange\",(function(e,t){var n=r.callbacks.onFieldsChange;if(n){var i=r.getFields();if(t){var o=new NameMap_default;t.forEach((function(e){var t=e.name,r=e.errors;o.set(t,r)})),i.forEach((function(e){e.errors=o.get(e.name)||e.errors}))}var a=i.filter((function(t){var r=t.name;return containsNamePath(e,r)}));a.length&&n(a,i)}})),_defineProperty(this,\"validateFields\",(function(e,t){var n,i;r.warningUnhooked(),Array.isArray(e)||\"string\"==typeof e||\"string\"==typeof t?(n=e,i=t):i=e;var o=!!n,a=o?n.map(getNamePath):[],s=[],l=String(Date.now()),u=new Set,c=i||{},d=c.recursive,h=c.dirty;r.getFieldEntities(!0).forEach((function(e){if(o||a.push(e.getNamePath()),e.props.rules&&e.props.rules.length&&(!h||e.isFieldDirty())){var t=e.getNamePath();if(u.add(t.join(l)),!o||containsNamePath(a,t,d)){var n=e.validateRules(_objectSpread2({validateMessages:_objectSpread2(_objectSpread2({},defaultValidateMessages),r.validateMessages)},i));s.push(n.then((function(){return{name:t,errors:[],warnings:[]}})).catch((function(e){var r,n=[],i=[];return null===(r=e.forEach)||void 0===r||r.call(e,(function(e){var t=e.rule.warningOnly,r=e.errors;t?i.push.apply(i,_toConsumableArray(r)):n.push.apply(n,_toConsumableArray(r))})),n.length?Promise.reject({name:t,errors:n,warnings:i}):{name:t,errors:n,warnings:i}})))}}}));var f=allPromiseFinish(s);r.lastValidatePromise=f,f.catch((function(e){return e})).then((function(e){var t=e.map((function(e){return e.name}));r.notifyObservers(r.store,t,{type:\"validateFinish\"}),r.triggerOnFieldsChange(t,e)}));var p=f.then((function(){return r.lastValidatePromise===f?Promise.resolve(r.getFieldsValue(a)):Promise.reject([])})).catch((function(e){var t=e.filter((function(e){return e&&e.errors.length}));return Promise.reject({values:r.getFieldsValue(a),errorFields:t,outOfDate:r.lastValidatePromise!==f})}));p.catch((function(e){return e}));var m=a.filter((function(e){return u.has(e.join(l))}));return r.triggerOnFieldsChange(m),p})),_defineProperty(this,\"submit\",(function(){r.warningUnhooked(),r.validateFields().then((function(e){var t=r.callbacks.onFinish;if(t)try{t(e)}catch(n){import_console_browserify.default.error(n)}})).catch((function(e){var t=r.callbacks.onFinishFailed;t&&t(e)}))})),this.forceRootUpdate=t}));function useForm(e){var t=React125.useRef(),r=_slicedToArray(React125.useState({}),2)[1];if(!t.current)if(e)t.current=e;else{var n=new FormStore((function(){r({})}));t.current=n.getForm()}return[t.current]}var useForm_default=useForm;init_globals();var React127=__toESM(require_react());init_globals();var React126=__toESM(require_react()),FormContext=React126.createContext({triggerFormChange:function(){},triggerFormFinish:function(){},registerForm:function(){},unregisterForm:function(){}}),FormProvider=function(e){var t=e.validateMessages,r=e.onFormChange,n=e.onFormFinish,i=e.children,o=React126.useContext(FormContext),a=React126.useRef({});return React126.createElement(FormContext.Provider,{value:_objectSpread2(_objectSpread2({},o),{},{validateMessages:_objectSpread2(_objectSpread2({},o.validateMessages),t),triggerFormChange:function(e,t){r&&r(e,{changedFields:t,forms:a.current}),o.triggerFormChange(e,t)},triggerFormFinish:function(e,t){n&&n(e,{values:t,forms:a.current}),o.triggerFormFinish(e,t)},registerForm:function(e,t){e&&(a.current=_objectSpread2(_objectSpread2({},a.current),{},_defineProperty({},e,t))),o.registerForm(e,t)},unregisterForm:function(e){var t=_objectSpread2({},a.current);delete t[e],a.current=t,o.unregisterForm(e)}})},i)},FormContext_default=FormContext,_excluded12=[\"name\",\"initialValues\",\"fields\",\"form\",\"preserve\",\"children\",\"component\",\"validateMessages\",\"validateTrigger\",\"onValuesChange\",\"onFieldsChange\",\"onFinish\",\"onFinishFailed\",\"clearOnDestroy\"],Form=function(e,t){var r=e.name,n=e.initialValues,i=e.fields,o=e.form,a=e.preserve,s=e.children,l=e.component,u=void 0===l?\"form\":l,c=e.validateMessages,d=e.validateTrigger,h=void 0===d?\"onChange\":d,f=e.onValuesChange,p=e.onFieldsChange,m=e.onFinish,g=e.onFinishFailed,_=e.clearOnDestroy,b=_objectWithoutProperties(e,_excluded12),y=React127.useRef(null),v=React127.useContext(FormContext_default),A=_slicedToArray(useForm_default(o),1)[0],w=A.getInternalHooks(HOOK_MARK),S=w.useSubscribe,E=w.setInitialValues,x=w.setCallbacks,C=w.setValidateMessages,T=w.setPreserve,R=w.destroyForm;React127.useImperativeHandle(t,(function(){return _objectSpread2(_objectSpread2({},A),{},{nativeElement:y.current})})),React127.useEffect((function(){return v.registerForm(r,A),function(){v.unregisterForm(r)}}),[v,A,r]),C(_objectSpread2(_objectSpread2({},v.validateMessages),c)),x({onValuesChange:f,onFieldsChange:function(e){if(v.triggerFormChange(r,e),p){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i__left_angle_mark_t;i++)n[i-1]=arguments[i];p.apply(void 0,[e].concat(n))}},onFinish:function(e){v.triggerFormFinish(r,e),m&&m(e)},onFinishFailed:g}),T(a);var I,k=React127.useRef(null);E(n,!k.current),k.current||(k.current=!0),React127.useEffect((function(){return function(){return R(_)}}),[]);var P=\"function\"==typeof s;I=P?s(A.getFieldsValue(!0),A):s,S(!P);var M=React127.useRef();React127.useEffect((function(){isSimilar(M.current||[],i||[])||A.setFields(i||[]),M.current=i}),[i,A]);var O=React127.useMemo((function(){return _objectSpread2(_objectSpread2({},A),{},{validateTrigger:h})}),[A,h]),B=React127.createElement(ListContext_default.Provider,{value:null},React127.createElement(FieldContext_default.Provider,{value:O},I));return!1===u?B:React127.createElement(u,_extends({},b,{ref:y,onSubmit:function(e){e.preventDefault(),e.stopPropagation(),A.submit()},onReset:function(e){var t;e.preventDefault(),A.resetFields(),null===(t=b.onReset)||void 0===t||t.call(b,e)}}),B)},Form_default=Form;init_globals();var import_react50=__toESM(require_react());function stringify2(e){try{return JSON.stringify(e)}catch(t){return Math.random()}}var useWatchWarning=function(e){var t=e.join(\"__RC_FIELD_FORM_SPLIT__\"),r=(0,import_react50.useRef)(t);warning_default(r.current===t,\"`useWatch` is not support dynamic `namePath`. Please provide static instead.\")};function useWatch(){for(var e=arguments.length,t=new Array(e),r=0;r__left_angle_mark_e;r++)t[r]=arguments[r];var n=t[0],i=t[1],o=void 0===i?{}:i,a=isFormInstance(o)?{form:o}:o,s=a.form,l=_slicedToArray((0,import_react50.useState)(),2),u=l[0],c=l[1],d=(0,import_react50.useMemo)((function(){return stringify2(u)}),[u]),h=(0,import_react50.useRef)(d);h.current=d;var f=(0,import_react50.useContext)(FieldContext_default),p=s||f,m=p&&p._init;warning_default(2===t.length&&!s||m,\"useWatch requires a form instance since it can not auto detect from context.\");var g=getNamePath(n),_=(0,import_react50.useRef)(g);return _.current=g,useWatchWarning(g),(0,import_react50.useEffect)((function(){if(m){var e=p.getFieldsValue,t=(0,p.getInternalHooks)(HOOK_MARK).registerWatch,r=function(e,t){var r=a.preserve?t:e;return\"function\"==typeof n?n(r):get(r,_.current)},i=t((function(e,t){var n=r(e,t),i=stringify2(n);h.current!==i&&(h.current=i,c(n))})),o=r(e(),e(!0));return u!==o&&c(o),i}}),[m]),u}var useWatch_default=useWatch,InternalForm=React128.forwardRef(Form_default),RefForm=InternalForm;RefForm.FormProvider=FormProvider,RefForm.Field=Field_default,RefForm.List=List_default,RefForm.useForm=useForm_default,RefForm.useWatch=useWatch_default;var es_default6=RefForm,FormContext2=React129.createContext({labelAlign:\"right\",vertical:!1,itemRef:()=>{}}),NoStyleItemContext=React129.createContext(null),FormProvider3=e=>{const t=omit(e,[\"prefixCls\"]);return React129.createElement(FormProvider,Object.assign({},t))},FormItemPrefixContext=React129.createContext({prefixCls:\"\"}),FormItemInputContext=React129.createContext({});FormItemInputContext.displayName=\"FormItemInputContext\";var NoFormStyle=e=>{let{children:t,status:r,override:n}=e;const i=(0,import_react51.useContext)(FormItemInputContext),o=(0,import_react51.useMemo)((()=>{const e=Object.assign({},i);return n&&delete e.isFormItemInput,r&&(delete e.status,delete e.hasFeedback,delete e.feedbackIcon),e}),[r,n,i]);return React129.createElement(FormItemInputContext.Provider,{value:o},t)},VariantContext=(0,import_react51.createContext)(void 0),ContextIsolator=e=>{const{space:t,form:r,children:n}=e;if(null==n)return null;let i=n;return r&&(i=import_react52.default.createElement(NoFormStyle,{override:!0,status:!0},i)),t&&(i=import_react52.default.createElement(NoCompactStyle,null,i)),i},ContextIsolator_default=ContextIsolator;init_globals();var import_react53=__toESM(require_react());function pickClosable(e){if(e)return{closable:e.closable,closeIcon:e.closeIcon}}function useClosableConfig(e){const{closable:t,closeIcon:r}=e||{};return import_react53.default.useMemo((()=>{if(!t&&(!1===t||!1===r||null===r))return!1;if(void 0===t&&void 0===r)return null;let e={closeIcon:\"boolean\"!=typeof r&&null!==r?r:void 0};return t&&\"object\"==typeof t&&(e=Object.assign(Object.assign({},e),t)),e}),[t,r])}function assignWithoutUndefined(){const e={};for(var t=arguments.length,r=new Array(t),n=0;n__left_angle_mark_t;n++)r[n]=arguments[n];return r.forEach((t=>{t&&Object.keys(t).forEach((r=>{void 0!==t[r]&&(e[r]=t[r])}))})),e}var EmptyFallbackCloseCollection={};function useClosable(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:EmptyFallbackCloseCollection;const n=useClosableConfig(e),i=useClosableConfig(t),o=\"boolean\"!=typeof n&&!!(null==n?void 0:n.disabled),a=import_react53.default.useMemo((()=>Object.assign({closeIcon:import_react53.default.createElement(CloseOutlined_default3,null)},r)),[r]),s=import_react53.default.useMemo((()=>!1!==n&&(n?assignWithoutUndefined(a,i,n):!1!==i&&(i?assignWithoutUndefined(a,i):!!a.closable&&a))),[n,i,a]);return import_react53.default.useMemo((()=>{if(!1===s)return[!1,null,o];const{closeIconRender:e}=a,{closeIcon:t}=s;let r=t;if(null!=r){e&&(r=e(t));const n=pickAttrs(s,!0);Object.keys(n).length&&(r=import_react53.default.isValidElement(r)?import_react53.default.cloneElement(r,n):import_react53.default.createElement(\"span\",Object.assign({},n),r))}return[!0,r,o]}),[s,a])}init_globals(),init_globals();var canUseDocElement=()=>canUseDom()&&window.document.documentElement;init_globals(),init_globals();var React140=__toESM(require_react()),import_classnames33=__toESM(require_classnames());init_globals();var React133=__toESM(require_react()),import_classnames26=__toESM(require_classnames());init_globals();var React132=__toESM(require_react()),import_classnames25=__toESM(require_classnames()),Element2=e=>{const{prefixCls:t,className:r,style:n,size:i,shape:o}=e,a=(0,import_classnames25.default)({[`${t}-lg`]:\"large\"===i,[`${t}-sm`]:\"small\"===i}),s=(0,import_classnames25.default)({[`${t}-circle`]:\"circle\"===o,[`${t}-square`]:\"square\"===o,[`${t}-round`]:\"round\"===o}),l=React132.useMemo((()=>\"number\"==typeof i?{width:i,height:i,lineHeight:`${i}px`}:{}),[i]);return React132.createElement(\"span\",{className:(0,import_classnames25.default)(t,a,s,r),style:Object.assign(Object.assign({},l),n)})},Element_default=Element2;init_globals();var skeletonClsLoading=new Keyframes_default(\"ant-skeleton-loading\",{\"0%\":{backgroundPosition:\"100% 50%\"},\"100%\":{backgroundPosition:\"0 50%\"}}),genSkeletonElementCommonSize=e=>({height:e,lineHeight:unit(e)}),genSkeletonElementAvatarSize=e=>Object.assign({width:e},genSkeletonElementCommonSize(e)),genSkeletonColor=e=>({background:e.skeletonLoadingBackground,backgroundSize:\"400% 100%\",animationName:skeletonClsLoading,animationDuration:e.skeletonLoadingMotionDuration,animationTimingFunction:\"ease\",animationIterationCount:\"infinite\"}),genSkeletonElementInputSize=(e,t)=>Object.assign({width:t(e).mul(5).equal(),minWidth:t(e).mul(5).equal()},genSkeletonElementCommonSize(e)),genSkeletonElementAvatar=e=>{const{skeletonAvatarCls:t,gradientFromColor:r,controlHeight:n,controlHeightLG:i,controlHeightSM:o}=e;return{[t]:Object.assign({display:\"inline-block\",verticalAlign:\"top\",background:r},genSkeletonElementAvatarSize(n)),[`${t}${t}-circle`]:{borderRadius:\"50%\"},[`${t}${t}-lg`]:Object.assign({},genSkeletonElementAvatarSize(i)),[`${t}${t}-sm`]:Object.assign({},genSkeletonElementAvatarSize(o))}},genSkeletonElementInput=e=>{const{controlHeight:t,borderRadiusSM:r,skeletonInputCls:n,controlHeightLG:i,controlHeightSM:o,gradientFromColor:a,calc:s}=e;return{[n]:Object.assign({display:\"inline-block\",verticalAlign:\"top\",background:a,borderRadius:r},genSkeletonElementInputSize(t,s)),[`${n}-lg`]:Object.assign({},genSkeletonElementInputSize(i,s)),[`${n}-sm`]:Object.assign({},genSkeletonElementInputSize(o,s))}},genSkeletonElementImageSize=e=>Object.assign({width:e},genSkeletonElementCommonSize(e)),genSkeletonElementImage=e=>{const{skeletonImageCls:t,imageSizeBase:r,gradientFromColor:n,borderRadiusSM:i,calc:o}=e;return{[t]:Object.assign(Object.assign({display:\"inline-flex\",alignItems:\"center\",justifyContent:\"center\",verticalAlign:\"middle\",background:n,borderRadius:i},genSkeletonElementImageSize(o(r).mul(2).equal())),{[`${t}-path`]:{fill:\"#bfbfbf\"},[`${t}-svg`]:Object.assign(Object.assign({},genSkeletonElementImageSize(r)),{maxWidth:o(r).mul(4).equal(),maxHeight:o(r).mul(4).equal()}),[`${t}-svg${t}-svg-circle`]:{borderRadius:\"50%\"}}),[`${t}${t}-circle`]:{borderRadius:\"50%\"}}},genSkeletonElementButtonShape=(e,t,r)=>{const{skeletonButtonCls:n}=e;return{[`${r}${n}-circle`]:{width:t,minWidth:t,borderRadius:\"50%\"},[`${r}${n}-round`]:{borderRadius:t}}},genSkeletonElementButtonSize=(e,t)=>Object.assign({width:t(e).mul(2).equal(),minWidth:t(e).mul(2).equal()},genSkeletonElementCommonSize(e)),genSkeletonElementButton=e=>{const{borderRadiusSM:t,skeletonButtonCls:r,controlHeight:n,controlHeightLG:i,controlHeightSM:o,gradientFromColor:a,calc:s}=e;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({[r]:Object.assign({display:\"inline-block\",verticalAlign:\"top\",background:a,borderRadius:t,width:s(n).mul(2).equal(),minWidth:s(n).mul(2).equal()},genSkeletonElementButtonSize(n,s))},genSkeletonElementButtonShape(e,n,r)),{[`${r}-lg`]:Object.assign({},genSkeletonElementButtonSize(i,s))}),genSkeletonElementButtonShape(e,i,`${r}-lg`)),{[`${r}-sm`]:Object.assign({},genSkeletonElementButtonSize(o,s))}),genSkeletonElementButtonShape(e,o,`${r}-sm`))},genBaseStyle2=e=>{const{componentCls:t,skeletonAvatarCls:r,skeletonTitleCls:n,skeletonParagraphCls:i,skeletonButtonCls:o,skeletonInputCls:a,skeletonImageCls:s,controlHeight:l,controlHeightLG:u,controlHeightSM:c,gradientFromColor:d,padding:h,marginSM:f,borderRadius:p,titleHeight:m,blockRadius:g,paragraphLiHeight:_,controlHeightXS:b,paragraphMarginTop:y}=e;return{[t]:{display:\"table\",width:\"100%\",[`${t}-header`]:{display:\"table-cell\",paddingInlineEnd:h,verticalAlign:\"top\",[r]:Object.assign({display:\"inline-block\",verticalAlign:\"top\",background:d},genSkeletonElementAvatarSize(l)),[`${r}-circle`]:{borderRadius:\"50%\"},[`${r}-lg`]:Object.assign({},genSkeletonElementAvatarSize(u)),[`${r}-sm`]:Object.assign({},genSkeletonElementAvatarSize(c))},[`${t}-content`]:{display:\"table-cell\",width:\"100%\",verticalAlign:\"top\",[n]:{width:\"100%\",height:m,background:d,borderRadius:g,[`+ ${i}`]:{marginBlockStart:c}},[i]:{padding:0,\"> li\":{width:\"100%\",height:_,listStyle:\"none\",background:d,borderRadius:g,\"+ li\":{marginBlockStart:b}}},[`${i}> li:last-child:not(:first-child):not(:nth-child(2))`]:{width:\"61%\"}},[`&-round ${t}-content`]:{[`${n}, ${i} > li`]:{borderRadius:p}}},[`${t}-with-avatar ${t}-content`]:{[n]:{marginBlockStart:f,[`+ ${i}`]:{marginBlockStart:y}}},[`${t}${t}-element`]:Object.assign(Object.assign(Object.assign(Object.assign({display:\"inline-block\",width:\"auto\"},genSkeletonElementButton(e)),genSkeletonElementAvatar(e)),genSkeletonElementInput(e)),genSkeletonElementImage(e)),[`${t}${t}-block`]:{width:\"100%\",[o]:{width:\"100%\"},[a]:{width:\"100%\"}},[`${t}${t}-active`]:{[`\\n ${n},\\n ${i} > li,\\n ${r},\\n ${o},\\n ${a},\\n ${s}\\n `]:Object.assign({},genSkeletonColor(e))}}},prepareComponentToken4=e=>{const{colorFillContent:t,colorFill:r}=e;return{color:t,colorGradientEnd:r,gradientFromColor:t,gradientToColor:r,titleHeight:e.controlHeight/2,blockRadius:e.borderRadiusSM,paragraphMarginTop:e.marginLG+e.marginXXS,paragraphLiHeight:e.controlHeight/2}},style_default6=genStyleHooks(\"Skeleton\",(e=>{const{componentCls:t,calc:r}=e,n=merge2(e,{skeletonAvatarCls:`${t}-avatar`,skeletonTitleCls:`${t}-title`,skeletonParagraphCls:`${t}-paragraph`,skeletonButtonCls:`${t}-button`,skeletonInputCls:`${t}-input`,skeletonImageCls:`${t}-image`,imageSizeBase:r(e.controlHeight).mul(1.5).equal(),borderRadius:100,skeletonLoadingBackground:`linear-gradient(90deg, ${e.gradientFromColor} 25%, ${e.gradientToColor} 37%, ${e.gradientFromColor} 63%)`,skeletonLoadingMotionDuration:\"1.4s\"});return[genBaseStyle2(n)]}),prepareComponentToken4,{deprecatedTokens:[[\"color\",\"gradientFromColor\"],[\"colorGradientEnd\",\"gradientToColor\"]]}),SkeletonAvatar=e=>{const{prefixCls:t,className:r,rootClassName:n,active:i,shape:o=\"circle\",size:a=\"default\"}=e,{getPrefixCls:s}=React133.useContext(ConfigContext),l=s(\"skeleton\",t),[u,c,d]=style_default6(l),h=omit(e,[\"prefixCls\",\"className\"]),f=(0,import_classnames26.default)(l,`${l}-element`,{[`${l}-active`]:i},r,n,c,d);return u(React133.createElement(\"div\",{className:f},React133.createElement(Element_default,Object.assign({prefixCls:`${l}-avatar`,shape:o,size:a},h))))},Avatar_default=SkeletonAvatar;init_globals();var React134=__toESM(require_react()),import_classnames27=__toESM(require_classnames()),SkeletonButton=e=>{const{prefixCls:t,className:r,rootClassName:n,active:i,block:o=!1,size:a=\"default\"}=e,{getPrefixCls:s}=React134.useContext(ConfigContext),l=s(\"skeleton\",t),[u,c,d]=style_default6(l),h=omit(e,[\"prefixCls\"]),f=(0,import_classnames27.default)(l,`${l}-element`,{[`${l}-active`]:i,[`${l}-block`]:o},r,n,c,d);return u(React134.createElement(\"div\",{className:f},React134.createElement(Element_default,Object.assign({prefixCls:`${l}-button`,size:a},h))))},Button_default=SkeletonButton;init_globals();var React135=__toESM(require_react()),import_classnames28=__toESM(require_classnames()),path=\"M365.714286 329.142857q0 45.714286-32.036571 77.677714t-77.677714 32.036571-77.677714-32.036571-32.036571-77.677714 32.036571-77.677714 77.677714-32.036571 77.677714 32.036571 32.036571 77.677714zM950.857143 548.571429l0 256-804.571429 0 0-109.714286 182.857143-182.857143 91.428571 91.428571 292.571429-292.571429zM1005.714286 146.285714l-914.285714 0q-7.460571 0-12.873143 5.412571t-5.412571 12.873143l0 694.857143q0 7.460571 5.412571 12.873143t12.873143 5.412571l914.285714 0q7.460571 0 12.873143-5.412571t5.412571-12.873143l0-694.857143q0-7.460571-5.412571-12.873143t-12.873143-5.412571zM1097.142857 164.571429l0 694.857143q0 37.741714-26.843429 64.585143t-64.585143 26.843429l-914.285714 0q-37.741714 0-64.585143-26.843429t-26.843429-64.585143l0-694.857143q0-37.741714 26.843429-64.585143t64.585143-26.843429l914.285714 0q37.741714 0 64.585143 26.843429t26.843429 64.585143z\",SkeletonImage=e=>{const{prefixCls:t,className:r,rootClassName:n,style:i,active:o}=e,{getPrefixCls:a}=React135.useContext(ConfigContext),s=a(\"skeleton\",t),[l,u,c]=style_default6(s),d=(0,import_classnames28.default)(s,`${s}-element`,{[`${s}-active`]:o},r,n,u,c);return l(React135.createElement(\"div\",{className:d},React135.createElement(\"div\",{className:(0,import_classnames28.default)(`${s}-image`,r),style:i},React135.createElement(\"svg\",{viewBox:\"0 0 1098 1024\",xmlns:\"http://www.w3.org/2000/svg\",className:`${s}-image-svg`},React135.createElement(\"title\",null,\"Image placeholder\"),React135.createElement(\"path\",{d:path,className:`${s}-image-path`})))))},Image_default=SkeletonImage;init_globals();var React136=__toESM(require_react()),import_classnames29=__toESM(require_classnames()),SkeletonInput=e=>{const{prefixCls:t,className:r,rootClassName:n,active:i,block:o,size:a=\"default\"}=e,{getPrefixCls:s}=React136.useContext(ConfigContext),l=s(\"skeleton\",t),[u,c,d]=style_default6(l),h=omit(e,[\"prefixCls\"]),f=(0,import_classnames29.default)(l,`${l}-element`,{[`${l}-active`]:i,[`${l}-block`]:o},r,n,c,d);return u(React136.createElement(\"div\",{className:f},React136.createElement(Element_default,Object.assign({prefixCls:`${l}-input`,size:a},h))))},Input_default=SkeletonInput;init_globals();var React137=__toESM(require_react()),import_classnames30=__toESM(require_classnames()),SkeletonNode=e=>{const{prefixCls:t,className:r,rootClassName:n,style:i,active:o,children:a}=e,{getPrefixCls:s}=React137.useContext(ConfigContext),l=s(\"skeleton\",t),[u,c,d]=style_default6(l),h=(0,import_classnames30.default)(l,`${l}-element`,{[`${l}-active`]:o},c,r,n,d);return u(React137.createElement(\"div\",{className:h},React137.createElement(\"div\",{className:(0,import_classnames30.default)(`${l}-image`,r),style:i},a)))},Node_default=SkeletonNode;init_globals();var React138=__toESM(require_react()),import_classnames31=__toESM(require_classnames()),getWidth=(e,t)=>{const{width:r,rows:n=2}=t;return Array.isArray(r)?r[e]:n-1===e?r:void 0},Paragraph=e=>{const{prefixCls:t,className:r,style:n,rows:i}=e,o=_toConsumableArray(new Array(i)).map(((t,r)=>React138.createElement(\"li\",{key:r,style:{width:getWidth(r,e)}})));return React138.createElement(\"ul\",{className:(0,import_classnames31.default)(t,r),style:n},o)},Paragraph_default=Paragraph;init_globals();var React139=__toESM(require_react()),import_classnames32=__toESM(require_classnames()),Title=e=>{let{prefixCls:t,className:r,width:n,style:i}=e;return React139.createElement(\"h3\",{className:(0,import_classnames32.default)(t,r),style:Object.assign({width:n},i)})},Title_default=Title;function getComponentProps(e){return e&&\"object\"==typeof e?e:{}}function getAvatarBasicProps(e,t){return e&&!t?{size:\"large\",shape:\"square\"}:{size:\"large\",shape:\"circle\"}}function getTitleBasicProps(e,t){return!e&&t?{width:\"38%\"}:e&&t?{width:\"50%\"}:{}}function getParagraphBasicProps(e,t){const r={};return e&&t||(r.width=\"61%\"),r.rows=!e&&t?3:2,r}var Skeleton=e=>{const{prefixCls:t,loading:r,className:n,rootClassName:i,style:o,children:a,avatar:s=!1,title:l=!0,paragraph:u=!0,active:c,round:d}=e,{getPrefixCls:h,direction:f,skeleton:p}=React140.useContext(ConfigContext),m=h(\"skeleton\",t),[g,_,b]=style_default6(m);if(r||!(\"loading\"in e)){const e=!!s,t=!!l,r=!!u;let a,h;if(e){const e=Object.assign(Object.assign({prefixCls:`${m}-avatar`},getAvatarBasicProps(t,r)),getComponentProps(s));a=React140.createElement(\"div\",{className:`${m}-header`},React140.createElement(Element_default,Object.assign({},e)))}if(t||r){let n,i;if(t){const t=Object.assign(Object.assign({prefixCls:`${m}-title`},getTitleBasicProps(e,r)),getComponentProps(l));n=React140.createElement(Title_default,Object.assign({},t))}if(r){const r=Object.assign(Object.assign({prefixCls:`${m}-paragraph`},getParagraphBasicProps(e,t)),getComponentProps(u));i=React140.createElement(Paragraph_default,Object.assign({},r))}h=React140.createElement(\"div\",{className:`${m}-content`},n,i)}const y=(0,import_classnames33.default)(m,{[`${m}-with-avatar`]:e,[`${m}-active`]:c,[`${m}-rtl`]:\"rtl\"===f,[`${m}-round`]:d},null==p?void 0:p.className,n,i,_,b);return g(React140.createElement(\"div\",{className:y,style:Object.assign(Object.assign({},null==p?void 0:p.style),o)},a,h))}return null!=a?a:null};Skeleton.Button=Button_default,Skeleton.Avatar=Avatar_default,Skeleton.Input=Input_default,Skeleton.Image=Image_default,Skeleton.Node=Node_default,Skeleton.displayName=\"Skeleton\";var Skeleton_default=Skeleton,skeleton_default=Skeleton_default;init_globals();var React141=__toESM(require_react());function voidFunc(){}var WatermarkContext=React141.createContext({add:voidFunc,remove:voidFunc});function usePanelRef(e){const t=React141.useContext(WatermarkContext),r=React141.useRef();return useEvent((n=>{if(n){const i=e?n.querySelector(e):n;t.add(i),r.current=i}else t.remove(r.current)}))}init_globals();var import_react56=__toESM(require_react());init_globals();var import_react54=__toESM(require_react()),NormalCancelBtn=()=>{const{cancelButtonProps:e,cancelTextLocale:t,onCancel:r}=(0,import_react54.useContext)(ModalContext);return import_react54.default.createElement(button_default2,Object.assign({onClick:r},e),t)},NormalCancelBtn_default=NormalCancelBtn;init_globals();var import_react55=__toESM(require_react()),NormalOkBtn=()=>{const{confirmLoading:e,okButtonProps:t,okType:r,okTextLocale:n,onOk:i}=(0,import_react55.useContext)(ModalContext);return import_react55.default.createElement(button_default2,Object.assign({},convertLegacyProps(r),{loading:e,onClick:i},t),n)},NormalOkBtn_default=NormalOkBtn;function renderCloseIcon(e,t){return import_react56.default.createElement(\"span\",{className:`${e}-close-x`},t||import_react56.default.createElement(CloseOutlined_default3,{className:`${e}-close-icon`}))}var Footer=e=>{const{okText:t,okType:r=\"primary\",cancelText:n,confirmLoading:i,onOk:o,onCancel:a,okButtonProps:s,cancelButtonProps:l,footer:u}=e,[c]=useLocale_default(\"Modal\",getConfirmLocale()),d={confirmLoading:i,okButtonProps:s,cancelButtonProps:l,okTextLocale:t||(null==c?void 0:c.okText),cancelTextLocale:n||(null==c?void 0:c.cancelText),okType:r,onOk:o,onCancel:a},h=import_react56.default.useMemo((()=>d),_toConsumableArray(Object.values(d)));let f;return\"function\"==typeof u||void 0===u?(f=import_react56.default.createElement(import_react56.default.Fragment,null,import_react56.default.createElement(NormalCancelBtn_default,null),import_react56.default.createElement(NormalOkBtn_default,null)),\"function\"==typeof u&&(f=u(f,{OkBtn:NormalOkBtn_default,CancelBtn:NormalCancelBtn_default})),f=import_react56.default.createElement(ModalContextProvider,{value:h},f)):f=u,import_react56.default.createElement(DisabledContextProvider,{disabled:!1},f)};function box(e){return{position:e,inset:0}}init_globals();var genModalMaskStyle=e=>{const{componentCls:t,antCls:r}=e;return[{[`${t}-root`]:{[`${t}${r}-zoom-enter, ${t}${r}-zoom-appear`]:{transform:\"none\",opacity:0,animationDuration:e.motionDurationSlow,userSelect:\"none\"},[`${t}${r}-zoom-leave ${t}-content`]:{pointerEvents:\"none\"},[`${t}-mask`]:Object.assign(Object.assign({},box(\"fixed\")),{zIndex:e.zIndexPopupBase,height:\"100%\",backgroundColor:e.colorBgMask,pointerEvents:\"none\",[`${t}-hidden`]:{display:\"none\"}}),[`${t}-wrap`]:Object.assign(Object.assign({},box(\"fixed\")),{zIndex:e.zIndexPopupBase,overflow:\"auto\",outline:0,WebkitOverflowScrolling:\"touch\"})}},{[`${t}-root`]:initFadeMotion(e)}]},genModalStyle=e=>{const{componentCls:t}=e;return[{[`${t}-root`]:{[`${t}-wrap-rtl`]:{direction:\"rtl\"},[`${t}-centered`]:{textAlign:\"center\",\"&::before\":{display:\"inline-block\",width:0,height:\"100%\",verticalAlign:\"middle\",content:'\"\"'},[t]:{top:0,display:\"inline-block\",paddingBottom:0,textAlign:\"start\",verticalAlign:\"middle\"}},[`@media (max-width: ${e.screenSMMax}px)`]:{[t]:{maxWidth:\"calc(100vw - 16px)\",margin:`${unit(e.marginXS)} auto`},[`${t}-centered`]:{[t]:{flex:1}}}}},{[t]:Object.assign(Object.assign({},resetComponent(e)),{pointerEvents:\"none\",position:\"relative\",top:100,width:\"auto\",maxWidth:`calc(100vw - ${unit(e.calc(e.margin).mul(2).equal())})`,margin:\"0 auto\",paddingBottom:e.paddingLG,[`${t}-title`]:{margin:0,color:e.titleColor,fontWeight:e.fontWeightStrong,fontSize:e.titleFontSize,lineHeight:e.titleLineHeight,wordWrap:\"break-word\"},[`${t}-content`]:{position:\"relative\",backgroundColor:e.contentBg,backgroundClip:\"padding-box\",border:0,borderRadius:e.borderRadiusLG,boxShadow:e.boxShadow,pointerEvents:\"auto\",padding:e.contentPadding},[`${t}-close`]:Object.assign({position:\"absolute\",top:e.calc(e.modalHeaderHeight).sub(e.modalCloseBtnSize).div(2).equal(),insetInlineEnd:e.calc(e.modalHeaderHeight).sub(e.modalCloseBtnSize).div(2).equal(),zIndex:e.calc(e.zIndexPopupBase).add(10).equal(),padding:0,color:e.modalCloseIconColor,fontWeight:e.fontWeightStrong,lineHeight:1,textDecoration:\"none\",background:\"transparent\",borderRadius:e.borderRadiusSM,width:e.modalCloseBtnSize,height:e.modalCloseBtnSize,border:0,outline:0,cursor:\"pointer\",transition:`color ${e.motionDurationMid}, background-color ${e.motionDurationMid}`,\"&-x\":{display:\"flex\",fontSize:e.fontSizeLG,fontStyle:\"normal\",lineHeight:unit(e.modalCloseBtnSize),justifyContent:\"center\",textTransform:\"none\",textRendering:\"auto\"},\"&:disabled\":{pointerEvents:\"none\"},\"&:hover\":{color:e.modalCloseIconHoverColor,backgroundColor:e.colorBgTextHover,textDecoration:\"none\"},\"&:active\":{backgroundColor:e.colorBgTextActive}},genFocusStyle(e)),[`${t}-header`]:{color:e.colorText,background:e.headerBg,borderRadius:`${unit(e.borderRadiusLG)} ${unit(e.borderRadiusLG)} 0 0`,marginBottom:e.headerMarginBottom,padding:e.headerPadding,borderBottom:e.headerBorderBottom},[`${t}-body`]:{fontSize:e.fontSize,lineHeight:e.lineHeight,wordWrap:\"break-word\",padding:e.bodyPadding,[`${t}-body-skeleton`]:{width:\"100%\",height:\"100%\",display:\"flex\",justifyContent:\"center\",alignItems:\"center\",margin:`${unit(e.margin)} auto`}},[`${t}-footer`]:{textAlign:\"end\",background:e.footerBg,marginTop:e.footerMarginTop,padding:e.footerPadding,borderTop:e.footerBorderTop,borderRadius:e.footerBorderRadius,[`> ${e.antCls}-btn + ${e.antCls}-btn`]:{marginInlineStart:e.marginXS}},[`${t}-open`]:{overflow:\"hidden\"}})},{[`${t}-pure-panel`]:{top:\"auto\",padding:0,display:\"flex\",flexDirection:\"column\",[`${t}-content,\\n ${t}-body,\\n ${t}-confirm-body-wrapper`]:{display:\"flex\",flexDirection:\"column\",flex:\"auto\"},[`${t}-confirm-body`]:{marginBottom:\"auto\"}}}]},genRTLStyle=e=>{const{componentCls:t}=e;return{[`${t}-root`]:{[`${t}-wrap-rtl`]:{direction:\"rtl\",[`${t}-confirm-body`]:{direction:\"rtl\"}}}}},prepareToken2=e=>{const t=e.padding,r=e.fontSizeHeading5,n=e.lineHeightHeading5;return merge2(e,{modalHeaderHeight:e.calc(e.calc(n).mul(r).equal()).add(e.calc(t).mul(2).equal()).equal(),modalFooterBorderColorSplit:e.colorSplit,modalFooterBorderStyle:e.lineType,modalFooterBorderWidth:e.lineWidth,modalCloseIconColor:e.colorIcon,modalCloseIconHoverColor:e.colorIconHover,modalCloseBtnSize:e.controlHeight,modalConfirmIconSize:e.fontHeight,modalTitleHeight:e.calc(e.titleFontSize).mul(e.titleLineHeight).equal()})},prepareComponentToken5=e=>({footerBg:\"transparent\",headerBg:e.colorBgElevated,titleLineHeight:e.lineHeightHeading5,titleFontSize:e.fontSizeHeading5,contentBg:e.colorBgElevated,titleColor:e.colorTextHeading,contentPadding:e.wireframe?0:`${unit(e.paddingMD)} ${unit(e.paddingContentHorizontalLG)}`,headerPadding:e.wireframe?`${unit(e.padding)} ${unit(e.paddingLG)}`:0,headerBorderBottom:e.wireframe?`${unit(e.lineWidth)} ${e.lineType} ${e.colorSplit}`:\"none\",headerMarginBottom:e.wireframe?0:e.marginXS,bodyPadding:e.wireframe?e.paddingLG:0,footerPadding:e.wireframe?`${unit(e.paddingXS)} ${unit(e.padding)}`:0,footerBorderTop:e.wireframe?`${unit(e.lineWidth)} ${e.lineType} ${e.colorSplit}`:\"none\",footerBorderRadius:e.wireframe?`0 0 ${unit(e.borderRadiusLG)} ${unit(e.borderRadiusLG)}`:0,footerMarginTop:e.wireframe?0:e.marginSM,confirmBodyPadding:e.wireframe?`${unit(2*e.padding)} ${unit(2*e.padding)} ${unit(e.paddingLG)}`:0,confirmIconMarginInlineEnd:e.wireframe?e.margin:e.marginSM,confirmBtnsMarginTop:e.wireframe?e.marginLG:e.marginSM}),style_default7=genStyleHooks(\"Modal\",(e=>{const t=prepareToken2(e);return[genModalStyle(t),genRTLStyle(t),genModalMaskStyle(t),initZoomMotion(t,\"zoom\")]}),prepareComponentToken5,{unitless:{titleLineHeight:!0}}),__rest10=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)__left_angle_mark_0&&(r[n]=e[n]);if(null!=e&&\"function\"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i__left_angle_mark_n.length;i++)t.indexOf(n[i])__left_angle_mark_0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r},mousePosition,getClickPosition=e=>{mousePosition={x:e.pageX,y:e.pageY},setTimeout((()=>{mousePosition=null}),100)};canUseDocElement()&&document.documentElement.addEventListener(\"click\",getClickPosition,!0);var Modal=e=>{var t;const{getPopupContainer:r,getPrefixCls:n,direction:i,modal:o}=React145.useContext(ConfigContext),a=t=>{const{onCancel:r}=e;null==r||r(t)};{const t=devUseWarning(\"Modal\");[[\"visible\",\"open\"],[\"bodyStyle\",\"styles.body\"],[\"maskStyle\",\"styles.mask\"]].forEach((r=>{let[n,i]=r;t.deprecated(!(n in e),n,i)}))}const{prefixCls:s,className:l,rootClassName:u,open:c,wrapClassName:d,centered:h,getContainer:f,focusTriggerAfterClose:p=!0,style:m,visible:g,width:_=520,footer:b,classNames:y,styles:v,children:A,loading:w}=e,S=__rest10(e,[\"prefixCls\",\"className\",\"rootClassName\",\"open\",\"wrapClassName\",\"centered\",\"getContainer\",\"focusTriggerAfterClose\",\"style\",\"visible\",\"width\",\"footer\",\"classNames\",\"styles\",\"children\",\"loading\"]),E=n(\"modal\",s),x=n(),C=useCSSVarCls_default(E),[T,R,I]=style_default7(E,C),k=(0,import_classnames34.default)(d,{[`${E}-centered`]:!!h,[`${E}-wrap-rtl`]:\"rtl\"===i}),P=null===b||w?null:React145.createElement(Footer,Object.assign({},e,{onOk:t=>{const{onOk:r}=e;null==r||r(t)},onCancel:a})),[M,O,B]=useClosable(pickClosable(e),pickClosable(o),{closable:!0,closeIcon:React145.createElement(CloseOutlined_default3,{className:`${E}-close-icon`}),closeIconRender:e=>renderCloseIcon(E,e)}),N=usePanelRef(`.${E}-content`),[j,L]=useZIndex(\"Modal\",S.zIndex);return T(React145.createElement(ContextIsolator_default,{form:!0,space:!0},React145.createElement(zindexContext_default.Provider,{value:L},React145.createElement(es_default4,Object.assign({width:_},S,{zIndex:j,getContainer:void 0===f?r:f,prefixCls:E,rootClassName:(0,import_classnames34.default)(R,u,I,C),footer:P,visible:null!=c?c:g,mousePosition:null!==(t=S.mousePosition)&&void 0!==t?t:mousePosition,onClose:a,closable:M?{disabled:B,closeIcon:O}:M,closeIcon:O,focusTriggerAfterClose:p,transitionName:getTransitionName2(x,\"zoom\",e.transitionName),maskTransitionName:getTransitionName2(x,\"fade\",e.maskTransitionName),className:(0,import_classnames34.default)(R,l,null==o?void 0:o.className),style:Object.assign(Object.assign({},null==o?void 0:o.style),m),classNames:Object.assign(Object.assign(Object.assign({},null==o?void 0:o.classNames),y),{wrapper:(0,import_classnames34.default)(k,null==y?void 0:y.wrapper)}),styles:Object.assign(Object.assign({},null==o?void 0:o.styles),v),panelRef:N}),w?React145.createElement(skeleton_default,{active:!0,title:!1,paragraph:{rows:4},className:`${E}-body-skeleton`}):A))))},Modal_default=Modal;init_globals();var genModalConfirmStyle=e=>{const{componentCls:t,titleFontSize:r,titleLineHeight:n,modalConfirmIconSize:i,fontSize:o,lineHeight:a,modalTitleHeight:s,fontHeight:l,confirmBodyPadding:u}=e,c=`${t}-confirm`;return{[c]:{\"&-rtl\":{direction:\"rtl\"},[`${e.antCls}-modal-header`]:{display:\"none\"},[`${c}-body-wrapper`]:Object.assign({},clearFix()),[`&${t} ${t}-body`]:{padding:u},[`${c}-body`]:{display:\"flex\",flexWrap:\"nowrap\",alignItems:\"start\",[`> ${e.iconCls}`]:{flex:\"none\",fontSize:i,marginInlineEnd:e.confirmIconMarginInlineEnd,marginTop:e.calc(e.calc(l).sub(i).equal()).div(2).equal()},[`&-has-title > ${e.iconCls}`]:{marginTop:e.calc(e.calc(s).sub(i).equal()).div(2).equal()}},[`${c}-paragraph`]:{display:\"flex\",flexDirection:\"column\",flex:\"auto\",rowGap:e.marginXS},[`${e.iconCls} + ${c}-paragraph`]:{maxWidth:`calc(100% - ${unit(e.calc(e.modalConfirmIconSize).add(e.marginSM).equal())})`},[`${c}-title`]:{color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:r,lineHeight:n},[`${c}-content`]:{color:e.colorText,fontSize:o,lineHeight:a},[`${c}-btns`]:{textAlign:\"end\",marginTop:e.confirmBtnsMarginTop,[`${e.antCls}-btn + ${e.antCls}-btn`]:{marginBottom:0,marginInlineStart:e.marginXS}}},[`${c}-error ${c}-body > ${e.iconCls}`]:{color:e.colorError},[`${c}-warning ${c}-body > ${e.iconCls},\\n ${c}-confirm ${c}-body > ${e.iconCls}`]:{color:e.colorWarning},[`${c}-info ${c}-body > ${e.iconCls}`]:{color:e.colorInfo},[`${c}-success ${c}-body > ${e.iconCls}`]:{color:e.colorSuccess}}},confirm_default=genSubStyleComponent([\"Modal\",\"confirm\"],(e=>{const t=prepareToken2(e);return[genModalConfirmStyle(t)]}),prepareComponentToken5,{order:-1e3}),__rest11=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)__left_angle_mark_0&&(r[n]=e[n]);if(null!=e&&\"function\"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i__left_angle_mark_n.length;i++)t.indexOf(n[i])__left_angle_mark_0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r};function ConfirmContent(e){const{prefixCls:t,icon:r,okText:n,cancelText:i,confirmPrefixCls:o,type:a,okCancel:s,footer:l,locale:u}=e,c=__rest11(e,[\"prefixCls\",\"icon\",\"okText\",\"cancelText\",\"confirmPrefixCls\",\"type\",\"okCancel\",\"footer\",\"locale\"]);devUseWarning(\"Modal\")(!(\"string\"==typeof r&&r.length>2),\"breaking\",`\\`icon\\` is using ReactNode instead of string naming in v4. Please check \\`${r}\\` at https://ant.design/components/icon`);let d=r;if(!r&&null!==r)switch(a){case\"info\":d=React146.createElement(InfoCircleFilled_default2,null);break;case\"success\":d=React146.createElement(CheckCircleFilled_default2,null);break;case\"error\":d=React146.createElement(CloseCircleFilled_default2,null);break;default:d=React146.createElement(ExclamationCircleFilled_default2,null)}const h=null!=s?s:\"confirm\"===a,f=null!==e.autoFocusButton&&(e.autoFocusButton||\"ok\"),[p]=useLocale_default(\"Modal\"),m=u||p,g=n||(h?null==m?void 0:m.okText:null==m?void 0:m.justOkText),_=i||(null==m?void 0:m.cancelText),b=Object.assign({autoFocusButton:f,cancelTextLocale:_,okTextLocale:g,mergedOkCancel:h},c),y=React146.useMemo((()=>b),_toConsumableArray(Object.values(b))),v=React146.createElement(React146.Fragment,null,React146.createElement(ConfirmCancelBtn_default,null),React146.createElement(ConfirmOkBtn_default,null)),A=void 0!==e.title&&null!==e.title,w=`${o}-body`;return React146.createElement(\"div\",{className:`${o}-body-wrapper`},React146.createElement(\"div\",{className:(0,import_classnames35.default)(w,{[`${w}-has-title`]:A})},d,React146.createElement(\"div\",{className:`${o}-paragraph`},A&&React146.createElement(\"span\",{className:`${o}-title`},e.title),React146.createElement(\"div\",{className:`${o}-content`},e.content))),void 0===l||\"function\"==typeof l?React146.createElement(ModalContextProvider,{value:y},React146.createElement(\"div\",{className:`${o}-btns`},\"function\"==typeof l?l(v,{OkBtn:ConfirmOkBtn_default,CancelBtn:ConfirmCancelBtn_default}):v)):l,React146.createElement(confirm_default,{prefixCls:t}))}var ConfirmDialog=e=>{const{close:t,zIndex:r,afterClose:n,open:i,keyboard:o,centered:a,getContainer:s,maskStyle:l,direction:u,prefixCls:c,wrapClassName:d,rootPrefixCls:h,bodyStyle:f,closable:p=!1,closeIcon:m,modalRender:g,focusTriggerAfterClose:_,onConfirm:b,styles:y}=e;{const t=devUseWarning(\"Modal\");[[\"visible\",\"open\"],[\"bodyStyle\",\"styles.body\"],[\"maskStyle\",\"styles.mask\"]].forEach((r=>{let[n,i]=r;t.deprecated(!(n in e),n,i)}))}const v=`${c}-confirm`,A=e.width||416,w=e.style||{},S=void 0===e.mask||e.mask,E=void 0!==e.maskClosable&&e.maskClosable,x=(0,import_classnames35.default)(v,`${v}-${e.type}`,{[`${v}-rtl`]:\"rtl\"===u},e.className),[,C]=useToken(),T=React146.useMemo((()=>void 0!==r?r:C.zIndexPopupBase+CONTAINER_MAX_OFFSET),[r,C]);return React146.createElement(Modal_default,{prefixCls:c,className:x,wrapClassName:(0,import_classnames35.default)({[`${v}-centered`]:!!e.centered},d),onCancel:()=>{null==t||t({triggerCancel:!0}),null==b||b(!1)},open:i,title:\"\",footer:null,transitionName:getTransitionName2(h||\"\",\"zoom\",e.transitionName),maskTransitionName:getTransitionName2(h||\"\",\"fade\",e.maskTransitionName),mask:S,maskClosable:E,style:w,styles:Object.assign({body:f,mask:l},y),width:A,zIndex:T,afterClose:n,keyboard:o,centered:a,getContainer:s,closable:p,closeIcon:m,modalRender:g,focusTriggerAfterClose:_},React146.createElement(ConfirmContent,Object.assign({},e,{confirmPrefixCls:v})))},ConfirmDialogWrapper=e=>{const{rootPrefixCls:t,iconPrefixCls:r,direction:n,theme:i}=e;return React146.createElement(config_provider_default,{prefixCls:t,iconPrefixCls:r,direction:n,theme:i},React146.createElement(ConfirmDialog,Object.assign({},e)))};ConfirmDialog.displayName=\"ConfirmDialog\",ConfirmDialogWrapper.displayName=\"ConfirmDialogWrapper\";var ConfirmDialog_default=ConfirmDialogWrapper;init_globals();var destroyFns=[],destroyFns_default=destroyFns,defaultRootPrefixCls=\"\";function getRootPrefixCls(){return defaultRootPrefixCls}var ConfirmDialogWrapper2=e=>{var t,r;const{prefixCls:n,getContainer:i,direction:o}=e,a=getConfirmLocale(),s=(0,import_react57.useContext)(ConfigContext),l=getRootPrefixCls()||s.getPrefixCls(),u=n||`${l}-modal`;let c=i;return!1===c&&(c=void 0,warning_default2(!1,\"Modal\",\"Static method not support `getContainer` to be `false` since it do not have context env.\")),import_react57.default.createElement(ConfirmDialog_default,Object.assign({},e,{rootPrefixCls:l,prefixCls:u,iconPrefixCls:s.iconPrefixCls,theme:s.theme,direction:null!=o?o:s.direction,locale:null!==(r=null===(t=s.locale)||void 0===t?void 0:t.Modal)&&void 0!==r?r:a,getContainer:c}))};function confirm(e){const t=globalConfig();t.holderRender||warnContext(\"Modal\");const r=document.createDocumentFragment();let n,i=Object.assign(Object.assign({},e),{close:s,open:!0});function o(){for(var t,n=arguments.length,i=new Array(n),o=0;o__left_angle_mark_n;o++)i[o]=arguments[o];var a;i.some((e=>null==e?void 0:e.triggerCancel))&&(null===(t=e.onCancel)||void 0===t||(a=t).call.apply(a,[e,()=>{}].concat(_toConsumableArray(i.slice(1)))));for(let e=0;e__left_angle_mark_destroyFns_default.length;e++)if(destroyFns_default[e]===s){destroyFns_default.splice(e,1);break}unmount(r)}function a(e){clearTimeout(n),n=setTimeout((()=>{const n=t.getPrefixCls(void 0,getRootPrefixCls()),i=t.getIconPrefixCls(),o=t.getTheme(),a=import_react57.default.createElement(ConfirmDialogWrapper2,Object.assign({},e));render3(import_react57.default.createElement(config_provider_default,{prefixCls:n,iconPrefixCls:i,theme:o},t.holderRender?t.holderRender(a):a),r)}))}function s(){for(var t=arguments.length,r=new Array(t),n=0;n__left_angle_mark_t;n++)r[n]=arguments[n];i=Object.assign(Object.assign({},i),{open:!1,afterClose:()=>{\"function\"==typeof e.afterClose&&e.afterClose(),o.apply(this,r)}}),i.visible&&delete i.visible,a(i)}return a(i),destroyFns_default.push(s),{destroy:s,update:function(e){i=\"function\"==typeof e?e(i):Object.assign(Object.assign({},i),e),a(i)}}}function withWarn(e){return Object.assign(Object.assign({},e),{type:\"warning\"})}function withInfo(e){return Object.assign(Object.assign({},e),{type:\"info\"})}function withSuccess(e){return Object.assign(Object.assign({},e),{type:\"success\"})}function withError(e){return Object.assign(Object.assign({},e),{type:\"error\"})}function withConfirm(e){return Object.assign(Object.assign({},e),{type:\"confirm\"})}function modalGlobalConfig(e){let{rootPrefixCls:t}=e;warning_default2(!1,\"Modal\",\"Modal.config is deprecated. Please use ConfigProvider.config instead.\"),defaultRootPrefixCls=t}init_globals();var React148=__toESM(require_react()),__rest12=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)__left_angle_mark_0&&(r[n]=e[n]);if(null!=e&&\"function\"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i__left_angle_mark_n.length;i++)t.indexOf(n[i])__left_angle_mark_0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r},HookModal=(e,t)=>{var r,{afterClose:n,config:i}=e,o=__rest12(e,[\"afterClose\",\"config\"]);const[a,s]=React148.useState(!0),[l,u]=React148.useState(i),{direction:c,getPrefixCls:d}=React148.useContext(ConfigContext),h=d(\"modal\"),f=d(),p=function(){var e,t;s(!1);for(var r=arguments.length,n=new Array(r),i=0;i__left_angle_mark_r;i++)n[i]=arguments[i];n.some((e=>null==e?void 0:e.triggerCancel))&&(null===(e=l.onCancel)||void 0===e||(t=e).call.apply(t,[l,()=>{}].concat(_toConsumableArray(n.slice(1)))))};React148.useImperativeHandle(t,(()=>({destroy:p,update:e=>{u((t=>Object.assign(Object.assign({},t),e)))}})));const m=null!==(r=l.okCancel)&&void 0!==r?r:\"confirm\"===l.type,[g]=useLocale_default(\"Modal\",en_US_default6.Modal);return React148.createElement(ConfirmDialog_default,Object.assign({prefixCls:h,rootPrefixCls:f},l,{close:p,open:a,afterClose:()=>{var e;n(),null===(e=l.afterClose)||void 0===e||e.call(l)},okText:l.okText||(m?null==g?void 0:g.okText:null==g?void 0:g.justOkText),direction:l.direction||c,cancelText:l.cancelText||(null==g?void 0:g.cancelText)},o))},HookModal_default=React148.forwardRef(HookModal),uuid4=0,ElementsHolder=React149.memo(React149.forwardRef(((e,t)=>{const[r,n]=usePatchElement();return React149.useImperativeHandle(t,(()=>({patchElement:n})),[]),React149.createElement(React149.Fragment,null,r)})));function useModal(){const e=React149.useRef(null),[t,r]=React149.useState([]);React149.useEffect((()=>{t.length&&(_toConsumableArray(t).forEach((e=>{e()})),r([]))}),[t]);const n=React149.useCallback((t=>function(n){var i;uuid4+=1;const o=React149.createRef();let a;const s=new Promise((e=>{a=e}));let l,u=!1;const c=React149.createElement(HookModal_default,{key:`modal-${uuid4}`,config:t(n),ref:o,afterClose:()=>{null==l||l()},isSilent:()=>u,onConfirm:e=>{a(e)}});return l=null===(i=e.current)||void 0===i?void 0:i.patchElement(c),l&&destroyFns_default.push(l),{destroy:()=>{function e(){var e;null===(e=o.current)||void 0===e||e.destroy()}o.current?e():r((t=>[].concat(_toConsumableArray(t),[e])))},update:e=>{function t(){var t;null===(t=o.current)||void 0===t||t.update(e)}o.current?t():r((e=>[].concat(_toConsumableArray(e),[t])))},then:e=>(u=!0,s.then(e))}}),[]);return[React149.useMemo((()=>({info:n(withInfo),success:n(withSuccess),error:n(withError),warning:n(withWarn),confirm:n(withConfirm)})),[]),React149.createElement(ElementsHolder,{key:\"modal-holder\",ref:e})]}var useModal_default=useModal;init_globals();var import_react58=__toESM(require_react()),AppConfigContext=import_react58.default.createContext({});init_globals();var React151=__toESM(require_react());function withPureRenderTheme(e){return t=>React151.createElement(config_provider_default,{theme:{token:{motion:!1,zIndexPopupBase:0}}},React151.createElement(e,Object.assign({},t)))}var genPurePanel=(e,t,r,n)=>withPureRenderTheme((i=>{const{prefixCls:o,style:a}=i,s=React151.useRef(null),[l,u]=React151.useState(0),[c,d]=React151.useState(0),[h,f]=useMergedState(!1,{value:i.open}),{getPrefixCls:p}=React151.useContext(ConfigContext),m=p(t||\"select\",o);React151.useEffect((()=>{if(f(!0),\"undefined\"!=typeof ResizeObserver){const e=new ResizeObserver((e=>{const t=e[0].target;u(t.offsetHeight+8),d(t.offsetWidth)})),t=setInterval((()=>{var n;const i=r?`.${r(m)}`:`.${m}-dropdown`,o=null===(n=s.current)||void 0===n?void 0:n.querySelector(i);o&&(clearInterval(t),e.observe(o))}),10);return()=>{clearInterval(t),e.disconnect()}}}),[]);let g=Object.assign(Object.assign({},i),{style:Object.assign(Object.assign({},a),{margin:0}),open:h,visible:h,getPopupContainer:()=>s.current});n&&(g=n(g));const _={paddingBottom:l,position:\"relative\",minWidth:c};return React151.createElement(\"div\",{ref:s,style:_},React151.createElement(e,Object.assign({},g)))})),PurePanel_default2=genPurePanel;init_globals();var isMobile_default=function(){if(\"undefined\"==typeof navigator||\"undefined\"==typeof window)return!1;var e=navigator.userAgent||navigator.vendor||window.opera;return/(android|bb\\d+|meego).+mobile|avantgo|bada\\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(null==e?void 0:e.substr(0,4))};init_globals(),init_globals();var React156=__toESM(require_react()),import_react60=__toESM(require_react()),import_classnames38=__toESM(require_classnames());init_globals();var React152=__toESM(require_react()),import_classnames36=__toESM(require_classnames()),_excluded13=[\"prefixCls\",\"invalidate\",\"item\",\"renderItem\",\"responsive\",\"responsiveDisabled\",\"registerSize\",\"itemKey\",\"className\",\"style\",\"children\",\"display\",\"order\",\"component\"],UNDEFINED=void 0;function InternalItem(e,t){var r=e.prefixCls,n=e.invalidate,i=e.item,o=e.renderItem,a=e.responsive,s=e.responsiveDisabled,l=e.registerSize,u=e.itemKey,c=e.className,d=e.style,h=e.children,f=e.display,p=e.order,m=e.component,g=void 0===m?\"div\":m,_=_objectWithoutProperties(e,_excluded13),b=a&&!f;function y(e){l(u,e)}React152.useEffect((function(){return function(){y(null)}}),[]);var v,A=o&&i!==UNDEFINED?o(i):h;n||(v={opacity:b?0:1,height:b?0:UNDEFINED,overflowY:b?\"hidden\":UNDEFINED,order:a?p:UNDEFINED,pointerEvents:b?\"none\":UNDEFINED,position:b?\"absolute\":UNDEFINED});var w={};b&&(w[\"aria-hidden\"]=!0);var S=React152.createElement(g,_extends({className:(0,import_classnames36.default)(!n&&r,c),style:_objectSpread2(_objectSpread2({},v),d)},w,_,{ref:t}),A);return a&&(S=React152.createElement(es_default,{onResize:function(e){y(e.offsetWidth)},disabled:s},S)),S}var Item=React152.forwardRef(InternalItem);Item.displayName=\"Item\";var Item_default=Item;init_globals();var React153=__toESM(require_react()),import_react_dom4=__toESM(require_react_dom());function channelUpdate(e){if(\"undefined\"==typeof MessageChannel)raf_default(e);else{var t=new MessageChannel;t.port1.onmessage=function(){return e()},t.port2.postMessage(void 0)}}function useBatcher(){var e=React153.useRef(null);return function(t){e.current||(e.current=[],channelUpdate((function(){(0,import_react_dom4.unstable_batchedUpdates)((function(){e.current.forEach((function(e){e()})),e.current=null}))}))),e.current.push(t)}}function useEffectState(e,t){var r=_slicedToArray(React153.useState(t),2),n=r[0],i=r[1];return[n,useEvent((function(t){e((function(){i(t)}))}))]}init_globals(),init_globals();var React155=__toESM(require_react()),import_classnames37=__toESM(require_classnames());init_globals();var import_react59=__toESM(require_react()),OverflowContext=import_react59.default.createContext(null),_excluded14=[\"component\"],_excluded24=[\"className\"],_excluded32=[\"className\"],InternalRawItem=function(e,t){var r=React155.useContext(OverflowContext);if(!r){var n=e.component,i=void 0===n?\"div\":n,o=_objectWithoutProperties(e,_excluded14);return React155.createElement(i,_extends({},o,{ref:t}))}var a=r.className,s=_objectWithoutProperties(r,_excluded24),l=e.className,u=_objectWithoutProperties(e,_excluded32);return React155.createElement(OverflowContext.Provider,{value:null},React155.createElement(Item_default,_extends({ref:t,className:(0,import_classnames37.default)(a,l)},s,u)))},RawItem=React155.forwardRef(InternalRawItem);RawItem.displayName=\"RawItem\";var RawItem_default=RawItem,_excluded15=[\"prefixCls\",\"data\",\"renderItem\",\"renderRawItem\",\"itemKey\",\"itemWidth\",\"ssr\",\"style\",\"className\",\"maxCount\",\"renderRest\",\"renderRawRest\",\"suffix\",\"component\",\"itemComponent\",\"onVisibleChange\"],RESPONSIVE=\"responsive\",INVALIDATE=\"invalidate\";function defaultRenderRest(e){return\"+ \".concat(e.length,\" ...\")}function Overflow(e,t){var r=e.prefixCls,n=void 0===r?\"rc-overflow\":r,i=e.data,o=void 0===i?[]:i,a=e.renderItem,s=e.renderRawItem,l=e.itemKey,u=e.itemWidth,c=void 0===u?10:u,d=e.ssr,h=e.style,f=e.className,p=e.maxCount,m=e.renderRest,g=e.renderRawRest,_=e.suffix,b=e.component,y=void 0===b?\"div\":b,v=e.itemComponent,A=e.onVisibleChange,w=_objectWithoutProperties(e,_excluded15),S=\"full\"===d,E=useBatcher(),x=_slicedToArray(useEffectState(E,null),2),C=x[0],T=x[1],R=C||0,I=_slicedToArray(useEffectState(E,new Map),2),k=I[0],P=I[1],M=_slicedToArray(useEffectState(E,0),2),O=M[0],B=M[1],N=_slicedToArray(useEffectState(E,0),2),j=N[0],L=N[1],D=_slicedToArray(useEffectState(E,0),2),F=D[0],U=D[1],z=_slicedToArray((0,import_react60.useState)(null),2),q=z[0],G=z[1],H=_slicedToArray((0,import_react60.useState)(null),2),W=H[0],V=H[1],$=React156.useMemo((function(){return null===W&&S?Number.MAX_SAFE_INTEGER:W||0}),[W,C]),K=_slicedToArray((0,import_react60.useState)(!1),2),X=K[0],Y=K[1],J=\"\".concat(n,\"-item\"),Q=Math.max(O,j),Z=p===RESPONSIVE,ee=o.length&&Z,te=p===INVALIDATE,re=ee||\"number\"==typeof p&&o.length>p,ne=(0,import_react60.useMemo)((function(){var e=o;return ee?e=null===C&&S?o:o.slice(0,Math.min(o.length,R/c)):\"number\"==typeof p&&(e=o.slice(0,p)),e}),[o,c,C,p,ee]),ie=(0,import_react60.useMemo)((function(){return ee?o.slice($+1):o.slice(ne.length)}),[o,ne,ee,$]),oe=(0,import_react60.useCallback)((function(e,t){var r;return\"function\"==typeof l?l(e):null!==(r=l&&(null==e?void 0:e[l]))&&void 0!==r?r:t}),[l]),ae=(0,import_react60.useCallback)(a||function(e){return e},[a]);function se(e,t,r){(W!==e||void 0!==t&&t!==q)&&(V(e),r||(Y(e__left_angle_mark_o.length-1),null==A||A(e)),void 0!==t&&G(t))}function le(e,t){P((function(r){var n=new Map(r);return null===t?n.delete(e):n.set(e,t),n}))}function ue(e){return k.get(oe(ne[e],e))}useLayoutEffect_default((function(){if(R&&\"number\"==typeof Q&&ne){var e=F,t=ne.length,r=t-1;if(!t)return void se(0,null);for(var n=0;n__left_angle_mark_t;n+=1){var i=ue(n);if(S&&(i=i||0),void 0===i){se(n-1,void 0,!0);break}if(e+=i,0===r&&e__left_angle_mark_=R||n===r-1&&e+ue(r)__left_angle_mark_=R){se(r,null);break}if(e+Q>R){se(n-1,e-i-F+j);break}}_&&ue(0)+F>R&&G(null)}}),[R,k,j,F,oe,ne]);var ce=X&&!!ie.length,de={};null!==q&&ee&&(de={position:\"absolute\",left:q,top:0});var he,fe={prefixCls:J,responsive:ee,component:v,invalidate:te},pe=s?function(e,t){var r=oe(e,t);return React156.createElement(OverflowContext.Provider,{key:r,value:_objectSpread2(_objectSpread2({},fe),{},{order:t,item:e,itemKey:r,registerSize:le,display:t__left_angle_mark_=$})},s(e,t))}:function(e,t){var r=oe(e,t);return React156.createElement(Item_default,_extends({},fe,{order:t,key:r,item:e,renderItem:ae,itemKey:r,registerSize:le,display:t__left_angle_mark_=$}))},me={order:ce?$:Number.MAX_SAFE_INTEGER,className:\"\".concat(J,\"-rest\"),registerSize:function(e,t){L(t),B(j)},display:ce};if(g)g&&(he=React156.createElement(OverflowContext.Provider,{value:_objectSpread2(_objectSpread2({},fe),me)},g(ie)));else{var ge=m||defaultRenderRest;he=React156.createElement(Item_default,_extends({},fe,me),\"function\"==typeof ge?ge(ie):ge)}var _e=React156.createElement(y,_extends({className:(0,import_classnames38.default)(!te&&n,f),style:h,ref:t},w),ne.map(pe),re?he:null,_&&React156.createElement(Item_default,_extends({},fe,{responsive:Z,responsiveDisabled:!ee,order:$,className:\"\".concat(J,\"-suffix\"),registerSize:function(e,t){U(t)},display:!0,style:de}),_));return Z&&(_e=React156.createElement(es_default,{onResize:function(e,t){T(t.clientWidth)},disabled:!ee},_e)),_e}var ForwardOverflow=React156.forwardRef(Overflow);ForwardOverflow.displayName=\"Overflow\",ForwardOverflow.Item=RawItem_default,ForwardOverflow.RESPONSIVE=RESPONSIVE,ForwardOverflow.INVALIDATE=INVALIDATE;var Overflow_default=ForwardOverflow,es_default7=Overflow_default;init_globals();var import_classnames42=__toESM(require_classnames()),React166=__toESM(require_react());init_globals();var import_classnames41=__toESM(require_classnames()),React160=__toESM(require_react());init_globals();var import_classnames39=__toESM(require_classnames()),React157=__toESM(require_react());function Arrow(e){var t=e.prefixCls,r=e.align,n=e.arrow,i=e.arrowPos,o=n||{},a=o.className,s=o.content,l=i.x,u=void 0===l?0:l,c=i.y,d=void 0===c?0:c,h=React157.useRef();if(!r||!r.points)return null;var f={position:\"absolute\"};if(!1!==r.autoArrow){var p=r.points[0],m=r.points[1],g=p[0],_=p[1],b=m[0],y=m[1];g!==b&&[\"t\",\"b\"].includes(g)?\"t\"===g?f.top=0:f.bottom=0:f.top=d,_!==y&&[\"l\",\"r\"].includes(_)?\"l\"===_?f.left=0:f.right=0:f.left=u}return React157.createElement(\"div\",{ref:h,className:(0,import_classnames39.default)(\"\".concat(t,\"-arrow\"),a),style:f},s)}init_globals();var import_classnames40=__toESM(require_classnames()),React158=__toESM(require_react());function Mask3(e){var t=e.prefixCls,r=e.open,n=e.zIndex,i=e.mask,o=e.motion;return i?React158.createElement(es_default2,_extends({},o,{motionAppear:!0,visible:r,removeOnLeave:!0}),(function(e){var r=e.className;return React158.createElement(\"div\",{style:{zIndex:n},className:(0,import_classnames40.default)(\"\".concat(t,\"-mask\"),r)})})):null}init_globals();var React159=__toESM(require_react()),PopupContent=React159.memo((function(e){return e.children}),(function(e,t){return t.cache}));PopupContent.displayName=\"PopupContent\";var PopupContent_default=PopupContent,Popup=React160.forwardRef((function(e,t){var r=e.popup,n=e.className,i=e.prefixCls,o=e.style,a=e.target,s=e.onVisibleChanged,l=e.open,u=e.keepDom,c=e.fresh,d=e.onClick,h=e.mask,f=e.arrow,p=e.arrowPos,m=e.align,g=e.motion,_=e.maskMotion,b=e.forceRender,y=e.getPopupContainer,v=e.autoDestroy,A=e.portal,w=e.zIndex,S=e.onMouseEnter,E=e.onMouseLeave,x=e.onPointerEnter,C=e.ready,T=e.offsetX,R=e.offsetY,I=e.offsetR,k=e.offsetB,P=e.onAlign,M=e.onPrepare,O=e.stretch,B=e.targetWidth,N=e.targetHeight,j=\"function\"==typeof r?r():r,L=l||u,D=(null==y?void 0:y.length)>0,F=_slicedToArray(React160.useState(!y||!D),2),U=F[0],z=F[1];if(useLayoutEffect_default((function(){!U&&D&&a&&z(!0)}),[U,D,a]),!U)return null;var q=\"auto\",G={left:\"-1000vw\",top:\"-1000vh\",right:q,bottom:q};if(C||!l){var H,W=m.points,V=m.dynamicInset||(null===(H=m._experimental)||void 0===H?void 0:H.dynamicInset),$=V&&\"r\"===W[0][1],K=V&&\"b\"===W[0][0];$?(G.right=I,G.left=q):(G.left=T,G.right=q),K?(G.bottom=k,G.top=q):(G.top=R,G.bottom=q)}var X={};return O&&(O.includes(\"height\")&&N?X.height=N:O.includes(\"minHeight\")&&N&&(X.minHeight=N),O.includes(\"width\")&&B?X.width=B:O.includes(\"minWidth\")&&B&&(X.minWidth=B)),l||(X.pointerEvents=\"none\"),React160.createElement(A,{open:b||L,getContainer:y&&function(){return y(a)},autoDestroy:v},React160.createElement(Mask3,{prefixCls:i,open:l,zIndex:w,mask:h,motion:_}),React160.createElement(es_default,{onResize:P,disabled:!l},(function(e){return React160.createElement(es_default2,_extends({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:b,leavedClassName:\"\".concat(i,\"-hidden\")},g,{onAppearPrepare:M,onEnterPrepare:M,visible:l,onVisibleChanged:function(e){var t;null==g||null===(t=g.onVisibleChanged)||void 0===t||t.call(g,e),s(e)}}),(function(r,a){var s=r.className,u=r.style,h=(0,import_classnames41.default)(i,s,n);return React160.createElement(\"div\",{ref:composeRef(e,t,a),className:h,style:_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({\"--arrow-x\":\"\".concat(p.x||0,\"px\"),\"--arrow-y\":\"\".concat(p.y||0,\"px\")},G),X),u),{},{boxSizing:\"border-box\",zIndex:w},o),onMouseEnter:S,onMouseLeave:E,onPointerEnter:x,onClick:d},f&&React160.createElement(Arrow,{prefixCls:i,arrow:f,arrowPos:p,align:m}),React160.createElement(PopupContent_default,{cache:!l&&!c},j))}))})))}));Popup.displayName=\"Popup\";var Popup_default=Popup;init_globals();var React161=__toESM(require_react()),TriggerWrapper=React161.forwardRef((function(e,t){var r=e.children,n=e.getTriggerDOMNode,i=supportRef(r),o=React161.useCallback((function(e){fillRef(t,n?n(e):e)}),[n]),a=useComposeRef(o,r.ref);return i?React161.cloneElement(r,{ref:a}):r}));TriggerWrapper.displayName=\"TriggerWrapper\";var TriggerWrapper_default=TriggerWrapper;init_globals();var React162=__toESM(require_react()),TriggerContext=React162.createContext(null),context_default2=TriggerContext;init_globals();var React163=__toESM(require_react());function toArray3(e){return e?Array.isArray(e)?e:[e]:[]}function useAction(e,t,r,n){return React163.useMemo((function(){var i=toArray3(null!=r?r:t),o=toArray3(null!=n?n:t),a=new Set(i),s=new Set(o);return e&&(a.has(\"hover\")&&(a.delete(\"hover\"),a.add(\"click\")),s.has(\"hover\")&&(s.delete(\"hover\"),s.add(\"click\"))),[a,s]}),[e,t,r,n])}init_globals();var React164=__toESM(require_react());function isPointsEq(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return(arguments.length>2?arguments[2]:void 0)?e[0]===t[0]:e[0]===t[0]&&e[1]===t[1]}function getAlignPopupClassName(e,t,r,n){for(var i=r.points,o=Object.keys(e),a=0;a__left_angle_mark_o.length;a+=1){var s,l=o[a];if(isPointsEq(null===(s=e[l])||void 0===s?void 0:s.points,i,n))return\"\".concat(t,\"-placement-\").concat(l)}return\"\"}function getMotion2(e,t,r,n){return t||(r?{motionName:\"\".concat(e,\"-\").concat(r)}:n?{motionName:n}:null)}function getWin(e){return e.ownerDocument.defaultView}function collectScroller(e){for(var t=[],r=null==e?void 0:e.parentElement,n=[\"hidden\",\"scroll\",\"clip\",\"auto\"];r;){var i=getWin(r).getComputedStyle(r);[i.overflowX,i.overflowY,i.overflow].some((function(e){return n.includes(e)}))&&t.push(r),r=r.parentElement}return t}function toNum(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return Number.isNaN(e)?t:e}function getPxValue(e){return toNum(parseFloat(e),0)}function getVisibleArea(e,t){var r=_objectSpread2({},e);return(t||[]).forEach((function(e){if(!(e instanceof HTMLBodyElement||e instanceof HTMLHtmlElement)){var t=getWin(e).getComputedStyle(e),n=t.overflow,i=t.overflowClipMargin,o=t.borderTopWidth,a=t.borderBottomWidth,s=t.borderLeftWidth,l=t.borderRightWidth,u=e.getBoundingClientRect(),c=e.offsetHeight,d=e.clientHeight,h=e.offsetWidth,f=e.clientWidth,p=getPxValue(o),m=getPxValue(a),g=getPxValue(s),_=getPxValue(l),b=toNum(Math.round(u.width/h*1e3)/1e3),y=toNum(Math.round(u.height/c*1e3)/1e3),v=(h-f-g-_)*b,A=(c-d-p-m)*y,w=p*y,S=m*y,E=g*b,x=_*b,C=0,T=0;if(\"clip\"===n){var R=getPxValue(i);C=R*b,T=R*y}var I=u.x+E-C,k=u.y+w-T,P=I+u.width+2*C-E-x-v,M=k+u.height+2*T-w-S-A;r.left=Math.max(r.left,I),r.top=Math.max(r.top,k),r.right=Math.min(r.right,P),r.bottom=Math.min(r.bottom,M)}})),r}function getUnitOffset(e){var t=\"\".concat(arguments.length>1&&void 0!==arguments[1]?arguments[1]:0),r=t.match(/^(.*)\\%$/);return r?e*(parseFloat(r[1])/100):parseFloat(t)}function getNumberOffset(e,t){var r=_slicedToArray(t||[],2),n=r[0],i=r[1];return[getUnitOffset(e.width,n),getUnitOffset(e.height,i)]}function splitPoints(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:\"\";return[e[0],e[1]]}function getAlignPoint(e,t){var r,n=t[0],i=t[1];return r=\"t\"===n?e.y:\"b\"===n?e.y+e.height:e.y+e.height/2,{x:\"l\"===i?e.x:\"r\"===i?e.x+e.width:e.x+e.width/2,y:r}}function reversePoints(e,t){var r={t:\"b\",b:\"t\",l:\"r\",r:\"l\"};return e.map((function(e,n){return n===t?r[e]||\"c\":e})).join(\"\")}function useAlign(e,t,r,n,i,o,a){var s=_slicedToArray(React164.useState({ready:!1,offsetX:0,offsetY:0,offsetR:0,offsetB:0,arrowX:0,arrowY:0,scaleX:1,scaleY:1,align:i[n]||{}}),2),l=s[0],u=s[1],c=React164.useRef(0),d=React164.useMemo((function(){return t?collectScroller(t):[]}),[t]),h=React164.useRef({});e||(h.current={});var f=useEvent((function(){if(t&&r&&e){let e=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:J,n=P.x+e,i=P.y+t,o=n+U,a=i+F,s=Math.max(n,r.left),l=Math.max(i,r.top),u=Math.min(o,r.right),c=Math.min(a,r.bottom);return Math.max(0,(u-s)*(c-l))},dt=function(){ce=P.y+we,de=ce+F,he=P.x+Ae,fe=he+U};var s,l,c,f,p,m=t,g=m.ownerDocument,_=getWin(m).getComputedStyle(m),b=_.width,y=_.height,v=_.position,A=m.style.left,w=m.style.top,S=m.style.right,E=m.style.bottom,x=m.style.overflow,C=_objectSpread2(_objectSpread2({},i[n]),o),T=g.createElement(\"div\");if(null===(s=m.parentElement)||void 0===s||s.appendChild(T),T.style.left=\"\".concat(m.offsetLeft,\"px\"),T.style.top=\"\".concat(m.offsetTop,\"px\"),T.style.position=v,T.style.height=\"\".concat(m.offsetHeight,\"px\"),T.style.width=\"\".concat(m.offsetWidth,\"px\"),m.style.left=\"0\",m.style.top=\"0\",m.style.right=\"auto\",m.style.bottom=\"auto\",m.style.overflow=\"hidden\",Array.isArray(r))p={x:r[0],y:r[1],width:0,height:0};else{var R,I,k=r.getBoundingClientRect();k.x=null!==(R=k.x)&&void 0!==R?R:k.left,k.y=null!==(I=k.y)&&void 0!==I?I:k.top,p={x:k.x,y:k.y,width:k.width,height:k.height}}var P=m.getBoundingClientRect();P.x=null!==(l=P.x)&&void 0!==l?l:P.left,P.y=null!==(c=P.y)&&void 0!==c?c:P.top;var M=g.documentElement,O=M.clientWidth,B=M.clientHeight,N=M.scrollWidth,j=M.scrollHeight,L=M.scrollTop,D=M.scrollLeft,F=P.height,U=P.width,z=p.height,q=p.width,G={left:0,top:0,right:O,bottom:B},H={left:-D,top:-L,right:N-D,bottom:j-L},W=C.htmlRegion,V=\"visible\",$=\"visibleFirst\";\"scroll\"!==W&&W!==&(W=V);var K=W===$,X=getVisibleArea(H,d),Y=getVisibleArea(G,d),J=W===V?Y:X,Q=K?Y:J;m.style.left=\"auto\",m.style.top=\"auto\",m.style.right=\"0\",m.style.bottom=\"0\";var Z=m.getBoundingClientRect();m.style.left=A,m.style.top=w,m.style.right=S,m.style.bottom=E,m.style.overflow=x,null===(f=m.parentElement)||void 0===f||f.removeChild(T);var ee=toNum(Math.round(U/parseFloat(b)*1e3)/1e3),te=toNum(Math.round(F/parseFloat(y)*1e3)/1e3);if(0===ee||0===te||isDOM(r)&&!isVisible_default(r))return;var re=C.offset,ne=C.targetOffset,ie=_slicedToArray(getNumberOffset(P,re),2),oe=ie[0],ae=ie[1],se=_slicedToArray(getNumberOffset(p,ne),2),le=se[0],ue=se[1];p.x-=le,p.y-=ue;var ce,de,he,fe,pe=_slicedToArray(C.points||[],2),me=pe[0],ge=splitPoints(pe[1]),_e=splitPoints(me),be=getAlignPoint(p,ge),ye=getAlignPoint(P,_e),ve=_objectSpread2({},C),Ae=be.x-ye.x+oe,we=be.y-ye.y+ae,Se=e(Ae,we),Ee=e(Ae,we,Y),xe=getAlignPoint(p,[\"t\",\"l\"]),Ce=getAlignPoint(P,[\"t\",\"l\"]),Te=getAlignPoint(p,[\"b\",\"r\"]),Re=getAlignPoint(P,[\"b\",\"r\"]),Ie=C.overflow||{},ke=Ie.adjustX,Pe=Ie.adjustY,Me=Ie.shiftX,Oe=Ie.shiftY,Be=function(e){return\"boolean\"==typeof e?e:e>=0};dt();var Ne=Be(Pe),je=_e[0]===ge[0];if(Ne&&\"t\"===_e[0]&&(de>Q.bottom||h.current.bt)){var Le=we;je?Le-=F-z:Le=xe.y-Re.y-ae;var De=e(Ae,Le),Fe=e(Ae,Le,Y);De>Se||De===Se&&(!K||Fe>=Ee)?(h.current.bt=!0,we=Le,ae=-ae,ve.points=[reversePoints(_e,0),reversePoints(ge,0)]):h.current.bt=!1}if(Ne&&\"b\"===_e[0]&&(ce__left_angle_mark_Q.top||h.current.tb)){var Ue=we;je?Ue+=F-z:Ue=Te.y-Ce.y-ae;var ze=e(Ae,Ue),qe=e(Ae,Ue,Y);ze>Se||ze===Se&&(!K||qe>=Ee)?(h.current.tb=!0,we=Ue,ae=-ae,ve.points=[reversePoints(_e,0),reversePoints(ge,0)]):h.current.tb=!1}var Ge=Be(ke),He=_e[1]===ge[1];if(Ge&&\"l\"===_e[1]&&(fe>Q.right||h.current.rl)){var We=Ae;He?We-=U-q:We=xe.x-Re.x-oe;var Ve=e(We,we),$e=e(We,we,Y);Ve>Se||Ve===Se&&(!K||$e>=Ee)?(h.current.rl=!0,Ae=We,oe=-oe,ve.points=[reversePoints(_e,1),reversePoints(ge,1)]):h.current.rl=!1}if(Ge&&\"r\"===_e[1]&&(he__left_angle_mark_Q.left||h.current.lr)){var Ke=Ae;He?Ke+=U-q:Ke=Te.x-Ce.x-oe;var Xe=e(Ke,we),Ye=e(Ke,we,Y);Xe>Se||Xe===Se&&(!K||Ye>=Ee)?(h.current.lr=!0,Ae=Ke,oe=-oe,ve.points=[reversePoints(_e,1),reversePoints(ge,1)]):h.current.lr=!1}dt();var Je=!0===Me?0:Me;\"number\"==typeof Je&&(he__left_angle_mark_Y.left&&(Ae-=he-Y.left-oe,p.x+q__left_angle_mark_Y.left+Je&&(Ae+=p.x-Y.left+q-Je)),fe>Y.right&&(Ae-=fe-Y.right-oe,p.x>Y.right-Je&&(Ae+=p.x-Y.right+Je)));var Qe=!0===Oe?0:Oe;\"number\"==typeof Qe&&(ce__left_angle_mark_Y.top&&(we-=ce-Y.top-ae,p.y+z__left_angle_mark_Y.top+Qe&&(we+=p.y-Y.top+z-Qe)),de>Y.bottom&&(we-=de-Y.bottom-ae,p.y>Y.bottom-Qe&&(we+=p.y-Y.bottom+Qe)));var Ze=P.x+Ae,et=Ze+U,tt=P.y+we,rt=tt+F,nt=p.x,it=nt+q,ot=p.y,at=ot+z,st=(Math.max(Ze,nt)+Math.min(et,it))/2-Ze,lt=(Math.max(tt,ot)+Math.min(rt,at))/2-tt;null==a||a(t,ve);var ut=Z.right-P.x-(Ae+P.width),ct=Z.bottom-P.y-(we+P.height);1===ee&&(Ae=Math.round(Ae),ut=Math.round(ut)),1===te&&(we=Math.round(we),ct=Math.round(ct)),u({ready:!0,offsetX:Ae/ee,offsetY:we/te,offsetR:ut/ee,offsetB:ct/te,arrowX:st/ee,arrowY:lt/te,scaleX:ee,scaleY:te,align:ve})}})),p=function(){u((function(e){return _objectSpread2(_objectSpread2({},e),{},{ready:!1})}))};return useLayoutEffect_default(p,[n]),useLayoutEffect_default((function(){e||p()}),[e]),[l.ready,l.offsetX,l.offsetY,l.offsetR,l.offsetB,l.arrowX,l.arrowY,l.scaleX,l.scaleY,l.align,function(){c.current+=1;var e=c.current;Promise.resolve().then((function(){c.current===e&&f()}))}]}function useWatch2(e,t,r,n,i){useLayoutEffect_default((function(){if(e&&t&&r){let e=function(){n(),i()};var o=r,a=collectScroller(t),s=collectScroller(o),l=getWin(o),u=new Set([l].concat(_toConsumableArray(a),_toConsumableArray(s)));return u.forEach((function(t){t.addEventListener(\"scroll\",e,{passive:!0})})),l.addEventListener(\"resize\",e,{passive:!0}),n(),function(){u.forEach((function(t){t.removeEventListener(\"scroll\",e),l.removeEventListener(\"resize\",e)}))}}}),[e,t,r])}init_globals(),init_globals(),init_globals();var React165=__toESM(require_react());function useWinClick(e,t,r,n,i,o,a,s){var l=React165.useRef(e);l.current=e,React165.useEffect((function(){if(t&&n&&(!i||o)){var e=function(e){var t;l.current&&!a((null===(t=e.composedPath)||void 0===t||null===(t=t.call(e))||void 0===t?void 0:t[0])||e.target)&&s(!1)},u=getWin(n);u.addEventListener(\"mousedown\",e,!0),u.addEventListener(\"contextmenu\",e,!0);var c,d,h=getShadowRoot(r);return h&&(h.addEventListener(\"mousedown\",e,!0),h.addEventListener(\"contextmenu\",e,!0)),warning((null==r||null===(c=r.getRootNode)||void 0===c?void 0:c.call(r))===(null===(d=n.getRootNode)||void 0===d?void 0:d.call(n)),\"trigger element and popup element should in same shadow root.\"),function(){u.removeEventListener(\"mousedown\",e,!0),u.removeEventListener(\"contextmenu\",e,!0),h&&(h.removeEventListener(\"mousedown\",e,!0),h.removeEventListener(\"contextmenu\",e,!0))}}}),[t,r,n,i,o])}var _excluded16=[\"prefixCls\",\"children\",\"action\",\"showAction\",\"hideAction\",\"popupVisible\",\"defaultPopupVisible\",\"onPopupVisibleChange\",\"afterPopupVisibleChange\",\"mouseEnterDelay\",\"mouseLeaveDelay\",\"focusDelay\",\"blurDelay\",\"mask\",\"maskClosable\",\"getPopupContainer\",\"forceRender\",\"autoDestroy\",\"destroyPopupOnHide\",\"popup\",\"popupClassName\",\"popupStyle\",\"popupPlacement\",\"builtinPlacements\",\"popupAlign\",\"zIndex\",\"stretch\",\"getPopupClassNameFromAlign\",\"fresh\",\"alignPoint\",\"onPopupClick\",\"onPopupAlign\",\"arrow\",\"popupMotion\",\"maskMotion\",\"popupTransitionName\",\"popupAnimation\",\"maskTransitionName\",\"maskAnimation\",\"className\",\"getTriggerDOMNode\"];function generateTrigger(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:es_default3,t=React166.forwardRef((function(t,r){var n=t.prefixCls,i=void 0===n?\"rc-trigger-popup\":n,o=t.children,a=t.action,s=void 0===a?\"hover\":a,l=t.showAction,u=t.hideAction,c=t.popupVisible,d=t.defaultPopupVisible,h=t.onPopupVisibleChange,f=t.afterPopupVisibleChange,p=t.mouseEnterDelay,m=t.mouseLeaveDelay,g=void 0===m?.1:m,_=t.focusDelay,b=t.blurDelay,y=t.mask,v=t.maskClosable,A=void 0===v||v,w=t.getPopupContainer,S=t.forceRender,E=t.autoDestroy,x=t.destroyPopupOnHide,C=t.popup,T=t.popupClassName,R=t.popupStyle,I=t.popupPlacement,k=t.builtinPlacements,P=void 0===k?{}:k,M=t.popupAlign,O=t.zIndex,B=t.stretch,N=t.getPopupClassNameFromAlign,j=t.fresh,L=t.alignPoint,D=t.onPopupClick,F=t.onPopupAlign,U=t.arrow,z=t.popupMotion,q=t.maskMotion,G=t.popupTransitionName,H=t.popupAnimation,W=t.maskTransitionName,V=t.maskAnimation,$=t.className,K=t.getTriggerDOMNode,X=_objectWithoutProperties(t,_excluded16),Y=E||x||!1,J=_slicedToArray(React166.useState(!1),2),Q=J[0],Z=J[1];useLayoutEffect_default((function(){Z(isMobile_default())}),[]);var ee=React166.useRef({}),te=React166.useContext(context_default2),re=React166.useMemo((function(){return{registerSubPopup:function(e,t){ee.current[e]=t,null==te||te.registerSubPopup(e,t)}}}),[te]),ne=useId_default(),ie=_slicedToArray(React166.useState(null),2),oe=ie[0],ae=ie[1],se=React166.useRef(null),le=useEvent((function(e){se.current=e,isDOM(e)&&oe!==e&&ae(e),null==te||te.registerSubPopup(ne,e)})),ue=_slicedToArray(React166.useState(null),2),ce=ue[0],de=ue[1],he=React166.useRef(null),fe=useEvent((function(e){isDOM(e)&&ce!==e&&(de(e),he.current=e)})),pe=React166.Children.only(o),me=(null==pe?void 0:pe.props)||{},ge={},_e=useEvent((function(e){var t,r,n=ce;return(null==n?void 0:n.contains(e))||(null===(t=getShadowRoot(n))||void 0===t?void 0:t.host)===e||e===n||(null==oe?void 0:oe.contains(e))||(null===(r=getShadowRoot(oe))||void 0===r?void 0:r.host)===e||e===oe||Object.values(ee.current).some((function(t){return(null==t?void 0:t.contains(e))||e===t}))})),be=getMotion2(i,z,H,G),ye=getMotion2(i,q,V,W),ve=_slicedToArray(React166.useState(d||!1),2),Ae=ve[0],we=ve[1],Se=null!=c?c:Ae,Ee=useEvent((function(e){void 0===c&&we(e)}));useLayoutEffect_default((function(){we(c||!1)}),[c]);var xe=React166.useRef(Se);xe.current=Se;var Ce=React166.useRef([]);Ce.current=[];var Te=useEvent((function(e){var t;Ee(e),(null!==(t=Ce.current[Ce.current.length-1])&&void 0!==t?t:Se)!==e&&(Ce.current.push(e),null==h||h(e))})),Re=React166.useRef(),Ie=function(){clearTimeout(Re.current)},ke=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;Ie(),0===t?Te(e):Re.current=setTimeout((function(){Te(e)}),1e3*t)};React166.useEffect((function(){return Ie}),[]);var Pe=_slicedToArray(React166.useState(!1),2),Me=Pe[0],Oe=Pe[1];useLayoutEffect_default((function(e){e&&!Se||Oe(!0)}),[Se]);var Be=_slicedToArray(React166.useState(null),2),Ne=Be[0],je=Be[1],Le=_slicedToArray(React166.useState(null),2),De=Le[0],Fe=Le[1],Ue=function(e){Fe([e.clientX,e.clientY])},ze=_slicedToArray(useAlign(Se,oe,L&&null!==De?De:ce,I,P,M,F),11),qe=ze[0],Ge=ze[1],He=ze[2],We=ze[3],Ve=ze[4],$e=ze[5],Ke=ze[6],Xe=ze[7],Ye=ze[8],Je=ze[9],Qe=ze[10],Ze=_slicedToArray(useAction(Q,s,l,u),2),et=Ze[0],tt=Ze[1],rt=et.has(\"click\"),nt=tt.has(\"click\")||tt.has(\"contextMenu\"),it=useEvent((function(){Me||Qe()}));useWatch2(Se,ce,oe,it,(function(){xe.current&&L&&nt&&ke(!1)})),useLayoutEffect_default((function(){it()}),[De,I]),useLayoutEffect_default((function(){!Se||null!=P&&P[I]||it()}),[JSON.stringify(M)]);var ot=React166.useMemo((function(){var e=getAlignPopupClassName(P,i,Je,L);return(0,import_classnames42.default)(e,null==N?void 0:N(Je))}),[Je,N,P,i,L]);React166.useImperativeHandle(r,(function(){return{nativeElement:he.current,popupElement:se.current,forceAlign:it}}));var at=_slicedToArray(React166.useState(0),2),st=at[0],lt=at[1],ut=_slicedToArray(React166.useState(0),2),ct=ut[0],dt=ut[1],ht=function(){if(B&&ce){var e=ce.getBoundingClientRect();lt(e.width),dt(e.height)}};function ft(e,t,r,n){ge[e]=function(i){var o;null==n||n(i),ke(t,r);for(var a=arguments.length,s=new Array(a>1?a-1:0),l=1;l__left_angle_mark_a;l++)s[l-1]=arguments[l];null===(o=me[e])||void 0===o||o.call.apply(o,[me,i].concat(s))}}useLayoutEffect_default((function(){Ne&&(Qe(),Ne(),je(null))}),[Ne]),(rt||nt)&&(ge.onClick=function(e){var t;xe.current&&nt?ke(!1):!xe.current&&rt&&(Ue(e),ke(!0));for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i__left_angle_mark_r;i++)n[i-1]=arguments[i];null===(t=me.onClick)||void 0===t||t.call.apply(t,[me,e].concat(n))}),useWinClick(Se,nt,ce,oe,y,A,_e,ke);var pt,mt,gt=et.has(\"hover\"),_t=tt.has(\"hover\");gt&&(ft(\"onMouseEnter\",!0,p,(function(e){Ue(e)})),ft(\"onPointerEnter\",!0,p,(function(e){Ue(e)})),pt=function(e){(Se||Me)&&null!=oe&&oe.contains(e.target)&&ke(!0,p)},L&&(ge.onMouseMove=function(e){var t;null===(t=me.onMouseMove)||void 0===t||t.call(me,e)})),_t&&(ft(\"onMouseLeave\",!1,g),ft(\"onPointerLeave\",!1,g),mt=function(){ke(!1,g)}),et.has(\"focus\")&&ft(\"onFocus\",!0,_),tt.has(\"focus\")&&ft(\"onBlur\",!1,b),et.has(\"contextMenu\")&&(ge.onContextMenu=function(e){var t;xe.current&&tt.has(\"contextMenu\")?ke(!1):(Ue(e),ke(!0)),e.preventDefault();for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i__left_angle_mark_r;i++)n[i-1]=arguments[i];null===(t=me.onContextMenu)||void 0===t||t.call.apply(t,[me,e].concat(n))}),&(ge.className=(0,import_classnames42.default)(me.className,$));var bt=_objectSpread2(_objectSpread2({},me),ge),yt={};[\"onContextMenu\",\"onClick\",\"onMouseDown\",\"onTouchStart\",\"onMouseEnter\",\"onMouseLeave\",\"onFocus\",\"onBlur\"].forEach((function(e){X[e]&&(yt[e]=function(){for(var t,r=arguments.length,n=new Array(r),i=0;i__left_angle_mark_r;i++)n[i]=arguments[i];null===(t=bt[e])||void 0===t||t.call.apply(t,[bt].concat(n)),X[e].apply(X,n)})}));var vt=React166.cloneElement(pe,_objectSpread2(_objectSpread2({},bt),yt)),At={x:$e,y:Ke},wt=U?_objectSpread2({},!0!==U?U:{}):null;return React166.createElement(React166.Fragment,null,React166.createElement(es_default,{disabled:!Se,ref:fe,onResize:function(){ht(),it()}},React166.createElement(TriggerWrapper_default,{getTriggerDOMNode:K},vt)),React166.createElement(context_default2.Provider,{value:re},React166.createElement(Popup_default,{portal:e,ref:le,prefixCls:i,popup:C,className:(0,import_classnames42.default)(T,ot),style:R,target:ce,onMouseEnter:pt,onMouseLeave:mt,onPointerEnter:pt,zIndex:O,open:Se,keepDom:Me,fresh:j,onClick:D,mask:y,motion:be,maskMotion:ye,onVisibleChanged:function(e){Oe(!1),Qe(),null==f||f(e)},onPrepare:function(){return new Promise((function(e){ht(),je((function(){return e}))}))},forceRender:S,autoDestroy:Y,getPopupContainer:w,align:Je,arrow:wt,arrowPos:At,ready:qe,offsetX:Ge,offsetY:He,offsetR:We,offsetB:Ve,onAlign:it,stretch:B,targetWidth:st/Xe,targetHeight:ct/Ye})))}));return t.displayName=\"Trigger\",t}var es_default8=generateTrigger(es_default3);init_globals();var import_classnames43=__toESM(require_classnames());function getStatusClassNames(e,t,r){return(0,import_classnames43.default)({[`${e}-status-success`]:\"success\"===t,[`${e}-status-warning`]:\"warning\"===t,[`${e}-status-error`]:\"error\"===t,[`${e}-status-validating`]:\"validating\"===t,[`${e}-has-feedback`]:r})}var getMergedStatus=(e,t)=>t||e;init_globals();var React169=__toESM(require_react()),import_classnames44=__toESM(require_classnames());init_globals();var React167=__toESM(require_react()),Empty2=()=>{const[,e]=useToken(),[t]=useLocale_default(\"Empty\"),r=new TinyColor(e.colorBgBase).toHsl().l__left_angle_mark_.5?{opacity:.65}:{};return React167.createElement(\"svg\",{style:r,width:\"184\",height:\"152\",viewBox:\"0 0 184 152\",xmlns:\"http://www.w3.org/2000/svg\"},React167.createElement(\"title\",null,(null==t?void 0:t.description)||\"Empty\"),React167.createElement(\"g\",{fill:\"none\",fillRule:\"evenodd\"},React167.createElement(\"g\",{transform:\"translate(24 31.67)\"},React167.createElement(\"ellipse\",{fillOpacity:\".8\",fill:\"#F5F5F7\",cx:\"67.797\",cy:\"106.89\",rx:\"67.797\",ry:\"12.668\"}),React167.createElement(\"path\",{d:\"M122.034 69.674L98.109 40.229c-1.148-1.386-2.826-2.225-4.593-2.225h-51.44c-1.766 0-3.444.839-4.592 2.225L13.56 69.674v15.383h108.475V69.674z\",fill:\"#AEB8C2\"}),React167.createElement(\"path\",{d:\"M101.537 86.214L80.63 61.102c-1.001-1.207-2.507-1.867-4.048-1.867H31.724c-1.54 0-3.047.66-4.048 1.867L6.769 86.214v13.792h94.768V86.214z\",fill:\"url(#linearGradient-1)\",transform:\"translate(13.56)\"}),React167.createElement(\"path\",{d:\"M33.83 0h67.933a4 4 0 0 1 4 4v93.344a4 4 0 0 1-4 4H33.83a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z\",fill:\"#F5F5F7\"}),React167.createElement(\"path\",{d:\"M42.678 9.953h50.237a2 2 0 0 1 2 2V36.91a2 2 0 0 1-2 2H42.678a2 2 0 0 1-2-2V11.953a2 2 0 0 1 2-2zM42.94 49.767h49.713a2.262 2.262 0 1 1 0 4.524H42.94a2.262 2.262 0 0 1 0-4.524zM42.94 61.53h49.713a2.262 2.262 0 1 1 0 4.525H42.94a2.262 2.262 0 0 1 0-4.525zM121.813 105.032c-.775 3.071-3.497 5.36-6.735 5.36H20.515c-3.238 0-5.96-2.29-6.734-5.36a7.309 7.309 0 0 1-.222-1.79V69.675h26.318c2.907 0 5.25 2.448 5.25 5.42v.04c0 2.971 2.37 5.37 5.277 5.37h34.785c2.907 0 5.277-2.421 5.277-5.393V75.1c0-2.972 2.343-5.426 5.25-5.426h26.318v33.569c0 .617-.077 1.216-.221 1.789z\",fill:\"#DCE0E6\"})),React167.createElement(\"path\",{d:\"M149.121 33.292l-6.83 2.65a1 1 0 0 1-1.317-1.23l1.937-6.207c-2.589-2.944-4.109-6.534-4.109-10.408C138.802 8.102 148.92 0 161.402 0 173.881 0 184 8.102 184 18.097c0 9.995-10.118 18.097-22.599 18.097-4.528 0-8.744-1.066-12.28-2.902z\",fill:\"#DCE0E6\"}),React167.createElement(\"g\",{transform:\"translate(149.65 15.383)\",fill:\"#FFF\"},React167.createElement(\"ellipse\",{cx:\"20.654\",cy:\"3.167\",rx:\"2.849\",ry:\"2.815\"}),React167.createElement(\"path\",{d:\"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z\"}))))};Empty2.displayName=\"EmptyImage\";var empty_default=Empty2;init_globals();var React168=__toESM(require_react()),import_react61=__toESM(require_react()),Simple=()=>{const[,e]=useToken(),[t]=useLocale_default(\"Empty\"),{colorFill:r,colorFillTertiary:n,colorFillQuaternary:i,colorBgContainer:o}=e,{borderColor:a,shadowColor:s,contentColor:l}=(0,import_react61.useMemo)((()=>({borderColor:new TinyColor(r).onBackground(o).toHexShortString(),shadowColor:new TinyColor(n).onBackground(o).toHexShortString(),contentColor:new TinyColor(i).onBackground(o).toHexShortString()})),[r,n,i,o]);return React168.createElement(\"svg\",{width:\"64\",height:\"41\",viewBox:\"0 0 64 41\",xmlns:\"http://www.w3.org/2000/svg\"},React168.createElement(\"title\",null,(null==t?void 0:t.description)||\"Empty\"),React168.createElement(\"g\",{transform:\"translate(0 1)\",fill:\"none\",fillRule:\"evenodd\"},React168.createElement(\"ellipse\",{fill:s,cx:\"32\",cy:\"33\",rx:\"32\",ry:\"7\"}),React168.createElement(\"g\",{fillRule:\"nonzero\",stroke:a},React168.createElement(\"path\",{d:\"M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z\"}),React168.createElement(\"path\",{d:\"M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z\",fill:l}))))};Simple.displayName=\"SimpleImage\";var simple_default=Simple;init_globals();var genSharedEmptyStyle=e=>{const{componentCls:t,margin:r,marginXS:n,marginXL:i,fontSize:o,lineHeight:a}=e;return{[t]:{marginInline:n,fontSize:o,lineHeight:a,textAlign:\"center\",[`${t}-image`]:{height:e.emptyImgHeight,marginBottom:n,opacity:e.opacityImage,img:{height:\"100%\"},svg:{maxWidth:\"100%\",height:\"100%\",margin:\"auto\"}},[`${t}-description`]:{color:e.colorTextDescription},[`${t}-footer`]:{marginTop:r},\"&-normal\":{marginBlock:i,color:e.colorTextDescription,[`${t}-description`]:{color:e.colorTextDescription},[`${t}-image`]:{height:e.emptyImgHeightMD}},\"&-small\":{marginBlock:n,color:e.colorTextDescription,[`${t}-image`]:{height:e.emptyImgHeightSM}}}}},style_default8=genStyleHooks(\"Empty\",(e=>{const{componentCls:t,controlHeightLG:r,calc:n}=e,i=merge2(e,{emptyImgCls:`${t}-img`,emptyImgHeight:n(r).mul(2.5).equal(),emptyImgHeightMD:r,emptyImgHeightSM:n(r).mul(.875).equal()});return[genSharedEmptyStyle(i)]})),__rest13=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)__left_angle_mark_0&&(r[n]=e[n]);if(null!=e&&\"function\"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i__left_angle_mark_n.length;i++)t.indexOf(n[i])__left_angle_mark_0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r},defaultEmptyImg=React169.createElement(empty_default,null),simpleEmptyImg=React169.createElement(simple_default,null),Empty3=e=>{var{className:t,rootClassName:r,prefixCls:n,image:i=defaultEmptyImg,description:o,children:a,imageStyle:s,style:l}=e,u=__rest13(e,[\"className\",\"rootClassName\",\"prefixCls\",\"image\",\"description\",\"children\",\"imageStyle\",\"style\"]);const{getPrefixCls:c,direction:d,empty:h}=React169.useContext(ConfigContext),f=c(\"empty\",n),[p,m,g]=style_default8(f),[_]=useLocale_default(\"Empty\"),b=void 0!==o?o:null==_?void 0:_.description,y=\"string\"==typeof b?b:\"empty\";let v=null;return v=\"string\"==typeof i?React169.createElement(\"img\",{alt:y,src:i}):i,p(React169.createElement(\"div\",Object.assign({className:(0,import_classnames44.default)(m,g,f,null==h?void 0:h.className,{[`${f}-normal`]:i===simpleEmptyImg,[`${f}-rtl`]:\"rtl\"===d},t,r),style:Object.assign(Object.assign({},null==h?void 0:h.style),l)},u),React169.createElement(\"div\",{className:`${f}-image`,style:s},v),b&&React169.createElement(\"div\",{className:`${f}-description`},b),a&&React169.createElement(\"div\",{className:`${f}-footer`},a)))};Empty3.PRESENTED_IMAGE_DEFAULT=defaultEmptyImg,Empty3.PRESENTED_IMAGE_SIMPLE=simpleEmptyImg,Empty3.displayName=\"Empty\";var empty_default2=Empty3;init_globals();var import_react62=__toESM(require_react()),useVariant=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;var n,i;const{variant:o,[e]:a}=(0,import_react62.useContext)(ConfigContext),s=(0,import_react62.useContext)(VariantContext),l=null==a?void 0:a.variant;let u;return u=void 0!==t?t:!1===r?\"borderless\":null!==(i=null!==(n=null!=s?s:l)&&void 0!==n?n:o)&&void 0!==i?i:\"outlined\",[u,Variants.includes(u)]},useVariants_default=useVariant;init_globals();var React170=__toESM(require_react()),CheckOutlined4=function(e,t){return React170.createElement(AntdIcon_default2,_extends({},e,{ref:t,icon:CheckOutlined_default}))},RefIcon27=React170.forwardRef(CheckOutlined4);RefIcon27.displayName=\"CheckOutlined\";var CheckOutlined_default3=RefIcon27;init_globals();var React171=__toESM(require_react()),SearchOutlined2=function(e,t){return React171.createElement(AntdIcon_default2,_extends({},e,{ref:t,icon:SearchOutlined_default}))},RefIcon28=React171.forwardRef(SearchOutlined2);RefIcon28.displayName=\"SearchOutlined\";var SearchOutlined_default2=RefIcon28;init_globals();var import_react63=__toESM(require_react()),responsiveArray=[\"xxl\",\"xl\",\"lg\",\"md\",\"sm\",\"xs\"],getResponsiveMap=e=>({xs:`(max-width: ${e.screenXSMax}px)`,sm:`(min-width: ${e.screenSM}px)`,md:`(min-width: ${e.screenMD}px)`,lg:`(min-width: ${e.screenLG}px)`,xl:`(min-width: ${e.screenXL}px)`,xxl:`(min-width: ${e.screenXXL}px)`}),validateBreakpoints=e=>{const t=e,r=[].concat(responsiveArray).reverse();return r.forEach(((e,n)=>{const i=e.toUpperCase(),o=`screen${i}Min`,a=`screen${i}`;if(!(t[o]__left_angle_mark_=t[a]))throw new Error(`${o}__left_angle_mark_=${a} fails : !(${t[o]}__left_angle_mark_=${t[a]})`);if(n__left_angle_mark_r.length-1){const e=`screen${i}Max`;if(!(t[a]__left_angle_mark_=t[e]))throw new Error(`${a}__left_angle_mark_=${e} fails : !(${t[a]}__left_angle_mark_=${t[e]})`);const o=`screen${r[n+1].toUpperCase()}Min`;if(!(t[e]__left_angle_mark_=t[o]))throw new Error(`${e}__left_angle_mark_=${o} fails : !(${t[e]}__left_angle_mark_=${t[o]})`)}})),e};function useResponsiveObserver(){const[,e]=useToken(),t=getResponsiveMap(validateBreakpoints(e));return import_react63.default.useMemo((()=>{const e=new Map;let r=-1,n={};return{matchHandlers:{},dispatch:t=>(n=t,e.forEach((e=>e(n))),e.size>=1),subscribe(t){return e.size||this.register(),r+=1,e.set(r,t),t(n),r},unsubscribe(t){e.delete(t),e.size||this.unregister()},unregister(){Object.keys(t).forEach((e=>{const r=t[e],n=this.matchHandlers[r];null==n||n.mql.removeListener(null==n?void 0:n.listener)})),e.clear()},register(){Object.keys(t).forEach((e=>{const r=t[e],i=t=>{let{matches:r}=t;this.dispatch(Object.assign(Object.assign({},n),{[e]:r}))},o=window.matchMedia(r);o.addListener(i),this.matchHandlers[r]={mql:o,listener:i},i(o)}))},responsiveMap:t}}),[e])}init_globals();var React173=__toESM(require_react());function useForceUpdate(){const[,e]=React173.useReducer((e=>e+1),0);return e}init_globals();var React177=__toESM(require_react()),import_classnames48=__toESM(require_classnames());init_globals(),init_globals();var import_classnames45=__toESM(require_classnames()),React174=__toESM(require_react());function Popup2(e){var t=e.children,r=e.prefixCls,n=e.id,i=e.overlayInnerStyle,o=e.className,a=e.style;return React174.createElement(\"div\",{className:(0,import_classnames45.default)(\"\".concat(r,\"-content\"),o),style:a},React174.createElement(\"div\",{className:\"\".concat(r,\"-inner\"),id:n,role:\"tooltip\",style:i},\"function\"==typeof t?t():t))}init_globals();var React175=__toESM(require_react()),import_react64=__toESM(require_react());init_globals();var autoAdjustOverflowTopBottom={shiftX:64,adjustY:1},autoAdjustOverflowLeftRight={adjustX:1,shiftY:!0},targetOffset=[0,0],placements={left:{points:[\"cr\",\"cl\"],overflow:autoAdjustOverflowLeftRight,offset:[-4,0],targetOffset:targetOffset},right:{points:[\"cl\",\"cr\"],overflow:autoAdjustOverflowLeftRight,offset:[4,0],targetOffset:targetOffset},top:{points:[\"bc\",\"tc\"],overflow:autoAdjustOverflowTopBottom,offset:[0,-4],targetOffset:targetOffset},bottom:{points:[\"tc\",\"bc\"],overflow:autoAdjustOverflowTopBottom,offset:[0,4],targetOffset:targetOffset},topLeft:{points:[\"bl\",\"tl\"],overflow:autoAdjustOverflowTopBottom,offset:[0,-4],targetOffset:targetOffset},leftTop:{points:[\"tr\",\"tl\"],overflow:autoAdjustOverflowLeftRight,offset:[-4,0],targetOffset:targetOffset},topRight:{points:[\"br\",\"tr\"],overflow:autoAdjustOverflowTopBottom,offset:[0,-4],targetOffset:targetOffset},rightTop:{points:[\"tl\",\"tr\"],overflow:autoAdjustOverflowLeftRight,offset:[4,0],targetOffset:targetOffset},bottomRight:{points:[\"tr\",\"br\"],overflow:autoAdjustOverflowTopBottom,offset:[0,4],targetOffset:targetOffset},rightBottom:{points:[\"bl\",\"br\"],overflow:autoAdjustOverflowLeftRight,offset:[4,0],targetOffset:targetOffset},bottomLeft:{points:[\"tl\",\"bl\"],overflow:autoAdjustOverflowTopBottom,offset:[0,4],targetOffset:targetOffset},leftBottom:{points:[\"br\",\"bl\"],overflow:autoAdjustOverflowLeftRight,offset:[-4,0],targetOffset:targetOffset}},_excluded17=[\"overlayClassName\",\"trigger\",\"mouseEnterDelay\",\"mouseLeaveDelay\",\"overlayStyle\",\"prefixCls\",\"children\",\"onVisibleChange\",\"afterVisibleChange\",\"transitionName\",\"animation\",\"motion\",\"placement\",\"align\",\"destroyTooltipOnHide\",\"defaultVisible\",\"getTooltipContainer\",\"overlayInnerStyle\",\"arrowContent\",\"overlay\",\"id\",\"showArrow\"],Tooltip=function(e,t){var r=e.overlayClassName,n=e.trigger,i=void 0===n?[\"hover\"]:n,o=e.mouseEnterDelay,a=void 0===o?0:o,s=e.mouseLeaveDelay,l=void 0===s?.1:s,u=e.overlayStyle,c=e.prefixCls,d=void 0===c?\"rc-tooltip\":c,h=e.children,f=e.onVisibleChange,p=e.afterVisibleChange,m=e.transitionName,g=e.animation,_=e.motion,b=e.placement,y=void 0===b?\"right\":b,v=e.align,A=void 0===v?{}:v,w=e.destroyTooltipOnHide,S=void 0!==w&&w,E=e.defaultVisible,x=e.getTooltipContainer,C=e.overlayInnerStyle,T=(e.arrowContent,e.overlay),R=e.id,I=e.showArrow,k=void 0===I||I,P=_objectWithoutProperties(e,_excluded17),M=(0,import_react64.useRef)(null);(0,import_react64.useImperativeHandle)(t,(function(){return M.current}));var O=_objectSpread2({},P);return\"visible\"in e&&(O.popupVisible=e.visible),React175.createElement(es_default8,_extends({popupClassName:r,prefixCls:d,popup:function(){return React175.createElement(Popup2,{key:\"content\",prefixCls:d,id:R,overlayInnerStyle:C},T)},action:i,builtinPlacements:placements,popupPlacement:y,ref:M,popupAlign:A,getPopupContainer:x,onPopupVisibleChange:f,afterPopupVisibleChange:p,popupTransitionName:m,popupAnimation:g,popupMotion:_,defaultPopupVisible:E,autoDestroy:S,mouseLeaveDelay:l,popupStyle:u,mouseEnterDelay:a,arrow:k},O),h)},Tooltip_default=(0,import_react64.forwardRef)(Tooltip),es_default9=Tooltip_default;function getArrowToken(e){const{sizePopupArrow:t,borderRadiusXS:r,borderRadiusOuter:n}=e,i=t/2,o=i,a=1*n/Math.sqrt(2),s=i-n*(1-1/Math.sqrt(2)),l=i-r*(1/Math.sqrt(2)),u=n*(Math.sqrt(2)-1)+r*(1/Math.sqrt(2)),c=2*i-l,d=u,h=2*i-a,f=s,p=2*i-0,m=o,g=i*Math.sqrt(2)+n*(Math.sqrt(2)-2),_=n*(Math.sqrt(2)-1);return{arrowShadowWidth:g,arrowPath:`path('M 0 ${o} A ${n} ${n} 0 0 0 ${a} ${s} L ${l} ${u} A ${r} ${r} 0 0 1 ${c} ${d} L ${h} ${f} A ${n} ${n} 0 0 0 ${p} ${m} Z')`,arrowPolygon:`polygon(${_}px 100%, 50% ${_}px, ${2*i-_}px 100%, ${_}px 100%)`}}init_globals(),init_globals(),init_globals();var genRoundedArrow=(e,t,r)=>{const{sizePopupArrow:n,arrowPolygon:i,arrowPath:o,arrowShadowWidth:a,borderRadiusXS:s,calc:l}=e;return{pointerEvents:\"none\",width:n,height:n,overflow:\"hidden\",\"&::before\":{position:\"absolute\",bottom:0,insetInlineStart:0,width:n,height:l(n).div(2).equal(),background:t,clipPath:{_multi_value_:!0,value:[i,o]},content:'\"\"'},\"&::after\":{content:'\"\"',position:\"absolute\",width:a,height:a,bottom:0,insetInline:0,margin:\"auto\",borderRadius:{_skip_check_:!0,value:`0 0 ${unit(s)} 0`},transform:\"translateY(50%) rotate(-135deg)\",boxShadow:r,zIndex:0,background:\"transparent\"}}},MAX_VERTICAL_CONTENT_RADIUS=8;function getArrowOffsetToken(e){const{contentRadius:t,limitVerticalRadius:r}=e,n=t>12?t+2:12;return{arrowOffsetHorizontal:n,arrowOffsetVertical:r?MAX_VERTICAL_CONTENT_RADIUS:n}}function isInject(e,t){return e?t:{}}function getArrowStyle(e,t,r){const{componentCls:n,boxShadowPopoverArrow:i,arrowOffsetVertical:o,arrowOffsetHorizontal:a}=e,{arrowDistance:s=0,arrowPlacement:l={left:!0,right:!0,top:!0,bottom:!0}}=r||{};return{[n]:Object.assign(Object.assign(Object.assign(Object.assign({[`${n}-arrow`]:[Object.assign(Object.assign({position:\"absolute\",zIndex:1,display:\"block\"},genRoundedArrow(e,t,i)),{\"&:before\":{background:t}})]},isInject(!!l.top,{[[`&-placement-top > ${n}-arrow`,`&-placement-topLeft > ${n}-arrow`,`&-placement-topRight > ${n}-arrow`].join(\",\")]:{bottom:s,transform:\"translateY(100%) rotate(180deg)\"},[`&-placement-top > ${n}-arrow`]:{left:{_skip_check_:!0,value:\"50%\"},transform:\"translateX(-50%) translateY(100%) rotate(180deg)\"},\"&-placement-topLeft\":{\"--arrow-offset-horizontal\":a,[`> ${n}-arrow`]:{left:{_skip_check_:!0,value:a}}},\"&-placement-topRight\":{\"--arrow-offset-horizontal\":`calc(100% - ${unit(a)})`,[`> ${n}-arrow`]:{right:{_skip_check_:!0,value:a}}}})),isInject(!!l.bottom,{[[`&-placement-bottom > ${n}-arrow`,`&-placement-bottomLeft > ${n}-arrow`,`&-placement-bottomRight > ${n}-arrow`].join(\",\")]:{top:s,transform:\"translateY(-100%)\"},[`&-placement-bottom > ${n}-arrow`]:{left:{_skip_check_:!0,value:\"50%\"},transform:\"translateX(-50%) translateY(-100%)\"},\"&-placement-bottomLeft\":{\"--arrow-offset-horizontal\":a,[`> ${n}-arrow`]:{left:{_skip_check_:!0,value:a}}},\"&-placement-bottomRight\":{\"--arrow-offset-horizontal\":`calc(100% - ${unit(a)})`,[`> ${n}-arrow`]:{right:{_skip_check_:!0,value:a}}}})),isInject(!!l.left,{[[`&-placement-left > ${n}-arrow`,`&-placement-leftTop > ${n}-arrow`,`&-placement-leftBottom > ${n}-arrow`].join(\",\")]:{right:{_skip_check_:!0,value:s},transform:\"translateX(100%) rotate(90deg)\"},[`&-placement-left > ${n}-arrow`]:{top:{_skip_check_:!0,value:\"50%\"},transform:\"translateY(-50%) translateX(100%) rotate(90deg)\"},[`&-placement-leftTop > ${n}-arrow`]:{top:o},[`&-placement-leftBottom > ${n}-arrow`]:{bottom:o}})),isInject(!!l.right,{[[`&-placement-right > ${n}-arrow`,`&-placement-rightTop > ${n}-arrow`,`&-placement-rightBottom > ${n}-arrow`].join(\",\")]:{left:{_skip_check_:!0,value:s},transform:\"translateX(-100%) rotate(-90deg)\"},[`&-placement-right > ${n}-arrow`]:{top:{_skip_check_:!0,value:\"50%\"},transform:\"translateY(-50%) translateX(-100%) rotate(-90deg)\"},[`&-placement-rightTop > ${n}-arrow`]:{top:o},[`&-placement-rightBottom > ${n}-arrow`]:{bottom:o}}))}}function getOverflowOptions(e,t,r,n){if(!1===n)return{adjustX:!1,adjustY:!1};const i=n&&\"object\"==typeof n?n:{},o={};switch(e){case\"top\":case\"bottom\":o.shiftX=2*t.arrowOffsetHorizontal+r,o.shiftY=!0,o.adjustY=!0;break;case\"left\":case\"right\":o.shiftY=2*t.arrowOffsetVertical+r,o.shiftX=!0,o.adjustX=!0}const a=Object.assign(Object.assign({},o),i);return a.shiftX||(a.adjustX=!0),a.shiftY||(a.adjustY=!0),a}var PlacementAlignMap={left:{points:[\"cr\",\"cl\"]},right:{points:[\"cl\",\"cr\"]},top:{points:[\"bc\",\"tc\"]},bottom:{points:[\"tc\",\"bc\"]},topLeft:{points:[\"bl\",\"tl\"]},leftTop:{points:[\"tr\",\"tl\"]},topRight:{points:[\"br\",\"tr\"]},rightTop:{points:[\"tl\",\"tr\"]},bottomRight:{points:[\"tr\",\"br\"]},rightBottom:{points:[\"bl\",\"br\"]},bottomLeft:{points:[\"tl\",\"bl\"]},leftBottom:{points:[\"br\",\"bl\"]}},ArrowCenterPlacementAlignMap={topLeft:{points:[\"bl\",\"tc\"]},leftTop:{points:[\"tr\",\"cl\"]},topRight:{points:[\"br\",\"tc\"]},rightTop:{points:[\"tl\",\"cr\"]},bottomRight:{points:[\"tr\",\"bc\"]},rightBottom:{points:[\"bl\",\"cr\"]},bottomLeft:{points:[\"tl\",\"bc\"]},leftBottom:{points:[\"br\",\"cl\"]}},DisableAutoArrowList=new Set([\"topLeft\",\"topRight\",\"bottomLeft\",\"bottomRight\",\"leftTop\",\"leftBottom\",\"rightTop\",\"rightBottom\"]);function getPlacements(e){const{arrowWidth:t,autoAdjustOverflow:r,arrowPointAtCenter:n,offset:i,borderRadius:o,visibleFirst:a}=e,s=t/2,l={};return Object.keys(PlacementAlignMap).forEach((e=>{const u=n&&ArrowCenterPlacementAlignMap[e]||PlacementAlignMap[e],c=Object.assign(Object.assign({},u),{offset:[0,0],dynamicInset:!0});switch(l[e]=c,DisableAutoArrowList.has(e)&&(c.autoArrow=!1),e){case\"top\":case\"topLeft\":case\"topRight\":c.offset[1]=-s-i;break;case\"bottom\":case\"bottomLeft\":case\"bottomRight\":c.offset[1]=s+i;break;case\"left\":case\"leftTop\":case\"leftBottom\":c.offset[0]=-s-i;break;case\"right\":case\"rightTop\":case\"rightBottom\":c.offset[0]=s+i}const d=getArrowOffsetToken({contentRadius:o,limitVerticalRadius:!0});if(n)switch(e){case\"topLeft\":case\"bottomLeft\":c.offset[0]=-d.arrowOffsetHorizontal-s;break;case\"topRight\":case\"bottomRight\":c.offset[0]=d.arrowOffsetHorizontal+s;break;case\"leftTop\":case\"rightTop\":c.offset[1]=2*-d.arrowOffsetHorizontal+s;break;case\"leftBottom\":case\"rightBottom\":c.offset[1]=2*d.arrowOffsetHorizontal-s}c.overflow=getOverflowOptions(e,d,t,r),a&&(c.htmlRegion=\"visibleFirst\")})),l}init_globals();var React176=__toESM(require_react()),import_classnames47=__toESM(require_classnames());init_globals();var genTooltipStyle=e=>{const{componentCls:t,tooltipMaxWidth:r,tooltipColor:n,tooltipBg:i,tooltipBorderRadius:o,zIndexPopup:a,controlHeight:s,boxShadowSecondary:l,paddingSM:u,paddingXS:c}=e;return[{[t]:Object.assign(Object.assign(Object.assign(Object.assign({},resetComponent(e)),{position:\"absolute\",zIndex:a,display:\"block\",width:\"max-content\",maxWidth:r,visibility:\"visible\",\"--valid-offset-x\":\"var(--arrow-offset-horizontal, var(--arrow-x))\",transformOrigin:[\"var(--valid-offset-x, 50%)\",\"var(--arrow-y, 50%)\"].join(\" \"),\"&-hidden\":{display:\"none\"},\"--antd-arrow-background-color\":i,[`${t}-inner`]:{minWidth:\"1em\",minHeight:s,padding:`${unit(e.calc(u).div(2).equal())} ${unit(c)}`,color:n,textAlign:\"start\",textDecoration:\"none\",wordWrap:\"break-word\",backgroundColor:i,borderRadius:o,boxShadow:l,boxSizing:\"border-box\"},[[\"&-placement-left\",\"&-placement-leftTop\",\"&-placement-leftBottom\",\"&-placement-right\",\"&-placement-rightTop\",\"&-placement-rightBottom\"].join(\",\")]:{[`${t}-inner`]:{borderRadius:e.min(o,MAX_VERTICAL_CONTENT_RADIUS)}},[`${t}-content`]:{position:\"relative\"}}),genPresetColor(e,((e,r)=>{let{darkColor:n}=r;return{[`&${t}-${e}`]:{[`${t}-inner`]:{backgroundColor:n},[`${t}-arrow`]:{\"--antd-arrow-background-color\":n}}}}))),{\"&-rtl\":{direction:\"rtl\"}})},getArrowStyle(e,\"var(--antd-arrow-background-color)\"),{[`${t}-pure`]:{position:\"relative\",maxWidth:\"none\",margin:e.sizePopupArrow}}]},prepareComponentToken6=e=>Object.assign(Object.assign({zIndexPopup:e.zIndexPopupBase+70},getArrowOffsetToken({contentRadius:e.borderRadius,limitVerticalRadius:!0})),getArrowToken(merge2(e,{borderRadiusOuter:Math.min(e.borderRadiusOuter,4)}))),style_default9=function(e){return genStyleHooks(\"Tooltip\",(e=>{const{borderRadius:t,colorTextLightSolid:r,colorBgSpotlight:n}=e,i=merge2(e,{tooltipMaxWidth:250,tooltipColor:r,tooltipBorderRadius:t,tooltipBg:n});return[genTooltipStyle(i),initZoomMotion(e,\"zoom-big-fast\")]}),prepareComponentToken6,{resetStyle:!1,injectStyle:!(arguments.length>1&&void 0!==arguments[1])||arguments[1]})(e)};init_globals();var import_classnames46=__toESM(require_classnames());init_globals();var inverseColors=PresetColors.map((e=>`${e}-inverse`)),PresetStatusColorTypes=[\"success\",\"processing\",\"error\",\"default\",\"warning\"];function isPresetColor(e){return arguments.length>1&&void 0!==arguments[1]&&!arguments[1]?PresetColors.includes(e):[].concat(_toConsumableArray(inverseColors),_toConsumableArray(PresetColors)).includes(e)}function isPresetStatusColor(e){return PresetStatusColorTypes.includes(e)}function parseColor(e,t){const r=isPresetColor(t),n=(0,import_classnames46.default)({[`${e}-${t}`]:t&&r}),i={},o={};return t&&!r&&(i.background=t,o[\"--antd-arrow-background-color\"]=t),{className:n,overlayStyle:i,arrowStyle:o}}var PurePanel2=e=>{const{prefixCls:t,className:r,placement:n=\"top\",title:i,color:o,overlayInnerStyle:a}=e,{getPrefixCls:s}=React176.useContext(ConfigContext),l=s(\"tooltip\",t),[u,c,d]=style_default9(l),h=parseColor(l,o),f=h.arrowStyle,p=Object.assign(Object.assign({},a),h.overlayStyle),m=(0,import_classnames47.default)(c,d,l,`${l}-pure`,`${l}-placement-${n}`,r,h.className);return u(React176.createElement(\"div\",{className:m,style:f},React176.createElement(\"div\",{className:`${l}-arrow`}),React176.createElement(Popup2,Object.assign({},e,{className:c,prefixCls:l,overlayInnerStyle:p}),i)))},PurePanel_default3=PurePanel2,__rest14=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)__left_angle_mark_0&&(r[n]=e[n]);if(null!=e&&\"function\"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i__left_angle_mark_n.length;i++)t.indexOf(n[i])__left_angle_mark_0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r},InternalTooltip=React177.forwardRef(((e,t)=>{var r,n;const{prefixCls:i,openClassName:o,getTooltipContainer:a,overlayClassName:s,color:l,overlayInnerStyle:u,children:c,afterOpenChange:d,afterVisibleChange:h,destroyTooltipOnHide:f,arrow:p=!0,title:m,overlay:g,builtinPlacements:_,arrowPointAtCenter:b=!1,autoAdjustOverflow:y=!0}=e,v=!!p,[,A]=useToken(),{getPopupContainer:w,getPrefixCls:S,direction:E}=React177.useContext(ConfigContext),x=devUseWarning(\"Tooltip\"),C=React177.useRef(null),T=()=>{var e;null===(e=C.current)||void 0===e||e.forceAlign()};React177.useImperativeHandle(t,(()=>{var e;return{forceAlign:T,forcePopupAlign:()=>{x.deprecated(!1,\"forcePopupAlign\",\"forceAlign\"),T()},nativeElement:null===(e=C.current)||void 0===e?void 0:e.nativeElement}})),[[\"visible\",\"open\"],[\"defaultVisible\",\"defaultOpen\"],[\"onVisibleChange\",\"onOpenChange\"],[\"afterVisibleChange\",\"afterOpenChange\"],[\"arrowPointAtCenter\",\"arrow={{ pointAtCenter: true }}\"]].forEach((t=>{let[r,n]=t;x.deprecated(!(r in e),r,n)})),x(!f||\"boolean\"==typeof f,\"usage\",\"`destroyTooltipOnHide` no need config `keepParent` anymore. Please use `boolean` value directly.\"),x(!p||\"boolean\"==typeof p||!(\"arrowPointAtCenter\"in p),\"deprecated\",\"`arrowPointAtCenter` in `arrow` is deprecated. Please use `pointAtCenter` instead.\");const[R,I]=useMergedState(!1,{value:null!==(r=e.open)&&void 0!==r?r:e.visible,defaultValue:null!==(n=e.defaultOpen)&&void 0!==n?n:e.defaultVisible}),k=!m&&!g&&0!==m,P=React177.useMemo((()=>{var e,t;let r=b;return\"object\"==typeof p&&(r=null!==(t=null!==(e=p.pointAtCenter)&&void 0!==e?e:p.arrowPointAtCenter)&&void 0!==t?t:b),_||getPlacements({arrowPointAtCenter:r,autoAdjustOverflow:y,arrowWidth:v?A.sizePopupArrow:0,borderRadius:A.borderRadius,offset:A.marginXXS,visibleFirst:!0})}),[b,p,_,A]),M=React177.useMemo((()=>0===m?m:g||m||\"\"),[g,m]),O=React177.createElement(ContextIsolator_default,{space:!0},\"function\"==typeof M?M():M),{getPopupContainer:B,placement:N=\"top\",mouseEnterDelay:j=.1,mouseLeaveDelay:L=.1,overlayStyle:D,rootClassName:F}=e,U=__rest14(e,[\"getPopupContainer\",\"placement\",\"mouseEnterDelay\",\"mouseLeaveDelay\",\"overlayStyle\",\"rootClassName\"]),z=S(\"tooltip\",i),q=S(),G=e[\"data-popover-inject\"];let H=R;\"open\"in e||\"visible\"in e||!k||(H=!1);const W=React177.isValidElement(c)&&!isFragment3(c)?c:React177.createElement(\"span\",null,c),V=W.props,$=V.className&&\"string\"!=typeof V.className?V.className:(0,import_classnames48.default)(V.className,o||`${z}-open`),[K,X,Y]=style_default9(z,!G),J=parseColor(z,l),Q=J.arrowStyle,Z=Object.assign(Object.assign({},u),J.overlayStyle),ee=(0,import_classnames48.default)(s,{[`${z}-rtl`]:\"rtl\"===E},J.className,F,X,Y),[te,re]=useZIndex(\"Tooltip\",U.zIndex),ne=React177.createElement(es_default9,Object.assign({},U,{zIndex:te,showArrow:v,placement:N,mouseEnterDelay:j,mouseLeaveDelay:L,prefixCls:z,overlayClassName:ee,overlayStyle:Object.assign(Object.assign({},Q),D),getTooltipContainer:B||a||w,ref:C,builtinPlacements:P,overlay:O,visible:H,onVisibleChange:t=>{var r,n;I(!k&&t),k||(null===(r=e.onOpenChange)||void 0===r||r.call(e,t),null===(n=e.onVisibleChange)||void 0===n||n.call(e,t))},afterVisibleChange:null!=d?d:h,overlayInnerStyle:Z,arrowContent:React177.createElement(\"span\",{className:`${z}-arrow-content`}),motion:{motionName:getTransitionName2(q,\"zoom-big-fast\",e.transitionName),motionDeadline:1e3},destroyTooltipOnHide:!!f}),H?cloneElement3(W,{className:$}):W);return K(React177.createElement(zindexContext_default.Provider,{value:re},ne))})),Tooltip3=InternalTooltip;Tooltip3.displayName=\"Tooltip\",Tooltip3._InternalPanelDoNotUseOrYouWillBeFired=PurePanel_default3;var tooltip_default=Tooltip3;init_globals();var React213=__toESM(require_react()),import_classnames62=__toESM(require_classnames());init_globals(),init_globals();var import_classnames49=__toESM(require_classnames()),import_react66=__toESM(require_react());init_globals();var React178=__toESM(require_react()),ESC=KeyCode_default.ESC,TAB=KeyCode_default.TAB;function useAccessibility(e){var t=e.visible,r=e.triggerRef,n=e.onVisibleChange,i=e.autoFocus,o=e.overlayRef,a=React178.useRef(!1),s=function(){var e,i;t&&(null===(e=r.current)||void 0===e||null===(i=e.focus)||void 0===i||i.call(e),null==n||n(!1))},l=function(){var e;return!(null===(e=o.current)||void 0===e||!e.focus||(o.current.focus(),a.current=!0,0))},u=function(e){switch(e.keyCode){case ESC:s();break;case TAB:var t=!1;a.current||(t=l()),t?e.preventDefault():s()}};React178.useEffect((function(){return t?(window.addEventListener(\"keydown\",u),i&&raf_default(l,3),function(){window.removeEventListener(\"keydown\",u),a.current=!1}):function(){a.current=!1}}),[t])}init_globals();var import_react65=__toESM(require_react()),Overlay=(0,import_react65.forwardRef)((function(e,t){var r=e.overlay,n=e.arrow,i=e.prefixCls,o=(0,import_react65.useMemo)((function(){return\"function\"==typeof r?r():r}),[r]),a=composeRef(t,null==o?void 0:o.ref);return import_react65.default.createElement(import_react65.default.Fragment,null,n&&import_react65.default.createElement(\"div\",{className:\"\".concat(i,\"-arrow\")}),import_react65.default.cloneElement(o,{ref:supportRef(o)?a:void 0}))})),Overlay_default=Overlay;init_globals();var autoAdjustOverflow={adjustX:1,adjustY:1},targetOffset2=[0,0],placements2={topLeft:{points:[\"bl\",\"tl\"],overflow:autoAdjustOverflow,offset:[0,-4],targetOffset:targetOffset2},top:{points:[\"bc\",\"tc\"],overflow:autoAdjustOverflow,offset:[0,-4],targetOffset:targetOffset2},topRight:{points:[\"br\",\"tr\"],overflow:autoAdjustOverflow,offset:[0,-4],targetOffset:targetOffset2},bottomLeft:{points:[\"tl\",\"bl\"],overflow:autoAdjustOverflow,offset:[0,4],targetOffset:targetOffset2},bottom:{points:[\"tc\",\"bc\"],overflow:autoAdjustOverflow,offset:[0,4],targetOffset:targetOffset2},bottomRight:{points:[\"tr\",\"br\"],overflow:autoAdjustOverflow,offset:[0,4],targetOffset:targetOffset2}},placements_default=placements2,_excluded18=[\"arrow\",\"prefixCls\",\"transitionName\",\"animation\",\"align\",\"placement\",\"placements\",\"getPopupContainer\",\"showAction\",\"hideAction\",\"overlayClassName\",\"overlayStyle\",\"visible\",\"trigger\",\"autoFocus\",\"overlay\",\"children\",\"onVisibleChange\"];function Dropdown(e,t){var r,n=e.arrow,i=void 0!==n&&n,o=e.prefixCls,a=void 0===o?\"rc-dropdown\":o,s=e.transitionName,l=e.animation,u=e.align,c=e.placement,d=void 0===c?\"bottomLeft\":c,h=e.placements,f=void 0===h?placements_default:h,p=e.getPopupContainer,m=e.showAction,g=e.hideAction,_=e.overlayClassName,b=e.overlayStyle,y=e.visible,v=e.trigger,A=void 0===v?[\"hover\"]:v,w=e.autoFocus,S=e.overlay,E=e.children,x=e.onVisibleChange,C=_objectWithoutProperties(e,_excluded18),T=_slicedToArray(import_react66.default.useState(),2),R=T[0],I=T[1],k=\"visible\"in e?y:R,P=import_react66.default.useRef(null),M=import_react66.default.useRef(null),O=import_react66.default.useRef(null);import_react66.default.useImperativeHandle(t,(function(){return P.current}));var B=function(e){I(e),null==x||x(e)};useAccessibility({visible:k,triggerRef:O,onVisibleChange:B,autoFocus:w,overlayRef:M});var N,j,L,D=function(){return import_react66.default.createElement(Overlay_default,{ref:M,overlay:S,prefixCls:a,arrow:i})},F=import_react66.default.cloneElement(E,{className:(0,import_classnames49.default)(null===(r=E.props)||void 0===r?void 0:r.className,k&&(N=e.openClassName,void 0!==N?N:\"\".concat(a,\"-open\"))),ref:supportRef(E)?composeRef(O,E.ref):void 0}),U=g;return U||-1===A.indexOf(\"contextMenu\")||(U=[\"click\"]),import_react66.default.createElement(es_default8,_extends({builtinPlacements:f},C,{prefixCls:a,ref:P,popupClassName:(0,import_classnames49.default)(_,_defineProperty({},\"\".concat(a,\"-show-arrow\"),i)),popupStyle:b,action:A,showAction:m,hideAction:U,popupPlacement:d,popupAlign:u,popupTransitionName:s,popupAnimation:l,popupVisible:k,stretch:(j=e.minOverlayWidthMatchTrigger,L=e.alignPoint,(\"minOverlayWidthMatchTrigger\"in e?j:!L)?\"minWidth\":\"\"),popup:\"function\"==typeof S?D:D(),onPopupVisibleChange:B,onPopupClick:function(t){var r=e.onOverlayClick;I(!1),r&&r(t)},getPopupContainer:p}),F)}var Dropdown_default=import_react66.default.forwardRef(Dropdown),es_default10=Dropdown_default;init_globals();var React212=__toESM(require_react()),import_react72=__toESM(require_react());init_globals(),init_globals();var import_classnames56=__toESM(require_classnames()),React201=__toESM(require_react()),import_react68=__toESM(require_react()),import_react_dom5=__toESM(require_react_dom());init_globals();var React181=__toESM(require_react()),IdContext=React181.createContext(null);function getMenuId(e,t){return void 0===e?null:\"\".concat(e,\"-\").concat(t)}function useMenuId(e){return getMenuId(React181.useContext(IdContext),e)}init_globals();var React182=__toESM(require_react()),_excluded19=[\"children\",\"locked\"],MenuContext=React182.createContext(null);function mergeProps(e,t){var r=_objectSpread2({},e);return Object.keys(t).forEach((function(e){var n=t[e];void 0!==n&&(r[e]=n)})),r}function InheritableContextProvider(e){var t=e.children,r=e.locked,n=_objectWithoutProperties(e,_excluded19),i=React182.useContext(MenuContext),o=useMemo((function(){return mergeProps(i,n)}),[i,n],(function(e,t){return!(r||e[0]===t[0]&&isEqual_default(e[1],t[1],!0))}));return React182.createElement(MenuContext.Provider,{value:o},t)}init_globals();var React183=__toESM(require_react()),EmptyList=[],PathRegisterContext=React183.createContext(null);function useMeasure(){return React183.useContext(PathRegisterContext)}var PathTrackerContext=React183.createContext(EmptyList);function useFullPath(e){var t=React183.useContext(PathTrackerContext);return React183.useMemo((function(){return void 0!==e?[].concat(_toConsumableArray(t),[e]):t}),[t,e])}var PathUserContext=React183.createContext(null);init_globals();var React184=__toESM(require_react()),PrivateContext=React184.createContext({}),PrivateContext_default=PrivateContext;function focusable(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(isVisible_default(e)){var r=e.nodeName.toLowerCase(),n=[\"input\",\"select\",\"textarea\",\"button\"].includes(r)||e.isContentEditable||\"a\"===r&&!!e.getAttribute(\"href\"),i=e.getAttribute(\"tabindex\"),o=Number(i),a=null;return i&&!Number.isNaN(o)?a=o:n&&null===a&&(a=0),n&&e.disabled&&(a=null),null!==a&&(a>=0||t&&a__left_angle_mark_0)}return!1}function getFocusNodeList(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=_toConsumableArray(e.querySelectorAll(\"*\")).filter((function(e){return focusable(e,t)}));return focusable(e,t)&&r.unshift(e),r}init_globals(),init_globals();var React185=__toESM(require_react()),LEFT=KeyCode_default.LEFT,RIGHT=KeyCode_default.RIGHT,UP=KeyCode_default.UP,DOWN=KeyCode_default.DOWN,ENTER=KeyCode_default.ENTER,ESC2=KeyCode_default.ESC,HOME=KeyCode_default.HOME,END=KeyCode_default.END,ArrowKeys=[UP,DOWN,LEFT,RIGHT];function getOffset(e,t,r,n){var i,o=\"prev\",a=\"next\",s=\"children\",l=\"parent\";if(\"inline\"===e&&n===ENTER)return{inlineTrigger:!0};var u=_defineProperty(_defineProperty({},UP,o),DOWN,a),c=_defineProperty(_defineProperty(_defineProperty(_defineProperty({},LEFT,r?a:o),RIGHT,r?o:a),DOWN,s),ENTER,s),d=_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({},UP,o),DOWN,a),ENTER,s),ESC2,l),LEFT,r?s:l),RIGHT,r?l:s);switch(null===(i={inline:u,horizontal:c,vertical:d,inlineSub:u,horizontalSub:d,verticalSub:d}[\"\".concat(e).concat(t?\"\":\"Sub\")])||void 0===i?void 0:i[n]){case o:return{offset:-1,sibling:!0};case a:return{offset:1,sibling:!0};case l:return{offset:-1,sibling:!1};case s:return{offset:1,sibling:!1};default:return null}}function findContainerUL(e){for(var t=e;t;){if(t.getAttribute(\"data-menu-list\"))return t;t=t.parentElement}return null}function getFocusElement(e,t){for(var r=e||document.activeElement;r;){if(t.has(r))return r;r=r.parentElement}return null}function getFocusableElements(e,t){return getFocusNodeList(e,!0).filter((function(e){return t.has(e)}))}function getNextFocusElement(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;if(!e)return null;var i=getFocusableElements(e,t),o=i.length,a=i.findIndex((function(e){return r===e}));return n__left_angle_mark_0?-1===a?a=o-1:a-=1:n>0&&(a+=1),i[a=(a+o)%o]}var refreshElements=function(e,t){var r=new Set,n=new Map,i=new Map;return e.forEach((function(e){var o=document.querySelector(\"[data-menu-id='\".concat(getMenuId(t,e),\"']\"));o&&(r.add(o),i.set(o,e),n.set(e,o))})),{elements:r,key2element:n,element2key:i}};function useAccessibility2(e,t,r,n,i,o,a,s,l,u){var c=React185.useRef(),d=React185.useRef();d.current=t;var h=function(){raf_default.cancel(c.current)};return React185.useEffect((function(){return function(){h()}}),[]),function(f){var p=f.which;if([].concat(ArrowKeys,[ENTER,ESC2,HOME,END]).includes(p)){var m=o(),g=refreshElements(m,n),_=g,b=_.elements,y=_.key2element,v=_.element2key,A=getFocusElement(y.get(t),b),w=v.get(A),S=getOffset(e,1===a(w,!0).length,r,p);if(!S&&p!==HOME&&p!==END)return;(ArrowKeys.includes(p)||[HOME,END].includes(p))&&f.preventDefault();var E=function(e){if(e){var t=e,r=e.querySelector(\"a\");null!=r&&r.getAttribute(\"href\")&&(t=r);var n=v.get(e);s(n),h(),c.current=raf_default((function(){d.current===n&&t.focus()}))}};if([HOME,END].includes(p)||S.sibling||!A){var x,C,T=getFocusableElements(x=A&&\"inline\"!==e?findContainerUL(A):i.current,b);C=p===HOME?T[0]:p===END?T[T.length-1]:getNextFocusElement(x,b,A,S.offset),E(C)}else if(S.inlineTrigger)l(w);else if(S.offset>0)l(w,!0),h(),c.current=raf_default((function(){g=refreshElements(m,n);var e=A.getAttribute(\"aria-controls\"),t=getNextFocusElement(document.getElementById(e),g.elements);E(t)}),5);else if(S.offset__left_angle_mark_0){var R=a(w,!0),I=R[R.length-2],k=y.get(I);l(I,!1),E(k)}}null==u||u(f)}}init_globals();var React186=__toESM(require_react()),import_react67=__toESM(require_react());function nextSlice(e){Promise.resolve().then(e)}init_globals();var PATH_SPLIT=\"__RC_UTIL_PATH_SPLIT__\",getPathStr=function(e){return e.join(PATH_SPLIT)},getPathKeys=function(e){return e.split(PATH_SPLIT)},OVERFLOW_KEY=\"rc-menu-more\";function useKeyRecords(){var e=_slicedToArray(React186.useState({}),2)[1],t=(0,import_react67.useRef)(new Map),r=(0,import_react67.useRef)(new Map),n=_slicedToArray(React186.useState([]),2),i=n[0],o=n[1],a=(0,import_react67.useRef)(0),s=(0,import_react67.useRef)(!1),l=(0,import_react67.useCallback)((function(n,i){warning_default(!t.current.has(n),\"Duplicated key '\".concat(n,\"' used in Menu by path [\").concat(i.join(\" > \"),\"]\"));var o=getPathStr(i);r.current.set(o,n),t.current.set(n,o),a.current+=1;var l=a.current;nextSlice((function(){l===a.current&&(s.current||e({}))}))}),[]),u=(0,import_react67.useCallback)((function(e,n){var i=getPathStr(n);r.current.delete(i),t.current.delete(e)}),[]),c=(0,import_react67.useCallback)((function(e){o(e)}),[]),d=(0,import_react67.useCallback)((function(e,r){var n=t.current.get(e)||\"\",o=getPathKeys(n);return r&&i.includes(o[0])&&o.unshift(OVERFLOW_KEY),o}),[i]),h=(0,import_react67.useCallback)((function(e,t){return e.filter((function(e){return void 0!==e})).some((function(e){return d(e,!0).includes(t)}))}),[d]),f=(0,import_react67.useCallback)((function(e){var n=\"\".concat(t.current.get(e)).concat(PATH_SPLIT),i=new Set;return _toConsumableArray(r.current.keys()).forEach((function(e){e.startsWith(n)&&i.add(r.current.get(e))})),i}),[]);return React186.useEffect((function(){return function(){s.current=!0}}),[]),{registerPath:l,unregisterPath:u,refreshOverflowKeys:c,isSubPathKey:h,getKeyPath:d,getKeys:function(){var e=_toConsumableArray(t.current.keys());return i.length&&e.push(OVERFLOW_KEY),e},getSubPathKeys:f}}init_globals();var React187=__toESM(require_react());function useMemoCallback(e){var t=React187.useRef(e);t.current=e;var r=React187.useCallback((function(){for(var e,r=arguments.length,n=new Array(r),i=0;i__left_angle_mark_r;i++)n[i]=arguments[i];return null===(e=t.current)||void 0===e?void 0:e.call.apply(e,[t].concat(n))}),[]);return e?r:void 0}init_globals();var React188=__toESM(require_react()),uniquePrefix=Math.random().toFixed(5).toString().slice(2),internalId=0;function useUUID(e){var t=_slicedToArray(useMergedState(e,{value:e}),2),r=t[0],n=t[1];return React188.useEffect((function(){internalId+=1;var e=\"\".concat(uniquePrefix,\"-\").concat(internalId);n(\"rc-menu-uuid-\".concat(e))}),[]),r}init_globals();var import_classnames50=__toESM(require_classnames()),React192=__toESM(require_react());init_globals();var React189=__toESM(require_react());function useActive(e,t,r,n){var i=React189.useContext(MenuContext),o=i.activeKey,a=i.onActive,s=i.onInactive,l={active:o===e};return t||(l.onMouseEnter=function(t){null==r||r({key:e,domEvent:t}),a(e)},l.onMouseLeave=function(t){null==n||n({key:e,domEvent:t}),s(e)}),l}init_globals();var React190=__toESM(require_react());function useDirectionStyle(e){var t=React190.useContext(MenuContext),r=t.mode,n=t.rtl,i=t.inlineIndent;return\"inline\"!==r?null:n?{paddingRight:e*i}:{paddingLeft:e*i}}init_globals();var React191=__toESM(require_react());function Icon3(e){var t,r=e.icon,n=e.props,i=e.children;return null===r||!1===r?null:(\"function\"==typeof r?t=React191.createElement(r,_objectSpread2({},n)):\"boolean\"!=typeof r&&(t=r),t||i||null)}init_globals();var _excluded20=[\"item\"];function warnItemProp(e){var t=e.item,r=_objectWithoutProperties(e,_excluded20);return Object.defineProperty(r,\"item\",{get:function(){return warning_default(!1,\"`info.item` is deprecated since we will move to function component that not provides React Node instance in future.\"),t}}),r}var _excluded21=[\"title\",\"attribute\",\"elementRef\"],_excluded25=[\"style\",\"className\",\"eventKey\",\"warnKey\",\"disabled\",\"itemIcon\",\"children\",\"role\",\"onMouseEnter\",\"onMouseLeave\",\"onClick\",\"onKeyDown\",\"onFocus\"],_excluded33=[\"active\"],LegacyMenuItem=function(e){_inherits(r,e);var t=_createSuper(r);function r(){return _classCallCheck(this,r),t.apply(this,arguments)}return _createClass(r,[{key:\"render\",value:function(){var e=this.props,t=e.title,r=e.attribute,n=e.elementRef,i=omit(_objectWithoutProperties(e,_excluded21),[\"eventKey\",\"popupClassName\",\"popupOffset\",\"onTitleClick\"]);return warning_default(!r,\"`attribute` of Menu.Item is deprecated. Please pass attribute directly.\"),React192.createElement(es_default7.Item,_extends({},r,{title:\"string\"==typeof t?t:void 0},i,{ref:n}))}}]),r}(React192.Component),InternalMenuItem=React192.forwardRef((function(e,t){var r=e.style,n=e.className,i=e.eventKey,o=e.warnKey,a=e.disabled,s=e.itemIcon,l=e.children,u=e.role,c=e.onMouseEnter,d=e.onMouseLeave,h=e.onClick,f=e.onKeyDown,p=e.onFocus,m=_objectWithoutProperties(e,_excluded25),g=useMenuId(i),_=React192.useContext(MenuContext),b=_.prefixCls,y=_.onItemClick,v=_.disabled,A=_.overflowDisabled,w=_.itemIcon,S=_.selectedKeys,E=_.onActive,x=React192.useContext(PrivateContext_default)._internalRenderMenuItem,C=\"\".concat(b,\"-item\"),T=React192.useRef(),R=React192.useRef(),I=v||a,k=useComposeRef(t,R),P=useFullPath(i);o&&warning_default(!1,\"MenuItem should not leave undefined `key`.\");var M=function(e){return{key:i,keyPath:_toConsumableArray(P).reverse(),item:T.current,domEvent:e}},O=s||w,B=useActive(i,I,c,d),N=B.active,j=_objectWithoutProperties(B,_excluded33),L=S.includes(i),D=useDirectionStyle(P.length),F={};\"option\"===e.role&&(F[\"aria-selected\"]=L);var U=React192.createElement(LegacyMenuItem,_extends({ref:T,elementRef:k,role:null===u?\"none\":u||\"menuitem\",tabIndex:a?null:-1,\"data-menu-id\":A&&g?null:g},m,j,F,{component:\"li\",\"aria-disabled\":a,style:_objectSpread2(_objectSpread2({},D),r),className:(0,import_classnames50.default)(C,_defineProperty(_defineProperty(_defineProperty({},\"\".concat(C,\"-active\"),N),\"\".concat(C,\"-selected\"),L),\"\".concat(C,\"-disabled\"),I),n),onClick:function(e){if(!I){var t=M(e);null==h||h(warnItemProp(t)),y(t)}},onKeyDown:function(e){if(null==f||f(e),e.which===KeyCode_default.ENTER){var t=M(e);null==h||h(warnItemProp(t)),y(t)}},onFocus:function(e){E(i),null==p||p(e)}}),l,React192.createElement(Icon3,{props:_objectSpread2(_objectSpread2({},e),{},{isSelected:L}),icon:O}));return x&&(U=x(U,e,{selected:L})),U}));function MenuItem(e,t){var r=e.eventKey,n=useMeasure(),i=useFullPath(r);return React192.useEffect((function(){if(n)return n.registerPath(r,i),function(){n.unregisterPath(r,i)}}),[i]),n?null:React192.createElement(InternalMenuItem,_extends({},e,{ref:t}))}var MenuItem_default=React192.forwardRef(MenuItem);init_globals();var React197=__toESM(require_react()),import_classnames53=__toESM(require_classnames());init_globals();var React193=__toESM(require_react()),import_classnames51=__toESM(require_classnames()),_excluded26=[\"className\",\"children\"],InternalSubMenuList=function(e,t){var r=e.className,n=e.children,i=_objectWithoutProperties(e,_excluded26),o=React193.useContext(MenuContext),a=o.prefixCls,s=o.mode,l=o.rtl;return React193.createElement(\"ul\",_extends({className:(0,import_classnames51.default)(a,l&&\"\".concat(a,\"-rtl\"),\"\".concat(a,\"-sub\"),\"\".concat(a,\"-\").concat(\"inline\"===s?\"inline\":\"vertical\"),r),role:\"menu\"},i,{\"data-menu-list\":!0,ref:t}),n)},SubMenuList=React193.forwardRef(InternalSubMenuList);SubMenuList.displayName=\"SubMenuList\";var SubMenuList_default=SubMenuList;init_globals();var React194=__toESM(require_react());function parseChildren(e,t){return toArray(e).map((function(e,r){if(React194.isValidElement(e)){var n,i,o=e.key,a=null!==(n=null===(i=e.props)||void 0===i?void 0:i.eventKey)&&void 0!==n?n:o,s=null==a;s&&(a=\"tmp_key-\".concat([].concat(_toConsumableArray(t),[r]).join(\"-\")));var l={key:a,eventKey:a};return s&&(l.warnKey=!0),React194.cloneElement(e,l)}return e}))}init_globals();var React195=__toESM(require_react()),import_classnames52=__toESM(require_classnames());init_globals();var autoAdjustOverflow2={adjustX:1,adjustY:1},placements3={topLeft:{points:[\"bl\",\"tl\"],overflow:autoAdjustOverflow2},topRight:{points:[\"br\",\"tr\"],overflow:autoAdjustOverflow2},bottomLeft:{points:[\"tl\",\"bl\"],overflow:autoAdjustOverflow2},bottomRight:{points:[\"tr\",\"br\"],overflow:autoAdjustOverflow2},leftTop:{points:[\"tr\",\"tl\"],overflow:autoAdjustOverflow2},leftBottom:{points:[\"br\",\"bl\"],overflow:autoAdjustOverflow2},rightTop:{points:[\"tl\",\"tr\"],overflow:autoAdjustOverflow2},rightBottom:{points:[\"bl\",\"br\"],overflow:autoAdjustOverflow2}},placementsRtl={topLeft:{points:[\"bl\",\"tl\"],overflow:autoAdjustOverflow2},topRight:{points:[\"br\",\"tr\"],overflow:autoAdjustOverflow2},bottomLeft:{points:[\"tl\",\"bl\"],overflow:autoAdjustOverflow2},bottomRight:{points:[\"tr\",\"br\"],overflow:autoAdjustOverflow2},rightTop:{points:[\"tr\",\"tl\"],overflow:autoAdjustOverflow2},rightBottom:{points:[\"br\",\"bl\"],overflow:autoAdjustOverflow2},leftTop:{points:[\"tl\",\"tr\"],overflow:autoAdjustOverflow2},leftBottom:{points:[\"bl\",\"br\"],overflow:autoAdjustOverflow2}};function getMotion3(e,t,r){return t||(r?r[e]||r.other:void 0)}init_globals();var popupPlacementMap={horizontal:\"bottomLeft\",vertical:\"rightTop\",\"vertical-left\":\"rightTop\",\"vertical-right\":\"leftTop\"};function PopupTrigger(e){var t=e.prefixCls,r=e.visible,n=e.children,i=e.popup,o=e.popupStyle,a=e.popupClassName,s=e.popupOffset,l=e.disabled,u=e.mode,c=e.onVisibleChange,d=React195.useContext(MenuContext),h=d.getPopupContainer,f=d.rtl,p=d.subMenuOpenDelay,m=d.subMenuCloseDelay,g=d.builtinPlacements,_=d.triggerSubMenuAction,b=d.forceSubMenuRender,y=d.rootClassName,v=d.motion,A=d.defaultMotions,w=_slicedToArray(React195.useState(!1),2),S=w[0],E=w[1],x=_objectSpread2(_objectSpread2({},f?placementsRtl:placements3),g),C=popupPlacementMap[u],T=getMotion3(u,v,A),R=React195.useRef(T);\"inline\"!==u&&(R.current=T);var I=_objectSpread2(_objectSpread2({},R.current),{},{leavedClassName:\"\".concat(t,\"-hidden\"),removeOnLeave:!1,motionAppear:!0}),k=React195.useRef();return React195.useEffect((function(){return k.current=raf_default((function(){E(r)})),function(){raf_default.cancel(k.current)}}),[r]),React195.createElement(es_default8,{prefixCls:t,popupClassName:(0,import_classnames52.default)(\"\".concat(t,\"-popup\"),_defineProperty({},\"\".concat(t,\"-rtl\"),f),a,y),stretch:\"horizontal\"===u?\"minWidth\":null,getPopupContainer:h,builtinPlacements:x,popupPlacement:C,popupVisible:S,popup:i,popupStyle:o,popupAlign:s&&{offset:s},action:l?[]:[_],mouseEnterDelay:p,mouseLeaveDelay:m,onPopupVisibleChange:c,forceRender:b,popupMotion:I,fresh:!0},n)}init_globals();var React196=__toESM(require_react());function InlineSubMenuList(e){var t=e.id,r=e.open,n=e.keyPath,i=e.children,o=\"inline\",a=React196.useContext(MenuContext),s=a.prefixCls,l=a.forceSubMenuRender,u=a.motion,c=a.defaultMotions,d=a.mode,h=React196.useRef(!1);h.current=d===o;var f=_slicedToArray(React196.useState(!h.current),2),p=f[0],m=f[1],g=!!h.current&&r;React196.useEffect((function(){h.current&&m(!1)}),[d]);var _=_objectSpread2({},getMotion3(o,u,c));n.length>1&&(_.motionAppear=!1);var b=_.onVisibleChanged;return _.onVisibleChanged=function(e){return h.current||e||m(!0),null==b?void 0:b(e)},p?null:React196.createElement(InheritableContextProvider,{mode:o,locked:!h.current},React196.createElement(es_default2,_extends({visible:g},_,{forceRender:l,removeOnLeave:!1,leavedClassName:\"\".concat(s,\"-hidden\")}),(function(e){var r=e.className,n=e.style;return React196.createElement(SubMenuList_default,{id:t,className:r,style:n},i)})))}var _excluded27=[\"style\",\"className\",\"title\",\"eventKey\",\"warnKey\",\"disabled\",\"internalPopupClose\",\"children\",\"itemIcon\",\"expandIcon\",\"popupClassName\",\"popupOffset\",\"popupStyle\",\"onClick\",\"onMouseEnter\",\"onMouseLeave\",\"onTitleClick\",\"onTitleMouseEnter\",\"onTitleMouseLeave\"],_excluded28=[\"active\"],InternalSubMenu=React197.forwardRef((function(e,t){var r=e.style,n=e.className,i=e.title,o=e.eventKey,a=e.warnKey,s=e.disabled,l=e.internalPopupClose,u=e.children,c=e.itemIcon,d=e.expandIcon,h=e.popupClassName,f=e.popupOffset,p=e.popupStyle,m=e.onClick,g=e.onMouseEnter,_=e.onMouseLeave,b=e.onTitleClick,y=e.onTitleMouseEnter,v=e.onTitleMouseLeave,A=_objectWithoutProperties(e,_excluded27),w=useMenuId(o),S=React197.useContext(MenuContext),E=S.prefixCls,x=S.mode,C=S.openKeys,T=S.disabled,R=S.overflowDisabled,I=S.activeKey,k=S.selectedKeys,P=S.itemIcon,M=S.expandIcon,O=S.onItemClick,B=S.onOpenChange,N=S.onActive,j=React197.useContext(PrivateContext_default)._internalRenderSubMenuItem,L=React197.useContext(PathUserContext).isSubPathKey,D=useFullPath(),F=\"\".concat(E,\"-submenu\"),U=T||s,z=React197.useRef(),q=React197.useRef();a&&warning_default(!1,\"SubMenu should not leave undefined `key`.\");var G=null!=c?c:P,H=null!=d?d:M,W=C.includes(o),V=!R&&W,$=L(k,o),K=useActive(o,U,y,v),X=K.active,Y=_objectWithoutProperties(K,_excluded28),J=_slicedToArray(React197.useState(!1),2),Q=J[0],Z=J[1],ee=function(e){U||Z(e)},te=React197.useMemo((function(){return X||\"inline\"!==x&&(Q||L([I],o))}),[x,X,I,Q,o,L]),re=useDirectionStyle(D.length),ne=useMemoCallback((function(e){null==m||m(warnItemProp(e)),O(e)})),ie=w&&\"\".concat(w,\"-popup\"),oe=React197.createElement(\"div\",_extends({role:\"menuitem\",style:re,className:\"\".concat(F,\"-title\"),tabIndex:U?null:-1,ref:z,title:\"string\"==typeof i?i:null,\"data-menu-id\":R&&w?null:w,\"aria-expanded\":V,\"aria-haspopup\":!0,\"aria-controls\":ie,\"aria-disabled\":U,onClick:function(e){U||(null==b||b({key:o,domEvent:e}),\"inline\"===x&&B(o,!W))},onFocus:function(){N(o)}},Y),i,React197.createElement(Icon3,{icon:\"horizontal\"!==x?H:void 0,props:_objectSpread2(_objectSpread2({},e),{},{isOpen:V,isSubMenu:!0})},React197.createElement(\"i\",{className:\"\".concat(F,\"-arrow\")}))),ae=React197.useRef(x);if(\"inline\"!==x&&D.length>1?ae.current=\"vertical\":ae.current=x,!R){var se=ae.current;oe=React197.createElement(PopupTrigger,{mode:se,prefixCls:F,visible:!l&&V&&\"inline\"!==x,popupClassName:h,popupOffset:f,popupStyle:p,popup:React197.createElement(InheritableContextProvider,{mode:\"horizontal\"===se?\"vertical\":se},React197.createElement(SubMenuList_default,{id:ie,ref:q},u)),disabled:U,onVisibleChange:function(e){\"inline\"!==x&&B(o,e)}},oe)}var le=React197.createElement(es_default7.Item,_extends({ref:t,role:\"none\"},A,{component:\"li\",style:r,className:(0,import_classnames53.default)(F,\"\".concat(F,\"-\").concat(x),n,_defineProperty(_defineProperty(_defineProperty(_defineProperty({},\"\".concat(F,\"-open\"),V),\"\".concat(F,\"-active\"),te),\"\".concat(F,\"-selected\"),$),\"\".concat(F,\"-disabled\"),U)),onMouseEnter:function(e){ee(!0),null==g||g({key:o,domEvent:e})},onMouseLeave:function(e){ee(!1),null==_||_({key:o,domEvent:e})}}),oe,!R&&React197.createElement(InlineSubMenuList,{id:ie,open:V,keyPath:D},u));return j&&(le=j(le,e,{selected:$,active:te,open:V,disabled:U})),React197.createElement(InheritableContextProvider,{onItemClick:ne,mode:\"horizontal\"===x?\"vertical\":x,itemIcon:G,expandIcon:H},le)})),SubMenu=React197.forwardRef((function(e,t){var r,n=e.eventKey,i=e.children,o=useFullPath(n),a=parseChildren(i,o),s=useMeasure();return React197.useEffect((function(){if(s)return s.registerPath(n,o),function(){s.unregisterPath(n,o)}}),[o]),r=s?a:React197.createElement(InternalSubMenu,_extends({ref:t},e),a),React197.createElement(PathTrackerContext.Provider,{value:o},r)}));SubMenu.displayName=\"SubMenu\";var SubMenu_default=SubMenu;init_globals();var React200=__toESM(require_react());init_globals();var React198=__toESM(require_react()),import_classnames54=__toESM(require_classnames());function Divider(e){var t=e.className,r=e.style,n=React198.useContext(MenuContext).prefixCls;return useMeasure()?null:React198.createElement(\"li\",{role:\"separator\",className:(0,import_classnames54.default)(\"\".concat(n,\"-item-divider\"),t),style:r})}init_globals();var import_classnames55=__toESM(require_classnames()),React199=__toESM(require_react()),_excluded29=[\"className\",\"title\",\"eventKey\",\"children\"],InternalMenuItemGroup=React199.forwardRef((function(e,t){var r=e.className,n=e.title,i=(e.eventKey,e.children),o=_objectWithoutProperties(e,_excluded29),a=React199.useContext(MenuContext).prefixCls,s=\"\".concat(a,\"-item-group\");return React199.createElement(\"li\",_extends({ref:t,role:\"presentation\"},o,{onClick:function(e){return e.stopPropagation()},className:(0,import_classnames55.default)(s,r)}),React199.createElement(\"div\",{role:\"presentation\",className:\"\".concat(s,\"-title\"),title:\"string\"==typeof n?n:void 0},n),React199.createElement(\"ul\",{role:\"group\",className:\"\".concat(s,\"-list\")},i))})),MenuItemGroup=React199.forwardRef((function(e,t){var r=e.eventKey,n=parseChildren(e.children,useFullPath(r));return useMeasure()?n:React199.createElement(InternalMenuItemGroup,_extends({ref:t},omit(e,[\"warnKey\"])),n)}));MenuItemGroup.displayName=\"MenuItemGroup\";var MenuItemGroup_default=MenuItemGroup,_excluded30=[\"label\",\"children\",\"key\",\"type\",\"extra\"];function convertItemsToNodes(e,t,r){var n=t.item,i=t.group,o=t.submenu,a=t.divider;return(e||[]).map((function(e,s){if(e&&\"object\"===_typeof(e)){var l=e,u=l.label,c=l.children,d=l.key,h=l.type,f=l.extra,p=_objectWithoutProperties(l,_excluded30),m=null!=d?d:\"tmp-\".concat(s);return c||\"group\"===h?\"group\"===h?React200.createElement(i,_extends({key:m},p,{title:u}),convertItemsToNodes(c,t,r)):React200.createElement(o,_extends({key:m},p,{title:u}),convertItemsToNodes(c,t,r)):\"divider\"===h?React200.createElement(a,_extends({key:m},p)):React200.createElement(n,_extends({key:m},p),u,(!!f||0===f)&&React200.createElement(\"span\",{className:\"\".concat(r,\"-item-extra\")},f))}return null})).filter((function(e){return e}))}function parseItems(e,t,r,n,i){var o=e,a=_objectSpread2({divider:Divider,item:MenuItem_default,group:MenuItemGroup_default,submenu:SubMenu_default},n);return t&&(o=convertItemsToNodes(t,a,i)),parseChildren(o,r)}var _excluded31=[\"prefixCls\",\"rootClassName\",\"style\",\"className\",\"tabIndex\",\"items\",\"children\",\"direction\",\"id\",\"mode\",\"inlineCollapsed\",\"disabled\",\"disabledOverflow\",\"subMenuOpenDelay\",\"subMenuCloseDelay\",\"forceSubMenuRender\",\"defaultOpenKeys\",\"openKeys\",\"activeKey\",\"defaultActiveFirst\",\"selectable\",\"multiple\",\"defaultSelectedKeys\",\"selectedKeys\",\"onSelect\",\"onDeselect\",\"inlineIndent\",\"motion\",\"defaultMotions\",\"triggerSubMenuAction\",\"builtinPlacements\",\"itemIcon\",\"expandIcon\",\"overflowedIndicator\",\"overflowedIndicatorPopupClassName\",\"getPopupContainer\",\"onClick\",\"onOpenChange\",\"onKeyDown\",\"openAnimation\",\"openTransitionName\",\"_internalRenderMenuItem\",\"_internalRenderSubMenuItem\",\"_internalComponents\"],EMPTY_LIST2=[],Menu=React201.forwardRef((function(e,t){var r,n=e,i=n.prefixCls,o=void 0===i?\"rc-menu\":i,a=n.rootClassName,s=n.style,l=n.className,u=n.tabIndex,c=void 0===u?0:u,d=n.items,h=n.children,f=n.direction,p=n.id,m=n.mode,g=void 0===m?\"vertical\":m,_=n.inlineCollapsed,b=n.disabled,y=n.disabledOverflow,v=n.subMenuOpenDelay,A=void 0===v?.1:v,w=n.subMenuCloseDelay,S=void 0===w?.1:w,E=n.forceSubMenuRender,x=n.defaultOpenKeys,C=n.openKeys,T=n.activeKey,R=n.defaultActiveFirst,I=n.selectable,k=void 0===I||I,P=n.multiple,M=void 0!==P&&P,O=n.defaultSelectedKeys,B=n.selectedKeys,N=n.onSelect,j=n.onDeselect,L=n.inlineIndent,D=void 0===L?24:L,F=n.motion,U=n.defaultMotions,z=n.triggerSubMenuAction,q=void 0===z?\"hover\":z,G=n.builtinPlacements,H=n.itemIcon,W=n.expandIcon,V=n.overflowedIndicator,$=void 0===V?\"...\":V,K=n.overflowedIndicatorPopupClassName,X=n.getPopupContainer,Y=n.onClick,J=n.onOpenChange,Q=n.onKeyDown,Z=n.openAnimation,ee=n.openTransitionName,te=n._internalRenderMenuItem,re=n._internalRenderSubMenuItem,ne=n._internalComponents,ie=_objectWithoutProperties(n,_excluded31),oe=_slicedToArray(React201.useMemo((function(){return[parseItems(h,d,EMPTY_LIST2,ne,o),parseItems(h,d,EMPTY_LIST2,{},o)]}),[h,d,ne]),2),ae=oe[0],se=oe[1],le=_slicedToArray(React201.useState(!1),2),ue=le[0],ce=le[1],de=React201.useRef(),he=useUUID(p),fe=\"rtl\"===f;warning_default(!Z&&!ee,\"`openAnimation` and `openTransitionName` is removed. Please use `motion` or `defaultMotion` instead.\");var pe=_slicedToArray(useMergedState(x,{value:C,postState:function(e){return e||EMPTY_LIST2}}),2),me=pe[0],ge=pe[1],_e=function(e){function t(){ge(e),null==J||J(e)}arguments.length>1&&void 0!==arguments[1]&&arguments[1]?(0,import_react_dom5.flushSync)(t):t()},be=_slicedToArray(React201.useState(me),2),ye=be[0],ve=be[1],Ae=React201.useRef(!1),we=_slicedToArray(React201.useMemo((function(){return\"inline\"!==g&&\"vertical\"!==g||!_?[g,!1]:[\"vertical\",_]}),[g,_]),2),Se=we[0],Ee=we[1],xe=\"inline\"===Se,Ce=_slicedToArray(React201.useState(Se),2),Te=Ce[0],Re=Ce[1],Ie=_slicedToArray(React201.useState(Ee),2),ke=Ie[0],Pe=Ie[1];React201.useEffect((function(){Re(Se),Pe(Ee),Ae.current&&(xe?ge(ye):_e(EMPTY_LIST2))}),[Se,Ee]);var Me=_slicedToArray(React201.useState(0),2),Oe=Me[0],Be=Me[1],Ne=Oe>=ae.length-1||\"horizontal\"!==Te||y;React201.useEffect((function(){xe&&ve(me)}),[me]),React201.useEffect((function(){return Ae.current=!0,function(){Ae.current=!1}}),[]);var je=useKeyRecords(),Le=je.registerPath,De=je.unregisterPath,Fe=je.refreshOverflowKeys,Ue=je.isSubPathKey,ze=je.getKeyPath,qe=je.getKeys,Ge=je.getSubPathKeys,He=React201.useMemo((function(){return{registerPath:Le,unregisterPath:De}}),[Le,De]),We=React201.useMemo((function(){return{isSubPathKey:Ue}}),[Ue]);React201.useEffect((function(){Fe(Ne?EMPTY_LIST2:ae.slice(Oe+1).map((function(e){return e.key})))}),[Oe,Ne]);var Ve=_slicedToArray(useMergedState(T||R&&(null===(r=ae[0])||void 0===r?void 0:r.key),{value:T}),2),$e=Ve[0],Ke=Ve[1],Xe=useMemoCallback((function(e){Ke(e)})),Ye=useMemoCallback((function(){Ke(void 0)}));(0,import_react68.useImperativeHandle)(t,(function(){return{list:de.current,focus:function(e){var t,r,n=qe(),i=refreshElements(n,he),o=i.elements,a=i.key2element,s=i.element2key,l=getFocusableElements(de.current,o),u=null!=$e?$e:l[0]?s.get(l[0]):null===(t=ae.find((function(e){return!e.props.disabled})))||void 0===t?void 0:t.key,c=a.get(u);u&&c&&(null==c||null===(r=c.focus)||void 0===r||r.call(c,e))}}}));var Je=_slicedToArray(useMergedState(O||[],{value:B,postState:function(e){return Array.isArray(e)?e:null==e?EMPTY_LIST2:[e]}}),2),Qe=Je[0],Ze=Je[1],et=useMemoCallback((function(e){null==Y||Y(warnItemProp(e)),function(e){if(k){var t,r=e.key,n=Qe.includes(r);t=M?n?Qe.filter((function(e){return e!==r})):[].concat(_toConsumableArray(Qe),[r]):[r],Ze(t);var i=_objectSpread2(_objectSpread2({},e),{},{selectedKeys:t});n?null==j||j(i):null==N||N(i)}!M&&me.length&&\"inline\"!==Te&&_e(EMPTY_LIST2)}(e)})),tt=useMemoCallback((function(e,t){var r=me.filter((function(t){return t!==e}));if(t)r.push(e);else if(\"inline\"!==Te){var n=Ge(e);r=r.filter((function(e){return!n.has(e)}))}isEqual_default(me,r,!0)||_e(r,!0)})),rt=useAccessibility2(Te,$e,fe,he,de,qe,ze,Ke,(function(e,t){var r=null!=t?t:!me.includes(e);tt(e,r)}),Q);React201.useEffect((function(){ce(!0)}),[]);var nt=React201.useMemo((function(){return{_internalRenderMenuItem:te,_internalRenderSubMenuItem:re}}),[te,re]),it=\"horizontal\"!==Te||y?ae:ae.map((function(e,t){return React201.createElement(InheritableContextProvider,{key:e.key,overflowDisabled:t>Oe},e)})),ot=React201.createElement(es_default7,_extends({id:p,ref:de,prefixCls:\"\".concat(o,\"-overflow\"),component:\"ul\",itemComponent:MenuItem_default,className:(0,import_classnames56.default)(o,\"\".concat(o,\"-root\"),\"\".concat(o,\"-\").concat(Te),l,_defineProperty(_defineProperty({},\"\".concat(o,\"-inline-collapsed\"),ke),\"\".concat(o,\"-rtl\"),fe),a),dir:f,style:s,role:\"menu\",tabIndex:c,data:it,renderRawItem:function(e){return e},renderRawRest:function(e){var t=e.length,r=t?ae.slice(-t):null;return React201.createElement(SubMenu_default,{eventKey:OVERFLOW_KEY,title:$,disabled:Ne,internalPopupClose:0===t,popupClassName:K},r)},maxCount:\"horizontal\"!==Te||y?es_default7.INVALIDATE:es_default7.RESPONSIVE,ssr:\"full\",\"data-menu-list\":!0,onVisibleChange:function(e){Be(e)},onKeyDown:rt},ie));return React201.createElement(PrivateContext_default.Provider,{value:nt},React201.createElement(IdContext.Provider,{value:he},React201.createElement(InheritableContextProvider,{prefixCls:o,rootClassName:a,mode:Te,openKeys:me,rtl:fe,disabled:b,motion:ue?F:null,defaultMotions:ue?U:null,activeKey:$e,onActive:Xe,onInactive:Ye,selectedKeys:Qe,inlineIndent:D,subMenuOpenDelay:A,subMenuCloseDelay:S,forceSubMenuRender:E,builtinPlacements:G,triggerSubMenuAction:q,getPopupContainer:X,itemIcon:H,expandIcon:W,onItemClick:et,onOpenChange:tt},React201.createElement(PathUserContext.Provider,{value:We},ot),React201.createElement(\"div\",{style:{display:\"none\"},\"aria-hidden\":!0},React201.createElement(PathRegisterContext.Provider,{value:He},se)))))})),Menu_default=Menu,ExportMenu=Menu_default;ExportMenu.Item=MenuItem_default,ExportMenu.SubMenu=SubMenu_default,ExportMenu.ItemGroup=MenuItemGroup_default,ExportMenu.Divider=Divider;var es_default11=ExportMenu;init_globals();var React205=__toESM(require_react()),import_react69=__toESM(require_react());init_globals();var React202=__toESM(require_react()),BarsOutlined2=function(e,t){return React202.createElement(AntdIcon_default2,_extends({},e,{ref:t,icon:BarsOutlined_default}))},RefIcon29=React202.forwardRef(BarsOutlined2);RefIcon29.displayName=\"BarsOutlined\";var BarsOutlined_default2=RefIcon29;init_globals();var React203=__toESM(require_react()),LeftOutlined2=function(e,t){return React203.createElement(AntdIcon_default2,_extends({},e,{ref:t,icon:LeftOutlined_default}))},RefIcon30=React203.forwardRef(LeftOutlined2);RefIcon30.displayName=\"LeftOutlined\";var LeftOutlined_default2=RefIcon30,import_classnames57=__toESM(require_classnames());init_globals();var isNumeric=e=>!isNaN(parseFloat(e))&&isFinite(e),isNumeric_default=isNumeric;init_globals();var React204=__toESM(require_react()),LayoutContext=React204.createContext({siderHook:{addSider:()=>null,removeSider:()=>null}});init_globals(),init_globals();var genLayoutStyle=e=>{const{antCls:t,componentCls:r,colorText:n,footerBg:i,headerHeight:o,headerPadding:a,headerColor:s,footerPadding:l,fontSize:u,bodyBg:c,headerBg:d}=e;return{[r]:{display:\"flex\",flex:\"auto\",flexDirection:\"column\",minHeight:0,background:c,\"&, *\":{boxSizing:\"border-box\"},[`&${r}-has-sider`]:{flexDirection:\"row\",[`> ${r}, > ${r}-content`]:{width:0}},[`${r}-header, &${r}-footer`]:{flex:\"0 0 auto\"},\"&-rtl\":{direction:\"rtl\"}},[`${r}-header`]:{height:o,padding:a,color:s,lineHeight:unit(o),background:d,[`${t}-menu`]:{lineHeight:\"inherit\"}},[`${r}-footer`]:{padding:l,color:n,fontSize:u,background:i},[`${r}-content`]:{flex:\"auto\",color:n,minHeight:0}}},prepareComponentToken7=e=>{const{colorBgLayout:t,controlHeight:r,controlHeightLG:n,colorText:i,controlHeightSM:o,marginXXS:a,colorTextLightSolid:s,colorBgContainer:l}=e,u=1.25*n;return{colorBgHeader:\"#001529\",colorBgBody:t,colorBgTrigger:\"#002140\",bodyBg:t,headerBg:\"#001529\",headerHeight:2*r,headerPadding:`0 ${u}px`,headerColor:i,footerPadding:`${o}px ${u}px`,footerBg:t,siderBg:\"#001529\",triggerHeight:n+2*a,triggerBg:\"#002140\",triggerColor:s,zeroTriggerWidth:n,zeroTriggerHeight:n,lightSiderBg:l,lightTriggerBg:l,lightTriggerColor:i}},DEPRECATED_TOKENS=[[\"colorBgBody\",\"bodyBg\"],[\"colorBgHeader\",\"headerBg\"],[\"colorBgTrigger\",\"triggerBg\"]],style_default10=genStyleHooks(\"Layout\",(e=>[genLayoutStyle(e)]),prepareComponentToken7,{deprecatedTokens:DEPRECATED_TOKENS}),genSiderStyle=e=>{const{componentCls:t,siderBg:r,motionDurationMid:n,motionDurationSlow:i,antCls:o,triggerHeight:a,triggerColor:s,triggerBg:l,headerHeight:u,zeroTriggerWidth:c,zeroTriggerHeight:d,borderRadius:h,lightSiderBg:f,lightTriggerColor:p,lightTriggerBg:m,bodyBg:g}=e;return{[t]:{position:\"relative\",minWidth:0,background:r,transition:`all ${n}, background 0s`,\"&-has-trigger\":{paddingBottom:a},\"&-right\":{order:1},[`${t}-children`]:{height:\"100%\",marginTop:-.1,paddingTop:.1,[`${o}-menu${o}-menu-inline-collapsed`]:{width:\"auto\"}},[`${t}-trigger`]:{position:\"fixed\",bottom:0,zIndex:1,height:a,color:s,lineHeight:unit(a),textAlign:\"center\",background:l,cursor:\"pointer\",transition:`all ${n}`},\"&-zero-width\":{\"> *\":{overflow:\"hidden\"},\"&-trigger\":{position:\"absolute\",top:u,insetInlineEnd:e.calc(c).mul(-1).equal(),zIndex:1,width:c,height:d,color:s,fontSize:e.fontSizeXL,display:\"flex\",alignItems:\"center\",justifyContent:\"center\",background:r,borderStartStartRadius:0,borderStartEndRadius:h,borderEndEndRadius:h,borderEndStartRadius:0,cursor:\"pointer\",transition:`background ${i} ease`,\"&::after\":{position:\"absolute\",inset:0,background:\"transparent\",transition:`all ${i}`,content:'\"\"'},\"&:hover::after\":{background:\"rgba(255, 255, 255, 0.2)\"},\"&-right\":{insetInlineStart:e.calc(c).mul(-1).equal(),borderStartStartRadius:h,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:h}}},\"&-light\":{background:f,[`${t}-trigger`]:{color:p,background:m},[`${t}-zero-width-trigger`]:{color:p,background:m,border:`1px solid ${g}`,borderInlineStart:0}}}}},sider_default=genStyleHooks([\"Layout\",\"Sider\"],(e=>[genSiderStyle(e)]),prepareComponentToken7,{deprecatedTokens:DEPRECATED_TOKENS}),__rest15=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)__left_angle_mark_0&&(r[n]=e[n]);if(null!=e&&\"function\"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i__left_angle_mark_n.length;i++)t.indexOf(n[i])__left_angle_mark_0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r},dimensionMaxMap={xs:\"479.98px\",sm:\"575.98px\",md:\"767.98px\",lg:\"991.98px\",xl:\"1199.98px\",xxl:\"1599.98px\"},SiderContext=React205.createContext({}),generateId=(()=>{let e=0;return function(){return e+=1,`${arguments.length>0&&void 0!==arguments[0]?arguments[0]:\"\"}${e}`}})(),Sider=React205.forwardRef(((e,t)=>{const{prefixCls:r,className:n,trigger:i,children:o,defaultCollapsed:a=!1,theme:s=\"dark\",style:l={},collapsible:u=!1,reverseArrow:c=!1,width:d=200,collapsedWidth:h=80,zeroWidthTriggerStyle:f,breakpoint:p,onCollapse:m,onBreakpoint:g}=e,_=__rest15(e,[\"prefixCls\",\"className\",\"trigger\",\"children\",\"defaultCollapsed\",\"theme\",\"style\",\"collapsible\",\"reverseArrow\",\"width\",\"collapsedWidth\",\"zeroWidthTriggerStyle\",\"breakpoint\",\"onCollapse\",\"onBreakpoint\"]),{siderHook:b}=(0,import_react69.useContext)(LayoutContext),[y,v]=(0,import_react69.useState)(\"collapsed\"in e?e.collapsed:a),[A,w]=(0,import_react69.useState)(!1);(0,import_react69.useEffect)((()=>{\"collapsed\"in e&&v(e.collapsed)}),[e.collapsed]);const S=(t,r)=>{\"collapsed\"in e||v(t),null==m||m(t,r)},{getPrefixCls:E}=(0,import_react69.useContext)(ConfigContext),x=E(\"layout-sider\",r),[C,T,R]=sider_default(x),I=(0,import_react69.useRef)();I.current=e=>{w(e.matches),null==g||g(e.matches),y!==e.matches&&S(e.matches,\"responsive\")},(0,import_react69.useEffect)((()=>{function e(e){return I.current(e)}let t;if(\"undefined\"!=typeof window){const{matchMedia:n}=window;if(n&&p&&p in dimensionMaxMap){t=n(`screen and (max-width: ${dimensionMaxMap[p]})`);try{t.addEventListener(\"change\",e)}catch(r){t.addListener(e)}e(t)}}return()=>{try{null==t||t.removeEventListener(\"change\",e)}catch(r){null==t||t.removeListener(e)}}}),[p]),(0,import_react69.useEffect)((()=>{const e=generateId(\"ant-sider-\");return b.addSider(e),()=>b.removeSider(e)}),[]);const k=()=>{S(!y,\"clickTrigger\")},P=React205.useMemo((()=>({siderCollapsed:y})),[y]);return C(React205.createElement(SiderContext.Provider,{value:P},(()=>{const e=omit(_,[\"collapsed\"]),r=y?h:d,a=isNumeric_default(r)?`${r}px`:String(r),p=0===parseFloat(String(h||0))?React205.createElement(\"span\",{onClick:k,className:(0,import_classnames57.default)(`${x}-zero-width-trigger`,`${x}-zero-width-trigger-${c?\"right\":\"left\"}`),style:f},i||React205.createElement(BarsOutlined_default2,null)):null,m={expanded:c?React205.createElement(RightOutlined_default2,null):React205.createElement(LeftOutlined_default2,null),collapsed:c?React205.createElement(LeftOutlined_default2,null):React205.createElement(RightOutlined_default2,null)}[y?\"collapsed\":\"expanded\"],g=null!==i?p||React205.createElement(\"div\",{className:`${x}-trigger`,onClick:k,style:{width:a}},i||m):null,b=Object.assign(Object.assign({},l),{flex:`0 0 ${a}`,maxWidth:a,minWidth:a,width:a}),v=(0,import_classnames57.default)(x,`${x}-${s}`,{[`${x}-collapsed`]:!!y,[`${x}-has-trigger`]:u&&null!==i&&!p,[`${x}-below`]:!!A,[`${x}-zero-width`]:0===parseFloat(a)},n,T,R);return React205.createElement(\"aside\",Object.assign({className:v},e,{style:b,ref:t}),React205.createElement(\"div\",{className:`${x}-children`},o),u||A&&p?g:null)})()))}));Sider.displayName=\"Sider\",init_globals();var React211=__toESM(require_react()),import_react71=__toESM(require_react());init_globals();var React206=__toESM(require_react()),EllipsisOutlined2=function(e,t){return React206.createElement(AntdIcon_default2,_extends({},e,{ref:t,icon:EllipsisOutlined_default}))},RefIcon31=React206.forwardRef(EllipsisOutlined2);RefIcon31.displayName=\"EllipsisOutlined\";var EllipsisOutlined_default2=RefIcon31,import_classnames61=__toESM(require_classnames());init_globals();var import_react70=__toESM(require_react()),MenuContext2=(0,import_react70.createContext)({prefixCls:\"\",firstLevel:!0,inlineCollapsed:!1}),MenuContext_default=MenuContext2;init_globals();var React207=__toESM(require_react()),import_classnames58=__toESM(require_classnames()),__rest16=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)__left_angle_mark_0&&(r[n]=e[n]);if(null!=e&&\"function\"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i__left_angle_mark_n.length;i++)t.indexOf(n[i])__left_angle_mark_0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r},MenuDivider=e=>{const{prefixCls:t,className:r,dashed:n}=e,i=__rest16(e,[\"prefixCls\",\"className\",\"dashed\"]),{getPrefixCls:o}=React207.useContext(ConfigContext),a=o(\"menu\",t),s=(0,import_classnames58.default)({[`${a}-item-divider-dashed`]:!!n},r);return React207.createElement(Divider,Object.assign({className:s},i))},MenuDivider_default=MenuDivider;init_globals();var React208=__toESM(require_react()),import_classnames59=__toESM(require_classnames()),MenuItem2=e=>{var t;const{className:r,children:n,icon:i,title:o,danger:a}=e,{prefixCls:s,firstLevel:l,direction:u,disableMenuItemTitleTooltip:c,inlineCollapsed:d}=React208.useContext(MenuContext_default),{siderCollapsed:h}=React208.useContext(SiderContext);let f=o;void 0===o?f=l?n:\"\":!1===o&&(f=\"\");const p={title:f};h||d||(p.title=null,p.open=!1);const m=toArray(n).length;let g=React208.createElement(MenuItem_default,Object.assign({},omit(e,[\"title\",\"icon\",\"danger\"]),{className:(0,import_classnames59.default)({[`${s}-item-danger`]:a,[`${s}-item-only-child`]:1===(i?m+1:m)},r),title:\"string\"==typeof o?o:void 0}),cloneElement3(i,{className:(0,import_classnames59.default)(React208.isValidElement(i)?null===(t=i.props)||void 0===t?void 0:t.className:\"\",`${s}-item-icon`)}),(e=>{const t=null==n?void 0:n[0],r=React208.createElement(\"span\",{className:`${s}-title-content`},n);return(!i||React208.isValidElement(n)&&\"span\"===n.type)&&n&&e&&l&&\"string\"==typeof t?React208.createElement(\"div\",{className:`${s}-inline-collapsed-noicon`},t.charAt(0)):r})(d));return c||(g=React208.createElement(tooltip_default,Object.assign({},p,{placement:\"rtl\"===u?\"left\":\"right\",overlayClassName:`${s}-inline-collapsed-tooltip`}),g)),g},MenuItem_default2=MenuItem2;init_globals();var React209=__toESM(require_react()),__rest17=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)__left_angle_mark_0&&(r[n]=e[n]);if(null!=e&&\"function\"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i__left_angle_mark_n.length;i++)t.indexOf(n[i])__left_angle_mark_0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r},OverrideContext=React209.createContext(null),OverrideProvider=React209.forwardRef(((e,t)=>{const{children:r}=e,n=__rest17(e,[\"children\"]),i=React209.useContext(OverrideContext),o=React209.useMemo((()=>Object.assign(Object.assign({},i),n)),[i,n.prefixCls,n.mode,n.selectable,n.rootClassName]),a=supportNodeRef(r),s=useComposeRef(t,a?r.ref:null);return React209.createElement(OverrideContext.Provider,{value:o},React209.createElement(ContextIsolator_default,{space:!0},a?React209.cloneElement(r,{ref:s}):r))})),OverrideContext_default=OverrideContext;init_globals(),init_globals();var getHorizontalStyle=e=>{const{componentCls:t,motionDurationSlow:r,horizontalLineHeight:n,colorSplit:i,lineWidth:o,lineType:a,itemPaddingInline:s}=e;return{[`${t}-horizontal`]:{lineHeight:n,border:0,borderBottom:`${unit(o)} ${a} ${i}`,boxShadow:\"none\",\"&::after\":{display:\"block\",clear:\"both\",height:0,content:'\"\\\\20\"'},[`${t}-item, ${t}-submenu`]:{position:\"relative\",display:\"inline-block\",verticalAlign:\"bottom\",paddingInline:s},[`> ${t}-item:hover,\\n > ${t}-item-active,\\n > ${t}-submenu ${t}-submenu-title:hover`]:{backgroundColor:\"transparent\"},[`${t}-item, ${t}-submenu-title`]:{transition:[`border-color ${r}`,`background ${r}`].join(\",\")},[`${t}-submenu-arrow`]:{display:\"none\"}}}},horizontal_default=getHorizontalStyle;init_globals();var getRTLStyle=e=>{let{componentCls:t,menuArrowOffset:r,calc:n}=e;return{[`${t}-rtl`]:{direction:\"rtl\"},[`${t}-submenu-rtl`]:{transformOrigin:\"100% 0\"},[`${t}-rtl${t}-vertical,\\n ${t}-submenu-rtl ${t}-vertical`]:{[`${t}-submenu-arrow`]:{\"&::before\":{transform:`rotate(-45deg) translateY(${unit(n(r).mul(-1).equal())})`},\"&::after\":{transform:`rotate(45deg) translateY(${unit(r)})`}}}}},rtl_default=getRTLStyle;init_globals();var accessibilityFocus=e=>Object.assign({},genFocusOutline(e)),getThemeStyle=(e,t)=>{const{componentCls:r,itemColor:n,itemSelectedColor:i,groupTitleColor:o,itemBg:a,subMenuItemBg:s,itemSelectedBg:l,activeBarHeight:u,activeBarWidth:c,activeBarBorderWidth:d,motionDurationSlow:h,motionEaseInOut:f,motionEaseOut:p,itemPaddingInline:m,motionDurationMid:g,itemHoverColor:_,lineType:b,colorSplit:y,itemDisabledColor:v,dangerItemColor:A,dangerItemHoverColor:w,dangerItemSelectedColor:S,dangerItemActiveBg:E,dangerItemSelectedBg:x,popupBg:C,itemHoverBg:T,itemActiveBg:R,menuSubMenuBg:I,horizontalItemSelectedColor:k,horizontalItemSelectedBg:P,horizontalItemBorderRadius:M,horizontalItemHoverBg:O}=e;return{[`${r}-${t}, ${r}-${t} > ${r}`]:{color:n,background:a,[`&${r}-root:focus-visible`]:Object.assign({},accessibilityFocus(e)),[`${r}-item-group-title`]:{color:o},[`${r}-submenu-selected`]:{[`> ${r}-submenu-title`]:{color:i}},[`${r}-item, ${r}-submenu-title`]:{color:n,[`&:not(${r}-item-disabled):focus-visible`]:Object.assign({},accessibilityFocus(e))},[`${r}-item-disabled, ${r}-submenu-disabled`]:{color:`${v} !important`},[`${r}-item:not(${r}-item-selected):not(${r}-submenu-selected)`]:{[`&:hover, > ${r}-submenu-title:hover`]:{color:_}},[`&:not(${r}-horizontal)`]:{[`${r}-item:not(${r}-item-selected)`]:{\"&:hover\":{backgroundColor:T},\"&:active\":{backgroundColor:R}},[`${r}-submenu-title`]:{\"&:hover\":{backgroundColor:T},\"&:active\":{backgroundColor:R}}},[`${r}-item-danger`]:{color:A,[`&${r}-item:hover`]:{[`&:not(${r}-item-selected):not(${r}-submenu-selected)`]:{color:w}},[`&${r}-item:active`]:{background:E}},[`${r}-item a`]:{\"&, &:hover\":{color:\"inherit\"}},[`${r}-item-selected`]:{color:i,[`&${r}-item-danger`]:{color:S},\"a, a:hover\":{color:\"inherit\"}},[`& ${r}-item-selected`]:{backgroundColor:l,[`&${r}-item-danger`]:{backgroundColor:x}},[`&${r}-submenu > ${r}`]:{backgroundColor:I},[`&${r}-popup > ${r}`]:{backgroundColor:C},[`&${r}-submenu-popup > ${r}`]:{backgroundColor:C},[`&${r}-horizontal`]:Object.assign(Object.assign({},\"dark\"===t?{borderBottom:0}:{}),{[`> ${r}-item, > ${r}-submenu`]:{top:d,marginTop:e.calc(d).mul(-1).equal(),marginBottom:0,borderRadius:M,\"&::after\":{position:\"absolute\",insetInline:m,bottom:0,borderBottom:`${unit(u)} solid transparent`,transition:`border-color ${h} ${f}`,content:'\"\"'},\"&:hover, &-active, &-open\":{background:O,\"&::after\":{borderBottomWidth:u,borderBottomColor:k}},\"&-selected\":{color:k,backgroundColor:P,\"&:hover\":{backgroundColor:P},\"&::after\":{borderBottomWidth:u,borderBottomColor:k}}}}),[`&${r}-root`]:{[`&${r}-inline, &${r}-vertical`]:{borderInlineEnd:`${unit(d)} ${b} ${y}`}},[`&${r}-inline`]:{[`${r}-sub${r}-inline`]:{background:s},[`${r}-item`]:{position:\"relative\",\"&::after\":{position:\"absolute\",insetBlock:0,insetInlineEnd:0,borderInlineEnd:`${unit(c)} solid ${i}`,transform:\"scaleY(0.0001)\",opacity:0,transition:[`transform ${g} ${p}`,`opacity ${g} ${p}`].join(\",\"),content:'\"\"'},[`&${r}-item-danger`]:{\"&::after\":{borderInlineEndColor:S}}},[`${r}-selected, ${r}-item-selected`]:{\"&::after\":{transform:\"scaleY(1)\",opacity:1,transition:[`transform ${g} ${f}`,`opacity ${g} ${f}`].join(\",\")}}}}}},theme_default=getThemeStyle;init_globals();var getVerticalInlineStyle=e=>{const{componentCls:t,itemHeight:r,itemMarginInline:n,padding:i,menuArrowSize:o,marginXS:a,itemMarginBlock:s,itemWidth:l,itemPaddingInline:u}=e,c=e.calc(o).add(i).add(a).equal();return{[`${t}-item`]:{position:\"relative\",overflow:\"hidden\"},[`${t}-item, ${t}-submenu-title`]:{height:r,lineHeight:unit(r),paddingInline:u,overflow:\"hidden\",textOverflow:\"ellipsis\",marginInline:n,marginBlock:s,width:l},[`> ${t}-item,\\n > ${t}-submenu > ${t}-submenu-title`]:{height:r,lineHeight:unit(r)},[`${t}-item-group-list ${t}-submenu-title,\\n ${t}-submenu-title`]:{paddingInlineEnd:c}}},getVerticalStyle=e=>{const{componentCls:t,iconCls:r,itemHeight:n,colorTextLightSolid:i,dropdownWidth:o,controlHeightLG:a,motionEaseOut:s,paddingXL:l,itemMarginInline:u,fontSizeLG:c,motionDurationFast:d,motionDurationSlow:h,paddingXS:f,boxShadowSecondary:p,collapsedWidth:m,collapsedIconSize:g}=e,_={height:n,lineHeight:unit(n),listStylePosition:\"inside\",listStyleType:\"disc\"};return[{[t]:{\"&-inline, &-vertical\":Object.assign({[`&${t}-root`]:{boxShadow:\"none\"}},getVerticalInlineStyle(e))},[`${t}-submenu-popup`]:{[`${t}-vertical`]:Object.assign(Object.assign({},getVerticalInlineStyle(e)),{boxShadow:p})}},{[`${t}-submenu-popup ${t}-vertical${t}-sub`]:{minWidth:o,maxHeight:`calc(100vh - ${unit(e.calc(a).mul(2.5).equal())})`,padding:\"0\",overflow:\"hidden\",borderInlineEnd:0,\"&:not([class*='-active'])\":{overflowX:\"hidden\",overflowY:\"auto\"}}},{[`${t}-inline`]:{width:\"100%\",[`&${t}-root`]:{[`${t}-item, ${t}-submenu-title`]:{display:\"flex\",alignItems:\"center\",transition:[`border-color ${h}`,`background ${h}`,`padding ${d} ${s}`].join(\",\"),[`> ${t}-title-content`]:{flex:\"auto\",minWidth:0,overflow:\"hidden\",textOverflow:\"ellipsis\"},\"> *\":{flex:\"none\"}}},[`${t}-sub${t}-inline`]:{padding:0,border:0,borderRadius:0,boxShadow:\"none\",[`& > ${t}-submenu > ${t}-submenu-title`]:_,[`& ${t}-item-group-title`]:{paddingInlineStart:l}},[`${t}-item`]:_}},{[`${t}-inline-collapsed`]:{width:m,[`&${t}-root`]:{[`${t}-item, ${t}-submenu ${t}-submenu-title`]:{[`> ${t}-inline-collapsed-noicon`]:{fontSize:c,textAlign:\"center\"}}},[`> ${t}-item,\\n > ${t}-item-group > ${t}-item-group-list > ${t}-item,\\n > ${t}-item-group > ${t}-item-group-list > ${t}-submenu > ${t}-submenu-title,\\n > ${t}-submenu > ${t}-submenu-title`]:{insetInlineStart:0,paddingInline:`calc(50% - ${unit(e.calc(c).div(2).equal())} - ${unit(u)})`,textOverflow:\"clip\",[`\\n ${t}-submenu-arrow,\\n ${t}-submenu-expand-icon\\n `]:{opacity:0},[`${t}-item-icon, ${r}`]:{margin:0,fontSize:g,lineHeight:unit(n),\"+ span\":{display:\"inline-block\",opacity:0}}},[`${t}-item-icon, ${r}`]:{display:\"inline-block\"},\"&-tooltip\":{pointerEvents:\"none\",[`${t}-item-icon, ${r}`]:{display:\"none\"},\"a, a:hover\":{color:i}},[`${t}-item-group-title`]:Object.assign(Object.assign({},textEllipsis),{paddingInline:f})}}]},vertical_default=getVerticalStyle,genMenuItemStyle=e=>{const{componentCls:t,motionDurationSlow:r,motionDurationMid:n,motionEaseInOut:i,motionEaseOut:o,iconCls:a,iconSize:s,iconMarginInlineEnd:l}=e;return{[`${t}-item, ${t}-submenu-title`]:{position:\"relative\",display:\"block\",margin:0,whiteSpace:\"nowrap\",cursor:\"pointer\",transition:[`border-color ${r}`,`background ${r}`,`padding calc(${r} + 0.1s) ${i}`].join(\",\"),[`${t}-item-icon, ${a}`]:{minWidth:s,fontSize:s,transition:[`font-size ${n} ${o}`,`margin ${r} ${i}`,`color ${r}`].join(\",\"),\"+ span\":{marginInlineStart:l,opacity:1,transition:[`opacity ${r} ${i}`,`margin ${r}`,`color ${r}`].join(\",\")}},[`${t}-item-icon`]:Object.assign({},resetIcon()),[`&${t}-item-only-child`]:{[`> ${a}, > ${t}-item-icon`]:{marginInlineEnd:0}}},[`${t}-item-disabled, ${t}-submenu-disabled`]:{background:\"none !important\",cursor:\"not-allowed\",\"&::after\":{borderColor:\"transparent !important\"},a:{color:\"inherit !important\"},[`> ${t}-submenu-title`]:{color:\"inherit !important\",cursor:\"not-allowed\"}}}},genSubMenuArrowStyle=e=>{const{componentCls:t,motionDurationSlow:r,motionEaseInOut:n,borderRadius:i,menuArrowSize:o,menuArrowOffset:a}=e;return{[`${t}-submenu`]:{\"&-expand-icon, &-arrow\":{position:\"absolute\",top:\"50%\",insetInlineEnd:e.margin,width:o,color:\"currentcolor\",transform:\"translateY(-50%)\",transition:`transform ${r} ${n}, opacity ${r}`},\"&-arrow\":{\"&::before, &::after\":{position:\"absolute\",width:e.calc(o).mul(.6).equal(),height:e.calc(o).mul(.15).equal(),backgroundColor:\"currentcolor\",borderRadius:i,transition:[`background ${r} ${n}`,`transform ${r} ${n}`,`top ${r} ${n}`,`color ${r} ${n}`].join(\",\"),content:'\"\"'},\"&::before\":{transform:`rotate(45deg) translateY(${unit(e.calc(a).mul(-1).equal())})`},\"&::after\":{transform:`rotate(-45deg) translateY(${unit(a)})`}}}}},getBaseStyle=e=>{const{antCls:t,componentCls:r,fontSize:n,motionDurationSlow:i,motionDurationMid:o,motionEaseInOut:a,paddingXS:s,padding:l,colorSplit:u,lineWidth:c,zIndexPopup:d,borderRadiusLG:h,subMenuItemBorderRadius:f,menuArrowSize:p,menuArrowOffset:m,lineType:g,groupTitleLineHeight:_,groupTitleFontSize:b}=e;return[{\"\":{[r]:Object.assign(Object.assign({},clearFix()),{\"&-hidden\":{display:\"none\"}})},[`${r}-submenu-hidden`]:{display:\"none\"}},{[r]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},resetComponent(e)),clearFix()),{marginBottom:0,paddingInlineStart:0,fontSize:n,lineHeight:0,listStyle:\"none\",outline:\"none\",transition:`width ${i} cubic-bezier(0.2, 0, 0, 1) 0s`,\"ul, ol\":{margin:0,padding:0,listStyle:\"none\"},\"&-overflow\":{display:\"flex\",[`${r}-item`]:{flex:\"none\"}},[`${r}-item, ${r}-submenu, ${r}-submenu-title`]:{borderRadius:e.itemBorderRadius},[`${r}-item-group-title`]:{padding:`${unit(s)} ${unit(l)}`,fontSize:b,lineHeight:_,transition:`all ${i}`},[`&-horizontal ${r}-submenu`]:{transition:[`border-color ${i} ${a}`,`background ${i} ${a}`].join(\",\")},[`${r}-submenu, ${r}-submenu-inline`]:{transition:[`border-color ${i} ${a}`,`background ${i} ${a}`,`padding ${o} ${a}`].join(\",\")},[`${r}-submenu ${r}-sub`]:{cursor:\"initial\",transition:[`background ${i} ${a}`,`padding ${i} ${a}`].join(\",\")},[`${r}-title-content`]:{display:\"inline-flex\",alignItems:\"center\",transition:`color ${i}`,\"> a:first-child\":{flexGrow:1},[`> ${t}-typography-ellipsis-single-line`]:{display:\"inline\",verticalAlign:\"unset\"},[`${r}-item-extra`]:{marginInlineStart:\"auto\",paddingInlineStart:e.padding,fontSize:e.fontSizeSM,color:e.colorTextDescription}},[`${r}-item a`]:{\"&::before\":{position:\"absolute\",inset:0,backgroundColor:\"transparent\",content:'\"\"'}},[`${r}-item-divider`]:{overflow:\"hidden\",lineHeight:0,borderColor:u,borderStyle:g,borderWidth:0,borderTopWidth:c,marginBlock:c,padding:0,\"&-dashed\":{borderStyle:\"dashed\"}}}),genMenuItemStyle(e)),{[`${r}-item-group`]:{[`${r}-item-group-list`]:{margin:0,padding:0,[`${r}-item, ${r}-submenu-title`]:{paddingInline:`${unit(e.calc(n).mul(2).equal())} ${unit(l)}`}}},\"&-submenu\":{\"&-popup\":{position:\"absolute\",zIndex:d,borderRadius:h,boxShadow:\"none\",transformOrigin:\"0 0\",[`&${r}-submenu`]:{background:\"transparent\"},\"&::before\":{position:\"absolute\",inset:0,zIndex:-1,width:\"100%\",height:\"100%\",opacity:0,content:'\"\"'},[`> ${r}`]:Object.assign(Object.assign(Object.assign({borderRadius:h},genMenuItemStyle(e)),genSubMenuArrowStyle(e)),{[`${r}-item, ${r}-submenu > ${r}-submenu-title`]:{borderRadius:f},[`${r}-submenu-title::after`]:{transition:`transform ${i} ${a}`}})},\"\\n &-placement-leftTop,\\n &-placement-bottomRight,\\n \":{transformOrigin:\"100% 0\"},\"\\n &-placement-leftBottom,\\n &-placement-topRight,\\n \":{transformOrigin:\"100% 100%\"},\"\\n &-placement-rightBottom,\\n &-placement-topLeft,\\n \":{transformOrigin:\"0 100%\"},\"\\n &-placement-bottomLeft,\\n &-placement-rightTop,\\n \":{transformOrigin:\"0 0\"},\"\\n &-placement-leftTop,\\n &-placement-leftBottom\\n \":{paddingInlineEnd:e.paddingXS},\"\\n &-placement-rightTop,\\n &-placement-rightBottom\\n \":{paddingInlineStart:e.paddingXS},\"\\n &-placement-topRight,\\n &-placement-topLeft\\n \":{paddingBottom:e.paddingXS},\"\\n &-placement-bottomRight,\\n &-placement-bottomLeft\\n \":{paddingTop:e.paddingXS}}}),genSubMenuArrowStyle(e)),{[`&-inline-collapsed ${r}-submenu-arrow,\\n &-inline ${r}-submenu-arrow`]:{\"&::before\":{transform:`rotate(-45deg) translateX(${unit(m)})`},\"&::after\":{transform:`rotate(45deg) translateX(${unit(e.calc(m).mul(-1).equal())})`}},[`${r}-submenu-open${r}-submenu-inline > ${r}-submenu-title > ${r}-submenu-arrow`]:{transform:`translateY(${unit(e.calc(p).mul(.2).mul(-1).equal())})`,\"&::after\":{transform:`rotate(-45deg) translateX(${unit(e.calc(m).mul(-1).equal())})`},\"&::before\":{transform:`rotate(45deg) translateX(${unit(m)})`}}})},{[`${t}-layout-header`]:{[r]:{lineHeight:\"inherit\"}}}]},prepareComponentToken8=e=>{var t,r,n;const{colorPrimary:i,colorError:o,colorTextDisabled:a,colorErrorBg:s,colorText:l,colorTextDescription:u,colorBgContainer:c,colorFillAlter:d,colorFillContent:h,lineWidth:f,lineWidthBold:p,controlItemBgActive:m,colorBgTextHover:g,controlHeightLG:_,lineHeight:b,colorBgElevated:y,marginXXS:v,padding:A,fontSize:w,controlHeightSM:S,fontSizeLG:E,colorTextLightSolid:x,colorErrorHover:C}=e,T=null!==(t=e.activeBarWidth)&&void 0!==t?t:0,R=null!==(r=e.activeBarBorderWidth)&&void 0!==r?r:f,I=null!==(n=e.itemMarginInline)&&void 0!==n?n:e.marginXXS,k=new TinyColor(x).setAlpha(.65).toRgbString();return{dropdownWidth:160,zIndexPopup:e.zIndexPopupBase+50,radiusItem:e.borderRadiusLG,itemBorderRadius:e.borderRadiusLG,radiusSubMenuItem:e.borderRadiusSM,subMenuItemBorderRadius:e.borderRadiusSM,colorItemText:l,itemColor:l,colorItemTextHover:l,itemHoverColor:l,colorItemTextHoverHorizontal:i,horizontalItemHoverColor:i,colorGroupTitle:u,groupTitleColor:u,colorItemTextSelected:i,itemSelectedColor:i,colorItemTextSelectedHorizontal:i,horizontalItemSelectedColor:i,colorItemBg:c,itemBg:c,colorItemBgHover:g,itemHoverBg:g,colorItemBgActive:h,itemActiveBg:m,colorSubItemBg:d,subMenuItemBg:d,colorItemBgSelected:m,itemSelectedBg:m,colorItemBgSelectedHorizontal:\"transparent\",horizontalItemSelectedBg:\"transparent\",colorActiveBarWidth:0,activeBarWidth:T,colorActiveBarHeight:p,activeBarHeight:p,colorActiveBarBorderSize:f,activeBarBorderWidth:R,colorItemTextDisabled:a,itemDisabledColor:a,colorDangerItemText:o,dangerItemColor:o,colorDangerItemTextHover:o,dangerItemHoverColor:o,colorDangerItemTextSelected:o,dangerItemSelectedColor:o,colorDangerItemBgActive:s,dangerItemActiveBg:s,colorDangerItemBgSelected:s,dangerItemSelectedBg:s,itemMarginInline:I,horizontalItemBorderRadius:0,horizontalItemHoverBg:\"transparent\",itemHeight:_,groupTitleLineHeight:b,collapsedWidth:2*_,popupBg:y,itemMarginBlock:v,itemPaddingInline:A,horizontalLineHeight:1.15*_+\"px\",iconSize:w,iconMarginInlineEnd:S-w,collapsedIconSize:E,groupTitleFontSize:w,darkItemDisabledColor:new TinyColor(x).setAlpha(.25).toRgbString(),darkItemColor:k,darkDangerItemColor:o,darkItemBg:\"#001529\",darkPopupBg:\"#001529\",darkSubMenuItemBg:\"#000c17\",darkItemSelectedColor:x,darkItemSelectedBg:i,darkDangerItemSelectedBg:o,darkItemHoverBg:\"transparent\",darkGroupTitleColor:k,darkItemHoverColor:x,darkDangerItemHoverColor:C,darkDangerItemSelectedColor:x,darkDangerItemActiveBg:o,itemWidth:T?`calc(100% + ${R}px)`:`calc(100% - ${2*I}px)`}},style_default11=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;return genStyleHooks(\"Menu\",(e=>{const{colorBgElevated:t,controlHeightLG:r,fontSize:n,darkItemColor:i,darkDangerItemColor:o,darkItemBg:a,darkSubMenuItemBg:s,darkItemSelectedColor:l,darkItemSelectedBg:u,darkDangerItemSelectedBg:c,darkItemHoverBg:d,darkGroupTitleColor:h,darkItemHoverColor:f,darkItemDisabledColor:p,darkDangerItemHoverColor:m,darkDangerItemSelectedColor:g,darkDangerItemActiveBg:_,popupBg:b,darkPopupBg:y}=e,v=e.calc(n).div(7).mul(5).equal(),A=merge2(e,{menuArrowSize:v,menuHorizontalHeight:e.calc(r).mul(1.15).equal(),menuArrowOffset:e.calc(v).mul(.25).equal(),menuSubMenuBg:t,calc:e.calc,popupBg:b}),w=merge2(A,{itemColor:i,itemHoverColor:f,groupTitleColor:h,itemSelectedColor:l,itemBg:a,popupBg:y,subMenuItemBg:s,itemActiveBg:\"transparent\",itemSelectedBg:u,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:d,itemDisabledColor:p,dangerItemColor:o,dangerItemHoverColor:m,dangerItemSelectedColor:g,dangerItemActiveBg:_,dangerItemSelectedBg:c,menuSubMenuBg:s,horizontalItemSelectedColor:l,horizontalItemSelectedBg:u});return[getBaseStyle(A),horizontal_default(A),vertical_default(A),theme_default(A,\"light\"),theme_default(w,\"dark\"),rtl_default(A),collapse_default(A),initSlideMotion(A,\"slide-up\"),initSlideMotion(A,\"slide-down\"),initZoomMotion(A,\"zoom-big\")]}),prepareComponentToken8,{deprecatedTokens:[[\"colorGroupTitle\",\"groupTitleColor\"],[\"radiusItem\",\"itemBorderRadius\"],[\"radiusSubMenuItem\",\"subMenuItemBorderRadius\"],[\"colorItemText\",\"itemColor\"],[\"colorItemTextHover\",\"itemHoverColor\"],[\"colorItemTextHoverHorizontal\",\"horizontalItemHoverColor\"],[\"colorItemTextSelected\",\"itemSelectedColor\"],[\"colorItemTextSelectedHorizontal\",\"horizontalItemSelectedColor\"],[\"colorItemTextDisabled\",\"itemDisabledColor\"],[\"colorDangerItemText\",\"dangerItemColor\"],[\"colorDangerItemTextHover\",\"dangerItemHoverColor\"],[\"colorDangerItemTextSelected\",\"dangerItemSelectedColor\"],[\"colorDangerItemBgActive\",\"dangerItemActiveBg\"],[\"colorDangerItemBgSelected\",\"dangerItemSelectedBg\"],[\"colorItemBg\",\"itemBg\"],[\"colorItemBgHover\",\"itemHoverBg\"],[\"colorSubItemBg\",\"subMenuItemBg\"],[\"colorItemBgActive\",\"itemActiveBg\"],[\"colorItemBgSelectedHorizontal\",\"horizontalItemSelectedBg\"],[\"colorActiveBarWidth\",\"activeBarWidth\"],[\"colorActiveBarHeight\",\"activeBarHeight\"],[\"colorActiveBarBorderSize\",\"activeBarBorderWidth\"],[\"colorItemBgSelected\",\"itemSelectedBg\"]],injectStyle:!(arguments.length>2&&void 0!==arguments[2])||arguments[2],unitless:{groupTitleLineHeight:!0}})(e,t)};init_globals();var React210=__toESM(require_react()),import_classnames60=__toESM(require_classnames()),SubMenu2=e=>{var t;const{popupClassName:r,icon:n,title:i,theme:o}=e,a=React210.useContext(MenuContext_default),{prefixCls:s,inlineCollapsed:l,theme:u}=a,c=useFullPath();let d;if(n){const e=React210.isValidElement(i)&&\"span\"===i.type;d=React210.createElement(React210.Fragment,null,cloneElement3(n,{className:(0,import_classnames60.default)(React210.isValidElement(n)?null===(t=n.props)||void 0===t?void 0:t.className:\"\",`${s}-item-icon`)}),e?i:React210.createElement(\"span\",{className:`${s}-title-content`},i))}else d=l&&!c.length&&i&&\"string\"==typeof i?React210.createElement(\"div\",{className:`${s}-inline-collapsed-noicon`},i.charAt(0)):React210.createElement(\"span\",{className:`${s}-title-content`},i);const h=React210.useMemo((()=>Object.assign(Object.assign({},a),{firstLevel:!1})),[a]),[f]=useZIndex(\"Menu\");return React210.createElement(MenuContext_default.Provider,{value:h},React210.createElement(SubMenu_default,Object.assign({},omit(e,[\"icon\"]),{title:d,popupClassName:(0,import_classnames60.default)(s,r,`${s}-${o||u}`),popupStyle:Object.assign({zIndex:f},e.popupStyle)})))},SubMenu_default2=SubMenu2,__rest18=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)__left_angle_mark_0&&(r[n]=e[n]);if(null!=e&&\"function\"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i__left_angle_mark_n.length;i++)t.indexOf(n[i])__left_angle_mark_0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r};function isEmptyIcon(e){return null===e||!1===e}var MENU_COMPONENTS={item:MenuItem_default2,submenu:SubMenu_default2,divider:MenuDivider_default},InternalMenu=(0,import_react71.forwardRef)(((e,t)=>{var r;const n=React211.useContext(OverrideContext_default),i=n||{},{getPrefixCls:o,getPopupContainer:a,direction:s,menu:l}=React211.useContext(ConfigContext),u=o(),{prefixCls:c,className:d,style:h,theme:f=\"light\",expandIcon:p,_internalDisableMenuItemTitleTooltip:m,inlineCollapsed:g,siderCollapsed:_,rootClassName:b,mode:y,selectable:v,onClick:A,overflowedIndicatorPopupClassName:w}=e,S=omit(__rest18(e,[\"prefixCls\",\"className\",\"style\",\"theme\",\"expandIcon\",\"_internalDisableMenuItemTitleTooltip\",\"inlineCollapsed\",\"siderCollapsed\",\"rootClassName\",\"mode\",\"selectable\",\"onClick\",\"overflowedIndicatorPopupClassName\"]),[\"collapsedWidth\"]);{const t=devUseWarning(\"Menu\");t(!(\"inlineCollapsed\"in e&&\"inline\"!==y),\"usage\",\"`inlineCollapsed` should only be used when `mode` is inline.\"),t(!(void 0!==e.siderCollapsed&&\"inlineCollapsed\"in e),\"usage\",\"`inlineCollapsed` not control Menu under Sider. Should set `collapsed` on Sider instead.\"),t.deprecated(\"items\"in e&&!e.children,\"children\",\"items\")}null===(r=i.validator)||void 0===r||r.call(i,{mode:y});const E=useEvent((function(){var e;null==A||A.apply(void 0,arguments),null===(e=i.onClick)||void 0===e||e.call(i)})),x=i.mode||y,C=null!=v?v:i.selectable,T=React211.useMemo((()=>void 0!==_?_:g),[g,_]),R={horizontal:{motionName:`${u}-slide-up`},inline:motion_default(u),other:{motionName:`${u}-zoom-big`}},I=o(\"menu\",c||i.prefixCls),k=useCSSVarCls_default(I),[P,M,O]=style_default11(I,k,!n),B=(0,import_classnames61.default)(`${I}-${f}`,null==l?void 0:l.className,d),N=React211.useMemo((()=>{var e,t;if(\"function\"==typeof p||isEmptyIcon(p))return p||null;if(\"function\"==typeof i.expandIcon||isEmptyIcon(i.expandIcon))return i.expandIcon||null;if(\"function\"==typeof(null==l?void 0:l.expandIcon)||isEmptyIcon(null==l?void 0:l.expandIcon))return(null==l?void 0:l.expandIcon)||null;const r=null!==(e=null!=p?p:null==i?void 0:i.expandIcon)&&void 0!==e?e:null==l?void 0:l.expandIcon;return cloneElement3(r,{className:(0,import_classnames61.default)(`${I}-submenu-expand-icon`,React211.isValidElement(r)?null===(t=r.props)||void 0===t?void 0:t.className:void 0)})}),[p,null==i?void 0:i.expandIcon,null==l?void 0:l.expandIcon,I]),j=React211.useMemo((()=>({prefixCls:I,inlineCollapsed:T||!1,direction:s,firstLevel:!0,theme:f,mode:x,disableMenuItemTitleTooltip:m})),[I,T,s,m,f]);return P(React211.createElement(OverrideContext_default.Provider,{value:null},React211.createElement(MenuContext_default.Provider,{value:j},React211.createElement(es_default11,Object.assign({getPopupContainer:a,overflowedIndicator:React211.createElement(EllipsisOutlined_default2,null),overflowedIndicatorPopupClassName:(0,import_classnames61.default)(I,`${I}-${f}`,w),mode:x,selectable:C,onClick:E},S,{inlineCollapsed:T,style:Object.assign(Object.assign({},null==l?void 0:l.style),h),className:B,prefixCls:I,direction:s,defaultMotions:R,expandIcon:N,ref:t,rootClassName:(0,import_classnames61.default)(b,M,i.rootClassName,O,k),_internalComponents:MENU_COMPONENTS})))))})),menu_default=InternalMenu,Menu2=(0,import_react72.forwardRef)(((e,t)=>{const r=(0,import_react72.useRef)(null),n=React212.useContext(SiderContext);return(0,import_react72.useImperativeHandle)(t,(()=>({menu:r.current,focus:e=>{var t;null===(t=r.current)||void 0===t||t.focus(e)}}))),React212.createElement(menu_default,Object.assign({ref:r},e,n))}));Menu2.Item=MenuItem_default2,Menu2.SubMenu=SubMenu_default2,Menu2.Divider=MenuDivider_default,Menu2.ItemGroup=MenuItemGroup_default,Menu2.displayName=\"Menu\";var menu_default2=Menu2;init_globals(),init_globals();var genStatusStyle=e=>{const{componentCls:t,menuCls:r,colorError:n,colorTextLightSolid:i}=e,o=`${r}-item`;return{[`${t}, ${t}-menu-submenu`]:{[`${r} ${o}`]:{[`&${o}-danger:not(${o}-disabled)`]:{color:n,\"&:hover\":{color:i,backgroundColor:n}}}}}},status_default=genStatusStyle,genBaseStyle3=e=>{const{componentCls:t,menuCls:r,zIndexPopup:n,dropdownArrowDistance:i,sizePopupArrow:o,antCls:a,iconCls:s,motionDurationMid:l,paddingBlock:u,fontSize:c,dropdownEdgeChildPadding:d,colorTextDisabled:h,fontSizeIcon:f,controlPaddingHorizontal:p,colorBgElevated:m}=e;return[{[t]:{position:\"absolute\",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:n,display:\"block\",\"&::before\":{position:\"absolute\",insetBlock:e.calc(o).div(2).sub(i).equal(),zIndex:-9999,opacity:1e-4,content:'\"\"'},\"&-menu-vertical\":{maxHeight:\"100vh\",overflowY:\"auto\"},[`&-trigger${a}-btn`]:{[`& > ${s}-down, & > ${a}-btn-icon > ${s}-down`]:{fontSize:f}},[`${t}-wrap`]:{position:\"relative\",[`${a}-btn > ${s}-down`]:{fontSize:f},[`${s}-down::before`]:{transition:`transform ${l}`}},[`${t}-wrap-open`]:{[`${s}-down::before`]:{transform:\"rotate(180deg)\"}},\"\\n &-hidden,\\n &-menu-hidden,\\n &-menu-submenu-hidden\\n \":{display:\"none\"},[`&${a}-slide-down-enter${a}-slide-down-enter-active${t}-placement-bottomLeft,\\n &${a}-slide-down-appear${a}-slide-down-appear-active${t}-placement-bottomLeft,\\n &${a}-slide-down-enter${a}-slide-down-enter-active${t}-placement-bottom,\\n &${a}-slide-down-appear${a}-slide-down-appear-active${t}-placement-bottom,\\n &${a}-slide-down-enter${a}-slide-down-enter-active${t}-placement-bottomRight,\\n &${a}-slide-down-appear${a}-slide-down-appear-active${t}-placement-bottomRight`]:{animationName:slideUpIn},[`&${a}-slide-up-enter${a}-slide-up-enter-active${t}-placement-topLeft,\\n &${a}-slide-up-appear${a}-slide-up-appear-active${t}-placement-topLeft,\\n &${a}-slide-up-enter${a}-slide-up-enter-active${t}-placement-top,\\n &${a}-slide-up-appear${a}-slide-up-appear-active${t}-placement-top,\\n &${a}-slide-up-enter${a}-slide-up-enter-active${t}-placement-topRight,\\n &${a}-slide-up-appear${a}-slide-up-appear-active${t}-placement-topRight`]:{animationName:slideDownIn},[`&${a}-slide-down-leave${a}-slide-down-leave-active${t}-placement-bottomLeft,\\n &${a}-slide-down-leave${a}-slide-down-leave-active${t}-placement-bottom,\\n &${a}-slide-down-leave${a}-slide-down-leave-active${t}-placement-bottomRight`]:{animationName:slideUpOut},[`&${a}-slide-up-leave${a}-slide-up-leave-active${t}-placement-topLeft,\\n &${a}-slide-up-leave${a}-slide-up-leave-active${t}-placement-top,\\n &${a}-slide-up-leave${a}-slide-up-leave-active${t}-placement-topRight`]:{animationName:slideDownOut}}},getArrowStyle(e,m,{arrowPlacement:{top:!0,bottom:!0}}),{[`${t} ${r}`]:{position:\"relative\",margin:0},[`${r}-submenu-popup`]:{position:\"absolute\",zIndex:n,background:\"transparent\",boxShadow:\"none\",transformOrigin:\"0 0\",\"ul, li\":{listStyle:\"none\",margin:0}},[`${t}, ${t}-menu-submenu`]:Object.assign(Object.assign({},resetComponent(e)),{[r]:Object.assign(Object.assign({padding:d,listStyleType:\"none\",backgroundColor:m,backgroundClip:\"padding-box\",borderRadius:e.borderRadiusLG,outline:\"none\",boxShadow:e.boxShadowSecondary},genFocusStyle(e)),{\"&:empty\":{padding:0,boxShadow:\"none\"},[`${r}-item-group-title`]:{padding:`${unit(u)} ${unit(p)}`,color:e.colorTextDescription,transition:`all ${l}`},[`${r}-item`]:{position:\"relative\",display:\"flex\",alignItems:\"center\"},[`${r}-item-icon`]:{minWidth:c,marginInlineEnd:e.marginXS,fontSize:e.fontSizeSM},[`${r}-title-content`]:{display:\"flex\",alignItems:\"center\",flex:\"auto\",\"> a\":{color:\"inherit\",transition:`all ${l}`,\"&:hover\":{color:\"inherit\"},\"&::after\":{position:\"absolute\",inset:0,content:'\"\"'}},[`${r}-item-extra`]:{paddingInlineStart:e.padding,marginInlineStart:\"auto\",fontSize:e.fontSizeSM,color:e.colorTextDescription}},[`${r}-item, ${r}-submenu-title`]:Object.assign(Object.assign({display:\"flex\",margin:0,padding:`${unit(u)} ${unit(p)}`,color:e.colorText,fontWeight:\"normal\",fontSize:c,lineHeight:e.lineHeight,cursor:\"pointer\",transition:`all ${l}`,borderRadius:e.borderRadiusSM,\"&:hover, &-active\":{backgroundColor:e.controlItemBgHover}},genFocusStyle(e)),{\"&-selected\":{color:e.colorPrimary,backgroundColor:e.controlItemBgActive,\"&:hover, &-active\":{backgroundColor:e.controlItemBgActiveHover}},\"&-disabled\":{color:h,cursor:\"not-allowed\",\"&:hover\":{color:h,backgroundColor:m,cursor:\"not-allowed\"},a:{pointerEvents:\"none\"}},\"&-divider\":{height:1,margin:`${unit(e.marginXXS)} 0`,overflow:\"hidden\",lineHeight:0,backgroundColor:e.colorSplit},[`${t}-menu-submenu-expand-icon`]:{position:\"absolute\",insetInlineEnd:e.paddingXS,[`${t}-menu-submenu-arrow-icon`]:{marginInlineEnd:\"0 !important\",color:e.colorTextDescription,fontSize:f,fontStyle:\"normal\"}}}),[`${r}-item-group-list`]:{margin:`0 ${unit(e.marginXS)}`,padding:0,listStyle:\"none\"},[`${r}-submenu-title`]:{paddingInlineEnd:e.calc(p).add(e.fontSizeSM).equal()},[`${r}-submenu-vertical`]:{position:\"relative\"},[`${r}-submenu${r}-submenu-disabled ${t}-menu-submenu-title`]:{[`&, ${t}-menu-submenu-arrow-icon`]:{color:h,backgroundColor:m,cursor:\"not-allowed\"}},[`${r}-submenu-selected ${t}-menu-submenu-title`]:{color:e.colorPrimary}})})},[initSlideMotion(e,\"slide-up\"),initSlideMotion(e,\"slide-down\"),initMoveMotion(e,\"move-up\"),initMoveMotion(e,\"move-down\"),initZoomMotion(e,\"zoom-big\")]]},prepareComponentToken9=e=>Object.assign(Object.assign({zIndexPopup:e.zIndexPopupBase+50,paddingBlock:(e.controlHeight-e.fontSize*e.lineHeight)/2},getArrowOffsetToken({contentRadius:e.borderRadiusLG,limitVerticalRadius:!0})),getArrowToken(e)),style_default12=genStyleHooks(\"Dropdown\",(e=>{const{marginXXS:t,sizePopupArrow:r,paddingXXS:n,componentCls:i}=e,o=merge2(e,{menuCls:`${i}-menu`,dropdownArrowDistance:e.calc(r).div(2).add(t).equal(),dropdownEdgeChildPadding:n});return[genBaseStyle3(o),status_default(o)]}),prepareComponentToken9,{resetStyle:!1}),Dropdown2=e=>{var t;const{menu:r,arrow:n,prefixCls:i,children:o,trigger:a,disabled:s,dropdownRender:l,getPopupContainer:u,overlayClassName:c,rootClassName:d,overlayStyle:h,open:f,onOpenChange:p,visible:m,onVisibleChange:g,mouseEnterDelay:_=.15,mouseLeaveDelay:b=.1,autoAdjustOverflow:y=!0,placement:v=\"\",overlay:A,transitionName:w}=e,{getPopupContainer:S,getPrefixCls:E,direction:x,dropdown:C}=React213.useContext(ConfigContext),T=devUseWarning(\"Dropdown\");[[\"visible\",\"open\"],[\"onVisibleChange\",\"onOpenChange\"]].forEach((t=>{let[r,n]=t;T.deprecated(!(r in e),r,n)})),T.deprecated(!(\"overlay\"in e),\"overlay\",\"menu\");const R=React213.useMemo((()=>{const e=E();return void 0!==w?w:v.includes(\"top\")?`${e}-slide-down`:`${e}-slide-up`}),[E,v,w]),I=React213.useMemo((()=>v?v.includes(\"Center\")?v.slice(0,v.indexOf(\"Center\")):v:\"rtl\"===x?\"bottomRight\":\"bottomLeft\"),[v,x]);if(v.includes(\"Center\")){const e=v.slice(0,v.indexOf(\"Center\"));T(!v.includes(\"Center\"),\"deprecated\",`You are using '${v}' placement in Dropdown, which is deprecated. Try to use '${e}' instead.`)}[[\"visible\",\"open\"],[\"onVisibleChange\",\"onOpenChange\"]].forEach((t=>{let[r,n]=t;T.deprecated(!(r in e),r,n)}));const k=E(\"dropdown\",i),P=useCSSVarCls_default(k),[M,O,B]=style_default12(k,P),[,N]=useToken(),j=React213.Children.only(o),L=cloneElement3(j,{className:(0,import_classnames62.default)(`${k}-trigger`,{[`${k}-rtl`]:\"rtl\"===x},j.props.className),disabled:null!==(t=j.props.disabled)&&void 0!==t?t:s}),D=s?[]:a,F=!!(null==D?void 0:D.includes(\"contextMenu\")),[U,z]=useMergedState(!1,{value:null!=f?f:m}),q=useEvent((e=>{null==p||p(e,{source:\"trigger\"}),null==g||g(e),z(e)})),G=(0,import_classnames62.default)(c,d,O,B,P,null==C?void 0:C.className,{[`${k}-rtl`]:\"rtl\"===x}),H=getPlacements({arrowPointAtCenter:\"object\"==typeof n&&n.pointAtCenter,autoAdjustOverflow:y,offset:N.marginXXS,arrowWidth:n?N.sizePopupArrow:0,borderRadius:N.borderRadius}),W=React213.useCallback((()=>{(null==r?void 0:r.selectable)&&(null==r?void 0:r.multiple)||(null==p||p(!1,{source:\"menu\"}),z(!1))}),[null==r?void 0:r.selectable,null==r?void 0:r.multiple]),[V,$]=useZIndex(\"Dropdown\",null==h?void 0:h.zIndex);let K=React213.createElement(es_default10,Object.assign({alignPoint:F},omit(e,[\"rootClassName\"]),{mouseEnterDelay:_,mouseLeaveDelay:b,visible:U,builtinPlacements:H,arrow:!!n,overlayClassName:G,prefixCls:k,getPopupContainer:u||S,transitionName:R,trigger:D,overlay:()=>{let e;return e=(null==r?void 0:r.items)?React213.createElement(menu_default2,Object.assign({},r)):\"function\"==typeof A?A():A,l&&(e=l(e)),e=React213.Children.only(\"string\"==typeof e?React213.createElement(\"span\",null,e):e),React213.createElement(OverrideProvider,{prefixCls:`${k}-menu`,rootClassName:(0,import_classnames62.default)(B,P),expandIcon:React213.createElement(\"span\",{className:`${k}-menu-submenu-arrow`},React213.createElement(RightOutlined_default2,{className:`${k}-menu-submenu-arrow-icon`})),mode:\"vertical\",selectable:!1,onClick:W,validator:e=>{let{mode:t}=e;T(!t||\"vertical\"===t,\"usage\",`mode=\"${t}\" is not supported for Dropdown's Menu.`)}},e)},placement:I,onVisibleChange:q,overlayStyle:Object.assign(Object.assign(Object.assign({},null==C?void 0:C.style),h),{zIndex:V})}),L);return V&&(K=React213.createElement(zindexContext_default.Provider,{value:$},K)),M(K)};function postPureProps(e){return Object.assign(Object.assign({},e),{align:{overflow:{adjustX:!1,adjustY:!1}}})}var PurePanel3=PurePanel_default2(Dropdown2,\"dropdown\",(e=>e),postPureProps),WrapPurePanel=e=>React213.createElement(PurePanel3,Object.assign({},e),React213.createElement(\"span\",null));Dropdown2._InternalPanelDoNotUseOrYouWillBeFired=WrapPurePanel,Dropdown2.displayName=\"Dropdown\";var dropdown_default=Dropdown2;init_globals(),init_globals();var React217=__toESM(require_react()),import_classnames65=__toESM(require_classnames());init_globals();var React214=__toESM(require_react()),RadioGroupContext=React214.createContext(null),RadioGroupContextProvider=RadioGroupContext.Provider,context_default3=RadioGroupContext,RadioOptionTypeContext=React214.createContext(null),RadioOptionTypeContextProvider=RadioOptionTypeContext.Provider;init_globals();var React216=__toESM(require_react()),import_classnames64=__toESM(require_classnames());init_globals();var import_classnames63=__toESM(require_classnames()),React215=__toESM(require_react()),import_react73=__toESM(require_react()),_excluded34=[\"prefixCls\",\"className\",\"style\",\"checked\",\"disabled\",\"defaultChecked\",\"type\",\"title\",\"onChange\"],Checkbox=(0,import_react73.forwardRef)((function(e,t){var r=e.prefixCls,n=void 0===r?\"rc-checkbox\":r,i=e.className,o=e.style,a=e.checked,s=e.disabled,l=e.defaultChecked,u=void 0!==l&&l,c=e.type,d=void 0===c?\"checkbox\":c,h=e.title,f=e.onChange,p=_objectWithoutProperties(e,_excluded34),m=(0,import_react73.useRef)(null),g=(0,import_react73.useRef)(null),_=_slicedToArray(useMergedState(u,{value:a}),2),b=_[0],y=_[1];(0,import_react73.useImperativeHandle)(t,(function(){return{focus:function(e){var t;null===(t=m.current)||void 0===t||t.focus(e)},blur:function(){var e;null===(e=m.current)||void 0===e||e.blur()},input:m.current,nativeElement:g.current}}));var v=(0,import_classnames63.default)(n,i,_defineProperty(_defineProperty({},\"\".concat(n,\"-checked\"),b),\"\".concat(n,\"-disabled\"),s));return React215.createElement(\"span\",{className:v,title:h,style:o,ref:g},React215.createElement(\"input\",_extends({},p,{className:\"\".concat(n,\"-input\"),ref:m,onChange:function(t){s||(\"checked\"in e||y(t.target.checked),null==f||f({target:_objectSpread2(_objectSpread2({},e),{},{type:d,checked:t.target.checked}),stopPropagation:function(){t.stopPropagation()},preventDefault:function(){t.preventDefault()},nativeEvent:t.nativeEvent}))},disabled:s,checked:!!b,type:d})),React215.createElement(\"span\",{className:\"\".concat(n,\"-inner\")}))})),es_default12=Checkbox;init_globals();var getGroupRadioStyle=e=>{const{componentCls:t,antCls:r}=e,n=`${t}-group`;return{[n]:Object.assign(Object.assign({},resetComponent(e)),{display:\"inline-block\",fontSize:0,[`&${n}-rtl`]:{direction:\"rtl\"},[`&${n}-block`]:{display:\"flex\"},[`${r}-badge ${r}-badge-count`]:{zIndex:1},[`> ${r}-badge:not(:first-child) > ${r}-button-wrapper`]:{borderInlineStart:\"none\"}})}},getRadioBasicStyle=e=>{const{componentCls:t,wrapperMarginInlineEnd:r,colorPrimary:n,radioSize:i,motionDurationSlow:o,motionDurationMid:a,motionEaseInOutCirc:s,colorBgContainer:l,colorBorder:u,lineWidth:c,colorBgContainerDisabled:d,colorTextDisabled:h,paddingXS:f,dotColorDisabled:p,lineType:m,radioColor:g,radioBgColor:_,calc:b}=e,y=`${t}-inner`,v=b(i).sub(b(4).mul(2)),A=b(1).mul(i).equal({unit:!0});return{[`${t}-wrapper`]:Object.assign(Object.assign({},resetComponent(e)),{display:\"inline-flex\",alignItems:\"baseline\",marginInlineStart:0,marginInlineEnd:r,cursor:\"pointer\",[`&${t}-wrapper-rtl`]:{direction:\"rtl\"},\"&-disabled\":{cursor:\"not-allowed\",color:e.colorTextDisabled},\"&::after\":{display:\"inline-block\",width:0,overflow:\"hidden\",content:'\"\\\\a0\"'},\"&-block\":{flex:1,justifyContent:\"center\"},[`${t}-checked::after`]:{position:\"absolute\",insetBlockStart:0,insetInlineStart:0,width:\"100%\",height:\"100%\",border:`${unit(c)} ${m} ${n}`,borderRadius:\"50%\",visibility:\"hidden\",opacity:0,content:'\"\"'},[t]:Object.assign(Object.assign({},resetComponent(e)),{position:\"relative\",display:\"inline-block\",outline:\"none\",cursor:\"pointer\",alignSelf:\"center\",borderRadius:\"50%\"}),[`${t}-wrapper:hover &,\\n &:hover ${y}`]:{borderColor:n},[`${t}-input:focus-visible + ${y}`]:Object.assign({},genFocusOutline(e)),[`${t}:hover::after, ${t}-wrapper:hover &::after`]:{visibility:\"visible\"},[`${t}-inner`]:{\"&::after\":{boxSizing:\"border-box\",position:\"absolute\",insetBlockStart:\"50%\",insetInlineStart:\"50%\",display:\"block\",width:A,height:A,marginBlockStart:b(1).mul(i).div(-2).equal({unit:!0}),marginInlineStart:b(1).mul(i).div(-2).equal({unit:!0}),backgroundColor:g,borderBlockStart:0,borderInlineStart:0,borderRadius:A,transform:\"scale(0)\",opacity:0,transition:`all ${o} ${s}`,content:'\"\"'},boxSizing:\"border-box\",position:\"relative\",insetBlockStart:0,insetInlineStart:0,display:\"block\",width:A,height:A,backgroundColor:l,borderColor:u,borderStyle:\"solid\",borderWidth:c,borderRadius:\"50%\",transition:`all ${a}`},[`${t}-input`]:{position:\"absolute\",inset:0,zIndex:1,cursor:\"pointer\",opacity:0},[`${t}-checked`]:{[y]:{borderColor:n,backgroundColor:_,\"&::after\":{transform:`scale(${e.calc(e.dotSize).div(i).equal()})`,opacity:1,transition:`all ${o} ${s}`}}},[`${t}-disabled`]:{cursor:\"not-allowed\",[y]:{backgroundColor:d,borderColor:u,cursor:\"not-allowed\",\"&::after\":{backgroundColor:p}},[`${t}-input`]:{cursor:\"not-allowed\"},[`${t}-disabled + span`]:{color:h,cursor:\"not-allowed\"},[`&${t}-checked`]:{[y]:{\"&::after\":{transform:`scale(${b(v).div(i).equal()})`}}}},[`span${t} + *`]:{paddingInlineStart:f,paddingInlineEnd:f}})}},getRadioButtonStyle=e=>{const{buttonColor:t,controlHeight:r,componentCls:n,lineWidth:i,lineType:o,colorBorder:a,motionDurationSlow:s,motionDurationMid:l,buttonPaddingInline:u,fontSize:c,buttonBg:d,fontSizeLG:h,controlHeightLG:f,controlHeightSM:p,paddingXS:m,borderRadius:g,borderRadiusSM:_,borderRadiusLG:b,buttonCheckedBg:y,buttonSolidCheckedColor:v,colorTextDisabled:A,colorBgContainerDisabled:w,buttonCheckedBgDisabled:S,buttonCheckedColorDisabled:E,colorPrimary:x,colorPrimaryHover:C,colorPrimaryActive:T,buttonSolidCheckedBg:R,buttonSolidCheckedHoverBg:I,buttonSolidCheckedActiveBg:k,calc:P}=e;return{[`${n}-button-wrapper`]:{position:\"relative\",display:\"inline-block\",height:r,margin:0,paddingInline:u,paddingBlock:0,color:t,fontSize:c,lineHeight:unit(P(r).sub(P(i).mul(2)).equal()),background:d,border:`${unit(i)} ${o} ${a}`,borderBlockStartWidth:P(i).add(.02).equal(),borderInlineStartWidth:0,borderInlineEndWidth:i,cursor:\"pointer\",transition:[`color ${l}`,`background ${l}`,`box-shadow ${l}`].join(\",\"),a:{color:t},[`> ${n}-button`]:{position:\"absolute\",insetBlockStart:0,insetInlineStart:0,zIndex:-1,width:\"100%\",height:\"100%\"},\"&:not(:first-child)\":{\"&::before\":{position:\"absolute\",insetBlockStart:P(i).mul(-1).equal(),insetInlineStart:P(i).mul(-1).equal(),display:\"block\",boxSizing:\"content-box\",width:1,height:\"100%\",paddingBlock:i,paddingInline:0,backgroundColor:a,transition:`background-color ${s}`,content:'\"\"'}},\"&:first-child\":{borderInlineStart:`${unit(i)} ${o} ${a}`,borderStartStartRadius:g,borderEndStartRadius:g},\"&:last-child\":{borderStartEndRadius:g,borderEndEndRadius:g},\"&:first-child:last-child\":{borderRadius:g},[`${n}-group-large &`]:{height:f,fontSize:h,lineHeight:unit(P(f).sub(P(i).mul(2)).equal()),\"&:first-child\":{borderStartStartRadius:b,borderEndStartRadius:b},\"&:last-child\":{borderStartEndRadius:b,borderEndEndRadius:b}},[`${n}-group-small &`]:{height:p,paddingInline:P(m).sub(i).equal(),paddingBlock:0,lineHeight:unit(P(p).sub(P(i).mul(2)).equal()),\"&:first-child\":{borderStartStartRadius:_,borderEndStartRadius:_},\"&:last-child\":{borderStartEndRadius:_,borderEndEndRadius:_}},\"&:hover\":{position:\"relative\",color:x},\"&:has(:focus-visible)\":Object.assign({},genFocusOutline(e)),[`${n}-inner, input[type='checkbox'], input[type='radio']`]:{width:0,height:0,opacity:0,pointerEvents:\"none\"},[`&-checked:not(${n}-button-wrapper-disabled)`]:{zIndex:1,color:x,background:y,borderColor:x,\"&::before\":{backgroundColor:x},\"&:first-child\":{borderColor:x},\"&:hover\":{color:C,borderColor:C,\"&::before\":{backgroundColor:C}},\"&:active\":{color:T,borderColor:T,\"&::before\":{backgroundColor:T}}},[`${n}-group-solid &-checked:not(${n}-button-wrapper-disabled)`]:{color:v,background:R,borderColor:R,\"&:hover\":{color:v,background:I,borderColor:I},\"&:active\":{color:v,background:k,borderColor:k}},\"&-disabled\":{color:A,backgroundColor:w,borderColor:a,cursor:\"not-allowed\",\"&:first-child, &:hover\":{color:A,backgroundColor:w,borderColor:a}},[`&-disabled${n}-button-wrapper-checked`]:{color:E,backgroundColor:S,borderColor:a,boxShadow:\"none\"},\"&-block\":{flex:1,textAlign:\"center\"}}}},prepareComponentToken10=e=>{const{wireframe:t,padding:r,marginXS:n,lineWidth:i,fontSizeLG:o,colorText:a,colorBgContainer:s,colorTextDisabled:l,controlItemBgActiveDisabled:u,colorTextLightSolid:c,colorPrimary:d,colorPrimaryHover:h,colorPrimaryActive:f,colorWhite:p}=e;return{radioSize:o,dotSize:t?o-8:o-2*(4+i),dotColorDisabled:l,buttonSolidCheckedColor:c,buttonSolidCheckedBg:d,buttonSolidCheckedHoverBg:h,buttonSolidCheckedActiveBg:f,buttonBg:s,buttonCheckedBg:s,buttonColor:a,buttonCheckedBgDisabled:u,buttonCheckedColorDisabled:l,buttonPaddingInline:r-i,wrapperMarginInlineEnd:n,radioColor:t?d:p,radioBgColor:t?s:d}},style_default13=genStyleHooks(\"Radio\",(e=>{const{controlOutline:t,controlOutlineWidth:r}=e,n=`0 0 0 ${unit(r)} ${t}`,i=merge2(e,{radioFocusShadow:n,radioButtonFocusShadow:n});return[getGroupRadioStyle(i),getRadioBasicStyle(i),getRadioButtonStyle(i)]}),prepareComponentToken10,{unitless:{radioSize:!0,dotSize:!0}}),__rest19=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)__left_angle_mark_0&&(r[n]=e[n]);if(null!=e&&\"function\"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i__left_angle_mark_n.length;i++)t.indexOf(n[i])__left_angle_mark_0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r},InternalRadio=(e,t)=>{var r,n;const i=React216.useContext(context_default3),o=React216.useContext(RadioOptionTypeContext),{getPrefixCls:a,direction:s,radio:l}=React216.useContext(ConfigContext),u=React216.useRef(null),c=composeRef(t,u),{isFormItemInput:d}=React216.useContext(FormItemInputContext);devUseWarning(\"Radio\")(!(\"optionType\"in e),\"usage\",\"`optionType` is only support in Radio.Group.\");const h=t=>{var r,n;null===(r=e.onChange)||void 0===r||r.call(e,t),null===(n=null==i?void 0:i.onChange)||void 0===n||n.call(i,t)},{prefixCls:f,className:p,rootClassName:m,children:g,style:_,title:b}=e,y=__rest19(e,[\"prefixCls\",\"className\",\"rootClassName\",\"children\",\"style\",\"title\"]),v=a(\"radio\",f),A=\"button\"===((null==i?void 0:i.optionType)||o),w=A?`${v}-button`:v,S=useCSSVarCls_default(v),[E,x,C]=style_default13(v,S),T=Object.assign({},y),R=React216.useContext(DisabledContext_default);i&&(T.name=i.name,T.onChange=h,T.checked=e.value===i.value,T.disabled=null!==(r=T.disabled)&&void 0!==r?r:i.disabled),T.disabled=null!==(n=T.disabled)&&void 0!==n?n:R;const I=(0,import_classnames64.default)(`${w}-wrapper`,{[`${w}-wrapper-checked`]:T.checked,[`${w}-wrapper-disabled`]:T.disabled,[`${w}-wrapper-rtl`]:\"rtl\"===s,[`${w}-wrapper-in-form-item`]:d,[`${w}-wrapper-block`]:!!(null==i?void 0:i.block)},null==l?void 0:l.className,p,m,x,C,S);return E(React216.createElement(wave_default,{component:\"Radio\",disabled:T.disabled},React216.createElement(\"label\",{className:I,style:Object.assign(Object.assign({},null==l?void 0:l.style),_),onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,title:b},React216.createElement(es_default12,Object.assign({},T,{className:(0,import_classnames64.default)(T.className,{[TARGET_CLS]:!A}),type:\"radio\",prefixCls:w,ref:c})),void 0!==g?React216.createElement(\"span\",null,g):null)))},Radio=React216.forwardRef(InternalRadio);Radio.displayName=\"Radio\";var radio_default=Radio,RadioGroup=React217.forwardRef(((e,t)=>{const{getPrefixCls:r,direction:n}=React217.useContext(ConfigContext),{prefixCls:i,className:o,rootClassName:a,options:s,buttonStyle:l=\"outline\",disabled:u,children:c,size:d,style:h,id:f,optionType:p,name:m,defaultValue:g,value:_,block:b=!1,onChange:y,onMouseEnter:v,onMouseLeave:A,onFocus:w,onBlur:S}=e,[E,x]=useMergedState(g,{value:_}),C=React217.useCallback((t=>{const r=E,n=t.target.value;\"value\"in e||x(n),n!==r&&(null==y||y(t))}),[E,x,y]),T=r(\"radio\",i),R=`${T}-group`,I=useCSSVarCls_default(T),[k,P,M]=style_default13(T,I);let O=c;s&&s.length>0&&(O=s.map((e=>\"string\"==typeof e||\"number\"==typeof e?React217.createElement(radio_default,{key:e.toString(),prefixCls:T,disabled:u,value:e,checked:E===e},e):React217.createElement(radio_default,{key:`radio-group-value-options-${e.value}`,prefixCls:T,disabled:e.disabled||u,value:e.value,checked:E===e.value,title:e.title,style:e.style,id:e.id,required:e.required},e.label))));const B=useSize_default(d),N=(0,import_classnames65.default)(R,`${R}-${l}`,{[`${R}-${B}`]:B,[`${R}-rtl`]:\"rtl\"===n,[`${R}-block`]:b},o,a,P,M,I),j=React217.useMemo((()=>({onChange:C,value:E,disabled:u,name:m,optionType:p,block:b})),[C,E,u,m,p,b]);return k(React217.createElement(\"div\",Object.assign({},pickAttrs(e,{aria:!0,data:!0}),{className:N,style:h,onMouseEnter:v,onMouseLeave:A,onFocus:w,onBlur:S,id:f,ref:t}),React217.createElement(RadioGroupContextProvider,{value:j},O)))})),group_default2=React217.memo(RadioGroup);init_globals();var React218=__toESM(require_react()),__rest20=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)__left_angle_mark_0&&(r[n]=e[n]);if(null!=e&&\"function\"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i__left_angle_mark_n.length;i++)t.indexOf(n[i])__left_angle_mark_0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r},RadioButton=(e,t)=>{const{getPrefixCls:r}=React218.useContext(ConfigContext),{prefixCls:n}=e,i=__rest20(e,[\"prefixCls\"]),o=r(\"radio\",n);return React218.createElement(RadioOptionTypeContextProvider,{value:\"button\"},React218.createElement(radio_default,Object.assign({prefixCls:o},i,{type:\"radio\",ref:t})))},radioButton_default=React218.forwardRef(RadioButton),Radio2=radio_default;Radio2.Button=radioButton_default,Radio2.Group=group_default2,Radio2.__ANT_RADIO=!0;var radio_default2=Radio2;function initInputToken(e){return merge2(e,{inputAffixPadding:e.paddingXXS})}init_globals(),init_globals();var initComponentToken=e=>{const{controlHeight:t,fontSize:r,lineHeight:n,lineWidth:i,controlHeightSM:o,controlHeightLG:a,fontSizeLG:s,lineHeightLG:l,paddingSM:u,controlPaddingHorizontalSM:c,controlPaddingHorizontal:d,colorFillAlter:h,colorPrimaryHover:f,colorPrimary:p,controlOutlineWidth:m,controlOutline:g,colorErrorOutline:_,colorWarningOutline:b,colorBgContainer:y}=e;return{paddingBlock:Math.max(Math.round((t-r*n)/2*10)/10-i,0),paddingBlockSM:Math.max(Math.round((o-r*n)/2*10)/10-i,0),paddingBlockLG:Math.ceil((a-s*l)/2*10)/10-i,paddingInline:u-i,paddingInlineSM:c-i,paddingInlineLG:d-i,addonBg:h,activeBorderColor:p,hoverBorderColor:f,activeShadow:`0 0 0 ${m}px ${g}`,errorActiveShadow:`0 0 0 ${m}px ${_}`,warningActiveShadow:`0 0 0 ${m}px ${b}`,hoverBg:y,activeBg:y,inputFontSize:r,inputFontSizeLG:s,inputFontSizeSM:r}};init_globals();var genHoverStyle=e=>({borderColor:e.hoverBorderColor,backgroundColor:e.hoverBg}),genDisabledStyle2=e=>({color:e.colorTextDisabled,backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,boxShadow:\"none\",cursor:\"not-allowed\",opacity:1,\"input[disabled], textarea[disabled]\":{cursor:\"not-allowed\"},\"&:hover:not([disabled])\":Object.assign({},genHoverStyle(merge2(e,{hoverBorderColor:e.colorBorder,hoverBg:e.colorBgContainerDisabled})))}),genBaseOutlinedStyle=(e,t)=>({background:e.colorBgContainer,borderWidth:e.lineWidth,borderStyle:e.lineType,borderColor:t.borderColor,\"&:hover\":{borderColor:t.hoverBorderColor,backgroundColor:e.hoverBg},\"&:focus, &:focus-within\":{borderColor:t.activeBorderColor,boxShadow:t.activeShadow,outline:0,backgroundColor:e.activeBg}}),genOutlinedStatusStyle=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:Object.assign(Object.assign({},genBaseOutlinedStyle(e,t)),{[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}}),[`&${e.componentCls}-status-${t.status}${e.componentCls}-disabled`]:{borderColor:t.borderColor}}),genOutlinedStyle=(e,t)=>({\"&-outlined\":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},genBaseOutlinedStyle(e,{borderColor:e.colorBorder,hoverBorderColor:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeShadow:e.activeShadow})),{[`&${e.componentCls}-disabled, &[disabled]`]:Object.assign({},genDisabledStyle2(e))}),genOutlinedStatusStyle(e,{status:\"error\",borderColor:e.colorError,hoverBorderColor:e.colorErrorBorderHover,activeBorderColor:e.colorError,activeShadow:e.errorActiveShadow,affixColor:e.colorError})),genOutlinedStatusStyle(e,{status:\"warning\",borderColor:e.colorWarning,hoverBorderColor:e.colorWarningBorderHover,activeBorderColor:e.colorWarning,activeShadow:e.warningActiveShadow,affixColor:e.colorWarning})),t)}),genOutlinedGroupStatusStyle=(e,t)=>({[`&${e.componentCls}-group-wrapper-status-${t.status}`]:{[`${e.componentCls}-group-addon`]:{borderColor:t.addonBorderColor,color:t.addonColor}}}),genOutlinedGroupStyle=e=>({\"&-outlined\":Object.assign(Object.assign(Object.assign({[`${e.componentCls}-group`]:{\"&-addon\":{background:e.addonBg,border:`${unit(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},\"&-addon:first-child\":{borderInlineEnd:0},\"&-addon:last-child\":{borderInlineStart:0}}},genOutlinedGroupStatusStyle(e,{status:\"error\",addonBorderColor:e.colorError,addonColor:e.colorErrorText})),genOutlinedGroupStatusStyle(e,{status:\"warning\",addonBorderColor:e.colorWarning,addonColor:e.colorWarningText})),{[`&${e.componentCls}-group-wrapper-disabled`]:{[`${e.componentCls}-group-addon`]:Object.assign({},genDisabledStyle2(e))}})}),genBorderlessStyle=(e,t)=>{const{componentCls:r}=e;return{\"&-borderless\":Object.assign({background:\"transparent\",border:\"none\",\"&:focus, &:focus-within\":{outline:\"none\"},[`&${r}-disabled, &[disabled]`]:{color:e.colorTextDisabled,cursor:\"not-allowed\"},[`&${r}-status-error`]:{\"&, & input, & textarea\":{color:e.colorError}},[`&${r}-status-warning`]:{\"&, & input, & textarea\":{color:e.colorWarning}}},t)}},genBaseFilledStyle=(e,t)=>({background:t.bg,borderWidth:e.lineWidth,borderStyle:e.lineType,borderColor:\"transparent\",\"input&, & input, textarea&, & textarea\":{color:null==t?void 0:t.inputColor},\"&:hover\":{background:t.hoverBg},\"&:focus, &:focus-within\":{outline:0,borderColor:t.activeBorderColor,backgroundColor:e.activeBg}}),genFilledStatusStyle=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:Object.assign(Object.assign({},genBaseFilledStyle(e,t)),{[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}})}),genFilledStyle=(e,t)=>({\"&-filled\":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},genBaseFilledStyle(e,{bg:e.colorFillTertiary,hoverBg:e.colorFillSecondary,activeBorderColor:e.activeBorderColor})),{[`&${e.componentCls}-disabled, &[disabled]`]:Object.assign({},genDisabledStyle2(e))}),genFilledStatusStyle(e,{status:\"error\",bg:e.colorErrorBg,hoverBg:e.colorErrorBgHover,activeBorderColor:e.colorError,inputColor:e.colorErrorText,affixColor:e.colorError})),genFilledStatusStyle(e,{status:\"warning\",bg:e.colorWarningBg,hoverBg:e.colorWarningBgHover,activeBorderColor:e.colorWarning,inputColor:e.colorWarningText,affixColor:e.colorWarning})),t)}),genFilledGroupStatusStyle=(e,t)=>({[`&${e.componentCls}-group-wrapper-status-${t.status}`]:{[`${e.componentCls}-group-addon`]:{background:t.addonBg,color:t.addonColor}}}),genFilledGroupStyle=e=>({\"&-filled\":Object.assign(Object.assign(Object.assign({[`${e.componentCls}-group`]:{\"&-addon\":{background:e.colorFillTertiary},[`${e.componentCls}-filled:not(:focus):not(:focus-within)`]:{\"&:not(:first-child)\":{borderInlineStart:`${unit(e.lineWidth)} ${e.lineType} ${e.colorSplit}`},\"&:not(:last-child)\":{borderInlineEnd:`${unit(e.lineWidth)} ${e.lineType} ${e.colorSplit}`}}}},genFilledGroupStatusStyle(e,{status:\"error\",addonBg:e.colorErrorBg,addonColor:e.colorErrorText})),genFilledGroupStatusStyle(e,{status:\"warning\",addonBg:e.colorWarningBg,addonColor:e.colorWarningText})),{[`&${e.componentCls}-group-wrapper-disabled`]:{[`${e.componentCls}-group`]:{\"&-addon\":{background:e.colorFillTertiary,color:e.colorTextDisabled},\"&-addon:first-child\":{borderInlineStart:`${unit(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderTop:`${unit(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderBottom:`${unit(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},\"&-addon:last-child\":{borderInlineEnd:`${unit(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderTop:`${unit(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderBottom:`${unit(e.lineWidth)} ${e.lineType} ${e.colorBorder}`}}}})}),genPlaceholderStyle=e=>({\"&::-moz-placeholder\":{opacity:1},\"&::placeholder\":{color:e,userSelect:\"none\"},\"&:placeholder-shown\":{textOverflow:\"ellipsis\"}}),genInputLargeStyle=e=>{const{paddingBlockLG:t,lineHeightLG:r,borderRadiusLG:n,paddingInlineLG:i}=e;return{padding:`${unit(t)} ${unit(i)}`,fontSize:e.inputFontSizeLG,lineHeight:r,borderRadius:n}},genInputSmallStyle=e=>({padding:`${unit(e.paddingBlockSM)} ${unit(e.paddingInlineSM)}`,fontSize:e.inputFontSizeSM,borderRadius:e.borderRadiusSM}),genBasicInputStyle=e=>Object.assign(Object.assign({position:\"relative\",display:\"inline-block\",width:\"100%\",minWidth:0,padding:`${unit(e.paddingBlock)} ${unit(e.paddingInline)}`,color:e.colorText,fontSize:e.inputFontSize,lineHeight:e.lineHeight,borderRadius:e.borderRadius,transition:`all ${e.motionDurationMid}`},genPlaceholderStyle(e.colorTextPlaceholder)),{\"textarea&\":{maxWidth:\"100%\",height:\"auto\",minHeight:e.controlHeight,lineHeight:e.lineHeight,verticalAlign:\"bottom\",transition:`all ${e.motionDurationSlow}, height 0s`,resize:\"vertical\"},\"&-lg\":Object.assign({},genInputLargeStyle(e)),\"&-sm\":Object.assign({},genInputSmallStyle(e)),\"&-rtl, &-textarea-rtl\":{direction:\"rtl\"}}),genInputGroupStyle=e=>{const{componentCls:t,antCls:r}=e;return{position:\"relative\",display:\"table\",width:\"100%\",borderCollapse:\"separate\",borderSpacing:0,\"&[class*='col-']\":{paddingInlineEnd:e.paddingXS,\"&:last-child\":{paddingInlineEnd:0}},[`&-lg ${t}, &-lg > ${t}-group-addon`]:Object.assign({},genInputLargeStyle(e)),[`&-sm ${t}, &-sm > ${t}-group-addon`]:Object.assign({},genInputSmallStyle(e)),[`&-lg ${r}-select-single ${r}-select-selector`]:{height:e.controlHeightLG},[`&-sm ${r}-select-single ${r}-select-selector`]:{height:e.controlHeightSM},[`> ${t}`]:{display:\"table-cell\",\"&:not(:first-child):not(:last-child)\":{borderRadius:0}},[`${t}-group`]:{\"&-addon, &-wrap\":{display:\"table-cell\",width:1,whiteSpace:\"nowrap\",verticalAlign:\"middle\",\"&:not(:first-child):not(:last-child)\":{borderRadius:0}},\"&-wrap > *\":{display:\"block !important\"},\"&-addon\":{position:\"relative\",padding:`0 ${unit(e.paddingInline)}`,color:e.colorText,fontWeight:\"normal\",fontSize:e.inputFontSize,textAlign:\"center\",borderRadius:e.borderRadius,transition:`all ${e.motionDurationSlow}`,lineHeight:1,[`${r}-select`]:{margin:`${unit(e.calc(e.paddingBlock).add(1).mul(-1).equal())} ${unit(e.calc(e.paddingInline).mul(-1).equal())}`,[`&${r}-select-single:not(${r}-select-customize-input):not(${r}-pagination-size-changer)`]:{[`${r}-select-selector`]:{backgroundColor:\"inherit\",border:`${unit(e.lineWidth)} ${e.lineType} transparent`,boxShadow:\"none\"}}},[`${r}-cascader-picker`]:{margin:`-9px ${unit(e.calc(e.paddingInline).mul(-1).equal())}`,backgroundColor:\"transparent\",[`${r}-cascader-input`]:{textAlign:\"start\",border:0,boxShadow:\"none\"}}}},[t]:{width:\"100%\",marginBottom:0,textAlign:\"inherit\",\"&:focus\":{zIndex:1,borderInlineEndWidth:1},\"&:hover\":{zIndex:1,borderInlineEndWidth:1,[`${t}-search-with-button &`]:{zIndex:0}}},[`> ${t}:first-child, ${t}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${r}-select ${r}-select-selector`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${t}-affix-wrapper`]:{[`&:not(:first-child) ${t}`]:{borderStartStartRadius:0,borderEndStartRadius:0},[`&:not(:last-child) ${t}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${t}:last-child, ${t}-group-addon:last-child`]:{borderStartStartRadius:0,borderEndStartRadius:0,[`${r}-select ${r}-select-selector`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${t}-affix-wrapper`]:{\"&:not(:last-child)\":{borderStartEndRadius:0,borderEndEndRadius:0,[`${t}-search &`]:{borderStartStartRadius:e.borderRadius,borderEndStartRadius:e.borderRadius}},[`&:not(:first-child), ${t}-search &:not(:first-child)`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${t}-group-compact`]:Object.assign(Object.assign({display:\"block\"},clearFix()),{[`${t}-group-addon, ${t}-group-wrap, > ${t}`]:{\"&:not(:first-child):not(:last-child)\":{borderInlineEndWidth:e.lineWidth,\"&:hover, &:focus\":{zIndex:1}}},\"& > *\":{display:\"inline-flex\",float:\"none\",verticalAlign:\"top\",borderRadius:0},[`\\n & > ${t}-affix-wrapper,\\n & > ${t}-number-affix-wrapper,\\n & > ${r}-picker-range\\n `]:{display:\"inline-flex\"},\"& > *:not(:last-child)\":{marginInlineEnd:e.calc(e.lineWidth).mul(-1).equal(),borderInlineEndWidth:e.lineWidth},[t]:{float:\"none\"},[`& > ${r}-select > ${r}-select-selector,\\n & > ${r}-select-auto-complete ${t},\\n & > ${r}-cascader-picker ${t},\\n & > ${t}-group-wrapper ${t}`]:{borderInlineEndWidth:e.lineWidth,borderRadius:0,\"&:hover, &:focus\":{zIndex:1}},[`& > ${r}-select-focused`]:{zIndex:1},[`& > ${r}-select > ${r}-select-arrow`]:{zIndex:1},[`& > *:first-child,\\n & > ${r}-select:first-child > ${r}-select-selector,\\n & > ${r}-select-auto-complete:first-child ${t},\\n & > ${r}-cascader-picker:first-child ${t}`]:{borderStartStartRadius:e.borderRadius,borderEndStartRadius:e.borderRadius},[`& > *:last-child,\\n & > ${r}-select:last-child > ${r}-select-selector,\\n & > ${r}-cascader-picker:last-child ${t},\\n & > ${r}-cascader-picker-focused:last-child ${t}`]:{borderInlineEndWidth:e.lineWidth,borderStartEndRadius:e.borderRadius,borderEndEndRadius:e.borderRadius},[`& > ${r}-select-auto-complete ${t}`]:{verticalAlign:\"top\"},[`${t}-group-wrapper + ${t}-group-wrapper`]:{marginInlineStart:e.calc(e.lineWidth).mul(-1).equal(),[`${t}-affix-wrapper`]:{borderRadius:0}},[`${t}-group-wrapper:not(:last-child)`]:{[`&${t}-search > ${t}-group`]:{[`& > ${t}-group-addon > ${t}-search-button`]:{borderRadius:0},[`& > ${t}`]:{borderStartStartRadius:e.borderRadius,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:e.borderRadius}}}})}},genInputStyle=e=>{const{componentCls:t,controlHeightSM:r,lineWidth:n,calc:i}=e,o=i(r).sub(i(n).mul(2)).sub(16).div(2).equal();return{[t]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},resetComponent(e)),genBasicInputStyle(e)),genOutlinedStyle(e)),genFilledStyle(e)),genBorderlessStyle(e)),{'&[type=\"color\"]':{height:e.controlHeight,[`&${t}-lg`]:{height:e.controlHeightLG},[`&${t}-sm`]:{height:r,paddingTop:o,paddingBottom:o}},'&[type=\"search\"]::-webkit-search-cancel-button, &[type=\"search\"]::-webkit-search-decoration':{\"-webkit-appearance\":\"none\"}})}},genAllowClearStyle=e=>{const{componentCls:t}=e;return{[`${t}-clear-icon`]:{margin:0,color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,verticalAlign:-1,cursor:\"pointer\",transition:`color ${e.motionDurationSlow}`,\"&:hover\":{color:e.colorTextTertiary},\"&:active\":{color:e.colorText},\"&-hidden\":{visibility:\"hidden\"},\"&-has-suffix\":{margin:`0 ${unit(e.inputAffixPadding)}`}}}},genAffixStyle=e=>{const{componentCls:t,inputAffixPadding:r,colorTextDescription:n,motionDurationSlow:i,colorIcon:o,colorIconHover:a,iconCls:s}=e,l=`${t}-affix-wrapper`,u=`${t}-affix-wrapper-disabled`;return{[l]:Object.assign(Object.assign(Object.assign(Object.assign({},genBasicInputStyle(e)),{display:\"inline-flex\",[`&:not(${t}-disabled):hover`]:{zIndex:1,[`${t}-search-with-button &`]:{zIndex:0}},\"&-focused, &:focus\":{zIndex:1},[`> input${t}`]:{padding:0},[`> input${t}, > textarea${t}`]:{fontSize:\"inherit\",border:\"none\",borderRadius:0,outline:\"none\",background:\"transparent\",color:\"inherit\",\"&::-ms-reveal\":{display:\"none\"},\"&:focus\":{boxShadow:\"none !important\"}},\"&::before\":{display:\"inline-block\",width:0,visibility:\"hidden\",content:'\"\\\\a0\"'},[t]:{\"&-prefix, &-suffix\":{display:\"flex\",flex:\"none\",alignItems:\"center\",\"> *:not(:last-child)\":{marginInlineEnd:e.paddingXS}},\"&-show-count-suffix\":{color:n},\"&-show-count-has-suffix\":{marginInlineEnd:e.paddingXXS},\"&-prefix\":{marginInlineEnd:r},\"&-suffix\":{marginInlineStart:r}}}),genAllowClearStyle(e)),{[`${s}${t}-password-icon`]:{color:o,cursor:\"pointer\",transition:`all ${i}`,\"&:hover\":{color:a}}}),[u]:{[`${s}${t}-password-icon`]:{color:o,cursor:\"not-allowed\",\"&:hover\":{color:o}}}}},genGroupStyle2=e=>{const{componentCls:t,borderRadiusLG:r,borderRadiusSM:n}=e;return{[`${t}-group`]:Object.assign(Object.assign(Object.assign({},resetComponent(e)),genInputGroupStyle(e)),{\"&-rtl\":{direction:\"rtl\"},\"&-wrapper\":Object.assign(Object.assign(Object.assign({display:\"inline-block\",width:\"100%\",textAlign:\"start\",verticalAlign:\"top\",\"&-rtl\":{direction:\"rtl\"},\"&-lg\":{[`${t}-group-addon`]:{borderRadius:r,fontSize:e.inputFontSizeLG}},\"&-sm\":{[`${t}-group-addon`]:{borderRadius:n}}},genOutlinedGroupStyle(e)),genFilledGroupStyle(e)),{[`&:not(${t}-compact-first-item):not(${t}-compact-last-item)${t}-compact-item`]:{[`${t}, ${t}-group-addon`]:{borderRadius:0}},[`&:not(${t}-compact-last-item)${t}-compact-first-item`]:{[`${t}, ${t}-group-addon`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${t}-compact-first-item)${t}-compact-last-item`]:{[`${t}, ${t}-group-addon`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&:not(${t}-compact-last-item)${t}-compact-item`]:{[`${t}-affix-wrapper`]:{borderStartEndRadius:0,borderEndEndRadius:0}}})})}},genSearchInputStyle=e=>{const{componentCls:t,antCls:r}=e,n=`${t}-search`;return{[n]:{[t]:{\"&:hover, &:focus\":{[`+ ${t}-group-addon ${n}-button:not(${r}-btn-primary)`]:{borderInlineStartColor:e.colorPrimaryHover}}},[`${t}-affix-wrapper`]:{height:e.controlHeight,borderRadius:0},[`${t}-lg`]:{lineHeight:e.calc(e.lineHeightLG).sub(2e-4).equal()},[`> ${t}-group`]:{[`> ${t}-group-addon:last-child`]:{insetInlineStart:-1,padding:0,border:0,[`${n}-button`]:{marginInlineEnd:-1,paddingTop:0,paddingBottom:0,borderStartStartRadius:0,borderEndStartRadius:0,boxShadow:\"none\"},[`${n}-button:not(${r}-btn-primary)`]:{color:e.colorTextDescription,\"&:hover\":{color:e.colorPrimaryHover},\"&:active\":{color:e.colorPrimaryActive},[`&${r}-btn-loading::before`]:{insetInlineStart:0,insetInlineEnd:0,insetBlockStart:0,insetBlockEnd:0}}}},[`${n}-button`]:{height:e.controlHeight,\"&:hover, &:focus\":{zIndex:1}},\"&-large\":{[`${t}-affix-wrapper, ${n}-button`]:{height:e.controlHeightLG}},\"&-small\":{[`${t}-affix-wrapper, ${n}-button`]:{height:e.controlHeightSM}},\"&-rtl\":{direction:\"rtl\"},[`&${t}-compact-item`]:{[`&:not(${t}-compact-last-item)`]:{[`${t}-group-addon`]:{[`${t}-search-button`]:{marginInlineEnd:e.calc(e.lineWidth).mul(-1).equal(),borderRadius:0}}},[`&:not(${t}-compact-first-item)`]:{[`${t},${t}-affix-wrapper`]:{borderRadius:0}},[`> ${t}-group-addon ${t}-search-button,\\n > ${t},\\n ${t}-affix-wrapper`]:{\"&:hover, &:focus, &:active\":{zIndex:2}},[`> ${t}-affix-wrapper-focused`]:{zIndex:2}}}}},genTextAreaStyle=e=>{const{componentCls:t,paddingLG:r}=e,n=`${t}-textarea`;return{[n]:{position:\"relative\",\"&-show-count\":{[`> ${t}`]:{height:\"100%\"},[`${t}-data-count`]:{position:\"absolute\",bottom:e.calc(e.fontSize).mul(e.lineHeight).mul(-1).equal(),insetInlineEnd:0,color:e.colorTextDescription,whiteSpace:\"nowrap\",pointerEvents:\"none\"}},[`\\n &-allow-clear > ${t},\\n &-affix-wrapper${n}-has-feedback ${t}\\n `]:{paddingInlineEnd:r},[`&-affix-wrapper${t}-affix-wrapper`]:{padding:0,[`> textarea${t}`]:{fontSize:\"inherit\",border:\"none\",outline:\"none\",background:\"transparent\",\"&:focus\":{boxShadow:\"none !important\"}},[`${t}-suffix`]:{margin:0,\"> *:not(:last-child)\":{marginInline:0},[`${t}-clear-icon`]:{position:\"absolute\",insetInlineEnd:e.paddingInline,insetBlockStart:e.paddingXS},[`${n}-suffix`]:{position:\"absolute\",top:0,insetInlineEnd:e.paddingInline,bottom:0,zIndex:1,display:\"inline-flex\",alignItems:\"center\",margin:\"auto\",pointerEvents:\"none\"}}},[`&-affix-wrapper${t}-affix-wrapper-sm`]:{[`${t}-suffix`]:{[`${t}-clear-icon`]:{insetInlineEnd:e.paddingInlineSM}}}}}},genRangeStyle=e=>{const{componentCls:t}=e;return{[`${t}-out-of-range`]:{[`&, & input, & textarea, ${t}-show-count-suffix, ${t}-data-count`]:{color:e.colorError}}}},style_default14=genStyleHooks(\"Input\",(e=>{const t=merge2(e,initInputToken(e));return[genInputStyle(t),genTextAreaStyle(t),genAffixStyle(t),genGroupStyle2(t),genSearchInputStyle(t),genRangeStyle(t),genCompactItemStyle(t)]}),initComponentToken,{resetFont:!1});function throttle2(e,t,r){var n,i=r||{},o=i.noTrailing,a=void 0!==o&&o,s=i.noLeading,l=void 0!==s&&s,u=i.debounceMode,c=void 0===u?void 0:u,d=!1,h=0;function f(){n&&clearTimeout(n)}function p(){for(var r=arguments.length,i=new Array(r),o=0;o__left_angle_mark_r;o++)i[o]=arguments[o];var s=this,u=Date.now()-h;function p(){h=Date.now(),t.apply(s,i)}function m(){n=void 0}d||(l||!c||n||p(),f(),void 0===c&&u>e?l?(h=Date.now(),a||(n=setTimeout(c?m:p,e))):p():!0!==a&&(n=setTimeout(c?m:p,void 0===c?e-u:e)))}return p.cancel=function(e){var t=(e||{}).upcomingOnly,r=void 0!==t&&t;f(),d=!r},p}function debounce(e,t,r){var n=(r||{}).atBegin;return throttle2(e,t,{debounceMode:!1!==(void 0!==n&&n)})}init_globals(),init_globals();var genCheckboxStyle=e=>{const{checkboxCls:t}=e,r=`${t}-wrapper`;return[{[`${t}-group`]:Object.assign(Object.assign({},resetComponent(e)),{display:\"inline-flex\",flexWrap:\"wrap\",columnGap:e.marginXS,[`> ${e.antCls}-row`]:{flex:1}}),[r]:Object.assign(Object.assign({},resetComponent(e)),{display:\"inline-flex\",alignItems:\"baseline\",cursor:\"pointer\",\"&:after\":{display:\"inline-block\",width:0,overflow:\"hidden\",content:\"'\\\\a0'\"},[`& + ${r}`]:{marginInlineStart:0},[`&${r}-in-form-item`]:{'input[type=\"checkbox\"]':{width:14,height:14}}}),[t]:Object.assign(Object.assign({},resetComponent(e)),{position:\"relative\",whiteSpace:\"nowrap\",lineHeight:1,cursor:\"pointer\",borderRadius:e.borderRadiusSM,alignSelf:\"center\",[`${t}-input`]:{position:\"absolute\",inset:0,zIndex:1,cursor:\"pointer\",opacity:0,margin:0,[`&:focus-visible + ${t}-inner`]:Object.assign({},genFocusOutline(e))},[`${t}-inner`]:{boxSizing:\"border-box\",display:\"block\",width:e.checkboxSize,height:e.checkboxSize,direction:\"ltr\",backgroundColor:e.colorBgContainer,border:`${unit(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,borderCollapse:\"separate\",transition:`all ${e.motionDurationSlow}`,\"&:after\":{boxSizing:\"border-box\",position:\"absolute\",top:\"50%\",insetInlineStart:\"25%\",display:\"table\",width:e.calc(e.checkboxSize).div(14).mul(5).equal(),height:e.calc(e.checkboxSize).div(14).mul(8).equal(),border:`${unit(e.lineWidthBold)} solid ${e.colorWhite}`,borderTop:0,borderInlineStart:0,transform:\"rotate(45deg) scale(0) translate(-50%,-50%)\",opacity:0,content:'\"\"',transition:`all ${e.motionDurationFast} ${e.motionEaseInBack}, opacity ${e.motionDurationFast}`}},\"& + span\":{paddingInlineStart:e.paddingXS,paddingInlineEnd:e.paddingXS}})},{[`\\n ${r}:not(${r}-disabled),\\n ${t}:not(${t}-disabled)\\n `]:{[`&:hover ${t}-inner`]:{borderColor:e.colorPrimary}},[`${r}:not(${r}-disabled)`]:{[`&:hover ${t}-checked:not(${t}-disabled) ${t}-inner`]:{backgroundColor:e.colorPrimaryHover,borderColor:\"transparent\"},[`&:hover ${t}-checked:not(${t}-disabled):after`]:{borderColor:e.colorPrimaryHover}}},{[`${t}-checked`]:{[`${t}-inner`]:{backgroundColor:e.colorPrimary,borderColor:e.colorPrimary,\"&:after\":{opacity:1,transform:\"rotate(45deg) scale(1) translate(-50%,-50%)\",transition:`all ${e.motionDurationMid} ${e.motionEaseOutBack} ${e.motionDurationFast}`}}},[`\\n ${r}-checked:not(${r}-disabled),\\n ${t}-checked:not(${t}-disabled)\\n `]:{[`&:hover ${t}-inner`]:{backgroundColor:e.colorPrimaryHover,borderColor:\"transparent\"}}},{[t]:{\"&-indeterminate\":{[`${t}-inner`]:{backgroundColor:`${e.colorBgContainer} !important`,borderColor:`${e.colorBorder} !important`,\"&:after\":{top:\"50%\",insetInlineStart:\"50%\",width:e.calc(e.fontSizeLG).div(2).equal(),height:e.calc(e.fontSizeLG).div(2).equal(),backgroundColor:e.colorPrimary,border:0,transform:\"translate(-50%, -50%) scale(1)\",opacity:1,content:'\"\"'}},[`&:hover ${t}-inner`]:{backgroundColor:`${e.colorBgContainer} !important`,borderColor:`${e.colorPrimary} !important`}}}},{[`${r}-disabled`]:{cursor:\"not-allowed\"},[`${t}-disabled`]:{[`&, ${t}-input`]:{cursor:\"not-allowed\",pointerEvents:\"none\"},[`${t}-inner`]:{background:e.colorBgContainerDisabled,borderColor:e.colorBorder,\"&:after\":{borderColor:e.colorTextDisabled}},\"&:after\":{display:\"none\"},\"& + span\":{color:e.colorTextDisabled},[`&${t}-indeterminate ${t}-inner::after`]:{background:e.colorTextDisabled}}}]};function getStyle2(e,t){const r=merge2(t,{checkboxCls:`.${e}`,checkboxSize:t.controlInteractiveSize});return[genCheckboxStyle(r)]}var style_default15=genStyleHooks(\"Checkbox\",((e,t)=>{let{prefixCls:r}=t;return[getStyle2(r,e)]}));init_globals(),init_globals();var React220=__toESM(require_react()),import_classnames66=__toESM(require_classnames());init_globals();var import_react74=__toESM(require_react()),GroupContext=import_react74.default.createContext(null),GroupContext_default=GroupContext,__rest21=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)__left_angle_mark_0&&(r[n]=e[n]);if(null!=e&&\"function\"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i__left_angle_mark_n.length;i++)t.indexOf(n[i])__left_angle_mark_0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r},InternalCheckbox=(e,t)=>{var r;const{prefixCls:n,className:i,rootClassName:o,children:a,indeterminate:s=!1,style:l,onMouseEnter:u,onMouseLeave:c,skipGroup:d=!1,disabled:h}=e,f=__rest21(e,[\"prefixCls\",\"className\",\"rootClassName\",\"children\",\"indeterminate\",\"style\",\"onMouseEnter\",\"onMouseLeave\",\"skipGroup\",\"disabled\"]),{getPrefixCls:p,direction:m,checkbox:g}=React220.useContext(ConfigContext),_=React220.useContext(GroupContext_default),{isFormItemInput:b}=React220.useContext(FormItemInputContext),y=React220.useContext(DisabledContext_default),v=null!==(r=(null==_?void 0:_.disabled)||h)&&void 0!==r?r:y,A=React220.useRef(f.value),w=React220.useRef(null),S=composeRef(t,w);devUseWarning(\"Checkbox\")(\"checked\"in f||!!_||!(\"value\"in f),\"usage\",\"`value` is not a valid prop, do you mean `checked`?\"),React220.useEffect((()=>{null==_||_.registerValue(f.value)}),[]),React220.useEffect((()=>{if(!d)return f.value!==A.current&&(null==_||_.cancelValue(A.current),null==_||_.registerValue(f.value),A.current=f.value),()=>null==_?void 0:_.cancelValue(f.value)}),[f.value]),React220.useEffect((()=>{var e;(null===(e=w.current)||void 0===e?void 0:e.input)&&(w.current.input.indeterminate=s)}),[s]);const E=p(\"checkbox\",n),x=useCSSVarCls_default(E),[C,T,R]=style_default15(E,x),I=Object.assign({},f);_&&!d&&(I.onChange=function(){f.onChange&&f.onChange.apply(f,arguments),_.toggleOption&&_.toggleOption({label:a,value:f.value})},I.name=_.name,I.checked=_.value.includes(f.value));const k=(0,import_classnames66.default)(`${E}-wrapper`,{[`${E}-rtl`]:\"rtl\"===m,[`${E}-wrapper-checked`]:I.checked,[`${E}-wrapper-disabled`]:v,[`${E}-wrapper-in-form-item`]:b},null==g?void 0:g.className,i,o,R,x,T),P=(0,import_classnames66.default)({[`${E}-indeterminate`]:s},TARGET_CLS,T);return C(React220.createElement(wave_default,{component:\"Checkbox\",disabled:v},React220.createElement(\"label\",{className:k,style:Object.assign(Object.assign({},null==g?void 0:g.style),l),onMouseEnter:u,onMouseLeave:c},React220.createElement(es_default12,Object.assign({},I,{prefixCls:E,className:P,disabled:v,ref:S})),void 0!==a&&React220.createElement(\"span\",null,a))))},Checkbox2=React220.forwardRef(InternalCheckbox);Checkbox2.displayName=\"Checkbox\";var Checkbox_default=Checkbox2;init_globals();var React221=__toESM(require_react()),import_classnames67=__toESM(require_classnames()),__rest22=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)__left_angle_mark_0&&(r[n]=e[n]);if(null!=e&&\"function\"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i__left_angle_mark_n.length;i++)t.indexOf(n[i])__left_angle_mark_0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r},CheckboxGroup=React221.forwardRef(((e,t)=>{const{defaultValue:r,children:n,options:i=[],prefixCls:o,className:a,rootClassName:s,style:l,onChange:u}=e,c=__rest22(e,[\"defaultValue\",\"children\",\"options\",\"prefixCls\",\"className\",\"rootClassName\",\"style\",\"onChange\"]),{getPrefixCls:d,direction:h}=React221.useContext(ConfigContext),[f,p]=React221.useState(c.value||r||[]),[m,g]=React221.useState([]);React221.useEffect((()=>{\"value\"in c&&p(c.value||[])}),[c.value]);const _=React221.useMemo((()=>i.map((e=>\"string\"==typeof e||\"number\"==typeof e?{label:e,value:e}:e))),[i]),b=d(\"checkbox\",o),y=`${b}-group`,v=useCSSVarCls_default(b),[A,w,S]=style_default15(b,v),E=omit(c,[\"value\",\"disabled\"]),x=i.length?_.map((e=>React221.createElement(Checkbox_default,{prefixCls:b,key:e.value.toString(),disabled:\"disabled\"in e?e.disabled:c.disabled,value:e.value,checked:f.includes(e.value),onChange:e.onChange,className:`${y}-item`,style:e.style,title:e.title,id:e.id,required:e.required},e.label))):n,C={toggleOption:e=>{const t=f.indexOf(e.value),r=_toConsumableArray(f);-1===t?r.push(e.value):r.splice(t,1),\"value\"in c||p(r),null==u||u(r.filter((e=>m.includes(e))).sort(((e,t)=>_.findIndex((t=>t.value===e))-_.findIndex((e=>e.value===t)))))},value:f,disabled:c.disabled,name:c.name,registerValue:e=>{g((t=>[].concat(_toConsumableArray(t),[e])))},cancelValue:e=>{g((t=>t.filter((t=>t!==e))))}},T=(0,import_classnames67.default)(y,{[`${y}-rtl`]:\"rtl\"===h},a,s,S,v,w);return A(React221.createElement(\"div\",Object.assign({className:T,style:l},E,{ref:t}),React221.createElement(GroupContext_default.Provider,{value:C},x)))})),Group_default=CheckboxGroup,Checkbox3=Checkbox_default;Checkbox3.Group=Group_default,Checkbox3.__ANT_CHECKBOX=!0,Checkbox3.displayName=\"Checkbox\";var checkbox_default=Checkbox3;init_globals(),init_globals();var React222=__toESM(require_react()),import_classnames68=__toESM(require_classnames());init_globals();var import_react75=__toESM(require_react()),RowContext=(0,import_react75.createContext)({}),RowContext_default=RowContext;init_globals();var genGridRowStyle=e=>{const{componentCls:t}=e;return{[t]:{display:\"flex\",flexFlow:\"row wrap\",minWidth:0,\"&::before, &::after\":{display:\"flex\"},\"&-no-wrap\":{flexWrap:\"nowrap\"},\"&-start\":{justifyContent:\"flex-start\"},\"&-center\":{justifyContent:\"center\"},\"&-end\":{justifyContent:\"flex-end\"},\"&-space-between\":{justifyContent:\"space-between\"},\"&-space-around\":{justifyContent:\"space-around\"},\"&-space-evenly\":{justifyContent:\"space-evenly\"},\"&-top\":{alignItems:\"flex-start\"},\"&-middle\":{alignItems:\"center\"},\"&-bottom\":{alignItems:\"flex-end\"}}}},genGridColStyle=e=>{const{componentCls:t}=e;return{[t]:{position:\"relative\",maxWidth:\"100%\",minHeight:1}}},genLoopGridColumnsStyle=(e,t)=>{const{prefixCls:r,componentCls:n,gridColumns:i}=e,o={};for(let a=i;a>=0;a--)0===a?(o[`${n}${t}-${a}`]={display:\"none\"},o[`${n}-push-${a}`]={insetInlineStart:\"auto\"},o[`${n}-pull-${a}`]={insetInlineEnd:\"auto\"},o[`${n}${t}-push-${a}`]={insetInlineStart:\"auto\"},o[`${n}${t}-pull-${a}`]={insetInlineEnd:\"auto\"},o[`${n}${t}-offset-${a}`]={marginInlineStart:0},o[`${n}${t}-order-${a}`]={order:0}):(o[`${n}${t}-${a}`]=[{\"--ant-display\":\"block\",display:\"block\"},{display:\"var(--ant-display)\",flex:`0 0 ${a/i*100}%`,maxWidth:a/i*100+\"%\"}],o[`${n}${t}-push-${a}`]={insetInlineStart:a/i*100+\"%\"},o[`${n}${t}-pull-${a}`]={insetInlineEnd:a/i*100+\"%\"},o[`${n}${t}-offset-${a}`]={marginInlineStart:a/i*100+\"%\"},o[`${n}${t}-order-${a}`]={order:a});return o[`${n}${t}-flex`]={flex:`var(--${r}${t}-flex)`},o},genGridStyle=(e,t)=>genLoopGridColumnsStyle(e,t),genGridMediaStyle=(e,t,r)=>({[`@media (min-width: ${unit(t)})`]:Object.assign({},genGridStyle(e,r))}),prepareRowComponentToken=()=>({}),prepareColComponentToken=()=>({}),useRowStyle=genStyleHooks(\"Grid\",genGridRowStyle,prepareRowComponentToken),useColStyle=genStyleHooks(\"Grid\",(e=>{const t=merge2(e,{gridColumns:24}),r={\"-sm\":t.screenSMMin,\"-md\":t.screenMDMin,\"-lg\":t.screenLGMin,\"-xl\":t.screenXLMin,\"-xxl\":t.screenXXLMin};return[genGridColStyle(t),genGridStyle(t,\"\"),genGridStyle(t,\"-xs\"),Object.keys(r).map((e=>genGridMediaStyle(t,r[e],e))).reduce(((e,t)=>Object.assign(Object.assign({},e),t)),{})]}),prepareColComponentToken),__rest23=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)__left_angle_mark_0&&(r[n]=e[n]);if(null!=e&&\"function\"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i__left_angle_mark_n.length;i++)t.indexOf(n[i])__left_angle_mark_0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r};function parseFlex(e){return\"number\"==typeof e?`${e} ${e} auto`:/^\\d+(\\.\\d+)?(px|em|rem|%)$/.test(e)?`0 0 ${e}`:e}var sizes=[\"xs\",\"sm\",\"md\",\"lg\",\"xl\",\"xxl\"],Col=React222.forwardRef(((e,t)=>{const{getPrefixCls:r,direction:n}=React222.useContext(ConfigContext),{gutter:i,wrap:o}=React222.useContext(RowContext_default),{prefixCls:a,span:s,order:l,offset:u,push:c,pull:d,className:h,children:f,flex:p,style:m}=e,g=__rest23(e,[\"prefixCls\",\"span\",\"order\",\"offset\",\"push\",\"pull\",\"className\",\"children\",\"flex\",\"style\"]),_=r(\"col\",a),[b,y,v]=useColStyle(_),A={};let w={};sizes.forEach((t=>{let r={};const i=e[t];\"number\"==typeof i?r.span=i:\"object\"==typeof i&&(r=i||{}),delete g[t],w=Object.assign(Object.assign({},w),{[`${_}-${t}-${r.span}`]:void 0!==r.span,[`${_}-${t}-order-${r.order}`]:r.order||0===r.order,[`${_}-${t}-offset-${r.offset}`]:r.offset||0===r.offset,[`${_}-${t}-push-${r.push}`]:r.push||0===r.push,[`${_}-${t}-pull-${r.pull}`]:r.pull||0===r.pull,[`${_}-rtl`]:\"rtl\"===n}),r.flex&&(w[`${_}-${t}-flex`]=!0,A[`--${_}-${t}-flex`]=parseFlex(r.flex))}));const S=(0,import_classnames68.default)(_,{[`${_}-${s}`]:void 0!==s,[`${_}-order-${l}`]:l,[`${_}-offset-${u}`]:u,[`${_}-push-${c}`]:c,[`${_}-pull-${d}`]:d},h,w,y,v),E={};if(i&&i[0]>0){const e=i[0]/2;E.paddingLeft=e,E.paddingRight=e}return p&&(E.flex=parseFlex(p),!1!==o||E.minWidth||(E.minWidth=0)),b(React222.createElement(\"div\",Object.assign({},g,{style:Object.assign(Object.assign(Object.assign({},E),m),A),className:S,ref:t}),f))}));Col.displayName=\"Col\";var col_default=Col;init_globals();var React223=__toESM(require_react()),import_classnames69=__toESM(require_classnames()),__rest24=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)__left_angle_mark_0&&(r[n]=e[n]);if(null!=e&&\"function\"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i__left_angle_mark_n.length;i++)t.indexOf(n[i])__left_angle_mark_0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r};function useMergedPropByScreen(e,t){const[r,n]=React223.useState(\"string\"==typeof e?e:\"\");return React223.useEffect((()=>{(()=>{if(\"string\"==typeof e&&n(e),\"object\"==typeof e)for(let r=0;r__left_angle_mark_responsiveArray.length;r++){const i=responsiveArray[r];if(!t[i])continue;const o=e[i];if(void 0!==o)return void n(o)}})()}),[JSON.stringify(e),t]),r}var Row=React223.forwardRef(((e,t)=>{const{prefixCls:r,justify:n,align:i,className:o,style:a,children:s,gutter:l=0,wrap:u}=e,c=__rest24(e,[\"prefixCls\",\"justify\",\"align\",\"className\",\"style\",\"children\",\"gutter\",\"wrap\"]),{getPrefixCls:d,direction:h}=React223.useContext(ConfigContext),[f,p]=React223.useState({xs:!0,sm:!0,md:!0,lg:!0,xl:!0,xxl:!0}),[m,g]=React223.useState({xs:!1,sm:!1,md:!1,lg:!1,xl:!1,xxl:!1}),_=useMergedPropByScreen(i,m),b=useMergedPropByScreen(n,m),y=React223.useRef(l),v=useResponsiveObserver();React223.useEffect((()=>{const e=v.subscribe((e=>{g(e);const t=y.current||0;(!Array.isArray(t)&&\"object\"==typeof t||Array.isArray(t)&&(\"object\"==typeof t[0]||\"object\"==typeof t[1]))&&p(e)}));return()=>v.unsubscribe(e)}),[]);const A=d(\"row\",r),[w,S,E]=useRowStyle(A),x=(()=>{const e=[void 0,void 0];return(Array.isArray(l)?l:[l,void 0]).forEach(((t,r)=>{if(\"object\"==typeof t)for(let n=0;n__left_angle_mark_responsiveArray.length;n++){const i=responsiveArray[n];if(f[i]&&void 0!==t[i]){e[r]=t[i];break}}else e[r]=t})),e})(),C=(0,import_classnames69.default)(A,{[`${A}-no-wrap`]:!1===u,[`${A}-${b}`]:b,[`${A}-${_}`]:_,[`${A}-rtl`]:\"rtl\"===h},o,S,E),T={},R=null!=x[0]&&x[0]>0?x[0]/-2:void 0;R&&(T.marginLeft=R,T.marginRight=R);const[I,k]=x;T.rowGap=k;const P=React223.useMemo((()=>({gutter:[I,k],wrap:u})),[I,k,u]);return w(React223.createElement(RowContext_default.Provider,{value:P},React223.createElement(\"div\",Object.assign({},c,{className:C,style:Object.assign(Object.assign({},T),a),ref:t}),s)))}));Row.displayName=\"Row\";var row_default=Row;init_globals();var React226=__toESM(require_react()),import_classnames72=__toESM(require_classnames());init_globals();var import_classnames71=__toESM(require_classnames()),React225=__toESM(require_react());init_globals();var import_classnames70=__toESM(require_classnames()),React224=__toESM(require_react()),calcThumbStyle=function(e,t){if(!e)return null;var r={left:e.offsetLeft,right:e.parentElement.clientWidth-e.clientWidth-e.offsetLeft,width:e.clientWidth,top:e.offsetTop,bottom:e.parentElement.clientHeight-e.clientHeight-e.offsetTop,height:e.clientHeight};return t?{left:0,right:0,width:0,top:r.top,bottom:r.bottom,height:r.height}:{left:r.left,right:r.right,width:r.width,top:0,bottom:0,height:0}},toPX=function(e){return void 0!==e?\"\".concat(e,\"px\"):void 0};function MotionThumb(e){var t=e.prefixCls,r=e.containerRef,n=e.value,i=e.getValueIndex,o=e.motionName,a=e.onMotionStart,s=e.onMotionEnd,l=e.direction,u=e.vertical,c=void 0!==u&&u,d=React224.useRef(null),h=_slicedToArray(React224.useState(n),2),f=h[0],p=h[1],m=function(e){var n,o=i(e),a=null===(n=r.current)||void 0===n?void 0:n.querySelectorAll(\".\".concat(t,\"-item\"))[o];return(null==a?void 0:a.offsetParent)&&a},g=_slicedToArray(React224.useState(null),2),_=g[0],b=g[1],y=_slicedToArray(React224.useState(null),2),v=y[0],A=y[1];useLayoutEffect_default((function(){if(f!==n){var e=m(f),t=m(n),r=calcThumbStyle(e,c),i=calcThumbStyle(t,c);p(n),b(r),A(i),e&&t?a():s()}}),[n]);var w=React224.useMemo((function(){var e;return toPX(c?null!==(e=null==_?void 0:_.top)&&void 0!==e?e:0:\"rtl\"===l?-(null==_?void 0:_.right):null==_?void 0:_.left)}),[c,l,_]),S=React224.useMemo((function(){var e;return toPX(c?null!==(e=null==v?void 0:v.top)&&void 0!==e?e:0:\"rtl\"===l?-(null==v?void 0:v.right):null==v?void 0:v.left)}),[c,l,v]);return _&&v?React224.createElement(es_default2,{visible:!0,motionName:o,motionAppear:!0,onAppearStart:function(){return c?{transform:\"translateY(var(--thumb-start-top))\",height:\"var(--thumb-start-height)\"}:{transform:\"translateX(var(--thumb-start-left))\",width:\"var(--thumb-start-width)\"}},onAppearActive:function(){return c?{transform:\"translateY(var(--thumb-active-top))\",height:\"var(--thumb-active-height)\"}:{transform:\"translateX(var(--thumb-active-left))\",width:\"var(--thumb-active-width)\"}},onVisibleChanged:function(){b(null),A(null),s()}},(function(e,r){var n=e.className,i=_objectSpread2(_objectSpread2({},e.style),{},{\"--thumb-start-left\":w,\"--thumb-start-width\":toPX(null==_?void 0:_.width),\"--thumb-active-left\":S,\"--thumb-active-width\":toPX(null==v?void 0:v.width),\"--thumb-start-top\":w,\"--thumb-start-height\":toPX(null==_?void 0:_.height),\"--thumb-active-top\":S,\"--thumb-active-height\":toPX(null==v?void 0:v.height)}),o={ref:composeRef(d,r),style:i,className:(0,import_classnames70.default)(\"\".concat(t,\"-thumb\"),n)};return React224.createElement(\"div\",o)})):null}var _excluded35=[\"prefixCls\",\"direction\",\"vertical\",\"options\",\"disabled\",\"defaultValue\",\"value\",\"onChange\",\"className\",\"motionName\"];function getValidTitle(e){return void 0!==e.title?e.title:\"object\"!==_typeof(e.label)?null===(t=e.label)||void 0===t?void 0:t.toString():void 0;var t}function normalizeOptions(e){return e.map((function(e){if(\"object\"===_typeof(e)&&null!==e){var t=getValidTitle(e);return _objectSpread2(_objectSpread2({},e),{},{title:t})}return{label:null==e?void 0:e.toString(),title:null==e?void 0:e.toString(),value:e}}))}var InternalSegmentedOption=function(e){var t=e.prefixCls,r=e.className,n=e.disabled,i=e.checked,o=e.label,a=e.title,s=e.value,l=e.onChange;return React225.createElement(\"label\",{className:(0,import_classnames71.default)(r,_defineProperty({},\"\".concat(t,\"-item-disabled\"),n))},React225.createElement(\"input\",{className:\"\".concat(t,\"-item-input\"),type:\"radio\",disabled:n,checked:i,onChange:function(e){n||l(e,s)}}),React225.createElement(\"div\",{className:\"\".concat(t,\"-item-label\"),title:a,role:\"option\",\"aria-selected\":i},o))},Segmented=React225.forwardRef((function(e,t){var r,n,i=e.prefixCls,o=void 0===i?\"rc-segmented\":i,a=e.direction,s=e.vertical,l=e.options,u=void 0===l?[]:l,c=e.disabled,d=e.defaultValue,h=e.value,f=e.onChange,p=e.className,m=void 0===p?\"\":p,g=e.motionName,_=void 0===g?\"thumb-motion\":g,b=_objectWithoutProperties(e,_excluded35),y=React225.useRef(null),v=React225.useMemo((function(){return composeRef(y,t)}),[y,t]),A=React225.useMemo((function(){return normalizeOptions(u)}),[u]),w=_slicedToArray(useMergedState(null===(r=A[0])||void 0===r?void 0:r.value,{value:h,defaultValue:d}),2),S=w[0],E=w[1],x=_slicedToArray(React225.useState(!1),2),C=x[0],T=x[1],R=function(e,t){c||(E(t),null==f||f(t))},I=omit(b,[\"children\"]);return React225.createElement(\"div\",_extends({role:\"listbox\",\"aria-label\":\"segmented control\"},I,{className:(0,import_classnames71.default)(o,(n={},_defineProperty(n,\"\".concat(o,\"-rtl\"),\"rtl\"===a),_defineProperty(n,\"\".concat(o,\"-disabled\"),c),_defineProperty(n,\"\".concat(o,\"-vertical\"),s),n),m),ref:v}),React225.createElement(\"div\",{className:\"\".concat(o,\"-group\")},React225.createElement(MotionThumb,{vertical:s,prefixCls:o,value:S,containerRef:y,motionName:\"\".concat(o,\"-\").concat(_),direction:a,getValueIndex:function(e){return A.findIndex((function(t){return t.value===e}))},onMotionStart:function(){T(!0)},onMotionEnd:function(){T(!1)}}),A.map((function(e){return React225.createElement(InternalSegmentedOption,_extends({},e,{key:e.value,prefixCls:o,className:(0,import_classnames71.default)(e.className,\"\".concat(o,\"-item\"),_defineProperty({},\"\".concat(o,\"-item-selected\"),e.value===S&&!C)),checked:e.value===S,onChange:R,disabled:!!c||!!e.disabled}))}))))}));Segmented.displayName=\"Segmented\";var TypedSegmented=Segmented,es_default13=TypedSegmented;function getItemDisabledStyle(e,t){return{[`${e}, ${e}:hover, ${e}:focus`]:{color:t.colorTextDisabled,cursor:\"not-allowed\"}}}function getItemSelectedStyle(e){return{backgroundColor:e.itemSelectedBg,boxShadow:e.boxShadowTertiary}}init_globals();var segmentedTextEllipsisCss=Object.assign({overflow:\"hidden\"},textEllipsis),genSegmentedStyle=e=>{const{componentCls:t}=e,r=e.calc(e.controlHeight).sub(e.calc(e.trackPadding).mul(2)).equal(),n=e.calc(e.controlHeightLG).sub(e.calc(e.trackPadding).mul(2)).equal(),i=e.calc(e.controlHeightSM).sub(e.calc(e.trackPadding).mul(2)).equal();return{[t]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},resetComponent(e)),{display:\"inline-block\",padding:e.trackPadding,color:e.itemColor,background:e.trackBg,borderRadius:e.borderRadius,transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`,[`${t}-group`]:{position:\"relative\",display:\"flex\",alignItems:\"stretch\",justifyItems:\"flex-start\",flexDirection:\"row\",width:\"100%\"},[`&${t}-rtl`]:{direction:\"rtl\"},[`&${t}-vertical`]:{[`${t}-group`]:{flexDirection:\"column\"},[`${t}-thumb`]:{width:\"100%\",height:0,padding:`0 ${unit(e.paddingXXS)}`}},[`&${t}-block`]:{display:\"flex\"},[`&${t}-block ${t}-item`]:{flex:1,minWidth:0},[`${t}-item`]:{position:\"relative\",textAlign:\"center\",cursor:\"pointer\",transition:`color ${e.motionDurationMid} ${e.motionEaseInOut}`,borderRadius:e.borderRadiusSM,transform:\"translateZ(0)\",\"&-selected\":Object.assign(Object.assign({},getItemSelectedStyle(e)),{color:e.itemSelectedColor}),\"&::after\":{content:'\"\"',position:\"absolute\",zIndex:-1,width:\"100%\",height:\"100%\",top:0,insetInlineStart:0,borderRadius:\"inherit\",transition:`background-color ${e.motionDurationMid}`,pointerEvents:\"none\"},[`&:hover:not(${t}-item-selected):not(${t}-item-disabled)`]:{color:e.itemHoverColor,\"&::after\":{backgroundColor:e.itemHoverBg}},[`&:active:not(${t}-item-selected):not(${t}-item-disabled)`]:{color:e.itemHoverColor,\"&::after\":{backgroundColor:e.itemActiveBg}},\"&-label\":Object.assign({minHeight:r,lineHeight:unit(r),padding:`0 ${unit(e.segmentedPaddingHorizontal)}`},segmentedTextEllipsisCss),\"&-icon + *\":{marginInlineStart:e.calc(e.marginSM).div(2).equal()},\"&-input\":{position:\"absolute\",insetBlockStart:0,insetInlineStart:0,width:0,height:0,opacity:0,pointerEvents:\"none\"}},[`${t}-thumb`]:Object.assign(Object.assign({},getItemSelectedStyle(e)),{position:\"absolute\",insetBlockStart:0,insetInlineStart:0,width:0,height:\"100%\",padding:`${unit(e.paddingXXS)} 0`,borderRadius:e.borderRadiusSM,transition:`transform ${e.motionDurationSlow} ${e.motionEaseInOut}, height ${e.motionDurationSlow} ${e.motionEaseInOut}`,[`& ~ ${t}-item:not(${t}-item-selected):not(${t}-item-disabled)::after`]:{backgroundColor:\"transparent\"}}),[`&${t}-lg`]:{borderRadius:e.borderRadiusLG,[`${t}-item-label`]:{minHeight:n,lineHeight:unit(n),padding:`0 ${unit(e.segmentedPaddingHorizontal)}`,fontSize:e.fontSizeLG},[`${t}-item, ${t}-thumb`]:{borderRadius:e.borderRadius}},[`&${t}-sm`]:{borderRadius:e.borderRadiusSM,[`${t}-item-label`]:{minHeight:i,lineHeight:unit(i),padding:`0 ${unit(e.segmentedPaddingHorizontalSM)}`},[`${t}-item, ${t}-thumb`]:{borderRadius:e.borderRadiusXS}}}),getItemDisabledStyle(`&-disabled ${t}-item`,e)),getItemDisabledStyle(`${t}-item-disabled`,e)),{[`${t}-thumb-motion-appear-active`]:{transition:`transform ${e.motionDurationSlow} ${e.motionEaseInOut}, width ${e.motionDurationSlow} ${e.motionEaseInOut}`,willChange:\"transform, width\"}})}},prepareComponentToken11=e=>{const{colorTextLabel:t,colorText:r,colorFillSecondary:n,colorBgElevated:i,colorFill:o,lineWidthBold:a,colorBgLayout:s}=e;return{trackPadding:a,trackBg:s,itemColor:t,itemHoverColor:r,itemHoverBg:n,itemSelectedBg:i,itemActiveBg:o,itemSelectedColor:r}},style_default16=genStyleHooks(\"Segmented\",(e=>{const{lineWidth:t,calc:r}=e,n=merge2(e,{segmentedPaddingHorizontal:r(e.controlPaddingHorizontal).sub(t).equal(),segmentedPaddingHorizontalSM:r(e.controlPaddingHorizontalSM).sub(t).equal()});return[genSegmentedStyle(n)]}),prepareComponentToken11),__rest25=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)__left_angle_mark_0&&(r[n]=e[n]);if(null!=e&&\"function\"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i__left_angle_mark_n.length;i++)t.indexOf(n[i])__left_angle_mark_0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r};function isSegmentedLabeledOptionWithIcon(e){return\"object\"==typeof e&&!!(null==e?void 0:e.icon)}var InternalSegmented=React226.forwardRef(((e,t)=>{const{prefixCls:r,className:n,rootClassName:i,block:o,options:a=[],size:s=\"middle\",style:l,vertical:u}=e,c=__rest25(e,[\"prefixCls\",\"className\",\"rootClassName\",\"block\",\"options\",\"size\",\"style\",\"vertical\"]),{getPrefixCls:d,direction:h,segmented:f}=React226.useContext(ConfigContext),p=d(\"segmented\",r),[m,g,_]=style_default16(p),b=useSize_default(s),y=React226.useMemo((()=>a.map((e=>{if(isSegmentedLabeledOptionWithIcon(e)){const{icon:t,label:r}=e,n=__rest25(e,[\"icon\",\"label\"]);return Object.assign(Object.assign({},n),{label:React226.createElement(React226.Fragment,null,React226.createElement(\"span\",{className:`${p}-item-icon`},t),r&&React226.createElement(\"span\",null,r))})}return e}))),[a,p]),v=(0,import_classnames72.default)(n,i,null==f?void 0:f.className,{[`${p}-block`]:o,[`${p}-sm`]:\"small\"===b,[`${p}-lg`]:\"large\"===b,[`${p}-vertical`]:u},g,_),A=Object.assign(Object.assign({},null==f?void 0:f.style),l);return m(React226.createElement(es_default13,Object.assign({},c,{className:v,style:A,options:y,ref:t,prefixCls:p,direction:h,vertical:u})))})),Segmented2=InternalSegmented;Segmented2.displayName=\"Segmented\";var segmented_default=Segmented2;init_globals(),init_globals();var import_classnames73=__toESM(require_classnames()),import_react76=__toESM(require_react());function hasAddon(e){return!(!e.addonBefore&&!e.addonAfter)}function hasPrefixSuffix(e){return!!(e.prefix||e.suffix||e.allowClear)}function cloneEvent(e,t,r){var n=t.cloneNode(!0),i=Object.create(e,{target:{value:n},currentTarget:{value:n}});return n.value=r,\"number\"==typeof t.selectionStart&&\"number\"==typeof t.selectionEnd&&(n.selectionStart=t.selectionStart,n.selectionEnd=t.selectionEnd),n.setSelectionRange=function(){t.setSelectionRange.apply(t,arguments)},i}function resolveOnChange(e,t,r,n){if(r){var i=t;\"click\"!==t.type?\"file\"===e.type||void 0===n?r(i):r(i=cloneEvent(t,e,n)):r(i=cloneEvent(t,e,\"\"))}}function triggerFocus(e,t){if(e){e.focus(t);var r=(t||{}).cursor;if(r){var n=e.value.length;switch(r){case\"start\":e.setSelectionRange(0,0);break;case\"end\":e.setSelectionRange(n,n);break;default:e.setSelectionRange(0,n)}}}}init_globals();var BaseInput=import_react76.default.forwardRef((function(e,t){var r,n,i=e.inputElement,o=e.children,a=e.prefixCls,s=e.prefix,l=e.suffix,u=e.addonBefore,c=e.addonAfter,d=e.className,h=e.style,f=e.disabled,p=e.readOnly,m=e.focused,g=e.triggerFocus,_=e.allowClear,b=e.value,y=e.handleReset,v=e.hidden,A=e.classes,w=e.classNames,S=e.dataAttrs,E=e.styles,x=e.components,C=e.onClear,T=null!=o?o:i,R=(null==x?void 0:x.affixWrapper)||\"span\",I=(null==x?void 0:x.groupWrapper)||\"span\",k=(null==x?void 0:x.wrapper)||\"span\",P=(null==x?void 0:x.groupAddon)||\"span\",M=(0,import_react76.useRef)(null),O=hasPrefixSuffix(e),B=(0,import_react76.cloneElement)(T,{value:b,className:(0,import_classnames73.default)(T.props.className,!O&&(null==w?void 0:w.variant))||null}),N=(0,import_react76.useRef)(null);if(import_react76.default.useImperativeHandle(t,(function(){return{nativeElement:N.current||M.current}})),O){var j=null;if(_){var L=!f&&!p&&b,D=\"\".concat(a,\"-clear-icon\"),F=\"object\"===_typeof(_)&&null!=_&&_.clearIcon?_.clearIcon:\"✖\";j=import_react76.default.createElement(\"span\",{onClick:function(e){null==y||y(e),null==C||C()},onMouseDown:function(e){return e.preventDefault()},className:(0,import_classnames73.default)(D,_defineProperty(_defineProperty({},\"\".concat(D,\"-hidden\"),!L),\"\".concat(D,\"-has-suffix\"),!!l)),role:\"button\",tabIndex:-1},F)}var U=\"\".concat(a,\"-affix-wrapper\"),z=(0,import_classnames73.default)(U,_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({},\"\".concat(a,\"-disabled\"),f),\"\".concat(U,\"-disabled\"),f),\"\".concat(U,\"-focused\"),m),\"\".concat(U,\"-readonly\"),p),\"\".concat(U,\"-input-with-clear-btn\"),l&&_&&b),null==A?void 0:A.affixWrapper,null==w?void 0:w.affixWrapper,null==w?void 0:w.variant),q=(l||_)&&import_react76.default.createElement(\"span\",{className:(0,import_classnames73.default)(\"\".concat(a,\"-suffix\"),null==w?void 0:w.suffix),style:null==E?void 0:E.suffix},j,l);B=import_react76.default.createElement(R,_extends({className:z,style:null==E?void 0:E.affixWrapper,onClick:function(e){var t;null!==(t=M.current)&&void 0!==t&&t.contains(e.target)&&(null==g||g())}},null==S?void 0:S.affixWrapper,{ref:M}),s&&import_react76.default.createElement(\"span\",{className:(0,import_classnames73.default)(\"\".concat(a,\"-prefix\"),null==w?void 0:w.prefix),style:null==E?void 0:E.prefix},s),B,q)}if(hasAddon(e)){var G=\"\".concat(a,\"-group\"),H=\"\".concat(G,\"-addon\"),W=\"\".concat(G,\"-wrapper\"),V=(0,import_classnames73.default)(\"\".concat(a,\"-wrapper\"),G,null==A?void 0:A.wrapper,null==w?void 0:w.wrapper),$=(0,import_classnames73.default)(W,_defineProperty({},\"\".concat(W,\"-disabled\"),f),null==A?void 0:A.group,null==w?void 0:w.groupWrapper);B=import_react76.default.createElement(I,{className:$,ref:N},import_react76.default.createElement(k,{className:V},u&&import_react76.default.createElement(P,{className:H},u),B,c&&import_react76.default.createElement(P,{className:H},c)))}return import_react76.default.cloneElement(B,{className:(0,import_classnames73.default)(null===(r=B.props)||void 0===r?void 0:r.className,d)||null,style:_objectSpread2(_objectSpread2({},null===(n=B.props)||void 0===n?void 0:n.style),h),hidden:v})})),BaseInput_default=BaseInput;init_globals();var import_classnames74=__toESM(require_classnames()),import_react77=__toESM(require_react());init_globals();var React228=__toESM(require_react()),_excluded36=[\"show\"];function useCount(e,t){return React228.useMemo((function(){var r={};t&&(r.show=\"object\"===_typeof(t)&&t.formatter?t.formatter:!!t);var n=r=_objectSpread2(_objectSpread2({},r),e),i=n.show,o=_objectWithoutProperties(n,_excluded36);return _objectSpread2(_objectSpread2({},o),{},{show:!!i,showFormatter:\"function\"==typeof i?i:void 0,strategy:o.strategy||function(e){return e.length}})}),[e,t])}var _excluded37=[\"autoComplete\",\"onChange\",\"onFocus\",\"onBlur\",\"onPressEnter\",\"onKeyDown\",\"onKeyUp\",\"prefixCls\",\"disabled\",\"htmlSize\",\"className\",\"maxLength\",\"suffix\",\"showCount\",\"count\",\"type\",\"classes\",\"classNames\",\"styles\",\"onCompositionStart\",\"onCompositionEnd\"],Input=(0,import_react77.forwardRef)((function(e,t){var r=e.autoComplete,n=e.onChange,i=e.onFocus,o=e.onBlur,a=e.onPressEnter,s=e.onKeyDown,l=e.onKeyUp,u=e.prefixCls,c=void 0===u?\"rc-input\":u,d=e.disabled,h=e.htmlSize,f=e.className,p=e.maxLength,m=e.suffix,g=e.showCount,_=e.count,b=e.type,y=void 0===b?\"text\":b,v=e.classes,A=e.classNames,w=e.styles,S=e.onCompositionStart,E=e.onCompositionEnd,x=_objectWithoutProperties(e,_excluded37),C=_slicedToArray((0,import_react77.useState)(!1),2),T=C[0],R=C[1],I=(0,import_react77.useRef)(!1),k=(0,import_react77.useRef)(!1),P=(0,import_react77.useRef)(null),M=(0,import_react77.useRef)(null),O=function(e){P.current&&triggerFocus(P.current,e)},B=_slicedToArray(useMergedState(e.defaultValue,{value:e.value}),2),N=B[0],j=B[1],L=null==N?\"\":String(N),D=_slicedToArray((0,import_react77.useState)(null),2),F=D[0],U=D[1],z=useCount(_,g),q=z.max||p,G=z.strategy(L),H=!!q&&G>q;(0,import_react77.useImperativeHandle)(t,(function(){var e;return{focus:O,blur:function(){var e;null===(e=P.current)||void 0===e||e.blur()},setSelectionRange:function(e,t,r){var n;null===(n=P.current)||void 0===n||n.setSelectionRange(e,t,r)},select:function(){var e;null===(e=P.current)||void 0===e||e.select()},input:P.current,nativeElement:(null===(e=M.current)||void 0===e?void 0:e.nativeElement)||P.current}})),(0,import_react77.useEffect)((function(){R((function(e){return(!e||!d)&&e}))}),[d]);var W=function(e,t,r){var i,o,a=t;if(!I.current&&z.exceedFormatter&&z.max&&z.strategy(t)>z.max)t!==(a=z.exceedFormatter(t,{max:z.max}))&&U([(null===(i=P.current)||void 0===i?void 0:i.selectionStart)||0,(null===(o=P.current)||void 0===o?void 0:o.selectionEnd)||0]);else if(\"compositionEnd\"===r.source)return;j(a),P.current&&resolveOnChange(P.current,e,n,a)};(0,import_react77.useEffect)((function(){var e;F&&(null===(e=P.current)||void 0===e||e.setSelectionRange.apply(e,_toConsumableArray(F)))}),[F]);var V,$=function(e){W(e,e.target.value,{source:\"change\"})},K=function(e){I.current=!1,W(e,e.currentTarget.value,{source:\"compositionEnd\"}),null==E||E(e)},X=function(e){a&&\"Enter\"===e.key&&!k.current&&(k.current=!0,a(e)),null==s||s(e)},Y=function(e){\"Enter\"===e.key&&(k.current=!1),null==l||l(e)},J=function(e){R(!0),null==i||i(e)},Q=function(e){R(!1),null==o||o(e)},Z=H&&\"\".concat(c,\"-out-of-range\");return import_react77.default.createElement(BaseInput_default,_extends({},x,{prefixCls:c,className:(0,import_classnames74.default)(f,Z),handleReset:function(e){j(\"\"),O(),P.current&&resolveOnChange(P.current,e,n)},value:L,focused:T,triggerFocus:O,suffix:function(){var e=Number(q)>0;if(m||z.show){var t=z.showFormatter?z.showFormatter({value:L,count:G,maxLength:q}):\"\".concat(G).concat(e?\" / \".concat(q):\"\");return import_react77.default.createElement(import_react77.default.Fragment,null,z.show&&import_react77.default.createElement(\"span\",{className:(0,import_classnames74.default)(\"\".concat(c,\"-show-count-suffix\"),_defineProperty({},\"\".concat(c,\"-show-count-has-suffix\"),!!m),null==A?void 0:A.count),style:_objectSpread2({},null==w?void 0:w.count)},t),m)}return null}(),disabled:d,classes:v,classNames:A,styles:w}),(V=omit(e,[\"prefixCls\",\"onPressEnter\",\"addonBefore\",\"addonAfter\",\"prefix\",\"suffix\",\"allowClear\",\"defaultValue\",\"showCount\",\"count\",\"classes\",\"htmlSize\",\"styles\",\"classNames\",\"onClear\"]),import_react77.default.createElement(\"input\",_extends({autoComplete:r},V,{onChange:$,onFocus:J,onBlur:Q,onKeyDown:X,onKeyUp:Y,className:(0,import_classnames74.default)(c,_defineProperty({},\"\".concat(c,\"-disabled\"),d),null==A?void 0:A.input),style:null==w?void 0:w.input,ref:P,size:h,type:y,onCompositionStart:function(e){I.current=!0,null==S||S(e)},onCompositionEnd:K}))))})),Input_default2=Input,es_default14=Input_default2;init_globals(),init_globals();var React230=__toESM(require_react()),import_react78=__toESM(require_react()),import_classnames75=__toESM(require_classnames()),Group=e=>{const{getPrefixCls:t,direction:r}=(0,import_react78.useContext)(ConfigContext),{prefixCls:n,className:i}=e,o=t(\"input-group\",n),a=t(\"input\"),[s,l]=style_default14(a),u=(0,import_classnames75.default)(o,{[`${o}-lg`]:\"large\"===e.size,[`${o}-sm`]:\"small\"===e.size,[`${o}-compact`]:e.compact,[`${o}-rtl`]:\"rtl\"===r},l,i),c=(0,import_react78.useContext)(FormItemInputContext),d=(0,import_react78.useMemo)((()=>Object.assign(Object.assign({},c),{isFormItemInput:!1})),[c]);return devUseWarning(\"Input.Group\").deprecated(!1,\"Input.Group\",\"Space.Compact\"),s(React230.createElement(\"span\",{className:u,style:e.style,onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,onFocus:e.onFocus,onBlur:e.onBlur},React230.createElement(FormItemInputContext.Provider,{value:d},e.children)))},Group_default2=Group;init_globals();var import_react81=__toESM(require_react()),import_classnames76=__toESM(require_classnames());init_globals();var import_react79=__toESM(require_react()),getAllowClear=e=>{let t;return\"object\"==typeof e&&(null==e?void 0:e.clearIcon)?t=e:e&&(t={clearIcon:import_react79.default.createElement(CloseCircleFilled_default2,null)}),t},getAllowClear_default=getAllowClear;init_globals();var import_react80=__toESM(require_react());function useRemovePasswordTimeout(e,t){const r=(0,import_react80.useRef)([]),n=()=>{r.current.push(setTimeout((()=>{var t,r,n,i;(null===(t=e.current)||void 0===t?void 0:t.input)&&\"password\"===(null===(r=e.current)||void 0===r?void 0:r.input.getAttribute(\"type\"))&&(null===(n=e.current)||void 0===n?void 0:n.input.hasAttribute(\"value\"))&&(null===(i=e.current)||void 0===i||i.input.removeAttribute(\"value\"))})))};return(0,import_react80.useEffect)((()=>(t&&n(),()=>r.current.forEach((e=>{e&&clearTimeout(e)})))),[]),n}function hasPrefixSuffix2(e){return!!(e.prefix||e.suffix||e.allowClear||e.showCount)}init_globals();var __rest26=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)__left_angle_mark_0&&(r[n]=e[n]);if(null!=e&&\"function\"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i__left_angle_mark_n.length;i++)t.indexOf(n[i])__left_angle_mark_0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r};function triggerFocus2(e,t){if(!e)return;e.focus(t);const{cursor:r}=t||{};if(r){const t=e.value.length;switch(r){case\"start\":e.setSelectionRange(0,0);break;case\"end\":e.setSelectionRange(t,t);break;default:e.setSelectionRange(0,t)}}}var Input2=(0,import_react81.forwardRef)(((e,t)=>{var r;const{prefixCls:n,bordered:i=!0,status:o,size:a,disabled:s,onBlur:l,onFocus:u,suffix:c,allowClear:d,addonAfter:h,addonBefore:f,className:p,style:m,styles:g,rootClassName:_,onChange:b,classNames:y,variant:v}=e,A=__rest26(e,[\"prefixCls\",\"bordered\",\"status\",\"size\",\"disabled\",\"onBlur\",\"onFocus\",\"suffix\",\"allowClear\",\"addonAfter\",\"addonBefore\",\"className\",\"style\",\"styles\",\"rootClassName\",\"onChange\",\"classNames\",\"variant\"]);{const{deprecated:t}=devUseWarning(\"Input\");t(!(\"bordered\"in e),\"bordered\",\"variant\")}const{getPrefixCls:w,direction:S,input:E}=import_react81.default.useContext(ConfigContext),x=w(\"input\",n),C=(0,import_react81.useRef)(null),T=useCSSVarCls_default(x),[R,I,k]=style_default14(x,T),{compactSize:P,compactItemClassnames:M}=useCompactItemContext(x,S),O=useSize_default((e=>{var t;return null!==(t=null!=a?a:P)&&void 0!==t?t:e})),B=import_react81.default.useContext(DisabledContext_default),N=null!=s?s:B,{status:j,hasFeedback:L,feedbackIcon:D}=(0,import_react81.useContext)(FormItemInputContext),F=getMergedStatus(j,o),U=hasPrefixSuffix2(e)||!!L,z=(0,import_react81.useRef)(U);{const e=devUseWarning(\"Input\");(0,import_react81.useEffect)((()=>{var t;U&&!z.current&&e(document.activeElement===(null===(t=C.current)||void 0===t?void 0:t.input),\"usage\",\"When Input is focused, dynamic add or remove prefix / suffix will make it lose focus caused by dom structure change. Read more: https://ant.design/components/input/#FAQ\"),z.current=U}),[U])}const q=useRemovePasswordTimeout(C,!0),G=(L||c)&&import_react81.default.createElement(import_react81.default.Fragment,null,c,L&&D),H=getAllowClear_default(null!=d?d:null==E?void 0:E.allowClear),[W,V]=useVariants_default(\"input\",v,i);return R(import_react81.default.createElement(es_default14,Object.assign({ref:composeRef(t,C),prefixCls:x,autoComplete:null==E?void 0:E.autoComplete},A,{disabled:N,onBlur:e=>{q(),null==l||l(e)},onFocus:e=>{q(),null==u||u(e)},style:Object.assign(Object.assign({},null==E?void 0:E.style),m),styles:Object.assign(Object.assign({},null==E?void 0:E.styles),g),suffix:G,allowClear:H,className:(0,import_classnames76.default)(p,_,k,T,M,null==E?void 0:E.className),onChange:e=>{q(),null==b||b(e)},addonBefore:f&&import_react81.default.createElement(ContextIsolator_default,{form:!0,space:!0},f),addonAfter:h&&import_react81.default.createElement(ContextIsolator_default,{form:!0,space:!0},h),classNames:Object.assign(Object.assign(Object.assign({},y),null==E?void 0:E.classNames),{input:(0,import_classnames76.default)({[`${x}-sm`]:\"small\"===O,[`${x}-lg`]:\"large\"===O,[`${x}-rtl`]:\"rtl\"===S},null==y?void 0:y.input,null===(r=null==E?void 0:E.classNames)||void 0===r?void 0:r.input,I),variant:(0,import_classnames76.default)({[`${x}-${W}`]:V},getStatusClassNames(x,F)),affixWrapper:(0,import_classnames76.default)({[`${x}-affix-wrapper-sm`]:\"small\"===O,[`${x}-affix-wrapper-lg`]:\"large\"===O,[`${x}-affix-wrapper-rtl`]:\"rtl\"===S},I),wrapper:(0,import_classnames76.default)({[`${x}-group-rtl`]:\"rtl\"===S},I),groupWrapper:(0,import_classnames76.default)({[`${x}-group-wrapper-sm`]:\"small\"===O,[`${x}-group-wrapper-lg`]:\"large\"===O,[`${x}-group-wrapper-rtl`]:\"rtl\"===S,[`${x}-group-wrapper-${W}`]:V},getStatusClassNames(`${x}-group-wrapper`,F,L),I)})})))}));Input2.displayName=\"Input\";var Input_default3=Input2;init_globals();var React234=__toESM(require_react()),import_classnames77=__toESM(require_classnames());init_globals();var genOTPStyle=e=>{const{componentCls:t,paddingXS:r}=e;return{[t]:{display:\"inline-flex\",alignItems:\"center\",flexWrap:\"nowrap\",columnGap:r,\"&-rtl\":{direction:\"rtl\"},[`${t}-input`]:{textAlign:\"center\",paddingInline:e.paddingXXS},[`&${t}-sm ${t}-input`]:{paddingInline:e.calc(e.paddingXXS).div(2).equal()},[`&${t}-lg ${t}-input`]:{paddingInline:e.paddingXS}}}},otp_default=genStyleHooks([\"Input\",\"OTP\"],(e=>{const t=merge2(e,initInputToken(e));return[genOTPStyle(t)]}),initComponentToken);init_globals();var React233=__toESM(require_react()),__rest27=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)__left_angle_mark_0&&(r[n]=e[n]);if(null!=e&&\"function\"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i__left_angle_mark_n.length;i++)t.indexOf(n[i])__left_angle_mark_0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r},OTPInput=React233.forwardRef(((e,t)=>{const{value:r,onChange:n,onActiveChange:i,index:o,mask:a}=e,s=__rest27(e,[\"value\",\"onChange\",\"onActiveChange\",\"index\",\"mask\"]),l=r&&\"string\"==typeof a?a:r,u=React233.useRef(null);React233.useImperativeHandle(t,(()=>u.current));const c=()=>{raf_default((()=>{var e;const t=null===(e=u.current)||void 0===e?void 0:e.input;document.activeElement===t&&t&&t.select()}))};return React233.createElement(Input_default3,Object.assign({type:!0===a?\"password\":\"text\"},s,{ref:u,value:l,onInput:e=>{n(o,e.target.value)},onFocus:c,onKeyDown:e=>{let{key:t}=e;\"ArrowLeft\"===t?i(o-1):\"ArrowRight\"===t&&i(o+1),c()},onKeyUp:e=>{\"Backspace\"!==e.key||r||i(o-1),c()},onMouseDown:c,onMouseUp:c}))})),OTPInput_default=OTPInput,__rest28=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)__left_angle_mark_0&&(r[n]=e[n]);if(null!=e&&\"function\"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i__left_angle_mark_n.length;i++)t.indexOf(n[i])__left_angle_mark_0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r};function strToArr(e){return(e||\"\").split(\"\")}var OTP=React234.forwardRef(((e,t)=>{const{prefixCls:r,length:n=6,size:i,defaultValue:o,value:a,onChange:s,formatter:l,variant:u,disabled:c,status:d,autoFocus:h,mask:f,type:p}=e,m=__rest28(e,[\"prefixCls\",\"length\",\"size\",\"defaultValue\",\"value\",\"onChange\",\"formatter\",\"variant\",\"disabled\",\"status\",\"autoFocus\",\"mask\",\"type\"]);devUseWarning(\"Input.OTP\")(!(\"string\"==typeof f&&f.length>1),\"usage\",\"`mask` prop should be a single character.\");const{getPrefixCls:g,direction:_}=React234.useContext(ConfigContext),b=g(\"otp\",r),y=pickAttrs(m,{aria:!0,data:!0,attr:!0}),v=useCSSVarCls_default(b),[A,w,S]=otp_default(b,v),E=useSize_default((e=>null!=i?i:e)),x=React234.useContext(FormItemInputContext),C=getMergedStatus(x.status,d),T=React234.useMemo((()=>Object.assign(Object.assign({},x),{status:C,hasFeedback:!1,feedbackIcon:null})),[x,C]),R=React234.useRef(null),I=React234.useRef({});React234.useImperativeHandle(t,(()=>({focus:()=>{var e;null===(e=I.current[0])||void 0===e||e.focus()},blur:()=>{var e;for(let t=0;t__left_angle_mark_n;t+=1)null===(e=I.current[t])||void 0===e||e.blur()},nativeElement:R.current})));const k=e=>l?l(e):e,[P,M]=React234.useState(strToArr(k(o||\"\")));React234.useEffect((()=>{void 0!==a&&M(strToArr(a))}),[a]);const O=useEvent((e=>{M(e),s&&e.length===n&&e.every((e=>e))&&e.some(((e,t)=>P[t]!==e))&&s(e.join(\"\"))})),B=useEvent(((e,t)=>{let r=_toConsumableArray(P);for(let n=0;n__left_angle_mark_e;n+=1)r[n]||(r[n]=\"\");t.length__left_angle_mark_=1?r[e]=t:r=r.slice(0,e).concat(strToArr(t)),r=r.slice(0,n);for(let n=r.length-1;n>=0&&!r[n];n-=1)r.pop();const i=k(r.map((e=>e||\" \")).join(\"\"));return r=strToArr(i).map(((e,t)=>\" \"!==e||r[t]?e:r[t])),r})),N=(e,t)=>{var r;const i=B(e,t),o=Math.min(e+t.length,n-1);o!==e&&(null===(r=I.current[o])||void 0===r||r.focus()),O(i)},j=e=>{var t;null===(t=I.current[e])||void 0===t||t.focus()},L={variant:u,disabled:c,status:C,mask:f,type:p};return A(React234.createElement(\"div\",Object.assign({},y,{ref:R,className:(0,import_classnames77.default)(b,{[`${b}-sm`]:\"small\"===E,[`${b}-lg`]:\"large\"===E,[`${b}-rtl`]:\"rtl\"===_},S,w)}),React234.createElement(FormItemInputContext.Provider,{value:T},Array.from({length:n}).map(((e,t)=>{const r=`otp-${t}`,n=P[t]||\"\";return React234.createElement(OTPInput_default,Object.assign({ref:e=>{I.current[t]=e},key:r,index:t,size:E,htmlSize:1,className:`${b}-input`,onChange:N,value:n,onActiveChange:j,autoFocus:0===t&&h},L))})))))})),OTP_default=OTP;init_globals();var React237=__toESM(require_react()),import_react82=__toESM(require_react());init_globals();var React235=__toESM(require_react()),EyeInvisibleOutlined2=function(e,t){return React235.createElement(AntdIcon_default2,_extends({},e,{ref:t,icon:EyeInvisibleOutlined_default}))},RefIcon32=React235.forwardRef(EyeInvisibleOutlined2);RefIcon32.displayName=\"EyeInvisibleOutlined\";var EyeInvisibleOutlined_default2=RefIcon32;init_globals();var React236=__toESM(require_react()),EyeOutlined2=function(e,t){return React236.createElement(AntdIcon_default2,_extends({},e,{ref:t,icon:EyeOutlined_default}))},RefIcon33=React236.forwardRef(EyeOutlined2);RefIcon33.displayName=\"EyeOutlined\";var EyeOutlined_default2=RefIcon33,import_classnames78=__toESM(require_classnames()),__rest29=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)__left_angle_mark_0&&(r[n]=e[n]);if(null!=e&&\"function\"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i__left_angle_mark_n.length;i++)t.indexOf(n[i])__left_angle_mark_0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r},defaultIconRender=e=>e?React237.createElement(EyeOutlined_default2,null):React237.createElement(EyeInvisibleOutlined_default2,null),actionMap={click:\"onClick\",hover:\"onMouseOver\"},Password=React237.forwardRef(((e,t)=>{const{disabled:r,action:n=\"click\",visibilityToggle:i=!0,iconRender:o=defaultIconRender}=e,a=React237.useContext(DisabledContext_default),s=null!=r?r:a,l=\"object\"==typeof i&&void 0!==i.visible,[u,c]=(0,import_react82.useState)((()=>!!l&&i.visible)),d=(0,import_react82.useRef)(null);React237.useEffect((()=>{l&&c(i.visible)}),[l,i]);const h=useRemovePasswordTimeout(d),f=()=>{s||(u&&h(),c((e=>{var t;const r=!e;return\"object\"==typeof i&&(null===(t=i.onVisibleChange)||void 0===t||t.call(i,r)),r})))},{className:p,prefixCls:m,inputPrefixCls:g,size:_}=e,b=__rest29(e,[\"className\",\"prefixCls\",\"inputPrefixCls\",\"size\"]),{getPrefixCls:y}=React237.useContext(ConfigContext),v=y(\"input\",g),A=y(\"input-password\",m),w=i&&(e=>{const t=actionMap[n]||\"\",r=o(u),i={[t]:f,className:`${e}-icon`,key:\"passwordIcon\",onMouseDown:e=>{e.preventDefault()},onMouseUp:e=>{e.preventDefault()}};return React237.cloneElement(React237.isValidElement(r)?r:React237.createElement(\"span\",null,r),i)})(A),S=(0,import_classnames78.default)(A,p,{[`${A}-${_}`]:!!_}),E=Object.assign(Object.assign({},omit(b,[\"suffix\",\"iconRender\",\"visibilityToggle\"])),{type:u?\"text\":\"password\",className:S,prefixCls:v,suffix:w});return _&&(E.size=_),React237.createElement(Input_default3,Object.assign({ref:composeRef(t,d)},E))}));Password.displayName=\"Input.Password\";var Password_default=Password;init_globals();var React238=__toESM(require_react()),import_classnames79=__toESM(require_classnames()),__rest30=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)__left_angle_mark_0&&(r[n]=e[n]);if(null!=e&&\"function\"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i__left_angle_mark_n.length;i++)t.indexOf(n[i])__left_angle_mark_0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r},Search=React238.forwardRef(((e,t)=>{const{prefixCls:r,inputPrefixCls:n,className:i,size:o,suffix:a,enterButton:s=!1,addonAfter:l,loading:u,disabled:c,onSearch:d,onChange:h,onCompositionStart:f,onCompositionEnd:p}=e,m=__rest30(e,[\"prefixCls\",\"inputPrefixCls\",\"className\",\"size\",\"suffix\",\"enterButton\",\"addonAfter\",\"loading\",\"disabled\",\"onSearch\",\"onChange\",\"onCompositionStart\",\"onCompositionEnd\"]),{getPrefixCls:g,direction:_}=React238.useContext(ConfigContext),b=React238.useRef(!1),y=g(\"input-search\",r),v=g(\"input\",n),{compactSize:A}=useCompactItemContext(y,_),w=useSize_default((e=>{var t;return null!==(t=null!=o?o:A)&&void 0!==t?t:e})),S=React238.useRef(null),E=e=>{var t;document.activeElement===(null===(t=S.current)||void 0===t?void 0:t.input)&&e.preventDefault()},x=e=>{var t,r;d&&d(null===(r=null===(t=S.current)||void 0===t?void 0:t.input)||void 0===r?void 0:r.value,e,{source:\"input\"})},C=\"boolean\"==typeof s?React238.createElement(SearchOutlined_default2,null):null,T=`${y}-button`;let R;const I=s||{},k=I.type&&!0===I.type.__ANT_BUTTON;R=k||\"button\"===I.type?cloneElement3(I,Object.assign({onMouseDown:E,onClick:e=>{var t,r;null===(r=null===(t=null==I?void 0:I.props)||void 0===t?void 0:t.onClick)||void 0===r||r.call(t,e),x(e)},key:\"enterButton\"},k?{className:T,size:w}:{})):React238.createElement(button_default2,{className:T,type:s?\"primary\":void 0,size:w,disabled:c,key:\"enterButton\",onMouseDown:E,onClick:x,loading:u,icon:C},s),l&&(R=[R,cloneElement3(l,{key:\"addonAfter\"})]);const P=(0,import_classnames79.default)(y,{[`${y}-rtl`]:\"rtl\"===_,[`${y}-${w}`]:!!w,[`${y}-with-button`]:!!s},i);return React238.createElement(Input_default3,Object.assign({ref:composeRef(S,t),onPressEnter:e=>{b.current||u||x(e)}},m,{size:w,onCompositionStart:e=>{b.current=!0,null==f||f(e)},onCompositionEnd:e=>{b.current=!1,null==p||p(e)},prefixCls:v,addonAfter:R,suffix:a,onChange:e=>{(null==e?void 0:e.target)&&\"click\"===e.type&&d&&d(e.target.value,e,{source:\"clear\"}),null==h||h(e)},className:P,disabled:c}))}));Search.displayName=\"Search\";var Search_default=Search;init_globals();var React241=__toESM(require_react()),import_react84=__toESM(require_react()),import_classnames82=__toESM(require_classnames());init_globals(),init_globals();var import_classnames81=__toESM(require_classnames()),import_react83=__toESM(require_react());init_globals();var import_classnames80=__toESM(require_classnames()),React239=__toESM(require_react());init_globals();var HIDDEN_TEXTAREA_STYLE=\"\\n min-height:0 !important;\\n max-height:none !important;\\n height:0 !important;\\n visibility:hidden !important;\\n overflow:hidden !important;\\n position:absolute !important;\\n z-index:-1000 !important;\\n top:0 !important;\\n right:0 !important;\\n pointer-events: none !important;\\n\",SIZING_STYLE=[\"letter-spacing\",\"line-height\",\"padding-top\",\"padding-bottom\",\"font-family\",\"font-weight\",\"font-size\",\"font-variant\",\"text-rendering\",\"text-transform\",\"width\",\"text-indent\",\"padding-left\",\"padding-right\",\"border-width\",\"box-sizing\",\"word-break\",\"white-space\"],computedStyleCache={},hiddenTextarea;function calculateNodeStyling(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=e.getAttribute(\"id\")||e.getAttribute(\"data-reactid\")||e.getAttribute(\"name\");if(t&&computedStyleCache[r])return computedStyleCache[r];var n=window.getComputedStyle(e),i=n.getPropertyValue(\"box-sizing\")||n.getPropertyValue(\"-moz-box-sizing\")||n.getPropertyValue(\"-webkit-box-sizing\"),o=parseFloat(n.getPropertyValue(\"padding-bottom\"))+parseFloat(n.getPropertyValue(\"padding-top\")),a=parseFloat(n.getPropertyValue(\"border-bottom-width\"))+parseFloat(n.getPropertyValue(\"border-top-width\")),s={sizingStyle:SIZING_STYLE.map((function(e){return\"\".concat(e,\":\").concat(n.getPropertyValue(e))})).join(\";\"),paddingSize:o,borderSize:a,boxSizing:i};return t&&r&&(computedStyleCache[r]=s),s}function calculateAutoSizeStyle(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;hiddenTextarea||((hiddenTextarea=document.createElement(\"textarea\")).setAttribute(\"tab-index\",\"-1\"),hiddenTextarea.setAttribute(\"aria-hidden\",\"true\"),hiddenTextarea.setAttribute(\"name\",\"hiddenTextarea\"),document.body.appendChild(hiddenTextarea)),e.getAttribute(\"wrap\")?hiddenTextarea.setAttribute(\"wrap\",e.getAttribute(\"wrap\")):hiddenTextarea.removeAttribute(\"wrap\");var i=calculateNodeStyling(e,t),o=i.paddingSize,a=i.borderSize,s=i.boxSizing,l=i.sizingStyle;hiddenTextarea.setAttribute(\"style\",\"\".concat(l,\";\").concat(HIDDEN_TEXTAREA_STYLE)),hiddenTextarea.value=e.value||e.placeholder||\"\";var u,c=void 0,d=void 0,h=hiddenTextarea.scrollHeight;if(\"border-box\"===s?h+=a:\"content-box\"===s&&(h-=o),null!==r||null!==n){hiddenTextarea.value=\" \";var f=hiddenTextarea.scrollHeight-o;null!==r&&(c=f*r,\"border-box\"===s&&(c=c+o+a),h=Math.max(c,h)),null!==n&&(d=f*n,\"border-box\"===s&&(d=d+o+a),u=h>d?\"\":\"hidden\",h=Math.min(d,h))}var p={height:h,overflowY:u,resize:\"none\"};return c&&(p.minHeight=c),d&&(p.maxHeight=d),p}var _excluded38=[\"prefixCls\",\"defaultValue\",\"value\",\"autoSize\",\"onResize\",\"className\",\"style\",\"disabled\",\"onChange\",\"onInternalAutoSize\"],RESIZE_START=0,RESIZE_MEASURING=1,RESIZE_STABLE=2,ResizableTextArea=React239.forwardRef((function(e,t){var r=e,n=r.prefixCls,i=r.defaultValue,o=r.value,a=r.autoSize,s=r.onResize,l=r.className,u=r.style,c=r.disabled,d=r.onChange,h=(r.onInternalAutoSize,_objectWithoutProperties(r,_excluded38)),f=_slicedToArray(useMergedState(i,{value:o,postState:function(e){return null!=e?e:\"\"}}),2),p=f[0],m=f[1],g=React239.useRef();React239.useImperativeHandle(t,(function(){return{textArea:g.current}}));var _=_slicedToArray(React239.useMemo((function(){return a&&\"object\"===_typeof(a)?[a.minRows,a.maxRows]:[]}),[a]),2),b=_[0],y=_[1],v=!!a,A=_slicedToArray(React239.useState(RESIZE_STABLE),2),w=A[0],S=A[1],E=_slicedToArray(React239.useState(),2),x=E[0],C=E[1],T=function(){S(RESIZE_START)};useLayoutEffect_default((function(){v&&T()}),[o,b,y,v]),useLayoutEffect_default((function(){if(w===RESIZE_START)S(RESIZE_MEASURING);else if(w===RESIZE_MEASURING){var e=calculateAutoSizeStyle(g.current,!1,b,y);S(RESIZE_STABLE),C(e)}else!function(){try{if(document.activeElement===g.current){var e=g.current,t=e.selectionStart,r=e.selectionEnd,n=e.scrollTop;g.current.setSelectionRange(t,r),g.current.scrollTop=n}}catch(e4){}}()}),[w]);var R=React239.useRef(),I=function(){raf_default.cancel(R.current)};React239.useEffect((function(){return I}),[]);var k=v?x:null,P=_objectSpread2(_objectSpread2({},u),k);return w!==RESIZE_START&&w!==RESIZE_MEASURING||(P.overflowY=\"hidden\",P.overflowX=\"hidden\"),React239.createElement(es_default,{onResize:function(e){w===RESIZE_STABLE&&(null==s||s(e),a&&(I(),R.current=raf_default((function(){T()}))))},disabled:!(a||s)},React239.createElement(\"textarea\",_extends({},h,{ref:g,style:P,className:(0,import_classnames80.default)(n,l,_defineProperty({},\"\".concat(n,\"-disabled\"),c)),disabled:c,value:p,onChange:function(e){m(e.target.value),null==d||d(e)}})))})),ResizableTextArea_default=ResizableTextArea,_excluded39=[\"defaultValue\",\"value\",\"onFocus\",\"onBlur\",\"onChange\",\"allowClear\",\"maxLength\",\"onCompositionStart\",\"onCompositionEnd\",\"suffix\",\"prefixCls\",\"showCount\",\"count\",\"className\",\"style\",\"disabled\",\"hidden\",\"classNames\",\"styles\",\"onResize\",\"onClear\",\"onPressEnter\",\"readOnly\",\"autoSize\",\"onKeyDown\"],TextArea=import_react83.default.forwardRef((function(e,t){var r,n=e.defaultValue,i=e.value,o=e.onFocus,a=e.onBlur,s=e.onChange,l=e.allowClear,u=e.maxLength,c=e.onCompositionStart,d=e.onCompositionEnd,h=e.suffix,f=e.prefixCls,p=void 0===f?\"rc-textarea\":f,m=e.showCount,g=e.count,_=e.className,b=e.style,y=e.disabled,v=e.hidden,A=e.classNames,w=e.styles,S=e.onResize,E=e.onClear,x=e.onPressEnter,C=e.readOnly,T=e.autoSize,R=e.onKeyDown,I=_objectWithoutProperties(e,_excluded39),k=_slicedToArray(useMergedState(n,{value:i,defaultValue:n}),2),P=k[0],M=k[1],O=null==P?\"\":String(P),B=_slicedToArray(import_react83.default.useState(!1),2),N=B[0],j=B[1],L=import_react83.default.useRef(!1),D=_slicedToArray(import_react83.default.useState(null),2),F=D[0],U=D[1],z=(0,import_react83.useRef)(null),q=(0,import_react83.useRef)(null),G=function(){var e;return null===(e=q.current)||void 0===e?void 0:e.textArea},H=function(){G().focus()};(0,import_react83.useImperativeHandle)(t,(function(){var e;return{resizableTextArea:q.current,focus:H,blur:function(){G().blur()},nativeElement:(null===(e=z.current)||void 0===e?void 0:e.nativeElement)||G()}})),(0,import_react83.useEffect)((function(){j((function(e){return!y&&e}))}),[y]);var W=_slicedToArray(import_react83.default.useState(null),2),V=W[0],$=W[1];import_react83.default.useEffect((function(){var e;V&&(e=G()).setSelectionRange.apply(e,_toConsumableArray(V))}),[V]);var K,X=useCount(g,m),Y=null!==(r=X.max)&&void 0!==r?r:u,J=Number(Y)>0,Q=X.strategy(O),Z=!!Y&&Q>Y,ee=function(e,t){var r=t;!L.current&&X.exceedFormatter&&X.max&&X.strategy(t)>X.max&&t!==(r=X.exceedFormatter(t,{max:X.max}))&&$([G().selectionStart||0,G().selectionEnd||0]),M(r),resolveOnChange(e.currentTarget,e,s,r)},te=h;X.show&&(K=X.showFormatter?X.showFormatter({value:O,count:Q,maxLength:Y}):\"\".concat(Q).concat(J?\" / \".concat(Y):\"\"),te=import_react83.default.createElement(import_react83.default.Fragment,null,te,import_react83.default.createElement(\"span\",{className:(0,import_classnames81.default)(\"\".concat(p,\"-data-count\"),null==A?void 0:A.count),style:null==w?void 0:w.count},K)));var re=!T&&!m&&!l;return import_react83.default.createElement(BaseInput_default,{ref:z,value:O,allowClear:l,handleReset:function(e){M(\"\"),H(),resolveOnChange(G(),e,s)},suffix:te,prefixCls:p,classNames:_objectSpread2(_objectSpread2({},A),{},{affixWrapper:(0,import_classnames81.default)(null==A?void 0:A.affixWrapper,_defineProperty(_defineProperty({},\"\".concat(p,\"-show-count\"),m),\"\".concat(p,\"-textarea-allow-clear\"),l))}),disabled:y,focused:N,className:(0,import_classnames81.default)(_,Z&&\"\".concat(p,\"-out-of-range\")),style:_objectSpread2(_objectSpread2({},b),F&&!re?{height:\"auto\"}:{}),dataAttrs:{affixWrapper:{\"data-count\":\"string\"==typeof K?K:void 0}},hidden:v,readOnly:C,onClear:E},import_react83.default.createElement(ResizableTextArea_default,_extends({},I,{autoSize:T,maxLength:u,onKeyDown:function(e){\"Enter\"===e.key&&x&&x(e),null==R||R(e)},onChange:function(e){ee(e,e.target.value)},onFocus:function(e){j(!0),null==o||o(e)},onBlur:function(e){j(!1),null==a||a(e)},onCompositionStart:function(e){L.current=!0,null==c||c(e)},onCompositionEnd:function(e){L.current=!1,ee(e,e.currentTarget.value),null==d||d(e)},className:(0,import_classnames81.default)(null==A?void 0:A.textarea),style:_objectSpread2(_objectSpread2({},null==w?void 0:w.textarea),{},{resize:null==b?void 0:b.resize}),disabled:y,prefixCls:p,onResize:function(e){var t;null==S||S(e),null!==(t=G())&&void 0!==t&&t.style.height&&U(!0)},ref:q,readOnly:C})))})),TextArea_default=TextArea,es_default15=TextArea_default,__rest31=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)__left_angle_mark_0&&(r[n]=e[n]);if(null!=e&&\"function\"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i__left_angle_mark_n.length;i++)t.indexOf(n[i])__left_angle_mark_0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r},TextArea2=(0,import_react84.forwardRef)(((e,t)=>{var r,n;const{prefixCls:i,bordered:o=!0,size:a,disabled:s,status:l,allowClear:u,classNames:c,rootClassName:d,className:h,style:f,styles:p,variant:m}=e,g=__rest31(e,[\"prefixCls\",\"bordered\",\"size\",\"disabled\",\"status\",\"allowClear\",\"classNames\",\"rootClassName\",\"className\",\"style\",\"styles\",\"variant\"]);{const{deprecated:t}=devUseWarning(\"TextArea\");t(!(\"bordered\"in e),\"bordered\",\"variant\")}const{getPrefixCls:_,direction:b,textArea:y}=React241.useContext(ConfigContext),v=useSize_default(a),A=React241.useContext(DisabledContext_default),w=null!=s?s:A,{status:S,hasFeedback:E,feedbackIcon:x}=React241.useContext(FormItemInputContext),C=getMergedStatus(S,l),T=React241.useRef(null);React241.useImperativeHandle(t,(()=>{var e;return{resizableTextArea:null===(e=T.current)||void 0===e?void 0:e.resizableTextArea,focus:e=>{var t,r;triggerFocus2(null===(r=null===(t=T.current)||void 0===t?void 0:t.resizableTextArea)||void 0===r?void 0:r.textArea,e)},blur:()=>{var e;return null===(e=T.current)||void 0===e?void 0:e.blur()}}}));const R=_(\"input\",i),I=useCSSVarCls_default(R),[k,P,M]=style_default14(R,I),[O,B]=useVariants_default(\"textArea\",m,o),N=getAllowClear_default(null!=u?u:null==y?void 0:y.allowClear);return k(React241.createElement(es_default15,Object.assign({autoComplete:null==y?void 0:y.autoComplete},g,{style:Object.assign(Object.assign({},null==y?void 0:y.style),f),styles:Object.assign(Object.assign({},null==y?void 0:y.styles),p),disabled:w,allowClear:N,className:(0,import_classnames82.default)(M,I,h,d,null==y?void 0:y.className),classNames:Object.assign(Object.assign(Object.assign({},c),null==y?void 0:y.classNames),{textarea:(0,import_classnames82.default)({[`${R}-sm`]:\"small\"===v,[`${R}-lg`]:\"large\"===v},P,null==c?void 0:c.textarea,null===(r=null==y?void 0:y.classNames)||void 0===r?void 0:r.textarea),variant:(0,import_classnames82.default)({[`${R}-${O}`]:B},getStatusClassNames(R,C)),affixWrapper:(0,import_classnames82.default)(`${R}-textarea-affix-wrapper`,{[`${R}-affix-wrapper-rtl`]:\"rtl\"===b,[`${R}-affix-wrapper-sm`]:\"small\"===v,[`${R}-affix-wrapper-lg`]:\"large\"===v,[`${R}-textarea-show-count`]:e.showCount||(null===(n=e.count)||void 0===n?void 0:n.show)},P)}),prefixCls:R,suffix:E&&React241.createElement(\"span\",{className:`${R}-textarea-suffix`},x),ref:T})))})),TextArea_default2=TextArea2,Input3=Input_default3;Input3.Group=Group_default2,Input3.Search=Search_default,Input3.TextArea=TextArea_default2,Input3.Password=Password_default,Input3.OTP=OTP_default;var input_default=Input3;init_globals();var React247=__toESM(require_react()),import_classnames86=__toESM(require_classnames());init_globals(),init_globals();var React245=__toESM(require_react());init_globals();var React242=__toESM(require_react()),DrawerContext=React242.createContext(null),RefContext2=React242.createContext({}),context_default4=DrawerContext;init_globals();var import_classnames84=__toESM(require_classnames()),React244=__toESM(require_react());init_globals();var import_classnames83=__toESM(require_classnames()),React243=__toESM(require_react()),_excluded40=[\"prefixCls\",\"className\",\"containerRef\"],DrawerPanel=function(e){var t=e.prefixCls,r=e.className,n=e.containerRef,i=_objectWithoutProperties(e,_excluded40),o=React243.useContext(RefContext2).panel,a=useComposeRef(o,n);return React243.createElement(\"div\",_extends({className:(0,import_classnames83.default)(\"\".concat(t,\"-content\"),r),role:\"dialog\",ref:a},pickAttrs(e,{aria:!0}),{\"aria-modal\":\"true\"},i))};DrawerPanel.displayName=\"DrawerPanel\";var DrawerPanel_default=DrawerPanel;function parseWidthHeight(e){return\"string\"==typeof e&&String(Number(e))===e?(warning_default(!1,\"Invalid value type of `width` or `height` which should be number type instead.\"),Number(e)):e}function warnCheck(e){warning_default(!(\"wrapperClassName\"in e),\"'wrapperClassName' is removed. Please use 'rootClassName' instead.\"),warning_default(canUseDom()||!e.open,\"Drawer with 'open' in SSR is not work since no place to createPortal. Please move to 'useEffect' instead.\")}init_globals();var sentinelStyle2={width:0,height:0,overflow:\"hidden\",outline:\"none\",position:\"absolute\"};function DrawerPopup(e,t){var r,n,i,o=e.prefixCls,a=e.open,s=e.placement,l=e.inline,u=e.push,c=e.forceRender,d=e.autoFocus,h=e.keyboard,f=e.classNames,p=e.rootClassName,m=e.rootStyle,g=e.zIndex,_=e.className,b=e.id,y=e.style,v=e.motion,A=e.width,w=e.height,S=e.children,E=e.mask,x=e.maskClosable,C=e.maskMotion,T=e.maskClassName,R=e.maskStyle,I=e.afterOpenChange,k=e.onClose,P=e.onMouseEnter,M=e.onMouseOver,O=e.onMouseLeave,B=e.onClick,N=e.onKeyDown,j=e.onKeyUp,L=e.styles,D=e.drawerRender,F=React244.useRef(),U=React244.useRef(),z=React244.useRef();React244.useImperativeHandle(t,(function(){return F.current})),React244.useEffect((function(){var e;a&&d&&(null===(e=F.current)||void 0===e||e.focus({preventScroll:!0}))}),[a]);var q=_slicedToArray(React244.useState(!1),2),G=q[0],H=q[1],W=React244.useContext(context_default4),V=null!==(r=null!==(n=null===(i=\"boolean\"==typeof u?u?{}:{distance:0}:u||{})||void 0===i?void 0:i.distance)&&void 0!==n?n:null==W?void 0:W.pushDistance)&&void 0!==r?r:180,$=React244.useMemo((function(){return{pushDistance:V,push:function(){H(!0)},pull:function(){H(!1)}}}),[V]);React244.useEffect((function(){var e,t;a?null==W||null===(e=W.push)||void 0===e||e.call(W):null==W||null===(t=W.pull)||void 0===t||t.call(W)}),[a]),React244.useEffect((function(){return function(){var e;null==W||null===(e=W.pull)||void 0===e||e.call(W)}}),[]);var K=E&&React244.createElement(es_default2,_extends({key:\"mask\"},C,{visible:a}),(function(e,t){var r=e.className,n=e.style;return React244.createElement(\"div\",{className:(0,import_classnames84.default)(\"\".concat(o,\"-mask\"),r,null==f?void 0:f.mask,T),style:_objectSpread2(_objectSpread2(_objectSpread2({},n),R),null==L?void 0:L.mask),onClick:x&&a?k:void 0,ref:t})})),X=\"function\"==typeof v?v(s):v,Y={};if(G&&V)switch(s){case\"top\":Y.transform=\"translateY(\".concat(V,\"px)\");break;case\"bottom\":Y.transform=\"translateY(\".concat(-V,\"px)\");break;case\"left\":Y.transform=\"translateX(\".concat(V,\"px)\");break;default:Y.transform=\"translateX(\".concat(-V,\"px)\")}\"left\"===s||\"right\"===s?Y.width=parseWidthHeight(A):Y.height=parseWidthHeight(w);var J={onMouseEnter:P,onMouseOver:M,onMouseLeave:O,onClick:B,onKeyDown:N,onKeyUp:j},Q=React244.createElement(es_default2,_extends({key:\"panel\"},X,{visible:a,forceRender:c,onVisibleChanged:function(e){null==I||I(e)},removeOnLeave:!1,leavedClassName:\"\".concat(o,\"-content-wrapper-hidden\")}),(function(t,r){var n=t.className,i=t.style,a=React244.createElement(DrawerPanel_default,_extends({id:b,containerRef:r,prefixCls:o,className:(0,import_classnames84.default)(_,null==f?void 0:f.content),style:_objectSpread2(_objectSpread2({},y),null==L?void 0:L.content)},pickAttrs(e,{aria:!0}),J),S);return React244.createElement(\"div\",_extends({className:(0,import_classnames84.default)(\"\".concat(o,\"-content-wrapper\"),null==f?void 0:f.wrapper,n),style:_objectSpread2(_objectSpread2(_objectSpread2({},Y),i),null==L?void 0:L.wrapper)},pickAttrs(e,{data:!0})),D?D(a):a)})),Z=_objectSpread2({},m);return g&&(Z.zIndex=g),React244.createElement(context_default4.Provider,{value:$},React244.createElement(\"div\",{className:(0,import_classnames84.default)(o,\"\".concat(o,\"-\").concat(s),p,_defineProperty(_defineProperty({},\"\".concat(o,\"-open\"),a),\"\".concat(o,\"-inline\"),l)),style:Z,tabIndex:-1,ref:F,onKeyDown:function(e){var t=e.keyCode,r=e.shiftKey;switch(t){case KeyCode_default.TAB:var n;if(t===KeyCode_default.TAB)if(r||document.activeElement!==z.current){if(r&&document.activeElement===U.current){var i;null===(i=z.current)||void 0===i||i.focus({preventScroll:!0})}}else null===(n=U.current)||void 0===n||n.focus({preventScroll:!0});break;case KeyCode_default.ESC:k&&h&&(e.stopPropagation(),k(e))}}},K,React244.createElement(\"div\",{tabIndex:0,ref:U,style:sentinelStyle2,\"aria-hidden\":\"true\",\"data-sentinel\":\"start\"}),Q,React244.createElement(\"div\",{tabIndex:0,ref:z,style:sentinelStyle2,\"aria-hidden\":\"true\",\"data-sentinel\":\"end\"})))}var RefDrawerPopup=React244.forwardRef(DrawerPopup);RefDrawerPopup.displayName=\"DrawerPopup\";var DrawerPopup_default=RefDrawerPopup,Drawer=function(e){var t=e.open,r=void 0!==t&&t,n=e.prefixCls,i=void 0===n?\"rc-drawer\":n,o=e.placement,a=void 0===o?\"right\":o,s=e.autoFocus,l=void 0===s||s,u=e.keyboard,c=void 0===u||u,d=e.width,h=void 0===d?378:d,f=e.mask,p=void 0===f||f,m=e.maskClosable,g=void 0===m||m,_=e.getContainer,b=e.forceRender,y=e.afterOpenChange,v=e.destroyOnClose,A=e.onMouseEnter,w=e.onMouseOver,S=e.onMouseLeave,E=e.onClick,x=e.onKeyDown,C=e.onKeyUp,T=e.panelRef,R=_slicedToArray(React245.useState(!1),2),I=R[0],k=R[1];warnCheck(e);var P=_slicedToArray(React245.useState(!1),2),M=P[0],O=P[1];useLayoutEffect_default((function(){O(!0)}),[]);var B=!!M&&r,N=React245.useRef(),j=React245.useRef();useLayoutEffect_default((function(){B&&(j.current=document.activeElement)}),[B]);var L=React245.useMemo((function(){return{panel:T}}),[T]);if(!b&&!I&&!B&&v)return null;var D={onMouseEnter:A,onMouseOver:w,onMouseLeave:S,onClick:E,onKeyDown:x,onKeyUp:C},F=_objectSpread2(_objectSpread2({},e),{},{open:B,prefixCls:i,placement:a,autoFocus:l,keyboard:c,width:h,mask:p,maskClosable:g,inline:!1===_,afterOpenChange:function(e){var t,r;k(e),null==y||y(e),e||!j.current||null!==(t=N.current)&&void 0!==t&&t.contains(j.current)||null===(r=j.current)||void 0===r||r.focus({preventScroll:!0})},ref:N},D);return React245.createElement(RefContext2.Provider,{value:L},React245.createElement(es_default3,{open:B||b||I,autoDestroy:!1,getContainer:_,autoLock:p&&(B||I)},React245.createElement(DrawerPopup_default,F)))};Drawer.displayName=\"Drawer\";var Drawer_default=Drawer,es_default16=Drawer_default;init_globals();var React246=__toESM(require_react()),import_classnames85=__toESM(require_classnames()),DrawerPanel3=e=>{var t,r;const{prefixCls:n,title:i,footer:o,extra:a,loading:s,onClose:l,headerStyle:u,bodyStyle:c,footerStyle:d,children:h,classNames:f,styles:p}=e,{drawer:m}=React246.useContext(ConfigContext),g=React246.useCallback((e=>React246.createElement(\"button\",{type:\"button\",onClick:l,\"aria-label\":\"Close\",className:`${n}-close`},e)),[l]),[_,b]=useClosable(pickClosable(e),pickClosable(m),{closable:!0,closeIconRender:g}),y=React246.useMemo((()=>{var e,t;return i||_?React246.createElement(\"div\",{style:Object.assign(Object.assign(Object.assign({},null===(e=null==m?void 0:m.styles)||void 0===e?void 0:e.header),u),null==p?void 0:p.header),className:(0,import_classnames85.default)(`${n}-header`,{[`${n}-header-close-only`]:_&&!i&&!a},null===(t=null==m?void 0:m.classNames)||void 0===t?void 0:t.header,null==f?void 0:f.header)},React246.createElement(\"div\",{className:`${n}-header-title`},b,i&&React246.createElement(\"div\",{className:`${n}-title`},i)),a&&React246.createElement(\"div\",{className:`${n}-extra`},a)):null}),[_,b,a,u,n,i]),v=React246.useMemo((()=>{var e,t;if(!o)return null;const r=`${n}-footer`;return React246.createElement(\"div\",{className:(0,import_classnames85.default)(r,null===(e=null==m?void 0:m.classNames)||void 0===e?void 0:e.footer,null==f?void 0:f.footer),style:Object.assign(Object.assign(Object.assign({},null===(t=null==m?void 0:m.styles)||void 0===t?void 0:t.footer),d),null==p?void 0:p.footer)},o)}),[o,d,n]);return React246.createElement(React246.Fragment,null,y,React246.createElement(\"div\",{className:(0,import_classnames85.default)(`${n}-body`,null==f?void 0:f.body,null===(t=null==m?void 0:m.classNames)||void 0===t?void 0:t.body),style:Object.assign(Object.assign(Object.assign({},null===(r=null==m?void 0:m.styles)||void 0===r?void 0:r.body),c),null==p?void 0:p.body)},s?React246.createElement(skeleton_default,{active:!0,title:!1,paragraph:{rows:5},className:`${n}-body-skeleton`}):h),v)},DrawerPanel_default2=DrawerPanel3;init_globals(),init_globals();var getMoveTranslate=e=>{const t=\"100%\";return{left:`translateX(-${t})`,right:`translateX(${t})`,top:`translateY(-${t})`,bottom:`translateY(${t})`}[e]},getEnterLeaveStyle=(e,t)=>({\"&-enter, &-appear\":Object.assign(Object.assign({},e),{\"&-active\":t}),\"&-leave\":Object.assign(Object.assign({},t),{\"&-active\":e})}),getFadeStyle=(e,t)=>Object.assign({\"&-enter, &-appear, &-leave\":{\"&-start\":{transition:\"none\"},\"&-active\":{transition:`all ${t}`}}},getEnterLeaveStyle({opacity:e},{opacity:1})),getPanelMotionStyles=(e,t)=>[getFadeStyle(.7,t),getEnterLeaveStyle({transform:getMoveTranslate(e)},{transform:\"none\"})],genMotionStyle=e=>{const{componentCls:t,motionDurationSlow:r}=e;return{[t]:{[`${t}-mask-motion`]:getFadeStyle(0,r),[`${t}-panel-motion`]:[\"left\",\"right\",\"top\",\"bottom\"].reduce(((e,t)=>Object.assign(Object.assign({},e),{[`&-${t}`]:getPanelMotionStyles(t,r)})),{})}}},motion_default2=genMotionStyle,genDrawerStyle=e=>{const{borderRadiusSM:t,componentCls:r,zIndexPopup:n,colorBgMask:i,colorBgElevated:o,motionDurationSlow:a,motionDurationMid:s,paddingXS:l,padding:u,paddingLG:c,fontSizeLG:d,lineHeightLG:h,lineWidth:f,lineType:p,colorSplit:m,marginXS:g,colorIcon:_,colorIconHover:b,colorBgTextHover:y,colorBgTextActive:v,colorText:A,fontWeightStrong:w,footerPaddingBlock:S,footerPaddingInline:E,calc:x}=e,C=`${r}-content-wrapper`;return{[r]:{position:\"fixed\",inset:0,zIndex:n,pointerEvents:\"none\",color:A,\"&-pure\":{position:\"relative\",background:o,display:\"flex\",flexDirection:\"column\",[`&${r}-left`]:{boxShadow:e.boxShadowDrawerLeft},[`&${r}-right`]:{boxShadow:e.boxShadowDrawerRight},[`&${r}-top`]:{boxShadow:e.boxShadowDrawerUp},[`&${r}-bottom`]:{boxShadow:e.boxShadowDrawerDown}},\"&-inline\":{position:\"absolute\"},[`${r}-mask`]:{position:\"absolute\",inset:0,zIndex:n,background:i,pointerEvents:\"auto\"},[C]:{position:\"absolute\",zIndex:n,maxWidth:\"100vw\",transition:`all ${a}`,\"&-hidden\":{display:\"none\"}},[`&-left > ${C}`]:{top:0,bottom:0,left:{_skip_check_:!0,value:0},boxShadow:e.boxShadowDrawerLeft},[`&-right > ${C}`]:{top:0,right:{_skip_check_:!0,value:0},bottom:0,boxShadow:e.boxShadowDrawerRight},[`&-top > ${C}`]:{top:0,insetInline:0,boxShadow:e.boxShadowDrawerUp},[`&-bottom > ${C}`]:{bottom:0,insetInline:0,boxShadow:e.boxShadowDrawerDown},[`${r}-content`]:{display:\"flex\",flexDirection:\"column\",width:\"100%\",height:\"100%\",overflow:\"auto\",background:o,pointerEvents:\"auto\"},[`${r}-header`]:{display:\"flex\",flex:0,alignItems:\"center\",padding:`${unit(u)} ${unit(c)}`,fontSize:d,lineHeight:h,borderBottom:`${unit(f)} ${p} ${m}`,\"&-title\":{display:\"flex\",flex:1,alignItems:\"center\",minWidth:0,minHeight:0}},[`${r}-extra`]:{flex:\"none\"},[`${r}-close`]:Object.assign({display:\"inline-flex\",width:x(d).add(l).equal(),height:x(d).add(l).equal(),borderRadius:t,justifyContent:\"center\",alignItems:\"center\",marginInlineEnd:g,color:_,fontWeight:w,fontSize:d,fontStyle:\"normal\",lineHeight:1,textAlign:\"center\",textTransform:\"none\",textDecoration:\"none\",background:\"transparent\",border:0,cursor:\"pointer\",transition:`all ${s}`,textRendering:\"auto\",\"&:hover\":{color:b,backgroundColor:y,textDecoration:\"none\"},\"&:active\":{backgroundColor:v}},genFocusStyle(e)),[`${r}-title`]:{flex:1,margin:0,fontWeight:e.fontWeightStrong,fontSize:d,lineHeight:h},[`${r}-body`]:{flex:1,minWidth:0,minHeight:0,padding:c,overflow:\"auto\",[`${r}-body-skeleton`]:{width:\"100%\",height:\"100%\",display:\"flex\",justifyContent:\"center\"}},[`${r}-footer`]:{flexShrink:0,padding:`${unit(S)} ${unit(E)}`,borderTop:`${unit(f)} ${p} ${m}`},\"&-rtl\":{direction:\"rtl\"}}}},prepareComponentToken12=e=>({zIndexPopup:e.zIndexPopupBase,footerPaddingBlock:e.paddingXS,footerPaddingInline:e.padding}),style_default17=genStyleHooks(\"Drawer\",(e=>{const t=merge2(e,{});return[genDrawerStyle(t),motion_default2(t)]}),prepareComponentToken12),__rest32=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)__left_angle_mark_0&&(r[n]=e[n]);if(null!=e&&\"function\"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i__left_angle_mark_n.length;i++)t.indexOf(n[i])__left_angle_mark_0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r},defaultPushState={distance:180},Drawer3=e=>{var t;const{rootClassName:r,width:n,height:i,size:o=\"default\",mask:a=!0,push:s=defaultPushState,open:l,afterOpenChange:u,onClose:c,prefixCls:d,getContainer:h,style:f,className:p,visible:m,afterVisibleChange:g,maskStyle:_,drawerStyle:b,contentWrapperStyle:y}=e,v=__rest32(e,[\"rootClassName\",\"width\",\"height\",\"size\",\"mask\",\"push\",\"open\",\"afterOpenChange\",\"onClose\",\"prefixCls\",\"getContainer\",\"style\",\"className\",\"visible\",\"afterVisibleChange\",\"maskStyle\",\"drawerStyle\",\"contentWrapperStyle\"]),{getPopupContainer:A,getPrefixCls:w,direction:S,drawer:E}=React247.useContext(ConfigContext),x=w(\"drawer\",d),[C,T,R]=style_default17(x),I=void 0===h&&A?()=>A(document.body):h,k=(0,import_classnames86.default)({\"no-mask\":!a,[`${x}-rtl`]:\"rtl\"===S},r,T,R);{const r=devUseWarning(\"Drawer\");[[\"visible\",\"open\"],[\"afterVisibleChange\",\"afterOpenChange\"],[\"headerStyle\",\"styles.header\"],[\"bodyStyle\",\"styles.body\"],[\"footerStyle\",\"styles.footer\"],[\"contentWrapperStyle\",\"styles.wrapper\"],[\"maskStyle\",\"styles.mask\"],[\"drawerStyle\",\"styles.content\"]].forEach((t=>{let[n,i]=t;r.deprecated(!(n in e),n,i)})),void 0!==I&&\"absolute\"===(null===(t=e.style)||void 0===t?void 0:t.position)&&r(!1,\"breaking\",\"`style` is replaced by `rootStyle` in v5. Please check that `position: absolute` is necessary.\")}const P=React247.useMemo((()=>null!=n?n:\"large\"===o?736:378),[n,o]),M=React247.useMemo((()=>null!=i?i:\"large\"===o?736:378),[i,o]),O={motionName:getTransitionName2(x,\"mask-motion\"),motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500},B=usePanelRef(),[N,j]=useZIndex(\"Drawer\",v.zIndex),{classNames:L={},styles:D={}}=v,{classNames:F={},styles:U={}}=E||{};return C(React247.createElement(ContextIsolator_default,{form:!0,space:!0},React247.createElement(zindexContext_default.Provider,{value:j},React247.createElement(es_default16,Object.assign({prefixCls:x,onClose:c,maskMotion:O,motion:e=>({motionName:getTransitionName2(x,`panel-motion-${e}`),motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500})},v,{classNames:{mask:(0,import_classnames86.default)(L.mask,F.mask),content:(0,import_classnames86.default)(L.content,F.content),wrapper:(0,import_classnames86.default)(L.wrapper,F.wrapper)},styles:{mask:Object.assign(Object.assign(Object.assign({},D.mask),_),U.mask),content:Object.assign(Object.assign(Object.assign({},D.content),b),U.content),wrapper:Object.assign(Object.assign(Object.assign({},D.wrapper),y),U.wrapper)},open:null!=l?l:m,mask:a,push:s,width:P,height:M,style:Object.assign(Object.assign({},null==E?void 0:E.style),f),className:(0,import_classnames86.default)(null==E?void 0:E.className,p),rootClassName:k,getContainer:I,afterOpenChange:null!=u?u:g,panelRef:B,zIndex:N}),React247.createElement(DrawerPanel_default2,Object.assign({prefixCls:x},v,{onClose:c}))))))},PurePanel4=e=>{const{prefixCls:t,style:r,className:n,placement:i=\"right\"}=e,o=__rest32(e,[\"prefixCls\",\"style\",\"className\",\"placement\"]),{getPrefixCls:a}=React247.useContext(ConfigContext),s=a(\"drawer\",t),[l,u,c]=style_default17(s),d=(0,import_classnames86.default)(s,`${s}-pure`,`${s}-${i}`,u,c,n);return l(React247.createElement(\"div\",{className:d,style:r},React247.createElement(DrawerPanel_default2,Object.assign({prefixCls:s},o))))};Drawer3._InternalPanelDoNotUseOrYouWillBeFired=PurePanel4,Drawer3.displayName=\"Drawer\";var drawer_default=Drawer3;init_globals(),init_globals();var React251=__toESM(require_react()),import_classnames88=__toESM(require_classnames());init_globals();var React250=__toESM(require_react()),import_classnames87=__toESM(require_classnames());function isPresetSize(e){return[\"small\",\"middle\",\"large\"].includes(e)}function isValidGapNumber(e){return!!e&&\"number\"==typeof e&&!Number.isNaN(e)}init_globals(),init_globals();var import_react85=__toESM(require_react()),SpaceContext=import_react85.default.createContext({latestIndex:0}),SpaceContextProvider=SpaceContext.Provider;init_globals();var React249=__toESM(require_react()),Item2=e=>{let{className:t,index:r,children:n,split:i,style:o}=e;const{latestIndex:a}=React249.useContext(SpaceContext);return null==n?null:React249.createElement(React249.Fragment,null,React249.createElement(\"div\",{className:t,style:o},n),r__left_angle_mark_a&&i&&React249.createElement(\"span\",{className:`${t}-split`},i))},Item_default2=Item2,__rest33=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)__left_angle_mark_0&&(r[n]=e[n]);if(null!=e&&\"function\"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i__left_angle_mark_n.length;i++)t.indexOf(n[i])__left_angle_mark_0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r},InternalSpace=React250.forwardRef(((e,t)=>{var r,n,i;const{getPrefixCls:o,space:a,direction:s}=React250.useContext(ConfigContext),{size:l=(null!==(r=null==a?void 0:a.size)&&void 0!==r?r:\"small\"),align:u,className:c,rootClassName:d,children:h,direction:f=\"horizontal\",prefixCls:p,split:m,style:g,wrap:_=!1,classNames:b,styles:y}=e,v=__rest33(e,[\"size\",\"align\",\"className\",\"rootClassName\",\"children\",\"direction\",\"prefixCls\",\"split\",\"style\",\"wrap\",\"classNames\",\"styles\"]),[A,w]=Array.isArray(l)?l:[l,l],S=isPresetSize(w),E=isPresetSize(A),x=isValidGapNumber(w),C=isValidGapNumber(A),T=toArray(h,{keepEmpty:!0}),R=void 0===u&&\"horizontal\"===f?\"center\":u,I=o(\"space\",p),[k,P,M]=style_default4(I),O=(0,import_classnames87.default)(I,null==a?void 0:a.className,P,`${I}-${f}`,{[`${I}-rtl`]:\"rtl\"===s,[`${I}-align-${R}`]:R,[`${I}-gap-row-${w}`]:S,[`${I}-gap-col-${A}`]:E},c,d,M),B=(0,import_classnames87.default)(`${I}-item`,null!==(n=null==b?void 0:b.item)&&void 0!==n?n:null===(i=null==a?void 0:a.classNames)||void 0===i?void 0:i.item);let N=0;const j=T.map(((e,t)=>{var r,n;null!=e&&(N=t);const i=(null==e?void 0:e.key)||`${B}-${t}`;return React250.createElement(Item_default2,{className:B,key:i,index:t,split:m,style:null!==(r=null==y?void 0:y.item)&&void 0!==r?r:null===(n=null==a?void 0:a.styles)||void 0===n?void 0:n.item},e)})),L=React250.useMemo((()=>({latestIndex:N})),[N]);if(0===T.length)return null;const D={};return _&&(D.flexWrap=\"wrap\"),!E&&C&&(D.columnGap=A),!S&&x&&(D.rowGap=w),k(React250.createElement(\"div\",Object.assign({ref:t,className:O,style:Object.assign(Object.assign(Object.assign({},D),null==a?void 0:a.style),g)},v),React250.createElement(SpaceContextProvider,{value:L},j)))})),Space=InternalSpace;Space.Compact=Compact_default,Space.displayName=\"Space\";var space_default=Space,__rest34=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)__left_angle_mark_0&&(r[n]=e[n]);if(null!=e&&\"function\"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i__left_angle_mark_n.length;i++)t.indexOf(n[i])__left_angle_mark_0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r},DropdownButton=e=>{const{getPopupContainer:t,getPrefixCls:r,direction:n}=React251.useContext(ConfigContext),{prefixCls:i,type:o=\"default\",danger:a,disabled:s,loading:l,onClick:u,htmlType:c,children:d,className:h,menu:f,arrow:p,autoFocus:m,overlay:g,trigger:_,align:b,open:y,onOpenChange:v,placement:A,getPopupContainer:w,href:S,icon:E=React251.createElement(EllipsisOutlined_default2,null),title:x,buttonsRender:C=e=>e,mouseEnterDelay:T,mouseLeaveDelay:R,overlayClassName:I,overlayStyle:k,destroyPopupOnHide:P,dropdownRender:M}=e,O=__rest34(e,[\"prefixCls\",\"type\",\"danger\",\"disabled\",\"loading\",\"onClick\",\"htmlType\",\"children\",\"className\",\"menu\",\"arrow\",\"autoFocus\",\"overlay\",\"trigger\",\"align\",\"open\",\"onOpenChange\",\"placement\",\"getPopupContainer\",\"href\",\"icon\",\"title\",\"buttonsRender\",\"mouseEnterDelay\",\"mouseLeaveDelay\",\"overlayClassName\",\"overlayStyle\",\"destroyPopupOnHide\",\"dropdownRender\"]),B=r(\"dropdown\",i),N=`${B}-button`,j={menu:f,arrow:p,autoFocus:m,align:b,disabled:s,trigger:s?[]:_,onOpenChange:v,getPopupContainer:w||t,mouseEnterDelay:T,mouseLeaveDelay:R,overlayClassName:I,overlayStyle:k,destroyPopupOnHide:P,dropdownRender:M},{compactSize:L,compactItemClassnames:D}=useCompactItemContext(B,n),F=(0,import_classnames88.default)(N,D,h);\"overlay\"in e&&(j.overlay=g),\"open\"in e&&(j.open=y),j.placement=\"placement\"in e?A:\"rtl\"===n?\"bottomLeft\":\"bottomRight\";const U=React251.createElement(button_default2,{type:o,danger:a,disabled:s,loading:l,onClick:u,htmlType:c,href:S,title:x},d),z=React251.createElement(button_default2,{type:o,danger:a,icon:E}),[q,G]=C([U,z]);return React251.createElement(space_default.Compact,Object.assign({className:F,size:L,block:!0},O),q,React251.createElement(dropdown_default,Object.assign({},j),G))};DropdownButton.__ANT_BUTTON=!0;var dropdown_button_default=DropdownButton,Dropdown3=dropdown_default;Dropdown3.Button=dropdown_button_default;var dropdown_default2=Dropdown3;init_globals(),init_globals();var React253=__toESM(require_react()),import_react86=__toESM(require_react()),import_classnames89=__toESM(require_classnames());init_globals();var React252=__toESM(require_react());function useDebounce(e){const[t,r]=React252.useState(e);return React252.useEffect((()=>{const t=setTimeout((()=>{r(e)}),e.length?0:10);return()=>{clearTimeout(t)}}),[e]),t}init_globals(),init_globals();var genFormValidateMotionStyle=e=>{const{componentCls:t}=e,r=`${t}-show-help`,n=`${t}-show-help-item`;return{[r]:{transition:`opacity ${e.motionDurationSlow} ${e.motionEaseInOut}`,\"&-appear, &-enter\":{opacity:0,\"&-active\":{opacity:1}},\"&-leave\":{opacity:1,\"&-active\":{opacity:0}},[n]:{overflow:\"hidden\",transition:`height ${e.motionDurationSlow} ${e.motionEaseInOut},\\n opacity ${e.motionDurationSlow} ${e.motionEaseInOut},\\n transform ${e.motionDurationSlow} ${e.motionEaseInOut} !important`,[`&${n}-appear, &${n}-enter`]:{transform:\"translateY(-5px)\",opacity:0,\"&-active\":{transform:\"translateY(0)\",opacity:1}},[`&${n}-leave-active`]:{transform:\"translateY(-5px)\"}}}}},explain_default=genFormValidateMotionStyle,resetForm=e=>({legend:{display:\"block\",width:\"100%\",marginBottom:e.marginLG,padding:0,color:e.colorTextDescription,fontSize:e.fontSizeLG,lineHeight:\"inherit\",border:0,borderBottom:`${unit(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},'input[type=\"search\"]':{boxSizing:\"border-box\"},'input[type=\"radio\"], input[type=\"checkbox\"]':{lineHeight:\"normal\"},'input[type=\"file\"]':{display:\"block\"},'input[type=\"range\"]':{display:\"block\",width:\"100%\"},\"select[multiple], select[size]\":{height:\"auto\"},\"input[type='file']:focus,\\n input[type='radio']:focus,\\n input[type='checkbox']:focus\":{outline:0,boxShadow:`0 0 0 ${unit(e.controlOutlineWidth)} ${e.controlOutline}`},output:{display:\"block\",paddingTop:15,color:e.colorText,fontSize:e.fontSize,lineHeight:e.lineHeight}}),genFormSize=(e,t)=>{const{formItemCls:r}=e;return{[r]:{[`${r}-label > label`]:{height:t},[`${r}-control-input`]:{minHeight:t}}}},genFormStyle=e=>{const{componentCls:t}=e;return{[e.componentCls]:Object.assign(Object.assign(Object.assign({},resetComponent(e)),resetForm(e)),{[`${t}-text`]:{display:\"inline-block\",paddingInlineEnd:e.paddingSM},\"&-small\":Object.assign({},genFormSize(e,e.controlHeightSM)),\"&-large\":Object.assign({},genFormSize(e,e.controlHeightLG))})}},genFormItemStyle=e=>{const{formItemCls:t,iconCls:r,componentCls:n,rootPrefixCls:i,antCls:o,labelRequiredMarkColor:a,labelColor:s,labelFontSize:l,labelHeight:u,labelColonMarginInlineStart:c,labelColonMarginInlineEnd:d,itemMarginBottom:h}=e;return{[t]:Object.assign(Object.assign({},resetComponent(e)),{marginBottom:h,verticalAlign:\"top\",\"&-with-help\":{transition:\"none\"},[`&-hidden,\\n &-hidden${o}-row`]:{display:\"none\"},\"&-has-warning\":{[`${t}-split`]:{color:e.colorError}},\"&-has-error\":{[`${t}-split`]:{color:e.colorWarning}},[`${t}-label`]:{flexGrow:0,overflow:\"hidden\",whiteSpace:\"nowrap\",textAlign:\"end\",verticalAlign:\"middle\",\"&-left\":{textAlign:\"start\"},\"&-wrap\":{overflow:\"unset\",lineHeight:e.lineHeight,whiteSpace:\"unset\"},\"> label\":{position:\"relative\",display:\"inline-flex\",alignItems:\"center\",maxWidth:\"100%\",height:u,color:s,fontSize:l,[`> ${r}`]:{fontSize:e.fontSize,verticalAlign:\"top\"},[`&${t}-required:not(${t}-required-mark-optional)::before`]:{display:\"inline-block\",marginInlineEnd:e.marginXXS,color:a,fontSize:e.fontSize,fontFamily:\"SimSun, sans-serif\",lineHeight:1,content:'\"*\"',[`${n}-hide-required-mark &`]:{display:\"none\"}},[`${t}-optional`]:{display:\"inline-block\",marginInlineStart:e.marginXXS,color:e.colorTextDescription,[`${n}-hide-required-mark &`]:{display:\"none\"}},[`${t}-tooltip`]:{color:e.colorTextDescription,cursor:\"help\",writingMode:\"horizontal-tb\",marginInlineStart:e.marginXXS},\"&::after\":{content:'\":\"',position:\"relative\",marginBlock:0,marginInlineStart:c,marginInlineEnd:d},[`&${t}-no-colon::after`]:{content:'\"\\\\a0\"'}}},[`${t}-control`]:{\"--ant-display\":\"flex\",flexDirection:\"column\",flexGrow:1,[`&:first-child:not([class^=\"'${i}-col-'\"]):not([class*=\"' ${i}-col-'\"])`]:{width:\"100%\"},\"&-input\":{position:\"relative\",display:\"flex\",alignItems:\"center\",minHeight:e.controlHeight,\"&-content\":{flex:\"auto\",maxWidth:\"100%\"}}},[t]:{\"&-explain, &-extra\":{clear:\"both\",color:e.colorTextDescription,fontSize:e.fontSize,lineHeight:e.lineHeight},\"&-explain-connected\":{width:\"100%\"},\"&-extra\":{minHeight:e.controlHeightSM,transition:`color ${e.motionDurationMid} ${e.motionEaseOut}`},\"&-explain\":{\"&-error\":{color:e.colorError},\"&-warning\":{color:e.colorWarning}}},[`&-with-help ${t}-explain`]:{height:\"auto\",opacity:1},[`${t}-feedback-icon`]:{fontSize:e.fontSize,textAlign:\"center\",visibility:\"visible\",animationName:zoomIn,animationDuration:e.motionDurationMid,animationTimingFunction:e.motionEaseOutBack,pointerEvents:\"none\",\"&-success\":{color:e.colorSuccess},\"&-error\":{color:e.colorError},\"&-warning\":{color:e.colorWarning},\"&-validating\":{color:e.colorPrimary}}})}},genHorizontalStyle=(e,t)=>{const{formItemCls:r}=e;return{[`${t}-horizontal`]:{[`${r}-label`]:{flexGrow:0},[`${r}-control`]:{flex:\"1 1 0\",minWidth:0},[`${r}-label[class$='-24'], ${r}-label[class*='-24 ']`]:{[`& + ${r}-control`]:{minWidth:\"unset\"}}}}},genInlineStyle=e=>{const{componentCls:t,formItemCls:r,inlineItemMarginBottom:n}=e;return{[`${t}-inline`]:{display:\"flex\",flexWrap:\"wrap\",[r]:{flex:\"none\",marginInlineEnd:e.margin,marginBottom:n,\"&-row\":{flexWrap:\"nowrap\"},[`> ${r}-label,\\n > ${r}-control`]:{display:\"inline-block\",verticalAlign:\"top\"},[`> ${r}-label`]:{flex:\"none\"},[`${t}-text`]:{display:\"inline-block\"},[`${r}-has-feedback`]:{display:\"inline-block\"}}}}},makeVerticalLayoutLabel=e=>({padding:e.verticalLabelPadding,margin:e.verticalLabelMargin,whiteSpace:\"initial\",textAlign:\"start\",\"> label\":{margin:0,\"&::after\":{visibility:\"hidden\"}}}),makeVerticalLayout=e=>{const{componentCls:t,formItemCls:r,rootPrefixCls:n}=e;return{[`${r} ${r}-label`]:makeVerticalLayoutLabel(e),[`${t}:not(${t}-inline)`]:{[r]:{flexWrap:\"wrap\",[`${r}-label, ${r}-control`]:{[`&:not([class*=\" ${n}-col-xs\"])`]:{flex:\"0 0 100%\",maxWidth:\"100%\"}}}}}},genVerticalStyle=e=>{const{componentCls:t,formItemCls:r,antCls:n}=e;return{[`${t}-vertical`]:{[`${r}:not(${r}-horizontal)`]:{[`${r}-row`]:{flexDirection:\"column\"},[`${r}-label > label`]:{height:\"auto\"},[`${r}-control`]:{width:\"100%\"},[`${r}-label,\\n ${n}-col-24${r}-label,\\n ${n}-col-xl-24${r}-label`]:makeVerticalLayoutLabel(e)}},[`@media (max-width: ${unit(e.screenXSMax)})`]:[makeVerticalLayout(e),{[t]:{[`${r}:not(${r}-horizontal)`]:{[`${n}-col-xs-24${r}-label`]:makeVerticalLayoutLabel(e)}}}],[`@media (max-width: ${unit(e.screenSMMax)})`]:{[t]:{[`${r}:not(${r}-horizontal)`]:{[`${n}-col-sm-24${r}-label`]:makeVerticalLayoutLabel(e)}}},[`@media (max-width: ${unit(e.screenMDMax)})`]:{[t]:{[`${r}:not(${r}-horizontal)`]:{[`${n}-col-md-24${r}-label`]:makeVerticalLayoutLabel(e)}}},[`@media (max-width: ${unit(e.screenLGMax)})`]:{[t]:{[`${r}:not(${r}-horizontal)`]:{[`${n}-col-lg-24${r}-label`]:makeVerticalLayoutLabel(e)}}}}},genItemVerticalStyle=e=>{const{formItemCls:t,antCls:r}=e;return{[`${t}-vertical`]:{[`${t}-row`]:{flexDirection:\"column\"},[`${t}-label > label`]:{height:\"auto\"},[`${t}-control`]:{width:\"100%\"}},[`${t}-vertical ${t}-label,\\n ${r}-col-24${t}-label,\\n ${r}-col-xl-24${t}-label`]:makeVerticalLayoutLabel(e),[`@media (max-width: ${unit(e.screenXSMax)})`]:[makeVerticalLayout(e),{[t]:{[`${r}-col-xs-24${t}-label`]:makeVerticalLayoutLabel(e)}}],[`@media (max-width: ${unit(e.screenSMMax)})`]:{[t]:{[`${r}-col-sm-24${t}-label`]:makeVerticalLayoutLabel(e)}},[`@media (max-width: ${unit(e.screenMDMax)})`]:{[t]:{[`${r}-col-md-24${t}-label`]:makeVerticalLayoutLabel(e)}},[`@media (max-width: ${unit(e.screenLGMax)})`]:{[t]:{[`${r}-col-lg-24${t}-label`]:makeVerticalLayoutLabel(e)}}}},prepareComponentToken13=e=>({labelRequiredMarkColor:e.colorError,labelColor:e.colorTextHeading,labelFontSize:e.fontSize,labelHeight:e.controlHeight,labelColonMarginInlineStart:e.marginXXS/2,labelColonMarginInlineEnd:e.marginXS,itemMarginBottom:e.marginLG,verticalLabelPadding:`0 0 ${e.paddingXS}px`,verticalLabelMargin:0,inlineItemMarginBottom:0}),prepareToken3=(e,t)=>merge2(e,{formItemCls:`${e.componentCls}-item`,rootPrefixCls:t}),style_default18=genStyleHooks(\"Form\",((e,t)=>{let{rootPrefixCls:r}=t;const n=prepareToken3(e,r);return[genFormStyle(n),genFormItemStyle(n),explain_default(n),genHorizontalStyle(n,n.componentCls),genHorizontalStyle(n,n.formItemCls),genInlineStyle(n),genVerticalStyle(n),genItemVerticalStyle(n),collapse_default(n),zoomIn]}),prepareComponentToken13,{order:-1e3}),EMPTY_LIST3=[];function toErrorEntity(e,t,r){return{key:\"string\"==typeof e?e:`${t}-${arguments.length>3&&void 0!==arguments[3]?arguments[3]:0}`,error:e,errorStatus:r}}var ErrorList=e=>{let{help:t,helpStatus:r,errors:n=EMPTY_LIST3,warnings:i=EMPTY_LIST3,className:o,fieldId:a,onVisibleChanged:s}=e;const{prefixCls:l}=React253.useContext(FormItemPrefixContext),u=`${l}-item-explain`,c=useCSSVarCls_default(l),[d,h,f]=style_default18(l,c),p=(0,import_react86.useMemo)((()=>motion_default(l)),[l]),m=useDebounce(n),g=useDebounce(i),_=React253.useMemo((()=>null!=t?[toErrorEntity(t,\"help\",r)]:[].concat(_toConsumableArray(m.map(((e,t)=>toErrorEntity(e,\"error\",\"error\",t)))),_toConsumableArray(g.map(((e,t)=>toErrorEntity(e,\"warning\",\"warning\",t)))))),[t,r,m,g]),b={};return a&&(b.id=`${a}_help`),d(React253.createElement(es_default2,{motionDeadline:p.motionDeadline,motionName:`${l}-show-help`,visible:!!_.length,onVisibleChanged:s},(e=>{const{className:t,style:r}=e;return React253.createElement(\"div\",Object.assign({},b,{className:(0,import_classnames89.default)(u,t,f,c,o,h),style:r,role:\"alert\"}),React253.createElement(CSSMotionList_default,Object.assign({keys:_},motion_default(l),{motionName:`${l}-show-help-item`,component:!1}),(e=>{const{key:t,error:r,errorStatus:n,className:i,style:o}=e;return React253.createElement(\"div\",{key:t,className:(0,import_classnames89.default)(i,{[`${u}-${n}`]:n}),style:o},r)})))})))},ErrorList_default=ErrorList;init_globals();var React255=__toESM(require_react()),import_react88=__toESM(require_react()),import_classnames90=__toESM(require_classnames());init_globals();var React254=__toESM(require_react());init_globals();var formItemNameBlackList=[\"parentNode\"],defaultItemNamePrefixCls=\"form_item\";function toArray4(e){return void 0===e||!1===e?[]:Array.isArray(e)?e:[e]}function getFieldId(e,t){if(!e.length)return;const r=e.join(\"_\");return t?`${t}_${r}`:formItemNameBlackList.includes(r)?`${defaultItemNamePrefixCls}_${r}`:r}function getStatus(e,t,r,n,i,o){let a=n;return void 0!==o?a=o:r.validating?a=\"validating\":e.length?a=\"error\":t.length?a=\"warning\":(r.touched||i&&r.validated)&&(a=\"success\"),a}function toNamePathStr(e){return toArray4(e).join(\"_\")}function getFieldDOMNode(e,t){const r=getDOM(t.getFieldInstance(e));if(r)return r;const n=getFieldId(toArray4(e),t.__INTERNAL__.name);return n?document.getElementById(n):void 0}function useForm2(e){const[t]=useForm_default(),r=React254.useRef({}),n=React254.useMemo((()=>null!=e?e:Object.assign(Object.assign({},t),{__INTERNAL__:{itemRef:e=>t=>{const n=toNamePathStr(e);t?r.current[n]=t:delete r.current[n]}},scrollToField:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=getFieldDOMNode(e,n);r&&e2(r,Object.assign({scrollMode:\"if-needed\",block:\"nearest\"},t))},getFieldInstance:e=>{const t=toNamePathStr(e);return r.current[t]}})),[e,t]);return[n]}init_globals();var import_react87=__toESM(require_react()),names2={};function useFormWarning(e){let{name:t}=e;const r=devUseWarning(\"Form\");(0,import_react87.useEffect)((()=>{if(t)return names2[t]=(names2[t]||0)+1,r(names2[t]__left_angle_mark_=1,\"usage\",\"There exist multiple Form with same `name`.\"),()=>{names2[t]-=1}}),[t])}var __rest35=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)__left_angle_mark_0&&(r[n]=e[n]);if(null!=e&&\"function\"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i__left_angle_mark_n.length;i++)t.indexOf(n[i])__left_angle_mark_0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r},InternalForm2=(e,t)=>{const r=React255.useContext(DisabledContext_default),{getPrefixCls:n,direction:i,form:o}=React255.useContext(ConfigContext),{prefixCls:a,className:s,rootClassName:l,size:u,disabled:c=r,form:d,colon:h,labelAlign:f,labelWrap:p,labelCol:m,wrapperCol:g,hideRequiredMark:_,layout:b=\"horizontal\",scrollToFirstError:y,requiredMark:v,onFinishFailed:A,name:w,style:S,feedbackIcons:E,variant:x}=e,C=__rest35(e,[\"prefixCls\",\"className\",\"rootClassName\",\"size\",\"disabled\",\"form\",\"colon\",\"labelAlign\",\"labelWrap\",\"labelCol\",\"wrapperCol\",\"hideRequiredMark\",\"layout\",\"scrollToFirstError\",\"requiredMark\",\"onFinishFailed\",\"name\",\"style\",\"feedbackIcons\",\"variant\"]),T=useSize_default(u),R=React255.useContext(validateMessagesContext_default);useFormWarning(e);const I=(0,import_react88.useMemo)((()=>void 0!==v?v:!_&&(!o||void 0===o.requiredMark||o.requiredMark)),[_,v,o]),k=null!=h?h:null==o?void 0:o.colon,P=n(\"form\",a),M=useCSSVarCls_default(P),[O,B,N]=style_default18(P,M),j=(0,import_classnames90.default)(P,`${P}-${b}`,{[`${P}-hide-required-mark`]:!1===I,[`${P}-rtl`]:\"rtl\"===i,[`${P}-${T}`]:T},N,M,B,null==o?void 0:o.className,s,l),[L]=useForm2(d),{__INTERNAL__:D}=L;D.name=w;const F=(0,import_react88.useMemo)((()=>({name:w,labelAlign:f,labelCol:m,labelWrap:p,wrapperCol:g,vertical:\"vertical\"===b,colon:k,requiredMark:I,itemRef:D.itemRef,form:L,feedbackIcons:E})),[w,f,m,g,b,k,I,L,E]),U=React255.useRef(null);React255.useImperativeHandle(t,(()=>{var e;return Object.assign(Object.assign({},L),{nativeElement:null===(e=U.current)||void 0===e?void 0:e.nativeElement})}));const z=(e,t)=>{if(e){let r={block:\"nearest\"};\"object\"==typeof e&&(r=e),L.scrollToField(t,r)}};return O(React255.createElement(VariantContext.Provider,{value:x},React255.createElement(DisabledContextProvider,{disabled:c},React255.createElement(SizeContext_default.Provider,{value:T},React255.createElement(FormProvider3,{validateMessages:R},React255.createElement(FormContext2.Provider,{value:F},React255.createElement(es_default6,Object.assign({id:w},C,{name:w,onFinishFailed:e=>{if(null==A||A(e),e.errorFields.length){const t=e.errorFields[0].name;if(void 0!==y)return void z(y,t);o&&void 0!==o.scrollToFirstError&&z(o.scrollToFirstError,t)}},form:L,ref:U,style:Object.assign(Object.assign({},null==o?void 0:o.style),S),className:j}))))))))},Form3=React255.forwardRef(InternalForm2);Form3.displayName=\"Form\";var Form_default2=Form3;init_globals();var React263=__toESM(require_react()),import_classnames95=__toESM(require_classnames());function useChildren(e){if(\"function\"==typeof e)return e;const t=toArray(e);return t.length__left_angle_mark_=1?t[0]:t}init_globals(),init_globals();var import_react89=__toESM(require_react()),useFormItemStatus=()=>{const{status:e,errors:t=[],warnings:r=[]}=(0,import_react89.useContext)(FormItemInputContext);return devUseWarning(\"Form.Item\")(void 0!==e,\"usage\",\"Form.Item.useStatus should be used under Form.Item component. For more information: https://u.ant.design/form-item-usestatus\"),{status:e,errors:t,warnings:r}};useFormItemStatus.Context=FormItemInputContext;var useFormItemStatus_default=useFormItemStatus;init_globals();var React256=__toESM(require_react()),import_react90=__toESM(require_react());function useFrameState(e){const[t,r]=React256.useState(e),n=(0,import_react90.useRef)(null),i=(0,import_react90.useRef)([]),o=(0,import_react90.useRef)(!1);return React256.useEffect((()=>(o.current=!1,()=>{o.current=!0,raf_default.cancel(n.current),n.current=null})),[]),[t,function(e){o.current||(null===n.current&&(i.current=[],n.current=raf_default((()=>{n.current=null,r((e=>{let t=e;return i.current.forEach((e=>{t=e(t)})),t}))}))),i.current.push(e))}]}init_globals();var React257=__toESM(require_react());function useItemRef(){const{itemRef:e}=React257.useContext(FormContext2),t=React257.useRef({});return function(r,n){const i=n&&\"object\"==typeof n&&n.ref,o=r.join(\"_\");return t.current.name===o&&t.current.originRef===i||(t.current.name=o,t.current.originRef=i,t.current.ref=composeRef(e(r),i)),t.current.ref}}init_globals();var React262=__toESM(require_react()),import_classnames94=__toESM(require_classnames());init_globals();var React258=__toESM(require_react()),import_classnames91=__toESM(require_classnames());init_globals();var genFallbackStyle=e=>{const{formItemCls:t}=e;return{\"@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none)\":{[`${t}-control`]:{display:\"flex\"}}}},fallbackCmp_default=genSubStyleComponent([\"Form\",\"item-item\"],((e,t)=>{let{rootPrefixCls:r}=t;const n=prepareToken3(e,r);return[genFallbackStyle(n)]})),FormItemInput=e=>{const{prefixCls:t,status:r,wrapperCol:n,children:i,errors:o,warnings:a,_internalItemRender:s,extra:l,help:u,fieldId:c,marginBottom:d,onErrorVisibleChanged:h}=e,f=`${t}-item`,p=React258.useContext(FormContext2),m=n||p.wrapperCol||{},g=(0,import_classnames91.default)(`${f}-control`,m.className),_=React258.useMemo((()=>Object.assign({},p)),[p]);delete _.labelCol,delete _.wrapperCol;const b=React258.createElement(\"div\",{className:`${f}-control-input`},React258.createElement(\"div\",{className:`${f}-control-input-content`},i)),y=React258.useMemo((()=>({prefixCls:t,status:r})),[t,r]),v=null!==d||o.length||a.length?React258.createElement(\"div\",{style:{display:\"flex\",flexWrap:\"nowrap\"}},React258.createElement(FormItemPrefixContext.Provider,{value:y},React258.createElement(ErrorList_default,{fieldId:c,errors:o,warnings:a,help:u,helpStatus:r,className:`${f}-explain-connected`,onVisibleChanged:h})),!!d&&React258.createElement(\"div\",{style:{width:0,height:d}})):null,A={};c&&(A.id=`${c}_extra`);const w=l?React258.createElement(\"div\",Object.assign({},A,{className:`${f}-extra`}),l):null,S=s&&\"pro_table_render\"===s.mark&&s.render?s.render(e,{input:b,errorList:v,extra:w}):React258.createElement(React258.Fragment,null,b,v,w);return React258.createElement(FormContext2.Provider,{value:_},React258.createElement(col_default,Object.assign({},m,{className:g}),S),React258.createElement(fallbackCmp_default,{prefixCls:t}))},FormItemInput_default=FormItemInput;init_globals();var React260=__toESM(require_react());init_globals();var React259=__toESM(require_react()),QuestionCircleOutlined2=function(e,t){return React259.createElement(AntdIcon_default2,_extends({},e,{ref:t,icon:QuestionCircleOutlined_default}))},RefIcon34=React259.forwardRef(QuestionCircleOutlined2);RefIcon34.displayName=\"QuestionCircleOutlined\";var QuestionCircleOutlined_default2=RefIcon34,import_classnames92=__toESM(require_classnames()),__rest36=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)__left_angle_mark_0&&(r[n]=e[n]);if(null!=e&&\"function\"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i__left_angle_mark_n.length;i++)t.indexOf(n[i])__left_angle_mark_0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r};function toTooltipProps(e){return e?\"object\"!=typeof e||React260.isValidElement(e)?{title:e}:e:null}var FormItemLabel=e=>{let{prefixCls:t,label:r,htmlFor:n,labelCol:i,labelAlign:o,colon:a,required:s,requiredMark:l,tooltip:u,vertical:c}=e;var d;const[h]=useLocale_default(\"Form\"),{labelAlign:f,labelCol:p,labelWrap:m,colon:g}=React260.useContext(FormContext2);if(!r)return null;const _=i||p||{},b=o||f,y=`${t}-item-label`,v=(0,import_classnames92.default)(y,\"left\"===b&&`${y}-left`,_.className,{[`${y}-wrap`]:!!m});let A=r;const w=!0===a||!1!==g&&!1!==a;w&&!c&&\"string\"==typeof r&&r.trim()&&(A=r.replace(/[:|：]\\s*$/,\"\"));const S=toTooltipProps(u);if(S){const{icon:e=React260.createElement(QuestionCircleOutlined_default2,null)}=S,r=__rest36(S,[\"icon\"]),n=React260.createElement(tooltip_default,Object.assign({},r),React260.cloneElement(e,{className:`${t}-item-tooltip`,title:\"\",onClick:e=>{e.preventDefault()},tabIndex:null}));A=React260.createElement(React260.Fragment,null,A,n)}const E=\"optional\"===l,x=\"function\"==typeof l;x?A=l(A,{required:!!s}):E&&!s&&(A=React260.createElement(React260.Fragment,null,A,React260.createElement(\"span\",{className:`${t}-item-optional`,title:\"\"},(null==h?void 0:h.optional)||(null===(d=en_US_default6.Form)||void 0===d?void 0:d.optional))));const C=(0,import_classnames92.default)({[`${t}-item-required`]:s,[`${t}-item-required-mark-optional`]:E||x,[`${t}-item-no-colon`]:!w});return React260.createElement(col_default,Object.assign({},_,{className:v}),React260.createElement(\"label\",{htmlFor:n,className:C,title:\"string\"==typeof r?r:\"\"},A))},FormItemLabel_default=FormItemLabel;init_globals();var React261=__toESM(require_react()),import_classnames93=__toESM(require_classnames()),iconMap={success:CheckCircleFilled_default2,warning:ExclamationCircleFilled_default2,error:CloseCircleFilled_default2,validating:LoadingOutlined_default3};function StatusProvider(e){let{children:t,errors:r,warnings:n,hasFeedback:i,validateStatus:o,prefixCls:a,meta:s,noStyle:l}=e;const u=`${a}-item`,{feedbackIcons:c}=React261.useContext(FormContext2),d=getStatus(r,n,s,null,!!i,o),{isFormItemInput:h,status:f,hasFeedback:p,feedbackIcon:m}=React261.useContext(FormItemInputContext),g=React261.useMemo((()=>{var e;let t;if(i){const o=!0!==i&&i.icons||c,a=d&&(null===(e=null==o?void 0:o({status:d,errors:r,warnings:n}))||void 0===e?void 0:e[d]),s=d&&iconMap[d];t=!1!==a&&s?React261.createElement(\"span\",{className:(0,import_classnames93.default)(`${u}-feedback-icon`,`${u}-feedback-icon-${d}`)},a||React261.createElement(s,null)):null}const o={status:d||\"\",errors:r,warnings:n,hasFeedback:!!i,feedbackIcon:t,isFormItemInput:!0};return l&&(o.status=(null!=d?d:f)||\"\",o.isFormItemInput=h,o.hasFeedback=!!(null!=i?i:p),o.feedbackIcon=void 0!==i?o.feedbackIcon:m),o}),[d,i,l,h,f]);return React261.createElement(FormItemInputContext.Provider,{value:g},t)}var __rest37=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)__left_angle_mark_0&&(r[n]=e[n]);if(null!=e&&\"function\"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i__left_angle_mark_n.length;i++)t.indexOf(n[i])__left_angle_mark_0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r};function ItemHolder(e){const{prefixCls:t,className:r,rootClassName:n,style:i,help:o,errors:a,warnings:s,validateStatus:l,meta:u,hasFeedback:c,hidden:d,children:h,fieldId:f,required:p,isRequired:m,onSubItemMetaChange:g,layout:_}=e,b=__rest37(e,[\"prefixCls\",\"className\",\"rootClassName\",\"style\",\"help\",\"errors\",\"warnings\",\"validateStatus\",\"meta\",\"hasFeedback\",\"hidden\",\"children\",\"fieldId\",\"required\",\"isRequired\",\"onSubItemMetaChange\",\"layout\"]),y=`${t}-item`,{requiredMark:v,vertical:A}=React262.useContext(FormContext2),w=A||\"vertical\"===_,S=React262.useRef(null),E=useDebounce(a),x=useDebounce(s),C=null!=o,T=!!(C||a.length||s.length),R=!!S.current&&isVisible_default(S.current),[I,k]=React262.useState(null);useLayoutEffect_default((()=>{if(T&&S.current){const e=getComputedStyle(S.current);k(parseInt(e.marginBottom,10))}}),[T,R]);const P=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return getStatus(e?E:u.errors,e?x:u.warnings,u,\"\",!!c,l)}(),M=(0,import_classnames94.default)(y,r,n,{[`${y}-with-help`]:C||E.length||x.length,[`${y}-has-feedback`]:P&&c,[`${y}-has-success`]:\"success\"===P,[`${y}-has-warning`]:\"warning\"===P,[`${y}-has-error`]:\"error\"===P,[`${y}-is-validating`]:\"validating\"===P,[`${y}-hidden`]:d,[`${y}-${_}`]:_});return React262.createElement(\"div\",{className:M,style:i,ref:S},React262.createElement(row_default,Object.assign({className:`${y}-row`},omit(b,[\"_internalItemRender\",\"colon\",\"dependencies\",\"extra\",\"fieldKey\",\"getValueFromEvent\",\"getValueProps\",\"htmlFor\",\"id\",\"initialValue\",\"isListField\",\"label\",\"labelAlign\",\"labelCol\",\"labelWrap\",\"messageVariables\",\"name\",\"normalize\",\"noStyle\",\"preserve\",\"requiredMark\",\"rules\",\"shouldUpdate\",\"trigger\",\"tooltip\",\"validateFirst\",\"validateTrigger\",\"valuePropName\",\"wrapperCol\",\"validateDebounce\"])),React262.createElement(FormItemLabel_default,Object.assign({htmlFor:f},e,{requiredMark:v,required:null!=p?p:m,prefixCls:t,vertical:w})),React262.createElement(FormItemInput_default,Object.assign({},e,u,{errors:E,warnings:x,prefixCls:t,status:P,help:o,marginBottom:I,onErrorVisibleChanged:e=>{e||k(null)}}),React262.createElement(NoStyleItemContext.Provider,{value:g},React262.createElement(StatusProvider,{prefixCls:t,meta:u,errors:u.errors,warnings:u.warnings,hasFeedback:c,validateStatus:P},h)))),!!I&&React262.createElement(\"div\",{className:`${y}-margin-offset`,style:{marginBottom:-I}}))}var NAME_SPLIT=\"__SPLIT__\";function isSimilarControl(e,t){const r=Object.keys(e),n=Object.keys(t);return r.length===n.length&&r.every((r=>{const n=e[r],i=t[r];return n===i||\"function\"==typeof n||\"function\"==typeof i}))}var MemoInput=React263.memo((e=>{let{children:t}=e;return t}),((e,t)=>isSimilarControl(e.control,t.control)&&e.update===t.update&&e.childProps.length===t.childProps.length&&e.childProps.every(((e,r)=>e===t.childProps[r]))));function genEmptyMeta(){return{errors:[],warnings:[],touched:!1,validating:!1,name:[],validated:!1}}function InternalFormItem(e){const{name:t,noStyle:r,className:n,dependencies:i,prefixCls:o,shouldUpdate:a,rules:s,children:l,required:u,label:c,messageVariables:d,trigger:h=\"onChange\",validateTrigger:f,hidden:p,help:m,layout:g}=e,{getPrefixCls:_}=React263.useContext(ConfigContext),{name:b}=React263.useContext(FormContext2),y=useChildren(l),v=\"function\"==typeof y,A=React263.useContext(NoStyleItemContext),{validateTrigger:w}=React263.useContext(FieldContext_default),S=void 0!==f?f:w,E=!(null==t),x=_(\"form\",o),C=useCSSVarCls_default(x),[T,R,I]=style_default18(x,C),k=devUseWarning(\"Form.Item\");k(null!==t,\"usage\",\"`null` is passed as `name` property\");const P=React263.useContext(ListContext_default),M=React263.useRef(),[O,B]=useFrameState({}),[N,j]=useSafeState((()=>genEmptyMeta())),L=(e,t)=>{B((r=>{const n=Object.assign({},r),i=[].concat(_toConsumableArray(e.name.slice(0,-1)),_toConsumableArray(t)).join(NAME_SPLIT);return e.destroy?delete n[i]:n[i]=e,n}))},[D,F]=React263.useMemo((()=>{const e=_toConsumableArray(N.errors),t=_toConsumableArray(N.warnings);return Object.values(O).forEach((r=>{e.push.apply(e,_toConsumableArray(r.errors||[])),t.push.apply(t,_toConsumableArray(r.warnings||[]))})),[e,t]}),[O,N.errors,N.warnings]),U=useItemRef();function z(t,i,o){return r&&!p?React263.createElement(StatusProvider,{prefixCls:x,hasFeedback:e.hasFeedback,validateStatus:e.validateStatus,meta:N,errors:D,warnings:F,noStyle:!0},t):React263.createElement(ItemHolder,Object.assign({key:\"row\"},e,{className:(0,import_classnames95.default)(n,I,C,R),prefixCls:x,fieldId:i,isRequired:o,errors:D,warnings:F,meta:N,onSubItemMetaChange:L,layout:g}),t)}if(!E&&!v&&!i)return T(z(y));let q={};return\"string\"==typeof c?q.label=c:t&&(q.label=String(t)),d&&(q=Object.assign(Object.assign({},q),d)),T(React263.createElement(Field_default,Object.assign({},e,{messageVariables:q,trigger:h,validateTrigger:S,onMetaChange:e=>{const t=null==P?void 0:P.getKey(e.name);if(j(e.destroy?genEmptyMeta():e,!0),r&&!1!==m&&A){let r=e.name;if(e.destroy)r=M.current||r;else if(void 0!==t){const[e,n]=t;r=[e].concat(_toConsumableArray(n)),M.current=r}A(e,r)}}}),((n,o,l)=>{const c=toArray4(t).length&&o?o.name:[],d=getFieldId(c,b),f=void 0!==u?u:!!(null==s?void 0:s.some((e=>{if(e&&\"object\"==typeof e&&e.required&&!e.warningOnly)return!0;if(\"function\"==typeof e){const t=e(l);return(null==t?void 0:t.required)&&!(null==t?void 0:t.warningOnly)}return!1}))),p=Object.assign({},n);let g=null;if(k(!(a&&i),\"usage\",\"`shouldUpdate` and `dependencies` shouldn't be used together. See https://u.ant.design/form-deps.\"),Array.isArray(y)&&E)k(!1,\"usage\",\"A `Form.Item` with a `name` prop must have a single child element. For information on how to render more complex form items, see https://u.ant.design/complex-form-item.\"),g=y;else if(v&&(!a&&!i||E))k(!(!a&&!i),\"usage\",\"A `Form.Item` with a render function must have either `shouldUpdate` or `dependencies`.\"),k(!E,\"usage\",\"A `Form.Item` with a render function cannot be a field, and thus cannot have a `name` prop.\");else if(!i||v||E)if(React263.isValidElement(y)){k(void 0===y.props.defaultValue,\"usage\",\"`defaultValue` will not work on controlled Field. You should use `initialValues` of Form instead.\");const t=Object.assign(Object.assign({},y.props),p);if(t.id||(t.id=d),m||D.length>0||F.length>0||e.extra){const r=[];(m||D.length>0)&&r.push(`${d}_help`),e.extra&&r.push(`${d}_extra`),t[\"aria-describedby\"]=r.join(\" \")}D.length>0&&(t[\"aria-invalid\"]=\"true\"),f&&(t[\"aria-required\"]=\"true\"),supportRef(y)&&(t.ref=U(c,y)),new Set([].concat(_toConsumableArray(toArray4(h)),_toConsumableArray(toArray4(S)))).forEach((e=>{t[e]=function(){for(var t,r,n,i,o,a=arguments.length,s=new Array(a),l=0;l__left_angle_mark_a;l++)s[l]=arguments[l];null===(n=p[e])||void 0===n||(t=n).call.apply(t,[p].concat(s)),null===(o=(i=y.props)[e])||void 0===o||(r=o).call.apply(r,[i].concat(s))}}));const r=[t[\"aria-required\"],t[\"aria-invalid\"],t[\"aria-describedby\"]];g=React263.createElement(MemoInput,{control:p,update:y,childProps:r},cloneElement3(y,t))}else v&&(a||i)&&!E?g=y(l):(k(!c.length||!!r,\"usage\",\"`name` is only used for validate React element. If you are using Form.Item as layout display, please remove `name` instead.\"),g=y);else k(!1,\"usage\",\"Must set `name` or use a render function when `dependencies` is set.\");return z(g,d,f)})))}var FormItem=InternalFormItem;FormItem.useStatus=useFormItemStatus_default;var FormItem_default=FormItem;init_globals();var React264=__toESM(require_react()),__rest38=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)__left_angle_mark_0&&(r[n]=e[n]);if(null!=e&&\"function\"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i__left_angle_mark_n.length;i++)t.indexOf(n[i])__left_angle_mark_0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r},FormList=e=>{var{prefixCls:t,children:r}=e,n=__rest38(e,[\"prefixCls\",\"children\"]);devUseWarning(\"Form.List\")(\"number\"==typeof n.name||(Array.isArray(n.name)?!!n.name.length:!!n.name),\"usage\",\"Miss `name` prop.\");const{getPrefixCls:i}=React264.useContext(ConfigContext),o=i(\"form\",t),a=React264.useMemo((()=>({prefixCls:o,status:\"error\"})),[o]);return React264.createElement(List_default,Object.assign({},n),((e,t,n)=>React264.createElement(FormItemPrefixContext.Provider,{value:a},r(e.map((e=>Object.assign(Object.assign({},e),{fieldKey:e.key}))),t,{errors:n.errors,warnings:n.warnings}))))},FormList_default=FormList;init_globals();var import_react91=__toESM(require_react());function useFormInstance(){const{form:e}=(0,import_react91.useContext)(FormContext2);return e}var Form4=Form_default2;Form4.Item=FormItem_default,Form4.List=FormList_default,Form4.ErrorList=ErrorList_default,Form4.useForm=useForm2,Form4.useFormInstance=useFormInstance,Form4.useWatch=useWatch_default,Form4.Provider=FormProvider3,Form4.create=()=>{warning_default2(!1,\"Form\",\"antd v4 removed `Form.create`. Please remove or use `@ant-design/compatible` instead.\")};var form_default=Form4;init_globals();var React269=__toESM(require_react()),import_classnames99=__toESM(require_classnames());init_globals();var React267=__toESM(require_react()),import_classnames98=__toESM(require_classnames());init_globals();var React266=__toESM(require_react()),import_classnames97=__toESM(require_classnames());init_globals();var React265=__toESM(require_react()),import_classnames96=__toESM(require_classnames()),viewSize=100,borderWidth=viewSize/5,radius=viewSize/2-borderWidth/2,circumference=2*radius*Math.PI,position2=50,CustomCircle=e=>{const{dotClassName:t,style:r,hasCircleCls:n}=e;return React265.createElement(\"circle\",{className:(0,import_classnames96.default)(`${t}-circle`,{[`${t}-circle-bg`]:n}),r:radius,cx:position2,cy:position2,strokeWidth:borderWidth,style:r})},Progress=e=>{let{percent:t,prefixCls:r}=e;const n=`${r}-dot`,i=`${n}-holder`,o=`${i}-hidden`,[a,s]=React265.useState(!1);useLayoutEffect_default((()=>{0!==t&&s(!0)}),[0!==t]);const l=Math.max(Math.min(t,100),0);if(!a)return null;const u={strokeDashoffset:\"\"+circumference/4,strokeDasharray:`${circumference*l/100} ${circumference*(100-l)/100}`};return React265.createElement(\"span\",{className:(0,import_classnames96.default)(i,`${n}-progress`,l__left_angle_mark_=0&&o)},React265.createElement(\"svg\",{viewBox:`0 0 ${viewSize} ${viewSize}`,role:\"progressbar\",\"aria-valuemin\":0,\"aria-valuemax\":100,\"aria-valuenow\":l},React265.createElement(CustomCircle,{dotClassName:n,hasCircleCls:!0}),React265.createElement(CustomCircle,{dotClassName:n,style:u})))},Progress_default=Progress;function Looper(e){const{prefixCls:t,percent:r=0}=e,n=`${t}-dot`,i=`${n}-holder`,o=`${i}-hidden`;return React266.createElement(React266.Fragment,null,React266.createElement(\"span\",{className:(0,import_classnames97.default)(i,r>0&&o)},React266.createElement(\"span\",{className:(0,import_classnames97.default)(n,`${t}-dot-spin`)},[1,2,3,4].map((e=>React266.createElement(\"i\",{className:`${t}-dot-item`,key:e}))))),React266.createElement(Progress_default,{prefixCls:t,percent:r}))}function Indicator(e){const{prefixCls:t,indicator:r,percent:n}=e,i=`${t}-dot`;return r&&React267.isValidElement(r)?cloneElement3(r,{className:(0,import_classnames98.default)(r.props.className,i),percent:n}):React267.createElement(Looper,{prefixCls:t,percent:n})}init_globals();var antSpinMove=new Keyframes_default(\"antSpinMove\",{to:{opacity:1}}),antRotate=new Keyframes_default(\"antRotate\",{to:{transform:\"rotate(405deg)\"}}),genSpinStyle=e=>{const{componentCls:t,calc:r}=e;return{[t]:Object.assign(Object.assign({},resetComponent(e)),{position:\"absolute\",display:\"none\",color:e.colorPrimary,fontSize:0,textAlign:\"center\",verticalAlign:\"middle\",opacity:0,transition:`transform ${e.motionDurationSlow} ${e.motionEaseInOutCirc}`,\"&-spinning\":{position:\"relative\",display:\"inline-block\",opacity:1},[`${t}-text`]:{fontSize:e.fontSize,paddingTop:r(r(e.dotSize).sub(e.fontSize)).div(2).add(2).equal()},\"&-fullscreen\":{position:\"fixed\",width:\"100vw\",height:\"100vh\",backgroundColor:e.colorBgMask,zIndex:e.zIndexPopupBase,inset:0,display:\"flex\",alignItems:\"center\",flexDirection:\"column\",justifyContent:\"center\",opacity:0,visibility:\"hidden\",transition:`all ${e.motionDurationMid}`,\"&-show\":{opacity:1,visibility:\"visible\"},[t]:{[`${t}-dot-holder`]:{color:e.colorWhite},[`${t}-text`]:{color:e.colorTextLightSolid}}},\"&-nested-loading\":{position:\"relative\",[`> div > ${t}`]:{position:\"absolute\",top:0,insetInlineStart:0,zIndex:4,display:\"block\",width:\"100%\",height:\"100%\",maxHeight:e.contentHeight,[`${t}-dot`]:{position:\"absolute\",top:\"50%\",insetInlineStart:\"50%\",margin:r(e.dotSize).mul(-1).div(2).equal()},[`${t}-text`]:{position:\"absolute\",top:\"50%\",width:\"100%\",textShadow:`0 1px 2px ${e.colorBgContainer}`},[`&${t}-show-text ${t}-dot`]:{marginTop:r(e.dotSize).div(2).mul(-1).sub(10).equal()},\"&-sm\":{[`${t}-dot`]:{margin:r(e.dotSizeSM).mul(-1).div(2).equal()},[`${t}-text`]:{paddingTop:r(r(e.dotSizeSM).sub(e.fontSize)).div(2).add(2).equal()},[`&${t}-show-text ${t}-dot`]:{marginTop:r(e.dotSizeSM).div(2).mul(-1).sub(10).equal()}},\"&-lg\":{[`${t}-dot`]:{margin:r(e.dotSizeLG).mul(-1).div(2).equal()},[`${t}-text`]:{paddingTop:r(r(e.dotSizeLG).sub(e.fontSize)).div(2).add(2).equal()},[`&${t}-show-text ${t}-dot`]:{marginTop:r(e.dotSizeLG).div(2).mul(-1).sub(10).equal()}}},[`${t}-container`]:{position:\"relative\",transition:`opacity ${e.motionDurationSlow}`,\"&::after\":{position:\"absolute\",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,zIndex:10,width:\"100%\",height:\"100%\",background:e.colorBgContainer,opacity:0,transition:`all ${e.motionDurationSlow}`,content:'\"\"',pointerEvents:\"none\"}},[`${t}-blur`]:{clear:\"both\",opacity:.5,userSelect:\"none\",pointerEvents:\"none\",\"&::after\":{opacity:.4,pointerEvents:\"auto\"}}},\"&-tip\":{color:e.spinDotDefault},[`${t}-dot-holder`]:{width:\"1em\",height:\"1em\",fontSize:e.dotSize,display:\"inline-block\",transition:`transform ${e.motionDurationSlow} ease, opacity ${e.motionDurationSlow} ease`,transformOrigin:\"50% 50%\",lineHeight:1,color:e.colorPrimary,\"&-hidden\":{transform:\"scale(0.3)\",opacity:0}},[`${t}-dot-progress`]:{position:\"absolute\",top:\"50%\",transform:\"translate(-50%, -50%)\",insetInlineStart:\"50%\"},[`${t}-dot`]:{position:\"relative\",display:\"inline-block\",fontSize:e.dotSize,width:\"1em\",height:\"1em\",\"&-item\":{position:\"absolute\",display:\"block\",width:r(e.dotSize).sub(r(e.marginXXS).div(2)).div(2).equal(),height:r(e.dotSize).sub(r(e.marginXXS).div(2)).div(2).equal(),background:\"currentColor\",borderRadius:\"100%\",transform:\"scale(0.75)\",transformOrigin:\"50% 50%\",opacity:.3,animationName:antSpinMove,animationDuration:\"1s\",animationIterationCount:\"infinite\",animationTimingFunction:\"linear\",animationDirection:\"alternate\",\"&:nth-child(1)\":{top:0,insetInlineStart:0,animationDelay:\"0s\"},\"&:nth-child(2)\":{top:0,insetInlineEnd:0,animationDelay:\"0.4s\"},\"&:nth-child(3)\":{insetInlineEnd:0,bottom:0,animationDelay:\"0.8s\"},\"&:nth-child(4)\":{bottom:0,insetInlineStart:0,animationDelay:\"1.2s\"}},\"&-spin\":{transform:\"rotate(45deg)\",animationName:antRotate,animationDuration:\"1.2s\",animationIterationCount:\"infinite\",animationTimingFunction:\"linear\"},\"&-circle\":{strokeLinecap:\"round\",transition:[\"stroke-dashoffset\",\"stroke-dasharray\",\"stroke\",\"stroke-width\",\"opacity\"].map((t=>`${t} ${e.motionDurationSlow} ease`)).join(\",\"),fillOpacity:0,stroke:\"currentcolor\"},\"&-circle-bg\":{stroke:e.colorFillSecondary}},[`&-sm ${t}-dot`]:{\"&, &-holder\":{fontSize:e.dotSizeSM}},[`&-sm ${t}-dot-holder`]:{i:{width:r(r(e.dotSizeSM).sub(r(e.marginXXS).div(2))).div(2).equal(),height:r(r(e.dotSizeSM).sub(r(e.marginXXS).div(2))).div(2).equal()}},[`&-lg ${t}-dot`]:{\"&, &-holder\":{fontSize:e.dotSizeLG}},[`&-lg ${t}-dot-holder`]:{i:{width:r(r(e.dotSizeLG).sub(e.marginXXS)).div(2).equal(),height:r(r(e.dotSizeLG).sub(e.marginXXS)).div(2).equal()}},[`&${t}-show-text ${t}-text`]:{display:\"block\"}})}},prepareComponentToken14=e=>{const{controlHeightLG:t,controlHeight:r}=e;return{contentHeight:400,dotSize:t/2,dotSizeSM:.35*t,dotSizeLG:r}},style_default19=genStyleHooks(\"Spin\",(e=>{const t=merge2(e,{spinDotDefault:e.colorTextDescription});return[genSpinStyle(t)]}),prepareComponentToken14);init_globals();var React268=__toESM(require_react()),AUTO_INTERVAL=200,STEP_BUCKETS=[[30,.05],[70,.03],[96,.01]];function usePercent(e,t){const[r,n]=React268.useState(0),i=React268.useRef(),o=\"auto\"===t;return React268.useEffect((()=>(o&&e&&(n(0),i.current=setInterval((()=>{n((e=>{const t=100-e;for(let r=0;r__left_angle_mark_STEP_BUCKETS.length;r+=1){const[n,i]=STEP_BUCKETS[r];if(e__left_angle_mark_=n)return e+t*i}return e}))}),AUTO_INTERVAL)),()=>{clearInterval(i.current)})),[o,e]),o?r:t}var __rest39=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)__left_angle_mark_0&&(r[n]=e[n]);if(null!=e&&\"function\"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i__left_angle_mark_n.length;i++)t.indexOf(n[i])__left_angle_mark_0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r},defaultIndicator;function shouldDelay(e,t){return!!e&&!!t&&!isNaN(Number(t))}var Spin=e=>{var t;const{prefixCls:r,spinning:n=!0,delay:i=0,className:o,rootClassName:a,size:s=\"default\",tip:l,wrapperClassName:u,style:c,children:d,fullscreen:h=!1,indicator:f,percent:p}=e,m=__rest39(e,[\"prefixCls\",\"spinning\",\"delay\",\"className\",\"rootClassName\",\"size\",\"tip\",\"wrapperClassName\",\"style\",\"children\",\"fullscreen\",\"indicator\",\"percent\"]),{getPrefixCls:g,direction:_,spin:b}=React269.useContext(ConfigContext),y=g(\"spin\",r),[v,A,w]=style_default19(y),[S,E]=React269.useState((()=>n&&!shouldDelay(n,i))),x=usePercent(S,p);React269.useEffect((()=>{if(n){const e=debounce(i,(()=>{E(!0)}));return e(),()=>{var t;null===(t=null==e?void 0:e.cancel)||void 0===t||t.call(e)}}E(!1)}),[i,n]);const C=React269.useMemo((()=>void 0!==d&&!h),[d,h]);devUseWarning(\"Spin\")(!l||C||h,\"usage\",\"`tip` only work in nest or fullscreen pattern.\");const T=(0,import_classnames99.default)(y,null==b?void 0:b.className,{[`${y}-sm`]:\"small\"===s,[`${y}-lg`]:\"large\"===s,[`${y}-spinning`]:S,[`${y}-show-text`]:!!l,[`${y}-rtl`]:\"rtl\"===_},o,!h&&a,A,w),R=(0,import_classnames99.default)(`${y}-container`,{[`${y}-blur`]:S}),I=null!==(t=null!=f?f:null==b?void 0:b.indicator)&&void 0!==t?t:defaultIndicator,k=Object.assign(Object.assign({},null==b?void 0:b.style),c),P=React269.createElement(\"div\",Object.assign({},m,{style:k,className:T,\"aria-live\":\"polite\",\"aria-busy\":S}),React269.createElement(Indicator,{prefixCls:y,indicator:I,percent:x}),l&&(C||h)?React269.createElement(\"div\",{className:`${y}-text`},l):null);return v(C?React269.createElement(\"div\",Object.assign({},m,{className:(0,import_classnames99.default)(`${y}-nested-loading`,u,A,w)}),S&&React269.createElement(\"div\",{key:\"loading\"},P),React269.createElement(\"div\",{className:R,key:\"container\"},d)):h?React269.createElement(\"div\",{className:(0,import_classnames99.default)(`${y}-fullscreen`,{[`${y}-fullscreen-show`]:S},a,A,w)},P):P)};Spin.setDefaultIndicator=e=>{defaultIndicator=e},Spin.displayName=\"Spin\";var spin_default=Spin;init_globals();var import_react92=__toESM(require_react()),message=null,act=e=>e(),taskQueue=[],defaultGlobalConfig={};function getGlobalContext(){const{getContainer:e,duration:t,rtl:r,maxCount:n,top:i}=defaultGlobalConfig,o=(null==e?void 0:e())||document.body;return{getContainer:()=>o,duration:t,rtl:r,maxCount:n,top:i}}var GlobalHolder=import_react92.default.forwardRef(((e,t)=>{const{messageConfig:r,sync:n}=e,{getPrefixCls:i}=(0,import_react92.useContext)(ConfigContext),o=defaultGlobalConfig.prefixCls||i(\"message\"),a=(0,import_react92.useContext)(AppConfigContext),[s,l]=useInternalMessage(Object.assign(Object.assign(Object.assign({},r),{prefixCls:o}),a.message));return import_react92.default.useImperativeHandle(t,(()=>{const e=Object.assign({},s);return Object.keys(e).forEach((t=>{e[t]=function(){return n(),s[t].apply(s,arguments)}})),{instance:e,sync:n}})),l})),GlobalHolderWrapper=import_react92.default.forwardRef(((e,t)=>{const[r,n]=import_react92.default.useState(getGlobalContext),i=()=>{n(getGlobalContext)};import_react92.default.useEffect(i,[]);const o=globalConfig(),a=o.getRootPrefixCls(),s=o.getIconPrefixCls(),l=o.getTheme(),u=import_react92.default.createElement(GlobalHolder,{ref:t,sync:i,messageConfig:r});return import_react92.default.createElement(config_provider_default,{prefixCls:a,iconPrefixCls:s,theme:l},o.holderRender?o.holderRender(u):u)}));function flushNotice(){if(!message){const e=document.createDocumentFragment(),t={fragment:e};return message=t,void act((()=>{render3(import_react92.default.createElement(GlobalHolderWrapper,{ref:e=>{const{instance:r,sync:n}=e||{};Promise.resolve().then((()=>{!t.instance&&r&&(t.instance=r,t.sync=n,flushNotice())}))}}),e)}))}message.instance&&(taskQueue.forEach((e=>{const{type:t,skipped:r}=e;if(!r)switch(t){case\"open\":act((()=>{const t=message.instance.open(Object.assign(Object.assign({},defaultGlobalConfig),e.config));null==t||t.then(e.resolve),e.setCloseFn(t)}));break;case\"destroy\":act((()=>{null==message||message.instance.destroy(e.key)}));break;default:act((()=>{var r;const n=(r=message.instance)[t].apply(r,_toConsumableArray(e.args));null==n||n.then(e.resolve),e.setCloseFn(n)}))}})),taskQueue=[])}function setMessageGlobalConfig(e){defaultGlobalConfig=Object.assign(Object.assign({},defaultGlobalConfig),e),act((()=>{var e;null===(e=null==message?void 0:message.sync)||void 0===e||e.call(message)}))}function open(e){const t=wrapPromiseFn((t=>{let r;const n={type:\"open\",config:e,resolve:t,setCloseFn:e=>{r=e}};return taskQueue.push(n),()=>{r?act((()=>{r()})):n.skipped=!0}}));return flushNotice(),t}function typeOpen(e,t){globalConfig().holderRender||warnContext(\"message\");const r=wrapPromiseFn((r=>{let n;const i={type:e,args:t,resolve:r,setCloseFn:e=>{n=e}};return taskQueue.push(i),()=>{n?act((()=>{n()})):i.skipped=!0}}));return flushNotice(),r}var destroy=e=>{taskQueue.push({type:\"destroy\",key:e}),flushNotice()},methods=[\"success\",\"info\",\"warning\",\"error\",\"loading\"],baseStaticMethods={open:open,destroy:destroy,config:setMessageGlobalConfig,useMessage:useMessage,_InternalPanelDoNotUseOrYouWillBeFired:PurePanel_default},staticMethods=baseStaticMethods;methods.forEach((e=>{staticMethods[e]=function(){for(var t=arguments.length,r=new Array(t),n=0;n__left_angle_mark_t;n++)r[n]=arguments[n];return typeOpen(e,r)}}));var message_default=staticMethods;init_globals(),init_globals();var React271=__toESM(require_react()),import_classnames100=__toESM(require_classnames()),__rest40=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)__left_angle_mark_0&&(r[n]=e[n]);if(null!=e&&\"function\"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i__left_angle_mark_n.length;i++)t.indexOf(n[i])__left_angle_mark_0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r},PurePanel5=e=>{const{prefixCls:t,className:r,closeIcon:n,closable:i,type:o,title:a,children:s,footer:l}=e,u=__rest40(e,[\"prefixCls\",\"className\",\"closeIcon\",\"closable\",\"type\",\"title\",\"children\",\"footer\"]),{getPrefixCls:c}=React271.useContext(ConfigContext),d=c(),h=t||c(\"modal\"),f=useCSSVarCls_default(d),[p,m,g]=style_default7(h,f),_=`${h}-confirm`;let b={};return b=o?{closable:null!=i&&i,title:\"\",footer:\"\",children:React271.createElement(ConfirmContent,Object.assign({},e,{prefixCls:h,confirmPrefixCls:_,rootPrefixCls:d,content:s}))}:{closable:null==i||i,title:a,footer:null!==l&&React271.createElement(Footer,Object.assign({},e)),children:s},p(React271.createElement(Panel_default,Object.assign({prefixCls:h,className:(0,import_classnames100.default)(m,`${h}-pure-panel`,o&&_,o&&`${_}-${o}`,r,g,f)},u,{closeIcon:renderCloseIcon(h,n),closable:i},b)))},PurePanel_default4=withPureRenderTheme(PurePanel5);function modalWarn(e){return confirm(withWarn(e))}var Modal2=Modal_default;Modal2.useModal=useModal_default,Modal2.info=function(e){return confirm(withInfo(e))},Modal2.success=function(e){return confirm(withSuccess(e))},Modal2.error=function(e){return confirm(withError(e))},Modal2.warning=modalWarn,Modal2.warn=modalWarn,Modal2.confirm=function(e){return confirm(withConfirm(e))},Modal2.destroyAll=function(){for(;destroyFns_default.length;){const e=destroyFns_default.pop();e&&e()}},Modal2.config=modalGlobalConfig,Modal2._InternalPanelDoNotUseOrYouWillBeFired=PurePanel_default4,Modal2.displayName=\"Modal\";var modal_default=Modal2;init_globals(),init_globals();var React279=__toESM(require_react()),import_classnames106=__toESM(require_classnames());init_globals();var React276=__toESM(require_react()),import_classnames103=__toESM(require_classnames());init_globals(),init_globals();var React272=__toESM(require_react()),import_classnames101=__toESM(require_classnames());init_globals();var import_react93=__toESM(require_react()),defaultProps={percent:0,prefixCls:\"rc-progress\",strokeColor:\"#2db7f5\",strokeLinecap:\"round\",strokeWidth:1,trailColor:\"#D9D9D9\",trailWidth:1,gapPosition:\"bottom\"},useTransitionDuration=function(){var e=(0,import_react93.useRef)([]),t=(0,import_react93.useRef)(null);return(0,import_react93.useEffect)((function(){var r=Date.now(),n=!1;e.current.forEach((function(e){if(e){n=!0;var i=e.style;i.transitionDuration=\".3s, .3s, .3s, .06s\",t.current&&r-t.current__left_angle_mark_100&&(i.transitionDuration=\"0s, 0s\")}})),n&&(t.current=Date.now())})),e.current},_excluded41=[\"className\",\"percent\",\"prefixCls\",\"strokeColor\",\"strokeLinecap\",\"strokeWidth\",\"style\",\"trailColor\",\"trailWidth\",\"transition\"],Line=function(e){var t=_objectSpread2(_objectSpread2({},defaultProps),e),r=t.className,n=t.percent,i=t.prefixCls,o=t.strokeColor,a=t.strokeLinecap,s=t.strokeWidth,l=t.style,u=t.trailColor,c=t.trailWidth,d=t.transition,h=_objectWithoutProperties(t,_excluded41);delete h.gapPosition;var f=Array.isArray(n)?n:[n],p=Array.isArray(o)?o:[o],m=useTransitionDuration(),g=s/2,_=100-s/2,b=\"M \".concat(\"round\"===a?g:0,\",\").concat(g,\"\\n L \").concat(\"round\"===a?_:100,\",\").concat(g),y=\"0 0 100 \".concat(s),v=0;return React272.createElement(\"svg\",_extends({className:(0,import_classnames101.default)(\"\".concat(i,\"-line\"),r),viewBox:y,preserveAspectRatio:\"none\",style:l},h),React272.createElement(\"path\",{className:\"\".concat(i,\"-line-trail\"),d:b,strokeLinecap:a,stroke:u,strokeWidth:c||s,fillOpacity:\"0\"}),f.map((function(e,t){var r=1;switch(a){case\"round\":r=1-s/100;break;case\"square\":r=1-s/2/100;break;default:r=1}var n={strokeDasharray:\"\".concat(e*r,\"px, 100px\"),strokeDashoffset:\"-\".concat(v,\"px\"),transition:d||\"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear\"},o=p[t]||p[p.length-1];return v+=e,React272.createElement(\"path\",{key:t,className:\"\".concat(i,\"-line-path\"),d:b,strokeLinecap:a,stroke:o,strokeWidth:s,fillOpacity:\"0\",ref:function(e){m[t]=e},style:n})})))};Line.displayName=\"Line\",init_globals();var React275=__toESM(require_react()),import_classnames102=__toESM(require_classnames());init_globals();var React273=__toESM(require_react()),uuid5=0,isBrowserClient=canUseDom();function getUUID(){var e;return isBrowserClient?(e=uuid5,uuid5+=1):e=\"TEST_OR_SSR\",e}var useId_default2=function(e){var t=_slicedToArray(React273.useState(),2),r=t[0],n=t[1];return React273.useEffect((function(){n(\"rc_progress_\".concat(getUUID()))}),[]),e||r};init_globals();var React274=__toESM(require_react()),Block=function(e){var t=e.bg,r=e.children;return React274.createElement(\"div\",{style:{width:\"100%\",height:\"100%\",background:t}},r)};function getPtgColors(e,t){return Object.keys(e).map((function(r){var n=parseFloat(r),i=\"\".concat(Math.floor(n*t),\"%\");return\"\".concat(e[r],\" \").concat(i)}))}var PtgCircle=React274.forwardRef((function(e,t){var r=e.prefixCls,n=e.color,i=e.gradientId,o=e.radius,a=e.style,s=e.ptg,l=e.strokeLinecap,u=e.strokeWidth,c=e.size,d=e.gapDegree,h=n&&\"object\"===_typeof(n),f=h?\"#FFF\":void 0,p=c/2,m=React274.createElement(\"circle\",{className:\"\".concat(r,\"-circle-path\"),r:o,cx:p,cy:p,stroke:f,strokeLinecap:l,strokeWidth:u,opacity:0===s?0:1,style:a,ref:t});if(!h)return m;var g=\"\".concat(i,\"-conic\"),_=d?\"\".concat(180+d/2,\"deg\"):\"0deg\",b=getPtgColors(n,(360-d)/360),y=getPtgColors(n,1),v=\"conic-gradient(from \".concat(_,\", \").concat(b.join(\", \"),\")\"),A=\"linear-gradient(to \".concat(d?\"bottom\":\"top\",\", \").concat(y.join(\", \"),\")\");return React274.createElement(React274.Fragment,null,React274.createElement(\"mask\",{id:g},m),React274.createElement(\"foreignObject\",{x:0,y:0,width:c,height:c,mask:\"url(#\".concat(g,\")\")},React274.createElement(Block,{bg:A},React274.createElement(Block,{bg:v}))))}));PtgCircle.displayName=\"PtgCircle\";var PtgCircle_default=PtgCircle;init_globals();var VIEW_BOX_SIZE=100,getCircleStyle=function(e,t,r,n,i,o,a,s,l,u){var c=arguments.length>10&&void 0!==arguments[10]?arguments[10]:0,d=r/100*360*((360-o)/360),h=0===o?0:{bottom:0,top:180,left:90,right:-90}[a],f=(100-n)/100*t;\"round\"===l&&100!==n&&(f+=u/2)>=t&&(f=t-.01);var p=VIEW_BOX_SIZE/2;return{stroke:\"string\"==typeof s?s:void 0,strokeDasharray:\"\".concat(t,\"px \").concat(e),strokeDashoffset:f+c,transform:\"rotate(\".concat(i+d+h,\"deg)\"),transformOrigin:\"\".concat(p,\"px \").concat(p,\"px\"),transition:\"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s\",fillOpacity:0}},_excluded42=[\"id\",\"prefixCls\",\"steps\",\"strokeWidth\",\"trailWidth\",\"gapDegree\",\"gapPosition\",\"trailColor\",\"strokeLinecap\",\"style\",\"className\",\"strokeColor\",\"percent\"];function toArray5(e){var t=null!=e?e:[];return Array.isArray(t)?t:[t]}var Circle=function(e){var t,r,n,i=_objectSpread2(_objectSpread2({},defaultProps),e),o=i.id,a=i.prefixCls,s=i.steps,l=i.strokeWidth,u=i.trailWidth,c=i.gapDegree,d=void 0===c?0:c,h=i.gapPosition,f=i.trailColor,p=i.strokeLinecap,m=i.style,g=i.className,_=i.strokeColor,b=i.percent,y=_objectWithoutProperties(i,_excluded42),v=VIEW_BOX_SIZE/2,A=useId_default2(o),w=\"\".concat(A,\"-gradient\"),S=v-l/2,E=2*Math.PI*S,x=d>0?90+d/2:-90,C=E*((360-d)/360),T=\"object\"===_typeof(s)?s:{count:s,gap:2},R=T.count,I=T.gap,k=toArray5(b),P=toArray5(_),M=P.find((function(e){return e&&\"object\"===_typeof(e)})),O=M&&\"object\"===_typeof(M)?\"butt\":p,B=getCircleStyle(E,C,0,100,x,d,h,f,O,l),N=useTransitionDuration();return React275.createElement(\"svg\",_extends({className:(0,import_classnames102.default)(\"\".concat(a,\"-circle\"),g),viewBox:\"0 0 \".concat(VIEW_BOX_SIZE,\" \").concat(VIEW_BOX_SIZE),style:m,id:o,role:\"presentation\"},y),!R&&React275.createElement(\"circle\",{className:\"\".concat(a,\"-circle-trail\"),r:S,cx:v,cy:v,stroke:f,strokeLinecap:O,strokeWidth:u||l,style:B}),R?(t=Math.round(R*(k[0]/100)),r=100/R,n=0,new Array(R).fill(null).map((function(e,i){var o=i__left_angle_mark_=t-1?P[0]:f,s=o&&\"object\"===_typeof(o)?\"url(#\".concat(w,\")\"):void 0,u=getCircleStyle(E,C,n,r,x,d,h,o,\"butt\",l,I);return n+=100*(C-u.strokeDashoffset+I)/C,React275.createElement(\"circle\",{key:i,className:\"\".concat(a,\"-circle-path\"),r:S,cx:v,cy:v,stroke:s,strokeWidth:l,opacity:1,style:u,ref:function(e){N[i]=e}})}))):function(){var e=0;return k.map((function(t,r){var n=P[r]||P[P.length-1],i=getCircleStyle(E,C,e,t,x,d,h,n,O,l);return e+=t,React275.createElement(PtgCircle_default,{key:r,color:n,ptg:t,radius:S,prefixCls:a,gradientId:w,style:i,strokeLinecap:O,strokeWidth:l,gapDegree:d,ref:function(e){N[r]=e},size:VIEW_BOX_SIZE})})).reverse()}())};Circle.displayName=\"Circle\";var Circle_default=Circle;function validProgress(e){return!e||e__left_angle_mark_0?0:e>100?100:e}function getSuccessPercent(e){let{success:t,successPercent:r}=e,n=r;return t&&\"progress\"in t&&(n=t.progress),t&&\"percent\"in t&&(n=t.percent),n}init_globals();var getPercentage=e=>{let{percent:t,success:r,successPercent:n}=e;const i=validProgress(getSuccessPercent({success:r,successPercent:n}));return[i,validProgress(validProgress(t)-i)]},getStrokeColor=e=>{let{success:t={},strokeColor:r}=e;const{strokeColor:n}=t;return[n||presetPrimaryColors.green,r||null]},getSize=(e,t,r)=>{var n,i,o,a;let s=-1,l=-1;if(\"step\"===t){const t=r.steps,n=r.strokeWidth;\"string\"==typeof e||void 0===e?(s=\"small\"===e?2:14,l=null!=n?n:8):\"number\"==typeof e?[s,l]=[e,e]:[s=14,l=8]=Array.isArray(e)?e:[e.width,e.height],s*=t}else if(\"line\"===t){const t=null==r?void 0:r.strokeWidth;\"string\"==typeof e||void 0===e?l=t||(\"small\"===e?6:8):\"number\"==typeof e?[s,l]=[e,e]:[s=-1,l=8]=Array.isArray(e)?e:[e.width,e.height]}else\"circle\"!==t&&\"dashboard\"!==t||(\"string\"==typeof e||void 0===e?[s,l]=\"small\"===e?[60,60]:[120,120]:\"number\"==typeof e?[s,l]=[e,e]:Array.isArray(e)&&(s=null!==(i=null!==(n=e[0])&&void 0!==n?n:e[1])&&void 0!==i?i:120,l=null!==(a=null!==(o=e[0])&&void 0!==o?o:e[1])&&void 0!==a?a:120));return[s,l]},CIRCLE_MIN_STROKE_WIDTH=3,getMinPercent=e=>CIRCLE_MIN_STROKE_WIDTH/e*100,Circle3=e=>{const{prefixCls:t,trailColor:r=null,strokeLinecap:n=\"round\",gapPosition:i,gapDegree:o,width:a=120,type:s,children:l,success:u,size:c=a,steps:d}=e,[h,f]=getSize(c,\"circle\");let{strokeWidth:p}=e;void 0===p&&(p=Math.max(getMinPercent(h),6));const m={width:h,height:f,fontSize:.15*h+6},g=React276.useMemo((()=>o||0===o?o:\"dashboard\"===s?75:void 0),[o,s]),_=getPercentage(e),b=i||\"dashboard\"===s&&\"bottom\"||void 0,y=\"[object Object]\"===Object.prototype.toString.call(e.strokeColor),v=getStrokeColor({success:u,strokeColor:e.strokeColor}),A=(0,import_classnames103.default)(`${t}-inner`,{[`${t}-circle-gradient`]:y}),w=React276.createElement(Circle_default,{steps:d,percent:d?_[1]:_,strokeWidth:p,trailWidth:p,strokeColor:d?v[1]:v,strokeLinecap:n,trailColor:r,prefixCls:t,gapDegree:g,gapPosition:b}),S=h__left_angle_mark_=20,E=React276.createElement(\"div\",{className:A,style:m},w,!S&&l);return S?React276.createElement(tooltip_default,{title:l},E):E},Circle_default2=Circle3;init_globals();var React277=__toESM(require_react()),import_classnames104=__toESM(require_classnames());init_globals();var LineStrokeColorVar=\"--progress-line-stroke-color\",Percent=\"--progress-percent\",genAntProgressActive=e=>{const t=e?\"100%\":\"-100%\";return new Keyframes_default(`antProgress${e?\"RTL\":\"LTR\"}Active`,{\"0%\":{transform:`translateX(${t}) scaleX(0)`,opacity:.1},\"20%\":{transform:`translateX(${t}) scaleX(0)`,opacity:.5},to:{transform:\"translateX(0) scaleX(1)\",opacity:0}})},genBaseStyle4=e=>{const{componentCls:t,iconCls:r}=e;return{[t]:Object.assign(Object.assign({},resetComponent(e)),{display:\"inline-block\",\"&-rtl\":{direction:\"rtl\"},\"&-line\":{position:\"relative\",width:\"100%\",fontSize:e.fontSize},[`${t}-outer`]:{display:\"inline-flex\",alignItems:\"center\",width:\"100%\"},[`${t}-inner`]:{position:\"relative\",display:\"inline-block\",width:\"100%\",flex:1,overflow:\"hidden\",verticalAlign:\"middle\",backgroundColor:e.remainingColor,borderRadius:e.lineBorderRadius},[`${t}-inner:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.defaultColor}},[`${t}-success-bg, ${t}-bg`]:{position:\"relative\",background:e.defaultColor,borderRadius:e.lineBorderRadius,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOutCirc}`},[`${t}-layout-bottom`]:{display:\"flex\",flexDirection:\"column\",alignItems:\"center\",justifyContent:\"center\",[`${t}-text`]:{width:\"max-content\",marginInlineStart:0,marginTop:e.marginXXS}},[`${t}-bg`]:{overflow:\"hidden\",\"&::after\":{content:'\"\"',background:{_multi_value_:!0,value:[\"inherit\",`var(${LineStrokeColorVar})`]},height:\"100%\",width:`calc(1 / var(${Percent}) * 100%)`,display:\"block\"},[`&${t}-bg-inner`]:{minWidth:\"max-content\",\"&::after\":{content:\"none\"},[`${t}-text-inner`]:{color:e.colorWhite,[`&${t}-text-bright`]:{color:\"rgba(0, 0, 0, 0.45)\"}}}},[`${t}-success-bg`]:{position:\"absolute\",insetBlockStart:0,insetInlineStart:0,backgroundColor:e.colorSuccess},[`${t}-text`]:{display:\"inline-block\",marginInlineStart:e.marginXS,color:e.colorText,lineHeight:1,width:\"2em\",whiteSpace:\"nowrap\",textAlign:\"start\",verticalAlign:\"middle\",wordBreak:\"normal\",[r]:{fontSize:e.fontSize},[`&${t}-text-outer`]:{width:\"max-content\"},[`&${t}-text-outer${t}-text-start`]:{width:\"max-content\",marginInlineStart:0,marginInlineEnd:e.marginXS}},[`${t}-text-inner`]:{display:\"flex\",justifyContent:\"center\",alignItems:\"center\",width:\"100%\",height:\"100%\",marginInlineStart:0,padding:`0 ${unit(e.paddingXXS)}`,[`&${t}-text-start`]:{justifyContent:\"start\"},[`&${t}-text-end`]:{justifyContent:\"end\"}},[`&${t}-status-active`]:{[`${t}-bg::before`]:{position:\"absolute\",inset:0,backgroundColor:e.colorBgContainer,borderRadius:e.lineBorderRadius,opacity:0,animationName:genAntProgressActive(),animationDuration:e.progressActiveMotionDuration,animationTimingFunction:e.motionEaseOutQuint,animationIterationCount:\"infinite\",content:'\"\"'}},[`&${t}-rtl${t}-status-active`]:{[`${t}-bg::before`]:{animationName:genAntProgressActive(!0)}},[`&${t}-status-exception`]:{[`${t}-bg`]:{backgroundColor:e.colorError},[`${t}-text`]:{color:e.colorError}},[`&${t}-status-exception ${t}-inner:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.colorError}},[`&${t}-status-success`]:{[`${t}-bg`]:{backgroundColor:e.colorSuccess},[`${t}-text`]:{color:e.colorSuccess}},[`&${t}-status-success ${t}-inner:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.colorSuccess}}})}},genCircleStyle=e=>{const{componentCls:t,iconCls:r}=e;return{[t]:{[`${t}-circle-trail`]:{stroke:e.remainingColor},[`&${t}-circle ${t}-inner`]:{position:\"relative\",lineHeight:1,backgroundColor:\"transparent\"},[`&${t}-circle ${t}-text`]:{position:\"absolute\",insetBlockStart:\"50%\",insetInlineStart:0,width:\"100%\",margin:0,padding:0,color:e.circleTextColor,fontSize:e.circleTextFontSize,lineHeight:1,whiteSpace:\"normal\",textAlign:\"center\",transform:\"translateY(-50%)\",[r]:{fontSize:e.circleIconFontSize}},[`${t}-circle&-status-exception`]:{[`${t}-text`]:{color:e.colorError}},[`${t}-circle&-status-success`]:{[`${t}-text`]:{color:e.colorSuccess}}},[`${t}-inline-circle`]:{lineHeight:1,[`${t}-inner`]:{verticalAlign:\"bottom\"}}}},genStepStyle=e=>{const{componentCls:t}=e;return{[t]:{[`${t}-steps`]:{display:\"inline-block\",\"&-outer\":{display:\"flex\",flexDirection:\"row\",alignItems:\"center\"},\"&-item\":{flexShrink:0,minWidth:e.progressStepMinWidth,marginInlineEnd:e.progressStepMarginInlineEnd,backgroundColor:e.remainingColor,transition:`all ${e.motionDurationSlow}`,\"&-active\":{backgroundColor:e.defaultColor}}}}}},genSmallLine=e=>{const{componentCls:t,iconCls:r}=e;return{[t]:{[`${t}-small&-line, ${t}-small&-line ${t}-text ${r}`]:{fontSize:e.fontSizeSM}}}},prepareComponentToken15=e=>({circleTextColor:e.colorText,defaultColor:e.colorInfo,remainingColor:e.colorFillSecondary,lineBorderRadius:100,circleTextFontSize:\"1em\",circleIconFontSize:e.fontSize/e.fontSizeSM+\"em\"}),style_default20=genStyleHooks(\"Progress\",(e=>{const t=e.calc(e.marginXXS).div(2).equal(),r=merge2(e,{progressStepMarginInlineEnd:t,progressStepMinWidth:t,progressActiveMotionDuration:\"2.4s\"});return[genBaseStyle4(r),genCircleStyle(r),genStepStyle(r),genSmallLine(r)]}),prepareComponentToken15),__rest41=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)__left_angle_mark_0&&(r[n]=e[n]);if(null!=e&&\"function\"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i__left_angle_mark_n.length;i++)t.indexOf(n[i])__left_angle_mark_0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r},sortGradient=e=>{let t=[];return Object.keys(e).forEach((r=>{const n=parseFloat(r.replace(/%/g,\"\"));isNaN(n)||t.push({key:n,value:e[r]})})),t=t.sort(((e,t)=>e.key-t.key)),t.map((e=>{let{key:t,value:r}=e;return`${r} ${t}%`})).join(\", \")},handleGradient=(e,t)=>{const{from:r=presetPrimaryColors.blue,to:n=presetPrimaryColors.blue,direction:i=(\"rtl\"===t?\"to left\":\"to right\")}=e,o=__rest41(e,[\"from\",\"to\",\"direction\"]);if(0!==Object.keys(o).length){const e=`linear-gradient(${i}, ${sortGradient(o)})`;return{background:e,[LineStrokeColorVar]:e}}const a=`linear-gradient(${i}, ${r}, ${n})`;return{background:a,[LineStrokeColorVar]:a}},Line3=e=>{const{prefixCls:t,direction:r,percent:n,size:i,strokeWidth:o,strokeColor:a,strokeLinecap:s=\"round\",children:l,trailColor:u=null,percentPosition:c,success:d}=e,{align:h,type:f}=c,p=a&&\"string\"!=typeof a?handleGradient(a,r):{[LineStrokeColorVar]:a,background:a},m=\"square\"===s||\"butt\"===s?0:void 0,g=null!=i?i:[-1,o||(\"small\"===i?6:8)],[_,b]=getSize(g,\"line\",{strokeWidth:o});devUseWarning(\"Progress\").deprecated(!(\"strokeWidth\"in e),\"strokeWidth\",\"size\");const y={backgroundColor:u||void 0,borderRadius:m},v=Object.assign(Object.assign({width:`${validProgress(n)}%`,height:b,borderRadius:m},p),{[Percent]:validProgress(n)/100}),A=getSuccessPercent(e),w={width:`${validProgress(A)}%`,height:b,borderRadius:m,backgroundColor:null==d?void 0:d.strokeColor},S={width:___left_angle_mark_0?\"100%\":_},E=React277.createElement(\"div\",{className:`${t}-inner`,style:y},React277.createElement(\"div\",{className:(0,import_classnames104.default)(`${t}-bg`,`${t}-bg-${f}`),style:v},\"inner\"===f&&l),void 0!==A&&React277.createElement(\"div\",{className:`${t}-success-bg`,style:w})),x=\"outer\"===f&&\"start\"===h,C=\"outer\"===f&&\"end\"===h;return\"outer\"===f&&\"center\"===h?React277.createElement(\"div\",{className:`${t}-layout-bottom`},E,l):React277.createElement(\"div\",{className:`${t}-outer`,style:S},x&&l,E,C&&l)},Line_default2=Line3;init_globals();var React278=__toESM(require_react()),import_classnames105=__toESM(require_classnames()),Steps=e=>{const{size:t,steps:r,percent:n=0,strokeWidth:i=8,strokeColor:o,trailColor:a=null,prefixCls:s,children:l}=e,u=Math.round(r*(n/100)),c=null!=t?t:[\"small\"===t?2:14,i],[d,h]=getSize(c,\"step\",{steps:r,strokeWidth:i}),f=d/r,p=new Array(r);for(let m=0;m__left_angle_mark_r;m++){const e=Array.isArray(o)?o[m]:o;p[m]=React278.createElement(\"div\",{key:m,className:(0,import_classnames105.default)(`${s}-steps-item`,{[`${s}-steps-item-active`]:m__left_angle_mark_=u-1}),style:{backgroundColor:m__left_angle_mark_=u-1?e:a,width:f,height:h}})}return React278.createElement(\"div\",{className:`${s}-steps-outer`},p,l)},Steps_default=Steps,__rest42=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)__left_angle_mark_0&&(r[n]=e[n]);if(null!=e&&\"function\"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i__left_angle_mark_n.length;i++)t.indexOf(n[i])__left_angle_mark_0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r},ProgressStatuses=[\"normal\",\"exception\",\"active\",\"success\"],Progress2=React279.forwardRef(((e,t)=>{const{prefixCls:r,className:n,rootClassName:i,steps:o,strokeColor:a,percent:s=0,size:l=\"default\",showInfo:u=!0,type:c=\"line\",status:d,format:h,style:f,percentPosition:p={}}=e,m=__rest42(e,[\"prefixCls\",\"className\",\"rootClassName\",\"steps\",\"strokeColor\",\"percent\",\"size\",\"showInfo\",\"type\",\"status\",\"format\",\"style\",\"percentPosition\"]),{align:g=\"end\",type:_=\"outer\"}=p,b=Array.isArray(a)?a[0]:a,y=\"string\"==typeof a||Array.isArray(a)?a:void 0,v=React279.useMemo((()=>{if(b){const e=\"string\"==typeof b?b:Object.values(b)[0];return new TinyColor(e).isLight()}return!1}),[a]),A=React279.useMemo((()=>{var t,r;const n=getSuccessPercent(e);return parseInt(void 0!==n?null===(t=null!=n?n:0)||void 0===t?void 0:t.toString():null===(r=null!=s?s:0)||void 0===r?void 0:r.toString(),10)}),[s,e.success,e.successPercent]),w=React279.useMemo((()=>!ProgressStatuses.includes(d)&&A>=100?\"success\":d||\"normal\"),[d,A]),{getPrefixCls:S,direction:E,progress:x}=React279.useContext(ConfigContext),C=S(\"progress\",r),[T,R,I]=style_default20(C),k=\"line\"===c,P=k&&!o,M=React279.useMemo((()=>{if(!u)return null;const t=getSuccessPercent(e);let r;const n=k&&v&&\"inner\"===_;return\"inner\"===_||h||\"exception\"!==w&&\"success\"!==w?r=(h||(e=>`${e}%`))(validProgress(s),validProgress(t)):\"exception\"===w?r=k?React279.createElement(CloseCircleFilled_default2,null):React279.createElement(CloseOutlined_default3,null):\"success\"===w&&(r=k?React279.createElement(CheckCircleFilled_default2,null):React279.createElement(CheckOutlined_default3,null)),React279.createElement(\"span\",{className:(0,import_classnames106.default)(`${C}-text`,{[`${C}-text-bright`]:n,[`${C}-text-${g}`]:P,[`${C}-text-${_}`]:P}),title:\"string\"==typeof r?r:void 0},r)}),[u,s,A,w,c,C,h]);{const t=devUseWarning(\"Progress\");t.deprecated(!(\"successPercent\"in e),\"successPercent\",\"success.percent\"),t.deprecated(!(\"width\"in e),\"width\",\"size\"),\"circle\"!==c&&\"dashboard\"!==c||(Array.isArray(l)?t(!1,\"usage\",'Type \"circle\" and \"dashboard\" do not accept array as `size`, please use number or preset size instead.'):\"object\"==typeof l&&t(!1,\"usage\",'Type \"circle\" and \"dashboard\" do not accept object as `size`, please use number or preset size instead.')),e.success&&\"progress\"in e.success&&t.deprecated(!1,\"success.progress\",\"success.percent\")}let O;\"line\"===c?O=o?React279.createElement(Steps_default,Object.assign({},e,{strokeColor:y,prefixCls:C,steps:\"object\"==typeof o?o.count:o}),M):React279.createElement(Line_default2,Object.assign({},e,{strokeColor:b,prefixCls:C,direction:E,percentPosition:{align:g,type:_}}),M):\"circle\"!==c&&\"dashboard\"!==c||(O=React279.createElement(Circle_default2,Object.assign({},e,{strokeColor:b,prefixCls:C,progressStatus:w}),M));const B=(0,import_classnames106.default)(C,`${C}-status-${w}`,{[`${C}-${\"dashboard\"===c?\"circle\":c}`]:\"line\"!==c,[`${C}-inline-circle`]:\"circle\"===c&&getSize(l,\"circle\")[0]__left_angle_mark_=20,[`${C}-line`]:P,[`${C}-line-align-${g}`]:P,[`${C}-line-position-${_}`]:P,[`${C}-steps`]:o,[`${C}-show-info`]:u,[`${C}-${l}`]:\"string\"==typeof l,[`${C}-rtl`]:\"rtl\"===E},null==x?void 0:x.className,n,i,R,I);return T(React279.createElement(\"div\",Object.assign({ref:t,style:Object.assign(Object.assign({},null==x?void 0:x.style),f),className:B,role:\"progressbar\",\"aria-valuenow\":A,\"aria-valuemin\":0,\"aria-valuemax\":100},omit(m,[\"trailColor\",\"strokeWidth\",\"width\",\"gapDegree\",\"gapPosition\",\"strokeLinecap\",\"success\",\"successPercent\"])),O))}));Progress2.displayName=\"Progress\";var progress_default=Progress2,progress_default2=progress_default;init_globals();var React280=__toESM(require_react()),DeleteOutlined2=function(e,t){return React280.createElement(AntdIcon_default2,_extends({},e,{ref:t,icon:DeleteOutlined_default}))},RefIcon35=React280.forwardRef(DeleteOutlined2);RefIcon35.displayName=\"DeleteOutlined\";var DeleteOutlined_default2=RefIcon35;init_globals();var React281=__toESM(require_react()),DownloadOutlined4=function(e,t){return React281.createElement(AntdIcon_default2,_extends({},e,{ref:t,icon:DownloadOutlined_default}))},RefIcon36=React281.forwardRef(DownloadOutlined4);RefIcon36.displayName=\"DownloadOutlined\";var DownloadOutlined_default3=RefIcon36;init_globals();var React282=__toESM(require_react()),FileTwoTone2=function(e,t){return React282.createElement(AntdIcon_default2,_extends({},e,{ref:t,icon:FileTwoTone_default}))},RefIcon37=React282.forwardRef(FileTwoTone2);RefIcon37.displayName=\"FileTwoTone\";var FileTwoTone_default2=RefIcon37;init_globals();var React283=__toESM(require_react()),PaperClipOutlined2=function(e,t){return React283.createElement(AntdIcon_default2,_extends({},e,{ref:t,icon:PaperClipOutlined_default}))},RefIcon38=React283.forwardRef(PaperClipOutlined2);RefIcon38.displayName=\"PaperClipOutlined\";var PaperClipOutlined_default2=RefIcon38;init_globals();var React284=__toESM(require_react()),PictureTwoTone2=function(e,t){return React284.createElement(AntdIcon_default2,_extends({},e,{ref:t,icon:PictureTwoTone_default}))},RefIcon39=React284.forwardRef(PictureTwoTone2);RefIcon39.displayName=\"PictureTwoTone\";var PictureTwoTone_default2=RefIcon39;init_globals();var React286=__toESM(require_react()),import_classnames108=__toESM(require_classnames());init_globals();var React285=__toESM(require_react()),import_classnames107=__toESM(require_classnames());init_globals();var genBaseStyle5=e=>{const{paddingXXS:t,lineWidth:r,tagPaddingHorizontal:n,componentCls:i,calc:o}=e,a=o(n).sub(r).equal(),s=o(t).sub(r).equal();return{[i]:Object.assign(Object.assign({},resetComponent(e)),{display:\"inline-block\",height:\"auto\",marginInlineEnd:e.marginXS,paddingInline:a,fontSize:e.tagFontSize,lineHeight:e.tagLineHeight,whiteSpace:\"nowrap\",background:e.defaultBg,border:`${unit(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,opacity:1,transition:`all ${e.motionDurationMid}`,textAlign:\"start\",position:\"relative\",[`&${i}-rtl`]:{direction:\"rtl\"},\"&, a, a:hover\":{color:e.defaultColor},[`${i}-close-icon`]:{marginInlineStart:s,fontSize:e.tagIconSize,color:e.colorTextDescription,cursor:\"pointer\",transition:`all ${e.motionDurationMid}`,\"&:hover\":{color:e.colorTextHeading}},[`&${i}-has-color`]:{borderColor:\"transparent\",[`&, a, a:hover, ${e.iconCls}-close, ${e.iconCls}-close:hover`]:{color:e.colorTextLightSolid}},\"&-checkable\":{backgroundColor:\"transparent\",borderColor:\"transparent\",cursor:\"pointer\",[`&:not(${i}-checkable-checked):hover`]:{color:e.colorPrimary,backgroundColor:e.colorFillSecondary},\"&:active, &-checked\":{color:e.colorTextLightSolid},\"&-checked\":{backgroundColor:e.colorPrimary,\"&:hover\":{backgroundColor:e.colorPrimaryHover}},\"&:active\":{backgroundColor:e.colorPrimaryActive}},\"&-hidden\":{display:\"none\"},[`> ${e.iconCls} + span, > span + ${e.iconCls}`]:{marginInlineStart:a}}),[`${i}-borderless`]:{borderColor:\"transparent\",background:e.tagBorderlessBg}}},prepareToken4=e=>{const{lineWidth:t,fontSizeIcon:r,calc:n}=e,i=e.fontSizeSM;return merge2(e,{tagFontSize:i,tagLineHeight:unit(n(e.lineHeightSM).mul(i).equal()),tagIconSize:n(r).sub(n(t).mul(2)).equal(),tagPaddingHorizontal:8,tagBorderlessBg:e.defaultBg})},prepareComponentToken16=e=>({defaultBg:new TinyColor(e.colorFillQuaternary).onBackground(e.colorBgContainer).toHexString(),defaultColor:e.colorText}),style_default21=genStyleHooks(\"Tag\",(e=>{const t=prepareToken4(e);return genBaseStyle5(t)}),prepareComponentToken16),__rest43=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)__left_angle_mark_0&&(r[n]=e[n]);if(null!=e&&\"function\"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i__left_angle_mark_n.length;i++)t.indexOf(n[i])__left_angle_mark_0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r},CheckableTag=React285.forwardRef(((e,t)=>{const{prefixCls:r,style:n,className:i,checked:o,onChange:a,onClick:s}=e,l=__rest43(e,[\"prefixCls\",\"style\",\"className\",\"checked\",\"onChange\",\"onClick\"]),{getPrefixCls:u,tag:c}=React285.useContext(ConfigContext),d=u(\"tag\",r),[h,f,p]=style_default21(d),m=(0,import_classnames107.default)(d,`${d}-checkable`,{[`${d}-checkable-checked`]:o},null==c?void 0:c.className,i,f,p);return h(React285.createElement(\"span\",Object.assign({},l,{ref:t,style:Object.assign(Object.assign({},n),null==c?void 0:c.style),className:m,onClick:e=>{null==a||a(!o),null==s||s(e)}})))})),CheckableTag_default=CheckableTag;init_globals();var genPresetStyle=e=>genPresetColor(e,((t,r)=>{let{textColor:n,lightBorderColor:i,lightColor:o,darkColor:a}=r;return{[`${e.componentCls}${e.componentCls}-${t}`]:{color:n,background:o,borderColor:i,\"&-inverse\":{color:e.colorTextLightSolid,background:a,borderColor:a},[`&${e.componentCls}-borderless`]:{borderColor:\"transparent\"}}}})),presetCmp_default=genSubStyleComponent([\"Tag\",\"preset\"],(e=>{const t=prepareToken4(e);return genPresetStyle(t)}),prepareComponentToken16);function capitalize(e){return\"string\"!=typeof e?e:e.charAt(0).toUpperCase()+e.slice(1)}init_globals(),init_globals();var genTagStatusStyle=(e,t,r)=>{const n=capitalize(r);return{[`${e.componentCls}${e.componentCls}-${t}`]:{color:e[`color${r}`],background:e[`color${n}Bg`],borderColor:e[`color${n}Border`],[`&${e.componentCls}-borderless`]:{borderColor:\"transparent\"}}}},statusCmp_default=genSubStyleComponent([\"Tag\",\"status\"],(e=>{const t=prepareToken4(e);return[genTagStatusStyle(t,\"success\",\"Success\"),genTagStatusStyle(t,\"processing\",\"Info\"),genTagStatusStyle(t,\"error\",\"Error\"),genTagStatusStyle(t,\"warning\",\"Warning\")]}),prepareComponentToken16),__rest44=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)__left_angle_mark_0&&(r[n]=e[n]);if(null!=e&&\"function\"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i__left_angle_mark_n.length;i++)t.indexOf(n[i])__left_angle_mark_0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r},InternalTag=React286.forwardRef(((e,t)=>{const{prefixCls:r,className:n,rootClassName:i,style:o,children:a,icon:s,color:l,onClose:u,bordered:c=!0,visible:d}=e,h=__rest44(e,[\"prefixCls\",\"className\",\"rootClassName\",\"style\",\"children\",\"icon\",\"color\",\"onClose\",\"bordered\",\"visible\"]),{getPrefixCls:f,direction:p,tag:m}=React286.useContext(ConfigContext),[g,_]=React286.useState(!0),b=omit(h,[\"closeIcon\",\"closable\"]);devUseWarning(\"Tag\").deprecated(!(\"visible\"in e),\"visible\",\"visible && __left_angle_mark_Tag />\"),React286.useEffect((()=>{void 0!==d&&_(d)}),[d]);const y=isPresetColor(l),v=isPresetStatusColor(l),A=y||v,w=Object.assign(Object.assign({backgroundColor:l&&!A?l:void 0},null==m?void 0:m.style),o),S=f(\"tag\",r),[E,x,C]=style_default21(S),T=(0,import_classnames108.default)(S,null==m?void 0:m.className,{[`${S}-${l}`]:A,[`${S}-has-color`]:l&&!A,[`${S}-hidden`]:!g,[`${S}-rtl`]:\"rtl\"===p,[`${S}-borderless`]:!c},n,i,x,C),R=e=>{e.stopPropagation(),null==u||u(e),e.defaultPrevented||_(!1)},[,I]=useClosable(pickClosable(e),pickClosable(m),{closable:!1,closeIconRender:e=>replaceElement(e,React286.createElement(\"span\",{className:`${S}-close-icon`,onClick:R},e),(e=>({onClick:t=>{var r;null===(r=null==e?void 0:e.onClick)||void 0===r||r.call(e,t),R(t)},className:(0,import_classnames108.default)(null==e?void 0:e.className,`${S}-close-icon`)})))}),k=\"function\"==typeof h.onClick||a&&\"a\"===a.type,P=s||null,M=P?React286.createElement(React286.Fragment,null,P,a&&React286.createElement(\"span\",null,a)):a,O=React286.createElement(\"span\",Object.assign({},b,{ref:t,className:T,style:w}),M,I,y&&React286.createElement(presetCmp_default,{key:\"preset\",prefixCls:S}),v&&React286.createElement(statusCmp_default,{key:\"status\",prefixCls:S}));return E(k?React286.createElement(wave_default,{component:\"Tag\"},O):O)})),Tag=InternalTag;Tag.displayName=\"Tag\",Tag.CheckableTag=CheckableTag_default;var tag_default=Tag;init_globals(),init_globals();var React289=__toESM(require_react()),import_classnames111=__toESM(require_classnames());init_globals();var genTimelineStyle=e=>{const{componentCls:t,calc:r}=e;return{[t]:Object.assign(Object.assign({},resetComponent(e)),{margin:0,padding:0,listStyle:\"none\",[`${t}-item`]:{position:\"relative\",margin:0,paddingBottom:e.itemPaddingBottom,fontSize:e.fontSize,listStyle:\"none\",\"&-tail\":{position:\"absolute\",insetBlockStart:e.itemHeadSize,insetInlineStart:r(r(e.itemHeadSize).sub(e.tailWidth)).div(2).equal(),height:`calc(100% - ${unit(e.itemHeadSize)})`,borderInlineStart:`${unit(e.tailWidth)} ${e.lineType} ${e.tailColor}`},\"&-pending\":{[`${t}-item-head`]:{fontSize:e.fontSizeSM,backgroundColor:\"transparent\"},[`${t}-item-tail`]:{display:\"none\"}},\"&-head\":{position:\"absolute\",width:e.itemHeadSize,height:e.itemHeadSize,backgroundColor:e.dotBg,border:`${unit(e.dotBorderWidth)} ${e.lineType} transparent`,borderRadius:\"50%\",\"&-blue\":{color:e.colorPrimary,borderColor:e.colorPrimary},\"&-red\":{color:e.colorError,borderColor:e.colorError},\"&-green\":{color:e.colorSuccess,borderColor:e.colorSuccess},\"&-gray\":{color:e.colorTextDisabled,borderColor:e.colorTextDisabled}},\"&-head-custom\":{position:\"absolute\",insetBlockStart:r(e.itemHeadSize).div(2).equal(),insetInlineStart:r(e.itemHeadSize).div(2).equal(),width:\"auto\",height:\"auto\",marginBlockStart:0,paddingBlock:e.customHeadPaddingVertical,lineHeight:1,textAlign:\"center\",border:0,borderRadius:0,transform:\"translate(-50%, -50%)\"},\"&-content\":{position:\"relative\",insetBlockStart:r(r(e.fontSize).mul(e.lineHeight).sub(e.fontSize)).mul(-1).add(e.lineWidth).equal(),marginInlineStart:r(e.margin).add(e.itemHeadSize).equal(),marginInlineEnd:0,marginBlockStart:0,marginBlockEnd:0,wordBreak:\"break-word\"},\"&-last\":{[`> ${t}-item-tail`]:{display:\"none\"},[`> ${t}-item-content`]:{minHeight:r(e.controlHeightLG).mul(1.2).equal()}}},[`&${t}-alternate,\\n &${t}-right,\\n &${t}-label`]:{[`${t}-item`]:{\"&-tail, &-head, &-head-custom\":{insetInlineStart:\"50%\"},\"&-head\":{marginInlineStart:r(e.marginXXS).mul(-1).equal(),\"&-custom\":{marginInlineStart:r(e.tailWidth).div(2).equal()}},\"&-left\":{[`${t}-item-content`]:{insetInlineStart:`calc(50% - ${unit(e.marginXXS)})`,width:`calc(50% - ${unit(e.marginSM)})`,textAlign:\"start\"}},\"&-right\":{[`${t}-item-content`]:{width:`calc(50% - ${unit(e.marginSM)})`,margin:0,textAlign:\"end\"}}}},[`&${t}-right`]:{[`${t}-item-right`]:{[`${t}-item-tail,\\n ${t}-item-head,\\n ${t}-item-head-custom`]:{insetInlineStart:`calc(100% - ${unit(r(r(e.itemHeadSize).add(e.tailWidth)).div(2).equal())})`},[`${t}-item-content`]:{width:`calc(100% - ${unit(r(e.itemHeadSize).add(e.marginXS).equal())})`}}},[`&${t}-pending\\n ${t}-item-last\\n ${t}-item-tail`]:{display:\"block\",height:`calc(100% - ${unit(e.margin)})`,borderInlineStart:`${unit(e.tailWidth)} dotted ${e.tailColor}`},[`&${t}-reverse\\n ${t}-item-last\\n ${t}-item-tail`]:{display:\"none\"},[`&${t}-reverse ${t}-item-pending`]:{[`${t}-item-tail`]:{insetBlockStart:e.margin,display:\"block\",height:`calc(100% - ${unit(e.margin)})`,borderInlineStart:`${unit(e.tailWidth)} dotted ${e.tailColor}`},[`${t}-item-content`]:{minHeight:r(e.controlHeightLG).mul(1.2).equal()}},[`&${t}-label`]:{[`${t}-item-label`]:{position:\"absolute\",insetBlockStart:r(r(e.fontSize).mul(e.lineHeight).sub(e.fontSize)).mul(-1).add(e.tailWidth).equal(),width:`calc(50% - ${unit(e.marginSM)})`,textAlign:\"end\"},[`${t}-item-right`]:{[`${t}-item-label`]:{insetInlineStart:`calc(50% + ${unit(e.marginSM)})`,width:`calc(50% - ${unit(e.marginSM)})`,textAlign:\"start\"}}},\"&-rtl\":{direction:\"rtl\",[`${t}-item-head-custom`]:{transform:\"translate(50%, -50%)\"}}})}},prepareComponentToken17=e=>({tailColor:e.colorSplit,tailWidth:e.lineWidthBold,dotBorderWidth:e.wireframe?e.lineWidthBold:3*e.lineWidth,dotBg:e.colorBgContainer,itemPaddingBottom:1.25*e.padding}),style_default22=genStyleHooks(\"Timeline\",(e=>{const t=merge2(e,{itemHeadSize:10,customHeadPaddingVertical:e.paddingXXS,paddingInlineEnd:2});return[genTimelineStyle(t)]}),prepareComponentToken17);init_globals();var React287=__toESM(require_react()),import_classnames109=__toESM(require_classnames()),__rest45=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)__left_angle_mark_0&&(r[n]=e[n]);if(null!=e&&\"function\"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i__left_angle_mark_n.length;i++)t.indexOf(n[i])__left_angle_mark_0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r},TimelineItem=e=>{var{prefixCls:t,className:r,color:n=\"blue\",dot:i,pending:o=!1,position:a,label:s,children:l}=e,u=__rest45(e,[\"prefixCls\",\"className\",\"color\",\"dot\",\"pending\",\"position\",\"label\",\"children\"]);const{getPrefixCls:c}=React287.useContext(ConfigContext),d=c(\"timeline\",t),h=(0,import_classnames109.default)(`${d}-item`,{[`${d}-item-pending`]:o},r),f=/blue|red|green|gray/.test(n||\"\")?void 0:n,p=(0,import_classnames109.default)(`${d}-item-head`,{[`${d}-item-head-custom`]:!!i,[`${d}-item-head-${n}`]:!f});return React287.createElement(\"li\",Object.assign({},u,{className:h}),s&&React287.createElement(\"div\",{className:`${d}-item-label`},s),React287.createElement(\"div\",{className:`${d}-item-tail`}),React287.createElement(\"div\",{className:p,style:{borderColor:f,color:f}},i),React287.createElement(\"div\",{className:`${d}-item-content`},l))},TimelineItem_default=TimelineItem;init_globals();var React288=__toESM(require_react()),import_classnames110=__toESM(require_classnames()),__rest46=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)__left_angle_mark_0&&(r[n]=e[n]);if(null!=e&&\"function\"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i__left_angle_mark_n.length;i++)t.indexOf(n[i])__left_angle_mark_0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r},TimelineItemList=e=>{var{prefixCls:t,className:r,pending:n=!1,children:i,items:o,rootClassName:a,reverse:s=!1,direction:l,hashId:u,pendingDot:c,mode:d=\"\"}=e,h=__rest46(e,[\"prefixCls\",\"className\",\"pending\",\"children\",\"items\",\"rootClassName\",\"reverse\",\"direction\",\"hashId\",\"pendingDot\",\"mode\"]);const f=(e,r)=>\"alternate\"===d?\"right\"===e?`${t}-item-right`:\"left\"===e||r%2==0?`${t}-item-left`:`${t}-item-right`:\"left\"===d?`${t}-item-left`:\"right\"===d||\"right\"===e?`${t}-item-right`:\"\",p=_toConsumableArray(o||[]),m=\"boolean\"==typeof n?null:n;n&&p.push({pending:!!n,dot:c||React288.createElement(LoadingOutlined_default3,null),children:m}),s&&p.reverse();const g=p.length,_=`${t}-item-last`,b=p.filter((e=>!!e)).map(((e,t)=>{var r;const i=t===g-2?_:\"\",o=t===g-1?_:\"\",{className:a}=e,l=__rest46(e,[\"className\"]);return React288.createElement(TimelineItem_default,Object.assign({},l,{className:(0,import_classnames110.default)([a,!s&&n?i:o,f(null!==(r=null==e?void 0:e.position)&&void 0!==r?r:\"\",t)]),key:(null==e?void 0:e.key)||t}))})),y=p.some((e=>!!(null==e?void 0:e.label))),v=(0,import_classnames110.default)(t,{[`${t}-pending`]:!!n,[`${t}-reverse`]:!!s,[`${t}-${d}`]:!!d&&!y,[`${t}-label`]:y,[`${t}-rtl`]:\"rtl\"===l},r,a,u);return React288.createElement(\"ul\",Object.assign({},h,{className:v}),b)},TimelineItemList_default=TimelineItemList;function useItems(e,t){return e&&Array.isArray(e)?e:toArray(t).map((e=>{var t,r;return Object.assign({children:null!==(r=null===(t=null==e?void 0:e.props)||void 0===t?void 0:t.children)&&void 0!==r?r:\"\"},e.props)}))}init_globals();var useItems_default=useItems,__rest47=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)__left_angle_mark_0&&(r[n]=e[n]);if(null!=e&&\"function\"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i__left_angle_mark_n.length;i++)t.indexOf(n[i])__left_angle_mark_0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r},Timeline=e=>{const{getPrefixCls:t,direction:r,timeline:n}=React289.useContext(ConfigContext),{prefixCls:i,children:o,items:a,className:s,style:l}=e,u=__rest47(e,[\"prefixCls\",\"children\",\"items\",\"className\",\"style\"]),c=t(\"timeline\",i);devUseWarning(\"Timeline\").deprecated(!o,\"Timeline.Item\",\"items\");const d=useCSSVarCls_default(c),[h,f,p]=style_default22(c,d),m=useItems_default(a,o);return h(React289.createElement(TimelineItemList_default,Object.assign({},u,{className:(0,import_classnames111.default)(null==n?void 0:n.className,s,p,d),style:Object.assign(Object.assign({},null==n?void 0:n.style),l),prefixCls:c,direction:r,items:m,hashId:f})))};Timeline.Item=TimelineItem_default,Timeline.displayName=\"Timeline\";var Timeline_default=Timeline,timeline_default=Timeline_default;init_globals(),init_globals();var React295=__toESM(require_react());init_globals();var React294=__toESM(require_react()),import_react_dom6=__toESM(require_react_dom()),import_classnames115=__toESM(require_classnames());init_globals(),init_globals();var import_react95=__toESM(require_react());init_globals();var import_classnames112=__toESM(require_classnames()),import_react94=__toESM(require_react());init_globals();var attr_accept_default=function(e,t){if(e&&t){var r=Array.isArray(t)?t:t.split(\",\"),n=e.name||\"\",i=e.type||\"\",o=i.replace(/\\/.*$/,\"\");return r.some((function(e){var t=e.trim();if(/^\\*(\\/\\*)?$/.test(e))return!0;if(\".\"===t.charAt(0)){var r=n.toLowerCase(),a=t.toLowerCase(),s=[a];return\".jpg\"!==a&&\".jpeg\"!==a||(s=[\".jpg\",\".jpeg\"]),s.some((function(e){return r.endsWith(e)}))}return/\\/\\*$/.test(t)?o===t.replace(/\\/.*$/,\"\"):i===t||!!/^\\w+$/.test(t)&&(warning_default(!1,\"Upload takes an invalidate 'accept' type '\".concat(t,\"'.Skip for check.\")),!0)}))}return!0};function getError(e,t){var r=\"cannot \".concat(e.method,\" \").concat(e.action,\" \").concat(t.status,\"'\"),n=new Error(r);return n.status=t.status,n.method=e.method,n.url=e.action,n}function getBody(e){var t=e.responseText||e.response;if(!t)return t;try{return JSON.parse(t)}catch(e4){return t}}function upload(e){var t=new XMLHttpRequest;e.onProgress&&t.upload&&(t.upload.onprogress=function(t){t.total>0&&(t.percent=t.loaded/t.total*100),e.onProgress(t)});var r=new FormData;e.data&&Object.keys(e.data).forEach((function(t){var n=e.data[t];Array.isArray(n)?n.forEach((function(e){r.append(\"\".concat(t,\"[]\"),e)})):r.append(t,n)})),e.file instanceof Blob?r.append(e.filename,e.file,e.file.name):r.append(e.filename,e.file),t.onerror=function(t){e.onError(t)},t.onload=function(){return t.status__left_angle_mark_200||t.status>=300?e.onError(getError(e,t),getBody(t)):e.onSuccess(getBody(t),t)},t.open(e.method,e.action,!0),e.withCredentials&&\"withCredentials\"in t&&(t.withCredentials=!0);var n=e.headers||{};return null!==n[\"X-Requested-With\"]&&t.setRequestHeader(\"X-Requested-With\",\"XMLHttpRequest\"),Object.keys(n).forEach((function(e){null!==n[e]&&t.setRequestHeader(e,n[e])})),t.send(r),{abort:function(){t.abort()}}}init_globals(),init_globals();var traverseFileTree=function(){var e=_asyncToGenerator(_regeneratorRuntime().mark((function e(t,r){var n,i,o,a,s,l,u,c;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:l=function(){return(l=_asyncToGenerator(_regeneratorRuntime().mark((function e(t){return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt(\"return\",new Promise((function(e){t.file((function(n){r(n)?(t.fullPath&&!n.webkitRelativePath&&(Object.defineProperties(n,{webkitRelativePath:{writable:!0}}),n.webkitRelativePath=t.fullPath.replace(/^\\//,\"\"),Object.defineProperties(n,{webkitRelativePath:{writable:!1}})),e(n)):e(null)}))})));case 1:case\"end\":return e.stop()}}),e)})))).apply(this,arguments)},s=function(e){return l.apply(this,arguments)},a=function(){return(a=_asyncToGenerator(_regeneratorRuntime().mark((function e(t){var r,n,i,o,a;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=t.createReader(),n=[];case 2:return e.next=5,new Promise((function(e){r.readEntries(e,(function(){return e([])}))}));case 5:if(i=e.sent,o=i.length){e.next=9;break}return e.abrupt(\"break\",12);case 9:for(a=0;a__left_angle_mark_o;a++)n.push(i[a]);e.next=2;break;case 12:return e.abrupt(\"return\",n);case 13:case\"end\":return e.stop()}}),e)})))).apply(this,arguments)},o=function(e){return a.apply(this,arguments)},n=[],i=[],t.forEach((function(e){return i.push(e.webkitGetAsEntry())})),u=function(){var e=_asyncToGenerator(_regeneratorRuntime().mark((function e(t,r){var a,l;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=2;break}return e.abrupt(\"return\");case 2:if(t.path=r||\"\",!t.isFile){e.next=10;break}return e.next=6,s(t);case 6:(a=e.sent)&&n.push(a),e.next=15;break;case 10:if(!t.isDirectory){e.next=15;break}return e.next=13,o(t);case 13:l=e.sent,i.push.apply(i,_toConsumableArray(l));case 15:case\"end\":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),c=0;case 9:if(!(c__left_angle_mark_i.length)){e.next=15;break}return e.next=12,u(i[c]);case 12:c++,e.next=9;break;case 15:return e.abrupt(\"return\",n);case 16:case\"end\":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),traverseFileTree_default=traverseFileTree;init_globals();var now=+new Date,index2=0;function uid(){return\"rc-upload-\".concat(now,\"-\").concat(++index2)}var _excluded43=[\"component\",\"prefixCls\",\"className\",\"classNames\",\"disabled\",\"id\",\"name\",\"style\",\"styles\",\"multiple\",\"accept\",\"capture\",\"children\",\"directory\",\"openFileDialogOnClick\",\"onMouseEnter\",\"onMouseLeave\",\"hasControlInside\"],AjaxUploader=function(e){_inherits(r,e);var t=_createSuper(r);function r(){var e;_classCallCheck(this,r);for(var n=arguments.length,i=new Array(n),o=0;o__left_angle_mark_n;o++)i[o]=arguments[o];return _defineProperty(_assertThisInitialized(e=t.call.apply(t,[this].concat(i))),\"state\",{uid:uid()}),_defineProperty(_assertThisInitialized(e),\"reqs\",{}),_defineProperty(_assertThisInitialized(e),\"fileInput\",void 0),_defineProperty(_assertThisInitialized(e),\"_isMounted\",void 0),_defineProperty(_assertThisInitialized(e),\"onChange\",(function(t){var r=e.props,n=r.accept,i=r.directory,o=_toConsumableArray(t.target.files).filter((function(e){return!i||attr_accept_default(e,n)}));e.uploadFiles(o),e.reset()})),_defineProperty(_assertThisInitialized(e),\"onClick\",(function(t){var r=e.fileInput;if(r){var n=t.target,i=e.props.onClick;n&&\"BUTTON\"===n.tagName&&(r.parentNode.focus(),n.blur()),r.click(),i&&i(t)}})),_defineProperty(_assertThisInitialized(e),\"onKeyDown\",(function(t){\"Enter\"===t.key&&e.onClick(t)})),_defineProperty(_assertThisInitialized(e),\"onFileDrop\",function(){var t=_asyncToGenerator(_regeneratorRuntime().mark((function t(r){var n,i,o;return _regeneratorRuntime().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.props.multiple,r.preventDefault(),\"dragover\"!==r.type){t.next=4;break}return t.abrupt(\"return\");case 4:if(!e.props.directory){t.next=11;break}return t.next=7,traverseFileTree_default(Array.prototype.slice.call(r.dataTransfer.items),(function(t){return attr_accept_default(t,e.props.accept)}));case 7:i=t.sent,e.uploadFiles(i),t.next=14;break;case 11:o=_toConsumableArray(r.dataTransfer.files).filter((function(t){return attr_accept_default(t,e.props.accept)})),!1===n&&(o=o.slice(0,1)),e.uploadFiles(o);case 14:case\"end\":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),_defineProperty(_assertThisInitialized(e),\"uploadFiles\",(function(t){var r=_toConsumableArray(t),n=r.map((function(t){return t.uid=uid(),e.processFile(t,r)}));Promise.all(n).then((function(t){var r=e.props.onBatchStart;null==r||r(t.map((function(e){return{file:e.origin,parsedFile:e.parsedFile}}))),t.filter((function(e){return null!==e.parsedFile})).forEach((function(t){e.post(t)}))}))})),_defineProperty(_assertThisInitialized(e),\"processFile\",function(){var t=_asyncToGenerator(_regeneratorRuntime().mark((function t(r,n){var i,o,a,s,l,u,c,d,h;return _regeneratorRuntime().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i=e.props.beforeUpload,o=r,!i){t.next=14;break}return t.prev=3,t.next=6,i(r,n);case 6:o=t.sent,t.next=12;break;case 9:t.prev=9,t.t0=t.catch(3),o=!1;case 12:if(!1!==o){t.next=14;break}return t.abrupt(\"return\",{origin:r,parsedFile:null,action:null,data:null});case 14:if(\"function\"!=typeof(a=e.props.action)){t.next=21;break}return t.next=18,a(r);case 18:s=t.sent,t.next=22;break;case 21:s=a;case 22:if(\"function\"!=typeof(l=e.props.data)){t.next=29;break}return t.next=26,l(r);case 26:u=t.sent,t.next=30;break;case 29:u=l;case 30:return c=\"object\"!==_typeof(o)&&\"string\"!=typeof o||!o?r:o,d=c instanceof File?c:new File([c],r.name,{type:r.type}),(h=d).uid=r.uid,t.abrupt(\"return\",{origin:r,data:u,parsedFile:h,action:s});case 35:case\"end\":return t.stop()}}),t,null,[[3,9]])})));return function(e,r){return t.apply(this,arguments)}}()),_defineProperty(_assertThisInitialized(e),\"saveFileInput\",(function(t){e.fileInput=t})),e}return _createClass(r,[{key:\"componentDidMount\",value:function(){this._isMounted=!0}},{key:\"componentWillUnmount\",value:function(){this._isMounted=!1,this.abort()}},{key:\"post\",value:function(e){var t=this,r=e.data,n=e.origin,i=e.action,o=e.parsedFile;if(this._isMounted){var a=this.props,s=a.onStart,l=a.customRequest,u=a.name,c=a.headers,d=a.withCredentials,h=a.method,f=n.uid,p=l||upload,m={action:i,filename:u,data:r,file:o,headers:c,withCredentials:d,method:h||\"post\",onProgress:function(e){var r=t.props.onProgress;null==r||r(e,o)},onSuccess:function(e,r){var n=t.props.onSuccess;null==n||n(e,o,r),delete t.reqs[f]},onError:function(e,r){var n=t.props.onError;null==n||n(e,r,o),delete t.reqs[f]}};s(n),this.reqs[f]=p(m)}}},{key:\"reset\",value:function(){this.setState({uid:uid()})}},{key:\"abort\",value:function(e){var t=this.reqs;if(e){var r=e.uid?e.uid:e;t[r]&&t[r].abort&&t[r].abort(),delete t[r]}else Object.keys(t).forEach((function(e){t[e]&&t[e].abort&&t[e].abort(),delete t[e]}))}},{key:\"render\",value:function(){var e=this.props,t=e.component,r=e.prefixCls,n=e.className,i=e.classNames,o=void 0===i?{}:i,a=e.disabled,s=e.id,l=e.name,u=e.style,c=e.styles,d=void 0===c?{}:c,h=e.multiple,f=e.accept,p=e.capture,m=e.children,g=e.directory,_=e.openFileDialogOnClick,b=e.onMouseEnter,y=e.onMouseLeave,v=e.hasControlInside,A=_objectWithoutProperties(e,_excluded43),w=(0,import_classnames112.default)(_defineProperty(_defineProperty(_defineProperty({},r,!0),\"\".concat(r,\"-disabled\"),a),n,n)),S=g?{directory:\"directory\",webkitdirectory:\"webkitdirectory\"}:{},E=a?{}:{onClick:_?this.onClick:function(){},onKeyDown:_?this.onKeyDown:function(){},onMouseEnter:b,onMouseLeave:y,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:v?void 0:\"0\"};return import_react94.default.createElement(t,_extends({},E,{className:w,role:v?void 0:\"button\",style:u}),import_react94.default.createElement(\"input\",_extends({},pickAttrs(A,{aria:!0,data:!0}),{id:s,name:l,disabled:a,type:\"file\",ref:this.saveFileInput,onClick:function(e){return e.stopPropagation()},key:this.state.uid,style:_objectSpread2({display:\"none\"},d.input),className:o.input,accept:f},S,{multiple:h,onChange:this.onChange},null!=p?{capture:p}:{})),m)}}]),r}(import_react94.Component),AjaxUploader_default=AjaxUploader;function empty(){}var Upload=function(e){_inherits(r,e);var t=_createSuper(r);function r(){var e;_classCallCheck(this,r);for(var n=arguments.length,i=new Array(n),o=0;o__left_angle_mark_n;o++)i[o]=arguments[o];return _defineProperty(_assertThisInitialized(e=t.call.apply(t,[this].concat(i))),\"uploader\",void 0),_defineProperty(_assertThisInitialized(e),\"saveUploader\",(function(t){e.uploader=t})),e}return _createClass(r,[{key:\"abort\",value:function(e){this.uploader.abort(e)}},{key:\"render\",value:function(){return import_react95.default.createElement(AjaxUploader_default,_extends({},this.props,{ref:this.saveUploader}))}}]),r}(import_react95.Component);_defineProperty(Upload,\"defaultProps\",{component:\"span\",prefixCls:\"rc-upload\",data:{},headers:{},name:\"file\",multipart:!1,onStart:empty,onError:empty,onSuccess:empty,multiple:!1,beforeUpload:null,customRequest:null,withCredentials:!1,openFileDialogOnClick:!0,hasControlInside:!1});var Upload_default=Upload,es_default17=Upload_default;init_globals(),init_globals();var genDraggerStyle=e=>{const{componentCls:t,iconCls:r}=e;return{[`${t}-wrapper`]:{[`${t}-drag`]:{position:\"relative\",width:\"100%\",height:\"100%\",textAlign:\"center\",background:e.colorFillAlter,border:`${unit(e.lineWidth)} dashed ${e.colorBorder}`,borderRadius:e.borderRadiusLG,cursor:\"pointer\",transition:`border-color ${e.motionDurationSlow}`,[t]:{padding:e.padding},[`${t}-btn`]:{display:\"table\",width:\"100%\",height:\"100%\",outline:\"none\",borderRadius:e.borderRadiusLG,\"&:focus-visible\":{outline:`${unit(e.lineWidthFocus)} solid ${e.colorPrimaryBorder}`}},[`${t}-drag-container`]:{display:\"table-cell\",verticalAlign:\"middle\"},[`\\n &:not(${t}-disabled):hover,\\n &-hover:not(${t}-disabled)\\n `]:{borderColor:e.colorPrimaryHover},[`p${t}-drag-icon`]:{marginBottom:e.margin,[r]:{color:e.colorPrimary,fontSize:e.uploadThumbnailSize}},[`p${t}-text`]:{margin:`0 0 ${unit(e.marginXXS)}`,color:e.colorTextHeading,fontSize:e.fontSizeLG},[`p${t}-hint`]:{color:e.colorTextDescription,fontSize:e.fontSize},[`&${t}-disabled`]:{[`p${t}-drag-icon ${r},\\n p${t}-text,\\n p${t}-hint\\n `]:{color:e.colorTextDisabled}}}}}},dragger_default=genDraggerStyle;init_globals();var genListStyle=e=>{const{componentCls:t,antCls:r,iconCls:n,fontSize:i,lineHeight:o,calc:a}=e,s=`${t}-list-item`,l=`${s}-actions`,u=`${s}-action`,c=e.fontHeightSM;return{[`${t}-wrapper`]:{[`${t}-list`]:Object.assign(Object.assign({},clearFix()),{lineHeight:e.lineHeight,[s]:{position:\"relative\",height:a(e.lineHeight).mul(i).equal(),marginTop:e.marginXS,fontSize:i,display:\"flex\",alignItems:\"center\",transition:`background-color ${e.motionDurationSlow}`,\"&:hover\":{backgroundColor:e.controlItemBgHover},[`${s}-name`]:Object.assign(Object.assign({},textEllipsis),{padding:`0 ${unit(e.paddingXS)}`,lineHeight:o,flex:\"auto\",transition:`all ${e.motionDurationSlow}`}),[l]:{whiteSpace:\"nowrap\",[u]:{opacity:0},[n]:{color:e.actionsColor,transition:`all ${e.motionDurationSlow}`},[`\\n ${u}:focus-visible,\\n &.picture ${u}\\n `]:{opacity:1},[`${u}${r}-btn`]:{height:c,border:0,lineHeight:1}},[`${t}-icon ${n}`]:{color:e.colorTextDescription,fontSize:i},[`${s}-progress`]:{position:\"absolute\",bottom:e.calc(e.uploadProgressOffset).mul(-1).equal(),width:\"100%\",paddingInlineStart:a(i).add(e.paddingXS).equal(),fontSize:i,lineHeight:0,pointerEvents:\"none\",\"> div\":{margin:0}}},[`${s}:hover ${u}`]:{opacity:1},[`${s}-error`]:{color:e.colorError,[`${s}-name, ${t}-icon ${n}`]:{color:e.colorError},[l]:{[`${n}, ${n}:hover`]:{color:e.colorError},[u]:{opacity:1}}},[`${t}-list-item-container`]:{transition:`opacity ${e.motionDurationSlow}, height ${e.motionDurationSlow}`,\"&::before\":{display:\"table\",width:0,height:0,content:'\"\"'}}})}}},list_default=genListStyle;init_globals();var genMotionStyle2=e=>{const{componentCls:t}=e,r=new Keyframes_default(\"uploadAnimateInlineIn\",{from:{width:0,height:0,padding:0,opacity:0,margin:e.calc(e.marginXS).div(-2).equal()}}),n=new Keyframes_default(\"uploadAnimateInlineOut\",{to:{width:0,height:0,padding:0,opacity:0,margin:e.calc(e.marginXS).div(-2).equal()}}),i=`${t}-animate-inline`;return[{[`${t}-wrapper`]:{[`${i}-appear, ${i}-enter, ${i}-leave`]:{animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseInOutCirc,animationFillMode:\"forwards\"},[`${i}-appear, ${i}-enter`]:{animationName:r},[`${i}-leave`]:{animationName:n}}},{[`${t}-wrapper`]:initFadeMotion(e)},r,n]},motion_default3=genMotionStyle2;init_globals();var genPictureStyle=e=>{const{componentCls:t,iconCls:r,uploadThumbnailSize:n,uploadProgressOffset:i,calc:o}=e,a=`${t}-list`,s=`${a}-item`;return{[`${t}-wrapper`]:{[`\\n ${a}${a}-picture,\\n ${a}${a}-picture-card,\\n ${a}${a}-picture-circle\\n `]:{[s]:{position:\"relative\",height:o(n).add(o(e.lineWidth).mul(2)).add(o(e.paddingXS).mul(2)).equal(),padding:e.paddingXS,border:`${unit(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusLG,\"&:hover\":{background:\"transparent\"},[`${s}-thumbnail`]:Object.assign(Object.assign({},textEllipsis),{width:n,height:n,lineHeight:unit(o(n).add(e.paddingSM).equal()),textAlign:\"center\",flex:\"none\",[r]:{fontSize:e.fontSizeHeading2,color:e.colorPrimary},img:{display:\"block\",width:\"100%\",height:\"100%\",overflow:\"hidden\"}}),[`${s}-progress`]:{bottom:i,width:`calc(100% - ${unit(o(e.paddingSM).mul(2).equal())})`,marginTop:0,paddingInlineStart:o(n).add(e.paddingXS).equal()}},[`${s}-error`]:{borderColor:e.colorError,[`${s}-thumbnail ${r}`]:{[`svg path[fill='${blue[0]}']`]:{fill:e.colorErrorBg},[`svg path[fill='${blue.primary}']`]:{fill:e.colorError}}},[`${s}-uploading`]:{borderStyle:\"dashed\",[`${s}-name`]:{marginBottom:i}}},[`${a}${a}-picture-circle ${s}`]:{[`&, &::before, ${s}-thumbnail`]:{borderRadius:\"50%\"}}}}},genPictureCardStyle=e=>{const{componentCls:t,iconCls:r,fontSizeLG:n,colorTextLightSolid:i,calc:o}=e,a=`${t}-list`,s=`${a}-item`,l=e.uploadPicCardSize;return{[`\\n ${t}-wrapper${t}-picture-card-wrapper,\\n ${t}-wrapper${t}-picture-circle-wrapper\\n `]:Object.assign(Object.assign({},clearFix()),{display:\"block\",[`${t}${t}-select`]:{width:l,height:l,textAlign:\"center\",verticalAlign:\"top\",backgroundColor:e.colorFillAlter,border:`${unit(e.lineWidth)} dashed ${e.colorBorder}`,borderRadius:e.borderRadiusLG,cursor:\"pointer\",transition:`border-color ${e.motionDurationSlow}`,[`> ${t}`]:{display:\"flex\",alignItems:\"center\",justifyContent:\"center\",height:\"100%\",textAlign:\"center\"},[`&:not(${t}-disabled):hover`]:{borderColor:e.colorPrimary}},[`${a}${a}-picture-card, ${a}${a}-picture-circle`]:{display:\"flex\",flexWrap:\"wrap\",\"@supports not (gap: 1px)\":{\"& > *\":{marginBlockEnd:e.marginXS,marginInlineEnd:e.marginXS}},\"@supports (gap: 1px)\":{gap:e.marginXS},[`${a}-item-container`]:{display:\"inline-block\",width:l,height:l,verticalAlign:\"top\"},\"&::after\":{display:\"none\"},\"&::before\":{display:\"none\"},[s]:{height:\"100%\",margin:0,\"&::before\":{position:\"absolute\",zIndex:1,width:`calc(100% - ${unit(o(e.paddingXS).mul(2).equal())})`,height:`calc(100% - ${unit(o(e.paddingXS).mul(2).equal())})`,backgroundColor:e.colorBgMask,opacity:0,transition:`all ${e.motionDurationSlow}`,content:'\" \"'}},[`${s}:hover`]:{[`&::before, ${s}-actions`]:{opacity:1}},[`${s}-actions`]:{position:\"absolute\",insetInlineStart:0,zIndex:10,width:\"100%\",whiteSpace:\"nowrap\",textAlign:\"center\",opacity:0,transition:`all ${e.motionDurationSlow}`,[`\\n ${r}-eye,\\n ${r}-download,\\n ${r}-delete\\n `]:{zIndex:10,width:n,margin:`0 ${unit(e.marginXXS)}`,fontSize:n,cursor:\"pointer\",transition:`all ${e.motionDurationSlow}`,color:i,\"&:hover\":{color:i},svg:{verticalAlign:\"baseline\"}}},[`${s}-thumbnail, ${s}-thumbnail img`]:{position:\"static\",display:\"block\",width:\"100%\",height:\"100%\",objectFit:\"contain\"},[`${s}-name`]:{display:\"none\",textAlign:\"center\"},[`${s}-file + ${s}-name`]:{position:\"absolute\",bottom:e.margin,display:\"block\",width:`calc(100% - ${unit(o(e.paddingXS).mul(2).equal())})`},[`${s}-uploading`]:{[`&${s}`]:{backgroundColor:e.colorFillAlter},[`&::before, ${r}-eye, ${r}-download, ${r}-delete`]:{display:\"none\"}},[`${s}-progress`]:{bottom:e.marginXL,width:`calc(100% - ${unit(o(e.paddingXS).mul(2).equal())})`,paddingInlineStart:0}}}),[`${t}-wrapper${t}-picture-circle-wrapper`]:{[`${t}${t}-select`]:{borderRadius:\"50%\"}}}};init_globals();var genRtlStyle=e=>{const{componentCls:t}=e;return{[`${t}-rtl`]:{direction:\"rtl\"}}},rtl_default2=genRtlStyle,genBaseStyle6=e=>{const{componentCls:t,colorTextDisabled:r}=e;return{[`${t}-wrapper`]:Object.assign(Object.assign({},resetComponent(e)),{[t]:{outline:0,\"input[type='file']\":{cursor:\"pointer\"}},[`${t}-select`]:{display:\"inline-block\"},[`${t}-disabled`]:{color:r,cursor:\"not-allowed\"}})}},prepareComponentToken18=e=>({actionsColor:e.colorTextDescription}),style_default23=genStyleHooks(\"Upload\",(e=>{const{fontSizeHeading3:t,fontHeight:r,lineWidth:n,controlHeightLG:i,calc:o}=e,a=merge2(e,{uploadThumbnailSize:o(t).mul(2).equal(),uploadProgressOffset:o(o(r).div(2)).add(n).equal(),uploadPicCardSize:o(i).mul(2.55).equal()});return[genBaseStyle6(a),dragger_default(a),genPictureStyle(a),genPictureCardStyle(a),list_default(a),motion_default3(a),rtl_default2(a),collapse_default(a)]}),prepareComponentToken18);init_globals();var React293=__toESM(require_react()),import_classnames114=__toESM(require_classnames());function file2Obj(e){return Object.assign(Object.assign({},e),{lastModified:e.lastModified,lastModifiedDate:e.lastModifiedDate,name:e.name,size:e.size,type:e.type,uid:e.uid,percent:0,originFileObj:e})}function updateFileList(e,t){const r=_toConsumableArray(t),n=r.findIndex((t=>{let{uid:r}=t;return r===e.uid}));return-1===n?r.push(e):r[n]=e,r}function getFileItem(e,t){const r=void 0!==e.uid?\"uid\":\"name\";return t.filter((t=>t[r]===e[r]))[0]}function removeFileItem(e,t){const r=void 0!==e.uid?\"uid\":\"name\",n=t.filter((t=>t[r]!==e[r]));return n.length===t.length?null:n}init_globals();var extname=function(){const e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:\"\").split(\"/\"),t=e[e.length-1].split(/#|\\?/)[0];return(/\\.[^./\\\\]*$/.exec(t)||[\"\"])[0]},isImageFileType=e=>0===e.indexOf(\"image/\"),isImageUrl=e=>{if(e.type&&!e.thumbUrl)return isImageFileType(e.type);const t=e.thumbUrl||e.url||\"\",r=extname(t);return!(!/^data:image\\//.test(t)&&!/(webp|svg|png|gif|jpg|jpeg|jfif|bmp|dpg|ico|heic|heif)$/i.test(r))||!/^data:/.test(t)&&!r},MEASURE_SIZE=200;function previewImage(e){return new Promise((t=>{if(!e.type||!isImageFileType(e.type))return void t(\"\");const r=document.createElement(\"canvas\");r.width=MEASURE_SIZE,r.height=MEASURE_SIZE,r.style.cssText=`position: fixed; left: 0; top: 0; width: ${MEASURE_SIZE}px; height: ${MEASURE_SIZE}px; z-index: 9999; display: none;`,document.body.appendChild(r);const n=r.getContext(\"2d\"),i=new Image;if(i.onload=()=>{const{width:e,height:o}=i;let a=MEASURE_SIZE,s=MEASURE_SIZE,l=0,u=0;e>o?(s=o*(MEASURE_SIZE/e),u=-(s-a)/2):(a=e*(MEASURE_SIZE/o),l=-(a-s)/2),n.drawImage(i,l,u,a,s);const c=r.toDataURL();document.body.removeChild(r),window.URL.revokeObjectURL(i.src),t(c)},i.crossOrigin=\"anonymous\",e.type.startsWith(\"image/svg+xml\")){const t=new FileReader;t.onload=()=>{t.result&&\"string\"==typeof t.result&&(i.src=t.result)},t.readAsDataURL(e)}else if(e.type.startsWith(\"image/gif\")){const r=new FileReader;r.onload=()=>{r.result&&t(r.result)},r.readAsDataURL(e)}else i.src=window.URL.createObjectURL(e)}))}init_globals();var React292=__toESM(require_react()),import_classnames113=__toESM(require_classnames()),ListItem=React292.forwardRef(((e,t)=>{let{prefixCls:r,className:n,style:i,locale:o,listType:a,file:s,items:l,progress:u,iconRender:c,actionIconRender:d,itemRender:h,isImgUrl:f,showPreviewIcon:p,showRemoveIcon:m,showDownloadIcon:g,previewIcon:_,removeIcon:b,downloadIcon:y,extra:v,onPreview:A,onDownload:w,onClose:S}=e;var E,x;const{status:C}=s,[T,R]=React292.useState(C);React292.useEffect((()=>{\"removed\"!==C&&R(C)}),[C]);const[I,k]=React292.useState(!1);React292.useEffect((()=>{const e=setTimeout((()=>{k(!0)}),300);return()=>{clearTimeout(e)}}),[]);const P=c(s);let M=React292.createElement(\"div\",{className:`${r}-icon`},P);if(\"picture\"===a||\"picture-card\"===a||\"picture-circle\"===a)if(\"uploading\"===T||!s.thumbUrl&&!s.url){const e=(0,import_classnames113.default)(`${r}-list-item-thumbnail`,{[`${r}-list-item-file`]:\"uploading\"!==T});M=React292.createElement(\"div\",{className:e},P)}else{const e=(null==f?void 0:f(s))?React292.createElement(\"img\",{src:s.thumbUrl||s.url,alt:s.name,className:`${r}-list-item-image`,crossOrigin:s.crossOrigin}):P,t=(0,import_classnames113.default)(`${r}-list-item-thumbnail`,{[`${r}-list-item-file`]:f&&!f(s)});M=React292.createElement(\"a\",{className:t,onClick:e=>A(s,e),href:s.url||s.thumbUrl,target:\"_blank\",rel:\"noopener noreferrer\"},e)}const O=(0,import_classnames113.default)(`${r}-list-item`,`${r}-list-item-${T}`),B=\"string\"==typeof s.linkProps?JSON.parse(s.linkProps):s.linkProps,N=(\"function\"==typeof m?m(s):m)?d((\"function\"==typeof b?b(s):b)||React292.createElement(DeleteOutlined_default2,null),(()=>S(s)),r,o.removeFile,!0):null,j=(\"function\"==typeof g?g(s):g)&&\"done\"===T?d((\"function\"==typeof y?y(s):y)||React292.createElement(DownloadOutlined_default3,null),(()=>w(s)),r,o.downloadFile):null,L=\"picture-card\"!==a&&\"picture-circle\"!==a&&React292.createElement(\"span\",{key:\"download-delete\",className:(0,import_classnames113.default)(`${r}-list-item-actions`,{picture:\"picture\"===a})},j,N),D=\"function\"==typeof v?v(s):v,F=D&&React292.createElement(\"span\",{className:`${r}-list-item-extra`},D),U=(0,import_classnames113.default)(`${r}-list-item-name`),z=s.url?React292.createElement(\"a\",Object.assign({key:\"view\",target:\"_blank\",rel:\"noopener noreferrer\",className:U,title:s.name},B,{href:s.url,onClick:e=>A(s,e)}),s.name,F):React292.createElement(\"span\",{key:\"view\",className:U,onClick:e=>A(s,e),title:s.name},s.name,F),q=(\"function\"==typeof p?p(s):p)&&(s.url||s.thumbUrl)?React292.createElement(\"a\",{href:s.url||s.thumbUrl,target:\"_blank\",rel:\"noopener noreferrer\",onClick:e=>A(s,e),title:o.previewFile},\"function\"==typeof _?_(s):_||React292.createElement(EyeOutlined_default2,null)):null,G=(\"picture-card\"===a||\"picture-circle\"===a)&&\"uploading\"!==T&&React292.createElement(\"span\",{className:`${r}-list-item-actions`},q,\"done\"===T&&j,N),{getPrefixCls:H}=React292.useContext(ConfigContext),W=H(),V=React292.createElement(\"div\",{className:O},M,z,L,G,I&&React292.createElement(es_default2,{motionName:`${W}-fade`,visible:\"uploading\"===T,motionDeadline:2e3},(e=>{let{className:t}=e;const n=\"percent\"in s?React292.createElement(progress_default2,Object.assign({},u,{type:\"line\",percent:s.percent,\"aria-label\":s[\"aria-label\"],\"aria-labelledby\":s[\"aria-labelledby\"]})):null;return React292.createElement(\"div\",{className:(0,import_classnames113.default)(`${r}-list-item-progress`,t)},n)}))),$=s.response&&\"string\"==typeof s.response?s.response:(null===(E=s.error)||void 0===E?void 0:E.statusText)||(null===(x=s.error)||void 0===x?void 0:x.message)||o.uploadError,K=\"error\"===T?React292.createElement(tooltip_default,{title:$,getPopupContainer:e=>e.parentNode},V):V;return React292.createElement(\"div\",{className:(0,import_classnames113.default)(`${r}-list-item-container`,n),style:i,ref:t},h?h(K,s,l,{download:w.bind(null,s),preview:A.bind(null,s),remove:S.bind(null,s)}):K)})),ListItem_default=ListItem,InternalUploadList=(e,t)=>{const{listType:r=\"text\",previewFile:n=previewImage,onPreview:i,onDownload:o,onRemove:a,locale:s,iconRender:l,isImageUrl:u=isImageUrl,prefixCls:c,items:d=[],showPreviewIcon:h=!0,showRemoveIcon:f=!0,showDownloadIcon:p=!1,removeIcon:m,previewIcon:g,downloadIcon:_,extra:b,progress:y={size:[-1,2],showInfo:!1},appendAction:v,appendActionVisible:A=!0,itemRender:w,disabled:S}=e,E=useForceUpdate(),[x,C]=React293.useState(!1),T=[\"picture-card\",\"picture-circle\"].includes(r);React293.useEffect((()=>{r.startsWith(\"picture\")&&(d||[]).forEach((e=>{(e.originFileObj instanceof File||e.originFileObj instanceof Blob)&&void 0===e.thumbUrl&&(e.thumbUrl=\"\",null==n||n(e.originFileObj).then((t=>{e.thumbUrl=t||\"\",E()})))}))}),[r,d,n]),React293.useEffect((()=>{C(!0)}),[]);const R=(e,t)=>{if(i)return t.preventDefault(),i(e)},I=e=>{\"function\"==typeof o?o(e):e.url&&window.open(e.url)},k=e=>{null==a||a(e)},P=e=>{if(l)return l(e,r);const t=\"uploading\"===e.status;if(r.startsWith(\"picture\")){const n=\"picture\"===r?React293.createElement(LoadingOutlined_default3,null):s.uploading,i=(null==u?void 0:u(e))?React293.createElement(PictureTwoTone_default2,null):React293.createElement(FileTwoTone_default2,null);return t?n:i}return t?React293.createElement(LoadingOutlined_default3,null):React293.createElement(PaperClipOutlined_default2,null)},M=(e,t,r,n,i)=>{const o={type:\"text\",size:\"small\",title:n,onClick:r=>{var n,i;t(),React293.isValidElement(e)&&(null===(i=(n=e.props).onClick)||void 0===i||i.call(n,r))},className:`${r}-list-item-action`};return i&&(o.disabled=S),React293.isValidElement(e)?React293.createElement(button_default2,Object.assign({},o,{icon:cloneElement3(e,Object.assign(Object.assign({},e.props),{onClick:()=>{}}))})):React293.createElement(button_default2,Object.assign({},o),React293.createElement(\"span\",null,e))};React293.useImperativeHandle(t,(()=>({handlePreview:R,handleDownload:I})));const{getPrefixCls:O}=React293.useContext(ConfigContext),B=O(\"upload\",c),N=O(),j=(0,import_classnames114.default)(`${B}-list`,`${B}-list-${r}`),L=React293.useMemo((()=>omit(motion_default(N),[\"onAppearEnd\",\"onEnterEnd\",\"onLeaveEnd\"])),[N]),D=Object.assign(Object.assign({},T?{}:L),{motionDeadline:2e3,motionName:`${B}-${T?\"animate-inline\":\"animate\"}`,keys:_toConsumableArray(d.map((e=>({key:e.uid,file:e})))),motionAppear:x});return React293.createElement(\"div\",{className:j},React293.createElement(CSSMotionList_default,Object.assign({},D,{component:!1}),(e=>{let{key:t,file:n,className:i,style:o}=e;return React293.createElement(ListItem_default,{key:t,locale:s,prefixCls:B,className:i,style:o,file:n,items:d,progress:y,listType:r,isImgUrl:u,showPreviewIcon:h,showRemoveIcon:f,showDownloadIcon:p,removeIcon:m,previewIcon:g,downloadIcon:_,extra:b,iconRender:P,actionIconRender:M,itemRender:w,onPreview:R,onDownload:I,onClose:k})})),v&&React293.createElement(es_default2,Object.assign({},D,{visible:A,forceRender:!0}),(e=>{let{className:t,style:r}=e;return cloneElement3(v,(e=>({className:(0,import_classnames114.default)(e.className,t),style:Object.assign(Object.assign(Object.assign({},r),{pointerEvents:t?\"none\":void 0}),e.style)})))})))},UploadList=React293.forwardRef(InternalUploadList);UploadList.displayName=\"UploadList\";var UploadList_default=UploadList,__awaiter=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{l(n.next(e))}catch(e4){o(e4)}}function s(e){try{l(n.throw(e))}catch(e4){o(e4)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}l((n=n.apply(e,t||[])).next())}))},LIST_IGNORE=`__LIST_IGNORE_${Date.now()}__`,InternalUpload=(e,t)=>{const{fileList:r,defaultFileList:n,onRemove:i,showUploadList:o=!0,listType:a=\"text\",onPreview:s,onDownload:l,onChange:u,onDrop:c,previewFile:d,disabled:h,locale:f,iconRender:p,isImageUrl:m,progress:g,prefixCls:_,className:b,type:y=\"select\",children:v,style:A,itemRender:w,maxCount:S,data:E={},multiple:x=!1,hasControlInside:C=!0,action:T=\"\",accept:R=\"\",supportServerRender:I=!0,rootClassName:k}=e,P=React294.useContext(DisabledContext_default),M=null!=h?h:P,[O,B]=useMergedState(n||[],{value:r,postState:e=>null!=e?e:[]}),[N,j]=React294.useState(\"drop\"),L=React294.useRef(null),D=React294.useRef(null);{const t=devUseWarning(\"Upload\");t(\"fileList\"in e||!(\"value\"in e),\"usage\",\"`value` is not a valid prop, do you mean `fileList`?\"),t.deprecated(!(\"transformFile\"in e),\"transformFile\",\"beforeUpload\")}React294.useMemo((()=>{const e=Date.now();(r||[]).forEach(((t,r)=>{t.uid||Object.isFrozen(t)||(t.uid=`__AUTO__${e}_${r}__`)}))}),[r]);const F=(e,t,r)=>{let n=_toConsumableArray(t),i=!1;1===S?n=n.slice(-1):S&&(i=n.length>S,n=n.slice(0,S)),(0,import_react_dom6.flushSync)((()=>{B(n)}));const o={file:e,fileList:n};r&&(o.event=r),i&&\"removed\"!==e.status&&!n.some((t=>t.uid===e.uid))||(0,import_react_dom6.flushSync)((()=>{null==u||u(o)}))},U=e=>{const t=e.filter((e=>!e.file[LIST_IGNORE]));if(!t.length)return;const r=t.map((e=>file2Obj(e.file)));let n=_toConsumableArray(O);r.forEach((e=>{n=updateFileList(e,n)})),r.forEach(((e,r)=>{let i=e;if(t[r].parsedFile)e.status=\"uploading\";else{const{originFileObj:t}=e;let r;try{r=new File([t],t.name,{type:t.type})}catch(o){r=new Blob([t],{type:t.type}),r.name=t.name,r.lastModifiedDate=new Date,r.lastModified=(new Date).getTime()}r.uid=e.uid,i=r}F(i,n)}))},z=(e,t,r)=>{try{\"string\"==typeof e&&(e=JSON.parse(e))}catch(o){}if(!getFileItem(t,O))return;const n=file2Obj(t);n.status=\"done\",n.percent=100,n.response=e,n.xhr=r;const i=updateFileList(n,O);F(n,i)},q=(e,t)=>{if(!getFileItem(t,O))return;const r=file2Obj(t);r.status=\"uploading\",r.percent=e.percent;const n=updateFileList(r,O);F(r,n,e)},G=(e,t,r)=>{if(!getFileItem(r,O))return;const n=file2Obj(r);n.error=e,n.response=t,n.status=\"error\";const i=updateFileList(n,O);F(n,i)},H=e=>{let t;Promise.resolve(\"function\"==typeof i?i(e):i).then((r=>{var n;if(!1===r)return;const i=removeFileItem(e,O);i&&(t=Object.assign(Object.assign({},e),{status:\"removed\"}),null==O||O.forEach((e=>{const r=void 0!==t.uid?\"uid\":\"name\";e[r]!==t[r]||Object.isFrozen(e)||(e.status=\"removed\")})),null===(n=L.current)||void 0===n||n.abort(t),F(t,i))}))},W=e=>{j(e.type),\"drop\"===e.type&&(null==c||c(e))};React294.useImperativeHandle(t,(()=>({onBatchStart:U,onSuccess:z,onProgress:q,onError:G,fileList:O,upload:L.current,nativeElement:D.current})));const{getPrefixCls:V,direction:$,upload:K}=React294.useContext(ConfigContext),X=V(\"upload\",_),Y=Object.assign(Object.assign({onBatchStart:U,onError:G,onProgress:q,onSuccess:z},e),{data:E,multiple:x,action:T,accept:R,supportServerRender:I,prefixCls:X,disabled:M,beforeUpload:(t,r)=>__awaiter(void 0,void 0,void 0,(function*(){const{beforeUpload:n,transformFile:i}=e;let o=t;if(n){const e=yield n(t,r);if(!1===e)return!1;if(delete t[LIST_IGNORE],e===LIST_IGNORE)return Object.defineProperty(t,LIST_IGNORE,{value:!0,configurable:!0}),!1;\"object\"==typeof e&&e&&(o=e)}return i&&(o=yield i(o)),o})),onChange:void 0,hasControlInside:C});delete Y.className,delete Y.style,v&&!M||delete Y.id;const J=`${X}-wrapper`,[Q,Z,ee]=style_default23(X,J),[te]=useLocale_default(\"Upload\",en_US_default6.Upload),{showRemoveIcon:re,showPreviewIcon:ne,showDownloadIcon:ie,removeIcon:oe,previewIcon:ae,downloadIcon:se,extra:le}=\"boolean\"==typeof o?{}:o,ue=void 0===re?!M:re,ce=(e,t)=>o?React294.createElement(UploadList_default,{prefixCls:X,listType:a,items:O,previewFile:d,onPreview:s,onDownload:l,onRemove:H,showRemoveIcon:ue,showPreviewIcon:ne,showDownloadIcon:ie,removeIcon:oe,previewIcon:ae,downloadIcon:se,iconRender:p,extra:le,locale:Object.assign(Object.assign({},te),f),isImageUrl:m,progress:g,appendAction:e,appendActionVisible:t,itemRender:w,disabled:M}):e,de=(0,import_classnames115.default)(J,b,k,Z,ee,null==K?void 0:K.className,{[`${X}-rtl`]:\"rtl\"===$,[`${X}-picture-card-wrapper`]:\"picture-card\"===a,[`${X}-picture-circle-wrapper`]:\"picture-circle\"===a}),he=Object.assign(Object.assign({},null==K?void 0:K.style),A);if(\"drag\"===y){const e=(0,import_classnames115.default)(Z,X,`${X}-drag`,{[`${X}-drag-uploading`]:O.some((e=>\"uploading\"===e.status)),[`${X}-drag-hover`]:\"dragover\"===N,[`${X}-disabled`]:M,[`${X}-rtl`]:\"rtl\"===$});return Q(React294.createElement(\"span\",{className:de,ref:D},React294.createElement(\"div\",{className:e,style:he,onDrop:W,onDragOver:W,onDragLeave:W},React294.createElement(es_default17,Object.assign({},Y,{ref:L,className:`${X}-btn`}),React294.createElement(\"div\",{className:`${X}-drag-container`},v))),ce()))}const fe=(0,import_classnames115.default)(X,`${X}-select`,{[`${X}-disabled`]:M}),pe=React294.createElement(\"div\",{className:fe,style:v?void 0:{display:\"none\"}},React294.createElement(es_default17,Object.assign({},Y,{ref:L})));return Q(\"picture-card\"===a||\"picture-circle\"===a?React294.createElement(\"span\",{className:de,ref:D},ce(pe,!!v)):React294.createElement(\"span\",{className:de,ref:D},pe,ce()))},Upload2=React294.forwardRef(InternalUpload);Upload2.displayName=\"Upload\";var Upload_default2=Upload2,__rest48=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)__left_angle_mark_0&&(r[n]=e[n]);if(null!=e&&\"function\"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i__left_angle_mark_n.length;i++)t.indexOf(n[i])__left_angle_mark_0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r},Dragger=React295.forwardRef(((e,t)=>{var{style:r,height:n,hasControlInside:i=!1}=e,o=__rest48(e,[\"style\",\"height\",\"hasControlInside\"]);return React295.createElement(Upload_default2,Object.assign({ref:t,hasControlInside:i},o,{type:\"drag\",style:Object.assign(Object.assign({},r),{height:n})}))}));Dragger.displayName=\"Dragger\";var Dragger_default=Dragger,Upload3=Upload_default2;Upload3.Dragger=Dragger_default,Upload3.LIST_IGNORE=LIST_IGNORE;var upload_default=Upload3;init_globals();var elementColor=[\"#01204E\"],highlightColorForElement=\"#fd5907\";function djb2Hash(e){e||(e=\"unnamed\");let t=5381;for(let r=0;r__left_angle_mark_e.length;r++)t=(t__left_angle_mark___left_angle_mark_5)+t+e.charCodeAt(r);return t>>>0}function colorForName(e){const t=djb2Hash(e);return elementColor[t%elementColor.length]}function highlightColorForType(e){return highlightColorForElement}function globalThemeConfig(){return{token:{colorPrimary:\"#06b1ab\"},components:{Layout:{headerHeight:60,headerPadding:\"0 30px\",headerBg:\"#FFF\",bodyBg:\"#FFF\"}}}}init_globals();var import_jsx_runtime=__toESM(require_jsx_runtime());function timeCostStrElement(e){let t;return t=\"number\"!=typeof e?\"-\":`${(e/1e3).toFixed(2)}s`,(0,import_jsx_runtime.jsx)(\"span\",{style:{fontVariantNumeric:\"tabular-nums\",fontFeatureSettings:\"tnum\"},children:t})}var iconForStatus=e=>{switch(e){case\"finished\":case\"passed\":case\"success\":case\"connected\":return(0,import_jsx_runtime.jsx)(\"span\",{style:{color:\"#2B8243\"},children:(0,import_jsx_runtime.jsx)(CheckOutlined_default2,{})});case\"finishedWithWarning\":return(0,import_jsx_runtime.jsx)(\"span\",{style:{color:\"#f7bb05\"},children:(0,import_jsx_runtime.jsx)(WarningOutlined_default2,{})});case\"failed\":case\"timedOut\":case\"interrupted\":return(0,import_jsx_runtime.jsx)(\"span\",{style:{color:\"#FF0A0A\"},children:(0,import_jsx_runtime.jsx)(CloseOutlined_default2,{})});case\"pending\":return(0,import_jsx_runtime.jsx)(ClockCircleOutlined_default2,{});case\"cancelled\":case\"skipped\":return(0,import_jsx_runtime.jsx)(LogoutOutlined_default2,{});case\"running\":return(0,import_jsx_runtime.jsx)(ArrowRightOutlined_default2,{});default:return(0,import_jsx_runtime.jsx)(MinusOutlined_default2,{})}};init_globals();var import_jsx_runtime2=__toESM(require_jsx_runtime()),PanelTitle=e=>{const t=e.subTitle?(0,import_jsx_runtime2.jsx)(\"div\",{className:\"task-list-sub-name\",children:e.subTitle}):null;return(0,import_jsx_runtime2.jsxs)(\"div\",{className:\"panel-title\",children:[(0,import_jsx_runtime2.jsx)(\"div\",{className:\"task-list-name\",children:e.title}),t]})},panel_title_default=PanelTitle;init_globals();var esm_exports={};__export(esm_exports,{create:()=>create,createStore:()=>createStore,default:()=>react,useStore:()=>useStore}),init_globals(),init_globals();var import_meta={},createStoreImpl=e=>{let t;const r=new Set,n=(e,n)=>{const i=\"function\"==typeof e?e(t):e;if(!Object.is(i,t)){const e=t;t=(null!=n?n:\"object\"!=typeof i||null===i)?i:Object.assign({},t,i),r.forEach((r=>r(t,e)))}},i=()=>t,o={setState:n,getState:i,getInitialState:()=>a,subscribe:e=>(r.add(e),()=>r.delete(e)),destroy:()=>{\"production\"!==(import_meta.env?import_meta.env.MODE:void 0)&&import_console_browserify.default.warn(\"[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected.\"),r.clear()}},a=t=e(n,i,o);return o},createStore=e=>e?createStoreImpl(e):createStoreImpl,import_react96=__toESM(require_react(),1),import_with_selector=__toESM(require_with_selector(),1),import_meta2={},{useDebugValue:useDebugValue}=import_react96.default,{useSyncExternalStoreWithSelector:useSyncExternalStoreWithSelector}=import_with_selector.default,didWarnAboutEqualityFn=!1,identity=e=>e;function useStore(e,t=identity,r){\"production\"!==(import_meta2.env?import_meta2.env.MODE:void 0)&&r&&!didWarnAboutEqualityFn&&(import_console_browserify.default.warn(\"[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937\"),didWarnAboutEqualityFn=!0);const n=useSyncExternalStoreWithSelector(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,r);return useDebugValue(n),n}var createImpl=e=>{\"production\"!==(import_meta2.env?import_meta2.env.MODE:void 0)&&\"function\"!=typeof e&&import_console_browserify.default.warn(\"[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.\");const t=\"function\"==typeof e?createStore(e):e,r=(e,r)=>useStore(t,e,r);return Object.assign(r,t),r},create=e=>e?createImpl(e):createImpl,react=e=>(\"production\"!==(import_meta2.env?import_meta2.env.MODE:void 0)&&import_console_browserify.default.warn(\"[DEPRECATED] Default export is deprecated. Instead use `import { create } from 'zustand'`.\"),create(e));init_globals();var import_ui_utils=__toESM(require_ui_utils()),stillDuration=900,actionSpinningPointerDuration=300,stillAfterInsightDuration=300,locateDuration=800,actionDuration=1e3,clearInsightDuration=200,cameraStateForRect=(e,t,r)=>{const n=t/r;let i;i=e.width/e.height>=n?e.width:e.height/r*t;const o=i>400?.1:i>50?.2:.3,a=Math.min(t,i+t*o*2),s=a*(r/t);let l=Math.min(e.left-t*o,t-a);l=Math.max(l,0);let u=Math.min(e.top-r*o,r-s);return u=Math.max(u,0),{left:Math.round(l),top:Math.round(u),width:Math.round(a)}},mergeTwoCameraState=(e,t)=>{const r=Math.min(e.left,t.left);return{left:r,top:Math.min(e.top,t.top),width:Math.max(e.left+e.width,t.left+t.width)-r}},allScriptsFromDump=e=>{let t=0,r=0;if(e.executions.forEach((e=>{e.tasks.forEach((e=>{var n,i,o,a,s,l,u,c,d,h,f,p;const m=e;(null==(a=null==(o=null==(i=null==(n=m.log)?void 0:n.dump)?void 0:i.context)?void 0:o.size)?void 0:a.width)&&(t=null==(c=null==(u=null==(l=null==(s=m.log)?void 0:s.dump)?void 0:l.context)?void 0:u.size)?void 0:c.width,r=null==(p=null==(f=null==(h=null==(d=m.log)?void 0:d.dump)?void 0:h.context)?void 0:f.size)?void 0:p.height)}))})),!t||!r)return import_console_browserify.default.error(\"width or height is missing in dump file\"),null;const n=[];return e.executions.forEach((e=>{const i=generateAnimationScripts(e,-1,t,r);i&&n.push(...i)})),{scripts:n.filter(((e,t)=>t===n.length-1||\"Done\"!==e.title)),width:t,height:r}},generateAnimationScripts=(e,t,r,n)=>{if(!e||!e.tasks.length)return null;if(0===r||0===n)return null;let i=[];if(-1===t)i=e.tasks;else{const r=e.tasks.findIndex((e=>e===t));if(-1===r)return import_console_browserify.default.error(\"task not found, cannot generate animation scripts\"),null;if(r===e.tasks.length-1)return null;for(let t=r;t__left_angle_mark_e.tasks.length&&!(t>r&&\"Planning\"===e.tasks[t].type);t++)i.push(e.tasks[t])}if(i=i.filter((e=>\"Assertion\"!==e.type&&\"Query\"!==e.type)),0===i.length)return null;const o=cameraStateForRect({left:0,top:0,width:r,height:n},r,n),a=(e,t,r)=>({type:\"pointer\",img:e,duration:0,title:t,subTitle:r}),s=[];let l,u=o,c=!1;const d=i.length;let h=\"\",f=!1;return i.forEach(((e,t)=>{var i,p,m,g,_,b,y,v,A,w,S;if(!f){if(\"Planning\"===e.type){const t=e;t.recorder&&t.recorder.length>0&&(s.push({type:\"img\",img:null==(p=null==(i=t.recorder)?void 0:i[0])?void 0:p.screenshot,camera:o,duration:stillDuration,title:(0,import_ui_utils.typeStr)(e),subTitle:(0,import_ui_utils.paramStr)(e)}),h=(0,import_ui_utils.paramStr)(e))}else if(\"Insight\"===e.type){const t=e,i=null==(m=t.output)?void 0:m.element,a=(0,import_ui_utils.typeStr)(e),d=(0,import_ui_utils.paramStr)(e);if((null==i?void 0:i.rect)&&(l={...cameraStateForRect(i.rect,r,n),pointerLeft:i.center[0],pointerTop:i.center[1]}),null==(g=t.log)?void 0:g.dump){const e=t.log.dump;if(!(null==(_=null==e?void 0:e.context)?void 0:_.screenshotBase64))throw new Error(\"insight dump is required\");const r=e.context.content.length;let n;e.context.screenshotBase64WithElementMarker&&s.push({type:\"img\",img:e.context.screenshotBase64,duration:stillAfterInsightDuration,title:a,subTitle:d}),n=u===o?void 0:l?mergeTwoCameraState(u,l):void 0,s.push({type:\"insight\",img:e.context.screenshotBase64WithElementMarker||e.context.screenshotBase64,insightDump:e,camera:n,duration:r>20?locateDuration:.5*locateDuration,insightCameraDuration:locateDuration,title:a,subTitle:d}),s.push({type:\"sleep\",duration:stillAfterInsightDuration,title:a,subTitle:d}),c=!0}}else if(\"Action\"===e.type&&\"FalsyConditionStatement\"!==e.subType){const r=(0,import_ui_utils.typeStr)(e),n=(0,import_ui_utils.paramStr)(e);s.push(a(mousePointer,r,n)),u=null!=l?l:o,s.push({type:\"img\",img:null==(y=null==(b=e.recorder)?void 0:b[0])?void 0:y.screenshot,duration:actionDuration,camera:\"Sleep\"===e.subType?o:l,title:r,subTitle:n}),c&&(s.push({type:\"clear-insight\",duration:clearInsightDuration,title:r,subTitle:n}),c=!1);const i=t__left_angle_mark_d-1?stillDuration:0;(null==(A=null==(v=e.recorder)?void 0:v[1])?void 0:A.screenshot)?(s.push({type:\"spinning-pointer\",duration:actionSpinningPointerDuration,title:r,subTitle:n}),s.push(a(mousePointer,r,n)),s.push({type:\"img\",img:null==(S=null==(w=e.recorder)?void 0:w[1])?void 0:S.screenshot,duration:i,title:r,subTitle:n})):s.push({type:\"sleep\",duration:i,title:r,subTitle:n})}if(\"finished\"===e.status);else{f=!0;const t=(0,import_ui_utils.typeStr)(e),r=e.error||\"unknown error\",n=r.indexOf(\"NOT_IMPLEMENTED_AS_DESIGNED\")>0?\"Further actions cannot be performed in the current environment\":r;s.push({type:\"img\",img:e.recorder&&e.recorder.length>0?e.recorder[e.recorder.length-1].screenshot:\"\",camera:o,duration:stillDuration,title:t,subTitle:n})}}})),f||s.push({title:\"Done\",subTitle:h,type:\"img\",duration:stillDuration,camera:o}),s},{create:create2}=esm_exports,useBlackboardPreference=create2((e=>({markerVisible:!0,elementsVisible:!0,setMarkerVisible:t=>{e({markerVisible:t})},setTextsVisible:t=>{e({elementsVisible:t})}}))),CONFIG_KEY=\"midscene-env-config\",SERVICE_MODE_KEY=\"midscene-service-mode\",HISTORY_KEY=\"midscene-prompt-history\",getConfigStringFromLocalStorage=()=>localStorage.getItem(CONFIG_KEY)||\"\",getHistoryFromLocalStorage=()=>{const e=localStorage.getItem(HISTORY_KEY);return e?JSON.parse(e):[]},parseConfig=e=>{const t=e.split(\"\\n\"),r={};return t.forEach((e=>{const t=e.trim();if(t.startsWith(\"#\"))return;const n=t.replace(/^export\\s+/i,\"\").replace(/;$/,\"\").trim().match(/^(\\w+)=(.*)$/);if(n){const[,e,t]=n;let i=t.trim();(i.startsWith(\"'\")&&i.endsWith(\"'\")||i.startsWith('\"')&&i.endsWith('\"'))&&(i=i.slice(1,-1)),r[e]=i}})),r},useEnvConfig=create2(((e,t)=>{const r=getConfigStringFromLocalStorage(),n=parseConfig(r),i=window.location.href.startsWith(\"chrome-extension\"),o=localStorage.getItem(SERVICE_MODE_KEY);return{serviceMode:i?\"In-Browser-Extension\":o||\"Server\",setServiceMode:t=>{if(i)throw new Error(\"serviceMode cannot be set in extension\");e({serviceMode:t}),localStorage.setItem(SERVICE_MODE_KEY,t)},config:n,configString:r,setConfig:t=>e({config:t}),loadConfig:t=>{const r=parseConfig(t);e({config:r,configString:t}),localStorage.setItem(CONFIG_KEY,t)},history:getHistoryFromLocalStorage(),clearHistory:()=>{e({history:[]}),localStorage.removeItem(HISTORY_KEY)},addHistory:r=>{const n=[r,...t().history.filter((e=>e.prompt!==r.prompt))];for(;n.length>10;)n.pop();e({history:n}),localStorage.setItem(HISTORY_KEY,JSON.stringify(n))}}})),useExecutionDump=create2(((e,t)=>{let r=0;const n={dump:null,replayAllMode:!1,allExecutionAnimation:null,insightWidth:null,insightHeight:null,activeTask:null,activeExecution:null,activeExecutionAnimation:null,insightDump:null,_insightDumpLoadId:0,hoverTask:null,hoverTimestamp:null,hoverPreviewConfig:null};return{...n,_executionDumpLoadId:r,setReplayAllMode:n=>{t().allExecutionAnimation?(e({replayAllMode:n}),n&&e({activeTask:null,activeExecution:null,activeExecutionAnimation:null,_executionDumpLoadId:++r,insightDump:null})):import_console_browserify.default.error(\"allExecutionAnimation not found, failed to set replayAllMode\")},setGroupedDump:i=>{if(import_console_browserify.default.log(\"will set ExecutionDump\",i),e({...n,dump:i}),i&&i.executions.length>0){const n=()=>{i&&i.executions.length>0&&i.executions[0].tasks.length>0&&t().setActiveTask(i.executions[0].tasks[0])},o=allScriptsFromDump(i);if(!o)return n();const{scripts:a,width:s,height:l}=o;e({allExecutionAnimation:a,_executionDumpLoadId:++r,replayAllMode:!0,insightWidth:s,insightHeight:l})}},setActiveTask(n){var i;let o;const a=t(),s=a.dump;if(s&&(o=s.executions.find((e=>e.tasks.includes(n)))),!o)throw new Error(\"parentExecution not found\");const l=a.insightWidth,u=a.insightHeight;if(e({replayAllMode:!1,activeTask:n,activeExecution:o,_executionDumpLoadId:++r,activeExecutionAnimation:l&&u?generateAnimationScripts(o,n,l,u):null}),import_console_browserify.default.log(\"will set task\",n),\"Insight\"===n.type){const t=null==(i=n.log)?void 0:i.dump;e({insightDump:t,_insightDumpLoadId:++a._insightDumpLoadId})}else e({insightDump:null})},setHoverTask(t,r){e({hoverTask:t,hoverTimestamp:r||null})},setHoverPreviewConfig(t){e(t?{hoverPreviewConfig:{x:Math.floor(t.x),y:Math.floor(t.y)}}:{hoverPreviewConfig:null})},reset:()=>{e(n)}}})),useAllCurrentTasks=()=>{const e=useExecutionDump((e=>e.dump));return e?e.executions.reduce(((e,t)=>e.concat(t.tasks)),[]):[]},import_jsx_runtime3=__toESM(require_jsx_runtime()),noop3=()=>{},Card=e=>{const{highlightWithColor:t,title:r,subtitle:n,onMouseEnter:i,onMouseLeave:o,content:a,characteristic:s}=e,l=e.characteristic?(0,import_jsx_runtime3.jsx)(\"div\",{className:\"item-extra\",children:(0,import_jsx_runtime3.jsx)(\"div\",{className:\"title-tag\",children:(0,import_jsx_runtime3.jsx)(tooltip_default,{placement:\"bottomRight\",title:s,mouseEnterDelay:0,children:(0,import_jsx_runtime3.jsx)(\"span\",{children:(0,import_jsx_runtime3.jsx)(RadiusSettingOutlined_default2,{})})})})}):null,u=e.characteristic?\"title-right-padding\":\"\",c=e.liteMode?\"item-lite\":\"\",d=t?{backgroundColor:t}:{};return(0,import_jsx_runtime3.jsxs)(\"div\",{className:`item ${c} ${t?\"item-highlight\":\"\"}`,style:{...d},onMouseEnter:i,onMouseLeave:o,children:[(0,import_jsx_runtime3.jsxs)(\"div\",{className:`title ${u}`,style:{display:r?\"block\":\"none\"},children:[r,l]}),(0,import_jsx_runtime3.jsx)(\"div\",{className:`subtitle ${u}`,style:{display:n?\"block\":\"none\"},children:n}),(0,import_jsx_runtime3.jsx)(\"div\",{className:\"description\",style:{display:a?\"block\":\"none\"},children:a})]})},MetaKV=e=>(0,import_jsx_runtime3.jsx)(\"div\",{className:\"meta-kv\",children:e.data.map(((e,t)=>(0,import_jsx_runtime3.jsxs)(\"div\",{className:\"meta\",children:[(0,import_jsx_runtime3.jsx)(\"div\",{className:\"meta-key\",children:e.key}),(0,import_jsx_runtime3.jsx)(\"div\",{className:\"meta-value\",children:e.content})]},t)))}),objectWithoutKeys=(e,t)=>Object.keys(e).reduce(((r,n)=>(t.includes(n)||(r[n]=e[n]),r)),{}),DetailSide=()=>{var e,t,r,n,i,o,a,s,l,u,c,d;const h=useExecutionDump((e=>e.activeTask)),f=useExecutionDump((e=>e.insightDump)),{matchedSection:p,matchedElement:m}=f||{},g=(null==(r=null==(t=null==(e=null==h?void 0:h.log)?void 0:e.dump)?void 0:t.taskInfo)?void 0:r.usage)?JSON.stringify(h.log.dump.taskInfo.usage,void 0,2):\"\",_=MetaKV({data:[{key:\"status\",content:(null==h?void 0:h.status)||\"\"},{key:\"start\",content:timeStr(null==(n=null==h?void 0:h.timing)?void 0:n.start)},{key:\"end\",content:timeStr(null==(i=null==h?void 0:h.timing)?void 0:i.end)},{key:\"time cost\",content:timeCostStrElement(null==(o=null==h?void 0:h.timing)?void 0:o.cost)},{key:\"cache\",content:(null==h?void 0:h.cache)?JSON.stringify(null==h?void 0:h.cache):\"false\"},...(null==h?void 0:h.locate)?[{key:\"locate\",content:JSON.stringify(h.locate)}]:[],...g?[{key:\"usage\",content:g}]:[]]});let b=null;if(\"Planning\"===(null==h?void 0:h.type)){const e=h;b=(null==(a=e.param)?void 0:a.whatHaveDone)?MetaKV({data:[{key:\"type\",content:h&&(0,import_ui_utils2.typeStr)(h)||\"\"},{key:\"whatHaveDone\",content:e.param.whatHaveDone},{key:\"whatToDoNext\",content:e.param.userPrompt}]}):MetaKV({data:[{key:\"type\",content:h&&(0,import_ui_utils2.typeStr)(h)||\"\"},{key:\"userPrompt\",content:(0,import_ui_utils2.paramStr)(h)||\"\"}]})}else\"Insight\"===(null==h?void 0:h.type)?b=MetaKV({data:[{key:\"type\",content:h&&(0,import_ui_utils2.typeStr)(h)||\"\"},...(0,import_ui_utils2.paramStr)(h)?[{key:\"param\",content:(0,import_ui_utils2.paramStr)(h)||\"\"}]:[],...(null==(s=null==h?void 0:h.param)?void 0:s.id)?[{key:\"id\",content:h.param.id}]:[],...(null==h?void 0:h.thought)?[{key:\"thought\",content:h.thought}]:[]]}):\"Action\"===(null==h?void 0:h.type)&&(b=MetaKV({data:[{key:\"type\",content:h&&(0,import_ui_utils2.typeStr)(h)||\"\"},{key:\"value\",content:(0,import_ui_utils2.paramStr)(h)||\"\"}]}));const y=(null==m?void 0:m.length)?m.map(((e,t)=>{const r=(e=>{const t=e=>Boolean(e)&&\"object\"==typeof e&&void 0!==e.content&&Boolean(e.center)&&Boolean(e.rect),r=e=>(0,import_jsx_runtime3.jsx)(\"span\",{children:(0,import_jsx_runtime3.jsx)(tag_default,{bordered:!1,color:\"orange\",className:\"element-button\",children:\"Element\"})});return Array.isArray(e)||\"object\"!=typeof e?(0,import_jsx_runtime3.jsx)(\"pre\",{className:\"description-content\",children:JSON.stringify(e,void 0,2)}):Object.keys(e).map((n=>{const i=e[n];let o;return o=\"object\"==typeof i&&t(i)?r():Array.isArray(i)&&i.some((e=>t(e)))?i.map(((e,t)=>(0,import_jsx_runtime3.jsx)(\"span\",{children:r()},t))):\"string\"==typeof i?i:JSON.stringify(i,void 0,2),(0,import_jsx_runtime3.jsxs)(\"pre\",{className:\"description-content\",children:[n,\" \",o]},n)}))})(objectWithoutKeys(e,[\"content\",\"rect\",\"center\",\"left\",\"top\",\"right\",\"bottom\",\"locator\"]));return(0,import_jsx_runtime3.jsx)(Card,{title:e.content,highlightWithColor:void 0,subtitle:\"\",content:r},t)})):null,v=(null==h?void 0:h.error)?(0,import_jsx_runtime3.jsx)(Card,{liteMode:!0,title:\"Error\",onMouseEnter:noop3,onMouseLeave:noop3,content:(0,import_jsx_runtime3.jsx)(\"pre\",{className:\"description-content\",style:{color:\"#F00\"},children:h.error})}):null,A=(null==f?void 0:f.data)?(0,import_jsx_runtime3.jsx)(Card,{liteMode:!0,onMouseEnter:noop3,onMouseLeave:noop3,content:(0,import_jsx_runtime3.jsx)(\"pre\",{children:JSON.stringify(f.data,void 0,2)})}):null;let w=null;\"Insight\"===(null==h?void 0:h.type)&&\"Assert\"===h.subType&&(w=(0,import_jsx_runtime3.jsx)(Card,{liteMode:!0,title:\"Assert\",onMouseEnter:noop3,onMouseLeave:noop3,content:(0,import_jsx_runtime3.jsx)(\"pre\",{className:\"description-content\",children:JSON.stringify(h.output,void 0,2)})}));const S=null==(l=null==h?void 0:h.output)?void 0:l.actions;let E=[];return S&&(E=E.concat(S.map((e=>{const t=e.param||{},r=Object.keys(t).length?JSON.stringify(t,void 0,2):null,n=\"Locate\"===e.type&&e.locate?JSON.stringify(e.locate):null;return{color:\"#06B1AB\",children:(0,import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment,{children:[(0,import_jsx_runtime3.jsx)(\"p\",{children:(0,import_jsx_runtime3.jsx)(\"b\",{children:(0,import_ui_utils2.typeStr)(e)})}),(0,import_jsx_runtime3.jsx)(\"p\",{children:e.thought}),(0,import_jsx_runtime3.jsx)(\"p\",{children:r}),(0,import_jsx_runtime3.jsx)(\"p\",{children:n})]})}}))),(null==(u=h.output)?void 0:u.furtherPlan)&&E.push({color:\"#06B1AB\",children:(0,import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment,{children:[(0,import_jsx_runtime3.jsx)(\"p\",{children:(0,import_jsx_runtime3.jsx)(\"b\",{children:\"Further Plan\"})}),(0,import_jsx_runtime3.jsx)(\"p\",{children:null==(d=null==(c=h.output)?void 0:c.furtherPlan)?void 0:d.whatToDoNext})]})})),(0,import_jsx_runtime3.jsxs)(\"div\",{className:\"detail-side\",children:[(0,import_jsx_runtime3.jsx)(panel_title_default,{title:\"Task Meta\"}),_,(0,import_jsx_runtime3.jsx)(panel_title_default,{title:\"Param\"}),b,(0,import_jsx_runtime3.jsx)(panel_title_default,{title:\"Output\"}),(0,import_jsx_runtime3.jsxs)(\"div\",{className:\"item-list item-list-space-up\",children:[v,A,w,y,(0,import_jsx_runtime3.jsx)(timeline_default,{items:E})]})]})},detail_side_default=DetailSide;init_globals();var import_ui_utils3=__toESM(require_ui_utils()),import_react97=__toESM(require_react()),import_jsx_runtime4=__toESM(require_jsx_runtime()),SideItem=e=>{var t;const{task:r,onClick:n,selected:i}=e,o=i?\"selected\":\"\";let a=r.status;(null==(t=r.timing)?void 0:t.cost)&&(a=timeCostStrElement(r.timing.cost));const s=\"finished\"===r.status&&r.error?iconForStatus(\"finishedWithWarning\"):iconForStatus(r.status),l=\"Planning\"===r.type?(0,import_jsx_runtime4.jsx)(\"span\",{style:{display:\"inline-block\",marginLeft:\"4px\"},children:(0,import_jsx_runtime4.jsx)(VideoCameraOutlined_default2,{})}):null;return(0,import_jsx_runtime4.jsxs)(\"div\",{className:`side-item ${o}`,onClick:n,onMouseEnter:t=>{var n;const i=t.currentTarget.getBoundingClientRect(),o=i.left+i.width,a=i.top;null==(n=e.onItemHover)||n.call(e,r,o,a)},onMouseLeave:()=>{var t;null==(t=e.onItemHover)||t.call(e,null)},children:[\" \",(0,import_jsx_runtime4.jsxs)(\"div\",{className:\"side-item-name\",children:[(0,import_jsx_runtime4.jsx)(\"span\",{className:\"status-icon\",children:s}),(0,import_jsx_runtime4.jsxs)(\"div\",{className:\"title\",children:[(0,import_ui_utils3.typeStr)(r),\" \",l]}),(0,import_jsx_runtime4.jsx)(\"div\",{className:\"status-text\",children:a})]})]})},Sidebar=()=>{const e=useExecutionDump((e=>e.dump)),t=useExecutionDump((e=>e.setActiveTask)),r=useExecutionDump((e=>e.activeTask)),n=useExecutionDump((e=>e.setHoverTask)),i=useExecutionDump((e=>e.setHoverPreviewConfig)),o=(useExecutionDump((e=>e.reset)),useAllCurrentTasks()),a=null==o?void 0:o.findIndex((e=>e===r));(0,import_react97.useEffect)((()=>{const e=e=>{if((null==o?void 0:o.length)&&!((null==o?void 0:o.length)__left_angle_mark_=1))if(\"ArrowUp\"===e.key&&(e.metaKey||e.ctrlKey)){e.preventDefault();const r=a-1;if(r__left_angle_mark_0)return;const n=o[r];t(n)}else if(\"ArrowDown\"===e.key&&(e.metaKey||e.ctrlKey)){e.preventDefault();const r=a+1;if(r>=o.length)return;const n=o[r];t(n)}};return document.addEventListener(\"keydown\",e),()=>{document.removeEventListener(\"keydown\",e)}}),[a,o,t]);const s=e?[e].map(((e,o)=>{const a=e.executions.map(((e,o)=>{const{tasks:a}=e,s=a.map(((e,o)=>(0,import_jsx_runtime4.jsx)(SideItem,{task:e,selected:e===r,onClick:()=>{t(e)},onItemHover:(e,t,r)=>{e&&t&&r?(i({x:t,y:r}),n(e)):(i(null),n(null))}},o)));let l;return l=0===o?(0,import_jsx_runtime4.jsx)(\"div\",{className:\"side-seperator side-seperator-space-up\"}):(0,import_jsx_runtime4.jsx)(\"div\",{className:\"side-seperator side-seperator-space-up side-seperator-space-down\"}),(0,import_jsx_runtime4.jsxs)(\"div\",{children:[l,(0,import_jsx_runtime4.jsxs)(\"div\",{className:\"side-sub-title\",children:[(0,import_jsx_runtime4.jsx)(\"span\",{className:\"name-status\",children:(0,import_jsx_runtime4.jsx)(MessageOutlined_default2,{})}),e.name]}),s]},o)}));return(0,import_jsx_runtime4.jsxs)(\"div\",{children:[(0,import_jsx_runtime4.jsx)(panel_title_default,{title:e.groupName}),a]},o)})):(0,import_jsx_runtime4.jsx)(\"span\",{children:\"no tasks\"});return(0,import_jsx_runtime4.jsxs)(\"div\",{className:\"side-bar\",children:[(0,import_jsx_runtime4.jsxs)(\"div\",{className:\"top-controls\",children:[(0,import_jsx_runtime4.jsx)(\"div\",{className:\"task-list\",children:s}),(0,import_jsx_runtime4.jsx)(\"div\",{className:\"side-seperator side-seperator-line side-seperator-space-up\"}),(0,import_jsx_runtime4.jsx)(\"div\",{className:\"task-meta-section\",children:(0,import_jsx_runtime4.jsx)(\"div\",{className:\"task-meta\",children:\"switch: Command + Up / Down\"})})]}),(0,import_jsx_runtime4.jsx)(\"div\",{className:\"bottom-controls\"})]})},sidebar_default=Sidebar;init_globals();var import_prop_types=__toESM(require_prop_types()),import_react_side_effect=__toESM(require_lib()),import_react_fast_compare=__toESM(require_react_fast_compare()),import_react98=__toESM(require_react()),import_object_assign=__toESM(require_object_assign()),ATTRIBUTE_NAMES={BODY:\"bodyAttributes\",HTML:\"htmlAttributes\",TITLE:\"titleAttributes\"},TAG_NAMES={BASE:\"base\",BODY:\"body\",HEAD:\"head\",HTML:\"html\",LINK:\"link\",META:\"meta\",NOSCRIPT:\"noscript\",SCRIPT:\"script\",STYLE:\"style\",TITLE:\"title\"},VALID_TAG_NAMES=Object.keys(TAG_NAMES).map((function(e){return TAG_NAMES[e]})),TAG_PROPERTIES={CHARSET:\"charset\",CSS_TEXT:\"cssText\",HREF:\"href\",HTTPEQUIV:\"http-equiv\",INNER_HTML:\"innerHTML\",ITEM_PROP:\"itemprop\",NAME:\"name\",PROPERTY:\"property\",REL:\"rel\",SRC:\"src\",TARGET:\"target\"},REACT_TAG_MAP={accesskey:\"accessKey\",charset:\"charSet\",class:\"className\",contenteditable:\"contentEditable\",contextmenu:\"contextMenu\",\"http-equiv\":\"httpEquiv\",itemprop:\"itemProp\",tabindex:\"tabIndex\"},HELMET_PROPS={DEFAULT_TITLE:\"defaultTitle\",DEFER:\"defer\",ENCODE_SPECIAL_CHARACTERS:\"encodeSpecialCharacters\",ON_CHANGE_CLIENT_STATE:\"onChangeClientState\",TITLE_TEMPLATE:\"titleTemplate\"},HTML_TAG_MAP=Object.keys(REACT_TAG_MAP).reduce((function(e,t){return e[REACT_TAG_MAP[t]]=t,e}),{}),SELF_CLOSING_TAGS=[TAG_NAMES.NOSCRIPT,TAG_NAMES.SCRIPT,TAG_NAMES.STYLE],HELMET_ATTRIBUTE=\"data-react-helmet\",_typeof2=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&\"function\"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":typeof e},classCallCheck=function(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")},createClass=function(){function e(e,t){for(var r=0;r__left_angle_mark_t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,\"value\"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),_extends2=Object.assign||function(e){for(var t=1;t__left_angle_mark_arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},inherits=function(e,t){if(\"function\"!=typeof t&&null!==t)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)},objectWithoutProperties=function(e,t){var r={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r},possibleConstructorReturn=function(e,t){if(!e)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!t||\"object\"!=typeof t&&\"function\"!=typeof t?e:t},encodeSpecialCharacters=function(e){return!1===(!(arguments.length>1&&void 0!==arguments[1])||arguments[1])?String(e):String(e).replace(/&/g,\"&\").replace(/__left_angle_mark_/g,\"<\").replace(/>/g,\">\").replace(/\"/g,\""\").replace(/'/g,\"'\")},getTitleFromPropsList=function(e){var t=getInnermostProperty(e,TAG_NAMES.TITLE),r=getInnermostProperty(e,HELMET_PROPS.TITLE_TEMPLATE);if(r&&t)return r.replace(/%s/g,(function(){return Array.isArray(t)?t.join(\"\"):t}));var n=getInnermostProperty(e,HELMET_PROPS.DEFAULT_TITLE);return t||n||void 0},getOnChangeClientState=function(e){return getInnermostProperty(e,HELMET_PROPS.ON_CHANGE_CLIENT_STATE)||function(){}},getAttributesFromPropsList=function(e,t){return t.filter((function(t){return void 0!==t[e]})).map((function(t){return t[e]})).reduce((function(e,t){return _extends2({},e,t)}),{})},getBaseTagFromPropsList=function(e,t){return t.filter((function(e){return void 0!==e[TAG_NAMES.BASE]})).map((function(e){return e[TAG_NAMES.BASE]})).reverse().reduce((function(t,r){if(!t.length)for(var n=Object.keys(r),i=0;i__left_angle_mark_n.length;i++){var o=n[i].toLowerCase();if(-1!==e.indexOf(o)&&r[o])return t.concat(r)}return t}),[])},getTagsFromPropsList=function(e,t,r){var n={};return r.filter((function(t){return!!Array.isArray(t[e])||(void 0!==t[e]&&warn(\"Helmet: \"+e+' should be of type \"Array\". Instead found type \"'+_typeof2(t[e])+'\"'),!1)})).map((function(t){return t[e]})).reverse().reduce((function(e,r){var i={};r.filter((function(e){for(var r=void 0,o=Object.keys(e),a=0;a__left_angle_mark_o.length;a++){var s=o[a],l=s.toLowerCase();-1===t.indexOf(l)||r===TAG_PROPERTIES.REL&&\"canonical\"===e[r].toLowerCase()||l===TAG_PROPERTIES.REL&&\"stylesheet\"===e[l].toLowerCase()||(r=l),-1===t.indexOf(s)||s!==TAG_PROPERTIES.INNER_HTML&&s!==TAG_PROPERTIES.CSS_TEXT&&s!==TAG_PROPERTIES.ITEM_PROP||(r=s)}if(!r||!e[r])return!1;var u=e[r].toLowerCase();return n[r]||(n[r]={}),i[r]||(i[r]={}),!n[r][u]&&(i[r][u]=!0,!0)})).reverse().forEach((function(t){return e.push(t)}));for(var o=Object.keys(i),a=0;a__left_angle_mark_o.length;a++){var s=o[a],l=(0,import_object_assign.default)({},n[s],i[s]);n[s]=l}return e}),[]).reverse()},getInnermostProperty=function(e,t){for(var r=e.length-1;r>=0;r--){var n=e[r];if(n.hasOwnProperty(t))return n[t]}return null},reducePropsToState=function(e){return{baseTag:getBaseTagFromPropsList([TAG_PROPERTIES.HREF,TAG_PROPERTIES.TARGET],e),bodyAttributes:getAttributesFromPropsList(ATTRIBUTE_NAMES.BODY,e),defer:getInnermostProperty(e,HELMET_PROPS.DEFER),encode:getInnermostProperty(e,HELMET_PROPS.ENCODE_SPECIAL_CHARACTERS),htmlAttributes:getAttributesFromPropsList(ATTRIBUTE_NAMES.HTML,e),linkTags:getTagsFromPropsList(TAG_NAMES.LINK,[TAG_PROPERTIES.REL,TAG_PROPERTIES.HREF],e),metaTags:getTagsFromPropsList(TAG_NAMES.META,[TAG_PROPERTIES.NAME,TAG_PROPERTIES.CHARSET,TAG_PROPERTIES.HTTPEQUIV,TAG_PROPERTIES.PROPERTY,TAG_PROPERTIES.ITEM_PROP],e),noscriptTags:getTagsFromPropsList(TAG_NAMES.NOSCRIPT,[TAG_PROPERTIES.INNER_HTML],e),onChangeClientState:getOnChangeClientState(e),scriptTags:getTagsFromPropsList(TAG_NAMES.SCRIPT,[TAG_PROPERTIES.SRC,TAG_PROPERTIES.INNER_HTML],e),styleTags:getTagsFromPropsList(TAG_NAMES.STYLE,[TAG_PROPERTIES.CSS_TEXT],e),title:getTitleFromPropsList(e),titleAttributes:getAttributesFromPropsList(ATTRIBUTE_NAMES.TITLE,e)}},rafPolyfill=(clock=Date.now(),function(e){var t=Date.now();t-clock>16?(clock=t,e(t)):setTimeout((function(){rafPolyfill(e)}),0)}),clock,cafPolyfill=function(e){return clearTimeout(e)},requestAnimationFrame2=\"undefined\"!=typeof window?window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||rafPolyfill:\"globalThis\".requestAnimationFrame||rafPolyfill,cancelAnimationFrame2=\"undefined\"!=typeof window?window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||cafPolyfill:\"globalThis\".cancelAnimationFrame||cafPolyfill,warn=function(e){return import_console_browserify.default&&\"function\"==typeof import_console_browserify.default.warn&&import_console_browserify.default.warn(e)},_helmetCallback=null,handleClientStateChange=function(e){_helmetCallback&&cancelAnimationFrame2(_helmetCallback),e.defer?_helmetCallback=requestAnimationFrame2((function(){commitTagChanges(e,(function(){_helmetCallback=null}))})):(commitTagChanges(e),_helmetCallback=null)},commitTagChanges=function(e,t){var r=e.baseTag,n=e.bodyAttributes,i=e.htmlAttributes,o=e.linkTags,a=e.metaTags,s=e.noscriptTags,l=e.onChangeClientState,u=e.scriptTags,c=e.styleTags,d=e.title,h=e.titleAttributes;updateAttributes(TAG_NAMES.BODY,n),updateAttributes(TAG_NAMES.HTML,i),updateTitle(d,h);var f={baseTag:updateTags(TAG_NAMES.BASE,r),linkTags:updateTags(TAG_NAMES.LINK,o),metaTags:updateTags(TAG_NAMES.META,a),noscriptTags:updateTags(TAG_NAMES.NOSCRIPT,s),scriptTags:updateTags(TAG_NAMES.SCRIPT,u),styleTags:updateTags(TAG_NAMES.STYLE,c)},p={},m={};Object.keys(f).forEach((function(e){var t=f[e],r=t.newTags,n=t.oldTags;r.length&&(p[e]=r),n.length&&(m[e]=f[e].oldTags)})),t&&t(),l(e,p,m)},flattenArray=function(e){return Array.isArray(e)?e.join(\"\"):e},updateTitle=function(e,t){void 0!==e&&document.title!==e&&(document.title=flattenArray(e)),updateAttributes(TAG_NAMES.TITLE,t)},updateAttributes=function(e,t){var r=document.getElementsByTagName(e)[0];if(r){for(var n=r.getAttribute(HELMET_ATTRIBUTE),i=n?n.split(\",\"):[],o=[].concat(i),a=Object.keys(t),s=0;s__left_angle_mark_a.length;s++){var l=a[s],u=t[l]||\"\";r.getAttribute(l)!==u&&r.setAttribute(l,u),-1===i.indexOf(l)&&i.push(l);var c=o.indexOf(l);-1!==c&&o.splice(c,1)}for(var d=o.length-1;d>=0;d--)r.removeAttribute(o[d]);i.length===o.length?r.removeAttribute(HELMET_ATTRIBUTE):r.getAttribute(HELMET_ATTRIBUTE)!==a.join(\",\")&&r.setAttribute(HELMET_ATTRIBUTE,a.join(\",\"))}},updateTags=function(e,t){var r=document.head||document.querySelector(TAG_NAMES.HEAD),n=r.querySelectorAll(e+\"[\"+HELMET_ATTRIBUTE+\"]\"),i=Array.prototype.slice.call(n),o=[],a=void 0;return t&&t.length&&t.forEach((function(t){var r=document.createElement(e);for(var n in t)if(t.hasOwnProperty(n))if(n===TAG_PROPERTIES.INNER_HTML)r.innerHTML=t.innerHTML;else if(n===TAG_PROPERTIES.CSS_TEXT)r.styleSheet?r.styleSheet.cssText=t.cssText:r.appendChild(document.createTextNode(t.cssText));else{var s=void 0===t[n]?\"\":t[n];r.setAttribute(n,s)}r.setAttribute(HELMET_ATTRIBUTE,\"true\"),i.some((function(e,t){return a=t,r.isEqualNode(e)}))?i.splice(a,1):o.push(r)})),i.forEach((function(e){return e.parentNode.removeChild(e)})),o.forEach((function(e){return r.appendChild(e)})),{oldTags:i,newTags:o}},generateElementAttributesAsString=function(e){return Object.keys(e).reduce((function(t,r){var n=void 0!==e[r]?r+'=\"'+e[r]+'\"':\"\"+r;return t?t+\" \"+n:n}),\"\")},generateTitleAsString=function(e,t,r,n){var i=generateElementAttributesAsString(r),o=flattenArray(t);return i?\"__left_angle_mark_\"+e+\" \"+HELMET_ATTRIBUTE+'=\"true\" '+i+\">\"+encodeSpecialCharacters(o,n)+\"__left_angle_mark_/\"+e+\">\":\"__left_angle_mark_\"+e+\" \"+HELMET_ATTRIBUTE+'=\"true\">'+encodeSpecialCharacters(o,n)+\"__left_angle_mark_/\"+e+\">\"},generateTagsAsString=function(e,t,r){return t.reduce((function(t,n){var i=Object.keys(n).filter((function(e){return!(e===TAG_PROPERTIES.INNER_HTML||e===TAG_PROPERTIES.CSS_TEXT)})).reduce((function(e,t){var i=void 0===n[t]?t:t+'=\"'+encodeSpecialCharacters(n[t],r)+'\"';return e?e+\" \"+i:i}),\"\"),o=n.innerHTML||n.cssText||\"\",a=-1===SELF_CLOSING_TAGS.indexOf(e);return t+\"__left_angle_mark_\"+e+\" \"+HELMET_ATTRIBUTE+'=\"true\" '+i+(a?\"/>\":\">\"+o+\"__left_angle_mark_/\"+e+\">\")}),\"\")},convertElementAttributestoReactProps=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.keys(e).reduce((function(t,r){return t[REACT_TAG_MAP[r]||r]=e[r],t}),t)},convertReactPropstoHtmlAttributes=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.keys(e).reduce((function(t,r){return t[HTML_TAG_MAP[r]||r]=e[r],t}),t)},generateTitleAsReactComponent=function(e,t,r){var n,i=((n={key:t})[HELMET_ATTRIBUTE]=!0,n),o=convertElementAttributestoReactProps(r,i);return[import_react98.default.createElement(TAG_NAMES.TITLE,o,t)]},generateTagsAsReactComponent=function(e,t){return t.map((function(t,r){var n,i=((n={key:r})[HELMET_ATTRIBUTE]=!0,n);return Object.keys(t).forEach((function(e){var r=REACT_TAG_MAP[e]||e;if(r===TAG_PROPERTIES.INNER_HTML||r===TAG_PROPERTIES.CSS_TEXT){var n=t.innerHTML||t.cssText;i.dangerouslySetInnerHTML={__html:n}}else i[r]=t[e]})),import_react98.default.createElement(e,i)}))},getMethodsForTag=function(e,t,r){switch(e){case TAG_NAMES.TITLE:return{toComponent:function(){return generateTitleAsReactComponent(e,t.title,t.titleAttributes,r)},toString:function(){return generateTitleAsString(e,t.title,t.titleAttributes,r)}};case ATTRIBUTE_NAMES.BODY:case ATTRIBUTE_NAMES.HTML:return{toComponent:function(){return convertElementAttributestoReactProps(t)},toString:function(){return generateElementAttributesAsString(t)}};default:return{toComponent:function(){return generateTagsAsReactComponent(e,t)},toString:function(){return generateTagsAsString(e,t,r)}}}},mapStateOnServer=function(e){var t=e.baseTag,r=e.bodyAttributes,n=e.encode,i=e.htmlAttributes,o=e.linkTags,a=e.metaTags,s=e.noscriptTags,l=e.scriptTags,u=e.styleTags,c=e.title,d=void 0===c?\"\":c,h=e.titleAttributes;return{base:getMethodsForTag(TAG_NAMES.BASE,t,n),bodyAttributes:getMethodsForTag(ATTRIBUTE_NAMES.BODY,r,n),htmlAttributes:getMethodsForTag(ATTRIBUTE_NAMES.HTML,i,n),link:getMethodsForTag(TAG_NAMES.LINK,o,n),meta:getMethodsForTag(TAG_NAMES.META,a,n),noscript:getMethodsForTag(TAG_NAMES.NOSCRIPT,s,n),script:getMethodsForTag(TAG_NAMES.SCRIPT,l,n),style:getMethodsForTag(TAG_NAMES.STYLE,u,n),title:getMethodsForTag(TAG_NAMES.TITLE,{title:d,titleAttributes:h},n)}},Helmet=function(e){var t,r;return r=t=function(t){function r(){return classCallCheck(this,r),possibleConstructorReturn(this,t.apply(this,arguments))}return inherits(r,t),r.prototype.shouldComponentUpdate=function(e){return!(0,import_react_fast_compare.default)(this.props,e)},r.prototype.mapNestedChildrenToProps=function(e,t){if(!t)return null;switch(e.type){case TAG_NAMES.SCRIPT:case TAG_NAMES.NOSCRIPT:return{innerHTML:t};case TAG_NAMES.STYLE:return{cssText:t}}throw new Error(\"__left_angle_mark_\"+e.type+\" /> elements are self-closing and can not contain children. Refer to our API for more information.\")},r.prototype.flattenArrayTypeChildren=function(e){var t,r=e.child,n=e.arrayTypeChildren,i=e.newChildProps,o=e.nestedChildren;return _extends2({},n,((t={})[r.type]=[].concat(n[r.type]||[],[_extends2({},i,this.mapNestedChildrenToProps(r,o))]),t))},r.prototype.mapObjectTypeChildren=function(e){var t,r,n=e.child,i=e.newProps,o=e.newChildProps,a=e.nestedChildren;switch(n.type){case TAG_NAMES.TITLE:return _extends2({},i,((t={})[n.type]=a,t.titleAttributes=_extends2({},o),t));case TAG_NAMES.BODY:return _extends2({},i,{bodyAttributes:_extends2({},o)});case TAG_NAMES.HTML:return _extends2({},i,{htmlAttributes:_extends2({},o)})}return _extends2({},i,((r={})[n.type]=_extends2({},o),r))},r.prototype.mapArrayTypeChildrenToProps=function(e,t){var r=_extends2({},t);return Object.keys(e).forEach((function(t){var n;r=_extends2({},r,((n={})[t]=e[t],n))})),r},r.prototype.warnOnInvalidChildren=function(e,t){if(!VALID_TAG_NAMES.some((function(t){return e.type===t})))return\"function\"==typeof e.type?warn(\"You may be attempting to nest __left_angle_mark_Helmet> components within each other, which is not allowed. Refer to our API for more information.\"):warn(\"Only elements types \"+VALID_TAG_NAMES.join(\", \")+\" are allowed. Helmet does not support rendering __left_angle_mark_\"+e.type+\"> elements. Refer to our API for more information.\");if(t&&\"string\"!=typeof t&&(!Array.isArray(t)||t.some((function(e){return\"string\"!=typeof e}))))throw new Error(\"Helmet expects a string as a child of __left_angle_mark_\"+e.type+\">. Did you forget to wrap your children in braces? ( __left_angle_mark_\"+e.type+\">{``}__left_angle_mark_/\"+e.type+\"> ) Refer to our API for more information.\");return!0},r.prototype.mapChildrenToProps=function(e,t){var r=this,n={};return import_react98.default.Children.forEach(e,(function(e){if(e&&e.props){var i=e.props,o=i.children,a=objectWithoutProperties(i,[\"children\"]),s=convertReactPropstoHtmlAttributes(a);switch(r.warnOnInvalidChildren(e,o),e.type){case TAG_NAMES.LINK:case TAG_NAMES.META:case TAG_NAMES.NOSCRIPT:case TAG_NAMES.SCRIPT:case TAG_NAMES.STYLE:n=r.flattenArrayTypeChildren({child:e,arrayTypeChildren:n,newChildProps:s,nestedChildren:o});break;default:t=r.mapObjectTypeChildren({child:e,newProps:t,newChildProps:s,nestedChildren:o})}}})),t=this.mapArrayTypeChildrenToProps(n,t)},r.prototype.render=function(){var t=this.props,r=t.children,n=objectWithoutProperties(t,[\"children\"]),i=_extends2({},n);return r&&(i=this.mapChildrenToProps(r,i)),import_react98.default.createElement(e,i)},createClass(r,null,[{key:\"canUseDOM\",set:function(t){e.canUseDOM=t}}]),r}(import_react98.default.Component),t.propTypes={base:import_prop_types.default.object,bodyAttributes:import_prop_types.default.object,children:import_prop_types.default.oneOfType([import_prop_types.default.arrayOf(import_prop_types.default.node),import_prop_types.default.node]),defaultTitle:import_prop_types.default.string,defer:import_prop_types.default.bool,encodeSpecialCharacters:import_prop_types.default.bool,htmlAttributes:import_prop_types.default.object,link:import_prop_types.default.arrayOf(import_prop_types.default.object),meta:import_prop_types.default.arrayOf(import_prop_types.default.object),noscript:import_prop_types.default.arrayOf(import_prop_types.default.object),onChangeClientState:import_prop_types.default.func,script:import_prop_types.default.arrayOf(import_prop_types.default.object),style:import_prop_types.default.arrayOf(import_prop_types.default.object),title:import_prop_types.default.string,titleAttributes:import_prop_types.default.object,titleTemplate:import_prop_types.default.string},t.defaultProps={defer:!0,encodeSpecialCharacters:!0},t.peek=e.peek,t.rewind=function(){var t=e.rewind();return t||(t=mapStateOnServer({baseTag:[],bodyAttributes:{},encodeSpecialCharacters:!0,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:\"\",titleAttributes:{}})),t},r},NullComponent=function(){return null},HelmetSideEffects=(0,import_react_side_effect.default)(reducePropsToState,handleClientStateChange,mapStateOnServer)(NullComponent),HelmetExport=Helmet(HelmetSideEffects);HelmetExport.renderStatic=HelmetExport.rewind;var import_react107=__toESM(require_react()),import_client=__toESM(require_client());init_globals();var React297=__toESM(require_react()),{createElement:createElement178,createContext:createContext34,createRef:createRef3,forwardRef:forwardRef105,useCallback:useCallback15,useContext:useContext120,useEffect:useEffect64,useImperativeHandle:useImperativeHandle24,useLayoutEffect:useLayoutEffect5,useMemo:useMemo72,useRef:useRef87,useState:useState55}=React297,useId3=React297[\"useId\".toString()],useLayoutEffect_do_not_use_directly=useLayoutEffect5,PanelGroupContext=createContext34(null);PanelGroupContext.displayName=\"PanelGroupContext\";var useIsomorphicLayoutEffect2=useLayoutEffect_do_not_use_directly,wrappedUseId=\"function\"==typeof useId3?useId3:()=>null,counter=0;function useUniqueId(e=null){const t=wrappedUseId(),r=useRef87(e||t||null);return null===r.current&&(r.current=\"\"+counter++),null!=e?e:r.current}function PanelWithForwardedRef({children:e,className:t=\"\",collapsedSize:r,collapsible:n,defaultSize:i,forwardedRef:o,id:a,maxSize:s,minSize:l,onCollapse:u,onExpand:c,onResize:d,order:h,style:f,tagName:p=\"div\",...m}){const g=useContext120(PanelGroupContext);if(null===g)throw Error(\"Panel components must be rendered within a PanelGroup container\");const{collapsePanel:_,expandPanel:b,getPanelSize:y,getPanelStyle:v,groupId:A,isPanelCollapsed:w,reevaluatePanelConstraints:S,registerPanel:E,resizePanel:x,unregisterPanel:C}=g,T=useUniqueId(a),R=useRef87({callbacks:{onCollapse:u,onExpand:c,onResize:d},constraints:{collapsedSize:r,collapsible:n,defaultSize:i,maxSize:s,minSize:l},id:T,idIsFromProps:void 0!==a,order:h});useRef87({didLogMissingDefaultSizeWarning:!1}),useIsomorphicLayoutEffect2((()=>{const{callbacks:e,constraints:t}=R.current,o={...t};R.current.id=T,R.current.idIsFromProps=void 0!==a,R.current.order=h,e.onCollapse=u,e.onExpand=c,e.onResize=d,t.collapsedSize=r,t.collapsible=n,t.defaultSize=i,t.maxSize=s,t.minSize=l,o.collapsedSize===t.collapsedSize&&o.collapsible===t.collapsible&&o.maxSize===t.maxSize&&o.minSize===t.minSize||S(R.current,o)})),useIsomorphicLayoutEffect2((()=>{const e=R.current;return E(e),()=>{C(e)}}),[h,T,E,C]),useImperativeHandle24(o,(()=>({collapse:()=>{_(R.current)},expand:e=>{b(R.current,e)},getId:()=>T,getSize:()=>y(R.current),isCollapsed:()=>w(R.current),isExpanded:()=>!w(R.current),resize:e=>{x(R.current,e)}})),[_,b,y,w,T,x]);const I=v(R.current,i);return createElement178(p,{...m,children:e,className:t,id:a,style:{...I,...f},\"data-panel\":\"\",\"data-panel-collapsible\":n||void 0,\"data-panel-group-id\":A,\"data-panel-id\":T,\"data-panel-size\":parseFloat(\"\"+I.flexGrow).toFixed(1)})}var Panel2=forwardRef105(((e,t)=>createElement178(PanelWithForwardedRef,{...e,forwardedRef:t})));PanelWithForwardedRef.displayName=\"Panel\",Panel2.displayName=\"forwardRef(Panel)\";var currentCursorStyle=null,styleElement=null;function getCursorStyle(e,t){if(t){const e=!!(t&EXCEEDED_VERTICAL_MIN),r=!!(t&EXCEEDED_VERTICAL_MAX);if(t&EXCEEDED_HORIZONTAL_MIN)return e?\"se-resize\":r?\"ne-resize\":\"e-resize\";if(t&EXCEEDED_HORIZONTAL_MAX)return e?\"sw-resize\":r?\"nw-resize\":\"w-resize\";if(e)return\"s-resize\";if(r)return\"n-resize\"}switch(e){case\"horizontal\":return\"ew-resize\";case\"intersection\":return\"move\";case\"vertical\":return\"ns-resize\"}}function resetGlobalCursorStyle(){null!==styleElement&&(document.head.removeChild(styleElement),currentCursorStyle=null,styleElement=null)}function setGlobalCursorStyle(e,t){const r=getCursorStyle(e,t);currentCursorStyle!==r&&(currentCursorStyle=r,null===styleElement&&(styleElement=document.createElement(\"style\"),document.head.appendChild(styleElement)),styleElement.innerHTML=`*{cursor: ${r}!important;}`)}function isKeyDown(e){return\"keydown\"===e.type}function isPointerEvent(e){return e.type.startsWith(\"pointer\")}function isMouseEvent(e){return e.type.startsWith(\"mouse\")}function getResizeEventCoordinates(e){if(isPointerEvent(e)){if(e.isPrimary)return{x:e.clientX,y:e.clientY}}else if(isMouseEvent(e))return{x:e.clientX,y:e.clientY};return{x:1/0,y:1/0}}function getInputType(){if(\"function\"==typeof matchMedia)return matchMedia(\"(pointer:coarse)\").matches?\"coarse\":\"fine\"}function intersects(e,t,r){return r?e.x__left_angle_mark_t.x+t.width&&e.x+e.width>t.x&&e.y__left_angle_mark_t.y+t.height&&e.y+e.height>t.y:e.x__left_angle_mark_=t.x+t.width&&e.x+e.width>=t.x&&e.y__left_angle_mark_=t.y+t.height&&e.y+e.height>=t.y}function compare(e,t){if(e===t)throw new Error(\"Cannot compare node with itself\");const r={a:get_ancestors(e),b:get_ancestors(t)};let n;for(;r.a.at(-1)===r.b.at(-1);)e=r.a.pop(),t=r.b.pop(),n=e;assert(n,\"Stacking order can only be calculated for elements with a common ancestor\");const i=get_z_index(find_stacking_context(r.a)),o=get_z_index(find_stacking_context(r.b));if(i===o){const e=n.childNodes,t={a:r.a.at(-1),b:r.b.at(-1)};let i=e.length;for(;i--;){const r=e[i];if(r===t.a)return 1;if(r===t.b)return-1}}return Math.sign(i-o)}var props=/\\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\\b/;function is_flex_item(e){var t;const r=getComputedStyle(null!==(t=get_parent(e))&&void 0!==t?t:e).display;return\"flex\"===r||\"inline-flex\"===r}function creates_stacking_context(e){const t=getComputedStyle(e);return\"fixed\"===t.position||!(\"auto\"===t.zIndex||\"static\"===t.position&&!is_flex_item(e))||+t.opacity__left_angle_mark_1||\"transform\"in t&&\"none\"!==t.transform||\"webkitTransform\"in t&&\"none\"!==t.webkitTransform||\"mixBlendMode\"in t&&\"normal\"!==t.mixBlendMode||\"filter\"in t&&\"none\"!==t.filter||\"webkitFilter\"in t&&\"none\"!==t.webkitFilter||\"isolation\"in t&&\"isolate\"===t.isolation||!!props.test(t.willChange)||\"touch\"===t.webkitOverflowScrolling}function find_stacking_context(e){let t=e.length;for(;t--;){const r=e[t];if(assert(r,\"Missing node\"),creates_stacking_context(r))return r}return null}function get_z_index(e){return e&&Number(getComputedStyle(e).zIndex)||0}function get_ancestors(e){const t=[];for(;e;)t.push(e),e=get_parent(e);return t}function get_parent(e){const{parentNode:t}=e;return t&&t instanceof ShadowRoot?t.host:t}var EXCEEDED_HORIZONTAL_MIN=1,EXCEEDED_HORIZONTAL_MAX=2,EXCEEDED_VERTICAL_MIN=4,EXCEEDED_VERTICAL_MAX=8,isCoarsePointer=\"coarse\"===getInputType(),intersectingHandles=[],isPointerDown=!1,ownerDocumentCounts=new Map,panelConstraintFlags=new Map,registeredResizeHandlers=new Set;function registerResizeHandle(e,t,r,n,i){var o;const{ownerDocument:a}=t,s={direction:r,element:t,hitAreaMargins:n,setResizeHandlerState:i},l=null!==(o=ownerDocumentCounts.get(a))&&void 0!==o?o:0;return ownerDocumentCounts.set(a,l+1),registeredResizeHandlers.add(s),updateListeners(),function(){var t;panelConstraintFlags.delete(e),registeredResizeHandlers.delete(s);const r=null!==(t=ownerDocumentCounts.get(a))&&void 0!==t?t:1;if(ownerDocumentCounts.set(a,r-1),updateListeners(),1===r&&ownerDocumentCounts.delete(a),intersectingHandles.includes(s)){const e=intersectingHandles.indexOf(s);e>=0&&intersectingHandles.splice(e,1),updateCursor()}}}function handlePointerDown(e){const{target:t}=e,{x:r,y:n}=getResizeEventCoordinates(e);isPointerDown=!0,recalculateIntersectingHandles({target:t,x:r,y:n}),updateListeners(),intersectingHandles.length>0&&(updateResizeHandlerStates(\"down\",e),e.preventDefault(),e.stopPropagation())}function handlePointerMove(e){const{x:t,y:r}=getResizeEventCoordinates(e);if(0===e.buttons&&(isPointerDown=!1,updateResizeHandlerStates(\"up\",e)),!isPointerDown){const{target:n}=e;recalculateIntersectingHandles({target:n,x:t,y:r})}updateResizeHandlerStates(\"move\",e),updateCursor(),intersectingHandles.length>0&&e.preventDefault()}function handlePointerUp(e){const{target:t}=e,{x:r,y:n}=getResizeEventCoordinates(e);panelConstraintFlags.clear(),isPointerDown=!1,intersectingHandles.length>0&&e.preventDefault(),updateResizeHandlerStates(\"up\",e),recalculateIntersectingHandles({target:t,x:r,y:n}),updateCursor(),updateListeners()}function recalculateIntersectingHandles({target:e,x:t,y:r}){intersectingHandles.splice(0);let n=null;e instanceof HTMLElement&&(n=e),registeredResizeHandlers.forEach((e=>{const{element:i,hitAreaMargins:o}=e,a=i.getBoundingClientRect(),{bottom:s,left:l,right:u,top:c}=a,d=isCoarsePointer?o.coarse:o.fine;if(t>=l-d&&t__left_angle_mark_=u+d&&r>=c-d&&r__left_angle_mark_=s+d){if(null!==n&&i!==n&&!i.contains(n)&&!n.contains(i)&&compare(n,i)>0){let e=n,t=!1;for(;e&&!e.contains(i);){if(intersects(e.getBoundingClientRect(),a,!0)){t=!0;break}e=e.parentElement}if(t)return}intersectingHandles.push(e)}}))}function reportConstraintsViolation(e,t){panelConstraintFlags.set(e,t)}function updateCursor(){let e=!1,t=!1;intersectingHandles.forEach((r=>{const{direction:n}=r;\"horizontal\"===n?e=!0:t=!0}));let r=0;panelConstraintFlags.forEach((e=>{r|=e})),e&&t?setGlobalCursorStyle(\"intersection\",r):e?setGlobalCursorStyle(\"horizontal\",r):t?setGlobalCursorStyle(\"vertical\",r):resetGlobalCursorStyle()}function updateListeners(){ownerDocumentCounts.forEach(((e,t)=>{const{body:r}=t;r.removeEventListener(\"contextmenu\",handlePointerUp),r.removeEventListener(\"pointerdown\",handlePointerDown),r.removeEventListener(\"pointerleave\",handlePointerMove),r.removeEventListener(\"pointermove\",handlePointerMove)})),window.removeEventListener(\"pointerup\",handlePointerUp),window.removeEventListener(\"pointercancel\",handlePointerUp),registeredResizeHandlers.size>0&&(isPointerDown?(intersectingHandles.length>0&&ownerDocumentCounts.forEach(((e,t)=>{const{body:r}=t;e>0&&(r.addEventListener(\"contextmenu\",handlePointerUp),r.addEventListener(\"pointerleave\",handlePointerMove),r.addEventListener(\"pointermove\",handlePointerMove))})),window.addEventListener(\"pointerup\",handlePointerUp),window.addEventListener(\"pointercancel\",handlePointerUp)):ownerDocumentCounts.forEach(((e,t)=>{const{body:r}=t;e>0&&(r.addEventListener(\"pointerdown\",handlePointerDown,{capture:!0}),r.addEventListener(\"pointermove\",handlePointerMove))})))}function updateResizeHandlerStates(e,t){registeredResizeHandlers.forEach((r=>{const{setResizeHandlerState:n}=r,i=intersectingHandles.includes(r);n(e,i,t)}))}function useForceUpdate2(){const[e,t]=useState55(0);return useCallback15((()=>t((e=>e+1))),[])}function assert(e,t){if(!e)throw import_console_browserify.default.error(t),Error(t)}var PRECISION=10;function fuzzyCompareNumbers(e,t,r=PRECISION){return e.toFixed(r)===t.toFixed(r)?0:e>t?1:-1}function fuzzyNumbersEqual$1(e,t,r=PRECISION){return 0===fuzzyCompareNumbers(e,t,r)}function fuzzyNumbersEqual(e,t,r){return 0===fuzzyCompareNumbers(e,t,r)}function fuzzyLayoutsEqual(e,t,r){if(e.length!==t.length)return!1;for(let n=0;n__left_angle_mark_e.length;n++)if(!fuzzyNumbersEqual(e[n],t[n],r))return!1;return!0}function resizePanel({panelConstraints:e,panelIndex:t,size:r}){const n=e[t];assert(null!=n,`Panel constraints not found for index ${t}`);let{collapsedSize:i=0,collapsible:o,maxSize:a=100,minSize:s=0}=n;return fuzzyCompareNumbers(r,s)__left_angle_mark_0&&(r=o&&fuzzyCompareNumbers(r,(i+s)/2)__left_angle_mark_0?i:s),r=Math.min(a,r),r=parseFloat(r.toFixed(PRECISION))}function adjustLayoutByDelta({delta:e,initialLayout:t,panelConstraints:r,pivotIndices:n,prevLayout:i,trigger:o}){if(fuzzyNumbersEqual(e,0))return t;const a=[...t],[s,l]=n;assert(null!=s,\"Invalid first pivot index\"),assert(null!=l,\"Invalid second pivot index\");let u=0;if(\"keyboard\"===o){{const n=e__left_angle_mark_0?l:s,i=r[n];assert(i,`Panel constraints not found for index ${n}`);const{collapsedSize:o=0,collapsible:a,minSize:u=0}=i;if(a){const r=t[n];if(assert(null!=r,`Previous layout not found for panel index ${n}`),fuzzyNumbersEqual(r,o)){const t=u-r;fuzzyCompareNumbers(t,Math.abs(e))>0&&(e=e__left_angle_mark_0?0-t:t)}}}{const n=e__left_angle_mark_0?s:l,i=r[n];assert(i,`No panel constraints found for index ${n}`);const{collapsedSize:o=0,collapsible:a,minSize:u=0}=i;if(a){const r=t[n];if(assert(null!=r,`Previous layout not found for panel index ${n}`),fuzzyNumbersEqual(r,u)){const t=r-o;fuzzyCompareNumbers(t,Math.abs(e))>0&&(e=e__left_angle_mark_0?0-t:t)}}}}{const n=e__left_angle_mark_0?1:-1;let i=e__left_angle_mark_0?l:s,o=0;for(;;){const e=t[i];if(assert(null!=e,`Previous layout not found for panel index ${i}`),o+=resizePanel({panelConstraints:r,panelIndex:i,size:100})-e,i+=n,i__left_angle_mark_0||i>=r.length)break}const a=Math.min(Math.abs(e),Math.abs(o));e=e__left_angle_mark_0?0-a:a}{let n=e__left_angle_mark_0?s:l;for(;n>=0&&n__left_angle_mark_r.length;){const i=Math.abs(e)-Math.abs(u),o=t[n];assert(null!=o,`Previous layout not found for panel index ${n}`);const s=resizePanel({panelConstraints:r,panelIndex:n,size:o-i});if(!fuzzyNumbersEqual(o,s)&&(u+=o-s,a[n]=s,u.toPrecision(3).localeCompare(Math.abs(e).toPrecision(3),void 0,{numeric:!0})>=0))break;e__left_angle_mark_0?n--:n++}}if(fuzzyLayoutsEqual(i,a))return i;{const n=e__left_angle_mark_0?l:s,i=t[n];assert(null!=i,`Previous layout not found for panel index ${n}`);const o=i+u,c=resizePanel({panelConstraints:r,panelIndex:n,size:o});if(a[n]=c,!fuzzyNumbersEqual(c,o)){let t=o-c,n=e__left_angle_mark_0?l:s;for(;n>=0&&n__left_angle_mark_r.length;){const i=a[n];assert(null!=i,`Previous layout not found for panel index ${n}`);const o=resizePanel({panelConstraints:r,panelIndex:n,size:i+t});if(fuzzyNumbersEqual(i,o)||(t-=o-i,a[n]=o),fuzzyNumbersEqual(t,0))break;e>0?n--:n++}}}return fuzzyNumbersEqual(a.reduce(((e,t)=>t+e),0),100)?a:i}function calculateAriaValues({layout:e,panelsArray:t,pivotIndices:r}){let n=0,i=100,o=0,a=0;const s=r[0];return assert(null!=s,\"No pivot index found\"),t.forEach(((e,t)=>{const{constraints:r}=e,{maxSize:l=100,minSize:u=0}=r;t===s?(n=u,i=l):(o+=u,a+=l)})),{valueMax:Math.min(i,100-o),valueMin:Math.max(n,100-a),valueNow:e[s]}}function getResizeHandleElementsForGroup(e,t=document){return Array.from(t.querySelectorAll(`[data-panel-resize-handle-id][data-panel-group-id=\"${e}\"]`))}function getResizeHandleElementIndex(e,t,r=document){const n=getResizeHandleElementsForGroup(e,r).findIndex((e=>e.getAttribute(\"data-panel-resize-handle-id\")===t));return null!=n?n:null}function determinePivotIndices(e,t,r){const n=getResizeHandleElementIndex(e,t,r);return null!=n?[n,n+1]:[-1,-1]}function getPanelGroupElement(e,t=document){var r;if(t instanceof HTMLElement&&(null==t||null===(r=t.dataset)||void 0===r?void 0:r.panelGroupId)==e)return t;const n=t.querySelector(`[data-panel-group][data-panel-group-id=\"${e}\"]`);return n||null}function getResizeHandleElement(e,t=document){const r=t.querySelector(`[data-panel-resize-handle-id=\"${e}\"]`);return r||null}function getResizeHandlePanelIds(e,t,r,n=document){var i,o,a,s;const l=getResizeHandleElement(t,n),u=getResizeHandleElementsForGroup(e,n),c=l?u.indexOf(l):-1;return[null!==(i=null===(o=r[c])||void 0===o?void 0:o.id)&&void 0!==i?i:null,null!==(a=null===(s=r[c+1])||void 0===s?void 0:s.id)&&void 0!==a?a:null]}function useWindowSplitterPanelGroupBehavior({committedValuesRef:e,eagerValuesRef:t,groupId:r,layout:n,panelDataArray:i,panelGroupElement:o,setLayout:a}){useRef87({didWarnAboutMissingResizeHandle:!1}),useIsomorphicLayoutEffect2((()=>{if(!o)return;const e=getResizeHandleElementsForGroup(r,o);for(let t=0;t__left_angle_mark_i.length-1;t++){const{valueMax:r,valueMin:o,valueNow:a}=calculateAriaValues({layout:n,panelsArray:i,pivotIndices:[t,t+1]}),s=e[t];if(null==s);else{const e=i[t];assert(e,`No panel data found for index \"${t}\"`),s.setAttribute(\"aria-controls\",e.id),s.setAttribute(\"aria-valuemax\",\"\"+Math.round(r)),s.setAttribute(\"aria-valuemin\",\"\"+Math.round(o)),s.setAttribute(\"aria-valuenow\",null!=a?\"\"+Math.round(a):\"\")}}return()=>{e.forEach(((e,t)=>{e.removeAttribute(\"aria-controls\"),e.removeAttribute(\"aria-valuemax\"),e.removeAttribute(\"aria-valuemin\"),e.removeAttribute(\"aria-valuenow\")}))}}),[r,n,i,o]),useEffect64((()=>{if(!o)return;const e=t.current;assert(e,\"Eager values not found\");const{panelDataArray:i}=e;assert(null!=getPanelGroupElement(r,o),`No group found for id \"${r}\"`);const s=getResizeHandleElementsForGroup(r,o);assert(s,`No resize handles found for group id \"${r}\"`);const l=s.map((e=>{const t=e.getAttribute(\"data-panel-resize-handle-id\");assert(t,\"Resize handle element has no handle id attribute\");const[s,l]=getResizeHandlePanelIds(r,t,i,o);if(null==s||null==l)return()=>{};const u=e=>{if(!e.defaultPrevented)switch(e.key){case\"Enter\":{e.preventDefault();const l=i.findIndex((e=>e.id===s));if(l>=0){const e=i[l];assert(e,`No panel data found for index ${l}`);const s=n[l],{collapsedSize:u=0,collapsible:c,minSize:d=0}=e.constraints;if(null!=s&&c){const e=adjustLayoutByDelta({delta:fuzzyNumbersEqual(s,u)?d-u:u-s,initialLayout:n,panelConstraints:i.map((e=>e.constraints)),pivotIndices:determinePivotIndices(r,t,o),prevLayout:n,trigger:\"keyboard\"});n!==e&&a(e)}}break}}};return e.addEventListener(\"keydown\",u),()=>{e.removeEventListener(\"keydown\",u)}}));return()=>{l.forEach((e=>e()))}}),[o,e,t,r,n,i,a])}function areEqual(e,t){if(e.length!==t.length)return!1;for(let r=0;r__left_angle_mark_e.length;r++)if(e[r]!==t[r])return!1;return!0}function getResizeEventCursorPosition(e,t){const r=\"horizontal\"===e,{x:n,y:i}=getResizeEventCoordinates(t);return r?n:i}function calculateDragOffsetPercentage(e,t,r,n,i){const o=\"horizontal\"===r,a=getResizeHandleElement(t,i);assert(a,`No resize handle element found for id \"${t}\"`);const s=a.getAttribute(\"data-panel-group-id\");assert(s,\"Resize handle element has no group id attribute\");let{initialCursorPosition:l}=n;const u=getResizeEventCursorPosition(r,e),c=getPanelGroupElement(s,i);assert(c,`No group element found for id \"${s}\"`);const d=c.getBoundingClientRect();return(u-l)/(o?d.width:d.height)*100}function calculateDeltaPercentage(e,t,r,n,i,o){if(isKeyDown(e)){const t=\"horizontal\"===r;let n=0;n=e.shiftKey?100:null!=i?i:10;let o=0;switch(e.key){case\"ArrowDown\":o=t?0:n;break;case\"ArrowLeft\":o=t?-n:0;break;case\"ArrowRight\":o=t?n:0;break;case\"ArrowUp\":o=t?0:-n;break;case\"End\":o=100;break;case\"Home\":o=-100}return o}return null==n?0:calculateDragOffsetPercentage(e,t,r,n,o)}function calculateUnsafeDefaultLayout({panelDataArray:e}){const t=Array(e.length),r=e.map((e=>e.constraints));let n=0,i=100;for(let o=0;o__left_angle_mark_e.length;o++){const e=r[o];assert(e,`Panel constraints not found for index ${o}`);const{defaultSize:a}=e;null!=a&&(n++,t[o]=a,i-=a)}for(let o=0;o__left_angle_mark_e.length;o++){const a=r[o];assert(a,`Panel constraints not found for index ${o}`);const{defaultSize:s}=a;if(null!=s)continue;const l=i/(e.length-n);n++,t[o]=l,i-=l}return t}function callPanelCallbacks(e,t,r){t.forEach(((t,n)=>{const i=e[n];assert(i,`Panel data not found for index ${n}`);const{callbacks:o,constraints:a,id:s}=i,{collapsedSize:l=0,collapsible:u}=a,c=r[s];if(null==c||t!==c){r[s]=t;const{onCollapse:e,onExpand:n,onResize:i}=o;i&&i(t,c),u&&(e||n)&&(!n||null!=c&&!fuzzyNumbersEqual$1(c,l)||fuzzyNumbersEqual$1(t,l)||n(),!e||null!=c&&fuzzyNumbersEqual$1(c,l)||!fuzzyNumbersEqual$1(t,l)||e())}}))}function compareLayouts(e,t){if(e.length!==t.length)return!1;for(let r=0;r__left_angle_mark_e.length;r++)if(e[r]!=t[r])return!1;return!0}function computePanelFlexBoxStyle({defaultSize:e,dragState:t,layout:r,panelData:n,panelIndex:i,precision:o=3}){const a=r[i];let s;return s=null==a?null!=e?e.toPrecision(o):\"1\":1===n.length?\"1\":a.toPrecision(o),{flexBasis:0,flexGrow:s,flexShrink:1,overflow:\"hidden\",pointerEvents:null!==t?\"none\":void 0}}function debounce2(e,t=10){let r=null;return(...n)=>{null!==r&&clearTimeout(r),r=setTimeout((()=>{e(...n)}),t)}}function initializeDefaultStorage(e){try{if(\"undefined\"==typeof localStorage)throw new Error(\"localStorage not supported in this environment\");e.getItem=e=>localStorage.getItem(e),e.setItem=(e,t)=>{localStorage.setItem(e,t)}}catch(t){import_console_browserify.default.error(t),e.getItem=()=>null,e.setItem=()=>{}}}function getPanelGroupKey(e){return`react-resizable-panels:${e}`}function getPanelKey(e){return e.map((e=>{const{constraints:t,id:r,idIsFromProps:n,order:i}=e;return n?r:i?`${i}:${JSON.stringify(t)}`:JSON.stringify(t)})).sort(((e,t)=>e.localeCompare(t))).join(\",\")}function loadSerializedPanelGroupState(e,t){try{const r=getPanelGroupKey(e),n=t.getItem(r);if(n){const e=JSON.parse(n);if(\"object\"==typeof e&&null!=e)return e}}catch(r){}return null}function loadPanelGroupState(e,t,r){var n,i;return null!==(i=(null!==(n=loadSerializedPanelGroupState(e,r))&&void 0!==n?n:{})[getPanelKey(t)])&&void 0!==i?i:null}function savePanelGroupState(e,t,r,n,i){var o;const a=getPanelGroupKey(e),s=getPanelKey(t),l=null!==(o=loadSerializedPanelGroupState(e,i))&&void 0!==o?o:{};l[s]={expandToSizes:Object.fromEntries(r.entries()),layout:n};try{i.setItem(a,JSON.stringify(l))}catch(u){import_console_browserify.default.error(u)}}function validatePanelGroupLayout({layout:e,panelConstraints:t}){const r=[...e],n=r.reduce(((e,t)=>e+t),0);if(r.length!==t.length)throw Error(`Invalid ${t.length} panel layout: ${r.map((e=>`${e}%`)).join(\", \")}`);if(!fuzzyNumbersEqual(n,100))for(let o=0;o__left_angle_mark_t.length;o++){const e=r[o];assert(null!=e,`No layout data found for index ${o}`);const t=100/n*e;r[o]=t}let i=0;for(let o=0;o__left_angle_mark_t.length;o++){const e=r[o];assert(null!=e,`No layout data found for index ${o}`);const n=resizePanel({panelConstraints:t,panelIndex:o,size:e});e!=n&&(i+=e-n,r[o]=n)}if(!fuzzyNumbersEqual(i,0))for(let o=0;o__left_angle_mark_t.length;o++){const e=r[o];assert(null!=e,`No layout data found for index ${o}`);const n=resizePanel({panelConstraints:t,panelIndex:o,size:e+i});if(e!==n&&(i-=n-e,r[o]=n,fuzzyNumbersEqual(i,0)))break}return r}var LOCAL_STORAGE_DEBOUNCE_INTERVAL=100,defaultStorage={getItem:e=>(initializeDefaultStorage(defaultStorage),defaultStorage.getItem(e)),setItem:(e,t)=>{initializeDefaultStorage(defaultStorage),defaultStorage.setItem(e,t)}},debounceMap={};function PanelGroupWithForwardedRef({autoSaveId:e=null,children:t,className:r=\"\",direction:n,forwardedRef:i,id:o=null,onLayout:a=null,keyboardResizeBy:s=null,storage:l=defaultStorage,style:u,tagName:c=\"div\",...d}){const h=useUniqueId(o),f=useRef87(null),[p,m]=useState55(null),[g,_]=useState55([]),b=useForceUpdate2(),y=useRef87({}),v=useRef87(new Map),A=useRef87(0),w=useRef87({autoSaveId:e,direction:n,dragState:p,id:h,keyboardResizeBy:s,onLayout:a,storage:l}),S=useRef87({layout:g,panelDataArray:[],panelDataArrayChanged:!1});useRef87({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),useImperativeHandle24(i,(()=>({getId:()=>w.current.id,getLayout:()=>{const{layout:e}=S.current;return e},setLayout:e=>{const{onLayout:t}=w.current,{layout:r,panelDataArray:n}=S.current,i=validatePanelGroupLayout({layout:e,panelConstraints:n.map((e=>e.constraints))});areEqual(r,i)||(_(i),S.current.layout=i,t&&t(i),callPanelCallbacks(n,i,y.current))}})),[]),useIsomorphicLayoutEffect2((()=>{w.current.autoSaveId=e,w.current.direction=n,w.current.dragState=p,w.current.id=h,w.current.onLayout=a,w.current.storage=l})),useWindowSplitterPanelGroupBehavior({committedValuesRef:w,eagerValuesRef:S,groupId:h,layout:g,panelDataArray:S.current.panelDataArray,setLayout:_,panelGroupElement:f.current}),useEffect64((()=>{const{panelDataArray:t}=S.current;if(e){if(0===g.length||g.length!==t.length)return;let r=debounceMap[e];null==r&&(r=debounce2(savePanelGroupState,LOCAL_STORAGE_DEBOUNCE_INTERVAL),debounceMap[e]=r);const n=[...t],i=new Map(v.current);r(e,n,i,g,l)}}),[e,g,l]),useEffect64((()=>{}));const E=useCallback15((e=>{const{onLayout:t}=w.current,{layout:r,panelDataArray:n}=S.current;if(e.constraints.collapsible){const i=n.map((e=>e.constraints)),{collapsedSize:o=0,panelSize:a,pivotIndices:s}=panelDataHelper(n,e,r);if(assert(null!=a,`Panel size not found for panel \"${e.id}\"`),!fuzzyNumbersEqual$1(a,o)){v.current.set(e.id,a);const l=adjustLayoutByDelta({delta:findPanelDataIndex(n,e)===n.length-1?a-o:o-a,initialLayout:r,panelConstraints:i,pivotIndices:s,prevLayout:r,trigger:\"imperative-api\"});compareLayouts(r,l)||(_(l),S.current.layout=l,t&&t(l),callPanelCallbacks(n,l,y.current))}}}),[]),x=useCallback15(((e,t)=>{const{onLayout:r}=w.current,{layout:n,panelDataArray:i}=S.current;if(e.constraints.collapsible){const o=i.map((e=>e.constraints)),{collapsedSize:a=0,panelSize:s=0,minSize:l=0,pivotIndices:u}=panelDataHelper(i,e,n),c=null!=t?t:l;if(fuzzyNumbersEqual$1(s,a)){const t=v.current.get(e.id),a=null!=t&&t>=c?t:c,l=adjustLayoutByDelta({delta:findPanelDataIndex(i,e)===i.length-1?s-a:a-s,initialLayout:n,panelConstraints:o,pivotIndices:u,prevLayout:n,trigger:\"imperative-api\"});compareLayouts(n,l)||(_(l),S.current.layout=l,r&&r(l),callPanelCallbacks(i,l,y.current))}}}),[]),C=useCallback15((e=>{const{layout:t,panelDataArray:r}=S.current,{panelSize:n}=panelDataHelper(r,e,t);return assert(null!=n,`Panel size not found for panel \"${e.id}\"`),n}),[]),T=useCallback15(((e,t)=>{const{panelDataArray:r}=S.current,n=findPanelDataIndex(r,e);return computePanelFlexBoxStyle({defaultSize:t,dragState:p,layout:g,panelData:r,panelIndex:n})}),[p,g]),R=useCallback15((e=>{const{layout:t,panelDataArray:r}=S.current,{collapsedSize:n=0,collapsible:i,panelSize:o}=panelDataHelper(r,e,t);return assert(null!=o,`Panel size not found for panel \"${e.id}\"`),!0===i&&fuzzyNumbersEqual$1(o,n)}),[]),I=useCallback15((e=>{const{layout:t,panelDataArray:r}=S.current,{collapsedSize:n=0,collapsible:i,panelSize:o}=panelDataHelper(r,e,t);return assert(null!=o,`Panel size not found for panel \"${e.id}\"`),!i||fuzzyCompareNumbers(o,n)>0}),[]),k=useCallback15((e=>{const{panelDataArray:t}=S.current;t.push(e),t.sort(((e,t)=>{const r=e.order,n=t.order;return null==r&&null==n?0:null==r?-1:null==n?1:r-n})),S.current.panelDataArrayChanged=!0,b()}),[b]);useIsomorphicLayoutEffect2((()=>{if(S.current.panelDataArrayChanged){S.current.panelDataArrayChanged=!1;const{autoSaveId:e,onLayout:t,storage:r}=w.current,{layout:n,panelDataArray:i}=S.current;let o=null;if(e){const t=loadPanelGroupState(e,i,r);t&&(v.current=new Map(Object.entries(t.expandToSizes)),o=t.layout)}null==o&&(o=calculateUnsafeDefaultLayout({panelDataArray:i}));const a=validatePanelGroupLayout({layout:o,panelConstraints:i.map((e=>e.constraints))});areEqual(n,a)||(_(a),S.current.layout=a,t&&t(a),callPanelCallbacks(i,a,y.current))}})),useIsomorphicLayoutEffect2((()=>{const e=S.current;return()=>{e.layout=[]}}),[]);const P=useCallback15((e=>function(t){t.preventDefault();const r=f.current;if(!r)return()=>null;const{direction:n,dragState:i,id:o,keyboardResizeBy:a,onLayout:s}=w.current,{layout:l,panelDataArray:u}=S.current,{initialLayout:c}=null!=i?i:{},d=determinePivotIndices(o,e,r);let h=calculateDeltaPercentage(t,e,n,i,a,r);const p=\"horizontal\"===n;\"rtl\"===document.dir&&p&&(h=-h);const m=adjustLayoutByDelta({delta:h,initialLayout:null!=c?c:l,panelConstraints:u.map((e=>e.constraints)),pivotIndices:d,prevLayout:l,trigger:isKeyDown(t)?\"keyboard\":\"mouse-or-touch\"}),g=!compareLayouts(l,m);(isPointerEvent(t)||isMouseEvent(t))&&A.current!=h&&(A.current=h,reportConstraintsViolation(e,g?0:p?h__left_angle_mark_0?EXCEEDED_HORIZONTAL_MIN:EXCEEDED_HORIZONTAL_MAX:h__left_angle_mark_0?EXCEEDED_VERTICAL_MIN:EXCEEDED_VERTICAL_MAX)),g&&(_(m),S.current.layout=m,s&&s(m),callPanelCallbacks(u,m,y.current))}),[]),M=useCallback15(((e,t)=>{const{onLayout:r}=w.current,{layout:n,panelDataArray:i}=S.current,o=i.map((e=>e.constraints)),{panelSize:a,pivotIndices:s}=panelDataHelper(i,e,n);assert(null!=a,`Panel size not found for panel \"${e.id}\"`);const l=adjustLayoutByDelta({delta:findPanelDataIndex(i,e)===i.length-1?a-t:t-a,initialLayout:n,panelConstraints:o,pivotIndices:s,prevLayout:n,trigger:\"imperative-api\"});compareLayouts(n,l)||(_(l),S.current.layout=l,r&&r(l),callPanelCallbacks(i,l,y.current))}),[]),O=useCallback15(((e,t)=>{const{layout:r,panelDataArray:n}=S.current,{collapsedSize:i=0,collapsible:o}=t,{collapsedSize:a=0,collapsible:s,maxSize:l=100,minSize:u=0}=e.constraints,{panelSize:c}=panelDataHelper(n,e,r);null!=c&&(o&&s&&fuzzyNumbersEqual$1(c,i)?fuzzyNumbersEqual$1(i,a)||M(e,a):c__left_angle_mark_u?M(e,u):c>l&&M(e,l))}),[M]),B=useCallback15(((e,t)=>{const{direction:r}=w.current,{layout:n}=S.current;if(!f.current)return;const i=getResizeHandleElement(e,f.current);assert(i,`Drag handle element not found for id \"${e}\"`);const o=getResizeEventCursorPosition(r,t);m({dragHandleId:e,dragHandleRect:i.getBoundingClientRect(),initialCursorPosition:o,initialLayout:n})}),[]),N=useCallback15((()=>{m(null)}),[]),j=useCallback15((e=>{const{panelDataArray:t}=S.current,r=findPanelDataIndex(t,e);r>=0&&(t.splice(r,1),delete y.current[e.id],S.current.panelDataArrayChanged=!0,b())}),[b]),L=useMemo72((()=>({collapsePanel:E,direction:n,dragState:p,expandPanel:x,getPanelSize:C,getPanelStyle:T,groupId:h,isPanelCollapsed:R,isPanelExpanded:I,reevaluatePanelConstraints:O,registerPanel:k,registerResizeHandle:P,resizePanel:M,startDragging:B,stopDragging:N,unregisterPanel:j,panelGroupElement:f.current})),[E,p,n,x,C,T,h,R,I,O,k,P,M,B,N,j]),D={display:\"flex\",flexDirection:\"horizontal\"===n?\"row\":\"column\",height:\"100%\",overflow:\"hidden\",width:\"100%\"};return createElement178(PanelGroupContext.Provider,{value:L},createElement178(c,{...d,children:t,className:r,id:o,ref:f,style:{...D,...u},\"data-panel-group\":\"\",\"data-panel-group-direction\":n,\"data-panel-group-id\":h}))}var PanelGroup=forwardRef105(((e,t)=>createElement178(PanelGroupWithForwardedRef,{...e,forwardedRef:t})));function findPanelDataIndex(e,t){return e.findIndex((e=>e===t||e.id===t.id))}function panelDataHelper(e,t,r){const n=findPanelDataIndex(e,t),i=n===e.length-1?[n-1,n]:[n,n+1],o=r[n];return{...t.constraints,panelSize:o,pivotIndices:i}}function useWindowSplitterResizeHandlerBehavior({disabled:e,handleId:t,resizeHandler:r,panelGroupElement:n}){useEffect64((()=>{if(e||null==r||null==n)return;const i=getResizeHandleElement(t,n);if(null==i)return;const o=e=>{if(!e.defaultPrevented)switch(e.key){case\"ArrowDown\":case\"ArrowLeft\":case\"ArrowRight\":case\"ArrowUp\":case\"End\":case\"Home\":e.preventDefault(),r(e);break;case\"F6\":{e.preventDefault();const r=i.getAttribute(\"data-panel-group-id\");assert(r,`No group element found for id \"${r}\"`);const o=getResizeHandleElementsForGroup(r,n),a=getResizeHandleElementIndex(r,t,n);assert(null!==a,`No resize element found for id \"${t}\"`),o[e.shiftKey?a>0?a-1:o.length-1:a+1__left_angle_mark_o.length?a+1:0].focus();break}}};return i.addEventListener(\"keydown\",o),()=>{i.removeEventListener(\"keydown\",o)}}),[n,e,t,r])}function PanelResizeHandle({children:e=null,className:t=\"\",disabled:r=!1,hitAreaMargins:n,id:i,onBlur:o,onDragging:a,onFocus:s,style:l={},tabIndex:u=0,tagName:c=\"div\",...d}){var h,f;const p=useRef87(null),m=useRef87({onDragging:a});useEffect64((()=>{m.current.onDragging=a}));const g=useContext120(PanelGroupContext);if(null===g)throw Error(\"PanelResizeHandle components must be rendered within a PanelGroup container\");const{direction:_,groupId:b,registerResizeHandle:y,startDragging:v,stopDragging:A,panelGroupElement:w}=g,S=useUniqueId(i),[E,x]=useState55(\"inactive\"),[C,T]=useState55(!1),[R,I]=useState55(null),k=useRef87({state:E});useIsomorphicLayoutEffect2((()=>{k.current.state=E})),useEffect64((()=>{if(r)I(null);else{const e=y(S);I((()=>e))}}),[r,S,y]);const P=null!==(h=null==n?void 0:n.coarse)&&void 0!==h?h:15,M=null!==(f=null==n?void 0:n.fine)&&void 0!==f?f:5;return useEffect64((()=>{if(r||null==R)return;const e=p.current;return assert(e,\"Element ref not attached\"),registerResizeHandle(S,e,_,{coarse:P,fine:M},((e,t,r)=>{if(t)switch(e){case\"down\":{x(\"drag\"),v(S,r);const{onDragging:e}=m.current;e&&e(!0);break}case\"move\":{const{state:e}=k.current;\"drag\"!==e&&x(\"hover\"),R(r);break}case\"up\":{x(\"hover\"),A();const{onDragging:e}=m.current;e&&e(!1);break}}else x(\"inactive\")}))}),[P,_,r,M,y,S,R,v,A]),useWindowSplitterResizeHandlerBehavior({disabled:r,handleId:S,resizeHandler:R,panelGroupElement:w}),createElement178(c,{...d,children:e,className:t,id:i,onBlur:()=>{T(!1),null==o||o()},onFocus:()=>{T(!0),null==s||s()},ref:p,role:\"separator\",style:{touchAction:\"none\",userSelect:\"none\",...l},tabIndex:u,\"data-panel-group-direction\":_,\"data-panel-group-id\":b,\"data-resize-handle\":\"\",\"data-resize-handle-active\":\"drag\"===E?\"pointer\":C?\"keyboard\":void 0,\"data-resize-handle-state\":E,\"data-panel-resize-handle-enabled\":!r,\"data-panel-resize-handle-id\":S})}PanelGroupWithForwardedRef.displayName=\"PanelGroup\",PanelGroup.displayName=\"forwardRef(PanelGroup)\",PanelResizeHandle.displayName=\"PanelResizeHandle\";var logo_plain_default=\"data:image/png;base64, \";init_globals();var import_react104=__toESM(require_react());function generateShaderSyncPolyfill(){return syncShader}function syncShader(e,t,r){const n=e.gl,i=e.shader,o=i._getProgramData(t.glProgram);for(const a in t.groups){const s=t.groups[a];for(const l in s.resources){const u=s.resources[l];if(u instanceof UniformGroup)u.ubo?i.bindUniformBlock(u,t._uniformBindMap[a][l],r.blockIndex++):i.updateUniformGroup(u);else if(u instanceof BufferResource)i.bindUniformBlock(u,t._uniformBindMap[a][l],r.blockIndex++);else if(u instanceof TextureSource){e.texture.bind(u,r.textureCount);const i=t._uniformBindMap[a][l],s=o.uniformData[i];s&&(s.value!==r.textureCount&&n.uniform1i(s.location,r.textureCount),r.textureCount++)}}}}init_globals(),init_globals(),init_GlUboSystem(),init_GlShaderSystem(),init_GlUniformGroupSystem(),init_GpuUboSystem(),init_UboSystem(),init_AbstractRenderer(),init_globals(),init_BufferResource(),init_UniformGroup(),init_TextureSource(),init_TextureStyle(),init_globals(),init_createUboElementsSTD40(),init_createUboElementsWGSL(),init_uniformParsers(),init_globals();var uboParserFunctions=[(e,t,r,n,i)=>{const o=n[e].toArray(!0);t[r]=o[0],t[r+1]=o[1],t[r+2]=o[2],t[r+4]=o[3],t[r+5]=o[4],t[r+6]=o[5],t[r+8]=o[6],t[r+9]=o[7],t[r+10]=o[8]},(e,t,r,n,i)=>{i=n[e],t[r]=i.x,t[r+1]=i.y,t[r+2]=i.width,t[r+3]=i.height},(e,t,r,n,i)=>{i=n[e],t[r]=i.x,t[r+1]=i.y},(e,t,r,n,i)=>{i=n[e],t[r]=i.red,t[r+1]=i.green,t[r+2]=i.blue,t[r+3]=i.alpha},(e,t,r,n,i)=>{i=n[e],t[r]=i.red,t[r+1]=i.green,t[r+2]=i.blue}],uboSingleFunctionsWGSL={f32:(e,t,r,n,i)=>{t[r]=i},i32:(e,t,r,n,i)=>{t[r]=i},\"vec2__left_angle_mark_f32>\":(e,t,r,n,i)=>{t[r]=i[0],t[r+1]=i[1]},\"vec3__left_angle_mark_f32>\":(e,t,r,n,i)=>{t[r]=i[0],t[r+1]=i[1],t[r+2]=i[2]},\"vec4__left_angle_mark_f32>\":(e,t,r,n,i)=>{t[r]=i[0],t[r+1]=i[1],t[r+2]=i[2],t[r+3]=i[3]},\"mat2x2__left_angle_mark_f32>\":(e,t,r,n,i)=>{t[r]=i[0],t[r+1]=i[1],t[r+2]=i[2],t[r+3]=i[3]},\"mat3x3__left_angle_mark_f32>\":(e,t,r,n,i)=>{t[r]=i[0],t[r+1]=i[1],t[r+2]=i[2],t[r+4]=i[3],t[r+5]=i[4],t[r+6]=i[5],t[r+8]=i[6],t[r+9]=i[7],t[r+10]=i[8]},\"mat4x4__left_angle_mark_f32>\":(e,t,r,n,i)=>{for(let o=0;o__left_angle_mark_16;o++)t[r+o]=i[o]},\"mat3x2__left_angle_mark_f32>\":(e,t,r,n,i)=>{for(let o=0;o__left_angle_mark_6;o++)t[r+4*(o/3|0)+o%3]=i[o]},\"mat4x2__left_angle_mark_f32>\":(e,t,r,n,i)=>{for(let o=0;o__left_angle_mark_8;o++)t[r+4*(o/4|0)+o%4]=i[o]},\"mat2x3__left_angle_mark_f32>\":(e,t,r,n,i)=>{for(let o=0;o__left_angle_mark_6;o++)t[r+4*(o/2|0)+o%2]=i[o]},\"mat4x3__left_angle_mark_f32>\":(e,t,r,n,i)=>{for(let o=0;o__left_angle_mark_12;o++)t[r+4*(o/4|0)+o%4]=i[o]},\"mat2x4__left_angle_mark_f32>\":(e,t,r,n,i)=>{for(let o=0;o__left_angle_mark_8;o++)t[r+4*(o/2|0)+o%2]=i[o]},\"mat3x4__left_angle_mark_f32>\":(e,t,r,n,i)=>{for(let o=0;o__left_angle_mark_12;o++)t[r+4*(o/3|0)+o%3]=i[o]}},uboSingleFunctionsSTD40={f32:(e,t,r,n,i)=>{t[r]=i},i32:(e,t,r,n,i)=>{t[r]=i},\"vec2__left_angle_mark_f32>\":(e,t,r,n,i)=>{t[r]=i[0],t[r+1]=i[1]},\"vec3__left_angle_mark_f32>\":(e,t,r,n,i)=>{t[r]=i[0],t[r+1]=i[1],t[r+2]=i[2]},\"vec4__left_angle_mark_f32>\":(e,t,r,n,i)=>{t[r]=i[0],t[r+1]=i[1],t[r+2]=i[2],t[r+3]=i[3]},\"mat2x2__left_angle_mark_f32>\":(e,t,r,n,i)=>{t[r]=i[0],t[r+1]=i[1],t[r+4]=i[2],t[r+5]=i[3]},\"mat3x3__left_angle_mark_f32>\":(e,t,r,n,i)=>{t[r]=i[0],t[r+1]=i[1],t[r+2]=i[2],t[r+4]=i[3],t[r+5]=i[4],t[r+6]=i[5],t[r+8]=i[6],t[r+9]=i[7],t[r+10]=i[8]},\"mat4x4__left_angle_mark_f32>\":(e,t,r,n,i)=>{for(let o=0;o__left_angle_mark_16;o++)t[r+o]=i[o]},\"mat3x2__left_angle_mark_f32>\":(e,t,r,n,i)=>{for(let o=0;o__left_angle_mark_6;o++)t[r+4*(o/3|0)+o%3]=i[o]},\"mat4x2__left_angle_mark_f32>\":(e,t,r,n,i)=>{for(let o=0;o__left_angle_mark_8;o++)t[r+4*(o/4|0)+o%4]=i[o]},\"mat2x3__left_angle_mark_f32>\":(e,t,r,n,i)=>{for(let o=0;o__left_angle_mark_6;o++)t[r+4*(o/2|0)+o%2]=i[o]},\"mat4x3__left_angle_mark_f32>\":(e,t,r,n,i)=>{for(let o=0;o__left_angle_mark_12;o++)t[r+4*(o/4|0)+o%4]=i[o]},\"mat2x4__left_angle_mark_f32>\":(e,t,r,n,i)=>{for(let o=0;o__left_angle_mark_8;o++)t[r+4*(o/2|0)+o%2]=i[o]},\"mat3x4__left_angle_mark_f32>\":(e,t,r,n,i)=>{for(let o=0;o__left_angle_mark_12;o++)t[r+4*(o/3|0)+o%3]=i[o]}};function generateUboSyncPolyfillSTD40(e){return generateUboSyncPolyfill(e,uboSingleFunctionsSTD40,(e=>{const t=Math.max(WGSL_TO_STD40_SIZE[e.data.type]/16,1),r=e.data.value.length/e.data.size,n=(4-r%4)%4;return(i,o,a,s,l)=>{let u=0;for(let c=0;c__left_angle_mark_e.data.size*t;c++){for(let e=0;e__left_angle_mark_r;e++)o[a++]=l[u++];a+=n}}}))}function generateUboSyncPolyfillWGSL(e){return generateUboSyncPolyfill(e,uboSingleFunctionsWGSL,(e=>{const{size:t,align:r}=WGSL_ALIGN_SIZE_DATA[e.data.type],n=(t-r)/4;return(r,i,o,a,s)=>{let l=0;for(let u=0;u__left_angle_mark_e.data.size*(t/4);u++){for(let e=0;e__left_angle_mark_t/4;e++)i[o++]=s[l++];o+=n}}}))}function generateUboSyncPolyfill(e,t,r){const n={};for(const i in e){const o=e[i],a=o.data;let s=!1;n[a.name]={offset:o.offset/4,func:null};for(let e=0;e__left_angle_mark_uniformParsers.length;e++){const t=uniformParsers[e];if(a.type===t.type&&t.test(a)){n[a.name].func=uboParserFunctions[e],s=!0;break}}s||(1===a.size?n[a.name].func=t[a.type]:n[a.name].func=r(o))}return(e,t,r)=>{for(const i in n)n[i].func(i,t,r+n[i].offset,e,e[i])}}init_globals(),init_uniformParsers(),init_globals();var uniformSingleParserFunctions={f32(e,t,r,n,i,o,a){r!==n&&(t.value=n,a.uniform1f(i[e].location,n))},\"vec2__left_angle_mark_f32>\"(e,t,r,n,i,o,a){r[0]===n[0]&&r[1]===n[1]||(r[0]=n[0],r[1]=n[1],a.uniform2f(i[e].location,n[0],n[1]))},\"vec3__left_angle_mark_f32>\"(e,t,r,n,i,o,a){r[0]===n[0]&&r[1]===n[1]&&r[2]===n[2]||(r[0]=n[0],r[1]=n[1],r[2]=n[2],a.uniform3f(i[e].location,n[0],n[1],n[2]))},\"vec4__left_angle_mark_f32>\"(e,t,r,n,i,o,a){r[0]===n[0]&&r[1]===n[1]&&r[2]===n[2]&&r[3]===n[3]||(r[0]=n[0],r[1]=n[1],r[2]=n[2],r[3]=n[3],a.uniform4f(i[e].location,n[0],n[1],n[2],n[3]))},i32(e,t,r,n,i,o,a){r!==n&&(t.value=n,a.uniform1i(i[e].location,n))},\"vec2__left_angle_mark_i32>\"(e,t,r,n,i,o,a){r[0]===n[0]&&r[1]===n[1]||(r[0]=n[0],r[1]=n[1],a.uniform2i(i[e].location,n[0],n[1]))},\"vec3__left_angle_mark_i32>\"(e,t,r,n,i,o,a){r[0]===n[0]&&r[1]===n[1]&&r[2]===n[2]||(r[0]=n[0],r[1]=n[1],r[2]=n[2],a.uniform3i(i[e].location,n[0],n[1],n[2]))},\"vec4__left_angle_mark_i32>\"(e,t,r,n,i,o,a){r[0]===n[0]&&r[1]===n[1]&&r[2]===n[2]&&r[3]===n[3]||(r[0]=n[0],r[1]=n[1],r[2]=n[2],r[3]=n[3],a.uniform4i(i[e].location,n[0],n[1],n[2],n[3]))},u32(e,t,r,n,i,o,a){r!==n&&(t.value=n,a.uniform1ui(i[e].location,n))},\"vec2__left_angle_mark_u32>\"(e,t,r,n,i,o,a){r[0]===n[0]&&r[1]===n[1]||(r[0]=n[0],r[1]=n[1],a.uniform2ui(i[e].location,n[0],n[1]))},\"vec3__left_angle_mark_u32>\"(e,t,r,n,i,o,a){r[0]===n[0]&&r[1]===n[1]&&r[2]===n[2]||(r[0]=n[0],r[1]=n[1],r[2]=n[2],a.uniform3ui(i[e].location,n[0],n[1],n[2]))},\"vec4__left_angle_mark_u32>\"(e,t,r,n,i,o,a){r[0]===n[0]&&r[1]===n[1]&&r[2]===n[2]&&r[3]===n[3]||(r[0]=n[0],r[1]=n[1],r[2]=n[2],r[3]=n[3],a.uniform4ui(i[e].location,n[0],n[1],n[2],n[3]))},bool(e,t,r,n,i,o,a){r!==n&&(t.value=n,a.uniform1i(i[e].location,n))},\"vec2__left_angle_mark_bool>\"(e,t,r,n,i,o,a){r[0]===n[0]&&r[1]===n[1]||(r[0]=n[0],r[1]=n[1],a.uniform2i(i[e].location,n[0],n[1]))},\"vec3__left_angle_mark_bool>\"(e,t,r,n,i,o,a){r[0]===n[0]&&r[1]===n[1]&&r[2]===n[2]||(r[0]=n[0],r[1]=n[1],r[2]=n[2],a.uniform3i(i[e].location,n[0],n[1],n[2]))},\"vec4__left_angle_mark_bool>\"(e,t,r,n,i,o,a){r[0]===n[0]&&r[1]===n[1]&&r[2]===n[2]&&r[3]===n[3]||(r[0]=n[0],r[1]=n[1],r[2]=n[2],r[3]=n[3],a.uniform4i(i[e].location,n[0],n[1],n[2],n[3]))},\"mat2x2__left_angle_mark_f32>\"(e,t,r,n,i,o,a){a.uniformMatrix2fv(i[e].location,!1,n)},\"mat3x3__left_angle_mark_f32>\"(e,t,r,n,i,o,a){a.uniformMatrix3fv(i[e].location,!1,n)},\"mat4x4__left_angle_mark_f32>\"(e,t,r,n,i,o,a){a.uniformMatrix4fv(i[e].location,!1,n)}},uniformArrayParserFunctions={f32(e,t,r,n,i,o,a){a.uniform1fv(i[e].location,n)},\"vec2__left_angle_mark_f32>\"(e,t,r,n,i,o,a){a.uniform2fv(i[e].location,n)},\"vec3__left_angle_mark_f32>\"(e,t,r,n,i,o,a){a.uniform3fv(i[e].location,n)},\"vec4__left_angle_mark_f32>\"(e,t,r,n,i,o,a){a.uniform4fv(i[e].location,n)},\"mat2x2__left_angle_mark_f32>\"(e,t,r,n,i,o,a){a.uniformMatrix2fv(i[e].location,!1,n)},\"mat3x3__left_angle_mark_f32>\"(e,t,r,n,i,o,a){a.uniformMatrix3fv(i[e].location,!1,n)},\"mat4x4__left_angle_mark_f32>\"(e,t,r,n,i,o,a){a.uniformMatrix4fv(i[e].location,!1,n)},i32(e,t,r,n,i,o,a){a.uniform1iv(i[e].location,n)},\"vec2__left_angle_mark_i32>\"(e,t,r,n,i,o,a){a.uniform2iv(i[e].location,n)},\"vec3__left_angle_mark_i32>\"(e,t,r,n,i,o,a){a.uniform3iv(i[e].location,n)},\"vec4__left_angle_mark_i32>\"(e,t,r,n,i,o,a){a.uniform4iv(i[e].location,n)},u32(e,t,r,n,i,o,a){a.uniform1iv(i[e].location,n)},\"vec2__left_angle_mark_u32>\"(e,t,r,n,i,o,a){a.uniform2iv(i[e].location,n)},\"vec3__left_angle_mark_u32>\"(e,t,r,n,i,o,a){a.uniform3iv(i[e].location,n)},\"vec4__left_angle_mark_u32>\"(e,t,r,n,i,o,a){a.uniform4iv(i[e].location,n)},bool(e,t,r,n,i,o,a){a.uniform1iv(i[e].location,n)},\"vec2__left_angle_mark_bool>\"(e,t,r,n,i,o,a){a.uniform2iv(i[e].location,n)},\"vec3__left_angle_mark_bool>\"(e,t,r,n,i,o,a){a.uniform3iv(i[e].location,n)},\"vec4__left_angle_mark_bool>\"(e,t,r,n,i,o,a){a.uniform4iv(i[e].location,n)}},uniformParserFunctions=[(e,t,r,n,i,o,a)=>{a.uniformMatrix3fv(i[e].location,!1,o[e].toArray(!0))},(e,t,r,n,i,o,a)=>{r=i[e].value,n=o[e],r[0]===n.x&&r[1]===n.y&&r[2]===n.width&&r[3]===n.height||(r[0]=n.x,r[1]=n.y,r[2]=n.width,r[3]=n.height,a.uniform4f(i[e].location,n.x,n.y,n.width,n.height))},(e,t,r,n,i,o,a)=>{r=i[e].value,n=o[e],r[0]===n.x&&r[1]===n.y||(r[0]=n.x,r[1]=n.y,a.uniform2f(i[e].location,n.x,n.y))},(e,t,r,n,i,o,a)=>{r=i[e].value,n=o[e],r[0]===n.red&&r[1]===n.green&&r[2]===n.blue&&r[3]===n.alpha||(r[0]=n.red,r[1]=n.green,r[2]=n.blue,r[3]=n.alpha,a.uniform4f(i[e].location,n.red,n.green,n.blue,n.alpha))},(e,t,r,n,i,o,a)=>{r=i[e].value,n=o[e],r[0]===n.red&&r[1]===n.green&&r[2]===n.blue||(r[0]=n.red,r[1]=n.green,r[2]=n.blue,a.uniform3f(i[e].location,n.red,n.green,n.blue))}];function generateUniformsSyncPolyfill(e,t){const r={};for(const n in e.uniformStructures){if(!t[n])continue;const i=e.uniformStructures[n];let o=!1;for(let e=0;e__left_angle_mark_uniformParsers.length;e++){const t=uniformParsers[e];if(i.type===t.type&&t.test(i)){r[n]=uniformParserFunctions[e],o=!0;break}}if(!o){const e=1===i.size?uniformSingleParserFunctions:uniformArrayParserFunctions;r[n]=e[i.type]}}return(e,t,n)=>{const i=n.gl;for(const o in r){const n=t[o],a=e[o],s=e[o].value;r[o](o,a,s,n,e,t,i)}}}function selfInstall(){Object.assign(AbstractRenderer.prototype,{_unsafeEvalCheck(){}}),Object.assign(UboSystem.prototype,{_systemCheck(){}}),Object.assign(GlUniformGroupSystem.prototype,{_generateUniformsSync:generateUniformsSyncPolyfill}),Object.assign(GlUboSystem.prototype,{_generateUboSync:generateUboSyncPolyfillSTD40}),Object.assign(GpuUboSystem.prototype,{_generateUboSync:generateUboSyncPolyfillWGSL}),Object.assign(GlShaderSystem.prototype,{_generateShaderSync:generateShaderSyncPolyfill})}selfInstall(),init_globals(),init_globals(),init_Extensions();var browserExt={extension:{type:ExtensionType.Environment,name:\"browser\",priority:-1},test:()=>!0,load:async()=>{await Promise.resolve().then((()=>(init_browserAll(),browserAll_exports)))}};init_globals(),init_Extensions();var webworkerExt={extension:{type:ExtensionType.Environment,name:\"webworker\",priority:0},test:()=>\"undefined\"!=typeof self&&void 0!==self.WorkerGlobalScope,load:async()=>{await Promise.resolve().then((()=>(init_webworkerAll(),webworkerAll_exports)))}};init_Extensions(),init_init5(),init_init4(),init_globals(),init_Extensions(),init_globals(),init_globals(),init_Extensions();var environments=[],_isWebGLSupported,_isWebGPUSupported;async function autoDetectEnvironment(e){if(e)for(let t=0;t__left_angle_mark_environments.length;t++){const e=environments[t];if(e.value.test())return void(await e.value.load())}}function isWebGLSupported(e){return void 0!==_isWebGLSupported?_isWebGLSupported:_isWebGLSupported=(()=>{var t;const r={stencil:!0,failIfMajorPerformanceCaveat:null!=e?e:AbstractRenderer.defaultOptions.failIfMajorPerformanceCaveat};try{if(!DOMAdapter.get().getWebGLRenderingContext())return!1;let e=DOMAdapter.get().createCanvas().getContext(\"webgl\",r);const n=!!(null==(t=null==e?void 0:e.getContextAttributes())?void 0:t.stencil);if(e){const t=e.getExtension(\"WEBGL_lose_context\");t&&t.loseContext()}return e=null,n}catch(e4){return!1}})()}async function isWebGPUSupported(e={}){return void 0!==_isWebGPUSupported?_isWebGPUSupported:_isWebGPUSupported=await(async()=>{if(!DOMAdapter.get().getNavigator().gpu)return!1;try{const t=await navigator.gpu.requestAdapter(e);return await t.requestDevice(),!0}catch(e4){return!1}})()}extensions.handleByNamedList(ExtensionType.Environment,environments),init_globals(),init_adapter(),init_AbstractRenderer(),init_globals(),init_adapter(),init_AbstractRenderer();var renderPriority=[\"webgl\",\"webgpu\",\"canvas\"];async function autoDetectRenderer(e){var t,r;let n,i=[];e.preference?(i.push(e.preference),renderPriority.forEach((t=>{t!==e.preference&&i.push(t)}))):i=renderPriority.slice(),await autoDetectEnvironment(null==(t=e.manageImports)||t);let o={};for(let s=0;s__left_angle_mark_i.length;s++){const t=i[s];if(\"webgpu\"===t&&await isWebGPUSupported()){const{WebGPURenderer:t}=await Promise.resolve().then((()=>(init_WebGPURenderer(),WebGPURenderer_exports)));n=t,o={...e,...e.webgpu};break}if(\"webgl\"===t&&isWebGLSupported(null!=(r=e.failIfMajorPerformanceCaveat)?r:AbstractRenderer.defaultOptions.failIfMajorPerformanceCaveat)){const{WebGLRenderer:t}=await Promise.resolve().then((()=>(init_WebGLRenderer(),WebGLRenderer_exports)));n=t,o={...e,...e.webgl};break}if(\"canvas\"===t)throw o={...e},new Error(\"CanvasRenderer is not yet implemented\")}if(delete o.webgpu,delete o.webgl,!n)throw new Error(\"No available renderer for the current environment\");const a=new n;return await a.init(o),a}init_Container(),init_deprecation();var _Application=class e{async init(t){t={...t},this.renderer=await autoDetectRenderer(t),e._plugins.forEach((e=>{e.init.call(this,t)}))}render(){this.renderer.render({container:this.stage})}get canvas(){return this.renderer.canvas}get view(){return deprecation(v8_0_0,\"Application.view is deprecated, please use Application.canvas instead.\"),this.renderer.canvas}get screen(){return this.renderer.screen}destroy(t=!1,r=!1){const n=e._plugins.slice(0);n.reverse(),n.forEach((e=>{e.destroy.call(this)})),this.stage.destroy(r),this.stage=null,this.renderer.destroy(t),this.renderer=null}constructor(...e){this.stage=new Container,void 0!==e[0]&&deprecation(v8_0_0,\"Application constructor options are deprecated, please use Application.init() instead.\")}};_Application._plugins=[];var Application=_Application;extensions.handleByList(ExtensionType.Application,Application._plugins),init_globals(),init_Extensions(),init_warn(),init_globals();var BackgroundLoader=class{add(e){e.forEach((e=>{this._assetList.push(e)})),this.verbose&&import_console_browserify.default.log(\"[BackgroundLoader] assets: \",this._assetList),this._isActive&&!this._isLoading&&this._next()}async _next(){if(this._assetList.length&&this._isActive){this._isLoading=!0;const e=[],t=Math.min(this._assetList.length,this._maxConcurrent);for(let r=0;r__left_angle_mark_t;r++)e.push(this._assetList.pop());await this._loader.load(e),this._isLoading=!1,this._next()}}get active(){return this._isActive}set active(e){this._isActive!==e&&(this._isActive=e,e&&!this._isLoading&&this._next())}constructor(e,t=!1){this._loader=e,this._assetList=[],this._isLoading=!1,this._maxConcurrent=1,this.verbose=t}};init_Cache(),init_globals(),init_Extensions(),init_Texture();var cacheTextureArray={extension:ExtensionType.CacheParser,test:e=>Array.isArray(e)&&e.every((e=>e instanceof Texture)),getCacheableAssets:(e,t)=>{const r={};return e.forEach((e=>{t.forEach(((t,n)=>{r[e+(0===n?\"\":n+1)]=t}))})),r}};async function testImageFormat(e){if(\"Image\"in globalThis)return new Promise((t=>{const r=new Image;r.onload=()=>{t(!0)},r.onerror=()=>{t(!1)},r.src=e}));if(\"createImageBitmap\"in globalThis&&\"fetch\"in globalThis){try{const t=await(await fetch(e)).blob();await createImageBitmap(t)}catch(e4){return!1}return!0}return!1}init_globals(),init_Extensions(),init_globals();var detectAvif={extension:{type:ExtensionType.DetectionParser,priority:1},test:async()=>testImageFormat(\"data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A=\"),add:async e=>[...e,\"avif\"],remove:async e=>e.filter((e=>\"avif\"!==e))};init_globals(),init_Extensions();var imageFormats=[\"png\",\"jpg\",\"jpeg\"],detectDefaults={extension:{type:ExtensionType.DetectionParser,priority:-1},test:()=>Promise.resolve(!0),add:async e=>[...e,...imageFormats],remove:async e=>e.filter((e=>!imageFormats.includes(e)))};init_globals(),init_Extensions(),init_globals();var inWorker=\"WorkerGlobalScope\"in globalThis&&globalThis instanceof globalThis.WorkerGlobalScope;function testVideoFormat(e){return!inWorker&&\"\"!==document.createElement(\"video\").canPlayType(e)}var detectMp4={extension:{type:ExtensionType.DetectionParser,priority:0},test:async()=>testVideoFormat(\"video/mp4\"),add:async e=>[...e,\"mp4\",\"m4v\"],remove:async e=>e.filter((e=>\"mp4\"!==e&&\"m4v\"!==e))};init_globals(),init_Extensions();var detectOgv={extension:{type:ExtensionType.DetectionParser,priority:0},test:async()=>testVideoFormat(\"video/ogg\"),add:async e=>[...e,\"ogv\"],remove:async e=>e.filter((e=>\"ogv\"!==e))};init_globals(),init_Extensions();var detectWebm={extension:{type:ExtensionType.DetectionParser,priority:0},test:async()=>testVideoFormat(\"video/webm\"),add:async e=>[...e,\"webm\"],remove:async e=>e.filter((e=>\"webm\"!==e))};init_globals(),init_Extensions();var detectWebp={extension:{type:ExtensionType.DetectionParser,priority:0},test:async()=>testImageFormat(\"data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAAAAAAfQ//73v/+BiOh/AAA=\"),add:async e=>[...e,\"webp\"],remove:async e=>e.filter((e=>\"webp\"!==e))};init_globals(),init_warn(),init_path(),init_convertToList(),init_isSingleItem();var Loader=class{reset(){this._parsersValidated=!1,this.promiseCache={}}_getLoadPromiseAndParser(e,t){const r={promise:null,parser:null};return r.promise=(async()=>{var n,i;let o=null,a=null;if(t.loadParser&&(a=this._parserHash[t.loadParser],a||warn3(`[Assets] specified load parser \"${t.loadParser}\" not found while loading ${e}`)),!a){for(let r=0;r__left_angle_mark_this.parsers.length;r++){const i=this.parsers[r];if(i.load&&(null==(n=i.test)?void 0:n.call(i,e,t,this))){a=i;break}}if(!a)return warn3(`[Assets] ${e} could not be loaded as we don't know how to parse it, ensure the correct parser has been added`),null}o=await a.load(e,t,this),r.parser=a;for(let e=0;e__left_angle_mark_this.parsers.length;e++){const n=this.parsers[e];n.parse&&n.parse&&await(null==(i=n.testParse)?void 0:i.call(n,o,t,this))&&(o=await n.parse(o,t,this)||o,r.parser=n)}return o})(),r}async load(e,t){this._parsersValidated||this._validateParsers();let r=0;const n={},i=isSingleItem(e),o=convertToList(e,(e=>({alias:[e],src:e}))),a=o.length,s=o.map((async e=>{const i=path2.toAbsolute(e.src);if(!n[e.src])try{this.promiseCache[i]||(this.promiseCache[i]=this._getLoadPromiseAndParser(i,e)),n[e.src]=await this.promiseCache[i].promise,t&&t(++r/a)}catch(e4){throw delete this.promiseCache[i],delete n[e.src],new Error(`[Loader.load] Failed to load ${i}.\\n${e4}`)}}));return await Promise.all(s),i?n[o[0].src]:n}async unload(e){const t=convertToList(e,(e=>({alias:[e],src:e}))).map((async e=>{var t,r;const n=path2.toAbsolute(e.src),i=this.promiseCache[n];if(i){const o=await i.promise;delete this.promiseCache[n],await(null==(r=null==(t=i.parser)?void 0:t.unload)?void 0:r.call(t,o,e,this))}}));await Promise.all(t)}_validateParsers(){this._parsersValidated=!0,this._parserHash=this._parsers.filter((e=>e.name)).reduce(((e,t)=>(t.name?e[t.name]&&warn3(`[Assets] loadParser name conflict \"${t.name}\"`):warn3(\"[Assets] loadParser should have a name\"),{...e,[t.name]:t})),{})}constructor(){this._parsers=[],this._parsersValidated=!1,this.parsers=new Proxy(this._parsers,{set:(e,t,r)=>(this._parsersValidated=!1,e[t]=r,!0)}),this.promiseCache={}}};function checkDataUrl(e,t){if(Array.isArray(t)){for(const r of t)if(e.startsWith(`data:${r}`))return!0;return!1}return e.startsWith(`data:${t}`)}function checkExtension(e,t){const r=e.split(\"?\")[0],n=path2.extname(r).toLowerCase();return Array.isArray(t)?t.includes(n):n===t}init_globals(),init_adapter(),init_Extensions(),init_globals(),init_globals(),init_path(),init_LoaderParser();var validJSONExtension=\".json\",validJSONMIME=\"application/json\",loadJson={extension:{type:ExtensionType.LoadParser,priority:LoaderParserPriority.Low},name:\"loadJson\",test:e=>checkDataUrl(e,validJSONMIME)||checkExtension(e,validJSONExtension),async load(e){const t=await DOMAdapter.get().fetch(e);return await t.json()}};init_globals(),init_adapter(),init_Extensions(),init_LoaderParser();var validTXTExtension=\".txt\",validTXTMIME=\"text/plain\",loadTxt={name:\"loadTxt\",extension:{type:ExtensionType.LoadParser,priority:LoaderParserPriority.Low},test:e=>checkDataUrl(e,validTXTMIME)||checkExtension(e,validTXTExtension),async load(e){const t=await DOMAdapter.get().fetch(e);return await t.text()}};init_globals(),init_adapter(),init_Extensions(),init_warn(),init_path(),init_Cache(),init_LoaderParser();var validWeights=[\"normal\",\"bold\",\"100\",\"200\",\"300\",\"400\",\"500\",\"600\",\"700\",\"800\",\"900\"],validFontExtensions=[\".ttf\",\".otf\",\".woff\",\".woff2\"],validFontMIMEs=[\"font/ttf\",\"font/otf\",\"font/woff\",\"font/woff2\"],CSS_IDENT_TOKEN_REGEX=/^(--|-?[A-Z_])[0-9A-Z_-]*$/i;function getFontFamilyName(e){const t=path2.extname(e),r=path2.basename(e,t).replace(/(-|_)/g,\" \").toLowerCase().split(\" \").map((e=>e.charAt(0).toUpperCase()+e.slice(1)));let n=r.length>0;for(const o of r)if(!o.match(CSS_IDENT_TOKEN_REGEX)){n=!1;break}let i=r.join(\" \");return n||(i=`\"${i.replace(/[\\\\\"]/g,\"\\\\\")}\"`),i}var validURICharactersRegex=/^[0-9A-Za-z%:/?#\\[\\]@!\\'()\\*\\+,;=\\-._~]*$/;function encodeURIWhenNeeded(e){return validURICharactersRegex.test(e)?e:encodeURI(e)}var loadWebFont={extension:{type:ExtensionType.LoadParser,priority:LoaderParserPriority.Low},name:\"loadWebFont\",test:e=>checkDataUrl(e,validFontMIMEs)||checkExtension(e,validFontExtensions),async load(e,t){var r,n,i,o,a,s;const l=DOMAdapter.get().getFontFaceSet();if(l){const u=[],c=null!=(n=null==(r=t.data)?void 0:r.family)?n:getFontFamilyName(e),d=null!=(a=null==(o=null==(i=t.data)?void 0:i.weights)?void 0:o.filter((e=>validWeights.includes(e))))?a:[\"normal\"],h=null!=(s=t.data)?s:{};for(let t=0;t__left_angle_mark_d.length;t++){const r=d[t],n=new FontFace(c,`url(${encodeURIWhenNeeded(e)})`,{...h,weight:r});await n.load(),l.add(n),u.push(n)}return Cache.set(`${c}-and-url`,{url:e,fontFaces:u}),1===u.length?u[0]:u}return warn3(\"[loadWebFont] FontFace API is not supported. Skipping loading font\"),null},unload(e){(Array.isArray(e)?e:[e]).forEach((e=>{Cache.remove(e.family),DOMAdapter.get().getFontFaceSet().delete(e)}))}};function getResolutionOfUrl(e,t=1){var r;const n=null==(r=Resolver.RETINA_PREFIX)?void 0:r.exec(e);return n?parseFloat(n[1]):t}function createTexture(e,t,r){e.label=r,e._sourceOrigin=r;const n=new Texture({source:e,label:r}),i=()=>{delete t.promiseCache[r],Cache.has(r)&&Cache.remove(r)};return n.source.once(\"destroy\",(()=>{t.promiseCache[r]&&(warn3(\"[Assets] A TextureSource managed by Assets was destroyed instead of unloaded! Use Assets.unload() instead of destroying the TextureSource.\"),i())})),n.once(\"destroy\",(()=>{e.destroyed||(warn3(\"[Assets] A Texture managed by Assets was destroyed instead of unloaded! Use Assets.unload() instead of destroying the Texture.\"),i())})),n}init_globals(),init_adapter(),init_Extensions(),init_ImageSource(),init_GraphicsContext(),init_globals(),init_Resolver(),init_LoaderParser(),init_globals(),init_Texture(),init_warn(),init_Cache();var validSVGExtension=\".svg\",validSVGMIME=\"image/svg+xml\",loadSvg={extension:{type:ExtensionType.LoadParser,priority:LoaderParserPriority.Low},name:\"loadSVG\",config:{crossOrigin:\"anonymous\",parseAsGraphicsContext:!1},test:e=>checkDataUrl(e,validSVGMIME)||checkExtension(e,validSVGExtension),async load(e,t,r){var n;return(null!=(n=t.data.parseAsGraphicsContext)?n:this.config.parseAsGraphicsContext)?loadAsGraphics(e):loadAsTexture(e,t,r,this.config.crossOrigin)},unload(e){e.destroy(!0)}};async function loadAsTexture(e,t,r,n){var i,o,a,s,l;const u=await DOMAdapter.get().fetch(e),c=await u.blob(),d=URL.createObjectURL(c),h=new Image;h.src=d,h.crossOrigin=n,await h.decode(),URL.revokeObjectURL(d);const f=document.createElement(\"canvas\"),p=f.getContext(\"2d\"),m=(null==(i=t.data)?void 0:i.resolution)||getResolutionOfUrl(e),g=null!=(a=null==(o=t.data)?void 0:o.width)?a:h.width,_=null!=(l=null==(s=t.data)?void 0:s.height)?l:h.height;f.width=g*m,f.height=_*m,p.drawImage(h,0,0,g*m,_*m);const{parseAsGraphicsContext:b,...y}=t.data;return createTexture(new ImageSource({resource:f,alphaMode:\"premultiply-alpha-on-upload\",resolution:m,...y}),r,e)}async function loadAsGraphics(e){const t=await DOMAdapter.get().fetch(e),r=await t.text(),n=new GraphicsContext;return n.svg(r),n}init_globals(),init_adapter(),init_Extensions(),init_ImageSource(),init_globals(),init_globals();var WORKER_CODE='(function () {\\n \\'use strict\\';\\n\\n const WHITE_PNG = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8/x8AAwMCAO+ip1sAAAAASUVORK5CYII=\";\\n async function checkImageBitmap() {\\n try {\\n if (typeof createImageBitmap !== \"function\")\\n return false;\\n const response = await fetch(WHITE_PNG);\\n const imageBlob = await response.blob();\\n const imageBitmap = await createImageBitmap(imageBlob);\\n return imageBitmap.width === 1 && imageBitmap.height === 1;\\n } catch (e) {\\n return false;\\n }\\n }\\n void checkImageBitmap().then((result) => {\\n self.postMessage(result);\\n });\\n\\n})();\\n',WORKER_URL=null,WorkerInstance=class{constructor(){WORKER_URL||(WORKER_URL=URL.createObjectURL(new Blob([WORKER_CODE],{type:\"application/javascript\"}))),this.worker=new Worker(WORKER_URL)}};WorkerInstance.revokeObjectURL=function(){WORKER_URL&&(URL.revokeObjectURL(WORKER_URL),WORKER_URL=null)},init_globals();var WORKER_CODE2=\"(function () {\\n 'use strict';\\n\\n async function loadImageBitmap(url) {\\n const response = await fetch(url);\\n if (!response.ok) {\\n throw new Error(`[WorkerManager.loadImageBitmap] Failed to fetch ${url}: ${response.status} ${response.statusText}`);\\n }\\n const imageBlob = await response.blob();\\n const imageBitmap = await createImageBitmap(imageBlob);\\n return imageBitmap;\\n }\\n self.onmessage = async (event) => {\\n try {\\n const imageBitmap = await loadImageBitmap(event.data.data[0]);\\n self.postMessage({\\n data: imageBitmap,\\n uuid: event.data.uuid,\\n id: event.data.id\\n }, [imageBitmap]);\\n } catch (e) {\\n self.postMessage({\\n error: e,\\n uuid: event.data.uuid,\\n id: event.data.id\\n });\\n }\\n };\\n\\n})();\\n\",WORKER_URL2=null,WorkerInstance2=class{constructor(){WORKER_URL2||(WORKER_URL2=URL.createObjectURL(new Blob([WORKER_CODE2],{type:\"application/javascript\"}))),this.worker=new Worker(WORKER_URL2)}};WorkerInstance2.revokeObjectURL=function(){WORKER_URL2&&(URL.revokeObjectURL(WORKER_URL2),WORKER_URL2=null)};var UUID=0,MAX_WORKERS,WorkerManagerClass=class{isImageBitmapSupported(){return void 0!==this._isImageBitmapSupported||(this._isImageBitmapSupported=new Promise((e=>{const{worker:t}=new WorkerInstance;t.addEventListener(\"message\",(r=>{t.terminate(),WorkerInstance.revokeObjectURL(),e(r.data)}))}))),this._isImageBitmapSupported}loadImageBitmap(e){return this._run(\"loadImageBitmap\",[e])}async _initWorkers(){this._initialized||(this._initialized=!0)}_getWorker(){void 0===MAX_WORKERS&&(MAX_WORKERS=navigator.hardwareConcurrency||4);let e=this._workerPool.pop();return!e&&this._createdWorkers__left_angle_mark_MAX_WORKERS&&(this._createdWorkers++,e=(new WorkerInstance2).worker,e.addEventListener(\"message\",(e=>{this._complete(e.data),this._returnWorker(e.target),this._next()}))),e}_returnWorker(e){this._workerPool.push(e)}_complete(e){void 0!==e.error?this._resolveHash[e.uuid].reject(e.error):this._resolveHash[e.uuid].resolve(e.data),this._resolveHash[e.uuid]=null}async _run(e,t){await this._initWorkers();const r=new Promise(((r,n)=>{this._queue.push({id:e,arguments:t,resolve:r,reject:n})}));return this._next(),r}_next(){if(!this._queue.length)return;const e=this._getWorker();if(!e)return;const t=this._queue.pop(),r=t.id;this._resolveHash[UUID]={resolve:t.resolve,reject:t.reject},e.postMessage({data:t.arguments,uuid:UUID++,id:r})}constructor(){this._initialized=!1,this._createdWorkers=0,this._workerPool=[],this._queue=[],this._resolveHash={}}},WorkerManager=new WorkerManagerClass;init_LoaderParser();var validImageExtensions=[\".jpeg\",\".jpg\",\".png\",\".webp\",\".avif\"],validImageMIMEs=[\"image/jpeg\",\"image/png\",\"image/webp\",\"image/avif\"];async function loadImageBitmap(e){const t=await DOMAdapter.get().fetch(e);if(!t.ok)throw new Error(`[loadImageBitmap] Failed to fetch ${e}: ${t.status} ${t.statusText}`);const r=await t.blob();return await createImageBitmap(r)}var loadTextures={name:\"loadTextures\",extension:{type:ExtensionType.LoadParser,priority:LoaderParserPriority.High},config:{preferWorkers:!0,preferCreateImageBitmap:!0,crossOrigin:\"anonymous\"},test:e=>checkDataUrl(e,validImageMIMEs)||checkExtension(e,validImageExtensions),async load(e,t,r){var n;let i=null;return i=globalThis.createImageBitmap&&this.config.preferCreateImageBitmap?this.config.preferWorkers&&await WorkerManager.isImageBitmapSupported()?await WorkerManager.loadImageBitmap(e):await loadImageBitmap(e):await new Promise((t=>{i=new Image,i.crossOrigin=this.config.crossOrigin,i.src=e,i.complete?t(i):i.onload=()=>{t(i)}})),createTexture(new ImageSource({resource:i,alphaMode:\"premultiply-alpha-on-upload\",resolution:(null==(n=t.data)?void 0:n.resolution)||getResolutionOfUrl(e),...t.data}),r,e)},unload(e){e.destroy(!0)}};init_globals(),init_Extensions(),init_VideoSource(),init_detectVideoAlphaMode();var validVideoExtensions=[\".mp4\",\".m4v\",\".webm\",\".ogg\",\".ogv\",\".h264\",\".avi\",\".mov\"],validVideoMIMEs=validVideoExtensions.map((e=>`video/${e.substring(1)}`));function crossOrigin(e,t,r){void 0!==r||t.startsWith(\"data:\")?!1!==r&&(e.crossOrigin=\"string\"==typeof r?r:\"anonymous\"):e.crossOrigin=determineCrossOrigin(t)}function preloadVideo(e){return new Promise(((t,r)=>{function n(){o(),t()}function i(e){o(),r(e)}function o(){e.removeEventListener(\"canplaythrough\",n),e.removeEventListener(\"error\",i)}e.addEventListener(\"canplaythrough\",n),e.addEventListener(\"error\",i),e.load()}))}function determineCrossOrigin(e,t=globalThis.location){if(e.startsWith(\"data:\"))return\"\";t=t||globalThis.location;const r=new URL(e,document.baseURI);return r.hostname!==t.hostname||r.port!==t.port||r.protocol!==t.protocol?\"anonymous\":\"\"}var loadVideoTextures={name:\"loadVideo\",extension:{type:ExtensionType.LoadParser},config:null,test(e){const t=checkDataUrl(e,validVideoMIMEs),r=checkExtension(e,validVideoExtensions);return t||r},async load(e,t,r){var n,i;const o={...VideoSource.defaultOptions,resolution:(null==(n=t.data)?void 0:n.resolution)||getResolutionOfUrl(e),alphaMode:(null==(i=t.data)?void 0:i.alphaMode)||await detectVideoAlphaMode(),...t.data},a=document.createElement(\"video\"),s={preload:!1!==o.autoLoad?\"auto\":void 0,\"webkit-playsinline\":!1!==o.playsinline?\"\":void 0,playsinline:!1!==o.playsinline?\"\":void 0,muted:!0===o.muted?\"\":void 0,loop:!0===o.loop?\"\":void 0,autoplay:!1!==o.autoPlay?\"\":void 0};Object.keys(s).forEach((e=>{const t=s[e];void 0!==t&&a.setAttribute(e,t)})),!0===o.muted&&(a.muted=!0),crossOrigin(a,e,o.crossorigin);const l=document.createElement(\"source\");let u;if(e.startsWith(\"data:\"))u=e.slice(5,e.indexOf(\";\"));else if(!e.startsWith(\"blob:\")){const t=e.split(\"?\")[0].slice(e.lastIndexOf(\".\")+1).toLowerCase();u=VideoSource.MIME_TYPES[t]||`video/${t}`}return l.src=e,u&&(l.type=u),new Promise((n=>{const i=async()=>{const s=new VideoSource({...o,resource:a});a.removeEventListener(\"canplay\",i),t.data.preload&&await preloadVideo(a),n(createTexture(s,r,e))};a.addEventListener(\"canplay\",i),a.appendChild(l)}))},unload(e){e.destroy(!0)}};init_globals(),init_Extensions(),init_Resolver(),init_globals(),init_Extensions(),init_Resolver();var resolveTextureUrl={extension:ExtensionType.ResolveParser,test:loadTextures.test,parse:e=>{var t,r;return{resolution:parseFloat(null!=(r=null==(t=Resolver.RETINA_PREFIX.exec(e))?void 0:t[1])?r:\"1\"),format:e.split(\".\").pop(),src:e}}},resolveJsonUrl={extension:ExtensionType.ResolveParser,test:e=>Resolver.RETINA_PREFIX.test(e)&&e.endsWith(\".json\"),parse:resolveTextureUrl.parse};init_Resolver(),init_convertToList(),init_isSingleItem();var AssetsClass=class{async init(e={}){var t,r,n;if(this._initialized)return void warn3(\"[Assets]AssetManager already initialized, did you load before calling this Assets.init()?\");if(this._initialized=!0,e.defaultSearchParams&&this.resolver.setDefaultSearchParams(e.defaultSearchParams),e.basePath&&(this.resolver.basePath=e.basePath),e.bundleIdentifier&&this.resolver.setBundleIdentifier(e.bundleIdentifier),e.manifest){let t=e.manifest;\"string\"==typeof t&&(t=await this.load(t)),this.resolver.addManifest(t)}const i=null!=(r=null==(t=e.texturePreference)?void 0:t.resolution)?r:1,o=\"number\"==typeof i?[i]:i,a=await this._detectFormats({preferredFormats:null==(n=e.texturePreference)?void 0:n.format,skipDetections:e.skipDetections,detections:this._detections});this.resolver.prefer({params:{format:a,resolution:o}}),e.preferences&&this.setPreferences(e.preferences)}add(e){this.resolver.add(e)}async load(e,t){this._initialized||await this.init();const r=isSingleItem(e),n=convertToList(e).map((e=>{if(\"string\"!=typeof e){const t=this.resolver.getAlias(e);return t.some((e=>!this.resolver.hasKey(e)))&&this.add(e),Array.isArray(t)?t[0]:t}return this.resolver.hasKey(e)||this.add({alias:e,src:e}),e})),i=this.resolver.resolve(n),o=await this._mapLoadToResolve(i,t);return r?o[n[0]]:o}addBundle(e,t){this.resolver.addBundle(e,t)}async loadBundle(e,t){this._initialized||await this.init();let r=!1;\"string\"==typeof e&&(r=!0,e=[e]);const n=this.resolver.resolveBundle(e),i={},o=Object.keys(n);let a=0,s=0;const l=()=>{null==t||t(++a/s)},u=o.map((e=>{const t=n[e];return s+=Object.keys(t).length,this._mapLoadToResolve(t,l).then((t=>{i[e]=t}))}));return await Promise.all(u),r?i[e[0]]:i}async backgroundLoad(e){this._initialized||await this.init(),\"string\"==typeof e&&(e=[e]);const t=this.resolver.resolve(e);this._backgroundLoader.add(Object.values(t))}async backgroundLoadBundle(e){this._initialized||await this.init(),\"string\"==typeof e&&(e=[e]);const t=this.resolver.resolveBundle(e);Object.values(t).forEach((e=>{this._backgroundLoader.add(Object.values(e))}))}reset(){this.resolver.reset(),this.loader.reset(),this.cache.reset(),this._initialized=!1}get(e){if(\"string\"==typeof e)return Cache.get(e);const t={};for(let r=0;r__left_angle_mark_e.length;r++)t[r]=Cache.get(e[r]);return t}async _mapLoadToResolve(e,t){const r=[...new Set(Object.values(e))];this._backgroundLoader.active=!1;const n=await this.loader.load(r,t);this._backgroundLoader.active=!0;const i={};return r.forEach((e=>{const t=n[e.src],r=[e.src];e.alias&&r.push(...e.alias),r.forEach((e=>{i[e]=t})),Cache.set(r,t)})),i}async unload(e){this._initialized||await this.init();const t=convertToList(e).map((e=>\"string\"!=typeof e?e.src:e)),r=this.resolver.resolve(t);await this._unloadFromResolved(r)}async unloadBundle(e){this._initialized||await this.init(),e=convertToList(e);const t=this.resolver.resolveBundle(e),r=Object.keys(t).map((e=>this._unloadFromResolved(t[e])));await Promise.all(r)}async _unloadFromResolved(e){const t=Object.values(e);t.forEach((e=>{Cache.remove(e.src)})),await this.loader.unload(t)}async _detectFormats(e){let t=[];e.preferredFormats&&(t=Array.isArray(e.preferredFormats)?e.preferredFormats:[e.preferredFormats]);for(const r of e.detections)e.skipDetections||await r.test()?t=await r.add(t):e.skipDetections||(t=await r.remove(t));return t=t.filter(((e,r)=>t.indexOf(e)===r)),t}get detections(){return this._detections}setPreferences(e){this.loader.parsers.forEach((t=>{t.config&&Object.keys(t.config).filter((t=>t in e)).forEach((r=>{t.config[r]=e[r]}))}))}constructor(){this._detections=[],this._initialized=!1,this.resolver=new Resolver,this.loader=new Loader,this.cache=Cache,this._backgroundLoader=new BackgroundLoader(this.loader),this._backgroundLoader.active=!0,this.reset()}},Assets=new AssetsClass;extensions.handleByList(ExtensionType.LoadParser,Assets.loader.parsers).handleByList(ExtensionType.ResolveParser,Assets.resolver.parsers).handleByList(ExtensionType.CacheParser,Assets.cache.parsers).handleByList(ExtensionType.DetectionParser,Assets.detections),extensions.add(cacheTextureArray,detectDefaults,detectAvif,detectWebp,detectMp4,detectOgv,detectWebm,loadJson,loadTxt,loadWebFont,loadSvg,loadTextures,loadVideoTextures,resolveTextureUrl,resolveJsonUrl);var assetKeyMap={loader:ExtensionType.LoadParser,resolver:ExtensionType.ResolveParser,cache:ExtensionType.CacheParser,detection:ExtensionType.DetectionParser};extensions.handle(ExtensionType.Asset,(e=>{const t=e.ref;Object.entries(assetKeyMap).filter((([e])=>!!t[e])).forEach((([e,r])=>{var n;return extensions.add(Object.assign(t[e],{extension:null!=(n=t[e].extension)?n:r}))}))}),(e=>{const t=e.ref;Object.keys(assetKeyMap).filter((e=>!!t[e])).forEach((e=>extensions.remove(t[e])))})),init_globals(),init_GlProgram(),init_GpuProgram(),init_UniformGroup(),init_Filter(),init_globals();var vertex2=\"in vec2 aPosition;\\nout vec2 vTextureCoord;\\n\\nuniform vec4 uInputSize;\\nuniform vec4 uOutputFrame;\\nuniform vec4 uOutputTexture;\\n\\nvec4 filterVertexPosition( void )\\n{\\n vec2 position = aPosition * uOutputFrame.zw + uOutputFrame.xy;\\n \\n position.x = position.x * (2.0 / uOutputTexture.x) - 1.0;\\n position.y = position.y * (2.0*uOutputTexture.z / uOutputTexture.y) - uOutputTexture.z;\\n\\n return vec4(position, 0.0, 1.0);\\n}\\n\\nvec2 filterTextureCoord( void )\\n{\\n return aPosition * (uOutputFrame.zw * uInputSize.zw);\\n}\\n\\nvoid main(void)\\n{\\n gl_Position = filterVertexPosition();\\n vTextureCoord = filterTextureCoord();\\n}\\n\";init_globals();var fragment2=\"\\nin vec2 vTextureCoord;\\n\\nout vec4 finalColor;\\n\\nuniform float uAlpha;\\nuniform sampler2D uTexture;\\n\\nvoid main()\\n{\\n finalColor = texture(uTexture, vTextureCoord) * uAlpha;\\n}\\n\";init_globals();var source2=\"struct GlobalFilterUniforms {\\n uInputSize:vec4__left_angle_mark_f32>,\\n uInputPixel:vec4__left_angle_mark_f32>,\\n uInputClamp:vec4__left_angle_mark_f32>,\\n uOutputFrame:vec4__left_angle_mark_f32>,\\n uGlobalFrame:vec4__left_angle_mark_f32>,\\n uOutputTexture:vec4__left_angle_mark_f32>,\\n};\\n\\nstruct AlphaUniforms {\\n uAlpha:f32,\\n};\\n\\n@group(0) @binding(0) var__left_angle_mark_uniform> gfu: GlobalFilterUniforms;\\n@group(0) @binding(1) var uTexture: texture_2d__left_angle_mark_f32>;\\n@group(0) @binding(2) var uSampler : sampler;\\n\\n@group(1) @binding(0) var__left_angle_mark_uniform> alphaUniforms : AlphaUniforms;\\n\\nstruct VSOutput {\\n @builtin(position) position: vec4__left_angle_mark_f32>,\\n @location(0) uv : vec2__left_angle_mark_f32>\\n };\\n\\nfn filterVertexPosition(aPosition:vec2__left_angle_mark_f32>) -> vec4__left_angle_mark_f32>\\n{\\n var position = aPosition * gfu.uOutputFrame.zw + gfu.uOutputFrame.xy;\\n\\n position.x = position.x * (2.0 / gfu.uOutputTexture.x) - 1.0;\\n position.y = position.y * (2.0*gfu.uOutputTexture.z / gfu.uOutputTexture.y) - gfu.uOutputTexture.z;\\n\\n return vec4(position, 0.0, 1.0);\\n}\\n\\nfn filterTextureCoord( aPosition:vec2__left_angle_mark_f32> ) -> vec2__left_angle_mark_f32>\\n{\\n return aPosition * (gfu.uOutputFrame.zw * gfu.uInputSize.zw);\\n}\\n\\nfn globalTextureCoord( aPosition:vec2__left_angle_mark_f32> ) -> vec2__left_angle_mark_f32>\\n{\\n return (aPosition.xy / gfu.uGlobalFrame.zw) + (gfu.uGlobalFrame.xy / gfu.uGlobalFrame.zw); \\n}\\n\\nfn getSize() -> vec2__left_angle_mark_f32>\\n{\\n return gfu.uGlobalFrame.zw;\\n}\\n \\n@vertex\\nfn mainVertex(\\n @location(0) aPosition : vec2__left_angle_mark_f32>, \\n) -> VSOutput {\\n return VSOutput(\\n filterVertexPosition(aPosition),\\n filterTextureCoord(aPosition)\\n );\\n}\\n\\n@fragment\\nfn mainFragment(\\n @location(0) uv: vec2__left_angle_mark_f32>,\\n @builtin(position) position: vec4__left_angle_mark_f32>\\n) -> @location(0) vec4__left_angle_mark_f32> {\\n \\n var sample = textureSample(uTexture, uSampler, uv);\\n \\n return sample * alphaUniforms.uAlpha;\\n}\",_AlphaFilter=class e extends Filter{get alpha(){return this.resources.alphaUniforms.uniforms.uAlpha}set alpha(e){this.resources.alphaUniforms.uniforms.uAlpha=e}constructor(t){t={...e.defaultOptions,...t};const r=GpuProgram.from({vertex:{source:source2,entryPoint:\"mainVertex\"},fragment:{source:source2,entryPoint:\"mainFragment\"}}),n=GlProgram.from({vertex:vertex2,fragment:fragment2,name:\"alpha-filter\"}),{alpha:i,...o}=t;super({...o,gpuProgram:r,glProgram:n,resources:{alphaUniforms:new UniformGroup({uAlpha:{value:i,type:\"f32\"}})}})}};_AlphaFilter.defaultOptions={alpha:1};var AlphaFilter=_AlphaFilter;init_globals(),init_TexturePool(),init_types(),init_Filter(),init_globals(),init_GlProgram(),init_globals(),init_globals();var GAUSSIAN_VALUES={5:[.153388,.221461,.250301],7:[.071303,.131514,.189879,.214607],9:[.028532,.067234,.124009,.179044,.20236],11:[.0093,.028002,.065984,.121703,.175713,.198596],13:[.002406,.009255,.027867,.065666,.121117,.174868,.197641],15:[489e-6,.002403,.009246,.02784,.065602,.120999,.174697,.197448]},fragTemplate=[\"in vec2 vBlurTexCoords[%size%];\",\"uniform sampler2D uTexture;\",\"out vec4 finalColor;\",\"void main(void)\",\"{\",\" finalColor = vec4(0.0);\",\" %blur%\",\"}\"].join(\"\\n\");function generateBlurFragSource(e){const t=GAUSSIAN_VALUES[e],r=t.length;let n,i=fragTemplate,o=\"\";for(let a=0;a__left_angle_mark_e;a++){let i=\"finalColor += texture(uTexture, vBlurTexCoords[%index%]) * %value%;\".replace(\"%index%\",a.toString());n=a,a>=r&&(n=e-a-1),i=i.replace(\"%value%\",t[n].toString()),o+=i,o+=\"\\n\"}return i=i.replace(\"%blur%\",o),i=i.replace(\"%size%\",e.toString()),i}init_globals();var vertTemplate=\"\\n in vec2 aPosition;\\n\\n uniform float uStrength;\\n\\n out vec2 vBlurTexCoords[%size%];\\n\\n uniform vec4 uInputSize;\\n uniform vec4 uOutputFrame;\\n uniform vec4 uOutputTexture;\\n\\n vec4 filterVertexPosition( void )\\n{\\n vec2 position = aPosition * uOutputFrame.zw + uOutputFrame.xy;\\n \\n position.x = position.x * (2.0 / uOutputTexture.x) - 1.0;\\n position.y = position.y * (2.0*uOutputTexture.z / uOutputTexture.y) - uOutputTexture.z;\\n\\n return vec4(position, 0.0, 1.0);\\n}\\n\\n vec2 filterTextureCoord( void )\\n {\\n return aPosition * (uOutputFrame.zw * uInputSize.zw);\\n }\\n\\n void main(void)\\n {\\n gl_Position = filterVertexPosition();\\n\\n float pixelStrength = uInputSize.%dimension% * uStrength;\\n\\n vec2 textureCoord = filterTextureCoord();\\n %blur%\\n }\";function generateBlurVertSource(e,t){const r=Math.ceil(e/2);let n,i=vertTemplate,o=\"\";n=t?\"vBlurTexCoords[%index%] = textureCoord + vec2(%sampleIndex% * pixelStrength, 0.0);\":\"vBlurTexCoords[%index%] = textureCoord + vec2(0.0, %sampleIndex% * pixelStrength);\";for(let a=0;a__left_angle_mark_e;a++){let e=n.replace(\"%index%\",a.toString());e=e.replace(\"%sampleIndex%\",a-(r-1)+\".0\"),o+=e,o+=\"\\n\"}return i=i.replace(\"%blur%\",o),i=i.replace(\"%size%\",e.toString()),i=i.replace(\"%dimension%\",t?\"z\":\"w\"),i}function generateBlurGlProgram(e,t){const r=generateBlurVertSource(t,e),n=generateBlurFragSource(t);return GlProgram.from({vertex:r,fragment:n,name:`blur-${e?\"horizontal\":\"vertical\"}-pass-filter`})}init_globals(),init_GpuProgram(),init_globals();var source3=\"\\n\\nstruct GlobalFilterUniforms {\\n uInputSize:vec4__left_angle_mark_f32>,\\n uInputPixel:vec4__left_angle_mark_f32>,\\n uInputClamp:vec4__left_angle_mark_f32>,\\n uOutputFrame:vec4__left_angle_mark_f32>,\\n uGlobalFrame:vec4__left_angle_mark_f32>,\\n uOutputTexture:vec4__left_angle_mark_f32>,\\n};\\n\\nstruct BlurUniforms {\\n uStrength:f32,\\n};\\n\\n@group(0) @binding(0) var__left_angle_mark_uniform> gfu: GlobalFilterUniforms;\\n@group(0) @binding(1) var uTexture: texture_2d__left_angle_mark_f32>;\\n@group(0) @binding(2) var uSampler : sampler;\\n\\n@group(1) @binding(0) var__left_angle_mark_uniform> blurUniforms : BlurUniforms;\\n\\n\\nstruct VSOutput {\\n @builtin(position) position: vec4__left_angle_mark_f32>,\\n %blur-struct%\\n };\\n\\nfn filterVertexPosition(aPosition:vec2__left_angle_mark_f32>) -> vec4__left_angle_mark_f32>\\n{\\n var position = aPosition * gfu.uOutputFrame.zw + gfu.uOutputFrame.xy;\\n\\n position.x = position.x * (2.0 / gfu.uOutputTexture.x) - 1.0;\\n position.y = position.y * (2.0*gfu.uOutputTexture.z / gfu.uOutputTexture.y) - gfu.uOutputTexture.z;\\n\\n return vec4(position, 0.0, 1.0);\\n}\\n\\nfn filterTextureCoord( aPosition:vec2__left_angle_mark_f32> ) -> vec2__left_angle_mark_f32>\\n{\\n return aPosition * (gfu.uOutputFrame.zw * gfu.uInputSize.zw);\\n}\\n\\nfn globalTextureCoord( aPosition:vec2__left_angle_mark_f32> ) -> vec2__left_angle_mark_f32>\\n{\\n return (aPosition.xy / gfu.uGlobalFrame.zw) + (gfu.uGlobalFrame.xy / gfu.uGlobalFrame.zw); \\n}\\n\\nfn getSize() -> vec2__left_angle_mark_f32>\\n{\\n return gfu.uGlobalFrame.zw;\\n}\\n\\n\\n@vertex\\nfn mainVertex(\\n @location(0) aPosition : vec2__left_angle_mark_f32>, \\n) -> VSOutput {\\n\\n let filteredCord = filterTextureCoord(aPosition);\\n\\n let strength = gfu.uInputSize.w * blurUniforms.uStrength;\\n\\n return VSOutput(\\n filterVertexPosition(aPosition),\\n %blur-vertex-out%\\n );\\n}\\n\\n@fragment\\nfn mainFragment(\\n @builtin(position) position: vec4__left_angle_mark_f32>,\\n %blur-fragment-in%\\n) -> @location(0) vec4__left_angle_mark_f32> {\\n\\n var finalColor = vec4(0.0);\\n\\n %blur-sampling%\\n\\n return finalColor;\\n}\";function generateBlurProgram(e,t){const r=GAUSSIAN_VALUES[t],n=r.length,i=[],o=[],a=[];for(let d=0;d__left_angle_mark_t;d++){i[d]=`@location(${d}) offset${d}: vec2__left_angle_mark_f32>,`,o[d]=e?`filteredCord + vec2(${d-n+1} * strength, 0.0),`:`filteredCord + vec2(0.0, ${d-n+1} * strength),`;const s=r[d__left_angle_mark_n?d:t-d-1].toString();a[d]=`finalColor += textureSample(uTexture, uSampler, offset${d}) * ${s};`}const s=i.join(\"\\n\"),l=o.join(\"\\n\"),u=a.join(\"\\n\"),c=source3.replace(\"%blur-struct%\",s).replace(\"%blur-vertex-out%\",l).replace(\"%blur-fragment-in%\",s).replace(\"%blur-sampling%\",u);return GpuProgram.from({vertex:{source:c,entryPoint:\"mainVertex\"},fragment:{source:c,entryPoint:\"mainFragment\"}})}var _BlurFilterPass=class e extends Filter{apply(e,t,r,n){if(this._uniforms.uStrength=this.strength/this.passes,1===this.passes)e.applyFilter(this,t,r,n);else{const i=TexturePool.getSameSizeTexture(t);let o=t,a=i;this._state.blend=!1;for(let t=0;t__left_angle_mark_this.passes-1;t++){e.applyFilter(this,o,a,e.renderer.type===RendererType.WEBGPU);const t=a;a=o,o=t}this._state.blend=!0,e.applyFilter(this,o,r,n),TexturePool.returnTexture(i)}}get blur(){return this.strength}set blur(e){this.padding=1+2*Math.abs(e),this.strength=e}get quality(){return this._quality}set quality(e){this._quality=e,this.passes=e}constructor(t){super({glProgram:generateBlurGlProgram((t={...e.defaultOptions,...t}).horizontal,t.kernelSize),gpuProgram:generateBlurProgram(t.horizontal,t.kernelSize),resources:{blurUniforms:{uStrength:{value:0,type:\"f32\"}}},...t}),this.horizontal=t.horizontal,this._quality=0,this.quality=t.quality,this.blur=t.strength,this._uniforms=this.resources.blurUniforms.uniforms}};_BlurFilterPass.defaultOptions={strength:8,quality:4,kernelSize:5};var BlurFilterPass=_BlurFilterPass;init_globals(),init_globals(),init_ObservablePoint(),init_deprecation(),init_Bounds(),init_Container();var AbstractText=class extends Container{get anchor(){return this._anchor}set anchor(e){\"number\"==typeof e?this._anchor.set(e):this._anchor.copyFrom(e)}get roundPixels(){return!!this._roundPixels}set roundPixels(e){this._roundPixels=e?1:0}set text(e){e=e.toString(),this._text!==e&&(this._text=e,this.onViewUpdate())}get text(){return this._text}get style(){return this._style}set style(e){var t;e=e||{},null==(t=this._style)||t.off(\"update\",this.onViewUpdate,this),e instanceof this._styleClass?this._style=e:this._style=new this._styleClass(e),this._style.on(\"update\",this.onViewUpdate,this),this.onViewUpdate()}get bounds(){return this._boundsDirty&&(this._updateBounds(),this._boundsDirty=!1),this._bounds}get width(){return Math.abs(this.scale.x)*this.bounds.width}set width(e){this._setWidth(e,this.bounds.width)}get height(){return Math.abs(this.scale.y)*this.bounds.height}set height(e){this._setHeight(e,this.bounds.height)}getSize(e){return e||(e={}),e.width=Math.abs(this.scale.x)*this.bounds.width,e.height=Math.abs(this.scale.y)*this.bounds.height,e}setSize(e,t){var r;let n,i;\"object\"!=typeof e?(n=e,i=null!=t?t:e):(n=e.width,i=null!=(r=e.height)?r:e.width),void 0!==n&&this._setWidth(n,this.bounds.width),void 0!==i&&this._setHeight(i,this.bounds.height)}addBounds(e){const t=this.bounds;e.addFrame(t.minX,t.minY,t.maxX,t.maxY)}containsPoint(e){const t=this.bounds.maxX,r=this.bounds.maxY,n=-t*this.anchor.x;let i=0;return e.x>=n&&e.x__left_angle_mark_=n+t&&(i=-r*this.anchor.y,e.y>=i&&e.y__left_angle_mark_=i+r)}onViewUpdate(){this._didChangeId+=4096,this._boundsDirty=!0,this.didViewUpdate||(this.didViewUpdate=!0,this._didTextUpdate=!0,this.renderGroup&&this.renderGroup.onChildViewUpdate(this))}_getKey(){return`${this.text}:${this._style.styleKey}`}destroy(e=!1){super.destroy(e),this.owner=null,this._bounds=null,this._anchor=null,(\"boolean\"==typeof e?e:null==e?void 0:e.style)&&this._style.destroy(e),this._style=null,this._text=null}constructor(e,t){const{text:r,resolution:n,style:i,anchor:o,width:a,height:s,roundPixels:l,...u}=e;super({...u}),this.batched=!0,this.resolution=null,this._didTextUpdate=!0,this._roundPixels=0,this._bounds=new Bounds,this._boundsDirty=!0,this._styleClass=t,this.text=null!=r?r:\"\",this.style=i,this.resolution=null!=n?n:null,this.allowChildren=!1,this._anchor=new ObservablePoint({_onUpdate:()=>{this.onViewUpdate()}}),o&&(this.anchor=o),this.roundPixels=null!=l&&l,a&&(this.width=a),s&&(this.height=s)}};function ensureOptions(e,t){var r;let n=null!=(r=e[0])?r:{};return(\"string\"==typeof n||e[1])&&(deprecation(v8_0_0,`use new ${t}({ text: \"hi!\", style }) instead`),n={text:n,style:e[1]}),n}init_CanvasTextMetrics(),init_TextStyle();var Text=class extends AbstractText{_updateBounds(){const e=this._bounds,t=this._style.padding,r=this._anchor,n=CanvasTextMetrics.measureText(this._text,this._style),{width:i,height:o}=n;e.minX=-r._x*i-t,e.maxX=e.minX+i,e.minY=-r._y*o-t,e.maxY=e.minY+o}constructor(...e){super(ensureOptions(e,\"Text\"),TextStyle),this.renderPipeId=\"text\"}};init_Color(),init_Filter(),init_const2(),init_ObservablePoint(),init_GlProgram(),init_GpuProgram(),init_ImageSource(),init_TextureSource(),init_Texture(),init_TexturePool(),init_textureFrom(),init_ViewSystem(),init_Container(),init_Graphics(),init_Sprite(),init_eventemitter3(),init_deprecation();var import_earcut2=__toESM(require_earcut(),1);extensions.add(browserExt,webworkerExt);var import_react99=__toESM(require_react());init_globals(),init_globals(),init_globals();var vertex3=\"in vec2 aPosition;\\nout vec2 vTextureCoord;\\n\\nuniform vec4 uInputSize;\\nuniform vec4 uOutputFrame;\\nuniform vec4 uOutputTexture;\\n\\nvec4 filterVertexPosition( void )\\n{\\n vec2 position = aPosition * uOutputFrame.zw + uOutputFrame.xy;\\n \\n position.x = position.x * (2.0 / uOutputTexture.x) - 1.0;\\n position.y = position.y * (2.0*uOutputTexture.z / uOutputTexture.y) - uOutputTexture.z;\\n\\n return vec4(position, 0.0, 1.0);\\n}\\n\\nvec2 filterTextureCoord( void )\\n{\\n return aPosition * (uOutputFrame.zw * uInputSize.zw);\\n}\\n\\nvoid main(void)\\n{\\n gl_Position = filterVertexPosition();\\n vTextureCoord = filterTextureCoord();\\n}\\n\";init_globals();var wgslVertex=\"struct GlobalFilterUniforms {\\n uInputSize:vec4__left_angle_mark_f32>,\\n uInputPixel:vec4__left_angle_mark_f32>,\\n uInputClamp:vec4__left_angle_mark_f32>,\\n uOutputFrame:vec4__left_angle_mark_f32>,\\n uGlobalFrame:vec4__left_angle_mark_f32>,\\n uOutputTexture:vec4__left_angle_mark_f32>,\\n};\\n\\n@group(0) @binding(0) var__left_angle_mark_uniform> gfu: GlobalFilterUniforms;\\n\\nstruct VSOutput {\\n @builtin(position) position: vec4__left_angle_mark_f32>,\\n @location(0) uv : vec2__left_angle_mark_f32>\\n };\\n\\nfn filterVertexPosition(aPosition:vec2__left_angle_mark_f32>) -> vec4__left_angle_mark_f32>\\n{\\n var position = aPosition * gfu.uOutputFrame.zw + gfu.uOutputFrame.xy;\\n\\n position.x = position.x * (2.0 / gfu.uOutputTexture.x) - 1.0;\\n position.y = position.y * (2.0*gfu.uOutputTexture.z / gfu.uOutputTexture.y) - gfu.uOutputTexture.z;\\n\\n return vec4(position, 0.0, 1.0);\\n}\\n\\nfn filterTextureCoord( aPosition:vec2__left_angle_mark_f32> ) -> vec2__left_angle_mark_f32>\\n{\\n return aPosition * (gfu.uOutputFrame.zw * gfu.uInputSize.zw);\\n}\\n\\nfn globalTextureCoord( aPosition:vec2__left_angle_mark_f32> ) -> vec2__left_angle_mark_f32>\\n{\\n return (aPosition.xy / gfu.uGlobalFrame.zw) + (gfu.uGlobalFrame.xy / gfu.uGlobalFrame.zw); \\n}\\n\\nfn getSize() -> vec2__left_angle_mark_f32>\\n{\\n return gfu.uGlobalFrame.zw;\\n}\\n \\n@vertex\\nfn mainVertex(\\n @location(0) aPosition : vec2__left_angle_mark_f32>, \\n) -> VSOutput {\\n return VSOutput(\\n filterVertexPosition(aPosition),\\n filterTextureCoord(aPosition)\\n );\\n}\";init_globals();var fragment3=\"in vec2 vTextureCoord;\\nout vec4 finalColor;\\n\\nuniform sampler2D uTexture;\\nuniform float uGamma;\\nuniform float uContrast;\\nuniform float uSaturation;\\nuniform float uBrightness;\\nuniform vec4 uColor;\\n\\nvoid main()\\n{\\n vec4 c = texture(uTexture, vTextureCoord);\\n\\n if (c.a > 0.0) {\\n c.rgb /= c.a;\\n\\n vec3 rgb = pow(c.rgb, vec3(1. / uGamma));\\n rgb = mix(vec3(.5), mix(vec3(dot(vec3(.2125, .7154, .0721), rgb)), rgb, uSaturation), uContrast);\\n rgb.r *= uColor.r;\\n rgb.g *= uColor.g;\\n rgb.b *= uColor.b;\\n c.rgb = rgb * uBrightness;\\n\\n c.rgb *= c.a;\\n }\\n\\n finalColor = c * uColor.a;\\n}\\n\";init_globals();var source4=\"struct AdjustmentUniforms {\\n uGamma: f32,\\n uContrast: f32,\\n uSaturation: f32,\\n uBrightness: f32,\\n uColor: vec4__left_angle_mark_f32>,\\n};\\n\\n@group(0) @binding(1) var uTexture: texture_2d__left_angle_mark_f32>; \\n@group(0) @binding(2) var uSampler: sampler;\\n@group(1) @binding(0) var__left_angle_mark_uniform> adjustmentUniforms : AdjustmentUniforms;\\n\\n@fragment\\nfn mainFragment(\\n @location(0) uv: vec2__left_angle_mark_f32>,\\n @builtin(position) position: vec4__left_angle_mark_f32>\\n) -> @location(0) vec4__left_angle_mark_f32> {\\n var sample = textureSample(uTexture, uSampler, uv);\\n let color = adjustmentUniforms.uColor;\\n\\n if (sample.a > 0.0) \\n {\\n sample = vec4__left_angle_mark_f32>(sample.rgb / sample.a, sample.a);\\n var rgb: vec3__left_angle_mark_f32> = pow(sample.rgb, vec3__left_angle_mark_f32>(1. / adjustmentUniforms.uGamma));\\n rgb = mix(vec3__left_angle_mark_f32>(.5), mix(vec3__left_angle_mark_f32>(dot(vec3__left_angle_mark_f32>(.2125, .7154, .0721), rgb)), rgb, adjustmentUniforms.uSaturation), adjustmentUniforms.uContrast);\\n rgb.r *= color.r;\\n rgb.g *= color.g;\\n rgb.b *= color.b;\\n sample = vec4__left_angle_mark_f32>(rgb.rgb * adjustmentUniforms.uBrightness, sample.a);\\n sample = vec4__left_angle_mark_f32>(sample.rgb * sample.a, sample.a);\\n }\\n\\n return sample * color.a;\\n}\",__defProp2=Object.defineProperty,__defNormalProp=(e,t,r)=>t in e?__defProp2(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,__publicField=(e,t,r)=>(__defNormalProp(e,\"symbol\"!=typeof t?t+\"\":t,r),r),_AdjustmentFilter=class e extends Filter{get gamma(){return this.uniforms.uGamma}set gamma(e){this.uniforms.uGamma=e}get contrast(){return this.uniforms.uContrast}set contrast(e){this.uniforms.uContrast=e}get saturation(){return this.uniforms.uSaturation}set saturation(e){this.uniforms.uSaturation=e}get brightness(){return this.uniforms.uBrightness}set brightness(e){this.uniforms.uBrightness=e}get red(){return this.uniforms.uColor[0]}set red(e){this.uniforms.uColor[0]=e}get green(){return this.uniforms.uColor[1]}set green(e){this.uniforms.uColor[1]=e}get blue(){return this.uniforms.uColor[2]}set blue(e){this.uniforms.uColor[2]=e}get alpha(){return this.uniforms.uColor[3]}set alpha(e){this.uniforms.uColor[3]=e}constructor(t){t={...e.DEFAULT_OPTIONS,...t},super({gpuProgram:GpuProgram.from({vertex:{source:wgslVertex,entryPoint:\"mainVertex\"},fragment:{source:source4,entryPoint:\"mainFragment\"}}),glProgram:GlProgram.from({vertex:vertex3,fragment:fragment3,name:\"adjustment-filter\"}),resources:{adjustmentUniforms:{uGamma:{value:t.gamma,type:\"f32\"},uContrast:{value:t.contrast,type:\"f32\"},uSaturation:{value:t.saturation,type:\"f32\"},uBrightness:{value:t.brightness,type:\"f32\"},uColor:{value:[t.red,t.green,t.blue,t.alpha],type:\"vec4__left_angle_mark_f32>\"}}}}),__publicField(this,\"uniforms\"),this.uniforms=this.resources.adjustmentUniforms.uniforms}};__publicField(_AdjustmentFilter,\"DEFAULT_OPTIONS\",{gamma:1,contrast:1,saturation:1,brightness:1,red:1,green:1,blue:1,alpha:1}),init_globals(),init_globals(),init_globals();var fragment4=\"\\nin vec2 vTextureCoord;\\nout vec4 finalColor;\\n\\nuniform sampler2D uTexture;\\nuniform vec2 uOffset;\\n\\nvoid main(void)\\n{\\n vec4 color = vec4(0.0);\\n\\n // Sample top left pixel\\n color += texture(uTexture, vec2(vTextureCoord.x - uOffset.x, vTextureCoord.y + uOffset.y));\\n\\n // Sample top right pixel\\n color += texture(uTexture, vec2(vTextureCoord.x + uOffset.x, vTextureCoord.y + uOffset.y));\\n\\n // Sample bottom right pixel\\n color += texture(uTexture, vec2(vTextureCoord.x + uOffset.x, vTextureCoord.y - uOffset.y));\\n\\n // Sample bottom left pixel\\n color += texture(uTexture, vec2(vTextureCoord.x - uOffset.x, vTextureCoord.y - uOffset.y));\\n\\n // Average\\n color *= 0.25;\\n\\n finalColor = color;\\n}\";init_globals();var source5=\"struct KawaseBlurUniforms {\\n uOffset:vec2__left_angle_mark_f32>,\\n};\\n\\n@group(0) @binding(1) var uTexture: texture_2d__left_angle_mark_f32>; \\n@group(0) @binding(2) var uSampler: sampler;\\n@group(1) @binding(0) var__left_angle_mark_uniform> kawaseBlurUniforms : KawaseBlurUniforms;\\n\\n@fragment\\nfn mainFragment(\\n @builtin(position) position: vec4__left_angle_mark_f32>,\\n @location(0) uv : vec2__left_angle_mark_f32>\\n) -> @location(0) vec4__left_angle_mark_f32> {\\n let uOffset = kawaseBlurUniforms.uOffset;\\n var color: vec4__left_angle_mark_f32> = vec4__left_angle_mark_f32>(0.0);\\n\\n // Sample top left pixel\\n color += textureSample(uTexture, uSampler, vec2__left_angle_mark_f32>(uv.x - uOffset.x, uv.y + uOffset.y));\\n // Sample top right pixel\\n color += textureSample(uTexture, uSampler, vec2__left_angle_mark_f32>(uv.x + uOffset.x, uv.y + uOffset.y));\\n // Sample bottom right pixel\\n color += textureSample(uTexture, uSampler, vec2__left_angle_mark_f32>(uv.x + uOffset.x, uv.y - uOffset.y));\\n // Sample bottom left pixel\\n color += textureSample(uTexture, uSampler, vec2__left_angle_mark_f32>(uv.x - uOffset.x, uv.y - uOffset.y));\\n // Average\\n color *= 0.25;\\n\\n return color;\\n}\";init_globals();var fragmentClamp=\"\\nprecision highp float;\\nin vec2 vTextureCoord;\\nout vec4 finalColor;\\n\\nuniform sampler2D uTexture;\\nuniform vec2 uOffset;\\n\\nuniform vec4 uInputClamp;\\n\\nvoid main(void)\\n{\\n vec4 color = vec4(0.0);\\n\\n // Sample top left pixel\\n color += texture(uTexture, clamp(vec2(vTextureCoord.x - uOffset.x, vTextureCoord.y + uOffset.y), uInputClamp.xy, uInputClamp.zw));\\n\\n // Sample top right pixel\\n color += texture(uTexture, clamp(vec2(vTextureCoord.x + uOffset.x, vTextureCoord.y + uOffset.y), uInputClamp.xy, uInputClamp.zw));\\n\\n // Sample bottom right pixel\\n color += texture(uTexture, clamp(vec2(vTextureCoord.x + uOffset.x, vTextureCoord.y - uOffset.y), uInputClamp.xy, uInputClamp.zw));\\n\\n // Sample bottom left pixel\\n color += texture(uTexture, clamp(vec2(vTextureCoord.x - uOffset.x, vTextureCoord.y - uOffset.y), uInputClamp.xy, uInputClamp.zw));\\n\\n // Average\\n color *= 0.25;\\n\\n finalColor = color;\\n}\\n\";init_globals();var sourceClamp=\"struct KawaseBlurUniforms {\\n uOffset:vec2__left_angle_mark_f32>,\\n};\\n\\nstruct GlobalFilterUniforms {\\n uInputSize:vec4__left_angle_mark_f32>,\\n uInputPixel:vec4__left_angle_mark_f32>,\\n uInputClamp:vec4__left_angle_mark_f32>,\\n uOutputFrame:vec4__left_angle_mark_f32>,\\n uGlobalFrame:vec4__left_angle_mark_f32>,\\n uOutputTexture:vec4__left_angle_mark_f32>,\\n};\\n\\n@group(0) @binding(0) var__left_angle_mark_uniform> gfu: GlobalFilterUniforms;\\n\\n@group(0) @binding(1) var uTexture: texture_2d__left_angle_mark_f32>; \\n@group(0) @binding(2) var uSampler: sampler;\\n@group(1) @binding(0) var__left_angle_mark_uniform> kawaseBlurUniforms : KawaseBlurUniforms;\\n\\n@fragment\\nfn mainFragment(\\n @builtin(position) position: vec4__left_angle_mark_f32>,\\n @location(0) uv : vec2__left_angle_mark_f32>\\n) -> @location(0) vec4__left_angle_mark_f32> {\\n let uOffset = kawaseBlurUniforms.uOffset;\\n var color: vec4__left_angle_mark_f32> = vec4(0.0);\\n\\n // Sample top left pixel\\n color += textureSample(uTexture, uSampler, clamp(vec2__left_angle_mark_f32>(uv.x - uOffset.x, uv.y + uOffset.y), gfu.uInputClamp.xy, gfu.uInputClamp.zw));\\n // Sample top right pixel\\n color += textureSample(uTexture, uSampler, clamp(vec2__left_angle_mark_f32>(uv.x + uOffset.x, uv.y + uOffset.y), gfu.uInputClamp.xy, gfu.uInputClamp.zw));\\n // Sample bottom right pixel\\n color += textureSample(uTexture, uSampler, clamp(vec2__left_angle_mark_f32>(uv.x + uOffset.x, uv.y - uOffset.y), gfu.uInputClamp.xy, gfu.uInputClamp.zw));\\n // Sample bottom left pixel\\n color += textureSample(uTexture, uSampler, clamp(vec2__left_angle_mark_f32>(uv.x - uOffset.x, uv.y - uOffset.y), gfu.uInputClamp.xy, gfu.uInputClamp.zw));\\n // Average\\n color *= 0.25;\\n \\n return color;\\n}\",__defProp3=Object.defineProperty,__defNormalProp2=(e,t,r)=>t in e?__defProp3(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,__publicField2=(e,t,r)=>(__defNormalProp2(e,\"symbol\"!=typeof t?t+\"\":t,r),r),_KawaseBlurFilter=class e extends Filter{apply(e,t,r,n){const i=this.pixelSizeX/t.source.width,o=this.pixelSizeY/t.source.height;let a;if(1===this._quality||0===this._blur)a=this._kernels[0]+.5,this.uniforms.uOffset[0]=a*i,this.uniforms.uOffset[1]=a*o,e.applyFilter(this,t,r,n);else{const s=TexturePool.getSameSizeTexture(t);let l,u=t,c=s;const d=this._quality-1;for(let t=0;t__left_angle_mark_d;t++)a=this._kernels[t]+.5,this.uniforms.uOffset[0]=a*i,this.uniforms.uOffset[1]=a*o,e.applyFilter(this,u,c,!0),l=u,u=c,c=l;a=this._kernels[d]+.5,this.uniforms.uOffset[0]=a*i,this.uniforms.uOffset[1]=a*o,e.applyFilter(this,u,r,n),TexturePool.returnTexture(s)}}get strength(){return this._blur}set strength(e){this._blur=e,this._generateKernels()}get quality(){return this._quality}set quality(e){this._quality=Math.max(1,Math.round(e)),this._generateKernels()}get kernels(){return this._kernels}set kernels(e){Array.isArray(e)&&e.length>0?(this._kernels=e,this._quality=e.length,this._blur=Math.max(...e)):(this._kernels=[0],this._quality=1)}get pixelSize(){return this._pixelSize}set pixelSize(e){if(\"number\"!=typeof e)return Array.isArray(e)?(this.pixelSizeX=e[0],void(this.pixelSizeY=e[1])):void(this._pixelSize=e);this.pixelSizeX=this.pixelSizeY=e}get pixelSizeX(){return this.pixelSize.x}set pixelSizeX(e){this.pixelSize.x=e}get pixelSizeY(){return this.pixelSize.y}set pixelSizeY(e){this.pixelSize.y=e}get clamp(){return this._clamp}_updatePadding(){this.padding=Math.ceil(this._kernels.reduce(((e,t)=>e+t+.5),0))}_generateKernels(){const e=this._blur,t=this._quality,r=[e];if(e>0){let n=e;const i=e/t;for(let e=1;e__left_angle_mark_t;e++)n-=i,r.push(n)}this._kernels=r,this._updatePadding()}constructor(...t){var r,n,i;let o=null!=(r=t[0])?r:{};(\"number\"==typeof o||Array.isArray(o))&&(deprecation(\"6.0.0\",\"KawaseBlurFilter constructor params are now options object. See params: { strength, quality, clamp, pixelSize }\"),o={strength:o},void 0!==t[1]&&(o.quality=t[1]),void 0!==t[2]&&(o.clamp=t[2])),o={...e.DEFAULT_OPTIONS,...o},super({gpuProgram:GpuProgram.from({vertex:{source:wgslVertex,entryPoint:\"mainVertex\"},fragment:{source:(null==o?void 0:o.clamp)?sourceClamp:source5,entryPoint:\"mainFragment\"}}),glProgram:GlProgram.from({vertex:vertex3,fragment:(null==o?void 0:o.clamp)?fragmentClamp:fragment4,name:\"kawase-blur-filter\"}),resources:{kawaseBlurUniforms:{uOffset:{value:new Float32Array(2),type:\"vec2__left_angle_mark_f32>\"}}}}),__publicField2(this,\"uniforms\"),__publicField2(this,\"_pixelSize\",{x:0,y:0}),__publicField2(this,\"_clamp\"),__publicField2(this,\"_kernels\",[]),__publicField2(this,\"_blur\"),__publicField2(this,\"_quality\"),this.uniforms=this.resources.kawaseBlurUniforms.uniforms,this.pixelSize=null!=(n=o.pixelSize)?n:{x:1,y:1},Array.isArray(o.strength)?this.kernels=o.strength:\"number\"==typeof o.strength&&(this._blur=o.strength,this.quality=null!=(i=o.quality)?i:3),this._clamp=!!o.clamp}};__publicField2(_KawaseBlurFilter,\"DEFAULT_OPTIONS\",{strength:4,quality:3,clamp:!1,pixelSize:{x:1,y:1}});var KawaseBlurFilter=_KawaseBlurFilter;init_globals();var fragment5=\"in vec2 vTextureCoord;\\nout vec4 finalColor;\\n\\nuniform sampler2D uTexture;\\nuniform sampler2D uMapTexture;\\nuniform float uBloomScale;\\nuniform float uBrightness;\\n\\nvoid main() {\\n vec4 color = texture(uTexture, vTextureCoord);\\n color.rgb *= uBrightness;\\n vec4 bloomColor = vec4(texture(uMapTexture, vTextureCoord).rgb, 0.0);\\n bloomColor.rgb *= uBloomScale;\\n finalColor = color + bloomColor;\\n}\\n\";init_globals();var source6=\"struct AdvancedBloomUniforms {\\n uBloomScale: f32,\\n uBrightness: f32,\\n};\\n\\n@group(0) @binding(1) var uTexture: texture_2d__left_angle_mark_f32>; \\n@group(0) @binding(2) var uSampler: sampler;\\n@group(1) @binding(0) var__left_angle_mark_uniform> advancedBloomUniforms : AdvancedBloomUniforms;\\n@group(1) @binding(1) var uMapTexture: texture_2d__left_angle_mark_f32>;\\n\\n@fragment\\nfn mainFragment(\\n @builtin(position) position: vec4__left_angle_mark_f32>,\\n @location(0) uv : vec2__left_angle_mark_f32>\\n) -> @location(0) vec4__left_angle_mark_f32> {\\n var color = textureSample(uTexture, uSampler, uv);\\n color = vec4__left_angle_mark_f32>(color.rgb * advancedBloomUniforms.uBrightness, color.a);\\n\\n var bloomColor = vec4__left_angle_mark_f32>(textureSample(uMapTexture, uSampler, uv).rgb, 0.0);\\n bloomColor = vec4__left_angle_mark_f32>(bloomColor.rgb * advancedBloomUniforms.uBloomScale, bloomColor.a);\\n \\n return color + bloomColor;\\n}\\n\";init_globals(),init_globals();var fragment6=\"\\nin vec2 vTextureCoord;\\nout vec4 finalColor;\\n\\nuniform sampler2D uTexture;\\nuniform float uThreshold;\\n\\nvoid main() {\\n vec4 color = texture(uTexture, vTextureCoord);\\n\\n // A simple & fast algorithm for getting brightness.\\n // It's inaccuracy , but good enought for this feature.\\n float _max = max(max(color.r, color.g), color.b);\\n float _min = min(min(color.r, color.g), color.b);\\n float brightness = (_max + _min) * 0.5;\\n\\n if(brightness > uThreshold) {\\n finalColor = color;\\n } else {\\n finalColor = vec4(0.0, 0.0, 0.0, 0.0);\\n }\\n}\\n\";init_globals();var source7=\"struct ExtractBrightnessUniforms {\\n uThreshold: f32,\\n};\\n\\n@group(0) @binding(1) var uTexture: texture_2d__left_angle_mark_f32>; \\n@group(0) @binding(2) var uSampler: sampler;\\n@group(1) @binding(0) var__left_angle_mark_uniform> extractBrightnessUniforms : ExtractBrightnessUniforms;\\n\\n@fragment\\nfn mainFragment(\\n @builtin(position) position: vec4__left_angle_mark_f32>,\\n @location(0) uv : vec2__left_angle_mark_f32>\\n) -> @location(0) vec4__left_angle_mark_f32> {\\n let color: vec4__left_angle_mark_f32> = textureSample(uTexture, uSampler, uv);\\n\\n // A simple & fast algorithm for getting brightness.\\n // It's inaccurate, but good enough for this feature.\\n let max: f32 = max(max(color.r, color.g), color.b);\\n let min: f32 = min(min(color.r, color.g), color.b);\\n let brightness: f32 = (max + min) * 0.5;\\n\\n return select(vec4__left_angle_mark_f32>(0.), color, brightness > extractBrightnessUniforms.uThreshold);\\n}\\n\",__defProp4=Object.defineProperty,__defNormalProp3=(e,t,r)=>t in e?__defProp4(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,__publicField3=(e,t,r)=>(__defNormalProp3(e,\"symbol\"!=typeof t?t+\"\":t,r),r),_ExtractBrightnessFilter=class e extends Filter{get threshold(){return this.uniforms.uThreshold}set threshold(e){this.uniforms.uThreshold=e}constructor(t){t={...e.DEFAULT_OPTIONS,...t},super({gpuProgram:GpuProgram.from({vertex:{source:wgslVertex,entryPoint:\"mainVertex\"},fragment:{source:source7,entryPoint:\"mainFragment\"}}),glProgram:GlProgram.from({vertex:vertex3,fragment:fragment6,name:\"extract-brightness-filter\"}),resources:{extractBrightnessUniforms:{uThreshold:{value:t.threshold,type:\"f32\"}}}}),__publicField3(this,\"uniforms\"),this.uniforms=this.resources.extractBrightnessUniforms.uniforms}};__publicField3(_ExtractBrightnessFilter,\"DEFAULT_OPTIONS\",{threshold:.5});var ExtractBrightnessFilter=_ExtractBrightnessFilter,__defProp5=Object.defineProperty,__defNormalProp4=(e,t,r)=>t in e?__defProp5(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,__publicField4=(e,t,r)=>(__defNormalProp4(e,\"symbol\"!=typeof t?t+\"\":t,r),r),_AdvancedBloomFilter=class e extends Filter{apply(e,t,r,n){const i=TexturePool.getSameSizeTexture(t);this._extractFilter.apply(e,t,i,!0);const o=TexturePool.getSameSizeTexture(t);this._blurFilter.apply(e,i,o,!0),this.uniforms.uBloomScale=this.bloomScale,this.uniforms.uBrightness=this.brightness,this.resources.uMapTexture=o.source,e.applyFilter(this,t,r,n),TexturePool.returnTexture(o),TexturePool.returnTexture(i)}get threshold(){return this._extractFilter.threshold}set threshold(e){this._extractFilter.threshold=e}get kernels(){return this._blurFilter.kernels}set kernels(e){this._blurFilter.kernels=e}get blur(){return this._blurFilter.strength}set blur(e){this._blurFilter.strength=e}get quality(){return this._blurFilter.quality}set quality(e){this._blurFilter.quality=e}get pixelSize(){return this._blurFilter.pixelSize}set pixelSize(e){\"number\"==typeof e&&(e={x:e,y:e}),Array.isArray(e)&&(e={x:e[0],y:e[1]}),this._blurFilter.pixelSize=e}get pixelSizeX(){return this._blurFilter.pixelSizeX}set pixelSizeX(e){this._blurFilter.pixelSizeX=e}get pixelSizeY(){return this._blurFilter.pixelSizeY}set pixelSizeY(e){this._blurFilter.pixelSizeY=e}constructor(t){var r;t={...e.DEFAULT_OPTIONS,...t},super({gpuProgram:GpuProgram.from({vertex:{source:wgslVertex,entryPoint:\"mainVertex\"},fragment:{source:source6,entryPoint:\"mainFragment\"}}),glProgram:GlProgram.from({vertex:vertex3,fragment:fragment5,name:\"advanced-bloom-filter\"}),resources:{advancedBloomUniforms:{uBloomScale:{value:t.bloomScale,type:\"f32\"},uBrightness:{value:t.brightness,type:\"f32\"}},uMapTexture:Texture.WHITE}}),__publicField4(this,\"uniforms\"),__publicField4(this,\"bloomScale\",1),__publicField4(this,\"brightness\",1),__publicField4(this,\"_extractFilter\"),__publicField4(this,\"_blurFilter\"),this.uniforms=this.resources.advancedBloomUniforms.uniforms,this._extractFilter=new ExtractBrightnessFilter({threshold:t.threshold}),this._blurFilter=new KawaseBlurFilter({strength:null!=(r=t.kernels)?r:t.blur,quality:t.kernels?void 0:t.quality}),Object.assign(this,t)}};__publicField4(_AdvancedBloomFilter,\"DEFAULT_OPTIONS\",{threshold:.5,bloomScale:1,brightness:1,blur:8,quality:4,pixelSize:{x:1,y:1}}),init_globals(),init_globals();var fragment7=\"precision highp float;\\nin vec2 vTextureCoord;\\nout vec4 finalColor;\\n\\nuniform sampler2D uTexture;\\nuniform float uSize;\\nuniform vec3 uColor;\\nuniform float uReplaceColor;\\n\\nuniform vec4 uInputSize;\\n\\nvec2 mapCoord( vec2 coord )\\n{\\n coord *= uInputSize.xy;\\n coord += uInputSize.zw;\\n\\n return coord;\\n}\\n\\nvec2 unmapCoord( vec2 coord )\\n{\\n coord -= uInputSize.zw;\\n coord /= uInputSize.xy;\\n\\n return coord;\\n}\\n\\nvec2 pixelate(vec2 coord, vec2 size)\\n{\\n return floor(coord / size) * size;\\n}\\n\\nvec2 getMod(vec2 coord, vec2 size)\\n{\\n return mod(coord, size) / size;\\n}\\n\\nfloat character(float n, vec2 p)\\n{\\n p = floor(p*vec2(4.0, 4.0) + 2.5);\\n\\n if (clamp(p.x, 0.0, 4.0) == p.x)\\n {\\n if (clamp(p.y, 0.0, 4.0) == p.y)\\n {\\n if (int(mod(n/exp2(p.x + 5.0*p.y), 2.0)) == 1) return 1.0;\\n }\\n }\\n return 0.0;\\n}\\n\\nvoid main()\\n{\\n vec2 coord = mapCoord(vTextureCoord);\\n\\n // get the grid position\\n vec2 pixCoord = pixelate(coord, vec2(uSize));\\n pixCoord = unmapCoord(pixCoord);\\n\\n // sample the color at grid position\\n vec4 color = texture(uTexture, pixCoord);\\n\\n // brightness of the color as it's perceived by the human eye\\n float gray = 0.3 * color.r + 0.59 * color.g + 0.11 * color.b;\\n\\n // determine the character to use\\n float n = 65536.0; // .\\n if (gray > 0.2) n = 65600.0; // :\\n if (gray > 0.3) n = 332772.0; // *\\n if (gray > 0.4) n = 15255086.0; // o\\n if (gray > 0.5) n = 23385164.0; // &\\n if (gray > 0.6) n = 15252014.0; // 8\\n if (gray > 0.7) n = 13199452.0; // @\\n if (gray > 0.8) n = 11512810.0; // #\\n\\n // get the mod..\\n vec2 modd = getMod(coord, vec2(uSize));\\n\\n finalColor = (uReplaceColor > 0.5 ? vec4(uColor, 1.) : color) * character( n, vec2(-1.0) + modd * 2.0);\\n}\\n\";init_globals();var source8=\"struct AsciiUniforms {\\n uSize: f32,\\n uColor: vec3__left_angle_mark_f32>,\\n uReplaceColor: f32,\\n};\\n\\nstruct GlobalFilterUniforms {\\n uInputSize:vec4__left_angle_mark_f32>,\\n uInputPixel:vec4__left_angle_mark_f32>,\\n uInputClamp:vec4__left_angle_mark_f32>,\\n uOutputFrame:vec4__left_angle_mark_f32>,\\n uGlobalFrame:vec4__left_angle_mark_f32>,\\n uOutputTexture:vec4__left_angle_mark_f32>,\\n};\\n\\n@group(0) @binding(0) var__left_angle_mark_uniform> gfu: GlobalFilterUniforms;\\n\\n@group(0) @binding(1) var uTexture: texture_2d__left_angle_mark_f32>; \\n@group(0) @binding(2) var uSampler: sampler;\\n@group(1) @binding(0) var__left_angle_mark_uniform> asciiUniforms : AsciiUniforms;\\n\\n@fragment\\nfn mainFragment(\\n @location(0) uv: vec2__left_angle_mark_f32>,\\n @builtin(position) position: vec4__left_angle_mark_f32>\\n) -> @location(0) vec4__left_angle_mark_f32> {\\n let pixelSize: f32 = asciiUniforms.uSize;\\n let coord: vec2__left_angle_mark_f32> = mapCoord(uv);\\n\\n // get the rounded color..\\n var pixCoord: vec2__left_angle_mark_f32> = pixelate(coord, vec2__left_angle_mark_f32>(pixelSize));\\n pixCoord = unmapCoord(pixCoord);\\n\\n var color = textureSample(uTexture, uSampler, pixCoord);\\n\\n // determine the character to use\\n let gray: f32 = 0.3 * color.r + 0.59 * color.g + 0.11 * color.b;\\n \\n var n: f32 = 65536.0; // .\\n if (gray > 0.2) {\\n n = 65600.0; // :\\n }\\n if (gray > 0.3) {\\n n = 332772.0; // *\\n }\\n if (gray > 0.4) {\\n n = 15255086.0; // o\\n }\\n if (gray > 0.5) {\\n n = 23385164.0; // &\\n }\\n if (gray > 0.6) {\\n n = 15252014.0; // 8\\n }\\n if (gray > 0.7) {\\n n = 13199452.0; // @\\n }\\n if (gray > 0.8) {\\n n = 11512810.0; // #\\n }\\n\\n // get the mod..\\n let modd: vec2__left_angle_mark_f32> = getMod(coord, vec2__left_angle_mark_f32>(pixelSize));\\n return select(color, vec4__left_angle_mark_f32>(asciiUniforms.uColor, 1.), asciiUniforms.uReplaceColor > 0.5) * character(n, vec2__left_angle_mark_f32>(-1.0) + modd * 2.0);\\n}\\n\\nfn pixelate(coord: vec2__left_angle_mark_f32>, size: vec2__left_angle_mark_f32>) -> vec2__left_angle_mark_f32>\\n{\\n return floor( coord / size ) * size;\\n}\\n\\nfn getMod(coord: vec2__left_angle_mark_f32>, size: vec2__left_angle_mark_f32>) -> vec2__left_angle_mark_f32>\\n{\\n return moduloVec2( coord , size) / size;\\n}\\n\\nfn character(n: f32, p: vec2__left_angle_mark_f32>) -> f32\\n{\\n var q: vec2__left_angle_mark_f32> = floor(p*vec2__left_angle_mark_f32>(4.0, 4.0) + 2.5);\\n\\n if (clamp(q.x, 0.0, 4.0) == q.x)\\n {\\n if (clamp(q.y, 0.0, 4.0) == q.y)\\n {\\n if (i32(modulo(n/exp2(q.x + 5.0*q.y), 2.0)) == 1)\\n {\\n return 1.0;\\n }\\n }\\n }\\n\\n return 0.0;\\n}\\n\\nfn modulo(x: f32, y: f32) -> f32\\n{\\n return x - y * floor(x/y);\\n}\\n\\nfn moduloVec2(x: vec2__left_angle_mark_f32>, y: vec2__left_angle_mark_f32>) -> vec2__left_angle_mark_f32>\\n{\\n return x - y * floor(x/y);\\n}\\n\\nfn mapCoord(coord: vec2__left_angle_mark_f32> ) -> vec2__left_angle_mark_f32>\\n{\\n var mappedCoord: vec2__left_angle_mark_f32> = coord;\\n mappedCoord *= gfu.uInputSize.xy;\\n mappedCoord += gfu.uOutputFrame.xy;\\n return mappedCoord;\\n}\\n\\nfn unmapCoord(coord: vec2__left_angle_mark_f32> ) -> vec2__left_angle_mark_f32>\\n{\\n var mappedCoord: vec2__left_angle_mark_f32> = coord;\\n mappedCoord -= gfu.uOutputFrame.xy;\\n mappedCoord /= gfu.uInputSize.xy;\\n return mappedCoord;\\n}\",__defProp6=Object.defineProperty,__defNormalProp5=(e,t,r)=>t in e?__defProp6(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,__publicField5=(e,t,r)=>(__defNormalProp5(e,\"symbol\"!=typeof t?t+\"\":t,r),r),_AsciiFilter=class e extends Filter{get size(){return this.uniforms.uSize}set size(e){this.uniforms.uSize=e}get color(){return this._color.value}set color(e){this._color.setValue(e);const[t,r,n]=this._color.toArray();this.uniforms.uColor[0]=t,this.uniforms.uColor[1]=r,this.uniforms.uColor[2]=n}get replaceColor(){return this.uniforms.uReplaceColor>.5}set replaceColor(e){this.uniforms.uReplaceColor=e?1:0}constructor(...t){var r,n;let i=null!=(r=t[0])?r:{};\"number\"==typeof i&&(deprecation(\"6.0.0\",\"AsciiFilter constructor params are now options object. See params: { size, color, replaceColor }\"),i={size:i});const o=(null==i?void 0:i.color)&&!1!==i.replaceColor;i={...e.DEFAULT_OPTIONS,...i},super({gpuProgram:GpuProgram.from({vertex:{source:wgslVertex,entryPoint:\"mainVertex\"},fragment:{source:source8,entryPoint:\"mainFragment\"}}),glProgram:GlProgram.from({vertex:vertex3,fragment:fragment7,name:\"ascii-filter\"}),resources:{asciiUniforms:{uSize:{value:i.size,type:\"f32\"},uColor:{value:new Float32Array(3),type:\"vec3__left_angle_mark_f32>\"},uReplaceColor:{value:Number(o),type:\"f32\"}}}}),__publicField5(this,\"uniforms\"),__publicField5(this,\"_color\"),this.uniforms=this.resources.asciiUniforms.uniforms,this._color=new Color2,this.color=null!=(n=i.color)?n:16777215}};__publicField5(_AsciiFilter,\"DEFAULT_OPTIONS\",{size:8,color:16777215,replaceColor:!1}),init_globals(),init_globals(),init_globals(),init_globals(),init_globals();var fragment9=\"precision highp float;\\nin vec2 vTextureCoord;\\nout vec4 finalColor;\\n\\nuniform sampler2D uTexture;\\nuniform vec2 uTransform;\\nuniform vec3 uLightColor;\\nuniform float uLightAlpha;\\nuniform vec3 uShadowColor;\\nuniform float uShadowAlpha;\\n\\nuniform vec4 uInputSize;\\n\\nvoid main(void) {\\n vec2 transform = vec2(1.0 / uInputSize) * vec2(uTransform.x, uTransform.y);\\n vec4 color = texture(uTexture, vTextureCoord);\\n float light = texture(uTexture, vTextureCoord - transform).a;\\n float shadow = texture(uTexture, vTextureCoord + transform).a;\\n\\n color.rgb = mix(color.rgb, uLightColor, clamp((color.a - light) * uLightAlpha, 0.0, 1.0));\\n color.rgb = mix(color.rgb, uShadowColor, clamp((color.a - shadow) * uShadowAlpha, 0.0, 1.0));\\n finalColor = vec4(color.rgb * color.a, color.a);\\n}\\n\";init_globals();var source9=\"struct BevelUniforms {\\n uLightColor: vec3__left_angle_mark_f32>,\\n uLightAlpha: f32,\\n uShadowColor: vec3__left_angle_mark_f32>,\\n uShadowAlpha: f32,\\n uTransform: vec2__left_angle_mark_f32>,\\n};\\n\\nstruct GlobalFilterUniforms {\\n uInputSize:vec4__left_angle_mark_f32>,\\n uInputPixel:vec4__left_angle_mark_f32>,\\n uInputClamp:vec4__left_angle_mark_f32>,\\n uOutputFrame:vec4__left_angle_mark_f32>,\\n uGlobalFrame:vec4__left_angle_mark_f32>,\\n uOutputTexture:vec4__left_angle_mark_f32>,\\n};\\n\\n@group(0) @binding(0) var__left_angle_mark_uniform> gfu: GlobalFilterUniforms;\\n\\n@group(0) @binding(1) var uTexture: texture_2d__left_angle_mark_f32>; \\n@group(0) @binding(2) var uSampler: sampler;\\n@group(1) @binding(0) var__left_angle_mark_uniform> bevelUniforms : BevelUniforms;\\n\\n@fragment\\nfn mainFragment(\\n @builtin(position) position: vec4__left_angle_mark_f32>,\\n @location(0) uv : vec2__left_angle_mark_f32>\\n) -> @location(0) vec4__left_angle_mark_f32> {\\n let transform = vec2__left_angle_mark_f32>(1.0 / gfu.uInputSize.xy) * vec2__left_angle_mark_f32>(bevelUniforms.uTransform.x, bevelUniforms.uTransform.y);\\n var color: vec4__left_angle_mark_f32> = textureSample(uTexture, uSampler, uv);\\n let lightSample: f32 = textureSample(uTexture, uSampler, uv - transform).a;\\n let shadowSample: f32 = textureSample(uTexture, uSampler, uv + transform).a;\\n\\n let light = vec4__left_angle_mark_f32>(bevelUniforms.uLightColor, bevelUniforms.uLightAlpha);\\n let shadow = vec4__left_angle_mark_f32>(bevelUniforms.uShadowColor, bevelUniforms.uShadowAlpha);\\n\\n color = vec4__left_angle_mark_f32>(mix(color.rgb, light.rgb, clamp((color.a - lightSample) * light.a, 0.0, 1.0)), color.a);\\n color = vec4__left_angle_mark_f32>(mix(color.rgb, shadow.rgb, clamp((color.a - shadowSample) * shadow.a, 0.0, 1.0)), color.a);\\n \\n return vec4__left_angle_mark_f32>(color.rgb * color.a, color.a);\\n}\",__defProp7=Object.defineProperty,__defNormalProp6=(e,t,r)=>t in e?__defProp7(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,__publicField6=(e,t,r)=>(__defNormalProp6(e,\"symbol\"!=typeof t?t+\"\":t,r),r),_BevelFilter=class e extends Filter{get rotation(){return this._rotation/DEG_TO_RAD}set rotation(e){this._rotation=e*DEG_TO_RAD,this._updateTransform()}get thickness(){return this._thickness}set thickness(e){this._thickness=e,this._updateTransform()}get lightColor(){return this._lightColor.value}set lightColor(e){this._lightColor.setValue(e);const[t,r,n]=this._lightColor.toArray();this.uniforms.uLightColor[0]=t,this.uniforms.uLightColor[1]=r,this.uniforms.uLightColor[2]=n}get lightAlpha(){return this.uniforms.uLightAlpha}set lightAlpha(e){this.uniforms.uLightAlpha=e}get shadowColor(){return this._shadowColor.value}set shadowColor(e){this._shadowColor.setValue(e);const[t,r,n]=this._shadowColor.toArray();this.uniforms.uShadowColor[0]=t,this.uniforms.uShadowColor[1]=r,this.uniforms.uShadowColor[2]=n}get shadowAlpha(){return this.uniforms.uShadowAlpha}set shadowAlpha(e){this.uniforms.uShadowAlpha=e}_updateTransform(){this.uniforms.uTransform[0]=this.thickness*Math.cos(this._rotation),this.uniforms.uTransform[1]=this.thickness*Math.sin(this._rotation)}constructor(t){var r,n;t={...e.DEFAULT_OPTIONS,...t},super({gpuProgram:GpuProgram.from({vertex:{source:wgslVertex,entryPoint:\"mainVertex\"},fragment:{source:source9,entryPoint:\"mainFragment\"}}),glProgram:GlProgram.from({vertex:vertex3,fragment:fragment9,name:\"bevel-filter\"}),resources:{bevelUniforms:{uLightColor:{value:new Float32Array(3),type:\"vec3__left_angle_mark_f32>\"},uLightAlpha:{value:t.lightAlpha,type:\"f32\"},uShadowColor:{value:new Float32Array(3),type:\"vec3__left_angle_mark_f32>\"},uShadowAlpha:{value:t.shadowAlpha,type:\"f32\"},uTransform:{value:new Float32Array(2),type:\"vec2__left_angle_mark_f32>\"}}},padding:1}),__publicField6(this,\"uniforms\"),__publicField6(this,\"_thickness\"),__publicField6(this,\"_rotation\"),__publicField6(this,\"_lightColor\"),__publicField6(this,\"_shadowColor\"),this.uniforms=this.resources.bevelUniforms.uniforms,this._lightColor=new Color2,this._shadowColor=new Color2,this.lightColor=null!=(r=t.lightColor)?r:16777215,this.shadowColor=null!=(n=t.shadowColor)?n:0,Object.assign(this,t)}};__publicField6(_BevelFilter,\"DEFAULT_OPTIONS\",{rotation:45,thickness:2,lightColor:16777215,lightAlpha:.7,shadowColor:0,shadowAlpha:.7}),init_globals();var __defProp8=Object.defineProperty,__defNormalProp7=(e,t,r)=>t in e?__defProp8(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,__publicField7=(e,t,r)=>(__defNormalProp7(e,\"symbol\"!=typeof t?t+\"\":t,r),r),_BloomFilter=class e extends AlphaFilter{apply(e,t,r,n){const i=TexturePool.getSameSizeTexture(t);e.applyFilter(this,t,r,n),this._blurXFilter.apply(e,t,i,!0),this._blurYFilter.apply(e,i,r,!1),TexturePool.returnTexture(i)}get strength(){return this._strength}set strength(e){this._strength=\"number\"==typeof e?{x:e,y:e}:e,this._updateStrength()}get strengthX(){return this.strength.x}set strengthX(e){this.strength.x=e,this._updateStrength()}get strengthY(){return this.strength.y}set strengthY(e){this.strength.y=e,this._updateStrength()}_updateStrength(){this._blurXFilter.blur=this.strengthX,this._blurYFilter.blur=this.strengthY}get blur(){return deprecation(\"6.0.0\",\"BloomFilter.blur is deprecated, please use BloomFilter.strength instead\"),this.strengthX}set blur(e){deprecation(\"6.0.0\",\"BloomFilter.blur is deprecated, please use BloomFilter.strength instead\"),this.strength=e}get blurX(){return deprecation(\"6.0.0\",\"BloomFilter.blurX is deprecated, please use BloomFilter.strengthX instead\"),this.strengthX}set blurX(e){deprecation(\"6.0.0\",\"BloomFilter.blurX is deprecated, please use BloomFilter.strengthX instead\"),this.strengthX=e}get blurY(){return deprecation(\"6.0.0\",\"BloomFilter.blurY is deprecated, please use BloomFilter.strengthY instead\"),this.strengthY}set blurY(e){deprecation(\"6.0.0\",\"BloomFilter.blurY is deprecated, please use BloomFilter.strengthY instead\"),this.strengthY=e}constructor(...t){var r;let n=null!=(r=t[0])?r:{};if(\"number\"==typeof n||Array.isArray(n)||\"x\"in n&&\"y\"in n){deprecation(\"6.0.0\",\"BloomFilter constructor params are now options object. See params: { strength, quality, resolution, kernelSize }\");let e=n;Array.isArray(e)&&(e={x:e[0],y:e[1]}),n={strength:e},void 0!==t[1]&&(n.quality=t[1]),void 0!==t[2]&&(n.resolution=t[2]),void 0!==t[3]&&(n.kernelSize=t[3])}n={...e.DEFAULT_OPTIONS,...n},super(),__publicField7(this,\"_blurXFilter\"),__publicField7(this,\"_blurYFilter\"),__publicField7(this,\"_strength\"),this._strength={x:2,y:2},n.strength&&(\"number\"==typeof n.strength?(this._strength.x=n.strength,this._strength.y=n.strength):(this._strength.x=n.strength.x,this._strength.y=n.strength.y)),this._blurXFilter=new BlurFilterPass({...n,horizontal:!0,strength:this.strengthX}),this._blurYFilter=new BlurFilterPass({...n,horizontal:!1,strength:this.strengthY}),this._blurYFilter.blendMode=\"screen\",Object.assign(this,n)}};__publicField7(_BloomFilter,\"DEFAULT_OPTIONS\",{strength:{x:2,y:2},quality:4,resolution:1,kernelSize:5}),init_globals(),init_globals();var fragment10=\"precision highp float;\\nin vec2 vTextureCoord;\\nout vec4 finalColor;\\n\\nuniform sampler2D uTexture;\\nuniform vec2 uDimensions;\\nuniform vec2 uCenter;\\nuniform float uRadius;\\nuniform float uStrength;\\n\\nuniform vec4 uInputSize;\\nuniform vec4 uInputClamp;\\n\\nvoid main()\\n{\\n vec2 coord = vTextureCoord * uInputSize.xy;\\n coord -= uCenter * uDimensions.xy;\\n float distance = length(coord);\\n\\n if (distance __left_angle_mark_ uRadius) {\\n float percent = distance / uRadius;\\n if (uStrength > 0.0) {\\n coord *= mix(1.0, smoothstep(0.0, uRadius / distance, percent), uStrength * 0.75);\\n } else {\\n coord *= mix(1.0, pow(percent, 1.0 + uStrength * 0.75) * uRadius / distance, 1.0 - percent);\\n }\\n }\\n\\n coord += uCenter * uDimensions.xy;\\n coord /= uInputSize.xy;\\n vec2 clampedCoord = clamp(coord, uInputClamp.xy, uInputClamp.zw);\\n vec4 color = texture(uTexture, clampedCoord);\\n\\n if (coord != clampedCoord) {\\n color *= max(0.0, 1.0 - length(coord - clampedCoord));\\n }\\n\\n finalColor = color;\\n}\\n\";init_globals();var source10=\"struct BulgePinchUniforms {\\n uDimensions: vec2__left_angle_mark_f32>,\\n uCenter: vec2__left_angle_mark_f32>,\\n uRadius: f32,\\n uStrength: f32,\\n};\\n\\nstruct GlobalFilterUniforms {\\n uInputSize:vec4__left_angle_mark_f32>,\\n uInputPixel:vec4__left_angle_mark_f32>,\\n uInputClamp:vec4__left_angle_mark_f32>,\\n uOutputFrame:vec4__left_angle_mark_f32>,\\n uGlobalFrame:vec4__left_angle_mark_f32>,\\n uOutputTexture:vec4__left_angle_mark_f32>,\\n};\\n\\n@group(0) @binding(0) var__left_angle_mark_uniform> gfu: GlobalFilterUniforms;\\n\\n@group(0) @binding(1) var uTexture: texture_2d__left_angle_mark_f32>; \\n@group(0) @binding(2) var uSampler: sampler;\\n@group(1) @binding(0) var__left_angle_mark_uniform> bulgePinchUniforms : BulgePinchUniforms;\\n\\n@fragment\\nfn mainFragment(\\n @builtin(position) position: vec4__left_angle_mark_f32>,\\n @location(0) uv : vec2__left_angle_mark_f32>\\n) -> @location(0) vec4__left_angle_mark_f32> {\\n let dimensions: vec2__left_angle_mark_f32> = bulgePinchUniforms.uDimensions;\\n let center: vec2__left_angle_mark_f32> = bulgePinchUniforms.uCenter;\\n let radius: f32 = bulgePinchUniforms.uRadius;\\n let strength: f32 = bulgePinchUniforms.uStrength;\\n var coord: vec2__left_angle_mark_f32> = (uv * gfu.uInputSize.xy) - center * dimensions.xy;\\n\\n let distance: f32 = length(coord);\\n\\n if (distance __left_angle_mark_ radius) {\\n let percent: f32 = distance / radius;\\n if (strength > 0.0) {\\n coord *= mix(1.0, smoothstep(0.0, radius / distance, percent), strength * 0.75);\\n } else {\\n coord *= mix(1.0, pow(percent, 1.0 + strength * 0.75) * radius / distance, 1.0 - percent);\\n }\\n }\\n coord += (center * dimensions.xy);\\n coord /= gfu.uInputSize.xy;\\n\\n let clampedCoord: vec2__left_angle_mark_f32> = clamp(coord, gfu.uInputClamp.xy, gfu.uInputClamp.zw);\\n var color: vec4__left_angle_mark_f32> = textureSample(uTexture, uSampler, clampedCoord);\\n if (coord.x != clampedCoord.x && coord.y != clampedCoord.y) {\\n color *= max(0.0, 1.0 - length(coord - clampedCoord));\\n }\\n\\n return color;\\n}\\n\\nfn compareVec2(x: vec2__left_angle_mark_f32>, y: vec2__left_angle_mark_f32>) -> bool\\n{\\n if (x.x == y.x && x.y == y.y)\\n {\\n return true;\\n }\\n\\n return false;\\n}\",__defProp9=Object.defineProperty,__defNormalProp8=(e,t,r)=>t in e?__defProp9(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,__publicField8=(e,t,r)=>(__defNormalProp8(e,\"symbol\"!=typeof t?t+\"\":t,r),r),_BulgePinchFilter=class e extends Filter{apply(e,t,r,n){this.uniforms.uDimensions[0]=t.frame.width,this.uniforms.uDimensions[1]=t.frame.height,e.applyFilter(this,t,r,n)}get center(){return this.uniforms.uCenter}set center(e){\"number\"==typeof e&&(e={x:e,y:e}),Array.isArray(e)&&(e={x:e[0],y:e[1]}),this.uniforms.uCenter=e}get centerX(){return this.uniforms.uCenter.x}set centerX(e){this.uniforms.uCenter.x=e}get centerY(){return this.uniforms.uCenter.y}set centerY(e){this.uniforms.uCenter.y=e}get radius(){return this.uniforms.uRadius}set radius(e){this.uniforms.uRadius=e}get strength(){return this.uniforms.uStrength}set strength(e){this.uniforms.uStrength=e}constructor(t){t={...e.DEFAULT_OPTIONS,...t},super({gpuProgram:GpuProgram.from({vertex:{source:wgslVertex,entryPoint:\"mainVertex\"},fragment:{source:source10,entryPoint:\"mainFragment\"}}),glProgram:GlProgram.from({vertex:vertex3,fragment:fragment10,name:\"bulge-pinch-filter\"}),resources:{bulgePinchUniforms:{uDimensions:{value:[0,0],type:\"vec2__left_angle_mark_f32>\"},uCenter:{value:t.center,type:\"vec2__left_angle_mark_f32>\"},uRadius:{value:t.radius,type:\"f32\"},uStrength:{value:t.strength,type:\"f32\"}}}}),__publicField8(this,\"uniforms\"),this.uniforms=this.resources.bulgePinchUniforms.uniforms,Object.assign(this,t)}};__publicField8(_BulgePinchFilter,\"DEFAULT_OPTIONS\",{center:{x:.5,y:.5},radius:100,strength:1}),init_globals(),init_globals();var fragment11=\"precision highp float;\\nin vec2 vTextureCoord;\\nin vec2 vFilterCoord;\\nout vec4 finalColor;\\n\\nconst int TYPE_LINEAR = 0;\\nconst int TYPE_RADIAL = 1;\\nconst int TYPE_CONIC = 2;\\nconst int MAX_STOPS = 32;\\n\\nuniform sampler2D uTexture;\\nuniform vec4 uOptions;\\nuniform vec2 uCounts;\\nuniform vec3 uColors[MAX_STOPS];\\nuniform vec4 uStops[MAX_STOPS];\\n\\nconst float PI = 3.1415926538;\\nconst float PI_2 = PI*2.;\\n\\nstruct ColorStop {\\n float offset;\\n vec3 color;\\n float alpha;\\n};\\n\\nmat2 rotate2d(float angle){\\n return mat2(cos(angle), -sin(angle),\\n sin(angle), cos(angle));\\n}\\n\\nfloat projectLinearPosition(vec2 pos, float angle){\\n vec2 center = vec2(0.5);\\n vec2 result = pos - center;\\n result = rotate2d(angle) * result;\\n result = result + center;\\n return clamp(result.x, 0., 1.);\\n}\\n\\nfloat projectRadialPosition(vec2 pos) {\\n float r = distance(pos, vec2(0.5));\\n return clamp(2.*r, 0., 1.);\\n}\\n\\nfloat projectAnglePosition(vec2 pos, float angle) {\\n vec2 center = pos - vec2(0.5);\\n float polarAngle=atan(-center.y, center.x);\\n return mod(polarAngle + angle, PI_2) / PI_2;\\n}\\n\\nfloat projectPosition(vec2 pos, int type, float angle) {\\n if (type == TYPE_LINEAR) {\\n return projectLinearPosition(pos, angle);\\n } else if (type == TYPE_RADIAL) {\\n return projectRadialPosition(pos);\\n } else if (type == TYPE_CONIC) {\\n return projectAnglePosition(pos, angle);\\n }\\n\\n return pos.y;\\n}\\n\\nvoid main(void) {\\n int uType = int(uOptions[0]);\\n float uAngle = uOptions[1];\\n float uAlpha = uOptions[2];\\n float uReplace = uOptions[3];\\n\\n int uNumStops = int(uCounts[0]);\\n float uMaxColors = uCounts[1];\\n\\n // current/original color\\n vec4 currentColor = texture(uTexture, vTextureCoord);\\n\\n // skip calculations if gradient alpha is 0\\n if (0.0 == uAlpha) {\\n finalColor = currentColor;\\n return;\\n }\\n\\n // project position\\n float y = projectPosition(vFilterCoord, int(uType), radians(uAngle));\\n\\n // check gradient bounds\\n float offsetMin = uStops[0][0];\\n float offsetMax = 0.0;\\n\\n int numStops = int(uNumStops);\\n\\n for (int i = 0; i __left_angle_mark_ MAX_STOPS; i++) {\\n if (i == numStops-1){ // last index\\n offsetMax = uStops[i][0];\\n }\\n }\\n\\n if (y __left_angle_mark_ offsetMin || y > offsetMax) {\\n finalColor = currentColor;\\n return;\\n }\\n\\n // limit colors\\n if (uMaxColors > 0.) {\\n float stepSize = 1./uMaxColors;\\n float stepNumber = float(floor(y/stepSize));\\n y = stepSize * (stepNumber + 0.5);// offset by 0.5 to use color from middle of segment\\n }\\n\\n // find color stops\\n ColorStop from;\\n ColorStop to;\\n\\n for (int i = 0; i __left_angle_mark_ MAX_STOPS; i++) {\\n if (y >= uStops[i][0]) {\\n from = ColorStop(uStops[i][0], uColors[i], uStops[i][1]);\\n to = ColorStop(uStops[i+1][0], uColors[i+1], uStops[i+1][1]);\\n }\\n\\n if (i == numStops-1){ // last index\\n break;\\n }\\n }\\n\\n // mix colors from stops\\n vec4 colorFrom = vec4(from.color * from.alpha, from.alpha);\\n vec4 colorTo = vec4(to.color * to.alpha, to.alpha);\\n\\n float segmentHeight = to.offset - from.offset;\\n float relativePos = y - from.offset;// position from 0 to [segmentHeight]\\n float relativePercent = relativePos / segmentHeight;// position in percent between [from.offset] and [to.offset].\\n\\n float gradientAlpha = uAlpha * currentColor.a;\\n vec4 gradientColor = mix(colorFrom, colorTo, relativePercent) * gradientAlpha;\\n\\n if (uReplace __left_angle_mark_ 0.5) {\\n // mix resulting color with current color\\n finalColor = gradientColor + currentColor*(1.-gradientColor.a);\\n } else {\\n // replace with gradient color\\n finalColor = gradientColor;\\n }\\n}\\n\";init_globals();var vertex4=\"in vec2 aPosition;\\nout vec2 vTextureCoord;\\nout vec2 vFilterCoord;\\n\\nuniform vec4 uInputSize;\\nuniform vec4 uOutputFrame;\\nuniform vec4 uOutputTexture;\\n\\nvec4 filterVertexPosition( void )\\n{\\n vec2 position = aPosition * uOutputFrame.zw + uOutputFrame.xy;\\n \\n position.x = position.x * (2.0 / uOutputTexture.x) - 1.0;\\n position.y = position.y * (2.0*uOutputTexture.z / uOutputTexture.y) - uOutputTexture.z;\\n\\n return vec4(position, 0.0, 1.0);\\n}\\n\\nvec2 filterTextureCoord( void )\\n{\\n return aPosition * (uOutputFrame.zw * uInputSize.zw);\\n}\\n\\nvoid main(void)\\n{\\n gl_Position = filterVertexPosition();\\n vTextureCoord = filterTextureCoord();\\n vFilterCoord = vTextureCoord * uInputSize.xy / uOutputFrame.zw;\\n}\\n\";init_globals();var source11=\"struct BaseUniforms {\\n uOptions: vec4__left_angle_mark_f32>,\\n uCounts: vec2__left_angle_mark_f32>,\\n};\\n\\nstruct StopsUniforms {\\n uColors: array__left_angle_mark_vec3__left_angle_mark_f32>, MAX_STOPS>,\\n uStops: array__left_angle_mark_vec4__left_angle_mark_f32>, MAX_STOPS>,\\n};\\n\\nstruct GlobalFilterUniforms {\\n uInputSize:vec4__left_angle_mark_f32>,\\n uInputPixel:vec4__left_angle_mark_f32>,\\n uInputClamp:vec4__left_angle_mark_f32>,\\n uOutputFrame:vec4__left_angle_mark_f32>,\\n uGlobalFrame:vec4__left_angle_mark_f32>,\\n uOutputTexture:vec4__left_angle_mark_f32>,\\n};\\n\\n@group(0) @binding(0) var__left_angle_mark_uniform> gfu: GlobalFilterUniforms;\\n\\n@group(0) @binding(1) var uTexture: texture_2d__left_angle_mark_f32>; \\n@group(0) @binding(2) var uSampler: sampler;\\n@group(1) @binding(0) var__left_angle_mark_uniform> baseUniforms : BaseUniforms;\\n@group(1) @binding(1) var__left_angle_mark_uniform> stopsUniforms : StopsUniforms;\\n\\nstruct VSOutput {\\n @builtin(position) position: vec4__left_angle_mark_f32>,\\n @location(0) uv : vec2__left_angle_mark_f32>,\\n @location(1) coord : vec2__left_angle_mark_f32>\\n};\\n\\nfn filterVertexPosition(aPosition:vec2__left_angle_mark_f32>) -> vec4__left_angle_mark_f32>\\n{\\n var position = aPosition * gfu.uOutputFrame.zw + gfu.uOutputFrame.xy;\\n\\n position.x = position.x * (2.0 / gfu.uOutputTexture.x) - 1.0;\\n position.y = position.y * (2.0*gfu.uOutputTexture.z / gfu.uOutputTexture.y) - gfu.uOutputTexture.z;\\n\\n return vec4(position, 0.0, 1.0);\\n}\\n\\nfn filterTextureCoord( aPosition:vec2__left_angle_mark_f32> ) -> vec2__left_angle_mark_f32>\\n{\\n return aPosition * (gfu.uOutputFrame.zw * gfu.uInputSize.zw);\\n}\\n\\nfn filterCoord( vTextureCoord:vec2__left_angle_mark_f32> ) -> vec2__left_angle_mark_f32>\\n{\\n return vTextureCoord * gfu.uInputSize.xy / gfu.uOutputFrame.zw;\\n}\\n\\nfn globalTextureCoord( aPosition:vec2__left_angle_mark_f32> ) -> vec2__left_angle_mark_f32>\\n{\\n return (aPosition.xy / gfu.uGlobalFrame.zw) + (gfu.uGlobalFrame.xy / gfu.uGlobalFrame.zw); \\n}\\n\\nfn getSize() -> vec2__left_angle_mark_f32>\\n{\\n return gfu.uGlobalFrame.zw;\\n}\\n \\n@vertex\\nfn mainVertex(\\n @location(0) aPosition : vec2__left_angle_mark_f32>, \\n) -> VSOutput {\\n let vTextureCoord: vec2__left_angle_mark_f32> = filterTextureCoord(aPosition);\\n return VSOutput(\\n filterVertexPosition(aPosition),\\n vTextureCoord,\\n filterCoord(vTextureCoord),\\n );\\n}\\n\\nstruct ColorStop {\\n offset: f32,\\n color: vec3__left_angle_mark_f32>,\\n alpha: f32,\\n};\\n\\nfn rotate2d(angle: f32) -> mat2x2__left_angle_mark_f32>{\\n return mat2x2(cos(angle), -sin(angle),\\n sin(angle), cos(angle));\\n}\\n\\nfn projectLinearPosition(pos: vec2__left_angle_mark_f32>, angle: f32) -> f32 {\\n var center: vec2__left_angle_mark_f32> = vec2__left_angle_mark_f32>(0.5);\\n var result: vec2__left_angle_mark_f32> = pos - center;\\n result = rotate2d(angle) * result;\\n result = result + center;\\n return clamp(result.x, 0.0, 1.0);\\n}\\n\\nfn projectRadialPosition(pos: vec2__left_angle_mark_f32>) -> f32 {\\n var r: f32 = distance(pos, vec2__left_angle_mark_f32>(0.5));\\n return clamp(2.0 * r, 0.0, 1.0);\\n}\\n\\nfn projectAnglePosition(pos: vec2__left_angle_mark_f32>, angle: f32) -> f32 {\\n var center: vec2__left_angle_mark_f32> = pos - vec2__left_angle_mark_f32>(0.5, 0.5);\\n var polarAngle: f32 = atan2(-center.y, center.x);\\n return ((polarAngle + angle) % PI_2) / PI_2;\\n}\\n\\nfn projectPosition(pos: vec2__left_angle_mark_f32>, gradientType: i32, angle: f32) -> f32 {\\n if (gradientType == TYPE_LINEAR) {\\n return projectLinearPosition(pos, angle);\\n } else if (gradientType == TYPE_RADIAL) {\\n return projectRadialPosition(pos);\\n } else if (gradientType == TYPE_CONIC) {\\n return projectAnglePosition(pos, angle);\\n }\\n\\n return pos.y;\\n}\\n\\n@fragment\\nfn mainFragment(\\n @builtin(position) position: vec4__left_angle_mark_f32>,\\n @location(0) uv : vec2__left_angle_mark_f32>,\\n @location(1) coord : vec2__left_angle_mark_f32>\\n) -> @location(0) vec4__left_angle_mark_f32> {\\n let uType: i32 = i32(baseUniforms.uOptions[0]);\\n let uAngle: f32 = baseUniforms.uOptions[1];\\n let uAlpha: f32 = baseUniforms.uOptions[2];\\n let uReplace: f32 = baseUniforms.uOptions[3];\\n\\n let uNumStops: i32 = i32(baseUniforms.uCounts[0]);\\n let uMaxColors: f32 = baseUniforms.uCounts[1];\\n\\n // current/original color\\n var currentColor: vec4__left_angle_mark_f32> = textureSample(uTexture, uSampler, uv);\\n\\n // skip calculations if gradient alpha is 0\\n if (uAlpha == 0.0) { return currentColor; }\\n\\n // project position\\n var y: f32 = projectPosition(coord, uType, radians(uAngle));\\n\\n // check gradient bounds\\n var offsetMin: f32 = stopsUniforms.uStops[0][0];\\n var offsetMax: f32 = 0.0;\\n\\n let numStops: i32 = uNumStops;\\n\\n for (var i: i32 = 0; i __left_angle_mark_ MAX_STOPS; i = i + 1) {\\n if (i == numStops - 1) { // last index\\n offsetMax = stopsUniforms.uStops[i][0];\\n }\\n }\\n\\n if (y __left_angle_mark_ offsetMin || y > offsetMax) { return currentColor; }\\n\\n // limit colors\\n if (uMaxColors > 0.0) {\\n var stepSize: f32 = 1.0 / uMaxColors;\\n var stepNumber: f32 = floor(y / stepSize);\\n y = stepSize * (stepNumber + 0.5); // offset by 0.5 to use color from middle of segment\\n }\\n\\n // find color stops\\n var stopFrom: ColorStop;\\n var stopTo: ColorStop;\\n\\n for (var i: i32 = 0; i __left_angle_mark_ MAX_STOPS; i = i + 1) {\\n if (y >= stopsUniforms.uStops[i][0]) {\\n stopFrom = ColorStop(stopsUniforms.uStops[i][0], stopsUniforms.uColors[i], stopsUniforms.uStops[i][1]);\\n stopTo = ColorStop(stopsUniforms.uStops[i + 1][0], stopsUniforms.uColors[i + 1], stopsUniforms.uStops[i + 1][1]);\\n }\\n\\n if (i == numStops - 1) { // last index\\n break;\\n }\\n }\\n\\n // mix colors from stops\\n var colorFrom: vec4__left_angle_mark_f32> = vec4__left_angle_mark_f32>(stopFrom.color * stopFrom.alpha, stopFrom.alpha);\\n var colorTo: vec4__left_angle_mark_f32> = vec4__left_angle_mark_f32>(stopTo.color * stopTo.alpha, stopTo.alpha);\\n\\n var segmentHeight: f32 = stopTo.offset - stopFrom.offset;\\n var relativePos: f32 = y - stopFrom.offset; // position from 0 to [segmentHeight]\\n var relativePercent: f32 = relativePos / segmentHeight; // position in percent between [from.offset] and [to.offset].\\n\\n var gradientAlpha: f32 = uAlpha * currentColor.a;\\n var gradientColor: vec4__left_angle_mark_f32> = mix(colorFrom, colorTo, relativePercent) * gradientAlpha;\\n\\n if (uReplace __left_angle_mark_ 0.5) {\\n // mix resulting color with current color\\n return gradientColor + currentColor * (1.0 - gradientColor.a);\\n } else {\\n // replace with gradient color\\n return gradientColor;\\n }\\n}\\n\\nconst PI: f32 = 3.14159265358979323846264;\\nconst PI_2: f32 = PI * 2.0;\\n\\nconst TYPE_LINEAR: i32 = 0;\\nconst TYPE_RADIAL: i32 = 1;\\nconst TYPE_CONIC: i32 = 2;\\nconst MAX_STOPS: i32 = 32;\";init_globals(),init_globals();var GradientParser=GradientParser||{},visitor;GradientParser.stringify=(visitor={\"visit_linear-gradient\":function(e){return visitor.visit_gradient(e)},\"visit_repeating-linear-gradient\":function(e){return visitor.visit_gradient(e)},\"visit_radial-gradient\":function(e){return visitor.visit_gradient(e)},\"visit_repeating-radial-gradient\":function(e){return visitor.visit_gradient(e)},\"visit_gradient\":function(e){var t=visitor.visit(e.orientation);return t&&(t+=\", \"),e.type+\"(\"+t+visitor.visit(e.colorStops)+\")\"},\"visit_shape\":function(e){var t=e.value,r=visitor.visit(e.at),n=visitor.visit(e.style);return n&&(t+=\" \"+n),r&&(t+=\" at \"+r),t},\"visit_default-radial\":function(e){var t=\"\",r=visitor.visit(e.at);return r&&(t+=r),t},\"visit_extent-keyword\":function(e){var t=e.value,r=visitor.visit(e.at);return r&&(t+=\" at \"+r),t},\"visit_position-keyword\":function(e){return e.value},\"visit_position\":function(e){return visitor.visit(e.value.x)+\" \"+visitor.visit(e.value.y)},\"visit_%\":function(e){return e.value+\"%\"},\"visit_em\":function(e){return e.value+\"em\"},\"visit_px\":function(e){return e.value+\"px\"},\"visit_literal\":function(e){return visitor.visit_color(e.value,e)},\"visit_hex\":function(e){return visitor.visit_color(\"#\"+e.value,e)},\"visit_rgb\":function(e){return visitor.visit_color(\"rgb(\"+e.value.join(\", \")+\")\",e)},\"visit_rgba\":function(e){return visitor.visit_color(\"rgba(\"+e.value.join(\", \")+\")\",e)},\"visit_color\":function(e,t){var r=e,n=visitor.visit(t.length);return n&&(r+=\" \"+n),r},\"visit_angular\":function(e){return e.value+\"deg\"},\"visit_directional\":function(e){return\"to \"+e.value},\"visit_array\":function(e){var t=\"\",r=e.length;return e.forEach((function(e,n){t+=visitor.visit(e),n__left_angle_mark_r-1&&(t+=\", \")})),t},\"visit\":function(e){if(!e)return\"\";if(e instanceof Array)return visitor.visit_array(e,\"\");if(e.type){var t=visitor[\"visit_\"+e.type];if(t)return t(e);throw Error(\"Missing visitor visit_\"+e.type)}throw Error(\"Invalid node.\")}},function(e){return visitor.visit(e)});var GradientParser=GradientParser||{};GradientParser.parse=function(){var e=/^(\\-(webkit|o|ms|moz)\\-)?(linear\\-gradient)/i,t=/^(\\-(webkit|o|ms|moz)\\-)?(repeating\\-linear\\-gradient)/i,r=/^(\\-(webkit|o|ms|moz)\\-)?(radial\\-gradient)/i,n=/^(\\-(webkit|o|ms|moz)\\-)?(repeating\\-radial\\-gradient)/i,i=/^to (left (top|bottom)|right (top|bottom)|left|right|top|bottom)/i,o=/^(closest\\-side|closest\\-corner|farthest\\-side|farthest\\-corner|contain|cover)/,a=/^(left|center|right|top|bottom)/i,s=/^(-?(([0-9]*\\.[0-9]+)|([0-9]+\\.?)))px/,l=/^(-?(([0-9]*\\.[0-9]+)|([0-9]+\\.?)))\\%/,u=/^(-?(([0-9]*\\.[0-9]+)|([0-9]+\\.?)))em/,c=/^(-?(([0-9]*\\.[0-9]+)|([0-9]+\\.?)))deg/,d=/^\\(/,h=/^\\)/,f=/^,/,p=/^\\#([0-9a-fA-F]+)/,m=/^([a-zA-Z]+)/,g=/^rgb/i,_=/^rgba/i,b=/^(([0-9]*\\.[0-9]+)|([0-9]+\\.?))/,y=\"\";function v(e){var t=new Error(y+\": \"+e);throw t.source=y,t}function A(){var e=P(w);return y.length>0&&v(\"Invalid input not EOF\"),e}function w(){return S(\"linear-gradient\",e,x)||S(\"repeating-linear-gradient\",t,x)||S(\"radial-gradient\",r,C)||S(\"repeating-radial-gradient\",n,C)}function S(e,t,r){return E(t,(function(t){var n=r();return n&&(L(f)||v(\"Missing comma before color stops\")),{type:e,orientation:n,colorStops:P(M)}}))}function E(e,t){var r=L(e);if(r){L(d)||v(\"Missing (\");var n=t(r);return L(h)||v(\"Missing )\"),n}}function x(){return j(\"directional\",i,1)||j(\"angular\",c,1)}function C(){var e,t,r=T();return r&&((e=[]).push(r),t=y,L(f)&&((r=T())?e.push(r):y=t)),e}function T(){var e,t,r=((t=j(\"shape\",/^(circle)/i,0))&&(t.style=N()||R()),t||((e=j(\"shape\",/^(ellipse)/i,0))&&(e.style=B()||R()),e));if(r)r.at=I();else{var n=R();if(n){r=n;var i=I();i&&(r.at=i)}else{var o=k();o&&(r={type:\"default-radial\",at:o})}}return r}function R(){return j(\"extent-keyword\",o,1)}function I(){if(j(\"position\",/^at/,0)){var e=k();return e||v(\"Missing positioning value\"),e}}function k(){var e={x:B(),y:B()};if(e.x||e.y)return{type:\"position\",value:e}}function P(e){var t=e(),r=[];if(t)for(r.push(t);L(f);)(t=e())?r.push(t):v(\"One extra comma\");return r}function M(){var e=j(\"hex\",p,1)||E(_,(function(){return{type:\"rgba\",value:P(O)}}))||E(g,(function(){return{type:\"rgb\",value:P(O)}}))||j(\"literal\",m,0);return e||v(\"Expected color definition\"),e.length=B(),e}function O(){return L(b)[1]}function B(){return j(\"%\",l,1)||j(\"position-keyword\",a,1)||N()}function N(){return j(\"px\",s,1)||j(\"em\",u,1)}function j(e,t,r){var n=L(t);if(n)return{type:e,value:n[r]}}function L(e){var t,r;return(r=/^[\\n\\r\\t\\s]+/.exec(y))&&D(r[0].length),(t=e.exec(y))&&D(t[0].length),t}function D(e){y=y.substr(e)}return function(e){return y=e.toString(),A()}}();var parse3=GradientParser.parse;function parseCssGradient(e){const t=parse3(trimCssGradient(e));if(0===t.length)throw new Error(\"Invalid CSS gradient.\");if(1!==t.length)throw new Error(\"Unsupported CSS gradient (multiple gradients is not supported).\");const r=t[0];return{type:typeFromCssType(r.type),stops:stopsFromCssStops(r.colorStops),angle:angleFromCssOrientation(r.orientation)}}function typeFromCssType(e){const t={\"linear-gradient\":0,\"radial-gradient\":1};if(!(e in t))throw new Error(`Unsupported gradient type \"${e}\"`);return t[e]}function stopsFromCssStops(e){const t=offsetsFromCssColorStops(e),r=[],n=new Color2;for(let i=0;i__left_angle_mark_e.length;i++){const o=colorAsStringFromCssStop(e[i]),a=n.setValue(o).toArray();r.push({offset:t[i],color:a.slice(0,3),alpha:a[3]})}return r}function colorAsStringFromCssStop(e){switch(e.type){case\"hex\":return`#${e.value}`;case\"literal\":return e.value;default:return`${e.type}(${e.value.join(\",\")})`}}function offsetsFromCssColorStops(e){const t=[];for(let i=0;i__left_angle_mark_e.length;i++){const r=e[i];let n=-1;\"literal\"===r.type&&r.length&&\"type\"in r.length&&\"%\"===r.length.type&&\"value\"in r.length&&(n=parseFloat(r.length.value)/100),t.push(n)}const r=e=>{for(let r=e;r__left_angle_mark_t.length;r++)if(-1!==t[r])return{indexDelta:r-e,offset:t[r]};return{indexDelta:t.length-1-e,offset:1}};let n=0;for(let i=0;i__left_angle_mark_t.length;i++){const e=t[i];if(-1!==e)n=e;else if(0===i)t[i]=0;else if(i+1===t.length)t[i]=1;else{const e=r(i),o=(e.offset-n)/(1+e.indexDelta);for(let r=0;r__left_angle_mark_=e.indexDelta;r++)t[i+r]=n+(r+1)*o;i+=e.indexDelta,n=t[i]}}return t.map(fixFloatRounding)}function fixFloatRounding(e){return e.toString().length>6?parseFloat(e.toString().substring(0,6)):e}function angleFromCssOrientation(e){if(void 0===e)return 0;if(\"type\"in e&&\"value\"in e)switch(e.type){case\"angular\":return parseFloat(e.value);case\"directional\":return angleFromDirectionalValue(e.value)}return 0}function angleFromDirectionalValue(e){const t={left:270,top:0,bottom:180,right:90,\"left top\":315,\"top left\":315,\"left bottom\":225,\"bottom left\":225,\"right top\":45,\"top right\":45,\"right bottom\":135,\"bottom right\":135};if(!(e in t))throw new Error(`Unsupported directional value \"${e}\"`);return t[e]}function trimCssGradient(e){let t=e.replace(/\\s{2,}/gu,\" \");return t=t.replace(/;/g,\"\"),t=t.replace(/ ,/g,\",\"),t=t.replace(/\\( /g,\"(\"),t=t.replace(/ \\)/g,\")\"),t.trim()}GradientParser.stringify;var __defProp10=Object.defineProperty,__defNormalProp9=(e,t,r)=>t in e?__defProp10(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,__publicField9=(e,t,r)=>(__defNormalProp9(e,\"symbol\"!=typeof t?t+\"\":t,r),r),ANGLE_OFFSET=90;function sortColorStops(e){return[...e].sort(((e,t)=>e.offset-t.offset))}var _ColorGradientFilter=class e extends Filter{get stops(){return this._stops}set stops(e){const t=sortColorStops(e),r=new Color2;let n,i,o;for(let a=0;a__left_angle_mark_t.length;a++){r.setValue(t[a].color);const e=3*a;[n,i,o]=r.toArray(),this.stopsUniforms.uColors[e]=n,this.stopsUniforms.uColors[e+1]=i,this.stopsUniforms.uColors[e+2]=o,this.stopsUniforms.uStops[4*a]=t[a].offset,this.stopsUniforms.uStops[4*a+1]=t[a].alpha}this.baseUniforms.uCounts[0]=t.length,this._stops=t}get type(){return this.baseUniforms.uOptions[0]}set type(e){this.baseUniforms.uOptions[0]=e}get angle(){return this.baseUniforms.uOptions[1]+ANGLE_OFFSET}set angle(e){this.baseUniforms.uOptions[1]=e-ANGLE_OFFSET}get alpha(){return this.baseUniforms.uOptions[2]}set alpha(e){this.baseUniforms.uOptions[2]=e}get maxColors(){return this.baseUniforms.uCounts[1]}set maxColors(e){this.baseUniforms.uCounts[1]=e}get replace(){return this.baseUniforms.uOptions[3]>.5}set replace(e){this.baseUniforms.uOptions[3]=e?1:0}constructor(t){var r,n,i;if(!(t=t&&\"css\"in t?{...parseCssGradient(t.css||\"\"),alpha:null!=(r=t.alpha)?r:e.defaults.alpha,maxColors:null!=(n=t.maxColors)?n:e.defaults.maxColors}:{...e.defaults,...t}).stops||t.stops.length__left_angle_mark_2)throw new Error(\"ColorGradientFilter requires at least 2 color stops.\");super({gpuProgram:GpuProgram.from({vertex:{source:source11,entryPoint:\"mainVertex\"},fragment:{source:source11,entryPoint:\"mainFragment\"}}),glProgram:GlProgram.from({vertex:vertex4,fragment:fragment11,name:\"color-gradient-filter\"}),resources:{baseUniforms:{uOptions:{value:[t.type,null!=(i=t.angle)?i:ANGLE_OFFSET,t.alpha,t.replace?1:0],type:\"vec4__left_angle_mark_f32>\"},uCounts:{value:[t.stops.length,t.maxColors],type:\"vec2__left_angle_mark_f32>\"}},stopsUniforms:{uColors:{value:new Float32Array(96),type:\"vec3__left_angle_mark_f32>\",size:32},uStops:{value:new Float32Array(128),type:\"vec4__left_angle_mark_f32>\",size:32}}}}),__publicField9(this,\"baseUniforms\"),__publicField9(this,\"stopsUniforms\"),__publicField9(this,\"_stops\",[]),this.baseUniforms=this.resources.baseUniforms.uniforms,this.stopsUniforms=this.resources.stopsUniforms.uniforms,Object.assign(this,t)}};__publicField9(_ColorGradientFilter,\"LINEAR\",0),__publicField9(_ColorGradientFilter,\"RADIAL\",1),__publicField9(_ColorGradientFilter,\"CONIC\",2),__publicField9(_ColorGradientFilter,\"defaults\",{type:_ColorGradientFilter.LINEAR,stops:[{offset:0,color:16711680,alpha:1},{offset:1,color:255,alpha:1}],alpha:1,angle:90,maxColors:0,replace:!1}),init_globals(),init_globals();var fragment12=\"in vec2 vTextureCoord;\\nout vec4 finalColor;\\n\\nuniform sampler2D uTexture;\\nuniform sampler2D uMapTexture;\\nuniform float uMix;\\nuniform float uSize;\\nuniform float uSliceSize;\\nuniform float uSlicePixelSize;\\nuniform float uSliceInnerSize;\\n\\nvoid main() {\\n vec4 color = texture(uTexture, vTextureCoord.xy);\\n vec4 adjusted;\\n\\n if (color.a > 0.0) {\\n color.rgb /= color.a;\\n float innerWidth = uSize - 1.0;\\n float zSlice0 = min(floor(color.b * innerWidth), innerWidth);\\n float zSlice1 = min(zSlice0 + 1.0, innerWidth);\\n float xOffset = uSlicePixelSize * 0.5 + color.r * uSliceInnerSize;\\n float s0 = xOffset + (zSlice0 * uSliceSize);\\n float s1 = xOffset + (zSlice1 * uSliceSize);\\n float yOffset = uSliceSize * 0.5 + color.g * (1.0 - uSliceSize);\\n vec4 slice0Color = texture(uMapTexture, vec2(s0,yOffset));\\n vec4 slice1Color = texture(uMapTexture, vec2(s1,yOffset));\\n float zOffset = fract(color.b * innerWidth);\\n adjusted = mix(slice0Color, slice1Color, zOffset);\\n\\n color.rgb *= color.a;\\n }\\n\\n finalColor = vec4(mix(color, adjusted, uMix).rgb, color.a);\\n\\n}\";init_globals();var source12=\"struct ColorMapUniforms {\\n uMix: f32,\\n uSize: f32,\\n uSliceSize: f32,\\n uSlicePixelSize: f32,\\n uSliceInnerSize: f32,\\n};\\n\\n@group(0) @binding(1) var uTexture: texture_2d__left_angle_mark_f32>; \\n@group(0) @binding(2) var uSampler: sampler;\\n@group(1) @binding(0) var__left_angle_mark_uniform> colorMapUniforms : ColorMapUniforms;\\n@group(1) @binding(1) var uMapTexture: texture_2d__left_angle_mark_f32>;\\n@group(1) @binding(2) var uMapSampler: sampler;\\n\\n@fragment\\nfn mainFragment(\\n @builtin(position) position: vec4__left_angle_mark_f32>,\\n @location(0) uv : vec2__left_angle_mark_f32>\\n) -> @location(0) vec4__left_angle_mark_f32> {\\n var color:vec4__left_angle_mark_f32> = textureSample(uTexture, uSampler, uv);\\n\\n var adjusted: vec4__left_angle_mark_f32>;\\n\\n var altColor: vec4__left_angle_mark_f32> = vec4__left_angle_mark_f32>(color.rgb / color.a, color.a);\\n let innerWidth: f32 = colorMapUniforms.uSize - 1.0;\\n let zSlice0: f32 = min(floor(color.b * innerWidth), innerWidth);\\n let zSlice1: f32 = min(zSlice0 + 1.0, innerWidth);\\n let xOffset: f32 = colorMapUniforms.uSlicePixelSize * 0.5 + color.r * colorMapUniforms.uSliceInnerSize;\\n let s0: f32 = xOffset + (zSlice0 * colorMapUniforms.uSliceSize);\\n let s1: f32 = xOffset + (zSlice1 * colorMapUniforms.uSliceSize);\\n let yOffset: f32 = colorMapUniforms.uSliceSize * 0.5 + color.g * (1.0 - colorMapUniforms.uSliceSize);\\n let slice0Color: vec4__left_angle_mark_f32> = textureSample(uMapTexture, uMapSampler, vec2(s0,yOffset));\\n let slice1Color: vec4__left_angle_mark_f32> = textureSample(uMapTexture, uMapSampler, vec2(s1,yOffset));\\n let zOffset: f32 = fract(color.b * innerWidth);\\n adjusted = mix(slice0Color, slice1Color, zOffset);\\n altColor = vec4__left_angle_mark_f32>(color.rgb * color.a, color.a);\\n\\n let realColor: vec4__left_angle_mark_f32> = select(color, altColor, color.a > 0.0);\\n\\n return vec4__left_angle_mark_f32>(mix(realColor, adjusted, colorMapUniforms.uMix).rgb, realColor.a);\\n}\",__defProp11=Object.defineProperty,__defNormalProp10=(e,t,r)=>t in e?__defProp11(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,__publicField10=(e,t,r)=>(__defNormalProp10(e,\"symbol\"!=typeof t?t+\"\":t,r),r),_ColorMapFilter=class e extends Filter{get mix(){return this.uniforms.uMix}set mix(e){this.uniforms.uMix=e}get colorSize(){return this._size}get colorMap(){return this._colorMap}set colorMap(e){if(!e||e===this.colorMap)return;const t=e instanceof Texture?e.source:e;t.style.scaleMode=this._scaleMode,t.autoGenerateMipmaps=!1,this._size=t.height,this._sliceSize=1/this._size,this._slicePixelSize=this._sliceSize/this._size,this._sliceInnerSize=this._slicePixelSize*(this._size-1),this.uniforms.uSize=this._size,this.uniforms.uSliceSize=this._sliceSize,this.uniforms.uSlicePixelSize=this._slicePixelSize,this.uniforms.uSliceInnerSize=this._sliceInnerSize,this.resources.uMapTexture=t,this._colorMap=e}get nearest(){return this._nearest}set nearest(e){this._nearest=e,this._scaleMode=e?\"nearest\":\"linear\";const t=this._colorMap;t&&t.source&&(t.source.scaleMode=this._scaleMode,t.source.autoGenerateMipmaps=!1,t.source.style.update(),t.source.update())}updateColorMap(){const e=this._colorMap;(null==e?void 0:e.source)&&(e.source.update(),this.colorMap=e)}destroy(){var e;null==(e=this._colorMap)||e.destroy(),super.destroy()}constructor(...t){var r;let n=null!=(r=t[0])?r:{};if((n instanceof Texture||n instanceof TextureSource)&&(deprecation(\"6.0.0\",\"ColorMapFilter constructor params are now options object. See params: { colorMap, nearest, mix }\"),n={colorMap:n},void 0!==t[1]&&(n.nearest=t[1]),void 0!==t[2]&&(n.mix=t[2])),n={...e.DEFAULT_OPTIONS,...n},!n.colorMap)throw Error(\"No color map texture source was provided to ColorMapFilter\");super({gpuProgram:GpuProgram.from({vertex:{source:wgslVertex,entryPoint:\"mainVertex\"},fragment:{source:source12,entryPoint:\"mainFragment\"}}),glProgram:GlProgram.from({vertex:vertex3,fragment:fragment12,name:\"color-map-filter\"}),resources:{colorMapUniforms:{uMix:{value:n.mix,type:\"f32\"},uSize:{value:0,type:\"f32\"},uSliceSize:{value:0,type:\"f32\"},uSlicePixelSize:{value:0,type:\"f32\"},uSliceInnerSize:{value:0,type:\"f32\"}},uMapTexture:n.colorMap.source,uMapSampler:n.colorMap.source.style}}),__publicField10(this,\"uniforms\"),__publicField10(this,\"_size\",0),__publicField10(this,\"_sliceSize\",0),__publicField10(this,\"_slicePixelSize\",0),__publicField10(this,\"_sliceInnerSize\",0),__publicField10(this,\"_nearest\",!1),__publicField10(this,\"_scaleMode\",\"linear\"),__publicField10(this,\"_colorMap\"),this.uniforms=this.resources.colorMapUniforms.uniforms,Object.assign(this,n)}};__publicField10(_ColorMapFilter,\"DEFAULT_OPTIONS\",{colorMap:Texture.WHITE,nearest:!1,mix:1}),init_globals(),init_globals();var fragment13=\"in vec2 vTextureCoord;\\nout vec4 finalColor;\\n\\nuniform sampler2D uTexture;\\nuniform vec3 uColor;\\nuniform float uAlpha;\\n\\nvoid main(void) {\\n vec4 c = texture(uTexture, vTextureCoord);\\n finalColor = vec4(mix(c.rgb, uColor.rgb, c.a * uAlpha), c.a);\\n}\\n\";init_globals();var source13=\"struct ColorOverlayUniforms {\\n uColor: vec3__left_angle_mark_f32>,\\n uAlpha: f32,\\n};\\n\\n@group(0) @binding(1) var uTexture: texture_2d__left_angle_mark_f32>; \\n@group(0) @binding(2) var uSampler: sampler;\\n@group(1) @binding(0) var__left_angle_mark_uniform> colorOverlayUniforms : ColorOverlayUniforms;\\n\\n@fragment\\nfn mainFragment(\\n @builtin(position) position: vec4__left_angle_mark_f32>,\\n @location(0) uv : vec2__left_angle_mark_f32>\\n) -> @location(0) vec4__left_angle_mark_f32> {\\n let c = textureSample(uTexture, uSampler, uv);\\n return vec4__left_angle_mark_f32>(mix(c.rgb, colorOverlayUniforms.uColor.rgb, c.a * colorOverlayUniforms.uAlpha), c.a);\\n}\\n\",__defProp12=Object.defineProperty,__defNormalProp11=(e,t,r)=>t in e?__defProp12(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,__publicField11=(e,t,r)=>(__defNormalProp11(e,\"symbol\"!=typeof t?t+\"\":t,r),r),_ColorOverlayFilter=class e extends Filter{get color(){return this._color.value}set color(e){this._color.setValue(e);const[t,r,n]=this._color.toArray();this.uniforms.uColor[0]=t,this.uniforms.uColor[1]=r,this.uniforms.uColor[2]=n}get alpha(){return this.uniforms.uAlpha}set alpha(e){this.uniforms.uAlpha=e}constructor(...t){var r,n;let i=null!=(r=t[0])?r:{};(\"number\"==typeof i||Array.isArray(i)||i instanceof Float32Array)&&(deprecation(\"6.0.0\",\"ColorOverlayFilter constructor params are now options object. See params: { color, alpha }\"),i={color:i},void 0!==t[1]&&(i.alpha=t[1])),i={...e.DEFAULT_OPTIONS,...i},super({gpuProgram:GpuProgram.from({vertex:{source:wgslVertex,entryPoint:\"mainVertex\"},fragment:{source:source13,entryPoint:\"mainFragment\"}}),glProgram:GlProgram.from({vertex:vertex3,fragment:fragment13,name:\"color-overlay-filter\"}),resources:{colorOverlayUniforms:{uColor:{value:new Float32Array(3),type:\"vec3__left_angle_mark_f32>\"},uAlpha:{value:i.alpha,type:\"f32\"}}}}),__publicField11(this,\"uniforms\"),__publicField11(this,\"_color\"),this.uniforms=this.resources.colorOverlayUniforms.uniforms,this._color=new Color2,this.color=null!=(n=i.color)?n:0}};__publicField11(_ColorOverlayFilter,\"DEFAULT_OPTIONS\",{color:0,alpha:1}),init_globals(),init_globals();var fragment14=\"in vec2 vTextureCoord;\\nout vec4 finalColor;\\n\\nuniform sampler2D uTexture;\\nuniform vec3 uOriginalColor;\\nuniform vec3 uTargetColor;\\nuniform float uTolerance;\\n\\nvoid main(void) {\\n vec4 c = texture(uTexture, vTextureCoord);\\n vec3 colorDiff = uOriginalColor - (c.rgb / max(c.a, 0.0000000001));\\n float colorDistance = length(colorDiff);\\n float doReplace = step(colorDistance, uTolerance);\\n finalColor = vec4(mix(c.rgb, (uTargetColor + colorDiff) * c.a, doReplace), c.a);\\n}\\n\";init_globals();var source14=\"struct ColorReplaceUniforms {\\n uOriginalColor: vec3__left_angle_mark_f32>,\\n uTargetColor: vec3__left_angle_mark_f32>,\\n uTolerance: f32,\\n};\\n\\n@group(0) @binding(1) var uTexture: texture_2d__left_angle_mark_f32>; \\n@group(0) @binding(2) var uSampler: sampler;\\n@group(1) @binding(0) var__left_angle_mark_uniform> colorReplaceUniforms : ColorReplaceUniforms;\\n\\n@fragment\\nfn mainFragment(\\n @builtin(position) position: vec4__left_angle_mark_f32>,\\n @location(0) uv : vec2__left_angle_mark_f32>\\n) -> @location(0) vec4__left_angle_mark_f32> {\\n let sample: vec4__left_angle_mark_f32> = textureSample(uTexture, uSampler, uv);\\n\\n let colorDiff: vec3__left_angle_mark_f32> = colorReplaceUniforms.uOriginalColor - (sample.rgb / max(sample.a, 0.0000000001));\\n let colorDistance: f32 = length(colorDiff);\\n let doReplace: f32 = step(colorDistance, colorReplaceUniforms.uTolerance);\\n\\n return vec4__left_angle_mark_f32>(mix(sample.rgb, (colorReplaceUniforms.uTargetColor + colorDiff) * sample.a, doReplace), sample.a);\\n}\",__defProp13=Object.defineProperty,__defNormalProp12=(e,t,r)=>t in e?__defProp13(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,__publicField12=(e,t,r)=>(__defNormalProp12(e,\"symbol\"!=typeof t?t+\"\":t,r),r),_ColorReplaceFilter=class e extends Filter{get originalColor(){return this._originalColor.value}set originalColor(e){this._originalColor.setValue(e);const[t,r,n]=this._originalColor.toArray();this.uniforms.uOriginalColor[0]=t,this.uniforms.uOriginalColor[1]=r,this.uniforms.uOriginalColor[2]=n}get targetColor(){return this._targetColor.value}set targetColor(e){this._targetColor.setValue(e);const[t,r,n]=this._targetColor.toArray();this.uniforms.uTargetColor[0]=t,this.uniforms.uTargetColor[1]=r,this.uniforms.uTargetColor[2]=n}get tolerance(){return this.uniforms.uTolerance}set tolerance(e){this.uniforms.uTolerance=e}set newColor(e){deprecation(\"6.0.0\",\"ColorReplaceFilter.newColor is deprecated, please use ColorReplaceFilter.targetColor instead\"),this.targetColor=e}get newColor(){return deprecation(\"6.0.0\",\"ColorReplaceFilter.newColor is deprecated, please use ColorReplaceFilter.targetColor instead\"),this.targetColor}set epsilon(e){deprecation(\"6.0.0\",\"ColorReplaceFilter.epsilon is deprecated, please use ColorReplaceFilter.tolerance instead\"),this.tolerance=e}get epsilon(){return deprecation(\"6.0.0\",\"ColorReplaceFilter.epsilon is deprecated, please use ColorReplaceFilter.tolerance instead\"),this.tolerance}constructor(...t){var r,n,i;let o=null!=(r=t[0])?r:{};(\"number\"==typeof o||Array.isArray(o)||o instanceof Float32Array)&&(deprecation(\"6.0.0\",\"ColorReplaceFilter constructor params are now options object. See params: { originalColor, targetColor, tolerance }\"),o={originalColor:o},void 0!==t[1]&&(o.targetColor=t[1]),void 0!==t[2]&&(o.tolerance=t[2])),o={...e.DEFAULT_OPTIONS,...o},super({gpuProgram:GpuProgram.from({vertex:{source:wgslVertex,entryPoint:\"mainVertex\"},fragment:{source:source14,entryPoint:\"mainFragment\"}}),glProgram:GlProgram.from({vertex:vertex3,fragment:fragment14,name:\"color-replace-filter\"}),resources:{colorReplaceUniforms:{uOriginalColor:{value:new Float32Array(3),type:\"vec3__left_angle_mark_f32>\"},uTargetColor:{value:new Float32Array(3),type:\"vec3__left_angle_mark_f32>\"},uTolerance:{value:o.tolerance,type:\"f32\"}}}}),__publicField12(this,\"uniforms\"),__publicField12(this,\"_originalColor\"),__publicField12(this,\"_targetColor\"),this.uniforms=this.resources.colorReplaceUniforms.uniforms,this._originalColor=new Color2,this._targetColor=new Color2,this.originalColor=null!=(n=o.originalColor)?n:16711680,this.targetColor=null!=(i=o.targetColor)?i:0,Object.assign(this,o)}};__publicField12(_ColorReplaceFilter,\"DEFAULT_OPTIONS\",{originalColor:16711680,targetColor:0,tolerance:.4}),init_globals(),init_globals();var fragment15=\"in vec2 vTextureCoord;\\nout vec4 finalColor;\\n\\nuniform sampler2D uTexture;\\nuniform vec2 uTexelSize;\\nuniform mat3 uMatrix;\\n\\nvoid main(void)\\n{\\n vec4 c11 = texture(uTexture, vTextureCoord - uTexelSize); // top left\\n vec4 c12 = texture(uTexture, vec2(vTextureCoord.x, vTextureCoord.y - uTexelSize.y)); // top center\\n vec4 c13 = texture(uTexture, vec2(vTextureCoord.x + uTexelSize.x, vTextureCoord.y - uTexelSize.y)); // top right\\n\\n vec4 c21 = texture(uTexture, vec2(vTextureCoord.x - uTexelSize.x, vTextureCoord.y)); // mid left\\n vec4 c22 = texture(uTexture, vTextureCoord); // mid center\\n vec4 c23 = texture(uTexture, vec2(vTextureCoord.x + uTexelSize.x, vTextureCoord.y)); // mid right\\n\\n vec4 c31 = texture(uTexture, vec2(vTextureCoord.x - uTexelSize.x, vTextureCoord.y + uTexelSize.y)); // bottom left\\n vec4 c32 = texture(uTexture, vec2(vTextureCoord.x, vTextureCoord.y + uTexelSize.y)); // bottom center\\n vec4 c33 = texture(uTexture, vTextureCoord + uTexelSize); // bottom right\\n\\n finalColor =\\n c11 * uMatrix[0][0] + c12 * uMatrix[0][1] + c13 * uMatrix[0][2] +\\n c21 * uMatrix[1][0] + c22 * uMatrix[1][1] + c23 * uMatrix[1][2] +\\n c31 * uMatrix[2][0] + c32 * uMatrix[2][1] + c33 * uMatrix[2][2];\\n\\n finalColor.a = c22.a;\\n}\";init_globals();var source15=\"struct ConvolutionUniforms {\\n uMatrix: mat3x3__left_angle_mark_f32>,\\n uTexelSize: vec2__left_angle_mark_f32>,\\n};\\n\\n@group(0) @binding(1) var uTexture: texture_2d__left_angle_mark_f32>; \\n@group(0) @binding(2) var uSampler: sampler;\\n@group(1) @binding(0) var__left_angle_mark_uniform> convolutionUniforms : ConvolutionUniforms;\\n\\n@fragment\\nfn mainFragment(\\n @location(0) uv: vec2__left_angle_mark_f32>,\\n @builtin(position) position: vec4__left_angle_mark_f32>\\n) -> @location(0) vec4__left_angle_mark_f32> {\\n let texelSize = convolutionUniforms.uTexelSize;\\n let matrix = convolutionUniforms.uMatrix;\\n\\n let c11: vec4__left_angle_mark_f32> = textureSample(uTexture, uSampler, uv - texelSize); // top left\\n let c12: vec4__left_angle_mark_f32> = textureSample(uTexture, uSampler, vec2__left_angle_mark_f32>(uv.x, uv.y - texelSize.y)); // top center\\n let c13: vec4__left_angle_mark_f32> = textureSample(uTexture, uSampler, vec2__left_angle_mark_f32>(uv.x + texelSize.x, uv.y - texelSize.y)); // top right\\n\\n let c21: vec4__left_angle_mark_f32> = textureSample(uTexture, uSampler, vec2__left_angle_mark_f32>(uv.x - texelSize.x, uv.y)); // mid left\\n let c22: vec4__left_angle_mark_f32> = textureSample(uTexture, uSampler, uv); // mid center\\n let c23: vec4__left_angle_mark_f32> = textureSample(uTexture, uSampler, vec2__left_angle_mark_f32>(uv.x + texelSize.x, uv.y)); // mid right\\n\\n let c31: vec4__left_angle_mark_f32> = textureSample(uTexture, uSampler, vec2__left_angle_mark_f32>(uv.x - texelSize.x, uv.y + texelSize.y)); // bottom left\\n let c32: vec4__left_angle_mark_f32> = textureSample(uTexture, uSampler, vec2__left_angle_mark_f32>(uv.x, uv.y + texelSize.y)); // bottom center\\n let c33: vec4__left_angle_mark_f32> = textureSample(uTexture, uSampler, uv + texelSize); // bottom right\\n\\n var finalColor: vec4__left_angle_mark_f32> = vec4__left_angle_mark_f32>(\\n c11 * matrix[0][0] + c12 * matrix[0][1] + c13 * matrix[0][2] +\\n c21 * matrix[1][0] + c22 * matrix[1][1] + c23 * matrix[1][2] +\\n c31 * matrix[2][0] + c32 * matrix[2][1] + c33 * matrix[2][2]\\n );\\n\\n finalColor.a = c22.a;\\n\\n return finalColor;\\n}\",__defProp14=Object.defineProperty,__defNormalProp13=(e,t,r)=>t in e?__defProp14(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,__publicField13=(e,t,r)=>(__defNormalProp13(e,\"symbol\"!=typeof t?t+\"\":t,r),r),_ConvolutionFilter=class e extends Filter{get matrix(){return this.uniforms.uMatrix}set matrix(e){e.forEach(((e,t)=>{this.uniforms.uMatrix[t]=e}))}get width(){return 1/this.uniforms.uTexelSize.x}set width(e){this.uniforms.uTexelSize.x=1/e}get height(){return 1/this.uniforms.uTexelSize.y}set height(e){this.uniforms.uTexelSize.y=1/e}constructor(...t){var r,n,i;let o=null!=(r=t[0])?r:{};Array.isArray(o)&&(deprecation(\"6.0.0\",\"ConvolutionFilter constructor params are now options object. See params: { matrix, width, height }\"),o={matrix:o},void 0!==t[1]&&(o.width=t[1]),void 0!==t[2]&&(o.height=t[2])),o={...e.DEFAULT_OPTIONS,...o};const a=null!=(n=o.width)?n:200,s=null!=(i=o.height)?i:200;super({gpuProgram:GpuProgram.from({vertex:{source:wgslVertex,entryPoint:\"mainVertex\"},fragment:{source:source15,entryPoint:\"mainFragment\"}}),glProgram:GlProgram.from({vertex:vertex3,fragment:fragment15,name:\"convolution-filter\"}),resources:{convolutionUniforms:{uMatrix:{value:o.matrix,type:\"mat3x3__left_angle_mark_f32>\"},uTexelSize:{value:{x:1/a,y:1/s},type:\"vec2__left_angle_mark_f32>\"}}}}),__publicField13(this,\"uniforms\"),this.uniforms=this.resources.convolutionUniforms.uniforms,this.width=a,this.height=s}};__publicField13(_ConvolutionFilter,\"DEFAULT_OPTIONS\",{matrix:new Float32Array(9),width:200,height:200}),init_globals(),init_globals(),init_globals(),init_globals(),init_globals();var fragment17=\"precision highp float;\\nin vec2 vTextureCoord;\\nout vec4 finalColor;\\n\\nuniform sampler2D uTexture;\\nuniform vec4 uLine;\\nuniform vec2 uNoise;\\nuniform vec3 uVignette;\\nuniform float uSeed;\\nuniform float uTime;\\nuniform vec2 uDimensions;\\n\\nuniform vec4 uInputSize;\\n\\nconst float SQRT_2 = 1.414213;\\n\\nfloat rand(vec2 co) {\\n return fract(sin(dot(co.xy, vec2(12.9898, 78.233))) * 43758.5453);\\n}\\n\\nfloat vignette(vec3 co, vec2 coord)\\n{\\n float outter = SQRT_2 - uVignette[0] * SQRT_2;\\n vec2 dir = vec2(0.5) - coord;\\n dir.y *= uDimensions.y / uDimensions.x;\\n float darker = clamp((outter - length(dir) * SQRT_2) / ( 0.00001 + uVignette[2] * SQRT_2), 0.0, 1.0);\\n return darker + (1.0 - darker) * (1.0 - uVignette[1]);\\n}\\n\\nfloat noise(vec2 coord)\\n{\\n vec2 pixelCoord = coord * uInputSize.xy;\\n pixelCoord.x = floor(pixelCoord.x / uNoise[1]);\\n pixelCoord.y = floor(pixelCoord.y / uNoise[1]);\\n return (rand(pixelCoord * uNoise[1] * uSeed) - 0.5) * uNoise[0];\\n}\\n\\nvec3 interlaceLines(vec3 co, vec2 coord)\\n{\\n vec3 color = co;\\n\\n float curvature = uLine[0];\\n float lineWidth = uLine[1];\\n float lineContrast = uLine[2];\\n float verticalLine = uLine[3];\\n\\n vec2 dir = vec2(coord * uInputSize.xy / uDimensions - 0.5);\\n\\n float _c = curvature > 0. ? curvature : 1.;\\n float k = curvature > 0. ? (length(dir * dir) * 0.25 * _c * _c + 0.935 * _c) : 1.;\\n vec2 uv = dir * k;\\n float v = verticalLine > 0.5 ? uv.x * uDimensions.x : uv.y * uDimensions.y;\\n v *= min(1.0, 2.0 / lineWidth ) / _c;\\n float j = 1. + cos(v * 1.2 - uTime) * 0.5 * lineContrast;\\n color *= j;\\n\\n float segment = verticalLine > 0.5 ? mod((dir.x + .5) * uDimensions.x, 4.) : mod((dir.y + .5) * uDimensions.y, 4.);\\n color *= 0.99 + ceil(segment) * 0.015;\\n\\n return color;\\n}\\n\\nvoid main(void)\\n{\\n finalColor = texture(uTexture, vTextureCoord);\\n vec2 coord = vTextureCoord * uInputSize.xy / uDimensions;\\n\\n if (uNoise[0] > 0.0 && uNoise[1] > 0.0)\\n {\\n float n = noise(vTextureCoord);\\n finalColor += vec4(n, n, n, finalColor.a);\\n }\\n\\n if (uVignette[0] > 0.)\\n {\\n float v = vignette(finalColor.rgb, coord);\\n finalColor *= vec4(v, v, v, finalColor.a);\\n }\\n\\n if (uLine[1] > 0.0)\\n {\\n finalColor = vec4(interlaceLines(finalColor.rgb, vTextureCoord), finalColor.a); \\n }\\n}\\n\";init_globals();var source17=\"struct CRTUniforms {\\n uLine: vec4__left_angle_mark_f32>,\\n uNoise: vec2__left_angle_mark_f32>,\\n uVignette: vec3__left_angle_mark_f32>,\\n uSeed: f32,\\n uTime: f32,\\n uDimensions: vec2__left_angle_mark_f32>,\\n};\\n\\nstruct GlobalFilterUniforms {\\n uInputSize:vec4__left_angle_mark_f32>,\\n uInputPixel:vec4__left_angle_mark_f32>,\\n uInputClamp:vec4__left_angle_mark_f32>,\\n uOutputFrame:vec4__left_angle_mark_f32>,\\n uGlobalFrame:vec4__left_angle_mark_f32>,\\n uOutputTexture:vec4__left_angle_mark_f32>,\\n};\\n\\n@group(0) @binding(0) var__left_angle_mark_uniform> gfu: GlobalFilterUniforms;\\n\\n@group(0) @binding(1) var uTexture: texture_2d__left_angle_mark_f32>; \\n@group(0) @binding(2) var uSampler: sampler;\\n@group(1) @binding(0) var__left_angle_mark_uniform> crtUniforms : CRTUniforms;\\n\\n@fragment\\nfn mainFragment(\\n @builtin(position) position: vec4__left_angle_mark_f32>,\\n @location(0) uv : vec2__left_angle_mark_f32>\\n) -> @location(0) vec4__left_angle_mark_f32> {\\n \\n var color: vec4__left_angle_mark_f32> = textureSample(uTexture, uSampler, uv);\\n let coord: vec2__left_angle_mark_f32> = uv * gfu.uInputSize.xy / crtUniforms.uDimensions;\\n\\n let uNoise = crtUniforms.uNoise;\\n\\n if (uNoise[0] > 0.0 && uNoise[1] > 0.0)\\n {\\n color += vec4__left_angle_mark_f32>(vec3__left_angle_mark_f32>(noise(uv)), color.a);\\n }\\n\\n if (crtUniforms.uVignette[0] > 0.)\\n {\\n color *= vec4__left_angle_mark_f32>(vec3__left_angle_mark_f32>(vignette(color.rgb, coord)), color.a);\\n }\\n\\n if (crtUniforms.uLine[1] > 0.0)\\n {\\n color = vec4__left_angle_mark_f32>(vec3__left_angle_mark_f32>(interlaceLines(color.rgb, uv)), color.a); \\n }\\n\\n return color;\\n}\\n\\nconst SQRT_2: f32 = 1.414213;\\n\\nfn modulo(x: f32, y: f32) -> f32\\n{\\n return x - y * floor(x/y);\\n}\\n\\nfn rand(co: vec2__left_angle_mark_f32>) -> f32\\n{\\n return fract(sin(dot(co, vec2__left_angle_mark_f32>(12.9898, 78.233))) * 43758.5453);\\n}\\n\\nfn vignette(co: vec3__left_angle_mark_f32>, coord: vec2__left_angle_mark_f32>) -> f32\\n{\\n let uVignette = crtUniforms.uVignette;\\n let uDimensions = crtUniforms.uDimensions;\\n \\n let outter: f32 = SQRT_2 - uVignette[0] * SQRT_2;\\n var dir: vec2__left_angle_mark_f32> = vec2__left_angle_mark_f32>(0.5) - coord;\\n dir.y *= uDimensions.y / uDimensions.x;\\n let darker: f32 = clamp((outter - length(dir) * SQRT_2) / ( 0.00001 + uVignette[2] * SQRT_2), 0.0, 1.0);\\n return darker + (1.0 - darker) * (1.0 - uVignette[1]);\\n}\\n\\nfn noise(coord: vec2__left_angle_mark_f32>) -> f32\\n{\\n let uNoise = crtUniforms.uNoise;\\n let uSeed = crtUniforms.uSeed;\\n\\n var pixelCoord: vec2__left_angle_mark_f32> = coord * gfu.uInputSize.xy;\\n pixelCoord.x = floor(pixelCoord.x / uNoise[1]);\\n pixelCoord.y = floor(pixelCoord.y / uNoise[1]);\\n return (rand(pixelCoord * uNoise[1] * uSeed) - 0.5) * uNoise[0];\\n}\\n\\nfn interlaceLines(co: vec3__left_angle_mark_f32>, coord: vec2__left_angle_mark_f32>) -> vec3__left_angle_mark_f32>\\n{\\n var color = co;\\n\\n let uDimensions = crtUniforms.uDimensions;\\n\\n let curvature: f32 = crtUniforms.uLine[0];\\n let lineWidth: f32 = crtUniforms.uLine[1];\\n let lineContrast: f32 = crtUniforms.uLine[2];\\n let verticalLine: f32 = crtUniforms.uLine[3];\\n\\n let dir: vec2__left_angle_mark_f32> = vec2__left_angle_mark_f32>(coord * gfu.uInputSize.xy / uDimensions - 0.5);\\n\\n let _c: f32 = select(1., curvature, curvature > 0.);\\n let k: f32 = select(1., (length(dir * dir) * 0.25 * _c * _c + 0.935 * _c), curvature > 0.);\\n let uv: vec2__left_angle_mark_f32> = dir * k;\\n let v: f32 = select(uv.y * uDimensions.y, uv.x * uDimensions.x, verticalLine > 0.5) * min(1.0, 2.0 / lineWidth ) / _c;\\n let j: f32 = 1. + cos(v * 1.2 - crtUniforms.uTime) * 0.5 * lineContrast;\\n color *= j;\\n\\n let segment: f32 = select(modulo((dir.y + .5) * uDimensions.y, 4.), modulo((dir.x + .5) * uDimensions.x, 4.), verticalLine > 0.5);\\n color *= 0.99 + ceil(segment) * 0.015;\\n\\n return color;\\n}\",__defProp15=Object.defineProperty,__defNormalProp14=(e,t,r)=>t in e?__defProp15(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,__publicField14=(e,t,r)=>(__defNormalProp14(e,\"symbol\"!=typeof t?t+\"\":t,r),r),_CRTFilter=class e extends Filter{apply(e,t,r,n){this.uniforms.uDimensions[0]=t.frame.width,this.uniforms.uDimensions[1]=t.frame.height,this.uniforms.uSeed=this.seed,this.uniforms.uTime=this.time,e.applyFilter(this,t,r,n)}get curvature(){return this.uniforms.uLine[0]}set curvature(e){this.uniforms.uLine[0]=e}get lineWidth(){return this.uniforms.uLine[1]}set lineWidth(e){this.uniforms.uLine[1]=e}get lineContrast(){return this.uniforms.uLine[2]}set lineContrast(e){this.uniforms.uLine[2]=e}get verticalLine(){return this.uniforms.uLine[3]>.5}set verticalLine(e){this.uniforms.uLine[3]=e?1:0}get noise(){return this.uniforms.uNoise[0]}set noise(e){this.uniforms.uNoise[0]=e}get noiseSize(){return this.uniforms.uNoise[1]}set noiseSize(e){this.uniforms.uNoise[1]=e}get vignetting(){return this.uniforms.uVignette[0]}set vignetting(e){this.uniforms.uVignette[0]=e}get vignettingAlpha(){return this.uniforms.uVignette[1]}set vignettingAlpha(e){this.uniforms.uVignette[1]=e}get vignettingBlur(){return this.uniforms.uVignette[2]}set vignettingBlur(e){this.uniforms.uVignette[2]=e}constructor(t){t={...e.DEFAULT_OPTIONS,...t},super({gpuProgram:GpuProgram.from({vertex:{source:wgslVertex,entryPoint:\"mainVertex\"},fragment:{source:source17,entryPoint:\"mainFragment\"}}),glProgram:GlProgram.from({vertex:vertex3,fragment:fragment17,name:\"crt-filter\"}),resources:{crtUniforms:{uLine:{value:new Float32Array(4),type:\"vec4__left_angle_mark_f32>\"},uNoise:{value:new Float32Array(2),type:\"vec2__left_angle_mark_f32>\"},uVignette:{value:new Float32Array(3),type:\"vec3__left_angle_mark_f32>\"},uSeed:{value:t.seed,type:\"f32\"},uTime:{value:t.time,type:\"f32\"},uDimensions:{value:new Float32Array(2),type:\"vec2__left_angle_mark_f32>\"}}}}),__publicField14(this,\"uniforms\"),__publicField14(this,\"seed\"),__publicField14(this,\"time\"),this.uniforms=this.resources.crtUniforms.uniforms,Object.assign(this,t)}};__publicField14(_CRTFilter,\"DEFAULT_OPTIONS\",{curvature:1,lineWidth:1,lineContrast:.25,verticalLine:!1,noise:0,noiseSize:1,vignetting:.3,vignettingAlpha:1,vignettingBlur:.3,time:0,seed:0}),init_globals(),init_globals();var fragment18=\"precision highp float;\\nin vec2 vTextureCoord;\\nout vec4 finalColor;\\n\\nuniform sampler2D uTexture;\\nuniform float uAngle;\\nuniform float uScale;\\nuniform bool uGrayScale;\\n\\nuniform vec4 uInputSize;\\n\\nfloat pattern()\\n{\\n float s = sin(uAngle), c = cos(uAngle);\\n vec2 tex = vTextureCoord * uInputSize.xy;\\n vec2 point = vec2(\\n c * tex.x - s * tex.y,\\n s * tex.x + c * tex.y\\n ) * uScale;\\n return (sin(point.x) * sin(point.y)) * 4.0;\\n }\\n\\n void main()\\n {\\n vec4 color = texture(uTexture, vTextureCoord);\\n vec3 colorRGB = vec3(color);\\n\\n if (uGrayScale)\\n {\\n colorRGB = vec3(color.r + color.g + color.b) / 3.0;\\n }\\n\\n finalColor = vec4(colorRGB * 10.0 - 5.0 + pattern(), color.a);\\n}\\n\";init_globals();var source18=\"struct DotUniforms {\\n uScale:f32,\\n uAngle:f32,\\n uGrayScale:f32,\\n};\\n\\nstruct GlobalFilterUniforms {\\n uInputSize:vec4__left_angle_mark_f32>,\\n uInputPixel:vec4__left_angle_mark_f32>,\\n uInputClamp:vec4__left_angle_mark_f32>,\\n uOutputFrame:vec4__left_angle_mark_f32>,\\n uGlobalFrame:vec4__left_angle_mark_f32>,\\n uOutputTexture:vec4__left_angle_mark_f32>,\\n};\\n\\n@group(0) @binding(0) var__left_angle_mark_uniform> gfu: GlobalFilterUniforms;\\n\\n@group(0) @binding(1) var uTexture: texture_2d__left_angle_mark_f32>; \\n@group(0) @binding(2) var uSampler: sampler;\\n@group(1) @binding(0) var__left_angle_mark_uniform> dotUniforms : DotUniforms;\\n\\n@fragment\\nfn mainFragment(\\n @location(0) uv: vec2__left_angle_mark_f32>,\\n @builtin(position) position: vec4__left_angle_mark_f32>\\n) -> @location(0) vec4__left_angle_mark_f32> {\\n let color: vec4__left_angle_mark_f32> = textureSample(uTexture, uSampler, uv);\\n let gray: vec3__left_angle_mark_f32> = vec3__left_angle_mark_f32>(dot(color.rgb, vec3__left_angle_mark_f32>(0.299, 0.587, 0.114)));\\n // dotUniforms.uGrayScale == 1 doesn't ever pass so it is converted to a float and compared to 0.5 instead \\n let finalColor: vec3__left_angle_mark_f32> = select(color.rgb, gray, f32(dotUniforms.uGrayScale) >= 0.5);\\n\\n return vec4__left_angle_mark_f32>(finalColor * 10.0 - 5.0 + pattern(uv), color.a);\\n}\\n\\nfn pattern(uv: vec2__left_angle_mark_f32>) -> f32\\n{\\n let s: f32 = sin(dotUniforms.uAngle);\\n let c: f32 = cos(dotUniforms.uAngle);\\n \\n let tex: vec2__left_angle_mark_f32> = uv * gfu.uInputSize.xy;\\n \\n let p: vec2__left_angle_mark_f32> = vec2__left_angle_mark_f32>(\\n c * tex.x - s * tex.y,\\n s * tex.x + c * tex.y\\n ) * dotUniforms.uScale;\\n\\n return (sin(p.x) * sin(p.y)) * 4.0;\\n}\",__defProp16=Object.defineProperty,__defNormalProp15=(e,t,r)=>t in e?__defProp16(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,__publicField15=(e,t,r)=>(__defNormalProp15(e,\"symbol\"!=typeof t?t+\"\":t,r),r),_DotFilter=class e extends Filter{get scale(){return this.resources.dotUniforms.uniforms.uScale}set scale(e){this.resources.dotUniforms.uniforms.uScale=e}get angle(){return this.resources.dotUniforms.uniforms.uAngle}set angle(e){this.resources.dotUniforms.uniforms.uAngle=e}get grayscale(){return 1===this.resources.dotUniforms.uniforms.uGrayScale}set grayscale(e){this.resources.dotUniforms.uniforms.uGrayScale=e?1:0}constructor(...t){var r;let n=null!=(r=t[0])?r:{};\"number\"==typeof n&&(deprecation(\"6.0.0\",\"DotFilter constructor params are now options object. See params: { scale, angle, grayscale }\"),n={scale:n},void 0!==t[1]&&(n.angle=t[1]),void 0!==t[2]&&(n.grayscale=t[2])),n={...e.DEFAULT_OPTIONS,...n};const i={uScale:{value:n.scale,type:\"f32\"},uAngle:{value:n.angle,type:\"f32\"},uGrayScale:{value:n.grayscale?1:0,type:\"f32\"}};super({gpuProgram:GpuProgram.from({vertex:{source:wgslVertex,entryPoint:\"mainVertex\"},fragment:{source:source18,entryPoint:\"mainFragment\"}}),glProgram:GlProgram.from({vertex:vertex3,fragment:fragment18,name:\"dot-filter\"}),resources:{dotUniforms:i}})}};__publicField15(_DotFilter,\"DEFAULT_OPTIONS\",{scale:1,angle:5,grayscale:!0}),init_globals(),init_globals();var fragment19=\"precision highp float;\\nin vec2 vTextureCoord;\\nout vec4 finalColor;\\n\\nuniform sampler2D uTexture;\\nuniform float uAlpha;\\nuniform vec3 uColor;\\nuniform vec2 uOffset;\\n\\nuniform vec4 uInputSize;\\n\\nvoid main(void){\\n vec4 sample = texture(uTexture, vTextureCoord - uOffset * uInputSize.zw);\\n\\n // Premultiply alpha\\n sample.rgb = uColor.rgb * sample.a;\\n\\n // alpha user alpha\\n sample *= uAlpha;\\n\\n finalColor = sample;\\n}\";init_globals();var source19=\"struct DropShadowUniforms {\\n uAlpha: f32,\\n uColor: vec3__left_angle_mark_f32>,\\n uOffset: vec2__left_angle_mark_f32>,\\n};\\n\\nstruct GlobalFilterUniforms {\\n uInputSize:vec4__left_angle_mark_f32>,\\n uInputPixel:vec4__left_angle_mark_f32>,\\n uInputClamp:vec4__left_angle_mark_f32>,\\n uOutputFrame:vec4__left_angle_mark_f32>,\\n uGlobalFrame:vec4__left_angle_mark_f32>,\\n uOutputTexture:vec4__left_angle_mark_f32>,\\n};\\n\\n@group(0) @binding(0) var__left_angle_mark_uniform> gfu: GlobalFilterUniforms;\\n\\n@group(0) @binding(1) var uTexture: texture_2d__left_angle_mark_f32>; \\n@group(0) @binding(2) var uSampler: sampler;\\n@group(1) @binding(0) var__left_angle_mark_uniform> dropShadowUniforms : DropShadowUniforms;\\n\\n@fragment\\nfn mainFragment(\\n @builtin(position) position: vec4__left_angle_mark_f32>,\\n @location(0) uv : vec2__left_angle_mark_f32>\\n) -> @location(0) vec4__left_angle_mark_f32> {\\n var color: vec4__left_angle_mark_f32> = textureSample(uTexture, uSampler, uv - dropShadowUniforms.uOffset * gfu.uInputSize.zw);\\n\\n // Premultiply alpha\\n color = vec4__left_angle_mark_f32>(vec3__left_angle_mark_f32>(dropShadowUniforms.uColor.rgb * color.a), color.a);\\n // alpha user alpha\\n color *= dropShadowUniforms.uAlpha;\\n\\n return color;\\n}\",__defProp17=Object.defineProperty,__defNormalProp16=(e,t,r)=>t in e?__defProp17(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,__publicField16=(e,t,r)=>(__defNormalProp16(e,\"symbol\"!=typeof t?t+\"\":t,r),r),_DropShadowFilter=class e extends Filter{apply(e,t,r,n){const i=TexturePool.getSameSizeTexture(t);e.applyFilter(this,t,i,!0),this._blurFilter.apply(e,i,r,n),this.shadowOnly||e.applyFilter(this._basePass,t,r,!1),TexturePool.returnTexture(i)}get offset(){return this.uniforms.uOffset}set offset(e){this.uniforms.uOffset=e,this._updatePadding()}get offsetX(){return this.offset.x}set offsetX(e){this.offset.x=e,this._updatePadding()}get offsetY(){return this.offset.y}set offsetY(e){this.offset.y=e,this._updatePadding()}get color(){return this._color.value}set color(e){this._color.setValue(e);const[t,r,n]=this._color.toArray();this.uniforms.uColor[0]=t,this.uniforms.uColor[1]=r,this.uniforms.uColor[2]=n}get alpha(){return this.uniforms.uAlpha}set alpha(e){this.uniforms.uAlpha=e}get blur(){return this._blurFilter.strength}set blur(e){this._blurFilter.strength=e,this._updatePadding()}get quality(){return this._blurFilter.quality}set quality(e){this._blurFilter.quality=e,this._updatePadding()}get kernels(){return this._blurFilter.kernels}set kernels(e){this._blurFilter.kernels=e}get pixelSize(){return this._blurFilter.pixelSize}set pixelSize(e){\"number\"==typeof e&&(e={x:e,y:e}),Array.isArray(e)&&(e={x:e[0],y:e[1]}),this._blurFilter.pixelSize=e}get pixelSizeX(){return this._blurFilter.pixelSizeX}set pixelSizeX(e){this._blurFilter.pixelSizeX=e}get pixelSizeY(){return this._blurFilter.pixelSizeY}set pixelSizeY(e){this._blurFilter.pixelSizeY=e}_updatePadding(){const e=Math.max(Math.abs(this.offsetX),Math.abs(this.offsetY));this.padding=e+2*this.blur+4*this.quality}constructor(t){var r,n;t={...e.DEFAULT_OPTIONS,...t},super({gpuProgram:GpuProgram.from({vertex:{source:wgslVertex,entryPoint:\"mainVertex\"},fragment:{source:source19,entryPoint:\"mainFragment\"}}),glProgram:GlProgram.from({vertex:vertex3,fragment:fragment19,name:\"drop-shadow-filter\"}),resources:{dropShadowUniforms:{uAlpha:{value:t.alpha,type:\"f32\"},uColor:{value:new Float32Array(3),type:\"vec3__left_angle_mark_f32>\"},uOffset:{value:t.offset,type:\"vec2__left_angle_mark_f32>\"}}},resolution:t.resolution}),__publicField16(this,\"uniforms\"),__publicField16(this,\"shadowOnly\",!1),__publicField16(this,\"_color\"),__publicField16(this,\"_blurFilter\"),__publicField16(this,\"_basePass\"),this.uniforms=this.resources.dropShadowUniforms.uniforms,this._color=new Color2,this.color=null!=(r=t.color)?r:0,this._blurFilter=new KawaseBlurFilter({strength:null!=(n=t.kernels)?n:t.blur,quality:t.kernels?void 0:t.quality}),this._basePass=new Filter({gpuProgram:GpuProgram.from({vertex:{source:wgslVertex,entryPoint:\"mainVertex\"},fragment:{source:\"\\n @group(0) @binding(1) var uTexture: texture_2d__left_angle_mark_f32>; \\n @group(0) @binding(2) var uSampler: sampler;\\n @fragment\\n fn mainFragment(\\n @builtin(position) position: vec4__left_angle_mark_f32>,\\n @location(0) uv : vec2__left_angle_mark_f32>\\n ) -> @location(0) vec4__left_angle_mark_f32> {\\n return textureSample(uTexture, uSampler, uv);\\n }\\n \",entryPoint:\"mainFragment\"}}),glProgram:GlProgram.from({vertex:vertex3,fragment:\"\\n in vec2 vTextureCoord;\\n out vec4 finalColor;\\n uniform sampler2D uTexture;\\n\\n void main(void){\\n finalColor = texture(uTexture, vTextureCoord);\\n }\\n \",name:\"drop-shadow-filter\"}),resources:{}}),Object.assign(this,t)}};__publicField16(_DropShadowFilter,\"DEFAULT_OPTIONS\",{offset:{x:4,y:4},color:0,alpha:.5,shadowOnly:!1,kernels:void 0,blur:2,quality:3,pixelSize:{x:1,y:1},resolution:1});var DropShadowFilter=_DropShadowFilter;init_globals(),init_globals(),init_globals(),init_globals(),init_globals();var fragment21=\"precision highp float;\\nin vec2 vTextureCoord;\\nout vec4 finalColor;\\n\\nuniform sampler2D uTexture;\\nuniform sampler2D uDisplacementMap;\\nuniform float uSeed;\\nuniform vec2 uDimensions;\\nuniform float uAspect;\\nuniform float uFillMode;\\nuniform float uOffset;\\nuniform float uDirection;\\nuniform vec2 uRed;\\nuniform vec2 uGreen;\\nuniform vec2 uBlue;\\n\\nuniform vec4 uInputSize;\\nuniform vec4 uInputClamp;\\n\\nconst int TRANSPARENT = 0;\\nconst int ORIGINAL = 1;\\nconst int LOOP = 2;\\nconst int CLAMP = 3;\\nconst int MIRROR = 4;\\n\\nvoid main(void)\\n{\\n vec2 coord = (vTextureCoord * uInputSize.xy) / uDimensions;\\n\\n if (coord.x > 1.0 || coord.y > 1.0) {\\n return;\\n }\\n\\n float sinDir = sin(uDirection);\\n float cosDir = cos(uDirection);\\n\\n float cx = coord.x - 0.5;\\n float cy = (coord.y - 0.5) * uAspect;\\n float ny = (-sinDir * cx + cosDir * cy) / uAspect + 0.5;\\n\\n // displacementMap: repeat\\n // ny = ny > 1.0 ? ny - 1.0 : (ny __left_angle_mark_ 0.0 ? 1.0 + ny : ny);\\n\\n // displacementMap: mirror\\n ny = ny > 1.0 ? 2.0 - ny : (ny __left_angle_mark_ 0.0 ? -ny : ny);\\n\\n vec4 dc = texture(uDisplacementMap, vec2(0.5, ny));\\n\\n float displacement = (dc.r - dc.g) * (uOffset / uInputSize.x);\\n\\n coord = vTextureCoord + vec2(cosDir * displacement, sinDir * displacement * uAspect);\\n\\n int fillMode = int(uFillMode);\\n\\n if (fillMode == CLAMP) {\\n coord = clamp(coord, uInputClamp.xy, uInputClamp.zw);\\n } else {\\n if( coord.x > uInputClamp.z ) {\\n if (fillMode == TRANSPARENT) {\\n discard;\\n } else if (fillMode == LOOP) {\\n coord.x -= uInputClamp.z;\\n } else if (fillMode == MIRROR) {\\n coord.x = uInputClamp.z * 2.0 - coord.x;\\n }\\n } else if( coord.x __left_angle_mark_ uInputClamp.x ) {\\n if (fillMode == TRANSPARENT) {\\n discard;\\n } else if (fillMode == LOOP) {\\n coord.x += uInputClamp.z;\\n } else if (fillMode == MIRROR) {\\n coord.x *= -uInputClamp.z;\\n }\\n }\\n\\n if( coord.y > uInputClamp.w ) {\\n if (fillMode == TRANSPARENT) {\\n discard;\\n } else if (fillMode == LOOP) {\\n coord.y -= uInputClamp.w;\\n } else if (fillMode == MIRROR) {\\n coord.y = uInputClamp.w * 2.0 - coord.y;\\n }\\n } else if( coord.y __left_angle_mark_ uInputClamp.y ) {\\n if (fillMode == TRANSPARENT) {\\n discard;\\n } else if (fillMode == LOOP) {\\n coord.y += uInputClamp.w;\\n } else if (fillMode == MIRROR) {\\n coord.y *= -uInputClamp.w;\\n }\\n }\\n }\\n\\n finalColor.r = texture(uTexture, coord + uRed * (1.0 - uSeed * 0.4) / uInputSize.xy).r;\\n finalColor.g = texture(uTexture, coord + uGreen * (1.0 - uSeed * 0.3) / uInputSize.xy).g;\\n finalColor.b = texture(uTexture, coord + uBlue * (1.0 - uSeed * 0.2) / uInputSize.xy).b;\\n finalColor.a = texture(uTexture, coord).a;\\n}\\n\";init_globals();var source21=\"struct GlitchUniforms {\\n uSeed: f32,\\n uDimensions: vec2__left_angle_mark_f32>,\\n uAspect: f32,\\n uFillMode: f32,\\n uOffset: f32,\\n uDirection: f32,\\n uRed: vec2__left_angle_mark_f32>,\\n uGreen: vec2__left_angle_mark_f32>,\\n uBlue: vec2__left_angle_mark_f32>,\\n};\\n\\nstruct GlobalFilterUniforms {\\n uInputSize:vec4__left_angle_mark_f32>,\\n uInputPixel:vec4__left_angle_mark_f32>,\\n uInputClamp:vec4__left_angle_mark_f32>,\\n uOutputFrame:vec4__left_angle_mark_f32>,\\n uGlobalFrame:vec4__left_angle_mark_f32>,\\n uOutputTexture:vec4__left_angle_mark_f32>,\\n};\\n\\n@group(0) @binding(0) var__left_angle_mark_uniform> gfu: GlobalFilterUniforms;\\n\\n@group(0) @binding(1) var uTexture: texture_2d__left_angle_mark_f32>; \\n@group(0) @binding(2) var uSampler: sampler;\\n@group(1) @binding(0) var__left_angle_mark_uniform> glitchUniforms : GlitchUniforms;\\n@group(1) @binding(1) var uDisplacementMap: texture_2d__left_angle_mark_f32>; \\n@group(1) @binding(2) var uDisplacementSampler: sampler; \\n\\n@fragment\\nfn mainFragment(\\n @builtin(position) position: vec4__left_angle_mark_f32>,\\n @location(0) uv : vec2__left_angle_mark_f32>\\n) -> @location(0) vec4__left_angle_mark_f32> {\\n let uSeed: f32 = glitchUniforms.uSeed;\\n let uDimensions: vec2__left_angle_mark_f32> = glitchUniforms.uDimensions;\\n let uAspect: f32 = glitchUniforms.uAspect;\\n let uOffset: f32 = glitchUniforms.uOffset;\\n let uDirection: f32 = glitchUniforms.uDirection;\\n let uRed: vec2__left_angle_mark_f32> = glitchUniforms.uRed;\\n let uGreen: vec2__left_angle_mark_f32> = glitchUniforms.uGreen;\\n let uBlue: vec2__left_angle_mark_f32> = glitchUniforms.uBlue;\\n\\n let uInputSize: vec4__left_angle_mark_f32> = gfu.uInputSize;\\n let uInputClamp: vec4__left_angle_mark_f32> = gfu.uInputClamp;\\n\\n var discarded: bool = false;\\n var coord: vec2__left_angle_mark_f32> = (uv * uInputSize.xy) / uDimensions;\\n\\n if (coord.x > 1.0 || coord.y > 1.0) {\\n discarded = true;\\n }\\n\\n let sinDir: f32 = sin(uDirection);\\n let cosDir: f32 = cos(uDirection);\\n\\n let cx: f32 = coord.x - 0.5;\\n let cy: f32 = (coord.y - 0.5) * uAspect;\\n var ny: f32 = (-sinDir * cx + cosDir * cy) / uAspect + 0.5;\\n\\n ny = select(select(ny, -ny, ny __left_angle_mark_ 0.0), 2.0 - ny, ny > 1.0);\\n\\n let dc: vec4__left_angle_mark_f32> = textureSample(uDisplacementMap, uDisplacementSampler, vec2__left_angle_mark_f32>(0.5, ny));\\n\\n let displacement: f32 = (dc.r - dc.g) * (uOffset / uInputSize.x);\\n\\n coord = uv + vec2__left_angle_mark_f32>(cosDir * displacement, sinDir * displacement * uAspect);\\n\\n let fillMode: i32 = i32(glitchUniforms.uFillMode);\\n\\n if (fillMode == CLAMP) {\\n coord = clamp(coord, uInputClamp.xy, uInputClamp.zw);\\n } else {\\n if (coord.x > uInputClamp.z) {\\n if (fillMode == TRANSPARENT) {\\n discarded = true;\\n } else if (fillMode == LOOP) {\\n coord.x = coord.x - uInputClamp.z;\\n } else if (fillMode == MIRROR) {\\n coord.x = uInputClamp.z * 2.0 - coord.x;\\n }\\n } else if (coord.x __left_angle_mark_ uInputClamp.x) {\\n if (fillMode == TRANSPARENT) {\\n discarded = true;\\n } else if (fillMode == LOOP) {\\n coord.x = coord.x + uInputClamp.z;\\n } else if (fillMode == MIRROR) {\\n coord.x = coord.x * -uInputClamp.z;\\n }\\n }\\n\\n if (coord.y > uInputClamp.w) {\\n if (fillMode == TRANSPARENT) {\\n discarded = true;\\n } else if (fillMode == LOOP) {\\n coord.y = coord.y - uInputClamp.w;\\n } else if (fillMode == MIRROR) {\\n coord.y = uInputClamp.w * 2.0 - coord.y;\\n }\\n } else if (coord.y __left_angle_mark_ uInputClamp.y) {\\n if (fillMode == TRANSPARENT) {\\n discarded = true;\\n } else if (fillMode == LOOP) {\\n coord.y = coord.y + uInputClamp.w;\\n } else if (fillMode == MIRROR) {\\n coord.y = coord.y * -uInputClamp.w;\\n }\\n }\\n }\\n\\n let seedR: f32 = 1.0 - uSeed * 0.4;\\n let seedG: f32 = 1.0 - uSeed * 0.3;\\n let seedB: f32 = 1.0 - uSeed * 0.2;\\n\\n let offsetR: vec2__left_angle_mark_f32> = vec2(uRed.x * seedR / uInputSize.x, uRed.y * seedR / uInputSize.y);\\n let offsetG: vec2__left_angle_mark_f32> = vec2(uGreen.x * seedG / uInputSize.x, uGreen.y * seedG / uInputSize.y);\\n let offsetB: vec2__left_angle_mark_f32> = vec2(uBlue.x * seedB / uInputSize.x, uBlue.y * seedB / uInputSize.y);\\n\\n let r = textureSample(uTexture, uSampler, coord + offsetR).r;\\n let g = textureSample(uTexture, uSampler, coord + offsetG).g;\\n let b = textureSample(uTexture, uSampler, coord + offsetB).b;\\n let a = textureSample(uTexture, uSampler, coord).a;\\n\\n return select(vec4__left_angle_mark_f32>(r, g, b, a), vec4__left_angle_mark_f32>(0.0,0.0,0.0,0.0), discarded);\\n}\\n\\nconst TRANSPARENT: i32 = 0;\\nconst ORIGINAL: i32 = 1;\\nconst LOOP: i32 = 2;\\nconst CLAMP: i32 = 3;\\nconst MIRROR: i32 = 4;\",__defProp18=Object.defineProperty,__defNormalProp17=(e,t,r)=>t in e?__defProp18(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,__publicField17=(e,t,r)=>(__defNormalProp17(e,\"symbol\"!=typeof t?t+\"\":t,r),r),_GlitchFilter=class e extends Filter{apply(e,t,r,n){const{width:i,height:o}=t.frame;this.uniforms.uDimensions[0]=i,this.uniforms.uDimensions[1]=o,this.uniforms.uAspect=o/i,e.applyFilter(this,t,r,n)}_randomizeSizes(){const e=this._sizes,t=this._slices-1,r=this.sampleSize,n=Math.min(this.minSize/r,.9/this._slices);if(this.average){const r=this._slices;let i=1;for(let o=0;o__left_angle_mark_t;o++){const t=i/(r-o),a=Math.max(t*(1-.6*Math.random()),n);e[o]=a,i-=a}e[t]=i}else{let r=1;const i=Math.sqrt(1/this._slices);for(let o=0;o__left_angle_mark_t;o++){const t=Math.max(i*r*Math.random(),n);e[o]=t,r-=t}e[t]=r}this.shuffle()}shuffle(){const e=this._sizes;for(let t=this._slices-1;t>0;t--){const r=Math.random()*t|0,n=e[t];e[t]=e[r],e[r]=n}}_randomizeOffsets(){for(let e=0;e__left_angle_mark_this._slices;e++)this._offsets[e]=Math.random()*(Math.random()__left_angle_mark_.5?-1:1)}refresh(){this._randomizeSizes(),this._randomizeOffsets(),this.redraw()}redraw(){const e=this.sampleSize,t=this.texture,r=this._canvas.getContext(\"2d\");let n;r.clearRect(0,0,8,e);let i=0;for(let o=0;o__left_angle_mark_this._slices;o++){n=Math.floor(256*this._offsets[o]);const t=this._sizes[o]*e,a=n>0?n:0,s=n__left_angle_mark_0?-n:0;r.fillStyle=`rgba(${a}, ${s}, 0, 1)`,r.fillRect(0,0|i,e,t+1|0),i+=t}t.source.update()}set sizes(e){const t=Math.min(this._slices,e.length);for(let r=0;r__left_angle_mark_t;r++)this._sizes[r]=e[r]}get sizes(){return this._sizes}set offsets(e){const t=Math.min(this._slices,e.length);for(let r=0;r__left_angle_mark_t;r++)this._offsets[r]=e[r]}get offsets(){return this._offsets}get slices(){return this._slices}set slices(e){this._slices!==e&&(this._slices=e,this._sizes=new Float32Array(e),this._offsets=new Float32Array(e),this.refresh())}get offset(){return this.uniforms.uOffset}set offset(e){this.uniforms.uOffset=e}get seed(){return this.uniforms.uSeed}set seed(e){this.uniforms.uSeed=e}get fillMode(){return this.uniforms.uFillMode}set fillMode(e){this.uniforms.uFillMode=e}get direction(){return this.uniforms.uDirection/DEG_TO_RAD}set direction(e){this.uniforms.uDirection=e*DEG_TO_RAD}get red(){return this.uniforms.uRed}set red(e){Array.isArray(e)&&(e={x:e[0],y:e[1]}),this.uniforms.uRed=e}get green(){return this.uniforms.uGreen}set green(e){Array.isArray(e)&&(e={x:e[0],y:e[1]}),this.uniforms.uGreen=e}get blue(){return this.uniforms.uBlue}set blue(e){Array.isArray(e)&&(e={x:e[0],y:e[1]}),this.uniforms.uBlue=e}destroy(){var e;null==(e=this.texture)||e.destroy(!0),this.texture=this._canvas=this.red=this.green=this.blue=this._sizes=this._offsets=null}constructor(t){var r,n,i,o,a;t={...e.defaults,...t};const s=GpuProgram.from({vertex:{source:wgslVertex,entryPoint:\"mainVertex\"},fragment:{source:source21,entryPoint:\"mainFragment\"}}),l=GlProgram.from({vertex:vertex3,fragment:fragment21,name:\"glitch-filter\"}),u=document.createElement(\"canvas\");u.width=4,u.height=null!=(r=t.sampleSize)?r:512;const c=new Texture({source:new ImageSource({resource:u})});super({gpuProgram:s,glProgram:l,resources:{glitchUniforms:{uSeed:{value:null!=(n=null==t?void 0:t.seed)?n:0,type:\"f32\"},uDimensions:{value:new Float32Array(2),type:\"vec2__left_angle_mark_f32>\"},uAspect:{value:1,type:\"f32\"},uFillMode:{value:null!=(i=null==t?void 0:t.fillMode)?i:0,type:\"f32\"},uOffset:{value:null!=(o=null==t?void 0:t.offset)?o:100,type:\"f32\"},uDirection:{value:null!=(a=null==t?void 0:t.direction)?a:0,type:\"f32\"},uRed:{value:t.red,type:\"vec2__left_angle_mark_f32>\"},uGreen:{value:t.green,type:\"vec2__left_angle_mark_f32>\"},uBlue:{value:t.blue,type:\"vec2__left_angle_mark_f32>\"}},uDisplacementMap:c.source,uDisplacementSampler:c.source.style}}),__publicField17(this,\"uniforms\"),__publicField17(this,\"average\",!1),__publicField17(this,\"minSize\",8),__publicField17(this,\"sampleSize\",512),__publicField17(this,\"_canvas\"),__publicField17(this,\"texture\"),__publicField17(this,\"_slices\",0),__publicField17(this,\"_sizes\",new Float32Array(1)),__publicField17(this,\"_offsets\",new Float32Array(1)),this.uniforms=this.resources.glitchUniforms.uniforms,this._canvas=u,this.texture=c,Object.assign(this,t)}};__publicField17(_GlitchFilter,\"defaults\",{slices:5,offset:100,direction:0,fillMode:0,average:!1,seed:0,red:{x:0,y:0},green:{x:0,y:0},blue:{x:0,y:0},minSize:8,sampleSize:512}),init_globals(),init_globals();var fragment22=\"precision highp float;\\nin vec2 vTextureCoord;\\nout vec4 finalColor;\\n\\nuniform sampler2D uTexture;\\nuniform vec2 uStrength;\\nuniform vec3 uColor;\\nuniform float uKnockout;\\nuniform float uAlpha;\\n\\nuniform vec4 uInputSize;\\nuniform vec4 uInputClamp;\\n\\nconst float PI = 3.14159265358979323846264;\\n\\n// Hard-assignment of DIST and ANGLE_STEP_SIZE instead of using uDistance and uQuality to allow them to be use on GLSL loop conditions\\nconst float DIST = __DIST__;\\nconst float ANGLE_STEP_SIZE = min(__ANGLE_STEP_SIZE__, PI * 2.);\\nconst float ANGLE_STEP_NUM = ceil(PI * 2. / ANGLE_STEP_SIZE);\\nconst float MAX_TOTAL_ALPHA = ANGLE_STEP_NUM * DIST * (DIST + 1.) / 2.;\\n\\nvoid main(void) {\\n vec2 px = vec2(1.) / uInputSize.xy;\\n\\n float totalAlpha = 0.;\\n\\n vec2 direction;\\n vec2 displaced;\\n vec4 curColor;\\n\\n for (float angle = 0.; angle __left_angle_mark_ PI * 2.; angle += ANGLE_STEP_SIZE) {\\n direction = vec2(cos(angle), sin(angle)) * px;\\n\\n for (float curDistance = 0.; curDistance __left_angle_mark_ DIST; curDistance++) {\\n displaced = clamp(vTextureCoord + direction * (curDistance + 1.), uInputClamp.xy, uInputClamp.zw);\\n curColor = texture(uTexture, displaced);\\n totalAlpha += (DIST - curDistance) * curColor.a;\\n }\\n }\\n \\n curColor = texture(uTexture, vTextureCoord);\\n\\n vec4 glowColor = vec4(uColor, uAlpha);\\n bool knockout = uKnockout > .5;\\n float innerStrength = uStrength[0];\\n float outerStrength = uStrength[1];\\n\\n float alphaRatio = totalAlpha / MAX_TOTAL_ALPHA;\\n float innerGlowAlpha = (1. - alphaRatio) * innerStrength * curColor.a * uAlpha;\\n float innerGlowStrength = min(1., innerGlowAlpha);\\n \\n vec4 innerColor = mix(curColor, glowColor, innerGlowStrength);\\n float outerGlowAlpha = alphaRatio * outerStrength * (1. - curColor.a) * uAlpha;\\n float outerGlowStrength = min(1. - innerColor.a, outerGlowAlpha);\\n vec4 outerGlowColor = outerGlowStrength * glowColor.rgba;\\n\\n if (knockout) {\\n float resultAlpha = outerGlowAlpha + innerGlowAlpha;\\n finalColor = vec4(glowColor.rgb * resultAlpha, resultAlpha);\\n }\\n else {\\n finalColor = innerColor + outerGlowColor;\\n }\\n}\\n\";init_globals();var source22=\"struct GlowUniforms {\\n uDistance: f32,\\n uStrength: vec2__left_angle_mark_f32>,\\n uColor: vec3__left_angle_mark_f32>,\\n uAlpha: f32,\\n uQuality: f32,\\n uKnockout: f32,\\n};\\n\\nstruct GlobalFilterUniforms {\\n uInputSize:vec4__left_angle_mark_f32>,\\n uInputPixel:vec4__left_angle_mark_f32>,\\n uInputClamp:vec4__left_angle_mark_f32>,\\n uOutputFrame:vec4__left_angle_mark_f32>,\\n uGlobalFrame:vec4__left_angle_mark_f32>,\\n uOutputTexture:vec4__left_angle_mark_f32>,\\n};\\n\\n@group(0) @binding(0) var__left_angle_mark_uniform> gfu: GlobalFilterUniforms;\\n\\n@group(0) @binding(1) var uTexture: texture_2d__left_angle_mark_f32>; \\n@group(0) @binding(2) var uSampler: sampler;\\n@group(1) @binding(0) var__left_angle_mark_uniform> glowUniforms : GlowUniforms;\\n\\n@fragment\\nfn mainFragment(\\n @builtin(position) position: vec4__left_angle_mark_f32>,\\n @location(0) uv : vec2__left_angle_mark_f32>\\n) -> @location(0) vec4__left_angle_mark_f32> {\\n let quality = glowUniforms.uQuality;\\n let distance = glowUniforms.uDistance;\\n\\n let dist: f32 = glowUniforms.uDistance;\\n let angleStepSize: f32 = min(1. / quality / distance, PI * 2.0);\\n let angleStepNum: f32 = ceil(PI * 2.0 / angleStepSize);\\n\\n let px: vec2__left_angle_mark_f32> = vec2__left_angle_mark_f32>(1.0 / gfu.uInputSize.xy);\\n\\n var totalAlpha: f32 = 0.0;\\n\\n var direction: vec2__left_angle_mark_f32>;\\n var displaced: vec2__left_angle_mark_f32>;\\n var curColor: vec4__left_angle_mark_f32>;\\n\\n for (var angle = 0.0; angle __left_angle_mark_ PI * 2.0; angle += angleStepSize) {\\n direction = vec2__left_angle_mark_f32>(cos(angle), sin(angle)) * px;\\n for (var curDistance = 0.0; curDistance __left_angle_mark_ dist; curDistance+=1) {\\n displaced = vec2__left_angle_mark_f32>(clamp(uv + direction * (curDistance + 1.0), gfu.uInputClamp.xy, gfu.uInputClamp.zw));\\n curColor = textureSample(uTexture, uSampler, displaced);\\n totalAlpha += (dist - curDistance) * curColor.a;\\n }\\n }\\n \\n curColor = textureSample(uTexture, uSampler, uv);\\n\\n let glowColorRGB = glowUniforms.uColor;\\n let glowAlpha = glowUniforms.uAlpha;\\n let glowColor = vec4__left_angle_mark_f32>(glowColorRGB, glowAlpha);\\n let knockout: bool = glowUniforms.uKnockout > 0.5;\\n let innerStrength = glowUniforms.uStrength[0];\\n let outerStrength = glowUniforms.uStrength[1];\\n\\n let alphaRatio: f32 = (totalAlpha / (angleStepNum * dist * (dist + 1.0) / 2.0));\\n let innerGlowAlpha: f32 = (1.0 - alphaRatio) * innerStrength * curColor.a * glowAlpha;\\n let innerGlowStrength: f32 = min(1.0, innerGlowAlpha);\\n \\n let innerColor: vec4__left_angle_mark_f32> = mix(curColor, glowColor, innerGlowStrength);\\n let outerGlowAlpha: f32 = alphaRatio * outerStrength * (1. - curColor.a) * glowAlpha;\\n let outerGlowStrength: f32 = min(1.0 - innerColor.a, outerGlowAlpha);\\n let outerGlowColor: vec4__left_angle_mark_f32> = outerGlowStrength * glowColor.rgba;\\n \\n if (knockout) {\\n let resultAlpha: f32 = outerGlowAlpha + innerGlowAlpha;\\n return vec4__left_angle_mark_f32>(glowColor.rgb * resultAlpha, resultAlpha);\\n }\\n else {\\n return innerColor + outerGlowColor;\\n }\\n}\\n\\nconst PI: f32 = 3.14159265358979323846264;\",__defProp19=Object.defineProperty,__defNormalProp18=(e,t,r)=>t in e?__defProp19(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,__publicField18=(e,t,r)=>(__defNormalProp18(e,\"symbol\"!=typeof t?t+\"\":t,r),r),_GlowFilter=class e extends Filter{get distance(){return this.uniforms.uDistance}set distance(e){this.uniforms.uDistance=this.padding=e}get innerStrength(){return this.uniforms.uStrength[0]}set innerStrength(e){this.uniforms.uStrength[0]=e}get outerStrength(){return this.uniforms.uStrength[1]}set outerStrength(e){this.uniforms.uStrength[1]=e}get color(){return this._color.value}set color(e){this._color.setValue(e);const[t,r,n]=this._color.toArray();this.uniforms.uColor[0]=t,this.uniforms.uColor[1]=r,this.uniforms.uColor[2]=n}get alpha(){return this.uniforms.uAlpha}set alpha(e){this.uniforms.uAlpha=e}get quality(){return this.uniforms.uQuality}set quality(e){this.uniforms.uQuality=e}get knockout(){return 1===this.uniforms.uKnockout}set knockout(e){this.uniforms.uKnockout=e?1:0}constructor(t){var r,n,i,o;const a=null!=(r=(t={...e.DEFAULT_OPTIONS,...t}).distance)?r:10,s=null!=(n=t.quality)?n:.1;super({gpuProgram:GpuProgram.from({vertex:{source:wgslVertex,entryPoint:\"mainVertex\"},fragment:{source:source22,entryPoint:\"mainFragment\"}}),glProgram:GlProgram.from({vertex:vertex3,fragment:fragment22.replace(/__ANGLE_STEP_SIZE__/gi,`${(1/s/a).toFixed(7)}`).replace(/__DIST__/gi,`${a.toFixed(0)}.0`),name:\"glow-filter\"}),resources:{glowUniforms:{uDistance:{value:a,type:\"f32\"},uStrength:{value:[t.innerStrength,t.outerStrength],type:\"vec2__left_angle_mark_f32>\"},uColor:{value:new Float32Array(3),type:\"vec3__left_angle_mark_f32>\"},uAlpha:{value:t.alpha,type:\"f32\"},uQuality:{value:s,type:\"f32\"},uKnockout:{value:null!=(i=null==t?void 0:t.knockout)&&i?1:0,type:\"f32\"}}},padding:a}),__publicField18(this,\"uniforms\"),__publicField18(this,\"_color\"),this.uniforms=this.resources.glowUniforms.uniforms,this._color=new Color2,this.color=null!=(o=t.color)?o:16777215}};__publicField18(_GlowFilter,\"DEFAULT_OPTIONS\",{distance:10,outerStrength:4,innerStrength:0,color:16777215,alpha:1,quality:.1,knockout:!1}),init_globals(),init_globals();var fragment23=\"precision highp float;\\nin vec2 vTextureCoord;\\nout vec4 finalColor;\\n\\nuniform sampler2D uTexture;\\nuniform vec2 uDimensions;\\nuniform float uParallel;\\nuniform vec2 uLight;\\nuniform float uAspect;\\nuniform float uTime;\\nuniform vec3 uRay;\\n\\nuniform vec4 uInputSize;\\n\\n${PERLIN}\\n\\nvoid main(void) {\\n vec2 uDimensions = uDimensions;\\n bool uParallel = uParallel > 0.5;\\n vec2 uLight = uLight;\\n float uAspect = uAspect;\\n\\n vec2 coord = vTextureCoord * uInputSize.xy / uDimensions;\\n\\n float d;\\n\\n if (uParallel) {\\n float _cos = uLight.x;\\n float _sin = uLight.y;\\n d = (_cos * coord.x) + (_sin * coord.y * uAspect);\\n } else {\\n float dx = coord.x - uLight.x / uDimensions.x;\\n float dy = (coord.y - uLight.y / uDimensions.y) * uAspect;\\n float dis = sqrt(dx * dx + dy * dy) + 0.00001;\\n d = dy / dis;\\n }\\n\\n float uTime = uTime;\\n vec3 uRay = uRay;\\n\\n float gain = uRay[0];\\n float lacunarity = uRay[1];\\n float alpha = uRay[2];\\n\\n vec3 dir = vec3(d, d, 0.0);\\n float noise = turb(dir + vec3(uTime, 0.0, 62.1 + uTime) * 0.05, vec3(480.0, 320.0, 480.0), lacunarity, gain);\\n noise = mix(noise, 0.0, 0.3);\\n //fade vertically.\\n vec4 mist = vec4(vec3(noise), 1.0) * (1.0 - coord.y);\\n mist.a = 1.0;\\n // apply user alpha\\n mist *= alpha;\\n\\n finalColor = texture(uTexture, vTextureCoord) + mist;\\n}\\n\";init_globals();var source23=\"struct GodrayUniforms {\\n uLight: vec2__left_angle_mark_f32>,\\n uParallel: f32,\\n uAspect: f32,\\n uTime: f32,\\n uRay: vec3__left_angle_mark_f32>,\\n uDimensions: vec2__left_angle_mark_f32>,\\n};\\n\\nstruct GlobalFilterUniforms {\\n uInputSize:vec4__left_angle_mark_f32>,\\n uInputPixel:vec4__left_angle_mark_f32>,\\n uInputClamp:vec4__left_angle_mark_f32>,\\n uOutputFrame:vec4__left_angle_mark_f32>,\\n uGlobalFrame:vec4__left_angle_mark_f32>,\\n uOutputTexture:vec4__left_angle_mark_f32>,\\n};\\n\\n@group(0) @binding(0) var__left_angle_mark_uniform> gfu: GlobalFilterUniforms;\\n\\n@group(0) @binding(1) var uTexture: texture_2d__left_angle_mark_f32>; \\n@group(0) @binding(2) var uSampler: sampler;\\n@group(1) @binding(0) var__left_angle_mark_uniform> godrayUniforms : GodrayUniforms;\\n\\n@fragment\\nfn mainFragment(\\n @builtin(position) position: vec4__left_angle_mark_f32>,\\n @location(0) uv : vec2__left_angle_mark_f32>\\n) -> @location(0) vec4__left_angle_mark_f32> {\\n let uDimensions: vec2__left_angle_mark_f32> = godrayUniforms.uDimensions;\\n let uParallel: bool = godrayUniforms.uParallel > 0.5;\\n let uLight: vec2__left_angle_mark_f32> = godrayUniforms.uLight;\\n let uAspect: f32 = godrayUniforms.uAspect;\\n\\n let coord: vec2__left_angle_mark_f32> = uv * gfu.uInputSize.xy / uDimensions;\\n\\n var d: f32;\\n\\n if (uParallel) {\\n let _cos: f32 = uLight.x;\\n let _sin: f32 = uLight.y;\\n d = (_cos * coord.x) + (_sin * coord.y * uAspect);\\n } else {\\n let dx: f32 = coord.x - uLight.x / uDimensions.x;\\n let dy: f32 = (coord.y - uLight.y / uDimensions.y) * uAspect;\\n let dis: f32 = sqrt(dx * dx + dy * dy) + 0.00001;\\n d = dy / dis;\\n }\\n\\n let uTime: f32 = godrayUniforms.uTime;\\n let uRay: vec3__left_angle_mark_f32> = godrayUniforms.uRay;\\n \\n let gain = uRay[0];\\n let lacunarity = uRay[1];\\n let alpha = uRay[2];\\n\\n let dir: vec3__left_angle_mark_f32> = vec3__left_angle_mark_f32>(d, d, 0.0);\\n var noise: f32 = turb(dir + vec3__left_angle_mark_f32>(uTime, 0.0, 62.1 + uTime) * 0.05, vec3__left_angle_mark_f32>(480.0, 320.0, 480.0), lacunarity, gain);\\n noise = mix(noise, 0.0, 0.3);\\n //fade vertically.\\n var mist: vec4__left_angle_mark_f32> = vec4__left_angle_mark_f32>(vec3__left_angle_mark_f32>(noise), 1.0) * (1.0 - coord.y);\\n mist.a = 1.0;\\n // apply user alpha\\n mist *= alpha;\\n return textureSample(uTexture, uSampler, uv) + mist;\\n}\\n\\n${PERLIN}\";init_globals();var perlin=\"vec3 mod289(vec3 x)\\n{\\n return x - floor(x * (1.0 / 289.0)) * 289.0;\\n}\\nvec4 mod289(vec4 x)\\n{\\n return x - floor(x * (1.0 / 289.0)) * 289.0;\\n}\\nvec4 permute(vec4 x)\\n{\\n return mod289(((x * 34.0) + 1.0) * x);\\n}\\nvec4 taylorInvSqrt(vec4 r)\\n{\\n return 1.79284291400159 - 0.85373472095314 * r;\\n}\\nvec3 fade(vec3 t)\\n{\\n return t * t * t * (t * (t * 6.0 - 15.0) + 10.0);\\n}\\n// Classic Perlin noise, periodic variant\\nfloat pnoise(vec3 P, vec3 rep)\\n{\\n vec3 Pi0 = mod(floor(P), rep); // Integer part, modulo period\\n vec3 Pi1 = mod(Pi0 + vec3(1.0), rep); // Integer part + 1, mod period\\n Pi0 = mod289(Pi0);\\n Pi1 = mod289(Pi1);\\n vec3 Pf0 = fract(P); // Fractional part for interpolation\\n vec3 Pf1 = Pf0 - vec3(1.0); // Fractional part - 1.0\\n vec4 ix = vec4(Pi0.x, Pi1.x, Pi0.x, Pi1.x);\\n vec4 iy = vec4(Pi0.yy, Pi1.yy);\\n vec4 iz0 = Pi0.zzzz;\\n vec4 iz1 = Pi1.zzzz;\\n vec4 ixy = permute(permute(ix) + iy);\\n vec4 ixy0 = permute(ixy + iz0);\\n vec4 ixy1 = permute(ixy + iz1);\\n vec4 gx0 = ixy0 * (1.0 / 7.0);\\n vec4 gy0 = fract(floor(gx0) * (1.0 / 7.0)) - 0.5;\\n gx0 = fract(gx0);\\n vec4 gz0 = vec4(0.5) - abs(gx0) - abs(gy0);\\n vec4 sz0 = step(gz0, vec4(0.0));\\n gx0 -= sz0 * (step(0.0, gx0) - 0.5);\\n gy0 -= sz0 * (step(0.0, gy0) - 0.5);\\n vec4 gx1 = ixy1 * (1.0 / 7.0);\\n vec4 gy1 = fract(floor(gx1) * (1.0 / 7.0)) - 0.5;\\n gx1 = fract(gx1);\\n vec4 gz1 = vec4(0.5) - abs(gx1) - abs(gy1);\\n vec4 sz1 = step(gz1, vec4(0.0));\\n gx1 -= sz1 * (step(0.0, gx1) - 0.5);\\n gy1 -= sz1 * (step(0.0, gy1) - 0.5);\\n vec3 g000 = vec3(gx0.x, gy0.x, gz0.x);\\n vec3 g100 = vec3(gx0.y, gy0.y, gz0.y);\\n vec3 g010 = vec3(gx0.z, gy0.z, gz0.z);\\n vec3 g110 = vec3(gx0.w, gy0.w, gz0.w);\\n vec3 g001 = vec3(gx1.x, gy1.x, gz1.x);\\n vec3 g101 = vec3(gx1.y, gy1.y, gz1.y);\\n vec3 g011 = vec3(gx1.z, gy1.z, gz1.z);\\n vec3 g111 = vec3(gx1.w, gy1.w, gz1.w);\\n vec4 norm0 = taylorInvSqrt(vec4(dot(g000, g000), dot(g010, g010), dot(g100, g100), dot(g110, g110)));\\n g000 *= norm0.x;\\n g010 *= norm0.y;\\n g100 *= norm0.z;\\n g110 *= norm0.w;\\n vec4 norm1 = taylorInvSqrt(vec4(dot(g001, g001), dot(g011, g011), dot(g101, g101), dot(g111, g111)));\\n g001 *= norm1.x;\\n g011 *= norm1.y;\\n g101 *= norm1.z;\\n g111 *= norm1.w;\\n float n000 = dot(g000, Pf0);\\n float n100 = dot(g100, vec3(Pf1.x, Pf0.yz));\\n float n010 = dot(g010, vec3(Pf0.x, Pf1.y, Pf0.z));\\n float n110 = dot(g110, vec3(Pf1.xy, Pf0.z));\\n float n001 = dot(g001, vec3(Pf0.xy, Pf1.z));\\n float n101 = dot(g101, vec3(Pf1.x, Pf0.y, Pf1.z));\\n float n011 = dot(g011, vec3(Pf0.x, Pf1.yz));\\n float n111 = dot(g111, Pf1);\\n vec3 fade_xyz = fade(Pf0);\\n vec4 n_z = mix(vec4(n000, n100, n010, n110), vec4(n001, n101, n011, n111), fade_xyz.z);\\n vec2 n_yz = mix(n_z.xy, n_z.zw, fade_xyz.y);\\n float n_xyz = mix(n_yz.x, n_yz.y, fade_xyz.x);\\n return 2.2 * n_xyz;\\n}\\nfloat turb(vec3 P, vec3 rep, float lacunarity, float gain)\\n{\\n float sum = 0.0;\\n float sc = 1.0;\\n float totalgain = 1.0;\\n for (float i = 0.0; i __left_angle_mark_ 6.0; i++)\\n {\\n sum += totalgain * pnoise(P * sc, rep);\\n sc *= lacunarity;\\n totalgain *= gain;\\n }\\n return abs(sum);\\n}\\n\";init_globals();var sourcePerlin=\"// Taken from https://gist.github.com/munrocket/236ed5ba7e409b8bdf1ff6eca5dcdc39\\n\\nfn moduloVec3(x: vec3__left_angle_mark_f32>, y: vec3__left_angle_mark_f32>) -> vec3__left_angle_mark_f32>\\n{\\n return x - y * floor(x/y);\\n}\\nfn mod289Vec3(x: vec3__left_angle_mark_f32>) -> vec3__left_angle_mark_f32>\\n{\\n return x - floor(x * (1.0 / 289.0)) * 289.0;\\n}\\nfn mod289Vec4(x: vec4__left_angle_mark_f32>) -> vec4__left_angle_mark_f32>\\n{\\n return x - floor(x * (1.0 / 289.0)) * 289.0;\\n}\\nfn permute4(x: vec4__left_angle_mark_f32>) -> vec4__left_angle_mark_f32>\\n{\\n return mod289Vec4(((x * 34.0) + 1.0) * x);\\n}\\nfn taylorInvSqrt(r: vec4__left_angle_mark_f32>) -> vec4__left_angle_mark_f32>\\n{\\n return 1.79284291400159 - 0.85373472095314 * r;\\n}\\nfn fade3(t: vec3__left_angle_mark_f32>) -> vec3__left_angle_mark_f32>\\n{\\n return t * t * t * (t * (t * 6.0 - 15.0) + 10.0);\\n}\\nfn fade2(t: vec2__left_angle_mark_f32>) -> vec2__left_angle_mark_f32> { return t * t * t * (t * (t * 6. - 15.) + 10.); }\\n\\nfn perlinNoise2(P: vec2__left_angle_mark_f32>) -> f32 {\\n var Pi: vec4__left_angle_mark_f32> = floor(P.xyxy) + vec4__left_angle_mark_f32>(0., 0., 1., 1.);\\n let Pf = fract(P.xyxy) - vec4__left_angle_mark_f32>(0., 0., 1., 1.);\\n Pi = Pi % vec4__left_angle_mark_f32>(289.); // To avoid truncation effects in permutation\\n let ix = Pi.xzxz;\\n let iy = Pi.yyww;\\n let fx = Pf.xzxz;\\n let fy = Pf.yyww;\\n let i = permute4(permute4(ix) + iy);\\n var gx: vec4__left_angle_mark_f32> = 2. * fract(i * 0.0243902439) - 1.; // 1/41 = 0.024...\\n let gy = abs(gx) - 0.5;\\n let tx = floor(gx + 0.5);\\n gx = gx - tx;\\n var g00: vec2__left_angle_mark_f32> = vec2__left_angle_mark_f32>(gx.x, gy.x);\\n var g10: vec2__left_angle_mark_f32> = vec2__left_angle_mark_f32>(gx.y, gy.y);\\n var g01: vec2__left_angle_mark_f32> = vec2__left_angle_mark_f32>(gx.z, gy.z);\\n var g11: vec2__left_angle_mark_f32> = vec2__left_angle_mark_f32>(gx.w, gy.w);\\n let norm = 1.79284291400159 - 0.85373472095314 *\\n vec4__left_angle_mark_f32>(dot(g00, g00), dot(g01, g01), dot(g10, g10), dot(g11, g11));\\n g00 = g00 * norm.x;\\n g01 = g01 * norm.y;\\n g10 = g10 * norm.z;\\n g11 = g11 * norm.w;\\n let n00 = dot(g00, vec2__left_angle_mark_f32>(fx.x, fy.x));\\n let n10 = dot(g10, vec2__left_angle_mark_f32>(fx.y, fy.y));\\n let n01 = dot(g01, vec2__left_angle_mark_f32>(fx.z, fy.z));\\n let n11 = dot(g11, vec2__left_angle_mark_f32>(fx.w, fy.w));\\n let fade_xy = fade2(Pf.xy);\\n let n_x = mix(vec2__left_angle_mark_f32>(n00, n01), vec2__left_angle_mark_f32>(n10, n11), vec2__left_angle_mark_f32>(fade_xy.x));\\n let n_xy = mix(n_x.x, n_x.y, fade_xy.y);\\n return 2.3 * n_xy;\\n}\\n\\n// Classic Perlin noise, periodic variant\\nfn perlinNoise3(P: vec3__left_angle_mark_f32>, rep: vec3__left_angle_mark_f32>) -> f32\\n{\\n var Pi0: vec3__left_angle_mark_f32> = moduloVec3(floor(P), rep); // Integer part, modulo period\\n var Pi1: vec3__left_angle_mark_f32> = moduloVec3(Pi0 + vec3__left_angle_mark_f32>(1.0), rep); // Integer part + 1, mod period\\n Pi0 = mod289Vec3(Pi0);\\n Pi1 = mod289Vec3(Pi1);\\n let Pf0: vec3__left_angle_mark_f32> = fract(P); // Fractional part for interpolation\\n let Pf1: vec3__left_angle_mark_f32> = Pf0 - vec3__left_angle_mark_f32>(1.0); // Fractional part - 1.0\\n let ix: vec4__left_angle_mark_f32> = vec4__left_angle_mark_f32>(Pi0.x, Pi1.x, Pi0.x, Pi1.x);\\n let iy: vec4__left_angle_mark_f32> = vec4__left_angle_mark_f32>(Pi0.yy, Pi1.yy);\\n let iz0: vec4__left_angle_mark_f32> = Pi0.zzzz;\\n let iz1: vec4__left_angle_mark_f32> = Pi1.zzzz;\\n let ixy: vec4__left_angle_mark_f32> = permute4(permute4(ix) + iy);\\n let ixy0: vec4__left_angle_mark_f32> = permute4(ixy + iz0);\\n let ixy1: vec4__left_angle_mark_f32> = permute4(ixy + iz1);\\n var gx0: vec4__left_angle_mark_f32> = ixy0 * (1.0 / 7.0);\\n var gy0: vec4__left_angle_mark_f32> = fract(floor(gx0) * (1.0 / 7.0)) - 0.5;\\n gx0 = fract(gx0);\\n let gz0: vec4__left_angle_mark_f32> = vec4__left_angle_mark_f32>(0.5) - abs(gx0) - abs(gy0);\\n let sz0: vec4__left_angle_mark_f32> = step(gz0, vec4__left_angle_mark_f32>(0.0));\\n gx0 -= sz0 * (step(vec4__left_angle_mark_f32>(0.0), gx0) - 0.5);\\n gy0 -= sz0 * (step(vec4__left_angle_mark_f32>(0.0), gy0) - 0.5);\\n var gx1: vec4__left_angle_mark_f32> = ixy1 * (1.0 / 7.0);\\n var gy1: vec4__left_angle_mark_f32> = fract(floor(gx1) * (1.0 / 7.0)) - 0.5;\\n gx1 = fract(gx1);\\n let gz1: vec4__left_angle_mark_f32> = vec4__left_angle_mark_f32>(0.5) - abs(gx1) - abs(gy1);\\n let sz1: vec4__left_angle_mark_f32> = step(gz1, vec4__left_angle_mark_f32>(0.0));\\n gx1 -= sz1 * (step(vec4__left_angle_mark_f32>(0.0), gx1) - 0.5);\\n gy1 -= sz1 * (step(vec4__left_angle_mark_f32>(0.0), gy1) - 0.5);\\n var g000: vec3__left_angle_mark_f32> = vec3__left_angle_mark_f32>(gx0.x, gy0.x, gz0.x);\\n var g100: vec3__left_angle_mark_f32> = vec3__left_angle_mark_f32>(gx0.y, gy0.y, gz0.y);\\n var g010: vec3__left_angle_mark_f32> = vec3__left_angle_mark_f32>(gx0.z, gy0.z, gz0.z);\\n var g110: vec3__left_angle_mark_f32> = vec3__left_angle_mark_f32>(gx0.w, gy0.w, gz0.w);\\n var g001: vec3__left_angle_mark_f32> = vec3__left_angle_mark_f32>(gx1.x, gy1.x, gz1.x);\\n var g101: vec3__left_angle_mark_f32> = vec3__left_angle_mark_f32>(gx1.y, gy1.y, gz1.y);\\n var g011: vec3__left_angle_mark_f32> = vec3__left_angle_mark_f32>(gx1.z, gy1.z, gz1.z);\\n var g111: vec3__left_angle_mark_f32> = vec3__left_angle_mark_f32>(gx1.w, gy1.w, gz1.w);\\n let norm0: vec4__left_angle_mark_f32> = taylorInvSqrt(vec4__left_angle_mark_f32>(dot(g000, g000), dot(g010, g010), dot(g100, g100), dot(g110, g110)));\\n g000 *= norm0.x;\\n g010 *= norm0.y;\\n g100 *= norm0.z;\\n g110 *= norm0.w;\\n let norm1: vec4__left_angle_mark_f32> = taylorInvSqrt(vec4__left_angle_mark_f32>(dot(g001, g001), dot(g011, g011), dot(g101, g101), dot(g111, g111)));\\n g001 *= norm1.x;\\n g011 *= norm1.y;\\n g101 *= norm1.z;\\n g111 *= norm1.w;\\n let n000: f32 = dot(g000, Pf0);\\n let n100: f32 = dot(g100, vec3__left_angle_mark_f32>(Pf1.x, Pf0.yz));\\n let n010: f32 = dot(g010, vec3__left_angle_mark_f32>(Pf0.x, Pf1.y, Pf0.z));\\n let n110: f32 = dot(g110, vec3__left_angle_mark_f32>(Pf1.xy, Pf0.z));\\n let n001: f32 = dot(g001, vec3__left_angle_mark_f32>(Pf0.xy, Pf1.z));\\n let n101: f32 = dot(g101, vec3__left_angle_mark_f32>(Pf1.x, Pf0.y, Pf1.z));\\n let n011: f32 = dot(g011, vec3__left_angle_mark_f32>(Pf0.x, Pf1.yz));\\n let n111: f32 = dot(g111, Pf1);\\n let fade_xyz: vec3__left_angle_mark_f32> = fade3(Pf0);\\n let n_z: vec4__left_angle_mark_f32> = mix(vec4__left_angle_mark_f32>(n000, n100, n010, n110), vec4__left_angle_mark_f32>(n001, n101, n011, n111), fade_xyz.z);\\n let n_yz: vec2__left_angle_mark_f32> = mix(n_z.xy, n_z.zw, fade_xyz.y);\\n let n_xyz: f32 = mix(n_yz.x, n_yz.y, fade_xyz.x);\\n return 2.2 * n_xyz;\\n}\\nfn turb(P: vec3__left_angle_mark_f32>, rep: vec3__left_angle_mark_f32>, lacunarity: f32, gain: f32) -> f32\\n{\\n var sum: f32 = 0.0;\\n var sc: f32 = 1.0;\\n var totalgain: f32 = 1.0;\\n for (var i = 0.0; i __left_angle_mark_ 6.0; i += 1)\\n {\\n sum += totalgain * perlinNoise3(P * sc, rep);\\n sc *= lacunarity;\\n totalgain *= gain;\\n }\\n return abs(sum);\\n}\",__defProp20=Object.defineProperty,__defNormalProp19=(e,t,r)=>t in e?__defProp20(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,__publicField19=(e,t,r)=>(__defNormalProp19(e,\"symbol\"!=typeof t?t+\"\":t,r),r),_GodrayFilter=class e extends Filter{apply(e,t,r,n){const i=t.frame.width,o=t.frame.height;this.uniforms.uLight[0]=this.parallel?this._angleLight[0]:this._center.x,this.uniforms.uLight[1]=this.parallel?this._angleLight[1]:this._center.y,this.uniforms.uDimensions[0]=i,this.uniforms.uDimensions[1]=o,this.uniforms.uAspect=o/i,this.uniforms.uTime=this.time,e.applyFilter(this,t,r,n)}get angle(){return this._angle}set angle(e){this._angle=e;const t=e*DEG_TO_RAD;this._angleLight[0]=Math.cos(t),this._angleLight[1]=Math.sin(t)}get parallel(){return this.uniforms.uParallel>.5}set parallel(e){this.uniforms.uParallel=e?1:0}get center(){return this._center}set center(e){Array.isArray(e)&&(e={x:e[0],y:e[1]}),this._center=e}get centerX(){return this.center.x}set centerX(e){this.center.x=e}get centerY(){return this.center.y}set centerY(e){this.center.y=e}get gain(){return this.uniforms.uRay[0]}set gain(e){this.uniforms.uRay[0]=e}get lacunarity(){return this.uniforms.uRay[1]}set lacunarity(e){this.uniforms.uRay[1]=e}get alpha(){return this.uniforms.uRay[2]}set alpha(e){this.uniforms.uRay[2]=e}constructor(t){t={...e.DEFAULT_OPTIONS,...t},super({gpuProgram:GpuProgram.from({vertex:{source:wgslVertex,entryPoint:\"mainVertex\"},fragment:{source:source23.replace(\"${PERLIN}\",sourcePerlin),entryPoint:\"mainFragment\"}}),glProgram:GlProgram.from({vertex:vertex3,fragment:fragment23.replace(\"${PERLIN}\",perlin),name:\"god-ray-filter\"}),resources:{godrayUniforms:{uLight:{value:new Float32Array(2),type:\"vec2__left_angle_mark_f32>\"},uParallel:{value:0,type:\"f32\"},uAspect:{value:0,type:\"f32\"},uTime:{value:t.time,type:\"f32\"},uRay:{value:new Float32Array(3),type:\"vec3__left_angle_mark_f32>\"},uDimensions:{value:new Float32Array(2),type:\"vec2__left_angle_mark_f32>\"}}}}),__publicField19(this,\"uniforms\"),__publicField19(this,\"time\",0),__publicField19(this,\"_angleLight\",[0,0]),__publicField19(this,\"_angle\",0),__publicField19(this,\"_center\"),this.uniforms=this.resources.godrayUniforms.uniforms,Object.assign(this,t)}};__publicField19(_GodrayFilter,\"DEFAULT_OPTIONS\",{angle:30,gain:.5,lacunarity:2.5,parallel:!0,time:0,center:{x:0,y:0},alpha:1}),init_globals(),init_globals(),init_globals(),init_globals(),init_globals();var fragment25=\"in vec2 vTextureCoord;\\nout vec4 finalColor;\\n\\nuniform sampler2D uTexture;\\nuniform vec3 uHsl;\\nuniform float uAlpha;\\nuniform float uColorize;\\n\\n// https://en.wikipedia.org/wiki/Luma_(video)\\nconst vec3 weight = vec3(0.299, 0.587, 0.114);\\n\\nfloat getWeightedAverage(vec3 rgb) {\\n return rgb.r * weight.r + rgb.g * weight.g + rgb.b * weight.b;\\n}\\n\\n// https://gist.github.com/mairod/a75e7b44f68110e1576d77419d608786?permalink_comment_id=3195243#gistcomment-3195243\\nconst vec3 k = vec3(0.57735, 0.57735, 0.57735);\\n\\nvec3 hueShift(vec3 color, float angle) {\\n float cosAngle = cos(angle);\\n return vec3(\\n color * cosAngle +\\n cross(k, color) * sin(angle) +\\n k * dot(k, color) * (1.0 - cosAngle)\\n );\\n}\\n\\nvoid main()\\n{\\n vec4 color = texture(uTexture, vTextureCoord);\\n vec3 resultRGB = color.rgb;\\n\\n float hue = uHsl[0];\\n float saturation = uHsl[1];\\n float lightness = uHsl[2];\\n\\n // colorize\\n if (uColorize > 0.5) {\\n resultRGB = vec3(getWeightedAverage(resultRGB), 0., 0.);\\n }\\n\\n // hue\\n resultRGB = hueShift(resultRGB, hue);\\n\\n // saturation\\n // https://github.com/evanw/glfx.js/blob/master/src/filters/adjust/huesaturation.js\\n float average = (resultRGB.r + resultRGB.g + resultRGB.b) / 3.0;\\n\\n if (saturation > 0.) {\\n resultRGB += (average - resultRGB) * (1. - 1. / (1.001 - saturation));\\n } else {\\n resultRGB -= (average - resultRGB) * saturation;\\n }\\n\\n // lightness\\n resultRGB = mix(resultRGB, vec3(ceil(lightness)) * color.a, abs(lightness));\\n\\n // alpha\\n finalColor = mix(color, vec4(resultRGB, color.a), uAlpha);\\n}\\n\";init_globals();var source25=\"struct HslUniforms {\\n uHsl:vec3__left_angle_mark_f32>,\\n uColorize:f32,\\n uAlpha:f32,\\n};\\n\\n@group(0) @binding(1) var uTexture: texture_2d__left_angle_mark_f32>; \\n@group(0) @binding(2) var uSampler: sampler;\\n@group(1) @binding(0) var__left_angle_mark_uniform> hslUniforms : HslUniforms;\\n\\n@fragment\\nfn mainFragment(\\n @location(0) uv: vec2__left_angle_mark_f32>,\\n @builtin(position) position: vec4__left_angle_mark_f32>\\n) -> @location(0) vec4__left_angle_mark_f32> {\\n let color: vec4__left_angle_mark_f32> = textureSample(uTexture, uSampler, uv);\\n var resultRGB: vec3__left_angle_mark_f32> = color.rgb;\\n\\n let hue: f32 = hslUniforms.uHsl[0];\\n let saturation: f32 = hslUniforms.uHsl[1];\\n let lightness: f32 = hslUniforms.uHsl[2];\\n\\n // colorize\\n if (hslUniforms.uColorize > 0.5) {\\n resultRGB = vec3__left_angle_mark_f32>(dot(color.rgb, vec3__left_angle_mark_f32>(0.299, 0.587, 0.114)), 0., 0.);\\n }\\n\\n // hue\\n resultRGB = hueShift(resultRGB, hue);\\n\\n // saturation\\n // https://github.com/evanw/glfx.js/blob/master/src/filters/adjust/huesaturation.js\\n let average: f32 = (resultRGB.r + resultRGB.g + resultRGB.b) / 3.0;\\n\\n if (saturation > 0.) {\\n resultRGB += (average - resultRGB) * (1. - 1. / (1.001 - saturation));\\n } else {\\n resultRGB -= (average - resultRGB) * saturation;\\n }\\n\\n // lightness\\n resultRGB = mix(resultRGB, vec3__left_angle_mark_f32>(ceil(lightness)) * color.a, abs(lightness));\\n\\n // alpha\\n return mix(color, vec4__left_angle_mark_f32>(resultRGB, color.a), hslUniforms.uAlpha);\\n}\\n\\n// https://gist.github.com/mairod/a75e7b44f68110e1576d77419d608786?permalink_comment_id=3195243#gistcomment-3195243\\nconst k: vec3__left_angle_mark_f32> = vec3(0.57735, 0.57735, 0.57735);\\n\\nfn hueShift(color: vec3__left_angle_mark_f32>, angle: f32) -> vec3__left_angle_mark_f32> \\n{\\n let cosAngle: f32 = cos(angle);\\n return vec3__left_angle_mark_f32>(\\n color * cosAngle +\\n cross(k, color) * sin(angle) +\\n k * dot(k, color) * (1.0 - cosAngle)\\n );\\n}\",__defProp21=Object.defineProperty,__defNormalProp20=(e,t,r)=>t in e?__defProp21(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,__publicField20=(e,t,r)=>(__defNormalProp20(e,\"symbol\"!=typeof t?t+\"\":t,r),r),_HslAdjustmentFilter=class e extends Filter{get hue(){return this._hue}set hue(e){this._hue=e,this.uniforms.uHsl[0]=e*(Math.PI/180)}get saturation(){return this.uniforms.uHsl[1]}set saturation(e){this.uniforms.uHsl[1]=e}get lightness(){return this.uniforms.uHsl[2]}set lightness(e){this.uniforms.uHsl[2]=e}get colorize(){return 1===this.uniforms.uColorize}set colorize(e){this.uniforms.uColorize=e?1:0}get alpha(){return this.uniforms.uAlpha}set alpha(e){this.uniforms.uAlpha=e}constructor(t){t={...e.DEFAULT_OPTIONS,...t},super({gpuProgram:GpuProgram.from({vertex:{source:wgslVertex,entryPoint:\"mainVertex\"},fragment:{source:source25,entryPoint:\"mainFragment\"}}),glProgram:GlProgram.from({vertex:vertex3,fragment:fragment25,name:\"hsl-adjustment-filter\"}),resources:{hslUniforms:{uHsl:{value:new Float32Array(3),type:\"vec3__left_angle_mark_f32>\"},uColorize:{value:t.colorize?1:0,type:\"f32\"},uAlpha:{value:t.alpha,type:\"f32\"}}}}),__publicField20(this,\"uniforms\"),__publicField20(this,\"_hue\"),this.uniforms=this.resources.hslUniforms.uniforms,Object.assign(this,t)}};__publicField20(_HslAdjustmentFilter,\"DEFAULT_OPTIONS\",{hue:0,saturation:0,lightness:0,colorize:!1,alpha:1}),init_globals(),init_globals();var fragment26=\"precision highp float;\\nin vec2 vTextureCoord;\\nout vec4 finalColor;\\n\\nuniform sampler2D uTexture;\\nuniform vec2 uVelocity;\\nuniform int uKernelSize;\\nuniform float uOffset;\\n\\nuniform vec4 uInputSize;\\n\\nconst int MAX_KERNEL_SIZE = 2048;\\n\\n// Notice:\\n// the perfect way:\\n// int kernelSize = min(uKernelSize, MAX_KERNELSIZE);\\n// BUT in real use-case , uKernelSize __left_angle_mark_ MAX_KERNELSIZE almost always.\\n// So use uKernelSize directly.\\n\\nvoid main(void)\\n{\\n vec4 color = texture(uTexture, vTextureCoord);\\n\\n if (uKernelSize == 0)\\n {\\n finalColor = color;\\n return;\\n }\\n\\n vec2 velocity = uVelocity / uInputSize.xy;\\n float offset = -uOffset / length(uVelocity) - 0.5;\\n int k = uKernelSize - 1;\\n\\n for(int i = 0; i __left_angle_mark_ MAX_KERNEL_SIZE - 1; i++) {\\n if (i == k) {\\n break;\\n }\\n vec2 bias = velocity * (float(i) / float(k) + offset);\\n color += texture(uTexture, vTextureCoord + bias);\\n }\\n finalColor = color / float(uKernelSize);\\n}\\n\";init_globals();var source26=\"struct MotionBlurUniforms {\\n uVelocity: vec2__left_angle_mark_f32>,\\n uKernelSize: f32,\\n uOffset: f32,\\n};\\n\\nstruct GlobalFilterUniforms {\\n uInputSize:vec4__left_angle_mark_f32>,\\n uInputPixel:vec4__left_angle_mark_f32>,\\n uInputClamp:vec4__left_angle_mark_f32>,\\n uOutputFrame:vec4__left_angle_mark_f32>,\\n uGlobalFrame:vec4__left_angle_mark_f32>,\\n uOutputTexture:vec4__left_angle_mark_f32>,\\n};\\n\\n@group(0) @binding(0) var__left_angle_mark_uniform> gfu: GlobalFilterUniforms;\\n\\n@group(0) @binding(1) var uTexture: texture_2d__left_angle_mark_f32>; \\n@group(0) @binding(2) var uSampler: sampler;\\n@group(1) @binding(0) var__left_angle_mark_uniform> motionBlurUniforms : MotionBlurUniforms;\\n\\n@fragment\\nfn mainFragment(\\n @builtin(position) position: vec4__left_angle_mark_f32>,\\n @location(0) uv : vec2__left_angle_mark_f32>\\n) -> @location(0) vec4__left_angle_mark_f32> {\\n let uVelocity = motionBlurUniforms.uVelocity;\\n let uKernelSize = motionBlurUniforms.uKernelSize;\\n let uOffset = motionBlurUniforms.uOffset;\\n\\n let velocity: vec2__left_angle_mark_f32> = uVelocity / gfu.uInputSize.xy;\\n let offset: f32 = -uOffset / length(uVelocity) - 0.5;\\n let k: i32 = i32(min(uKernelSize - 1, MAX_KERNEL_SIZE - 1));\\n\\n var color: vec4__left_angle_mark_f32> = textureSample(uTexture, uSampler, uv);\\n\\n for(var i: i32 = 0; i __left_angle_mark_ k; i += 1) {\\n let bias: vec2__left_angle_mark_f32> = velocity * (f32(i) / f32(k) + offset);\\n color += textureSample(uTexture, uSampler, uv + bias);\\n }\\n \\n return select(color / f32(uKernelSize), textureSample(uTexture, uSampler, uv), uKernelSize == 0);\\n}\\n\\nconst MAX_KERNEL_SIZE: f32 = 2048;\",__defProp22=Object.defineProperty,__defNormalProp21=(e,t,r)=>t in e?__defProp22(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,__publicField21=(e,t,r)=>(__defNormalProp21(e,\"symbol\"!=typeof t?t+\"\":t,r),r),_MotionBlurFilter=class e extends Filter{get velocity(){return this.uniforms.uVelocity}set velocity(e){Array.isArray(e)&&(e={x:e[0],y:e[1]}),this.uniforms.uVelocity=e,this._updateDirty()}get velocityX(){return this.velocity.x}set velocityX(e){this.velocity.x=e,this._updateDirty()}get velocityY(){return this.velocity.y}set velocityY(e){this.velocity.y=e,this._updateDirty()}get kernelSize(){return this._kernelSize}set kernelSize(e){this._kernelSize=e,this._updateDirty()}get offset(){return this.uniforms.uOffset}set offset(e){this.uniforms.uOffset=e}_updateDirty(){this.padding=1+(0|Math.max(Math.abs(this.velocityX),Math.abs(this.velocityY))),this.uniforms.uKernelSize=0!==this.velocityX||0!==this.velocityY?this._kernelSize:0}constructor(...t){var r,n;let i=null!=(r=t[0])?r:{};(Array.isArray(i)||\"x\"in i&&\"y\"in i||i instanceof ObservablePoint)&&(deprecation(\"6.0.0\",\"MotionBlurFilter constructor params are now options object. See params: { velocity, kernelSize, offset }\"),i={velocity:{x:\"x\"in i?i.x:i[0],y:\"y\"in i?i.y:i[1]}},void 0!==t[1]&&(i.kernelSize=t[1]),void 0!==t[2]&&(i.offset=t[2])),i={...e.DEFAULT_OPTIONS,...i},super({gpuProgram:GpuProgram.from({vertex:{source:wgslVertex,entryPoint:\"mainVertex\"},fragment:{source:source26,entryPoint:\"mainFragment\"}}),glProgram:GlProgram.from({vertex:vertex3,fragment:fragment26,name:\"motion-blur-filter\"}),resources:{motionBlurUniforms:{uVelocity:{value:i.velocity,type:\"vec2__left_angle_mark_f32>\"},uKernelSize:{value:Math.trunc(null!=(n=i.kernelSize)?n:5),type:\"i32\"},uOffset:{value:i.offset,type:\"f32\"}}}}),__publicField21(this,\"uniforms\"),__publicField21(this,\"_kernelSize\"),this.uniforms=this.resources.motionBlurUniforms.uniforms,Object.assign(this,i)}};__publicField21(_MotionBlurFilter,\"DEFAULT_OPTIONS\",{velocity:{x:0,y:0},kernelSize:5,offset:0}),init_globals(),init_globals();var fragment27=\"in vec2 vTextureCoord;\\nout vec4 finalColor;\\n\\nconst int MAX_COLORS = ${MAX_COLORS};\\n\\nuniform sampler2D uTexture;\\nuniform vec3 uOriginalColors[MAX_COLORS];\\nuniform vec3 uTargetColors[MAX_COLORS];\\nuniform float uTolerance;\\n\\nvoid main(void)\\n{\\n finalColor = texture(uTexture, vTextureCoord);\\n\\n float alpha = finalColor.a;\\n if (alpha __left_angle_mark_ 0.0001)\\n {\\n return;\\n }\\n\\n vec3 color = finalColor.rgb / alpha;\\n\\n for(int i = 0; i __left_angle_mark_ MAX_COLORS; i++)\\n {\\n vec3 origColor = uOriginalColors[i];\\n if (origColor.r __left_angle_mark_ 0.0)\\n {\\n break;\\n }\\n vec3 colorDiff = origColor - color;\\n if (length(colorDiff) __left_angle_mark_ uTolerance)\\n {\\n vec3 targetColor = uTargetColors[i];\\n finalColor = vec4((targetColor + colorDiff) * alpha, alpha);\\n return;\\n }\\n }\\n}\\n\";init_globals();var source27=\"struct MultiColorReplaceUniforms {\\n uOriginalColors: array__left_angle_mark_vec3__left_angle_mark_f32>, MAX_COLORS>,\\n uTargetColors: array__left_angle_mark_vec3__left_angle_mark_f32>, MAX_COLORS>,\\n uTolerance:f32,\\n};\\n\\n@group(0) @binding(1) var uTexture: texture_2d__left_angle_mark_f32>; \\n@group(0) @binding(2) var uSampler: sampler;\\n@group(1) @binding(0) var__left_angle_mark_uniform> multiColorReplaceUniforms : MultiColorReplaceUniforms;\\n\\n@fragment\\nfn mainFragment(\\n @builtin(position) position: vec4__left_angle_mark_f32>,\\n @location(0) uv : vec2__left_angle_mark_f32>\\n) -> @location(0) vec4__left_angle_mark_f32> {\\n let uOriginalColors = multiColorReplaceUniforms.uOriginalColors;\\n let uTargetColors = multiColorReplaceUniforms.uTargetColors;\\n let uTolerance = multiColorReplaceUniforms.uTolerance;\\n\\n var color: vec4__left_angle_mark_f32> = textureSample(uTexture, uSampler, uv);\\n\\n let alpha: f32 = color.a;\\n\\n if (alpha > 0.0001)\\n {\\n var modColor: vec3__left_angle_mark_f32> = vec3__left_angle_mark_f32>(color.rgb) / alpha;\\n\\n for(var i: i32 = 0; i __left_angle_mark_ MAX_COLORS; i += 1)\\n {\\n let origColor: vec3__left_angle_mark_f32> = uOriginalColors[i];\\n if (origColor.r __left_angle_mark_ 0.0)\\n {\\n break;\\n }\\n let colorDiff: vec3__left_angle_mark_f32> = origColor - modColor;\\n \\n if (length(colorDiff) __left_angle_mark_ uTolerance)\\n {\\n let targetColor: vec3__left_angle_mark_f32> = uTargetColors[i];\\n color = vec4((targetColor + colorDiff) * alpha, alpha);\\n return color;\\n }\\n }\\n }\\n\\n return color;\\n}\\n\\nconst MAX_COLORS: i32 = ${MAX_COLORS};\",__defProp23=Object.defineProperty,__defNormalProp22=(e,t,r)=>t in e?__defProp23(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,__publicField22=(e,t,r)=>(__defNormalProp22(e,\"symbol\"!=typeof t?t+\"\":t,r),r),_MultiColorReplaceFilter=class e extends Filter{set replacements(e){const t=this.uniforms.uOriginalColors,r=this.uniforms.uTargetColors,n=e.length,i=new Color2;if(n>this._maxColors)throw new Error(`Length of replacements (${n}) exceeds the maximum colors length (${this._maxColors})`);let o,a,s;t[3*n]=-1;for(let l=0;l__left_angle_mark_n;l++){const n=e[l];i.setValue(n[0]),[o,a,s]=i.toArray(),t[3*l]=o,t[3*l+1]=a,t[3*l+2]=s,i.setValue(n[1]),[o,a,s]=i.toArray(),r[3*l]=o,r[3*l+1]=a,r[3*l+2]=s}this._replacements=e}get replacements(){return this._replacements}refresh(){this.replacements=this._replacements}get maxColors(){return this._maxColors}get tolerance(){return this.uniforms.uTolerance}set tolerance(e){this.uniforms.uTolerance=e}set epsilon(e){deprecation(\"6.0.0\",\"MultiColorReplaceFilter.epsilon is deprecated, please use MultiColorReplaceFilter.tolerance instead\"),this.tolerance=e}get epsilon(){return deprecation(\"6.0.0\",\"MultiColorReplaceFilter.epsilon is deprecated, please use MultiColorReplaceFilter.tolerance instead\"),this.tolerance}constructor(...t){var r,n;let i=null!=(r=t[0])?r:{};Array.isArray(i)&&(deprecation(\"6.0.0\",\"MultiColorReplaceFilter constructor params are now options object. See params: { replacements, tolerance, maxColors }\"),i={replacements:i},t[1]&&(i.tolerance=t[1]),t[2]&&(i.maxColors=t[2])),i={...e.DEFAULT_OPTIONS,...i};const o=null!=(n=i.maxColors)?n:i.replacements.length;super({gpuProgram:GpuProgram.from({vertex:{source:wgslVertex,entryPoint:\"mainVertex\"},fragment:{source:source27.replace(/\\$\\{MAX_COLORS\\}/g,o.toFixed(0)),entryPoint:\"mainFragment\"}}),glProgram:GlProgram.from({vertex:vertex3,fragment:fragment27.replace(/\\$\\{MAX_COLORS\\}/g,o.toFixed(0)),name:\"multi-color-replace-filter\"}),resources:{multiColorReplaceUniforms:{uOriginalColors:{value:new Float32Array(3*o),type:\"vec3__left_angle_mark_f32>\",size:o},uTargetColors:{value:new Float32Array(3*o),type:\"vec3__left_angle_mark_f32>\",size:o},uTolerance:{value:i.tolerance,type:\"f32\"}}}}),__publicField22(this,\"uniforms\"),__publicField22(this,\"_replacements\",[]),__publicField22(this,\"_maxColors\"),this._maxColors=o,this.uniforms=this.resources.multiColorReplaceUniforms.uniforms,this.replacements=i.replacements}};__publicField22(_MultiColorReplaceFilter,\"DEFAULT_OPTIONS\",{replacements:[[16711680,255]],tolerance:.05,maxColors:void 0}),init_globals(),init_globals();var fragment28=\"precision highp float;\\nin vec2 vTextureCoord;\\nout vec4 finalColor;\\n\\nuniform sampler2D uTexture;\\nuniform float uSepia;\\nuniform vec2 uNoise;\\nuniform vec3 uScratch;\\nuniform vec3 uVignetting;\\nuniform float uSeed;\\nuniform vec2 uDimensions;\\n\\nuniform vec4 uInputSize;\\n\\nconst float SQRT_2 = 1.414213;\\nconst vec3 SEPIA_RGB = vec3(112.0 / 255.0, 66.0 / 255.0, 20.0 / 255.0);\\n\\nfloat rand(vec2 co) {\\n return fract(sin(dot(co.xy, vec2(12.9898, 78.233))) * 43758.5453);\\n}\\n\\nvec3 Overlay(vec3 src, vec3 dst)\\n{\\n // if (dst __left_angle_mark_= 0.5) then: 2 * src * dst\\n // if (dst > 0.5) then: 1 - 2 * (1 - dst) * (1 - src)\\n return vec3((dst.x __left_angle_mark_= 0.5) ? (2.0 * src.x * dst.x) : (1.0 - 2.0 * (1.0 - dst.x) * (1.0 - src.x)),\\n (dst.y __left_angle_mark_= 0.5) ? (2.0 * src.y * dst.y) : (1.0 - 2.0 * (1.0 - dst.y) * (1.0 - src.y)),\\n (dst.z __left_angle_mark_= 0.5) ? (2.0 * src.z * dst.z) : (1.0 - 2.0 * (1.0 - dst.z) * (1.0 - src.z)));\\n}\\n\\n\\nvoid main()\\n{\\n finalColor = texture(uTexture, vTextureCoord);\\n vec3 color = finalColor.rgb;\\n\\n if (uSepia > 0.0)\\n {\\n float gray = (color.x + color.y + color.z) / 3.0;\\n vec3 grayscale = vec3(gray);\\n\\n color = Overlay(SEPIA_RGB, grayscale);\\n\\n color = grayscale + uSepia * (color - grayscale);\\n }\\n\\n vec2 coord = vTextureCoord * uInputSize.xy / uDimensions.xy;\\n\\n float vignette = uVignetting[0];\\n float vignetteAlpha = uVignetting[1];\\n float vignetteBlur = uVignetting[2];\\n\\n if (vignette > 0.0)\\n {\\n float outter = SQRT_2 - vignette * SQRT_2;\\n vec2 dir = vec2(vec2(0.5, 0.5) - coord);\\n dir.y *= uDimensions.y / uDimensions.x;\\n float darker = clamp((outter - length(dir) * SQRT_2) / ( 0.00001 + vignetteBlur * SQRT_2), 0.0, 1.0);\\n color.rgb *= darker + (1.0 - darker) * (1.0 - vignetteAlpha);\\n }\\n\\n float scratch = uScratch[0];\\n float scratchDensity = uScratch[1];\\n float scratchWidth = uScratch[2];\\n\\n if (scratchDensity > uSeed && scratch != 0.0)\\n {\\n float phase = uSeed * 256.0;\\n float s = mod(floor(phase), 2.0);\\n float dist = 1.0 / scratchDensity;\\n float d = distance(coord, vec2(uSeed * dist, abs(s - uSeed * dist)));\\n if (d __left_angle_mark_ uSeed * 0.6 + 0.4)\\n {\\n highp float period = scratchDensity * 10.0;\\n\\n float xx = coord.x * period + phase;\\n float aa = abs(mod(xx, 0.5) * 4.0);\\n float bb = mod(floor(xx / 0.5), 2.0);\\n float yy = (1.0 - bb) * aa + bb * (2.0 - aa);\\n\\n float kk = 2.0 * period;\\n float dw = scratchWidth / uDimensions.x * (0.75 + uSeed);\\n float dh = dw * kk;\\n\\n float tine = (yy - (2.0 - dh));\\n\\n if (tine > 0.0) {\\n float _sign = sign(scratch);\\n\\n tine = s * tine / period + scratch + 0.1;\\n tine = clamp(tine + 1.0, 0.5 + _sign * 0.5, 1.5 + _sign * 0.5);\\n\\n color.rgb *= tine;\\n }\\n }\\n }\\n\\n float noise = uNoise[0];\\n float noiseSize = uNoise[1];\\n\\n if (noise > 0.0 && noiseSize > 0.0)\\n {\\n vec2 pixelCoord = vTextureCoord.xy * uInputSize.xy;\\n pixelCoord.x = floor(pixelCoord.x / noiseSize);\\n pixelCoord.y = floor(pixelCoord.y / noiseSize);\\n // vec2 d = pixelCoord * noiseSize * vec2(1024.0 + uSeed * 512.0, 1024.0 - uSeed * 512.0);\\n // float _noise = snoise(d) * 0.5;\\n float _noise = rand(pixelCoord * noiseSize * uSeed) - 0.5;\\n color += _noise * noise;\\n }\\n\\n finalColor.rgb = color;\\n}\";init_globals();var source28=\"struct OldFilmUniforms {\\n uSepia: f32,\\n uNoise: vec2__left_angle_mark_f32>,\\n uScratch: vec3__left_angle_mark_f32>,\\n uVignetting: vec3__left_angle_mark_f32>,\\n uSeed: f32,\\n uDimensions: vec2__left_angle_mark_f32>,\\n};\\n\\nstruct GlobalFilterUniforms {\\n uInputSize:vec4__left_angle_mark_f32>,\\n uInputPixel:vec4__left_angle_mark_f32>,\\n uInputClamp:vec4__left_angle_mark_f32>,\\n uOutputFrame:vec4__left_angle_mark_f32>,\\n uGlobalFrame:vec4__left_angle_mark_f32>,\\n uOutputTexture:vec4__left_angle_mark_f32>,\\n};\\n\\n@group(0) @binding(0) var__left_angle_mark_uniform> gfu: GlobalFilterUniforms;\\n\\n@group(0) @binding(1) var uTexture: texture_2d__left_angle_mark_f32>; \\n@group(0) @binding(2) var uSampler: sampler;\\n@group(1) @binding(0) var__left_angle_mark_uniform> oldFilmUniforms : OldFilmUniforms;\\n\\n@fragment\\nfn mainFragment(\\n @builtin(position) position: vec4__left_angle_mark_f32>,\\n @location(0) uv : vec2__left_angle_mark_f32>\\n) -> @location(0) vec4__left_angle_mark_f32> {\\n var color: vec4__left_angle_mark_f32> = textureSample(uTexture, uSampler, uv);\\n\\n if (oldFilmUniforms.uSepia > 0.)\\n {\\n color = vec4__left_angle_mark_f32>(sepia(color.rgb), color.a);\\n }\\n\\n let coord: vec2__left_angle_mark_f32> = uv * gfu.uInputSize.xy / oldFilmUniforms.uDimensions;\\n\\n if (oldFilmUniforms.uVignetting[0] > 0.)\\n {\\n color *= vec4__left_angle_mark_f32>(vec3__left_angle_mark_f32>(vignette(color.rgb, coord)), color.a);\\n }\\n\\n let uScratch = oldFilmUniforms.uScratch; \\n\\n if (uScratch[1] > oldFilmUniforms.uSeed && uScratch[0] != 0.)\\n {\\n color = vec4__left_angle_mark_f32>(scratch(color.rgb, coord), color.a);\\n }\\n\\n let uNoise = oldFilmUniforms.uNoise;\\n\\n if (uNoise[0] > 0.0 && uNoise[1] > 0.0)\\n {\\n color += vec4__left_angle_mark_f32>(vec3__left_angle_mark_f32>(noise(uv)), color.a);\\n }\\n\\n return color;\\n}\\n\\nconst SQRT_2: f32 = 1.414213;\\nconst SEPIA_RGB: vec3__left_angle_mark_f32> = vec3__left_angle_mark_f32>(112.0 / 255.0, 66.0 / 255.0, 20.0 / 255.0);\\n\\nfn modulo(x: f32, y: f32) -> f32\\n{\\n return x - y * floor(x/y);\\n}\\n\\nfn rand(co: vec2__left_angle_mark_f32>) -> f32\\n{\\n return fract(sin(dot(co, vec2__left_angle_mark_f32>(12.9898, 78.233))) * 43758.5453);\\n}\\n\\nfn overlay(src: vec3__left_angle_mark_f32>, dst: vec3__left_angle_mark_f32>) -> vec3__left_angle_mark_f32>\\n{\\n // if (dst __left_angle_mark_= 0.5) then: 2 * src * dst\\n // if (dst > 0.5) then: 1 - 2 * (1 - dst) * (1 - src)\\n\\n return vec3__left_angle_mark_f32>(\\n select((1.0 - 2.0 * (1.0 - dst.x) * (1.0 - src.x)), (2.0 * src.x * dst.x), (dst.x __left_angle_mark_= 0.5)), \\n select((1.0 - 2.0 * (1.0 - dst.y) * (1.0 - src.y)), (2.0 * src.y * dst.y), (dst.y __left_angle_mark_= 0.5)),\\n select((1.0 - 2.0 * (1.0 - dst.z) * (1.0 - src.z)), (2.0 * src.z * dst.z), (dst.z __left_angle_mark_= 0.5))\\n );\\n}\\n\\nfn sepia(co: vec3__left_angle_mark_f32>) -> vec3__left_angle_mark_f32>\\n{\\n let gray: f32 = (co.x + co.y + co.z) / 3.0;\\n let grayscale: vec3__left_angle_mark_f32> = vec3__left_angle_mark_f32>(gray);\\n let color = overlay(SEPIA_RGB, grayscale);\\n return grayscale + oldFilmUniforms.uSepia * (color - grayscale);\\n}\\n\\nfn vignette(co: vec3__left_angle_mark_f32>, coord: vec2__left_angle_mark_f32>) -> f32\\n{\\n let uVignetting = oldFilmUniforms.uVignetting;\\n let uDimensions = oldFilmUniforms.uDimensions;\\n \\n let outter: f32 = SQRT_2 - uVignetting[0] * SQRT_2;\\n var dir: vec2__left_angle_mark_f32> = vec2__left_angle_mark_f32>(vec2__left_angle_mark_f32>(0.5) - coord);\\n dir.y *= uDimensions.y / uDimensions.x;\\n let darker: f32 = clamp((outter - length(dir) * SQRT_2) / ( 0.00001 + uVignetting[2] * SQRT_2), 0.0, 1.0);\\n return darker + (1.0 - darker) * (1.0 - uVignetting[1]);\\n}\\n\\nfn scratch(co: vec3__left_angle_mark_f32>, coord: vec2__left_angle_mark_f32>) -> vec3__left_angle_mark_f32>\\n{\\n var color = co;\\n let uScratch = oldFilmUniforms.uScratch;\\n let uSeed = oldFilmUniforms.uSeed;\\n let uDimensions = oldFilmUniforms.uDimensions;\\n\\n let phase: f32 = uSeed * 256.0;\\n let s: f32 = modulo(floor(phase), 2.0);\\n let dist: f32 = 1.0 / uScratch[1];\\n let d: f32 = distance(coord, vec2__left_angle_mark_f32>(uSeed * dist, abs(s - uSeed * dist)));\\n\\n if (d __left_angle_mark_ uSeed * 0.6 + 0.4)\\n {\\n let period: f32 = uScratch[1] * 10.0;\\n\\n let xx: f32 = coord.x * period + phase;\\n let aa: f32 = abs(modulo(xx, 0.5) * 4.0);\\n let bb: f32 = modulo(floor(xx / 0.5), 2.0);\\n let yy: f32 = (1.0 - bb) * aa + bb * (2.0 - aa);\\n\\n let kk: f32 = 2.0 * period;\\n let dw: f32 = uScratch[2] / uDimensions.x * (0.75 + uSeed);\\n let dh: f32 = dw * kk;\\n\\n var tine: f32 = (yy - (2.0 - dh));\\n\\n if (tine > 0.0) {\\n let _sign: f32 = sign(uScratch[0]);\\n\\n tine = s * tine / period + uScratch[0] + 0.1;\\n tine = clamp(tine + 1.0, 0.5 + _sign * 0.5, 1.5 + _sign * 0.5);\\n\\n color *= tine;\\n }\\n }\\n\\n return color;\\n}\\n\\nfn noise(coord: vec2__left_angle_mark_f32>) -> f32\\n{\\n let uNoise = oldFilmUniforms.uNoise;\\n let uSeed = oldFilmUniforms.uSeed;\\n\\n var pixelCoord: vec2__left_angle_mark_f32> = coord * gfu.uInputSize.xy;\\n pixelCoord.x = floor(pixelCoord.x / uNoise[1]);\\n pixelCoord.y = floor(pixelCoord.y / uNoise[1]);\\n return (rand(pixelCoord * uNoise[1] * uSeed) - 0.5) * uNoise[0];\\n}\",__defProp24=Object.defineProperty,__defNormalProp23=(e,t,r)=>t in e?__defProp24(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,__publicField23=(e,t,r)=>(__defNormalProp23(e,\"symbol\"!=typeof t?t+\"\":t,r),r),_OldFilmFilter=class e extends Filter{apply(e,t,r,n){this.uniforms.uDimensions[0]=t.frame.width,this.uniforms.uDimensions[1]=t.frame.height,this.uniforms.uSeed=this.seed,e.applyFilter(this,t,r,n)}get sepia(){return this.uniforms.uSepia}set sepia(e){this.uniforms.uSepia=e}get noise(){return this.uniforms.uNoise[0]}set noise(e){this.uniforms.uNoise[0]=e}get noiseSize(){return this.uniforms.uNoise[1]}set noiseSize(e){this.uniforms.uNoise[1]=e}get scratch(){return this.uniforms.uScratch[0]}set scratch(e){this.uniforms.uScratch[0]=e}get scratchDensity(){return this.uniforms.uScratch[1]}set scratchDensity(e){this.uniforms.uScratch[1]=e}get scratchWidth(){return this.uniforms.uScratch[2]}set scratchWidth(e){this.uniforms.uScratch[2]=e}get vignetting(){return this.uniforms.uVignetting[0]}set vignetting(e){this.uniforms.uVignetting[0]=e}get vignettingAlpha(){return this.uniforms.uVignetting[1]}set vignettingAlpha(e){this.uniforms.uVignetting[1]=e}get vignettingBlur(){return this.uniforms.uVignetting[2]}set vignettingBlur(e){this.uniforms.uVignetting[2]=e}constructor(t){t={...e.DEFAULT_OPTIONS,...t},super({gpuProgram:GpuProgram.from({vertex:{source:wgslVertex,entryPoint:\"mainVertex\"},fragment:{source:source28,entryPoint:\"mainFragment\"}}),glProgram:GlProgram.from({vertex:vertex3,fragment:fragment28,name:\"old-film-filter\"}),resources:{oldFilmUniforms:{uSepia:{value:t.sepia,type:\"f32\"},uNoise:{value:new Float32Array(2),type:\"vec2__left_angle_mark_f32>\"},uScratch:{value:new Float32Array(3),type:\"vec3__left_angle_mark_f32>\"},uVignetting:{value:new Float32Array(3),type:\"vec3__left_angle_mark_f32>\"},uSeed:{value:t.seed,type:\"f32\"},uDimensions:{value:new Float32Array(2),type:\"vec2__left_angle_mark_f32>\"}}}}),__publicField23(this,\"uniforms\"),__publicField23(this,\"seed\"),this.uniforms=this.resources.oldFilmUniforms.uniforms,Object.assign(this,t)}};__publicField23(_OldFilmFilter,\"DEFAULT_OPTIONS\",{sepia:.3,noise:.3,noiseSize:1,scratch:.5,scratchDensity:.3,scratchWidth:1,vignetting:.3,vignettingAlpha:1,vignettingBlur:.3,seed:0}),init_globals(),init_globals();var fragment29=\"precision highp float;\\nin vec2 vTextureCoord;\\nout vec4 finalColor;\\n\\nuniform sampler2D uTexture;\\nuniform vec2 uThickness;\\nuniform vec3 uColor;\\nuniform float uAlpha;\\nuniform float uKnockout;\\n\\nuniform vec4 uInputClamp;\\n\\nconst float DOUBLE_PI = 2. * 3.14159265358979323846264;\\nconst float ANGLE_STEP = ${ANGLE_STEP};\\n\\nfloat outlineMaxAlphaAtPos(vec2 pos) {\\n if (uThickness.x == 0. || uThickness.y == 0.) {\\n return 0.;\\n }\\n\\n vec4 displacedColor;\\n vec2 displacedPos;\\n float maxAlpha = 0.;\\n\\n for (float angle = 0.; angle __left_angle_mark_= DOUBLE_PI; angle += ANGLE_STEP) {\\n displacedPos.x = vTextureCoord.x + uThickness.x * cos(angle);\\n displacedPos.y = vTextureCoord.y + uThickness.y * sin(angle);\\n displacedColor = texture(uTexture, clamp(displacedPos, uInputClamp.xy, uInputClamp.zw));\\n maxAlpha = max(maxAlpha, displacedColor.a);\\n }\\n\\n return maxAlpha;\\n}\\n\\nvoid main(void) {\\n vec4 sourceColor = texture(uTexture, vTextureCoord);\\n vec4 contentColor = sourceColor * float(uKnockout __left_angle_mark_ 0.5);\\n float outlineAlpha = uAlpha * outlineMaxAlphaAtPos(vTextureCoord.xy) * (1.-sourceColor.a);\\n vec4 outlineColor = vec4(vec3(uColor) * outlineAlpha, outlineAlpha);\\n finalColor = contentColor + outlineColor;\\n}\\n\";init_globals();var source29=\"struct OutlineUniforms {\\n uThickness:vec2__left_angle_mark_f32>,\\n uColor:vec3__left_angle_mark_f32>,\\n uAlpha:f32,\\n uAngleStep:f32,\\n uKnockout:f32,\\n};\\n\\nstruct GlobalFilterUniforms {\\n uInputSize:vec4__left_angle_mark_f32>,\\n uInputPixel:vec4__left_angle_mark_f32>,\\n uInputClamp:vec4__left_angle_mark_f32>,\\n uOutputFrame:vec4__left_angle_mark_f32>,\\n uGlobalFrame:vec4__left_angle_mark_f32>,\\n uOutputTexture:vec4__left_angle_mark_f32>,\\n};\\n\\n@group(0) @binding(0) var__left_angle_mark_uniform> gfu: GlobalFilterUniforms;\\n\\n@group(0) @binding(1) var uTexture: texture_2d__left_angle_mark_f32>; \\n@group(0) @binding(2) var uSampler: sampler;\\n@group(1) @binding(0) var__left_angle_mark_uniform> outlineUniforms : OutlineUniforms;\\n\\n@fragment\\nfn mainFragment(\\n @builtin(position) position: vec4__left_angle_mark_f32>,\\n @location(0) uv : vec2__left_angle_mark_f32>\\n) -> @location(0) vec4__left_angle_mark_f32> {\\n let sourceColor: vec4__left_angle_mark_f32> = textureSample(uTexture, uSampler, uv);\\n let contentColor: vec4__left_angle_mark_f32> = sourceColor * (1. - outlineUniforms.uKnockout);\\n \\n let outlineAlpha: f32 = outlineUniforms.uAlpha * outlineMaxAlphaAtPos(uv) * (1. - sourceColor.a);\\n let outlineColor: vec4__left_angle_mark_f32> = vec4__left_angle_mark_f32>(vec3__left_angle_mark_f32>(outlineUniforms.uColor) * outlineAlpha, outlineAlpha);\\n \\n return contentColor + outlineColor;\\n}\\n\\nfn outlineMaxAlphaAtPos(uv: vec2__left_angle_mark_f32>) -> f32 {\\n let thickness = outlineUniforms.uThickness;\\n\\n if (thickness.x == 0. || thickness.y == 0.) {\\n return 0.;\\n }\\n \\n let angleStep = outlineUniforms.uAngleStep;\\n\\n var displacedColor: vec4__left_angle_mark_f32>;\\n var displacedPos: vec2__left_angle_mark_f32>;\\n\\n var maxAlpha: f32 = 0.;\\n var displaced: vec2__left_angle_mark_f32>;\\n var curColor: vec4__left_angle_mark_f32>;\\n\\n for (var angle = 0.; angle __left_angle_mark_= DOUBLE_PI; angle += angleStep)\\n {\\n displaced.x = uv.x + thickness.x * cos(angle);\\n displaced.y = uv.y + thickness.y * sin(angle);\\n curColor = textureSample(uTexture, uSampler, clamp(displaced, gfu.uInputClamp.xy, gfu.uInputClamp.zw));\\n maxAlpha = max(maxAlpha, curColor.a);\\n }\\n\\n return maxAlpha;\\n}\\n\\nconst DOUBLE_PI: f32 = 3.14159265358979323846264 * 2.;\",__defProp25=Object.defineProperty,__defNormalProp24=(e,t,r)=>t in e?__defProp25(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,__publicField24=(e,t,r)=>(__defNormalProp24(e,\"symbol\"!=typeof t?t+\"\":t,r),r),_OutlineFilter=class e extends Filter{apply(e,t,r,n){this.uniforms.uThickness[0]=this.thickness/t.source.width,this.uniforms.uThickness[1]=this.thickness/t.source.height,e.applyFilter(this,t,r,n)}static getAngleStep(t){return parseFloat((2*Math.PI/Math.max(t*e.MAX_SAMPLES,e.MIN_SAMPLES)).toFixed(7))}get thickness(){return this._thickness}set thickness(e){this._thickness=this.padding=e}get color(){return this._color.value}set color(e){this._color.setValue(e);const[t,r,n]=this._color.toArray();this.uniforms.uColor[0]=t,this.uniforms.uColor[1]=r,this.uniforms.uColor[2]=n}get alpha(){return this.uniforms.uAlpha}set alpha(e){this.uniforms.uAlpha=e}get quality(){return this._quality}set quality(t){this._quality=t,this.uniforms.uAngleStep=e.getAngleStep(t)}get knockout(){return 1===this.uniforms.uKnockout}set knockout(e){this.uniforms.uKnockout=e?1:0}constructor(...t){var r,n,i;let o=null!=(r=t[0])?r:{};\"number\"==typeof o&&(deprecation(\"6.0.0\",\"OutlineFilter constructor params are now options object. See params: { thickness, color, quality, alpha, knockout }\"),o={thickness:o},void 0!==t[1]&&(o.color=t[1]),void 0!==t[2]&&(o.quality=t[2]),void 0!==t[3]&&(o.alpha=t[3]),void 0!==t[4]&&(o.knockout=t[4])),o={...e.DEFAULT_OPTIONS,...o};const a=null!=(n=o.quality)?n:.1;super({gpuProgram:GpuProgram.from({vertex:{source:wgslVertex,entryPoint:\"mainVertex\"},fragment:{source:source29,entryPoint:\"mainFragment\"}}),glProgram:GlProgram.from({vertex:vertex3,fragment:fragment29.replace(/\\$\\{ANGLE_STEP\\}/,e.getAngleStep(a).toFixed(7)),name:\"outline-filter\"}),resources:{outlineUniforms:{uThickness:{value:new Float32Array(2),type:\"vec2__left_angle_mark_f32>\"},uColor:{value:new Float32Array(3),type:\"vec3__left_angle_mark_f32>\"},uAlpha:{value:o.alpha,type:\"f32\"},uAngleStep:{value:0,type:\"f32\"},uKnockout:{value:o.knockout?1:0,type:\"f32\"}}}}),__publicField24(this,\"uniforms\"),__publicField24(this,\"_thickness\"),__publicField24(this,\"_quality\"),__publicField24(this,\"_color\"),this.uniforms=this.resources.outlineUniforms.uniforms,this.uniforms.uAngleStep=e.getAngleStep(a),this._color=new Color2,this.color=null!=(i=o.color)?i:0,Object.assign(this,o)}};__publicField24(_OutlineFilter,\"DEFAULT_OPTIONS\",{thickness:1,color:0,alpha:1,quality:.1,knockout:!1}),__publicField24(_OutlineFilter,\"MIN_SAMPLES\",1),__publicField24(_OutlineFilter,\"MAX_SAMPLES\",100),init_globals(),init_globals(),init_globals(),init_globals(),init_globals();var fragment31=\"precision highp float;\\nin vec2 vTextureCoord;\\nout vec4 finalColor;\\n\\nuniform sampler2D uTexture;\\nuniform float uRadian;\\nuniform vec2 uCenter;\\nuniform float uRadius;\\nuniform int uKernelSize;\\n\\nuniform vec4 uInputSize;\\n\\nconst int MAX_KERNEL_SIZE = 2048;\\n\\nvoid main(void)\\n{\\n vec4 color = texture(uTexture, vTextureCoord);\\n\\n if (uKernelSize == 0)\\n {\\n finalColor = color;\\n return;\\n }\\n\\n float aspect = uInputSize.y / uInputSize.x;\\n vec2 center = uCenter.xy / uInputSize.xy;\\n float gradient = uRadius / uInputSize.x * 0.3;\\n float radius = uRadius / uInputSize.x - gradient * 0.5;\\n int k = uKernelSize - 1;\\n\\n vec2 coord = vTextureCoord;\\n vec2 dir = vec2(center - coord);\\n float dist = length(vec2(dir.x, dir.y * aspect));\\n\\n float radianStep = uRadian;\\n if (radius >= 0.0 && dist > radius) {\\n float delta = dist - radius;\\n float gap = gradient;\\n float scale = 1.0 - abs(delta / gap);\\n if (scale __left_angle_mark_= 0.0) {\\n finalColor = color;\\n return;\\n }\\n radianStep *= scale;\\n }\\n radianStep /= float(k);\\n\\n float s = sin(radianStep);\\n float c = cos(radianStep);\\n mat2 rotationMatrix = mat2(vec2(c, -s), vec2(s, c));\\n\\n for(int i = 0; i __left_angle_mark_ MAX_KERNEL_SIZE - 1; i++) {\\n if (i == k) {\\n break;\\n }\\n\\n coord -= center;\\n coord.y *= aspect;\\n coord = rotationMatrix * coord;\\n coord.y /= aspect;\\n coord += center;\\n\\n vec4 sample = texture(uTexture, coord);\\n\\n // switch to pre-multiplied alpha to correctly blur transparent images\\n // sample.rgb *= sample.a;\\n\\n color += sample;\\n }\\n\\n finalColor = color / float(uKernelSize);\\n}\\n\";init_globals();var source31=\"struct RadialBlurUniforms {\\n uRadian: f32,\\n uCenter: vec2__left_angle_mark_f32>,\\n uKernelSize: f32,\\n uRadius: f32,\\n};\\n\\nstruct GlobalFilterUniforms {\\n uInputSize:vec4__left_angle_mark_f32>,\\n uInputPixel:vec4__left_angle_mark_f32>,\\n uInputClamp:vec4__left_angle_mark_f32>,\\n uOutputFrame:vec4__left_angle_mark_f32>,\\n uGlobalFrame:vec4__left_angle_mark_f32>,\\n uOutputTexture:vec4__left_angle_mark_f32>,\\n};\\n\\n@group(0) @binding(0) var__left_angle_mark_uniform> gfu: GlobalFilterUniforms;\\n\\n@group(0) @binding(1) var uTexture: texture_2d__left_angle_mark_f32>; \\n@group(0) @binding(2) var uSampler: sampler;\\n@group(1) @binding(0) var__left_angle_mark_uniform> radialBlurUniforms : RadialBlurUniforms;\\n\\n@fragment\\nfn mainFragment(\\n @builtin(position) position: vec4__left_angle_mark_f32>,\\n @location(0) uv : vec2__left_angle_mark_f32>\\n) -> @location(0) vec4__left_angle_mark_f32> {\\n let uRadian = radialBlurUniforms.uRadian;\\n let uCenter = radialBlurUniforms.uCenter;\\n let uKernelSize = radialBlurUniforms.uKernelSize;\\n let uRadius = radialBlurUniforms.uRadius;\\n \\n var returnColorOnly = false;\\n\\n if (uKernelSize == 0)\\n {\\n returnColorOnly = true;\\n }\\n\\n let aspect: f32 = gfu.uInputSize.y / gfu.uInputSize.x;\\n let center: vec2__left_angle_mark_f32> = uCenter.xy / gfu.uInputSize.xy;\\n let gradient: f32 = uRadius / gfu.uInputSize.x * 0.3;\\n let radius: f32 = uRadius / gfu.uInputSize.x - gradient * 0.5;\\n let k: i32 = i32(uKernelSize - 1);\\n\\n var coord: vec2__left_angle_mark_f32> = uv;\\n let dir: vec2__left_angle_mark_f32> = vec2__left_angle_mark_f32>(center - coord);\\n let dist: f32 = length(vec2__left_angle_mark_f32>(dir.x, dir.y * aspect));\\n\\n var radianStep: f32 = uRadian;\\n \\n if (radius >= 0.0 && dist > radius)\\n {\\n let delta: f32 = dist - radius;\\n let gap: f32 = gradient;\\n let scale: f32 = 1.0 - abs(delta / gap);\\n if (scale __left_angle_mark_= 0.0) {\\n returnColorOnly = true;\\n }\\n radianStep *= scale;\\n }\\n\\n radianStep /= f32(k);\\n\\n let s: f32 = sin(radianStep);\\n let c: f32 = cos(radianStep);\\n let rotationMatrix: mat2x2__left_angle_mark_f32> = mat2x2__left_angle_mark_f32>(vec2__left_angle_mark_f32>(c, -s), vec2__left_angle_mark_f32>(s, c));\\n \\n var color: vec4__left_angle_mark_f32> = textureSample(uTexture, uSampler, uv);\\n let baseColor = vec4__left_angle_mark_f32>(color);\\n\\n let minK: i32 = min(i32(uKernelSize) - 1, MAX_KERNEL_SIZE - 1);\\n\\n for(var i: i32 = 0; i __left_angle_mark_ minK; i += 1) \\n {\\n coord -= center;\\n coord.y *= aspect;\\n coord = rotationMatrix * coord;\\n coord.y /= aspect;\\n coord += center;\\n let sample: vec4__left_angle_mark_f32> = textureSample(uTexture, uSampler, coord);\\n // switch to pre-multiplied alpha to correctly blur transparent images\\n // sample.rgb *= sample.a;\\n color += sample;\\n }\\n\\n return select(color / f32(uKernelSize), baseColor, returnColorOnly);\\n}\\n\\nconst MAX_KERNEL_SIZE: i32 = 2048;\",__defProp26=Object.defineProperty,__defNormalProp25=(e,t,r)=>t in e?__defProp26(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,__publicField25=(e,t,r)=>(__defNormalProp25(e,\"symbol\"!=typeof t?t+\"\":t,r),r),_RadialBlurFilter=class e extends Filter{_updateKernelSize(){this.uniforms.uKernelSize=0!==this._angle?this.kernelSize:0}get angle(){return this._angle}set angle(e){this._angle=e,this.uniforms.uRadian=e*Math.PI/180,this._updateKernelSize()}get center(){return this.uniforms.uCenter}set center(e){Array.isArray(e)&&(e={x:e[0],y:e[1]}),this.uniforms.uCenter=e}get centerX(){return this.center.x}set centerX(e){this.center.x=e}get centerY(){return this.center.y}set centerY(e){this.center.y=e}get kernelSize(){return this._kernelSize}set kernelSize(e){this._kernelSize=e,this._updateKernelSize()}get radius(){return this.uniforms.uRadius}set radius(e){this.uniforms.uRadius=e__left_angle_mark_0||e===1/0?-1:e}constructor(...t){var r;let n=null!=(r=t[0])?r:{};if(\"number\"==typeof n){if(deprecation(\"6.0.0\",\"RadialBlurFilter constructor params are now options object. See params: { angle, center, kernelSize, radius }\"),n={angle:n},t[1]){const e=\"x\"in t[1]?t[1].x:t[1][0],r=\"y\"in t[1]?t[1].y:t[1][1];n.center={x:e,y:r}}t[2]&&(n.kernelSize=t[2]),t[3]&&(n.radius=t[3])}n={...e.DEFAULT_OPTIONS,...n},super({gpuProgram:GpuProgram.from({vertex:{source:wgslVertex,entryPoint:\"mainVertex\"},fragment:{source:source31,entryPoint:\"mainFragment\"}}),glProgram:GlProgram.from({vertex:vertex3,fragment:fragment31,name:\"radial-blur-filter\"}),resources:{radialBlurUniforms:{uRadian:{value:0,type:\"f32\"},uCenter:{value:n.center,type:\"vec2__left_angle_mark_f32>\"},uKernelSize:{value:n.kernelSize,type:\"i32\"},uRadius:{value:n.radius,type:\"f32\"}}}}),__publicField25(this,\"uniforms\"),__publicField25(this,\"_angle\"),__publicField25(this,\"_kernelSize\"),this.uniforms=this.resources.radialBlurUniforms.uniforms,Object.assign(this,n)}};__publicField25(_RadialBlurFilter,\"DEFAULT_OPTIONS\",{angle:0,center:{x:0,y:0},kernelSize:5,radius:-1}),init_globals(),init_globals();var fragment32=\"precision highp float;\\nin vec2 vTextureCoord;\\nout vec4 finalColor;\\n\\nuniform sampler2D uTexture;\\nuniform float uMirror;\\nuniform float uBoundary;\\nuniform vec2 uAmplitude;\\nuniform vec2 uWavelength;\\nuniform vec2 uAlpha;\\nuniform float uTime;\\nuniform vec2 uDimensions;\\n\\nuniform vec4 uInputSize;\\nuniform vec4 uInputClamp;\\n\\nfloat rand(vec2 co) {\\n return fract(sin(dot(co.xy, vec2(12.9898, 78.233))) * 43758.5453);\\n}\\n\\nvoid main(void)\\n{\\n vec2 pixelCoord = vTextureCoord.xy * uInputSize.xy;\\n vec2 coord = pixelCoord / uDimensions;\\n\\n if (coord.y __left_angle_mark_ uBoundary) {\\n finalColor = texture(uTexture, vTextureCoord);\\n return;\\n }\\n\\n float k = (coord.y - uBoundary) / (1. - uBoundary + 0.0001);\\n float areaY = uBoundary * uDimensions.y / uInputSize.y;\\n float v = areaY + areaY - vTextureCoord.y;\\n float y = uMirror > 0.5 ? v : vTextureCoord.y;\\n\\n float _amplitude = ((uAmplitude.y - uAmplitude.x) * k + uAmplitude.x ) / uInputSize.x;\\n float _waveLength = ((uWavelength.y - uWavelength.x) * k + uWavelength.x) / uInputSize.y;\\n float _alpha = (uAlpha.y - uAlpha.x) * k + uAlpha.x;\\n\\n float x = vTextureCoord.x + cos(v * 6.28 / _waveLength - uTime) * _amplitude;\\n x = clamp(x, uInputClamp.x, uInputClamp.z);\\n\\n vec4 color = texture(uTexture, vec2(x, y));\\n\\n finalColor = color * _alpha;\\n}\\n\";init_globals();var source32=\"struct ReflectionUniforms {\\n uMirror: f32,\\n uBoundary: f32,\\n uAmplitude: vec2__left_angle_mark_f32>,\\n uWavelength: vec2__left_angle_mark_f32>,\\n uAlpha: vec2__left_angle_mark_f32>,\\n uTime: f32,\\n uDimensions: vec2__left_angle_mark_f32>,\\n};\\n\\nstruct GlobalFilterUniforms {\\n uInputSize:vec4__left_angle_mark_f32>,\\n uInputPixel:vec4__left_angle_mark_f32>,\\n uInputClamp:vec4__left_angle_mark_f32>,\\n uOutputFrame:vec4__left_angle_mark_f32>,\\n uGlobalFrame:vec4__left_angle_mark_f32>,\\n uOutputTexture:vec4__left_angle_mark_f32>,\\n};\\n\\n@group(0) @binding(0) var__left_angle_mark_uniform> gfu: GlobalFilterUniforms;\\n\\n@group(0) @binding(1) var uTexture: texture_2d__left_angle_mark_f32>; \\n@group(0) @binding(2) var uSampler: sampler;\\n@group(1) @binding(0) var__left_angle_mark_uniform> reflectionUniforms : ReflectionUniforms;\\n\\n@fragment\\nfn mainFragment(\\n @builtin(position) position: vec4__left_angle_mark_f32>,\\n @location(0) uv : vec2__left_angle_mark_f32>\\n) -> @location(0) vec4__left_angle_mark_f32> {\\n let uDimensions: vec2__left_angle_mark_f32> = reflectionUniforms.uDimensions;\\n let uBoundary: f32 = reflectionUniforms.uBoundary;\\n let uMirror: bool = reflectionUniforms.uMirror > 0.5;\\n let uAmplitude: vec2__left_angle_mark_f32> = reflectionUniforms.uAmplitude;\\n let uWavelength: vec2__left_angle_mark_f32> = reflectionUniforms.uWavelength;\\n let uAlpha: vec2__left_angle_mark_f32> = reflectionUniforms.uAlpha;\\n let uTime: f32 = reflectionUniforms.uTime;\\n\\n let pixelCoord: vec2__left_angle_mark_f32> = uv * gfu.uInputSize.xy;\\n let coord: vec2__left_angle_mark_f32> = pixelCoord /uDimensions;\\n var returnColorOnly: bool = false;\\n\\n if (coord.y __left_angle_mark_ uBoundary) {\\n returnColorOnly = true;\\n }\\n\\n let k: f32 = (coord.y - uBoundary) / (1. - uBoundary + 0.0001);\\n let areaY: f32 = uBoundary * uDimensions.y / gfu.uInputSize.y;\\n let v: f32 = areaY + areaY - uv.y;\\n let y: f32 = select(uv.y, v, uMirror);\\n\\n let amplitude: f32 = ((uAmplitude.y - uAmplitude.x) * k + uAmplitude.x ) / gfu.uInputSize.x;\\n let waveLength: f32 = ((uWavelength.y - uWavelength.x) * k + uWavelength.x) / gfu.uInputSize.y;\\n let alpha: f32 = select((uAlpha.y - uAlpha.x) * k + uAlpha.x, 1., returnColorOnly);\\n\\n var x: f32 = uv.x + cos(v * 6.28 / waveLength - uTime) * amplitude;\\n x = clamp(x, gfu.uInputClamp.x, gfu.uInputClamp.z);\\n \\n return textureSample(uTexture, uSampler, select(vec2__left_angle_mark_f32>(x, y), uv, returnColorOnly)) * alpha;\\n}\\n\\nfn rand(co: vec2__left_angle_mark_f32>) -> f32 \\n{\\n return fract(sin(dot(co.xy, vec2(12.9898, 78.233))) * 43758.5453);\\n}\",__defProp27=Object.defineProperty,__defNormalProp26=(e,t,r)=>t in e?__defProp27(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,__publicField26=(e,t,r)=>(__defNormalProp26(e,\"symbol\"!=typeof t?t+\"\":t,r),r),_ReflectionFilter=class e extends Filter{apply(e,t,r,n){this.uniforms.uDimensions[0]=t.frame.width,this.uniforms.uDimensions[1]=t.frame.height,this.uniforms.uTime=this.time,e.applyFilter(this,t,r,n)}get mirror(){return this.uniforms.uMirror>.5}set mirror(e){this.uniforms.uMirror=e?1:0}get boundary(){return this.uniforms.uBoundary}set boundary(e){this.uniforms.uBoundary=e}get amplitude(){return Array.from(this.uniforms.uAmplitude)}set amplitude(e){this.uniforms.uAmplitude[0]=e[0],this.uniforms.uAmplitude[1]=e[1]}get amplitudeStart(){return this.uniforms.uAmplitude[0]}set amplitudeStart(e){this.uniforms.uAmplitude[0]=e}get amplitudeEnd(){return this.uniforms.uAmplitude[1]}set amplitudeEnd(e){this.uniforms.uAmplitude[1]=e}get waveLength(){return Array.from(this.uniforms.uWavelength)}set waveLength(e){this.uniforms.uWavelength[0]=e[0],this.uniforms.uWavelength[1]=e[1]}get wavelengthStart(){return this.uniforms.uWavelength[0]}set wavelengthStart(e){this.uniforms.uWavelength[0]=e}get wavelengthEnd(){return this.uniforms.uWavelength[1]}set wavelengthEnd(e){this.uniforms.uWavelength[1]=e}get alpha(){return Array.from(this.uniforms.uAlpha)}set alpha(e){this.uniforms.uAlpha[0]=e[0],this.uniforms.uAlpha[1]=e[1]}get alphaStart(){return this.uniforms.uAlpha[0]}set alphaStart(e){this.uniforms.uAlpha[0]=e}get alphaEnd(){return this.uniforms.uAlpha[1]}set alphaEnd(e){this.uniforms.uAlpha[1]=e}constructor(t){t={...e.DEFAULT_OPTIONS,...t},super({gpuProgram:GpuProgram.from({vertex:{source:wgslVertex,entryPoint:\"mainVertex\"},fragment:{source:source32,entryPoint:\"mainFragment\"}}),glProgram:GlProgram.from({vertex:vertex3,fragment:fragment32,name:\"reflection-filter\"}),resources:{reflectionUniforms:{uMirror:{value:t.mirror?1:0,type:\"f32\"},uBoundary:{value:t.boundary,type:\"f32\"},uAmplitude:{value:t.amplitude,type:\"vec2__left_angle_mark_f32>\"},uWavelength:{value:t.waveLength,type:\"vec2__left_angle_mark_f32>\"},uAlpha:{value:t.alpha,type:\"vec2__left_angle_mark_f32>\"},uTime:{value:t.time,type:\"f32\"},uDimensions:{value:new Float32Array(2),type:\"vec2__left_angle_mark_f32>\"}}}}),__publicField26(this,\"uniforms\"),__publicField26(this,\"time\",0),this.uniforms=this.resources.reflectionUniforms.uniforms,Object.assign(this,t)}};__publicField26(_ReflectionFilter,\"DEFAULT_OPTIONS\",{mirror:!0,boundary:.5,amplitude:[0,20],waveLength:[30,100],alpha:[1,1],time:0}),init_globals(),init_globals();var fragment33=\"precision highp float;\\nin vec2 vTextureCoord;\\nout vec4 finalColor;\\n\\nuniform sampler2D uTexture;\\nuniform vec4 uInputSize;\\nuniform vec2 uRed;\\nuniform vec2 uGreen;\\nuniform vec2 uBlue;\\n\\nvoid main(void)\\n{\\n float r = texture(uTexture, vTextureCoord + uRed/uInputSize.xy).r;\\n float g = texture(uTexture, vTextureCoord + uGreen/uInputSize.xy).g;\\n float b = texture(uTexture, vTextureCoord + uBlue/uInputSize.xy).b;\\n float a = texture(uTexture, vTextureCoord).a;\\n finalColor = vec4(r, g, b, a);\\n}\\n\";init_globals();var source33=\"struct RgbSplitUniforms {\\n uRed: vec2__left_angle_mark_f32>,\\n uGreen: vec2__left_angle_mark_f32>,\\n uBlue: vec3__left_angle_mark_f32>,\\n};\\n\\nstruct GlobalFilterUniforms {\\n uInputSize:vec4__left_angle_mark_f32>,\\n uInputPixel:vec4__left_angle_mark_f32>,\\n uInputClamp:vec4__left_angle_mark_f32>,\\n uOutputFrame:vec4__left_angle_mark_f32>,\\n uGlobalFrame:vec4__left_angle_mark_f32>,\\n uOutputTexture:vec4__left_angle_mark_f32>,\\n};\\n\\n@group(0) @binding(0) var__left_angle_mark_uniform> gfu: GlobalFilterUniforms;\\n\\n@group(0) @binding(1) var uTexture: texture_2d__left_angle_mark_f32>; \\n@group(0) @binding(2) var uSampler: sampler;\\n@group(1) @binding(0) var__left_angle_mark_uniform> rgbSplitUniforms : RgbSplitUniforms;\\n\\n@fragment\\nfn mainFragment(\\n @builtin(position) position: vec4__left_angle_mark_f32>,\\n @location(0) uv : vec2__left_angle_mark_f32>\\n) -> @location(0) vec4__left_angle_mark_f32> {\\n let r = textureSample(uTexture, uSampler, uv + vec2__left_angle_mark_f32>(rgbSplitUniforms.uRed.x / gfu.uInputSize.x, rgbSplitUniforms.uRed.y / gfu.uInputSize.y)).r;\\n let g = textureSample(uTexture, uSampler, uv + vec2__left_angle_mark_f32>(rgbSplitUniforms.uGreen.x / gfu.uInputSize.x, rgbSplitUniforms.uGreen.y / gfu.uInputSize.y)).g;\\n let b = textureSample(uTexture, uSampler, uv + vec2__left_angle_mark_f32>(rgbSplitUniforms.uBlue.x / gfu.uInputSize.x, rgbSplitUniforms.uBlue.y / gfu.uInputSize.y)).b;\\n let a = textureSample(uTexture, uSampler, uv).a;\\n return vec4__left_angle_mark_f32>(r, g, b, a);\\n}\\n\",__defProp28=Object.defineProperty,__defNormalProp27=(e,t,r)=>t in e?__defProp28(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,__publicField27=(e,t,r)=>(__defNormalProp27(e,\"symbol\"!=typeof t?t+\"\":t,r),r),_RGBSplitFilter=class e extends Filter{get red(){return this.uniforms.uRed}set red(e){Array.isArray(e)&&(e={x:e[0],y:e[1]}),this.uniforms.uRed=e}get redX(){return this.red.x}set redX(e){this.red.x=e}get redY(){return this.red.y}set redY(e){this.red.y=e}get green(){return this.uniforms.uGreen}set green(e){Array.isArray(e)&&(e={x:e[0],y:e[1]}),this.uniforms.uGreen=e}get greenX(){return this.green.x}set greenX(e){this.green.x=e}get greenY(){return this.green.y}set greenY(e){this.green.y=e}get blue(){return this.uniforms.uBlue}set blue(e){Array.isArray(e)&&(e={x:e[0],y:e[1]}),this.uniforms.uBlue=e}get blueX(){return this.blue.x}set blueX(e){this.blue.x=e}get blueY(){return this.blue.y}set blueY(e){this.blue.y=e}constructor(...t){var r;let n=null!=(r=t[0])?r:{};(Array.isArray(n)||\"x\"in n&&\"y\"in n)&&(deprecation(\"6.0.0\",\"RGBSplitFilter constructor params are now options object. See params: { red, green, blue }\"),n={red:n},void 0!==t[1]&&(n.green=t[1]),void 0!==t[2]&&(n.blue=t[2])),n={...e.DEFAULT_OPTIONS,...n},super({gpuProgram:GpuProgram.from({vertex:{source:wgslVertex,entryPoint:\"mainVertex\"},fragment:{source:source33,entryPoint:\"mainFragment\"}}),glProgram:GlProgram.from({vertex:vertex3,fragment:fragment33,name:\"rgb-split-filter\"}),resources:{rgbSplitUniforms:{uRed:{value:n.red,type:\"vec2__left_angle_mark_f32>\"},uGreen:{value:n.green,type:\"vec2__left_angle_mark_f32>\"},uBlue:{value:n.blue,type:\"vec2__left_angle_mark_f32>\"}}}}),__publicField27(this,\"uniforms\"),this.uniforms=this.resources.rgbSplitUniforms.uniforms,Object.assign(this,n)}};__publicField27(_RGBSplitFilter,\"DEFAULT_OPTIONS\",{red:{x:-10,y:0},green:{x:0,y:10},blue:{x:0,y:0}}),init_globals(),init_globals();var fragment34=\"\\nprecision highp float;\\nin vec2 vTextureCoord;\\nout vec4 finalColor;\\n\\nuniform sampler2D uTexture;\\nuniform vec2 uCenter;\\nuniform float uTime;\\nuniform float uSpeed;\\nuniform vec4 uWave;\\n\\nuniform vec4 uInputSize;\\nuniform vec4 uInputClamp;\\n\\nconst float PI = 3.14159;\\n\\nvoid main()\\n{\\n float uAmplitude = uWave[0];\\n float uWavelength = uWave[1];\\n float uBrightness = uWave[2];\\n float uRadius = uWave[3];\\n\\n float halfWavelength = uWavelength * 0.5 / uInputSize.x;\\n float maxRadius = uRadius / uInputSize.x;\\n float currentRadius = uTime * uSpeed / uInputSize.x;\\n\\n float fade = 1.0;\\n\\n if (maxRadius > 0.0) {\\n if (currentRadius > maxRadius) {\\n finalColor = texture(uTexture, vTextureCoord);\\n return;\\n }\\n fade = 1.0 - pow(currentRadius / maxRadius, 2.0);\\n }\\n\\n vec2 dir = vec2(vTextureCoord - uCenter / uInputSize.xy);\\n dir.y *= uInputSize.y / uInputSize.x;\\n float dist = length(dir);\\n\\n if (dist __left_angle_mark_= 0.0 || dist __left_angle_mark_ currentRadius - halfWavelength || dist > currentRadius + halfWavelength) {\\n finalColor = texture(uTexture, vTextureCoord);\\n return;\\n }\\n\\n vec2 diffUV = normalize(dir);\\n\\n float diff = (dist - currentRadius) / halfWavelength;\\n\\n float p = 1.0 - pow(abs(diff), 2.0);\\n\\n // float powDiff = diff * pow(p, 2.0) * ( amplitude * fade );\\n float powDiff = 1.25 * sin(diff * PI) * p * ( uAmplitude * fade );\\n\\n vec2 offset = diffUV * powDiff / uInputSize.xy;\\n\\n // Do clamp :\\n vec2 coord = vTextureCoord + offset;\\n vec2 clampedCoord = clamp(coord, uInputClamp.xy, uInputClamp.zw);\\n vec4 color = texture(uTexture, clampedCoord);\\n if (coord != clampedCoord) {\\n color *= max(0.0, 1.0 - length(coord - clampedCoord));\\n }\\n\\n // No clamp :\\n // finalColor = texture(uTexture, vTextureCoord + offset);\\n\\n color.rgb *= 1.0 + (uBrightness - 1.0) * p * fade;\\n\\n finalColor = color;\\n}\\n\";init_globals();var source34=\"\\nstruct ShockWaveUniforms {\\n uTime: f32,\\n uOffset: vec2__left_angle_mark_f32>,\\n uSpeed: f32,\\n uWave: vec4__left_angle_mark_f32>,\\n};\\n\\nstruct GlobalFilterUniforms {\\n uInputSize:vec4__left_angle_mark_f32>,\\n uInputPixel:vec4__left_angle_mark_f32>,\\n uInputClamp:vec4__left_angle_mark_f32>,\\n uOutputFrame:vec4__left_angle_mark_f32>,\\n uGlobalFrame:vec4__left_angle_mark_f32>,\\n uOutputTexture:vec4__left_angle_mark_f32>,\\n};\\n\\n@group(0) @binding(0) var__left_angle_mark_uniform> gfu: GlobalFilterUniforms;\\n\\n@group(0) @binding(1) var uTexture: texture_2d__left_angle_mark_f32>; \\n@group(0) @binding(2) var uSampler: sampler;\\n@group(1) @binding(0) var__left_angle_mark_uniform> shockwaveUniforms : ShockWaveUniforms;\\n\\n@fragment\\nfn mainFragment(\\n @builtin(position) position: vec4__left_angle_mark_f32>,\\n @location(0) uv : vec2__left_angle_mark_f32>\\n) -> @location(0) vec4__left_angle_mark_f32> {\\n\\n let uTime = shockwaveUniforms.uTime;\\n let uOffset = shockwaveUniforms.uOffset;\\n let uSpeed = shockwaveUniforms.uSpeed;\\n let uAmplitude = shockwaveUniforms.uWave[0];\\n let uWavelength = shockwaveUniforms.uWave[1];\\n let uBrightness = shockwaveUniforms.uWave[2];\\n let uRadius = shockwaveUniforms.uWave[3];\\n let halfWavelength: f32 = uWavelength * 0.5 / gfu.uInputSize.x;\\n let maxRadius: f32 = uRadius / gfu.uInputSize.x;\\n let currentRadius: f32 = uTime * uSpeed / gfu.uInputSize.x;\\n var fade: f32 = 1.0;\\n var returnColorOnly: bool = false;\\n \\n if (maxRadius > 0.0) {\\n if (currentRadius > maxRadius) {\\n returnColorOnly = true;\\n }\\n fade = 1.0 - pow(currentRadius / maxRadius, 2.0);\\n }\\n var dir: vec2__left_angle_mark_f32> = vec2__left_angle_mark_f32>(uv - uOffset / gfu.uInputSize.xy);\\n dir.y *= gfu.uInputSize.y / gfu.uInputSize.x;\\n\\n let dist:f32 = length(dir);\\n\\n if (dist __left_angle_mark_= 0.0 || dist __left_angle_mark_ currentRadius - halfWavelength || dist > currentRadius + halfWavelength) {\\n returnColorOnly = true;\\n }\\n\\n let diffUV: vec2__left_angle_mark_f32> = normalize(dir);\\n let diff: f32 = (dist - currentRadius) / halfWavelength;\\n let p: f32 = 1.0 - pow(abs(diff), 2.0);\\n let powDiff: f32 = 1.25 * sin(diff * PI) * p * ( uAmplitude * fade );\\n let offset: vec2__left_angle_mark_f32> = diffUV * powDiff / gfu.uInputSize.xy;\\n // Do clamp :\\n let coord: vec2__left_angle_mark_f32> = uv + offset;\\n let clampedCoord: vec2__left_angle_mark_f32> = clamp(coord, gfu.uInputClamp.xy, gfu.uInputClamp.zw);\\n\\n var clampedColor: vec4__left_angle_mark_f32> = textureSample(uTexture, uSampler, clampedCoord);\\n \\n if (boolVec2(coord, clampedCoord)) \\n {\\n clampedColor *= max(0.0, 1.0 - length(coord - clampedCoord));\\n }\\n // No clamp :\\n var finalColor = clampedColor;\\n\\n return select(finalColor, textureSample(uTexture, uSampler, uv), returnColorOnly);\\n}\\n\\nfn boolVec2(x: vec2__left_angle_mark_f32>, y: vec2__left_angle_mark_f32>) -> bool\\n{\\n if (x.x == y.x && x.y == y.y)\\n {\\n return true;\\n }\\n \\n return false;\\n}\\n\\nconst PI: f32 = 3.14159265358979323846264;\\n\",__defProp29=Object.defineProperty,__defNormalProp28=(e,t,r)=>t in e?__defProp29(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,__publicField28=(e,t,r)=>(__defNormalProp28(e,\"symbol\"!=typeof t?t+\"\":t,r),r),_ShockwaveFilter=class e extends Filter{apply(e,t,r,n){this.uniforms.uTime=this.time,e.applyFilter(this,t,r,n)}get center(){return this.uniforms.uCenter}set center(e){Array.isArray(e)&&(e={x:e[0],y:e[1]}),this.uniforms.uCenter=e}get centerX(){return this.uniforms.uCenter.x}set centerX(e){this.uniforms.uCenter.x=e}get centerY(){return this.uniforms.uCenter.y}set centerY(e){this.uniforms.uCenter.y=e}get speed(){return this.uniforms.uSpeed}set speed(e){this.uniforms.uSpeed=e}get amplitude(){return this.uniforms.uWave[0]}set amplitude(e){this.uniforms.uWave[0]=e}get wavelength(){return this.uniforms.uWave[1]}set wavelength(e){this.uniforms.uWave[1]=e}get brightness(){return this.uniforms.uWave[2]}set brightness(e){this.uniforms.uWave[2]=e}get radius(){return this.uniforms.uWave[3]}set radius(e){this.uniforms.uWave[3]=e}constructor(...t){var r;let n=null!=(r=t[0])?r:{};(Array.isArray(n)||\"x\"in n&&\"y\"in n)&&(deprecation(\"6.0.0\",\"ShockwaveFilter constructor params are now options object. See params: { center, speed, amplitude, wavelength, brightness, radius, time }\"),n={center:n,...t[1]},void 0!==t[2]&&(n.time=t[2])),n={...e.DEFAULT_OPTIONS,...n},super({gpuProgram:GpuProgram.from({vertex:{source:wgslVertex,entryPoint:\"mainVertex\"},fragment:{source:source34,entryPoint:\"mainFragment\"}}),glProgram:GlProgram.from({vertex:vertex3,fragment:fragment34,name:\"shockwave-filter\"}),resources:{shockwaveUniforms:{uTime:{value:n.time,type:\"f32\"},uCenter:{value:n.center,type:\"vec2__left_angle_mark_f32>\"},uSpeed:{value:n.speed,type:\"f32\"},uWave:{value:new Float32Array(4),type:\"vec4__left_angle_mark_f32>\"}}}}),__publicField28(this,\"uniforms\"),__publicField28(this,\"time\"),this.time=0,this.uniforms=this.resources.shockwaveUniforms.uniforms,Object.assign(this,n)}};__publicField28(_ShockwaveFilter,\"DEFAULT_OPTIONS\",{center:{x:0,y:0},speed:500,amplitude:30,wavelength:160,brightness:1,radius:-1}),init_globals(),init_globals();var fragment35=\"precision highp float;\\nin vec2 vTextureCoord;\\nout vec4 finalColor;\\n\\nuniform sampler2D uTexture;\\nuniform sampler2D uMapTexture;\\nuniform vec3 uColor;\\nuniform float uAlpha;\\nuniform vec2 uDimensions;\\n\\nuniform vec4 uInputSize;\\n\\nvoid main() {\\n vec4 diffuseColor = texture(uTexture, vTextureCoord);\\n vec2 lightCoord = (vTextureCoord * uInputSize.xy) / uDimensions;\\n vec4 light = texture(uMapTexture, lightCoord);\\n vec3 ambient = uColor.rgb * uAlpha;\\n vec3 intensity = ambient + light.rgb;\\n vec3 color = diffuseColor.rgb * intensity;\\n finalColor = vec4(color, diffuseColor.a);\\n}\\n\";init_globals();var source35=\"struct SimpleLightmapUniforms {\\n uColor: vec3__left_angle_mark_f32>,\\n uAlpha: f32,\\n uDimensions: vec2__left_angle_mark_f32>,\\n};\\n\\nstruct GlobalFilterUniforms {\\n uInputSize:vec4__left_angle_mark_f32>,\\n uInputPixel:vec4__left_angle_mark_f32>,\\n uInputClamp:vec4__left_angle_mark_f32>,\\n uOutputFrame:vec4__left_angle_mark_f32>,\\n uGlobalFrame:vec4__left_angle_mark_f32>,\\n uOutputTexture:vec4__left_angle_mark_f32>,\\n};\\n\\n@group(0) @binding(0) var__left_angle_mark_uniform> gfu: GlobalFilterUniforms;\\n\\n@group(0) @binding(1) var uTexture: texture_2d__left_angle_mark_f32>; \\n@group(0) @binding(2) var uSampler: sampler;\\n@group(1) @binding(0) var__left_angle_mark_uniform> simpleLightmapUniforms : SimpleLightmapUniforms;\\n@group(1) @binding(1) var uMapTexture: texture_2d__left_angle_mark_f32>;\\n@group(1) @binding(2) var uMapSampler: sampler;\\n\\n@fragment\\nfn mainFragment(\\n @builtin(position) position: vec4__left_angle_mark_f32>,\\n @location(0) uv : vec2__left_angle_mark_f32>,\\n) -> @location(0) vec4__left_angle_mark_f32> {\\n let uColor = simpleLightmapUniforms.uColor;\\n let uAlpha = simpleLightmapUniforms.uAlpha;\\n let uDimensions = simpleLightmapUniforms.uDimensions;\\n\\n let diffuseColor: vec4__left_angle_mark_f32> = textureSample(uTexture, uSampler, uv);\\n let lightCoord: vec2__left_angle_mark_f32> = (uv * gfu.uInputSize.xy) / simpleLightmapUniforms.uDimensions;\\n let light: vec4__left_angle_mark_f32> = textureSample(uMapTexture, uMapSampler, lightCoord);\\n let ambient: vec3__left_angle_mark_f32> = uColor * uAlpha;\\n let intensity: vec3__left_angle_mark_f32> = ambient + light.rgb;\\n let finalColor: vec3__left_angle_mark_f32> = diffuseColor.rgb * intensity;\\n return vec4__left_angle_mark_f32>(finalColor, diffuseColor.a);\\n}\",__defProp30=Object.defineProperty,__defNormalProp29=(e,t,r)=>t in e?__defProp30(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,__publicField29=(e,t,r)=>(__defNormalProp29(e,\"symbol\"!=typeof t?t+\"\":t,r),r),_SimpleLightmapFilter=class e extends Filter{apply(e,t,r,n){this.uniforms.uDimensions[0]=t.frame.width,this.uniforms.uDimensions[1]=t.frame.height,e.applyFilter(this,t,r,n)}get lightMap(){return this._lightMap}set lightMap(e){this._lightMap=e,this.resources.uMapTexture=e.source,this.resources.uMapSampler=e.source.style}get color(){return this._color.value}set color(e){this._color.setValue(e);const[t,r,n]=this._color.toArray();this.uniforms.uColor[0]=t,this.uniforms.uColor[1]=r,this.uniforms.uColor[2]=n}get alpha(){return this.uniforms.uAlpha}set alpha(e){this.uniforms.uAlpha=e}constructor(...t){var r,n;let i=null!=(r=t[0])?r:{};if(i instanceof Texture&&(deprecation(\"6.0.0\",\"SimpleLightmapFilter constructor params are now options object. See params: { lightMap, color, alpha }\"),i={lightMap:i},void 0!==t[1]&&(i.color=t[1]),void 0!==t[2]&&(i.alpha=t[2])),i={...e.DEFAULT_OPTIONS,...i},!i.lightMap)throw Error(\"No light map texture source was provided to SimpleLightmapFilter\");super({gpuProgram:GpuProgram.from({vertex:{source:wgslVertex,entryPoint:\"mainVertex\"},fragment:{source:source35,entryPoint:\"mainFragment\"}}),glProgram:GlProgram.from({vertex:vertex3,fragment:fragment35,name:\"simple-lightmap-filter\"}),resources:{simpleLightmapUniforms:{uColor:{value:new Float32Array(3),type:\"vec3__left_angle_mark_f32>\"},uAlpha:{value:i.alpha,type:\"f32\"},uDimensions:{value:new Float32Array(2),type:\"vec2__left_angle_mark_f32>\"}},uMapTexture:i.lightMap.source,uMapSampler:i.lightMap.source.style}}),__publicField29(this,\"uniforms\"),__publicField29(this,\"_color\"),__publicField29(this,\"_lightMap\"),this.uniforms=this.resources.simpleLightmapUniforms.uniforms,this._color=new Color2,this.color=null!=(n=i.color)?n:0,Object.assign(this,i)}};__publicField29(_SimpleLightmapFilter,\"DEFAULT_OPTIONS\",{lightMap:Texture.WHITE,color:0,alpha:1}),init_globals(),init_globals();var fragment36=\"in vec2 vTextureCoord;\\nout vec4 finalColor;\\n\\nuniform sampler2D uTexture;\\nuniform vec2 uBlur;\\nuniform vec2 uStart;\\nuniform vec2 uEnd;\\nuniform vec2 uDelta;\\nuniform vec2 uDimensions;\\n\\nfloat random(vec3 scale, float seed)\\n{\\n return fract(sin(dot(gl_FragCoord.xyz + seed, scale)) * 43758.5453 + seed);\\n}\\n\\nvoid main(void)\\n{\\n vec4 color = vec4(0.0);\\n float total = 0.0;\\n\\n float blur = uBlur[0];\\n float gradientBlur = uBlur[1];\\n\\n float offset = random(vec3(12.9898, 78.233, 151.7182), 0.0);\\n vec2 normal = normalize(vec2(uStart.y - uEnd.y, uEnd.x - uStart.x));\\n float radius = smoothstep(0.0, 1.0, abs(dot(vTextureCoord * uDimensions - uStart, normal)) / gradientBlur) * blur;\\n\\n for (float t = -30.0; t __left_angle_mark_= 30.0; t++)\\n {\\n float percent = (t + offset - 0.5) / 30.0;\\n float weight = 1.0 - abs(percent);\\n vec4 sample = texture(uTexture, vTextureCoord + uDelta / uDimensions * percent * radius);\\n sample.rgb *= sample.a;\\n color += sample * weight;\\n total += weight;\\n }\\n\\n color /= total;\\n color.rgb /= color.a + 0.00001;\\n\\n finalColor = color;\\n}\\n\";init_globals();var source36=\"struct TiltShiftUniforms {\\n uBlur: vec2__left_angle_mark_f32>,\\n uStart: vec2__left_angle_mark_f32>,\\n uEnd: vec2__left_angle_mark_f32>,\\n uDelta: vec2__left_angle_mark_f32>,\\n uDimensions: vec2__left_angle_mark_f32>,\\n};\\n\\n@group(0) @binding(1) var uTexture: texture_2d__left_angle_mark_f32>; \\n@group(0) @binding(2) var uSampler: sampler;\\n@group(1) @binding(0) var__left_angle_mark_uniform> tiltShiftUniforms : TiltShiftUniforms;\\n\\n@fragment\\nfn mainFragment(\\n @builtin(position) position: vec4__left_angle_mark_f32>,\\n @location(0) uv : vec2__left_angle_mark_f32>\\n) -> @location(0) vec4__left_angle_mark_f32> {\\n let uBlur = tiltShiftUniforms.uBlur[0];\\n let uBlurGradient = tiltShiftUniforms.uBlur[1];\\n let uStart = tiltShiftUniforms.uStart;\\n let uEnd = tiltShiftUniforms.uEnd;\\n let uDelta = tiltShiftUniforms.uDelta;\\n let uDimensions = tiltShiftUniforms.uDimensions;\\n\\n var color: vec4__left_angle_mark_f32> = vec4__left_angle_mark_f32>(0.0);\\n var total: f32 = 0.0;\\n\\n let offset: f32 = random(position, vec3__left_angle_mark_f32>(12.9898, 78.233, 151.7182), 0.0);\\n let normal: vec2__left_angle_mark_f32> = normalize(vec2__left_angle_mark_f32>(uStart.y - uEnd.y, uEnd.x - uStart.x));\\n let radius: f32 = smoothstep(0.0, 1.0, abs(dot(uv * uDimensions - uStart, normal)) / uBlurGradient) * uBlur;\\n\\n for (var t: f32 = -30.0; t __left_angle_mark_= 30.0; t += 1.0)\\n {\\n var percent: f32 = (t + offset - 0.5) / 30.0;\\n var weight: f32 = 1.0 - abs(percent);\\n var sample: vec4__left_angle_mark_f32> = textureSample(uTexture, uSampler, uv + uDelta / uDimensions * percent * radius);\\n sample = vec4__left_angle_mark_f32>(sample.xyz * sample.a, sample.a); // multiply sample.rgb with sample.a\\n color += sample * weight;\\n total += weight;\\n }\\n\\n color /= total;\\n color = vec4__left_angle_mark_f32>(color.xyz / (color.a + 0.00001), color.a); // divide color.rgb by color.a + 0.00001\\n\\n return color;\\n}\\n\\n\\nfn random(position: vec4__left_angle_mark_f32>, scale: vec3__left_angle_mark_f32>, seed: f32) -> f32\\n{\\n return fract(sin(dot(position.xyz + seed, scale)) * 43758.5453 + seed);\\n}\",__defProp31=Object.defineProperty,__defNormalProp30=(e,t,r)=>t in e?__defProp31(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,__publicField30=(e,t,r)=>(__defNormalProp30(e,\"symbol\"!=typeof t?t+\"\":t,r),r),_TiltShiftAxisFilter=class e extends Filter{updateDimensions(e){const{uDimensions:t}=this.uniforms;t[0]=e.frame.width,t[1]=e.frame.height}updateDelta(){if(this.uniforms.uDelta[0]=0,this.uniforms.uDelta[1]=0,void 0===this._tiltAxis)return;const e=this.uniforms.uEnd,t=this.uniforms.uStart,r=e.x-t.x,n=e.y-t.y,i=Math.sqrt(r*r+n*n),o=\"vertical\"===this._tiltAxis;this.uniforms.uDelta[0]=o?-n/i:r/i,this.uniforms.uDelta[1]=o?r/i:n/i}constructor(t){const{width:r,height:n}=ViewSystem.defaultOptions;t={...e.DEFAULT_OPTIONS,start:{x:0,y:n/2},end:{x:r,y:n/2},...t},super({gpuProgram:GpuProgram.from({vertex:{source:wgslVertex,entryPoint:\"mainVertex\"},fragment:{source:source36,entryPoint:\"mainFragment\"}}),glProgram:GlProgram.from({vertex:vertex3,fragment:fragment36,name:\"tilt-shift-axis-filter\"}),resources:{tiltShiftUniforms:{uBlur:{value:new Float32Array([t.blur,t.gradientBlur]),type:\"vec2__left_angle_mark_f32>\"},uStart:{value:t.start,type:\"vec2__left_angle_mark_f32>\"},uEnd:{value:t.end,type:\"vec2__left_angle_mark_f32>\"},uDelta:{value:new Float32Array([0,0]),type:\"vec2__left_angle_mark_f32>\"},uDimensions:{value:new Float32Array([r,n]),type:\"vec2__left_angle_mark_f32>\"}}}}),__publicField30(this,\"uniforms\"),__publicField30(this,\"_tiltAxis\"),this.uniforms=this.resources.tiltShiftUniforms.uniforms,this._tiltAxis=t.axis}};__publicField30(_TiltShiftAxisFilter,\"DEFAULT_OPTIONS\",{blur:100,gradientBlur:600}),init_globals(),init_globals(),init_globals();var fragment37=\"precision highp float;\\nin vec2 vTextureCoord;\\nout vec4 finalColor;\\n\\nuniform sampler2D uTexture;\\nuniform vec2 uTwist;\\nuniform vec2 uOffset;\\nuniform vec4 uInputSize;\\n\\nvec2 mapCoord( vec2 coord )\\n{\\n coord *= uInputSize.xy;\\n coord += uInputSize.zw;\\n\\n return coord;\\n}\\n\\nvec2 unmapCoord( vec2 coord )\\n{\\n coord -= uInputSize.zw;\\n coord /= uInputSize.xy;\\n\\n return coord;\\n}\\n\\nvec2 twist(vec2 coord)\\n{\\n coord -= uOffset;\\n\\n float dist = length(coord);\\n float uRadius = uTwist[0];\\n float uAngle = uTwist[1];\\n\\n if (dist __left_angle_mark_ uRadius)\\n {\\n float ratioDist = (uRadius - dist) / uRadius;\\n float angleMod = ratioDist * ratioDist * uAngle;\\n float s = sin(angleMod);\\n float c = cos(angleMod);\\n coord = vec2(coord.x * c - coord.y * s, coord.x * s + coord.y * c);\\n }\\n\\n coord += uOffset;\\n\\n return coord;\\n}\\n\\nvoid main(void)\\n{\\n vec2 coord = mapCoord(vTextureCoord);\\n coord = twist(coord);\\n coord = unmapCoord(coord);\\n finalColor = texture(uTexture, coord);\\n}\\n\";init_globals();var source37=\"struct TwistUniforms {\\n uTwist:vec2__left_angle_mark_f32>,\\n uOffset:vec2__left_angle_mark_f32>,\\n};\\n\\nstruct GlobalFilterUniforms {\\n uInputSize:vec4__left_angle_mark_f32>,\\n uInputPixel:vec4__left_angle_mark_f32>,\\n uInputClamp:vec4__left_angle_mark_f32>,\\n uOutputFrame:vec4__left_angle_mark_f32>,\\n uGlobalFrame:vec4__left_angle_mark_f32>,\\n uOutputTexture:vec4__left_angle_mark_f32>,\\n};\\n\\n@group(0) @binding(0) var__left_angle_mark_uniform> gfu: GlobalFilterUniforms;\\n\\n@group(0) @binding(1) var uTexture: texture_2d__left_angle_mark_f32>; \\n@group(0) @binding(2) var uSampler: sampler;\\n@group(1) @binding(0) var__left_angle_mark_uniform> twistUniforms : TwistUniforms;\\n\\n@fragment\\nfn mainFragment(\\n @location(0) uv: vec2__left_angle_mark_f32>,\\n @builtin(position) position: vec4__left_angle_mark_f32>\\n) -> @location(0) vec4__left_angle_mark_f32> {\\n return textureSample(uTexture, uSampler, unmapCoord(twist(mapCoord(uv))));\\n}\\n\\nfn mapCoord(coord: vec2__left_angle_mark_f32> ) -> vec2__left_angle_mark_f32>\\n{\\n var mappedCoord: vec2__left_angle_mark_f32> = coord;\\n mappedCoord *= gfu.uInputSize.xy;\\n mappedCoord += gfu.uOutputFrame.xy;\\n return mappedCoord;\\n}\\n\\nfn unmapCoord(coord: vec2__left_angle_mark_f32> ) -> vec2__left_angle_mark_f32>\\n{\\n var mappedCoord: vec2__left_angle_mark_f32> = coord;\\n mappedCoord -= gfu.uOutputFrame.xy;\\n mappedCoord /= gfu.uInputSize.xy;\\n return mappedCoord;\\n}\\n\\nfn twist(coord: vec2__left_angle_mark_f32>) -> vec2__left_angle_mark_f32>\\n{\\n var twistedCoord: vec2__left_angle_mark_f32> = coord;\\n let uRadius = twistUniforms.uTwist[0];\\n let uAngle = twistUniforms.uTwist[1];\\n let uOffset = twistUniforms.uOffset;\\n\\n twistedCoord -= uOffset;\\n \\n let dist = length(twistedCoord);\\n\\n if (dist __left_angle_mark_ uRadius)\\n {\\n let ratioDist: f32 = (uRadius - dist) / uRadius;\\n let angleMod: f32 = ratioDist * ratioDist * uAngle;\\n let s: f32 = sin(angleMod);\\n let c: f32 = cos(angleMod);\\n twistedCoord = vec2__left_angle_mark_f32>(twistedCoord.x * c - twistedCoord.y * s, twistedCoord.x * s + twistedCoord.y * c);\\n }\\n\\n twistedCoord += uOffset;\\n return twistedCoord;\\n}\\n\",__defProp32=Object.defineProperty,__defNormalProp31=(e,t,r)=>t in e?__defProp32(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,__publicField31=(e,t,r)=>(__defNormalProp31(e,\"symbol\"!=typeof t?t+\"\":t,r),r),_TwistFilter=class e extends Filter{get radius(){return this.uniforms.uTwist[0]}set radius(e){this.uniforms.uTwist[0]=e}get angle(){return this.uniforms.uTwist[1]}set angle(e){this.uniforms.uTwist[1]=e}get offset(){return this.uniforms.uOffset}set offset(e){this.uniforms.uOffset=e}get offsetX(){return this.offset.x}set offsetX(e){this.offset.x=e}get offsetY(){return this.offset.y}set offsetY(e){this.offset.y=e}constructor(t){var r,n;t={...e.DEFAULT_OPTIONS,...t},super({gpuProgram:GpuProgram.from({vertex:{source:wgslVertex,entryPoint:\"mainVertex\"},fragment:{source:source37,entryPoint:\"mainFragment\"}}),glProgram:GlProgram.from({vertex:vertex3,fragment:fragment37,name:\"twist-filter\"}),resources:{twistUniforms:{uTwist:{value:[null!=(r=t.radius)?r:0,null!=(n=t.angle)?n:0],type:\"vec2__left_angle_mark_f32>\"},uOffset:{value:t.offset,type:\"vec2__left_angle_mark_f32>\"}}},...t}),__publicField31(this,\"uniforms\"),this.uniforms=this.resources.twistUniforms.uniforms}};__publicField31(_TwistFilter,\"DEFAULT_OPTIONS\",{padding:20,radius:200,angle:4,offset:{x:0,y:0}}),init_globals(),init_globals();var fragment38=\"precision highp float;\\nin vec2 vTextureCoord;\\nout vec4 finalColor;\\n\\nuniform sampler2D uTexture;\\nuniform float uStrength;\\nuniform vec2 uCenter;\\nuniform vec2 uRadii;\\n\\nuniform vec4 uInputSize;\\n\\nconst float MAX_KERNEL_SIZE = ${MAX_KERNEL_SIZE};\\n\\n// author: http://byteblacksmith.com/improvements-to-the-canonical-one-liner-glsl-rand-for-opengl-es-2-0/\\nhighp float rand(vec2 co, float seed) {\\n const highp float a = 12.9898, b = 78.233, c = 43758.5453;\\n highp float dt = dot(co + seed, vec2(a, b)), sn = mod(dt, 3.14159);\\n return fract(sin(sn) * c + seed);\\n}\\n\\nvoid main() {\\n float minGradient = uRadii[0] * 0.3;\\n float innerRadius = (uRadii[0] + minGradient * 0.5) / uInputSize.x;\\n\\n float gradient = uRadii[1] * 0.3;\\n float radius = (uRadii[1] - gradient * 0.5) / uInputSize.x;\\n\\n float countLimit = MAX_KERNEL_SIZE;\\n\\n vec2 dir = vec2(uCenter.xy / uInputSize.xy - vTextureCoord);\\n float dist = length(vec2(dir.x, dir.y * uInputSize.y / uInputSize.x));\\n\\n float strength = uStrength;\\n\\n float delta = 0.0;\\n float gap;\\n if (dist __left_angle_mark_ innerRadius) {\\n delta = innerRadius - dist;\\n gap = minGradient;\\n } else if (radius >= 0.0 && dist > radius) { // radius __left_angle_mark_ 0 means it's infinity\\n delta = dist - radius;\\n gap = gradient;\\n }\\n\\n if (delta > 0.0) {\\n float normalCount = gap / uInputSize.x;\\n delta = (normalCount - delta) / normalCount;\\n countLimit *= delta;\\n strength *= delta;\\n if (countLimit __left_angle_mark_ 1.0)\\n {\\n gl_FragColor = texture(uTexture, vTextureCoord);\\n return;\\n }\\n }\\n\\n // randomize the lookup values to hide the fixed number of samples\\n float offset = rand(vTextureCoord, 0.0);\\n\\n float total = 0.0;\\n vec4 color = vec4(0.0);\\n\\n dir *= strength;\\n\\n for (float t = 0.0; t __left_angle_mark_ MAX_KERNEL_SIZE; t++) {\\n float percent = (t + offset) / MAX_KERNEL_SIZE;\\n float weight = 4.0 * (percent - percent * percent);\\n vec2 p = vTextureCoord + dir * percent;\\n vec4 sample = texture(uTexture, p);\\n\\n // switch to pre-multiplied alpha to correctly blur transparent images\\n // sample.rgb *= sample.a;\\n\\n color += sample * weight;\\n total += weight;\\n\\n if (t > countLimit){\\n break;\\n }\\n }\\n\\n color /= total;\\n // switch back from pre-multiplied alpha\\n // color.rgb /= color.a + 0.00001;\\n\\n gl_FragColor = color;\\n}\\n\";init_globals();var source38=\"struct ZoomBlurUniforms {\\n uStrength:f32,\\n uCenter:vec2__left_angle_mark_f32>,\\n uRadii:vec2__left_angle_mark_f32>,\\n};\\n\\nstruct GlobalFilterUniforms {\\n uInputSize:vec4__left_angle_mark_f32>,\\n uInputPixel:vec4__left_angle_mark_f32>,\\n uInputClamp:vec4__left_angle_mark_f32>,\\n uOutputFrame:vec4__left_angle_mark_f32>,\\n uGlobalFrame:vec4__left_angle_mark_f32>,\\n uOutputTexture:vec4__left_angle_mark_f32>,\\n};\\n\\n@group(0) @binding(0) var__left_angle_mark_uniform> gfu: GlobalFilterUniforms;\\n\\n@group(0) @binding(1) var uTexture: texture_2d__left_angle_mark_f32>; \\n@group(0) @binding(2) var uSampler: sampler;\\n@group(1) @binding(0) var__left_angle_mark_uniform> zoomBlurUniforms : ZoomBlurUniforms;\\n\\n@fragment\\nfn mainFragment(\\n @builtin(position) position: vec4__left_angle_mark_f32>,\\n @location(0) uv : vec2__left_angle_mark_f32>\\n) -> @location(0) vec4__left_angle_mark_f32> {\\n let uStrength = zoomBlurUniforms.uStrength;\\n let uCenter = zoomBlurUniforms.uCenter;\\n let uRadii = zoomBlurUniforms.uRadii;\\n\\n let minGradient: f32 = uRadii[0] * 0.3;\\n let innerRadius: f32 = (uRadii[0] + minGradient * 0.5) / gfu.uInputSize.x;\\n\\n let gradient: f32 = uRadii[1] * 0.3;\\n let radius: f32 = (uRadii[1] - gradient * 0.5) / gfu.uInputSize.x;\\n\\n let MAX_KERNEL_SIZE: f32 = ${MAX_KERNEL_SIZE};\\n\\n var countLimit: f32 = MAX_KERNEL_SIZE;\\n\\n var dir: vec2__left_angle_mark_f32> = vec2__left_angle_mark_f32>(uCenter / gfu.uInputSize.xy - uv);\\n let dist: f32 = length(vec2__left_angle_mark_f32>(dir.x, dir.y * gfu.uInputSize.y / gfu.uInputSize.x));\\n\\n var strength: f32 = uStrength;\\n\\n var delta: f32 = 0.0;\\n var gap: f32;\\n\\n if (dist __left_angle_mark_ innerRadius) {\\n delta = innerRadius - dist;\\n gap = minGradient;\\n } else if (radius >= 0.0 && dist > radius) { // radius __left_angle_mark_ 0 means it's infinity\\n delta = dist - radius;\\n gap = gradient;\\n }\\n\\n var returnColorOnly: bool = false;\\n\\n if (delta > 0.0) {\\n let normalCount: f32 = gap / gfu.uInputSize.x;\\n delta = (normalCount - delta) / normalCount;\\n countLimit *= delta;\\n strength *= delta;\\n \\n if (countLimit __left_angle_mark_ 1.0)\\n {\\n returnColorOnly = true;;\\n }\\n }\\n\\n // randomize the lookup values to hide the fixed number of samples\\n let offset: f32 = rand(uv, 0.0);\\n\\n var total: f32 = 0.0;\\n var color: vec4__left_angle_mark_f32> = vec4__left_angle_mark_f32>(0.);\\n\\n dir *= strength;\\n\\n for (var t = 0.0; t __left_angle_mark_ MAX_KERNEL_SIZE; t += 1.0) {\\n let percent: f32 = (t + offset) / MAX_KERNEL_SIZE;\\n let weight: f32 = 4.0 * (percent - percent * percent);\\n let p: vec2__left_angle_mark_f32> = uv + dir * percent;\\n let sample: vec4__left_angle_mark_f32> = textureSample(uTexture, uSampler, p);\\n \\n if (t __left_angle_mark_ countLimit)\\n {\\n color += sample * weight;\\n total += weight;\\n }\\n }\\n\\n color /= total;\\n\\n return select(color, textureSample(uTexture, uSampler, uv), returnColorOnly);\\n}\\n\\nfn modulo(x: f32, y: f32) -> f32\\n{\\n return x - y * floor(x/y);\\n}\\n\\n// author: http://byteblacksmith.com/improvements-to-the-canonical-one-liner-glsl-rand-for-opengl-es-2-0/\\nfn rand(co: vec2__left_angle_mark_f32>, seed: f32) -> f32\\n{\\n let a: f32 = 12.9898;\\n let b: f32 = 78.233;\\n let c: f32 = 43758.5453;\\n let dt: f32 = dot(co + seed, vec2__left_angle_mark_f32>(a, b));\\n let sn: f32 = modulo(dt, 3.14159);\\n return fract(sin(sn) * c + seed);\\n}\",__defProp33=Object.defineProperty,__defNormalProp32=(e,t,r)=>t in e?__defProp33(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,__publicField32=(e,t,r)=>(__defNormalProp32(e,\"symbol\"!=typeof t?t+\"\":t,r),r),_ZoomBlurFilter=class e extends Filter{get strength(){return this.uniforms.uStrength}set strength(e){this.uniforms.uStrength=e}get center(){return this.uniforms.uCenter}set center(e){Array.isArray(e)&&(e={x:e[0],y:e[1]}),this.uniforms.uCenter=e}get centerX(){return this.uniforms.uCenter.x}set centerX(e){this.uniforms.uCenter.x=e}get centerY(){return this.uniforms.uCenter.y}set centerY(e){this.uniforms.uCenter.y=e}get innerRadius(){return this.uniforms.uRadii[0]}set innerRadius(e){this.uniforms.uRadii[0]=e}get radius(){return this.uniforms.uRadii[1]}set radius(e){this.uniforms.uRadii[1]=e__left_angle_mark_0||e===1/0?-1:e}constructor(t){var r;const n=null!=(r=(t={...e.DEFAULT_OPTIONS,...t}).maxKernelSize)?r:32;super({gpuProgram:GpuProgram.from({vertex:{source:wgslVertex,entryPoint:\"mainVertex\"},fragment:{source:source38.replace(\"${MAX_KERNEL_SIZE}\",n.toFixed(1)),entryPoint:\"mainFragment\"}}),glProgram:GlProgram.from({vertex:vertex3,fragment:fragment38.replace(\"${MAX_KERNEL_SIZE}\",n.toFixed(1)),name:\"zoom-blur-filter\"}),resources:{zoomBlurUniforms:{uStrength:{value:t.strength,type:\"f32\"},uCenter:{value:t.center,type:\"vec2__left_angle_mark_f32>\"},uRadii:{value:new Float32Array(2),type:\"vec2__left_angle_mark_f32>\"}}}}),__publicField32(this,\"uniforms\"),this.uniforms=this.resources.zoomBlurUniforms.uniforms,Object.assign(this,t)}};__publicField32(_ZoomBlurFilter,\"DEFAULT_OPTIONS\",{strength:.1,center:{x:0,y:0},innerRadius:0,radius:-1,maxKernelSize:32});var import_jsx_runtime5=__toESM(require_jsx_runtime()),itemFillAlpha=.4,highlightAlpha=.4,noop4=()=>{},rectMarkForItem=(e,t,r,n,i)=>{const{left:o,top:a,width:s,height:l}=e,u=r?highlightColorForType(\"element\"):colorForName(t),c=r?highlightAlpha:itemFillAlpha,d=new Graphics;d.beginFill(u,c),d.lineStyle(1,u,1),d.drawRect(o,a,s,l),d.endFill(),n&&i&&(d.interactive=!0,d.on(\"pointerover\",n),d.on(\"pointerout\",i));const h=new DropShadowFilter({blur:2,quality:3,alpha:.4,offset:{x:4,y:4},color:3355443});d.filters=[h];const f=new Text(t,{fontSize:18,fill:0});return f.x=o,f.y=Math.max(a-22,0),[d,f]},Blackboard=e=>{const t=e.highlightElements||[],r=t.map((e=>e.id)),n=e.uiContext,{size:i,screenshotBase64:o,screenshotBase64WithElementMarker:a}=n,s=i.width,l=i.height,u=(0,import_react99.useRef)(null),c=(0,import_react99.useMemo)((()=>new Application),[]),[d,h]=(0,import_react99.useState)(!1),f=(0,import_react99.useMemo)((()=>new Container),[]),p=(0,import_react99.useMemo)((()=>new Container),[]),[m,g]=(0,import_react99.useState)(null),_=(0,import_react99.useRef)(),{markerVisible:b,setMarkerVisible:y,elementsVisible:v,setTextsVisible:A}=useBlackboardPreference(),w=!!a;(0,import_react99.useEffect)((()=>(Promise.resolve((async()=>{if(!u.current||!s)return;await c.init({width:s,height:l,background:16777215});const e=u.current;u.current.appendChild(c.canvas);const{clientWidth:t}=u.current.parentElement,r=.5*window.innerHeight;if(s/l__left_angle_mark_=t/r){const t=r/l;e.style.width=`${Math.floor(s*t)}px`,e.style.height=`${Math.floor(l*t)}px`}c.stage.addChild(f),c.stage.addChild(p),h(!0)})()),()=>{import_console_browserify.default.log(\"will destroy\");try{c.destroy(!0,{children:!0,texture:!0})}catch(e4){import_console_browserify.default.warn(\"destroy failed\",e4)}})),[c,s,l]),(0,import_react99.useEffect)((()=>{if(!d)return;const e=new Image;e.onload=()=>{if(!c.stage)return;const t=Texture.from(e),r=new Sprite(t);if(r.x=0,r.y=0,r.width=s,r.height=l,c.stage.addChildAt(r,0),w){const e=new Image;e.onload=()=>{const t=Texture.from(e),r=new Sprite(t);r.x=0,r.y=0,r.width=s,r.height=l,c.stage.addChildAt(r,1),_.current=r,r.visible=b},e.onerror=e=>{import_console_browserify.default.error(\"load marker failed\",e)},e.src=a}},e.onerror=e=>{import_console_browserify.default.error(\"load screenshot failed\",e)},e.src=o}),[c.stage,d]);const{highlightElementRects:S}=(0,import_react99.useMemo)((()=>(f.removeChildren(),p.removeChildren(),n.content.forEach((t=>{const{rect:n,content:i,id:o}=t,a=r.includes(o)||(null==m?void 0:m.id)===o;if(a){const[e]=rectMarkForItem(n,i,a,noop4,noop4);f.addChild(e)}const[s]=rectMarkForItem(n,i,a,(null==e?void 0:e.disableInteraction)?void 0:()=>{g(t)},(null==e?void 0:e.disableInteraction)?void 0:()=>{g(null)});p.addChild(s)})),p.visible=v,{highlightElementRects:[]})),[c,d,t,n.content,m]);let E=null;return 1===S.length?E=(0,import_jsx_runtime5.jsx)(\"div\",{className:\"bottom-tip\",children:(0,import_jsx_runtime5.jsxs)(\"div\",{className:\"bottom-tip-item\",children:[\"Element: \",JSON.stringify(S[0])]})}):S.length>1&&(E=(0,import_jsx_runtime5.jsx)(\"div\",{className:\"bottom-tip\",children:(0,import_jsx_runtime5.jsxs)(\"div\",{className:\"bottom-tip-item\",children:[\"Element: \",JSON.stringify(S)]})})),(0,import_jsx_runtime5.jsxs)(\"div\",{className:\"blackboard\",children:[(0,import_jsx_runtime5.jsx)(\"div\",{className:\"blackboard-main-content\",style:{width:\"100%\"},ref:u}),(0,import_jsx_runtime5.jsx)(\"div\",{className:\"blackboard-filter\",style:{display:e.hideController?\"none\":\"block\"},children:(0,import_jsx_runtime5.jsxs)(\"div\",{className:\"overlay-control\",children:[(0,import_jsx_runtime5.jsx)(checkbox_default,{checked:b,onChange:e=>{y(e.target.checked),_.current&&(_.current.visible=e.target.checked)},disabled:!w,children:\"Marker\"}),(0,import_jsx_runtime5.jsx)(checkbox_default,{checked:v,onChange:e=>{A(e.target.checked),p.visible=e.target.checked},children:\"Elements\"})]})}),(0,import_jsx_runtime5.jsx)(\"div\",{className:\"bottom-tip\",style:{display:e.hideController?\"none\":\"block\"},children:E})]})},blackboard_default=Blackboard;init_globals();var import_react103=__toESM(require_react());init_globals();var import_react102=__toESM(require_react());init_globals();var import_react100=__toESM(require_react()),import_jsx_runtime6=__toESM(require_jsx_runtime()),canvasPaddingLeft=0,canvasPaddingTop=0,cubicBezier=(e,t,r,n,i)=>{const o=1-e;return t*o*o*o+3*r*e*o*o+3*n*e*e*o+i*e*e*e},cubicImage=e=>linear(e),cubicInsightElement=e=>cubicBezier(e,0,.5,.5,1),cubicMouse=e=>linear(e),linear=e=>e,sleep=e=>new Promise((t=>setTimeout(t,e))),ERROR_FRAME_CANCEL=\"frame cancel (this is an error on purpose)\",frameKit=()=>{let e=!1;return{frame:t=>{if(e)throw new Error(ERROR_FRAME_CANCEL);requestAnimationFrame((()=>{if(e)throw new Error(ERROR_FRAME_CANCEL);t(performance.now())}))},timeout:(t,r)=>{if(e)throw new Error(ERROR_FRAME_CANCEL);setTimeout((()=>{if(e)throw new Error(ERROR_FRAME_CANCEL);t()}),r)},cancel:()=>{e=!0}}},singleElementFadeInDuration=80,LAYER_ORDER_IMG=0,LAYER_ORDER_INSIGHT=1,LAYER_ORDER_POINTER=2,LAYER_ORDER_SPINNING_POINTER=3,downloadReport=e=>{const t=new Blob([e],{type:\"text/html\"}),r=URL.createObjectURL(t),n=document.createElement(\"a\");n.href=r,n.download=\"midscene_report.html\",n.click()};function Player(e){var t;const[r,n]=(0,import_react100.useState)(\"\"),[i,o]=(0,import_react100.useState)(\"\"),a=useExecutionDump((e=>e.activeExecutionAnimation)),s=(null==e?void 0:e.replayScripts)?e.replayScripts:a,l=(null==e?void 0:e.imageWidth)||useExecutionDump((e=>e.insightWidth))||1920,u=(null==e?void 0:e.imageHeight)||useExecutionDump((e=>e.insightHeight))||1080,c=l+2*canvasPaddingLeft,d=u+2*canvasPaddingTop,h=(0,import_react100.useRef)((null==(t=null==s?void 0:s[0])?void 0:t.img)||null),f=(0,import_react100.useRef)(null),p=(0,import_react100.useMemo)((()=>new Application),[]),m=(0,import_react100.useRef)(new Map),g=(0,import_react100.useRef)(null),_=(0,import_react100.useRef)(null),[b,y]=(0,import_react100.useState)(0),v=(0,import_react100.useMemo)((()=>new Container),[]),A=(0,import_react100.useMemo)((()=>{const e=new Container;return e.zIndex=LAYER_ORDER_INSIGHT,e}),[]),w={left:0,top:0,width:l,pointerLeft:Math.round(l/2),pointerTop:Math.round(u/2)},[S,E]=(0,import_react100.useState)(-1),x=(0,import_react100.useRef)(!1);(0,import_react100.useEffect)((()=>(x.current=!1,()=>{x.current=!0})),[]);const C=(0,import_react100.useRef)({...w}),T=async e=>{if(!m.current.has(e))return Assets.load(e).then((t=>{const r=Sprite.from(t);m.current.set(e,r)}))},R=async()=>{const e=h.current;if(!e)return void import_console_browserify.default.warn(\"no image to update\");m.current.has(e)||(import_console_browserify.default.warn(\"image not loaded\",e),await T(e));const t=m.current.get(e);if(!t)throw new Error(\"sprite not found\");const r=\"main-img\",n=v.getChildByLabel(r);n&&v.removeChild(n),t.label=r,t.zIndex=LAYER_ORDER_IMG,t.width=l,t.height=u,v.addChild(t)},I=e=>{var t,r;let n;_.current||(_.current=Sprite.from(mouseLoading),_.current.zIndex=LAYER_ORDER_SPINNING_POINTER,_.current.anchor.set(.5,.5),_.current.scale.set(.5),_.current.label=\"spinning-pointer\"),_.current.x=(null==(t=g.current)?void 0:t.x)||0,_.current.y=(null==(r=g.current)?void 0:r.y)||0,v.addChild(_.current);let i=!1;const o=t=>{if(i)return;n||(n=t);const r=t-n,a=(Math.sin(r/500-Math.PI/2)+1)/2*Math.PI*2;_.current&&(_.current.rotation=a),e(o)};return e(o),()=>{_.current&&v.removeChild(_.current),i=!0}},k=async(e,t,r)=>{var n,i;m.current.has(e)||(import_console_browserify.default.warn(\"image not loaded\",e),await T(e));const o=m.current.get(e);if(!o)throw new Error(\"sprite not found\");let a=null==(n=g.current)?void 0:n.x,s=null==(i=g.current)?void 0:i.y;if(\"number\"==typeof t&&(a=t),\"number\"==typeof r&&(s=r),void 0!==a&&void 0!==s){if(g.current){const e=v.getChildByLabel(\"pointer\");e&&v.removeChild(e)}g.current=o,g.current.x=a,g.current.y=s,g.current.label=\"pointer\",g.current.zIndex=LAYER_ORDER_POINTER,v.addChild(g.current)}else import_console_browserify.default.warn(\"invalid pointer position\",t,r)},P=e=>{C.current=e;const t=Math.max(1,l/e.width);v.scale.set(t),v.x=Math.round(canvasPaddingLeft-e.left*t),v.y=Math.round(canvasPaddingTop-e.top*t);const r=v.getChildByLabel(\"pointer\");r&&(r.scale.set(1/t),\"number\"==typeof e.pointerLeft&&\"number\"==typeof e.pointerTop&&(r.x=e.pointerLeft,r.y=e.pointerTop))},M=async(e,t,r)=>{const n={...C.current},i=n.left,o=n.top,a=n.pointerLeft,s=n.pointerTop,c=n.width/l,d=performance.now(),h=\"number\"==typeof e.pointerLeft&&\"number\"==typeof e.pointerTop&&(e.pointerLeft!==a||e.pointerTop!==s),f=h?.375*t:0,p=f,m=t-f;await new Promise((n=>{const g=_=>{const b={...C.current},y=_-d;if(h)if(y__left_angle_mark_=f){const t=Math.min(y/f,1),r=cubicMouse(t);b.pointerLeft=a+(e.pointerLeft-a)*r,b.pointerTop=s+(e.pointerTop-s)*r}else b.pointerLeft=e.pointerLeft,b.pointerTop=e.pointerTop;if(y>p){const t=y-p,r=Math.min(t/m,1),n=cubicImage(r),a=e.width/l,s=c+(a-c)*n,d=l*s,h=u*s;b.width=d;const f=i+(e.left-i)*n,g=o+(e.top-o)*n,_=f+d-l,v=g+h-u;b.left=_>0?f+_:f,b.top=v>0?g+v:g}P(b),y__left_angle_mark_t?r(g):n()};r(g)}))},O=(e,t,r,n=1)=>new Promise((i=>{const o=performance.now(),a=s=>{const l=s-o,u=Math.min(l/t,1);e.alpha=0===n?1-linear(u):linear(u),l__left_angle_mark_t?r(a):i()};r(a)})),B=async(e,t,r)=>O(e,t,r,0),N=async(e,t,r,n)=>{A.removeChildren();const i=[...e],o=i.length;let a=0;await new Promise((e=>{const s=performance.now(),l=u=>{const c=u-s,d=cubicInsightElement(Math.min(c/r,1)),h=Math.floor(d*o);for(;a__left_angle_mark_h;){const e=Math.floor(Math.random()*i.length),t=i.splice(e,1)[0];if(t){const[e]=rectMarkForItem(t.rect,t.content,!1);e.alpha=0,A.addChild(e),a++,O(e,singleElementFadeInDuration,n)}}if(c__left_angle_mark_r)n(l);else{for(;i.length>0;){const e=Math.floor(Math.random()*i.length),t=i.splice(e,1)[0],[r]=rectMarkForItem(t.rect,t.content,!1);r.alpha=1,A.addChild(r)}t.map((e=>{const[t]=rectMarkForItem(e.rect,e.content,!0);t.alpha=1,A.addChild(t)})),e()}};n(l)}))};(0,import_react100.useEffect)((()=>(Promise.resolve((async()=>{await(async()=>{f.current&&s&&(await p.init({width:c,height:d,background:16053492}),f.current.appendChild(p.canvas),v.x=0,v.y=0,p.stage.addChild(v),A.x=0,A.y=0,v.addChild(A))})(),y(Date.now())})()),()=>{try{p.destroy(!0,{children:!0,texture:!0})}catch(e4){import_console_browserify.default.warn(\"destroy failed\",e4)}})),[]),(0,import_react100.useEffect)((()=>{if(b)return(()=>{let e;return Promise.resolve((async()=>{if(!p)throw new Error(\"app is not initialized\");if(!s)throw new Error(\"scripts is required\");const{frame:t,cancel:r,timeout:i}=frameKit();e=r;const a=s.filter((e=>!!e.img)).map((e=>e.img));await Promise.all([...a,mouseLoading].map(T)),A.removeChildren(),await k(mousePointer,l/2,u/2),await R(),await P({...w});const c=s.reduce(((e,t)=>e+t.duration+(t.insightCameraDuration||0)),0),d=performance.now();E(0);const f=()=>{const e=Math.min((performance.now()-d)/c,1);if(E(e),e__left_angle_mark_1)return i(f,200)};t(f);for(const e in s){const r=s[e];if(n(r.title||\"\"),o(r.subTitle||\"\"),\"sleep\"===r.type)await sleep(r.duration);else if(\"insight\"===r.type){if(!r.insightDump||!r.img)throw new Error(\"insight dump or img is required\");h.current=r.img,await R();const e=r.insightDump.context.content,n=r.insightDump.matchedElement;if(await N(e,n,r.duration,t),r.camera){if(!r.insightCameraDuration)throw new Error(\"insightCameraDuration is required\");await M(r.camera,r.insightCameraDuration,t)}}else if(\"clear-insight\"===r.type)await B(A,r.duration,t),A.removeChildren(),A.alpha=1;else if(\"img\"===r.type)r.img&&r.img!==h.current&&(h.current=r.img,await R()),r.camera?await M(r.camera,r.duration,t):await sleep(r.duration);else if(\"pointer\"===r.type){if(!r.img)throw new Error(\"pointer img is required\");await k(r.img)}else if(\"spinning-pointer\"===r.type){const e=I(t);await sleep(r.duration),e()}}})().catch((e=>{import_console_browserify.default.error(\"player error\",e)}))),()=>{null==e||e()}})()}),[b]);const[j,L]=(0,import_react100.useState)(!1),D=Math.round(100*S),F=0===S?\"none\":\"0.3s\",U=1===S;let z;(0,import_react100.useEffect)((()=>{if(U){const e=e=>{\" \"===e.key&&y(Date.now())};return window.addEventListener(\"keydown\",e),()=>{window.removeEventListener(\"keydown\",e)}}}),[U]);const q={};let G=()=>{};S__left_angle_mark_1?z=(0,import_jsx_runtime6.jsx)(spin_default,{indicator:(0,import_jsx_runtime6.jsx)(LoadingOutlined_default2,{spin:!0}),size:\"default\"}):j?(z=(0,import_jsx_runtime6.jsx)(spin_default,{indicator:(0,import_jsx_runtime6.jsx)(CaretRightOutlined_default2,{}),size:\"default\"}),q.cursor=\"pointer\",q.background=\"#888\",G=()=>y(Date.now())):z=(0,import_jsx_runtime6.jsx)(spin_default,{indicator:(0,import_jsx_runtime6.jsx)(CaretRightOutlined_default2,{}),size:\"default\"});const H=(null==e?void 0:e.reportFileContent)?(0,import_jsx_runtime6.jsx)(\"div\",{className:\"player-tools-right\",children:(0,import_jsx_runtime6.jsx)(\"div\",{className:\"player-tools-item\",children:(0,import_jsx_runtime6.jsx)(button_default2,{color:\"primary\",variant:\"link\",size:\"small\",icon:(0,import_jsx_runtime6.jsx)(DownloadOutlined_default2,{}),onClick:()=>downloadReport(e.reportFileContent),children:\"Report File\"})})}):null;return(0,import_jsx_runtime6.jsxs)(\"div\",{className:\"player-container\",children:[(0,import_jsx_runtime6.jsx)(\"div\",{className:\"canvas-container\",ref:f}),(0,import_jsx_runtime6.jsx)(\"div\",{className:\"player-timeline\",children:(0,import_jsx_runtime6.jsx)(\"div\",{className:\"player-timeline-progress\",style:{width:`${D}%`,transition:F}})}),(0,import_jsx_runtime6.jsxs)(\"div\",{className:\"player-tools\",children:[(0,import_jsx_runtime6.jsxs)(\"div\",{className:\"player-control\",children:[(0,import_jsx_runtime6.jsx)(\"div\",{className:\"status-icon\",onMouseEnter:()=>L(!0),onMouseLeave:()=>L(!1),style:q,onClick:G,children:(0,import_jsx_runtime6.jsx)(config_provider_default,{theme:{components:{Spin:{dotSize:24,colorPrimary:\"rgb(6,177,171)\"}}},children:z})}),(0,import_jsx_runtime6.jsxs)(\"div\",{className:\"status-text\",children:[(0,import_jsx_runtime6.jsx)(\"div\",{className:\"title\",children:r}),(0,import_jsx_runtime6.jsx)(\"div\",{className:\"subtitle\",children:i})]})]}),H]})]})}var playground_demo_ui_context_default={content:[{content:\"Swag Labs\",rect:{left:895,top:38,width:130,height:32,zoom:1},center:[960,54],page:{page:{_isDragging:!1,_timeoutSettings:{}},pageType:\"puppeteer\"},locator:\"\",id:\"d6c5e2f100\",attributes:{nodeType:\"TEXT Node\"},indexId:0},{content:\"Username\",rect:{left:814,top:154,width:292,height:40,zoom:1},center:[960,174],page:{page:{_isDragging:!1,_timeoutSettings:{}},pageType:\"puppeteer\"},locator:\"[_midscene_retrieve_task_id='a9021f480e']\",id:\"a9021f480e\",attributes:{class:\".input_error.form_input\",placeholder:\"Username\",type:\"text\",\"data-test\":\"username\",id:\"user-name\",name:\"user-name\",autocorrect:\"off\",autocapitalize:\"none\",htmlTagName:\"__left_angle_mark_input>\",nodeType:\"FORM_ITEM Node\"},indexId:1},{content:\"Password\",rect:{left:814,top:209,width:292,height:40,zoom:1},center:[960,229],page:{page:{_isDragging:!1,_timeoutSettings:{}},pageType:\"puppeteer\"},locator:\"[_midscene_retrieve_task_id='580f3b761d']\",id:\"580f3b761d\",attributes:{class:\".input_error.form_input\",placeholder:\"Password\",type:\"password\",\"data-test\":\"password\",id:\"password\",name:\"password\",autocorrect:\"off\",autocapitalize:\"none\",htmlTagName:\"__left_angle_mark_input>\",nodeType:\"FORM_ITEM Node\"},indexId:2},{content:\"\",rect:{left:814,top:253,width:292,height:45,zoom:1},center:[960,275],page:{page:{_isDragging:!1,_timeoutSettings:{}},pageType:\"puppeteer\"},locator:\"[_midscene_retrieve_task_id='3e1faf0fd6']\",id:\"3e1faf0fd6\",attributes:{class:\".error-message-container\",nodeType:\"CONTAINER Node\"},indexId:3},{content:\"Login\",rect:{left:814,top:303,width:292,height:49,zoom:1},center:[960,327],page:{page:{_isDragging:!1,_timeoutSettings:{}},pageType:\"puppeteer\"},locator:\"[_midscene_retrieve_task_id='6db0b64062']\",id:\"6db0b64062\",attributes:{type:\"submit\",class:\".submit-button.btn_action\",\"data-test\":\"login-button\",id:\"login-button\",name:\"login-button\",value:\"Login\",htmlTagName:\"__left_angle_mark_input>\",nodeType:\"FORM_ITEM Node\"},indexId:4},{content:\"Accepted usernames are:\",rect:{left:570,top:435,width:221,height:21,zoom:1},center:[680,445],page:{page:{_isDragging:!1,_timeoutSettings:{}},pageType:\"puppeteer\"},locator:\"\",id:\"5ca36a5942\",attributes:{nodeType:\"TEXT Node\"},indexId:5},{content:\"standard_user\",rect:{left:570,top:479,width:109,height:19,zoom:1},center:[624,488],page:{page:{_isDragging:!1,_timeoutSettings:{}},pageType:\"puppeteer\"},locator:\"\",id:\"fd2fe54174\",attributes:{nodeType:\"TEXT Node\"},indexId:6},{content:\"locked_out_user\",rect:{left:570,top:503,width:126,height:19,zoom:1},center:[633,512],page:{page:{_isDragging:!1,_timeoutSettings:{}},pageType:\"puppeteer\"},locator:\"\",id:\"403daee75b\",attributes:{nodeType:\"TEXT Node\"},indexId:7},{content:\"problem_user\",rect:{left:570,top:527,width:101,height:19,zoom:1},center:[620,536],page:{page:{_isDragging:!1,_timeoutSettings:{}},pageType:\"puppeteer\"},locator:\"\",id:\"2b34f1e161\",attributes:{nodeType:\"TEXT Node\"},indexId:8},{content:\"performance_glitch_user\",rect:{left:570,top:551,width:193,height:19,zoom:1},center:[666,560],page:{page:{_isDragging:!1,_timeoutSettings:{}},pageType:\"puppeteer\"},locator:\"\",id:\"6ae63a4d9e\",attributes:{nodeType:\"TEXT Node\"},indexId:9},{content:\"error_user\",rect:{left:570,top:575,width:84,height:19,zoom:1},center:[612,584],page:{page:{_isDragging:!1,_timeoutSettings:{}},pageType:\"puppeteer\"},locator:\"\",id:\"76030282f1\",attributes:{nodeType:\"TEXT Node\"},indexId:10},{content:\"visual_user\",rect:{left:570,top:599,width:92,height:19,zoom:1},center:[616,608],page:{page:{_isDragging:!1,_timeoutSettings:{}},pageType:\"puppeteer\"},locator:\"\",id:\"f34b057726\",attributes:{nodeType:\"TEXT Node\"},indexId:11},{content:\"Password for all users:\",rect:{left:960,top:435,width:221,height:21,zoom:1},center:[1070,445],page:{page:{_isDragging:!1,_timeoutSettings:{}},pageType:\"puppeteer\"},locator:\"\",id:\"e693f608cd\",attributes:{nodeType:\"TEXT Node\"},indexId:12},{content:\"secret_sauce\",rect:{left:960,top:477,width:101,height:19,zoom:1},center:[1010,486],page:{page:{_isDragging:!1,_timeoutSettings:{}},pageType:\"puppeteer\"},locator:\"\",id:\"cde9de9828\",attributes:{nodeType:\"TEXT Node\"},indexId:13}],size:{width:1920,height:1080},screenshotBase64:\"data:image/png;base64, \",screenshotBase64WithElementMarker:\"data:image/png;base64, \",url:\"https://www.saucedemo.com/\"};init_globals();var import_jsx_runtime7=__toESM(require_jsx_runtime()),Logo=()=>(0,import_jsx_runtime7.jsx)(\"div\",{className:\"logo\",children:(0,import_jsx_runtime7.jsx)(\"img\",{alt:\"Midscene_logo\",src:\"https://lf3-static.bytednsdoc.com/obj/eden-cn/vhaeh7vhabf/Midscene.png\"})}),logo_default=Logo,import_ui_utils4=__toESM(require_ui_utils()),import_core2=__toESM(require_lib7()),import_playground=__toESM(require_playground());init_globals();var import_react101=__toESM(require_react()),import_jsx_runtime8=__toESM(require_jsx_runtime());function EnvConfig(){const{config:e,configString:t,loadConfig:r}=useEnvConfig(),[n,i]=(0,import_react101.useState)(!1),[o,a]=(0,import_react101.useState)(t),s=e=>{i(!0),e.preventDefault()},l=(0,import_jsx_runtime8.jsx)(button_default2,{type:\"link\",size:\"small\",onClick:s,children:\"Edit\"}),[u,c]=(0,import_react101.useState)(!1),d=0===Object.keys(e).length?(0,import_jsx_runtime8.jsxs)(\"div\",{children:[iconForStatus(\"failed\"),\" No config\",(0,import_jsx_runtime8.jsx)(\"p\",{children:(0,import_jsx_runtime8.jsx)(tooltip_default,{title:\"Please set up your environment variables to use Midscene.\",placement:\"right\",open:!n,children:(0,import_jsx_runtime8.jsx)(button_default2,{type:\"primary\",onClick:s,children:\"Click to set up\"})})})]}):(0,import_jsx_runtime8.jsx)(\"div\",{onMouseEnter:()=>c(!0),onMouseLeave:()=>c(!1),children:Object.entries(e).map((([e,t])=>(0,import_jsx_runtime8.jsx)(\"div\",{style:{lineHeight:\"1.8\"},children:(0,import_jsx_runtime8.jsxs)(\"span\",{children:[iconForStatus(\"success\"),\" \",e,\":\",\" \",\"MIDSCENE_MODEL_NAME\"===e?t:\"***\",\" \",u&&l]})},e)))});return(0,import_jsx_runtime8.jsxs)(\"div\",{children:[d,(0,import_jsx_runtime8.jsxs)(modal_default,{title:\"Env Config\",open:n,onOk:()=>{i(!1),r(o)},onCancel:()=>{i(!1)},okText:\"Save\",style:{width:\"800px\"},children:[(0,import_jsx_runtime8.jsx)(input_default.TextArea,{rows:7,placeholder:\"OPENAI_API_KEY=sk-...\\nMIDSCENE_MODEL_NAME=gpt-4o-2024-08-06\\n...\",value:o,onChange:e=>a(e.target.value),style:{whiteSpace:\"nowrap\",wordWrap:\"break-word\"}}),(0,import_jsx_runtime8.jsxs)(\"div\",{children:[(0,import_jsx_runtime8.jsx)(\"p\",{children:\"The format is KEY=VALUE and separated by new lines.\"}),(0,import_jsx_runtime8.jsxs)(\"p\",{children:[\"These data will be saved \",(0,import_jsx_runtime8.jsx)(\"strong\",{children:\"locally in your browser\"}),\".\"]})]})]})]})}var import_jsx_runtime9=__toESM(require_jsx_runtime()),requestPlaygroundServer=async(e,t,r)=>(await fetch(`${serverBase}/execute`,{method:\"POST\",headers:{\"Content-Type\":\"application/json\"},body:JSON.stringify({context:e,type:t,prompt:r})})).json(),actionNameForType=e=>\"aiAction\"===e?\"Action\":\"aiQuery\"===e?\"Query\":\"aiAssert\"===e?\"Assert\":e,{TextArea:TextArea3}=input_default,staticAgentFromContext=e=>{const t=new import_playground.StaticPage(e);return new import_playground.StaticPageAgent(t)},useStaticPageAgent=e=>(0,import_react102.useMemo)((()=>e?staticAgentFromContext(e):null),[e]),useHistorySelector=e=>{const t=useEnvConfig((e=>e.history)),r=useEnvConfig((e=>e.clearHistory)),n=t.map(((t,r)=>({label:(0,import_jsx_runtime9.jsxs)(\"a\",{onClick:()=>e(t),children:[actionNameForType(t.type),\" - \",t.prompt.slice(0,50),t.prompt.length>50?\"...\":\"\"]}),key:String(r)})));return n.push({type:\"divider\"}),n.push({label:(0,import_jsx_runtime9.jsx)(\"a\",{onClick:()=>r(),children:(0,import_jsx_runtime9.jsx)(space_default,{children:\"Clear History\"})}),key:\"clear\"}),t.length>0?(0,import_jsx_runtime9.jsx)(\"div\",{className:\"history-selector\",children:(0,import_jsx_runtime9.jsx)(dropdown_default2,{menu:{items:n},children:(0,import_jsx_runtime9.jsxs)(space_default,{children:[\"history \",(0,import_jsx_runtime9.jsx)(DownOutlined_default2,{})]})})}):null},errorMessageServerNotReady=(0,import_jsx_runtime9.jsxs)(\"span\",{children:[\"Don't worry, just one more step to launch the playground server.\",(0,import_jsx_runtime9.jsx)(\"br\",{}),\"Please run one of the commands under the midscene project directory:\",(0,import_jsx_runtime9.jsx)(\"br\",{}),\"a. \",(0,import_jsx_runtime9.jsx)(\"strong\",{children:\"npx midscene-playground\"}),(0,import_jsx_runtime9.jsx)(\"br\",{}),\"b. \",(0,import_jsx_runtime9.jsx)(\"strong\",{children:\"npx --yes @midscene/web\"})]}),serverLaunchTip=(0,import_jsx_runtime9.jsx)(\"div\",{className:\"server-tip\",children:(0,import_jsx_runtime9.jsx)(alert_default,{message:\"Playground Server Not Ready\",description:errorMessageServerNotReady,type:\"warning\"})});function Playground({agent:e,hideLogo:t,showContextPreview:r=!0}){const[n,i]=(0,import_react102.useState)(void 0),[o,a]=(0,import_react102.useState)(!1),[s,l]=(0,import_react102.useState)(\"\"),[u,c]=(0,import_react102.useState)(null),[d]=form_default.useForm(),{config:h,serviceMode:f,setServiceMode:p}=useEnvConfig(),m=Object.keys(h||{}).length>=1,g=(0,import_react102.useRef)(null),[_,b]=(0,import_react102.useState)(!1);(0,import_react102.useEffect)((()=>{b(window.innerWidth__left_angle_mark_750);const e=()=>{b(window.innerWidth__left_angle_mark_750)};return window.addEventListener(\"resize\",e),()=>{window.removeEventListener(\"resize\",e)}}),[]),(0,import_react102.useEffect)((()=>{(0,import_core2.overrideAIConfig)(h)}),[h]);const y=e,[v,A]=(0,import_react102.useState)(null),[w,S]=(0,import_react102.useState)(0),E=useServerValid(\"Server\"===f);(0,import_react102.useEffect)((()=>{n||r&&(null==e||e.getUIContext().then((e=>{i(e)})).catch((e=>{message_default.error(\"Failed to get UI context\"),import_console_browserify.default.error(e)})))}),[n,r,e]);const x=useEnvConfig((e=>e.addHistory)),C=(0,import_react102.useCallback)((async()=>{var t;const r=d.getFieldsValue();if(!r.prompt)return void message_default.error(\"Prompt is required\");const n=Date.now();a(!0),c(null),x({type:r.type,prompt:r.prompt,timestamp:Date.now()});let i={result:null,dump:null,reportHTML:null,error:null};try{if(null==e||e.resetDump(),\"Server\"===f){const t=await(null==e?void 0:e.getUIContext());i=await requestPlaygroundServer(t,r.type,r.prompt)}else\"aiAction\"===r.type?i.result=await(null==y?void 0:y.aiAction(r.prompt,{onTaskStart:e=>{const t=(0,import_ui_utils4.typeStr)(e),r=(0,import_ui_utils4.paramStr)(e);l(`${t}: ${r}`)}})):\"aiQuery\"===r.type?i.result=await(null==y?void 0:y.aiQuery(r.prompt)):\"aiAssert\"===r.type&&(i.result=await(null==y?void 0:y.aiAssert(r.prompt,void 0,{keepRawResponse:!0})))}catch(e4){import_console_browserify.default.error(e4),\"string\"==typeof e4?i.error=e4:(null==(t=e4.message)?void 0:t.includes(import_playground.ERROR_CODE_NOT_IMPLEMENTED_AS_DESIGNED))?i.error=\"Unknown error\":i.error=e4.message}try{\"In-Browser\"!==f&&\"In-Browser-Extension\"!==f||(i.dump=(null==y?void 0:y.dumpDataString())?JSON.parse(y.dumpDataString()):null,i.reportHTML=(null==y?void 0:y.reportHTMLString())||null)}catch(e4){import_console_browserify.default.error(e4)}if(c(i),a(!1),\"aiAction\"===r.type&&(null==i?void 0:i.dump)){const e=allScriptsFromDump(i.dump);A(e),S((e=>e+1))}else A(null);import_console_browserify.default.log(`time taken: ${Date.now()-n}ms`)}),[d,e,y,f,E]);let T=\"What do you want to do?\";const R=form_default.useWatch(\"type\",d);\"aiQuery\"===R?T=\"What do you want to query?\":\"aiAssert\"===R&&(T=\"What do you want to assert?\");const I=\"In-Browser\"===f&&e&&m||\"Server\"===f&&E||\"In-Browser-Extension\"===f&&e&&m;let k=(0,import_jsx_runtime9.jsx)(\"div\",{className:\"result-empty-tip\",children:(0,import_jsx_runtime9.jsx)(\"span\",{children:\"The result will be shown here\"})});E||\"Server\"!==f?o?k=(0,import_jsx_runtime9.jsxs)(\"div\",{className:\"loading-container\",children:[(0,import_jsx_runtime9.jsx)(spin_default,{spinning:o,indicator:(0,import_jsx_runtime9.jsx)(LoadingOutlined_default2,{spin:!0})}),(0,import_jsx_runtime9.jsx)(\"div\",{className:\"loading-progress-text\",children:s})]}):v?k=(0,import_jsx_runtime9.jsx)(Player,{replayScripts:v.scripts,imageWidth:v.width,imageHeight:v.height,reportFileContent:null==u?void 0:u.reportHTML},w):(null==u?void 0:u.result)?k=\"string\"==typeof(null==u?void 0:u.result)?(0,import_jsx_runtime9.jsx)(\"pre\",{children:null==u?void 0:u.result}):(0,import_jsx_runtime9.jsx)(\"pre\",{children:JSON.stringify(null==u?void 0:u.result,null,2)}):(null==u?void 0:u.error)&&(k=(0,import_jsx_runtime9.jsx)(\"pre\",{children:null==u?void 0:u.error})):k=serverLaunchTip;const P=E?(0,import_jsx_runtime9.jsxs)(\"div\",{className:\"server-tip\",children:[iconForStatus(\"connected\"),\" Connected\"]}):(0,import_jsx_runtime9.jsxs)(\"div\",{className:\"server-tip\",children:[iconForStatus(\"failed\"),\" Connection failed\"]}),M=\"In-Browser-Extension\"===f?null:(0,import_jsx_runtime9.jsx)(tooltip_default,{title:(0,import_jsx_runtime9.jsxs)(\"span\",{children:[\"Server Mode: send the request through the server \",(0,import_jsx_runtime9.jsx)(\"br\",{}),\"In-Browser Mode: send the request through the browser fetch API (The AI service should support CORS in this case)\"]}),children:(0,import_jsx_runtime9.jsx)(button_default2,{type:\"link\",onClick:e=>{e.preventDefault(),p(\"Server\"===f?\"In-Browser\":\"Server\")},children:\"Server\"===f?\"Switch to In-Browser Mode\":\"Switch to Server Mode\"})}),O=\"Server\"===f?P:(0,import_jsx_runtime9.jsx)(EnvConfig,{}),B=(null==e?void 0:e.dryMode)?(0,import_jsx_runtime9.jsx)(tooltip_default,{title:\"Start executing until some interaction actions need to be performed. You can see the process of planning and locating.\",children:(0,import_jsx_runtime9.jsx)(button_default2,{type:\"primary\",icon:(0,import_jsx_runtime9.jsx)(SendOutlined_default2,{}),onClick:C,disabled:!I,loading:o,children:\"Dry Run\"})}):(0,import_jsx_runtime9.jsx)(button_default2,{type:\"primary\",icon:(0,import_jsx_runtime9.jsx)(SendOutlined_default2,{}),onClick:C,disabled:!I,loading:o,children:\"Run\"}),N=useHistorySelector((e=>{d.setFieldsValue({prompt:e.prompt,type:e.type})})),j=!t&&(0,import_jsx_runtime9.jsx)(\"div\",{className:\"playground-header\",children:(0,import_jsx_runtime9.jsx)(logo_default,{})}),L=useEnvConfig((e=>e.history))[0],D=(0,import_react102.useMemo)((()=>({type:(null==L?void 0:L.type)||\"aiAction\",prompt:(null==L?void 0:L.prompt)||\"\"})),[]),F=(0,import_jsx_runtime9.jsx)(form_default,{form:d,onFinish:C,initialValues:{...D},children:(0,import_jsx_runtime9.jsxs)(\"div\",{className:\"playground-form-container\",children:[(0,import_jsx_runtime9.jsxs)(\"div\",{className:\"form-part\",children:[(0,import_jsx_runtime9.jsx)(\"h3\",{children:\"Server\"===f?\"Server Status\":\"In-Browser Request Config\"}),O,(0,import_jsx_runtime9.jsx)(\"div\",{className:\"switch-btn-wrapper\",children:M})]}),(0,import_jsx_runtime9.jsxs)(\"div\",{className:\"form-part context-panel\",style:{display:r?\"block\":\"none\"},children:[(0,import_jsx_runtime9.jsx)(\"h3\",{children:\"UI Context\"}),n?(0,import_jsx_runtime9.jsx)(blackboard_default,{uiContext:n,hideController:!0,disableInteraction:!0}):(0,import_jsx_runtime9.jsxs)(\"div\",{children:[iconForStatus(\"failed\"),\" No UI context\",(0,import_jsx_runtime9.jsx)(button_default2,{type:\"link\",onClick:e=>{e.preventDefault(),i(playground_demo_ui_context_default)},children:\"Load Demo\"}),(0,import_jsx_runtime9.jsx)(\"div\",{children:\"To load the UI context, you can either use the demo data above, or click the 'Send to Playground' in the report page.\"})]})]}),(0,import_jsx_runtime9.jsxs)(\"div\",{className:\"form-part input-wrapper\",children:[(0,import_jsx_runtime9.jsx)(\"h3\",{children:\"Run\"}),(0,import_jsx_runtime9.jsx)(form_default.Item,{name:\"type\",children:(0,import_jsx_runtime9.jsxs)(radio_default2.Group,{buttonStyle:\"solid\",disabled:!I,children:[(0,import_jsx_runtime9.jsx)(radio_default2.Button,{value:\"aiAction\",children:actionNameForType(\"aiAction\")}),(0,import_jsx_runtime9.jsx)(radio_default2.Button,{value:\"aiQuery\",children:actionNameForType(\"aiQuery\")}),(0,import_jsx_runtime9.jsx)(radio_default2.Button,{value:\"aiAssert\",children:actionNameForType(\"aiAssert\")})]})}),(0,import_jsx_runtime9.jsxs)(\"div\",{className:\"main-side-console-input\",children:[(0,import_jsx_runtime9.jsx)(form_default.Item,{name:\"prompt\",children:(0,import_jsx_runtime9.jsx)(TextArea3,{disabled:!I,rows:4,placeholder:T,autoFocus:!0,onKeyDown:e=>{\"Enter\"===e.key&&e.metaKey&&(C(),e.preventDefault(),e.stopPropagation())}})}),B,N]})]})]})});let U=\"result-wrapper\";return _&&(U+=\" vertical-mode-result\"),v&&_&&(U+=\" result-wrapper-compact\"),_?(0,import_jsx_runtime9.jsxs)(\"div\",{className:\"playground-container vertical-mode\",children:[F,(0,import_jsx_runtime9.jsxs)(\"div\",{className:\"form-part\",children:[(0,import_jsx_runtime9.jsx)(\"div\",{className:U,children:k}),(0,import_jsx_runtime9.jsx)(\"div\",{ref:g})]})]}):(0,import_jsx_runtime9.jsxs)(\"div\",{className:\"playground-container\",children:[(0,import_jsx_runtime9.jsx)(HelmetExport,{children:(0,import_jsx_runtime9.jsx)(\"title\",{children:\"Playground - Midscene.js\"})}),(0,import_jsx_runtime9.jsxs)(PanelGroup,{autoSaveId:\"playground-layout\",direction:\"horizontal\",children:[(0,import_jsx_runtime9.jsxs)(Panel2,{defaultSize:32,maxSize:60,minSize:20,className:\"playground-left-panel\",children:[j,F]}),(0,import_jsx_runtime9.jsx)(PanelResizeHandle,{className:\"panel-resize-handle\"}),(0,import_jsx_runtime9.jsx)(Panel2,{children:(0,import_jsx_runtime9.jsx)(\"div\",{className:U,children:k})})]})]})}var import_jsx_runtime10=__toESM(require_jsx_runtime()),serverBase=\"http://localhost:5800\",errorMessageNoContext=\"No context info found. \\nTry to select another task like 'Locate'\\n\",checkServerStatus=async()=>{try{return 200===(await fetch(`${serverBase}/status`)).status}catch(e4){return!1}},useServerValid=(e=!0)=>{const[t,r]=(0,import_react103.useState)(!1),{serviceMode:n}=useEnvConfig();return(0,import_react103.useEffect)((()=>{let t=!1;if(e)return Promise.resolve((async()=>{for(;!t;){const e=await checkServerStatus();r(!!e),await new Promise((e=>setTimeout(e,1e3)))}})()),()=>{t=!0}}),[n,e]),t};function OpenInPlayground(e){const[t,r]=(0,import_react103.useState)(),[n,i]=(0,import_react103.useState)(0),[o,a]=(0,import_react103.useState)(!1);let s=!0,l=\"\";(null==e?void 0:e.context)||(s=!1,l=errorMessageNoContext);const u=useStaticPageAgent(t);return s?(0,import_jsx_runtime10.jsxs)(import_jsx_runtime10.Fragment,{children:[(0,import_jsx_runtime10.jsx)(button_default2,{onClick:()=>{i((e=>e+1)),r((null==e?void 0:e.context)||void 0),a(!0)},icon:(0,import_jsx_runtime10.jsx)(PlayCircleOutlined_default2,{}),children:\"Open in Playground\"}),(0,import_jsx_runtime10.jsx)(drawer_default,{title:\"Playground\",placement:\"right\",onClose:()=>{a(!1)},open:o,width:\"90%\",styles:{header:{padding:\"16px\"}},className:\"playground-drawer\",children:(0,import_jsx_runtime10.jsx)(Playground,{agent:u,hideLogo:!0},n)})]}):(0,import_jsx_runtime10.jsx)(tooltip_default,{title:(0,import_jsx_runtime10.jsx)(\"pre\",{style:{whiteSpace:\"pre-wrap\",wordWrap:\"break-word\",margin:0,padding:0},children:l}),overlayInnerStyle:{width:\"380px\"},children:(0,import_jsx_runtime10.jsx)(button_default2,{disabled:!0,icon:(0,import_jsx_runtime10.jsx)(PlayCircleOutlined_default2,{}),children:\"Open in Playground\"})})}var import_jsx_runtime11=__toESM(require_jsx_runtime()),ScreenshotItem=e=>(0,import_jsx_runtime11.jsxs)(\"div\",{className:\"screenshot-item\",children:[(0,import_jsx_runtime11.jsx)(\"div\",{className:\"screenshot-item-title\",children:e.time}),(0,import_jsx_runtime11.jsx)(\"div\",{children:(0,import_jsx_runtime11.jsx)(\"img\",{src:e.img,alt:\"screenshot\"})})]}),VIEW_TYPE_REPLAY=\"replay\",VIEW_TYPE_BLACKBOARD=\"blackboard\",VIEW_TYPE_SCREENSHOT=\"screenshot\",VIEW_TYPE_JSON=\"json\",DetailPanel=()=>{var e;const t=useExecutionDump((e=>e.insightDump)),r=useExecutionDump((e=>e._insightDumpLoadId)),n=Boolean(t),i=useExecutionDump((e=>e.activeExecution)),o=useExecutionDump((e=>e._executionDumpLoadId)),a=useExecutionDump((e=>e.activeTask)),[s,l]=(0,import_react104.useState)(VIEW_TYPE_REPLAY),u=useExecutionDump((e=>e.activeExecutionAnimation));let c=[VIEW_TYPE_SCREENSHOT,VIEW_TYPE_JSON];n&&(c=[VIEW_TYPE_BLACKBOARD,VIEW_TYPE_SCREENSHOT,VIEW_TYPE_JSON]),\"Planning\"===(null==a?void 0:a.type)&&u&&u.length>0&&c.unshift(VIEW_TYPE_REPLAY);const d=c.indexOf(s)>=0?s:c[0];let h;i&&d===VIEW_TYPE_REPLAY?h=(0,import_jsx_runtime11.jsx)(Player,{},`${o}`):a?d===VIEW_TYPE_JSON?h=(0,import_jsx_runtime11.jsx)(\"div\",{className:\"json-content scrollable\",children:filterBase64Value(JSON.stringify(a,void 0,2))}):d===VIEW_TYPE_BLACKBOARD?h=n?(0,import_jsx_runtime11.jsx)(blackboard_default,{uiContext:t.context,highlightElements:t.matchedElement},`${r}`):(0,import_jsx_runtime11.jsx)(\"div\",{children:\"invalid view\"}):d===VIEW_TYPE_SCREENSHOT&&(h=(null==(e=a.recorder)?void 0:e.length)?(0,import_jsx_runtime11.jsx)(\"div\",{className:\"screenshot-item-wrapper scrollable\",children:a.recorder.filter((e=>e.screenshot)).map(((e,t)=>{const r=timeStr(e.ts),n=e.timing?`${r} / ${e.timing}`:r;return(0,import_jsx_runtime11.jsx)(ScreenshotItem,{time:n,img:e.screenshot},t)}))}):(0,import_jsx_runtime11.jsx)(\"div\",{children:\"no screenshot\"})):h=(0,import_jsx_runtime11.jsx)(\"div\",{children:\"please select a task\"}),(0,import_react104.useEffect)((()=>{const e=e=>{if(\"Tab\"===e.key){const t=e.shiftKey,r=c.indexOf(d),n=t?(r-1+c.length)%c.length:(r+1)%c.length;l(c[n]),e.preventDefault()}};return document.addEventListener(\"keydown\",e),()=>{document.removeEventListener(\"keydown\",e)}}));const f=c.map((e=>e===VIEW_TYPE_REPLAY?{label:\"Replay\",value:e,icon:(0,import_jsx_runtime11.jsx)(VideoCameraOutlined_default2,{})}:e===VIEW_TYPE_BLACKBOARD?{label:\"Insight\",value:e,icon:(0,import_jsx_runtime11.jsx)(ScheduleOutlined_default2,{})}:e===VIEW_TYPE_SCREENSHOT?{label:\"Screenshots\",value:e,icon:(0,import_jsx_runtime11.jsx)(CameraOutlined_default2,{})}:e===VIEW_TYPE_JSON?{label:\"JSON View\",value:e,icon:(0,import_jsx_runtime11.jsx)(FileTextOutlined_default2,{})}:{label:\"unknown\",value:e}));return(0,import_jsx_runtime11.jsxs)(\"div\",{className:\"detail-panel\",children:[(0,import_jsx_runtime11.jsx)(\"div\",{className:\"view-switcher\",children:(0,import_jsx_runtime11.jsxs)(config_provider_default,{theme:{components:{Segmented:{itemSelectedBg:\"#bfc4da50\",itemSelectedColor:\"#000000\"}}},children:[(0,import_jsx_runtime11.jsx)(segmented_default,{options:f,value:d,onChange:e=>{l(e)}}),(0,import_jsx_runtime11.jsx)(OpenInPlayground,{context:null==t?void 0:t.context})]})}),(0,import_jsx_runtime11.jsx)(\"div\",{className:\"detail-content\",children:h})]})},detail_panel_default=DetailPanel;init_globals();var import_react105=__toESM(require_react()),import_jsx_runtime12=__toESM(require_jsx_runtime()),size=400,GlobalHoverPreview=()=>{var e;const t=(0,import_react105.useRef)(null),r=useExecutionDump((e=>e.hoverTask)),n=useExecutionDump((e=>e.activeTask)),i=useExecutionDump((e=>e.hoverTimestamp)),o=useExecutionDump((e=>e.hoverPreviewConfig)),[a,s]=(0,import_react105.useState)(size),[l,u]=(0,import_react105.useState)(size),c=null==(e=null==r?void 0:r.recorder)?void 0:e.filter((e=>{let t=Boolean(e.screenshot);return i&&(t=t&&e.ts>=i),t})).map((e=>e.screenshot)),{x:d,y:h}=o||{};let f=0,p=0;const m=r!==n&&(null==c?void 0:c.length)&&void 0!==d&&void 0!==h;if(m){const{clientWidth:e,clientHeight:t}=document.body,r=a>=l?size:size*(a/l),n=a>=l?size*(l/a):size;f=d+r>e?e-r:d,p=h+n>t?t-n:h}return m?(0,import_jsx_runtime12.jsx)(\"div\",{className:\"global-hover-preview\",style:{left:f,top:p},ref:t,children:(null==c?void 0:c.length)?(0,import_jsx_runtime12.jsx)(\"img\",{src:c[0],onLoad:e=>{const t=e.target,r=t.naturalWidth,n=t.naturalHeight;s(r),u(n)}}):null}):null},global_hover_preview_default=GlobalHoverPreview;init_globals();var import_react106=__toESM(require_react()),import_jsx_runtime13=__toESM(require_jsx_runtime());function cloneSprite(e){const t=new Sprite(e.texture);return t.position.copyFrom(e.position),t.scale.copyFrom(e.scale),t.rotation=e.rotation,t.alpha=e.alpha,t.visible=e.visible,t}var TimelineWidget=e=>{var t,r,n,i;const o=(0,import_react106.useRef)(null),a=(0,import_react106.useMemo)((()=>new Application),[]),s=(0,import_react106.useMemo)((()=>new Container),[]),l=(0,import_react106.useMemo)((()=>new Container),[]),u=(0,import_react106.useMemo)((()=>new Container),[]),c=(0,import_react106.useRef)(((e,t,r,n)=>{})),d=(0,import_react106.useMemo)((()=>new Container),[]),h=e.screenshots||[],f=h.length>0?h[h.length-1].timeOffset:0,p=16316664,m=15066597,g=12567770,_=(e,t)=>{let r,n=-1;for(let i=0;i__left_angle_mark_h.length&&h[i].x__left_angle_mark_=e;i++)r=h[i],n=i;return{closestScreenshot:r,closestIndex:n}};return(0,import_react106.useMemo)((()=>{const{startMs:t,endMs:r}=e.highlightMask||{},{startMs:n,endMs:i}=e.hoverMask||{};(0,c.current)(t,r,n,i)}),[null==(t=e.highlightMask)?void 0:t.startMs,null==(r=e.highlightMask)?void 0:r.endMs,null==(n=e.hoverMask)?void 0:n.startMs,null==(i=e.hoverMask)?void 0:i.endMs]),(0,import_react106.useEffect)((()=>{Promise.resolve((async()=>{var t,r;if(!o.current)return;const{clientWidth:n,clientHeight:i}=o.current,b=2*n,y=2*i;let v=200,A=Math.floor(b/v);const w=[50,100,200,300,500,1e3,2e3,3e3,5e3,6e3,8e3,9e3,1e4,2e4,3e4,4e4,6e4,9e4,12e3,3e5];let S=w[0];for(let e=w.length-1;e>=0;e--)A*w[e]>=f&&(S=w[e]);const E=f/(A*S);E__left_angle_mark_=.8&&(v=Math.floor(v*(1/E)*.9),A=Math.floor(b/v));const x=e=>Math.floor(v*e/S);if(await a.init({width:b,height:y,backgroundColor:16777215}),!o.current)return void a.destroy();o.current.replaceChildren(a.canvas);const C=e=>new Text(`${e}ms`,{fontSize:20,fill:0});s.removeChildren();const T=new Graphics;T.beginFill(p),T.drawRect(0,0,b,44),T.endFill(),s.addChild(T);const R=new Graphics;R.beginFill(m),R.drawRect(0,44,b,2),R.endFill(),s.addChild(R);const I=y;for(let e=1;e__left_angle_mark_=A;e++){const t=new Graphics,r=x(e*S);t.beginFill(m),t.drawRect(r,0,2,I),t.endFill(),s.addChild(t);const n=C(e*S),i=r-n.width-12;n.x=i,n.y=12,s.addChild(n)}if(a.stage.addChild(s),!h.length)return void import_console_browserify.default.warn(\"No screenshots found\");const k=[];l.removeChildren();const P=y-62-18;h.forEach(((e,t)=>{const r=new Container;k.push(r),a.stage.addChild(r);const n=new Image;n.src=e.img,n.onload=()=>{const i=Texture.from(n),o=new Sprite(i),a=n.width,s=n.height,l=P,u=Math.floor(l/s*a),c=x(e.timeOffset);h[t].x=c,h[t].y=62,h[t].width=u,h[t].height=P;const d=new Graphics;d.lineStyle(2,7829367,1),d.drawRect(c,62,u,P),d.endFill(),r.addChild(d),o.x=c,o.y=62,o.width=u,o.height=P,r.addChild(o)}}));const M=(e,t,r,n)=>{u.removeChildren();const i=(e,t,r,n)=>{if(void 0===e||void 0===t||0===t)return;const i=new Graphics;i.beginFill(g,1),i.drawRect(x(e),0,2,y),i.endFill(),u.addChild(i);const o=new Graphics;o.beginFill(g,1),o.drawRect(x(t),0,2,y),o.endFill(),u.addChild(o);const a=new Graphics;a.beginFill(g,n),a.drawRect(x(e),0,x(t)-x(e),y),a.endFill(),u.addChild(a)};i(e,t,0,.6),i(r,n,0,.3)};M(null==(t=e.highlightMask)?void 0:t.startMs,null==(r=e.highlightMask)?void 0:r.endMs,0,0),c.current=M,a.stage.interactive=!0,a.stage.addChild(l),a.stage.addChild(u),a.stage.addChild(d);const O=a.view;O.addEventListener(\"pointermove\",(t=>{var r,n;const i=2*t.offsetX,o=2*t.offsetY;d.removeChildren();const{closestScreenshot:a,closestIndex:s}=_(i);if(s__left_angle_mark_0)return void(null==(r=e.onUnhighlight)||r.call(e));k[s].children.forEach((e=>{if(e instanceof Sprite){const t=new Graphics;t.lineStyle(2,g,1),t.drawRect(i,null==a?void 0:a.y,null==a?void 0:a.width,null==a?void 0:a.height),t.endFill(),d.addChild(t);const r=cloneSprite(e);r.x=i,d.addChild(r)}}));const l=new Graphics;l.beginFill(g,1),l.drawRect(i-1,0,3,y),l.endFill(),d.addChild(l);const u=C((c=i,Math.floor(c*S/v)));var c;u.x=i+5,u.y=12;const h=new Graphics;h.beginFill(p,1),h.drawRect(u.x,u.y,u.width+10,u.height),h.endFill(),d.addChild(h),d.addChild(u),null==(n=e.onHighlight)||n.call(e,{mouseX:i/2,mouseY:o/2,item:a})})),O.addEventListener(\"pointerout\",(()=>{var t;d.removeChildren(),null==(t=e.onUnhighlight)||t.call(e)})),O.addEventListener(\"pointerdown\",(t=>{var r;const n=2*t.offsetX,{closestScreenshot:i}=(t.offsetY,_(n));i&&(null==(r=e.onTap)||r.call(e,i))}))})())}),[]),(0,import_jsx_runtime13.jsx)(\"div\",{className:\"timeline-canvas-wrapper\",ref:o})},Timeline2=()=>{const e=useAllCurrentTasks(),t=(0,import_react106.useRef)(null),r=useExecutionDump((e=>e.setActiveTask)),n=useExecutionDump((e=>e.activeTask)),i=useExecutionDump((e=>e.hoverTask)),o=useExecutionDump((e=>e.setHoverTask)),a=useExecutionDump((e=>e.setHoverPreviewConfig));let s=-1,l=1;const u={},c=e.reduce(((e,t)=>{var r;const n=t.recorder||[];n.forEach((e=>{(-1===s||s>e.ts)&&(s=e.ts)})),(null==(r=t.timing)?void 0:r.start)&&(-1===s||s>t.timing.start)&&(s=t.timing.start);const i=n.map((e=>{const r=\"id_\"+l++;return u[r]=t,{...e,id:r}}));return e.concat(i||[])}),[]).filter((e=>e.screenshot)).map((e=>({id:e.id,img:e.screenshot,timeOffset:e.ts-s}))).sort(((e,t)=>e.timeOffset-t.timeOffset)),d=e=>{var t,r;if(e)return(null==(t=e.timing)?void 0:t.start)&&(null==(r=e.timing)?void 0:r.end)?{startMs:e.timing.start-s||0,endMs:e.timing.end-s||0}:void 0},h=d(n),f=d(i),p=c.map((e=>e.id)).join(\",\");return(0,import_jsx_runtime13.jsx)(\"div\",{className:\"timeline-wrapper\",ref:t,children:(0,import_jsx_runtime13.jsx)(TimelineWidget,{screenshots:c,onTap:e=>{const t=u[e.id];t&&r(t)},onHighlight:e=>{var r;const{mouseX:n,item:i}=e,l=null==(r=t.current)?void 0:r.getBoundingClientRect(),c=u[i.id];c?(o(c,i.timeOffset+s),a({x:n+((null==l?void 0:l.left)||0),y:((null==l?void 0:l.bottom)||1)-1})):(o(null),a(null))},onUnhighlight:()=>{o(null),a(null)},highlightMask:h,hoverMask:f},p)})},timeline_default2=Timeline2,import_jsx_runtime14=__toESM(require_jsx_runtime()),{Dragger:Dragger2}=upload_default,globalRenderCount=1;function Visualizer(e){const{dumps:t}=e,r=useExecutionDump((e=>e.dump)),n=useExecutionDump((e=>e._executionDumpLoadId)),i=useExecutionDump((e=>e.replayAllMode)),o=useExecutionDump((e=>e.setReplayAllMode)),a=useExecutionDump((e=>e.allExecutionAnimation)),s=useExecutionDump((e=>e.insightWidth)),l=useExecutionDump((e=>e.insightHeight)),u=useExecutionDump((e=>e.setGroupedDump)),c=useExecutionDump((e=>e.reset)),[d,h]=(0,import_react107.useState)(0),f=(0,import_react107.useRef)(!1),p=useExecutionDump((e=>e.dump));(0,import_react107.useEffect)((()=>(t&&u(t[0]),()=>{c()})),[]),(0,import_react107.useEffect)((()=>{let e=!1;const t=()=>{e||(e=!0,setTimeout((()=>{e=!1,h((e=>e+1))}),300))};return window.addEventListener(\"resize\",t),()=>{window.removeEventListener(\"resize\",t)}}),[]);const m={name:\"file\",multiple:!1,capture:!1,customRequest:()=>{},beforeUpload(e){if(!e.name.endsWith(\"web-dump.json\"))return message_default.error(\"invalid file extension\"),!1;const t=new FileReader;return t.readAsText(e),t.onload=e=>{var t;const r=null==(t=e.target)?void 0:t.result;if(\"string\"==typeof r)try{const e=JSON.parse(r);u(e[0])}catch(n){import_console_browserify.default.error(n),message_default.error(\"failed to parse dump data\",n.message)}else message_default.error(\"Invalid dump file\")},!1}};let g;if(p&&0===p.executions.length)g=(0,import_jsx_runtime14.jsx)(\"div\",{className:\"main-right\",children:(0,import_jsx_runtime14.jsx)(empty_default2,{image:empty_default2.PRESENTED_IMAGE_SIMPLE,description:\"There is no task info in this dump file.\"})});else if(r){const e=i?(0,import_jsx_runtime14.jsx)(\"div\",{className:\"replay-all-mode-wrapper\",children:(0,import_jsx_runtime14.jsx)(Player,{replayScripts:a,imageWidth:s,imageHeight:l},`${n}`)}):(0,import_jsx_runtime14.jsxs)(PanelGroup,{autoSaveId:\"page-detail-layout-v2\",direction:\"horizontal\",children:[(0,import_jsx_runtime14.jsx)(Panel2,{defaultSize:75,maxSize:95,children:(0,import_jsx_runtime14.jsx)(\"div\",{className:\"main-content-container\",children:(0,import_jsx_runtime14.jsx)(detail_panel_default,{})})}),(0,import_jsx_runtime14.jsx)(PanelResizeHandle,{}),(0,import_jsx_runtime14.jsx)(Panel2,{maxSize:95,children:(0,import_jsx_runtime14.jsx)(\"div\",{className:\"main-side\",children:(0,import_jsx_runtime14.jsx)(detail_side_default,{})})})]});g=(0,import_jsx_runtime14.jsxs)(PanelGroup,{autoSaveId:\"main-page-layout\",direction:\"horizontal\",onLayout:()=>{f.current||h((e=>e+1))},children:[(0,import_jsx_runtime14.jsx)(Panel2,{maxSize:95,defaultSize:20,children:(0,import_jsx_runtime14.jsx)(\"div\",{className:\"page-side\",children:(0,import_jsx_runtime14.jsx)(sidebar_default,{})})}),(0,import_jsx_runtime14.jsx)(PanelResizeHandle,{onDragging:e=>{f.current&&!e&&h((e=>e+1)),f.current=e}}),(0,import_jsx_runtime14.jsx)(Panel2,{defaultSize:80,maxSize:95,children:(0,import_jsx_runtime14.jsxs)(\"div\",{className:\"main-right\",children:[(0,import_jsx_runtime14.jsx)(timeline_default2,{},d),(0,import_jsx_runtime14.jsx)(\"div\",{className:\"main-content\",children:e})]})})]})}else g=(0,import_jsx_runtime14.jsx)(\"div\",{className:\"main-right uploader-wrapper\",children:(0,import_jsx_runtime14.jsxs)(Dragger2,{className:\"uploader\",...m,children:[(0,import_jsx_runtime14.jsx)(\"p\",{className:\"ant-upload-drag-icon\",children:(0,import_jsx_runtime14.jsx)(\"img\",{alt:\"Midscene_logo\",style:{width:80,margin:\"auto\"},src:logo_plain_default})}),(0,import_jsx_runtime14.jsxs)(\"p\",{className:\"ant-upload-text\",children:[\"Click or drag the\",\" \",(0,import_jsx_runtime14.jsx)(\"b\",{children:(0,import_jsx_runtime14.jsx)(\"i\",{children:\".web-dump.json\"})}),\" \",\"file into this area.\"]}),(0,import_jsx_runtime14.jsxs)(\"p\",{className:\"ant-upload-text\",children:[\"The latest dump file is usually placed in\",\" \",(0,import_jsx_runtime14.jsx)(\"b\",{children:(0,import_jsx_runtime14.jsx)(\"i\",{children:\"./midscene_run/report\"})})]}),(0,import_jsx_runtime14.jsx)(\"p\",{className:\"ant-upload-text\",children:\"All data will be processed locally by the browser. No data will be sent to the server.\"})]})});const[_,b]=(0,import_react107.useState)(\"100%\");return(0,import_react107.useEffect)((()=>{const e=document.querySelector(\".rspress-nav\"),t=\"--rp-nav-height\",r=getComputedStyle(document.documentElement).getPropertyValue(t);if(e){const e=\"42px\";b(`calc(100vh - ${e})`),document.documentElement.style.setProperty(t,e)}return()=>{e&&document.documentElement.style.setProperty(t,r)}}),[]),(0,import_react107.useEffect)((()=>()=>{globalRenderCount+=1}),[]),(0,import_jsx_runtime14.jsxs)(config_provider_default,{theme:globalThemeConfig(),children:[(0,import_jsx_runtime14.jsx)(HelmetExport,{children:(0,import_jsx_runtime14.jsx)(\"title\",{children:\"Report - Midscene.js\"})}),(0,import_jsx_runtime14.jsxs)(\"div\",{className:\"page-container\",style:{height:_},children:[(0,import_jsx_runtime14.jsxs)(\"div\",{className:\"page-nav\",children:[(0,import_jsx_runtime14.jsxs)(\"div\",{className:\"page-nav-left\",children:[(0,import_jsx_runtime14.jsx)(logo_default,{}),(0,import_jsx_runtime14.jsx)(\"div\",{className:\"page-nav-toolbar\",children:(0,import_jsx_runtime14.jsx)(config_provider_default,{theme:{components:{Button:{textHoverBg:\"#bfc4da80\"}}},children:(0,import_jsx_runtime14.jsx)(button_default2,{type:\"text\",icon:(0,import_jsx_runtime14.jsx)(CaretRightOutlined_default2,{}),disabled:!a||0===a.length,style:{background:i?\"#bfc4da80\":void 0},onClick:()=>{o(!0)},children:\"Replay All\"})})})]}),(0,import_jsx_runtime14.jsx)(PlaywrightCaseSelector,{dumps:e.dumps,selected:r,onSelect:e=>{u(e)}})]}),g]},`render-${globalRenderCount}`),(0,import_jsx_runtime14.jsx)(global_hover_preview_default,{})]})}function PlaywrightCaseSelector(e){if(!e.dumps||e.dumps.length__left_angle_mark_=1)return null;const t=e=>`${e.groupName} - ${e.groupDescription}`,r=(e,r)=>{var n,i;const o=iconForStatus(null==(n=e.attributes)?void 0:n.playwright_test_status),a=null==(i=e.attributes)?void 0:i.playwright_test_duration,s=a?(0,import_jsx_runtime14.jsxs)(\"span\",{className:\"cost-str\",children:[\" \",\"(\",timeCostStrElement(Number.parseInt(a,10)),\")\"]},r):null;return(0,import_jsx_runtime14.jsxs)(\"span\",{children:[o,\" \",t(e),s]},r)},n=(e.dumps||[]).map(((t,n)=>({key:n,label:(0,import_jsx_runtime14.jsx)(\"a\",{onClick:r=>{r.preventDefault(),e.onSelect&&e.onSelect(t)},children:(0,import_jsx_runtime14.jsx)(\"div\",{children:r(t,n)})})}))),i=e.selected?r(e.selected,\"selector\"):\"Select a case\";return(0,import_jsx_runtime14.jsx)(\"div\",{className:\"playwright-case-selector\",children:(0,import_jsx_runtime14.jsx)(dropdown_default2,{menu:{items:n},children:(0,import_jsx_runtime14.jsxs)(\"a\",{onClick:e=>e.preventDefault(),children:[i,\" \",(0,import_jsx_runtime14.jsx)(DownOutlined_default2,{})]})})})}function mount(e){var t;const r=document.getElementById(e);if(!r)throw new Error(`failed to get element for id: ${e}`);const n=import_client.default.createRoot(r),i=document.querySelectorAll('script[type=\"midscene_web_dump\"]');if(1===i.length&&\"\"===(null==(t=i[0].textContent)?void 0:t.trim())){const e=(0,import_jsx_runtime14.jsx)(\"div\",{style:{width:\"100%\",height:\"100%\",padding:\"100px\",boxSizing:\"border-box\"},children:(0,import_jsx_runtime14.jsx)(alert_default,{message:\"Midscene.js - Error\",description:\"There is no dump data to display.\",type:\"error\",showIcon:!0})});return n.render(e)}const o=[];Array.from(i).filter((e=>{const t=e.textContent;return t||import_console_browserify.default.warn(\"empty content in script tag\",e),!!t})).forEach((e=>{const t={};Array.from(e.attributes).forEach((e=>{const{name:r,value:n}=e,i=decodeURIComponent(n);r.startsWith(\"playwright_\")&&(t[e.name]=i)}));const r=e.textContent;let n;try{n=JSON.parse(r),n.attributes=t,o.push(n)}catch(e4){import_console_browserify.default.error(e),import_console_browserify.default.error(\"failed to parse json content\",e4)}})),n.render((0,import_jsx_runtime14.jsx)(Visualizer,{dumps:o}))}var src_default={mount:mount,Visualizer:Visualizer}},\"object\"==typeof module&&\"object\"==typeof module.exports?factory(exports):\"function\"==typeof define&&define.amd?define([\"exports\"],factory):(global=\"undefined\"!=typeof globalThis?globalThis:global||self)&&factory(global.midsceneVisualizer={});\n__left_angle_mark_/script>\n__left_angle_mark_/head>\n\n__left_angle_mark_body>\n __left_angle_mark_!-- it should be replaced by the actual content -->\n{{dump}}\n __left_angle_mark_div id=\"app\" style=\"width: 100vw; height: 100vh;\">__left_angle_mark_/div>\n __left_angle_mark_script>\n console.log(midsceneVisualizer);\n midsceneVisualizer.default.mount('app');\n __left_angle_mark_/script>\n\n__left_angle_mark_/body>\n\n__left_angle_mark_/html>".replace(/__left_angle_mark_/g, '<') ;