Visual UI for Explainroo. Explainer videos and product demos made by your AI agent. Free and open source: a local voice (Kokoro), word timing (Whisper) and a canvas renderer turn a script into a narrated MP4.
Add files via upload
jastfan3e8f5d77b465
diff --git a/assets/logo.png b/assets/logo.pngnew file mode 100644index 0000000..3a85936Binary files /dev/null and b/assets/logo.png differdiff --git a/assets/logo.svg b/assets/logo.svgnew file mode 100644index 0000000..8a15e97--- /dev/null+++ b/assets/logo.svg@@ -0,0 +1,42 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" width="512" height="512">+ <defs>+ <radialGradient id="bgGlow" cx="50%" cy="50%" r="50%">+ <stop offset="0%" stop-color="#0f172a" />+ <stop offset="100%" stop-color="#020617" />+ </radialGradient>+ <linearGradient id="primaryGrad" x1="0%" y1="0%" x2="100%" y2="100%">+ <stop offset="0%" stop-color="#f59e0b" />+ <stop offset="100%" stop-color="#ef4444" />+ </linearGradient>+ <linearGradient id="neonCyan" x1="0%" y1="0%" x2="100%" y2="100%">+ <stop offset="0%" stop-color="#38bdf8" />+ <stop offset="100%" stop-color="#0284c7" />+ </linearGradient>+ <filter id="glow" x="-20%" y="-20%" width="140%" height="140%">+ <feGaussianBlur stdDeviation="12" result="blur" />+ <feComposite in="SourceGraphic" in2="blur" operator="over" />+ </filter>+ </defs>++ <!-- Background Base -->+ <rect width="512" height="512" rx="112" fill="url(#bgGlow)" />+ <rect width="504" height="504" x="4" y="4" rx="108" fill="none" stroke="#1e293b" stroke-width="4" />++ <!-- Outer Canvas Frame (Hand-Drawn 16:9 Sketch aesthetic) -->+ <rect x="80" y="100" width="352" height="230" rx="24" fill="#090d16" stroke="#38bdf8" stroke-width="10" stroke-dasharray="2 0" />++ <!-- Clapper Header Bars -->+ <path d="M 80 100 L 432 100 L 432 150 L 80 150 Z" fill="#1e293b" stroke="#38bdf8" stroke-width="6" />+ <path d="M 130 100 L 160 150 M 210 100 L 240 150 M 290 100 L 320 150 M 370 100 L 400 150" stroke="#f59e0b" stroke-width="8" stroke-linecap="round" />++ <!-- Center Play / Explainer Action Symbol -->+ <polygon points="230,185 315,235 230,285" fill="url(#primaryGrad)" filter="url(#glow)" />++ <!-- Audio Waveform / Timeline Scrub Track -->+ <rect x="90" y="370" width="332" height="18" rx="9" fill="#1e293b" />+ <rect x="90" y="370" width="180" height="18" rx="9" fill="#38bdf8" />+ <circle cx="270" cy="379" r="14" fill="#f59e0b" stroke="#ffffff" stroke-width="3" filter="url(#glow)" />++ <!-- Sound Cue Waves -->+ <path d="M 120 425 Q 135 410 150 425 T 180 425 T 210 425 T 240 425 T 270 425 T 300 425 T 330 425 T 360 425 T 390 425" fill="none" stroke="#64748b" stroke-width="5" stroke-linecap="round" />+</svg>diff --git a/assets/screenshot-desktop.png b/assets/screenshot-desktop.pngnew file mode 100644index 0000000..848a574Binary files /dev/null and b/assets/screenshot-desktop.png differdiff --git a/assets/screenshot-mobile.png b/assets/screenshot-mobile.pngnew file mode 100644index 0000000..e468a68Binary files /dev/null and b/assets/screenshot-mobile.png differdiff --git a/assets/screenshot-themes.png b/assets/screenshot-themes.pngnew file mode 100644index 0000000..5f21816Binary files /dev/null and b/assets/screenshot-themes.png differdiff --git a/dev-dist/sw.js b/dev-dist/sw.jsnew file mode 100644index 0000000..7de39c2--- /dev/null+++ b/dev-dist/sw.js@@ -0,0 +1,106 @@+/**+ * Copyright 2018 Google Inc. All Rights Reserved.+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ * http://www.apache.org/licenses/LICENSE-2.0+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++// If the loader is already loaded, just stop.+if (!self.define) {+ let registry = {};++ // Used for `eval` and `importScripts` where we can't get script URL by other means.+ // In both cases, it's safe to use a global var because those functions are synchronous.+ let nextDefineUri;++ const singleRequire = (uri, parentUri) => {+ uri = new URL(uri + ".js", parentUri).href;+ return registry[uri] || (++ new Promise(resolve => {+ if ("document" in self) {+ const script = document.createElement("script");+ script.src = uri;+ script.onload = resolve;+ document.head.appendChild(script);+ } else {+ nextDefineUri = uri;+ importScripts(uri);+ resolve();+ }+ })++ .then(() => {+ let promise = registry[uri];+ if (!promise) {+ throw new Error(`Module ${uri} didn’t register its module`);+ }+ return promise;+ })+ );+ };++ self.define = (depsNames, factory) => {+ const uri = nextDefineUri || ("document" in self ? document.currentScript.src : "") || location.href;+ if (registry[uri]) {+ // Module is already loading or loaded.+ return;+ }+ let exports = {};+ const require = depUri => singleRequire(depUri, uri);+ const specialDeps = {+ module: { uri },+ exports,+ require+ };+ registry[uri] = Promise.all(depsNames.map(+ depName => specialDeps[depName] || require(depName)+ )).then(deps => {+ factory(...deps);+ return exports;+ });+ };+}+define(['./workbox-afac4cd2'], (function (workbox) { 'use strict';++ self.skipWaiting();+ workbox.clientsClaim();+ /**+ * The precacheAndRoute() method efficiently caches and responds to+ * requests for URLs in the manifest.+ * See https://goo.gl/S9QRab+ */+ workbox.precacheAndRoute([{+ "url": "index.html",+ "revision": "0.leto6cdmi34"+ }], {});+ workbox.cleanupOutdatedCaches();+ workbox.registerRoute(new workbox.NavigationRoute(workbox.createHandlerBoundToURL("index.html"), {+ allowlist: [/^\/$/]+ }));+ workbox.registerRoute(/^https:\/\/fonts\.googleapis\.com\/.*/i, new workbox.CacheFirst({+ "cacheName": "google-fonts-cache",+ plugins: [new workbox.ExpirationPlugin({+ maxEntries: 10,+ maxAgeSeconds: 31536000+ }), new workbox.CacheableResponsePlugin({+ statuses: [0, 200]+ })]+ }), 'GET');+ workbox.registerRoute(/^https:\/\/fonts\.gstatic\.com\/.*/i, new workbox.CacheFirst({+ "cacheName": "gstatic-fonts-cache",+ plugins: [new workbox.ExpirationPlugin({+ maxEntries: 10,+ maxAgeSeconds: 31536000+ }), new workbox.CacheableResponsePlugin({+ statuses: [0, 200]+ })]+ }), 'GET');++}));diff --git a/dev-dist/workbox-afac4cd2.js b/dev-dist/workbox-afac4cd2.jsnew file mode 100644index 0000000..e7127e4--- /dev/null+++ b/dev-dist/workbox-afac4cd2.js@@ -0,0 +1,4556 @@+define(['exports'], (function (exports) { 'use strict';++ // @ts-ignore+ try {+ self['workbox:core:7.4.0'] && _();+ } catch (e) {}++ /*+ Copyright 2019 Google LLC+ Use of this source code is governed by an MIT-style+ license that can be found in the LICENSE file or at+ https://opensource.org/licenses/MIT.+ */+ const logger = (() => {+ // Don't overwrite this value if it's already set.+ // See https://github.com/GoogleChrome/workbox/pull/2284#issuecomment-560470923+ if (!('__WB_DISABLE_DEV_LOGS' in globalThis)) {+ self.__WB_DISABLE_DEV_LOGS = false;+ }+ let inGroup = false;+ const methodToColorMap = {+ debug: `#7f8c8d`,+ log: `#2ecc71`,+ warn: `#f39c12`,+ error: `#c0392b`,+ groupCollapsed: `#3498db`,+ groupEnd: null // No colored prefix on groupEnd+ };+ const print = function (method, args) {+ if (self.__WB_DISABLE_DEV_LOGS) {+ return;+ }+ if (method === 'groupCollapsed') {+ // Safari doesn't print all console.groupCollapsed() arguments:+ // https://bugs.webkit.org/show_bug.cgi?id=182754+ if (/^((?!chrome|android).)*safari/i.test(navigator.userAgent)) {+ console[method](...args);+ return;+ }+ }+ const styles = [`background: ${methodToColorMap[method]}`, `border-radius: 0.5em`, `color: white`, `font-weight: bold`, `padding: 2px 0.5em`];+ // When in a group, the workbox prefix is not displayed.+ const logPrefix = inGroup ? [] : ['%cworkbox', styles.join(';')];+ console[method](...logPrefix, ...args);+ if (method === 'groupCollapsed') {+ inGroup = true;+ }+ if (method === 'groupEnd') {+ inGroup = false;+ }+ };+ // eslint-disable-next-line @typescript-eslint/ban-types+ const api = {};+ const loggerMethods = Object.keys(methodToColorMap);+ for (const key of loggerMethods) {+ const method = key;+ api[method] = (...args) => {+ print(method, args);+ };+ }+ return api;+ })();++ /*+ Copyright 2018 Google LLC++ Use of this source code is governed by an MIT-style+ license that can be found in the LICENSE file or at+ https://opensource.org/licenses/MIT.+ */+ const messages$1 = {+ 'invalid-value': ({+ paramName,+ validValueDescription,+ value+ }) => {+ if (!paramName || !validValueDescription) {+ throw new Error(`Unexpected input to 'invalid-value' error.`);+ }+ return `The '${paramName}' parameter was given a value with an ` + `unexpected value. ${validValueDescription} Received a value of ` + `${JSON.stringify(value)}.`;+ },+ 'not-an-array': ({+ moduleName,+ className,+ funcName,+ paramName+ }) => {+ if (!moduleName || !className || !funcName || !paramName) {+ throw new Error(`Unexpected input to 'not-an-array' error.`);+ }+ return `The parameter '${paramName}' passed into ` + `'${moduleName}.${className}.${funcName}()' must be an array.`;+ },+ 'incorrect-type': ({+ expectedType,+ paramName,+ moduleName,+ className,+ funcName+ }) => {+ if (!expectedType || !paramName || !moduleName || !funcName) {+ throw new Error(`Unexpected input to 'incorrect-type' error.`);+ }+ const classNameStr = className ? `${className}.` : '';+ return `The parameter '${paramName}' passed into ` + `'${moduleName}.${classNameStr}` + `${funcName}()' must be of type ${expectedType}.`;+ },+ 'incorrect-class': ({+ expectedClassName,+ paramName,+ moduleName,+ className,+ funcName,+ isReturnValueProblem+ }) => {+ if (!expectedClassName || !moduleName || !funcName) {+ throw new Error(`Unexpected input to 'incorrect-class' error.`);+ }+ const classNameStr = className ? `${className}.` : '';+ if (isReturnValueProblem) {+ return `The return value from ` + `'${moduleName}.${classNameStr}${funcName}()' ` + `must be an instance of class ${expectedClassName}.`;+ }+ return `The parameter '${paramName}' passed into ` + `'${moduleName}.${classNameStr}${funcName}()' ` + `must be an instance of class ${expectedClassName}.`;+ },+ 'missing-a-method': ({+ expectedMethod,+ paramName,+ moduleName,+ className,+ funcName+ }) => {+ if (!expectedMethod || !paramName || !moduleName || !className || !funcName) {+ throw new Error(`Unexpected input to 'missing-a-method' error.`);+ }+ return `${moduleName}.${className}.${funcName}() expected the ` + `'${paramName}' parameter to expose a '${expectedMethod}' method.`;+ },+ 'add-to-cache-list-unexpected-type': ({+ entry+ }) => {+ return `An unexpected entry was passed to ` + `'workbox-precaching.PrecacheController.addToCacheList()' The entry ` + `'${JSON.stringify(entry)}' isn't supported. You must supply an array of ` + `strings with one or more characters, objects with a url property or ` + `Request objects.`;+ },+ 'add-to-cache-list-conflicting-entries': ({+ firstEntry,+ secondEntry+ }) => {+ if (!firstEntry || !secondEntry) {+ throw new Error(`Unexpected input to ` + `'add-to-cache-list-duplicate-entries' error.`);+ }+ return `Two of the entries passed to ` + `'workbox-precaching.PrecacheController.addToCacheList()' had the URL ` + `${firstEntry} but different revision details. Workbox is ` + `unable to cache and version the asset correctly. Please remove one ` + `of the entries.`;+ },+ 'plugin-error-request-will-fetch': ({+ thrownErrorMessage+ }) => {+ if (!thrownErrorMessage) {+ throw new Error(`Unexpected input to ` + `'plugin-error-request-will-fetch', error.`);+ }+ return `An error was thrown by a plugins 'requestWillFetch()' method. ` + `The thrown error message was: '${thrownErrorMessage}'.`;+ },+ 'invalid-cache-name': ({+ cacheNameId,+ value+ }) => {+ if (!cacheNameId) {+ throw new Error(`Expected a 'cacheNameId' for error 'invalid-cache-name'`);+ }+ return `You must provide a name containing at least one character for ` + `setCacheDetails({${cacheNameId}: '...'}). Received a value of ` + `'${JSON.stringify(value)}'`;+ },+ 'unregister-route-but-not-found-with-method': ({+ method+ }) => {+ if (!method) {+ throw new Error(`Unexpected input to ` + `'unregister-route-but-not-found-with-method' error.`);+ }+ return `The route you're trying to unregister was not previously ` + `registered for the method type '${method}'.`;+ },+ 'unregister-route-route-not-registered': () => {+ return `The route you're trying to unregister was not previously ` + `registered.`;+ },+ 'queue-replay-failed': ({+ name+ }) => {+ return `Replaying the background sync queue '${name}' failed.`;+ },+ 'duplicate-queue-name': ({+ name+ }) => {+ return `The Queue name '${name}' is already being used. ` + `All instances of backgroundSync.Queue must be given unique names.`;+ },+ 'expired-test-without-max-age': ({+ methodName,+ paramName+ }) => {+ return `The '${methodName}()' method can only be used when the ` + `'${paramName}' is used in the constructor.`;+ },+ 'unsupported-route-type': ({+ moduleName,+ className,+ funcName,+ paramName+ }) => {+ return `The supplied '${paramName}' parameter was an unsupported type. ` + `Please check the docs for ${moduleName}.${className}.${funcName} for ` + `valid input types.`;+ },+ 'not-array-of-class': ({+ value,+ expectedClass,+ moduleName,+ className,+ funcName,+ paramName+ }) => {+ return `The supplied '${paramName}' parameter must be an array of ` + `'${expectedClass}' objects. Received '${JSON.stringify(value)},'. ` + `Please check the call to ${moduleName}.${className}.${funcName}() ` + `to fix the issue.`;+ },+ 'max-entries-or-age-required': ({+ moduleName,+ className,+ funcName+ }) => {+ return `You must define either config.maxEntries or config.maxAgeSeconds` + `in ${moduleName}.${className}.${funcName}`;+ },+ 'statuses-or-headers-required': ({+ moduleName,+ className,+ funcName+ }) => {+ return `You must define either config.statuses or config.headers` + `in ${moduleName}.${className}.${funcName}`;+ },+ 'invalid-string': ({+ moduleName,+ funcName,+ paramName+ }) => {+ if (!paramName || !moduleName || !funcName) {+ throw new Error(`Unexpected input to 'invalid-string' error.`);+ }+ return `When using strings, the '${paramName}' parameter must start with ` + `'http' (for cross-origin matches) or '/' (for same-origin matches). ` + `Please see the docs for ${moduleName}.${funcName}() for ` + `more info.`;+ },+ 'channel-name-required': () => {+ return `You must provide a channelName to construct a ` + `BroadcastCacheUpdate instance.`;+ },+ 'invalid-responses-are-same-args': () => {+ return `The arguments passed into responsesAreSame() appear to be ` + `invalid. Please ensure valid Responses are used.`;+ },+ 'expire-custom-caches-only': () => {+ return `You must provide a 'cacheName' property when using the ` + `expiration plugin with a runtime caching strategy.`;+ },+ 'unit-must-be-bytes': ({+ normalizedRangeHeader+ }) => {+ if (!normalizedRangeHeader) {+ throw new Error(`Unexpected input to 'unit-must-be-bytes' error.`);+ }+ return `The 'unit' portion of the Range header must be set to 'bytes'. ` + `The Range header provided was "${normalizedRangeHeader}"`;+ },+ 'single-range-only': ({+ normalizedRangeHeader+ }) => {+ if (!normalizedRangeHeader) {+ throw new Error(`Unexpected input to 'single-range-only' error.`);+ }+ return `Multiple ranges are not supported. Please use a single start ` + `value, and optional end value. The Range header provided was ` + `"${normalizedRangeHeader}"`;+ },+ 'invalid-range-values': ({+ normalizedRangeHeader+ }) => {+ if (!normalizedRangeHeader) {+ throw new Error(`Unexpected input to 'invalid-range-values' error.`);+ }+ return `The Range header is missing both start and end values. At least ` + `one of those values is needed. The Range header provided was ` + `"${normalizedRangeHeader}"`;+ },+ 'no-range-header': () => {+ return `No Range header was found in the Request provided.`;+ },+ 'range-not-satisfiable': ({+ size,+ start,+ end+ }) => {+ return `The start (${start}) and end (${end}) values in the Range are ` + `not satisfiable by the cached response, which is ${size} bytes.`;+ },+ 'attempt-to-cache-non-get-request': ({+ url,+ method+ }) => {+ return `Unable to cache '${url}' because it is a '${method}' request and ` + `only 'GET' requests can be cached.`;+ },+ 'cache-put-with-no-response': ({+ url+ }) => {+ return `There was an attempt to cache '${url}' but the response was not ` + `defined.`;+ },+ 'no-response': ({+ url,+ error+ }) => {+ let message = `The strategy could not generate a response for '${url}'.`;+ if (error) {+ message += ` The underlying error is ${error}.`;+ }+ return message;+ },+ 'bad-precaching-response': ({+ url,+ status+ }) => {+ return `The precaching request for '${url}' failed` + (status ? ` with an HTTP status of ${status}.` : `.`);+ },+ 'non-precached-url': ({+ url+ }) => {+ return `createHandlerBoundToURL('${url}') was called, but that URL is ` + `not precached. Please pass in a URL that is precached instead.`;+ },+ 'add-to-cache-list-conflicting-integrities': ({+ url+ }) => {+ return `Two of the entries passed to ` + `'workbox-precaching.PrecacheController.addToCacheList()' had the URL ` + `${url} with different integrity values. Please remove one of them.`;+ },+ 'missing-precache-entry': ({+ cacheName,+ url+ }) => {+ return `Unable to find a precached response in ${cacheName} for ${url}.`;+ },+ 'cross-origin-copy-response': ({+ origin+ }) => {+ return `workbox-core.copyResponse() can only be used with same-origin ` + `responses. It was passed a response with origin ${origin}.`;+ },+ 'opaque-streams-source': ({+ type+ }) => {+ const message = `One of the workbox-streams sources resulted in an ` + `'${type}' response.`;+ if (type === 'opaqueredirect') {+ return `${message} Please do not use a navigation request that results ` + `in a redirect as a source.`;+ }+ return `${message} Please ensure your sources are CORS-enabled.`;+ }+ };++ /*+ Copyright 2018 Google LLC++ Use of this source code is governed by an MIT-style+ license that can be found in the LICENSE file or at+ https://opensource.org/licenses/MIT.+ */+ const generatorFunction = (code, details = {}) => {+ const message = messages$1[code];+ if (!message) {+ throw new Error(`Unable to find message for code '${code}'.`);+ }+ return message(details);+ };+ const messageGenerator = generatorFunction;++ /*+ Copyright 2018 Google LLC++ Use of this source code is governed by an MIT-style+ license that can be found in the LICENSE file or at+ https://opensource.org/licenses/MIT.+ */+ /**+ * Workbox errors should be thrown with this class.+ * This allows use to ensure the type easily in tests,+ * helps developers identify errors from workbox+ * easily and allows use to optimise error+ * messages correctly.+ *+ * @private+ */+ class WorkboxError extends Error {+ /**+ *+ * @param {string} errorCode The error code that+ * identifies this particular error.+ * @param {Object=} details Any relevant arguments+ * that will help developers identify issues should+ * be added as a key on the context object.+ */+ constructor(errorCode, details) {+ const message = messageGenerator(errorCode, details);+ super(message);+ this.name = errorCode;+ this.details = details;+ }+ }++ /*+ Copyright 2018 Google LLC++ Use of this source code is governed by an MIT-style+ license that can be found in the LICENSE file or at+ https://opensource.org/licenses/MIT.+ */+ /*+ * This method throws if the supplied value is not an array.+ * The destructed values are required to produce a meaningful error for users.+ * The destructed and restructured object is so it's clear what is+ * needed.+ */+ const isArray = (value, details) => {+ if (!Array.isArray(value)) {+ throw new WorkboxError('not-an-array', details);+ }+ };+ const hasMethod = (object, expectedMethod, details) => {+ const type = typeof object[expectedMethod];+ if (type !== 'function') {+ details['expectedMethod'] = expectedMethod;+ throw new WorkboxError('missing-a-method', details);+ }+ };+ const isType = (object, expectedType, details) => {+ if (typeof object !== expectedType) {+ details['expectedType'] = expectedType;+ throw new WorkboxError('incorrect-type', details);+ }+ };+ const isInstance = (object,+ // Need the general type to do the check later.+ // eslint-disable-next-line @typescript-eslint/ban-types+ expectedClass, details) => {+ if (!(object instanceof expectedClass)) {+ details['expectedClassName'] = expectedClass.name;+ throw new WorkboxError('incorrect-class', details);+ }+ };+ const isOneOf = (value, validValues, details) => {+ if (!validValues.includes(value)) {+ details['validValueDescription'] = `Valid values are ${JSON.stringify(validValues)}.`;+ throw new WorkboxError('invalid-value', details);+ }+ };+ const isArrayOfClass = (value,+ // Need general type to do check later.+ expectedClass,+ // eslint-disable-line+ details) => {+ const error = new WorkboxError('not-array-of-class', details);+ if (!Array.isArray(value)) {+ throw error;+ }+ for (const item of value) {+ if (!(item instanceof expectedClass)) {+ throw error;+ }+ }+ };+ const finalAssertExports = {+ hasMethod,+ isArray,+ isInstance,+ isOneOf,+ isType,+ isArrayOfClass+ };++ // @ts-ignore+ try {+ self['workbox:routing:7.4.0'] && _();+ } catch (e) {}++ /*+ Copyright 2018 Google LLC++ Use of this source code is governed by an MIT-style+ license that can be found in the LICENSE file or at+ https://opensource.org/licenses/MIT.+ */+ /**+ * The default HTTP method, 'GET', used when there's no specific method+ * configured for a route.+ *+ * @type {string}+ *+ * @private+ */+ const defaultMethod = 'GET';+ /**+ * The list of valid HTTP methods associated with requests that could be routed.+ *+ * @type {Array<string>}+ *+ * @private+ */+ const validMethods = ['DELETE', 'GET', 'HEAD', 'PATCH', 'POST', 'PUT'];++ /*+ Copyright 2018 Google LLC++ Use of this source code is governed by an MIT-style+ license that can be found in the LICENSE file or at+ https://opensource.org/licenses/MIT.+ */+ /**+ * @param {function()|Object} handler Either a function, or an object with a+ * 'handle' method.+ * @return {Object} An object with a handle method.+ *+ * @private+ */+ const normalizeHandler = handler => {+ if (handler && typeof handler === 'object') {+ {+ finalAssertExports.hasMethod(handler, 'handle', {+ moduleName: 'workbox-routing',+ className: 'Route',+ funcName: 'constructor',+ paramName: 'handler'+ });+ }+ return handler;+ } else {+ {+ finalAssertExports.isType(handler, 'function', {+ moduleName: 'workbox-routing',+ className: 'Route',+ funcName: 'constructor',+ paramName: 'handler'+ });+ }+ return {+ handle: handler+ };+ }+ };++ /*+ Copyright 2018 Google LLC++ Use of this source code is governed by an MIT-style+ license that can be found in the LICENSE file or at+ https://opensource.org/licenses/MIT.+ */+ /**+ * A `Route` consists of a pair of callback functions, "match" and "handler".+ * The "match" callback determine if a route should be used to "handle" a+ * request by returning a non-falsy value if it can. The "handler" callback+ * is called when there is a match and should return a Promise that resolves+ * to a `Response`.+ *+ * @memberof workbox-routing+ */+ class Route {+ /**+ * Constructor for Route class.+ *+ * @param {workbox-routing~matchCallback} match+ * A callback function that determines whether the route matches a given+ * `fetch` event by returning a non-falsy value.+ * @param {workbox-routing~handlerCallback} handler A callback+ * function that returns a Promise resolving to a Response.+ * @param {string} [method='GET'] The HTTP method to match the Route+ * against.+ */+ constructor(match, handler, method = defaultMethod) {+ {+ finalAssertExports.isType(match, 'function', {+ moduleName: 'workbox-routing',+ className: 'Route',+ funcName: 'constructor',+ paramName: 'match'+ });+ if (method) {+ finalAssertExports.isOneOf(method, validMethods, {+ paramName: 'method'+ });+ }+ }+ // These values are referenced directly by Router so cannot be+ // altered by minificaton.+ this.handler = normalizeHandler(handler);+ this.match = match;+ this.method = method;+ }+ /**+ *+ * @param {workbox-routing-handlerCallback} handler A callback+ * function that returns a Promise resolving to a Response+ */+ setCatchHandler(handler) {+ this.catchHandler = normalizeHandler(handler);+ }+ }++ /*+ Copyright 2018 Google LLC++ Use of this source code is governed by an MIT-style+ license that can be found in the LICENSE file or at+ https://opensource.org/licenses/MIT.+ */+ /**+ * RegExpRoute makes it easy to create a regular expression based+ * {@link workbox-routing.Route}.+ *+ * For same-origin requests the RegExp only needs to match part of the URL. For+ * requests against third-party servers, you must define a RegExp that matches+ * the start of the URL.+ *+ * @memberof workbox-routing+ * @extends workbox-routing.Route+ */+ class RegExpRoute extends Route {+ /**+ * If the regular expression contains+ * [capture groups]{@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp#grouping-back-references},+ * the captured values will be passed to the+ * {@link workbox-routing~handlerCallback} `params`+ * argument.+ *+ * @param {RegExp} regExp The regular expression to match against URLs.+ * @param {workbox-routing~handlerCallback} handler A callback+ * function that returns a Promise resulting in a Response.+ * @param {string} [method='GET'] The HTTP method to match the Route+ * against.+ */+ constructor(regExp, handler, method) {+ {+ finalAssertExports.isInstance(regExp, RegExp, {+ moduleName: 'workbox-routing',+ className: 'RegExpRoute',+ funcName: 'constructor',+ paramName: 'pattern'+ });+ }+ const match = ({+ url+ }) => {+ const result = regExp.exec(url.href);+ // Return immediately if there's no match.+ if (!result) {+ return;+ }+ // Require that the match start at the first character in the URL string+ // if it's a cross-origin request.+ // See https://github.com/GoogleChrome/workbox/issues/281 for the context+ // behind this behavior.+ if (url.origin !== location.origin && result.index !== 0) {+ {+ logger.debug(`The regular expression '${regExp.toString()}' only partially matched ` + `against the cross-origin URL '${url.toString()}'. RegExpRoute's will only ` + `handle cross-origin requests if they match the entire URL.`);+ }+ return;+ }+ // If the route matches, but there aren't any capture groups defined, then+ // this will return [], which is truthy and therefore sufficient to+ // indicate a match.+ // If there are capture groups, then it will return their values.+ return result.slice(1);+ };+ super(match, handler, method);+ }+ }++ /*+ Copyright 2018 Google LLC++ Use of this source code is governed by an MIT-style+ license that can be found in the LICENSE file or at+ https://opensource.org/licenses/MIT.+ */+ const getFriendlyURL = url => {+ const urlObj = new URL(String(url), location.href);+ // See https://github.com/GoogleChrome/workbox/issues/2323+ // We want to include everything, except for the origin if it's same-origin.+ return urlObj.href.replace(new RegExp(`^${location.origin}`), '');+ };++ /*+ Copyright 2018 Google LLC++ Use of this source code is governed by an MIT-style+ license that can be found in the LICENSE file or at+ https://opensource.org/licenses/MIT.+ */+ /**+ * The Router can be used to process a `FetchEvent` using one or more+ * {@link workbox-routing.Route}, responding with a `Response` if+ * a matching route exists.+ *+ * If no route matches a given a request, the Router will use a "default"+ * handler if one is defined.+ *+ * Should the matching Route throw an error, the Router will use a "catch"+ * handler if one is defined to gracefully deal with issues and respond with a+ * Request.+ *+ * If a request matches multiple routes, the **earliest** registered route will+ * be used to respond to the request.+ *+ * @memberof workbox-routing+ */+ class Router {+ /**+ * Initializes a new Router.+ */+ constructor() {+ this._routes = new Map();+ this._defaultHandlerMap = new Map();+ }+ /**+ * @return {Map<string, Array<workbox-routing.Route>>} routes A `Map` of HTTP+ * method name ('GET', etc.) to an array of all the corresponding `Route`+ * instances that are registered.+ */+ get routes() {+ return this._routes;+ }+ /**+ * Adds a fetch event listener to respond to events when a route matches+ * the event's request.+ */+ addFetchListener() {+ // See https://github.com/Microsoft/TypeScript/issues/28357#issuecomment-436484705+ self.addEventListener('fetch', event => {+ const {+ request+ } = event;+ const responsePromise = this.handleRequest({+ request,+ event+ });+ if (responsePromise) {+ event.respondWith(responsePromise);+ }+ });+ }+ /**+ * Adds a message event listener for URLs to cache from the window.+ * This is useful to cache resources loaded on the page prior to when the+ * service worker started controlling it.+ *+ * The format of the message data sent from the window should be as follows.+ * Where the `urlsToCache` array may consist of URL strings or an array of+ * URL string + `requestInit` object (the same as you'd pass to `fetch()`).+ *+ * ```+ * {+ * type: 'CACHE_URLS',+ * payload: {+ * urlsToCache: [+ * './script1.js',+ * './script2.js',+ * ['./script3.js', {mode: 'no-cors'}],+ * ],+ * },+ * }+ * ```+ */+ addCacheListener() {+ // See https://github.com/Microsoft/TypeScript/issues/28357#issuecomment-436484705+ self.addEventListener('message', event => {+ // event.data is type 'any'+ // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access+ if (event.data && event.data.type === 'CACHE_URLS') {+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment+ const {+ payload+ } = event.data;+ {+ logger.debug(`Caching URLs from the window`, payload.urlsToCache);+ }+ const requestPromises = Promise.all(payload.urlsToCache.map(entry => {+ if (typeof entry === 'string') {+ entry = [entry];+ }+ const request = new Request(...entry);+ return this.handleRequest({+ request,+ event+ });+ // TODO(philipwalton): TypeScript errors without this typecast for+ // some reason (probably a bug). The real type here should work but+ // doesn't: `Array<Promise<Response> | undefined>`.+ })); // TypeScript+ event.waitUntil(requestPromises);+ // If a MessageChannel was used, reply to the message on success.+ if (event.ports && event.ports[0]) {+ void requestPromises.then(() => event.ports[0].postMessage(true));+ }+ }+ });+ }+ /**+ * Apply the routing rules to a FetchEvent object to get a Response from an+ * appropriate Route's handler.+ *+ * @param {Object} options+ * @param {Request} options.request The request to handle.+ * @param {ExtendableEvent} options.event The event that triggered the+ * request.+ * @return {Promise<Response>|undefined} A promise is returned if a+ * registered route can handle the request. If there is no matching+ * route and there's no `defaultHandler`, `undefined` is returned.+ */+ handleRequest({+ request,+ event+ }) {+ {+ finalAssertExports.isInstance(request, Request, {+ moduleName: 'workbox-routing',+ className: 'Router',+ funcName: 'handleRequest',+ paramName: 'options.request'+ });+ }+ const url = new URL(request.url, location.href);+ if (!url.protocol.startsWith('http')) {+ {+ logger.debug(`Workbox Router only supports URLs that start with 'http'.`);+ }+ return;+ }+ const sameOrigin = url.origin === location.origin;+ const {+ params,+ route+ } = this.findMatchingRoute({+ event,+ request,+ sameOrigin,+ url+ });+ let handler = route && route.handler;+ const debugMessages = [];+ {+ if (handler) {+ debugMessages.push([`Found a route to handle this request:`, route]);+ if (params) {+ debugMessages.push([`Passing the following params to the route's handler:`, params]);+ }+ }+ }+ // If we don't have a handler because there was no matching route, then+ // fall back to defaultHandler if that's defined.+ const method = request.method;+ if (!handler && this._defaultHandlerMap.has(method)) {+ {+ debugMessages.push(`Failed to find a matching route. Falling ` + `back to the default handler for ${method}.`);+ }+ handler = this._defaultHandlerMap.get(method);+ }+ if (!handler) {+ {+ // No handler so Workbox will do nothing. If logs is set of debug+ // i.e. verbose, we should print out this information.+ logger.debug(`No route found for: ${getFriendlyURL(url)}`);+ }+ return;+ }+ {+ // We have a handler, meaning Workbox is going to handle the route.+ // print the routing details to the console.+ logger.groupCollapsed(`Router is responding to: ${getFriendlyURL(url)}`);+ debugMessages.forEach(msg => {+ if (Array.isArray(msg)) {+ logger.log(...msg);+ } else {+ logger.log(msg);+ }+ });+ logger.groupEnd();+ }+ // Wrap in try and catch in case the handle method throws a synchronous+ // error. It should still callback to the catch handler.+ let responsePromise;+ try {+ responsePromise = handler.handle({+ url,+ request,+ event,+ params+ });+ } catch (err) {+ responsePromise = Promise.reject(err);+ }+ // Get route's catch handler, if it exists+ const catchHandler = route && route.catchHandler;+ if (responsePromise instanceof Promise && (this._catchHandler || catchHandler)) {+ responsePromise = responsePromise.catch(async err => {+ // If there's a route catch handler, process that first+ if (catchHandler) {+ {+ // Still include URL here as it will be async from the console group+ // and may not make sense without the URL+ logger.groupCollapsed(`Error thrown when responding to: ` + ` ${getFriendlyURL(url)}. Falling back to route's Catch Handler.`);+ logger.error(`Error thrown by:`, route);+ logger.error(err);+ logger.groupEnd();+ }+ try {+ return await catchHandler.handle({+ url,+ request,+ event,+ params+ });+ } catch (catchErr) {+ if (catchErr instanceof Error) {+ err = catchErr;+ }+ }+ }+ if (this._catchHandler) {+ {+ // Still include URL here as it will be async from the console group+ // and may not make sense without the URL+ logger.groupCollapsed(`Error thrown when responding to: ` + ` ${getFriendlyURL(url)}. Falling back to global Catch Handler.`);+ logger.error(`Error thrown by:`, route);+ logger.error(err);+ logger.groupEnd();+ }+ return this._catchHandler.handle({+ url,+ request,+ event+ });+ }+ throw err;+ });+ }+ return responsePromise;+ }+ /**+ * Checks a request and URL (and optionally an event) against the list of+ * registered routes, and if there's a match, returns the corresponding+ * route along with any params generated by the match.+ *+ * @param {Object} options+ * @param {URL} options.url+ * @param {boolean} options.sameOrigin The result of comparing `url.origin`+ * against the current origin.+ * @param {Request} options.request The request to match.+ * @param {Event} options.event The corresponding event.+ * @return {Object} An object with `route` and `params` properties.+ * They are populated if a matching route was found or `undefined`+ * otherwise.+ */+ findMatchingRoute({+ url,+ sameOrigin,+ request,+ event+ }) {+ const routes = this._routes.get(request.method) || [];+ for (const route of routes) {+ let params;+ // route.match returns type any, not possible to change right now.+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment+ const matchResult = route.match({+ url,+ sameOrigin,+ request,+ event+ });+ if (matchResult) {+ {+ // Warn developers that using an async matchCallback is almost always+ // not the right thing to do.+ if (matchResult instanceof Promise) {+ logger.warn(`While routing ${getFriendlyURL(url)}, an async ` + `matchCallback function was used. Please convert the ` + `following route to use a synchronous matchCallback function:`, route);+ }+ }+ // See https://github.com/GoogleChrome/workbox/issues/2079+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment+ params = matchResult;+ if (Array.isArray(params) && params.length === 0) {+ // Instead of passing an empty array in as params, use undefined.+ params = undefined;+ } else if (matchResult.constructor === Object &&+ // eslint-disable-line+ Object.keys(matchResult).length === 0) {+ // Instead of passing an empty object in as params, use undefined.+ params = undefined;+ } else if (typeof matchResult === 'boolean') {+ // For the boolean value true (rather than just something truth-y),+ // don't set params.+ // See https://github.com/GoogleChrome/workbox/pull/2134#issuecomment-513924353+ params = undefined;+ }+ // Return early if have a match.+ return {+ route,+ params+ };+ }+ }+ // If no match was found above, return and empty object.+ return {};+ }+ /**+ * Define a default `handler` that's called when no routes explicitly+ * match the incoming request.+ *+ * Each HTTP method ('GET', 'POST', etc.) gets its own default handler.+ *+ * Without a default handler, unmatched requests will go against the+ * network as if there were no service worker present.+ *+ * @param {workbox-routing~handlerCallback} handler A callback+ * function that returns a Promise resulting in a Response.+ * @param {string} [method='GET'] The HTTP method to associate with this+ * default handler. Each method has its own default.+ */+ setDefaultHandler(handler, method = defaultMethod) {+ this._defaultHandlerMap.set(method, normalizeHandler(handler));+ }+ /**+ * If a Route throws an error while handling a request, this `handler`+ * will be called and given a chance to provide a response.+ *+ * @param {workbox-routing~handlerCallback} handler A callback+ * function that returns a Promise resulting in a Response.+ */+ setCatchHandler(handler) {+ this._catchHandler = normalizeHandler(handler);+ }+ /**+ * Registers a route with the router.+ *+ * @param {workbox-routing.Route} route The route to register.+ */+ registerRoute(route) {+ {+ finalAssertExports.isType(route, 'object', {+ moduleName: 'workbox-routing',+ className: 'Router',+ funcName: 'registerRoute',+ paramName: 'route'+ });+ finalAssertExports.hasMethod(route, 'match', {+ moduleName: 'workbox-routing',+ className: 'Router',+ funcName: 'registerRoute',+ paramName: 'route'+ });+ finalAssertExports.isType(route.handler, 'object', {+ moduleName: 'workbox-routing',+ className: 'Router',+ funcName: 'registerRoute',+ paramName: 'route'+ });+ finalAssertExports.hasMethod(route.handler, 'handle', {+ moduleName: 'workbox-routing',+ className: 'Router',+ funcName: 'registerRoute',+ paramName: 'route.handler'+ });+ finalAssertExports.isType(route.method, 'string', {+ moduleName: 'workbox-routing',+ className: 'Router',+ funcName: 'registerRoute',+ paramName: 'route.method'+ });+ }+ if (!this._routes.has(route.method)) {+ this._routes.set(route.method, []);+ }+ // Give precedence to all of the earlier routes by adding this additional+ // route to the end of the array.+ this._routes.get(route.method).push(route);+ }+ /**+ * Unregisters a route with the router.+ *+ * @param {workbox-routing.Route} route The route to unregister.+ */+ unregisterRoute(route) {+ if (!this._routes.has(route.method)) {+ throw new WorkboxError('unregister-route-but-not-found-with-method', {+ method: route.method+ });+ }+ const routeIndex = this._routes.get(route.method).indexOf(route);+ if (routeIndex > -1) {+ this._routes.get(route.method).splice(routeIndex, 1);+ } else {+ throw new WorkboxError('unregister-route-route-not-registered');+ }+ }+ }++ /*+ Copyright 2019 Google LLC++ Use of this source code is governed by an MIT-style+ license that can be found in the LICENSE file or at+ https://opensource.org/licenses/MIT.+ */+ let defaultRouter;+ /**+ * Creates a new, singleton Router instance if one does not exist. If one+ * does already exist, that instance is returned.+ *+ * @private+ * @return {Router}+ */+ const getOrCreateDefaultRouter = () => {+ if (!defaultRouter) {+ defaultRouter = new Router();+ // The helpers that use the default Router assume these listeners exist.+ defaultRouter.addFetchListener();+ defaultRouter.addCacheListener();+ }+ return defaultRouter;+ };++ /*+ Copyright 2019 Google LLC++ Use of this source code is governed by an MIT-style+ license that can be found in the LICENSE file or at+ https://opensource.org/licenses/MIT.+ */+ /**+ * Easily register a RegExp, string, or function with a caching+ * strategy to a singleton Router instance.+ *+ * This method will generate a Route for you if needed and+ * call {@link workbox-routing.Router#registerRoute}.+ *+ * @param {RegExp|string|workbox-routing.Route~matchCallback|workbox-routing.Route} capture+ * If the capture param is a `Route`, all other arguments will be ignored.+ * @param {workbox-routing~handlerCallback} [handler] A callback+ * function that returns a Promise resulting in a Response. This parameter+ * is required if `capture` is not a `Route` object.+ * @param {string} [method='GET'] The HTTP method to match the Route+ * against.+ * @return {workbox-routing.Route} The generated `Route`.+ *+ * @memberof workbox-routing+ */+ function registerRoute(capture, handler, method) {+ let route;+ if (typeof capture === 'string') {+ const captureUrl = new URL(capture, location.href);+ {+ if (!(capture.startsWith('/') || capture.startsWith('http'))) {+ throw new WorkboxError('invalid-string', {+ moduleName: 'workbox-routing',+ funcName: 'registerRoute',+ paramName: 'capture'+ });+ }+ // We want to check if Express-style wildcards are in the pathname only.+ // TODO: Remove this log message in v4.+ const valueToCheck = capture.startsWith('http') ? captureUrl.pathname : capture;+ // See https://github.com/pillarjs/path-to-regexp#parameters+ const wildcards = '[*:?+]';+ if (new RegExp(`${wildcards}`).exec(valueToCheck)) {+ logger.debug(`The '$capture' parameter contains an Express-style wildcard ` + `character (${wildcards}). Strings are now always interpreted as ` + `exact matches; use a RegExp for partial or wildcard matches.`);+ }+ }+ const matchCallback = ({+ url+ }) => {+ {+ if (url.pathname === captureUrl.pathname && url.origin !== captureUrl.origin) {+ logger.debug(`${capture} only partially matches the cross-origin URL ` + `${url.toString()}. This route will only handle cross-origin requests ` + `if they match the entire URL.`);+ }+ }+ return url.href === captureUrl.href;+ };+ // If `capture` is a string then `handler` and `method` must be present.+ route = new Route(matchCallback, handler, method);+ } else if (capture instanceof RegExp) {+ // If `capture` is a `RegExp` then `handler` and `method` must be present.+ route = new RegExpRoute(capture, handler, method);+ } else if (typeof capture === 'function') {+ // If `capture` is a function then `handler` and `method` must be present.+ route = new Route(capture, handler, method);+ } else if (capture instanceof Route) {+ route = capture;+ } else {+ throw new WorkboxError('unsupported-route-type', {+ moduleName: 'workbox-routing',+ funcName: 'registerRoute',+ paramName: 'capture'+ });+ }+ const defaultRouter = getOrCreateDefaultRouter();+ defaultRouter.registerRoute(route);+ return route;+ }++ /*+ Copyright 2018 Google LLC++ Use of this source code is governed by an MIT-style+ license that can be found in the LICENSE file or at+ https://opensource.org/licenses/MIT.+ */+ const _cacheNameDetails = {+ googleAnalytics: 'googleAnalytics',+ precache: 'precache-v2',+ prefix: 'workbox',+ runtime: 'runtime',+ suffix: typeof registration !== 'undefined' ? registration.scope : ''+ };+ const _createCacheName = cacheName => {+ return [_cacheNameDetails.prefix, cacheName, _cacheNameDetails.suffix].filter(value => value && value.length > 0).join('-');+ };+ const eachCacheNameDetail = fn => {+ for (const key of Object.keys(_cacheNameDetails)) {+ fn(key);+ }+ };+ const cacheNames = {+ updateDetails: details => {+ eachCacheNameDetail(key => {+ if (typeof details[key] === 'string') {+ _cacheNameDetails[key] = details[key];+ }+ });+ },+ getGoogleAnalyticsName: userCacheName => {+ return userCacheName || _createCacheName(_cacheNameDetails.googleAnalytics);+ },+ getPrecacheName: userCacheName => {+ return userCacheName || _createCacheName(_cacheNameDetails.precache);+ },+ getPrefix: () => {+ return _cacheNameDetails.prefix;+ },+ getRuntimeName: userCacheName => {+ return userCacheName || _createCacheName(_cacheNameDetails.runtime);+ },+ getSuffix: () => {+ return _cacheNameDetails.suffix;+ }+ };++ /*+ Copyright 2019 Google LLC+ Use of this source code is governed by an MIT-style+ license that can be found in the LICENSE file or at+ https://opensource.org/licenses/MIT.+ */+ /**+ * A helper function that prevents a promise from being flagged as unused.+ *+ * @private+ **/+ function dontWaitFor(promise) {+ // Effective no-op.+ void promise.then(() => {});+ }++ /*+ Copyright 2018 Google LLC++ Use of this source code is governed by an MIT-style+ license that can be found in the LICENSE file or at+ https://opensource.org/licenses/MIT.+ */+ // Callbacks to be executed whenever there's a quota error.+ // Can't change Function type right now.+ // eslint-disable-next-line @typescript-eslint/ban-types+ const quotaErrorCallbacks = new Set();++ /*+ Copyright 2019 Google LLC++ Use of this source code is governed by an MIT-style+ license that can be found in the LICENSE file or at+ https://opensource.org/licenses/MIT.+ */+ /**+ * Adds a function to the set of quotaErrorCallbacks that will be executed if+ * there's a quota error.+ *+ * @param {Function} callback+ * @memberof workbox-core+ */+ // Can't change Function type+ // eslint-disable-next-line @typescript-eslint/ban-types+ function registerQuotaErrorCallback(callback) {+ {+ finalAssertExports.isType(callback, 'function', {+ moduleName: 'workbox-core',+ funcName: 'register',+ paramName: 'callback'+ });+ }+ quotaErrorCallbacks.add(callback);+ {+ logger.log('Registered a callback to respond to quota errors.', callback);+ }+ }++ function _extends() {+ return _extends = Object.assign ? Object.assign.bind() : function (n) {+ for (var e = 1; e < arguments.length; e++) {+ var t = arguments[e];+ for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);+ }+ return n;+ }, _extends.apply(null, arguments);+ }++ const instanceOfAny = (object, constructors) => constructors.some(c => object instanceof c);+ let idbProxyableTypes;+ let cursorAdvanceMethods;+ // This is a function to prevent it throwing up in node environments.+ function getIdbProxyableTypes() {+ return idbProxyableTypes || (idbProxyableTypes = [IDBDatabase, IDBObjectStore, IDBIndex, IDBCursor, IDBTransaction]);+ }+ // This is a function to prevent it throwing up in node environments.+ function getCursorAdvanceMethods() {+ return cursorAdvanceMethods || (cursorAdvanceMethods = [IDBCursor.prototype.advance, IDBCursor.prototype.continue, IDBCursor.prototype.continuePrimaryKey]);+ }+ const cursorRequestMap = new WeakMap();+ const transactionDoneMap = new WeakMap();+ const transactionStoreNamesMap = new WeakMap();+ const transformCache = new WeakMap();+ const reverseTransformCache = new WeakMap();+ function promisifyRequest(request) {+ const promise = new Promise((resolve, reject) => {+ const unlisten = () => {+ request.removeEventListener('success', success);+ request.removeEventListener('error', error);+ };+ const success = () => {+ resolve(wrap(request.result));+ unlisten();+ };+ const error = () => {+ reject(request.error);+ unlisten();+ };+ request.addEventListener('success', success);+ request.addEventListener('error', error);+ });+ promise.then(value => {+ // Since cursoring reuses the IDBRequest (*sigh*), we cache it for later retrieval+ // (see wrapFunction).+ if (value instanceof IDBCursor) {+ cursorRequestMap.set(value, request);+ }+ // Catching to avoid "Uncaught Promise exceptions"+ }).catch(() => {});+ // This mapping exists in reverseTransformCache but doesn't doesn't exist in transformCache. This+ // is because we create many promises from a single IDBRequest.+ reverseTransformCache.set(promise, request);+ return promise;+ }+ function cacheDonePromiseForTransaction(tx) {+ // Early bail if we've already created a done promise for this transaction.+ if (transactionDoneMap.has(tx)) return;+ const done = new Promise((resolve, reject) => {+ const unlisten = () => {+ tx.removeEventListener('complete', complete);+ tx.removeEventListener('error', error);+ tx.removeEventListener('abort', error);+ };+ const complete = () => {+ resolve();+ unlisten();+ };+ const error = () => {+ reject(tx.error || new DOMException('AbortError', 'AbortError'));+ unlisten();+ };+ tx.addEventListener('complete', complete);+ tx.addEventListener('error', error);+ tx.addEventListener('abort', error);+ });+ // Cache it for later retrieval.+ transactionDoneMap.set(tx, done);+ }+ let idbProxyTraps = {+ get(target, prop, receiver) {+ if (target instanceof IDBTransaction) {+ // Special handling for transaction.done.+ if (prop === 'done') return transactionDoneMap.get(target);+ // Polyfill for objectStoreNames because of Edge.+ if (prop === 'objectStoreNames') {+ return target.objectStoreNames || transactionStoreNamesMap.get(target);+ }+ // Make tx.store return the only store in the transaction, or undefined if there are many.+ if (prop === 'store') {+ return receiver.objectStoreNames[1] ? undefined : receiver.objectStore(receiver.objectStoreNames[0]);+ }+ }+ // Else transform whatever we get back.+ return wrap(target[prop]);+ },+ set(target, prop, value) {+ target[prop] = value;+ return true;+ },+ has(target, prop) {+ if (target instanceof IDBTransaction && (prop === 'done' || prop === 'store')) {+ return true;+ }+ return prop in target;+ }+ };+ function replaceTraps(callback) {+ idbProxyTraps = callback(idbProxyTraps);+ }+ function wrapFunction(func) {+ // Due to expected object equality (which is enforced by the caching in `wrap`), we+ // only create one new func per func.+ // Edge doesn't support objectStoreNames (booo), so we polyfill it here.+ if (func === IDBDatabase.prototype.transaction && !('objectStoreNames' in IDBTransaction.prototype)) {+ return function (storeNames, ...args) {+ const tx = func.call(unwrap(this), storeNames, ...args);+ transactionStoreNamesMap.set(tx, storeNames.sort ? storeNames.sort() : [storeNames]);+ return wrap(tx);+ };+ }+ // Cursor methods are special, as the behaviour is a little more different to standard IDB. In+ // IDB, you advance the cursor and wait for a new 'success' on the IDBRequest that gave you the+ // cursor. It's kinda like a promise that can resolve with many values. That doesn't make sense+ // with real promises, so each advance methods returns a new promise for the cursor object, or+ // undefined if the end of the cursor has been reached.+ if (getCursorAdvanceMethods().includes(func)) {+ return function (...args) {+ // Calling the original function with the proxy as 'this' causes ILLEGAL INVOCATION, so we use+ // the original object.+ func.apply(unwrap(this), args);+ return wrap(cursorRequestMap.get(this));+ };+ }+ return function (...args) {+ // Calling the original function with the proxy as 'this' causes ILLEGAL INVOCATION, so we use+ // the original object.+ return wrap(func.apply(unwrap(this), args));+ };+ }+ function transformCachableValue(value) {+ if (typeof value === 'function') return wrapFunction(value);+ // This doesn't return, it just creates a 'done' promise for the transaction,+ // which is later returned for transaction.done (see idbObjectHandler).+ if (value instanceof IDBTransaction) cacheDonePromiseForTransaction(value);+ if (instanceOfAny(value, getIdbProxyableTypes())) return new Proxy(value, idbProxyTraps);+ // Return the same value back if we're not going to transform it.+ return value;+ }+ function wrap(value) {+ // We sometimes generate multiple promises from a single IDBRequest (eg when cursoring), because+ // IDB is weird and a single IDBRequest can yield many responses, so these can't be cached.+ if (value instanceof IDBRequest) return promisifyRequest(value);+ // If we've already transformed this value before, reuse the transformed value.+ // This is faster, but it also provides object equality.+ if (transformCache.has(value)) return transformCache.get(value);+ const newValue = transformCachableValue(value);+ // Not all types are transformed.+ // These may be primitive types, so they can't be WeakMap keys.+ if (newValue !== value) {+ transformCache.set(value, newValue);+ reverseTransformCache.set(newValue, value);+ }+ return newValue;+ }+ const unwrap = value => reverseTransformCache.get(value);++ /**+ * Open a database.+ *+ * @param name Name of the database.+ * @param version Schema version.+ * @param callbacks Additional callbacks.+ */+ function openDB(name, version, {+ blocked,+ upgrade,+ blocking,+ terminated+ } = {}) {+ const request = indexedDB.open(name, version);+ const openPromise = wrap(request);+ if (upgrade) {+ request.addEventListener('upgradeneeded', event => {+ upgrade(wrap(request.result), event.oldVersion, event.newVersion, wrap(request.transaction), event);+ });+ }+ if (blocked) {+ request.addEventListener('blocked', event => blocked(+ // Casting due to https://github.com/microsoft/TypeScript-DOM-lib-generator/pull/1405+ event.oldVersion, event.newVersion, event));+ }+ openPromise.then(db => {+ if (terminated) db.addEventListener('close', () => terminated());+ if (blocking) {+ db.addEventListener('versionchange', event => blocking(event.oldVersion, event.newVersion, event));+ }+ }).catch(() => {});+ return openPromise;+ }+ /**+ * Delete a database.+ *+ * @param name Name of the database.+ */+ function deleteDB(name, {+ blocked+ } = {}) {+ const request = indexedDB.deleteDatabase(name);+ if (blocked) {+ request.addEventListener('blocked', event => blocked(+ // Casting due to https://github.com/microsoft/TypeScript-DOM-lib-generator/pull/1405+ event.oldVersion, event));+ }+ return wrap(request).then(() => undefined);+ }+ const readMethods = ['get', 'getKey', 'getAll', 'getAllKeys', 'count'];+ const writeMethods = ['put', 'add', 'delete', 'clear'];+ const cachedMethods = new Map();+ function getMethod(target, prop) {+ if (!(target instanceof IDBDatabase && !(prop in target) && typeof prop === 'string')) {+ return;+ }+ if (cachedMethods.get(prop)) return cachedMethods.get(prop);+ const targetFuncName = prop.replace(/FromIndex$/, '');+ const useIndex = prop !== targetFuncName;+ const isWrite = writeMethods.includes(targetFuncName);+ if (+ // Bail if the target doesn't exist on the target. Eg, getAll isn't in Edge.+ !(targetFuncName in (useIndex ? IDBIndex : IDBObjectStore).prototype) || !(isWrite || readMethods.includes(targetFuncName))) {+ return;+ }+ const method = async function (storeName, ...args) {+ // isWrite ? 'readwrite' : undefined gzipps better, but fails in Edge :(+ const tx = this.transaction(storeName, isWrite ? 'readwrite' : 'readonly');+ let target = tx.store;+ if (useIndex) target = target.index(args.shift());+ // Must reject if op rejects.+ // If it's a write operation, must reject if tx.done rejects.+ // Must reject with op rejection first.+ // Must resolve with op value.+ // Must handle both promises (no unhandled rejections)+ return (await Promise.all([target[targetFuncName](...args), isWrite && tx.done]))[0];+ };+ cachedMethods.set(prop, method);+ return method;+ }+ replaceTraps(oldTraps => _extends({}, oldTraps, {+ get: (target, prop, receiver) => getMethod(target, prop) || oldTraps.get(target, prop, receiver),+ has: (target, prop) => !!getMethod(target, prop) || oldTraps.has(target, prop)+ }));++ // @ts-ignore+ try {+ self['workbox:expiration:7.4.0'] && _();+ } catch (e) {}++ /*+ Copyright 2018 Google LLC++ Use of this source code is governed by an MIT-style+ license that can be found in the LICENSE file or at+ https://opensource.org/licenses/MIT.+ */+ const DB_NAME = 'workbox-expiration';+ const CACHE_OBJECT_STORE = 'cache-entries';+ const normalizeURL = unNormalizedUrl => {+ const url = new URL(unNormalizedUrl, location.href);+ url.hash = '';+ return url.href;+ };+ /**+ * Returns the timestamp model.+ *+ * @private+ */+ class CacheTimestampsModel {+ /**+ *+ * @param {string} cacheName+ *+ * @private+ */+ constructor(cacheName) {+ this._db = null;+ this._cacheName = cacheName;+ }+ /**+ * Performs an upgrade of indexedDB.+ *+ * @param {IDBPDatabase<CacheDbSchema>} db+ *+ * @private+ */+ _upgradeDb(db) {+ // TODO(philipwalton): EdgeHTML doesn't support arrays as a keyPath, so we+ // have to use the `id` keyPath here and create our own values (a+ // concatenation of `url + cacheName`) instead of simply using+ // `keyPath: ['url', 'cacheName']`, which is supported in other browsers.+ const objStore = db.createObjectStore(CACHE_OBJECT_STORE, {+ keyPath: 'id'+ });+ // TODO(philipwalton): once we don't have to support EdgeHTML, we can+ // create a single index with the keyPath `['cacheName', 'timestamp']`+ // instead of doing both these indexes.+ objStore.createIndex('cacheName', 'cacheName', {+ unique: false+ });+ objStore.createIndex('timestamp', 'timestamp', {+ unique: false+ });+ }+ /**+ * Performs an upgrade of indexedDB and deletes deprecated DBs.+ *+ * @param {IDBPDatabase<CacheDbSchema>} db+ *+ * @private+ */+ _upgradeDbAndDeleteOldDbs(db) {+ this._upgradeDb(db);+ if (this._cacheName) {+ void deleteDB(this._cacheName);+ }+ }+ /**+ * @param {string} url+ * @param {number} timestamp+ *+ * @private+ */+ async setTimestamp(url, timestamp) {+ url = normalizeURL(url);+ const entry = {+ url,+ timestamp,+ cacheName: this._cacheName,+ // Creating an ID from the URL and cache name won't be necessary once+ // Edge switches to Chromium and all browsers we support work with+ // array keyPaths.+ id: this._getId(url)+ };+ const db = await this.getDb();+ const tx = db.transaction(CACHE_OBJECT_STORE, 'readwrite', {+ durability: 'relaxed'+ });+ await tx.store.put(entry);+ await tx.done;+ }+ /**+ * Returns the timestamp stored for a given URL.+ *+ * @param {string} url+ * @return {number | undefined}+ *+ * @private+ */+ async getTimestamp(url) {+ const db = await this.getDb();+ const entry = await db.get(CACHE_OBJECT_STORE, this._getId(url));+ return entry === null || entry === void 0 ? void 0 : entry.timestamp;+ }+ /**+ * Iterates through all the entries in the object store (from newest to+ * oldest) and removes entries once either `maxCount` is reached or the+ * entry's timestamp is less than `minTimestamp`.+ *+ * @param {number} minTimestamp+ * @param {number} maxCount+ * @return {Array<string>}+ *+ * @private+ */+ async expireEntries(minTimestamp, maxCount) {+ const db = await this.getDb();+ let cursor = await db.transaction(CACHE_OBJECT_STORE).store.index('timestamp').openCursor(null, 'prev');+ const entriesToDelete = [];+ let entriesNotDeletedCount = 0;+ while (cursor) {+ const result = cursor.value;+ // TODO(philipwalton): once we can use a multi-key index, we+ // won't have to check `cacheName` here.+ if (result.cacheName === this._cacheName) {+ // Delete an entry if it's older than the max age or+ // if we already have the max number allowed.+ if (minTimestamp && result.timestamp < minTimestamp || maxCount && entriesNotDeletedCount >= maxCount) {+ // TODO(philipwalton): we should be able to delete the+ // entry right here, but doing so causes an iteration+ // bug in Safari stable (fixed in TP). Instead we can+ // store the keys of the entries to delete, and then+ // delete the separate transactions.+ // https://github.com/GoogleChrome/workbox/issues/1978+ // cursor.delete();+ // We only need to return the URL, not the whole entry.+ entriesToDelete.push(cursor.value);+ } else {+ entriesNotDeletedCount++;+ }+ }+ cursor = await cursor.continue();+ }+ // TODO(philipwalton): once the Safari bug in the following issue is fixed,+ // we should be able to remove this loop and do the entry deletion in the+ // cursor loop above:+ // https://github.com/GoogleChrome/workbox/issues/1978+ const urlsDeleted = [];+ for (const entry of entriesToDelete) {+ await db.delete(CACHE_OBJECT_STORE, entry.id);+ urlsDeleted.push(entry.url);+ }+ return urlsDeleted;+ }+ /**+ * Takes a URL and returns an ID that will be unique in the object store.+ *+ * @param {string} url+ * @return {string}+ *+ * @private+ */+ _getId(url) {+ // Creating an ID from the URL and cache name won't be necessary once+ // Edge switches to Chromium and all browsers we support work with+ // array keyPaths.+ return this._cacheName + '|' + normalizeURL(url);+ }+ /**+ * Returns an open connection to the database.+ *+ * @private+ */+ async getDb() {+ if (!this._db) {+ this._db = await openDB(DB_NAME, 1, {+ upgrade: this._upgradeDbAndDeleteOldDbs.bind(this)+ });+ }+ return this._db;+ }+ }++ /*+ Copyright 2018 Google LLC++ Use of this source code is governed by an MIT-style+ license that can be found in the LICENSE file or at+ https://opensource.org/licenses/MIT.+ */+ /**+ * The `CacheExpiration` class allows you define an expiration and / or+ * limit on the number of responses stored in a+ * [`Cache`](https://developer.mozilla.org/en-US/docs/Web/API/Cache).+ *+ * @memberof workbox-expiration+ */+ class CacheExpiration {+ /**+ * To construct a new CacheExpiration instance you must provide at least+ * one of the `config` properties.+ *+ * @param {string} cacheName Name of the cache to apply restrictions to.+ * @param {Object} config+ * @param {number} [config.maxEntries] The maximum number of entries to cache.+ * Entries used the least will be removed as the maximum is reached.+ * @param {number} [config.maxAgeSeconds] The maximum age of an entry before+ * it's treated as stale and removed.+ * @param {Object} [config.matchOptions] The [`CacheQueryOptions`](https://developer.mozilla.org/en-US/docs/Web/API/Cache/delete#Parameters)+ * that will be used when calling `delete()` on the cache.+ */+ constructor(cacheName, config = {}) {+ this._isRunning = false;+ this._rerunRequested = false;+ {+ finalAssertExports.isType(cacheName, 'string', {+ moduleName: 'workbox-expiration',+ className: 'CacheExpiration',+ funcName: 'constructor',+ paramName: 'cacheName'+ });+ if (!(config.maxEntries || config.maxAgeSeconds)) {+ throw new WorkboxError('max-entries-or-age-required', {+ moduleName: 'workbox-expiration',+ className: 'CacheExpiration',+ funcName: 'constructor'+ });+ }+ if (config.maxEntries) {+ finalAssertExports.isType(config.maxEntries, 'number', {+ moduleName: 'workbox-expiration',+ className: 'CacheExpiration',+ funcName: 'constructor',+ paramName: 'config.maxEntries'+ });+ }+ if (config.maxAgeSeconds) {+ finalAssertExports.isType(config.maxAgeSeconds, 'number', {+ moduleName: 'workbox-expiration',+ className: 'CacheExpiration',+ funcName: 'constructor',+ paramName: 'config.maxAgeSeconds'+ });+ }+ }+ this._maxEntries = config.maxEntries;+ this._maxAgeSeconds = config.maxAgeSeconds;+ this._matchOptions = config.matchOptions;+ this._cacheName = cacheName;+ this._timestampModel = new CacheTimestampsModel(cacheName);+ }+ /**+ * Expires entries for the given cache and given criteria.+ */+ async expireEntries() {+ if (this._isRunning) {+ this._rerunRequested = true;+ return;+ }+ this._isRunning = true;+ const minTimestamp = this._maxAgeSeconds ? Date.now() - this._maxAgeSeconds * 1000 : 0;+ const urlsExpired = await this._timestampModel.expireEntries(minTimestamp, this._maxEntries);+ // Delete URLs from the cache+ const cache = await self.caches.open(this._cacheName);+ for (const url of urlsExpired) {+ await cache.delete(url, this._matchOptions);+ }+ {+ if (urlsExpired.length > 0) {+ logger.groupCollapsed(`Expired ${urlsExpired.length} ` + `${urlsExpired.length === 1 ? 'entry' : 'entries'} and removed ` + `${urlsExpired.length === 1 ? 'it' : 'them'} from the ` + `'${this._cacheName}' cache.`);+ logger.log(`Expired the following ${urlsExpired.length === 1 ? 'URL' : 'URLs'}:`);+ urlsExpired.forEach(url => logger.log(` ${url}`));+ logger.groupEnd();+ } else {+ logger.debug(`Cache expiration ran and found no entries to remove.`);+ }+ }+ this._isRunning = false;+ if (this._rerunRequested) {+ this._rerunRequested = false;+ dontWaitFor(this.expireEntries());+ }+ }+ /**+ * Update the timestamp for the given URL. This ensures the when+ * removing entries based on maximum entries, most recently used+ * is accurate or when expiring, the timestamp is up-to-date.+ *+ * @param {string} url+ */+ async updateTimestamp(url) {+ {+ finalAssertExports.isType(url, 'string', {+ moduleName: 'workbox-expiration',+ className: 'CacheExpiration',+ funcName: 'updateTimestamp',+ paramName: 'url'+ });+ }+ await this._timestampModel.setTimestamp(url, Date.now());+ }+ /**+ * Can be used to check if a URL has expired or not before it's used.+ *+ * This requires a look up from IndexedDB, so can be slow.+ *+ * Note: This method will not remove the cached entry, call+ * `expireEntries()` to remove indexedDB and Cache entries.+ *+ * @param {string} url+ * @return {boolean}+ */+ async isURLExpired(url) {+ if (!this._maxAgeSeconds) {+ {+ throw new WorkboxError(`expired-test-without-max-age`, {+ methodName: 'isURLExpired',+ paramName: 'maxAgeSeconds'+ });+ }+ } else {+ const timestamp = await this._timestampModel.getTimestamp(url);+ const expireOlderThan = Date.now() - this._maxAgeSeconds * 1000;+ return timestamp !== undefined ? timestamp < expireOlderThan : true;+ }+ }+ /**+ * Removes the IndexedDB object store used to keep track of cache expiration+ * metadata.+ */+ async delete() {+ // Make sure we don't attempt another rerun if we're called in the middle of+ // a cache expiration.+ this._rerunRequested = false;+ await this._timestampModel.expireEntries(Infinity); // Expires all.+ }+ }++ /*+ Copyright 2018 Google LLC++ Use of this source code is governed by an MIT-style+ license that can be found in the LICENSE file or at+ https://opensource.org/licenses/MIT.+ */+ /**+ * This plugin can be used in a `workbox-strategy` to regularly enforce a+ * limit on the age and / or the number of cached requests.+ *+ * It can only be used with `workbox-strategy` instances that have a+ * [custom `cacheName` property set](/web/tools/workbox/guides/configure-workbox#custom_cache_names_in_strategies).+ * In other words, it can't be used to expire entries in strategy that uses the+ * default runtime cache name.+ *+ * Whenever a cached response is used or updated, this plugin will look+ * at the associated cache and remove any old or extra responses.+ *+ * When using `maxAgeSeconds`, responses may be used *once* after expiring+ * because the expiration clean up will not have occurred until *after* the+ * cached response has been used. If the response has a "Date" header, then+ * a light weight expiration check is performed and the response will not be+ * used immediately.+ *+ * When using `maxEntries`, the entry least-recently requested will be removed+ * from the cache first.+ *+ * @memberof workbox-expiration+ */+ class ExpirationPlugin {+ /**+ * @param {ExpirationPluginOptions} config+ * @param {number} [config.maxEntries] The maximum number of entries to cache.+ * Entries used the least will be removed as the maximum is reached.+ * @param {number} [config.maxAgeSeconds] The maximum age of an entry before+ * it's treated as stale and removed.+ * @param {Object} [config.matchOptions] The [`CacheQueryOptions`](https://developer.mozilla.org/en-US/docs/Web/API/Cache/delete#Parameters)+ * that will be used when calling `delete()` on the cache.+ * @param {boolean} [config.purgeOnQuotaError] Whether to opt this cache in to+ * automatic deletion if the available storage quota has been exceeded.+ */+ constructor(config = {}) {+ /**+ * A "lifecycle" callback that will be triggered automatically by the+ * `workbox-strategies` handlers when a `Response` is about to be returned+ * from a [Cache](https://developer.mozilla.org/en-US/docs/Web/API/Cache) to+ * the handler. It allows the `Response` to be inspected for freshness and+ * prevents it from being used if the `Response`'s `Date` header value is+ * older than the configured `maxAgeSeconds`.+ *+ * @param {Object} options+ * @param {string} options.cacheName Name of the cache the response is in.+ * @param {Response} options.cachedResponse The `Response` object that's been+ * read from a cache and whose freshness should be checked.+ * @return {Response} Either the `cachedResponse`, if it's+ * fresh, or `null` if the `Response` is older than `maxAgeSeconds`.+ *+ * @private+ */+ this.cachedResponseWillBeUsed = async ({+ event,+ request,+ cacheName,+ cachedResponse+ }) => {+ if (!cachedResponse) {+ return null;+ }+ const isFresh = this._isResponseDateFresh(cachedResponse);+ // Expire entries to ensure that even if the expiration date has+ // expired, it'll only be used once.+ const cacheExpiration = this._getCacheExpiration(cacheName);+ dontWaitFor(cacheExpiration.expireEntries());+ // Update the metadata for the request URL to the current timestamp,+ // but don't `await` it as we don't want to block the response.+ const updateTimestampDone = cacheExpiration.updateTimestamp(request.url);+ if (event) {+ try {+ event.waitUntil(updateTimestampDone);+ } catch (error) {+ {+ // The event may not be a fetch event; only log the URL if it is.+ if ('request' in event) {+ logger.warn(`Unable to ensure service worker stays alive when ` + `updating cache entry for ` + `'${getFriendlyURL(event.request.url)}'.`);+ }+ }+ }+ }+ return isFresh ? cachedResponse : null;+ };+ /**+ * A "lifecycle" callback that will be triggered automatically by the+ * `workbox-strategies` handlers when an entry is added to a cache.+ *+ * @param {Object} options+ * @param {string} options.cacheName Name of the cache that was updated.+ * @param {string} options.request The Request for the cached entry.+ *+ * @private+ */+ this.cacheDidUpdate = async ({+ cacheName,+ request+ }) => {+ {+ finalAssertExports.isType(cacheName, 'string', {+ moduleName: 'workbox-expiration',+ className: 'Plugin',+ funcName: 'cacheDidUpdate',+ paramName: 'cacheName'+ });+ finalAssertExports.isInstance(request, Request, {+ moduleName: 'workbox-expiration',+ className: 'Plugin',+ funcName: 'cacheDidUpdate',+ paramName: 'request'+ });+ }+ const cacheExpiration = this._getCacheExpiration(cacheName);+ await cacheExpiration.updateTimestamp(request.url);+ await cacheExpiration.expireEntries();+ };+ {+ if (!(config.maxEntries || config.maxAgeSeconds)) {+ throw new WorkboxError('max-entries-or-age-required', {+ moduleName: 'workbox-expiration',+ className: 'Plugin',+ funcName: 'constructor'+ });+ }+ if (config.maxEntries) {+ finalAssertExports.isType(config.maxEntries, 'number', {+ moduleName: 'workbox-expiration',+ className: 'Plugin',+ funcName: 'constructor',+ paramName: 'config.maxEntries'+ });+ }+ if (config.maxAgeSeconds) {+ finalAssertExports.isType(config.maxAgeSeconds, 'number', {+ moduleName: 'workbox-expiration',+ className: 'Plugin',+ funcName: 'constructor',+ paramName: 'config.maxAgeSeconds'+ });+ }+ }+ this._config = config;+ this._maxAgeSeconds = config.maxAgeSeconds;+ this._cacheExpirations = new Map();+ if (config.purgeOnQuotaError) {+ registerQuotaErrorCallback(() => this.deleteCacheAndMetadata());+ }+ }+ /**+ * A simple helper method to return a CacheExpiration instance for a given+ * cache name.+ *+ * @param {string} cacheName+ * @return {CacheExpiration}+ *+ * @private+ */+ _getCacheExpiration(cacheName) {+ if (cacheName === cacheNames.getRuntimeName()) {+ throw new WorkboxError('expire-custom-caches-only');+ }+ let cacheExpiration = this._cacheExpirations.get(cacheName);+ if (!cacheExpiration) {+ cacheExpiration = new CacheExpiration(cacheName, this._config);+ this._cacheExpirations.set(cacheName, cacheExpiration);+ }+ return cacheExpiration;+ }+ /**+ * @param {Response} cachedResponse+ * @return {boolean}+ *+ * @private+ */+ _isResponseDateFresh(cachedResponse) {+ if (!this._maxAgeSeconds) {+ // We aren't expiring by age, so return true, it's fresh+ return true;+ }+ // Check if the 'date' header will suffice a quick expiration check.+ // See https://github.com/GoogleChromeLabs/sw-toolbox/issues/164 for+ // discussion.+ const dateHeaderTimestamp = this._getDateHeaderTimestamp(cachedResponse);+ if (dateHeaderTimestamp === null) {+ // Unable to parse date, so assume it's fresh.+ return true;+ }+ // If we have a valid headerTime, then our response is fresh iff the+ // headerTime plus maxAgeSeconds is greater than the current time.+ const now = Date.now();+ return dateHeaderTimestamp >= now - this._maxAgeSeconds * 1000;+ }+ /**+ * This method will extract the data header and parse it into a useful+ * value.+ *+ * @param {Response} cachedResponse+ * @return {number|null}+ *+ * @private+ */+ _getDateHeaderTimestamp(cachedResponse) {+ if (!cachedResponse.headers.has('date')) {+ return null;+ }+ const dateHeader = cachedResponse.headers.get('date');+ const parsedDate = new Date(dateHeader);+ const headerTime = parsedDate.getTime();+ // If the Date header was invalid for some reason, parsedDate.getTime()+ // will return NaN.+ if (isNaN(headerTime)) {+ return null;+ }+ return headerTime;+ }+ /**+ * This is a helper method that performs two operations:+ *+ * - Deletes *all* the underlying Cache instances associated with this plugin+ * instance, by calling caches.delete() on your behalf.+ * - Deletes the metadata from IndexedDB used to keep track of expiration+ * details for each Cache instance.+ *+ * When using cache expiration, calling this method is preferable to calling+ * `caches.delete()` directly, since this will ensure that the IndexedDB+ * metadata is also cleanly removed and open IndexedDB instances are deleted.+ *+ * Note that if you're *not* using cache expiration for a given cache, calling+ * `caches.delete()` and passing in the cache's name should be sufficient.+ * There is no Workbox-specific method needed for cleanup in that case.+ */+ async deleteCacheAndMetadata() {+ // Do this one at a time instead of all at once via `Promise.all()` to+ // reduce the chance of inconsistency if a promise rejects.+ for (const [cacheName, cacheExpiration] of this._cacheExpirations) {+ await self.caches.delete(cacheName);+ await cacheExpiration.delete();+ }+ // Reset this._cacheExpirations to its initial state.+ this._cacheExpirations = new Map();+ }+ }++ // @ts-ignore+ try {+ self['workbox:cacheable-response:7.4.0'] && _();+ } catch (e) {}++ /*+ Copyright 2018 Google LLC++ Use of this source code is governed by an MIT-style+ license that can be found in the LICENSE file or at+ https://opensource.org/licenses/MIT.+ */+ /**+ * This class allows you to set up rules determining what+ * status codes and/or headers need to be present in order for a+ * [`Response`](https://developer.mozilla.org/en-US/docs/Web/API/Response)+ * to be considered cacheable.+ *+ * @memberof workbox-cacheable-response+ */+ class CacheableResponse {+ /**+ * To construct a new CacheableResponse instance you must provide at least+ * one of the `config` properties.+ *+ * If both `statuses` and `headers` are specified, then both conditions must+ * be met for the `Response` to be considered cacheable.+ *+ * @param {Object} config+ * @param {Array<number>} [config.statuses] One or more status codes that a+ * `Response` can have and be considered cacheable.+ * @param {Object<string,string>} [config.headers] A mapping of header names+ * and expected values that a `Response` can have and be considered cacheable.+ * If multiple headers are provided, only one needs to be present.+ */+ constructor(config = {}) {+ {+ if (!(config.statuses || config.headers)) {+ throw new WorkboxError('statuses-or-headers-required', {+ moduleName: 'workbox-cacheable-response',+ className: 'CacheableResponse',+ funcName: 'constructor'+ });+ }+ if (config.statuses) {+ finalAssertExports.isArray(config.statuses, {+ moduleName: 'workbox-cacheable-response',+ className: 'CacheableResponse',+ funcName: 'constructor',+ paramName: 'config.statuses'+ });+ }+ if (config.headers) {+ finalAssertExports.isType(config.headers, 'object', {+ moduleName: 'workbox-cacheable-response',+ className: 'CacheableResponse',+ funcName: 'constructor',+ paramName: 'config.headers'+ });+ }+ }+ this._statuses = config.statuses;+ this._headers = config.headers;+ }+ /**+ * Checks a response to see whether it's cacheable or not, based on this+ * object's configuration.+ *+ * @param {Response} response The response whose cacheability is being+ * checked.+ * @return {boolean} `true` if the `Response` is cacheable, and `false`+ * otherwise.+ */+ isResponseCacheable(response) {+ {+ finalAssertExports.isInstance(response, Response, {+ moduleName: 'workbox-cacheable-response',+ className: 'CacheableResponse',+ funcName: 'isResponseCacheable',+ paramName: 'response'+ });+ }+ let cacheable = true;+ if (this._statuses) {+ cacheable = this._statuses.includes(response.status);+ }+ if (this._headers && cacheable) {+ cacheable = Object.keys(this._headers).some(headerName => {+ return response.headers.get(headerName) === this._headers[headerName];+ });+ }+ {+ if (!cacheable) {+ logger.groupCollapsed(`The request for ` + `'${getFriendlyURL(response.url)}' returned a response that does ` + `not meet the criteria for being cached.`);+ logger.groupCollapsed(`View cacheability criteria here.`);+ logger.log(`Cacheable statuses: ` + JSON.stringify(this._statuses));+ logger.log(`Cacheable headers: ` + JSON.stringify(this._headers, null, 2));+ logger.groupEnd();+ const logFriendlyHeaders = {};+ response.headers.forEach((value, key) => {+ logFriendlyHeaders[key] = value;+ });+ logger.groupCollapsed(`View response status and headers here.`);+ logger.log(`Response status: ${response.status}`);+ logger.log(`Response headers: ` + JSON.stringify(logFriendlyHeaders, null, 2));+ logger.groupEnd();+ logger.groupCollapsed(`View full response details here.`);+ logger.log(response.headers);+ logger.log(response);+ logger.groupEnd();+ logger.groupEnd();+ }+ }+ return cacheable;+ }+ }++ /*+ Copyright 2018 Google LLC++ Use of this source code is governed by an MIT-style+ license that can be found in the LICENSE file or at+ https://opensource.org/licenses/MIT.+ */+ /**+ * A class implementing the `cacheWillUpdate` lifecycle callback. This makes it+ * easier to add in cacheability checks to requests made via Workbox's built-in+ * strategies.+ *+ * @memberof workbox-cacheable-response+ */+ class CacheableResponsePlugin {+ /**+ * To construct a new CacheableResponsePlugin instance you must provide at+ * least one of the `config` properties.+ *+ * If both `statuses` and `headers` are specified, then both conditions must+ * be met for the `Response` to be considered cacheable.+ *+ * @param {Object} config+ * @param {Array<number>} [config.statuses] One or more status codes that a+ * `Response` can have and be considered cacheable.+ * @param {Object<string,string>} [config.headers] A mapping of header names+ * and expected values that a `Response` can have and be considered cacheable.+ * If multiple headers are provided, only one needs to be present.+ */+ constructor(config) {+ /**+ * @param {Object} options+ * @param {Response} options.response+ * @return {Response|null}+ * @private+ */+ this.cacheWillUpdate = async ({+ response+ }) => {+ if (this._cacheableResponse.isResponseCacheable(response)) {+ return response;+ }+ return null;+ };+ this._cacheableResponse = new CacheableResponse(config);+ }+ }++ /*+ Copyright 2020 Google LLC+ Use of this source code is governed by an MIT-style+ license that can be found in the LICENSE file or at+ https://opensource.org/licenses/MIT.+ */+ function stripParams(fullURL, ignoreParams) {+ const strippedURL = new URL(fullURL);+ for (const param of ignoreParams) {+ strippedURL.searchParams.delete(param);+ }+ return strippedURL.href;+ }+ /**+ * Matches an item in the cache, ignoring specific URL params. This is similar+ * to the `ignoreSearch` option, but it allows you to ignore just specific+ * params (while continuing to match on the others).+ *+ * @private+ * @param {Cache} cache+ * @param {Request} request+ * @param {Object} matchOptions+ * @param {Array<string>} ignoreParams+ * @return {Promise<Response|undefined>}+ */+ async function cacheMatchIgnoreParams(cache, request, ignoreParams, matchOptions) {+ const strippedRequestURL = stripParams(request.url, ignoreParams);+ // If the request doesn't include any ignored params, match as normal.+ if (request.url === strippedRequestURL) {+ return cache.match(request, matchOptions);+ }+ // Otherwise, match by comparing keys+ const keysOptions = Object.assign(Object.assign({}, matchOptions), {+ ignoreSearch: true+ });+ const cacheKeys = await cache.keys(request, keysOptions);+ for (const cacheKey of cacheKeys) {+ const strippedCacheKeyURL = stripParams(cacheKey.url, ignoreParams);+ if (strippedRequestURL === strippedCacheKeyURL) {+ return cache.match(cacheKey, matchOptions);+ }+ }+ return;+ }++ /*+ Copyright 2018 Google LLC++ Use of this source code is governed by an MIT-style+ license that can be found in the LICENSE file or at+ https://opensource.org/licenses/MIT.+ */+ /**+ * The Deferred class composes Promises in a way that allows for them to be+ * resolved or rejected from outside the constructor. In most cases promises+ * should be used directly, but Deferreds can be necessary when the logic to+ * resolve a promise must be separate.+ *+ * @private+ */+ class Deferred {+ /**+ * Creates a promise and exposes its resolve and reject functions as methods.+ */+ constructor() {+ this.promise = new Promise((resolve, reject) => {+ this.resolve = resolve;+ this.reject = reject;+ });+ }+ }++ /*+ Copyright 2018 Google LLC++ Use of this source code is governed by an MIT-style+ license that can be found in the LICENSE file or at+ https://opensource.org/licenses/MIT.+ */+ /**+ * Runs all of the callback functions, one at a time sequentially, in the order+ * in which they were registered.+ *+ * @memberof workbox-core+ * @private+ */+ async function executeQuotaErrorCallbacks() {+ {+ logger.log(`About to run ${quotaErrorCallbacks.size} ` + `callbacks to clean up caches.`);+ }+ for (const callback of quotaErrorCallbacks) {+ await callback();+ {+ logger.log(callback, 'is complete.');+ }+ }+ {+ logger.log('Finished running callbacks.');+ }+ }++ /*+ Copyright 2019 Google LLC+ Use of this source code is governed by an MIT-style+ license that can be found in the LICENSE file or at+ https://opensource.org/licenses/MIT.+ */+ /**+ * Returns a promise that resolves and the passed number of milliseconds.+ * This utility is an async/await-friendly version of `setTimeout`.+ *+ * @param {number} ms+ * @return {Promise}+ * @private+ */+ function timeout(ms) {+ return new Promise(resolve => setTimeout(resolve, ms));+ }++ // @ts-ignore+ try {+ self['workbox:strategies:7.4.0'] && _();+ } catch (e) {}++ /*+ Copyright 2020 Google LLC++ Use of this source code is governed by an MIT-style+ license that can be found in the LICENSE file or at+ https://opensource.org/licenses/MIT.+ */+ function toRequest(input) {+ return typeof input === 'string' ? new Request(input) : input;+ }+ /**+ * A class created every time a Strategy instance calls+ * {@link workbox-strategies.Strategy~handle} or+ * {@link workbox-strategies.Strategy~handleAll} that wraps all fetch and+ * cache actions around plugin callbacks and keeps track of when the strategy+ * is "done" (i.e. all added `event.waitUntil()` promises have resolved).+ *+ * @memberof workbox-strategies+ */+ class StrategyHandler {+ /**+ * Creates a new instance associated with the passed strategy and event+ * that's handling the request.+ *+ * The constructor also initializes the state that will be passed to each of+ * the plugins handling this request.+ *+ * @param {workbox-strategies.Strategy} strategy+ * @param {Object} options+ * @param {Request|string} options.request A request to run this strategy for.+ * @param {ExtendableEvent} options.event The event associated with the+ * request.+ * @param {URL} [options.url]+ * @param {*} [options.params] The return value from the+ * {@link workbox-routing~matchCallback} (if applicable).+ */+ constructor(strategy, options) {+ this._cacheKeys = {};+ /**+ * The request the strategy is performing (passed to the strategy's+ * `handle()` or `handleAll()` method).+ * @name request+ * @instance+ * @type {Request}+ * @memberof workbox-strategies.StrategyHandler+ */+ /**+ * The event associated with this request.+ * @name event+ * @instance+ * @type {ExtendableEvent}+ * @memberof workbox-strategies.StrategyHandler+ */+ /**+ * A `URL` instance of `request.url` (if passed to the strategy's+ * `handle()` or `handleAll()` method).+ * Note: the `url` param will be present if the strategy was invoked+ * from a workbox `Route` object.+ * @name url+ * @instance+ * @type {URL|undefined}+ * @memberof workbox-strategies.StrategyHandler+ */+ /**+ * A `param` value (if passed to the strategy's+ * `handle()` or `handleAll()` method).+ * Note: the `param` param will be present if the strategy was invoked+ * from a workbox `Route` object and the+ * {@link workbox-routing~matchCallback} returned+ * a truthy value (it will be that value).+ * @name params+ * @instance+ * @type {*|undefined}+ * @memberof workbox-strategies.StrategyHandler+ */+ {+ finalAssertExports.isInstance(options.event, ExtendableEvent, {+ moduleName: 'workbox-strategies',+ className: 'StrategyHandler',+ funcName: 'constructor',+ paramName: 'options.event'+ });+ }+ Object.assign(this, options);+ this.event = options.event;+ this._strategy = strategy;+ this._handlerDeferred = new Deferred();+ this._extendLifetimePromises = [];+ // Copy the plugins list (since it's mutable on the strategy),+ // so any mutations don't affect this handler instance.+ this._plugins = [...strategy.plugins];+ this._pluginStateMap = new Map();+ for (const plugin of this._plugins) {+ this._pluginStateMap.set(plugin, {});+ }+ this.event.waitUntil(this._handlerDeferred.promise);+ }+ /**+ * Fetches a given request (and invokes any applicable plugin callback+ * methods) using the `fetchOptions` (for non-navigation requests) and+ * `plugins` defined on the `Strategy` object.+ *+ * The following plugin lifecycle methods are invoked when using this method:+ * - `requestWillFetch()`+ * - `fetchDidSucceed()`+ * - `fetchDidFail()`+ *+ * @param {Request|string} input The URL or request to fetch.+ * @return {Promise<Response>}+ */+ async fetch(input) {+ const {+ event+ } = this;+ let request = toRequest(input);+ if (request.mode === 'navigate' && event instanceof FetchEvent && event.preloadResponse) {+ const possiblePreloadResponse = await event.preloadResponse;+ if (possiblePreloadResponse) {+ {+ logger.log(`Using a preloaded navigation response for ` + `'${getFriendlyURL(request.url)}'`);+ }+ return possiblePreloadResponse;+ }+ }+ // If there is a fetchDidFail plugin, we need to save a clone of the+ // original request before it's either modified by a requestWillFetch+ // plugin or before the original request's body is consumed via fetch().+ const originalRequest = this.hasCallback('fetchDidFail') ? request.clone() : null;+ try {+ for (const cb of this.iterateCallbacks('requestWillFetch')) {+ request = await cb({+ request: request.clone(),+ event+ });+ }+ } catch (err) {+ if (err instanceof Error) {+ throw new WorkboxError('plugin-error-request-will-fetch', {+ thrownErrorMessage: err.message+ });+ }+ }+ // The request can be altered by plugins with `requestWillFetch` making+ // the original request (most likely from a `fetch` event) different+ // from the Request we make. Pass both to `fetchDidFail` to aid debugging.+ const pluginFilteredRequest = request.clone();+ try {+ let fetchResponse;+ // See https://github.com/GoogleChrome/workbox/issues/1796+ fetchResponse = await fetch(request, request.mode === 'navigate' ? undefined : this._strategy.fetchOptions);+ if ("development" !== 'production') {+ logger.debug(`Network request for ` + `'${getFriendlyURL(request.url)}' returned a response with ` + `status '${fetchResponse.status}'.`);+ }+ for (const callback of this.iterateCallbacks('fetchDidSucceed')) {+ fetchResponse = await callback({+ event,+ request: pluginFilteredRequest,+ response: fetchResponse+ });+ }+ return fetchResponse;+ } catch (error) {+ {+ logger.log(`Network request for ` + `'${getFriendlyURL(request.url)}' threw an error.`, error);+ }+ // `originalRequest` will only exist if a `fetchDidFail` callback+ // is being used (see above).+ if (originalRequest) {+ await this.runCallbacks('fetchDidFail', {+ error: error,+ event,+ originalRequest: originalRequest.clone(),+ request: pluginFilteredRequest.clone()+ });+ }+ throw error;+ }+ }+ /**+ * Calls `this.fetch()` and (in the background) runs `this.cachePut()` on+ * the response generated by `this.fetch()`.+ *+ * The call to `this.cachePut()` automatically invokes `this.waitUntil()`,+ * so you do not have to manually call `waitUntil()` on the event.+ *+ * @param {Request|string} input The request or URL to fetch and cache.+ * @return {Promise<Response>}+ */+ async fetchAndCachePut(input) {+ const response = await this.fetch(input);+ const responseClone = response.clone();+ void this.waitUntil(this.cachePut(input, responseClone));+ return response;+ }+ /**+ * Matches a request from the cache (and invokes any applicable plugin+ * callback methods) using the `cacheName`, `matchOptions`, and `plugins`+ * defined on the strategy object.+ *+ * The following plugin lifecycle methods are invoked when using this method:+ * - cacheKeyWillBeUsed()+ * - cachedResponseWillBeUsed()+ *+ * @param {Request|string} key The Request or URL to use as the cache key.+ * @return {Promise<Response|undefined>} A matching response, if found.+ */+ async cacheMatch(key) {+ const request = toRequest(key);+ let cachedResponse;+ const {+ cacheName,+ matchOptions+ } = this._strategy;+ const effectiveRequest = await this.getCacheKey(request, 'read');+ const multiMatchOptions = Object.assign(Object.assign({}, matchOptions), {+ cacheName+ });+ cachedResponse = await caches.match(effectiveRequest, multiMatchOptions);+ {+ if (cachedResponse) {+ logger.debug(`Found a cached response in '${cacheName}'.`);+ } else {+ logger.debug(`No cached response found in '${cacheName}'.`);+ }+ }+ for (const callback of this.iterateCallbacks('cachedResponseWillBeUsed')) {+ cachedResponse = (await callback({+ cacheName,+ matchOptions,+ cachedResponse,+ request: effectiveRequest,+ event: this.event+ })) || undefined;+ }+ return cachedResponse;+ }+ /**+ * Puts a request/response pair in the cache (and invokes any applicable+ * plugin callback methods) using the `cacheName` and `plugins` defined on+ * the strategy object.+ *+ * The following plugin lifecycle methods are invoked when using this method:+ * - cacheKeyWillBeUsed()+ * - cacheWillUpdate()+ * - cacheDidUpdate()+ *+ * @param {Request|string} key The request or URL to use as the cache key.+ * @param {Response} response The response to cache.+ * @return {Promise<boolean>} `false` if a cacheWillUpdate caused the response+ * not be cached, and `true` otherwise.+ */+ async cachePut(key, response) {+ const request = toRequest(key);+ // Run in the next task to avoid blocking other cache reads.+ // https://github.com/w3c/ServiceWorker/issues/1397+ await timeout(0);+ const effectiveRequest = await this.getCacheKey(request, 'write');+ {+ if (effectiveRequest.method && effectiveRequest.method !== 'GET') {+ throw new WorkboxError('attempt-to-cache-non-get-request', {+ url: getFriendlyURL(effectiveRequest.url),+ method: effectiveRequest.method+ });+ }+ // See https://github.com/GoogleChrome/workbox/issues/2818+ const vary = response.headers.get('Vary');+ if (vary) {+ logger.debug(`The response for ${getFriendlyURL(effectiveRequest.url)} ` + `has a 'Vary: ${vary}' header. ` + `Consider setting the {ignoreVary: true} option on your strategy ` + `to ensure cache matching and deletion works as expected.`);+ }+ }+ if (!response) {+ {+ logger.error(`Cannot cache non-existent response for ` + `'${getFriendlyURL(effectiveRequest.url)}'.`);+ }+ throw new WorkboxError('cache-put-with-no-response', {+ url: getFriendlyURL(effectiveRequest.url)+ });+ }+ const responseToCache = await this._ensureResponseSafeToCache(response);+ if (!responseToCache) {+ {+ logger.debug(`Response '${getFriendlyURL(effectiveRequest.url)}' ` + `will not be cached.`, responseToCache);+ }+ return false;+ }+ const {+ cacheName,+ matchOptions+ } = this._strategy;+ const cache = await self.caches.open(cacheName);+ const hasCacheUpdateCallback = this.hasCallback('cacheDidUpdate');+ const oldResponse = hasCacheUpdateCallback ? await cacheMatchIgnoreParams(+ // TODO(philipwalton): the `__WB_REVISION__` param is a precaching+ // feature. Consider into ways to only add this behavior if using+ // precaching.+ cache, effectiveRequest.clone(), ['__WB_REVISION__'], matchOptions) : null;+ {+ logger.debug(`Updating the '${cacheName}' cache with a new Response ` + `for ${getFriendlyURL(effectiveRequest.url)}.`);+ }+ try {+ await cache.put(effectiveRequest, hasCacheUpdateCallback ? responseToCache.clone() : responseToCache);+ } catch (error) {+ if (error instanceof Error) {+ // See https://developer.mozilla.org/en-US/docs/Web/API/DOMException#exception-QuotaExceededError+ if (error.name === 'QuotaExceededError') {+ await executeQuotaErrorCallbacks();+ }+ throw error;+ }+ }+ for (const callback of this.iterateCallbacks('cacheDidUpdate')) {+ await callback({+ cacheName,+ oldResponse,+ newResponse: responseToCache.clone(),+ request: effectiveRequest,+ event: this.event+ });+ }+ return true;+ }+ /**+ * Checks the list of plugins for the `cacheKeyWillBeUsed` callback, and+ * executes any of those callbacks found in sequence. The final `Request`+ * object returned by the last plugin is treated as the cache key for cache+ * reads and/or writes. If no `cacheKeyWillBeUsed` plugin callbacks have+ * been registered, the passed request is returned unmodified+ *+ * @param {Request} request+ * @param {string} mode+ * @return {Promise<Request>}+ */+ async getCacheKey(request, mode) {+ const key = `${request.url} | ${mode}`;+ if (!this._cacheKeys[key]) {+ let effectiveRequest = request;+ for (const callback of this.iterateCallbacks('cacheKeyWillBeUsed')) {+ effectiveRequest = toRequest(await callback({+ mode,+ request: effectiveRequest,+ event: this.event,+ // params has a type any can't change right now.+ params: this.params // eslint-disable-line+ }));+ }+ this._cacheKeys[key] = effectiveRequest;+ }+ return this._cacheKeys[key];+ }+ /**+ * Returns true if the strategy has at least one plugin with the given+ * callback.+ *+ * @param {string} name The name of the callback to check for.+ * @return {boolean}+ */+ hasCallback(name) {+ for (const plugin of this._strategy.plugins) {+ if (name in plugin) {+ return true;+ }+ }+ return false;+ }+ /**+ * Runs all plugin callbacks matching the given name, in order, passing the+ * given param object (merged ith the current plugin state) as the only+ * argument.+ *+ * Note: since this method runs all plugins, it's not suitable for cases+ * where the return value of a callback needs to be applied prior to calling+ * the next callback. See+ * {@link workbox-strategies.StrategyHandler#iterateCallbacks}+ * below for how to handle that case.+ *+ * @param {string} name The name of the callback to run within each plugin.+ * @param {Object} param The object to pass as the first (and only) param+ * when executing each callback. This object will be merged with the+ * current plugin state prior to callback execution.+ */+ async runCallbacks(name, param) {+ for (const callback of this.iterateCallbacks(name)) {+ // TODO(philipwalton): not sure why `any` is needed. It seems like+ // this should work with `as WorkboxPluginCallbackParam[C]`.+ await callback(param);+ }+ }+ /**+ * Accepts a callback and returns an iterable of matching plugin callbacks,+ * where each callback is wrapped with the current handler state (i.e. when+ * you call each callback, whatever object parameter you pass it will+ * be merged with the plugin's current state).+ *+ * @param {string} name The name fo the callback to run+ * @return {Array<Function>}+ */+ *iterateCallbacks(name) {+ for (const plugin of this._strategy.plugins) {+ if (typeof plugin[name] === 'function') {+ const state = this._pluginStateMap.get(plugin);+ const statefulCallback = param => {+ const statefulParam = Object.assign(Object.assign({}, param), {+ state+ });+ // TODO(philipwalton): not sure why `any` is needed. It seems like+ // this should work with `as WorkboxPluginCallbackParam[C]`.+ return plugin[name](statefulParam);+ };+ yield statefulCallback;+ }+ }+ }+ /**+ * Adds a promise to the+ * [extend lifetime promises]{@link https://w3c.github.io/ServiceWorker/#extendableevent-extend-lifetime-promises}+ * of the event associated with the request being handled (usually a+ * `FetchEvent`).+ *+ * Note: you can await+ * {@link workbox-strategies.StrategyHandler~doneWaiting}+ * to know when all added promises have settled.+ *+ * @param {Promise} promise A promise to add to the extend lifetime promises+ * of the event that triggered the request.+ */+ waitUntil(promise) {+ this._extendLifetimePromises.push(promise);+ return promise;+ }+ /**+ * Returns a promise that resolves once all promises passed to+ * {@link workbox-strategies.StrategyHandler~waitUntil}+ * have settled.+ *+ * Note: any work done after `doneWaiting()` settles should be manually+ * passed to an event's `waitUntil()` method (not this handler's+ * `waitUntil()` method), otherwise the service worker thread may be killed+ * prior to your work completing.+ */+ async doneWaiting() {+ while (this._extendLifetimePromises.length) {+ const promises = this._extendLifetimePromises.splice(0);+ const result = await Promise.allSettled(promises);+ const firstRejection = result.find(i => i.status === 'rejected');+ if (firstRejection) {+ throw firstRejection.reason;+ }+ }+ }+ /**+ * Stops running the strategy and immediately resolves any pending+ * `waitUntil()` promises.+ */+ destroy() {+ this._handlerDeferred.resolve(null);+ }+ /**+ * This method will call cacheWillUpdate on the available plugins (or use+ * status === 200) to determine if the Response is safe and valid to cache.+ *+ * @param {Request} options.request+ * @param {Response} options.response+ * @return {Promise<Response|undefined>}+ *+ * @private+ */+ async _ensureResponseSafeToCache(response) {+ let responseToCache = response;+ let pluginsUsed = false;+ for (const callback of this.iterateCallbacks('cacheWillUpdate')) {+ responseToCache = (await callback({+ request: this.request,+ response: responseToCache,+ event: this.event+ })) || undefined;+ pluginsUsed = true;+ if (!responseToCache) {+ break;+ }+ }+ if (!pluginsUsed) {+ if (responseToCache && responseToCache.status !== 200) {+ responseToCache = undefined;+ }+ {+ if (responseToCache) {+ if (responseToCache.status !== 200) {+ if (responseToCache.status === 0) {+ logger.warn(`The response for '${this.request.url}' ` + `is an opaque response. The caching strategy that you're ` + `using will not cache opaque responses by default.`);+ } else {+ logger.debug(`The response for '${this.request.url}' ` + `returned a status code of '${response.status}' and won't ` + `be cached as a result.`);+ }+ }+ }+ }+ }+ return responseToCache;+ }+ }++ /*+ Copyright 2020 Google LLC++ Use of this source code is governed by an MIT-style+ license that can be found in the LICENSE file or at+ https://opensource.org/licenses/MIT.+ */+ /**+ * An abstract base class that all other strategy classes must extend from:+ *+ * @memberof workbox-strategies+ */+ class Strategy {+ /**+ * Creates a new instance of the strategy and sets all documented option+ * properties as public instance properties.+ *+ * Note: if a custom strategy class extends the base Strategy class and does+ * not need more than these properties, it does not need to define its own+ * constructor.+ *+ * @param {Object} [options]+ * @param {string} [options.cacheName] Cache name to store and retrieve+ * requests. Defaults to the cache names provided by+ * {@link workbox-core.cacheNames}.+ * @param {Array<Object>} [options.plugins] [Plugins]{@link https://developers.google.com/web/tools/workbox/guides/using-plugins}+ * to use in conjunction with this caching strategy.+ * @param {Object} [options.fetchOptions] Values passed along to the+ * [`init`](https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/fetch#Parameters)+ * of [non-navigation](https://github.com/GoogleChrome/workbox/issues/1796)+ * `fetch()` requests made by this strategy.+ * @param {Object} [options.matchOptions] The+ * [`CacheQueryOptions`]{@link https://w3c.github.io/ServiceWorker/#dictdef-cachequeryoptions}+ * for any `cache.match()` or `cache.put()` calls made by this strategy.+ */+ constructor(options = {}) {+ /**+ * Cache name to store and retrieve+ * requests. Defaults to the cache names provided by+ * {@link workbox-core.cacheNames}.+ *+ * @type {string}+ */+ this.cacheName = cacheNames.getRuntimeName(options.cacheName);+ /**+ * The list+ * [Plugins]{@link https://developers.google.com/web/tools/workbox/guides/using-plugins}+ * used by this strategy.+ *+ * @type {Array<Object>}+ */+ this.plugins = options.plugins || [];+ /**+ * Values passed along to the+ * [`init`]{@link https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/fetch#Parameters}+ * of all fetch() requests made by this strategy.+ *+ * @type {Object}+ */+ this.fetchOptions = options.fetchOptions;+ /**+ * The+ * [`CacheQueryOptions`]{@link https://w3c.github.io/ServiceWorker/#dictdef-cachequeryoptions}+ * for any `cache.match()` or `cache.put()` calls made by this strategy.+ *+ * @type {Object}+ */+ this.matchOptions = options.matchOptions;+ }+ /**+ * Perform a request strategy and returns a `Promise` that will resolve with+ * a `Response`, invoking all relevant plugin callbacks.+ *+ * When a strategy instance is registered with a Workbox+ * {@link workbox-routing.Route}, this method is automatically+ * called when the route matches.+ *+ * Alternatively, this method can be used in a standalone `FetchEvent`+ * listener by passing it to `event.respondWith()`.+ *+ * @param {FetchEvent|Object} options A `FetchEvent` or an object with the+ * properties listed below.+ * @param {Request|string} options.request A request to run this strategy for.+ * @param {ExtendableEvent} options.event The event associated with the+ * request.+ * @param {URL} [options.url]+ * @param {*} [options.params]+ */+ handle(options) {+ const [responseDone] = this.handleAll(options);+ return responseDone;+ }+ /**+ * Similar to {@link workbox-strategies.Strategy~handle}, but+ * instead of just returning a `Promise` that resolves to a `Response` it+ * it will return an tuple of `[response, done]` promises, where the former+ * (`response`) is equivalent to what `handle()` returns, and the latter is a+ * Promise that will resolve once any promises that were added to+ * `event.waitUntil()` as part of performing the strategy have completed.+ *+ * You can await the `done` promise to ensure any extra work performed by+ * the strategy (usually caching responses) completes successfully.+ *+ * @param {FetchEvent|Object} options A `FetchEvent` or an object with the+ * properties listed below.+ * @param {Request|string} options.request A request to run this strategy for.+ * @param {ExtendableEvent} options.event The event associated with the+ * request.+ * @param {URL} [options.url]+ * @param {*} [options.params]+ * @return {Array<Promise>} A tuple of [response, done]+ * promises that can be used to determine when the response resolves as+ * well as when the handler has completed all its work.+ */+ handleAll(options) {+ // Allow for flexible options to be passed.+ if (options instanceof FetchEvent) {+ options = {+ event: options,+ request: options.request+ };+ }+ const event = options.event;+ const request = typeof options.request === 'string' ? new Request(options.request) : options.request;+ const params = 'params' in options ? options.params : undefined;+ const handler = new StrategyHandler(this, {+ event,+ request,+ params+ });+ const responseDone = this._getResponse(handler, request, event);+ const handlerDone = this._awaitComplete(responseDone, handler, request, event);+ // Return an array of promises, suitable for use with Promise.all().+ return [responseDone, handlerDone];+ }+ async _getResponse(handler, request, event) {+ await handler.runCallbacks('handlerWillStart', {+ event,+ request+ });+ let response = undefined;+ try {+ response = await this._handle(request, handler);+ // The "official" Strategy subclasses all throw this error automatically,+ // but in case a third-party Strategy doesn't, ensure that we have a+ // consistent failure when there's no response or an error response.+ if (!response || response.type === 'error') {+ throw new WorkboxError('no-response', {+ url: request.url+ });+ }+ } catch (error) {+ if (error instanceof Error) {+ for (const callback of handler.iterateCallbacks('handlerDidError')) {+ response = await callback({+ error,+ event,+ request+ });+ if (response) {+ break;+ }+ }+ }+ if (!response) {+ throw error;+ } else {+ logger.log(`While responding to '${getFriendlyURL(request.url)}', ` + `an ${error instanceof Error ? error.toString() : ''} error occurred. Using a fallback response provided by ` + `a handlerDidError plugin.`);+ }+ }+ for (const callback of handler.iterateCallbacks('handlerWillRespond')) {+ response = await callback({+ event,+ request,+ response+ });+ }+ return response;+ }+ async _awaitComplete(responseDone, handler, request, event) {+ let response;+ let error;+ try {+ response = await responseDone;+ } catch (error) {+ // Ignore errors, as response errors should be caught via the `response`+ // promise above. The `done` promise will only throw for errors in+ // promises passed to `handler.waitUntil()`.+ }+ try {+ await handler.runCallbacks('handlerDidRespond', {+ event,+ request,+ response+ });+ await handler.doneWaiting();+ } catch (waitUntilError) {+ if (waitUntilError instanceof Error) {+ error = waitUntilError;+ }+ }+ await handler.runCallbacks('handlerDidComplete', {+ event,+ request,+ response,+ error: error+ });+ handler.destroy();+ if (error) {+ throw error;+ }+ }+ }+ /**+ * Classes extending the `Strategy` based class should implement this method,+ * and leverage the {@link workbox-strategies.StrategyHandler}+ * arg to perform all fetching and cache logic, which will ensure all relevant+ * cache, cache options, fetch options and plugins are used (per the current+ * strategy instance).+ *+ * @name _handle+ * @instance+ * @abstract+ * @function+ * @param {Request} request+ * @param {workbox-strategies.StrategyHandler} handler+ * @return {Promise<Response>}+ *+ * @memberof workbox-strategies.Strategy+ */++ /*+ Copyright 2018 Google LLC++ Use of this source code is governed by an MIT-style+ license that can be found in the LICENSE file or at+ https://opensource.org/licenses/MIT.+ */+ const messages = {+ strategyStart: (strategyName, request) => `Using ${strategyName} to respond to '${getFriendlyURL(request.url)}'`,+ printFinalResponse: response => {+ if (response) {+ logger.groupCollapsed(`View the final response here.`);+ logger.log(response || '[No response returned]');+ logger.groupEnd();+ }+ }+ };++ /*+ Copyright 2018 Google LLC++ Use of this source code is governed by an MIT-style+ license that can be found in the LICENSE file or at+ https://opensource.org/licenses/MIT.+ */+ /**+ * An implementation of a [cache-first](https://developer.chrome.com/docs/workbox/caching-strategies-overview/#cache-first-falling-back-to-network)+ * request strategy.+ *+ * A cache first strategy is useful for assets that have been revisioned,+ * such as URLs like `/styles/example.a8f5f1.css`, since they+ * can be cached for long periods of time.+ *+ * If the network request fails, and there is no cache match, this will throw+ * a `WorkboxError` exception.+ *+ * @extends workbox-strategies.Strategy+ * @memberof workbox-strategies+ */+ class CacheFirst extends Strategy {+ /**+ * @private+ * @param {Request|string} request A request to run this strategy for.+ * @param {workbox-strategies.StrategyHandler} handler The event that+ * triggered the request.+ * @return {Promise<Response>}+ */+ async _handle(request, handler) {+ const logs = [];+ {+ finalAssertExports.isInstance(request, Request, {+ moduleName: 'workbox-strategies',+ className: this.constructor.name,+ funcName: 'makeRequest',+ paramName: 'request'+ });+ }+ let response = await handler.cacheMatch(request);+ let error = undefined;+ if (!response) {+ {+ logs.push(`No response found in the '${this.cacheName}' cache. ` + `Will respond with a network request.`);+ }+ try {+ response = await handler.fetchAndCachePut(request);+ } catch (err) {+ if (err instanceof Error) {+ error = err;+ }+ }+ {+ if (response) {+ logs.push(`Got response from network.`);+ } else {+ logs.push(`Unable to get a response from the network.`);+ }+ }+ } else {+ {+ logs.push(`Found a cached response in the '${this.cacheName}' cache.`);+ }+ }+ {+ logger.groupCollapsed(messages.strategyStart(this.constructor.name, request));+ for (const log of logs) {+ logger.log(log);+ }+ messages.printFinalResponse(response);+ logger.groupEnd();+ }+ if (!response) {+ throw new WorkboxError('no-response', {+ url: request.url,+ error+ });+ }+ return response;+ }+ }++ /*+ Copyright 2019 Google LLC++ Use of this source code is governed by an MIT-style+ license that can be found in the LICENSE file or at+ https://opensource.org/licenses/MIT.+ */+ /**+ * Claim any currently available clients once the service worker+ * becomes active. This is normally used in conjunction with `skipWaiting()`.+ *+ * @memberof workbox-core+ */+ function clientsClaim() {+ self.addEventListener('activate', () => self.clients.claim());+ }++ /*+ Copyright 2020 Google LLC+ Use of this source code is governed by an MIT-style+ license that can be found in the LICENSE file or at+ https://opensource.org/licenses/MIT.+ */+ /**+ * A utility method that makes it easier to use `event.waitUntil` with+ * async functions and return the result.+ *+ * @param {ExtendableEvent} event+ * @param {Function} asyncFn+ * @return {Function}+ * @private+ */+ function waitUntil(event, asyncFn) {+ const returnPromise = asyncFn();+ event.waitUntil(returnPromise);+ return returnPromise;+ }++ // @ts-ignore+ try {+ self['workbox:precaching:7.4.0'] && _();+ } catch (e) {}++ /*+ Copyright 2018 Google LLC++ Use of this source code is governed by an MIT-style+ license that can be found in the LICENSE file or at+ https://opensource.org/licenses/MIT.+ */+ // Name of the search parameter used to store revision info.+ const REVISION_SEARCH_PARAM = '__WB_REVISION__';+ /**+ * Converts a manifest entry into a versioned URL suitable for precaching.+ *+ * @param {Object|string} entry+ * @return {string} A URL with versioning info.+ *+ * @private+ * @memberof workbox-precaching+ */+ function createCacheKey(entry) {+ if (!entry) {+ throw new WorkboxError('add-to-cache-list-unexpected-type', {+ entry+ });+ }+ // If a precache manifest entry is a string, it's assumed to be a versioned+ // URL, like '/app.abcd1234.js'. Return as-is.+ if (typeof entry === 'string') {+ const urlObject = new URL(entry, location.href);+ return {+ cacheKey: urlObject.href,+ url: urlObject.href+ };+ }+ const {+ revision,+ url+ } = entry;+ if (!url) {+ throw new WorkboxError('add-to-cache-list-unexpected-type', {+ entry+ });+ }+ // If there's just a URL and no revision, then it's also assumed to be a+ // versioned URL.+ if (!revision) {+ const urlObject = new URL(url, location.href);+ return {+ cacheKey: urlObject.href,+ url: urlObject.href+ };+ }+ // Otherwise, construct a properly versioned URL using the custom Workbox+ // search parameter along with the revision info.+ const cacheKeyURL = new URL(url, location.href);+ const originalURL = new URL(url, location.href);+ cacheKeyURL.searchParams.set(REVISION_SEARCH_PARAM, revision);+ return {+ cacheKey: cacheKeyURL.href,+ url: originalURL.href+ };+ }++ /*+ Copyright 2020 Google LLC++ Use of this source code is governed by an MIT-style+ license that can be found in the LICENSE file or at+ https://opensource.org/licenses/MIT.+ */+ /**+ * A plugin, designed to be used with PrecacheController, to determine the+ * of assets that were updated (or not updated) during the install event.+ *+ * @private+ */+ class PrecacheInstallReportPlugin {+ constructor() {+ this.updatedURLs = [];+ this.notUpdatedURLs = [];+ this.handlerWillStart = async ({+ request,+ state+ }) => {+ // TODO: `state` should never be undefined...+ if (state) {+ state.originalRequest = request;+ }+ };+ this.cachedResponseWillBeUsed = async ({+ event,+ state,+ cachedResponse+ }) => {+ if (event.type === 'install') {+ if (state && state.originalRequest && state.originalRequest instanceof Request) {+ // TODO: `state` should never be undefined...+ const url = state.originalRequest.url;+ if (cachedResponse) {+ this.notUpdatedURLs.push(url);+ } else {+ this.updatedURLs.push(url);+ }+ }+ }+ return cachedResponse;+ };+ }+ }++ /*+ Copyright 2020 Google LLC++ Use of this source code is governed by an MIT-style+ license that can be found in the LICENSE file or at+ https://opensource.org/licenses/MIT.+ */+ /**+ * A plugin, designed to be used with PrecacheController, to translate URLs into+ * the corresponding cache key, based on the current revision info.+ *+ * @private+ */+ class PrecacheCacheKeyPlugin {+ constructor({+ precacheController+ }) {+ this.cacheKeyWillBeUsed = async ({+ request,+ params+ }) => {+ // Params is type any, can't change right now.+ /* eslint-disable */+ const cacheKey = (params === null || params === void 0 ? void 0 : params.cacheKey) || this._precacheController.getCacheKeyForURL(request.url);+ /* eslint-enable */+ return cacheKey ? new Request(cacheKey, {+ headers: request.headers+ }) : request;+ };+ this._precacheController = precacheController;+ }+ }++ /*+ Copyright 2018 Google LLC++ Use of this source code is governed by an MIT-style+ license that can be found in the LICENSE file or at+ https://opensource.org/licenses/MIT.+ */+ /**+ * @param {string} groupTitle+ * @param {Array<string>} deletedURLs+ *+ * @private+ */+ const logGroup = (groupTitle, deletedURLs) => {+ logger.groupCollapsed(groupTitle);+ for (const url of deletedURLs) {+ logger.log(url);+ }+ logger.groupEnd();+ };+ /**+ * @param {Array<string>} deletedURLs+ *+ * @private+ * @memberof workbox-precaching+ */+ function printCleanupDetails(deletedURLs) {+ const deletionCount = deletedURLs.length;+ if (deletionCount > 0) {+ logger.groupCollapsed(`During precaching cleanup, ` + `${deletionCount} cached ` + `request${deletionCount === 1 ? ' was' : 's were'} deleted.`);+ logGroup('Deleted Cache Requests', deletedURLs);+ logger.groupEnd();+ }+ }++ /*+ Copyright 2018 Google LLC++ Use of this source code is governed by an MIT-style+ license that can be found in the LICENSE file or at+ https://opensource.org/licenses/MIT.+ */+ /**+ * @param {string} groupTitle+ * @param {Array<string>} urls+ *+ * @private+ */+ function _nestedGroup(groupTitle, urls) {+ if (urls.length === 0) {+ return;+ }+ logger.groupCollapsed(groupTitle);+ for (const url of urls) {+ logger.log(url);+ }+ logger.groupEnd();+ }+ /**+ * @param {Array<string>} urlsToPrecache+ * @param {Array<string>} urlsAlreadyPrecached+ *+ * @private+ * @memberof workbox-precaching+ */+ function printInstallDetails(urlsToPrecache, urlsAlreadyPrecached) {+ const precachedCount = urlsToPrecache.length;+ const alreadyPrecachedCount = urlsAlreadyPrecached.length;+ if (precachedCount || alreadyPrecachedCount) {+ let message = `Precaching ${precachedCount} file${precachedCount === 1 ? '' : 's'}.`;+ if (alreadyPrecachedCount > 0) {+ message += ` ${alreadyPrecachedCount} ` + `file${alreadyPrecachedCount === 1 ? ' is' : 's are'} already cached.`;+ }+ logger.groupCollapsed(message);+ _nestedGroup(`View newly precached URLs.`, urlsToPrecache);+ _nestedGroup(`View previously precached URLs.`, urlsAlreadyPrecached);+ logger.groupEnd();+ }+ }++ /*+ Copyright 2019 Google LLC++ Use of this source code is governed by an MIT-style+ license that can be found in the LICENSE file or at+ https://opensource.org/licenses/MIT.+ */+ let supportStatus;+ /**+ * A utility function that determines whether the current browser supports+ * constructing a new `Response` from a `response.body` stream.+ *+ * @return {boolean} `true`, if the current browser can successfully+ * construct a `Response` from a `response.body` stream, `false` otherwise.+ *+ * @private+ */+ function canConstructResponseFromBodyStream() {+ if (supportStatus === undefined) {+ const testResponse = new Response('');+ if ('body' in testResponse) {+ try {+ new Response(testResponse.body);+ supportStatus = true;+ } catch (error) {+ supportStatus = false;+ }+ }+ supportStatus = false;+ }+ return supportStatus;+ }++ /*+ Copyright 2019 Google LLC++ Use of this source code is governed by an MIT-style+ license that can be found in the LICENSE file or at+ https://opensource.org/licenses/MIT.+ */+ /**+ * Allows developers to copy a response and modify its `headers`, `status`,+ * or `statusText` values (the values settable via a+ * [`ResponseInit`]{@link https://developer.mozilla.org/en-US/docs/Web/API/Response/Response#Syntax}+ * object in the constructor).+ * To modify these values, pass a function as the second argument. That+ * function will be invoked with a single object with the response properties+ * `{headers, status, statusText}`. The return value of this function will+ * be used as the `ResponseInit` for the new `Response`. To change the values+ * either modify the passed parameter(s) and return it, or return a totally+ * new object.+ *+ * This method is intentionally limited to same-origin responses, regardless of+ * whether CORS was used or not.+ *+ * @param {Response} response+ * @param {Function} modifier+ * @memberof workbox-core+ */+ async function copyResponse(response, modifier) {+ let origin = null;+ // If response.url isn't set, assume it's cross-origin and keep origin null.+ if (response.url) {+ const responseURL = new URL(response.url);+ origin = responseURL.origin;+ }+ if (origin !== self.location.origin) {+ throw new WorkboxError('cross-origin-copy-response', {+ origin+ });+ }+ const clonedResponse = response.clone();+ // Create a fresh `ResponseInit` object by cloning the headers.+ const responseInit = {+ headers: new Headers(clonedResponse.headers),+ status: clonedResponse.status,+ statusText: clonedResponse.statusText+ };+ // Apply any user modifications.+ const modifiedResponseInit = responseInit;+ // Create the new response from the body stream and `ResponseInit`+ // modifications. Note: not all browsers support the Response.body stream,+ // so fall back to reading the entire body into memory as a blob.+ const body = canConstructResponseFromBodyStream() ? clonedResponse.body : await clonedResponse.blob();+ return new Response(body, modifiedResponseInit);+ }++ /*+ Copyright 2020 Google LLC++ Use of this source code is governed by an MIT-style+ license that can be found in the LICENSE file or at+ https://opensource.org/licenses/MIT.+ */+ /**+ * A {@link workbox-strategies.Strategy} implementation+ * specifically designed to work with+ * {@link workbox-precaching.PrecacheController}+ * to both cache and fetch precached assets.+ *+ * Note: an instance of this class is created automatically when creating a+ * `PrecacheController`; it's generally not necessary to create this yourself.+ *+ * @extends workbox-strategies.Strategy+ * @memberof workbox-precaching+ */+ class PrecacheStrategy extends Strategy {+ /**+ *+ * @param {Object} [options]+ * @param {string} [options.cacheName] Cache name to store and retrieve+ * requests. Defaults to the cache names provided by+ * {@link workbox-core.cacheNames}.+ * @param {Array<Object>} [options.plugins] {@link https://developers.google.com/web/tools/workbox/guides/using-plugins|Plugins}+ * to use in conjunction with this caching strategy.+ * @param {Object} [options.fetchOptions] Values passed along to the+ * {@link https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/fetch#Parameters|init}+ * of all fetch() requests made by this strategy.+ * @param {Object} [options.matchOptions] The+ * {@link https://w3c.github.io/ServiceWorker/#dictdef-cachequeryoptions|CacheQueryOptions}+ * for any `cache.match()` or `cache.put()` calls made by this strategy.+ * @param {boolean} [options.fallbackToNetwork=true] Whether to attempt to+ * get the response from the network if there's a precache miss.+ */+ constructor(options = {}) {+ options.cacheName = cacheNames.getPrecacheName(options.cacheName);+ super(options);+ this._fallbackToNetwork = options.fallbackToNetwork === false ? false : true;+ // Redirected responses cannot be used to satisfy a navigation request, so+ // any redirected response must be "copied" rather than cloned, so the new+ // response doesn't contain the `redirected` flag. See:+ // https://bugs.chromium.org/p/chromium/issues/detail?id=669363&desc=2#c1+ this.plugins.push(PrecacheStrategy.copyRedirectedCacheableResponsesPlugin);+ }+ /**+ * @private+ * @param {Request|string} request A request to run this strategy for.+ * @param {workbox-strategies.StrategyHandler} handler The event that+ * triggered the request.+ * @return {Promise<Response>}+ */+ async _handle(request, handler) {+ const response = await handler.cacheMatch(request);+ if (response) {+ return response;+ }+ // If this is an `install` event for an entry that isn't already cached,+ // then populate the cache.+ if (handler.event && handler.event.type === 'install') {+ return await this._handleInstall(request, handler);+ }+ // Getting here means something went wrong. An entry that should have been+ // precached wasn't found in the cache.+ return await this._handleFetch(request, handler);+ }+ async _handleFetch(request, handler) {+ let response;+ const params = handler.params || {};+ // Fall back to the network if we're configured to do so.+ if (this._fallbackToNetwork) {+ {+ logger.warn(`The precached response for ` + `${getFriendlyURL(request.url)} in ${this.cacheName} was not ` + `found. Falling back to the network.`);+ }+ const integrityInManifest = params.integrity;+ const integrityInRequest = request.integrity;+ const noIntegrityConflict = !integrityInRequest || integrityInRequest === integrityInManifest;+ // Do not add integrity if the original request is no-cors+ // See https://github.com/GoogleChrome/workbox/issues/3096+ response = await handler.fetch(new Request(request, {+ integrity: request.mode !== 'no-cors' ? integrityInRequest || integrityInManifest : undefined+ }));+ // It's only "safe" to repair the cache if we're using SRI to guarantee+ // that the response matches the precache manifest's expectations,+ // and there's either a) no integrity property in the incoming request+ // or b) there is an integrity, and it matches the precache manifest.+ // See https://github.com/GoogleChrome/workbox/issues/2858+ // Also if the original request users no-cors we don't use integrity.+ // See https://github.com/GoogleChrome/workbox/issues/3096+ if (integrityInManifest && noIntegrityConflict && request.mode !== 'no-cors') {+ this._useDefaultCacheabilityPluginIfNeeded();+ const wasCached = await handler.cachePut(request, response.clone());+ {+ if (wasCached) {+ logger.log(`A response for ${getFriendlyURL(request.url)} ` + `was used to "repair" the precache.`);+ }+ }+ }+ } else {+ // This shouldn't normally happen, but there are edge cases:+ // https://github.com/GoogleChrome/workbox/issues/1441+ throw new WorkboxError('missing-precache-entry', {+ cacheName: this.cacheName,+ url: request.url+ });+ }+ {+ const cacheKey = params.cacheKey || (await handler.getCacheKey(request, 'read'));+ // Workbox is going to handle the route.+ // print the routing details to the console.+ logger.groupCollapsed(`Precaching is responding to: ` + getFriendlyURL(request.url));+ logger.log(`Serving the precached url: ${getFriendlyURL(cacheKey instanceof Request ? cacheKey.url : cacheKey)}`);+ logger.groupCollapsed(`View request details here.`);+ logger.log(request);+ logger.groupEnd();+ logger.groupCollapsed(`View response details here.`);+ logger.log(response);+ logger.groupEnd();+ logger.groupEnd();+ }+ return response;+ }+ async _handleInstall(request, handler) {+ this._useDefaultCacheabilityPluginIfNeeded();+ const response = await handler.fetch(request);+ // Make sure we defer cachePut() until after we know the response+ // should be cached; see https://github.com/GoogleChrome/workbox/issues/2737+ const wasCached = await handler.cachePut(request, response.clone());+ if (!wasCached) {+ // Throwing here will lead to the `install` handler failing, which+ // we want to do if *any* of the responses aren't safe to cache.+ throw new WorkboxError('bad-precaching-response', {+ url: request.url,+ status: response.status+ });+ }+ return response;+ }+ /**+ * This method is complex, as there a number of things to account for:+ *+ * The `plugins` array can be set at construction, and/or it might be added to+ * to at any time before the strategy is used.+ *+ * At the time the strategy is used (i.e. during an `install` event), there+ * needs to be at least one plugin that implements `cacheWillUpdate` in the+ * array, other than `copyRedirectedCacheableResponsesPlugin`.+ *+ * - If this method is called and there are no suitable `cacheWillUpdate`+ * plugins, we need to add `defaultPrecacheCacheabilityPlugin`.+ *+ * - If this method is called and there is exactly one `cacheWillUpdate`, then+ * we don't have to do anything (this might be a previously added+ * `defaultPrecacheCacheabilityPlugin`, or it might be a custom plugin).+ *+ * - If this method is called and there is more than one `cacheWillUpdate`,+ * then we need to check if one is `defaultPrecacheCacheabilityPlugin`. If so,+ * we need to remove it. (This situation is unlikely, but it could happen if+ * the strategy is used multiple times, the first without a `cacheWillUpdate`,+ * and then later on after manually adding a custom `cacheWillUpdate`.)+ *+ * See https://github.com/GoogleChrome/workbox/issues/2737 for more context.+ *+ * @private+ */+ _useDefaultCacheabilityPluginIfNeeded() {+ let defaultPluginIndex = null;+ let cacheWillUpdatePluginCount = 0;+ for (const [index, plugin] of this.plugins.entries()) {+ // Ignore the copy redirected plugin when determining what to do.+ if (plugin === PrecacheStrategy.copyRedirectedCacheableResponsesPlugin) {+ continue;+ }+ // Save the default plugin's index, in case it needs to be removed.+ if (plugin === PrecacheStrategy.defaultPrecacheCacheabilityPlugin) {+ defaultPluginIndex = index;+ }+ if (plugin.cacheWillUpdate) {+ cacheWillUpdatePluginCount++;+ }+ }+ if (cacheWillUpdatePluginCount === 0) {+ this.plugins.push(PrecacheStrategy.defaultPrecacheCacheabilityPlugin);+ } else if (cacheWillUpdatePluginCount > 1 && defaultPluginIndex !== null) {+ // Only remove the default plugin; multiple custom plugins are allowed.+ this.plugins.splice(defaultPluginIndex, 1);+ }+ // Nothing needs to be done if cacheWillUpdatePluginCount is 1+ }+ }+ PrecacheStrategy.defaultPrecacheCacheabilityPlugin = {+ async cacheWillUpdate({+ response+ }) {+ if (!response || response.status >= 400) {+ return null;+ }+ return response;+ }+ };+ PrecacheStrategy.copyRedirectedCacheableResponsesPlugin = {+ async cacheWillUpdate({+ response+ }) {+ return response.redirected ? await copyResponse(response) : response;+ }+ };++ /*+ Copyright 2019 Google LLC++ Use of this source code is governed by an MIT-style+ license that can be found in the LICENSE file or at+ https://opensource.org/licenses/MIT.+ */+ /**+ * Performs efficient precaching of assets.+ *+ * @memberof workbox-precaching+ */+ class PrecacheController {+ /**+ * Create a new PrecacheController.+ *+ * @param {Object} [options]+ * @param {string} [options.cacheName] The cache to use for precaching.+ * @param {string} [options.plugins] Plugins to use when precaching as well+ * as responding to fetch events for precached assets.+ * @param {boolean} [options.fallbackToNetwork=true] Whether to attempt to+ * get the response from the network if there's a precache miss.+ */+ constructor({+ cacheName,+ plugins = [],+ fallbackToNetwork = true+ } = {}) {+ this._urlsToCacheKeys = new Map();+ this._urlsToCacheModes = new Map();+ this._cacheKeysToIntegrities = new Map();+ this._strategy = new PrecacheStrategy({+ cacheName: cacheNames.getPrecacheName(cacheName),+ plugins: [...plugins, new PrecacheCacheKeyPlugin({+ precacheController: this+ })],+ fallbackToNetwork+ });+ // Bind the install and activate methods to the instance.+ this.install = this.install.bind(this);+ this.activate = this.activate.bind(this);+ }+ /**+ * @type {workbox-precaching.PrecacheStrategy} The strategy created by this controller and+ * used to cache assets and respond to fetch events.+ */+ get strategy() {+ return this._strategy;+ }+ /**+ * Adds items to the precache list, removing any duplicates and+ * stores the files in the+ * {@link workbox-core.cacheNames|"precache cache"} when the service+ * worker installs.+ *+ * This method can be called multiple times.+ *+ * @param {Array<Object|string>} [entries=[]] Array of entries to precache.+ */+ precache(entries) {+ this.addToCacheList(entries);+ if (!this._installAndActiveListenersAdded) {+ self.addEventListener('install', this.install);+ self.addEventListener('activate', this.activate);+ this._installAndActiveListenersAdded = true;+ }+ }+ /**+ * This method will add items to the precache list, removing duplicates+ * and ensuring the information is valid.+ *+ * @param {Array<workbox-precaching.PrecacheController.PrecacheEntry|string>} entries+ * Array of entries to precache.+ */+ addToCacheList(entries) {+ {+ finalAssertExports.isArray(entries, {+ moduleName: 'workbox-precaching',+ className: 'PrecacheController',+ funcName: 'addToCacheList',+ paramName: 'entries'+ });+ }+ const urlsToWarnAbout = [];+ for (const entry of entries) {+ // See https://github.com/GoogleChrome/workbox/issues/2259+ if (typeof entry === 'string') {+ urlsToWarnAbout.push(entry);+ } else if (entry && entry.revision === undefined) {+ urlsToWarnAbout.push(entry.url);+ }+ const {+ cacheKey,+ url+ } = createCacheKey(entry);+ const cacheMode = typeof entry !== 'string' && entry.revision ? 'reload' : 'default';+ if (this._urlsToCacheKeys.has(url) && this._urlsToCacheKeys.get(url) !== cacheKey) {+ throw new WorkboxError('add-to-cache-list-conflicting-entries', {+ firstEntry: this._urlsToCacheKeys.get(url),+ secondEntry: cacheKey+ });+ }+ if (typeof entry !== 'string' && entry.integrity) {+ if (this._cacheKeysToIntegrities.has(cacheKey) && this._cacheKeysToIntegrities.get(cacheKey) !== entry.integrity) {+ throw new WorkboxError('add-to-cache-list-conflicting-integrities', {+ url+ });+ }+ this._cacheKeysToIntegrities.set(cacheKey, entry.integrity);+ }+ this._urlsToCacheKeys.set(url, cacheKey);+ this._urlsToCacheModes.set(url, cacheMode);+ if (urlsToWarnAbout.length > 0) {+ const warningMessage = `Workbox is precaching URLs without revision ` + `info: ${urlsToWarnAbout.join(', ')}\nThis is generally NOT safe. ` + `Learn more at https://bit.ly/wb-precache`;+ {+ logger.warn(warningMessage);+ }+ }+ }+ }+ /**+ * Precaches new and updated assets. Call this method from the service worker+ * install event.+ *+ * Note: this method calls `event.waitUntil()` for you, so you do not need+ * to call it yourself in your event handlers.+ *+ * @param {ExtendableEvent} event+ * @return {Promise<workbox-precaching.InstallResult>}+ */+ install(event) {+ // waitUntil returns Promise<any>+ // eslint-disable-next-line @typescript-eslint/no-unsafe-return+ return waitUntil(event, async () => {+ const installReportPlugin = new PrecacheInstallReportPlugin();+ this.strategy.plugins.push(installReportPlugin);+ // Cache entries one at a time.+ // See https://github.com/GoogleChrome/workbox/issues/2528+ for (const [url, cacheKey] of this._urlsToCacheKeys) {+ const integrity = this._cacheKeysToIntegrities.get(cacheKey);+ const cacheMode = this._urlsToCacheModes.get(url);+ const request = new Request(url, {+ integrity,+ cache: cacheMode,+ credentials: 'same-origin'+ });+ await Promise.all(this.strategy.handleAll({+ params: {+ cacheKey+ },+ request,+ event+ }));+ }+ const {+ updatedURLs,+ notUpdatedURLs+ } = installReportPlugin;+ {+ printInstallDetails(updatedURLs, notUpdatedURLs);+ }+ return {+ updatedURLs,+ notUpdatedURLs+ };+ });+ }+ /**+ * Deletes assets that are no longer present in the current precache manifest.+ * Call this method from the service worker activate event.+ *+ * Note: this method calls `event.waitUntil()` for you, so you do not need+ * to call it yourself in your event handlers.+ *+ * @param {ExtendableEvent} event+ * @return {Promise<workbox-precaching.CleanupResult>}+ */+ activate(event) {+ // waitUntil returns Promise<any>+ // eslint-disable-next-line @typescript-eslint/no-unsafe-return+ return waitUntil(event, async () => {+ const cache = await self.caches.open(this.strategy.cacheName);+ const currentlyCachedRequests = await cache.keys();+ const expectedCacheKeys = new Set(this._urlsToCacheKeys.values());+ const deletedURLs = [];+ for (const request of currentlyCachedRequests) {+ if (!expectedCacheKeys.has(request.url)) {+ await cache.delete(request);+ deletedURLs.push(request.url);+ }+ }+ {+ printCleanupDetails(deletedURLs);+ }+ return {+ deletedURLs+ };+ });+ }+ /**+ * Returns a mapping of a precached URL to the corresponding cache key, taking+ * into account the revision information for the URL.+ *+ * @return {Map<string, string>} A URL to cache key mapping.+ */+ getURLsToCacheKeys() {+ return this._urlsToCacheKeys;+ }+ /**+ * Returns a list of all the URLs that have been precached by the current+ * service worker.+ *+ * @return {Array<string>} The precached URLs.+ */+ getCachedURLs() {+ return [...this._urlsToCacheKeys.keys()];+ }+ /**+ * Returns the cache key used for storing a given URL. If that URL is+ * unversioned, like `/index.html', then the cache key will be the original+ * URL with a search parameter appended to it.+ *+ * @param {string} url A URL whose cache key you want to look up.+ * @return {string} The versioned URL that corresponds to a cache key+ * for the original URL, or undefined if that URL isn't precached.+ */+ getCacheKeyForURL(url) {+ const urlObject = new URL(url, location.href);+ return this._urlsToCacheKeys.get(urlObject.href);+ }+ /**+ * @param {string} url A cache key whose SRI you want to look up.+ * @return {string} The subresource integrity associated with the cache key,+ * or undefined if it's not set.+ */+ getIntegrityForCacheKey(cacheKey) {+ return this._cacheKeysToIntegrities.get(cacheKey);+ }+ /**+ * This acts as a drop-in replacement for+ * [`cache.match()`](https://developer.mozilla.org/en-US/docs/Web/API/Cache/match)+ * with the following differences:+ *+ * - It knows what the name of the precache is, and only checks in that cache.+ * - It allows you to pass in an "original" URL without versioning parameters,+ * and it will automatically look up the correct cache key for the currently+ * active revision of that URL.+ *+ * E.g., `matchPrecache('index.html')` will find the correct precached+ * response for the currently active service worker, even if the actual cache+ * key is `'/index.html?__WB_REVISION__=1234abcd'`.+ *+ * @param {string|Request} request The key (without revisioning parameters)+ * to look up in the precache.+ * @return {Promise<Response|undefined>}+ */+ async matchPrecache(request) {+ const url = request instanceof Request ? request.url : request;+ const cacheKey = this.getCacheKeyForURL(url);+ if (cacheKey) {+ const cache = await self.caches.open(this.strategy.cacheName);+ return cache.match(cacheKey);+ }+ return undefined;+ }+ /**+ * Returns a function that looks up `url` in the precache (taking into+ * account revision information), and returns the corresponding `Response`.+ *+ * @param {string} url The precached URL which will be used to lookup the+ * `Response`.+ * @return {workbox-routing~handlerCallback}+ */+ createHandlerBoundToURL(url) {+ const cacheKey = this.getCacheKeyForURL(url);+ if (!cacheKey) {+ throw new WorkboxError('non-precached-url', {+ url+ });+ }+ return options => {+ options.request = new Request(url);+ options.params = Object.assign({+ cacheKey+ }, options.params);+ return this.strategy.handle(options);+ };+ }+ }++ /*+ Copyright 2019 Google LLC++ Use of this source code is governed by an MIT-style+ license that can be found in the LICENSE file or at+ https://opensource.org/licenses/MIT.+ */+ let precacheController;+ /**+ * @return {PrecacheController}+ * @private+ */+ const getOrCreatePrecacheController = () => {+ if (!precacheController) {+ precacheController = new PrecacheController();+ }+ return precacheController;+ };++ /*+ Copyright 2018 Google LLC++ Use of this source code is governed by an MIT-style+ license that can be found in the LICENSE file or at+ https://opensource.org/licenses/MIT.+ */+ /**+ * Removes any URL search parameters that should be ignored.+ *+ * @param {URL} urlObject The original URL.+ * @param {Array<RegExp>} ignoreURLParametersMatching RegExps to test against+ * each search parameter name. Matches mean that the search parameter should be+ * ignored.+ * @return {URL} The URL with any ignored search parameters removed.+ *+ * @private+ * @memberof workbox-precaching+ */+ function removeIgnoredSearchParams(urlObject, ignoreURLParametersMatching = []) {+ // Convert the iterable into an array at the start of the loop to make sure+ // deletion doesn't mess up iteration.+ for (const paramName of [...urlObject.searchParams.keys()]) {+ if (ignoreURLParametersMatching.some(regExp => regExp.test(paramName))) {+ urlObject.searchParams.delete(paramName);+ }+ }+ return urlObject;+ }++ /*+ Copyright 2019 Google LLC++ Use of this source code is governed by an MIT-style+ license that can be found in the LICENSE file or at+ https://opensource.org/licenses/MIT.+ */+ /**+ * Generator function that yields possible variations on the original URL to+ * check, one at a time.+ *+ * @param {string} url+ * @param {Object} options+ *+ * @private+ * @memberof workbox-precaching+ */+ function* generateURLVariations(url, {+ ignoreURLParametersMatching = [/^utm_/, /^fbclid$/],+ directoryIndex = 'index.html',+ cleanURLs = true,+ urlManipulation+ } = {}) {+ const urlObject = new URL(url, location.href);+ urlObject.hash = '';+ yield urlObject.href;+ const urlWithoutIgnoredParams = removeIgnoredSearchParams(urlObject, ignoreURLParametersMatching);+ yield urlWithoutIgnoredParams.href;+ if (directoryIndex && urlWithoutIgnoredParams.pathname.endsWith('/')) {+ const directoryURL = new URL(urlWithoutIgnoredParams.href);+ directoryURL.pathname += directoryIndex;+ yield directoryURL.href;+ }+ if (cleanURLs) {+ const cleanURL = new URL(urlWithoutIgnoredParams.href);+ cleanURL.pathname += '.html';+ yield cleanURL.href;+ }+ if (urlManipulation) {+ const additionalURLs = urlManipulation({+ url: urlObject+ });+ for (const urlToAttempt of additionalURLs) {+ yield urlToAttempt.href;+ }+ }+ }++ /*+ Copyright 2020 Google LLC++ Use of this source code is governed by an MIT-style+ license that can be found in the LICENSE file or at+ https://opensource.org/licenses/MIT.+ */+ /**+ * A subclass of {@link workbox-routing.Route} that takes a+ * {@link workbox-precaching.PrecacheController}+ * instance and uses it to match incoming requests and handle fetching+ * responses from the precache.+ *+ * @memberof workbox-precaching+ * @extends workbox-routing.Route+ */+ class PrecacheRoute extends Route {+ /**+ * @param {PrecacheController} precacheController A `PrecacheController`+ * instance used to both match requests and respond to fetch events.+ * @param {Object} [options] Options to control how requests are matched+ * against the list of precached URLs.+ * @param {string} [options.directoryIndex=index.html] The `directoryIndex` will+ * check cache entries for a URLs ending with '/' to see if there is a hit when+ * appending the `directoryIndex` value.+ * @param {Array<RegExp>} [options.ignoreURLParametersMatching=[/^utm_/, /^fbclid$/]] An+ * array of regex's to remove search params when looking for a cache match.+ * @param {boolean} [options.cleanURLs=true] The `cleanURLs` option will+ * check the cache for the URL with a `.html` added to the end of the end.+ * @param {workbox-precaching~urlManipulation} [options.urlManipulation]+ * This is a function that should take a URL and return an array of+ * alternative URLs that should be checked for precache matches.+ */+ constructor(precacheController, options) {+ const match = ({+ request+ }) => {+ const urlsToCacheKeys = precacheController.getURLsToCacheKeys();+ for (const possibleURL of generateURLVariations(request.url, options)) {+ const cacheKey = urlsToCacheKeys.get(possibleURL);+ if (cacheKey) {+ const integrity = precacheController.getIntegrityForCacheKey(cacheKey);+ return {+ cacheKey,+ integrity+ };+ }+ }+ {+ logger.debug(`Precaching did not find a match for ` + getFriendlyURL(request.url));+ }+ return;+ };+ super(match, precacheController.strategy);+ }+ }++ /*+ Copyright 2019 Google LLC+ Use of this source code is governed by an MIT-style+ license that can be found in the LICENSE file or at+ https://opensource.org/licenses/MIT.+ */+ /**+ * Add a `fetch` listener to the service worker that will+ * respond to+ * [network requests]{@link https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API/Using_Service_Workers#Custom_responses_to_requests}+ * with precached assets.+ *+ * Requests for assets that aren't precached, the `FetchEvent` will not be+ * responded to, allowing the event to fall through to other `fetch` event+ * listeners.+ *+ * @param {Object} [options] See the {@link workbox-precaching.PrecacheRoute}+ * options.+ *+ * @memberof workbox-precaching+ */+ function addRoute(options) {+ const precacheController = getOrCreatePrecacheController();+ const precacheRoute = new PrecacheRoute(precacheController, options);+ registerRoute(precacheRoute);+ }++ /*+ Copyright 2019 Google LLC++ Use of this source code is governed by an MIT-style+ license that can be found in the LICENSE file or at+ https://opensource.org/licenses/MIT.+ */+ /**+ * Adds items to the precache list, removing any duplicates and+ * stores the files in the+ * {@link workbox-core.cacheNames|"precache cache"} when the service+ * worker installs.+ *+ * This method can be called multiple times.+ *+ * Please note: This method **will not** serve any of the cached files for you.+ * It only precaches files. To respond to a network request you call+ * {@link workbox-precaching.addRoute}.+ *+ * If you have a single array of files to precache, you can just call+ * {@link workbox-precaching.precacheAndRoute}.+ *+ * @param {Array<Object|string>} [entries=[]] Array of entries to precache.+ *+ * @memberof workbox-precaching+ */+ function precache(entries) {+ const precacheController = getOrCreatePrecacheController();+ precacheController.precache(entries);+ }++ /*+ Copyright 2019 Google LLC++ Use of this source code is governed by an MIT-style+ license that can be found in the LICENSE file or at+ https://opensource.org/licenses/MIT.+ */+ /**+ * This method will add entries to the precache list and add a route to+ * respond to fetch events.+ *+ * This is a convenience method that will call+ * {@link workbox-precaching.precache} and+ * {@link workbox-precaching.addRoute} in a single call.+ *+ * @param {Array<Object|string>} entries Array of entries to precache.+ * @param {Object} [options] See the+ * {@link workbox-precaching.PrecacheRoute} options.+ *+ * @memberof workbox-precaching+ */+ function precacheAndRoute(entries, options) {+ precache(entries);+ addRoute(options);+ }++ /*+ Copyright 2018 Google LLC++ Use of this source code is governed by an MIT-style+ license that can be found in the LICENSE file or at+ https://opensource.org/licenses/MIT.+ */+ const SUBSTRING_TO_FIND = '-precache-';+ /**+ * Cleans up incompatible precaches that were created by older versions of+ * Workbox, by a service worker registered under the current scope.+ *+ * This is meant to be called as part of the `activate` event.+ *+ * This should be safe to use as long as you don't include `substringToFind`+ * (defaulting to `-precache-`) in your non-precache cache names.+ *+ * @param {string} currentPrecacheName The cache name currently in use for+ * precaching. This cache won't be deleted.+ * @param {string} [substringToFind='-precache-'] Cache names which include this+ * substring will be deleted (excluding `currentPrecacheName`).+ * @return {Array<string>} A list of all the cache names that were deleted.+ *+ * @private+ * @memberof workbox-precaching+ */+ const deleteOutdatedCaches = async (currentPrecacheName, substringToFind = SUBSTRING_TO_FIND) => {+ const cacheNames = await self.caches.keys();+ const cacheNamesToDelete = cacheNames.filter(cacheName => {+ return cacheName.includes(substringToFind) && cacheName.includes(self.registration.scope) && cacheName !== currentPrecacheName;+ });+ await Promise.all(cacheNamesToDelete.map(cacheName => self.caches.delete(cacheName)));+ return cacheNamesToDelete;+ };++ /*+ Copyright 2019 Google LLC++ Use of this source code is governed by an MIT-style+ license that can be found in the LICENSE file or at+ https://opensource.org/licenses/MIT.+ */+ /**+ * Adds an `activate` event listener which will clean up incompatible+ * precaches that were created by older versions of Workbox.+ *+ * @memberof workbox-precaching+ */+ function cleanupOutdatedCaches() {+ // See https://github.com/Microsoft/TypeScript/issues/28357#issuecomment-436484705+ self.addEventListener('activate', event => {+ const cacheName = cacheNames.getPrecacheName();+ event.waitUntil(deleteOutdatedCaches(cacheName).then(cachesDeleted => {+ {+ if (cachesDeleted.length > 0) {+ logger.log(`The following out-of-date precaches were cleaned up ` + `automatically:`, cachesDeleted);+ }+ }+ }));+ });+ }++ /*+ Copyright 2018 Google LLC++ Use of this source code is governed by an MIT-style+ license that can be found in the LICENSE file or at+ https://opensource.org/licenses/MIT.+ */+ /**+ * NavigationRoute makes it easy to create a+ * {@link workbox-routing.Route} that matches for browser+ * [navigation requests]{@link https://developers.google.com/web/fundamentals/primers/service-workers/high-performance-loading#first_what_are_navigation_requests}.+ *+ * It will only match incoming Requests whose+ * {@link https://fetch.spec.whatwg.org/#concept-request-mode|mode}+ * is set to `navigate`.+ *+ * You can optionally only apply this route to a subset of navigation requests+ * by using one or both of the `denylist` and `allowlist` parameters.+ *+ * @memberof workbox-routing+ * @extends workbox-routing.Route+ */+ class NavigationRoute extends Route {+ /**+ * If both `denylist` and `allowlist` are provided, the `denylist` will+ * take precedence and the request will not match this route.+ *+ * The regular expressions in `allowlist` and `denylist`+ * are matched against the concatenated+ * [`pathname`]{@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLHyperlinkElementUtils/pathname}+ * and [`search`]{@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLHyperlinkElementUtils/search}+ * portions of the requested URL.+ *+ * *Note*: These RegExps may be evaluated against every destination URL during+ * a navigation. Avoid using+ * [complex RegExps](https://github.com/GoogleChrome/workbox/issues/3077),+ * or else your users may see delays when navigating your site.+ *+ * @param {workbox-routing~handlerCallback} handler A callback+ * function that returns a Promise resulting in a Response.+ * @param {Object} options+ * @param {Array<RegExp>} [options.denylist] If any of these patterns match,+ * the route will not handle the request (even if a allowlist RegExp matches).+ * @param {Array<RegExp>} [options.allowlist=[/./]] If any of these patterns+ * match the URL's pathname and search parameter, the route will handle the+ * request (assuming the denylist doesn't match).+ */+ constructor(handler, {+ allowlist = [/./],+ denylist = []+ } = {}) {+ {+ finalAssertExports.isArrayOfClass(allowlist, RegExp, {+ moduleName: 'workbox-routing',+ className: 'NavigationRoute',+ funcName: 'constructor',+ paramName: 'options.allowlist'+ });+ finalAssertExports.isArrayOfClass(denylist, RegExp, {+ moduleName: 'workbox-routing',+ className: 'NavigationRoute',+ funcName: 'constructor',+ paramName: 'options.denylist'+ });+ }+ super(options => this._match(options), handler);+ this._allowlist = allowlist;+ this._denylist = denylist;+ }+ /**+ * Routes match handler.+ *+ * @param {Object} options+ * @param {URL} options.url+ * @param {Request} options.request+ * @return {boolean}+ *+ * @private+ */+ _match({+ url,+ request+ }) {+ if (request && request.mode !== 'navigate') {+ return false;+ }+ const pathnameAndSearch = url.pathname + url.search;+ for (const regExp of this._denylist) {+ if (regExp.test(pathnameAndSearch)) {+ {+ logger.log(`The navigation route ${pathnameAndSearch} is not ` + `being used, since the URL matches this denylist pattern: ` + `${regExp.toString()}`);+ }+ return false;+ }+ }+ if (this._allowlist.some(regExp => regExp.test(pathnameAndSearch))) {+ {+ logger.debug(`The navigation route ${pathnameAndSearch} ` + `is being used.`);+ }+ return true;+ }+ {+ logger.log(`The navigation route ${pathnameAndSearch} is not ` + `being used, since the URL being navigated to doesn't ` + `match the allowlist.`);+ }+ return false;+ }+ }++ /*+ Copyright 2019 Google LLC++ Use of this source code is governed by an MIT-style+ license that can be found in the LICENSE file or at+ https://opensource.org/licenses/MIT.+ */+ /**+ * Helper function that calls+ * {@link PrecacheController#createHandlerBoundToURL} on the default+ * {@link PrecacheController} instance.+ *+ * If you are creating your own {@link PrecacheController}, then call the+ * {@link PrecacheController#createHandlerBoundToURL} on that instance,+ * instead of using this function.+ *+ * @param {string} url The precached URL which will be used to lookup the+ * `Response`.+ * @param {boolean} [fallbackToNetwork=true] Whether to attempt to get the+ * response from the network if there's a precache miss.+ * @return {workbox-routing~handlerCallback}+ *+ * @memberof workbox-precaching+ */+ function createHandlerBoundToURL(url) {+ const precacheController = getOrCreatePrecacheController();+ return precacheController.createHandlerBoundToURL(url);+ }++ exports.CacheFirst = CacheFirst;+ exports.CacheableResponsePlugin = CacheableResponsePlugin;+ exports.ExpirationPlugin = ExpirationPlugin;+ exports.NavigationRoute = NavigationRoute;+ exports.cleanupOutdatedCaches = cleanupOutdatedCaches;+ exports.clientsClaim = clientsClaim;+ exports.createHandlerBoundToURL = createHandlerBoundToURL;+ exports.precacheAndRoute = precacheAndRoute;+ exports.registerRoute = registerRoute;++}));diff --git a/dist/apple-touch-icon.png b/dist/apple-touch-icon.pngnew file mode 100644index 0000000..0a65ac0Binary files /dev/null and b/dist/apple-touch-icon.png differdiff --git a/dist/assets/index-C0kCKPlA.css b/dist/assets/index-C0kCKPlA.cssnew file mode 100644index 0000000..26d849e--- /dev/null+++ b/dist/assets/index-C0kCKPlA.css@@ -0,0 +1 @@+/*! tailwindcss v4.3.5 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:block))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial}}}@layer theme{:root,:host{--font-sans:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-orange-400:oklch(75% .183 55.934);--color-orange-500:oklch(70.5% .213 47.604);--color-amber-300:oklch(87.9% .169 91.605);--color-amber-400:oklch(82.8% .189 84.429);--color-amber-500:oklch(76.9% .188 70.08);--color-emerald-300:oklch(84.5% .143 164.978);--color-emerald-400:oklch(76.5% .177 163.223);--color-emerald-500:oklch(69.6% .17 162.48);--color-cyan-300:oklch(86.5% .127 207.078);--color-cyan-400:oklch(78.9% .154 211.53);--color-cyan-500:oklch(71.5% .143 215.221);--color-cyan-950:oklch(30.2% .056 229.695);--color-rose-300:oklch(81% .117 11.638);--color-rose-400:oklch(71.2% .194 13.428);--color-rose-500:oklch(64.5% .246 16.439);--color-slate-100:oklch(96.8% .007 247.896);--color-slate-200:oklch(92.9% .013 255.508);--color-slate-300:oklch(86.9% .022 252.894);--color-slate-400:oklch(70.4% .04 256.788);--color-slate-500:oklch(55.4% .046 257.417);--color-slate-600:oklch(44.6% .043 257.281);--color-slate-700:oklch(37.2% .044 257.287);--color-slate-800:oklch(27.9% .041 260.031);--color-slate-900:oklch(20.8% .042 265.755);--color-slate-950:oklch(12.9% .042 264.695);--color-white:#fff;--spacing:.25rem;--container-sm:24rem;--container-md:28rem;--container-lg:32rem;--container-xl:36rem;--container-2xl:42rem;--container-7xl:80rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height: 1.5 ;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--font-weight-extrabold:800;--font-weight-black:900;--tracking-tight:-.025em;--tracking-wide:.025em;--tracking-wider:.05em;--tracking-widest:.1em;--leading-relaxed:1.625;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--radius-2xl:1rem;--animate-spin:spin 1s linear infinite;--animate-ping:ping 1s cubic-bezier(0, 0, .2, 1) infinite;--animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--blur-md:12px;--aspect-video:16 / 9;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring:where(:not(iframe)){outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}body{color:#f8fafc;background-color:#020617;font-family:Plus Jakarta Sans,system-ui,-apple-system,sans-serif}}@layer components;@layer utilities{.pointer-events-none{pointer-events:none}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.inset-x-0{inset-inline:0}.-top-1{top:calc(var(--spacing) * -1)}.top-0{top:0}.top-3{top:calc(var(--spacing) * 3)}.-bottom-3{bottom:calc(var(--spacing) * -3)}.bottom-4{bottom:calc(var(--spacing) * 4)}.left-4{left:calc(var(--spacing) * 4)}.z-10{z-index:10}.z-20{z-index:20}.z-40{z-index:40}.z-50{z-index:50}.mx-auto{margin-inline:auto}.my-4{margin-block:calc(var(--spacing) * 4)}.mt-0\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:var(--spacing)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mr-1\.5{margin-right:calc(var(--spacing) * 1.5)}.mb-1{margin-bottom:var(--spacing)}.mb-1\.5{margin-bottom:calc(var(--spacing) * 1.5)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.ml-0\.5{margin-left:calc(var(--spacing) * .5)}.ml-1{margin-left:var(--spacing)}.line-clamp-1{-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.aspect-video{aspect-ratio:var(--aspect-video)}.h-1{height:var(--spacing)}.h-1\.5{height:calc(var(--spacing) * 1.5)}.h-2{height:calc(var(--spacing) * 2)}.h-3{height:calc(var(--spacing) * 3)}.h-3\.5{height:calc(var(--spacing) * 3.5)}.h-4{height:calc(var(--spacing) * 4)}.h-5{height:calc(var(--spacing) * 5)}.h-6{height:calc(var(--spacing) * 6)}.h-7{height:calc(var(--spacing) * 7)}.h-8{height:calc(var(--spacing) * 8)}.h-15{height:calc(var(--spacing) * 15)}.h-16{height:calc(var(--spacing) * 16)}.h-full{height:100%}.max-h-36{max-height:calc(var(--spacing) * 36)}.max-h-\[85vh\]{max-height:85vh}.min-h-screen{min-height:100vh}.w-1\.5{width:calc(var(--spacing) * 1.5)}.w-2{width:calc(var(--spacing) * 2)}.w-3{width:calc(var(--spacing) * 3)}.w-3\.5{width:calc(var(--spacing) * 3.5)}.w-4{width:calc(var(--spacing) * 4)}.w-5{width:calc(var(--spacing) * 5)}.w-6{width:calc(var(--spacing) * 6)}.w-7{width:calc(var(--spacing) * 7)}.w-8{width:calc(var(--spacing) * 8)}.w-12{width:calc(var(--spacing) * 12)}.w-16{width:calc(var(--spacing) * 16)}.w-full{width:100%}.max-w-2xl{max-width:var(--container-2xl)}.max-w-7xl{max-width:var(--container-7xl)}.max-w-\[90\%\]{max-width:90%}.max-w-\[100px\]{max-width:100px}.max-w-\[140px\]{max-width:140px}.max-w-\[180px\]{max-width:180px}.max-w-\[200px\]{max-width:200px}.max-w-lg{max-width:var(--container-lg)}.max-w-md{max-width:var(--container-md)}.max-w-sm{max-width:var(--container-sm)}.max-w-xl{max-width:var(--container-xl)}.min-w-\[170px\]{min-width:170px}.flex-1{flex:1}.shrink-0{flex-shrink:0}.scale-105{--tw-scale-x:105%;--tw-scale-y:105%;--tw-scale-z:105%;scale:var(--tw-scale-x) var(--tw-scale-y)}.scale-110{--tw-scale-x:110%;--tw-scale-y:110%;--tw-scale-z:110%;scale:var(--tw-scale-x) var(--tw-scale-y)}.transform{transform:var(--tw-rotate-x, ) var(--tw-rotate-y, ) var(--tw-rotate-z, ) var(--tw-skew-x, ) var(--tw-skew-y, )}.animate-ping{animation:var(--animate-ping)}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.cursor-crosshair{cursor:crosshair}.cursor-pointer{cursor:pointer}.touch-none{touch-action:none}.resize-none{resize:none}.scrollbar-none{scrollbar-width:none}.scrollbar-thin{scrollbar-width:thin}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-0\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:var(--spacing)}.gap-1\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-2\.5{gap:calc(var(--spacing) * 2.5)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)))}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-full{border-radius:2147483647px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-xl{border-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-amber-300{border-color:var(--color-amber-300)}.border-amber-400\/30{border-color:#fcbb004d}@supports (color:color-mix(in lab,red,red)){.border-amber-400\/30{border-color:color-mix(in oklab,var(--color-amber-400) 30%,transparent)}}.border-amber-400\/50{border-color:#fcbb0080}@supports (color:color-mix(in lab,red,red)){.border-amber-400\/50{border-color:color-mix(in oklab,var(--color-amber-400) 50%,transparent)}}.border-amber-400\/80{border-color:#fcbb00cc}@supports (color:color-mix(in lab,red,red)){.border-amber-400\/80{border-color:color-mix(in oklab,var(--color-amber-400) 80%,transparent)}}.border-amber-500\/30{border-color:#f99c004d}@supports (color:color-mix(in lab,red,red)){.border-amber-500\/30{border-color:color-mix(in oklab,var(--color-amber-500) 30%,transparent)}}.border-amber-500\/40{border-color:#f99c0066}@supports (color:color-mix(in lab,red,red)){.border-amber-500\/40{border-color:color-mix(in oklab,var(--color-amber-500) 40%,transparent)}}.border-cyan-400{border-color:var(--color-cyan-400)}.border-cyan-500\/40{border-color:#00b7d766}@supports (color:color-mix(in lab,red,red)){.border-cyan-500\/40{border-color:color-mix(in oklab,var(--color-cyan-500) 40%,transparent)}}.border-rose-500\/30{border-color:#ff23574d}@supports (color:color-mix(in lab,red,red)){.border-rose-500\/30{border-color:color-mix(in oklab,var(--color-rose-500) 30%,transparent)}}.border-slate-700{border-color:var(--color-slate-700)}.border-slate-700\/80{border-color:#314158cc}@supports (color:color-mix(in lab,red,red)){.border-slate-700\/80{border-color:color-mix(in oklab,var(--color-slate-700) 80%,transparent)}}.border-slate-800{border-color:var(--color-slate-800)}.border-slate-800\/60{border-color:#1d293d99}@supports (color:color-mix(in lab,red,red)){.border-slate-800\/60{border-color:color-mix(in oklab,var(--color-slate-800) 60%,transparent)}}.border-slate-800\/80{border-color:#1d293dcc}@supports (color:color-mix(in lab,red,red)){.border-slate-800\/80{border-color:color-mix(in oklab,var(--color-slate-800) 80%,transparent)}}.border-slate-900{border-color:var(--color-slate-900)}.border-white{border-color:var(--color-white)}.bg-amber-400{background-color:var(--color-amber-400)}.bg-amber-400\/15{background-color:#fcbb0026}@supports (color:color-mix(in lab,red,red)){.bg-amber-400\/15{background-color:color-mix(in oklab,var(--color-amber-400) 15%,transparent)}}.bg-amber-400\/20{background-color:#fcbb0033}@supports (color:color-mix(in lab,red,red)){.bg-amber-400\/20{background-color:color-mix(in oklab,var(--color-amber-400) 20%,transparent)}}.bg-amber-500{background-color:var(--color-amber-500)}.bg-amber-500\/10{background-color:#f99c001a}@supports (color:color-mix(in lab,red,red)){.bg-amber-500\/10{background-color:color-mix(in oklab,var(--color-amber-500) 10%,transparent)}}.bg-amber-500\/15{background-color:#f99c0026}@supports (color:color-mix(in lab,red,red)){.bg-amber-500\/15{background-color:color-mix(in oklab,var(--color-amber-500) 15%,transparent)}}.bg-amber-500\/20{background-color:#f99c0033}@supports (color:color-mix(in lab,red,red)){.bg-amber-500\/20{background-color:color-mix(in oklab,var(--color-amber-500) 20%,transparent)}}.bg-cyan-400{background-color:var(--color-cyan-400)}.bg-cyan-500{background-color:var(--color-cyan-500)}.bg-cyan-500\/15{background-color:#00b7d726}@supports (color:color-mix(in lab,red,red)){.bg-cyan-500\/15{background-color:color-mix(in oklab,var(--color-cyan-500) 15%,transparent)}}.bg-cyan-500\/20{background-color:#00b7d733}@supports (color:color-mix(in lab,red,red)){.bg-cyan-500\/20{background-color:color-mix(in oklab,var(--color-cyan-500) 20%,transparent)}}.bg-cyan-950\/60{background-color:#05334599}@supports (color:color-mix(in lab,red,red)){.bg-cyan-950\/60{background-color:color-mix(in oklab,var(--color-cyan-950) 60%,transparent)}}.bg-emerald-400{background-color:var(--color-emerald-400)}.bg-emerald-500{background-color:var(--color-emerald-500)}.bg-rose-500\/10{background-color:#ff23571a}@supports (color:color-mix(in lab,red,red)){.bg-rose-500\/10{background-color:color-mix(in oklab,var(--color-rose-500) 10%,transparent)}}.bg-slate-800{background-color:var(--color-slate-800)}.bg-slate-800\/90{background-color:#1d293de6}@supports (color:color-mix(in lab,red,red)){.bg-slate-800\/90{background-color:color-mix(in oklab,var(--color-slate-800) 90%,transparent)}}.bg-slate-900{background-color:var(--color-slate-900)}.bg-slate-900\/60{background-color:#0f172b99}@supports (color:color-mix(in lab,red,red)){.bg-slate-900\/60{background-color:color-mix(in oklab,var(--color-slate-900) 60%,transparent)}}.bg-slate-900\/90{background-color:#0f172be6}@supports (color:color-mix(in lab,red,red)){.bg-slate-900\/90{background-color:color-mix(in oklab,var(--color-slate-900) 90%,transparent)}}.bg-slate-900\/95{background-color:#0f172bf2}@supports (color:color-mix(in lab,red,red)){.bg-slate-900\/95{background-color:color-mix(in oklab,var(--color-slate-900) 95%,transparent)}}.bg-slate-950{background-color:var(--color-slate-950)}.bg-slate-950\/20{background-color:#02061833}@supports (color:color-mix(in lab,red,red)){.bg-slate-950\/20{background-color:color-mix(in oklab,var(--color-slate-950) 20%,transparent)}}.bg-slate-950\/60{background-color:#02061899}@supports (color:color-mix(in lab,red,red)){.bg-slate-950\/60{background-color:color-mix(in oklab,var(--color-slate-950) 60%,transparent)}}.bg-slate-950\/70{background-color:#020618b3}@supports (color:color-mix(in lab,red,red)){.bg-slate-950\/70{background-color:color-mix(in oklab,var(--color-slate-950) 70%,transparent)}}.bg-slate-950\/80{background-color:#020618cc}@supports (color:color-mix(in lab,red,red)){.bg-slate-950\/80{background-color:color-mix(in oklab,var(--color-slate-950) 80%,transparent)}}.bg-slate-950\/90{background-color:#020618e6}@supports (color:color-mix(in lab,red,red)){.bg-slate-950\/90{background-color:color-mix(in oklab,var(--color-slate-950) 90%,transparent)}}.bg-transparent{background-color:#0000}.bg-gradient-to-r{--tw-gradient-position:to right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.bg-gradient-to-tr{--tw-gradient-position:to top right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.from-amber-500{--tw-gradient-from:var(--color-amber-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.via-orange-500{--tw-gradient-via:var(--color-orange-500);--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.to-orange-500{--tw-gradient-to:var(--color-orange-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-rose-500{--tw-gradient-to:var(--color-rose-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.fill-slate-950{fill:var(--color-slate-950)}.stroke-\[3\]{stroke-width:3px}.object-contain{object-fit:contain}.p-1{padding:var(--spacing)}.p-1\.5{padding:calc(var(--spacing) * 1.5)}.p-2{padding:calc(var(--spacing) * 2)}.p-2\.5{padding:calc(var(--spacing) * 2.5)}.p-3{padding:calc(var(--spacing) * 3)}.p-3\.5{padding:calc(var(--spacing) * 3.5)}.p-4{padding:calc(var(--spacing) * 4)}.p-6{padding:calc(var(--spacing) * 6)}.px-1{padding-inline:var(--spacing)}.px-1\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:var(--spacing)}.py-1\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-4{padding-block:calc(var(--spacing) * 4)}.py-8{padding-block:calc(var(--spacing) * 8)}.pt-1{padding-top:var(--spacing)}.pt-2{padding-top:calc(var(--spacing) * 2)}.pt-3{padding-top:calc(var(--spacing) * 3)}.pt-4{padding-top:calc(var(--spacing) * 4)}.pr-1{padding-right:var(--spacing)}.pb-1{padding-bottom:var(--spacing)}.pb-2{padding-bottom:calc(var(--spacing) * 2)}.pb-3{padding-bottom:calc(var(--spacing) * 3)}.pb-4{padding-bottom:calc(var(--spacing) * 4)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.font-mono{font-family:var(--font-mono)}.font-sans{font-family:var(--font-sans)}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\[9px\]{font-size:9px}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.leading-none{--tw-leading:1;line-height:1}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.font-black{--tw-font-weight:var(--font-weight-black);font-weight:var(--font-weight-black)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-extrabold{--tw-font-weight:var(--font-weight-extrabold);font-weight:var(--font-weight-extrabold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.tracking-widest{--tw-tracking:var(--tracking-widest);letter-spacing:var(--tracking-widest)}.text-amber-300{color:var(--color-amber-300)}.text-amber-400{color:var(--color-amber-400)}.text-cyan-300{color:var(--color-cyan-300)}.text-cyan-400{color:var(--color-cyan-400)}.text-emerald-300{color:var(--color-emerald-300)}.text-emerald-400{color:var(--color-emerald-400)}.text-rose-300{color:var(--color-rose-300)}.text-rose-400{color:var(--color-rose-400)}.text-slate-100{color:var(--color-slate-100)}.text-slate-200{color:var(--color-slate-200)}.text-slate-300{color:var(--color-slate-300)}.text-slate-400{color:var(--color-slate-400)}.text-slate-500{color:var(--color-slate-500)}.text-slate-600{color:var(--color-slate-600)}.text-slate-950{color:var(--color-slate-950)}.text-white{color:var(--color-white)}.capitalize{text-transform:capitalize}.uppercase{text-transform:uppercase}.italic{font-style:italic}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal, ) var(--tw-slashed-zero, ) var(--tw-numeric-figure, ) var(--tw-numeric-spacing, ) var(--tw-numeric-fraction, )}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.accent-amber-400{accent-color:var(--color-amber-400)}.accent-cyan-400{accent-color:var(--color-cyan-400)}.opacity-60{opacity:.6}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_12px_rgba\(251\,191\,36\,0\.4\)\]{--tw-shadow:0 0 12px var(--tw-shadow-color,#fbbf2466);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_15px_rgba\(245\,158\,11\,0\.3\)\]{--tw-shadow:0 0 15px var(--tw-shadow-color,#f59e0b4d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_15px_rgba\(249\,115\,22\,0\.4\)\]{--tw-shadow:0 0 15px var(--tw-shadow-color,#f9731666);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_15px_rgba\(251\,191\,36\,0\.3\)\]{--tw-shadow:0 0 15px var(--tw-shadow-color,#fbbf244d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_15px_rgba\(251\,191\,36\,0\.15\)\]{--tw-shadow:0 0 15px var(--tw-shadow-color,#fbbf2426);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_16px_rgba\(251\,191\,36\,0\.9\)\]{--tw-shadow:0 0 16px var(--tw-shadow-color,#fbbf24e6);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_18px_rgba\(251\,191\,36\,0\.95\)\]{--tw-shadow:0 0 18px var(--tw-shadow-color,#fbbf24f2);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_30px_rgba\(245\,158\,11\,0\.5\)\]{--tw-shadow:0 0 30px var(--tw-shadow-color,#f59e0b80);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_4px_24px_rgba\(0\,0\,0\,0\.7\)\]{--tw-shadow:0 4px 24px var(--tw-shadow-color,#000000b3);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-1{--tw-ring-shadow:var(--tw-ring-inset, ) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-2{--tw-ring-shadow:var(--tw-ring-inset, ) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-amber-300{--tw-ring-color:var(--color-amber-300)}.ring-amber-400{--tw-ring-color:var(--color-amber-400)}.blur{--tw-blur:blur(8px);filter:var(--tw-blur, ) var(--tw-brightness, ) var(--tw-contrast, ) var(--tw-grayscale, ) var(--tw-hue-rotate, ) var(--tw-invert, ) var(--tw-saturate, ) var(--tw-sepia, ) var(--tw-drop-shadow, )}.filter{filter:var(--tw-blur, ) var(--tw-brightness, ) var(--tw-contrast, ) var(--tw-grayscale, ) var(--tw-hue-rotate, ) var(--tw-invert, ) var(--tw-saturate, ) var(--tw-sepia, ) var(--tw-drop-shadow, )}.backdrop-blur{--tw-backdrop-blur:blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur, ) var(--tw-backdrop-brightness, ) var(--tw-backdrop-contrast, ) var(--tw-backdrop-grayscale, ) var(--tw-backdrop-hue-rotate, ) var(--tw-backdrop-invert, ) var(--tw-backdrop-opacity, ) var(--tw-backdrop-saturate, ) var(--tw-backdrop-sepia, );backdrop-filter:var(--tw-backdrop-blur, ) var(--tw-backdrop-brightness, ) var(--tw-backdrop-contrast, ) var(--tw-backdrop-grayscale, ) var(--tw-backdrop-hue-rotate, ) var(--tw-backdrop-invert, ) var(--tw-backdrop-opacity, ) var(--tw-backdrop-saturate, ) var(--tw-backdrop-sepia, )}.backdrop-blur-md{--tw-backdrop-blur:blur(var(--blur-md));-webkit-backdrop-filter:var(--tw-backdrop-blur, ) var(--tw-backdrop-brightness, ) var(--tw-backdrop-contrast, ) var(--tw-backdrop-grayscale, ) var(--tw-backdrop-hue-rotate, ) var(--tw-backdrop-invert, ) var(--tw-backdrop-opacity, ) var(--tw-backdrop-saturate, ) var(--tw-backdrop-sepia, );backdrop-filter:var(--tw-backdrop-blur, ) var(--tw-backdrop-brightness, ) var(--tw-backdrop-contrast, ) var(--tw-backdrop-grayscale, ) var(--tw-backdrop-hue-rotate, ) var(--tw-backdrop-invert, ) var(--tw-backdrop-opacity, ) var(--tw-backdrop-saturate, ) var(--tw-backdrop-sepia, )}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}@media(hover:hover){:is(:where(.group):hover .group-hover\:scale-110){--tw-scale-x:110%;--tw-scale-y:110%;--tw-scale-z:110%;scale:var(--tw-scale-x) var(--tw-scale-y)}:is(:where(.group):hover .group-hover\:bg-amber-400\/10){background-color:#fcbb001a}@supports (color:color-mix(in lab,red,red)){:is(:where(.group):hover .group-hover\:bg-amber-400\/10){background-color:color-mix(in oklab,var(--color-amber-400) 10%,transparent)}}:is(:where(.group):hover .group-hover\:text-amber-400){color:var(--color-amber-400)}.hover\:scale-105:hover{--tw-scale-x:105%;--tw-scale-y:105%;--tw-scale-z:105%;scale:var(--tw-scale-x) var(--tw-scale-y)}.hover\:border-cyan-400:hover{border-color:var(--color-cyan-400)}.hover\:border-slate-700:hover{border-color:var(--color-slate-700)}.hover\:bg-amber-300:hover{background-color:var(--color-amber-300)}.hover\:bg-amber-400:hover{background-color:var(--color-amber-400)}.hover\:bg-amber-500\/25:hover{background-color:#f99c0040}@supports (color:color-mix(in lab,red,red)){.hover\:bg-amber-500\/25:hover{background-color:color-mix(in oklab,var(--color-amber-500) 25%,transparent)}}.hover\:bg-cyan-400:hover{background-color:var(--color-cyan-400)}.hover\:bg-cyan-500\/25:hover{background-color:#00b7d740}@supports (color:color-mix(in lab,red,red)){.hover\:bg-cyan-500\/25:hover{background-color:color-mix(in oklab,var(--color-cyan-500) 25%,transparent)}}.hover\:bg-emerald-400:hover{background-color:var(--color-emerald-400)}.hover\:bg-rose-500\/10:hover{background-color:#ff23571a}@supports (color:color-mix(in lab,red,red)){.hover\:bg-rose-500\/10:hover{background-color:color-mix(in oklab,var(--color-rose-500) 10%,transparent)}}.hover\:bg-slate-700:hover{background-color:var(--color-slate-700)}.hover\:bg-slate-800:hover{background-color:var(--color-slate-800)}.hover\:bg-slate-800\/60:hover{background-color:#1d293d99}@supports (color:color-mix(in lab,red,red)){.hover\:bg-slate-800\/60:hover{background-color:color-mix(in oklab,var(--color-slate-800) 60%,transparent)}}.hover\:bg-slate-950:hover{background-color:var(--color-slate-950)}.hover\:bg-slate-950\/30:hover{background-color:#0206184d}@supports (color:color-mix(in lab,red,red)){.hover\:bg-slate-950\/30:hover{background-color:color-mix(in oklab,var(--color-slate-950) 30%,transparent)}}.hover\:bg-slate-950\/90:hover{background-color:#020618e6}@supports (color:color-mix(in lab,red,red)){.hover\:bg-slate-950\/90:hover{background-color:color-mix(in oklab,var(--color-slate-950) 90%,transparent)}}.hover\:from-amber-400:hover{--tw-gradient-from:var(--color-amber-400);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.hover\:to-orange-400:hover{--tw-gradient-to:var(--color-orange-400);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.hover\:text-amber-300:hover{color:var(--color-amber-300)}.hover\:text-cyan-400:hover{color:var(--color-cyan-400)}.hover\:text-rose-400:hover{color:var(--color-rose-400)}.hover\:text-slate-300:hover{color:var(--color-slate-300)}.hover\:text-slate-400:hover{color:var(--color-slate-400)}.hover\:text-white:hover{color:var(--color-white)}.hover\:accent-amber-300:hover{accent-color:var(--color-amber-300)}}.focus\:border-amber-400:focus{border-color:var(--color-amber-400)}.focus\:border-amber-400\/80:focus{border-color:#fcbb00cc}@supports (color:color-mix(in lab,red,red)){.focus\:border-amber-400\/80:focus{border-color:color-mix(in oklab,var(--color-amber-400) 80%,transparent)}}.focus\:border-cyan-400:focus{border-color:var(--color-cyan-400)}.focus\:border-cyan-400\/80:focus{border-color:#00d2efcc}@supports (color:color-mix(in lab,red,red)){.focus\:border-cyan-400\/80:focus{border-color:color-mix(in oklab,var(--color-cyan-400) 80%,transparent)}}.active\:scale-95:active{--tw-scale-x:95%;--tw-scale-y:95%;--tw-scale-z:95%;scale:var(--tw-scale-x) var(--tw-scale-y)}.disabled\:opacity-30:disabled{opacity:.3}.disabled\:opacity-40:disabled{opacity:.4}.disabled\:opacity-50:disabled{opacity:.5}@media(min-width:40rem){.sm\:block{display:block}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:gap-2{gap:calc(var(--spacing) * 2)}.sm\:gap-3{gap:calc(var(--spacing) * 3)}.sm\:p-4{padding:calc(var(--spacing) * 4)}.sm\:px-5{padding-inline:calc(var(--spacing) * 5)}.sm\:text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}}@media(min-width:48rem){.md\:block{display:block}.md\:inline{display:inline}.md\:p-6{padding:calc(var(--spacing) * 6)}}@media(min-width:64rem){.lg\:col-span-3{grid-column:span 3/span 3}.lg\:col-span-6{grid-column:span 6/span 6}.lg\:grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}}}.scrollbar-thin::-webkit-scrollbar{width:6px;height:6px}.scrollbar-thin::-webkit-scrollbar-track{background:#0f172a99;border-radius:9999px}.scrollbar-thin::-webkit-scrollbar-thumb{background:#334155cc;border-radius:9999px}.scrollbar-thin::-webkit-scrollbar-thumb:hover{background:#64748b}@keyframes fadeIn{0%{opacity:0;transform:scale(.98)}to{opacity:1;transform:scale(1)}}.animate-fade-in{animation:.15s cubic-bezier(.16,1,.3,1) forwards fadeIn}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"<length-percentage>";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"<length-percentage>";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"<length-percentage>";inherits:false;initial-value:100%}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@keyframes spin{to{transform:rotate(360deg)}}@keyframes ping{75%,to{opacity:0;transform:scale(2)}}@keyframes pulse{50%{opacity:.5}}diff --git a/dist/assets/index-C1lOqGsA.js b/dist/assets/index-C1lOqGsA.jsnew file mode 100644index 0000000..44f4e3e--- /dev/null+++ b/dist/assets/index-C1lOqGsA.js@@ -0,0 +1,412 @@+var Tg=Object.defineProperty;var Ng=(p,d,r)=>d in p?Tg(p,d,{enumerable:!0,configurable:!0,writable:!0,value:r}):p[d]=r;var xe=(p,d,r)=>Ng(p,typeof d!="symbol"?d+"":d,r);(function(){const d=document.createElement("link").relList;if(d&&d.supports&&d.supports("modulepreload"))return;for(const u of document.querySelectorAll('link[rel="modulepreload"]'))s(u);new MutationObserver(u=>{for(const f of u)if(f.type==="childList")for(const c of f.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&s(c)}).observe(document,{childList:!0,subtree:!0});function r(u){const f={};return u.integrity&&(f.integrity=u.integrity),u.referrerPolicy&&(f.referrerPolicy=u.referrerPolicy),u.crossOrigin==="use-credentials"?f.credentials="include":u.crossOrigin==="anonymous"?f.credentials="omit":f.credentials="same-origin",f}function s(u){if(u.ep)return;u.ep=!0;const f=r(u);fetch(u.href,f)}})();var cs=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function bc(p){return p&&p.__esModule&&Object.prototype.hasOwnProperty.call(p,"default")?p.default:p}var ec={exports:{}},Oi={};/**+ * @license React+ * react-jsx-runtime.production.js+ *+ * Copyright (c) Meta Platforms, Inc. and affiliates.+ *+ * This source code is licensed under the MIT license found in the+ * LICENSE file in the root directory of this source tree.+ */var Q0;function Eg(){if(Q0)return Oi;Q0=1;var p=Symbol.for("react.transitional.element"),d=Symbol.for("react.fragment");function r(s,u,f){var c=null;if(f!==void 0&&(c=""+f),u.key!==void 0&&(c=""+u.key),"key"in u){f={};for(var o in u)o!=="key"&&(f[o]=u[o])}else f=u;return u=f.ref,{$$typeof:p,type:s,key:c,ref:u!==void 0?u:null,props:f}}return Oi.Fragment=d,Oi.jsx=r,Oi.jsxs=r,Oi}var K0;function zg(){return K0||(K0=1,ec.exports=Eg()),ec.exports}var E=zg(),ac={exports:{}},Rt={};/**+ * @license React+ * react.production.js+ *+ * Copyright (c) Meta Platforms, Inc. and affiliates.+ *+ * This source code is licensed under the MIT license found in the+ * LICENSE file in the root directory of this source tree.+ */var J0;function kg(){if(J0)return Rt;J0=1;var p=Symbol.for("react.transitional.element"),d=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),u=Symbol.for("react.profiler"),f=Symbol.for("react.consumer"),c=Symbol.for("react.context"),o=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),_=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),x=Symbol.for("react.activity"),m=Symbol.for("react.view_transition"),v=Symbol.iterator;function A(M){return M===null||typeof M!="object"?null:(M=v&&M[v]||M["@@iterator"],typeof M=="function"?M:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},N=Object.assign,T={};function k(M,K,xt){this.props=M,this.context=K,this.refs=T,this.updater=xt||S}k.prototype.isReactComponent={},k.prototype.setState=function(M,K){if(typeof M!="object"&&typeof M!="function"&&M!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,M,K,"setState")},k.prototype.forceUpdate=function(M){this.updater.enqueueForceUpdate(this,M,"forceUpdate")};function j(){}j.prototype=k.prototype;function U(M,K,xt){this.props=M,this.context=K,this.refs=T,this.updater=xt||S}var B=U.prototype=new j;B.constructor=U,N(B,k.prototype),B.isPureReactComponent=!0;var W=Array.isArray;function X(){}var Q={H:null,A:null,T:null,S:null},I=Object.prototype.hasOwnProperty;function ut(M,K,xt){var wt=xt.ref;return{$$typeof:p,type:M,key:K,ref:wt!==void 0?wt:null,props:xt}}function vt(M,K){return ut(M.type,K,M.props)}function R(M){return typeof M=="object"&&M!==null&&M.$$typeof===p}function P(M){var K={"=":"=0",":":"=2"};return"$"+M.replace(/[=:]/g,function(xt){return K[xt]})}var w=/\/+/g;function it(M,K){return typeof M=="object"&&M!==null&&M.key!=null?P(""+M.key):K.toString(36)}function G(M){switch(M.status){case"fulfilled":return M.value;case"rejected":throw M.reason;default:switch(typeof M.status=="string"?M.then(X,X):(M.status="pending",M.then(function(K){M.status==="pending"&&(M.status="fulfilled",M.value=K)},function(K){M.status==="pending"&&(M.status="rejected",M.reason=K)})),M.status){case"fulfilled":return M.value;case"rejected":throw M.reason}}throw M}function L(M,K,xt,wt,Nt){var ft=typeof M;(ft==="undefined"||ft==="boolean")&&(M=null);var St=!1;if(M===null)St=!0;else switch(ft){case"bigint":case"string":case"number":St=!0;break;case"object":switch(M.$$typeof){case p:case d:St=!0;break;case b:return St=M._init,L(St(M._payload),K,xt,wt,Nt)}}if(St)return Nt=Nt(M),St=wt===""?"."+it(M,0):wt,W(Nt)?(xt="",St!=null&&(xt=St.replace(w,"$&/")+"/"),L(Nt,K,xt,"",function(Ht){return Ht})):Nt!=null&&(R(Nt)&&(Nt=vt(Nt,xt+(Nt.key==null||M&&M.key===Nt.key?"":(""+Nt.key).replace(w,"$&/")+"/")+St)),K.push(Nt)),1;St=0;var pt=wt===""?".":wt+":";if(W(M))for(var _t=0;_t<M.length;_t++)wt=M[_t],ft=pt+it(wt,_t),St+=L(wt,K,xt,ft,Nt);else if(_t=A(M),typeof _t=="function")for(M=_t.call(M),_t=0;!(wt=M.next()).done;)wt=wt.value,ft=pt+it(wt,_t++),St+=L(wt,K,xt,ft,Nt);else if(ft==="object"){if(typeof M.then=="function")return L(G(M),K,xt,wt,Nt);throw K=String(M),Error("Objects are not valid as a React child (found: "+(K==="[object Object]"?"object with keys {"+Object.keys(M).join(", ")+"}":K)+"). If you meant to render a collection of children, use an array instead.")}return St}function rt(M,K,xt){if(M==null)return M;var wt=[],Nt=0;return L(M,wt,"","",function(ft){return K.call(xt,ft,Nt++)}),wt}function nt(M){if(M._status===-1){var K=M._result,xt=K();xt.then(function(wt){(M._status===0||M._status===-1)&&(M._status=1,M._result=wt,xt.status===void 0&&(xt.status="fulfilled",xt.value=wt))},function(wt){(M._status===0||M._status===-1)&&(M._status=2,M._result=wt,xt.status===void 0&&(xt.status="rejected",xt.reason=wt))}),M._status===-1&&(M._status=0,M._result=xt)}if(M._status===1)return M._result.default;throw M._result}var mt=typeof reportError=="function"?reportError:function(M){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var K=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof M=="object"&&M!==null&&typeof M.message=="string"?String(M.message):String(M),error:M});if(!window.dispatchEvent(K))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",M);return}console.error(M)};function $(M){var K=Q.T,xt={};xt.types=K!==null?K.types:null,Q.T=xt;try{var wt=M(),Nt=Q.S;Nt!==null&&Nt(xt,wt),typeof wt=="object"&&wt!==null&&typeof wt.then=="function"&&wt.then(X,mt)}catch(ft){mt(ft)}finally{K!==null&&xt.types!==null&&(K.types=xt.types),Q.T=K}}function et(M){var K=Q.T;if(K!==null){var xt=K.types;xt===null?K.types=[M]:xt.indexOf(M)===-1&&xt.push(M)}else $(et.bind(null,M))}var kt={map:rt,forEach:function(M,K,xt){rt(M,function(){K.apply(this,arguments)},xt)},count:function(M){var K=0;return rt(M,function(){K++}),K},toArray:function(M){return rt(M,function(K){return K})||[]},only:function(M){if(!R(M))throw Error("React.Children.only expected to receive a single React element child.");return M}};return Rt.Activity=x,Rt.Children=kt,Rt.Component=k,Rt.Fragment=r,Rt.Profiler=u,Rt.PureComponent=U,Rt.StrictMode=s,Rt.Suspense=g,Rt.ViewTransition=m,Rt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Q,Rt.__COMPILER_RUNTIME={__proto__:null,c:function(M){return Q.H.useMemoCache(M)}},Rt.addTransitionType=et,Rt.cache=function(M){return function(){return M.apply(null,arguments)}},Rt.cacheSignal=function(){return null},Rt.cloneElement=function(M,K,xt){if(M==null)throw Error("The argument must be a React element, but you passed "+M+".");var wt=N({},M.props),Nt=M.key;if(K!=null)for(ft in K.key!==void 0&&(Nt=""+K.key),K)!I.call(K,ft)||ft==="key"||ft==="__self"||ft==="__source"||ft==="ref"&&K.ref===void 0||(wt[ft]=K[ft]);var ft=arguments.length-2;if(ft===1)wt.children=xt;else if(1<ft){for(var St=Array(ft),pt=0;pt<ft;pt++)St[pt]=arguments[pt+2];wt.children=St}return ut(M.type,Nt,wt)},Rt.createContext=function(M){return M={$$typeof:c,_currentValue:M,_currentValue2:M,_threadCount:0,Provider:null,Consumer:null},M.Provider=M,M.Consumer={$$typeof:f,_context:M},M},Rt.createElement=function(M,K,xt){var wt,Nt={},ft=null;if(K!=null)for(wt in K.key!==void 0&&(ft=""+K.key),K)I.call(K,wt)&&wt!=="key"&&wt!=="__self"&&wt!=="__source"&&(Nt[wt]=K[wt]);var St=arguments.length-2;if(St===1)Nt.children=xt;else if(1<St){for(var pt=Array(St),_t=0;_t<St;_t++)pt[_t]=arguments[_t+2];Nt.children=pt}if(M&&M.defaultProps)for(wt in St=M.defaultProps,St)Nt[wt]===void 0&&(Nt[wt]=St[wt]);return ut(M,ft,Nt)},Rt.createRef=function(){return{current:null}},Rt.forwardRef=function(M){return{$$typeof:o,render:M}},Rt.isValidElement=R,Rt.lazy=function(M){return{$$typeof:b,_payload:{_status:-1,_result:M},_init:nt}},Rt.memo=function(M,K){return{$$typeof:_,type:M,compare:K===void 0?null:K}},Rt.startTransition=$,Rt.unstable_useCacheRefresh=function(){return Q.H.useCacheRefresh()},Rt.use=function(M){return Q.H.use(M)},Rt.useActionState=function(M,K,xt){return Q.H.useActionState(M,K,xt)},Rt.useCallback=function(M,K){return Q.H.useCallback(M,K)},Rt.useContext=function(M){return Q.H.useContext(M)},Rt.useDebugValue=function(){},Rt.useDeferredValue=function(M,K){return Q.H.useDeferredValue(M,K)},Rt.useEffect=function(M,K){return Q.H.useEffect(M,K)},Rt.useEffectEvent=function(M){return Q.H.useEffectEvent(M)},Rt.useId=function(){return Q.H.useId()},Rt.useImperativeHandle=function(M,K,xt){return Q.H.useImperativeHandle(M,K,xt)},Rt.useInsertionEffect=function(M,K){return Q.H.useInsertionEffect(M,K)},Rt.useLayoutEffect=function(M,K){return Q.H.useLayoutEffect(M,K)},Rt.useMemo=function(M,K){return Q.H.useMemo(M,K)},Rt.useOptimistic=function(M,K){return Q.H.useOptimistic(M,K)},Rt.useReducer=function(M,K,xt){return Q.H.useReducer(M,K,xt)},Rt.useRef=function(M){return Q.H.useRef(M)},Rt.useState=function(M){return Q.H.useState(M)},Rt.useSyncExternalStore=function(M,K,xt){return Q.H.useSyncExternalStore(M,K,xt)},Rt.useTransition=function(){return Q.H.useTransition()},Rt.version="19.3.1",Rt}var W0;function xc(){return W0||(W0=1,ac.exports=kg()),ac.exports}var Dt=xc();const Ag=bc(Dt);var nc={exports:{}},ji={},lc={exports:{}},ic={};/**+ * @license React+ * scheduler.production.js+ *+ * Copyright (c) Meta Platforms, Inc. and affiliates.+ *+ * This source code is licensed under the MIT license found in the+ * LICENSE file in the root directory of this source tree.+ */var I0;function Cg(){return I0||(I0=1,(function(p){function d(G,L){var rt=G.length;G.push(L);t:for(;0<rt;){var nt=rt-1>>>1,mt=G[nt];if(0<u(mt,L))G[nt]=L,G[rt]=mt,rt=nt;else break t}}function r(G){return G.length===0?null:G[0]}function s(G){if(G.length===0)return null;var L=G[0],rt=G.pop();if(rt!==L){G[0]=rt;t:for(var nt=0,mt=G.length,$=mt>>>1;nt<$;){var et=2*(nt+1)-1,kt=G[et],M=et+1,K=G[M];if(0>u(kt,rt))M<mt&&0>u(K,kt)?(G[nt]=K,G[M]=rt,nt=M):(G[nt]=kt,G[et]=rt,nt=et);else if(M<mt&&0>u(K,rt))G[nt]=K,G[M]=rt,nt=M;else break t}}return L}function u(G,L){var rt=G.sortIndex-L.sortIndex;return rt!==0?rt:G.id-L.id}if(p.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var f=performance;p.unstable_now=function(){return f.now()}}else{var c=Date,o=c.now();p.unstable_now=function(){return c.now()-o}}var g=[],_=[],b=1,x=null,m=3,v=!1,A=!1,S=!1,N=!1,T=typeof setTimeout=="function"?setTimeout:null,k=typeof clearTimeout=="function"?clearTimeout:null,j=typeof setImmediate<"u"?setImmediate:null;function U(G){for(var L=r(_);L!==null;){if(L.callback===null)s(_);else if(L.startTime<=G)s(_),L.sortIndex=L.expirationTime,d(g,L);else break;L=r(_)}}function B(G){if(S=!1,U(G),!A)if(r(g)!==null)A=!0,W||(W=!0,R());else{var L=r(_);L!==null&&it(B,L.startTime-G)}}var W=!1,X=-1,Q=5,I=-1;function ut(){return N?!0:!(p.unstable_now()-I<Q)}function vt(){if(N=!1,W){var G=p.unstable_now();I=G;var L=!0;try{t:{A=!1,S&&(S=!1,k(X),X=-1),v=!0;var rt=m;try{e:{for(U(G),x=r(g);x!==null&&!(x.expirationTime>G&&ut());){var nt=x.callback;if(typeof nt=="function"){x.callback=null,m=x.priorityLevel;var mt=nt(x.expirationTime<=G);if(G=p.unstable_now(),typeof mt=="function"){x.callback=mt,U(G),L=!0;break e}x===r(g)&&s(g),U(G)}else s(g);x=r(g)}if(x!==null)L=!0;else{var $=r(_);$!==null&&it(B,$.startTime-G),L=!1}}break t}finally{x=null,m=rt,v=!1}L=void 0}}finally{L?R():W=!1}}}var R;if(typeof j=="function")R=function(){j(vt)};else if(typeof MessageChannel<"u"){var P=new MessageChannel,w=P.port2;P.port1.onmessage=vt,R=function(){w.postMessage(null)}}else R=function(){T(vt,0)};function it(G,L){X=T(function(){G(p.unstable_now())},L)}p.unstable_IdlePriority=5,p.unstable_ImmediatePriority=1,p.unstable_LowPriority=4,p.unstable_NormalPriority=3,p.unstable_Profiling=null,p.unstable_UserBlockingPriority=2,p.unstable_cancelCallback=function(G){G.callback=null},p.unstable_forceFrameRate=function(G){0>G||125<G?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Q=0<G?Math.floor(1e3/G):5},p.unstable_getCurrentPriorityLevel=function(){return m},p.unstable_next=function(G){switch(m){case 1:case 2:case 3:var L=3;break;default:L=m}var rt=m;m=L;try{return G()}finally{m=rt}},p.unstable_requestPaint=function(){N=!0},p.unstable_runWithPriority=function(G,L){switch(G){case 1:case 2:case 3:case 4:case 5:break;default:G=3}var rt=m;m=G;try{return L()}finally{m=rt}},p.unstable_scheduleCallback=function(G,L,rt){var nt=p.unstable_now();switch(typeof rt=="object"&&rt!==null?(rt=rt.delay,rt=typeof rt=="number"&&0<rt?nt+rt:nt):rt=nt,G){case 1:var mt=-1;break;case 2:mt=250;break;case 5:mt=1073741823;break;case 4:mt=1e4;break;default:mt=5e3}return mt=rt+mt,G={id:b++,callback:L,priorityLevel:G,startTime:rt,expirationTime:mt,sortIndex:-1},rt>nt?(G.sortIndex=rt,d(_,G),r(g)===null&&G===r(_)&&(S?(k(X),X=-1):S=!0,it(B,rt-nt))):(G.sortIndex=mt,d(g,G),A||v||(A=!0,W||(W=!0,R()))),G},p.unstable_shouldYield=ut,p.unstable_wrapCallback=function(G){var L=m;return function(){var rt=m;m=L;try{return G.apply(this,arguments)}finally{m=rt}}}})(ic)),ic}var F0;function Mg(){return F0||(F0=1,lc.exports=Cg()),lc.exports}var rc={exports:{}},ze={};/**+ * @license React+ * react-dom.production.js+ *+ * Copyright (c) Meta Platforms, Inc. and affiliates.+ *+ * This source code is licensed under the MIT license found in the+ * LICENSE file in the root directory of this source tree.+ */var $0;function Og(){if($0)return ze;$0=1;var p=xc();function d(b){var x="https://react.dev/errors/"+b;if(1<arguments.length){x+="?args[]="+encodeURIComponent(arguments[1]);for(var m=2;m<arguments.length;m++)x+="&args[]="+encodeURIComponent(arguments[m])}return"Minified React error #"+b+"; visit "+x+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var s={d:{f:r,r:function(){throw Error(d(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},u=Symbol.for("react.portal"),f=Symbol.for("react.recoverable"),c=Symbol.for("react.optimistic_key");function o(b,x,m){var v=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:u,key:v==null?null:v===c?c:""+v,children:b,containerInfo:x,implementation:m}}var g=p.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function _(b,x){if(b==="font")return"";if(typeof x=="string")return x==="use-credentials"?x:""}return ze.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=s,ze.browser=function(b){return{$$typeof:f,_reason:b}},ze.createPortal=function(b,x){var m=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!x||x.nodeType!==1&&x.nodeType!==9&&x.nodeType!==11)throw Error(d(299));return o(b,x,null,m)},ze.flushSync=function(b){var x=g.T,m=s.p;try{if(g.T=null,s.p=2,b)return b()}finally{g.T=x,s.p=m,s.d.f()}},ze.preconnect=function(b,x){typeof b=="string"&&(x?(x=x.crossOrigin,x=typeof x=="string"?x==="use-credentials"?x:"":void 0):x=null,s.d.C(b,x))},ze.prefetchDNS=function(b){typeof b=="string"&&s.d.D(b)},ze.preinit=function(b,x){if(typeof b=="string"&&x&&typeof x.as=="string"){var m=x.as,v=_(m,x.crossOrigin),A=typeof x.integrity=="string"?x.integrity:void 0,S=typeof x.fetchPriority=="string"?x.fetchPriority:void 0;m==="style"?s.d.S(b,typeof x.precedence=="string"?x.precedence:void 0,{crossOrigin:v,integrity:A,fetchPriority:S}):m==="script"&&s.d.X(b,{crossOrigin:v,integrity:A,fetchPriority:S,nonce:typeof x.nonce=="string"?x.nonce:void 0})}},ze.preinitModule=function(b,x){if(typeof b=="string")if(typeof x=="object"&&x!==null){if(x.as==null||x.as==="script"){var m=_(x.as,x.crossOrigin);s.d.M(b,{crossOrigin:m,integrity:typeof x.integrity=="string"?x.integrity:void 0,nonce:typeof x.nonce=="string"?x.nonce:void 0,fetchPriority:typeof x.fetchPriority=="string"?x.fetchPriority:void 0})}}else x==null&&s.d.M(b)},ze.preload=function(b,x){if(typeof b=="string"&&typeof x=="object"&&x!==null&&typeof x.as=="string"){var m=x.as,v=_(m,x.crossOrigin);s.d.L(b,m,{crossOrigin:v,integrity:typeof x.integrity=="string"?x.integrity:void 0,nonce:typeof x.nonce=="string"?x.nonce:void 0,type:typeof x.type=="string"?x.type:void 0,fetchPriority:typeof x.fetchPriority=="string"?x.fetchPriority:void 0,referrerPolicy:typeof x.referrerPolicy=="string"?x.referrerPolicy:void 0,imageSrcSet:typeof x.imageSrcSet=="string"?x.imageSrcSet:void 0,imageSizes:typeof x.imageSizes=="string"?x.imageSizes:void 0,media:typeof x.media=="string"?x.media:void 0})}},ze.preloadModule=function(b,x){if(typeof b=="string")if(x){var m=_(x.as,x.crossOrigin);s.d.m(b,{as:typeof x.as=="string"&&x.as!=="script"?x.as:void 0,crossOrigin:m,integrity:typeof x.integrity=="string"?x.integrity:void 0,nonce:typeof x.nonce=="string"?x.nonce:void 0,fetchPriority:typeof x.fetchPriority=="string"?x.fetchPriority:void 0})}else s.d.m(b)},ze.requestFormReset=function(b){s.d.r(b)},ze.unstable_batchedUpdates=function(b,x){return b(x)},ze.useFormState=function(b,x,m){return g.H.useFormState(b,x,m)},ze.useFormStatus=function(){return g.H.useHostTransitionStatus()},ze.version="19.3.1",ze}var P0;function jg(){if(P0)return rc.exports;P0=1;function p(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(p)}catch(d){console.error(d)}}return p(),rc.exports=Og(),rc.exports}/**+ * @license React+ * react-dom-client.production.js+ *+ * Copyright (c) Meta Platforms, Inc. and affiliates.+ *+ * This source code is licensed under the MIT license found in the+ * LICENSE file in the root directory of this source tree.+ */var tm;function Dg(){if(tm)return ji;tm=1;var p=Mg(),d=xc(),r=jg();function s(t){var e="https://react.dev/errors/"+t;if(1<arguments.length){e+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)e+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function u(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function f(t){for(var e=t,a=e;a&&!a.alternate;)e=a,(e.flags&4098)!==0&&(t=e.return),a=e.return;for(;e.return;)e=e.return;return e.tag===3?t:null}function c(t){if(t.tag===13){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function o(t){if(t.tag===31){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function g(t){if(f(t)!==t)throw Error(s(188))}function _(t){var e=t.alternate;if(!e){if(e=f(t),e===null)throw Error(s(188));return e!==t?null:t}for(var a=t,n=e;;){var l=a.return;if(l===null)break;var i=l.alternate;if(i===null){if(n=l.return,n!==null){a=n;continue}break}if(l.child===i.child){for(i=l.child;i;){if(i===a)return g(l),t;if(i===n)return g(l),e;i=i.sibling}throw Error(s(188))}if(a.return!==n.return)a=l,n=i;else{for(var h=!1,z=l.child;z;){if(z===a){h=!0,a=l,n=i;break}if(z===n){h=!0,n=l,a=i;break}z=z.sibling}if(!h){for(z=i.child;z;){if(z===a){h=!0,a=i,n=l;break}if(z===n){h=!0,n=i,a=l;break}z=z.sibling}if(!h)throw Error(s(189))}}if(a.alternate!==n)throw Error(s(190))}if(a.tag!==3)throw Error(s(188));return a.stateNode.current===a?t:e}function b(t){var e=t.tag;if(e===5||e===26||e===27||e===6)return t;for(t=t.child;t!==null;){if(e=b(t),e!==null)return e;t=t.sibling}return null}function x(t,e,a,n,l,i){for(;t!==null;){if((t.tag===5||t.tag===27||t.tag===6)&&a(t,n,l,i)||(t.tag!==22||t.memoizedState===null)&&(e||t.tag!==5&&t.tag!==27)&&x(t.child,e,a,n,l,i))return!0;t=t.sibling}return!1}function m(t){for(t=t.return;t!==null;){if(t.tag===3||t.tag===5||t.tag===27)return t;t=t.return}return null}function v(t){var e=!1;for(t=t.return;t!==null&&(t.tag===4&&(e=!0),!(t.tag===3||t.tag===5||t.tag===27));)t=t.return;return e}function A(t){var e=[null,null],a=m(t);return a===null||S(e,t,a.child,{foundSelf:!1}),e}function S(t,e,a,n){for(;a!==null;){if(a===e)n.foundSelf=!0;else if(a.tag===5||a.tag===27||a.tag===6){if(n.foundSelf)return t[1]=a,!0;t[0]=a}else if((a.tag!==22||a.memoizedState===null)&&S(t,e,a.child,n))return!0;a=a.sibling}return!1}function N(t){switch(t.tag){case 5:case 27:case 6:return t.stateNode;case 3:return t.stateNode.containerInfo;default:throw Error(s(559))}}var T=null,k=null;function j(t,e,a){return t===a?!0:t===e?(T=t,!0):!1}function U(t,e,a){return t===a?(k=t,!1):t===e?(k!==null&&(T=t),!0):!1}function B(t){if(t===null)return null;do t=t===null?null:t.return;while(t&&t.tag!==5&&t.tag!==27&&t.tag!==3);return t||null}function W(t,e,a){for(var n=0,l=t;l;l=a(l))n++;l=0;for(var i=e;i;i=a(i))l++;for(;0<n-l;)t=a(t),n--;for(;0<l-n;)e=a(e),l--;for(;n--;){if(t===e||e!==null&&t===e.alternate)return t;t=a(t),e=a(e)}return null}var X=Object.assign,Q=Symbol.for("react.element"),I=Symbol.for("react.transitional.element"),ut=Symbol.for("react.portal"),vt=Symbol.for("react.fragment"),R=Symbol.for("react.strict_mode"),P=Symbol.for("react.profiler"),w=Symbol.for("react.consumer"),it=Symbol.for("react.context"),G=Symbol.for("react.forward_ref"),L=Symbol.for("react.suspense"),rt=Symbol.for("react.suspense_list"),nt=Symbol.for("react.memo"),mt=Symbol.for("react.lazy"),$=Symbol.for("react.activity"),et=Symbol.for("react.legacy_hidden"),kt=Symbol.for("react.memo_cache_sentinel"),M=Symbol.for("react.view_transition"),K=Symbol.for("react.recoverable"),xt=Symbol.iterator;function wt(t){return t===null||typeof t!="object"?null:(t=xt&&t[xt]||t["@@iterator"],typeof t=="function"?t:null)}var Nt=Symbol.for("react.client.reference");function ft(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===Nt?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case vt:return"Fragment";case P:return"Profiler";case R:return"StrictMode";case L:return"Suspense";case rt:return"SuspenseList";case $:return"Activity";case M:return"ViewTransition"}if(typeof t=="object")switch(t.$$typeof){case ut:return"Portal";case it:return t.displayName||"Context";case w:return(t._context.displayName||"Context")+".Consumer";case G:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case nt:return e=t.displayName||null,e!==null?e:ft(t.type)||"Memo";case mt:e=t._payload,t=t._init;try{return ft(t(e))}catch{}}return null}var St=Array.isArray,pt=d.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,_t=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Ht={pending:!1,data:null,method:null,action:null},y=[],st=-1;function lt(t){return{current:t}}function O(t){0>st||(t.current=y[st],y[st]=null,st--)}function C(t,e){st++,y[st]=t.current,t.current=e}var q=lt(null),dt=lt(null),ht=lt(null),tt=lt(null);function gt(t,e){switch(C(ht,e),C(dt,t),C(q,null),e.nodeType){case 9:case 11:t=(t=e.documentElement)&&(t=t.namespaceURI)?e0(t):0;break;default:if(t=e.tagName,e=e.namespaceURI)e=e0(e),t=a0(e,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}O(q),C(q,t)}function Tt(){O(q),O(dt),O(ht)}function yt(t){var e=t.memoizedState;e!==null&&(jl._currentValue=e.memoizedState,C(tt,t)),e=q.current;var a=a0(e,t.type);e!==a&&(C(dt,t),C(q,a))}function At(t){dt.current===t&&(O(q),O(dt)),tt.current===t&&(O(tt),jl._currentValue=Ht)}var Wt,Gt;function oe(t){if(Wt===void 0)try{throw Error()}catch(a){var e=a.stack.trim().match(/\n( *(at )?)/);Wt=e&&e[1]||"",Gt=-1<a.stack.indexOf(`+ at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`+`+Wt+t+Gt}var za=!1;function De(t,e){if(!t||za)return"";za=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var n={DetermineComponentFrameRoot:function(){try{if(e){var ct=function(){throw Error()};if(Object.defineProperty(ct.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ct,[])}catch(bt){var Y=bt}Reflect.construct(t,[],ct)}else{try{ct.call()}catch(bt){Y=bt}ct=!1;try{var F=Object.getOwnPropertyDescriptor(t.prototype,"props");Object.defineProperty(t.prototype,"props",{configurable:!0,set:function(){throw Error()}}),ct=!0,new t}finally{ct&&(F!==void 0?Object.defineProperty(t.prototype,"props",F):delete t.prototype.props)}}}else{try{throw Error()}catch(bt){Y=bt}(ct=t())&&typeof ct.catch=="function"&&ct.catch(function(){})}}catch(bt){if(bt&&Y&&typeof bt.stack=="string")return[bt.stack,Y.stack]}return[null,null]}};n.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var l=Object.getOwnPropertyDescriptor(n.DetermineComponentFrameRoot,"name");l&&l.configurable&&Object.defineProperty(n.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var i=n.DetermineComponentFrameRoot(),h=i[0],z=i[1];if(h&&z){var D=h.split(`+`),Z=z.split(`+`);for(l=n=0;n<D.length&&!D[n].includes("DetermineComponentFrameRoot");)n++;for(;l<Z.length&&!Z[l].includes("DetermineComponentFrameRoot");)l++;if(n===D.length||l===Z.length)for(n=D.length-1,l=Z.length-1;1<=n&&0<=l&&D[n]!==Z[l];)l--;for(;1<=n&&0<=l;n--,l--)if(D[n]!==Z[l]){if(n!==1||l!==1)do if(n--,l--,0>l||D[n]!==Z[l]){var at=`+`+D[n].replace(" at new "," at ");return t.displayName&&at.includes("<anonymous>")&&(at=at.replace("<anonymous>",t.displayName)),at}while(1<=n&&0<=l);break}}}finally{za=!1,Error.prepareStackTrace=a}return(a=t?t.displayName||t.name:"")?oe(a):""}function _n(t,e){switch(t.tag){case 26:case 27:case 5:return oe(t.type);case 16:return oe("Lazy");case 13:return t.child!==e&&e!==null?oe("Suspense Fallback"):oe("Suspense");case 19:return oe("SuspenseList");case 0:case 15:return De(t.type,!1);case 11:return De(t.type.render,!1);case 1:return De(t.type,!0);case 31:return oe("Activity");case 30:return oe("ViewTransition");default:return""}}function le(t){try{var e="",a=null;do e+=_n(t,a),a=t,t=t.return;while(t);return e}catch(n){return`+Error generating stack: `+n.message+`+`+n.stack}}var Za=Object.prototype.hasOwnProperty,Sn=p.unstable_scheduleCallback,Ye=p.unstable_cancelCallback,Bi=p.unstable_shouldYield,Ns=p.unstable_requestPaint,Ae=p.unstable_now,Es=p.unstable_getCurrentPriorityLevel,Hl=p.unstable_ImmediatePriority,Xa=p.unstable_UserBlockingPriority,ka=p.unstable_NormalPriority,Om=p.unstable_LowPriority,Nc=p.unstable_IdlePriority,jm=p.log,Dm=p.unstable_setDisableYieldValue,Ll=null,Ve=null;function Qa(t){if(typeof jm=="function"&&Dm(t),Ve&&typeof Ve.setStrictMode=="function")try{Ve.setStrictMode(Ll,t)}catch{}}var Ze=Math.clz32?Math.clz32:Bm,Rm=Math.log,Um=Math.LN2;function Bm(t){return t>>>=0,t===0?32:31-(Rm(t)/Um|0)|0}var Hi=256,Li=262144,Gi=4194304;function wn(t){var e=t&42;if(e!==0)return e;switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return t&-t;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function qi(t,e,a){var n=t.pendingLanes;if(n===0)return 0;var l=0,i=t.suspendedLanes,h=t.pingedLanes;t=t.warmLanes;var z=n&134217727;return z!==0?(n=z&~i,n!==0?l=wn(n):(h&=z,h!==0?l=wn(h):a||(a=z&~t,a!==0&&(l=wn(a))))):(z=n&~i,z!==0?l=wn(z):h!==0?l=wn(h):a||(a=n&~t,a!==0&&(l=wn(a)))),l===0?0:e!==0&&e!==l&&(e&i)===0&&(i=l&-l,a=e&-e,i>=a||i===32&&(a&4194048)!==0)?e:l}function Gl(t,e){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&e)===0}function Ec(t,e){(e&8)!==0&&(e|=e&32);var a=t.entangledLanes;if(a!==0)for(t=t.entanglements,a&=e;0<a;){var n=31-Ze(a),l=1<<n;e|=t[n],a&=~l}return e}function Hm(t,e){switch(t){case 1:case 2:case 4:case 8:case 64:return e+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function zc(){var t=Gi;return Gi<<=1,(Gi&62914560)===0&&(Gi=4194304),t}function zs(t){for(var e=[],a=0;31>a;a++)e.push(t);return e}function ql(t,e){t.pendingLanes|=e,e!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function Lm(t,e,a,n,l,i){var h=t.pendingLanes;t.pendingLanes=a,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=a,t.entangledLanes&=a,t.errorRecoveryDisabledLanes&=a,t.shellSuspendCounter=0;var z=t.entanglements,D=t.expirationTimes,Z=t.hiddenUpdates;for(a=h&~a;0<a;){var at=31-Ze(a),ct=1<<at;z[at]=0,D[at]=-1;var Y=Z[at];if(Y!==null)for(Z[at]=null,at=0;at<Y.length;at++){var F=Y[at];F!==null&&(F.lane&=-536870913)}a&=~ct}n!==0&&kc(t,n,0),i!==0&&l===0&&t.tag!==0&&(t.suspendedLanes|=i&~(h&~e))}function kc(t,e,a){t.pendingLanes|=e,t.suspendedLanes&=~e;var n=31-Ze(e);t.entangledLanes|=e,t.entanglements[n]=t.entanglements[n]|1073741824|a&261930}function Ac(t,e){var a=t.entangledLanes|=e;for(t=t.entanglements;a;){var n=31-Ze(a),l=1<<n;l&e|t[n]&e&&(t[n]|=e),a&=~l}}function Cc(t,e){var a=e&-e;return a=(a&42)!==0?1:ks(a),(a&(t.suspendedLanes|e))!==0?0:a}function ks(t){switch(t){case 2:t=1;break;case 8:t=4;break;case 32:t=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:t=128;break;case 268435456:t=134217728;break;default:t=0}return t}function As(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function Mc(){var t=_t.p;return t!==0?t:(t=window.event,t===void 0?32:L0(t.type))}function Oc(t,e){var a=_t.p;try{return _t.p=t,e()}finally{_t.p=a}}var Aa=Math.random().toString(36).slice(2),_e="__reactFiber$"+Aa,Re="__reactProps$"+Aa,Kn="__reactContainer$"+Aa,jc="__reactEvents$"+Aa,Gm="__reactListeners$"+Aa,qm="__reactHandles$"+Aa,Dc="__reactResources$"+Aa,Yl="__reactMarker$"+Aa,Yi="__reactLoad$"+Aa;function Vi(t){delete t[_e],delete t[Re],delete t[Gm],delete t[qm]}function Tn(t){var e;if(e=t[_e])return e;for(var a=t.parentNode;a;){if(e=a[Kn]||a[_e]){if(a=e.alternate,e.child!==null||a!==null&&a.child!==null)for(t=b0(t);t!==null;){if(a=t[_e])return a;t=b0(t)}return e}t=a,a=t.parentNode}return null}function Jn(t){if(t=t[_e]||t[Kn]){var e=t.tag;if(e===5||e===6||e===13||e===31||e===26||e===27||e===3)return t}return null}function Vl(t){var e=t.tag;if(e===5||e===26||e===27||e===6)return t.stateNode;throw Error(s(33))}function Wn(t){var e=t[Dc];return e||(e=t[Dc]={hoistableStyles:new Map,hoistableScripts:new Map}),e}function ge(t){t[Yl]=!0}function Rc(t){t[Yi]=void 0}var Uc=new Set,Bc={};function Nn(t,e){In(t,e),In(t+"Capture",e)}function In(t,e){for(Bc[t]=e,t=0;t<e.length;t++)Uc.add(e[t])}var Ym=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Hc={},Lc={};function Vm(t){return Za.call(Lc,t)?!0:Za.call(Hc,t)?!1:Ym.test(t)?Lc[t]=!0:(Hc[t]=!0,!1)}var Kt=!1;function Gc(){var t=Kt;return Kt=!1,t}function Zi(t,e,a){if(Vm(e))if(a===null)t.removeAttribute(e);else{switch(typeof a){case"undefined":case"function":case"symbol":t.removeAttribute(e);return;case"boolean":var n=e.toLowerCase().slice(0,5);if(n!=="data-"&&n!=="aria-"){t.removeAttribute(e);return}}t.setAttribute(e,a)}}function Xi(t,e,a){if(a===null)t.removeAttribute(e);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(e);return}t.setAttribute(e,a)}}function Ca(t,e,a,n){if(n===null)t.removeAttribute(a);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(a);return}t.setAttributeNS(e,a,n)}}function Xe(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function qc(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function Zm(t,e,a){var n=Object.getOwnPropertyDescriptor(t.constructor.prototype,e);if(!t.hasOwnProperty(e)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var l=n.get,i=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return l.call(this)},set:function(h){a=""+h,i.call(this,h)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return a},setValue:function(h){a=""+h},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function Cs(t){if(!t._valueTracker){var e=qc(t)?"checked":"value";t._valueTracker=Zm(t,e,""+t[e])}}function Yc(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var a=e.getValue(),n="";return t&&(n=qc(t)?t.checked?"true":"false":t.value),t=n,t!==a?(e.setValue(t),!0):!1}var Xm=/[\n"\\]/g;function ea(t){return t.replace(Xm,function(e){return"\\"+e.charCodeAt(0).toString(16)+" "})}function Ms(t,e,a,n,l,i,h,z){t.name="",h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"?t.type=h:t.removeAttribute("type"),e!=null?h==="number"?(e===0&&t.value===""||t.value!=e)&&(t.value=""+Xe(e)):t.value!==""+Xe(e)&&(t.value=""+Xe(e)):h!=="submit"&&h!=="reset"||t.removeAttribute("value"),e!=null?h==="number"&&t.value==e?Os(t,Xe(t.value)):Os(t,Xe(e)):a!=null?Os(t,Xe(a)):n!=null&&t.removeAttribute("value"),l==null&&i!=null&&(t.defaultChecked=!!i),l!=null&&(t.checked=l&&typeof l!="function"&&typeof l!="symbol"),z!=null&&typeof z!="function"&&typeof z!="symbol"&&typeof z!="boolean"?t.name=""+Xe(z):t.removeAttribute("name")}function Vc(t,e,a,n,l,i,h,z){if(i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(t.type=i),e!=null||a!=null){if(!(i!=="submit"&&i!=="reset"||e!=null)){Cs(t);return}a=a!=null?""+Xe(a):"",e=e!=null?""+Xe(e):a,z||e===t.value||(t.value=e),t.defaultValue=e}n=n??l,n=typeof n!="function"&&typeof n!="symbol"&&!!n,t.checked=z?t.checked:!!n,t.defaultChecked=!!n,h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"&&(t.name=h),Cs(t)}function Os(t,e){t.defaultValue!==""+e&&(t.defaultValue=""+e)}function Fn(t,e,a,n){if(t=t.options,e){e={};for(var l=0;l<a.length;l++)e["$"+a[l]]=!0;for(a=0;a<t.length;a++)l=e.hasOwnProperty("$"+t[a].value),t[a].selected!==l&&(t[a].selected=l),l&&n&&(t[a].defaultSelected=!0)}else{for(a=""+Xe(a),e=null,l=0;l<t.length;l++){if(t[l].value===a){t[l].selected=!0,n&&(t[l].defaultSelected=!0);return}e!==null||t[l].disabled||(e=t[l])}e!==null&&(e.selected=!0)}}function Zc(t,e,a){if(e!=null&&(e=""+Xe(e),e!==t.value&&(t.value=e),a==null)){t.defaultValue!==e&&(t.defaultValue=e);return}t.defaultValue=a!=null?""+Xe(a):""}function Xc(t,e,a,n){if(e==null){if(n!=null){if(a!=null)throw Error(s(92));if(St(n)){if(1<n.length)throw Error(s(93));n=n[0]}a=n}a==null&&(a=""),e=a}a=Xe(e),t.defaultValue=a,n=t.textContent,n===a&&n!==""&&n!==null&&(t.value=n),Cs(t)}function $n(t,e){if(e){var a=t.firstChild;if(a&&a===t.lastChild&&a.nodeType===3){a.nodeValue=e;return}}t.textContent=e}var Qm=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Qc(t,e,a){var n=e.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?n?t.setProperty(e,""):e==="float"?t.cssFloat="":t[e]="":n?t.setProperty(e,a):typeof a!="number"||a===0||Qm.has(e)?e==="float"?t.cssFloat=a:t[e]=(""+a).trim():t[e]=a+"px"}function Kc(t,e,a){if(e!=null&&typeof e!="object")throw Error(s(62));if(t=t.style,a!=null){for(var n in a)!a.hasOwnProperty(n)||e!=null&&e.hasOwnProperty(n)||(n.indexOf("--")===0?t.setProperty(n,""):n==="float"?t.cssFloat="":t[n]="",Kt=!0);for(var l in e)n=e[l],e.hasOwnProperty(l)&&a[l]!==n&&(Qc(t,l,n),Kt=!0)}else for(var i in e)e.hasOwnProperty(i)&&Qc(t,i,e[i])}function js(t){if(t.indexOf("-")===-1)return!1;switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Km=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["maskType","mask-type"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Jm=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Qi(t){return Jm.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}function ga(){}var Ds=null;function Rs(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Pn=null,tl=null;function Jc(t){var e=Jn(t);if(e&&(t=e.stateNode)){var a=t[Re]||null;t:switch(t=e.stateNode,e.type){case"input":if(Ms(t,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),e=a.name,a.type==="radio"&&e!=null){for(a=t;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+ea(""+e)+'"][type="radio"]'),e=0;e<a.length;e++){var n=a[e];if(n!==t&&n.form===t.form){var l=n[Re]||null;if(!l)throw Error(s(90));Ms(n,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name)}}for(e=0;e<a.length;e++)n=a[e],n.form===t.form&&Yc(n)}break t;case"textarea":Zc(t,a.value,a.defaultValue);break t;case"select":e=a.value,e!=null&&Fn(t,!!a.multiple,e,!1)}}}var Us=!1;function Wc(t,e,a){if(Us)return t(e,a);Us=!0;try{var n=t(e);return n}finally{if(Us=!1,(Pn!==null||tl!==null)&&(Qr(),Pn&&(e=Pn,t=tl,tl=Pn=null,Jc(e),t)))for(e=0;e<t.length;e++)Jc(t[e])}}function Zl(t,e){var a=t.stateNode;if(a===null)return null;var n=a[Re]||null;if(n===null)return null;a=n[e];t:switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(n=!n.disabled)||(t=t.type,n=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!n;break t;default:t=!1}if(t)return null;if(a&&typeof a!="function")throw Error(s(231,e,typeof a));return a}var Ma=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Bs=!1;if(Ma)try{var Xl={};Object.defineProperty(Xl,"passive",{get:function(){Bs=!0}}),window.addEventListener("test",Xl,Xl),window.removeEventListener("test",Xl,Xl)}catch{Bs=!1}var Ka=null,Hs=null,Ki=null;function Ic(){if(Ki)return Ki;var t,e=Hs,a=e.length,n,l="value"in Ka?Ka.value:Ka.textContent,i=l.length;for(t=0;t<a&&e[t]===l[t];t++);var h=a-t;for(n=1;n<=h&&e[a-n]===l[i-n];n++);return Ki=l.slice(t,1<n?1-n:void 0)}function Ji(t){var e=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&e===13&&(t=13)):t=e,t===10&&(t=13),32<=t||t===13?t:0}function Wi(){return!0}function Fc(){return!1}function Ce(t){function e(a,n,l,i,h){this._reactName=a,this._targetInst=l,this.type=n,this.nativeEvent=i,this.target=h,this.currentTarget=null;for(var z in t)t.hasOwnProperty(z)&&(a=t[z],this[z]=a?a(i):i[z]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?Wi:Fc,this.isPropagationStopped=Fc,this}return X(e.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=Wi)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=Wi)},persist:function(){},isPersistent:Wi}),e}var Ja={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ii=Ce(Ja),Ql=X({},Ja,{view:0,detail:0}),Wm=Ce(Ql),Ls,Gs,Kl,Fi=X({},Ql,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ys,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==Kl&&(Kl&&t.type==="mousemove"?(Ls=t.screenX-Kl.screenX,Gs=t.screenY-Kl.screenY):Gs=Ls=0,Kl=t),Ls)},movementY:function(t){return"movementY"in t?t.movementY:Gs}}),$c=Ce(Fi),Im=X({},Fi,{dataTransfer:0}),Fm=Ce(Im),$m=X({},Ql,{relatedTarget:0}),qs=Ce($m),Pm=X({},Ja,{animationName:0,elapsedTime:0,pseudoElement:0}),t1=Ce(Pm),e1=X({},Ja,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),a1=Ce(e1),n1=X({},Ja,{data:0}),Pc=Ce(n1),l1={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},i1={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},r1={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function s1(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):(t=r1[t])?!!e[t]:!1}function Ys(){return s1}var u1=X({},Ql,{key:function(t){if(t.key){var e=l1[t.key]||t.key;if(e!=="Unidentified")return e}return t.type==="keypress"?(t=Ji(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?i1[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ys,charCode:function(t){return t.type==="keypress"?Ji(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?Ji(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),o1=Ce(u1),c1=X({},Fi,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),tf=Ce(c1),f1=X({},Ja,{submitter:0}),d1=Ce(f1),h1=X({},Ql,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ys}),m1=Ce(h1),p1=X({},Ja,{propertyName:0,elapsedTime:0,pseudoElement:0}),g1=Ce(p1),y1=X({},Fi,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),v1=Ce(y1),b1=X({},Ja,{newState:0,oldState:0,source:0}),x1=Ce(b1),_1=[9,13,27,32],Vs=Ma&&"CompositionEvent"in window,Jl=null;Ma&&"documentMode"in document&&(Jl=document.documentMode);var S1=Ma&&"TextEvent"in window&&!Jl,ef=Ma&&(!Vs||Jl&&8<Jl&&11>=Jl),af=" ",nf=!1;function lf(t,e){switch(t){case"keyup":return _1.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function rf(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var el=!1;function w1(t,e){switch(t){case"compositionend":return rf(e);case"keypress":return e.which!==32?null:(nf=!0,af);case"textInput":return t=e.data,t===af&&nf?null:t;default:return null}}function T1(t,e){if(el)return t==="compositionend"||!Vs&&lf(t,e)?(t=Ic(),Ki=Hs=Ka=null,el=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1<e.char.length)return e.char;if(e.which)return String.fromCharCode(e.which)}return null;case"compositionend":return ef&&e.locale!=="ko"?null:e.data;default:return null}}var N1={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function sf(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e==="input"?!!N1[t.type]:e==="textarea"}function uf(t,e,a,n){Pn?tl?tl.push(n):tl=[n]:Pn=n,e=$r(e,"onChange"),0<e.length&&(a=new Ii("onChange","change",null,a,n),t.push({event:a,listeners:e}))}var Wl=null,Il=null;function E1(t){Wh(t,0)}function $i(t){var e=Vl(t);if(Yc(e))return t}function of(t,e){if(t==="change")return e}var cf=!1;if(Ma){var Zs;if(Ma){var Xs="oninput"in document;if(!Xs){var ff=document.createElement("div");ff.setAttribute("oninput","return;"),Xs=typeof ff.oninput=="function"}Zs=Xs}else Zs=!1;cf=Zs&&(!document.documentMode||9<document.documentMode)}function df(){Wl&&(Wl.detachEvent("onpropertychange",hf),Il=Wl=null)}function hf(t){if(t.propertyName==="value"&&$i(Il)){var e=[];uf(e,Il,t,Rs(t)),Wc(E1,e)}}function z1(t,e,a){t==="focusin"?(df(),Wl=e,Il=a,Wl.attachEvent("onpropertychange",hf)):t==="focusout"&&df()}function k1(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return $i(Il)}function A1(t,e){if(t==="click")return $i(e)}function C1(t,e){if(t==="input"||t==="change")return $i(e)}function M1(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var Qe=typeof Object.is=="function"?Object.is:M1;function Fl(t,e){if(Qe(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;var a=Object.keys(t),n=Object.keys(e);if(a.length!==n.length)return!1;for(n=0;n<a.length;n++){var l=a[n];if(!Za.call(e,l)||!Qe(t[l],e[l]))return!1}return!0}function Qs(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function mf(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function pf(t,e){var a=mf(t);t=0;for(var n;a;){if(a.nodeType===3){if(n=t+a.textContent.length,t<=e&&n>=e)return{node:a,offset:e-t};t=n}t:{for(;a;){if(a.nextSibling){a=a.nextSibling;break t}a=a.parentNode}a=void 0}a=mf(a)}}function gf(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?gf(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function yf(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var e=Qs(t.document);e instanceof t.HTMLIFrameElement;){try{var a=typeof e.contentWindow.location.href=="string"}catch{a=!1}if(a)t=e.contentWindow;else break;e=Qs(t.document)}return e}function Ks(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}var O1=Ma&&"documentMode"in document&&11>=document.documentMode,al=null,Js=null,$l=null,Ws=!1;function vf(t,e,a){var n=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Ws||al==null||al!==Qs(n)||(n=al,"selectionStart"in n&&Ks(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),$l&&Fl($l,n)||($l=n,n=$r(Js,"onSelect"),0<n.length&&(e=new Ii("onSelect","select",null,e,a),t.push({event:e,listeners:n}),e.target=al)))}function En(t,e){var a={};return a[t.toLowerCase()]=e.toLowerCase(),a["Webkit"+t]="webkit"+e,a["Moz"+t]="moz"+e,a}var nl={animationend:En("Animation","AnimationEnd"),animationiteration:En("Animation","AnimationIteration"),animationstart:En("Animation","AnimationStart"),transitionrun:En("Transition","TransitionRun"),transitionstart:En("Transition","TransitionStart"),transitioncancel:En("Transition","TransitionCancel"),transitionend:En("Transition","TransitionEnd")},Is={},bf={};Ma&&(bf=document.createElement("div").style,"AnimationEvent"in window||(delete nl.animationend.animation,delete nl.animationiteration.animation,delete nl.animationstart.animation),"TransitionEvent"in window||delete nl.transitionend.transition);function zn(t){if(Is[t])return Is[t];if(!nl[t])return t;var e=nl[t],a;for(a in e)if(e.hasOwnProperty(a)&&a in bf)return Is[t]=e[a];return t}var xf=zn("animationend"),_f=zn("animationiteration"),Sf=zn("animationstart"),j1=zn("transitionrun"),D1=zn("transitionstart"),R1=zn("transitioncancel"),wf=zn("transitionend"),Tf=new Map,Fs="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error fullscreenChange fullscreenError gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");Fs.push("scrollEnd");function ca(t,e){Tf.set(t,e),Nn(e,[t])}var U1=0;function Oa(t,e){if(t.name!=null&&t.name!=="auto")return t.name;if(e.autoName!==null)return e.autoName;t=ma.identifierPrefix;var a=U1++;return t="_"+t+"t_"+a.toString(32)+"_",e.autoName=t}function Nf(t){if(t==null||typeof t=="string")return t;var e=null,a=wl;if(a!==null)for(var n=0;n<a.length;n++){var l=t[a[n]];if(l!=null){if(l==="none")return"none";e=e==null?l:e+(" "+l)}}return e??t.default}function ja(t,e){return t=Nf(t),e=Nf(e),e==null?t==="auto"?null:t:e==="auto"?null:e}var Pi=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var e=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof t=="object"&&t!==null&&typeof t.message=="string"?String(t.message):String(t),error:t});if(!window.dispatchEvent(e))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)},aa=[],ll=0,$s=0;function tr(){for(var t=ll,e=$s=ll=0;e<t;){var a=aa[e];aa[e++]=null;var n=aa[e];aa[e++]=null;var l=aa[e];aa[e++]=null;var i=aa[e];if(aa[e++]=null,n!==null&&l!==null){var h=n.pending;h===null?l.next=l:(l.next=h.next,h.next=l),n.pending=l}i!==0&&Ef(a,l,i)}}function er(t,e,a,n){aa[ll++]=t,aa[ll++]=e,aa[ll++]=a,aa[ll++]=n,$s|=n,t.lanes|=n,t=t.alternate,t!==null&&(t.lanes|=n)}function Ps(t,e,a,n){return er(t,e,a,n),ar(t)}function kn(t,e){return er(t,null,null,e),ar(t)}function Ef(t,e,a){t.lanes|=a;var n=t.alternate;n!==null&&(n.lanes|=a);for(var l=!1,i=t.return;i!==null;)i.childLanes|=a,n=i.alternate,n!==null&&(n.childLanes|=a),i.tag===22&&(t=i.stateNode,t===null||t._visibility&1||(l=!0)),t=i,i=i.return;return t.tag===3?(i=t.stateNode,l&&e!==null&&(l=31-Ze(a),t=i.hiddenUpdates,n=t[l],n===null?t[l]=[e]:n.push(e),e.lane=a|536870912),i):null}function ar(t){if(50<xi)throw xi=0,Xr=null,Error(s(185));for(var e=t.return;e!==null;)t=e,e=t.return;return t.tag===3?t.stateNode:null}var il={};function B1(t,e,a,n){this.tag=t,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ue(t,e,a,n){return new B1(t,e,a,n)}function tu(t){return t=t.prototype,!(!t||!t.isReactComponent)}function Da(t,e){var a=t.alternate;return a===null?(a=Ue(t.tag,e,t.key,t.mode),a.elementType=t.elementType,a.type=t.type,a.stateNode=t.stateNode,a.alternate=t,t.alternate=a):(a.pendingProps=e,a.type=t.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=t.flags&1206910976,a.childLanes=t.childLanes,a.lanes=t.lanes,a.child=t.child,a.memoizedProps=t.memoizedProps,a.memoizedState=t.memoizedState,a.updateQueue=t.updateQueue,e=t.dependencies,a.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},a.sibling=t.sibling,a.index=t.index,a.ref=t.ref,a.refCleanup=t.refCleanup,a}function zf(t,e){t.flags&=1206910978;var a=t.alternate;return a===null?(t.childLanes=0,t.lanes=e,t.child=null,t.subtreeFlags=0,t.memoizedProps=null,t.memoizedState=null,t.updateQueue=null,t.dependencies=null,t.stateNode=null):(t.childLanes=a.childLanes,t.lanes=a.lanes,t.child=a.child,t.subtreeFlags=0,t.deletions=null,t.memoizedProps=a.memoizedProps,t.memoizedState=a.memoizedState,t.updateQueue=a.updateQueue,t.type=a.type,e=a.dependencies,t.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),t}function nr(t,e,a,n,l,i){var h=0;if(n=t,typeof n=="function")tu(n)&&(h=1);else if(typeof n=="string")h=fg(t,a,q.current)?26:t==="html"||t==="head"||t==="body"?27:5;else t:switch(n){case $:return t=Ue(31,a,e,l),t.elementType=$,t.lanes=i,t;case vt:return An(a.children,l,i,e);case R:h=8,l|=24;break;case P:return t=Ue(12,a,e,l|2),t.elementType=P,t.lanes=i,t;case L:return t=Ue(13,a,e,l),t.elementType=L,t.lanes=i,t;case rt:return t=Ue(19,a,e,l),t.elementType=rt,t.lanes=i,t;case et:case M:return t=l|32,t=Ue(30,a,e,t),t.elementType=M,t.lanes=i,t.stateNode={autoName:null,paired:null,clones:null,ref:null},t;default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case it:h=10;break t;case w:h=9;break t;case G:h=11;break t;case nt:h=14;break t;case mt:h=16,n=null;break t}h=29,a=Error(s(130,t===null?"null":typeof t,"")),n=null}return e=Ue(h,a,e,l),e.elementType=t,e.type=n,e.lanes=i,e}function An(t,e,a,n){return t=Ue(7,t,n,e),t.lanes=a,t}function eu(t,e,a){return t=Ue(6,t,null,e),t.lanes=a,t}function kf(t){var e=Ue(18,null,null,0);return e.stateNode=t,e}function au(t,e,a){return e=Ue(4,t.children!==null?t.children:[],t.key,e),e.lanes=a,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}var Af=new WeakMap;function na(t,e){if(typeof t=="object"&&t!==null){var a=Af.get(t);return a!==void 0?a:(e={value:t,source:e,stack:le(e)},Af.set(t,e),e)}return{value:t,source:e,stack:le(e)}}var rl=[],sl=0,lr=null,Pl=0,la=[],ia=0,Wa=null,ya=1,va="";function Ra(t,e){rl[sl++]=Pl,rl[sl++]=lr,lr=t,Pl=e}function Cf(t,e,a){la[ia++]=ya,la[ia++]=va,la[ia++]=Wa,Wa=t;var n=ya;t=va;var l=32-Ze(n)-1;n&=~(1<<l),a+=1;var i=32-Ze(e)+l;if(30<i){var h=l-l%5;i=(n&(1<<h)-1).toString(32),n>>=h,l-=h,ya=1<<32-Ze(e)+l|a<<l|n,va=i+t}else ya=1<<i|a<<l|n,va=t}function ir(t){t.return!==null&&(Ra(t,1),Cf(t,1,0))}function nu(t){for(;t===lr;)lr=rl[--sl],rl[sl]=null,Pl=rl[--sl],rl[sl]=null;for(;t===Wa;)Wa=la[--ia],la[ia]=null,va=la[--ia],la[ia]=null,ya=la[--ia],la[ia]=null}function Mf(t,e){la[ia++]=ya,la[ia++]=va,la[ia++]=Wa,ya=e.id,va=e.overflow,Wa=t}var ye=null,ae=null,Lt=!1,Ia=null,ra=!1,lu=Error(s(519));function Fa(t){var e=Error(s(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw ti(na(e,t)),lu}function Of(t){var e=t.stateNode,a=t.type,n=t.memoizedProps;switch(e[_e]=t,e[Re]=n,a){case"dialog":Yt("cancel",e),Yt("close",e);break;case"iframe":case"object":case"embed":Yt("load",e);break;case"video":case"audio":for(a=0;a<Si.length;a++)Yt(Si[a],e);break;case"source":Yt("error",e);break;case"img":case"image":case"link":Yt("error",e),Yt("load",e);break;case"details":Yt("toggle",e);break;case"input":Yt("invalid",e),Vc(e,n.value,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name,!0);break;case"select":Yt("invalid",e);break;case"textarea":Yt("invalid",e),Xc(e,n.value,n.defaultValue,n.children)}a=n.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||e.textContent===""+a||n.suppressHydrationWarning===!0||Ph(e.textContent,a)?(n.popover!=null&&(Yt("beforetoggle",e),Yt("toggle",e)),n.onScroll!=null&&Yt("scroll",e),n.onScrollEnd!=null&&Yt("scrollend",e),n.onClick!=null&&(e.onclick=ga),e=!0):e=!1,e||Fa(t,!0)}function rr(t){for(ye=t.return;ye;)switch(ye.tag){case 5:case 31:case 13:ra=!1;return;case 27:case 3:ra=!0;return;default:ye=ye.return}}function ul(t){if(t!==ye)return!1;if(!Lt)return rr(t),Lt=!0,!1;var e=t.tag,a;if((a=e!==3&&e!==27)&&((a=e===5)&&(a=t.type,a=!(a!=="form"&&a!=="button")||Ro(t.type,t.memoizedProps)),a=!a),a&&ae&&Fa(t),rr(t),e===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(s(317));ae=v0(t)}else if(e===31){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(s(317));ae=v0(t)}else e===27?(e=ae,mn(t.type)?(t=Zo,Zo=null,ae=t):ae=e):ae=ye?ua(t.stateNode.nextSibling):null;return!0}function Cn(){ae=ye=null,Lt=!1}function iu(){var t=Ia;return t!==null&&(Le===null?Le=t:Le.push.apply(Le,t),Ia=null),t}function ti(t){Ia===null?Ia=[t]:Ia.push(t)}var ru=lt(null),Mn=null,Ua=null;function $a(t,e,a){C(ru,e._currentValue),e._currentValue=a}function Ba(t){t._currentValue=ru.current,O(ru)}function sr(t,e,a){for(;t!==null;){var n=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,n!==null&&(n.childLanes|=e)):n!==null&&(n.childLanes&e)!==e&&(n.childLanes|=e),t===a)break;t=t.return}}function su(t,e,a,n){var l=t.child;for(l!==null&&(l.return=t);l!==null;){var i=l.dependencies;if(i!==null){var h=l.child;i=i.firstContext;t:for(;i!==null;){var z=i;i=l;for(var D=0;D<e.length;D++)if(z.context===e[D]){i.lanes|=a,z=i.alternate,z!==null&&(z.lanes|=a),sr(i.return,a,t),n||(h=null);break t}i=z.next}}else if(l.tag===18){if(h=l.return,h===null)throw Error(s(341));h.lanes|=a,i=h.alternate,i!==null&&(i.lanes|=a),sr(h,a,t),h=null}else l.tag===13&&l.memoizedState!==null&&l.memoizedState.dehydrated===null?(l.lanes|=a,h=l.alternate,h!==null&&(h.lanes|=a),sr(l.return,a,t),h=l.child,h=h!==null?h.sibling:null):h=l.child;if(h!==null)h.return=l;else for(h=l;h!==null;){if(h===t){h=null;break}if(l=h.sibling,l!==null){l.return=h.return,h=l;break}h=h.return}l=h}}function On(t,e,a,n){t=null;for(var l=e,i=!1;l!==null;){if(!i){if((l.flags&524288)!==0)i=!0;else if((l.flags&262144)!==0)break}if(l.tag===10){var h=l.alternate;if(h===null)throw Error(s(387));if(h=h.memoizedProps,h!==null){var z=l.type;Qe(l.pendingProps.value,h.value)||(t!==null?t.push(z):t=[z])}}else if(l===tt.current){if(h=l.alternate,h===null)throw Error(s(387));h.memoizedState.memoizedState!==l.memoizedState.memoizedState&&(t!==null?t.push(jl):t=[jl])}l=l.return}return t!==null&&su(e,t,a,n),e.flags|=262144,t!==null}function ur(t){for(t=t.firstContext;t!==null;){if(!Qe(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function jn(t){Mn=t,Ua=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function Se(t){return jf(Mn,t)}function or(t,e){return Mn===null&&jn(t),jf(t,e)}function jf(t,e){var a=e._currentValue;if(e={context:e,memoizedValue:a,next:null},Ua===null){if(t===null)throw Error(s(308));Ua=e,t.dependencies={lanes:0,firstContext:e},t.flags|=524288}else Ua=Ua.next=e;return a}var H1=typeof AbortController<"u"?AbortController:function(){var t=[],e=this.signal={aborted:!1,addEventListener:function(a,n){t.push(n)}};this.abort=function(){e.aborted=!0,t.forEach(function(a){return a()})}},L1=p.unstable_scheduleCallback,G1=p.unstable_NormalPriority,fe={$$typeof:it,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function uu(){return{controller:new H1,data:new Map,refCount:0}}function ei(t){t.refCount--,t.refCount===0&&L1(G1,function(){t.controller.abort()})}function Df(t,e){if((t.pendingLanes&4194048)!==0){var a=t.transitionTypes;for(a===null&&(a=t.transitionTypes=[]),t=0;t<e.length;t++){var n=e[t];a.indexOf(n)===-1&&a.push(n)}}}var ai=null;function q1(t){var e=t.transitionTypes;return t.transitionTypes=null,e}var ni=null,ou=0,Dn=0,ol=null;function Y1(t,e){if(ni===null){var a=ni=[];ou=0,Dn=Eo(),ol={status:"pending",value:void 0,then:function(n){a.push(n)}}}return ou++,e.then(Rf,Rf),e}function Rf(){if(--ou===0&&(ai=null,ni!==null)){ol!==null&&(ol.status="fulfilled");var t=ni;ni=null,Dn=0,ol=null;for(var e=0;e<t.length;e++)(0,t[e])()}}function V1(t,e){var a=[],n={status:"pending",value:null,reason:null,then:function(l){a.push(l)}};return t.then(function(){n.status="fulfilled",n.value=e;for(var l=0;l<a.length;l++)(0,a[l])(e)},function(l){for(n.status="rejected",n.reason=l,l=0;l<a.length;l++)(0,a[l])(void 0)}),n}var Uf=pt.S;pt.S=function(t,e){if(kh=Ae(),typeof e=="object"&&e!==null&&typeof e.then=="function"&&Y1(t,e),ai!==null)for(var a=zl;a!==null;)Df(a,ai),a=a.next;if(a=t.types,a!==null){for(var n=zl;n!==null;)Df(n,a),n=n.next;if(Dn!==0){n=ai,n===null&&(n=ai=[]);for(var l=0;l<a.length;l++){var i=a[l];n.indexOf(i)===-1&&n.push(i)}}}Uf!==null&&Uf(t,e)};var Rn=lt(null);function cu(){var t=Rn.current;return t!==null?t:ee.pooledCache}function cr(t,e){e===null?C(Rn,Rn.current):C(Rn,e.pool)}function Bf(){var t=cu();return t===null?null:{parent:fe._currentValue,pool:t}}var cl=Error(s(460)),fu=Error(s(474)),fr=Error(s(542)),dr={then:function(){}};function Hf(t){return t=t.status,t==="fulfilled"||t==="rejected"}function Lf(t,e,a){switch(a=t[a],a===void 0?t.push(e):a!==e&&(e.then(ga,ga),e=a),e.status){case"fulfilled":return e.value;case"rejected":throw t=e.reason,qf(t),t===void 0&&!("reason"in e)?Error(s(600)):t;default:if(typeof e.status=="string")e.then(ga,ga);else{if(t=ee,t!==null&&100<t.shellSuspendCounter)throw Error(s(482));t=e,t.status="pending",t.then(function(n){if(e.status==="pending"){var l=e;l.status="fulfilled",l.value=n}},function(n){if(e.status==="pending"){var l=e;l.status="rejected",l.reason=n}})}switch(e.status){case"fulfilled":return e.value;case"rejected":throw t=e.reason,qf(t),t}throw Bn=e,cl}}function Un(t){try{var e=t._init;return e(t._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(Bn=a,cl):a}}var Bn=null;function Gf(){if(Bn===null)throw Error(s(459));var t=Bn;return Bn=null,t}function qf(t){if(t===cl||t===fr)throw Error(s(483))}var fl=null,li=0;function hr(t){var e=li;return li+=1,fl===null&&(fl=[]),Lf(fl,t,e)}function Pa(t,e){e=e.props.ref,t.ref=e!==void 0?e:null}function mr(t,e){throw e.$$typeof===Q?Error(s(525)):(t=Object.prototype.toString.call(e),Error(s(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)))}function Yf(t){function e(V,H){if(t){var J=V.deletions;J===null?(V.deletions=[H],V.flags|=16):J.push(H)}}function a(V,H){if(!t)return null;for(;H!==null;)e(V,H),H=H.sibling;return null}function n(V){for(var H=new Map;V!==null;)V.key===null?H.set(V.index,V):H.set(V.key,V),V=V.sibling;return H}function l(V,H){return V=Da(V,H),V.index=0,V.sibling=null,V}function i(V,H,J){return V.index=J,t?(J=V.alternate,J!==null?(J=J.index,J<H?(V.flags|=2,H):J):(V.flags|=134217730,H)):(V.flags|=1048576,H)}function h(V){return t&&V.alternate===null&&(V.flags|=134217730),V}function z(V,H,J,ot){return H===null||H.tag!==6?(H=eu(J,V.mode,ot),H.return=V,H):(H=l(H,J),H.return=V,H)}function D(V,H,J,ot){var Et=J.type;return Et===vt?(V=at(V,H,J.props.children,ot,J.key),Pa(V,J),V):H!==null&&(H.elementType===Et||typeof Et=="object"&&Et!==null&&Et.$$typeof===mt&&Un(Et)===H.type)?(H=l(H,J.props),Pa(H,J),H.return=V,H):(H=nr(J.type,J.key,J.props,null,V.mode,ot),Pa(H,J),H.return=V,H)}function Z(V,H,J,ot){return H===null||H.tag!==4||H.stateNode.containerInfo!==J.containerInfo||H.stateNode.implementation!==J.implementation?(H=au(J,V.mode,ot),H.return=V,H):(H=l(H,J.children||[]),H.return=V,H)}function at(V,H,J,ot,Et){return H===null||H.tag!==7?(H=An(J,V.mode,ot,Et),H.return=V,H):(H=l(H,J),H.return=V,H)}function ct(V,H,J){if(typeof H=="string"&&H!==""||typeof H=="number"||typeof H=="bigint")return H=eu(""+H,V.mode,J),H.return=V,H;if(typeof H=="object"&&H!==null){switch(H.$$typeof){case I:return J=nr(H.type,H.key,H.props,null,V.mode,J),Pa(J,H),J.return=V,J;case ut:return H=au(H,V.mode,J),H.return=V,H;case mt:return H=Un(H),ct(V,H,J)}if(St(H)||wt(H))return H=An(H,V.mode,J,null),H.return=V,H;if(typeof H.then=="function")return ct(V,hr(H),J);if(H.$$typeof===it)return ct(V,or(V,H),J);mr(V,H)}return null}function Y(V,H,J,ot){var Et=H!==null?H.key:null;if(typeof J=="string"&&J!==""||typeof J=="number"||typeof J=="bigint")return Et!==null?null:z(V,H,""+J,ot);if(typeof J=="object"&&J!==null){switch(J.$$typeof){case I:return J.key===Et?D(V,H,J,ot):null;case ut:return J.key===Et?Z(V,H,J,ot):null;case mt:return J=Un(J),Y(V,H,J,ot)}if(St(J)||wt(J))return Et!==null?null:at(V,H,J,ot,null);if(typeof J.then=="function")return Y(V,H,hr(J),ot);if(J.$$typeof===it)return Y(V,H,or(V,J),ot);mr(V,J)}return null}function F(V,H,J,ot,Et){if(typeof ot=="string"&&ot!==""||typeof ot=="number"||typeof ot=="bigint")return V=V.get(J)||null,z(H,V,""+ot,Et);if(typeof ot=="object"&&ot!==null){switch(ot.$$typeof){case I:return V=V.get(ot.key===null?J:ot.key)||null,D(H,V,ot,Et);case ut:return V=V.get(ot.key===null?J:ot.key)||null,Z(H,V,ot,Et);case mt:return ot=Un(ot),F(V,H,J,ot,Et)}if(St(ot)||wt(ot))return V=V.get(J)||null,at(H,V,ot,Et,null);if(typeof ot.then=="function")return F(V,H,J,hr(ot),Et);if(ot.$$typeof===it)return F(V,H,J,or(H,ot),Et);mr(H,ot)}return null}function bt(V,H,J,ot){for(var Et=null,Zt=null,Ct=H,Ot=H=0,me=null;Ct!==null&&Ot<J.length;Ot++){Ct.index>Ot?(me=Ct,Ct=null):me=Ct.sibling;var Xt=Y(V,Ct,J[Ot],ot);if(Xt===null){Ct===null&&(Ct=me);break}t&&Ct&&Xt.alternate===null&&e(V,Ct),H=i(Xt,H,Ot),Zt===null?Et=Xt:Zt.sibling=Xt,Zt=Xt,Ct=me}if(Ot===J.length)return a(V,Ct),Lt&&Ra(V,Ot),Et;if(Ct===null){for(;Ot<J.length;Ot++)Ct=ct(V,J[Ot],ot),Ct!==null&&(H=i(Ct,H,Ot),Zt===null?Et=Ct:Zt.sibling=Ct,Zt=Ct);return Lt&&Ra(V,Ot),Et}for(Ct=n(Ct);Ot<J.length;Ot++)me=F(Ct,V,Ot,J[Ot],ot),me!==null&&(t&&(Xt=me.alternate,Xt!==null&&Ct.delete(Xt.key===null?Ot:Xt.key)),H=i(me,H,Ot),Zt===null?Et=me:Zt.sibling=me,Zt=me);return t&&Ct.forEach(function(bn){return e(V,bn)}),Lt&&Ra(V,Ot),Et}function zt(V,H,J,ot){if(J==null)throw Error(s(151));for(var Et=null,Zt=null,Ct=H,Ot=H=0,me=null,Xt=J.next();Ct!==null&&!Xt.done;Ot++,Xt=J.next()){Ct.index>Ot?(me=Ct,Ct=null):me=Ct.sibling;var bn=Y(V,Ct,Xt.value,ot);if(bn===null){Ct===null&&(Ct=me);break}t&&Ct&&bn.alternate===null&&e(V,Ct),H=i(bn,H,Ot),Zt===null?Et=bn:Zt.sibling=bn,Zt=bn,Ct=me}if(Xt.done)return a(V,Ct),Lt&&Ra(V,Ot),Et;if(Ct===null){for(;!Xt.done;Ot++,Xt=J.next())Xt=ct(V,Xt.value,ot),Xt!==null&&(H=i(Xt,H,Ot),Zt===null?Et=Xt:Zt.sibling=Xt,Zt=Xt);return Lt&&Ra(V,Ot),Et}for(Ct=n(Ct);!Xt.done;Ot++,Xt=J.next())Xt=F(Ct,V,Ot,Xt.value,ot),Xt!==null&&(t&&(me=Xt.alternate,me!==null&&Ct.delete(me.key===null?Ot:me.key)),H=i(Xt,H,Ot),Zt===null?Et=Xt:Zt.sibling=Xt,Zt=Xt);return t&&Ct.forEach(function(wg){return e(V,wg)}),Lt&&Ra(V,Ot),Et}function Bt(V,H,J,ot){if(typeof J=="object"&&J!==null&&J.type===vt&&J.key===null&&J.props.ref===void 0&&(J=J.props.children),typeof J=="object"&&J!==null){switch(J.$$typeof){case I:t:{for(var Et=J.key;H!==null;){if(H.key===Et){if(Et=J.type,Et===vt){if(H.tag===7){a(V,H.sibling),ot=l(H,J.props.children),Pa(ot,J),ot.return=V,V=ot;break t}}else if(H.elementType===Et||typeof Et=="object"&&Et!==null&&Et.$$typeof===mt&&Un(Et)===H.type){a(V,H.sibling),ot=l(H,J.props),Pa(ot,J),ot.return=V,V=ot;break t}a(V,H);break}else e(V,H);H=H.sibling}J.type===vt?(ot=An(J.props.children,V.mode,ot,J.key),Pa(ot,J),ot.return=V,V=ot):(ot=nr(J.type,J.key,J.props,null,V.mode,ot),Pa(ot,J),ot.return=V,V=ot)}return h(V);case ut:t:{for(Et=J.key;H!==null;){if(H.key===Et)if(H.tag===4&&H.stateNode.containerInfo===J.containerInfo&&H.stateNode.implementation===J.implementation){a(V,H.sibling),ot=l(H,J.children||[]),ot.return=V,V=ot;break t}else{a(V,H);break}else e(V,H);H=H.sibling}ot=au(J,V.mode,ot),ot.return=V,V=ot}return h(V);case mt:return J=Un(J),Bt(V,H,J,ot)}if(St(J))return bt(V,H,J,ot);if(wt(J)){if(Et=wt(J),typeof Et!="function")throw Error(s(150));return J=Et.call(J),zt(V,H,J,ot)}if(typeof J.then=="function")return Bt(V,H,hr(J),ot);if(J.$$typeof===it)return Bt(V,H,or(V,J),ot);mr(V,J)}return typeof J=="string"&&J!==""||typeof J=="number"||typeof J=="bigint"?(J=""+J,H!==null&&H.tag===6?(a(V,H.sibling),ot=l(H,J),ot.return=V,V=ot):(a(V,H),ot=eu(J,V.mode,ot),ot.return=V,V=ot),h(V)):a(V,H)}return function(V,H,J,ot){try{li=0;var Et=Bt(V,H,J,ot);return fl=null,Et}catch(Ct){if(Ct===cl||Ct===fr)throw Ct;var Zt=Ue(29,Ct,null,V.mode);return Zt.lanes=ot,Zt.return=V,Zt}finally{}}}var Hn=Yf(!0),Vf=Yf(!1),tn=!1;function du(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function hu(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function en(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function an(t,e,a){var n=t.updateQueue;if(n===null)return null;if(n=n.shared,(Jt&2)!==0){var l=n.pending;return l===null?e.next=e:(e.next=l.next,l.next=e),n.pending=e,e=ar(t),Ef(t,null,a),e}return er(t,n,e,a),ar(t)}function ii(t,e,a){if(e=e.updateQueue,e!==null&&(e=e.shared,(a&4194048)!==0)){var n=e.lanes;n&=t.pendingLanes,a|=n,e.lanes=a,Ac(t,a)}}function mu(t,e){var a=t.updateQueue,n=t.alternate;if(n!==null&&(n=n.updateQueue,a===n)){var l=null,i=null;if(a=a.firstBaseUpdate,a!==null){do{var h={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};i===null?l=i=h:i=i.next=h,a=a.next}while(a!==null);i===null?l=i=e:i=i.next=e}else l=i=e;a={baseState:n.baseState,firstBaseUpdate:l,lastBaseUpdate:i,shared:n.shared,callbacks:n.callbacks},t.updateQueue=a;return}t=a.lastBaseUpdate,t===null?a.firstBaseUpdate=e:t.next=e,a.lastBaseUpdate=e}var pu=!1;function ri(){if(pu){var t=ol;if(t!==null)throw t}}function si(t,e,a,n){pu=!1;var l=t.updateQueue;tn=!1;var i=l.firstBaseUpdate,h=l.lastBaseUpdate,z=l.shared.pending;if(z!==null){l.shared.pending=null;var D=z,Z=D.next;D.next=null,h===null?i=Z:h.next=Z,h=D;var at=t.alternate;at!==null&&(at=at.updateQueue,z=at.lastBaseUpdate,z!==h&&(z===null?at.firstBaseUpdate=Z:z.next=Z,at.lastBaseUpdate=D))}if(i!==null){var ct=l.baseState;h=0,at=Z=D=null,z=i;do{var Y=z.lane&-536870913,F=Y!==z.lane;if(F?(Vt&Y)===Y:(n&Y)===Y){Y!==0&&Y===Dn&&(pu=!0),at!==null&&(at=at.next={lane:0,tag:z.tag,payload:z.payload,callback:null,next:null});t:{var bt=t,zt=z;Y=e;var Bt=a;switch(zt.tag){case 1:if(bt=zt.payload,typeof bt=="function"){ct=bt.call(Bt,ct,Y);break t}ct=bt;break t;case 3:bt.flags=bt.flags&-65537|128;case 0:if(bt=zt.payload,Y=typeof bt=="function"?bt.call(Bt,ct,Y):bt,Y==null)break t;ct=X({},ct,Y);break t;case 2:tn=!0}}Y=z.callback,Y!==null&&(t.flags|=64,F&&(t.flags|=8192),F=l.callbacks,F===null?l.callbacks=[Y]:F.push(Y))}else F={lane:Y,tag:z.tag,payload:z.payload,callback:z.callback,next:null},at===null?(Z=at=F,D=ct):at=at.next=F,h|=Y;if(z=z.next,z===null){if(z=l.shared.pending,z===null)break;F=z,z=F.next,F.next=null,l.lastBaseUpdate=F,l.shared.pending=null}}while(!0);at===null&&(D=ct),l.baseState=D,l.firstBaseUpdate=Z,l.lastBaseUpdate=at,i===null&&(l.shared.lanes=0),cn|=h,t.lanes=h,t.memoizedState=ct}}function Zf(t,e){if(typeof t!="function")throw Error(s(191,t));t.call(e)}function Xf(t,e){var a=t.callbacks;if(a!==null)for(t.callbacks=null,t=0;t<a.length;t++)Zf(a[t],e)}var nn=lt(null),pr=lt(0);function Qf(t,e){t=Ya,C(pr,t),C(nn,e),Ya=t|e.baseLanes}function gu(){C(pr,Ya),C(nn,nn.current)}function yu(){Ya=pr.current,O(nn),O(pr)}var we=lt(null),ke=null;function ln(t){var e=t.alternate;C(Te,Te.current&1),C(we,t),ke===null&&(e===null||nn.current!==null||e.memoizedState!==null)&&(ke=t)}function vu(t){C(Te,Te.current),C(we,t),ke===null&&(ke=t)}function Kf(t){t.tag===22?(C(Te,Te.current),C(we,t),ke===null&&(ke=t)):rn()}function rn(){C(Te,Te.current),C(we,we.current)}function Ke(t){O(we),ke===t&&(ke=null),O(Te)}var Te=lt(0);function ui(t,e){C(we,we.current),C(Te,e)}function bu(t){O(Te),O(we),ke===t&&(ke=null)}function gr(t){for(var e=t;e!==null;){if(e.tag===13){var a=e.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||Yo(a)||Vo(a)))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!=="independent"){if((e.flags&128)!==0)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var Ha=0,Ut=null,te=null,de=null,yr=!1,dl=!1,Ln=!1,vr=0,oi=0,hl=null,Z1=0;function se(){throw Error(s(321))}function xu(t,e){if(e===null)return!1;for(var a=0;a<e.length&&a<t.length;a++)if(!Qe(t[a],e[a]))return!1;return!0}function _u(t,e,a,n,l,i){return Ha=i,Ut=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,pt.H=t===null||t.memoizedState===null?Cd:Md,Ln=!1,i=a(n,l),Ln=!1,dl&&(i=Wf(e,a,n,l)),Jf(t),i}function Jf(t){pt.H=Nr;var e=te!==null&&te.next!==null;if(Ha=0,de=te=Ut=null,yr=!1,oi=0,hl=null,e)throw Error(s(300));t===null||he||(t=t.dependencies,t!==null&&ur(t)&&(he=!0))}function Wf(t,e,a,n){Ut=t;var l=0;do{if(dl&&(hl=null),oi=0,dl=!1,25<=l)throw Error(s(301));if(l+=1,de=te=null,t.updateQueue!=null){var i=t.updateQueue;i.lastEffect=null,i.events=null,i.stores=null,i.memoCache!=null&&(i.memoCache.index=0)}pt.H=$1,i=e(a,n)}while(dl);return i}function X1(){var t=pt.H,e=t.useState()[0];return e=typeof e.then=="function"?ci(e):e,t=t.useState()[0],(te!==null?te.memoizedState:null)!==t&&(Ut.flags|=1024),e}function Su(){var t=vr!==0;return vr=0,t}function wu(t,e,a){e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~a}function Tu(t){if(yr){for(t=t.memoizedState;t!==null;){var e=t.queue;e!==null&&(e.pending=null),t=t.next}yr=!1}Ha=0,de=te=Ut=null,dl=!1,oi=vr=0,hl=null}function Me(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return de===null?Ut.memoizedState=de=t:de=de.next=t,de}function ce(){if(te===null){var t=Ut.alternate;t=t!==null?t.memoizedState:null}else t=te.next;var e=de===null?Ut.memoizedState:de.next;if(e!==null)de=e,te=t;else{if(t===null)throw Ut.alternate===null?Error(s(467)):Error(s(310));te=t,t={memoizedState:te.memoizedState,baseState:te.baseState,baseQueue:te.baseQueue,queue:te.queue,next:null},de===null?Ut.memoizedState=de=t:de=de.next=t}return de}function br(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ci(t){var e=oi;return oi+=1,hl===null&&(hl=[]),t=Lf(hl,t,e),e=Ut,(de===null?e.memoizedState:de.next)===null&&(e=e.alternate,pt.H=e===null||e.memoizedState===null?Cd:Md),t}function xr(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return ci(t);if(t.$$typeof===K)return;if(t.$$typeof===it)return Se(t)}throw Error(s(438,String(t)))}function Nu(t){var e=null,a=Ut.updateQueue;if(a!==null&&(e=a.memoCache),e==null){var n=Ut.alternate;n!==null&&(n=n.updateQueue,n!==null&&(n=n.memoCache,n!=null&&(e={data:n.data.map(function(l){return l.slice()}),index:0})))}if(e==null&&(e={data:[],index:0}),a===null&&(a=br(),Ut.updateQueue=a),a.memoCache=e,a=e.data[e.index],a===void 0)for(a=e.data[e.index]=Array(t),n=0;n<t;n++)a[n]=kt;return e.index++,a}function La(t,e){return typeof e=="function"?e(t):e}function _r(t){var e=ce();return Eu(e,te,t)}function Eu(t,e,a){var n=t.queue;if(n===null)throw Error(s(311));n.lastRenderedReducer=a;var l=t.baseQueue,i=n.pending;if(i!==null){if(l!==null){var h=l.next;l.next=i.next,i.next=h}e.baseQueue=l=i,n.pending=null}if(i=t.baseState,l===null)t.memoizedState=i;else{e=l.next;var z=h=null,D=null,Z=e,at=!1;do{var ct=Z.lane&-536870913;if(ct!==Z.lane?(Vt&ct)===ct:(Ha&ct)===ct){var Y=Z.revertLane;if(Y===0)D!==null&&(D=D.next={lane:0,revertLane:0,gesture:null,action:Z.action,hasEagerState:Z.hasEagerState,eagerState:Z.eagerState,next:null}),ct===Dn&&(at=!0);else if((Ha&Y)===Y){Z=Z.next,Y===Dn&&(at=!0);continue}else ct={lane:0,revertLane:Z.revertLane,gesture:null,action:Z.action,hasEagerState:Z.hasEagerState,eagerState:Z.eagerState,next:null},D===null?(z=D=ct,h=i):D=D.next=ct,Ut.lanes|=Y,cn|=Y;ct=Z.action,Ln&&a(i,ct),i=Z.hasEagerState?Z.eagerState:a(i,ct)}else Y={lane:ct,revertLane:Z.revertLane,gesture:Z.gesture,action:Z.action,hasEagerState:Z.hasEagerState,eagerState:Z.eagerState,next:null},D===null?(z=D=Y,h=i):D=D.next=Y,Ut.lanes|=ct,cn|=ct;Z=Z.next}while(Z!==null&&Z!==e);if(D===null?h=i:D.next=z,!Qe(i,t.memoizedState)&&(he=!0,at&&(a=ol,a!==null)))throw a;t.memoizedState=i,t.baseState=h,t.baseQueue=D,n.lastRenderedState=i}return l===null&&(n.lanes=0),[t.memoizedState,n.dispatch]}function zu(t){var e=ce(),a=e.queue;if(a===null)throw Error(s(311));a.lastRenderedReducer=t;var n=a.dispatch,l=a.pending,i=e.memoizedState;if(l!==null){a.pending=null;var h=l=l.next;do i=t(i,h.action),h=h.next;while(h!==l);Qe(i,e.memoizedState)||(he=!0),e.memoizedState=i,e.baseQueue===null&&(e.baseState=i),a.lastRenderedState=i}return[i,n]}function If(t,e,a){var n=Ut,l=ce(),i=Lt;if(i){if(a===void 0)throw Error(s(407));a=a()}else a=e();var h=!Qe((te||l).memoizedState,a);if(h&&(l.memoizedState=a,he=!0),l=l.queue,Cu(Pf.bind(null,n,l,t),[t]),t=l.getSnapshot!==e||h||de!==null&&(de.memoizedState.tag&1)!==0,ml(t?9:8,{destroy:void 0},$f.bind(null,n,l,a,e),null),t){if(n.flags|=2048,ee===null)throw Error(s(349));i||(Ha&127)!==0||Ff(n,e,a)}return a}function Ff(t,e,a){t.flags|=16384,t={getSnapshot:e,value:a},e=Ut.updateQueue,e===null?(e=br(),Ut.updateQueue=e,e.stores=[t]):(a=e.stores,a===null?e.stores=[t]:a.push(t))}function $f(t,e,a,n){e.value=a,e.getSnapshot=n,td(e)&&ed(t)}function Pf(t,e,a){return a(function(){td(e)&&ed(t)})}function td(t){var e=t.getSnapshot;t=t.value;try{var a=e();return!Qe(t,a)}catch{return!0}}function ed(t){var e=kn(t,2);e!==null&&Ge(e,t,2)}function ku(t){var e=Me();if(typeof t=="function"){var a=t;if(t=a(),Ln){Qa(!0);try{a()}finally{Qa(!1)}}}return e.memoizedState=e.baseState=t,e.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:La,lastRenderedState:t},e}function ad(t,e,a,n){return t.baseState=a,Eu(t,te,typeof n=="function"?n:La)}function Q1(t,e,a,n,l){if(Tr(t))throw Error(s(485));if(t=e.action,t!==null){var i={payload:l,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(h){i.listeners.push(h)}};pt.T!==null?a(!0):i.isTransition=!1,n(i),a=e.pending,a===null?(i.next=e.pending=i,nd(e,i)):(i.next=a.next,e.pending=a.next=i)}}function nd(t,e){var a=e.action,n=e.payload,l=t.state;if(e.isTransition){var i=pt.T,h={};h.types=i!==null?i.types:null,pt.T=h;try{var z=a(l,n),D=pt.S;D!==null&&D(h,z),ld(t,e,z)}catch(Z){Au(t,e,Z)}finally{i!==null&&h.types!==null&&(i.types=h.types),pt.T=i}}else try{i=a(l,n),ld(t,e,i)}catch(Z){Au(t,e,Z)}}function ld(t,e,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(n){id(t,e,n)},function(n){return Au(t,e,n)}):id(t,e,a)}function id(t,e,a){e.status="fulfilled",e.value=a,rd(e),t.state=a,e=t.pending,e!==null&&(a=e.next,a===e?t.pending=null:(a=a.next,e.next=a,nd(t,a)))}function Au(t,e,a){var n=t.pending;if(t.pending=null,n!==null){n=n.next;do e.status="rejected",e.reason=a,rd(e),e=e.next;while(e!==n)}t.action=null}function rd(t){t=t.listeners;for(var e=0;e<t.length;e++)(0,t[e])()}function sd(t,e){return e}function ud(t,e){if(Lt){var a=ee.formState;if(a!==null){t:{var n=Ut;if(Lt){if(ae){e:{for(var l=ae,i=ra;l.nodeType!==8;){if(!i){l=null;break e}if(l=ua(l.nextSibling),l===null){l=null;break e}}i=l.data,l=i==="F!"||i==="F"?l:null}if(l){ae=ua(l.nextSibling),n=l.data==="F!";break t}}Fa(n)}n=!1}n&&(e=a[0])}}return a=Me(),a.memoizedState=a.baseState=e,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:sd,lastRenderedState:e},a.queue=n,a=zd.bind(null,Ut,n),n.dispatch=a,n=ku(!1),i=Ru.bind(null,Ut,!1,n.queue),n=Me(),l={state:e,dispatch:null,action:t,pending:null},n.queue=l,a=Q1.bind(null,Ut,l,i,a),l.dispatch=a,n.memoizedState=t,[e,a,!1]}function od(t){var e=ce();return cd(e,te,t)}function cd(t,e,a){if(e=Eu(t,e,sd)[0],t=_r(La)[0],typeof e=="object"&&e!==null&&typeof e.then=="function")try{var n=ci(e)}catch(h){throw h===cl?fr:h}else n=e;e=ce();var l=e.queue,i=l.dispatch;return a!==e.memoizedState&&(Ut.flags|=2048,ml(9,{destroy:void 0},K1.bind(null,l,a),null)),[n,i,t]}function K1(t,e){t.action=e}function fd(t){var e=ce(),a=te;if(a!==null)return cd(e,a,t);ce(),e=e.memoizedState,a=ce();var n=a.queue.dispatch;return a.memoizedState=t,[e,n,!1]}function ml(t,e,a,n){return t={tag:t,create:a,deps:n,inst:e,next:null},e=Ut.updateQueue,e===null&&(e=br(),Ut.updateQueue=e),a=e.lastEffect,a===null?e.lastEffect=t.next=t:(n=a.next,a.next=t,t.next=n,e.lastEffect=t),t}function dd(){return ce().memoizedState}function Sr(t,e,a,n){var l=Me();Ut.flags|=t,l.memoizedState=ml(1|e,{destroy:void 0},a,n===void 0?null:n)}function wr(t,e,a,n){var l=ce();n=n===void 0?null:n;var i=l.memoizedState.inst;te!==null&&n!==null&&xu(n,te.memoizedState.deps)?l.memoizedState=ml(e,i,a,n):(Ut.flags|=t,l.memoizedState=ml(1|e,i,a,n))}function hd(t,e){Sr(8390656,8,t,e)}function Cu(t,e){wr(2048,8,t,e)}function J1(t){Ut.flags|=4;var e=Ut.updateQueue;if(e===null)e=br(),Ut.updateQueue=e,e.events=[t];else{var a=e.events;a===null?e.events=[t]:a.push(t)}}function md(t){var e=ce().memoizedState;return J1({ref:e,nextImpl:t}),function(){if((Jt&2)!==0)throw Error(s(440));return e.impl.apply(void 0,arguments)}}function pd(t,e){return wr(4,2,t,e)}function gd(t,e){return wr(4,4,t,e)}function yd(t,e){if(typeof e=="function"){t=t();var a=e(t);return function(){typeof a=="function"?a():e(null)}}if(e!=null)return t=t(),e.current=t,function(){e.current=null}}function vd(t,e,a){a=a!=null?a.concat([t]):null,wr(4,4,yd.bind(null,e,t),a)}function Mu(){}function bd(t,e){var a=ce();e=e===void 0?null:e;var n=a.memoizedState;return e!==null&&xu(e,n[1])?n[0]:(a.memoizedState=[t,e],t)}function xd(t,e){var a=ce();e=e===void 0?null:e;var n=a.memoizedState;if(e!==null&&xu(e,n[1]))return n[0];if(n=t(),Ln){Qa(!0);try{t()}finally{Qa(!1)}}return a.memoizedState=[n,e],n}function Ou(t,e,a){return a===void 0||(Ha&1073741824)!==0&&(Vt&261930)===0?t.memoizedState=e:(t.memoizedState=a,t=Ch(),Ut.lanes|=t,cn|=t,a)}function _d(t,e,a,n){return Qe(a,e)?a:nn.current!==null?(t=Ou(t,a,n),Qe(t,e)||(he=!0),t):(Ha&106)===0||(Ha&1073741824)!==0&&(Vt&261930)===0?(he=!0,t.memoizedState=a):(t=Ch(),Ut.lanes|=t,cn|=t,e)}function Sd(t,e,a,n,l){var i=_t.p;_t.p=i!==0&&8>i?i:8;var h=pt.T,z={};z.types=h!==null?h.types:null,pt.T=z,Ru(t,!1,e,a);try{var D=l(),Z=pt.S;if(Z!==null&&Z(z,D),D!==null&&typeof D=="object"&&typeof D.then=="function"){var at=V1(D,n);fi(t,e,at,Fe(t))}else fi(t,e,n,Fe(t))}catch(ct){fi(t,e,{then:function(){},status:"rejected",reason:ct},Fe())}finally{_t.p=i,h!==null&&z.types!==null&&(h.types=z.types),pt.T=h}}function W1(){}function ju(t,e,a,n){if(t.tag!==5)throw Error(s(476));var l=wd(t).queue;Sd(t,l,e,Ht,a===null?W1:function(){return Td(t),a(n)})}function wd(t){var e=t.memoizedState;if(e!==null)return e;e={memoizedState:Ht,baseState:Ht,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:La,lastRenderedState:Ht},next:null};var a={};return e.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:La,lastRenderedState:a},next:null},t.memoizedState=e,t=t.alternate,t!==null&&(t.memoizedState=e),e}function Td(t){var e=wd(t);e.next===null&&(e=t.alternate.memoizedState),fi(t,e.next.queue,{},Fe())}function Du(){return Se(jl)}function Nd(){return ce().memoizedState}function Ed(){return ce().memoizedState}function I1(t){for(var e=t.return;e!==null;){switch(e.tag){case 24:case 3:var a=Fe();t=en(a);var n=an(e,t,a);n!==null&&(Ge(n,e,a),ii(n,e,a)),e={cache:uu()},t.payload=e;return}e=e.return}}function F1(t,e,a){var n=Fe();a={lane:n,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Tr(t)?kd(e,a):(a=Ps(t,e,a,n),a!==null&&(Ge(a,t,n),Ad(a,e,n)))}function zd(t,e,a){var n=Fe();fi(t,e,a,n)}function fi(t,e,a,n){var l={lane:n,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(Tr(t))kd(e,l);else{var i=t.alternate;if(t.lanes===0&&(i===null||i.lanes===0)&&(i=e.lastRenderedReducer,i!==null))try{var h=e.lastRenderedState,z=i(h,a);if(l.hasEagerState=!0,l.eagerState=z,Qe(z,h))return er(t,e,l,0),ee===null&&tr(),!1}catch{}finally{}if(a=Ps(t,e,l,n),a!==null)return Ge(a,t,n),Ad(a,e,n),!0}return!1}function Ru(t,e,a,n){if(n={lane:2,revertLane:Eo(),gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Tr(t)){if(e)throw Error(s(479))}else e=Ps(t,a,n,2),e!==null&&Ge(e,t,2)}function Tr(t){var e=t.alternate;return t===Ut||e!==null&&e===Ut}function kd(t,e){dl=yr=!0;var a=t.pending;a===null?e.next=e:(e.next=a.next,a.next=e),t.pending=e}function Ad(t,e,a){if((a&4194048)!==0){var n=e.lanes;n&=t.pendingLanes,a|=n,e.lanes=a,Ac(t,a)}}var Nr={readContext:Se,use:xr,useCallback:se,useContext:se,useEffect:se,useImperativeHandle:se,useLayoutEffect:se,useInsertionEffect:se,useMemo:se,useReducer:se,useRef:se,useState:se,useDebugValue:se,useDeferredValue:se,useTransition:se,useSyncExternalStore:se,useId:se,useHostTransitionStatus:se,useFormState:se,useActionState:se,useOptimistic:se,useMemoCache:se,useCacheRefresh:se,useEffectEvent:se},Cd={readContext:Se,use:xr,useCallback:function(t,e){return Me().memoizedState=[t,e===void 0?null:e],t},useContext:Se,useEffect:hd,useImperativeHandle:function(t,e,a){a=a!=null?a.concat([t]):null,Sr(4194308,4,yd.bind(null,e,t),a)},useLayoutEffect:function(t,e){return Sr(4194308,4,t,e)},useInsertionEffect:function(t,e){Sr(4,2,t,e)},useMemo:function(t,e){var a=Me();e=e===void 0?null:e;var n=t();if(Ln){Qa(!0);try{t()}finally{Qa(!1)}}return a.memoizedState=[n,e],n},useReducer:function(t,e,a){var n=Me();if(a!==void 0){var l=a(e);if(Ln){Qa(!0);try{a(e)}finally{Qa(!1)}}}else l=e;return n.memoizedState=n.baseState=l,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:l},n.queue=t,t=t.dispatch=F1.bind(null,Ut,t),[n.memoizedState,t]},useRef:function(t){var e=Me();return t={current:t},e.memoizedState=t},useState:function(t){t=ku(t);var e=t.queue,a=zd.bind(null,Ut,e);return e.dispatch=a,[t.memoizedState,a]},useDebugValue:Mu,useDeferredValue:function(t,e){var a=Me();return Ou(a,t,e)},useTransition:function(){var t=ku(!1);return t=Sd.bind(null,Ut,t.queue,!0,!1),Me().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,e,a){var n=Ut,l=Me();if(Lt){if(a===void 0)throw Error(s(407));a=a()}else{if(a=e(),ee===null)throw Error(s(349));(Vt&127)!==0||Ff(n,e,a)}l.memoizedState=a;var i={value:a,getSnapshot:e};return l.queue=i,hd(Pf.bind(null,n,i,t),[t]),n.flags|=2048,ml(9,{destroy:void 0},$f.bind(null,n,i,a,e),null),a},useId:function(){var t=Me(),e=ee.identifierPrefix;if(Lt){var a=va,n=ya;a=(n&~(1<<32-Ze(n)-1)).toString(32)+a,e="_"+e+"R_"+a,a=vr++,0<a&&(e+="H"+a.toString(32)),e+="_"}else a=Z1++,e="_"+e+"r_"+a.toString(32)+"_";return t.memoizedState=e},useHostTransitionStatus:Du,useFormState:ud,useActionState:ud,useOptimistic:function(t){var e=Me();e.memoizedState=e.baseState=t;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return e.queue=a,e=Ru.bind(null,Ut,!0,a),a.dispatch=e,[t,e]},useMemoCache:Nu,useCacheRefresh:function(){return Me().memoizedState=I1.bind(null,Ut)},useEffectEvent:function(t){var e=Me(),a={impl:t};return e.memoizedState=a,function(){if((Jt&2)!==0)throw Error(s(440));return a.impl.apply(void 0,arguments)}}},Md={readContext:Se,use:xr,useCallback:bd,useContext:Se,useEffect:Cu,useImperativeHandle:vd,useInsertionEffect:pd,useLayoutEffect:gd,useMemo:xd,useReducer:_r,useRef:dd,useState:function(){return _r(La)},useDebugValue:Mu,useDeferredValue:function(t,e){var a=ce();return _d(a,te.memoizedState,t,e)},useTransition:function(){var t=_r(La)[0],e=ce().memoizedState;return[typeof t=="boolean"?t:ci(t),e]},useSyncExternalStore:If,useId:Nd,useHostTransitionStatus:Du,useFormState:od,useActionState:od,useOptimistic:function(t,e){var a=ce();return ad(a,te,t,e)},useMemoCache:Nu,useCacheRefresh:Ed,useEffectEvent:md},$1={readContext:Se,use:xr,useCallback:bd,useContext:Se,useEffect:Cu,useImperativeHandle:vd,useInsertionEffect:pd,useLayoutEffect:gd,useMemo:xd,useReducer:zu,useRef:dd,useState:function(){return zu(La)},useDebugValue:Mu,useDeferredValue:function(t,e){var a=ce();return te===null?Ou(a,t,e):_d(a,te.memoizedState,t,e)},useTransition:function(){var t=zu(La)[0],e=ce().memoizedState;return[typeof t=="boolean"?t:ci(t),e]},useSyncExternalStore:If,useId:Nd,useHostTransitionStatus:Du,useFormState:fd,useActionState:fd,useOptimistic:function(t,e){var a=ce();return te!==null?ad(a,te,t,e):(a.baseState=t,[t,a.queue.dispatch])},useMemoCache:Nu,useCacheRefresh:Ed,useEffectEvent:md};function Uu(t,e,a,n){e=t.memoizedState,a=a(n,e),a=a==null?e:X({},e,a),t.memoizedState=a,t.lanes===0&&(t.updateQueue.baseState=a)}var Bu={enqueueSetState:function(t,e,a){t=t._reactInternals;var n=Fe(),l=en(n);l.payload=e,a!=null&&(l.callback=a),e=an(t,l,n),e!==null&&(Ge(e,t,n),ii(e,t,n))},enqueueReplaceState:function(t,e,a){t=t._reactInternals;var n=Fe(),l=en(n);l.tag=1,l.payload=e,a!=null&&(l.callback=a),e=an(t,l,n),e!==null&&(Ge(e,t,n),ii(e,t,n))},enqueueForceUpdate:function(t,e){t=t._reactInternals;var a=Fe(),n=en(a);n.tag=2,e!=null&&(n.callback=e),e=an(t,n,a),e!==null&&(Ge(e,t,a),ii(e,t,a))}};function Od(t,e,a,n,l,i,h){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(n,i,h):e.prototype&&e.prototype.isPureReactComponent?!Fl(a,n)||!Fl(l,i):!0}function jd(t,e,a,n){t=e.state,typeof e.componentWillReceiveProps=="function"&&e.componentWillReceiveProps(a,n),typeof e.UNSAFE_componentWillReceiveProps=="function"&&e.UNSAFE_componentWillReceiveProps(a,n),e.state!==t&&Bu.enqueueReplaceState(e,e.state,null)}function Gn(t,e){var a=e;if("ref"in e){a={};for(var n in e)n!=="ref"&&(a[n]=e[n])}if(t=t.defaultProps){a===e&&(a=X({},a));for(var l in t)a[l]===void 0&&(a[l]=t[l])}return a}function Dd(t){Pi(t)}function Rd(t){console.error(t)}function Ud(t){Pi(t)}function Er(t,e){try{var a=t.onUncaughtError;a(e.value,{componentStack:e.stack})}catch(n){setTimeout(function(){throw n})}}function Bd(t,e,a){try{var n=t.onCaughtError;n(a.value,{componentStack:a.stack,errorBoundary:e.tag===1?e.stateNode:null})}catch(l){setTimeout(function(){throw l})}}function Hu(t,e,a){return a=en(a),a.tag=3,a.payload={element:null},a.callback=function(){Er(t,e)},a}function Hd(t){return t=en(t),t.tag=3,t}function Ld(t,e,a,n){var l=a.type.getDerivedStateFromError;if(typeof l=="function"){var i=n.value;t.payload=function(){return l(i)},t.callback=function(){Bd(e,a,n)}}var h=a.stateNode;h!==null&&typeof h.componentDidCatch=="function"&&(t.callback=function(){Bd(e,a,n),typeof l!="function"&&(fn===null?fn=new Set([this]):fn.add(this));var z=n.stack;this.componentDidCatch(n.value,{componentStack:z!==null?z:""})})}function P1(t,e,a,n,l){if(a.flags|=32768,n!==null&&typeof n=="object"&&typeof n.then=="function"){if(e=a.alternate,e!==null&&On(e,a,l,!0),a=we.current,a!==null){switch(a.tag){case 31:case 13:case 19:return ke===null?Kr():a.alternate===null&&ue===0&&(ue=3),a.flags&=-257,a.flags|=65536,a.lanes=l,n===dr?a.flags|=16384:(e=a.updateQueue,e===null?a.updateQueue=new Set([n]):e.add(n),wo(t,n,l)),!1;case 22:return a.flags|=65536,n===dr?a.flags|=16384:(e=a.updateQueue,e===null?(e={transitions:null,markerInstances:null,retryQueue:new Set([n])},a.updateQueue=e):(a=e.retryQueue,a===null?e.retryQueue=new Set([n]):a.add(n)),wo(t,n,l)),!1}throw Error(s(435,a.tag))}return wo(t,n,l),Kr(),!1}if(Lt)return e=we.current,e!==null?((e.flags&65536)===0&&(e.flags|=256),e.flags|=65536,e.lanes=l,n!==lu&&(t=Error(s(422),{cause:n}),ti(na(t,a)))):(n!==lu&&(e=Error(s(423),{cause:n}),ti(na(e,a))),t=t.current.alternate,t.flags|=65536,l&=-l,t.lanes|=l,n=na(n,a),l=Hu(t.stateNode,n,l),mu(t,l),ue!==4&&(ue=2)),!1;var i=Error(s(520),{cause:n});if(i=na(i,a),bi===null?bi=[i]:bi.push(i),ue!==4&&(ue=2),e===null)return!0;n=na(n,a),a=e;do{switch(a.tag){case 3:return a.flags|=65536,t=l&-l,a.lanes|=t,t=Hu(a.stateNode,n,t),mu(a,t),!1;case 1:if(e=a.type,i=a.stateNode,(a.flags&128)===0&&(typeof e.getDerivedStateFromError=="function"||i!==null&&typeof i.componentDidCatch=="function"&&(fn===null||!fn.has(i))))return a.flags|=65536,l&=-l,a.lanes|=l,l=Hd(l),Ld(l,t,a,n),mu(a,l),!1;break;case 22:if(a.memoizedState!==null)return a.flags|=65536,!1}a=a.return}while(a!==null);return!1}var Lu=Error(s(461)),he=!1;function pe(t,e,a,n){e.child=t===null?Vf(e,null,a,n):Hn(e,t.child,a,n)}function Gd(t,e,a,n,l){a=a.render;var i=e.ref;if("ref"in n){var h={};for(var z in n)z!=="ref"&&(h[z]=n[z])}else h=n;return jn(e),n=_u(t,e,a,h,i,l),z=Su(),t!==null&&!he?(wu(t,e,l),Ga(t,e,l)):(Lt&&z&&ir(e),e.flags|=1,pe(t,e,n,l),e.child)}function qd(t,e,a,n,l){if(t===null){var i=a.type;return typeof i=="function"&&!tu(i)&&i.defaultProps===void 0&&a.compare===null?(e.tag=15,e.type=i,Yd(t,e,i,n,l)):(t=nr(a.type,null,n,e,e.mode,l),t.ref=e.ref,t.return=e,e.child=t)}if(i=t.child,!Ku(t,l)){var h=i.memoizedProps;if(a=a.compare,a=a!==null?a:Fl,a(h,n)&&t.ref===e.ref)return Ga(t,e,l)}return e.flags|=1,t=Da(i,n),t.ref=e.ref,t.return=e,e.child=t}function Yd(t,e,a,n,l){if(t!==null){var i=t.memoizedProps;if(Fl(i,n)&&t.ref===e.ref)if(he=!1,e.pendingProps=n=i,Ku(t,l))(t.flags&131072)!==0&&(he=!0);else return e.lanes=t.lanes,Ga(t,e,l)}return Gu(t,e,a,n,l)}function Vd(t,e,a,n){var l=n.children,i=t!==null?t.memoizedState:null;if(t===null&&e.stateNode===null&&(e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.mode==="hidden"){if((e.flags&128)!==0){if(i=i!==null?i.baseLanes|a:a,t!==null){for(n=e.child=t.child,l=0;n!==null;)l=l|n.lanes|n.childLanes,n=n.sibling;n=l&~i}else n=0,e.child=null;return Zd(t,e,i,a,n)}if((a&536870912)!==0)e.memoizedState={baseLanes:0,cachePool:null},t!==null&&cr(e,i!==null?i.cachePool:null),i!==null?Qf(e,i):gu(),Kf(e);else return n=e.lanes=536870912,Zd(t,e,i!==null?i.baseLanes|a:a,a,n)}else i!==null?(cr(e,i.cachePool),Qf(e,i),rn(),e.memoizedState=null):(t!==null&&cr(e,null),gu(),rn());return pe(t,e,l,a),e.child}function di(t,e){return t!==null&&t.tag===22||e.stateNode!==null||(e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),e.sibling}function Zd(t,e,a,n,l){var i=cu();return i=i===null?null:{parent:fe._currentValue,pool:i},e.memoizedState={baseLanes:a,cachePool:i},t!==null&&cr(e,null),gu(),Kf(e),t!==null&&On(t,e,n,!0),e.childLanes=l,null}function zr(t,e){return e=kr({mode:e.mode,children:e.children},t.mode),e.ref=t.ref,t.child=e,e.return=t,e}function Xd(t,e,a){return Hn(e,t.child,null,a),t=zr(e,e.pendingProps),t.flags|=2,Ke(e),e.memoizedState=null,t}function tp(t,e,a){var n=e.pendingProps,l=(e.flags&128)!==0;if(e.flags&=-129,t===null){if(Lt){if(n.mode==="hidden")return t=zr(e,n),e.lanes=536870912,t.memoizedState={baseLanes:0,cachePool:null},di(null,t);if(vu(e),(t=ae)?(t=y0(t,ra),t=t!==null&&t.data==="&"?t:null,t!==null&&(e.memoizedState={dehydrated:t,treeContext:Wa!==null?{id:ya,overflow:va}:null,retryLane:536870912,hydrationErrors:null},a=kf(t),a.return=e,e.child=a,ye=e,ae=null)):t=null,t===null)throw Fa(e);return e.lanes=536870912,null}return zr(e,n)}var i=t.memoizedState;if(i!==null){var h=i.dehydrated;if(vu(e),l)if(e.flags&256)e.flags&=-257,e=Xd(t,e,a);else if(e.memoizedState!==null)e.child=t.child,e.flags|=128,e=null;else throw Error(s(558));else if(he||On(t,e,a,!1),l=(a&t.childLanes)!==0,he||l){if(nn.current===null){if(n=ee,n!==null&&(h=Cc(n,a),h!==0&&h!==i.retryLane))throw i.retryLane=h,kn(t,h),Ge(n,t,h),Lu;Kr()}e=Xd(t,e,a)}else t=i.treeContext,ae=ua(h.nextSibling),ye=e,Lt=!0,Ia=null,ra=!1,t!==null&&Mf(e,t),e=zr(e,n),e.flags|=134221824;return e}return t=Da(t.child,{mode:n.mode,children:n.children}),t.ref=e.ref,e.child=t,t.return=e,t}function pl(t,e){var a=e.ref;if(a===null)t!==null&&t.ref!==null&&(e.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(s(284));(t===null||t.ref!==a)&&(e.flags|=4194816)}}function Gu(t,e,a,n,l){return jn(e),a=_u(t,e,a,n,void 0,l),n=Su(),t!==null&&!he?(wu(t,e,l),Ga(t,e,l)):(Lt&&n&&ir(e),e.flags|=1,pe(t,e,a,l),e.child)}function Qd(t,e,a,n,l,i){return jn(e),e.updateQueue=null,a=Wf(e,n,a,l),Jf(t),n=Su(),t!==null&&!he?(wu(t,e,i),Ga(t,e,i)):(Lt&&n&&ir(e),e.flags|=1,pe(t,e,a,i),e.child)}function Kd(t,e,a,n,l){if(jn(e),e.stateNode===null){var i=il,h=a.contextType;typeof h=="object"&&h!==null&&(i=Se(h)),i=new a(n,i),e.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,i.updater=Bu,e.stateNode=i,i._reactInternals=e,i=e.stateNode,i.props=n,i.state=e.memoizedState,i.refs={},du(e),h=a.contextType,i.context=typeof h=="object"&&h!==null?Se(h):il,i.state=e.memoizedState,h=a.getDerivedStateFromProps,typeof h=="function"&&(Uu(e,a,h,n),i.state=e.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(h=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),h!==i.state&&Bu.enqueueReplaceState(i,i.state,null),si(e,n,i,l),ri(),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308),n=!0}else if(t===null){i=e.stateNode;var z=e.memoizedProps,D=Gn(a,z);i.props=D;var Z=i.context,at=a.contextType;h=il,typeof at=="object"&&at!==null&&(h=Se(at));var ct=a.getDerivedStateFromProps;at=typeof ct=="function"||typeof i.getSnapshotBeforeUpdate=="function",z=e.pendingProps!==z,at||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(z||Z!==h)&&jd(e,i,n,h),tn=!1;var Y=e.memoizedState;i.state=Y,si(e,n,i,l),ri(),Z=e.memoizedState,z||Y!==Z||tn?(typeof ct=="function"&&(Uu(e,a,ct,n),Z=e.memoizedState),(D=tn||Od(e,a,D,n,Y,Z,h))?(at||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(e.flags|=4194308)):(typeof i.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=n,e.memoizedState=Z),i.props=n,i.state=Z,i.context=h,n=D):(typeof i.componentDidMount=="function"&&(e.flags|=4194308),n=!1)}else{i=e.stateNode,hu(t,e),h=e.memoizedProps,at=Gn(a,h),i.props=at,ct=e.pendingProps,Y=i.context,Z=a.contextType,D=il,typeof Z=="object"&&Z!==null&&(D=Se(Z)),z=a.getDerivedStateFromProps,(Z=typeof z=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(h!==ct||Y!==D)&&jd(e,i,n,D),tn=!1,Y=e.memoizedState,i.state=Y,si(e,n,i,l),ri();var F=e.memoizedState;h!==ct||Y!==F||tn||t!==null&&t.dependencies!==null&&ur(t.dependencies)?(typeof z=="function"&&(Uu(e,a,z,n),F=e.memoizedState),(at=tn||Od(e,a,at,n,Y,F,D)||t!==null&&t.dependencies!==null&&ur(t.dependencies))?(Z||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(n,F,D),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(n,F,D)),typeof i.componentDidUpdate=="function"&&(e.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof i.componentDidUpdate!="function"||h===t.memoizedProps&&Y===t.memoizedState||(e.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||h===t.memoizedProps&&Y===t.memoizedState||(e.flags|=1024),e.memoizedProps=n,e.memoizedState=F),i.props=n,i.state=F,i.context=D,n=at):(typeof i.componentDidUpdate!="function"||h===t.memoizedProps&&Y===t.memoizedState||(e.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||h===t.memoizedProps&&Y===t.memoizedState||(e.flags|=1024),n=!1)}return i=n,pl(t,e),n=(e.flags&128)!==0,i||n?(i=e.stateNode,a=n&&typeof a.getDerivedStateFromError!="function"?null:i.render(),e.flags|=1,t!==null&&n?(e.child=Hn(e,t.child,null,l),e.child=Hn(e,null,a,l)):pe(t,e,a,l),e.memoizedState=i.state,t=e.child):t=Ga(t,e,l),t}function Jd(t,e,a,n){return Cn(),e.flags|=256,pe(t,e,a,n),e.child}var qu={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Yu(t){return{baseLanes:t,cachePool:Bf()}}function Vu(t,e,a){return t=t!==null?t.childLanes&~a:0,e&&(t|=Ie),t}function Wd(t,e,a){var n=e.pendingProps,l=!1,i=(e.flags&128)!==0,h;if((h=i)||(h=t!==null&&t.memoizedState===null?!1:(Te.current&2)!==0),h&&(l=!0,e.flags&=-129),h=(e.flags&32)!==0,e.flags&=-33,t===null){if(Lt){if(l?ln(e):rn(),(t=ae)?(t=y0(t,ra),t=t!==null&&t.data!=="&"?t:null,t!==null&&(e.memoizedState={dehydrated:t,treeContext:Wa!==null?{id:ya,overflow:va}:null,retryLane:536870912,hydrationErrors:null},a=kf(t),a.return=e,e.child=a,ye=e,ae=null)):t=null,t===null)throw Fa(e);return Vo(t)?e.lanes=32:e.lanes=536870912,null}return i=n.children,n=n.fallback,l?(rn(),l=e.mode,i=kr({mode:"hidden",children:i},l),n=An(n,l,a,null),i.return=e,n.return=e,i.sibling=n,e.child=i,n=e.child,n.memoizedState=Yu(a),n.childLanes=Vu(t,h,a),e.memoizedState=qu,di(null,n)):(ln(e),Zu(e,i))}var z=t.memoizedState;if(z!==null){var D=z.dehydrated;if(D!==null)return ep(t,e,i,h,n,D,z,a)}return l?(rn(),l=n.fallback,i=e.mode,z=t.child,D=z.sibling,n=Da(z,{mode:"hidden",children:n.children}),n.subtreeFlags=z.subtreeFlags&1206910976,D!==null?l=Da(D,l):(l=An(l,i,a,null),l.flags|=2),l.return=e,n.return=e,n.sibling=l,e.child=n,di(null,n),n=e.child,l=t.child.memoizedState,l===null?l=Yu(a):(i=l.cachePool,i!==null?(z=fe._currentValue,i=i.parent!==z?{parent:z,pool:z}:i):i=Bf(),l={baseLanes:l.baseLanes|a,cachePool:i}),n.memoizedState=l,n.childLanes=Vu(t,h,a),e.memoizedState=qu,di(t.child,n)):(ln(e),a=t.child,t=a.sibling,a=Da(a,{mode:"visible",children:n.children}),a.return=e,a.sibling=null,t!==null&&(h=e.deletions,h===null?(e.deletions=[t],e.flags|=16):h.push(t)),e.child=a,e.memoizedState=null,a)}function Zu(t,e){return e=kr({mode:"visible",children:e},t.mode),e.return=t,t.child=e}function kr(t,e){return t=Ue(22,t,null,e),t.lanes=0,t}function Ar(t,e,a){return Hn(e,t.child,null,a),t=Zu(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function ep(t,e,a,n,l,i,h,z){if(a)return e.flags&256?(ln(e),e.flags&=-257,Ar(t,e,z)):e.memoizedState!==null?(rn(),e.child=t.child,e.flags|=128,null):(rn(),i=l.fallback,h=e.mode,l=kr({mode:"visible",children:l.children},h),i=An(i,h,z,null),i.flags|=2,l.return=e,i.return=e,l.sibling=i,e.child=l,Hn(e,t.child,null,z),l=e.child,l.memoizedState=Yu(z),l.childLanes=Vu(t,n,z),e.memoizedState=qu,di(null,l));if(ln(e),Vo(i)){if(n=i.nextSibling&&i.nextSibling.dataset,n)var D=n.dgst;return n=D,n!==""&&(l=Error(s(419)),l.stack="",l.digest=n,ti({value:l,source:null,stack:null})),Ar(t,e,z)}if(he||On(t,e,z,!1),n=(z&t.childLanes)!==0,he||n){if(nn.current!==null)return Ar(t,e,z);if(n=ee,n!==null&&(l=Cc(n,z),l!==0&&l!==h.retryLane))throw h.retryLane=l,kn(t,l),Ge(n,t,l),Lu;return Yo(i)||Kr(),Ar(t,e,z)}return Yo(i)?(e.flags|=192,e.child=t.child,null):(t=h.treeContext,ae=ua(i.nextSibling),ye=e,Lt=!0,Ia=null,ra=!1,t!==null&&Mf(e,t),e=Zu(e,l.children),e.flags|=134221824,e)}function Id(t,e,a){t.lanes|=e;var n=t.alternate;n!==null&&(n.lanes|=e),sr(t.return,e,a)}function Fd(t){for(var e=null;t!==null;){var a=t.alternate;a!==null&&gr(a)===null&&(e=t),t=t.sibling}return e}function Cr(t,e,a,n,l,i){var h=t.memoizedState;h===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:n,tail:a,tailMode:l,treeForkCount:i}:(h.isBackwards=e,h.rendering=null,h.renderingStartTime=0,h.last=n,h.tail=a,h.tailMode=l,h.treeForkCount=i)}function Xu(t){var e=t.child;for(t.child=null;e!==null;){var a=e.sibling;e.sibling=t.child,t.child=e,e=a}}function Qu(t,e,a){var n=e.pendingProps,l=n.revealOrder,i=n.tail;n=n.children;var h=Te.current;if(e.flags&128)return ui(e,h),null;var z=(h&2)!==0;if(z?(h=h&1|2,e.flags|=128):h&=1,ui(e,h),l==="backwards"&&t!==null?(Xu(t),pe(t,e,n,a),Xu(t)):pe(t,e,n,a),n=Lt?Pl:0,!z&&t!==null&&(t.flags&128)!==0)t:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&Id(t,a,e);else if(t.tag===19)Id(t,a,e);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break t;for(;t.sibling===null;){if(t.return===null||t.return===e)break t;t=t.return}t.sibling.return=t.return,t=t.sibling}switch(l){case"backwards":a=Fd(e.child),a===null?(l=e.child,e.child=null):(l=a.sibling,a.sibling=null,Xu(e)),Cr(e,!0,l,null,i,n);break;case"unstable_legacy-backwards":for(a=null,l=e.child,e.child=null;l!==null;){if(t=l.alternate,t!==null&&gr(t)===null){e.child=l;break}t=l.sibling,l.sibling=a,a=l,l=t}Cr(e,!0,a,null,i,n);break;case"together":Cr(e,!1,null,null,void 0,n);break;case"independent":e.memoizedState=null;break;default:a=Fd(e.child),a===null?(l=e.child,e.child=null):(l=a.sibling,a.sibling=null),Cr(e,!1,l,a,i,n)}return e.child}function $d(t,e,a){var n=e.pendingProps;return $a(e,e.type,n.value),pe(t,e,n.children,a),e.child}function Ga(t,e,a){if(t!==null&&(e.dependencies=t.dependencies),cn|=e.lanes,(a&e.childLanes)===0)if(t!==null){if(On(t,e,a,!1),(a&e.childLanes)===0)return null}else return null;if(t!==null&&e.child!==t.child)throw Error(s(153));if(e.child!==null){for(t=e.child,a=Da(t,t.pendingProps),e.child=a,a.return=e;t.sibling!==null;)t=t.sibling,a=a.sibling=Da(t,t.pendingProps),a.return=e;a.sibling=null}return e.child}function Ku(t,e){return(t.lanes&e)!==0?!0:(t=t.dependencies,!!(t!==null&&ur(t)))}function ap(t,e,a){switch(e.tag){case 3:gt(e,e.stateNode.containerInfo),$a(e,fe,t.memoizedState.cache),Cn();break;case 27:case 5:yt(e);break;case 4:gt(e,e.stateNode.containerInfo);break;case 10:$a(e,e.type,e.memoizedProps.value);break;case 31:if(e.memoizedState!==null)return e.flags|=128,vu(e),null;break;case 13:var n=e.memoizedState;if(n!==null){if(n.dehydrated!==null)return ln(e),e.flags|=128,null;n=On(t,e,a,!1);var l=e.child.childLanes;return n||(a&l)!==0?Wd(t,e,a):(ln(e),t=Ga(t,e,a),t!==null?t.sibling:null)}ln(e);break;case 19:if(e.flags&128)return Qu(t,e,a);if(l=(t.flags&128)!==0,n=(a&e.childLanes)!==0,n||(On(t,e,a,!1),n=(a&e.childLanes)!==0),l){if(n)return Qu(t,e,a);e.flags|=128}if(l=e.memoizedState,l!==null&&(l.rendering=null,l.tail=null,l.lastEffect=null),ui(e,Te.current),n)break;return null;case 22:return e.lanes=0,Vd(t,e,a,e.pendingProps);case 24:$a(e,fe,t.memoizedState.cache)}return Ga(t,e,a)}function Pd(t,e,a){if(t!==null)if(t.memoizedProps!==e.pendingProps)he=!0;else{if(!Ku(t,a)&&(e.flags&128)===0)return he=!1,ap(t,e,a);he=(t.flags&131072)!==0}else he=!1,Lt&&(e.flags&1048576)!==0&&Cf(e,Pl,e.index);switch(e.lanes=0,e.tag){case 16:t:{var n=e.pendingProps;if(t=Un(e.elementType),e.type=t,typeof t=="function")tu(t)?(n=Gn(t,n),e.tag=1,e=Kd(null,e,t,n,a)):(e.tag=0,e=Gu(null,e,t,n,a));else{if(t!=null){var l=t.$$typeof;if(l===G){e.tag=11,e=Gd(null,e,t,n,a);break t}else if(l===nt){e.tag=14,e=qd(null,e,t,n,a);break t}else if(l===it){e.tag=10,e.type=t,e=$d(null,e,a);break t}}throw e=ft(t)||t,Error(s(306,e,""))}}return e;case 0:return Gu(t,e,e.type,e.pendingProps,a);case 1:return n=e.type,l=Gn(n,e.pendingProps),Kd(t,e,n,l,a);case 3:t:{if(gt(e,e.stateNode.containerInfo),t===null)throw Error(s(387));n=e.pendingProps;var i=e.memoizedState;l=i.element,hu(t,e),si(e,n,null,a);var h=e.memoizedState;if(n=h.cache,$a(e,fe,n),n!==i.cache&&su(e,[fe],a,!0),ri(),n=h.element,i.isDehydrated)if(i={element:n,isDehydrated:!1,cache:h.cache},e.updateQueue.baseState=i,e.memoizedState=i,e.flags&256){e=Jd(t,e,n,a);break t}else if(n!==l){l=na(Error(s(424)),e),ti(l),e=Jd(t,e,n,a);break t}else{switch(t=e.stateNode.containerInfo,t.nodeType){case 9:t=t.body;break;default:t=t.nodeName==="HTML"?t.ownerDocument.body:t}for(ae=ua(t.firstChild),ye=e,Lt=!0,Ia=null,ra=!0,a=Vf(e,null,n,a),e.child=a;a;)a.flags=a.flags&-3|134221824,a=a.sibling}else{if(Cn(),n===l){e=Ga(t,e,a);break t}pe(t,e,n,a)}e=e.child}return e;case 26:return pl(t,e),t===null?(a=T0(e.type,null,e.pendingProps,null))?e.memoizedState=a:Lt||(e.stateNode=n0(e.type,e.pendingProps,ht.current,e)):e.memoizedState=T0(e.type,t.memoizedProps,e.pendingProps,t.memoizedState),null;case 27:return yt(e),t===null&&Lt&&(n=e.stateNode=x0(e.type,e.pendingProps,ht.current),ye=e,ra=!0,l=ae,mn(e.type)?(Zo=l,ae=ua(n.firstChild)):ae=l),pe(t,e,e.pendingProps.children,a),pl(t,e),t===null&&(e.flags|=4194304),e.child;case 5:return t===null&&Lt&&((l=n=ae)&&(n=Ip(n,e.type,e.pendingProps,ra),n!==null?(e.stateNode=n,ye=e,ae=ua(n.firstChild),ra=!1,l=!0):l=!1),l||Fa(e)),yt(e),l=e.type,i=e.pendingProps,h=t!==null?t.memoizedProps:null,n=i.children,Ro(l,i)?n=null:h!==null&&Ro(l,h)&&(e.flags|=32),e.memoizedState!==null&&(l=_u(t,e,X1,null,null,a),jl._currentValue=l),pl(t,e),pe(t,e,n,a),e.child;case 6:return t===null&&Lt&&((t=a=ae)&&(a=Fp(a,e.pendingProps,ra),a!==null?(e.stateNode=a,ye=e,ae=null,t=!0):t=!1),t||Fa(e)),null;case 13:return Wd(t,e,a);case 4:return gt(e,e.stateNode.containerInfo),n=e.pendingProps,t===null?e.child=Hn(e,null,n,a):pe(t,e,n,a),e.child;case 11:return Gd(t,e,e.type,e.pendingProps,a);case 7:return n=e.pendingProps,pl(t,e),pe(t,e,n,a),e.child;case 8:return pe(t,e,e.pendingProps.children,a),e.child;case 12:return pe(t,e,e.pendingProps.children,a),e.child;case 10:return $d(t,e,a);case 9:return l=e.type._context,n=e.pendingProps.children,jn(e),l=Se(l),n=n(l),e.flags|=1,pe(t,e,n,a),e.child;case 14:return qd(t,e,e.type,e.pendingProps,a);case 15:return Yd(t,e,e.type,e.pendingProps,a);case 19:return Qu(t,e,a);case 31:return tp(t,e,a);case 22:return Vd(t,e,a,e.pendingProps);case 24:return jn(e),n=Se(fe),t===null?(l=cu(),l===null&&(l=ee,i=uu(),l.pooledCache=i,i.refCount++,i!==null&&(l.pooledCacheLanes|=a),l=i),e.memoizedState={parent:n,cache:l},du(e),$a(e,fe,l)):((t.lanes&a)!==0&&(hu(t,e),si(e,null,null,a),ri()),l=t.memoizedState,i=e.memoizedState,l.parent!==n?(l={parent:n,cache:n},e.memoizedState=l,e.lanes===0&&(e.memoizedState=e.updateQueue.baseState=l),$a(e,fe,n)):(n=i.cache,$a(e,fe,n),n!==l.cache&&su(e,[fe],a,!0))),pe(t,e,e.pendingProps.children,a),e.child;case 30:return e.stateNode===null&&(e.stateNode={autoName:null,paired:null,clones:null,ref:null}),n=e.pendingProps,n.name!=null&&n.name!=="auto"?e.flags|=t===null?18882560:18874368:Lt&&ir(e),t!==null&&t.memoizedProps.name!==n.name?e.flags|=4194816:pl(t,e),pe(t,e,n.children,a),e.child;case 29:throw e.pendingProps}throw Error(s(156,e.tag))}function qa(t){t.flags|=4}function Ju(t,e,a,n,l){var i;if((i=(t.mode&32)!==0)&&(i=a===null?k0(e,n):k0(e,n)&&(n.src!==a.src||n.srcSet!==a.srcSet)),i){if(t.flags|=16777216,(l&335544128)===l)if(t.stateNode.complete)t.flags|=8192;else if(Dh())t.flags|=8192;else throw Bn=dr,fu}else t.flags&=-16777217}function th(t,e){if(e.type!=="stylesheet"||(e.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!A0(e))if(Dh())t.flags|=8192;else throw Bn=dr,fu}function Mr(t,e){e!==null&&(t.flags|=4),t.flags&16384&&(e=t.tag!==22?zc():536870912,t.lanes|=e,xl|=e)}function hi(t,e){if(!Lt)switch(t.tailMode){case"visible":break;case"collapsed":for(var a=t.tail,n=null;a!==null;)a.alternate!==null&&(n=a),a=a.sibling;n===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:n.sibling=null;break;default:for(e=t.tail,a=null;e!==null;)e.alternate!==null&&(a=e),e=e.sibling;a===null?t.tail=null:a.sibling=null}}function ne(t){var e=t.alternate!==null&&t.alternate.child===t.child,a=0,n=0;if(e)for(var l=t.child;l!==null;)a|=l.lanes|l.childLanes,n|=l.subtreeFlags&1206910976,n|=l.flags&1206910976,l.return=t,l=l.sibling;else for(l=t.child;l!==null;)a|=l.lanes|l.childLanes,n|=l.subtreeFlags,n|=l.flags,l.return=t,l=l.sibling;return t.subtreeFlags|=n,t.childLanes=a,e}function np(t,e,a){var n=e.pendingProps;switch(nu(e),e.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ne(e),null;case 1:return ne(e),null;case 3:return a=e.stateNode,n=null,t!==null&&(n=t.memoizedState.cache),e.memoizedState.cache!==n&&(e.flags|=2048),Ba(fe),Tt(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(t===null||t.child===null)&&(ul(e)?qa(e):t===null||t.memoizedState.isDehydrated&&(e.flags&256)===0||(e.flags|=1024,iu())),ne(e),null;case 26:var l=e.type,i=e.memoizedState;return t===null?(qa(e),i!==null?(ne(e),th(e,i)):(ne(e),Ju(e,l,null,n,a))):i?i!==t.memoizedState?(qa(e),ne(e),th(e,i)):(ne(e),e.flags&=-16777217):(t=t.memoizedProps,t!==n&&qa(e),ne(e),Ju(e,l,t,n,a)),null;case 27:if(At(e),a=ht.current,l=e.type,t!==null&&e.stateNode!=null)t.memoizedProps!==n&&qa(e);else{if(!n){if(e.stateNode===null)throw Error(s(166));return ne(e),e.subtreeFlags&=-33554433,null}t=q.current,ul(e)?Of(e):(t=x0(l,n,a),e.stateNode=t,qa(e))}return ne(e),e.subtreeFlags&=-33554433,null;case 5:if(At(e),l=e.type,t!==null&&e.stateNode!=null)t.memoizedProps!==n&&qa(e);else{if(!n){if(e.stateNode===null)throw Error(s(166));return ne(e),e.subtreeFlags&=-33554433,null}if(i=q.current,ul(e))Of(e);else{var h=Ti(ht.current);switch(i){case 1:i=h.createElementNS("http://www.w3.org/2000/svg",l);break;case 2:i=h.createElementNS("http://www.w3.org/1998/Math/MathML",l);break;default:switch(l){case"svg":i=h.createElementNS("http://www.w3.org/2000/svg",l);break;case"math":i=h.createElementNS("http://www.w3.org/1998/Math/MathML",l);break;case"script":i=h.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild);break;case"select":i=typeof n.is=="string"?h.createElement("select",{is:n.is}):h.createElement("select"),n.multiple?i.multiple=!0:n.size&&(i.size=n.size);break;default:i=typeof n.is=="string"?h.createElement(l,{is:n.is}):h.createElement(l)}}i[_e]=e,i[Re]=n;t:for(h=e.child;h!==null;){if(h.tag===5||h.tag===6)i.appendChild(h.stateNode);else if(h.tag!==4&&h.tag!==27&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===e)break t;for(;h.sibling===null;){if(h.return===null||h.return===e)break t;h=h.return}h.sibling.return=h.return,h=h.sibling}e.stateNode=i;t:switch(Ee(i,l,n),l){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break t;case"img":n=!0;break t;default:n=!1}n&&qa(e)}}return ne(e),e.subtreeFlags&=-33554433,Ju(e,e.type,t===null?null:t.memoizedProps,e.pendingProps,a),null;case 6:if(t&&e.stateNode!=null)t.memoizedProps!==n&&qa(e);else{if(typeof n!="string"&&e.stateNode===null)throw Error(s(166));if(t=ht.current,ul(e)){if(t=e.stateNode,a=e.memoizedProps,n=null,l=ye,l!==null)switch(l.tag){case 27:case 5:n=l.memoizedProps}t[_e]=e,t=!!(t.nodeValue===a||n!==null&&n.suppressHydrationWarning===!0||Ph(t.nodeValue,a)),t||Fa(e,!0)}else t=Ti(t).createTextNode(n),t[_e]=e,e.stateNode=t}return ne(e),null;case 31:if(a=e.memoizedState,t===null||t.memoizedState!==null){if(n=ul(e),a!==null){if(t===null){if(!n)throw Error(s(318));if(t=e.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(s(557));t[_e]=e}else Cn(),(e.flags&128)===0&&(e.memoizedState=null),e.flags|=4;ne(e),t=!1}else a=iu(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=a),t=!0;if(!t)return e.flags&256?(Ke(e),e):(Ke(e),null);if((e.flags&128)!==0)throw Error(s(558))}return ne(e),null;case 13:if(n=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(l=ul(e),n!==null&&n.dehydrated!==null){if(t===null){if(!l)throw Error(s(318));if(l=e.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(s(317));l[_e]=e}else Cn(),(e.flags&128)===0&&(e.memoizedState=null),e.flags|=4;ne(e),l=!1}else l=iu(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=l),l=!0;if(!l)return e.flags&256?(Ke(e),e):(Ke(e),null)}return Ke(e),(e.flags&128)!==0?(e.lanes=a,e):(a=n!==null,t=t!==null&&t.memoizedState!==null,a&&(n=e.child,l=null,n.alternate!==null&&n.alternate.memoizedState!==null&&n.alternate.memoizedState.cachePool!==null&&(l=n.alternate.memoizedState.cachePool.pool),i=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(i=n.memoizedState.cachePool.pool),i!==l&&(n.flags|=2048)),a!==t&&a&&(e.child.flags|=8192),Mr(e,e.updateQueue),ne(e),null);case 4:return Tt(),t===null&&Co(e.stateNode.containerInfo),e.flags|=67108864,ne(e),null;case 10:return Ba(e.type),ne(e),null;case 19:if(bu(e),n=e.memoizedState,n===null)return ne(e),null;if(l=(e.flags&128)!==0,i=n.rendering,i===null)if(l)hi(n,!1);else{if(ue!==0||t!==null&&(t.flags&128)!==0)for(t=e.child;t!==null;){if(i=gr(t),i!==null){for(e.flags|=128,hi(n,!1),t=i.updateQueue,e.updateQueue=t,Mr(e,t),e.subtreeFlags=0,t=a,a=e.child;a!==null;)zf(a,t),a=a.sibling;return ui(e,Te.current&1|2),Lt&&Ra(e,n.treeForkCount),e.child}t=t.sibling}n.tail!==null&&Ae()>Vr&&(e.flags|=128,l=!0,hi(n,!1),e.lanes=4194304)}else{if(!l)if(t=gr(i),t!==null){if(e.flags|=128,l=!0,t=t.updateQueue,e.updateQueue=t,Mr(e,t),hi(n,!0),n.tail===null&&n.tailMode!=="collapsed"&&n.tailMode!=="visible"&&!i.alternate&&!Lt)return ne(e),null}else 2*Ae()-n.renderingStartTime>Vr&&a!==536870912&&(e.flags|=128,l=!0,hi(n,!1),e.lanes=4194304);n.isBackwards?(i.sibling=e.child,e.child=i):(t=n.last,t!==null?t.sibling=i:e.child=i,n.last=i)}if(n.tail!==null){t=n.tail;t:{for(a=t;a!==null;){if(a.alternate!==null){a=!1;break t}a=a.sibling}a=!0}return n.rendering=t,n.tail=t.sibling,n.renderingStartTime=Ae(),t.sibling=null,i=Te.current,i=l?i&1|2:i&1,n.tailMode==="visible"||n.tailMode==="collapsed"||!a||Lt?ui(e,i):(a=i,C(we,e),C(Te,a),ke===null&&(ke=e)),Lt&&Ra(e,n.treeForkCount),t}return ne(e),null;case 22:case 23:return Ke(e),yu(),n=e.memoizedState!==null,t!==null?t.memoizedState!==null!==n&&(e.flags|=8192):n&&(e.flags|=8192),n?(a&536870912)!==0&&(e.flags&128)===0&&(ne(e),e.subtreeFlags&6&&(e.flags|=8192)):ne(e),a=e.updateQueue,a!==null&&Mr(e,a.retryQueue),a=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),n=null,e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),n!==a&&(e.flags|=2048),t!==null&&O(Rn),null;case 24:return a=null,t!==null&&(a=t.memoizedState.cache),e.memoizedState.cache!==a&&(e.flags|=2048),Ba(fe),ne(e),null;case 25:return null;case 30:return e.flags|=33554432,ne(e),null}throw Error(s(156,e.tag))}function lp(t,e){switch(nu(e),e.tag){case 1:return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return Ba(fe),Tt(),t=e.flags,(t&65536)!==0&&(t&128)===0?(e.flags=t&-65537|128,e):null;case 26:case 27:case 5:return At(e),null;case 31:if(e.memoizedState!==null){if(Ke(e),e.alternate===null)throw Error(s(340));Cn()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 13:if(Ke(e),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(s(340));Cn()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return bu(e),t=e.flags,t&65536?(e.flags=t&-65537|128,t=e.memoizedState,t!==null&&(t.rendering=null,t.tail=null),e.flags|=4,e):null;case 4:return Tt(),null;case 10:return Ba(e.type),null;case 22:case 23:return Ke(e),yu(),t!==null&&O(Rn),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 24:return Ba(fe),null;case 25:return null;default:return null}}function eh(t,e){switch(nu(e),e.tag){case 3:Ba(fe),Tt();break;case 26:case 27:case 5:At(e);break;case 4:Tt();break;case 31:e.memoizedState!==null&&Ke(e);break;case 13:Ke(e);break;case 19:bu(e);break;case 10:Ba(e.type);break;case 22:case 23:Ke(e),yu(),t!==null&&O(Rn);break;case 24:Ba(fe)}}function mi(t,e){try{var a=e.updateQueue,n=a!==null?a.lastEffect:null;if(n!==null){var l=n.next;a=l;do{if((a.tag&t)===t){n=void 0;var i=a.create,h=a.inst;n=i(),h.destroy=n}a=a.next}while(a!==l)}}catch(z){$t(e,e.return,z)}}function sn(t,e,a){try{var n=e.updateQueue,l=n!==null?n.lastEffect:null;if(l!==null){var i=l.next;n=i;do{if((n.tag&t)===t){var h=n.inst,z=h.destroy;if(z!==void 0){h.destroy=void 0,l=e;var D=a,Z=z;try{Z()}catch(at){$t(l,D,at)}}}n=n.next}while(n!==i)}}catch(at){$t(e,e.return,at)}}function ah(t){var e=t.updateQueue;if(e!==null){var a=t.stateNode;try{Xf(e,a)}catch(n){$t(t,t.return,n)}}}function nh(t,e,a){a.props=Gn(t.type,t.memoizedProps),a.state=t.memoizedState;try{a.componentWillUnmount()}catch(n){$t(t,e,n)}}function ba(t,e){try{var a=t.ref;if(a!==null){switch(t.tag){case 26:case 27:case 5:var n=t.stateNode;break;case 30:var l=t.stateNode,i=Oa(t.memoizedProps,l);(l.ref===null||l.ref.name!==i)&&(l.ref=c0(i)),n=l.ref;break;case 7:if(t.stateNode===null){var h=new $e(t);x(t.child,!1,Jp,h,void 0,void 0),t.stateNode=h}n=t.stateNode;break;default:n=t.stateNode}typeof a=="function"?t.refCleanup=a(n):a.current=n}}catch(z){$t(t,e,z)}}function Ne(t,e){var a=t.ref,n=t.refCleanup;if(a!==null)if(typeof n=="function")try{n()}catch(l){$t(t,e,l)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(l){$t(t,e,l)}else a.current=null}function Or(t,e){if((t.tag===5||t.tag===27||t.tag===6)&&t.alternate===null&&e!==null)for(var a=0;a<e.length;a++)g0(t.stateNode,e[a])}function lh(t){for(var e=t.return;e!==null&&(Iu(e)&&g0(t.stateNode,e.stateNode),!Wu(e));)e=e.return}function pi(t){for(var e=t.return;e!==null&&(Iu(e)&&Wp(t.stateNode,e.stateNode),!Wu(e));)e=e.return}function Wu(t){return t.tag===5||t.tag===3||t.tag===27}function Iu(t){return t&&t.tag===7&&t.stateNode!==null}function Fu(t){var e=t.type,a=t.memoizedProps,n=t.stateNode;try{t:switch(e){case"button":case"input":case"select":case"textarea":a.autoFocus&&n.focus();break t;case"img":a.src?n.src=a.src:a.srcSet&&(n.srcset=a.srcSet)}}catch(l){$t(t,t.return,l)}}function $u(t,e,a){try{var n=t.stateNode;Cp(n,t.type,a,e),n[Re]=e}catch(l){$t(t,t.return,l)}}function ih(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&mn(t.type)||t.tag===4}function Pu(t){t:for(;;){for(;t.sibling===null;){if(t.return===null||ih(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.tag===27&&mn(t.type)||t.flags&2||t.child===null||t.tag===4)continue t;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function to(t,e,a,n){var l=t.tag;if(l===5||l===6)l=t.stateNode,e?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(l,e):(e=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,e.appendChild(l),a=a._reactRootContainer,a!=null||e.onclick!==null||(e.onclick=ga)),Or(t,n),Kt=!0;else if(l!==4&&(l===27&&(Or(t,n),n=null,mn(t.type)&&(a=t.stateNode,e=null)),t=t.child,t!==null))for(to(t,e,a,n),t=t.sibling;t!==null;)to(t,e,a,n),t=t.sibling}function jr(t,e,a,n){var l=t.tag;if(l===5||l===6)l=t.stateNode,e?a.insertBefore(l,e):a.appendChild(l),Or(t,n),Kt=!0;else if(l!==4&&(l===27&&(Or(t,n),n=null,mn(t.type)&&(a=t.stateNode)),t=t.child,t!==null))for(jr(t,e,a,n),t=t.sibling;t!==null;)jr(t,e,a,n),t=t.sibling}function rh(t){var e=t.stateNode,a=t.memoizedProps;try{for(var n=t.type,l=e.attributes;l.length;)e.removeAttributeNode(l[0]);Ee(e,n,a),e[_e]=t,e[Re]=a}catch(i){$t(t,t.return,i)}}var Dr=!1,Je=null;function sh(t){(t.tag===30||(t.subtreeFlags&33554432)!==0)&&(Dr=!0)}var xa=null;function uh(){var t=xa;return xa=null,t}var Be=0;function gl(t,e,a,n,l){return Be=0,oh(t.child,e,a,n,l)}function oh(t,e,a,n,l){for(var i=!1;t!==null;){if(t.tag===5){var h=t.stateNode;if(n!==null){var z=Ho(h);n.push(z),z.view&&(i=!0)}else i||Ho(h).view&&(i=!0);Dr=!0,u0(h,Be===0?e:e+"_"+Be,a),Be++}else(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&l||oh(t.child,e,a,n,l)&&(i=!0));t=t.sibling}return i}function _a(t,e){for(;t!==null;)t.tag===5?o0(t.stateNode,t.memoizedProps):(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&e||_a(t.child,e)),t=t.sibling}function Rr(t){if((t.subtreeFlags&18874368)!==0)for(t=t.child;t!==null;){if((t.tag!==22||t.memoizedState===null)&&(Rr(t),t.tag===30&&(t.flags&18874368)!==0&&t.stateNode.paired)){var e=t.memoizedProps;if(e.name==null||e.name==="auto")throw Error(s(544));var a=e.name;e=ja(e.default,e.share),e!=="none"&&(gl(t,a,e,null,!1)||_a(t.child,!1))}t=t.sibling}}function eo(t,e){if(t.tag===30){var a=t.stateNode,n=t.memoizedProps,l=Oa(n,a),i=ja(n.default,a.paired?n.share:n.enter);i!=="none"?gl(t,l,i,null,!1)?(Rr(t),a.paired||e||Tl(t,n.onEnter)):_a(t.child,!1):Rr(t)}else if((t.subtreeFlags&33554432)!==0)for(t=t.child;t!==null;)eo(t,e),t=t.sibling;else Rr(t)}function ao(t){if(Je!==null&&Je.size!==0){var e=Je;if((t.subtreeFlags&18874368)!==0)for(t=t.child;t!==null;){if(t.tag!==22||t.memoizedState===null){if(t.tag===30&&(t.flags&18874368)!==0){var a=t.memoizedProps,n=a.name;if(n!=null&&n!=="auto"){var l=e.get(n);if(l!==void 0){var i=ja(a.default,a.share);if(i!=="none"&&(gl(t,n,i,null,!1)?(i=t.stateNode,l.paired=i,i.paired=l,Tl(t,a.onShare)):_a(t.child,!1)),e.delete(n),e.size===0)break}}}ao(t)}t=t.sibling}}}function no(t){if(t.tag===30){var e=t.memoizedProps,a=Oa(e,t.stateNode),n=Je!==null?Je.get(a):void 0,l=ja(e.default,n!==void 0?e.share:e.exit);l!=="none"&&(gl(t,a,l,null,!1)?n!==void 0?(l=t.stateNode,n.paired=l,l.paired=n,Je.delete(a),Tl(t,e.onShare)):Tl(t,e.onExit):_a(t.child,!1)),Je!==null&&ao(t)}else if((t.subtreeFlags&33554432)!==0)for(t=t.child;t!==null;)no(t),t=t.sibling;else Je!==null&&ao(t)}function ch(t){for(t=t.child;t!==null;){if(t.tag===30){var e=t.memoizedProps,a=Oa(e,t.stateNode);e=ja(e.default,e.update),t.flags&=-5,e!=="none"&&gl(t,a,e,t.memoizedState=[],!1)}else(t.subtreeFlags&33554432)!==0&&ch(t);t=t.sibling}}function lo(t){if((t.subtreeFlags&18874368)!==0)for(t=t.child;t!==null;){if(t.tag!==22||t.memoizedState===null){if(t.tag===30&&(t.flags&18874368)!==0){var e=t.stateNode;e.paired!==null&&(e.paired=null,_a(t.child,!1))}lo(t)}t=t.sibling}}function Ur(t){if(t.tag===30)t.stateNode.paired=null,_a(t.child,!1),lo(t);else if((t.subtreeFlags&33554432)!==0)for(t=t.child;t!==null;)Ur(t),t=t.sibling;else lo(t)}function fh(t){for(t=t.child;t!==null;)t.tag===30?_a(t.child,!1):(t.subtreeFlags&33554432)!==0&&fh(t),t=t.sibling}function io(t,e,a,n,l,i,h){for(var z=!1;e!==null;){if(e.tag===5){var D=e.stateNode;if(i!==null&&Be<i.length){var Z=i[Be],at=Ho(D);(Z.view||at.view)&&(z=!0);var ct;if(ct=(t.flags&4)===0)if(at.clip)ct=!0;else{ct=Z.rect;var Y=at.rect;ct=ct.y!==Y.y||ct.x!==Y.x||ct.height!==Y.height||ct.width!==Y.width}ct&&(t.flags|=4),at.abs?at=!Z.abs:(Z=Z.rect,at=at.rect,at=Z.height!==at.height||Z.width!==at.width),at&&(t.flags|=32)}else t.flags|=32;(t.flags&4)!==0&&u0(D,Be===0?a:a+"_"+Be,l),z&&(t.flags&4)!==0||(xa===null&&(xa=[]),xa.push(D,Be===0?n:n+"_"+Be,e.memoizedProps)),Be++}else(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&h?t.flags|=e.flags&32:io(t,e.child,a,n,l,i,h)&&(z=!0));e=e.sibling}return z}function dh(t,e){for(t=t.child;t!==null;){if(t.tag===30){var a=t.memoizedProps,n=t.stateNode,l=Oa(a,n),i=ja(a.default,a.update),h;h=t.memoizedState,t.memoizedState=null,n=t;var z=t.child;Be=0,l=io(n,z,l,l,i,h,!1),(t.flags&4)!==0&&l&&Tl(t,a.onUpdate)}else(t.subtreeFlags&33554432)!==0&&dh(t);t=t.sibling}}var ve=!1,It=!1,Sa=!1,ro=!1,hh=typeof WeakSet=="function"?WeakSet:Set,be=null,wa=!1,gi=!1,Br=!1,so=!1;function ip(t,e,a){if(t=t.containerInfo,jo=Dl,t=yf(t),Ks(t)){if("selectionStart"in t)var n={start:t.selectionStart,end:t.selectionEnd};else t:{n=(n=t.ownerDocument)&&n.defaultView||window;var l=n.getSelection&&n.getSelection();if(l&&l.rangeCount!==0){n=l.anchorNode;var i=l.anchorOffset,h=l.focusNode;l=l.focusOffset;try{n.nodeType,h.nodeType}catch{n=null;break t}var z=0,D=-1,Z=-1,at=0,ct=0,Y=t,F=null;e:for(;;){for(var bt;Y!==n||i!==0&&Y.nodeType!==3||(D=z+i),Y!==h||l!==0&&Y.nodeType!==3||(Z=z+l),Y.nodeType===3&&(z+=Y.nodeValue.length),(bt=Y.firstChild)!==null;)F=Y,Y=bt;for(;;){if(Y===t)break e;if(F===n&&++at===i&&(D=z),F===h&&++ct===l&&(Z=z),(bt=Y.nextSibling)!==null)break;Y=F,F=Y.parentNode}Y=bt}n=D===-1||Z===-1?null:{start:D,end:Z}}else n=null}n=n||{start:0,end:0}}else n=null;for(Do={focusedElem:t,selectionRange:n},Dl=!1,a=(a&335544064)===a,be=e,e=a?9270:1024;be!==null;){if(t=be,a&&(n=t.deletions,n!==null))for(i=0;i<n.length;i++)a&&no(n[i]);if(t.alternate===null&&(t.flags&2)!==0)a&&sh(t),Hr(a);else{if(t.tag===22){if(n=t.alternate,t.memoizedState!==null){n!==null&&n.memoizedState===null&&a&&no(n),Hr(a);continue}else if(n!==null&&n.memoizedState!==null){a&&sh(t),Hr(a);continue}}n=t.child,(t.subtreeFlags&e)!==0&&n!==null?(n.return=t,be=n):(a&&ch(t),Hr(a))}}Je=null}function Hr(t){for(;be!==null;){var e=be,a=t,n=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 15:break;case 1:if((l&1024)!==0&&n!==null){a=void 0,l=n.memoizedProps,n=n.memoizedState;var i=e.stateNode;try{var h=Gn(e.type,l);a=i.getSnapshotBeforeUpdate(h,n),i.__reactInternalSnapshotBeforeUpdate=a}catch(z){$t(e,e.return,z)}}break;case 3:if((l&1024)!==0){if(n=e.stateNode.containerInfo,a=n.nodeType,a===9)qo(n);else if(a===1)switch(n.nodeName){case"HEAD":case"HTML":case"BODY":qo(n);break;default:n.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;case 30:a&&n!==null&&(a=Oa(n.memoizedProps,n.stateNode),l=e.memoizedProps,l=ja(l.default,l.update),l!=="none"&&gl(n,a,l,n.memoizedState=[],!0));break;default:if((l&1024)!==0)throw Error(s(163))}if(n=e.sibling,n!==null){n.return=e.return,be=n;break}be=e.return}}function mh(t,e,a){var n=a.flags;switch(a.tag){case 0:case 11:case 15:Ta(t,a),n&4&&mi(5,a);break;case 1:if(Ta(t,a),n&4)if(t=a.stateNode,e===null)try{t.componentDidMount()}catch(h){$t(a,a.return,h)}else{var l=Gn(a.type,e.memoizedProps);e=e.memoizedState;try{t.componentDidUpdate(l,e,t.__reactInternalSnapshotBeforeUpdate)}catch(h){$t(a,a.return,h)}}n&64&&ah(a),n&512&&ba(a,a.return);break;case 3:if(Ta(t,a),n&64&&(t=a.updateQueue,t!==null)){if(e=null,a.child!==null)switch(a.child.tag){case 27:case 5:e=a.child.stateNode;break;case 1:e=a.child.stateNode}try{Xf(t,e)}catch(h){$t(a,a.return,h)}}break;case 27:e===null&&n&4&&rh(a);case 26:case 5:Ta(t,a),e===null&&n&4&&Fu(a),n&512&&ba(a,a.return);break;case 12:Ta(t,a);break;case 31:Ta(t,a),n&4&&vh(t,a);break;case 13:Ta(t,a),n&4&&bh(t,a),n&64&&(t=a.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(a=yp.bind(null,a),$p(t,a))));break;case 22:if(n=a.memoizedState!==null||ve,!n){var i=e!==null&&e.memoizedState!==null||It;e=ve,l=It,ve=n,(It=i)&&!l?(n=2,(a.subtreeFlags&8772)!==0&&(n|=1),ha(t,a,n)):Ta(t,a),ve=e,It=l}break;case 30:Ta(t,a),n&512&&ba(a,a.return);break;case 7:n&512&&ba(a,a.return);default:Ta(t,a)}}function uo(t,e){for(t=t.child;t!==null;)ph(t,e),t=t.sibling}function ph(t,e){switch(t.tag){case 5:case 26:try{var a=t.stateNode;if(e){var n=a.style;typeof n.setProperty=="function"?n.setProperty("display","none","important"):n.display="none"}else{var l=t.stateNode,i=t.memoizedProps.style,h=i!=null&&i.hasOwnProperty("display")?i.display:null;l.style.display=h==null||typeof h=="boolean"?"":(""+h).trim()}}catch(D){$t(t,t.return,D)}oo(t,e);break;case 6:try{t.stateNode.nodeValue=e?"":t.memoizedProps,Kt=!0}catch(D){$t(t,t.return,D)}break;case 18:try{var z=t.stateNode;e?s0(z,!0):s0(t.stateNode,!1)}catch(D){$t(t,t.return,D)}break;case 22:case 23:t.memoizedState===null&&uo(t,e);break;default:uo(t,e)}}function oo(t,e){if(t.subtreeFlags&67108864)for(t=t.child;t!==null;){t:{var a=t,n=e;switch(a.tag){case 4:ph(a,n);break t;case 22:a.memoizedState===null&&oo(a,n);break t;default:oo(a,n)}}t=t.sibling}}function gh(t){var e=t.alternate;e!==null&&(t.alternate=null,gh(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&Vi(e)),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}var ie=null,He=!1;function fa(t,e,a){for(a=a.child;a!==null;)yh(t,e,a),a=a.sibling}function yh(t,e,a){if(Ve&&typeof Ve.onCommitFiberUnmount=="function")try{Ve.onCommitFiberUnmount(Ll,a)}catch{}switch(a.tag){case 26:It||Ne(a,e),fa(t,e,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&!It&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:It||Ne(a,e),pi(a);var n=ie,l=He;mn(a.type)&&(ie=a.stateNode,He=!1),fa(t,e,a),_0(a.stateNode,a.type,a.memoizedProps),ie=n,He=l;break;case 5:It||Ne(a,e),pi(a);case 6:if(a.tag===6&&pi(a),n=ie,l=He,ie=null,fa(t,e,a),ie=n,He=l,ie!==null)if(He)try{(ie.nodeType===9?ie.body:ie.nodeName==="HTML"?ie.ownerDocument.body:ie).removeChild(a.stateNode),Kt=!0}catch(i){$t(a,e,i)}else try{ie.removeChild(a.stateNode),Kt=!0}catch(i){$t(a,e,i)}break;case 18:ie!==null&&(He?(t=ie,r0(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,a.stateNode),Rl(t)):r0(ie,a.stateNode));break;case 4:n=ie,l=He,ie=a.stateNode.containerInfo,He=!0,fa(t,e,a),ie=n,He=l;break;case 0:case 11:case 14:case 15:sn(2,a,e),It||sn(4,a,e),fa(t,e,a);break;case 1:It||(Ne(a,e),n=a.stateNode,typeof n.componentWillUnmount=="function"&&nh(a,e,n)),fa(t,e,a);break;case 21:fa(t,e,a);break;case 22:It=(n=It)||a.memoizedState!==null,fa(t,e,a),It=n;break;case 30:Ne(a,e),fa(t,e,a);break;case 7:It||Ne(a,e),fa(t,e,a);break;default:fa(t,e,a)}}function vh(t,e){if(e.memoizedState===null&&(t=e.alternate,t!==null&&(t=t.memoizedState,t!==null))){t=t.dehydrated;try{Rl(t)}catch(a){$t(e,e.return,a)}}}function bh(t,e){if(e.memoizedState===null&&(t=e.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{Rl(t)}catch(a){$t(e,e.return,a)}}function rp(t){switch(t.tag){case 31:case 13:case 19:var e=t.stateNode;return e===null&&(e=t.stateNode=new hh),e;case 22:return t=t.stateNode,e=t._retryCache,e===null&&(e=t._retryCache=new hh),e;default:throw Error(s(435,t.tag))}}function Lr(t,e){var a=rp(t);e.forEach(function(n){if(!a.has(n)){a.add(n);var l=vp.bind(null,t,n);n.then(l,l)}})}function Oe(t,e,a){var n=e.deletions;if(n!==null)for(var l=0;l<n.length;l++){var i=n[l],h=t,z=e,D=z;t:for(;D!==null;){switch(D.tag){case 27:if(mn(D.type)){ie=D.stateNode,He=!1;break t}break;case 5:ie=D.stateNode,He=!1;break t;case 3:case 4:ie=D.stateNode.containerInfo,He=!0;break t}D=D.return}if(ie===null)throw Error(s(160));yh(h,z,i),ie=null,He=!1,h=i.alternate,h!==null&&(h.return=null),i.return=null}if(e.subtreeFlags&13886)for(e=e.child;e!==null;)xh(e,t,a),e=e.sibling}var da=null;function xh(t,e,a){var n=t.alternate,l=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:if(l&4&&(n=t.updateQueue,n=n!==null?n.events:null,n!==null))for(var i=0;i<n.length;i++){var h=n[i];h.ref.impl=h.nextImpl}Oe(e,t,a),je(t),l&4&&(sn(3,t,t.return),mi(3,t),sn(5,t,t.return));break;case 1:Oe(e,t,a),je(t),l&512&&(It||n===null||Ne(n,n.return)),l&64&&ve&&(t=t.updateQueue,t!==null&&(e=t.callbacks,e!==null&&(a=t.shared.hiddenCallbacks,t.shared.hiddenCallbacks=a===null?e:a.concat(e))));break;case 26:if(i=da,Oe(e,t,a),je(t),l&512&&(It||n===null||Ne(n,n.return)),l&4)if(l=n!==null?n.memoizedState:null,a=t.memoizedState,n===null)if(a===null)if(t.stateNode===null)if(ve)t.stateNode=n0(t.type,t.memoizedProps,e.containerInfo,t);else{t:{e=t.type,a=t.memoizedProps,l=i.ownerDocument||i;e:switch(e){case"title":n=l.getElementsByTagName("title")[0],(!n||n[Yl]||n[_e]||n.namespaceURI==="http://www.w3.org/2000/svg"||n.hasAttribute("itemprop"))&&(n=l.createElement(e),l.head.insertBefore(n,l.querySelector("head > title"))),Ee(n,e,a),n[_e]=t,ge(n),e=n;break t;case"link":if(i=z0("link","href",l).get(e+(a.href||""))){for(h=0;h<i.length;h++)if(n=i[h],n.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&n.getAttribute("rel")===(a.rel==null?null:a.rel)&&n.getAttribute("title")===(a.title==null?null:a.title)&&n.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){i.splice(h,1);break e}}n=l.createElement(e),Ee(n,e,a),l.head.appendChild(n);break;case"meta":if(i=z0("meta","content",l).get(e+(a.content||""))){for(h=0;h<i.length;h++)if(n=i[h],n.getAttribute("content")===(a.content==null?null:""+a.content)&&n.getAttribute("name")===(a.name==null?null:a.name)&&n.getAttribute("property")===(a.property==null?null:a.property)&&n.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&n.getAttribute("charset")===(a.charSet==null?null:a.charSet)){i.splice(h,1);break e}}n=l.createElement(e),Ee(n,e,a),l.head.appendChild(n);break;default:throw Error(s(468,e))}n[_e]=t,ge(n),e=n}t.stateNode=e}else ve||Jo(i,t.type,t.stateNode);else t.stateNode=E0(i,a,t.memoizedProps);else l!==a?(l===null?(e=n.stateNode,e===null||It||e.parentNode.removeChild(e)):l.count--,a===null?ve||Jo(i,t.type,t.stateNode):E0(i,a,t.memoizedProps)):a===null&&t.stateNode!==null&&$u(t,t.memoizedProps,n.memoizedProps);break;case 27:Oe(e,t,a),je(t),l&512&&(It||n===null||Ne(n,n.return)),n!==null&&l&4&&$u(t,t.memoizedProps,n.memoizedProps);break;case 5:if(i=Sa,Sa=!1,Oe(e,t,a),Sa=i,je(t),l&512&&(It||n===null||Ne(n,n.return)),t.flags&32){e=t.stateNode;try{$n(e,""),Kt=!0}catch(at){$t(t,t.return,at)}}l&4&&t.stateNode!=null&&(e=t.memoizedProps,$u(t,e,n!==null?n.memoizedProps:e)),l&1024&&(ro=!0);break;case 6:if(Oe(e,t,a),je(t),l&4){if(t.stateNode===null)throw Error(s(162));e=t.memoizedProps,a=t.stateNode;try{a.nodeValue=e,Kt=!0}catch(at){$t(t,t.return,at)}}break;case 3:if(Kt=!1,ts=null,i=da,da=Ni(e.containerInfo),Oe(e,t,a),da=i,je(t),l&4&&n!==null&&n.memoizedState.isDehydrated)try{Rl(e.containerInfo)}catch(at){$t(t,t.return,at)}ro&&(ro=!1,_h(t)),Kt=!1;break;case 4:l=Sa,Sa=ve,n=Gc(),i=da,da=Ni(t.stateNode.containerInfo),Oe(e,t,a),je(t),da=i,Kt&&gi&&(Br=!0),Kt=n,Sa=l;break;case 12:Oe(e,t,a),je(t);break;case 31:Oe(e,t,a),je(t),l&4&&(e=t.updateQueue,e!==null&&(t.updateQueue=null,Lr(t,e)));break;case 13:Oe(e,t,a),je(t),t.child.flags&8192&&t.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(Yr=Ae()),l&4&&(e=t.updateQueue,e!==null&&(t.updateQueue=null,Lr(t,e)));break;case 22:i=t.memoizedState!==null,h=n!==null&&n.memoizedState!==null;var z=ve,D=It,Z=Sa;ve=z||i,Sa=Z||i,It=D||h,Oe(e,t,a),It=D,Sa=Z,ve=z,je(t),l&8192&&(e=t.stateNode,e._visibility=i?e._visibility&-2:e._visibility|1,!i||n===null||h||ve||It||(e=h||It,a=ve,n=It,ve=i||ve,It=e,un(t,2),ve=a,It=n),!i&&Sa||uo(t,i)),l&4&&(e=t.updateQueue,e!==null&&(a=e.retryQueue,a!==null&&(e.retryQueue=null,Lr(t,a))));break;case 19:Oe(e,t,a),je(t),l&4&&(e=t.updateQueue,e!==null&&(t.updateQueue=null,Lr(t,e)));break;case 30:l&512&&(It||n===null||Ne(n,n.return)),l=Gc(),i=gi,h=(a&335544064)===a,z=t.memoizedProps,gi=h&&ja(z.default,z.update)!=="none",Oe(e,t,a),je(t),h&&n!==null&&Kt&&(t.flags|=4),gi=i,Kt=l;break;case 21:break;case 7:l&512&&(It||n===null||Ne(n,n.return)),n&&n.stateNode!==null&&(n.stateNode._fragmentFiber=t);default:Oe(e,t,a),je(t)}}function je(t){var e=t.flags;if(e&2){try{for(var a,n=t.return;n!==null;){if(ih(n)){a=n;break}n=n.return}n=null;for(var l=t.return;l!==null;){if(Iu(l)){var i=l.stateNode;n===null?n=[i]:n.push(i)}if(Wu(l))break;l=l.return}var h=n;if(a==null)throw Error(s(160));switch(a.tag){case 27:var z=a.stateNode,D=Pu(t);jr(t,D,z,h);break;case 5:var Z=a.stateNode;a.flags&32&&($n(Z,""),a.flags&=-33);var at=Pu(t);jr(t,at,Z,h);break;case 3:case 4:var ct=a.stateNode.containerInfo,Y=Pu(t);to(t,Y,ct,h);break;default:throw Error(s(161))}}catch(F){$t(t,t.return,F)}t.flags&=-3}e&4096&&(t.flags&=-4097)}function _h(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var e=t;_h(e),e.tag===5&&e.flags&1024&&(e=e.stateNode,Dl=!0,e.reset(),Dl=!1),t=t.sibling}}function yl(t,e){if(e.subtreeFlags&9270)for(e=e.child;e!==null;)Sh(e,t),e=e.sibling;else dh(e)}function Sh(t,e){var a=t.alternate;if(a===null)eo(t,!1);else switch(t.tag){case 3:if(so=wa=!1,uh(),yl(e,t),!wa&&!Br){if(t=xa,t!==null)for(var n=0;n<t.length;n+=3){a=t[n];var l=t[n+1];o0(a,t[n+2]),a=a.ownerDocument.documentElement,a!==null&&a.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group("+l+")"})}t=e.containerInfo,t=t.nodeType===9?t.documentElement:t.ownerDocument.documentElement,t!==null&&t.style.viewTransitionName===""&&(t.style.viewTransitionName="none",t.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group(root)"}),t.animate({width:[0,0],height:[0,0]},{duration:0,fill:"forwards",pseudoElement:"::view-transition"})),so=!0}xa=null;break;case 5:yl(e,t);break;case 4:n=wa,wa=!1,yl(e,t),wa&&(Br=!0),wa=n;break;case 22:t.memoizedState===null&&(a.memoizedState!==null?eo(t,!1):yl(e,t));break;case 30:n=wa,l=uh(),wa=!1,yl(e,t),wa&&(t.flags|=4);var i=t.memoizedProps,h=t.stateNode;e=Oa(i,h),h=Oa(a.memoizedProps,h);var z=ja(i.default,i.update);z==="none"?e=!1:(i=a.memoizedState,a.memoizedState=null,a=t.child,Be=0,e=io(t,a,e,h,z,i,!0),Be!==(i===null?0:i.length)&&(t.flags|=32)),(t.flags&4)!==0&&e?(Tl(t,t.memoizedProps.onUpdate),xa=l):l!==null&&(l.push.apply(l,xa),xa=l),wa=(t.flags&32)!==0?!0:n;break;default:yl(e,t)}}function Ta(t,e){if(e.subtreeFlags&8772)for(e=e.child;e!==null;)mh(t,e.alternate,e),e=e.sibling}function un(t,e){for(t=t.child;t!==null;){var a=t,n=e;switch(a.tag){case 0:case 11:case 14:case 15:sn(4,a,a.return),un(a,n);break;case 1:Ne(a,a.return);var l=a.stateNode;typeof l.componentWillUnmount=="function"&&nh(a,a.return,l),un(a,n);break;case 27:(n&2)!==0&&_0(a.stateNode,a.type,a.memoizedProps);case 5:Ne(a,a.return),a.tag!==5&&a.tag!==27||pi(a),un(a,n);break;case 6:pi(a);break;case 26:Ne(a,a.return),l=a.stateNode,a.memoizedState!==null||l===null||It||l.parentNode.removeChild(l),un(a,n);break;case 22:a.memoizedState===null&&un(a,n);break;case 30:Ne(a,a.return),un(a,n);break;case 7:Ne(a,a.return);default:un(a,n)}t=t.sibling}}function ha(t,e,a){for(a=(e.subtreeFlags&8772)!==0?a:a&-2,e=e.child;e!==null;){var n=e.alternate,l=t,i=e,h=i.flags,z=(a&1)!==0;switch(i.tag){case 0:case 11:case 15:ha(l,i,a),mi(4,i);break;case 1:if(ha(l,i,a),n=i,l=n.stateNode,typeof l.componentDidMount=="function")try{l.componentDidMount()}catch(at){$t(n,n.return,at)}if(n=i,l=n.updateQueue,l!==null){var D=n.stateNode;try{var Z=l.shared.hiddenCallbacks;if(Z!==null)for(l.shared.hiddenCallbacks=null,l=0;l<Z.length;l++)Zf(Z[l],D)}catch(at){$t(n,n.return,at)}}z&&h&64&&ah(i),ba(i,i.return);break;case 27:(a&2)!==0&&rh(i);case 5:i.tag!==5&&i.tag!==27||lh(i),ha(l,i,a),z&&n===null&&h&4&&Fu(i),ba(i,i.return);break;case 6:lh(i);break;case 26:D=i.stateNode,i.memoizedState!==null||D===null||ve||Jo(Ni(D.ownerDocument),i.type,D),ha(l,i,a),z&&n===null&&h&4&&Fu(i),ba(i,i.return);break;case 12:ha(l,i,a);break;case 31:ha(l,i,a),z&&h&4&&vh(l,i);break;case 13:ha(l,i,a),z&&h&4&&bh(l,i);break;case 22:i.memoizedState===null&&ha(l,i,a),ba(i,i.return);break;case 30:ha(l,i,a),ba(i,i.return);break;case 7:ba(i,i.return);default:ha(l,i,a)}e=e.sibling}}function co(t,e){var a=null;t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),t=null,e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(t=e.memoizedState.cachePool.pool),t!==a&&(t!=null&&t.refCount++,a!=null&&ei(a))}function fo(t,e){t=null,e.alternate!==null&&(t=e.alternate.memoizedState.cache),e=e.memoizedState.cache,e!==t&&(e.refCount++,t!=null&&ei(t))}function sa(t,e,a,n){var l=(a&335544064)===a;if(e.subtreeFlags&(l?10262:10256))for(e=e.child;e!==null;)wh(t,e,a,n),e=e.sibling;else l&&fh(e)}function wh(t,e,a,n){var l=(a&335544064)===a;l&&e.alternate===null&&e.return!==null&&e.return.alternate!==null&&Ur(e);var i=e.flags;switch(e.tag){case 0:case 11:case 15:sa(t,e,a,n),i&2048&&mi(9,e);break;case 1:sa(t,e,a,n);break;case 3:sa(t,e,a,n),l&&so&&(t=t.containerInfo,t=t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,t.style.viewTransitionName==="root"&&(t.style.viewTransitionName=""),t=t.ownerDocument.documentElement,t!==null&&t.style.viewTransitionName==="none"&&(t.style.viewTransitionName="")),i&2048&&(i=null,e.alternate!==null&&(i=e.alternate.memoizedState.cache),e=e.memoizedState.cache,e!==i&&(e.refCount++,i!=null&&ei(i)));break;case 12:if(i&2048){sa(t,e,a,n),i=e.stateNode;try{var h=e.memoizedProps,z=h.id,D=h.onPostCommit;typeof D=="function"&&D(z,e.alternate===null?"mount":"update",i.passiveEffectDuration,-0)}catch(Z){$t(e,e.return,Z)}}else sa(t,e,a,n);break;case 31:sa(t,e,a,n);break;case 13:sa(t,e,a,n);break;case 23:break;case 22:h=e.stateNode,z=e.alternate,e.memoizedState!==null?(l&&z!==null&&z.memoizedState===null&&Ur(z),h._visibility&2?sa(t,e,a,n):yi(t,e)):(l&&z!==null&&z.memoizedState!==null&&Ur(e),h._visibility&2?sa(t,e,a,n):(h._visibility|=2,vl(t,e,a,n,(e.subtreeFlags&10256)!==0||!1))),i&2048&&co(z,e);break;case 24:sa(t,e,a,n),i&2048&&fo(e.alternate,e);break;case 30:l&&(i=e.alternate,i!==null&&(_a(i.child,!0),_a(e.child,!0))),sa(t,e,a,n);break;default:sa(t,e,a,n)}}function vl(t,e,a,n,l){for(l=l&&((e.subtreeFlags&10256)!==0||!1),e=e.child;e!==null;){var i=t,h=e,z=a,D=n,Z=h.flags;switch(h.tag){case 0:case 11:case 15:vl(i,h,z,D,l),mi(8,h);break;case 23:break;case 22:var at=h.stateNode;h.memoizedState!==null?at._visibility&2?vl(i,h,z,D,l):yi(i,h):(at._visibility|=2,vl(i,h,z,D,l)),l&&Z&2048&&co(h.alternate,h);break;case 24:vl(i,h,z,D,l),l&&Z&2048&&fo(h.alternate,h);break;default:vl(i,h,z,D,l)}e=e.sibling}}function yi(t,e){if(e.subtreeFlags&10256)for(e=e.child;e!==null;){var a=t,n=e,l=n.flags;switch(n.tag){case 22:yi(a,n),l&2048&&co(n.alternate,n);break;case 24:yi(a,n),l&2048&&fo(n.alternate,n);break;default:yi(a,n)}e=e.sibling}}var qn=8192;function Yn(t,e,a){if(t.subtreeFlags&qn)for(t=t.child;t!==null;)Th(t,e,a),t=t.sibling}function Th(t,e,a){switch(t.tag){case 26:Yn(t,e,a),t.flags&qn&&(t.memoizedState!==null?dg(a,da,t.memoizedState,t.memoizedProps):(t=t.stateNode,(e&335544128)===e&&M0(a,t)));break;case 5:Yn(t,e,a),t.flags&qn&&(t=t.stateNode,(e&335544128)===e&&M0(a,t));break;case 3:case 4:var n=da;da=Ni(t.stateNode.containerInfo),Yn(t,e,a),da=n;break;case 22:t.memoizedState===null&&(n=t.alternate,n!==null&&n.memoizedState!==null?(n=qn,qn=16777216,Yn(t,e,a),qn=n):Yn(t,e,a));break;case 30:if((t.flags&qn)!==0&&(n=t.memoizedProps.name,n!=null&&n!=="auto")){var l=t.stateNode;l.paired=null,Je===null&&(Je=new Map),Je.set(n,l)}Yn(t,e,a);break;default:Yn(t,e,a)}}function Nh(t){var e=t.alternate;if(e!==null&&(t=e.child,t!==null)){e.child=null;do e=t.sibling,t.sibling=null,t=e;while(t!==null)}}function vi(t){var e=t.deletions;if((t.flags&16)!==0){if(e!==null)for(var a=0;a<e.length;a++){var n=e[a];be=n,zh(n,t)}Nh(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Eh(t),t=t.sibling}function Eh(t){switch(t.tag){case 0:case 11:case 15:vi(t),t.flags&2048&&sn(9,t,t.return);break;case 3:vi(t);break;case 12:vi(t);break;case 22:var e=t.stateNode;t.memoizedState!==null&&e._visibility&2&&(t.return===null||t.return.tag!==13)?(e._visibility&=-3,Gr(t)):vi(t);break;default:vi(t)}}function Gr(t){var e=t.deletions;if((t.flags&16)!==0){if(e!==null)for(var a=0;a<e.length;a++){var n=e[a];be=n,zh(n,t)}Nh(t)}for(t=t.child;t!==null;){switch(e=t,e.tag){case 0:case 11:case 15:sn(8,e,e.return),Gr(e);break;case 22:a=e.stateNode,a._visibility&2&&(a._visibility&=-3,Gr(e));break;default:Gr(e)}t=t.sibling}}function zh(t,e){for(;be!==null;){var a=be;switch(a.tag){case 0:case 11:case 15:sn(8,a,e);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var n=a.memoizedState.cachePool.pool;n!=null&&n.refCount++}break;case 24:ei(a.memoizedState.cache)}if(n=a.child,n!==null)n.return=a,be=n;else t:for(a=t;be!==null;){n=be;var l=n.sibling,i=n.return;if(gh(n),n===a){be=null;break t}if(l!==null){l.return=i,be=l;break t}be=i}}}var sp={getCacheForType:function(t){var e=Se(fe),a=e.data.get(t);return a===void 0&&(a=t(),e.data.set(t,a)),a},cacheSignal:function(){return Se(fe).controller.signal}},up=typeof WeakMap=="function"?WeakMap:Map,Jt=0,ee=null,qt=null,Vt=0,Ft=0,We=null,on=!1,bl=!1,ho=!1,Ya=0,ue=0,cn=0,Vn=0,qr=0,Ie=0,xl=0,bi=null,Le=null,mo=!1,Yr=0,kh=0,Vr=1/0,Zr=null,fn=null,re=0,ma=null,Zn=null,Na=0,po=0,go=null,Ah=null,_l=null,Sl=null,wl=null,xi=0,Xr=null;function Fe(){return(Jt&2)!==0&&Vt!==0?Vt&-Vt:pt.T!==null?Eo():Mc()}function Ch(){if(Ie===0)if((Vt&536870912)===0||Lt){var t=Li;Li<<=1,(Li&3932160)===0&&(Li=262144),Ie=t}else Ie=536870912;return t=we.current,t!==null&&(t.flags|=32),Ie}function Tl(t,e){if(e!=null){var a=t.stateNode,n=a.ref;n===null&&(n=a.ref=c0(Oa(t.memoizedProps,a))),Sl===null&&(Sl=[]),Sl.push(e.bind(null,n))}}function Ge(t,e,a){(t===ee&&(Ft===2||Ft===9)||t.cancelPendingCommit!==null)&&(Nl(t,0),dn(t,Vt,Ie,!1)),ql(t,a),((Jt&2)===0||t!==ee)&&(t===ee&&((Jt&2)===0&&(Vn|=a),ue===4&&dn(t,Vt,Ie,!1)),Ea(t))}function Mh(t,e,a){if((Jt&6)!==0)throw Error(s(327));var n=!a&&(e&127)===0&&(e&t.expiredLanes)===0||Gl(t,e),l=n?fp(t,e):vo(t,e,!0),i=n;do{if(l===0){bl&&!n&&dn(t,e,0,!1);break}else{if(a=t.current.alternate,i&&!op(a)){l=vo(t,e,!1),i=!1;continue}if(l===2){if(i=e,t.errorRecoveryDisabledLanes&i)var h=0;else h=t.pendingLanes&-536870913,h=h!==0?h:h&536870912?536870912:0;if(h!==0){e=h;t:{var z=t;l=bi;var D=z.current.memoizedState.isDehydrated;if(D&&(Nl(z,h).flags|=256),h=vo(z,h,!1),h!==2&&h!==6){if(ho&&!D){z.errorRecoveryDisabledLanes|=i,Vn|=i,l=4;break t}i=Le,Le=l,i!==null&&(Le===null?Le=i:Le.push.apply(Le,i))}l=h}if(i=!1,l!==2)continue}}if(l===1){Nl(t,0),dn(t,e,0,!0);break}t:{switch(n=t,i=l,i){case 0:case 1:throw Error(s(345));case 4:if((e&4194048)!==e&&(e&62914560)!==e)break;case 6:dn(n,e,Ie,!on);break t;case 2:Le=null;break;case 3:case 5:break;default:throw Error(s(329))}if((e&62914560)===e&&(l=Yr+300-Ae(),10<l)){if(dn(n,e,Ie,!on),qi(n,0,!0)!==0)break t;Na=e,n.timeoutHandle=Bo(Oh.bind(null,n,a,Le,Zr,mo,e,Ie,Vn,xl,on,i,"Throttled",-0,0),l);break t}Oh(n,a,Le,Zr,mo,e,Ie,Vn,xl,on,i,null,-0,0)}}break}while(!0);Ea(t)}function Oh(t,e,a,n,l,i,h,z,D,Z,at,ct,Y,F){t.timeoutHandle=-1;var bt=e.subtreeFlags,zt=(i&335544064)===i;if(ct=null,(zt||bt&8192||(bt&16785408)===16785408)&&(ct={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ga},Je=null,Th(e,i,ct),zt&&(bt=ct,zt=t.containerInfo,zt=(zt.nodeType===9?zt:zt.ownerDocument).__reactViewTransition,zt!=null&&(bt.count++,bt.waitingForViewTransition=!0,bt=ki.bind(bt),zt.finished.then(bt,bt))),bt=(i&62914560)===i?Yr-Ae():(i&4194048)===i?kh-Ae():0,bt=hg(ct,bt),bt!==null)){Na=i,t.cancelPendingCommit=bt(Gh.bind(null,t,e,i,a,n,l,h,z,D,Z,at,ct,null,Y,F)),dn(t,i,h,!Z);return}Gh(t,e,i,a,n,l,h,z,D,Z,at,ct)}function op(t){for(var e=t;;){var a=e.tag;if((a===0||a===11||a===15)&&e.flags&16384&&(a=e.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var n=0;n<a.length;n++){var l=a[n],i=l.getSnapshot;l=l.value;try{if(!Qe(i(),l))return!1}catch{return!1}}if(a=e.child,e.subtreeFlags&16384&&a!==null)a.return=e,e=a;else{if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return!0;e=e.return}e.sibling.return=e.return,e=e.sibling}}return!0}function dn(t,e,a,n){e=Ec(t,e),e&=~qr,e&=~Vn,t.suspendedLanes|=e,t.pingedLanes&=~e,n&&(t.warmLanes|=e),n=t.expirationTimes;for(var l=e;0<l;){var i=31-Ze(l),h=1<<i;n[i]=-1,l&=~h}a!==0&&kc(t,a,e)}function Qr(){return(Jt&6)===0?(_i(0),!1):!0}function yo(){if(qt!==null){if(Ft===0)var t=qt.return;else t=qt,Ua=Mn=null,Tu(t),fl=null,li=0,t=qt;for(;t!==null;)eh(t.alternate,t),t=t.return;qt=null}}function Nl(t,e){var a=t.timeoutHandle;return a!==-1&&(t.timeoutHandle=-1,jp(a)),a=t.cancelPendingCommit,a!==null&&(t.cancelPendingCommit=null,a()),Na=0,yo(),ee=t,qt=a=Da(t.current,null),Vt=e,Ft=0,We=null,on=!1,bl=Gl(t,e),ho=!1,xl=Ie=qr=Vn=cn=ue=0,Le=bi=null,mo=!1,Ya=Ec(t,e),tr(),a}function jh(t,e){Ut=null,pt.H=Nr,e===cl||e===fr?(e=Gf(),Ft=3):e===fu?(e=Gf(),Ft=4):Ft=e===Lu?8:e!==null&&typeof e=="object"&&typeof e.then=="function"?6:1,We=e,qt===null&&(ue=1,Er(t,na(e,t.current)))}function Dh(){var t=we.current;return t===null?!0:(Vt&4194048)===Vt?ke===null:(Vt&62914560)===Vt||(Vt&536870912)!==0?t===ke:!1}function Rh(){var t=pt.H;return pt.H=Nr,t===null?Nr:t}function Uh(){var t=pt.A;return pt.A=sp,t}function Kr(){ue=4,on||(Vt&4194048)!==Vt&&we.current!==null||(bl=!0),(cn&134217727)===0&&(Vn&134217727)===0||ee===null||dn(ee,Vt,Ie,!1)}function vo(t,e,a){var n=Jt;Jt|=2;var l=Rh(),i=Uh();(ee!==t||Vt!==e)&&(Zr=null,Nl(t,e)),e=!1;var h=ue;t:do try{if(Ft!==0&&qt!==null){var z=qt,D=We;switch(Ft){case 8:yo(),h=6;break t;case 3:case 2:case 9:case 6:we.current===null&&(e=!0);var Z=Ft;if(Ft=0,We=null,El(t,z,D,Z),a&&bl){h=0;break t}break;default:Z=Ft,Ft=0,We=null,El(t,z,D,Z)}}cp(),h=ue;break}catch(at){jh(t,at)}while(!0);return e&&t.shellSuspendCounter++,Ua=Mn=null,Jt=n,pt.H=l,pt.A=i,qt===null&&(ee=null,Vt=0,tr()),h}function cp(){for(;qt!==null;)Bh(qt)}function fp(t,e){var a=Jt;Jt|=2;var n=Rh(),l=Uh();ee!==t||Vt!==e?(Zr=null,Vr=Ae()+500,Nl(t,e)):bl=Gl(t,e);t:do try{if(Ft!==0&&qt!==null){e=qt;var i=We;e:switch(Ft){case 1:Ft=0,We=null,El(t,e,i,1);break;case 2:case 9:if(Hf(i)){Ft=0,We=null,Hh(e);break}e=function(){Ft!==2&&Ft!==9||ee!==t||(Ft=7),Ea(t)},i.then(e,e);break t;case 3:Ft=7;break t;case 4:Ft=5;break t;case 7:Hf(i)?(Ft=0,We=null,Hh(e)):(Ft=0,We=null,El(t,e,i,7));break;case 5:var h=null;switch(qt.tag){case 26:h=qt.memoizedState;case 5:case 27:var z=qt;if(h?A0(h):z.stateNode.complete){Ft=0,We=null;var D=z.sibling;if(D!==null)qt=D;else{var Z=z.return;Z!==null?(qt=Z,Jr(Z)):qt=null}break e}}Ft=0,We=null,El(t,e,i,5);break;case 6:Ft=0,We=null,El(t,e,i,6);break;case 8:yo(),ue=6;break t;default:throw Error(s(462))}}dp();break}catch(at){jh(t,at)}while(!0);return Ua=Mn=null,pt.H=n,pt.A=l,Jt=a,qt!==null?0:(ee=null,Vt=0,tr(),ue)}function dp(){for(;qt!==null&&!Bi();)Bh(qt)}function Bh(t){var e=Pd(t.alternate,t,Ya);t.memoizedProps=t.pendingProps,e===null?Jr(t):qt=e}function Hh(t){var e=t,a=e.alternate;switch(e.tag){case 15:case 0:e=Qd(a,e,e.pendingProps,e.type,void 0,Vt);break;case 11:e=Qd(a,e,e.pendingProps,e.type.render,e.ref,Vt);break;case 5:Tu(e);var n=e;n===ye&&(Lt?(rr(n),n.tag===5&&n.stateNode!=null&&(ae=n.stateNode)):(rr(n),Lt=!0));default:eh(a,e),e=qt=zf(e,Ya),e=Pd(a,e,Ya)}t.memoizedProps=t.pendingProps,e===null?Jr(t):qt=e}function El(t,e,a,n){Ua=Mn=null,Tu(e),fl=null,li=0;var l=e.return;try{if(P1(t,l,e,a,Vt)){ue=1,Er(t,na(a,t.current)),qt=null;return}}catch(i){if(l!==null)throw qt=l,i;ue=1,Er(t,na(a,t.current)),qt=null;return}e.flags&32768?(Lt||n===1?t=!0:bl||(Vt&536870912)!==0?t=!1:(on=t=!0,(n===2||n===9||n===3||n===6)&&(n=we.current,n!==null&&n.tag===13&&(n.flags|=16384))),Lh(e,t)):Jr(e)}function Jr(t){var e=t;do{if((e.flags&32768)!==0){Lh(e,on);return}t=e.return;var a=np(e.alternate,e,Ya);if(a!==null){qt=a;return}if(e=e.sibling,e!==null){qt=e;return}qt=e=t}while(e!==null);ue===0&&(ue=5)}function Lh(t,e){do{var a=lp(t.alternate,t);if(a!==null){a.flags&=32767,qt=a;return}if(a=t.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!e&&(t=t.sibling,t!==null)){qt=t;return}qt=t=a}while(t!==null);ue=6,qt=null}function Gh(t,e,a,n,l,i,h,z,D,Z,at,ct){t.cancelPendingCommit=null;do Wr();while(re!==0);if((Jt&6)!==0)throw Error(s(327));if(e!==null){if(e===t.current)throw Error(s(177));t===ee&&(qt=ee=null,Vt=0),Zn=e,ma=t,Na=a,go=l,Ah=n,hp(t,e,a,h,z,D,ct)}}function hp(t,e,a,n,l,i,h){var z=e.lanes|e.childLanes;if(po=z,z|=$s,Lm(t,a,z,n,l,i),Sl=null,(a&335544064)===a?(wl=q1(t),n=10262):(wl=null,n=10256),(e.subtreeFlags&n)!==0||(e.flags&n)!==0?(t.callbackNode=null,t.callbackPriority=0,bp(ka,function(){return So(),null})):(t.callbackNode=null,t.callbackPriority=0),Dr=!1,n=(e.flags&13878)!==0,(e.subtreeFlags&13878)!==0||n){n=pt.T,pt.T=null,l=_t.p,_t.p=2,i=Jt,Jt|=4;try{ip(t,e,a)}finally{Jt=i,_t.p=l,pt.T=n}}re=1,Dr?_l=Lp(h,t.containerInfo,wl,bo,xo,pp,_o,So,mp):(bo(),xo(),_o())}function mp(t){if(re!==0){var e=ma.onRecoverableError;e(t,{componentStack:null})}}function pp(){re===3&&(re=0,Sh(Zn,ma),re=4)}function bo(){if(re===1){re=0;var t=ma,e=Zn,a=Na,n=(e.flags&13878)!==0;if((e.subtreeFlags&13878)!==0||n){n=pt.T,pt.T=null;var l=_t.p;_t.p=2;var i=Jt;Jt|=4;try{gi=Br=!1,xh(e,t,a),a=Do;var h=yf(t.containerInfo),z=a.focusedElem,D=a.selectionRange;if(h!==z&&z&&z.ownerDocument&&gf(z.ownerDocument.documentElement,z)){if(D!==null&&Ks(z)){var Z=D.start,at=D.end;if(at===void 0&&(at=Z),"selectionStart"in z)z.selectionStart=Z,z.selectionEnd=Math.min(at,z.value.length);else{var ct=z.ownerDocument||document,Y=ct&&ct.defaultView||window;if(Y.getSelection){var F=Y.getSelection(),bt=z.textContent.length,zt=Math.min(D.start,bt),Bt=D.end===void 0?zt:Math.min(D.end,bt);!F.extend&&zt>Bt&&(h=Bt,Bt=zt,zt=h);var V=pf(z,zt),H=pf(z,Bt);if(V&&H&&(F.rangeCount!==1||F.anchorNode!==V.node||F.anchorOffset!==V.offset||F.focusNode!==H.node||F.focusOffset!==H.offset)){var J=ct.createRange();J.setStart(V.node,V.offset),F.removeAllRanges(),zt>Bt?(F.addRange(J),F.extend(H.node,H.offset)):(J.setEnd(H.node,H.offset),F.addRange(J))}}}}for(ct=[],F=z;F=F.parentNode;)F.nodeType===1&&ct.push({element:F,left:F.scrollLeft,top:F.scrollTop});for(typeof z.focus=="function"&&z.focus(),z=0;z<ct.length;z++){var ot=ct[z];ot.element.scrollLeft=ot.left,ot.element.scrollTop=ot.top}}Dl=!!jo,Do=jo=null}finally{Jt=i,_t.p=l,pt.T=n}}t.current=e,re=2}}function xo(){if(re===2){re=0;var t=ma,e=Zn,a=(e.flags&8772)!==0;if((e.subtreeFlags&8772)!==0||a){a=pt.T,pt.T=null;var n=_t.p;_t.p=2;var l=Jt;Jt|=4;try{mh(t,e.alternate,e)}finally{Jt=l,_t.p=n,pt.T=a}}re=3}}function _o(){if(re===4||re===3){re=0;var t=_l;_l=null,Ns();var e=ma,a=Zn,n=Na,l=Ah,i=(n&335544064)===n?10262:10256;if((a.subtreeFlags&i)!==0||(a.flags&i)!==0?re=5:(re=0,Zn=ma=null,qh(e,e.pendingLanes)),i=e.pendingLanes,i===0&&(fn=null),As(n),a=a.stateNode,Ve&&typeof Ve.onCommitFiberRoot=="function")try{Ve.onCommitFiberRoot(Ll,a,void 0,(a.current.flags&128)===128)}catch{}if(l!==null){a=pt.T,i=_t.p,_t.p=2,pt.T=null;try{for(var h=e.onRecoverableError,z=0;z<l.length;z++){var D=l[z];h(D.value,{componentStack:D.stack})}}finally{pt.T=a,_t.p=i}}if(l=Sl,h=wl,wl=null,l!==null&&(Sl=null,h===null&&(h=[]),t!==null))for(D=0;D<l.length;D++)a=(0,l[D])(h),a!==void 0&&t.finished.finally(a);(Na&3)!==0&&Wr(),Ea(e),i=e.pendingLanes,(n&261930)!==0&&(i&42)!==0?e===Xr?xi++:(xi=0,Xr=e):(xi=0,Xr=null),_i(0)}}function qh(t,e){(t.pooledCacheLanes&=e)===0&&(e=t.pooledCache,e!=null&&(t.pooledCache=null,ei(e)))}function Wr(){return _l!==null&&(_l.skipTransition(),_l=null),bo(),xo(),_o(),So()}function So(){if(re!==5)return!1;var t=ma,e=po;po=0;var a=As(Na),n=pt.T,l=_t.p;try{_t.p=32>a?32:a,pt.T=null,a=go,go=null;var i=ma,h=Na;if(re=0,Zn=ma=null,Na=0,(Jt&6)!==0)throw Error(s(331));var z=Jt;if(Jt|=4,Eh(i.current),wh(i,i.current,h,a),Jt=z,_i(0,!1),Ve&&typeof Ve.onPostCommitFiberRoot=="function")try{Ve.onPostCommitFiberRoot(Ll,i)}catch{}return!0}finally{_t.p=l,pt.T=n,qh(t,e)}}function Yh(t,e,a){e=na(a,e),e=Hu(t.stateNode,e,2),t=an(t,e,2),t!==null&&(ql(t,2),Ea(t))}function $t(t,e,a){if(t.tag===3)Yh(t,t,a);else for(;e!==null;){if(e.tag===3){Yh(e,t,a);break}else if(e.tag===1){var n=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(fn===null||!fn.has(n))){t=na(a,t),a=Hd(2),n=an(e,a,2),n!==null&&(Ld(a,n,e,t),ql(n,2),Ea(n));break}}e=e.return}}function wo(t,e,a){var n=t.pingCache;if(n===null){n=t.pingCache=new up;var l=new Set;n.set(e,l)}else l=n.get(e),l===void 0&&(l=new Set,n.set(e,l));l.has(a)||(ho=!0,l.add(a),t=gp.bind(null,t,e,a),e.then(t,t))}function gp(t,e,a){var n=t.pingCache;n!==null&&n.delete(e),t.pingedLanes|=t.suspendedLanes&a,t.warmLanes&=~a,ee===t&&(Vt&a)===a&&((ue===4||ue===3&&(Vt&62914560)===Vt&&300>Ae()-Yr)&&(Jt&2)===0?Nl(t,0):qr|=a,xl===Vt&&(xl=0)),Ea(t)}function Vh(t,e){e===0&&(e=zc()),t=kn(t,e),t!==null&&(ql(t,e),Ea(t))}function yp(t){var e=t.memoizedState,a=0;e!==null&&(a=e.retryLane),Vh(t,a)}function vp(t,e){var a=0;switch(t.tag){case 31:case 13:var n=t.stateNode,l=t.memoizedState;l!==null&&(a=l.retryLane);break;case 19:n=t.stateNode;break;case 22:n=t.stateNode._retryCache;break;default:throw Error(s(314))}n!==null&&n.delete(e),Vh(t,a)}function bp(t,e){return Sn(t,e)}var zl=null,kl=null,To=!1,Ir=!1,No=!1,hn=0;function Ea(t){t!==kl&&t.next===null&&(kl===null?zl=kl=t:kl=kl.next=t),Ir=!0,To||(To=!0,_p())}function _i(t,e){if(!No&&Ir){No=!0;do for(var a=!1,n=zl;n!==null;){if(t!==0){var l=n.pendingLanes;if(l===0)var i=0;else{var h=n.suspendedLanes,z=n.pingedLanes;i=(1<<31-Ze(42|t)+1)-1,i&=l&~(h&~z),i=i&201326741?i&201326741|1:i?i|2:0}i!==0&&(a=!0,Kh(n,i))}else i=Vt,i=qi(n,n===ee?i:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),(i&3)===0||Gl(n,i)||(a=!0,Kh(n,i));n=n.next}while(a);No=!1}}function xp(){Zh()}function Zh(){Ir=To=!1;var t=0;hn!==0&&Op()&&(t=hn);for(var e=Ae(),a=null,n=zl;n!==null;){var l=n.next,i=Xh(n,e);i===0?(n.next=null,a===null?zl=l:a.next=l,l===null&&(kl=a)):(a=n,(t!==0||(i&3)!==0)&&(Ir=!0)),n=l}re!==0&&re!==5||_i(t),hn!==0&&(hn=0)}function Xh(t,e){for(var a=t.suspendedLanes,n=t.pingedLanes,l=t.expirationTimes,i=t.pendingLanes&-62914561;0<i;){var h=31-Ze(i),z=1<<h,D=l[h];D===-1?((z&a)===0||(z&n)!==0)&&(l[h]=Hm(z,e)):D<=e&&(t.expiredLanes|=z),i&=~z}if(e=ee,a=Vt,a=qi(t,t===e?a:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),n=t.callbackNode,a===0||t===e&&(Ft===2||Ft===9)||t.cancelPendingCommit!==null)return n!==null&&n!==null&&Ye(n),t.callbackNode=null,t.callbackPriority=0;if((a&3)===0||Gl(t,a)){if(e=a&-a,e===t.callbackPriority)return e;switch(n!==null&&Ye(n),As(a)){case 2:case 8:a=Xa;break;case 32:a=ka;break;case 268435456:a=Nc;break;default:a=ka}return n=Qh.bind(null,t),a=Sn(a,n),t.callbackPriority=e,t.callbackNode=a,e}return n!==null&&n!==null&&Ye(n),t.callbackPriority=2,t.callbackNode=null,2}function Qh(t,e){if(re!==0&&re!==5)return t.callbackNode=null,t.callbackPriority=0,null;var a=t.callbackNode;if(Wr()&&t.callbackNode!==a)return null;var n=Vt;return n=qi(t,t===ee?n:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),n===0?null:(Mh(t,n,e),Xh(t,Ae()),t.callbackNode!=null&&t.callbackNode===a?Qh.bind(null,t):null)}function Kh(t,e){if(Wr())return null;Mh(t,e,!0)}function _p(){Dp(function(){(Jt&6)!==0?Sn(Hl,xp):Zh()})}function Eo(){if(hn===0){var t=Dn;t===0&&(t=Hi,Hi<<=1,(Hi&261888)===0&&(Hi=256)),hn=t}return hn}function Jh(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:Qi(t)}function Sp(t,e,a,n,l){if(e==="submit"&&a&&a.stateNode===l){var i=Jh((l[Re]||null).action),h=n.submitter;h&&(e=(e=h[Re]||null)?Jh(e.formAction):h.getAttribute("formAction"),e!==null&&(i=e,h=null));var z=new Ii("action","action",null,n,l);t.push({event:z,listeners:[{instance:null,listener:function(){if(n.defaultPrevented){if(hn!==0){var D=new FormData(l,h);ju(a,{pending:!0,data:D,method:l.method,action:i},null,D)}}else typeof i=="function"&&(z.preventDefault(),D=new FormData(l,h),ju(a,{pending:!0,data:D,method:l.method,action:i},i,D))},currentTarget:l}]})}}for(var zo=0;zo<Fs.length;zo++){var ko=Fs[zo],wp=ko.toLowerCase(),Tp=ko[0].toUpperCase()+ko.slice(1);ca(wp,"on"+Tp)}ca(xf,"onAnimationEnd"),ca(_f,"onAnimationIteration"),ca(Sf,"onAnimationStart"),ca("dblclick","onDoubleClick"),ca("focusin","onFocus"),ca("focusout","onBlur"),ca(j1,"onTransitionRun"),ca(D1,"onTransitionStart"),ca(R1,"onTransitionCancel"),ca(wf,"onTransitionEnd"),In("onMouseEnter",["mouseout","mouseover"]),In("onMouseLeave",["mouseout","mouseover"]),In("onPointerEnter",["pointerout","pointerover"]),In("onPointerLeave",["pointerout","pointerover"]),Nn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Nn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Nn("onBeforeInput",["compositionend","keypress","textInput","paste"]),Nn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Nn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Nn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Si="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Np=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Si));function Wh(t,e){e=(e&4)!==0;for(var a=0;a<t.length;a++){var n=t[a],l=n.event;n=n.listeners;t:{var i=void 0;if(e)for(var h=n.length-1;0<=h;h--){var z=n[h],D=z.instance,Z=z.currentTarget;if(z=z.listener,D!==i&&l.isPropagationStopped())break t;i=z,l.currentTarget=Z;try{i(l)}catch(at){Pi(at)}l.currentTarget=null,i=D}else for(h=0;h<n.length;h++){if(z=n[h],D=z.instance,Z=z.currentTarget,z=z.listener,D!==i&&l.isPropagationStopped())break t;i=z,l.currentTarget=Z;try{i(l)}catch(at){Pi(at)}l.currentTarget=null,i=D}}}}function Yt(t,e){var a=e[jc];a===void 0&&(a=e[jc]=new Set);var n=t+"__bubble";a.has(n)||(Ih(e,t,2,!1),a.add(n))}function Ao(t,e,a){var n=0;e&&(n|=4),Ih(a,t,n,e)}var Fr="_reactListening"+Math.random().toString(36).slice(2);function Co(t){if(!t[Fr]){t[Fr]=!0,Uc.forEach(function(a){a!=="selectionchange"&&(Np.has(a)||Ao(a,!1,t),Ao(a,!0,t))});var e=t.nodeType===9?t:t.ownerDocument;e===null||e[Fr]||(e[Fr]=!0,Ao("selectionchange",!1,e))}}function Ih(t,e,a,n){switch(L0(e)){case 2:var l=yg;break;case 8:l=vg;break;default:l=Io}a=l.bind(null,e,a,t),l=void 0,!Bs||e!=="touchstart"&&e!=="touchmove"&&e!=="wheel"||(l=!0),n?l!==void 0?t.addEventListener(e,a,{capture:!0,passive:l}):t.addEventListener(e,a,!0):l!==void 0?t.addEventListener(e,a,{passive:l}):t.addEventListener(e,a,!1)}function Mo(t,e,a,n,l){var i=n;if((e&1)===0&&(e&2)===0&&n!==null)t:for(;;){if(n===null)return;var h=n.tag;if(h===3||h===4){var z=n.stateNode.containerInfo;if(z===l)break;if(h===4)for(h=n.return;h!==null;){var D=h.tag;if((D===3||D===4)&&h.stateNode.containerInfo===l)return;h=h.return}for(;z!==null;){if(h=Tn(z),h===null)return;if(D=h.tag,D===5||D===6||D===26||D===27){n=i=h;continue t}z=z.parentNode}}n=n.return}Wc(function(){var Z=i,at=Rs(a),ct=[];t:{var Y=Tf.get(t);if(Y!==void 0){var F=Ii,bt=t;switch(t){case"keypress":if(Ji(a)===0)break t;case"keydown":case"keyup":F=o1;break;case"focusin":bt="focus",F=qs;break;case"focusout":bt="blur",F=qs;break;case"beforeblur":case"afterblur":F=qs;break;case"click":if(a.button===2)break t;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":F=$c;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":F=Fm;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":F=m1;break;case xf:case _f:case Sf:F=t1;break;case wf:F=g1;break;case"scroll":case"scrollend":F=Wm;break;case"wheel":F=v1;break;case"copy":case"cut":case"paste":F=a1;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":F=tf;break;case"submit":F=d1;break;case"toggle":case"beforetoggle":F=x1}var zt=(e&4)!==0,Bt=!zt&&(t==="scroll"||t==="scrollend"),V=zt?Y!==null?Y+"Capture":null:Y;zt=[];for(var H=Z,J;H!==null;){var ot=H;if(J=ot.stateNode,ot=ot.tag,ot!==5&&ot!==26&&ot!==27||J===null||V===null||(ot=Zl(H,V),ot!=null&&zt.push(wi(H,ot,J))),Bt)break;H=H.return}0<zt.length&&(Y=new F(Y,bt,null,a,at),ct.push({event:Y,listeners:zt}))}}if((e&7)===0){t:{if(F=t==="mouseover"||t==="pointerover",Y=t==="mouseout"||t==="pointerout",F&&a!==Ds&&(bt=a.relatedTarget||a.fromElement)&&(Tn(bt)||bt[Kn]))break t;(Y||F)&&(bt=at.window===at?at:(F=at.ownerDocument)?F.defaultView||F.parentWindow:window,Y?(F=a.relatedTarget||a.toElement,Y=Z,F=F?Tn(F):null,F!==null&&(Bt=f(F),zt=F.tag,F!==Bt||zt!==5&&zt!==27&&zt!==6)&&(F=null)):(Y=null,F=Z),Y!==F&&(zt=$c,ot="onMouseLeave",V="onMouseEnter",H="mouse",(t==="pointerout"||t==="pointerover")&&(zt=tf,ot="onPointerLeave",V="onPointerEnter",H="pointer"),Bt=Y==null?bt:Vl(Y),J=F==null?bt:Vl(F),bt=new zt(ot,H+"leave",Y,a,at),bt.target=Bt,bt.relatedTarget=J,ot=null,Tn(at)===Z&&(zt=new zt(V,H+"enter",F,a,at),zt.target=J,zt.relatedTarget=Bt,ot=zt),Bt=ot,zt=Y&&F?W(Y,F,Ep):null,Y!==null&&Fh(ct,bt,Y,zt,!1),F!==null&&Bt!==null&&Fh(ct,Bt,F,zt,!0)))}t:{if(Y=Z?Vl(Z):window,F=Y.nodeName&&Y.nodeName.toLowerCase(),F==="select"||F==="input"&&Y.type==="file")var Et=of;else if(sf(Y))if(cf)Et=C1;else{Et=k1;var Zt=z1}else F=Y.nodeName,!F||F.toLowerCase()!=="input"||Y.type!=="checkbox"&&Y.type!=="radio"?Z&&js(Z.elementType)&&(Et=of):Et=A1;if(Et&&(Et=Et(t,Z))){uf(ct,Et,a,at);break t}Zt&&Zt(t,Y,Z)}switch(Zt=Z?Vl(Z):window,t){case"focusin":(sf(Zt)||Zt.contentEditable==="true")&&(al=Zt,Js=Z,$l=null);break;case"focusout":$l=Js=al=null;break;case"mousedown":Ws=!0;break;case"contextmenu":case"mouseup":case"dragend":Ws=!1,vf(ct,a,at);break;case"selectionchange":if(O1)break;case"keydown":case"keyup":vf(ct,a,at)}var Ct;if(Vs)t:{switch(t){case"compositionstart":var Ot="onCompositionStart";break t;case"compositionend":Ot="onCompositionEnd";break t;case"compositionupdate":Ot="onCompositionUpdate";break t}Ot=void 0}else el?lf(t,a)&&(Ot="onCompositionEnd"):t==="keydown"&&a.keyCode===229&&(Ot="onCompositionStart");Ot&&(ef&&a.locale!=="ko"&&(el||Ot!=="onCompositionStart"?Ot==="onCompositionEnd"&&el&&(Ct=Ic()):(Ka=at,Hs="value"in Ka?Ka.value:Ka.textContent,el=!0)),Zt=$r(Z,Ot),0<Zt.length&&(Ot=new Pc(Ot,t,null,a,at),ct.push({event:Ot,listeners:Zt}),Ct?Ot.data=Ct:(Ct=rf(a),Ct!==null&&(Ot.data=Ct)))),(Ct=S1?w1(t,a):T1(t,a))&&(Ot=$r(Z,"onBeforeInput"),0<Ot.length&&(Zt=new Pc("onBeforeInput","beforeinput",null,a,at),ct.push({event:Zt,listeners:Ot}),Zt.data=Ct)),Sp(ct,t,Z,a,at)}Wh(ct,e)})}function wi(t,e,a){return{instance:t,listener:e,currentTarget:a}}function $r(t,e){for(var a=e+"Capture",n=[];t!==null;){var l=t,i=l.stateNode;if(l=l.tag,l!==5&&l!==26&&l!==27||i===null||(l=Zl(t,a),l!=null&&n.unshift(wi(t,l,i)),l=Zl(t,e),l!=null&&n.push(wi(t,l,i))),t.tag===3)return n;t=t.return}return[]}function Ep(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function Fh(t,e,a,n,l){for(var i=e._reactName,h=[];a!==null&&a!==n;){var z=a,D=z.alternate,Z=z.stateNode;if(z=z.tag,D!==null&&D===n)break;z!==5&&z!==26&&z!==27||Z===null||(D=Z,l?(Z=Zl(a,i),Z!=null&&h.unshift(wi(a,Z,D))):l||(Z=Zl(a,i),Z!=null&&h.push(wi(a,Z,D)))),a=a.return}h.length!==0&&t.push({event:e,listeners:h})}var zp=/\r\n?/g,kp=/\u0000|\uFFFD/g;function $h(t){return(typeof t=="string"?t:""+t).replace(zp,`+`).replace(kp,"")}function Ph(t,e){return e=$h(e),$h(t)===e}function Pt(t,e,a,n,l,i){switch(a){case"children":if(typeof n=="string")e==="body"||e==="textarea"&&n===""||$n(t,n);else if(typeof n=="number"||typeof n=="bigint")e!=="body"&&$n(t,""+n);else return;break;case"className":Xi(t,"class",n);break;case"tabIndex":Xi(t,"tabindex",n);break;case"dir":case"role":case"viewBox":case"width":case"height":Xi(t,a,n);break;case"style":Kc(t,n,i);return;case"data":if(e!=="object"){Xi(t,"data",n);break}case"src":case"href":if(n===""&&(e!=="a"||a!=="href")){t.removeAttribute(a);break}if(n==null||typeof n=="function"||typeof n=="symbol"||typeof n=="boolean"){t.removeAttribute(a);break}n=Qi(n),t.setAttribute(a,n);break;case"action":case"formAction":if(typeof n=="function"){t.setAttribute(a,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof i=="function"&&(a==="formAction"?(e!=="input"&&Pt(t,e,"name",l.name,l,null),Pt(t,e,"formEncType",l.formEncType,l,null),Pt(t,e,"formMethod",l.formMethod,l,null),Pt(t,e,"formTarget",l.formTarget,l,null)):(Pt(t,e,"encType",l.encType,l,null),Pt(t,e,"method",l.method,l,null),Pt(t,e,"target",l.target,l,null)));if(n==null||typeof n=="symbol"||typeof n=="boolean"){t.removeAttribute(a);break}n=Qi(n),t.setAttribute(a,n);break;case"onClick":n!=null&&(t.onclick=ga);return;case"onScroll":n!=null&&Yt("scroll",t);return;case"onScrollEnd":n!=null&&Yt("scrollend",t);return;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(s(61));if(a=n.__html,a!=null){if(l.children!=null)throw Error(s(60));(i!=null?i.__html:void 0)!==a&&(t.innerHTML=a)}}break;case"multiple":t.multiple=n&&typeof n!="function"&&typeof n!="symbol";break;case"muted":t.muted=n&&typeof n!="function"&&typeof n!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(n==null||typeof n=="function"||typeof n=="boolean"||typeof n=="symbol"){t.removeAttribute("xlink:href");break}a=Qi(n),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":n!=null&&typeof n!="function"&&typeof n!="symbol"?t.setAttribute(a,n):t.removeAttribute(a);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"credentialless":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":n&&typeof n!="function"&&typeof n!="symbol"?t.setAttribute(a,""):t.removeAttribute(a);break;case"capture":case"download":n===!0?t.setAttribute(a,""):n!==!1&&n!=null&&typeof n!="function"&&typeof n!="symbol"?t.setAttribute(a,n):t.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":n!=null&&typeof n!="function"&&typeof n!="symbol"&&!isNaN(n)&&1<=n?t.setAttribute(a,n):t.removeAttribute(a);break;case"rowSpan":case"start":n==null||typeof n=="function"||typeof n=="symbol"||isNaN(n)?t.removeAttribute(a):t.setAttribute(a,n);break;case"popover":Yt("beforetoggle",t),Yt("toggle",t),Zi(t,"popover",n);break;case"xlinkActuate":Ca(t,"http://www.w3.org/1999/xlink","xlink:actuate",n);break;case"xlinkArcrole":Ca(t,"http://www.w3.org/1999/xlink","xlink:arcrole",n);break;case"xlinkRole":Ca(t,"http://www.w3.org/1999/xlink","xlink:role",n);break;case"xlinkShow":Ca(t,"http://www.w3.org/1999/xlink","xlink:show",n);break;case"xlinkTitle":Ca(t,"http://www.w3.org/1999/xlink","xlink:title",n);break;case"xlinkType":Ca(t,"http://www.w3.org/1999/xlink","xlink:type",n);break;case"xmlBase":Ca(t,"http://www.w3.org/XML/1998/namespace","xml:base",n);break;case"xmlLang":Ca(t,"http://www.w3.org/XML/1998/namespace","xml:lang",n);break;case"xmlSpace":Ca(t,"http://www.w3.org/XML/1998/namespace","xml:space",n);break;case"is":Zi(t,"is",n);break;case"innerText":case"textContent":return;default:if(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")a=Km.get(a)||a,Zi(t,a,n);else return}Kt=!0}function Oo(t,e,a,n,l,i){switch(a){case"style":Kc(t,n,i);return;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(s(61));if(a=n.__html,a!=null){if(l.children!=null)throw Error(s(60));(i!=null?i.__html:void 0)!==a&&(t.innerHTML=a)}}break;case"children":if(typeof n=="string")$n(t,n);else if(typeof n=="number"||typeof n=="bigint")$n(t,""+n);else return;break;case"onScroll":n!=null&&Yt("scroll",t);return;case"onScrollEnd":n!=null&&Yt("scrollend",t);return;case"onClick":n!=null&&(t.onclick=ga);return;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":return;case"innerText":case"textContent":return;default:if(!Bc.hasOwnProperty(a))t:{if(a[0]==="o"&&a[1]==="n"&&(l=a.endsWith("Capture"),i=a.slice(2,l?a.length-7:void 0),e=t[Re]||null,e=e!=null?e[a]:null,typeof e=="function"&&t.removeEventListener(i,e,l),typeof n=="function")){typeof e!="function"&&e!==null&&(a in t?t[a]=null:t.hasAttribute(a)&&t.removeAttribute(a)),t.addEventListener(i,n,l);break t}Kt=!0,a in t?t[a]=n:n===!0?t.setAttribute(a,""):Zi(t,a,n)}return}Kt=!0}function Ee(t,e,a){switch(e){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Yt("error",t),Yt("load",t);var n=!1,l=!1,i;for(i in a)if(a.hasOwnProperty(i)){var h=a[i];if(h!=null)switch(i){case"src":n=!0;break;case"srcSet":l=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(s(137,e));default:Pt(t,e,i,h,a,null)}}l&&Pt(t,e,"srcSet",a.srcSet,a,null),n&&Pt(t,e,"src",a.src,a,null);return;case"input":Yt("invalid",t);var z=i=h=l=null,D=null,Z=null;for(n in a)if(a.hasOwnProperty(n)){var at=a[n];if(at!=null)switch(n){case"name":l=at;break;case"type":h=at;break;case"checked":D=at;break;case"defaultChecked":Z=at;break;case"value":i=at;break;case"defaultValue":z=at;break;case"children":case"dangerouslySetInnerHTML":if(at!=null)throw Error(s(137,e));break;default:Pt(t,e,n,at,a,null)}}Vc(t,i,z,D,Z,h,l,!1);return;case"select":Yt("invalid",t),n=h=i=null;for(l in a)if(a.hasOwnProperty(l)&&(z=a[l],z!=null))switch(l){case"value":i=z;break;case"defaultValue":h=z;break;case"multiple":n=z;default:Pt(t,e,l,z,a,null)}e=i,a=h,t.multiple=!!n,e!=null?Fn(t,!!n,e,!1):a!=null&&Fn(t,!!n,a,!0);return;case"textarea":Yt("invalid",t),i=l=n=null;for(h in a)if(a.hasOwnProperty(h)&&(z=a[h],z!=null))switch(h){case"value":n=z;break;case"defaultValue":l=z;break;case"children":i=z;break;case"dangerouslySetInnerHTML":if(z!=null)throw Error(s(91));break;default:Pt(t,e,h,z,a,null)}Xc(t,n,l,i);return;case"option":for(D in a)if(a.hasOwnProperty(D)&&(n=a[D],n!=null))switch(D){case"selected":t.selected=n&&typeof n!="function"&&typeof n!="symbol";break;default:Pt(t,e,D,n,a,null)}return;case"dialog":Yt("beforetoggle",t),Yt("toggle",t),Yt("cancel",t),Yt("close",t);break;case"iframe":case"object":Yt("load",t);break;case"video":case"audio":for(n=0;n<Si.length;n++)Yt(Si[n],t);break;case"image":Yt("error",t),Yt("load",t);break;case"details":Yt("toggle",t);break;case"embed":case"source":case"link":Yt("error",t),Yt("load",t);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(Z in a)if(a.hasOwnProperty(Z)&&(n=a[Z],n!=null))switch(Z){case"children":case"dangerouslySetInnerHTML":throw Error(s(137,e));default:Pt(t,e,Z,n,a,null)}return;default:if(js(e)){for(at in a)a.hasOwnProperty(at)&&(n=a[at],n!==void 0&&Oo(t,e,at,n,a,void 0));return}}for(z in a)a.hasOwnProperty(z)&&(n=a[z],n!=null&&Pt(t,e,z,n,a,null))}var Ap={};function Cp(t,e,a,n){switch(e){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var l=null,i=null,h=null,z=null,D=null,Z=null,at=null;for(F in a){var ct=a[F];if(a.hasOwnProperty(F)&&ct!=null)switch(F){case"checked":break;case"value":break;case"defaultValue":D=ct;default:n.hasOwnProperty(F)||Pt(t,e,F,null,n,ct)}}for(var Y in n){var F=n[Y];if(ct=a[Y],n.hasOwnProperty(Y)&&(F!=null||ct!=null))switch(Y){case"type":F!==ct&&(Kt=!0),i=F;break;case"name":F!==ct&&(Kt=!0),l=F;break;case"checked":F!==ct&&(Kt=!0),Z=F;break;case"defaultChecked":F!==ct&&(Kt=!0),at=F;break;case"value":F!==ct&&(Kt=!0),h=F;break;case"defaultValue":F!==ct&&(Kt=!0),z=F;break;case"children":case"dangerouslySetInnerHTML":if(F!=null)throw Error(s(137,e));break;default:F!==ct&&Pt(t,e,Y,F,n,ct)}}Ms(t,h,z,D,Z,at,i,l);return;case"select":F=h=z=Y=null;for(i in a)if(D=a[i],a.hasOwnProperty(i)&&D!=null)switch(i){case"value":break;case"multiple":F=D;default:n.hasOwnProperty(i)||Pt(t,e,i,null,n,D)}for(l in n)if(i=n[l],D=a[l],n.hasOwnProperty(l)&&(i!=null||D!=null))switch(l){case"value":i!==D&&(Kt=!0),Y=i;break;case"defaultValue":i!==D&&(Kt=!0),z=i;break;case"multiple":i!==D&&(Kt=!0),h=i;default:i!==D&&Pt(t,e,l,i,n,D)}e=z,a=h,n=F,Y!=null?Fn(t,!!a,Y,!1):!!n!=!!a&&(e!=null?Fn(t,!!a,e,!0):Fn(t,!!a,a?[]:"",!1));return;case"textarea":F=Y=null;for(z in a)if(l=a[z],a.hasOwnProperty(z)&&l!=null&&!n.hasOwnProperty(z))switch(z){case"value":break;case"children":break;default:Pt(t,e,z,null,n,l)}for(h in n)if(l=n[h],i=a[h],n.hasOwnProperty(h)&&(l!=null||i!=null))switch(h){case"value":l!==i&&(Kt=!0),Y=l;break;case"defaultValue":l!==i&&(Kt=!0),F=l;break;case"children":break;case"dangerouslySetInnerHTML":if(l!=null)throw Error(s(91));break;default:l!==i&&Pt(t,e,h,l,n,i)}Zc(t,Y,F);return;case"option":for(var bt in a)if(Y=a[bt],a.hasOwnProperty(bt)&&Y!=null&&!n.hasOwnProperty(bt))switch(bt){case"selected":t.selected=!1;break;default:Pt(t,e,bt,null,n,Y)}for(D in n)if(Y=n[D],F=a[D],n.hasOwnProperty(D)&&Y!==F&&(Y!=null||F!=null))switch(D){case"selected":Y!==F&&(Kt=!0),t.selected=Y&&typeof Y!="function"&&typeof Y!="symbol";break;default:Pt(t,e,D,Y,n,F)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var zt in a)Y=a[zt],a.hasOwnProperty(zt)&&Y!=null&&!n.hasOwnProperty(zt)&&Pt(t,e,zt,null,n,Y);for(Z in n)if(Y=n[Z],F=a[Z],n.hasOwnProperty(Z)&&Y!==F&&(Y!=null||F!=null))switch(Z){case"children":case"dangerouslySetInnerHTML":if(Y!=null)throw Error(s(137,e));break;default:Pt(t,e,Z,Y,n,F)}return;default:if(js(e)){for(var Bt in a)Y=a[Bt],a.hasOwnProperty(Bt)&&Y!==void 0&&!n.hasOwnProperty(Bt)&&Oo(t,e,Bt,void 0,n,Y);for(at in n)Y=n[at],F=a[at],!n.hasOwnProperty(at)||Y===F||Y===void 0&&F===void 0||Oo(t,e,at,Y,n,F);return}}for(var V in a)Y=a[V],a.hasOwnProperty(V)&&Y!=null&&!n.hasOwnProperty(V)&&Pt(t,e,V,null,n,Y);for(ct in n)Y=n[ct],F=a[ct],!n.hasOwnProperty(ct)||Y===F||Y==null&&F==null||Pt(t,e,ct,Y,n,F)}function t0(t){switch(t){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Mp(){if(typeof performance.getEntriesByType=="function"){for(var t=0,e=0,a=performance.getEntriesByType("resource"),n=0;n<a.length;n++){var l=a[n],i=l.transferSize,h=l.initiatorType,z=l.duration;if(i&&z&&t0(h)){for(h=0,z=l.responseEnd,n+=1;n<a.length;n++){var D=a[n],Z=D.startTime;if(Z>z)break;var at=D.transferSize,ct=D.initiatorType;at&&t0(ct)&&(D=D.responseEnd,h+=at*(D<z?1:(z-Z)/(D-Z)))}if(--n,e+=8*(i+h)/(l.duration/1e3),t++,10<t)break}}if(0<t)return e/t/1e6}return navigator.connection&&(t=navigator.connection.downlink,typeof t=="number")?t:5}var jo=null,Do=null;function Ti(t){return t.nodeType===9?t:t.ownerDocument}function e0(t){switch(t){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function a0(t,e){if(t===0)switch(e){case"svg":return 1;case"math":return 2;default:return 0}return t===1&&e==="foreignObject"?0:t}function n0(t,e,a,n){return a=Ti(a).createElement(t),a[_e]=n,a[Re]=e,Ee(a,t,e),ge(a),a}function Ro(t,e){return t==="textarea"||t==="noscript"||typeof e.children=="string"||typeof e.children=="number"||typeof e.children=="bigint"||typeof e.dangerouslySetInnerHTML=="object"&&e.dangerouslySetInnerHTML!==null&&e.dangerouslySetInnerHTML.__html!=null}var Uo=null;function Op(){var t=window.event;return t&&t.type==="popstate"?t===Uo?!1:(Uo=t,!0):(Uo=null,!1)}var Bo=typeof setTimeout=="function"?setTimeout:void 0,jp=typeof clearTimeout=="function"?clearTimeout:void 0,l0=typeof Promise=="function"?Promise:void 0,i0=typeof requestAnimationFrame=="function"?requestAnimationFrame:Bo,Dp=typeof queueMicrotask=="function"?queueMicrotask:typeof l0<"u"?function(t){return l0.resolve(null).then(t).catch(Rp)}:Bo;function Rp(t){setTimeout(function(){throw t})}function mn(t){return t==="head"}function r0(t,e){var a=e,n=0;do{var l=a.nextSibling;if(t.removeChild(a),l&&l.nodeType===8)if(a=l.data,a==="/$"||a==="/&"){if(n===0){t.removeChild(l),Rl(e);return}n--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")n++;else if(a==="html")Xo(t.ownerDocument.documentElement);else if(a==="head"){a=t.ownerDocument.head,Xo(a);for(var i=a.firstChild;i;){var h=i.nextSibling,z=i.nodeName;i[Yl]||z==="SCRIPT"||z==="STYLE"||z==="LINK"&&i.rel.toLowerCase()==="stylesheet"||a.removeChild(i),i=h}}else a==="body"&&Xo(t.ownerDocument.body);a=l}while(a);Rl(e)}function s0(t,e){var a=t;t=0;do{var n=a.nextSibling;if(a.nodeType===1?e?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(e?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),n&&n.nodeType===8)if(a=n.data,a==="/$"){if(t===0)break;t--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||t++;a=n}while(a)}function u0(t,e,a){if(e=CSS.escape(e)!==e?"r-"+btoa(e).replace(/=/g,""):e,t.style.viewTransitionName=e,a!=null&&(t.style.viewTransitionClass=a),a=getComputedStyle(t),a.display==="inline"){if(e=t.getClientRects(),e.length===1)var n=1;else for(var l=n=0;l<e.length;l++){var i=e[l];0<i.width&&0<i.height&&n++}n===1&&(t=t.style,t.display=e.length===1?"inline-block":"block",t.marginTop="-"+a.paddingTop,t.marginBottom="-"+a.paddingBottom)}}function o0(t,e){t=t.style,e=e.style;var a=e!=null?e.hasOwnProperty("viewTransitionName")?e.viewTransitionName:e.hasOwnProperty("view-transition-name")?e["view-transition-name"]:null:null;t.viewTransitionName=a==null||typeof a=="boolean"?"":(""+a).trim(),a=e!=null?e.hasOwnProperty("viewTransitionClass")?e.viewTransitionClass:e.hasOwnProperty("view-transition-class")?e["view-transition-class"]:null:null,t.viewTransitionClass=a==null||typeof a=="boolean"?"":(""+a).trim(),t.display==="inline-block"&&(e==null?t.display=t.margin="":(a=e.display,t.display=a==null||typeof a=="boolean"?"":a,a=e.margin,a!=null?t.margin=a:(a=e.hasOwnProperty("marginTop")?e.marginTop:e["margin-top"],t.marginTop=a==null||typeof a=="boolean"?"":a,e=e.hasOwnProperty("marginBottom")?e.marginBottom:e["margin-bottom"],t.marginBottom=e==null||typeof e=="boolean"?"":e)))}function Up(t,e,a){return a=a.ownerDocument.defaultView,{rect:t,abs:e.position==="absolute"||e.position==="fixed",clip:e.clipPath!=="none"||e.overflow!=="visible"||e.filter!=="none"||e.mask!=="none"||e.mask!=="none"||e.borderRadius!=="0px",view:0<=t.bottom&&0<=t.right&&t.top<=a.innerHeight&&t.left<=a.innerWidth}}function Ho(t){var e=t.getBoundingClientRect(),a=getComputedStyle(t);return Up(e,a,t)}function Bp(t){return t.documentElement.clientHeight}function Hp(t){this.addEventListener("load",t),this.addEventListener("error",t)}function Lp(t,e,a,n,l,i,h,z,D){var Z=e.nodeType===9?e:e.ownerDocument;try{var at=Z.startViewTransition({update:function(){var Y=Z.defaultView,F=Y.navigation&&Y.navigation.transition,bt=Z.fonts.status;n();var zt=[];if(bt==="loaded"&&(Bp(Z),Z.fonts.status==="loading"&&zt.push(Z.fonts.ready)),bt=zt.length,t!==null)for(var Bt=t.suspenseyImages,V=0,H=0;H<Bt.length;H++){var J=Bt[H];if(!J.complete){var ot=J.getBoundingClientRect();if(0<ot.bottom&&0<ot.right&&ot.top<Y.innerHeight&&ot.left<Y.innerWidth){if(V+=C0(J),V>es){zt.length=bt;break}J=new Promise(Hp.bind(J)),zt.push(J)}}}if(0<zt.length)return Y=Promise.race([Promise.all(zt),new Promise(function(Et){return setTimeout(Et,500)})]).then(l,l),(F?Promise.allSettled([F.finished,Y]):Y).then(i,i);if(l(),F)return F.finished.then(i,i);i()},types:a});Z.__reactViewTransition=at;var ct=[];return at.ready.then(function(){for(var Y=Z.documentElement.getAnimations({subtree:!0}),F=0;F<Y.length;F++){var bt=Y[F],zt=bt.effect,Bt=zt.pseudoElement;if(Bt!=null&&Bt.startsWith("::view-transition")){ct.push(bt),bt=zt.getKeyframes();for(var V=Bt=void 0,H=!0,J=0;J<bt.length;J++){var ot=bt[J],Et=ot.width;if(Bt===void 0)Bt=Et;else if(Bt!==Et){H=!1;break}if(Et=ot.height,V===void 0)V=Et;else if(V!==Et){H=!1;break}delete ot.width,delete ot.height,ot.transform==="none"&&delete ot.transform}H&&Bt!==void 0&&V!==void 0&&(zt.setKeyframes(bt),H=getComputedStyle(zt.target,zt.pseudoElement),H.width!==Bt||H.height!==V)&&(H=bt[0],H.width=Bt,H.height=V,H=bt[bt.length-1],H.width=Bt,H.height=V,zt.setKeyframes(bt))}}h()},function(Y){Z.__reactViewTransition===at&&(Z.__reactViewTransition=null);try{if(typeof Y=="object"&&Y!==null)switch(Y.name){case"InvalidStateError":(Y.message==="View transition was skipped because document visibility state is hidden."||Y.message==="Skipping view transition because document visibility state has become hidden."||Y.message==="Skipping view transition because viewport size changed."||Y.message==="Transition was aborted because of invalid state")&&(Y=null)}Y!==null&&D(Y)}finally{n(),l(),h()}}),at.finished.finally(function(){for(var Y=0;Y<ct.length;Y++)ct[Y].cancel();Z.__reactViewTransition===at&&(Z.__reactViewTransition=null),z()}),at}catch{return n(),l(),h(),null}}function Xn(t,e){this._scope=document.documentElement,this._selector="::view-transition-"+t+"("+e+")"}Xn.prototype.animate=function(t,e){return e=typeof e=="number"?{duration:e}:X({},e),e.pseudoElement=this._selector,this._scope.animate(t,e)},Xn.prototype.getAnimations=function(){for(var t=this._scope,e=this._selector,a=t.getAnimations({subtree:!0}),n=[],l=0;l<a.length;l++){var i=a[l].effect;i!==null&&i.target===t&&i.pseudoElement===e&&n.push(a[l])}return n},Xn.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function c0(t){return{name:t,group:new Xn("group",t),imagePair:new Xn("image-pair",t),old:new Xn("old",t),new:new Xn("new",t)}}function $e(t){this._fragmentFiber=t,this._observers=this._eventListeners=null}$e.prototype.addEventListener=function(t,e,a){var n=null,l=null;if(!(a!=null&&typeof a!="boolean"&&(n=a.signal||null,n!==null&&n.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var i=this._eventListeners;if(d0(i,t,e,a)===-1){var h=this,z=e;a!=null&&typeof a!="boolean"&&a.once===!0&&(z=function(D){h.removeEventListener(t,e,a),typeof e=="function"?e.call(this,D):e.handleEvent(D)}),n!==null&&(l=h.removeEventListener.bind(h,t,e,a),n.addEventListener("abort",l,{once:!0}),l=n.removeEventListener.bind(n,"abort",l)),n=Al(a),i.push({type:t,listener:e,optionsOrUseCapture:a,attachedListener:z,cleanup:l}),x(this._fragmentFiber.child,!1,Gp,t,z,n)}this._eventListeners=i}};function Gp(t,e,a,n){return N(t).addEventListener(e,a,n),!1}$e.prototype.removeEventListener=function(t,e,a){var n=this._eventListeners;if(n!==null&&(e=d0(n,t,e,a),e!==-1)){var l=n[e];a=l.attachedListener;var i=l.cleanup;l=Al(l.optionsOrUseCapture),x(this._fragmentFiber.child,!1,qp,t,a,l),n.splice(e,1),i!==null&&i()}};function qp(t,e,a,n){return N(t).removeEventListener(e,a,n),!1}function Al(t){return t!=null&&typeof t!="boolean"&&(t.once===!0||t.signal instanceof AbortSignal)?{capture:t.capture,passive:t.passive}:t}function f0(t){return t==null?"c=0":typeof t=="boolean"?"c="+(t?"1":"0"):"c="+(t.capture?"1":"0")}function d0(t,e,a,n){if(t.length===0)return-1;n=f0(n);for(var l=0;l<t.length;l++){var i=t[l];if(i.type===e&&i.listener===a&&f0(i.optionsOrUseCapture)===n)return l}return-1}$e.prototype.dispatchEvent=function(t){var e=m(this._fragmentFiber);if(e===null)return!0;e=N(e);var a=this._eventListeners;if(a!==null&&0<a.length||!t.bubbles){var n=e.nodeType===9?e.createComment(""):document.createTextNode("");if(a)for(var l=0;l<a.length;l++){var i=a[l];n.addEventListener(i.type,i.attachedListener,Al(i.optionsOrUseCapture))}if(e.appendChild(n),t=n.dispatchEvent(t),a)for(l=0;l<a.length;l++)i=a[l],n.removeEventListener(i.type,i.attachedListener,Al(i.optionsOrUseCapture));return e.removeChild(n),t}return e.dispatchEvent(t)},$e.prototype.focus=function(t){x(this._fragmentFiber.child,!0,h0,t,void 0,void 0)};function h0(t,e){return t.tag===6?!1:(t=N(t),Pp(t,e))}$e.prototype.focusLast=function(t){var e=[];x(this._fragmentFiber.child,!0,Lo,e,void 0,void 0);for(var a=e.length-1;0<=a&&!h0(e[a],t);a--);};function Lo(t,e){return e.push(t),!1}$e.prototype.blur=function(){var t=m(this._fragmentFiber);t!==null&&(t=N(t),t=Ti(t).activeElement,t!==null&&x(this._fragmentFiber.child,!1,Yp,t,void 0,void 0))};function Yp(t,e){return t.tag===6?!1:(t=N(t),t===e||t.contains(e)?(e.blur(),!0):!1)}$e.prototype.observeUsing=function(t){this._observers===null&&(this._observers=new Set),this._observers.add(t),x(this._fragmentFiber.child,!1,Vp,t,void 0,void 0)};function Vp(t,e){return t.tag===6||(t=N(t),e.observe(t)),!1}$e.prototype.unobserveUsing=function(t){var e=this._observers;if(e!==null&&e.has(t)){e.delete(t),x(this._fragmentFiber.child,!1,Zp,t,void 0,void 0);for(var a=e=0;a<pa.length;a++){var n=pa[a];n.fragmentInstance===this&&n.observer===t?t.unobserve(n.instance):pa[e++]=n}pa.length=e}};function Zp(t,e){return t.tag===6||(t=N(t),e.unobserve(t)),!1}var pa=[],Go=!1;function Xp(t,e,a){pa.push({fragmentInstance:t,observer:e,instance:a}),Go||(Go=!0,tg(function(){Go=!1;var n=pa;pa=[];for(var l=0;l<n.length;l++){var i=n[l];i.observer.unobserve(i.instance)}}))}$e.prototype.getClientRects=function(){var t=[];return x(this._fragmentFiber.child,!1,Qp,t,void 0,void 0),t};function Qp(t,e){if(t.tag===6){t=t.stateNode;var a=t.ownerDocument.createRange();a.selectNodeContents(t),e.push.apply(e,a.getClientRects())}else t=N(t),e.push.apply(e,t.getClientRects());return!1}$e.prototype.getRootNode=function(t){var e=m(this._fragmentFiber);return e===null?this:N(e).getRootNode(t)},$e.prototype.compareDocumentPosition=function(t){var e=m(this._fragmentFiber);if(e===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var a=[];x(this._fragmentFiber.child,!1,Lo,a,void 0,void 0);var n=N(e);if(a.length===0){if(a=n,v(this._fragmentFiber)){t:{for(e=this._fragmentFiber.return;e!==null;){if(e.tag===4){e=e.stateNode.containerInfo;break t}if(e.tag===3||e.tag===5||e.tag===27)break;e=e.return}e=null}e!=null&&(a=e)}e=this._fragmentFiber;var l=n=a.compareDocumentPosition(t);return a===t?l=Node.DOCUMENT_POSITION_CONTAINS:n&Node.DOCUMENT_POSITION_CONTAINED_BY&&(a=A(e)[1],a===null?l=Node.DOCUMENT_POSITION_PRECEDING:(t=N(a).compareDocumentPosition(t),l=t===0||t&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),l|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}e=N(a[0]),l=N(a[a.length-1]);var i=v(this._fragmentFiber)?e.parentElement:n;if(i==null)return Node.DOCUMENT_POSITION_DISCONNECTED;n=i.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY,i=i.compareDocumentPosition(l)&Node.DOCUMENT_POSITION_CONTAINED_BY;var h=e.compareDocumentPosition(t),z=l.compareDocumentPosition(t),D=h&Node.DOCUMENT_POSITION_CONTAINED_BY||z&Node.DOCUMENT_POSITION_CONTAINED_BY;return z=n&&i&&h&Node.DOCUMENT_POSITION_FOLLOWING&&z&Node.DOCUMENT_POSITION_PRECEDING,e=n&&e===t||i&&l===t||D||z?Node.DOCUMENT_POSITION_CONTAINED_BY:!n&&e===t||!i&&l===t?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:h,e&Node.DOCUMENT_POSITION_DISCONNECTED||e&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||Kp(e,this._fragmentFiber,a[0],a[a.length-1],t)?e:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function Kp(t,e,a,n,l){var i=Tn(l);if(t&Node.DOCUMENT_POSITION_CONTAINED_BY){if(a=!!i)t:{for(;i!==null;){if(i.tag===7&&(i===e||i.alternate===e)){a=!0;break t}i=i.return}a=!1}return a}if(t&Node.DOCUMENT_POSITION_CONTAINS){if(i===null)return i=l.ownerDocument,l===i||l===i.documentElement||l===i.body;t:{for(i=e,e=m(e);i!==null;){if(!(i.tag!==5&&i.tag!==3&&i.tag!==27||i!==e&&i.alternate!==e)){i=!0;break t}i=i.return}i=!1}return i}return t&Node.DOCUMENT_POSITION_PRECEDING?((e=!!i)&&!(e=i===a)&&(e=W(a,i,B),e===null?e=!1:(x(e,!0,j,i,a),i=T,T=null,e=i!==null)),e):t&Node.DOCUMENT_POSITION_FOLLOWING?((e=!!i)&&!(e=i===n)&&(e=W(n,i,B),e===null?e=!1:(x(e,!0,U,i,n),i=T,k=T=null,e=i!==null)),e):!1}function m0(t,e){var a=t.ownerDocument.createRange();a.selectNodeContents(t),t=a.getBoundingClientRect(),window.scrollTo(window.scrollX+t.left,e?window.scrollY+t.top:window.scrollY+t.bottom-window.innerHeight)}$e.prototype.scrollIntoView=function(t){if(typeof t=="object")throw Error(s(566));var e=[];x(this._fragmentFiber.child,!1,Lo,e,void 0,void 0);var a=t!==!1;if(e.length===0){var n=A(this._fragmentFiber);if(n=a?n[1]||n[0]||m(this._fragmentFiber):n[0]||n[1],n===null)return;if(n.tag===6){t=N(n),m0(t,a);return}if(n=N(n),n.nodeType!==9){if(n.nodeType===11){a="host"in n?n.host:null,a!==null&&a.scrollIntoView(t);return}n.scrollIntoView(t)}}for(n=a?e.length-1:0;n!==(a?-1:e.length);){var l=e[n];l.tag===6?(l=N(l),m0(l,a)):N(l).scrollIntoView(t),n+=a?-1:1}};function Jp(t,e){return t=N(t),p0(t,e),!1}function p0(t,e){t.reactFragments==null&&(t.reactFragments=new Set),t.reactFragments.add(e)}function g0(t,e){var a=e._eventListeners;if(a!==null)for(var n=0;n<a.length;n++){var l=a[n];t.addEventListener(l.type,l.attachedListener,Al(l.optionsOrUseCapture))}t.nodeType!==3&&(a=e._observers,a!==null&&a.forEach(function(i){for(var h=0,z=0;z<pa.length;z++){var D=pa[z];(D.fragmentInstance!==e||D.observer!==i||D.instance!==t)&&(pa[h++]=D)}pa.length=h,i.observe(t)}),p0(t,e))}function Wp(t,e){var a=e._eventListeners;if(a!==null)for(var n=0;n<a.length;n++){var l=a[n];t.removeEventListener(l.type,l.attachedListener,Al(l.optionsOrUseCapture))}t.nodeType!==3&&(a=e._observers,a!==null&&a.forEach(function(i){typeof i.rootMargin=="string"?Xp(e,i,t):i.unobserve(t)}),t.reactFragments!=null&&t.reactFragments.delete(e))}function qo(t){var e=t.firstChild;for(e&&e.nodeType===10&&(e=e.nextSibling);e;){var a=e;switch(e=e.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":qo(a),Vi(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}t.removeChild(a)}}function Ip(t,e,a,n){for(;t.nodeType===1;){var l=a;if(t.nodeName.toLowerCase()!==e.toLowerCase()){if(!n&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(n){if(!t[Yl])switch(e){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(i=t.getAttribute("rel"),i==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(i!==l.rel||t.getAttribute("href")!==(l.href==null||l.href===""?null:l.href)||t.getAttribute("crossorigin")!==(l.crossOrigin==null?null:l.crossOrigin)||t.getAttribute("title")!==(l.title==null?null:l.title))break;return t;case"style":if(t.hasAttribute("data-precedence"))break;return t;case"script":if(i=t.getAttribute("src"),(i!==(l.src==null?null:l.src)||t.getAttribute("type")!==(l.type==null?null:l.type)||t.getAttribute("crossorigin")!==(l.crossOrigin==null?null:l.crossOrigin))&&i&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(e==="input"&&t.type==="hidden"){var i=l.name==null?null:""+l.name;if(l.type==="hidden"&&t.getAttribute("name")===i)return t}else return t;if(t=ua(t.nextSibling),t===null)break}return null}function Fp(t,e,a){if(e==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!a||(t=ua(t.nextSibling),t===null))return null;return t}function y0(t,e){for(;t.nodeType!==8;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!e||(t=ua(t.nextSibling),t===null))return null;return t}function Yo(t){return t.data==="$?"||t.data==="$~"}function Vo(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState!=="loading"}function $p(t,e){var a=t.ownerDocument;if(t.data==="$~")t._reactRetry=e;else if(t.data!=="$?"||a.readyState!=="loading")e();else{var n=function(){e(),a.removeEventListener("DOMContentLoaded",n)};a.addEventListener("DOMContentLoaded",n),t._reactRetry=n}}function ua(t){for(;t!=null;t=t.nextSibling){var e=t.nodeType;if(e===1||e===3)break;if(e===8){if(e=t.data,e==="$"||e==="$!"||e==="$?"||e==="$~"||e==="&"||e==="F!"||e==="F")break;if(e==="/$"||e==="/&")return null}}return t}var Zo=null;function v0(t){t=t.nextSibling;for(var e=0;t;){if(t.nodeType===8){var a=t.data;if(a==="/$"||a==="/&"){if(e===0)return ua(t.nextSibling);e--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||e++}t=t.nextSibling}return null}function b0(t){t=t.previousSibling;for(var e=0;t;){if(t.nodeType===8){var a=t.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(e===0)return t;e--}else a!=="/$"&&a!=="/&"||e++}t=t.previousSibling}return null}function Pp(t,e){function a(){n=!0}if(t.ownerDocument.activeElement===t)return!0;var n=!1;try{t.ownerDocument.addEventListener("focus",a,!0),(t.focus||HTMLElement.prototype.focus).call(t,e)}finally{t.ownerDocument.removeEventListener("focus",a,!0)}return n}function tg(t){i0(function(){i0(function(e){return t(e)})})}function x0(t,e,a){switch(e=Ti(a),t){case"html":if(t=e.documentElement,!t)throw Error(s(452));return t;case"head":if(t=e.head,!t)throw Error(s(453));return t;case"body":if(t=e.body,!t)throw Error(s(454));return t;default:throw Error(s(451))}}function _0(t,e,a){for(var n in a){var l=a[n];a.hasOwnProperty(n)&&l!=null&&Pt(t,e,n,null,Ap,l)}a.dangerouslySetInnerHTML!=null&&(t.textContent=""),t.onclick===ga&&(t.onclick=null),Vi(t)}function Xo(t){for(var e=t.attributes;e.length;)t.removeAttributeNode(e[0]);Vi(t)}var oa=new Map,S0=new Set;function Ni(t){if(typeof t.getRootNode=="function"){var e=t.getRootNode();if(e.nodeType===9||e.nodeType===11)return e}return t.nodeType===9?t:t.ownerDocument}var Va=_t.d;_t.d={f:eg,r:ag,D:ng,C:lg,L:ig,m:rg,X:ug,S:sg,M:og};function eg(){var t=Va.f(),e=Qr();return t||e}function ag(t){var e=Jn(t);e!==null&&e.tag===5&&e.type==="form"?Td(e):Va.r(t)}var Cl=typeof document>"u"?null:document;function w0(t,e,a){var n=Cl;if(n&&typeof e=="string"&&e){var l=ea(e);l='link[rel="'+t+'"][href="'+l+'"]',typeof a=="string"&&(l+='[crossorigin="'+a+'"]'),S0.has(l)||(S0.add(l),t={rel:t,crossOrigin:a,href:e},n.querySelector(l)===null&&(e=n.createElement("link"),Ee(e,"link",t),ge(e),n.head.appendChild(e)))}}function ng(t){Va.D(t),w0("dns-prefetch",t,null)}function lg(t,e){Va.C(t,e),w0("preconnect",t,e)}function ig(t,e,a){Va.L(t,e,a);var n=Cl;if(n&&t&&e){var l='link[rel="preload"][as="'+ea(e)+'"]';e==="image"&&a&&a.imageSrcSet?(l+='[imagesrcset="'+ea(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(l+='[imagesizes="'+ea(a.imageSizes)+'"]')):l+='[href="'+ea(t)+'"]';var i=l;switch(e){case"style":i=Ml(t);break;case"script":i=Ol(t)}if(!(oa.has(i)||(t=X({rel:"preload",href:e==="image"&&a&&a.imageSrcSet?void 0:t,as:e},a),oa.set(i,t),n.querySelector(l)!==null||e==="style"&&n.querySelector(Ei(i))||e==="script"&&n.querySelector(zi(i))))){var h=n.createElement("link");Ee(h,"link",t),e==="style"&&(h[Yi]=!0,h.onload=h.onerror=function(){Rc(h)}),ge(h),n.head.appendChild(h)}}}function rg(t,e){Va.m(t,e);var a=Cl;if(a&&t){var n=e&&typeof e.as=="string"?e.as:"script",l='link[rel="modulepreload"][as="'+ea(n)+'"][href="'+ea(t)+'"]',i=l;switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=Ol(t)}if(!oa.has(i)&&(t=X({rel:"modulepreload",href:t},e),oa.set(i,t),a.querySelector(l)===null)){switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(zi(i)))return}n=a.createElement("link"),Ee(n,"link",t),ge(n),a.head.appendChild(n)}}}function sg(t,e,a){Va.S(t,e,a);var n=Cl;if(n&&t){var l=Wn(n).hoistableStyles,i=Ml(t);e=e||"default";var h=l.get(i);if(!h){var z={loading:0,preload:null};if(h=n.querySelector(Ei(i)))z.loading=5;else{t=X({rel:"stylesheet",href:t,"data-precedence":e},a),(a=oa.get(i))&&Qo(t,a);var D=h=n.createElement("link");ge(D),Ee(D,"link",t),D._p=new Promise(function(Z,at){D.onload=Z,D.onerror=at}),D.addEventListener("load",function(){z.loading|=1}),D.addEventListener("error",function(){z.loading|=2}),z.loading|=4,Pr(h,e,n)}h={type:"stylesheet",instance:h,count:1,state:z},l.set(i,h)}}}function ug(t,e){Va.X(t,e);var a=Cl;if(a&&t){var n=Wn(a).hoistableScripts,l=Ol(t),i=n.get(l);i||(i=a.querySelector(zi(l)),i||(t=X({src:t,async:!0},e),(e=oa.get(l))&&Ko(t,e),i=a.createElement("script"),ge(i),Ee(i,"link",t),a.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},n.set(l,i))}}function og(t,e){Va.M(t,e);var a=Cl;if(a&&t){var n=Wn(a).hoistableScripts,l=Ol(t),i=n.get(l);i||(i=a.querySelector(zi(l)),i||(t=X({src:t,async:!0,type:"module"},e),(e=oa.get(l))&&Ko(t,e),i=a.createElement("script"),ge(i),Ee(i,"link",t),a.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},n.set(l,i))}}function T0(t,e,a,n){var l=(l=ht.current)?Ni(l):null;if(!l)throw Error(s(446));switch(t){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(a=Ml(a.href),e=Wn(l).hoistableStyles,n=e.get(a),n||(n={type:"style",instance:null,count:0,state:null},e.set(a,n)),n):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){t=Ml(a.href);var i=Wn(l).hoistableStyles,h=i.get(t);if(h||(l=l.ownerDocument||l,h={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},i.set(t,h),(i=l.querySelector(Ei(t)))?i._p||(h.instance=i,h.state.loading=5):(i=oa.get(t),i||(i={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},oa.set(t,i)),cg(l,t,i,h.state))),e&&n===null)throw Error(s(528,""));return h}if(e&&n!==null)throw Error(s(529,""));return null;case"script":return e=a.async,a=a.src,typeof a=="string"&&e&&typeof e!="function"&&typeof e!="symbol"?(a=Ol(a),e=Wn(l).hoistableScripts,n=e.get(a),n||(n={type:"script",instance:null,count:0,state:null},e.set(a,n)),n):{type:"void",instance:null,count:0,state:null};default:throw Error(s(444,t))}}function Ml(t){return'href="'+ea(t)+'"'}function Ei(t){return'link[rel="stylesheet"]['+t+"]"}function N0(t){return X({},t,{"data-precedence":t.precedence,precedence:null})}function cg(t,e,a,n){if(e=t.querySelector('link[rel="preload"][as="style"]['+e+"]")){if(e[Yi]!==!0){n.loading=1;return}}else e=t.createElement("link"),e[Yi]=!0,e.onload=e.onerror=Rc.bind(null,e),Ee(e,"link",a),ge(e),t.head.appendChild(e);n.preload=e,e.addEventListener("load",function(){return n.loading|=1}),e.addEventListener("error",function(){return n.loading|=2})}function Ol(t){return'[src="'+ea(t)+'"]'}function zi(t){return"script[async]"+t}function E0(t,e,a){if(e.count++,e.instance===null)switch(e.type){case"style":var n=t.querySelector('style[data-href~="'+ea(a.href)+'"]');if(n)return e.instance=n,ge(n),n;var l=X({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return n=(t.ownerDocument||t).createElement("style"),ge(n),Ee(n,"style",l),Pr(n,a.precedence,t),e.instance=n;case"stylesheet":l=Ml(a.href);var i=t.querySelector(Ei(l));if(i)return e.state.loading|=4,e.instance=i,ge(i),i;n=N0(a),(l=oa.get(l))&&Qo(n,l),i=(t.ownerDocument||t).createElement("link"),ge(i);var h=i;return h._p=new Promise(function(z,D){h.onload=z,h.onerror=D}),Ee(i,"link",n),e.state.loading|=4,Pr(i,a.precedence,t),e.instance=i;case"script":return i=Ol(a.src),(l=t.querySelector(zi(i)))?(e.instance=l,ge(l),l):(n=a,(l=oa.get(i))&&(n=X({},a),Ko(n,l)),t=t.ownerDocument||t,l=t.createElement("script"),ge(l),Ee(l,"link",n),t.head.appendChild(l),e.instance=l);case"void":return null;default:throw Error(s(443,e.type))}else e.type==="stylesheet"&&(e.state.loading&4)===0&&(n=e.instance,e.state.loading|=4,Pr(n,a.precedence,t));return e.instance}function Pr(t,e,a){for(var n=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),l=n.length?n[n.length-1]:null,i=l,h=0;h<n.length;h++){var z=n[h];if(z.dataset.precedence===e)i=z;else if(i!==l)break}i?i.parentNode.insertBefore(t,i.nextSibling):(e=a.nodeType===9?a.head:a,e.insertBefore(t,e.firstChild))}function Qo(t,e){t.crossOrigin==null&&(t.crossOrigin=e.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=e.referrerPolicy),t.title==null&&(t.title=e.title)}function Ko(t,e){t.crossOrigin==null&&(t.crossOrigin=e.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=e.referrerPolicy),t.integrity==null&&(t.integrity=e.integrity)}var ts=null;function z0(t,e,a){if(ts===null){var n=new Map,l=ts=new Map;l.set(a,n)}else l=ts,n=l.get(a),n||(n=new Map,l.set(a,n));if(n.has(t))return n;for(n.set(t,null),a=a.getElementsByTagName(t),l=0;l<a.length;l++){var i=a[l];if(!(i[Yl]||i[_e]||t==="link"&&i.getAttribute("rel")==="stylesheet")&&i.namespaceURI!=="http://www.w3.org/2000/svg"){var h=i.getAttribute(e)||"";h=t+h;var z=n.get(h);z?z.push(i):n.set(h,[i])}}return n}function Jo(t,e,a){t=t.ownerDocument||t,t.head.insertBefore(a,e==="title"?t.querySelector("head > title"):null)}function fg(t,e,a){if(a===1||e.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof e.precedence!="string"||typeof e.href!="string"||e.href==="")break;return!0;case"link":if(typeof e.rel!="string"||typeof e.href!="string"||e.href===""||e.onLoad||e.onError)break;switch(e.rel){case"stylesheet":return t=e.disabled,typeof e.precedence=="string"&&t==null;default:return!0}case"script":if(e.async&&typeof e.async!="function"&&typeof e.async!="symbol"&&!e.onLoad&&!e.onError&&e.src&&typeof e.src=="string")return!0}return!1}function k0(t,e){return t==="img"&&e.src!=null&&e.src!==""&&e.onLoad==null&&e.loading!=="lazy"}function A0(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function C0(t){return(t.width||100)*(t.height||100)*(typeof devicePixelRatio=="number"?devicePixelRatio:1)*.25}function M0(t,e){typeof e.decode=="function"&&(t.imgCount++,e.complete||(t.imgBytes+=C0(e),t.suspenseyImages.push(e)),t=mg.bind(t),e.decode().then(t,t))}function dg(t,e,a,n){if(a.type==="stylesheet"&&(typeof n.media!="string"||matchMedia(n.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var l=Ml(n.href),i=e.querySelector(Ei(l));if(i){e=i._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(t.count++,t=ki.bind(t),e.then(t,t)),a.state.loading|=4,a.instance=i,ge(i);return}i=e.ownerDocument||e,n=N0(n),(l=oa.get(l))&&Qo(n,l),i=i.createElement("link"),ge(i);var h=i;h._p=new Promise(function(z,D){h.onload=z,h.onerror=D}),Ee(i,"link",n),a.instance=i}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(a,e),(e=a.state.preload)&&(a.state.loading&3)===0&&(t.count++,a=ki.bind(t),e.addEventListener("load",a),e.addEventListener("error",a))}}var es=0;function hg(t,e){return t.stylesheets&&t.count===0&&ns(t,t.stylesheets),0<t.count||0<t.imgCount?function(a){var n=setTimeout(function(){if(t.stylesheets&&ns(t,t.stylesheets),t.unsuspend){var i=t.unsuspend;t.unsuspend=null,i()}},6e4+e);0<t.imgBytes&&es===0&&(es=62500*Mp());var l=setTimeout(function(){if(t.waitingForImages=!1,t.count===0&&(t.stylesheets&&ns(t,t.stylesheets),t.unsuspend)){var i=t.unsuspend;t.unsuspend=null,i()}},(t.imgBytes>es?50:800)+e);return t.unsuspend=a,function(){t.unsuspend=null,clearTimeout(n),clearTimeout(l)}}:null}function O0(t){if(t.count===0&&(t.imgCount===0||!t.waitingForImages)){if(t.stylesheets)ns(t,t.stylesheets);else if(t.unsuspend){var e=t.unsuspend;t.unsuspend=null,e()}}}function ki(){this.count--,O0(this)}function mg(){this.imgCount--,O0(this)}var as=null;function ns(t,e){t.stylesheets=null,t.unsuspend!==null&&(t.count++,as=new Map,e.forEach(pg,t),as=null,ki.call(t))}function pg(t,e){if(!(e.state.loading&4)){var a=as.get(t);if(a)var n=a.get(null);else{a=new Map,as.set(t,a);for(var l=t.querySelectorAll("link[data-precedence],style[data-precedence]"),i=0;i<l.length;i++){var h=l[i];(h.nodeName==="LINK"||h.getAttribute("media")!=="not all")&&(a.set(h.dataset.precedence,h),n=h)}n&&a.set(null,n)}l=e.instance,h=l.getAttribute("data-precedence"),i=a.get(h)||n,i===n&&a.set(null,l),a.set(h,l),this.count++,n=ki.bind(this),l.addEventListener("load",n),l.addEventListener("error",n),i?i.parentNode.insertBefore(l,i.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(l,t.firstChild)),e.state.loading|=4}}var jl={$$typeof:it,Provider:null,Consumer:null,_currentValue:Ht,_currentValue2:Ht,_threadCount:0};function gg(t,e,a,n,l,i,h,z,D){this.tag=1,this.containerInfo=t,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=zs(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=zs(0),this.hiddenUpdates=zs(null),this.identifierPrefix=n,this.onUncaughtError=l,this.onCaughtError=i,this.onRecoverableError=h,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=D,this.transitionTypes=null,this.incompleteTransitions=new Map}function j0(t,e,a,n,l,i,h,z,D,Z,at,ct){return t=new gg(t,e,a,h,D,Z,at,ct,z),e=1,i===!0&&(e|=24),i=Ue(3,null,null,e),t.current=i,i.stateNode=t,e=uu(),e.refCount++,t.pooledCache=e,e.refCount++,i.memoizedState={element:n,isDehydrated:a,cache:e},du(i),t}function D0(t){return t?(t=il,t):il}function R0(t,e,a,n,l,i){l=D0(l),n.context===null?n.context=l:n.pendingContext=l,n=en(e),n.payload={element:a},i=i===void 0?null:i,i!==null&&(n.callback=i),a=an(t,n,e),a!==null&&(Ge(a,t,e),ii(a,t,e))}function U0(t,e){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var a=t.retryLane;t.retryLane=a!==0&&a<e?a:e}}function Wo(t,e){U0(t,e),(t=t.alternate)&&U0(t,e)}function B0(t){if(t.tag===13||t.tag===31){var e=kn(t,67108864);e!==null&&Ge(e,t,67108864),Wo(t,67108864)}}function H0(t){if(t.tag===13||t.tag===31){var e=Fe();e=ks(e);var a=kn(t,e);a!==null&&Ge(a,t,e),Wo(t,e)}}var Dl=!0;function yg(t,e,a,n){var l=pt.T;pt.T=null;var i=_t.p;try{_t.p=2,Io(t,e,a,n)}finally{_t.p=i,pt.T=l}}function vg(t,e,a,n){var l=pt.T;pt.T=null;var i=_t.p;try{_t.p=8,Io(t,e,a,n)}finally{_t.p=i,pt.T=l}}function Io(t,e,a,n){if(Dl){var l=Fo(n);if(l===null)Mo(t,e,n,ls,a),G0(t,n);else if(xg(l,t,e,a,n))n.stopPropagation();else if(G0(t,n),e&4&&-1<bg.indexOf(t)){for(;l!==null;){var i=Jn(l);if(i!==null)switch(i.tag){case 3:if(i=i.stateNode,i.current.memoizedState.isDehydrated){var h=wn(i.pendingLanes);if(h!==0){var z=i;for(z.pendingLanes|=2,z.entangledLanes|=2;h;){var D=1<<31-Ze(h);z.entanglements[1]|=D,h&=~D}Ea(i),(Jt&6)===0&&(Vr=Ae()+500,_i(0))}}break;case 31:case 13:z=kn(i,2),z!==null&&Ge(z,i,2),Qr(),Wo(i,2)}if(i=Fo(n),i===null&&Mo(t,e,n,ls,a),i===l)break;l=i}l!==null&&n.stopPropagation()}else Mo(t,e,n,null,a)}}function Fo(t){return t=Rs(t),$o(t)}var ls=null;function $o(t){if(ls=null,t=Tn(t),t!==null){var e=f(t);if(e===null)t=null;else{var a=e.tag;if(a===13){if(t=c(e),t!==null)return t;t=null}else if(a===31){if(t=o(e),t!==null)return t;t=null}else if(a===3){if(e.stateNode.current.memoizedState.isDehydrated)return e.tag===3?e.stateNode.containerInfo:null;t=null}else e!==t&&(t=null)}}return ls=t,null}function L0(t){switch(t){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"fullscreenerror":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"resize":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Es()){case Hl:return 2;case Xa:return 8;case ka:case Om:return 32;case Nc:return 268435456;default:return 32}default:return 32}}var Po=!1,pn=null,gn=null,yn=null,Ai=new Map,Ci=new Map,vn=[],bg="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function G0(t,e){switch(t){case"focusin":case"focusout":pn=null;break;case"dragenter":case"dragleave":gn=null;break;case"mouseover":case"mouseout":yn=null;break;case"pointerover":case"pointerout":Ai.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ci.delete(e.pointerId)}}function Mi(t,e,a,n,l,i){return t===null||t.nativeEvent!==i?(t={blockedOn:e,domEventName:a,eventSystemFlags:n,nativeEvent:i,targetContainers:[l]},e!==null&&(e=Jn(e),e!==null&&B0(e)),t):(t.eventSystemFlags|=n,e=t.targetContainers,l!==null&&e.indexOf(l)===-1&&e.push(l),t)}function xg(t,e,a,n,l){switch(e){case"focusin":return pn=Mi(pn,t,e,a,n,l),!0;case"dragenter":return gn=Mi(gn,t,e,a,n,l),!0;case"mouseover":return yn=Mi(yn,t,e,a,n,l),!0;case"pointerover":var i=l.pointerId;return Ai.set(i,Mi(Ai.get(i)||null,t,e,a,n,l)),!0;case"gotpointercapture":return i=l.pointerId,Ci.set(i,Mi(Ci.get(i)||null,t,e,a,n,l)),!0}return!1}function q0(t){var e=Tn(t.target);if(e!==null){var a=f(e);if(a!==null){if(e=a.tag,e===13){if(e=c(a),e!==null){t.blockedOn=e,Oc(t.priority,function(){H0(a)});return}}else if(e===31){if(e=o(a),e!==null){t.blockedOn=e,Oc(t.priority,function(){H0(a)});return}}else if(e===3&&a.stateNode.current.memoizedState.isDehydrated){t.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}t.blockedOn=null}function is(t){if(t.blockedOn!==null)return!1;for(var e=t.targetContainers;0<e.length;){var a=Fo(t.nativeEvent);if(a===null){a=t.nativeEvent;var n=new a.constructor(a.type,a);Ds=n,a.target.dispatchEvent(n),Ds=null}else return e=Jn(a),e!==null&&B0(e),t.blockedOn=a,!1;e.shift()}return!0}function Y0(t,e,a){is(t)&&a.delete(e)}function _g(){Po=!1,pn!==null&&is(pn)&&(pn=null),gn!==null&&is(gn)&&(gn=null),yn!==null&&is(yn)&&(yn=null),Ai.forEach(Y0),Ci.forEach(Y0)}function rs(t,e){t.blockedOn===e&&(t.blockedOn=null,Po||(Po=!0,p.unstable_scheduleCallback(p.unstable_NormalPriority,_g)))}var ss=null;function V0(t){ss!==t&&(ss=t,p.unstable_scheduleCallback(p.unstable_NormalPriority,function(){ss===t&&(ss=null);for(var e=0;e<t.length;e+=3){var a=t[e],n=t[e+1],l=t[e+2];if(typeof n!="function"){if($o(n||a)===null)continue;break}var i=Jn(a);i!==null&&(t.splice(e,3),e-=3,ju(i,{pending:!0,data:l,method:a.method,action:n},n,l))}}))}function Rl(t){function e(D){return rs(D,t)}pn!==null&&rs(pn,t),gn!==null&&rs(gn,t),yn!==null&&rs(yn,t),Ai.forEach(e),Ci.forEach(e);for(var a=0;a<vn.length;a++){var n=vn[a];n.blockedOn===t&&(n.blockedOn=null)}for(;0<vn.length&&(a=vn[0],a.blockedOn===null);)q0(a),a.blockedOn===null&&vn.shift();if(a=(t.ownerDocument||t).$$reactFormReplay,a!=null)for(n=0;n<a.length;n+=3){var l=a[n],i=a[n+1],h=l[Re]||null;if(typeof i=="function")h||V0(a);else if(h){var z=null;if(i&&i.hasAttribute("formAction")){if(l=i,h=i[Re]||null)z=h.formAction;else if($o(l)!==null)continue}else z=h.action;typeof z=="function"?a[n+1]=z:(a.splice(n,3),n-=3),V0(a)}}}function Z0(){function t(i){i.canIntercept&&i.info==="react-transition"&&i.intercept({handler:function(){return new Promise(function(h){return l=h})},focusReset:"manual",scroll:"manual"})}function e(){l!==null&&(l(),l=null),n||setTimeout(a,20)}function a(){if(!n&&!navigation.transition){var i=navigation.currentEntry;i&&i.url!=null&&navigation.navigate(i.url,{state:i.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var n=!1,l=null;return navigation.addEventListener("navigate",t),navigation.addEventListener("navigatesuccess",e),navigation.addEventListener("navigateerror",e),setTimeout(a,100),function(){n=!0,navigation.removeEventListener("navigate",t),navigation.removeEventListener("navigatesuccess",e),navigation.removeEventListener("navigateerror",e),l!==null&&(l(),l=null)}}}function tc(t){this._internalRoot=t}us.prototype.render=tc.prototype.render=function(t){var e=this._internalRoot;if(e===null)throw Error(s(409));var a=e.current,n=Fe();R0(a,n,t,e,null,null)},us.prototype.unmount=tc.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var e=t.containerInfo;R0(t.current,2,null,t,null,null),Qr(),e[Kn]=null}};function us(t){this._internalRoot=t}us.prototype.unstable_scheduleHydration=function(t){if(t){var e=Mc();t={blockedOn:null,target:t,priority:e};for(var a=0;a<vn.length&&e!==0&&e<vn[a].priority;a++);vn.splice(a,0,t),a===0&&q0(t)}};var X0=d.version;if(X0!=="19.3.1")throw Error(s(527,X0,"19.3.1"));_t.findDOMNode=function(t){var e=t._reactInternals;if(e===void 0)throw typeof t.render=="function"?Error(s(188)):(t=Object.keys(t).join(","),Error(s(268,t)));return t=_(e),t=t!==null?b(t):null,t=t===null?null:t.stateNode,t};var Sg={bundleType:0,version:"19.3.1",rendererPackageName:"react-dom",currentDispatcherRef:pt,reconcilerVersion:"19.3.1"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var os=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!os.isDisabled&&os.supportsFiber)try{Ll=os.inject(Sg),Ve=os}catch{}}return ji.createRoot=function(t,e){if(!u(t))throw Error(s(299));var a=!1,n="",l=Dd,i=Rd,h=Ud;return e!=null&&(e.unstable_strictMode===!0&&(a=!0),e.identifierPrefix!==void 0&&(n=e.identifierPrefix),e.onUncaughtError!==void 0&&(l=e.onUncaughtError),e.onCaughtError!==void 0&&(i=e.onCaughtError),e.onRecoverableError!==void 0&&(h=e.onRecoverableError)),e=j0(t,1,!1,null,null,a,n,null,l,i,h,Z0),t[Kn]=e.current,Co(t),new tc(e)},ji.hydrateRoot=function(t,e,a){if(!u(t))throw Error(s(299));var n=!1,l="",i=Dd,h=Rd,z=Ud,D=null;return a!=null&&(a.unstable_strictMode===!0&&(n=!0),a.identifierPrefix!==void 0&&(l=a.identifierPrefix),a.onUncaughtError!==void 0&&(i=a.onUncaughtError),a.onCaughtError!==void 0&&(h=a.onCaughtError),a.onRecoverableError!==void 0&&(z=a.onRecoverableError),a.formState!==void 0&&(D=a.formState)),e=j0(t,1,!0,e,a??null,n,l,D,i,h,z,Z0),e.context=D0(null),a=e.current,n=Fe(),n=ks(n),l=en(n),l.callback=null,an(a,l,n),a=n,e.current.lanes=a,ql(e,a),Ea(e),t[Kn]=e.current,Co(t),new us(e)},ji.version="19.3.1",ji}var em;function Rg(){if(em)return nc.exports;em=1;function p(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(p)}catch(d){console.error(d)}}return p(),nc.exports=Dg(),nc.exports}var Ug=Rg();const Bg=bc(Ug),Bl={whiteboard:{id:"whiteboard",name:"Hand-drawn Whiteboard",description:"Signature Explainroo sketchy pencil and marker strokes on warm textured board",background:"#faf9f5",primaryColor:"#0f172a",secondaryColor:"#3b82f6",accentColor:"#f97316",textColor:"#1e293b",fontFamily:'"Plus Jakarta Sans", sans-serif',paperGrid:!0},darktech:{id:"darktech",name:"Modern Dark Tech",description:"Sleek neon cyan and amber glowing diagrams on deep midnight slate",background:"#090d16",primaryColor:"#38bdf8",secondaryColor:"#a855f7",accentColor:"#fbbf24",textColor:"#f8fafc",fontFamily:'"JetBrains Mono", monospace',paperGrid:!1},blueprint:{id:"blueprint",name:"Architectural Blueprint",description:"Crisp white and cyan engineering schematics on deep blueprint navy",background:"#0c2340",primaryColor:"#ffffff",secondaryColor:"#38bdf8",accentColor:"#facc15",textColor:"#f1f5f9",fontFamily:'"JetBrains Mono", monospace',paperGrid:!0},chalkboard:{id:"chalkboard",name:"Classroom Chalkboard",description:"Soft white, yellow, and pastel chalk marks on deep forest blackboard",background:"#15251d",primaryColor:"#f8fafc",secondaryColor:"#fde047",accentColor:"#6ee7b7",textColor:"#f1f5f9",fontFamily:'"Caveat", cursive, sans-serif',paperGrid:!1}},hc=[{id:"dns-explainer",title:"How DNS Works: From URL to Website",description:"A visual journey showing how your browser turns human names into IP addresses in under 50 milliseconds.",look:"whiteboard",musicTrack:"lofi",musicVolume:.3,voicePitch:1,voiceRate:1,autoDuck:!0,scenes:[{id:"dns-s1",title:"Entering the Web Address",narration:"Whenever you open your browser and type google.com, your computer has no idea where that server is. It needs an IP address.",durationSeconds:7,transition:"fade",elements:[{id:"e-client-1",type:"client",x:180,y:280,width:220,height:150,label:"Your Computer",color:"#0f172a",strokeWidth:3,animation:"pop",triggerWord:"computer",triggerTimeSec:.5},{id:"e-browser-1",type:"browser_window",x:520,y:200,width:540,height:280,label:"Searching for google.com...",url:"https://google.com",color:"#3b82f6",strokeWidth:2.5,animation:"slide",triggerWord:"browser",triggerTimeSec:1.8},{id:"e-arrow-1",type:"arrow",x:410,y:340,width:100,height:0,label:"Requests URL",color:"#f97316",strokeWidth:2.5,animation:"draw",triggerWord:"type",triggerTimeSec:3.2}]},{id:"dns-s2",title:"The Recursive Resolver",narration:"Your computer sends a query to a recursive resolver, usually managed by your internet service provider or Cloudflare.",durationSeconds:7,transition:"fade",elements:[{id:"e-client-2",type:"client",x:150,y:290,width:200,height:130,label:"Client",color:"#0f172a",strokeWidth:2.5,animation:"pop",triggerTimeSec:.2},{id:"e-cloud-resolver",type:"cloud",x:540,y:240,width:320,height:200,label:`DNS Resolver+1.1.1.1`,color:"#3b82f6",strokeWidth:3,animation:"pop",triggerWord:"resolver",triggerTimeSec:1.5},{id:"e-arrow-query",type:"arrow",x:360,y:340,width:170,height:0,label:"Who is google.com?",color:"#f97316",strokeWidth:2.5,animation:"draw",triggerWord:"query",triggerTimeSec:2.8}]},{id:"dns-s3",title:"Root & TLD Servers",narration:"The resolver asks the root server, which points to the .com TLD server, finally finding the authoritative nameserver.",durationSeconds:8,transition:"fade",elements:[{id:"e-resolver-s3",type:"cloud",x:160,y:260,width:240,height:160,label:"Resolver",color:"#3b82f6",strokeWidth:2.5,animation:"pop",triggerTimeSec:.2},{id:"e-root-server",type:"server",x:560,y:160,width:200,height:120,label:"Root Server (.)",color:"#0f172a",strokeWidth:2.5,animation:"pop",triggerWord:"root",triggerTimeSec:1.4},{id:"e-tld-server",type:"server",x:880,y:360,width:240,height:130,label:"TLD Server (.com)",color:"#10b981",strokeWidth:2.5,animation:"pop",triggerWord:"TLD",triggerTimeSec:3.8},{id:"e-arrow-chain-1",type:"curved_arrow",x:410,y:280,width:140,height:-60,label:"1. Ask Root",color:"#f97316",strokeWidth:2,animation:"draw",triggerTimeSec:2},{id:"e-arrow-chain-2",type:"curved_arrow",x:770,y:240,width:100,height:120,label:"2. Go to .com",color:"#10b981",strokeWidth:2,animation:"draw",triggerTimeSec:4.5}]},{id:"dns-s4",title:"Connection Established",narration:"Armed with the exact IP address, your browser connects directly to the server, and the webpage renders seamlessly.",durationSeconds:7,transition:"fade",elements:[{id:"e-client-final",type:"client",x:180,y:280,width:220,height:150,label:"Client Connected",color:"#0f172a",strokeWidth:3,animation:"pop",triggerTimeSec:.2},{id:"e-target-server",type:"server",x:780,y:260,width:240,height:160,label:`Web Server+142.250.190.46`,color:"#10b981",strokeWidth:3,animation:"pop",triggerWord:"server",triggerTimeSec:1.5},{id:"e-arrow-success",type:"arrow",x:410,y:350,width:360,height:0,label:"HTTP GET / · 200 OK",color:"#10b981",strokeWidth:3.5,animation:"draw",triggerWord:"renders",triggerTimeSec:3},{id:"e-check-dns",type:"checkmark",x:580,y:160,width:80,height:80,color:"#10b981",strokeWidth:3,animation:"pop",triggerTimeSec:4.5}]}]},{id:"api-analogy",title:"What is an API? The Restaurant Analogy",description:"Understand APIs intuitively through a restaurant: you are the customer, the waiter is the API, and the kitchen is the backend.",look:"darktech",musicTrack:"tech",musicVolume:.25,voicePitch:1,voiceRate:1,autoDuck:!0,scenes:[{id:"api-s1",title:"The Customer at the Table",narration:"Imagine you are sitting in a restaurant looking at the menu. You know what you want to order, but you cannot walk directly into the kitchen.",durationSeconds:7,transition:"fade",elements:[{id:"e-customer",type:"client",x:200,y:280,width:220,height:160,label:"Client (You)",color:"#38bdf8",strokeWidth:3,animation:"pop",triggerWord:"customer",triggerTimeSec:.5},{id:"e-badge-order",type:"badge",x:480,y:240,width:180,height:48,label:"Order: Pizza #42",color:"#fbbf24",strokeWidth:2,animation:"pop",triggerWord:"order",triggerTimeSec:2.5}]},{id:"api-s2",title:"The Waiter is the API",narration:"Enter the waiter, your Application Programming Interface. The waiter takes your request, translates it, and brings it safely to the kitchen.",durationSeconds:8,transition:"fade",elements:[{id:"e-customer-s2",type:"client",x:150,y:280,width:200,height:140,label:"Client App",color:"#38bdf8",strokeWidth:2.5,animation:"pop",triggerTimeSec:.2},{id:"e-waiter-api",type:"api_gateway",x:520,y:240,width:240,height:200,label:`API Gateway+(The Waiter)`,color:"#fbbf24",strokeWidth:3,animation:"pop",triggerWord:"waiter",triggerTimeSec:1.2},{id:"e-kitchen-db",type:"database",x:900,y:250,width:200,height:180,label:"Kitchen Database",color:"#a855f7",strokeWidth:3,animation:"pop",triggerWord:"kitchen",triggerTimeSec:4},{id:"e-arrow-order",type:"arrow",x:360,y:340,width:150,height:0,label:"POST /order",color:"#38bdf8",strokeWidth:2.5,animation:"draw",triggerWord:"request",triggerTimeSec:2.5}]},{id:"api-s3",title:"Serving the Response",narration:"The kitchen cooks the meal, packages it cleanly as structured JSON data, and the API serves it right back to your screen.",durationSeconds:7,transition:"fade",elements:[{id:"e-customer-s3",type:"client",x:180,y:280,width:220,height:150,label:"Client (Received Data)",color:"#38bdf8",strokeWidth:3,animation:"pop",triggerTimeSec:.2},{id:"e-code-response",type:"code_block",x:500,y:220,width:440,height:220,label:`{+ "status": "success",+ "dish": "Margherita",+ "deliveredIn": "14ms"+}`,color:"#10b981",strokeWidth:2,animation:"draw",triggerWord:"JSON",triggerTimeSec:2},{id:"e-check-api",type:"checkmark",x:1e3,y:290,width:90,height:90,color:"#10b981",strokeWidth:3,animation:"pop",triggerTimeSec:3.5}]}]},{id:"git-branching",title:"Git Branching & Merge Explained Visually",description:"Learn why branching is lightweight and how commits form an immutable directed graph.",look:"blueprint",musicTrack:"tech",musicVolume:.25,voicePitch:1,voiceRate:1,autoDuck:!0,scenes:[{id:"git-s1",title:"The Main Branch Line",narration:"Every Git repository begins with a commit history along the main branch. Each commit points to its parent snapshot.",durationSeconds:7,transition:"fade",elements:[{id:"e-c1",type:"circle",x:240,y:330,width:80,height:80,label:"C1",color:"#ffffff",strokeWidth:3,animation:"pop",triggerTimeSec:.4},{id:"e-arr-c1-c2",type:"arrow",x:325,y:370,width:110,height:0,color:"#38bdf8",strokeWidth:2.5,animation:"draw",triggerTimeSec:1.5},{id:"e-c2",type:"circle",x:440,y:330,width:80,height:80,label:"C2",color:"#ffffff",strokeWidth:3,animation:"pop",triggerTimeSec:1.8},{id:"e-arr-c2-c3",type:"arrow",x:525,y:370,width:110,height:0,color:"#38bdf8",strokeWidth:2.5,animation:"draw",triggerTimeSec:2.8},{id:"e-c3",type:"circle",x:640,y:330,width:80,height:80,label:"C3 (main)",color:"#facc15",strokeWidth:3,animation:"pop",triggerTimeSec:3.2}]},{id:"git-s2",title:"Spawning a Feature Branch",narration:"When you type git branch feature, Git simply creates a movable pointer pointing to the current commit without duplicating files.",durationSeconds:7,transition:"fade",elements:[{id:"e-c2-s2",type:"circle",x:340,y:400,width:70,height:70,label:"C2",color:"#ffffff",strokeWidth:2.5,animation:"pop",triggerTimeSec:.2},{id:"e-c3-s2",type:"circle",x:520,y:400,width:70,height:70,label:"C3",color:"#ffffff",strokeWidth:2.5,animation:"pop",triggerTimeSec:.4},{id:"e-c4-feat",type:"circle",x:680,y:220,width:80,height:80,label:"C4 (feat)",color:"#38bdf8",strokeWidth:3,animation:"pop",triggerWord:"feature",triggerTimeSec:2},{id:"e-arr-branch",type:"curved_arrow",x:570,y:390,width:100,height:-140,label:"Branch off",color:"#38bdf8",strokeWidth:2.5,animation:"draw",triggerTimeSec:1.5}]}]}];/**+ * @license lucide-react v0.546.0 - ISC+ *+ * This source code is licensed under the ISC license.+ * See the LICENSE file in the root directory of this source tree.+ */const Hg=p=>p.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Lg=p=>p.replace(/^([A-Z])|[\s-_]+(\w)/g,(d,r,s)=>s?s.toUpperCase():r.toLowerCase()),am=p=>{const d=Lg(p);return d.charAt(0).toUpperCase()+d.slice(1)},ym=(...p)=>p.filter((d,r,s)=>!!d&&d.trim()!==""&&s.indexOf(d)===r).join(" ").trim(),Gg=p=>{for(const d in p)if(d.startsWith("aria-")||d==="role"||d==="title")return!0};/**+ * @license lucide-react v0.546.0 - ISC+ *+ * This source code is licensed under the ISC license.+ * See the LICENSE file in the root directory of this source tree.+ */var qg={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**+ * @license lucide-react v0.546.0 - ISC+ *+ * This source code is licensed under the ISC license.+ * See the LICENSE file in the root directory of this source tree.+ */const Yg=Dt.forwardRef(({color:p="currentColor",size:d=24,strokeWidth:r=2,absoluteStrokeWidth:s,className:u="",children:f,iconNode:c,...o},g)=>Dt.createElement("svg",{ref:g,...qg,width:d,height:d,stroke:p,strokeWidth:s?Number(r)*24/Number(d):r,className:ym("lucide",u),...!f&&!Gg(o)&&{"aria-hidden":"true"},...o},[...c.map(([_,b])=>Dt.createElement(_,b)),...Array.isArray(f)?f:[f]]));/**+ * @license lucide-react v0.546.0 - ISC+ *+ * This source code is licensed under the ISC license.+ * See the LICENSE file in the root directory of this source tree.+ */const Mt=(p,d)=>{const r=Dt.forwardRef(({className:s,...u},f)=>Dt.createElement(Yg,{ref:f,iconNode:d,className:ym(`lucide-${Hg(am(p))}`,`lucide-${p}`,s),...u}));return r.displayName=am(p),r};/**+ * @license lucide-react v0.546.0 - ISC+ *+ * This source code is licensed under the ISC license.+ * See the LICENSE file in the root directory of this source tree.+ */const Vg=[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]],Zg=Mt("archive",Vg);/**+ * @license lucide-react v0.546.0 - ISC+ *+ * This source code is licensed under the ISC license.+ * See the LICENSE file in the root directory of this source tree.+ */const Xg=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],Qg=Mt("arrow-right",Xg);/**+ * @license lucide-react v0.546.0 - ISC+ *+ * This source code is licensed under the ISC license.+ * See the LICENSE file in the root directory of this source tree.+ */const Kg=[["path",{d:"M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z",key:"18u6gg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]],nm=Mt("camera",Kg);/**+ * @license lucide-react v0.546.0 - ISC+ *+ * This source code is licensed under the ISC license.+ * See the LICENSE file in the root directory of this source tree.+ */const Jg=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],mc=Mt("check",Jg);/**+ * @license lucide-react v0.546.0 - ISC+ *+ * This source code is licensed under the ISC license.+ * See the LICENSE file in the root directory of this source tree.+ */const Wg=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],vm=Mt("chevron-left",Wg);/**+ * @license lucide-react v0.546.0 - ISC+ *+ * This source code is licensed under the ISC license.+ * See the LICENSE file in the root directory of this source tree.+ */const Ig=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],bm=Mt("chevron-right",Ig);/**+ * @license lucide-react v0.546.0 - ISC+ *+ * This source code is licensed under the ISC license.+ * See the LICENSE file in the root directory of this source tree.+ */const Fg=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],$g=Mt("circle-check",Fg);/**+ * @license lucide-react v0.546.0 - ISC+ *+ * This source code is licensed under the ISC license.+ * See the LICENSE file in the root directory of this source tree.+ */const Pg=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],ty=Mt("circle",Pg);/**+ * @license lucide-react v0.546.0 - ISC+ *+ * This source code is licensed under the ISC license.+ * See the LICENSE file in the root directory of this source tree.+ */const ey=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],ay=Mt("clock",ey);/**+ * @license lucide-react v0.546.0 - ISC+ *+ * This source code is licensed under the ISC license.+ * See the LICENSE file in the root directory of this source tree.+ */const ny=[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]],ly=Mt("cloud",ny);/**+ * @license lucide-react v0.546.0 - ISC+ *+ * This source code is licensed under the ISC license.+ * See the LICENSE file in the root directory of this source tree.+ */const iy=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],ry=Mt("code",iy);/**+ * @license lucide-react v0.546.0 - ISC+ *+ * This source code is licensed under the ISC license.+ * See the LICENSE file in the root directory of this source tree.+ */const sy=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],vs=Mt("copy",sy);/**+ * @license lucide-react v0.546.0 - ISC+ *+ * This source code is licensed under the ISC license.+ * See the LICENSE file in the root directory of this source tree.+ */const uy=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]],oy=Mt("database",uy);/**+ * @license lucide-react v0.546.0 - ISC+ *+ * This source code is licensed under the ISC license.+ * See the LICENSE file in the root directory of this source tree.+ */const cy=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],ps=Mt("download",cy);/**+ * @license lucide-react v0.546.0 - ISC+ *+ * This source code is licensed under the ISC license.+ * See the LICENSE file in the root directory of this source tree.+ */const fy=[["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7z",key:"1mlx9k"}]],dy=Mt("file-code",fy);/**+ * @license lucide-react v0.546.0 - ISC+ *+ * This source code is licensed under the ISC license.+ * See the LICENSE file in the root directory of this source tree.+ */const hy=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],my=Mt("file-text",hy);/**+ * @license lucide-react v0.546.0 - ISC+ *+ * This source code is licensed under the ISC license.+ * See the LICENSE file in the root directory of this source tree.+ */const py=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M7 3v18",key:"bbkbws"}],["path",{d:"M3 7.5h4",key:"zfgn84"}],["path",{d:"M3 12h18",key:"1i2n21"}],["path",{d:"M3 16.5h4",key:"1230mu"}],["path",{d:"M17 3v18",key:"in4fa5"}],["path",{d:"M17 7.5h4",key:"myr1c1"}],["path",{d:"M17 16.5h4",key:"go4c1d"}]],pc=Mt("film",py);/**+ * @license lucide-react v0.546.0 - ISC+ *+ * This source code is licensed under the ISC license.+ * See the LICENSE file in the root directory of this source tree.+ */const gy=[["path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",key:"tonef"}],["path",{d:"M9 18c-4.51 2-5-2-7-2",key:"9comsn"}]],yy=Mt("github",gy);/**+ * @license lucide-react v0.546.0 - ISC+ *+ * This source code is licensed under the ISC license.+ * See the LICENSE file in the root directory of this source tree.+ */const vy=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],by=Mt("globe",vy);/**+ * @license lucide-react v0.546.0 - ISC+ *+ * This source code is licensed under the ISC license.+ * See the LICENSE file in the root directory of this source tree.+ */const xy=[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]],_y=Mt("key",xy);/**+ * @license lucide-react v0.546.0 - ISC+ *+ * This source code is licensed under the ISC license.+ * See the LICENSE file in the root directory of this source tree.+ */const Sy=[["path",{d:"M18 5a2 2 0 0 1 2 2v8.526a2 2 0 0 0 .212.897l1.068 2.127a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45l1.068-2.127A2 2 0 0 0 4 15.526V7a2 2 0 0 1 2-2z",key:"1pdavp"}],["path",{d:"M20.054 15.987H3.946",key:"14rxg9"}]],wy=Mt("laptop",Sy);/**+ * @license lucide-react v0.546.0 - ISC+ *+ * This source code is licensed under the ISC license.+ * See the LICENSE file in the root directory of this source tree.+ */const Ty=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],xm=Mt("layers",Ty);/**+ * @license lucide-react v0.546.0 - ISC+ *+ * This source code is licensed under the ISC license.+ * See the LICENSE file in the root directory of this source tree.+ */const Ny=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Ey=Mt("loader-circle",Ny);/**+ * @license lucide-react v0.546.0 - ISC+ *+ * This source code is licensed under the ISC license.+ * See the LICENSE file in the root directory of this source tree.+ */const zy=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]],ky=Mt("maximize-2",zy);/**+ * @license lucide-react v0.546.0 - ISC+ *+ * This source code is licensed under the ISC license.+ * See the LICENSE file in the root directory of this source tree.+ */const Ay=[["path",{d:"M12 19v3",key:"npa21l"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["rect",{x:"9",y:"2",width:"6",height:"13",rx:"3",key:"s6n7sd"}]],Cy=Mt("mic",Ay);/**+ * @license lucide-react v0.546.0 - ISC+ *+ * This source code is licensed under the ISC license.+ * See the LICENSE file in the root directory of this source tree.+ */const My=[["path",{d:"m14 10 7-7",key:"oa77jy"}],["path",{d:"M20 10h-6V4",key:"mjg0md"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M4 14h6v6",key:"rmj7iw"}]],Oy=Mt("minimize-2",My);/**+ * @license lucide-react v0.546.0 - ISC+ *+ * This source code is licensed under the ISC license.+ * See the LICENSE file in the root directory of this source tree.+ */const jy=[["path",{d:"M18 8L22 12L18 16",key:"1r0oui"}],["path",{d:"M2 12H22",key:"1m8cig"}]],Dy=Mt("move-right",jy);/**+ * @license lucide-react v0.546.0 - ISC+ *+ * This source code is licensed under the ISC license.+ * See the LICENSE file in the root directory of this source tree.+ */const Ry=[["path",{d:"M9 18V5l12-2v13",key:"1jmyc2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["circle",{cx:"18",cy:"16",r:"3",key:"1hluhg"}]],Uy=Mt("music",Ry);/**+ * @license lucide-react v0.546.0 - ISC+ *+ * This source code is licensed under the ISC license.+ * See the LICENSE file in the root directory of this source tree.+ */const By=[["path",{d:"M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z",key:"e79jfc"}],["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}]],Hy=Mt("palette",By);/**+ * @license lucide-react v0.546.0 - ISC+ *+ * This source code is licensed under the ISC license.+ * See the LICENSE file in the root directory of this source tree.+ */const Ly=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M9 21V9",key:"1oto5p"}]],Gy=Mt("panels-top-left",Ly);/**+ * @license lucide-react v0.546.0 - ISC+ *+ * This source code is licensed under the ISC license.+ * See the LICENSE file in the root directory of this source tree.+ */const qy=[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1",key:"kaeet6"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1",key:"1wsw3u"}]],Yy=Mt("pause",qy);/**+ * @license lucide-react v0.546.0 - ISC+ *+ * This source code is licensed under the ISC license.+ * See the LICENSE file in the root directory of this source tree.+ */const Vy=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],lm=Mt("play",Vy);/**+ * @license lucide-react v0.546.0 - ISC+ *+ * This source code is licensed under the ISC license.+ * See the LICENSE file in the root directory of this source tree.+ */const Zy=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Xy=Mt("plus",Zy);/**+ * @license lucide-react v0.546.0 - ISC+ *+ * This source code is licensed under the ISC license.+ * See the LICENSE file in the root directory of this source tree.+ */const Qy=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],Ky=Mt("refresh-cw",Qy);/**+ * @license lucide-react v0.546.0 - ISC+ *+ * This source code is licensed under the ISC license.+ * See the LICENSE file in the root directory of this source tree.+ */const Jy=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],_m=Mt("rotate-ccw",Jy);/**+ * @license lucide-react v0.546.0 - ISC+ *+ * This source code is licensed under the ISC license.+ * See the LICENSE file in the root directory of this source tree.+ */const Wy=[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]],Iy=Mt("server",Wy);/**+ * @license lucide-react v0.546.0 - ISC+ *+ * This source code is licensed under the ISC license.+ * See the LICENSE file in the root directory of this source tree.+ */const Fy=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]],$y=Mt("shield",Fy);/**+ * @license lucide-react v0.546.0 - ISC+ *+ * This source code is licensed under the ISC license.+ * See the LICENSE file in the root directory of this source tree.+ */const Py=[["path",{d:"M10 8h4",key:"1sr2af"}],["path",{d:"M12 21v-9",key:"17s77i"}],["path",{d:"M12 8V3",key:"13r4qs"}],["path",{d:"M17 16h4",key:"h1uq16"}],["path",{d:"M19 12V3",key:"o1uvq1"}],["path",{d:"M19 21v-5",key:"qua636"}],["path",{d:"M3 14h4",key:"bcjad9"}],["path",{d:"M5 10V3",key:"cb8scm"}],["path",{d:"M5 21v-7",key:"1w1uti"}]],t2=Mt("sliders-vertical",Py);/**+ * @license lucide-react v0.546.0 - ISC+ *+ * This source code is licensed under the ISC license.+ * See the LICENSE file in the root directory of this source tree.+ */const e2=[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]],a2=Mt("smartphone",e2);/**+ * @license lucide-react v0.546.0 - ISC+ *+ * This source code is licensed under the ISC license.+ * See the LICENSE file in the root directory of this source tree.+ */const n2=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],bs=Mt("sparkles",n2);/**+ * @license lucide-react v0.546.0 - ISC+ *+ * This source code is licensed under the ISC license.+ * See the LICENSE file in the root directory of this source tree.+ */const l2=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],i2=Mt("square",l2);/**+ * @license lucide-react v0.546.0 - ISC+ *+ * This source code is licensed under the ISC license.+ * See the LICENSE file in the root directory of this source tree.+ */const r2=[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]],s2=Mt("tag",r2);/**+ * @license lucide-react v0.546.0 - ISC+ *+ * This source code is licensed under the ISC license.+ * See the LICENSE file in the root directory of this source tree.+ */const u2=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],Sm=Mt("terminal",u2);/**+ * @license lucide-react v0.546.0 - ISC+ *+ * This source code is licensed under the ISC license.+ * See the LICENSE file in the root directory of this source tree.+ */const o2=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],_c=Mt("trash-2",o2);/**+ * @license lucide-react v0.546.0 - ISC+ *+ * This source code is licensed under the ISC license.+ * See the LICENSE file in the root directory of this source tree.+ */const c2=[["path",{d:"M12 4v16",key:"1654pz"}],["path",{d:"M4 7V5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v2",key:"e0r10z"}],["path",{d:"M9 20h6",key:"s66wpe"}]],f2=Mt("type",c2);/**+ * @license lucide-react v0.546.0 - ISC+ *+ * This source code is licensed under the ISC license.+ * See the LICENSE file in the root directory of this source tree.+ */const d2=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],h2=Mt("upload",d2);/**+ * @license lucide-react v0.546.0 - ISC+ *+ * This source code is licensed under the ISC license.+ * See the LICENSE file in the root directory of this source tree.+ */const m2=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],p2=Mt("user",m2);/**+ * @license lucide-react v0.546.0 - ISC+ *+ * This source code is licensed under the ISC license.+ * See the LICENSE file in the root directory of this source tree.+ */const g2=[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["path",{d:"M16 9a5 5 0 0 1 0 6",key:"1q6k2b"}],["path",{d:"M19.364 18.364a9 9 0 0 0 0-12.728",key:"ijwkga"}]],wm=Mt("volume-2",g2);/**+ * @license lucide-react v0.546.0 - ISC+ *+ * This source code is licensed under the ISC license.+ * See the LICENSE file in the root directory of this source tree.+ */const y2=[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["line",{x1:"22",x2:"16",y1:"9",y2:"15",key:"1ewh16"}],["line",{x1:"16",x2:"22",y1:"9",y2:"15",key:"5ykzw1"}]],v2=Mt("volume-x",y2);/**+ * @license lucide-react v0.546.0 - ISC+ *+ * This source code is licensed under the ISC license.+ * See the LICENSE file in the root directory of this source tree.+ */const b2=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Sc=Mt("x",b2);/**+ * @license lucide-react v0.546.0 - ISC+ *+ * This source code is licensed under the ISC license.+ * See the LICENSE file in the root directory of this source tree.+ */const x2=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],_2=Mt("zap",x2),S2=({title:p,onUpdateTitle:d,look:r,onSelectLook:s,onOpenAiModal:u,onOpenTemplates:f,onOpenExport:c,onResetProject:o})=>E.jsx("header",{className:"w-full bg-slate-900 border-b border-slate-800 text-slate-100 sticky top-0 z-40 select-none",children:E.jsxs("div",{className:"max-w-7xl mx-auto px-4 h-15 flex items-center justify-between gap-3",children:[E.jsxs("div",{className:"flex items-center gap-3 shrink-0",children:[E.jsx("div",{className:"w-8 h-8 rounded-lg bg-gradient-to-tr from-amber-500 via-orange-500 to-rose-500 flex items-center justify-center shadow-[0_0_15px_rgba(249,115,22,0.4)]",children:E.jsx("span",{className:"text-base font-black text-white",children:"🦘"})}),E.jsxs("div",{children:[E.jsxs("div",{className:"flex items-center gap-2",children:[E.jsxs("span",{className:"font-extrabold text-base tracking-tight text-white",children:["Explainroo ",E.jsx("span",{className:"text-amber-400 font-bold",children:"UI"})]}),E.jsx("span",{className:"px-1.5 py-0.5 rounded bg-amber-400/15 border border-amber-400/30 text-[10px] font-mono font-semibold text-amber-300",children:"v1.0"})]}),E.jsx("p",{className:"hidden md:block text-[11px] text-slate-400 leading-none",children:"Visual studio for animated software explainer videos"})]})]}),E.jsx("div",{className:"flex-1 max-w-md hidden sm:block",children:E.jsx("input",{type:"text",value:p,onChange:g=>d(g.target.value),className:"w-full bg-slate-950/60 hover:bg-slate-950 border border-slate-800 focus:border-amber-400/80 rounded-lg px-3 py-1.5 text-xs sm:text-sm font-medium text-slate-200 outline-none transition-colors",placeholder:"Explainer Video Title..."})}),E.jsxs("div",{className:"flex items-center gap-1.5 shrink-0",children:[E.jsxs("div",{className:"relative flex items-center bg-slate-950 border border-slate-800 rounded-lg px-2.5 py-1 text-xs",children:[E.jsx(Hy,{className:"w-3.5 h-3.5 text-amber-400 mr-1.5 shrink-0"}),E.jsx("select",{value:r,onChange:g=>s(g.target.value),className:"bg-transparent text-slate-200 text-xs font-medium outline-none cursor-pointer pr-1",children:Object.entries(Bl).map(([g,_])=>E.jsx("option",{value:g,className:"bg-slate-900 text-slate-200",children:_.name},g))})]}),E.jsxs("button",{onClick:u,className:"flex items-center gap-1.5 px-3 py-1.5 bg-gradient-to-r from-amber-500 to-orange-500 hover:from-amber-400 hover:to-orange-400 text-slate-950 text-xs font-bold rounded-lg shadow-[0_0_15px_rgba(245,158,11,0.3)] transition-all cursor-pointer active:scale-95",title:"Generate complete explainer video from prompt or repo URL",children:[E.jsx(bs,{className:"w-3.5 h-3.5"}),E.jsx("span",{className:"hidden xs:inline",children:"AI Generator"})]}),E.jsxs("button",{onClick:f,className:"flex items-center gap-1 px-2.5 py-1.5 bg-slate-800 hover:bg-slate-700 text-slate-200 hover:text-white text-xs font-medium rounded-lg border border-slate-700/80 transition-colors cursor-pointer",title:"Explore prebuilt explainer templates",children:[E.jsx(xm,{className:"w-3.5 h-3.5 text-cyan-400"}),E.jsx("span",{className:"hidden md:inline",children:"Templates"})]}),E.jsxs("button",{onClick:c,className:"flex items-center gap-1.5 px-3 py-1.5 bg-cyan-500/15 hover:bg-cyan-500/25 border border-cyan-500/40 text-cyan-300 text-xs font-semibold rounded-lg transition-colors cursor-pointer",title:"Export MP4/WebM Video or Explainroo CLI files",children:[E.jsx(ps,{className:"w-3.5 h-3.5"}),E.jsx("span",{children:"Export"})]}),E.jsx("button",{onClick:o,className:"p-1.5 rounded-lg text-slate-400 hover:text-white hover:bg-slate-800 transition-colors cursor-pointer",title:"Reset to default project",children:E.jsx(_m,{className:"w-3.5 h-3.5"})})]})]})});function sc(p,d,r){if(p&&p.length){const[s,u]=d,f=Math.PI/180*r,c=Math.cos(f),o=Math.sin(f);for(const g of p){const[_,b]=g;g[0]=(_-s)*c-(b-u)*o+s,g[1]=(_-s)*o+(b-u)*c+u}}}function w2(p,d){return p[0]===d[0]&&p[1]===d[1]}function T2(p,d,r,s=1){const u=r,f=Math.max(d,.1),c=p[0]&&p[0][0]&&typeof p[0][0]=="number"?[p]:p,o=[0,0];if(u)for(const _ of c)sc(_,o,u);const g=(function(_,b,x){const m=[];for(const k of _){const j=[...k];w2(j[0],j[j.length-1])||j.push([j[0][0],j[0][1]]),j.length>2&&m.push(j)}const v=[];b=Math.max(b,.1);const A=[];for(const k of m)for(let j=0;j<k.length-1;j++){const U=k[j],B=k[j+1];if(U[1]!==B[1]){const W=Math.min(U[1],B[1]);A.push({ymin:W,ymax:Math.max(U[1],B[1]),x:W===U[1]?U[0]:B[0],islope:(B[0]-U[0])/(B[1]-U[1])})}}if(A.sort(((k,j)=>k.ymin<j.ymin?-1:k.ymin>j.ymin?1:k.x<j.x?-1:k.x>j.x?1:k.ymax===j.ymax?0:(k.ymax-j.ymax)/Math.abs(k.ymax-j.ymax))),!A.length)return v;let S=[],N=A[0].ymin,T=0;for(;S.length||A.length;){if(A.length){let k=-1;for(let j=0;j<A.length&&!(A[j].ymin>N);j++)k=j;A.splice(0,k+1).forEach((j=>{S.push({s:N,edge:j})}))}if(S=S.filter((k=>!(k.edge.ymax<=N))),S.sort(((k,j)=>k.edge.x===j.edge.x?0:(k.edge.x-j.edge.x)/Math.abs(k.edge.x-j.edge.x))),(x!==1||T%b==0)&&S.length>1)for(let k=0;k<S.length;k+=2){const j=k+1;if(j>=S.length)break;const U=S[k].edge,B=S[j].edge;v.push([[Math.round(U.x),N],[Math.round(B.x),N]])}N+=x,S.forEach((k=>{k.edge.x=k.edge.x+x*k.edge.islope})),T++}return v})(c,f,s);if(u){for(const _ of c)sc(_,o,-u);(function(_,b,x){const m=[];_.forEach((v=>m.push(...v))),sc(m,b,x)})(g,o,-u)}return g}function Ui(p,d){var r;const s=d.hachureAngle+90;let u=d.hachureGap;u<0&&(u=4*d.strokeWidth),u=Math.round(Math.max(u,.1));let f=1;return d.roughness>=1&&(((r=d.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(f=u),T2(p,u,s,f||1)}class wc{constructor(d){this.helper=d}fillPolygons(d,r){return this._fillPolygons(d,r)}_fillPolygons(d,r){const s=Ui(d,r);return{type:"fillSketch",ops:this.renderLines(s,r)}}renderLines(d,r){const s=[];for(const u of d)s.push(...this.helper.doubleLineOps(u[0][0],u[0][1],u[1][0],u[1][1],r));return s}}function Ts(p){const d=p[0],r=p[1];return Math.sqrt(Math.pow(d[0]-r[0],2)+Math.pow(d[1]-r[1],2))}class N2 extends wc{fillPolygons(d,r){let s=r.hachureGap;s<0&&(s=4*r.strokeWidth),s=Math.max(s,.1);const u=Ui(d,Object.assign({},r,{hachureGap:s})),f=Math.PI/180*r.hachureAngle,c=[],o=.5*s*Math.cos(f),g=.5*s*Math.sin(f);for(const[_,b]of u)Ts([_,b])&&c.push([[_[0]-o,_[1]+g],[...b]],[[_[0]+o,_[1]-g],[...b]]);return{type:"fillSketch",ops:this.renderLines(c,r)}}}class E2 extends wc{fillPolygons(d,r){const s=this._fillPolygons(d,r),u=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),f=this._fillPolygons(d,u);return s.ops=s.ops.concat(f.ops),s}}class z2{constructor(d){this.helper=d}fillPolygons(d,r){const s=Ui(d,r=Object.assign({},r,{hachureAngle:0}));return this.dotsOnLines(s,r)}dotsOnLines(d,r){const s=[];let u=r.hachureGap;u<0&&(u=4*r.strokeWidth),u=Math.max(u,.1);let f=r.fillWeight;f<0&&(f=r.strokeWidth/2);const c=u/4;for(const o of d){const g=Ts(o),_=g/u,b=Math.ceil(_)-1,x=g-b*u,m=(o[0][0]+o[1][0])/2-u/4,v=Math.min(o[0][1],o[1][1]);for(let A=0;A<b;A++){const S=v+x+A*u,N=m-c+2*Math.random()*c,T=S-c+2*Math.random()*c,k=this.helper.ellipse(N,T,f,f,r);s.push(...k.ops)}}return{type:"fillSketch",ops:s}}}class k2{constructor(d){this.helper=d}fillPolygons(d,r){const s=Ui(d,r);return{type:"fillSketch",ops:this.dashedLine(s,r)}}dashedLine(d,r){const s=r.dashOffset<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashOffset,u=r.dashGap<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashGap,f=[];return d.forEach((c=>{const o=Ts(c),g=Math.floor(o/(s+u)),_=(o+u-g*(s+u))/2;let b=c[0],x=c[1];b[0]>x[0]&&(b=c[1],x=c[0]);const m=Math.atan((x[1]-b[1])/(x[0]-b[0]));for(let v=0;v<g;v++){const A=v*(s+u),S=A+s,N=[b[0]+A*Math.cos(m)+_*Math.cos(m),b[1]+A*Math.sin(m)+_*Math.sin(m)],T=[b[0]+S*Math.cos(m)+_*Math.cos(m),b[1]+S*Math.sin(m)+_*Math.sin(m)];f.push(...this.helper.doubleLineOps(N[0],N[1],T[0],T[1],r))}})),f}}class A2{constructor(d){this.helper=d}fillPolygons(d,r){const s=r.hachureGap<0?4*r.strokeWidth:r.hachureGap,u=r.zigzagOffset<0?s:r.zigzagOffset,f=Ui(d,r=Object.assign({},r,{hachureGap:s+u}));return{type:"fillSketch",ops:this.zigzagLines(f,u,r)}}zigzagLines(d,r,s){const u=[];return d.forEach((f=>{const c=Ts(f),o=Math.round(c/(2*r));let g=f[0],_=f[1];g[0]>_[0]&&(g=f[1],_=f[0]);const b=Math.atan((_[1]-g[1])/(_[0]-g[0]));for(let x=0;x<o;x++){const m=2*x*r,v=2*(x+1)*r,A=Math.sqrt(2*Math.pow(r,2)),S=[g[0]+m*Math.cos(b),g[1]+m*Math.sin(b)],N=[g[0]+v*Math.cos(b),g[1]+v*Math.sin(b)],T=[S[0]+A*Math.cos(b+Math.PI/4),S[1]+A*Math.sin(b+Math.PI/4)];u.push(...this.helper.doubleLineOps(S[0],S[1],T[0],T[1],s),...this.helper.doubleLineOps(T[0],T[1],N[0],N[1],s))}})),u}}const qe={};class C2{constructor(d){this.seed=d}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const M2=0,uc=1,im=2,fs={A:7,a:7,C:6,c:6,H:1,h:1,L:2,l:2,M:2,m:2,Q:4,q:4,S:4,s:4,T:2,t:2,V:1,v:1,Z:0,z:0};function oc(p,d){return p.type===d}function Tc(p){const d=[],r=(function(c){const o=new Array;for(;c!=="";)if(c.match(/^([ \t\r\n,]+)/))c=c.substr(RegExp.$1.length);else if(c.match(/^([aAcChHlLmMqQsStTvVzZ])/))o[o.length]={type:M2,text:RegExp.$1},c=c.substr(RegExp.$1.length);else{if(!c.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];o[o.length]={type:uc,text:`${parseFloat(RegExp.$1)}`},c=c.substr(RegExp.$1.length)}return o[o.length]={type:im,text:""},o})(p);let s="BOD",u=0,f=r[u];for(;!oc(f,im);){let c=0;const o=[];if(s==="BOD"){if(f.text!=="M"&&f.text!=="m")return Tc("M0,0"+p);u++,c=fs[f.text],s=f.text}else oc(f,uc)?c=fs[s]:(u++,c=fs[f.text],s=f.text);if(!(u+c<r.length))throw new Error("Path data ended short");for(let g=u;g<u+c;g++){const _=r[g];if(!oc(_,uc))throw new Error("Param not a number: "+s+","+_.text);o[o.length]=+_.text}if(typeof fs[s]!="number")throw new Error("Bad segment: "+s);{const g={key:s,data:o};d.push(g),u+=c,f=r[u],s==="M"&&(s="L"),s==="m"&&(s="l")}}return d}function Tm(p){let d=0,r=0,s=0,u=0;const f=[];for(const{key:c,data:o}of p)switch(c){case"M":f.push({key:"M",data:[...o]}),[d,r]=o,[s,u]=o;break;case"m":d+=o[0],r+=o[1],f.push({key:"M",data:[d,r]}),s=d,u=r;break;case"L":f.push({key:"L",data:[...o]}),[d,r]=o;break;case"l":d+=o[0],r+=o[1],f.push({key:"L",data:[d,r]});break;case"C":f.push({key:"C",data:[...o]}),d=o[4],r=o[5];break;case"c":{const g=o.map(((_,b)=>b%2?_+r:_+d));f.push({key:"C",data:g}),d=g[4],r=g[5];break}case"Q":f.push({key:"Q",data:[...o]}),d=o[2],r=o[3];break;case"q":{const g=o.map(((_,b)=>b%2?_+r:_+d));f.push({key:"Q",data:g}),d=g[2],r=g[3];break}case"A":f.push({key:"A",data:[...o]}),d=o[5],r=o[6];break;case"a":d+=o[5],r+=o[6],f.push({key:"A",data:[o[0],o[1],o[2],o[3],o[4],d,r]});break;case"H":f.push({key:"H",data:[...o]}),d=o[0];break;case"h":d+=o[0],f.push({key:"H",data:[d]});break;case"V":f.push({key:"V",data:[...o]}),r=o[0];break;case"v":r+=o[0],f.push({key:"V",data:[r]});break;case"S":f.push({key:"S",data:[...o]}),d=o[2],r=o[3];break;case"s":{const g=o.map(((_,b)=>b%2?_+r:_+d));f.push({key:"S",data:g}),d=g[2],r=g[3];break}case"T":f.push({key:"T",data:[...o]}),d=o[0],r=o[1];break;case"t":d+=o[0],r+=o[1],f.push({key:"T",data:[d,r]});break;case"Z":case"z":f.push({key:"Z",data:[]}),d=s,r=u}return f}function Nm(p){const d=[];let r="",s=0,u=0,f=0,c=0,o=0,g=0;for(const{key:_,data:b}of p){switch(_){case"M":d.push({key:"M",data:[...b]}),[s,u]=b,[f,c]=b;break;case"C":d.push({key:"C",data:[...b]}),s=b[4],u=b[5],o=b[2],g=b[3];break;case"L":d.push({key:"L",data:[...b]}),[s,u]=b;break;case"H":s=b[0],d.push({key:"L",data:[s,u]});break;case"V":u=b[0],d.push({key:"L",data:[s,u]});break;case"S":{let x=0,m=0;r==="C"||r==="S"?(x=s+(s-o),m=u+(u-g)):(x=s,m=u),d.push({key:"C",data:[x,m,...b]}),o=b[0],g=b[1],s=b[2],u=b[3];break}case"T":{const[x,m]=b;let v=0,A=0;r==="Q"||r==="T"?(v=s+(s-o),A=u+(u-g)):(v=s,A=u);const S=s+2*(v-s)/3,N=u+2*(A-u)/3,T=x+2*(v-x)/3,k=m+2*(A-m)/3;d.push({key:"C",data:[S,N,T,k,x,m]}),o=v,g=A,s=x,u=m;break}case"Q":{const[x,m,v,A]=b,S=s+2*(x-s)/3,N=u+2*(m-u)/3,T=v+2*(x-v)/3,k=A+2*(m-A)/3;d.push({key:"C",data:[S,N,T,k,v,A]}),o=x,g=m,s=v,u=A;break}case"A":{const x=Math.abs(b[0]),m=Math.abs(b[1]),v=b[2],A=b[3],S=b[4],N=b[5],T=b[6];x===0||m===0?(d.push({key:"C",data:[s,u,N,T,N,T]}),s=N,u=T):(s!==N||u!==T)&&(Em(s,u,N,T,x,m,v,A,S).forEach((function(k){d.push({key:"C",data:k})})),s=N,u=T);break}case"Z":d.push({key:"Z",data:[]}),s=f,u=c}r=_}return d}function Di(p,d,r){return[p*Math.cos(r)-d*Math.sin(r),p*Math.sin(r)+d*Math.cos(r)]}function Em(p,d,r,s,u,f,c,o,g,_){const b=(x=c,Math.PI*x/180);var x;let m=[],v=0,A=0,S=0,N=0;if(_)[v,A,S,N]=_;else{[p,d]=Di(p,d,-b),[r,s]=Di(r,s,-b);const P=(p-r)/2,w=(d-s)/2;let it=P*P/(u*u)+w*w/(f*f);it>1&&(it=Math.sqrt(it),u*=it,f*=it);const G=u*u,L=f*f,rt=G*L-G*w*w-L*P*P,nt=G*w*w+L*P*P,mt=(o===g?-1:1)*Math.sqrt(Math.abs(rt/nt));S=mt*u*w/f+(p+r)/2,N=mt*-f*P/u+(d+s)/2,v=Math.asin(parseFloat(((d-N)/f).toFixed(9))),A=Math.asin(parseFloat(((s-N)/f).toFixed(9))),p<S&&(v=Math.PI-v),r<S&&(A=Math.PI-A),v<0&&(v=2*Math.PI+v),A<0&&(A=2*Math.PI+A),g&&v>A&&(v-=2*Math.PI),!g&&A>v&&(A-=2*Math.PI)}let T=A-v;if(Math.abs(T)>120*Math.PI/180){const P=A,w=r,it=s;A=g&&A>v?v+120*Math.PI/180*1:v+120*Math.PI/180*-1,m=Em(r=S+u*Math.cos(A),s=N+f*Math.sin(A),w,it,u,f,c,0,g,[A,P,S,N])}T=A-v;const k=Math.cos(v),j=Math.sin(v),U=Math.cos(A),B=Math.sin(A),W=Math.tan(T/4),X=4/3*u*W,Q=4/3*f*W,I=[p,d],ut=[p+X*j,d-Q*k],vt=[r+X*B,s-Q*U],R=[r,s];if(ut[0]=2*I[0]-ut[0],ut[1]=2*I[1]-ut[1],_)return[ut,vt,R].concat(m);{m=[ut,vt,R].concat(m);const P=[];for(let w=0;w<m.length;w+=3){const it=Di(m[w][0],m[w][1],b),G=Di(m[w+1][0],m[w+1][1],b),L=Di(m[w+2][0],m[w+2][1],b);P.push([it[0],it[1],G[0],G[1],L[0],L[1]])}return P}}const O2={randOffset:function(p,d){return jt(p,d)},randOffsetWithRange:function(p,d,r){return xs(p,d,r)},ellipse:function(p,d,r,s,u){const f=km(r,s,u);return gc(p,d,u,f).opset},doubleLineOps:function(p,d,r,s,u){return xn(p,d,r,s,u,!0)}};function zm(p,d,r,s,u){return{type:"path",ops:xn(p,d,r,s,u)}}function gs(p,d,r){const s=(p||[]).length;if(s>2){const u=[];for(let f=0;f<s-1;f++)u.push(...xn(p[f][0],p[f][1],p[f+1][0],p[f+1][1],r));return d&&u.push(...xn(p[s-1][0],p[s-1][1],p[0][0],p[0][1],r)),{type:"path",ops:u}}return s===2?zm(p[0][0],p[0][1],p[1][0],p[1][1],r):{type:"path",ops:[]}}function j2(p,d,r,s,u){return(function(f,c){return gs(f,!0,c)})([[p,d],[p+r,d],[p+r,d+s],[p,d+s]],u)}function rm(p,d){if(p.length){const r=typeof p[0][0]=="number"?[p]:p,s=ds(r[0],1*(1+.2*d.roughness),d),u=d.disableMultiStroke?[]:ds(r[0],1.5*(1+.22*d.roughness),om(d));for(let f=1;f<r.length;f++){const c=r[f];if(c.length){const o=ds(c,1*(1+.2*d.roughness),d),g=d.disableMultiStroke?[]:ds(c,1.5*(1+.22*d.roughness),om(d));for(const _ of o)_.op!=="move"&&s.push(_);for(const _ of g)_.op!=="move"&&u.push(_)}}return{type:"path",ops:s.concat(u)}}return{type:"path",ops:[]}}function km(p,d,r){const s=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(p/2,2)+Math.pow(d/2,2))/2)),u=Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*s)),f=2*Math.PI/u;let c=Math.abs(p/2),o=Math.abs(d/2);const g=1-r.curveFitting;return c+=jt(c*g,r),o+=jt(o*g,r),{increment:f,rx:c,ry:o}}function gc(p,d,r,s){const[u,f]=cm(s.increment,p,d,s.rx,s.ry,1,s.increment*xs(.1,xs(.4,1,r),r),r);let c=_s(u,null,r);if(!r.disableMultiStroke&&r.roughness!==0){const[o]=cm(s.increment,p,d,s.rx,s.ry,1.5,0,r),g=_s(o,null,r);c=c.concat(g)}return{estimatedPoints:f,opset:{type:"path",ops:c}}}function sm(p,d,r,s,u,f,c,o,g){const _=p,b=d;let x=Math.abs(r/2),m=Math.abs(s/2);x+=jt(.01*x,g),m+=jt(.01*m,g);let v=u,A=f;for(;v<0;)v+=2*Math.PI,A+=2*Math.PI;A-v>2*Math.PI&&(v=0,A=2*Math.PI);const S=2*Math.PI/g.curveStepCount,N=Math.min(S/2,(A-v)/2),T=fm(N,_,b,x,m,v,A,1,g);if(!g.disableMultiStroke){const k=fm(N,_,b,x,m,v,A,1.5,g);T.push(...k)}return c&&(o?T.push(...xn(_,b,_+x*Math.cos(v),b+m*Math.sin(v),g),...xn(_,b,_+x*Math.cos(A),b+m*Math.sin(A),g)):T.push({op:"lineTo",data:[_,b]},{op:"lineTo",data:[_+x*Math.cos(v),b+m*Math.sin(v)]})),{type:"path",ops:T}}function um(p,d){const r=Nm(Tm(Tc(p))),s=[];let u=[0,0],f=[0,0];for(const{key:c,data:o}of r)switch(c){case"M":f=[o[0],o[1]],u=[o[0],o[1]];break;case"L":s.push(...xn(f[0],f[1],o[0],o[1],d)),f=[o[0],o[1]];break;case"C":{const[g,_,b,x,m,v]=o;s.push(...D2(g,_,b,x,m,v,f,d)),f=[m,v];break}case"Z":s.push(...xn(f[0],f[1],u[0],u[1],d)),f=[u[0],u[1]]}return{type:"path",ops:s}}function cc(p,d){const r=[];for(const s of p)if(s.length){const u=d.maxRandomnessOffset||0,f=s.length;if(f>2){r.push({op:"move",data:[s[0][0]+jt(u,d),s[0][1]+jt(u,d)]});for(let c=1;c<f;c++)r.push({op:"lineTo",data:[s[c][0]+jt(u,d),s[c][1]+jt(u,d)]})}}return{type:"fillPath",ops:r}}function Ul(p,d){return(function(r,s){let u=r.fillStyle||"hachure";if(!qe[u])switch(u){case"zigzag":qe[u]||(qe[u]=new N2(s));break;case"cross-hatch":qe[u]||(qe[u]=new E2(s));break;case"dots":qe[u]||(qe[u]=new z2(s));break;case"dashed":qe[u]||(qe[u]=new k2(s));break;case"zigzag-line":qe[u]||(qe[u]=new A2(s));break;default:u="hachure",qe[u]||(qe[u]=new wc(s))}return qe[u]})(d,O2).fillPolygons(p,d)}function om(p){const d=Object.assign({},p);return d.randomizer=void 0,p.seed&&(d.seed=p.seed+1),d}function Am(p){return p.randomizer||(p.randomizer=new C2(p.seed||0)),p.randomizer.next()}function xs(p,d,r,s=1){return r.roughness*s*(Am(r)*(d-p)+p)}function jt(p,d,r=1){return xs(-p,p,d,r)}function xn(p,d,r,s,u,f=!1){const c=f?u.disableMultiStrokeFill:u.disableMultiStroke,o=yc(p,d,r,s,u,!0,!1);if(c)return o;const g=yc(p,d,r,s,u,!0,!0);return o.concat(g)}function yc(p,d,r,s,u,f,c){const o=Math.pow(p-r,2)+Math.pow(d-s,2),g=Math.sqrt(o);let _=1;_=g<200?1:g>500?.4:-.0016668*g+1.233334;let b=u.maxRandomnessOffset||0;b*b*100>o&&(b=g/10);const x=b/2,m=.2+.2*Am(u);let v=u.bowing*u.maxRandomnessOffset*(s-d)/200,A=u.bowing*u.maxRandomnessOffset*(p-r)/200;v=jt(v,u,_),A=jt(A,u,_);const S=[],N=()=>jt(x,u,_),T=()=>jt(b,u,_),k=u.preserveVertices;return c?S.push({op:"move",data:[p+(k?0:N()),d+(k?0:N())]}):S.push({op:"move",data:[p+(k?0:jt(b,u,_)),d+(k?0:jt(b,u,_))]}),c?S.push({op:"bcurveTo",data:[v+p+(r-p)*m+N(),A+d+(s-d)*m+N(),v+p+2*(r-p)*m+N(),A+d+2*(s-d)*m+N(),r+(k?0:N()),s+(k?0:N())]}):S.push({op:"bcurveTo",data:[v+p+(r-p)*m+T(),A+d+(s-d)*m+T(),v+p+2*(r-p)*m+T(),A+d+2*(s-d)*m+T(),r+(k?0:T()),s+(k?0:T())]}),S}function ds(p,d,r){if(!p.length)return[];const s=[];s.push([p[0][0]+jt(d,r),p[0][1]+jt(d,r)]),s.push([p[0][0]+jt(d,r),p[0][1]+jt(d,r)]);for(let u=1;u<p.length;u++)s.push([p[u][0]+jt(d,r),p[u][1]+jt(d,r)]),u===p.length-1&&s.push([p[u][0]+jt(d,r),p[u][1]+jt(d,r)]);return _s(s,null,r)}function _s(p,d,r){const s=p.length,u=[];if(s>3){const f=[],c=1-r.curveTightness;u.push({op:"move",data:[p[1][0],p[1][1]]});for(let o=1;o+2<s;o++){const g=p[o];f[0]=[g[0],g[1]],f[1]=[g[0]+(c*p[o+1][0]-c*p[o-1][0])/6,g[1]+(c*p[o+1][1]-c*p[o-1][1])/6],f[2]=[p[o+1][0]+(c*p[o][0]-c*p[o+2][0])/6,p[o+1][1]+(c*p[o][1]-c*p[o+2][1])/6],f[3]=[p[o+1][0],p[o+1][1]],u.push({op:"bcurveTo",data:[f[1][0],f[1][1],f[2][0],f[2][1],f[3][0],f[3][1]]})}}else s===3?(u.push({op:"move",data:[p[1][0],p[1][1]]}),u.push({op:"bcurveTo",data:[p[1][0],p[1][1],p[2][0],p[2][1],p[2][0],p[2][1]]})):s===2&&u.push(...yc(p[0][0],p[0][1],p[1][0],p[1][1],r,!0,!0));return u}function cm(p,d,r,s,u,f,c,o){const g=[],_=[];if(o.roughness===0){p/=4,_.push([d+s*Math.cos(-p),r+u*Math.sin(-p)]);for(let b=0;b<=2*Math.PI;b+=p){const x=[d+s*Math.cos(b),r+u*Math.sin(b)];g.push(x),_.push(x)}_.push([d+s*Math.cos(0),r+u*Math.sin(0)]),_.push([d+s*Math.cos(p),r+u*Math.sin(p)])}else{const b=jt(.5,o)-Math.PI/2;_.push([jt(f,o)+d+.9*s*Math.cos(b-p),jt(f,o)+r+.9*u*Math.sin(b-p)]);const x=2*Math.PI+b-.01;for(let m=b;m<x;m+=p){const v=[jt(f,o)+d+s*Math.cos(m),jt(f,o)+r+u*Math.sin(m)];g.push(v),_.push(v)}_.push([jt(f,o)+d+s*Math.cos(b+2*Math.PI+.5*c),jt(f,o)+r+u*Math.sin(b+2*Math.PI+.5*c)]),_.push([jt(f,o)+d+.98*s*Math.cos(b+c),jt(f,o)+r+.98*u*Math.sin(b+c)]),_.push([jt(f,o)+d+.9*s*Math.cos(b+.5*c),jt(f,o)+r+.9*u*Math.sin(b+.5*c)])}return[_,g]}function fm(p,d,r,s,u,f,c,o,g){const _=f+jt(.1,g),b=[];b.push([jt(o,g)+d+.9*s*Math.cos(_-p),jt(o,g)+r+.9*u*Math.sin(_-p)]);for(let x=_;x<=c;x+=p)b.push([jt(o,g)+d+s*Math.cos(x),jt(o,g)+r+u*Math.sin(x)]);return b.push([d+s*Math.cos(c),r+u*Math.sin(c)]),b.push([d+s*Math.cos(c),r+u*Math.sin(c)]),_s(b,null,g)}function D2(p,d,r,s,u,f,c,o){const g=[],_=[o.maxRandomnessOffset||1,(o.maxRandomnessOffset||1)+.3];let b=[0,0];const x=o.disableMultiStroke?1:2,m=o.preserveVertices;for(let v=0;v<x;v++)v===0?g.push({op:"move",data:[c[0],c[1]]}):g.push({op:"move",data:[c[0]+(m?0:jt(_[0],o)),c[1]+(m?0:jt(_[0],o))]}),b=m?[u,f]:[u+jt(_[v],o),f+jt(_[v],o)],g.push({op:"bcurveTo",data:[p+jt(_[v],o),d+jt(_[v],o),r+jt(_[v],o),s+jt(_[v],o),b[0],b[1]]});return g}function Ri(p){return[...p]}function dm(p,d=0){const r=p.length;if(r<3)throw new Error("A curve must have at least three points.");const s=[];if(r===3)s.push(Ri(p[0]),Ri(p[1]),Ri(p[2]),Ri(p[2]));else{const u=[];u.push(p[0],p[0]);for(let o=1;o<p.length;o++)u.push(p[o]),o===p.length-1&&u.push(p[o]);const f=[],c=1-d;s.push(Ri(u[0]));for(let o=1;o+2<u.length;o++){const g=u[o];f[0]=[g[0],g[1]],f[1]=[g[0]+(c*u[o+1][0]-c*u[o-1][0])/6,g[1]+(c*u[o+1][1]-c*u[o-1][1])/6],f[2]=[u[o+1][0]+(c*u[o][0]-c*u[o+2][0])/6,u[o+1][1]+(c*u[o][1]-c*u[o+2][1])/6],f[3]=[u[o+1][0],u[o+1][1]],s.push(f[1],f[2],f[3])}}return s}function ys(p,d){return Math.pow(p[0]-d[0],2)+Math.pow(p[1]-d[1],2)}function R2(p,d,r){const s=ys(d,r);if(s===0)return ys(p,d);let u=((p[0]-d[0])*(r[0]-d[0])+(p[1]-d[1])*(r[1]-d[1]))/s;return u=Math.max(0,Math.min(1,u)),ys(p,Qn(d,r,u))}function Qn(p,d,r){return[p[0]+(d[0]-p[0])*r,p[1]+(d[1]-p[1])*r]}function vc(p,d,r,s){const u=s||[];if((function(o,g){const _=o[g+0],b=o[g+1],x=o[g+2],m=o[g+3];let v=3*b[0]-2*_[0]-m[0];v*=v;let A=3*b[1]-2*_[1]-m[1];A*=A;let S=3*x[0]-2*m[0]-_[0];S*=S;let N=3*x[1]-2*m[1]-_[1];return N*=N,v<S&&(v=S),A<N&&(A=N),v+A})(p,d)<r){const o=p[d+0];u.length?(f=u[u.length-1],c=o,Math.sqrt(ys(f,c))>1&&u.push(o)):u.push(o),u.push(p[d+3])}else{const g=p[d+0],_=p[d+1],b=p[d+2],x=p[d+3],m=Qn(g,_,.5),v=Qn(_,b,.5),A=Qn(b,x,.5),S=Qn(m,v,.5),N=Qn(v,A,.5),T=Qn(S,N,.5);vc([g,m,S,T],0,r,u),vc([T,N,A,x],0,r,u)}var f,c;return u}function U2(p,d){return Ss(p,0,p.length,d)}function Ss(p,d,r,s,u){const f=u||[],c=p[d],o=p[r-1];let g=0,_=1;for(let b=d+1;b<r-1;++b){const x=R2(p[b],c,o);x>g&&(g=x,_=b)}return Math.sqrt(g)>s?(Ss(p,d,_+1,s,f),Ss(p,_,r,s,f)):(f.length||f.push(c),f.push(o)),f}function fc(p,d=.15,r){const s=[],u=(p.length-1)/3;for(let f=0;f<u;f++)vc(p,3*f,d,s);return r&&r>0?Ss(s,0,s.length,r):s}const Pe="none";class ws{constructor(d){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=d||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(d){return d?Object.assign({},this.defaultOptions,d):this.defaultOptions}_d(d,r,s){return{shape:d,sets:r||[],options:s||this.defaultOptions}}line(d,r,s,u,f){const c=this._o(f);return this._d("line",[zm(d,r,s,u,c)],c)}rectangle(d,r,s,u,f){const c=this._o(f),o=[],g=j2(d,r,s,u,c);if(c.fill){const _=[[d,r],[d+s,r],[d+s,r+u],[d,r+u]];c.fillStyle==="solid"?o.push(cc([_],c)):o.push(Ul([_],c))}return c.stroke!==Pe&&o.push(g),this._d("rectangle",o,c)}ellipse(d,r,s,u,f){const c=this._o(f),o=[],g=km(s,u,c),_=gc(d,r,c,g);if(c.fill)if(c.fillStyle==="solid"){const b=gc(d,r,c,g).opset;b.type="fillPath",o.push(b)}else o.push(Ul([_.estimatedPoints],c));return c.stroke!==Pe&&o.push(_.opset),this._d("ellipse",o,c)}circle(d,r,s,u){const f=this.ellipse(d,r,s,s,u);return f.shape="circle",f}linearPath(d,r){const s=this._o(r);return this._d("linearPath",[gs(d,!1,s)],s)}arc(d,r,s,u,f,c,o=!1,g){const _=this._o(g),b=[],x=sm(d,r,s,u,f,c,o,!0,_);if(o&&_.fill)if(_.fillStyle==="solid"){const m=Object.assign({},_);m.disableMultiStroke=!0;const v=sm(d,r,s,u,f,c,!0,!1,m);v.type="fillPath",b.push(v)}else b.push((function(m,v,A,S,N,T,k){const j=m,U=v;let B=Math.abs(A/2),W=Math.abs(S/2);B+=jt(.01*B,k),W+=jt(.01*W,k);let X=N,Q=T;for(;X<0;)X+=2*Math.PI,Q+=2*Math.PI;Q-X>2*Math.PI&&(X=0,Q=2*Math.PI);const I=(Q-X)/k.curveStepCount,ut=[];for(let vt=X;vt<=Q;vt+=I)ut.push([j+B*Math.cos(vt),U+W*Math.sin(vt)]);return ut.push([j+B*Math.cos(Q),U+W*Math.sin(Q)]),ut.push([j,U]),Ul([ut],k)})(d,r,s,u,f,c,_));return _.stroke!==Pe&&b.push(x),this._d("arc",b,_)}curve(d,r){const s=this._o(r),u=[],f=rm(d,s);if(s.fill&&s.fill!==Pe)if(s.fillStyle==="solid"){const c=rm(d,Object.assign(Object.assign({},s),{disableMultiStroke:!0,roughness:s.roughness?s.roughness+s.fillShapeRoughnessGain:0}));u.push({type:"fillPath",ops:this._mergedShape(c.ops)})}else{const c=[],o=d;if(o.length){const g=typeof o[0][0]=="number"?[o]:o;for(const _ of g)_.length<3?c.push(..._):_.length===3?c.push(...fc(dm([_[0],_[0],_[1],_[2]]),10,(1+s.roughness)/2)):c.push(...fc(dm(_),10,(1+s.roughness)/2))}c.length&&u.push(Ul([c],s))}return s.stroke!==Pe&&u.push(f),this._d("curve",u,s)}polygon(d,r){const s=this._o(r),u=[],f=gs(d,!0,s);return s.fill&&(s.fillStyle==="solid"?u.push(cc([d],s)):u.push(Ul([d],s))),s.stroke!==Pe&&u.push(f),this._d("polygon",u,s)}path(d,r){const s=this._o(r),u=[];if(!d)return this._d("path",u,s);d=(d||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const f=s.fill&&s.fill!=="transparent"&&s.fill!==Pe,c=s.stroke!==Pe,o=!!(s.simplification&&s.simplification<1),g=(function(b,x,m){const v=Nm(Tm(Tc(b))),A=[];let S=[],N=[0,0],T=[];const k=()=>{T.length>=4&&S.push(...fc(T,x)),T=[]},j=()=>{k(),S.length&&(A.push(S),S=[])};for(const{key:B,data:W}of v)switch(B){case"M":j(),N=[W[0],W[1]],S.push(N);break;case"L":k(),S.push([W[0],W[1]]);break;case"C":if(!T.length){const X=S.length?S[S.length-1]:N;T.push([X[0],X[1]])}T.push([W[0],W[1]]),T.push([W[2],W[3]]),T.push([W[4],W[5]]);break;case"Z":k(),S.push([N[0],N[1]])}if(j(),!m)return A;const U=[];for(const B of A){const W=U2(B,m);W.length&&U.push(W)}return U})(d,1,o?4-4*(s.simplification||1):(1+s.roughness)/2),_=um(d,s);if(f)if(s.fillStyle==="solid")if(g.length===1){const b=um(d,Object.assign(Object.assign({},s),{disableMultiStroke:!0,roughness:s.roughness?s.roughness+s.fillShapeRoughnessGain:0}));u.push({type:"fillPath",ops:this._mergedShape(b.ops)})}else u.push(cc(g,s));else u.push(Ul(g,s));return c&&(o?g.forEach((b=>{u.push(gs(b,!1,s))})):u.push(_)),this._d("path",u,s)}opsToPath(d,r){let s="";for(const u of d.ops){const f=typeof r=="number"&&r>=0?u.data.map((c=>+c.toFixed(r))):u.data;switch(u.op){case"move":s+=`M${f[0]} ${f[1]} `;break;case"bcurveTo":s+=`C${f[0]} ${f[1]}, ${f[2]} ${f[3]}, ${f[4]} ${f[5]} `;break;case"lineTo":s+=`L${f[0]} ${f[1]} `}}return s.trim()}toPaths(d){const r=d.sets||[],s=d.options||this.defaultOptions,u=[];for(const f of r){let c=null;switch(f.type){case"path":c={d:this.opsToPath(f),stroke:s.stroke,strokeWidth:s.strokeWidth,fill:Pe};break;case"fillPath":c={d:this.opsToPath(f),stroke:Pe,strokeWidth:0,fill:s.fill||Pe};break;case"fillSketch":c=this.fillSketch(f,s)}c&&u.push(c)}return u}fillSketch(d,r){let s=r.fillWeight;return s<0&&(s=r.strokeWidth/2),{d:this.opsToPath(d),stroke:r.fill||Pe,strokeWidth:s,fill:Pe}}_mergedShape(d){return d.filter(((r,s)=>s===0||r.op!=="move"))}}class B2{constructor(d,r){this.canvas=d,this.ctx=this.canvas.getContext("2d"),this.gen=new ws(r)}draw(d){const r=d.sets||[],s=d.options||this.getDefaultOptions(),u=this.ctx,f=d.options.fixedDecimalPlaceDigits;for(const c of r)switch(c.type){case"path":u.save(),u.strokeStyle=s.stroke==="none"?"transparent":s.stroke,u.lineWidth=s.strokeWidth,s.strokeLineDash&&u.setLineDash(s.strokeLineDash),s.strokeLineDashOffset&&(u.lineDashOffset=s.strokeLineDashOffset),this._drawToContext(u,c,f),u.restore();break;case"fillPath":{u.save(),u.fillStyle=s.fill||"";const o=d.shape==="curve"||d.shape==="polygon"||d.shape==="path"?"evenodd":"nonzero";this._drawToContext(u,c,f,o),u.restore();break}case"fillSketch":this.fillSketch(u,c,s)}}fillSketch(d,r,s){let u=s.fillWeight;u<0&&(u=s.strokeWidth/2),d.save(),s.fillLineDash&&d.setLineDash(s.fillLineDash),s.fillLineDashOffset&&(d.lineDashOffset=s.fillLineDashOffset),d.strokeStyle=s.fill||"",d.lineWidth=u,this._drawToContext(d,r,s.fixedDecimalPlaceDigits),d.restore()}_drawToContext(d,r,s,u="nonzero"){d.beginPath();for(const f of r.ops){const c=typeof s=="number"&&s>=0?f.data.map((o=>+o.toFixed(s))):f.data;switch(f.op){case"move":d.moveTo(c[0],c[1]);break;case"bcurveTo":d.bezierCurveTo(c[0],c[1],c[2],c[3],c[4],c[5]);break;case"lineTo":d.lineTo(c[0],c[1])}}r.type==="fillPath"?d.fill(u):d.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(d,r,s,u,f){const c=this.gen.line(d,r,s,u,f);return this.draw(c),c}rectangle(d,r,s,u,f){const c=this.gen.rectangle(d,r,s,u,f);return this.draw(c),c}ellipse(d,r,s,u,f){const c=this.gen.ellipse(d,r,s,u,f);return this.draw(c),c}circle(d,r,s,u){const f=this.gen.circle(d,r,s,u);return this.draw(f),f}linearPath(d,r){const s=this.gen.linearPath(d,r);return this.draw(s),s}polygon(d,r){const s=this.gen.polygon(d,r);return this.draw(s),s}arc(d,r,s,u,f,c,o=!1,g){const _=this.gen.arc(d,r,s,u,f,c,o,g);return this.draw(_),_}curve(d,r){const s=this.gen.curve(d,r);return this.draw(s),s}path(d,r){const s=this.gen.path(d,r);return this.draw(s),s}}const hs="http://www.w3.org/2000/svg";class H2{constructor(d,r){this.svg=d,this.gen=new ws(r)}draw(d){const r=d.sets||[],s=d.options||this.getDefaultOptions(),u=this.svg.ownerDocument||window.document,f=u.createElementNS(hs,"g"),c=d.options.fixedDecimalPlaceDigits;for(const o of r){let g=null;switch(o.type){case"path":g=u.createElementNS(hs,"path"),g.setAttribute("d",this.opsToPath(o,c)),g.setAttribute("stroke",s.stroke),g.setAttribute("stroke-width",s.strokeWidth+""),g.setAttribute("fill","none"),s.strokeLineDash&&g.setAttribute("stroke-dasharray",s.strokeLineDash.join(" ").trim()),s.strokeLineDashOffset&&g.setAttribute("stroke-dashoffset",`${s.strokeLineDashOffset}`);break;case"fillPath":g=u.createElementNS(hs,"path"),g.setAttribute("d",this.opsToPath(o,c)),g.setAttribute("stroke","none"),g.setAttribute("stroke-width","0"),g.setAttribute("fill",s.fill||""),d.shape!=="curve"&&d.shape!=="polygon"||g.setAttribute("fill-rule","evenodd");break;case"fillSketch":g=this.fillSketch(u,o,s)}g&&f.appendChild(g)}return f}fillSketch(d,r,s){let u=s.fillWeight;u<0&&(u=s.strokeWidth/2);const f=d.createElementNS(hs,"path");return f.setAttribute("d",this.opsToPath(r,s.fixedDecimalPlaceDigits)),f.setAttribute("stroke",s.fill||""),f.setAttribute("stroke-width",u+""),f.setAttribute("fill","none"),s.fillLineDash&&f.setAttribute("stroke-dasharray",s.fillLineDash.join(" ").trim()),s.fillLineDashOffset&&f.setAttribute("stroke-dashoffset",`${s.fillLineDashOffset}`),f}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(d,r){return this.gen.opsToPath(d,r)}line(d,r,s,u,f){const c=this.gen.line(d,r,s,u,f);return this.draw(c)}rectangle(d,r,s,u,f){const c=this.gen.rectangle(d,r,s,u,f);return this.draw(c)}ellipse(d,r,s,u,f){const c=this.gen.ellipse(d,r,s,u,f);return this.draw(c)}circle(d,r,s,u){const f=this.gen.circle(d,r,s,u);return this.draw(f)}linearPath(d,r){const s=this.gen.linearPath(d,r);return this.draw(s)}polygon(d,r){const s=this.gen.polygon(d,r);return this.draw(s)}arc(d,r,s,u,f,c,o=!1,g){const _=this.gen.arc(d,r,s,u,f,c,o,g);return this.draw(_)}curve(d,r){const s=this.gen.curve(d,r);return this.draw(s)}path(d,r){const s=this.gen.path(d,r);return this.draw(s)}}var L2={canvas:(p,d)=>new B2(p,d),svg:(p,d)=>new H2(p,d),generator:p=>new ws(p),newSeed:()=>ws.newSeed()};function G2({canvas:p,scene:d,currentTime:r,theme:s,selectedElementId:u,interactiveMode:f=!1}){const c=p.getContext("2d");if(!c)return;const o=p.width,g=p.height,_=Bl[s]||Bl.whiteboard;if(c.save(),c.fillStyle=_.background,c.fillRect(0,0,o,g),_.paperGrid){c.strokeStyle=s==="blueprint"?"rgba(255, 255, 255, 0.08)":"rgba(0, 0, 0, 0.04)",c.lineWidth=1;const m=40;c.beginPath();for(let v=0;v<=o;v+=m)c.moveTo(v,0),c.lineTo(v,g);for(let v=0;v<=g;v+=m)c.moveTo(0,v),c.lineTo(o,v);c.stroke()}const b=L2.canvas(p);[...d.elements].sort((m,v)=>(m.order||0)-(v.order||0)).forEach(m=>{const v=m.triggerTimeSec||0,A=(m.durationMs||500)/1e3;let S=1;if(!f){if(r<v)return;S=Math.min(1,Math.max(0,(r-v)/A))}if(c.save(),m.animation==="pop"){const k=S<.8?S*1.3:1+(1-S)*.2;c.translate(m.x+m.width/2,m.y+m.height/2),c.scale(k,k),c.translate(-(m.x+m.width/2),-(m.y+m.height/2))}else if(m.animation==="slide"){const k=(1-S)*80;c.translate(0,k),c.globalAlpha=S}else m.animation==="fade"?c.globalAlpha=S:m.animation==="draw"&&(c.globalAlpha=Math.min(1,S*1.5));m.rotation&&(c.translate(m.x+m.width/2,m.y+m.height/2),c.rotate(m.rotation*Math.PI/180),c.translate(-(m.x+m.width/2),-(m.y+m.height/2)));const N=s==="whiteboard"||s==="chalkboard",T={roughness:N?m.roughness||1.4:.2,bowing:N?1.5:.2,stroke:m.color||_.primaryColor,strokeWidth:m.strokeWidth||2.5};switch(m.fillStyle&&m.fillStyle!=="none"&&m.fillColor&&(T.fill=m.fillColor,T.fillStyle=m.fillStyle),m.type){case"rectangle":b.rectangle(m.x,m.y,m.width,m.height,T),m.label&&ta(c,m.label,m.x+m.width/2,m.y+m.height/2,_,m.color);break;case"circle":{const k=Math.min(m.width,m.height)/2;b.circle(m.x+k,m.y+k,k*2,T),m.label&&ta(c,m.label,m.x+k,m.y+k,_,m.color);break}case"arrow":case"curved_arrow":{const k=m.x,j=m.y,U=m.x+m.width,B=m.y+m.height;if(m.type==="curved_arrow"){const I=(k+U)/2,ut=Math.min(j,B)-30;b.curve([[k,j],[I,ut],[U,B]],T)}else b.line(k,j,U,B,T);const W=Math.atan2(B-j,U-k),X=16,Q=Math.PI/6;b.line(U,B,U-X*Math.cos(W-Q),B-X*Math.sin(W-Q),T),b.line(U,B,U-X*Math.cos(W+Q),B-X*Math.sin(W+Q),T),m.label&&ta(c,m.label,(k+U)/2,(j+B)/2-14,_,m.color,14);break}case"browser_window":{q2(b,c,m,_,T);break}case"terminal_window":{Y2(b,c,m,_,T,S);break}case"phone_mockup":{V2(b,c,m,_,T);break}case"server":{Z2(b,c,m,_,T);break}case"database":{X2(b,c,m,_,T);break}case"client":{Q2(b,c,m,_,T);break}case"cloud":{K2(b,c,m,_,T);break}case"api_gateway":{J2(b,c,m,_,T);break}case"code_block":{W2(b,c,m,_,T,S);break}case"text":{c.font=`600 ${m.height||28}px ${_.fontFamily}`,c.fillStyle=m.color||_.textColor,c.textAlign="left",c.textBaseline="top";const k=(m.label||"").split(`+`);k.forEach((j,U)=>{c.fillText(j,m.x,m.y+U*((m.height||28)*1.3))}),m.subtext&&(c.font=`400 16px ${_.fontFamily}`,c.fillStyle=s==="darktech"?"#94a3b8":"#64748b",c.fillText(m.subtext,m.x,m.y+k.length*((m.height||28)*1.3)+4));break}case"badge":{b.rectangle(m.x,m.y,m.width,m.height,{...T,fill:m.fillColor||`${m.color}22`,fillStyle:"solid"}),ta(c,m.label||"Step",m.x+m.width/2,m.y+m.height/2,_,m.color,14);break}case"checkmark":{b.circle(m.x+m.width/2,m.y+m.height/2,m.width,{...T,fill:"#10b98122",fillStyle:"solid",stroke:"#10b981"}),b.line(m.x+m.width*.25,m.y+m.height*.5,m.x+m.width*.45,m.y+m.height*.72,{stroke:"#10b981",strokeWidth:3.5}),b.line(m.x+m.width*.45,m.y+m.height*.72,m.x+m.width*.78,m.y+m.height*.28,{stroke:"#10b981",strokeWidth:3.5});break}case"icon":{I2(b,c,m,_,T);break}default:b.rectangle(m.x,m.y,m.width,m.height,T),m.label&&ta(c,m.label,m.x+m.width/2,m.y+m.height/2,_,m.color)}u===m.id&&(c.strokeStyle="#38bdf8",c.lineWidth=1.5,c.setLineDash([5,4]),c.strokeRect(m.x-6,m.y-6,m.width+12,m.height+12),c.setLineDash([]),c.fillStyle="#38bdf8",[[m.x-9,m.y-9],[m.x+m.width+3,m.y-9],[m.x-9,m.y+m.height+3],[m.x+m.width+3,m.y+m.height+3]].forEach(([j,U])=>{c.fillRect(j,U,6,6)})),c.restore()}),c.restore()}function ta(p,d,r,s,u,f,c=18){p.save(),p.font=`600 ${c}px ${u.fontFamily}`,p.fillStyle=f||u.textColor,p.textAlign="center",p.textBaseline="middle",p.fillText(d,r,s),p.restore()}function q2(p,d,r,s,u){p.rectangle(r.x,r.y,r.width,r.height,{...u,fill:s.background==="#090d16"?"#0f172a":"#ffffff",fillStyle:"solid"}),p.rectangle(r.x,r.y,r.width,36,{...u,fill:s.background==="#090d16"?"#1e293b":"#f1f5f9",fillStyle:"solid"});const f=r.y+18;p.circle(r.x+18,f,9,{stroke:"#ef4444",fill:"#ef4444",fillStyle:"solid"}),p.circle(r.x+36,f,9,{stroke:"#f59e0b",fill:"#f59e0b",fillStyle:"solid"}),p.circle(r.x+54,f,9,{stroke:"#10b981",fill:"#10b981",fillStyle:"solid"});const c=r.x+80,o=r.width-96;p.rectangle(c,r.y+7,o,22,{stroke:"#94a3b8",strokeWidth:1,fill:s.background==="#090d16"?"#020617":"#ffffff",fillStyle:"solid"}),d.font='500 11px "JetBrains Mono", monospace',d.fillStyle="#64748b",d.textAlign="left",d.textBaseline="middle",d.fillText(r.url||"https://api.example.com/v1/auth",c+8,r.y+18),r.label&&ta(d,r.label,r.x+r.width/2,r.y+36+(r.height-36)/2,s,r.color,16)}function Y2(p,d,r,s,u,f){p.rectangle(r.x,r.y,r.width,r.height,{...u,fill:"#0f172a",fillStyle:"solid",stroke:"#334155"}),p.rectangle(r.x,r.y,r.width,30,{fill:"#1e293b",fillStyle:"solid",stroke:"#334155"});const c=r.y+15;p.circle(r.x+16,c,8,{stroke:"#ef4444",fill:"#ef4444",fillStyle:"solid"}),p.circle(r.x+32,c,8,{stroke:"#f59e0b",fill:"#f59e0b",fillStyle:"solid"}),p.circle(r.x+48,c,8,{stroke:"#10b981",fill:"#10b981",fillStyle:"solid"}),d.font='600 13px "JetBrains Mono", monospace',d.fillStyle="#38bdf8",d.textAlign="left",d.textBaseline="top";const o=r.label||'git commit -m "feat: core architecture"',g=o.length,_=Math.floor(g*f),b=o.slice(0,_);d.fillText(`$ ${b}${f<1?"▋":""}`,r.x+16,r.y+44),f>.7&&r.subtext&&(d.fillStyle="#10b981",d.fillText(`✓ ${r.subtext}`,r.x+16,r.y+70))}function V2(p,d,r,s,u){p.rectangle(r.x,r.y,r.width,r.height,{...u,fill:s.background==="#090d16"?"#0f172a":"#ffffff",fillStyle:"solid"}),p.rectangle(r.x+r.width/2-24,r.y+6,48,8,{fill:"#1e293b",fillStyle:"solid",stroke:"#1e293b"}),r.label&&ta(d,r.label,r.x+r.width/2,r.y+r.height/2,s,r.color,15)}function Z2(p,d,r,s,u){const f=r.height/3;for(let c=0;c<3;c++){const o=r.y+c*f;p.rectangle(r.x,o,r.width,f-4,{...u,fill:s.background==="#090d16"?"#1e293b":"#f8fafc",fillStyle:"solid"}),p.circle(r.x+14,o+f/2-2,5,{stroke:"#10b981",fill:"#10b981",fillStyle:"solid"}),p.circle(r.x+26,o+f/2-2,5,{stroke:"#38bdf8",fill:"#38bdf8",fillStyle:"solid"}),p.line(r.x+45,o+f/2-2,r.x+r.width-15,o+f/2-2,{stroke:"#94a3b8",strokeWidth:1.5})}r.label&&ta(d,r.label,r.x+r.width/2,r.y+r.height+16,s,r.color,14)}function X2(p,d,r,s,u){p.rectangle(r.x,r.y+22/2,r.width,r.height-22,{...u,fill:s.background==="#090d16"?"#1e293b":"#f8fafc",fillStyle:"solid"}),p.ellipse(r.x+r.width/2,r.y+22/2,r.width,22,u),p.ellipse(r.x+r.width/2,r.y+r.height-22/2,r.width,22,u),r.label&&ta(d,r.label,r.x+r.width/2,r.y+r.height/2,s,r.color,15)}function Q2(p,d,r,s,u){const f=r.height*.75;p.rectangle(r.x+10,r.y,r.width-20,f,{...u,fill:s.background==="#090d16"?"#0f172a":"#ffffff",fillStyle:"solid"}),p.rectangle(r.x,r.y+f,r.width,r.height-f,{...u,fill:"#334155",fillStyle:"solid"}),r.label&&ta(d,r.label,r.x+r.width/2,r.y+f/2,s,r.color,14)}function K2(p,d,r,s,u){const f=r.x+r.width/2,c=r.y+r.height/2,o=r.width,g=r.height;p.circle(f-o*.22,c+g*.05,g*.7,u),p.circle(f+o*.22,c+g*.05,g*.7,u),p.circle(f,c-g*.15,g*.85,u),r.label&&ta(d,r.label,f,c,s,r.color,15)}function J2(p,d,r,s,u){const f=r.x+r.width/2,c=r.y+r.height/2,o=Math.min(r.width,r.height)/2,g=[];for(let _=0;_<6;_++){const b=_*Math.PI/3-Math.PI/6;g.push([f+o*Math.cos(b),c+o*Math.sin(b)])}p.polygon(g,{...u,fill:s.background==="#090d16"?"#1e293b":"#f8fafc",fillStyle:"solid"}),ta(d,r.label||"API Gateway",f,c,s,r.color,14)}function W2(p,d,r,s,u,f){p.rectangle(r.x,r.y,r.width,r.height,{...u,fill:"#020617",fillStyle:"solid",stroke:"#1e293b"}),d.font='500 12px "JetBrains Mono", monospace',d.fillStyle="#f1f5f9",d.textAlign="left",d.textBaseline="top";const o=(r.codeSnippet||r.label||`const express = require("express");+app.listen(3000);`).split(`+`),g=Math.ceil(o.length*f);o.slice(0,g).forEach((_,b)=>{d.fillStyle="#64748b",d.fillText(`${b+1}`,r.x+8,r.y+12+b*18),d.fillStyle=_.includes("const")||_.includes("function")?"#38bdf8":_.includes("return")?"#a855f7":"#e2e8f0",d.fillText(_,r.x+32,r.y+12+b*18)})}function I2(p,d,r,s,u){const f=r.iconName||"shield",c=r.x+r.width/2,o=r.y+r.height/2,g=Math.min(r.width,r.height);p.circle(c,o,g,{...u,fill:`${r.color}15`,fillStyle:"solid"}),d.save(),d.font=`700 ${g*.45}px "Plus Jakarta Sans", sans-serif`,d.fillStyle=r.color,d.textAlign="center",d.textBaseline="middle";const _={shield:"🛡️",lock:"🔒",server:"🖥️",database:"💾",cloud:"☁️",globe:"🌐",key:"🔑",user:"👤",rocket:"🚀",zap:"⚡",check:"✅",alert:"⚠️"};d.fillText(_[f]||"⚡",c,o-2),d.restore(),r.label&&ta(d,r.label,c,r.y+r.height+16,s,r.color,14)}class F2{constructor(){xe(this,"ctx",null);xe(this,"musicGain",null);xe(this,"sfxGain",null);xe(this,"masterGain",null);xe(this,"isMusicPlaying",!1);xe(this,"musicInterval",null);xe(this,"currentTrack","lofi");xe(this,"speechUtterance",null);xe(this,"wordListeners",new Set);xe(this,"currentWordIndex",-1);xe(this,"currentSpokenWord","");xe(this,"fallbackWordTimer",null);xe(this,"hasReceivedNativeBoundary",!1);xe(this,"customAudio",null)}getCurrentTrack(){return this.currentTrack}isSpeaking(){return!!this.speechUtterance}addWordListener(d){if(this.wordListeners.add(d),this.currentWordIndex>=0)try{d(this.currentSpokenWord,0,this.currentWordIndex)}catch{}return()=>{this.wordListeners.delete(d)}}notifyWord(d,r,s){this.currentSpokenWord=d,this.currentWordIndex=s,this.wordListeners.forEach(u=>{try{u(d,r,s)}catch(f){console.error("Error in word listener:",f)}})}getCurrentWord(){return{word:this.currentSpokenWord,index:this.currentWordIndex}}initContext(){if(!this.ctx){const d=window.AudioContext||window.webkitAudioContext;this.ctx=new d,this.masterGain=this.ctx.createGain(),this.masterGain.gain.setValueAtTime(.9,this.ctx.currentTime),this.masterGain.connect(this.ctx.destination),this.musicGain=this.ctx.createGain(),this.musicGain.gain.setValueAtTime(.25,this.ctx.currentTime),this.musicGain.connect(this.masterGain),this.sfxGain=this.ctx.createGain(),this.sfxGain.gain.setValueAtTime(.4,this.ctx.currentTime),this.sfxGain.connect(this.masterGain)}this.ctx.state==="suspended"&&this.ctx.resume().catch(()=>{})}playPop(){try{if(this.initContext(),!this.ctx||!this.sfxGain)return;const d=this.ctx.currentTime,r=this.ctx.createOscillator(),s=this.ctx.createGain();r.type="sine",r.frequency.setValueAtTime(320,d),r.frequency.exponentialRampToValueAtTime(740,d+.08),s.gain.setValueAtTime(.3,d),s.gain.exponentialRampToValueAtTime(.001,d+.09),r.connect(s),s.connect(this.sfxGain),r.start(d),r.stop(d+.1)}catch{}}playWhoosh(){try{if(this.initContext(),!this.ctx||!this.sfxGain)return;const d=this.ctx.currentTime,r=this.ctx.sampleRate*.2,s=this.ctx.createBuffer(1,r,this.ctx.sampleRate),u=s.getChannelData(0);for(let g=0;g<r;g++)u[g]=(Math.random()*2-1)*.3;const f=this.ctx.createBufferSource();f.buffer=s;const c=this.ctx.createBiquadFilter();c.type="bandpass",c.frequency.setValueAtTime(400,d),c.frequency.exponentialRampToValueAtTime(1400,d+.1),c.frequency.exponentialRampToValueAtTime(300,d+.2),c.Q.value=3;const o=this.ctx.createGain();o.gain.setValueAtTime(.01,d),o.gain.linearRampToValueAtTime(.2,d+.08),o.gain.exponentialRampToValueAtTime(.001,d+.2),f.connect(c),c.connect(o),o.connect(this.sfxGain),f.start(d),f.stop(d+.2)}catch{}}playDrawChime(){try{if(this.initContext(),!this.ctx||!this.sfxGain)return;const d=this.ctx.currentTime;[523.25,659.25,783.99].forEach((s,u)=>{const f=this.ctx.createOscillator(),c=this.ctx.createGain();f.type="triangle",f.frequency.setValueAtTime(s,d+u*.04),c.gain.setValueAtTime(.12,d+u*.04),c.gain.exponentialRampToValueAtTime(.001,d+u*.04+.25),f.connect(c),c.connect(this.sfxGain),f.start(d+u*.04),f.stop(d+u*.04+.28)})}catch{}}setDucking(d){if(!this.ctx||!this.musicGain)return;const r=this.ctx.currentTime,s=d?.08:.25;this.musicGain.gain.cancelScheduledValues(r),this.musicGain.gain.linearRampToValueAtTime(s,r+.25)}startMusic(d="lofi"){this.initContext(),this.stopMusic(),this.currentTrack=d,this.isMusicPlaying=!0;const r={lofi:[[261.63,329.63,392,493.88],[220,261.63,329.63,392],[174.61,220,261.63,329.63],[196,246.94,293.66,349.23]],tech:[[130.81,196,261.63,392],[110,164.81,220,329.63],[146.83,220,293.66,440],[123.47,185,246.94,370]],acoustic:[[261.63,329.63,392],[196,246.94,293.66],[220,261.63,329.63],[174.61,220,261.63]]},s=r[d]||r.lofi;let u=0;const f=()=>{if(!this.isMusicPlaying||!this.ctx||!this.musicGain)return;const c=s[u%s.length];u++;const o=this.ctx.currentTime;c.forEach((g,_)=>{const b=this.ctx.createOscillator(),x=this.ctx.createGain();b.type=d==="tech"?"sawtooth":"sine",b.frequency.setValueAtTime(g,o);const m=this.ctx.createBiquadFilter();m.type="lowpass",m.frequency.setValueAtTime(d==="tech"?1200:700,o),x.gain.setValueAtTime(.02,o),x.gain.linearRampToValueAtTime(.08,o+.6+_*.05),x.gain.exponentialRampToValueAtTime(.005,o+3.2),b.connect(m),m.connect(x),x.connect(this.musicGain),b.start(o),b.stop(o+3.3)})};f(),this.musicInterval=window.setInterval(f,3200)}stopMusic(){this.isMusicPlaying=!1,this.musicInterval&&(clearInterval(this.musicInterval),this.musicInterval=null)}speakNarration(d,r,s,u=1,f=1){if(!("speechSynthesis"in window)){s&&s();return}if(this.stopSpeaking(),this.setDucking(!0),!d||!d.trim()){s&&s();return}const c=d.trim(),o=c.split(/\s+/).filter(Boolean),g=new SpeechSynthesisUtterance(c);g.rate=Math.max(.7,Math.min(1.5,u)),g.pitch=Math.max(.8,Math.min(1.3,f));const _=window.speechSynthesis.getVoices(),b=_.find(v=>(v.name.includes("Natural")||v.name.includes("Google")||v.name.includes("Siri")||v.name.includes("Samantha")||v.name.includes("Daniel"))&&v.lang.startsWith("en"))||_.find(v=>v.lang.startsWith("en"));b&&(g.voice=b),this.hasReceivedNativeBoundary=!1;let x=0;const m=Math.max(150,Math.round(1e3/(2.6*g.rate)));this.fallbackWordTimer=window.setInterval(()=>{if(this.hasReceivedNativeBoundary){this.fallbackWordTimer&&(clearInterval(this.fallbackWordTimer),this.fallbackWordTimer=null);return}if(x<o.length){const v=o[x];r&&r(v,0,x),this.notifyWord(v,0,x),x++}},m),g.onboundary=v=>{if(v.name==="word"){this.hasReceivedNativeBoundary=!0,this.fallbackWordTimer&&(clearInterval(this.fallbackWordTimer),this.fallbackWordTimer=null);const A=v.charIndex,N=c.slice(A).match(/^[\w'-]+/),T=N?N[0]:v.charLength?c.substring(A,A+v.charLength):"",k=c.slice(0,A),U=(k.trim()?k.trim().split(/\s+/).filter(Boolean):[]).length;r&&r(T,A,U),this.notifyWord(T,A,U)}},g.onend=()=>{this.fallbackWordTimer&&(clearInterval(this.fallbackWordTimer),this.fallbackWordTimer=null),this.setDucking(!1),this.speechUtterance=null,this.notifyWord("",-1,-1),s&&s()},g.onerror=()=>{this.fallbackWordTimer&&(clearInterval(this.fallbackWordTimer),this.fallbackWordTimer=null),this.setDucking(!1),this.speechUtterance=null,this.notifyWord("",-1,-1),s&&s()},this.speechUtterance=g,window.speechSynthesis.speak(g)}playCustomAudio(d,r){this.stopSpeaking(),this.setDucking(!0),this.customAudio&&(this.customAudio.pause(),this.customAudio=null);const s=new Audio(d);s.onended=()=>{this.setDucking(!1),this.customAudio=null,this.notifyWord("",-1,-1),r&&r()},s.onerror=()=>{this.setDucking(!1),this.customAudio=null,this.notifyWord("",-1,-1),r&&r()},this.customAudio=s,s.play().catch(()=>{})}stopCustomAudio(){this.customAudio&&(this.customAudio.pause(),this.customAudio.currentTime=0,this.customAudio=null),this.setDucking(!1),this.notifyWord("",-1,-1)}stopSpeaking(){this.fallbackWordTimer&&(clearInterval(this.fallbackWordTimer),this.fallbackWordTimer=null),"speechSynthesis"in window&&window.speechSynthesis.cancel(),this.speechUtterance=null,this.notifyWord("",-1,-1),this.stopCustomAudio(),this.setDucking(!1)}stopAll(){this.stopSpeaking(),this.stopCustomAudio(),this.stopMusic(),this.notifyWord("",-1,-1)}}const Qt=new F2,$2=({scene:p,theme:d,selectedElementId:r,onSelectElement:s,onUpdateElementPosition:u,currentSceneIndex:f,totalScenes:c,onPrevScene:o,onNextScene:g,musicTrack:_,voiceRate:b,voicePitch:x})=>{const m=Dt.useRef(null),v=Dt.useRef(null),[A,S]=Dt.useState(!1),[N,T]=Dt.useState(0),[k,j]=Dt.useState(1),[U,B]=Dt.useState(!1),[W,X]=Dt.useState(!0),[Q,I]=Dt.useState(!1),[ut,vt]=Dt.useState(!0),[R,P]=Dt.useState(-1);Dt.useEffect(()=>{const ft=Qt.addWordListener((St,pt,_t)=>{P(_t)});return()=>ft()},[]);const[w,it]=Dt.useState(null),[G,L]=Dt.useState({x:0,y:0}),rt=p.durationSeconds||7,nt=Dt.useCallback((ft,St)=>{const pt=m.current;pt&&G2({canvas:pt,scene:p,currentTime:ft,theme:d,selectedElementId:St,interactiveMode:!A})},[p,d,A]);Dt.useEffect(()=>{nt(N,r)},[nt,N,r]),Dt.useEffect(()=>{T(0),P(-1)},[p.id]);const mt=Dt.useRef(0);mt.current=N,Dt.useEffect(()=>{let ft,St=null;if(A){W&&Qt.startMusic(_),U||(p.customAudioUrl?Qt.playCustomAudio(p.customAudioUrl):p.narration&&Qt.speakNarration(p.narration,(_t,Ht,y)=>{P(y)},()=>{P(-1)},b,x));const pt=_t=>{St||(St=_t);const Ht=(_t-St)/1e3;St=_t;const y=mt.current+Ht*k;if(y>=rt)if(f<c-1)T(0),P(-1),g();else{T(rt),S(!1),P(-1),Qt.stopSpeaking();return}else T(y);ft=requestAnimationFrame(pt)};ft=requestAnimationFrame(pt)}else P(-1),Qt.stopSpeaking();return()=>{ft&&cancelAnimationFrame(ft),P(-1),Qt.stopSpeaking()}},[A,k,rt,f,c,g,W,_,U,p.narration,b,x]);const $=()=>{N>=rt&&T(0),S(ft=>!ft)},et=()=>{S(!1),T(0),P(-1),Qt.stopSpeaking(),Qt.playWhoosh()},kt=ft=>{const St=parseFloat(ft.target.value);T(St),A||P(-1)},M=(ft,St)=>{const pt=m.current;if(!pt)return{x:0,y:0};const _t=pt.getBoundingClientRect(),Ht=pt.width/_t.width,y=pt.height/_t.height;return{x:(ft-_t.left)*Ht,y:(St-_t.top)*y}},K=ft=>{if(A)return;const{x:St,y:pt}=M(ft.clientX,ft.clientY),Ht=[...p.elements].reverse().find(y=>St>=y.x&&St<=y.x+y.width&&pt>=y.y&&pt<=y.y+y.height);Ht?(s(Ht.id),it(Ht.id),L({x:St-Ht.x,y:pt-Ht.y}),Qt.playPop()):(s(null),it(null))},xt=ft=>{if(!w||A)return;const{x:St,y:pt}=M(ft.clientX,ft.clientY),_t=Math.round(St-G.x),Ht=Math.round(pt-G.y);u(w,_t,Ht)},wt=()=>{it(null)},Nt=()=>{var ft;document.fullscreenElement?(document.exitFullscreen().catch(()=>{}),I(!1)):((ft=v.current)==null||ft.requestFullscreen().catch(()=>{}),I(!0))};return E.jsxs("div",{ref:v,className:"flex flex-col bg-slate-950 border border-slate-800 rounded-2xl overflow-hidden shadow-2xl relative select-none",children:[E.jsxs("div",{className:"relative w-full aspect-video bg-slate-950 flex items-center justify-center overflow-hidden",children:[E.jsx("canvas",{ref:m,width:1280,height:720,onPointerDown:K,onPointerMove:xt,onPointerUp:wt,className:"w-full h-full object-contain cursor-crosshair touch-none",title:"Click or drag elements on the canvas to position them"}),!A&&N===0&&E.jsx("button",{onClick:$,className:"absolute inset-0 flex items-center justify-center bg-slate-950/20 hover:bg-slate-950/30 transition-colors group cursor-pointer",children:E.jsx("div",{className:"w-16 h-16 rounded-full bg-amber-500 hover:bg-amber-400 text-slate-950 flex items-center justify-center shadow-[0_0_30px_rgba(245,158,11,0.5)] group-hover:scale-110 transition-transform",children:E.jsx(lm,{className:"w-7 h-7 fill-slate-950 ml-1"})})}),E.jsxs("div",{className:"absolute top-3 left-4 bg-slate-900/90 backdrop-blur border border-slate-700/80 px-2.5 py-1 rounded-md text-[11px] font-mono text-slate-300 pointer-events-none",children:["Scene ",f+1," / ",c," · ",p.title]}),ut&&p.narration&&E.jsx("div",{className:"absolute bottom-4 inset-x-0 flex justify-center pointer-events-none z-20 px-4",children:E.jsx("div",{className:"inline-flex items-center px-4 py-2 rounded-2xl bg-slate-950/90 backdrop-blur-md border border-slate-700/80 shadow-[0_4px_24px_rgba(0,0,0,0.7)] text-center max-w-[90%]",children:E.jsx("p",{className:"text-xs sm:text-sm font-semibold tracking-wide text-slate-300 flex flex-wrap justify-center items-center gap-1.5 leading-relaxed",children:(()=>{const ft=p.narration.split(/\s+/).filter(Boolean);if(ft.length===0)return null;const St=Math.min(.999,Math.max(0,N/Math.max(.1,rt))),pt=Math.min(ft.length-1,Math.floor(St*ft.length)),_t=A&&R>=0&&R<ft.length?R:pt,Ht=Math.min(ft.length,7),y=Math.floor(Ht/2);let st=Math.max(0,_t-y),lt=Math.min(ft.length,st+Ht);return lt-st<Ht&&(st=Math.max(0,lt-Ht)),ft.slice(st,lt).map((O,C)=>{const q=st+C,dt=q===_t,ht=q<_t;return E.jsx("span",{className:`inline-block px-1.5 py-0.5 rounded transition-all duration-150 ${dt?"bg-amber-400 text-slate-950 font-black scale-110 shadow-[0_0_16px_rgba(251,191,36,0.9)] ring-2 ring-amber-300":ht?"text-slate-400 font-medium":"text-slate-200 font-medium"}`,children:O},q)})})()})})})]}),E.jsxs("div",{className:"bg-slate-900/95 border-t border-slate-800 p-3 sm:px-5 flex flex-col gap-2",children:[E.jsxs("div",{className:"flex items-center gap-3",children:[E.jsxs("span",{className:"text-[11px] font-mono tabular-nums text-slate-400 w-12 text-right",children:[N.toFixed(1),"s"]}),E.jsxs("div",{className:"flex-1 relative flex items-center",children:[E.jsx("input",{type:"range",min:0,max:rt,step:.05,value:N,onChange:kt,className:"w-full h-1.5 bg-slate-800 rounded-lg appearance-none cursor-pointer accent-amber-400 hover:accent-amber-300"}),E.jsx("div",{className:"absolute inset-x-0 -bottom-3 flex justify-between pointer-events-none px-1",children:p.elements.map(ft=>{var pt;const St=(ft.triggerTimeSec||0)/rt*100;return E.jsx("div",{style:{left:`${St}%`},className:"absolute -top-1 w-1.5 h-1.5 rounded-full bg-cyan-400",title:`"${ft.label||ft.type}" triggers at ${(pt=ft.triggerTimeSec)==null?void 0:pt.toFixed(1)}s`},ft.id)})})]}),E.jsxs("span",{className:"text-[11px] font-mono tabular-nums text-slate-400 w-12",children:[rt.toFixed(1),"s"]})]}),p.elements.length>0&&E.jsxs("div",{className:"flex items-center gap-1.5 overflow-x-auto py-0.5 text-[10px] scrollbar-none",children:[E.jsx("span",{className:"text-[9px] font-bold text-slate-500 uppercase tracking-widest shrink-0",children:"Cues:"}),p.elements.map(ft=>{const St=ft.triggerTimeSec||0,pt=N>=St,_t=r===ft.id;return E.jsxs("button",{onClick:()=>{T(St),s(ft.id)},className:`px-2 py-0.5 rounded-md border flex items-center gap-1 shrink-0 transition-colors cursor-pointer text-[10px] ${_t?"bg-cyan-500/20 border-cyan-400 text-cyan-300 font-semibold":pt?"bg-slate-800/90 border-slate-750 text-slate-200":"bg-slate-950/70 border-slate-800 text-slate-500 hover:text-slate-300"}`,title:`Jump to ${ft.label||ft.type} (${St.toFixed(1)}s)`,children:[E.jsx("span",{className:"w-1.5 h-1.5 rounded-full shrink-0",style:{backgroundColor:ft.color||"#38bdf8"}}),E.jsx("span",{className:"truncate max-w-[100px]",children:ft.label||ft.type}),E.jsxs("span",{className:"font-mono text-[9px] opacity-60",children:[St.toFixed(1),"s"]})]},ft.id)})]}),E.jsxs("div",{className:"flex items-center justify-between flex-wrap gap-2 pt-1",children:[E.jsxs("div",{className:"flex items-center gap-1.5 sm:gap-2",children:[E.jsx("button",{onClick:o,disabled:f===0,className:"p-1.5 rounded-lg text-slate-400 hover:text-white disabled:opacity-40 hover:bg-slate-800 transition-colors cursor-pointer",title:"Previous Scene",children:E.jsx(vm,{className:"w-4 h-4"})}),E.jsx("button",{onClick:$,className:"p-2 rounded-xl bg-amber-400 hover:bg-amber-300 text-slate-950 font-bold transition-transform active:scale-95 cursor-pointer shadow-[0_0_15px_rgba(251,191,36,0.3)]",title:A?"Pause (Space)":"Play (Space)",children:A?E.jsx(Yy,{className:"w-4 h-4 fill-slate-950"}):E.jsx(lm,{className:"w-4 h-4 fill-slate-950 ml-0.5"})}),E.jsx("button",{onClick:g,disabled:f>=c-1,className:"p-1.5 rounded-lg text-slate-400 hover:text-white disabled:opacity-40 hover:bg-slate-800 transition-colors cursor-pointer",title:"Next Scene",children:E.jsx(bm,{className:"w-4 h-4"})}),E.jsx("button",{onClick:et,className:"p-1.5 rounded-lg text-slate-400 hover:text-white hover:bg-slate-800 transition-colors cursor-pointer ml-1",title:"Rewind to start",children:E.jsx(_m,{className:"w-3.5 h-3.5"})})]}),E.jsxs("div",{className:"flex items-center gap-2 sm:gap-3 text-xs",children:[E.jsx("button",{onClick:()=>vt(ft=>!ft),className:`px-1.5 py-0.5 rounded-md border font-mono text-[10px] font-bold tracking-wider transition-colors cursor-pointer ${ut?"bg-amber-400/20 border-amber-400/50 text-amber-300":"bg-slate-950 border-slate-800 text-slate-500 hover:text-slate-400"}`,title:ut?"Live Subtitles Enabled (CC)":"Live Subtitles Disabled",children:"CC"}),E.jsx("div",{className:"flex items-center gap-0.5 bg-slate-950 px-1 py-0.5 rounded-md border border-slate-800 font-mono text-[11px]",children:[.75,1,1.25].map(ft=>E.jsxs("button",{onClick:()=>j(ft),className:`px-1.5 py-0.5 rounded cursor-pointer ${k===ft?"bg-amber-400/20 text-amber-300 font-bold":"text-slate-400 hover:text-white"}`,children:[ft,"x"]},ft))}),E.jsx("button",{onClick:()=>B(ft=>!ft),className:`p-1.5 rounded-lg border transition-colors cursor-pointer ${U?"bg-rose-500/10 border-rose-500/30 text-rose-400":"bg-slate-800 border-slate-700 text-slate-300 hover:text-white"}`,title:U?"Voiceover Muted":"Voiceover Active",children:U?E.jsx(v2,{className:"w-3.5 h-3.5"}):E.jsx(wm,{className:"w-3.5 h-3.5"})}),E.jsx("button",{onClick:()=>{W?(Qt.stopMusic(),X(!1)):(X(!0),A&&Qt.startMusic(_))},className:`p-1.5 rounded-lg border transition-colors cursor-pointer ${W?"bg-amber-500/15 border-amber-500/30 text-amber-300":"bg-slate-800 border-slate-700 text-slate-500"}`,title:W?"Music Enabled (Auto-Ducked)":"Music Disabled",children:E.jsx(Uy,{className:"w-3.5 h-3.5"})}),E.jsx("button",{onClick:Nt,className:"p-1.5 rounded-lg text-slate-400 hover:text-white hover:bg-slate-800 transition-colors cursor-pointer",title:"Toggle Fullscreen",children:Q?E.jsx(Oy,{className:"w-3.5 h-3.5"}):E.jsx(ky,{className:"w-3.5 h-3.5"})})]})]})]})]})},P2=({scenes:p,activeSceneIndex:d,onSelectScene:r,onAddScene:s,onDuplicateScene:u,onDeleteScene:f,onMoveScene:c})=>E.jsxs("div",{className:"bg-slate-900 border border-slate-800 rounded-2xl p-3 flex flex-col gap-2",children:[E.jsxs("div",{className:"flex items-center justify-between px-1 pb-1 border-b border-slate-800",children:[E.jsxs("div",{className:"flex items-center gap-1.5",children:[E.jsx(pc,{className:"w-3.5 h-3.5 text-amber-400"}),E.jsxs("h3",{className:"text-xs font-bold uppercase tracking-wider text-slate-200",children:["Scenes (",p.length,")"]})]}),E.jsxs("button",{onClick:s,className:"flex items-center gap-1 px-2 py-1 rounded-lg bg-slate-800 hover:bg-slate-700 text-slate-200 hover:text-white text-xs font-medium border border-slate-700/80 transition-colors cursor-pointer",title:"Add a new blank scene",children:[E.jsx(Xy,{className:"w-3.5 h-3.5 text-amber-400"}),E.jsx("span",{children:"New Scene"})]})]}),E.jsx("div",{className:"flex items-center gap-2 overflow-x-auto py-1 pr-1 scrollbar-thin",children:p.map((o,g)=>{const _=g===d;return E.jsxs("div",{onClick:()=>r(g),className:`min-w-[170px] max-w-[200px] flex-1 p-2.5 rounded-xl border transition-all cursor-pointer flex flex-col justify-between select-none ${_?"bg-amber-500/10 border-amber-400/80 ring-1 ring-amber-400 shadow-[0_0_15px_rgba(251,191,36,0.15)]":"bg-slate-950/70 border-slate-800 hover:border-slate-700 hover:bg-slate-950"}`,children:[E.jsxs("div",{children:[E.jsxs("div",{className:"flex items-center justify-between text-[10px] text-slate-400 mb-1",children:[E.jsxs("span",{className:"font-mono font-bold text-amber-400",children:["#",g+1]}),E.jsxs("span",{children:[o.durationSeconds||7,"s"]})]}),E.jsx("h4",{className:"text-xs font-bold text-slate-200 truncate",children:o.title||`Scene ${g+1}`}),E.jsx("p",{className:"text-[11px] text-slate-400 line-clamp-1 mt-0.5",children:o.narration||"No spoken narration yet"})]}),E.jsxs("div",{className:"flex items-center justify-between pt-2 mt-2 border-t border-slate-800/80 text-[10px] text-slate-400",children:[E.jsxs("span",{children:[o.elements.length," visuals"]}),E.jsxs("div",{className:"flex items-center gap-0.5",onClick:b=>b.stopPropagation(),children:[E.jsx("button",{disabled:g===0,onClick:()=>c(g,"prev"),className:"p-1 rounded text-slate-500 hover:text-white disabled:opacity-30",title:"Move left",children:E.jsx(vm,{className:"w-3 h-3"})}),E.jsx("button",{disabled:g===p.length-1,onClick:()=>c(g,"next"),className:"p-1 rounded text-slate-500 hover:text-white disabled:opacity-30",title:"Move right",children:E.jsx(bm,{className:"w-3 h-3"})}),E.jsx("button",{onClick:()=>u(g),className:"p-1 rounded text-slate-500 hover:text-cyan-400",title:"Duplicate scene",children:E.jsx(vs,{className:"w-3 h-3"})}),p.length>1&&E.jsx("button",{onClick:()=>f(g),className:"p-1 rounded text-slate-500 hover:text-rose-400",title:"Delete scene",children:E.jsx(_c,{className:"w-3 h-3"})})]})]})]},o.id)})})]}),tv=({scene:p,selectedElementId:d,onUpdateNarration:r,onUpdateElementTriggerWord:s,onUpdateCustomAudio:u,voiceRate:f,voicePitch:c})=>{const[o,g]=Dt.useState(!1),[_,b]=Dt.useState(!1),[x,m]=Dt.useState(-1);Dt.useEffect(()=>{const Q=Qt.addWordListener((I,ut,vt)=>{m(vt),vt<0&&b(!1)});return()=>Q()},[]);const v=p.narration.split(/\s+/).filter(Q=>Q.length>0).map(Q=>Q.replace(/[.,/#!$%^&*;:{}=\-_`~()?"']/g,"")),A=v.length,S=Math.max(3,Math.round(A/2.5)),N=p.elements.find(Q=>Q.id===d),T={};p.elements.forEach(Q=>{if(Q.triggerWord){const I=Q.triggerWord.toLowerCase().replace(/[^a-z0-9]/g,"");T[I]||(T[I]=[]),T[I].push(Q)}});const k=async()=>{if(p.narration)try{g(!0);const Q=await fetch("/api/explainroo/improve-script",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({text:p.narration,goal:"punchy and conversational"})});if(Q.ok){const I=await Q.json();I.improvedText&&(r(I.improvedText),Qt.playDrawChime())}}catch(Q){console.error("Failed to polish script:",Q)}finally{g(!1)}},j=Dt.useRef(null),U=Q=>{var vt;const I=(vt=Q.target.files)==null?void 0:vt[0];if(!I)return;const ut=URL.createObjectURL(I);u&&u(ut,I.name),Qt.playPop()},B=()=>{u&&u(void 0,void 0),Qt.stopCustomAudio(),b(!1)},W=()=>{_?(Qt.stopSpeaking(),b(!1),m(-1)):(b(!0),p.customAudioUrl?Qt.playCustomAudio(p.customAudioUrl,()=>{b(!1),m(-1)}):Qt.speakNarration(p.narration,(Q,I,ut)=>{m(ut)},()=>{b(!1),m(-1)},f,c))},X=Q=>{if(!N)return;const I=Q.toLowerCase();s(N.id,I),Qt.playPop()};return E.jsxs("div",{className:"bg-slate-900 border border-slate-800 rounded-2xl p-4 flex flex-col gap-3",children:[E.jsxs("div",{className:"flex items-center justify-between pb-2 border-b border-slate-800",children:[E.jsxs("div",{children:[E.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-slate-300",children:"Voiceover Script & Word Sync"}),E.jsx("p",{className:"text-[11px] text-slate-500",children:"Explainroo synchronizes your drawings with spoken words"})]}),E.jsxs("div",{className:"flex items-center gap-2",children:[E.jsxs("button",{onClick:W,className:`flex items-center gap-1 px-2.5 py-1 text-xs font-medium rounded-lg border transition-colors cursor-pointer ${_?"bg-amber-500/20 text-amber-300 border-amber-500/40":"bg-slate-800 text-slate-300 border-slate-700 hover:text-white"}`,title:"Preview spoken narration",children:[E.jsx(wm,{className:"w-3.5 h-3.5 text-amber-400"}),E.jsx("span",{children:_?"Speaking...":"Listen"})]}),E.jsxs("button",{onClick:k,disabled:o||!p.narration,className:"flex items-center gap-1 px-2.5 py-1 bg-amber-500/15 hover:bg-amber-500/25 border border-amber-500/30 text-amber-300 text-xs font-semibold rounded-lg transition-colors cursor-pointer disabled:opacity-50",title:"Make script punchier using AI",children:[o?E.jsx(Ky,{className:"w-3.5 h-3.5 animate-spin"}):E.jsx(bs,{className:"w-3.5 h-3.5"}),E.jsx("span",{children:"AI Polish"})]})]})]}),E.jsxs("div",{className:"relative",children:[E.jsx("textarea",{rows:3,value:p.narration,onChange:Q=>r(Q.target.value),placeholder:"Write the narration voiceover for this scene...",className:"w-full bg-slate-950 border border-slate-800 focus:border-cyan-400/80 rounded-xl p-3 text-xs sm:text-sm text-slate-200 outline-none resize-none transition-colors"}),E.jsxs("div",{className:"flex items-center justify-between text-[11px] text-slate-500 px-1 mt-1",children:[E.jsxs("span",{className:"flex items-center gap-1",children:[E.jsx(ay,{className:"w-3 h-3 text-slate-400"}),E.jsxs("span",{children:["~",S,"s spoken (",A," words)"]})]}),E.jsx("span",{className:"italic text-slate-400",children:N?`Click a word below to anchor "${N.label||N.type}"`:"Select an element to sync it to a word"})]})]}),E.jsxs("div",{className:"flex items-center justify-between p-2 rounded-xl bg-slate-950/70 border border-slate-800/80",children:[E.jsxs("div",{className:"flex items-center gap-2 overflow-hidden",children:[E.jsx("input",{ref:j,type:"file",accept:"audio/*",onChange:U,className:"hidden"}),E.jsx(Cy,{className:"w-3.5 h-3.5 text-slate-400 shrink-0"}),p.customAudioUrl?E.jsxs("div",{className:"flex items-center gap-1.5 truncate",children:[E.jsx("span",{className:"w-2 h-2 rounded-full bg-emerald-400 shrink-0 animate-pulse"}),E.jsx("span",{className:"text-xs text-emerald-300 font-mono truncate max-w-[180px]",children:p.customAudioName||"Custom Audio"})]}):E.jsx("span",{className:"text-xs text-slate-400",children:"Web Speech TTS active · Or upload voiceover file"})]}),E.jsx("div",{className:"flex items-center gap-1.5 shrink-0",children:p.customAudioUrl?E.jsx("button",{onClick:B,className:"p-1 rounded-lg text-slate-400 hover:text-rose-400 hover:bg-slate-800 transition-colors cursor-pointer",title:"Remove custom audio and use Web Speech TTS",children:E.jsx(_c,{className:"w-3.5 h-3.5"})}):E.jsxs("button",{onClick:()=>{var Q;return(Q=j.current)==null?void 0:Q.click()},className:"inline-flex items-center gap-1 px-2 py-1 rounded-lg bg-slate-800 hover:bg-slate-700 text-slate-200 text-xs font-medium border border-slate-700 transition-colors cursor-pointer",title:"Upload MP3 or WAV voiceover track",children:[E.jsx(h2,{className:"w-3 h-3 text-slate-400"}),E.jsx("span",{children:"Upload MP3/WAV"})]})})]}),v.length>0&&E.jsxs("div",{className:"pt-2",children:[E.jsx("span",{className:"text-[10px] font-semibold tracking-wider uppercase text-slate-400 block mb-2",children:"Click Word to Anchor Selected Element:"}),E.jsx("div",{className:"flex flex-wrap gap-1.5 max-h-36 overflow-y-auto pr-1",children:v.map((Q,I)=>{var w;const ut=Q.toLowerCase(),vt=N&&((w=N.triggerWord)==null?void 0:w.toLowerCase().replace(/[^a-z0-9]/g,""))===ut,R=T[ut]||[],P=x===I;return E.jsxs("button",{onClick:()=>X(Q),className:`inline-flex items-center gap-1 px-2 py-1 rounded-lg text-xs font-medium transition-all cursor-pointer border ${P?"bg-amber-400 text-slate-950 font-black border-amber-300 scale-110 shadow-[0_0_18px_rgba(251,191,36,0.95)] ring-2 ring-amber-300 z-10 animate-pulse":vt?"bg-amber-400 text-slate-950 font-bold border-amber-300 shadow-[0_0_12px_rgba(251,191,36,0.4)] scale-105":R.length>0?"bg-cyan-950/60 border-cyan-500/40 text-cyan-300 hover:border-cyan-400":"bg-slate-950/60 border-slate-800/80 text-slate-300 hover:border-slate-700 hover:bg-slate-800/60"}`,title:P?`Currently speaking: "${Q}"`:N?`Click to trigger "${N.label||N.type}" on "${Q}"`:`${R.length} element(s) trigger here`,children:[E.jsx("span",{children:Q}),R.length>0&&!vt&&!P&&E.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-cyan-400"}),vt&&!P&&E.jsx(mc,{className:"w-3 h-3 text-slate-950 stroke-[3]"}),P&&E.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-slate-950 animate-ping"})]},`${Q}-${I}`)})})]})]})},ev=({onAddElement:p,primaryColor:d})=>{const r=[{category:"Architecture",items:[{type:"client",label:"Client Laptop",icon:wy,def:{width:180,height:130,color:"#38bdf8",label:"Client App"}},{type:"server",label:"Server Rack",icon:Iy,def:{width:180,height:120,color:"#10b981",label:"Node Server"}},{type:"database",label:"Database",icon:oy,def:{width:160,height:150,color:"#a855f7",label:"PostgreSQL DB"}},{type:"cloud",label:"Cloud / DNS",icon:ly,def:{width:220,height:140,color:"#3b82f6",label:"Cloud Service"}},{type:"api_gateway",label:"API Gateway",icon:$y,def:{width:170,height:150,color:"#fbbf24",label:"API Gateway"}}]},{category:"UI Mockups",items:[{type:"browser_window",label:"Browser Window",icon:Gy,def:{width:380,height:220,color:"#3b82f6",label:"Web Application UI",url:"https://app.io"}},{type:"terminal_window",label:"Terminal Window",icon:Sm,def:{width:360,height:180,color:"#38bdf8",label:"npm install explainroo",subtext:"Ready"}},{type:"phone_mockup",label:"Phone Screen",icon:a2,def:{width:140,height:240,color:"#0f172a",label:"Mobile App"}}]},{category:"Shapes & Arrows",items:[{type:"arrow",label:"Straight Arrow",icon:Dy,def:{width:160,height:0,color:"#f97316",label:"Request"}},{type:"rectangle",label:"Box Container",icon:i2,def:{width:180,height:120,color:d,label:"Component"}},{type:"circle",label:"Circle / Node",icon:ty,def:{width:110,height:110,color:d,label:"Node"}},{type:"checkmark",label:"Checkmark Stamp",icon:$g,def:{width:70,height:70,color:"#10b981"}},{type:"badge",label:"Step Badge",icon:s2,def:{width:120,height:38,color:"#fbbf24",label:"Step 1"}}]},{category:"Code & Text",items:[{type:"code_block",label:"Code Block",icon:ry,def:{width:320,height:150,color:"#38bdf8",codeSnippet:`const api = createClient();+await api.connect();`}},{type:"text",label:"Title Text",icon:f2,def:{width:280,height:32,color:d,label:"Core Mechanism"}}]},{category:"Tech & Network Icons",items:[{type:"icon",label:"Redis / Cache",icon:_2,def:{width:70,height:70,color:"#ef4444",iconName:"zap",label:"Cache"}},{type:"icon",label:"Auth / Token",icon:_y,def:{width:70,height:70,color:"#f59e0b",iconName:"key",label:"JWT"}},{type:"icon",label:"Global CDN / Web",icon:by,def:{width:70,height:70,color:"#06b6d4",iconName:"globe",label:"Edge CDN"}},{type:"icon",label:"Client User",icon:p2,def:{width:70,height:70,color:"#ec4899",iconName:"user",label:"End User"}}]}],s=u=>{const f=Math.floor(Math.random()*80)-40,c=Math.floor(Math.random()*60)-30,o={id:`el-${Date.now()}`,type:u.type,x:640-u.def.width/2+f,y:360-u.def.height/2+c,width:u.def.width,height:u.def.height,color:u.def.color,label:u.def.label,subtext:u.def.subtext,url:u.def.url,codeSnippet:u.def.codeSnippet,iconName:u.def.iconName,strokeWidth:2.5,roughness:1.4,animation:"pop",triggerTimeSec:.5};p(o),Qt.playPop()};return E.jsxs("div",{className:"bg-slate-900 border border-slate-800 rounded-2xl p-4 flex flex-col gap-4",children:[E.jsx("div",{className:"flex items-center justify-between pb-2 border-b border-slate-800",children:E.jsxs("div",{children:[E.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-slate-300",children:"Visual Toolbox"}),E.jsx("p",{className:"text-[11px] text-slate-500",children:"Click to add diagrams and mockups"})]})}),E.jsx("div",{className:"space-y-4",children:r.map(u=>E.jsxs("div",{children:[E.jsx("span",{className:"text-[10px] font-semibold tracking-wider uppercase text-slate-400 block mb-2",children:u.category}),E.jsx("div",{className:"grid grid-cols-2 gap-1.5",children:u.items.map(f=>{const c=f.icon;return E.jsxs("button",{onClick:()=>s(f),className:"flex items-center gap-2 p-2 rounded-xl bg-slate-950/60 hover:bg-slate-800 border border-slate-800/80 hover:border-slate-700 text-left transition-colors cursor-pointer group active:scale-95",title:`Add ${f.label} to scene`,children:[E.jsx("div",{className:"w-6 h-6 rounded-lg bg-slate-900 flex items-center justify-center shrink-0 group-hover:bg-amber-400/10 transition-colors",children:E.jsx(c,{className:"w-3.5 h-3.5 text-slate-400 group-hover:text-amber-400"})}),E.jsx("span",{className:"text-xs font-medium text-slate-300 truncate",children:f.label})]},f.label)})})]},u.category))})]})},av=[{label:"Cyan",hex:"#38bdf8"},{label:"Emerald",hex:"#10b981"},{label:"Amber",hex:"#fbbf24"},{label:"Purple",hex:"#a855f7"},{label:"Rose",hex:"#f43f5e"},{label:"Dark Slate",hex:"#0f172a"},{label:"White",hex:"#ffffff"}],nv=({element:p,onUpdateElement:d,onDeleteElement:r,onDuplicateElement:s,sceneDuration:u})=>{var f;return p?E.jsxs("div",{className:"bg-slate-900 border border-slate-800 rounded-2xl p-4 flex flex-col gap-3",children:[E.jsxs("div",{className:"flex items-center justify-between pb-2 border-b border-slate-800",children:[E.jsxs("div",{children:[E.jsx("span",{className:"text-[10px] font-mono uppercase text-amber-400 font-bold tracking-wider",children:p.type}),E.jsx("h3",{className:"text-xs font-bold text-slate-200 truncate max-w-[140px]",children:p.label||"Element Properties"})]}),E.jsxs("div",{className:"flex items-center gap-1",children:[E.jsx("button",{onClick:()=>s(p),className:"p-1.5 rounded-lg text-slate-400 hover:text-white hover:bg-slate-800 transition-colors cursor-pointer",title:"Duplicate element",children:E.jsx(vs,{className:"w-3.5 h-3.5"})}),E.jsx("button",{onClick:()=>r(p.id),className:"p-1.5 rounded-lg text-slate-400 hover:text-rose-400 hover:bg-rose-500/10 transition-colors cursor-pointer",title:"Delete element",children:E.jsx(_c,{className:"w-3.5 h-3.5"})})]})]}),E.jsxs("div",{className:"space-y-2",children:[E.jsxs("div",{children:[E.jsx("label",{className:"text-[10px] font-semibold text-slate-400 uppercase tracking-wider block mb-1",children:"Display Label"}),E.jsx("input",{type:"text",value:p.label||"",onChange:c=>d(p.id,{label:c.target.value}),className:"w-full bg-slate-950 border border-slate-800 focus:border-cyan-400/80 rounded-lg px-2.5 py-1.5 text-xs text-slate-200 outline-none",placeholder:"Text / Title"})]}),p.type==="browser_window"&&E.jsxs("div",{children:[E.jsx("label",{className:"text-[10px] font-semibold text-slate-400 uppercase tracking-wider block mb-1",children:"Browser URL"}),E.jsx("input",{type:"text",value:p.url||"",onChange:c=>d(p.id,{url:c.target.value}),className:"w-full bg-slate-950 border border-slate-800 focus:border-cyan-400/80 rounded-lg px-2.5 py-1.5 text-xs font-mono text-slate-200 outline-none",placeholder:"https://..."})]}),p.type==="code_block"&&E.jsxs("div",{children:[E.jsx("label",{className:"text-[10px] font-semibold text-slate-400 uppercase tracking-wider block mb-1",children:"Code Snippet"}),E.jsx("textarea",{rows:3,value:p.codeSnippet||"",onChange:c=>d(p.id,{codeSnippet:c.target.value}),className:"w-full bg-slate-950 border border-slate-800 focus:border-cyan-400/80 rounded-lg p-2 text-xs font-mono text-slate-200 outline-none resize-none",placeholder:"Code lines..."})]})]}),E.jsxs("div",{children:[E.jsx("label",{className:"text-[10px] font-semibold text-slate-400 uppercase tracking-wider block mb-1.5",children:"Stroke Color"}),E.jsx("div",{className:"flex items-center gap-1.5 flex-wrap",children:av.map(c=>E.jsx("button",{onClick:()=>d(p.id,{color:c.hex}),style:{backgroundColor:c.hex},className:`w-6 h-6 rounded-full border transition-transform cursor-pointer ${p.color===c.hex?"ring-2 ring-amber-400 scale-110 border-white":"border-slate-700/80 hover:scale-105"}`,title:c.label},c.hex))})]}),E.jsxs("div",{children:[E.jsx("label",{className:"text-[10px] font-semibold text-slate-400 uppercase tracking-wider block mb-1",children:"Entrance Animation"}),E.jsx("div",{className:"grid grid-cols-2 gap-1.5 text-xs",children:["pop","draw","slide","fade"].map(c=>E.jsx("button",{onClick:()=>d(p.id,{animation:c}),className:`p-1.5 rounded-lg border text-left capitalize transition-colors cursor-pointer ${p.animation===c?"bg-amber-500/15 border-amber-500/40 text-amber-300 font-semibold":"bg-slate-950 border-slate-800 text-slate-400 hover:text-white"}`,children:c},c))})]}),E.jsxs("div",{className:"pt-1 border-t border-slate-800",children:[E.jsx("label",{className:"text-[10px] font-semibold text-slate-400 uppercase tracking-wider block mb-1",children:"Word Anchor Trigger"}),E.jsx("div",{className:"flex items-center gap-2",children:E.jsx("input",{type:"text",value:p.triggerWord||"",onChange:c=>d(p.id,{triggerWord:c.target.value}),className:"flex-1 bg-slate-950 border border-slate-800 focus:border-cyan-400/80 rounded-lg px-2.5 py-1 text-xs text-slate-200 outline-none",placeholder:"Type or click word above"})})]}),E.jsxs("div",{children:[E.jsxs("div",{className:"flex items-center justify-between text-[10px] text-slate-400 mb-1",children:[E.jsx("span",{children:"Appearance Time"}),E.jsxs("span",{className:"font-mono text-cyan-400",children:[((f=p.triggerTimeSec)==null?void 0:f.toFixed(1))||"0.0","s"]})]}),E.jsx("input",{type:"range",min:0,max:u,step:.1,value:p.triggerTimeSec||0,onChange:c=>d(p.id,{triggerTimeSec:parseFloat(c.target.value)}),className:"w-full h-1 bg-slate-800 rounded-lg appearance-none cursor-pointer accent-cyan-400"})]})]}):E.jsxs("div",{className:"bg-slate-900 border border-slate-800 rounded-2xl p-4 flex flex-col items-center justify-center text-center py-8",children:[E.jsx(t2,{className:"w-8 h-8 text-slate-600 mb-2"}),E.jsx("h4",{className:"text-xs font-semibold text-slate-300",children:"No Element Selected"}),E.jsx("p",{className:"text-[11px] text-slate-500 mt-1 max-w-[200px]",children:"Click any element on the preview canvas to edit its label, colors, and word trigger."})]})},lv=["How DNS resolves a website domain","What is Docker containerization?","How Stripe processes credit card payments","Git rebase vs merge explained visually","How Redis in-memory caching works"],iv=({isOpen:p,onClose:d,onProjectGenerated:r})=>{const[s,u]=Dt.useState(""),[f,c]=Dt.useState(""),[o,g]=Dt.useState("whiteboard"),[_,b]=Dt.useState(3),[x,m]=Dt.useState(!1),[v,A]=Dt.useState(null),[S,N]=Dt.useState("");if(!p)return null;const T=async()=>{if(!s.trim()){A("Please provide a topic or repository name to explain.");return}A(null),m(!0),N("Designing video architecture & script...");try{const k=setTimeout(()=>{N("Synthesizing visual diagrams & mockups...")},1400),j=setTimeout(()=>{N("Synchronizing drawings with spoken word anchors...")},2800),U=await fetch("/api/explainroo/ai-generate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({prompt:s.trim(),repoUrl:f.trim(),look:o,numScenes:_})});if(clearTimeout(k),clearTimeout(j),!U.ok){const W=await U.json();throw new Error(W.error||"Failed to generate explainer video")}const B=await U.json();Qt.playDrawChime(),r(B),d()}catch(k){console.error(k),A(k.message||"Error communicating with AI service")}finally{m(!1),N("")}};return E.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4 bg-slate-950/80 backdrop-blur-md animate-fade-in",children:E.jsxs("div",{className:"relative w-full max-w-lg bg-slate-900 border border-slate-800 rounded-2xl p-6 shadow-2xl flex flex-col",children:[E.jsxs("div",{className:"flex items-center justify-between pb-4 border-b border-slate-800",children:[E.jsxs("div",{className:"flex items-center gap-2.5",children:[E.jsx("div",{className:"w-8 h-8 rounded-lg bg-gradient-to-tr from-amber-500 to-orange-500 flex items-center justify-center text-slate-950",children:E.jsx(bs,{className:"w-4 h-4 fill-slate-950"})}),E.jsxs("div",{children:[E.jsx("h3",{className:"text-base font-bold text-white tracking-tight",children:"AI Explainer Video Generator"}),E.jsx("p",{className:"text-xs text-slate-400",children:"Turn any concept or GitHub repo into a narrated animated video"})]})]}),E.jsx("button",{onClick:d,disabled:x,className:"p-1.5 text-slate-400 hover:text-white rounded-lg hover:bg-slate-800 transition-colors cursor-pointer",children:E.jsx(Sc,{className:"w-5 h-5"})})]}),E.jsxs("div",{className:"py-4 space-y-4",children:[v&&E.jsx("div",{className:"p-3 rounded-xl bg-rose-500/10 border border-rose-500/30 text-rose-300 text-xs",children:v}),E.jsxs("div",{children:[E.jsx("label",{className:"text-xs font-semibold text-slate-300 block mb-1.5",children:"What do you want to explain?"}),E.jsx("textarea",{rows:2,value:s,onChange:k=>u(k.target.value),placeholder:"e.g. How DNS works, What is an API, or paste a GitHub repo summary...",className:"w-full bg-slate-950 border border-slate-800 focus:border-amber-400 rounded-xl p-3 text-xs sm:text-sm text-slate-200 outline-none resize-none"}),E.jsx("div",{className:"flex flex-wrap gap-1.5 mt-2",children:lv.map(k=>E.jsx("button",{type:"button",onClick:()=>u(k),className:"px-2 py-0.5 rounded-md bg-slate-950/80 hover:bg-slate-800 border border-slate-800 text-[11px] text-slate-400 hover:text-amber-300 transition-colors cursor-pointer",children:k.length>38?k.slice(0,35)+"...":k},k))})]}),E.jsxs("div",{children:[E.jsxs("label",{className:"text-xs font-semibold text-slate-300 block mb-1.5 flex items-center gap-1.5",children:[E.jsx(yy,{className:"w-3.5 h-3.5 text-slate-400"}),E.jsx("span",{children:"GitHub Repository Link (Optional)"})]}),E.jsx("input",{type:"text",value:f,onChange:k=>c(k.target.value),placeholder:"https://github.com/facebook/react",className:"w-full bg-slate-950 border border-slate-800 focus:border-cyan-400 rounded-xl px-3 py-2 text-xs font-mono text-slate-200 outline-none"})]}),E.jsxs("div",{className:"grid grid-cols-2 gap-3 pt-1",children:[E.jsxs("div",{children:[E.jsx("label",{className:"text-xs font-semibold text-slate-300 block mb-1.5",children:"Visual Look Style"}),E.jsx("select",{value:o,onChange:k=>g(k.target.value),className:"w-full bg-slate-950 border border-slate-800 rounded-xl px-3 py-2 text-xs text-slate-200 outline-none cursor-pointer",children:Object.entries(Bl).map(([k,j])=>E.jsx("option",{value:k,children:j.name},k))})]}),E.jsxs("div",{children:[E.jsx("label",{className:"text-xs font-semibold text-slate-300 block mb-1.5",children:"Number of Scenes"}),E.jsxs("select",{value:_,onChange:k=>b(parseInt(k.target.value,10)),className:"w-full bg-slate-950 border border-slate-800 rounded-xl px-3 py-2 text-xs text-slate-200 outline-none cursor-pointer",children:[E.jsx("option",{value:3,children:"3 Scenes (~20 seconds)"}),E.jsx("option",{value:4,children:"4 Scenes (~30 seconds)"}),E.jsx("option",{value:5,children:"5 Scenes (~45 seconds)"})]})]})]}),x&&E.jsxs("div",{className:"p-3.5 rounded-xl bg-amber-500/10 border border-amber-500/30 flex items-center gap-3 animate-fade-in",children:[E.jsx(Ey,{className:"w-5 h-5 text-amber-400 animate-spin shrink-0"}),E.jsxs("div",{className:"text-xs",children:[E.jsx("span",{className:"font-semibold text-amber-300 block",children:"Creating Your Explainer Video..."}),E.jsx("span",{className:"text-slate-400 text-[11px]",children:S})]})]})]}),E.jsxs("div",{className:"pt-3 border-t border-slate-800 flex items-center justify-end gap-2",children:[E.jsx("button",{type:"button",onClick:d,disabled:x,className:"px-4 py-2 text-xs font-medium text-slate-400 hover:text-white rounded-xl transition-colors cursor-pointer",children:"Cancel"}),E.jsxs("button",{type:"button",onClick:T,disabled:x||!s.trim(),className:"flex items-center gap-1.5 px-4 py-2 rounded-xl bg-gradient-to-r from-amber-500 to-orange-500 hover:from-amber-400 hover:to-orange-400 text-slate-950 text-xs font-bold shadow-lg transition-transform active:scale-95 cursor-pointer disabled:opacity-50",children:[E.jsx(bs,{className:"w-3.5 h-3.5"}),E.jsx("span",{children:"Generate Video"})]})]})]})})};function ms(p){throw new Error('Could not dynamically require "'+p+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var dc={exports:{}};/*!++JSZip v3.10.2 - A JavaScript class for generating and reading zip files+<http://stuartk.com/jszip>++(c) 2009-2016 Stuart Knightley <stuart [at] stuartk.com>+Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip/main/LICENSE.markdown.++JSZip uses the library pako released under the MIT license :+https://github.com/nodeca/pako/blob/main/LICENSE+*/var hm;function rv(){return hm||(hm=1,(function(p,d){(function(r){p.exports=r()})(function(){return(function r(s,u,f){function c(_,b){if(!u[_]){if(!s[_]){var x=typeof ms=="function"&&ms;if(!b&&x)return x(_,!0);if(o)return o(_,!0);var m=new Error("Cannot find module '"+_+"'");throw m.code="MODULE_NOT_FOUND",m}var v=u[_]={exports:{}};s[_][0].call(v.exports,function(A){var S=s[_][1][A];return c(S||A)},v,v.exports,r,s,u,f)}return u[_].exports}for(var o=typeof ms=="function"&&ms,g=0;g<f.length;g++)c(f[g]);return c})({1:[function(r,s,u){var f=r("./utils"),c=r("./support"),o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";u.encode=function(g){for(var _,b,x,m,v,A,S,N=[],T=0,k=g.length,j=k,U=f.getTypeOf(g)!=="string";T<g.length;)j=k-T,x=U?(_=g[T++],b=T<k?g[T++]:0,T<k?g[T++]:0):(_=g.charCodeAt(T++),b=T<k?g.charCodeAt(T++):0,T<k?g.charCodeAt(T++):0),m=_>>2,v=(3&_)<<4|b>>4,A=1<j?(15&b)<<2|x>>6:64,S=2<j?63&x:64,N.push(o.charAt(m)+o.charAt(v)+o.charAt(A)+o.charAt(S));return N.join("")},u.decode=function(g){var _,b,x,m,v,A,S=0,N=0,T="data:";if(g.substr(0,T.length)===T)throw new Error("Invalid base64 input, it looks like a data url.");var k,j=3*(g=g.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(g.charAt(g.length-1)===o.charAt(64)&&j--,g.charAt(g.length-2)===o.charAt(64)&&j--,j%1!=0)throw new Error("Invalid base64 input, bad content length.");for(k=c.uint8array?new Uint8Array(0|j):new Array(0|j);S<g.length;)_=o.indexOf(g.charAt(S++))<<2|(m=o.indexOf(g.charAt(S++)))>>4,b=(15&m)<<4|(v=o.indexOf(g.charAt(S++)))>>2,x=(3&v)<<6|(A=o.indexOf(g.charAt(S++))),k[N++]=_,v!==64&&(k[N++]=b),A!==64&&(k[N++]=x);return k}},{"./support":30,"./utils":32}],2:[function(r,s,u){var f=r("./external"),c=r("./stream/DataWorker"),o=r("./stream/Crc32Probe"),g=r("./stream/DataLengthProbe");function _(b,x,m,v,A){this.compressedSize=b,this.uncompressedSize=x,this.crc32=m,this.compression=v,this.compressedContent=A}_.prototype={getContentWorker:function(){var b=new c(f.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new g("data_length")),x=this;return b.on("end",function(){if(this.streamInfo.data_length!==x.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),b},getCompressedWorker:function(){return new c(f.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},_.createWorkerFrom=function(b,x,m){return b.pipe(new o).pipe(new g("uncompressedSize")).pipe(x.compressWorker(m)).pipe(new g("compressedSize")).withStreamInfo("compression",x)},s.exports=_},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(r,s,u){var f=r("./stream/GenericWorker");u.STORE={magic:"\0\0",compressWorker:function(){return new f("STORE compression")},uncompressWorker:function(){return new f("STORE decompression")}},u.DEFLATE=r("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(r,s,u){var f=r("./utils"),c=(function(){for(var o,g=[],_=0;_<256;_++){o=_;for(var b=0;b<8;b++)o=1&o?3988292384^o>>>1:o>>>1;g[_]=o}return g})();s.exports=function(o,g){return o!==void 0&&o.length?f.getTypeOf(o)!=="string"?(function(_,b,x,m){var v=c,A=m+x;_^=-1;for(var S=m;S<A;S++)_=_>>>8^v[255&(_^b[S])];return-1^_})(0|g,o,o.length,0):(function(_,b,x,m){var v=c,A=m+x;_^=-1;for(var S=m;S<A;S++)_=_>>>8^v[255&(_^b.charCodeAt(S))];return-1^_})(0|g,o,o.length,0):0}},{"./utils":32}],5:[function(r,s,u){u.base64=!1,u.binary=!1,u.dir=!1,u.createFolders=!0,u.date=null,u.compression=null,u.compressionOptions=null,u.comment=null,u.unixPermissions=null,u.dosPermissions=null},{}],6:[function(r,s,u){var f=null;f=typeof Promise<"u"?Promise:r("lie"),s.exports={Promise:f}},{lie:37}],7:[function(r,s,u){var f=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",c=r("pako"),o=r("./utils"),g=r("./stream/GenericWorker"),_=f?"uint8array":"array";function b(x,m){g.call(this,"FlateWorker/"+x),this._pako=null,this._pakoAction=x,this._pakoOptions=m,this.meta={}}u.magic="\b\0",o.inherits(b,g),b.prototype.processChunk=function(x){this.meta=x.meta,this._pako===null&&this._createPako(),this._pako.push(o.transformTo(_,x.data),!1)},b.prototype.flush=function(){g.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},b.prototype.cleanUp=function(){g.prototype.cleanUp.call(this),this._pako=null},b.prototype._createPako=function(){this._pako=new c[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var x=this;this._pako.onData=function(m){x.push({data:m,meta:x.meta})}},u.compressWorker=function(x){return new b("Deflate",x)},u.uncompressWorker=function(){return new b("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(r,s,u){function f(v,A){var S,N="";for(S=0;S<A;S++)N+=String.fromCharCode(255&v),v>>>=8;return N}function c(v,A,S,N,T,k){var j,U,B=v.file,W=v.compression,X=k!==_.utf8encode,Q=o.transformTo("string",k(B.name)),I=o.transformTo("string",_.utf8encode(B.name)),ut=B.comment,vt=o.transformTo("string",k(ut)),R=o.transformTo("string",_.utf8encode(ut)),P=I.length!==B.name.length,w=R.length!==ut.length,it="",G="",L="",rt=B.dir,nt=B.date,mt={crc32:0,compressedSize:0,uncompressedSize:0};A&&!S||(mt.crc32=v.crc32,mt.compressedSize=v.compressedSize,mt.uncompressedSize=v.uncompressedSize);var $=0;A&&($|=8),X||!P&&!w||($|=2048);var et=0,kt=0;rt&&(et|=16),T==="UNIX"?(kt=798,et|=(function(K,xt){var wt=K;return K||(wt=xt?16893:33204),(65535&wt)<<16})(B.unixPermissions,rt)):(kt=20,et|=(function(K){return 63&(K||0)})(B.dosPermissions)),j=nt.getUTCHours(),j<<=6,j|=nt.getUTCMinutes(),j<<=5,j|=nt.getUTCSeconds()/2,U=nt.getUTCFullYear()-1980,U<<=4,U|=nt.getUTCMonth()+1,U<<=5,U|=nt.getUTCDate(),P&&(G=f(1,1)+f(b(Q),4)+I,it+="up"+f(G.length,2)+G),w&&(L=f(1,1)+f(b(vt),4)+R,it+="uc"+f(L.length,2)+L);var M="";return M+=`+\0`,M+=f($,2),M+=W.magic,M+=f(j,2),M+=f(U,2),M+=f(mt.crc32,4),M+=f(mt.compressedSize,4),M+=f(mt.uncompressedSize,4),M+=f(Q.length,2),M+=f(it.length,2),{fileRecord:x.LOCAL_FILE_HEADER+M+Q+it,dirRecord:x.CENTRAL_FILE_HEADER+f(kt,2)+M+f(vt.length,2)+"\0\0\0\0"+f(et,4)+f(N,4)+Q+it+vt}}var o=r("../utils"),g=r("../stream/GenericWorker"),_=r("../utf8"),b=r("../crc32"),x=r("../signature");function m(v,A,S,N){g.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=A,this.zipPlatform=S,this.encodeFileName=N,this.streamFiles=v,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}o.inherits(m,g),m.prototype.push=function(v){var A=v.meta.percent||0,S=this.entriesCount,N=this._sources.length;this.accumulate?this.contentBuffer.push(v):(this.bytesWritten+=v.data.length,g.prototype.push.call(this,{data:v.data,meta:{currentFile:this.currentFile,percent:S?(A+100*(S-N-1))/S:100}}))},m.prototype.openedSource=function(v){this.currentSourceOffset=this.bytesWritten,this.currentFile=v.file.name;var A=this.streamFiles&&!v.file.dir;if(A){var S=c(v,A,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:S.fileRecord,meta:{percent:0}})}else this.accumulate=!0},m.prototype.closedSource=function(v){this.accumulate=!1;var A=this.streamFiles&&!v.file.dir,S=c(v,A,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(S.dirRecord),A)this.push({data:(function(N){return x.DATA_DESCRIPTOR+f(N.crc32,4)+f(N.compressedSize,4)+f(N.uncompressedSize,4)})(v),meta:{percent:100}});else for(this.push({data:S.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},m.prototype.flush=function(){for(var v=this.bytesWritten,A=0;A<this.dirRecords.length;A++)this.push({data:this.dirRecords[A],meta:{percent:100}});var S=this.bytesWritten-v,N=(function(T,k,j,U,B){var W=o.transformTo("string",B(U));return x.CENTRAL_DIRECTORY_END+"\0\0\0\0"+f(T,2)+f(T,2)+f(k,4)+f(j,4)+f(W.length,2)+W})(this.dirRecords.length,S,v,this.zipComment,this.encodeFileName);this.push({data:N,meta:{percent:100}})},m.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},m.prototype.registerPrevious=function(v){this._sources.push(v);var A=this;return v.on("data",function(S){A.processChunk(S)}),v.on("end",function(){A.closedSource(A.previous.streamInfo),A._sources.length?A.prepareNextSource():A.end()}),v.on("error",function(S){A.error(S)}),this},m.prototype.resume=function(){return!!g.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},m.prototype.error=function(v){var A=this._sources;if(!g.prototype.error.call(this,v))return!1;for(var S=0;S<A.length;S++)try{A[S].error(v)}catch{}return!0},m.prototype.lock=function(){g.prototype.lock.call(this);for(var v=this._sources,A=0;A<v.length;A++)v[A].lock()},s.exports=m},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(r,s,u){var f=r("../compressions"),c=r("./ZipFileWorker");u.generateWorker=function(o,g,_){var b=new c(g.streamFiles,_,g.platform,g.encodeFileName),x=0;try{o.forEach(function(m,v){x++;var A=(function(k,j){var U=k||j,B=f[U];if(!B)throw new Error(U+" is not a valid compression method !");return B})(v.options.compression,g.compression),S=v.options.compressionOptions||g.compressionOptions||{},N=v.dir,T=v.date;v._compressWorker(A,S).withStreamInfo("file",{name:m,dir:N,date:T,comment:v.comment||"",unixPermissions:v.unixPermissions,dosPermissions:v.dosPermissions}).pipe(b)}),b.entriesCount=x}catch(m){b.error(m)}return b}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(r,s,u){function f(){if(!(this instanceof f))return new f;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var c=new f;for(var o in this)typeof this[o]!="function"&&(c[o]=this[o]);return c}}(f.prototype=r("./object")).loadAsync=r("./load"),f.support=r("./support"),f.defaults=r("./defaults"),f.version="3.10.2",f.loadAsync=function(c,o){return new f().loadAsync(c,o)},f.external=r("./external"),s.exports=f},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(r,s,u){var f=r("./utils"),c=r("./external"),o=r("./utf8"),g=r("./zipEntries"),_=r("./stream/Crc32Probe"),b=r("./nodejsUtils");function x(m){return new c.Promise(function(v,A){var S=m.decompressed.getContentWorker().pipe(new _);S.on("error",function(N){A(N)}).on("end",function(){S.streamInfo.crc32!==m.decompressed.crc32?A(new Error("Corrupted zip : CRC32 mismatch")):v()}).resume()})}s.exports=function(m,v){var A=this;return v=f.extend(v||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:o.utf8decode}),b.isNode&&b.isStream(m)?c.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):f.prepareContent("the loaded zip file",m,!0,v.optimizedBinaryString,v.base64).then(function(S){var N=new g(v);return N.load(S),N}).then(function(S){var N=[c.Promise.resolve(S)],T=S.files;if(v.checkCRC32)for(var k=0;k<T.length;k++)N.push(x(T[k]));return c.Promise.all(N)}).then(function(S){for(var N=S.shift(),T=N.files,k=0;k<T.length;k++){var j=T[k],U=j.fileNameStr,B=f.resolve(j.fileNameStr);A.file(B,j.decompressed,{binary:!0,optimizedBinaryString:!0,date:j.date,dir:j.dir,comment:j.fileCommentStr.length?j.fileCommentStr:null,unixPermissions:j.unixPermissions,dosPermissions:j.dosPermissions,createFolders:v.createFolders}),j.dir||(A.file(B).unsafeOriginalName=U)}return N.zipComment.length&&(A.comment=N.zipComment),A})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(r,s,u){var f=r("../utils"),c=r("../stream/GenericWorker");function o(g,_){c.call(this,"Nodejs stream input adapter for "+g),this._upstreamEnded=!1,this._bindStream(_)}f.inherits(o,c),o.prototype._bindStream=function(g){var _=this;(this._stream=g).pause(),g.on("data",function(b){_.push({data:b,meta:{percent:0}})}).on("error",function(b){_.isPaused?this.generatedError=b:_.error(b)}).on("end",function(){_.isPaused?_._upstreamEnded=!0:_.end()})},o.prototype.pause=function(){return!!c.prototype.pause.call(this)&&(this._stream.pause(),!0)},o.prototype.resume=function(){return!!c.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},s.exports=o},{"../stream/GenericWorker":28,"../utils":32}],13:[function(r,s,u){var f=r("readable-stream").Readable;function c(o,g,_){f.call(this,g),this._helper=o;var b=this;o.on("data",function(x,m){b.push(x)||b._helper.pause(),_&&_(m)}).on("error",function(x){b.emit("error",x)}).on("end",function(){b.push(null)})}r("../utils").inherits(c,f),c.prototype._read=function(){this._helper.resume()},s.exports=c},{"../utils":32,"readable-stream":16}],14:[function(r,s,u){s.exports={isNode:typeof Buffer<"u",newBufferFrom:function(f,c){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(f,c);if(typeof f=="number")throw new Error('The "data" argument must not be a number');return new Buffer(f,c)},allocBuffer:function(f){if(Buffer.alloc)return Buffer.alloc(f);var c=new Buffer(f);return c.fill(0),c},isBuffer:function(f){return Buffer.isBuffer(f)},isStream:function(f){return f&&typeof f.on=="function"&&typeof f.pause=="function"&&typeof f.resume=="function"}}},{}],15:[function(r,s,u){function f(B,W,X){var Q,I=o.getTypeOf(W),ut=o.extend(X||{},b);ut.date=ut.date||new Date,ut.compression!==null&&(ut.compression=ut.compression.toUpperCase()),typeof ut.unixPermissions=="string"&&(ut.unixPermissions=parseInt(ut.unixPermissions,8)),ut.unixPermissions&&16384&ut.unixPermissions&&(ut.dir=!0),ut.dosPermissions&&16&ut.dosPermissions&&(ut.dir=!0),ut.dir&&(B=T(B)),ut.createFolders&&(Q=N(B))&&k.call(this,Q,!0);var vt=I==="string"&&ut.binary===!1&&ut.base64===!1;X&&X.binary!==void 0||(ut.binary=!vt),(W instanceof x&&W.uncompressedSize===0||ut.dir||!W||W.length===0)&&(ut.base64=!1,ut.binary=!0,W="",ut.compression="STORE",I="string");var R=null;R=W instanceof x||W instanceof g?W:A.isNode&&A.isStream(W)?new S(B,W):o.prepareContent(B,W,ut.binary,ut.optimizedBinaryString,ut.base64);var P=new m(B,R,ut);this.files[B]=P}var c=r("./utf8"),o=r("./utils"),g=r("./stream/GenericWorker"),_=r("./stream/StreamHelper"),b=r("./defaults"),x=r("./compressedObject"),m=r("./zipObject"),v=r("./generate"),A=r("./nodejsUtils"),S=r("./nodejs/NodejsStreamInputAdapter"),N=function(B){B.slice(-1)==="/"&&(B=B.substring(0,B.length-1));var W=B.lastIndexOf("/");return 0<W?B.substring(0,W):""},T=function(B){return B.slice(-1)!=="/"&&(B+="/"),B},k=function(B,W){return W=W!==void 0?W:b.createFolders,B=T(B),this.files[B]||f.call(this,B,null,{dir:!0,createFolders:W}),this.files[B]};function j(B){return Object.prototype.toString.call(B)==="[object RegExp]"}var U={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(B){var W,X,Q;for(W in this.files)Q=this.files[W],(X=W.slice(this.root.length,W.length))&&W.slice(0,this.root.length)===this.root&&B(X,Q)},filter:function(B){var W=[];return this.forEach(function(X,Q){B(X,Q)&&W.push(Q)}),W},file:function(B,W,X){if(arguments.length!==1)return B=this.root+B,f.call(this,B,W,X),this;if(j(B)){var Q=B;return this.filter(function(ut,vt){return!vt.dir&&Q.test(ut)})}var I=this.files[this.root+B];return I&&!I.dir?I:null},folder:function(B){if(!B)return this;if(j(B))return this.filter(function(I,ut){return ut.dir&&B.test(I)});var W=this.root+B,X=k.call(this,W),Q=this.clone();return Q.root=X.name,Q},remove:function(B){B=this.root+B;var W=this.files[B];if(W||(B.slice(-1)!=="/"&&(B+="/"),W=this.files[B]),W&&!W.dir)delete this.files[B];else for(var X=this.filter(function(I,ut){return ut.name.slice(0,B.length)===B}),Q=0;Q<X.length;Q++)delete this.files[X[Q].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(B){var W,X={};try{if((X=o.extend(B||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:c.utf8encode})).type=X.type.toLowerCase(),X.compression=X.compression.toUpperCase(),X.type==="binarystring"&&(X.type="string"),!X.type)throw new Error("No output type specified.");o.checkSupport(X.type),X.platform!=="darwin"&&X.platform!=="freebsd"&&X.platform!=="linux"&&X.platform!=="sunos"||(X.platform="UNIX"),X.platform==="win32"&&(X.platform="DOS");var Q=X.comment||this.comment||"";W=v.generateWorker(this,X,Q)}catch(I){(W=new g("error")).error(I)}return new _(W,X.type||"string",X.mimeType)},generateAsync:function(B,W){return this.generateInternalStream(B).accumulate(W)},generateNodeStream:function(B,W){return(B=B||{}).type||(B.type="nodebuffer"),this.generateInternalStream(B).toNodejsStream(W)}};s.exports=U},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(r,s,u){s.exports=r("stream")},{stream:void 0}],17:[function(r,s,u){var f=r("./DataReader");function c(o){f.call(this,o);for(var g=0;g<this.data.length;g++)o[g]=255&o[g]}r("../utils").inherits(c,f),c.prototype.byteAt=function(o){return this.data[this.zero+o]},c.prototype.lastIndexOfSignature=function(o){for(var g=o.charCodeAt(0),_=o.charCodeAt(1),b=o.charCodeAt(2),x=o.charCodeAt(3),m=this.length-4;0<=m;--m)if(this.data[m]===g&&this.data[m+1]===_&&this.data[m+2]===b&&this.data[m+3]===x)return m-this.zero;return-1},c.prototype.readAndCheckSignature=function(o){var g=o.charCodeAt(0),_=o.charCodeAt(1),b=o.charCodeAt(2),x=o.charCodeAt(3),m=this.readData(4);return g===m[0]&&_===m[1]&&b===m[2]&&x===m[3]},c.prototype.readData=function(o){if(this.checkOffset(o),o===0)return[];var g=this.data.slice(this.zero+this.index,this.zero+this.index+o);return this.index+=o,g},s.exports=c},{"../utils":32,"./DataReader":18}],18:[function(r,s,u){var f=r("../utils");function c(o){this.data=o,this.length=o.length,this.index=0,this.zero=0}c.prototype={checkOffset:function(o){this.checkIndex(this.index+o)},checkIndex:function(o){if(this.length<this.zero+o||o<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+o+"). Corrupted zip ?")},setIndex:function(o){this.checkIndex(o),this.index=o},skip:function(o){this.setIndex(this.index+o)},byteAt:function(){},readInt:function(o){var g,_=0;for(this.checkOffset(o),g=this.index+o-1;g>=this.index;g--)_=(_<<8)+this.byteAt(g);return this.index+=o,_},readString:function(o){return f.transformTo("string",this.readData(o))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var o=this.readInt(4);return new Date(Date.UTC(1980+(o>>25&127),(o>>21&15)-1,o>>16&31,o>>11&31,o>>5&63,(31&o)<<1))}},s.exports=c},{"../utils":32}],19:[function(r,s,u){var f=r("./Uint8ArrayReader");function c(o){f.call(this,o)}r("../utils").inherits(c,f),c.prototype.readData=function(o){this.checkOffset(o);var g=this.data.slice(this.zero+this.index,this.zero+this.index+o);return this.index+=o,g},s.exports=c},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(r,s,u){var f=r("./DataReader");function c(o){f.call(this,o)}r("../utils").inherits(c,f),c.prototype.byteAt=function(o){return this.data.charCodeAt(this.zero+o)},c.prototype.lastIndexOfSignature=function(o){return this.data.lastIndexOf(o)-this.zero},c.prototype.readAndCheckSignature=function(o){return o===this.readData(4)},c.prototype.readData=function(o){this.checkOffset(o);var g=this.data.slice(this.zero+this.index,this.zero+this.index+o);return this.index+=o,g},s.exports=c},{"../utils":32,"./DataReader":18}],21:[function(r,s,u){var f=r("./ArrayReader");function c(o){f.call(this,o)}r("../utils").inherits(c,f),c.prototype.readData=function(o){if(this.checkOffset(o),o===0)return new Uint8Array(0);var g=this.data.subarray(this.zero+this.index,this.zero+this.index+o);return this.index+=o,g},s.exports=c},{"../utils":32,"./ArrayReader":17}],22:[function(r,s,u){var f=r("../utils"),c=r("../support"),o=r("./ArrayReader"),g=r("./StringReader"),_=r("./NodeBufferReader"),b=r("./Uint8ArrayReader");s.exports=function(x){var m=f.getTypeOf(x);return f.checkSupport(m),m!=="string"||c.uint8array?m==="nodebuffer"?new _(x):c.uint8array?new b(f.transformTo("uint8array",x)):new o(f.transformTo("array",x)):new g(x)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(r,s,u){u.LOCAL_FILE_HEADER="PK",u.CENTRAL_FILE_HEADER="PK",u.CENTRAL_DIRECTORY_END="PK",u.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",u.ZIP64_CENTRAL_DIRECTORY_END="PK",u.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(r,s,u){var f=r("./GenericWorker"),c=r("../utils");function o(g){f.call(this,"ConvertWorker to "+g),this.destType=g}c.inherits(o,f),o.prototype.processChunk=function(g){this.push({data:c.transformTo(this.destType,g.data),meta:g.meta})},s.exports=o},{"../utils":32,"./GenericWorker":28}],25:[function(r,s,u){var f=r("./GenericWorker"),c=r("../crc32");function o(){f.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}r("../utils").inherits(o,f),o.prototype.processChunk=function(g){this.streamInfo.crc32=c(g.data,this.streamInfo.crc32||0),this.push(g)},s.exports=o},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(r,s,u){var f=r("../utils"),c=r("./GenericWorker");function o(g){c.call(this,"DataLengthProbe for "+g),this.propName=g,this.withStreamInfo(g,0)}f.inherits(o,c),o.prototype.processChunk=function(g){if(g){var _=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=_+g.data.length}c.prototype.processChunk.call(this,g)},s.exports=o},{"../utils":32,"./GenericWorker":28}],27:[function(r,s,u){var f=r("../utils"),c=r("./GenericWorker");function o(g){c.call(this,"DataWorker");var _=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,g.then(function(b){_.dataIsReady=!0,_.data=b,_.max=b&&b.length||0,_.type=f.getTypeOf(b),_.isPaused||_._tickAndRepeat()},function(b){_.error(b)})}f.inherits(o,c),o.prototype.cleanUp=function(){c.prototype.cleanUp.call(this),this.data=null},o.prototype.resume=function(){return!!c.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,f.delay(this._tickAndRepeat,[],this)),!0)},o.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(f.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},o.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var g=null,_=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":g=this.data.substring(this.index,_);break;case"uint8array":g=this.data.subarray(this.index,_);break;case"array":case"nodebuffer":g=this.data.slice(this.index,_)}return this.index=_,this.push({data:g,meta:{percent:this.max?this.index/this.max*100:0}})},s.exports=o},{"../utils":32,"./GenericWorker":28}],28:[function(r,s,u){function f(c){this.name=c||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}f.prototype={push:function(c){this.emit("data",c)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(c){this.emit("error",c)}return!0},error:function(c){return!this.isFinished&&(this.isPaused?this.generatedError=c:(this.isFinished=!0,this.emit("error",c),this.previous&&this.previous.error(c),this.cleanUp()),!0)},on:function(c,o){return this._listeners[c].push(o),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(c,o){if(this._listeners[c])for(var g=0;g<this._listeners[c].length;g++)this._listeners[c][g].call(this,o)},pipe:function(c){return c.registerPrevious(this)},registerPrevious:function(c){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=c.streamInfo,this.mergeStreamInfo(),this.previous=c;var o=this;return c.on("data",function(g){o.processChunk(g)}),c.on("end",function(){o.end()}),c.on("error",function(g){o.error(g)}),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var c=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),c=!0),this.previous&&this.previous.resume(),!c},flush:function(){},processChunk:function(c){this.push(c)},withStreamInfo:function(c,o){return this.extraStreamInfo[c]=o,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var c in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,c)&&(this.streamInfo[c]=this.extraStreamInfo[c])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var c="Worker "+this.name;return this.previous?this.previous+" -> "+c:c}},s.exports=f},{}],29:[function(r,s,u){var f=r("../utils"),c=r("./ConvertWorker"),o=r("./GenericWorker"),g=r("../base64"),_=r("../support"),b=r("../external"),x=null;if(_.nodestream)try{x=r("../nodejs/NodejsStreamOutputAdapter")}catch{}function m(A,S){return new b.Promise(function(N,T){var k=[],j=A._internalType,U=A._outputType,B=A._mimeType;A.on("data",function(W,X){k.push(W),S&&S(X)}).on("error",function(W){k=[],T(W)}).on("end",function(){try{var W=(function(X,Q,I){switch(X){case"blob":return f.newBlob(f.transformTo("arraybuffer",Q),I);case"base64":return g.encode(Q);default:return f.transformTo(X,Q)}})(U,(function(X,Q){var I,ut=0,vt=null,R=0;for(I=0;I<Q.length;I++)R+=Q[I].length;switch(X){case"string":return Q.join("");case"array":return Array.prototype.concat.apply([],Q);case"uint8array":for(vt=new Uint8Array(R),I=0;I<Q.length;I++)vt.set(Q[I],ut),ut+=Q[I].length;return vt;case"nodebuffer":return Buffer.concat(Q);default:throw new Error("concat : unsupported type '"+X+"'")}})(j,k),B);N(W)}catch(X){T(X)}k=[]}).resume()})}function v(A,S,N){var T=S;switch(S){case"blob":case"arraybuffer":T="uint8array";break;case"base64":T="string"}try{this._internalType=T,this._outputType=S,this._mimeType=N,f.checkSupport(T),this._worker=A.pipe(new c(T)),A.lock()}catch(k){this._worker=new o("error"),this._worker.error(k)}}v.prototype={accumulate:function(A){return m(this,A)},on:function(A,S){var N=this;return A==="data"?this._worker.on(A,function(T){S.call(N,T.data,T.meta)}):this._worker.on(A,function(){f.delay(S,arguments,N)}),this},resume:function(){return f.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(A){if(f.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new x(this,{objectMode:this._outputType!=="nodebuffer"},A)}},s.exports=v},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(r,s,u){if(u.base64=!0,u.array=!0,u.string=!0,u.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",u.nodebuffer=typeof Buffer<"u",u.uint8array=typeof Uint8Array<"u",typeof ArrayBuffer>"u")u.blob=!1;else{var f=new ArrayBuffer(0);try{u.blob=new Blob([f],{type:"application/zip"}).size===0}catch{try{var c=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);c.append(f),u.blob=c.getBlob("application/zip").size===0}catch{u.blob=!1}}}try{u.nodestream=!!r("readable-stream").Readable}catch{u.nodestream=!1}},{"readable-stream":16}],31:[function(r,s,u){for(var f=r("./utils"),c=r("./support"),o=r("./nodejsUtils"),g=r("./stream/GenericWorker"),_=new Array(256),b=0;b<256;b++)_[b]=252<=b?6:248<=b?5:240<=b?4:224<=b?3:192<=b?2:1;_[254]=_[254]=1;function x(){g.call(this,"utf-8 decode"),this.leftOver=null}function m(){g.call(this,"utf-8 encode")}u.utf8encode=function(v){return c.nodebuffer?o.newBufferFrom(v,"utf-8"):(function(A){var S,N,T,k,j,U=A.length,B=0;for(k=0;k<U;k++)(64512&(N=A.charCodeAt(k)))==55296&&k+1<U&&(64512&(T=A.charCodeAt(k+1)))==56320&&(N=65536+(N-55296<<10)+(T-56320),k++),B+=N<128?1:N<2048?2:N<65536?3:4;for(S=c.uint8array?new Uint8Array(B):new Array(B),k=j=0;j<B;k++)(64512&(N=A.charCodeAt(k)))==55296&&k+1<U&&(64512&(T=A.charCodeAt(k+1)))==56320&&(N=65536+(N-55296<<10)+(T-56320),k++),N<128?S[j++]=N:(N<2048?S[j++]=192|N>>>6:(N<65536?S[j++]=224|N>>>12:(S[j++]=240|N>>>18,S[j++]=128|N>>>12&63),S[j++]=128|N>>>6&63),S[j++]=128|63&N);return S})(v)},u.utf8decode=function(v){return c.nodebuffer?f.transformTo("nodebuffer",v).toString("utf-8"):(function(A){var S,N,T,k,j=A.length,U=new Array(2*j);for(S=N=0;S<j;)if((T=A[S++])<128)U[N++]=T;else if(4<(k=_[T]))U[N++]=65533,S+=k-1;else{for(T&=k===2?31:k===3?15:7;1<k&&S<j;)T=T<<6|63&A[S++],k--;1<k?U[N++]=65533:T<65536?U[N++]=T:(T-=65536,U[N++]=55296|T>>10&1023,U[N++]=56320|1023&T)}return U.length!==N&&(U.subarray?U=U.subarray(0,N):U.length=N),f.applyFromCharCode(U)})(v=f.transformTo(c.uint8array?"uint8array":"array",v))},f.inherits(x,g),x.prototype.processChunk=function(v){var A=f.transformTo(c.uint8array?"uint8array":"array",v.data);if(this.leftOver&&this.leftOver.length){if(c.uint8array){var S=A;(A=new Uint8Array(S.length+this.leftOver.length)).set(this.leftOver,0),A.set(S,this.leftOver.length)}else A=this.leftOver.concat(A);this.leftOver=null}var N=(function(k,j){var U;for((j=j||k.length)>k.length&&(j=k.length),U=j-1;0<=U&&(192&k[U])==128;)U--;return U<0||U===0?j:U+_[k[U]]>j?U:j})(A),T=A;N!==A.length&&(c.uint8array?(T=A.subarray(0,N),this.leftOver=A.subarray(N,A.length)):(T=A.slice(0,N),this.leftOver=A.slice(N,A.length))),this.push({data:u.utf8decode(T),meta:v.meta})},x.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:u.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},u.Utf8DecodeWorker=x,f.inherits(m,g),m.prototype.processChunk=function(v){this.push({data:u.utf8encode(v.data),meta:v.meta})},u.Utf8EncodeWorker=m},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(r,s,u){var f=r("./support"),c=r("./base64"),o=r("./nodejsUtils"),g=r("./external");function _(S){return S}function b(S,N){for(var T=0;T<S.length;++T)N[T]=255&S.charCodeAt(T);return N}r("setimmediate"),u.newBlob=function(S,N){u.checkSupport("blob");try{return new Blob([S],{type:N})}catch{try{var T=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return T.append(S),T.getBlob(N)}catch{throw new Error("Bug : can't construct the Blob.")}}};var x={stringifyByChunk:function(S,N,T){var k=[],j=0,U=S.length;if(U<=T)return String.fromCharCode.apply(null,S);for(;j<U;)N==="array"||N==="nodebuffer"?k.push(String.fromCharCode.apply(null,S.slice(j,Math.min(j+T,U)))):k.push(String.fromCharCode.apply(null,S.subarray(j,Math.min(j+T,U)))),j+=T;return k.join("")},stringifyByChar:function(S){for(var N="",T=0;T<S.length;T++)N+=String.fromCharCode(S[T]);return N},applyCanBeUsed:{uint8array:(function(){try{return f.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return!1}})(),nodebuffer:(function(){try{return f.nodebuffer&&String.fromCharCode.apply(null,o.allocBuffer(1)).length===1}catch{return!1}})()}};function m(S){var N=65536,T=u.getTypeOf(S),k=!0;if(T==="uint8array"?k=x.applyCanBeUsed.uint8array:T==="nodebuffer"&&(k=x.applyCanBeUsed.nodebuffer),k)for(;1<N;)try{return x.stringifyByChunk(S,T,N)}catch{N=Math.floor(N/2)}return x.stringifyByChar(S)}function v(S,N){for(var T=0;T<S.length;T++)N[T]=S[T];return N}u.applyFromCharCode=m;var A={};A.string={string:_,array:function(S){return b(S,new Array(S.length))},arraybuffer:function(S){return A.string.uint8array(S).buffer},uint8array:function(S){return b(S,new Uint8Array(S.length))},nodebuffer:function(S){return b(S,o.allocBuffer(S.length))}},A.array={string:m,array:_,arraybuffer:function(S){return new Uint8Array(S).buffer},uint8array:function(S){return new Uint8Array(S)},nodebuffer:function(S){return o.newBufferFrom(S)}},A.arraybuffer={string:function(S){return m(new Uint8Array(S))},array:function(S){return v(new Uint8Array(S),new Array(S.byteLength))},arraybuffer:_,uint8array:function(S){return new Uint8Array(S)},nodebuffer:function(S){return o.newBufferFrom(new Uint8Array(S))}},A.uint8array={string:m,array:function(S){return v(S,new Array(S.length))},arraybuffer:function(S){return S.buffer},uint8array:_,nodebuffer:function(S){return o.newBufferFrom(S)}},A.nodebuffer={string:m,array:function(S){return v(S,new Array(S.length))},arraybuffer:function(S){return A.nodebuffer.uint8array(S).buffer},uint8array:function(S){return v(S,new Uint8Array(S.length))},nodebuffer:_},u.transformTo=function(S,N){if(N=N||"",!S)return N;u.checkSupport(S);var T=u.getTypeOf(N);return A[T][S](N)},u.resolve=function(S){for(var N=S.split("/"),T=[],k=0;k<N.length;k++){var j=N[k];j==="."||j===""&&k!==0&&k!==N.length-1||(j===".."?T.pop():T.push(j))}return T.join("/")},u.getTypeOf=function(S){if(typeof S=="string")return"string";var N=Object.prototype.toString.call(S);return N==="[object Array]"?"array":f.nodebuffer&&o.isBuffer(S)?"nodebuffer":f.uint8array&&N==="[object Uint8Array]"?"uint8array":f.arraybuffer&&N==="[object ArrayBuffer]"?"arraybuffer":void 0},u.checkSupport=function(S){if(!f[S.toLowerCase()])throw new Error(S+" is not supported by this platform")},u.MAX_VALUE_16BITS=65535,u.MAX_VALUE_32BITS=-1,u.pretty=function(S){var N,T,k="";for(T=0;T<(S||"").length;T++)k+="\\x"+((N=S.charCodeAt(T))<16?"0":"")+N.toString(16).toUpperCase();return k},u.delay=function(S,N,T){setImmediate(function(){S.apply(T||null,N||[])})},u.inherits=function(S,N){function T(){}T.prototype=N.prototype,S.prototype=new T},u.extend=function(){var S,N,T={};for(S=0;S<arguments.length;S++)for(N in arguments[S])Object.prototype.hasOwnProperty.call(arguments[S],N)&&T[N]===void 0&&(T[N]=arguments[S][N]);return T},u.prepareContent=function(S,N,T,k,j){return g.Promise.resolve(N).then(function(U){return f.blob&&(U instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(U))!==-1)?Blob.prototype.arrayBuffer!==void 0?U.arrayBuffer():typeof FileReader<"u"?new g.Promise(function(B,W){var X=new FileReader;X.onload=function(Q){B(Q.target.result)},X.onerror=function(Q){W(Q.target.error)},X.readAsArrayBuffer(U)}):g.Promise.reject(new Error(S+" is a Blob, but we have no way of reading it.")):U}).then(function(U){var B=u.getTypeOf(U);return B?(B==="arraybuffer"?U=u.transformTo("uint8array",U):B==="string"&&(j?U=c.decode(U):T&&k!==!0&&(U=(function(W){return b(W,f.uint8array?new Uint8Array(W.length):new Array(W.length))})(U))),U):g.Promise.reject(new Error("Can't read the data of '"+S+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(r,s,u){var f=r("./reader/readerFor"),c=r("./utils"),o=r("./signature"),g=r("./zipEntry"),_=r("./support");function b(x){this.files=[],this.loadOptions=x}b.prototype={checkSignature:function(x){if(!this.reader.readAndCheckSignature(x)){this.reader.index-=4;var m=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+c.pretty(m)+", expected "+c.pretty(x)+")")}},isSignature:function(x,m){var v=this.reader.index;this.reader.setIndex(x);var A=this.reader.readString(4)===m;return this.reader.setIndex(v),A},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var x=this.reader.readData(this.zipCommentLength),m=_.uint8array?"uint8array":"array",v=c.transformTo(m,x);this.zipComment=this.loadOptions.decodeFileName(v)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var x,m,v,A=this.zip64EndOfCentralSize-44;0<A;)x=this.reader.readInt(2),m=this.reader.readInt(4),v=this.reader.readData(m),this.zip64ExtensibleData[x]={id:x,length:m,value:v}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var x,m;for(x=0;x<this.files.length;x++)m=this.files[x],this.reader.setIndex(m.localHeaderOffset),this.checkSignature(o.LOCAL_FILE_HEADER),m.readLocalPart(this.reader),m.handleUTF8(),m.processAttributes()},readCentralDir:function(){var x;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(o.CENTRAL_FILE_HEADER);)(x=new g({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(x);if(this.centralDirRecords!==this.files.length&&this.centralDirRecords!==0&&this.files.length===0)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var x=this.reader.lastIndexOfSignature(o.CENTRAL_DIRECTORY_END);if(x<0)throw this.isSignature(0,o.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");this.reader.setIndex(x);var m=x;if(this.checkSignature(o.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===c.MAX_VALUE_16BITS||this.diskWithCentralDirStart===c.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===c.MAX_VALUE_16BITS||this.centralDirRecords===c.MAX_VALUE_16BITS||this.centralDirSize===c.MAX_VALUE_32BITS||this.centralDirOffset===c.MAX_VALUE_32BITS){if(this.zip64=!0,(x=this.reader.lastIndexOfSignature(o.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(x),this.checkSignature(o.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,o.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(o.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(o.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var v=this.centralDirOffset+this.centralDirSize;this.zip64&&(v+=20,v+=12+this.zip64EndOfCentralSize);var A=m-v;if(0<A)this.isSignature(m,o.CENTRAL_FILE_HEADER)||(this.reader.zero=A);else if(A<0)throw new Error("Corrupted zip: missing "+Math.abs(A)+" bytes.")},prepareReader:function(x){this.reader=f(x)},load:function(x){this.prepareReader(x),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},s.exports=b},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(r,s,u){var f=r("./reader/readerFor"),c=r("./utils"),o=r("./compressedObject"),g=r("./crc32"),_=r("./utf8"),b=r("./compressions"),x=r("./support");function m(v,A){this.options=v,this.loadOptions=A}m.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(v){var A,S;if(v.skip(22),this.fileNameLength=v.readInt(2),S=v.readInt(2),this.fileName=v.readData(this.fileNameLength),v.skip(S),this.compressedSize===-1||this.uncompressedSize===-1)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if((A=(function(N){for(var T in b)if(Object.prototype.hasOwnProperty.call(b,T)&&b[T].magic===N)return b[T];return null})(this.compressionMethod))===null)throw new Error("Corrupted zip : compression "+c.pretty(this.compressionMethod)+" unknown (inner file : "+c.transformTo("string",this.fileName)+")");this.decompressed=new o(this.compressedSize,this.uncompressedSize,this.crc32,A,v.readData(this.compressedSize))},readCentralPart:function(v){this.versionMadeBy=v.readInt(2),v.skip(2),this.bitFlag=v.readInt(2),this.compressionMethod=v.readString(2),this.date=v.readDate(),this.crc32=v.readInt(4),this.compressedSize=v.readInt(4),this.uncompressedSize=v.readInt(4);var A=v.readInt(2);if(this.extraFieldsLength=v.readInt(2),this.fileCommentLength=v.readInt(2),this.diskNumberStart=v.readInt(2),this.internalFileAttributes=v.readInt(2),this.externalFileAttributes=v.readInt(4),this.localHeaderOffset=v.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");v.skip(A),this.readExtraFields(v),this.parseZIP64ExtraField(v),this.fileComment=v.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var v=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),v==0&&(this.dosPermissions=63&this.externalFileAttributes),v==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var v=f(this.extraFields[1].value);this.uncompressedSize===c.MAX_VALUE_32BITS&&(this.uncompressedSize=v.readInt(8)),this.compressedSize===c.MAX_VALUE_32BITS&&(this.compressedSize=v.readInt(8)),this.localHeaderOffset===c.MAX_VALUE_32BITS&&(this.localHeaderOffset=v.readInt(8)),this.diskNumberStart===c.MAX_VALUE_32BITS&&(this.diskNumberStart=v.readInt(4))}},readExtraFields:function(v){var A,S,N,T=v.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});v.index+4<T;)A=v.readInt(2),S=v.readInt(2),N=v.readData(S),this.extraFields[A]={id:A,length:S,value:N};v.setIndex(T)},handleUTF8:function(){var v=x.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=_.utf8decode(this.fileName),this.fileCommentStr=_.utf8decode(this.fileComment);else{var A=this.findExtraFieldUnicodePath();if(A!==null)this.fileNameStr=A;else{var S=c.transformTo(v,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(S)}var N=this.findExtraFieldUnicodeComment();if(N!==null)this.fileCommentStr=N;else{var T=c.transformTo(v,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(T)}}},findExtraFieldUnicodePath:function(){var v=this.extraFields[28789];if(v){var A=f(v.value);return A.readInt(1)!==1||g(this.fileName)!==A.readInt(4)?null:_.utf8decode(A.readData(v.length-5))}return null},findExtraFieldUnicodeComment:function(){var v=this.extraFields[25461];if(v){var A=f(v.value);return A.readInt(1)!==1||g(this.fileComment)!==A.readInt(4)?null:_.utf8decode(A.readData(v.length-5))}return null}},s.exports=m},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(r,s,u){function f(A,S,N){this.name=A,this.dir=N.dir,this.date=N.date,this.comment=N.comment,this.unixPermissions=N.unixPermissions,this.dosPermissions=N.dosPermissions,this._data=S,this._dataBinary=N.binary,this.options={compression:N.compression,compressionOptions:N.compressionOptions}}var c=r("./stream/StreamHelper"),o=r("./stream/DataWorker"),g=r("./utf8"),_=r("./compressedObject"),b=r("./stream/GenericWorker");f.prototype={internalStream:function(A){var S=null,N="string";try{if(!A)throw new Error("No output type specified.");var T=(N=A.toLowerCase())==="string"||N==="text";N!=="binarystring"&&N!=="text"||(N="string"),S=this._decompressWorker();var k=!this._dataBinary;k&&!T&&(S=S.pipe(new g.Utf8EncodeWorker)),!k&&T&&(S=S.pipe(new g.Utf8DecodeWorker))}catch(j){(S=new b("error")).error(j)}return new c(S,N,"")},async:function(A,S){return this.internalStream(A).accumulate(S)},nodeStream:function(A,S){return this.internalStream(A||"nodebuffer").toNodejsStream(S)},_compressWorker:function(A,S){if(this._data instanceof _&&this._data.compression.magic===A.magic)return this._data.getCompressedWorker();var N=this._decompressWorker();return this._dataBinary||(N=N.pipe(new g.Utf8EncodeWorker)),_.createWorkerFrom(N,A,S)},_decompressWorker:function(){return this._data instanceof _?this._data.getContentWorker():this._data instanceof b?this._data:new o(this._data)}};for(var x=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],m=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},v=0;v<x.length;v++)f.prototype[x[v]]=m;s.exports=f},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(r,s,u){(function(f){var c,o,g=f.MutationObserver||f.WebKitMutationObserver;if(g){var _=0,b=new g(A),x=f.document.createTextNode("");b.observe(x,{characterData:!0}),c=function(){x.data=_=++_%2}}else if(f.setImmediate||f.MessageChannel===void 0)c="document"in f&&"onreadystatechange"in f.document.createElement("script")?function(){var S=f.document.createElement("script");S.onreadystatechange=function(){A(),S.onreadystatechange=null,S.parentNode.removeChild(S),S=null},f.document.documentElement.appendChild(S)}:function(){setTimeout(A,0)};else{var m=new f.MessageChannel;m.port1.onmessage=A,c=function(){m.port2.postMessage(0)}}var v=[];function A(){var S,N;o=!0;for(var T=v.length;T;){for(N=v,v=[],S=-1;++S<T;)N[S]();T=v.length}o=!1}s.exports=function(S){v.push(S)!==1||o||c()}}).call(this,typeof cs<"u"?cs:typeof self<"u"?self:typeof window<"u"?window:{})},{}],37:[function(r,s,u){var f=r("immediate");function c(){}var o={},g=["REJECTED"],_=["FULFILLED"],b=["PENDING"];function x(T){if(typeof T!="function")throw new TypeError("resolver must be a function");this.state=b,this.queue=[],this.outcome=void 0,T!==c&&S(this,T)}function m(T,k,j){this.promise=T,typeof k=="function"&&(this.onFulfilled=k,this.callFulfilled=this.otherCallFulfilled),typeof j=="function"&&(this.onRejected=j,this.callRejected=this.otherCallRejected)}function v(T,k,j){f(function(){var U;try{U=k(j)}catch(B){return o.reject(T,B)}U===T?o.reject(T,new TypeError("Cannot resolve promise with itself")):o.resolve(T,U)})}function A(T){var k=T&&T.then;if(T&&(typeof T=="object"||typeof T=="function")&&typeof k=="function")return function(){k.apply(T,arguments)}}function S(T,k){var j=!1;function U(X){j||(j=!0,o.reject(T,X))}function B(X){j||(j=!0,o.resolve(T,X))}var W=N(function(){k(B,U)});W.status==="error"&&U(W.value)}function N(T,k){var j={};try{j.value=T(k),j.status="success"}catch(U){j.status="error",j.value=U}return j}(s.exports=x).prototype.finally=function(T){if(typeof T!="function")return this;var k=this.constructor;return this.then(function(j){return k.resolve(T()).then(function(){return j})},function(j){return k.resolve(T()).then(function(){throw j})})},x.prototype.catch=function(T){return this.then(null,T)},x.prototype.then=function(T,k){if(typeof T!="function"&&this.state===_||typeof k!="function"&&this.state===g)return this;var j=new this.constructor(c);return this.state!==b?v(j,this.state===_?T:k,this.outcome):this.queue.push(new m(j,T,k)),j},m.prototype.callFulfilled=function(T){o.resolve(this.promise,T)},m.prototype.otherCallFulfilled=function(T){v(this.promise,this.onFulfilled,T)},m.prototype.callRejected=function(T){o.reject(this.promise,T)},m.prototype.otherCallRejected=function(T){v(this.promise,this.onRejected,T)},o.resolve=function(T,k){var j=N(A,k);if(j.status==="error")return o.reject(T,j.value);var U=j.value;if(U)S(T,U);else{T.state=_,T.outcome=k;for(var B=-1,W=T.queue.length;++B<W;)T.queue[B].callFulfilled(k)}return T},o.reject=function(T,k){T.state=g,T.outcome=k;for(var j=-1,U=T.queue.length;++j<U;)T.queue[j].callRejected(k);return T},x.resolve=function(T){return T instanceof this?T:o.resolve(new this(c),T)},x.reject=function(T){var k=new this(c);return o.reject(k,T)},x.all=function(T){var k=this;if(Object.prototype.toString.call(T)!=="[object Array]")return this.reject(new TypeError("must be an array"));var j=T.length,U=!1;if(!j)return this.resolve([]);for(var B=new Array(j),W=0,X=-1,Q=new this(c);++X<j;)I(T[X],X);return Q;function I(ut,vt){k.resolve(ut).then(function(R){B[vt]=R,++W!==j||U||(U=!0,o.resolve(Q,B))},function(R){U||(U=!0,o.reject(Q,R))})}},x.race=function(T){var k=this;if(Object.prototype.toString.call(T)!=="[object Array]")return this.reject(new TypeError("must be an array"));var j=T.length,U=!1;if(!j)return this.resolve([]);for(var B=-1,W=new this(c);++B<j;)X=T[B],k.resolve(X).then(function(Q){U||(U=!0,o.resolve(W,Q))},function(Q){U||(U=!0,o.reject(W,Q))});var X;return W}},{immediate:36}],38:[function(r,s,u){var f={};(0,r("./lib/utils/common").assign)(f,r("./lib/deflate"),r("./lib/inflate"),r("./lib/zlib/constants")),s.exports=f},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(r,s,u){var f=r("./zlib/deflate"),c=r("./utils/common"),o=r("./utils/strings"),g=r("./zlib/messages"),_=r("./zlib/zstream"),b=Object.prototype.toString,x=0,m=-1,v=0,A=8;function S(T){if(!(this instanceof S))return new S(T);this.options=c.assign({level:m,method:A,chunkSize:16384,windowBits:15,memLevel:8,strategy:v,to:""},T||{});var k=this.options;k.raw&&0<k.windowBits?k.windowBits=-k.windowBits:k.gzip&&0<k.windowBits&&k.windowBits<16&&(k.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new _,this.strm.avail_out=0;var j=f.deflateInit2(this.strm,k.level,k.method,k.windowBits,k.memLevel,k.strategy);if(j!==x)throw new Error(g[j]);if(k.header&&f.deflateSetHeader(this.strm,k.header),k.dictionary){var U;if(U=typeof k.dictionary=="string"?o.string2buf(k.dictionary):b.call(k.dictionary)==="[object ArrayBuffer]"?new Uint8Array(k.dictionary):k.dictionary,(j=f.deflateSetDictionary(this.strm,U))!==x)throw new Error(g[j]);this._dict_set=!0}}function N(T,k){var j=new S(k);if(j.push(T,!0),j.err)throw j.msg||g[j.err];return j.result}S.prototype.push=function(T,k){var j,U,B=this.strm,W=this.options.chunkSize;if(this.ended)return!1;U=k===~~k?k:k===!0?4:0,typeof T=="string"?B.input=o.string2buf(T):b.call(T)==="[object ArrayBuffer]"?B.input=new Uint8Array(T):B.input=T,B.next_in=0,B.avail_in=B.input.length;do{if(B.avail_out===0&&(B.output=new c.Buf8(W),B.next_out=0,B.avail_out=W),(j=f.deflate(B,U))!==1&&j!==x)return this.onEnd(j),!(this.ended=!0);B.avail_out!==0&&(B.avail_in!==0||U!==4&&U!==2)||(this.options.to==="string"?this.onData(o.buf2binstring(c.shrinkBuf(B.output,B.next_out))):this.onData(c.shrinkBuf(B.output,B.next_out)))}while((0<B.avail_in||B.avail_out===0)&&j!==1);return U===4?(j=f.deflateEnd(this.strm),this.onEnd(j),this.ended=!0,j===x):U!==2||(this.onEnd(x),!(B.avail_out=0))},S.prototype.onData=function(T){this.chunks.push(T)},S.prototype.onEnd=function(T){T===x&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=c.flattenChunks(this.chunks)),this.chunks=[],this.err=T,this.msg=this.strm.msg},u.Deflate=S,u.deflate=N,u.deflateRaw=function(T,k){return(k=k||{}).raw=!0,N(T,k)},u.gzip=function(T,k){return(k=k||{}).gzip=!0,N(T,k)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(r,s,u){var f=r("./zlib/inflate"),c=r("./utils/common"),o=r("./utils/strings"),g=r("./zlib/constants"),_=r("./zlib/messages"),b=r("./zlib/zstream"),x=r("./zlib/gzheader"),m=Object.prototype.toString;function v(S){if(!(this instanceof v))return new v(S);this.options=c.assign({chunkSize:16384,windowBits:0,to:""},S||{});var N=this.options;N.raw&&0<=N.windowBits&&N.windowBits<16&&(N.windowBits=-N.windowBits,N.windowBits===0&&(N.windowBits=-15)),!(0<=N.windowBits&&N.windowBits<16)||S&&S.windowBits||(N.windowBits+=32),15<N.windowBits&&N.windowBits<48&&(15&N.windowBits)==0&&(N.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new b,this.strm.avail_out=0;var T=f.inflateInit2(this.strm,N.windowBits);if(T!==g.Z_OK)throw new Error(_[T]);this.header=new x,f.inflateGetHeader(this.strm,this.header)}function A(S,N){var T=new v(N);if(T.push(S,!0),T.err)throw T.msg||_[T.err];return T.result}v.prototype.push=function(S,N){var T,k,j,U,B,W,X=this.strm,Q=this.options.chunkSize,I=this.options.dictionary,ut=!1;if(this.ended)return!1;k=N===~~N?N:N===!0?g.Z_FINISH:g.Z_NO_FLUSH,typeof S=="string"?X.input=o.binstring2buf(S):m.call(S)==="[object ArrayBuffer]"?X.input=new Uint8Array(S):X.input=S,X.next_in=0,X.avail_in=X.input.length;do{if(X.avail_out===0&&(X.output=new c.Buf8(Q),X.next_out=0,X.avail_out=Q),(T=f.inflate(X,g.Z_NO_FLUSH))===g.Z_NEED_DICT&&I&&(W=typeof I=="string"?o.string2buf(I):m.call(I)==="[object ArrayBuffer]"?new Uint8Array(I):I,T=f.inflateSetDictionary(this.strm,W)),T===g.Z_BUF_ERROR&&ut===!0&&(T=g.Z_OK,ut=!1),T!==g.Z_STREAM_END&&T!==g.Z_OK)return this.onEnd(T),!(this.ended=!0);X.next_out&&(X.avail_out!==0&&T!==g.Z_STREAM_END&&(X.avail_in!==0||k!==g.Z_FINISH&&k!==g.Z_SYNC_FLUSH)||(this.options.to==="string"?(j=o.utf8border(X.output,X.next_out),U=X.next_out-j,B=o.buf2string(X.output,j),X.next_out=U,X.avail_out=Q-U,U&&c.arraySet(X.output,X.output,j,U,0),this.onData(B)):this.onData(c.shrinkBuf(X.output,X.next_out)))),X.avail_in===0&&X.avail_out===0&&(ut=!0)}while((0<X.avail_in||X.avail_out===0)&&T!==g.Z_STREAM_END);return T===g.Z_STREAM_END&&(k=g.Z_FINISH),k===g.Z_FINISH?(T=f.inflateEnd(this.strm),this.onEnd(T),this.ended=!0,T===g.Z_OK):k!==g.Z_SYNC_FLUSH||(this.onEnd(g.Z_OK),!(X.avail_out=0))},v.prototype.onData=function(S){this.chunks.push(S)},v.prototype.onEnd=function(S){S===g.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=c.flattenChunks(this.chunks)),this.chunks=[],this.err=S,this.msg=this.strm.msg},u.Inflate=v,u.inflate=A,u.inflateRaw=function(S,N){return(N=N||{}).raw=!0,A(S,N)},u.ungzip=A},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(r,s,u){var f=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";u.assign=function(g){for(var _=Array.prototype.slice.call(arguments,1);_.length;){var b=_.shift();if(b){if(typeof b!="object")throw new TypeError(b+"must be non-object");for(var x in b)b.hasOwnProperty(x)&&(g[x]=b[x])}}return g},u.shrinkBuf=function(g,_){return g.length===_?g:g.subarray?g.subarray(0,_):(g.length=_,g)};var c={arraySet:function(g,_,b,x,m){if(_.subarray&&g.subarray)g.set(_.subarray(b,b+x),m);else for(var v=0;v<x;v++)g[m+v]=_[b+v]},flattenChunks:function(g){var _,b,x,m,v,A;for(_=x=0,b=g.length;_<b;_++)x+=g[_].length;for(A=new Uint8Array(x),_=m=0,b=g.length;_<b;_++)v=g[_],A.set(v,m),m+=v.length;return A}},o={arraySet:function(g,_,b,x,m){for(var v=0;v<x;v++)g[m+v]=_[b+v]},flattenChunks:function(g){return[].concat.apply([],g)}};u.setTyped=function(g){g?(u.Buf8=Uint8Array,u.Buf16=Uint16Array,u.Buf32=Int32Array,u.assign(u,c)):(u.Buf8=Array,u.Buf16=Array,u.Buf32=Array,u.assign(u,o))},u.setTyped(f)},{}],42:[function(r,s,u){var f=r("./common"),c=!0,o=!0;try{String.fromCharCode.apply(null,[0])}catch{c=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{o=!1}for(var g=new f.Buf8(256),_=0;_<256;_++)g[_]=252<=_?6:248<=_?5:240<=_?4:224<=_?3:192<=_?2:1;function b(x,m){if(m<65537&&(x.subarray&&o||!x.subarray&&c))return String.fromCharCode.apply(null,f.shrinkBuf(x,m));for(var v="",A=0;A<m;A++)v+=String.fromCharCode(x[A]);return v}g[254]=g[254]=1,u.string2buf=function(x){var m,v,A,S,N,T=x.length,k=0;for(S=0;S<T;S++)(64512&(v=x.charCodeAt(S)))==55296&&S+1<T&&(64512&(A=x.charCodeAt(S+1)))==56320&&(v=65536+(v-55296<<10)+(A-56320),S++),k+=v<128?1:v<2048?2:v<65536?3:4;for(m=new f.Buf8(k),S=N=0;N<k;S++)(64512&(v=x.charCodeAt(S)))==55296&&S+1<T&&(64512&(A=x.charCodeAt(S+1)))==56320&&(v=65536+(v-55296<<10)+(A-56320),S++),v<128?m[N++]=v:(v<2048?m[N++]=192|v>>>6:(v<65536?m[N++]=224|v>>>12:(m[N++]=240|v>>>18,m[N++]=128|v>>>12&63),m[N++]=128|v>>>6&63),m[N++]=128|63&v);return m},u.buf2binstring=function(x){return b(x,x.length)},u.binstring2buf=function(x){for(var m=new f.Buf8(x.length),v=0,A=m.length;v<A;v++)m[v]=x.charCodeAt(v);return m},u.buf2string=function(x,m){var v,A,S,N,T=m||x.length,k=new Array(2*T);for(v=A=0;v<T;)if((S=x[v++])<128)k[A++]=S;else if(4<(N=g[S]))k[A++]=65533,v+=N-1;else{for(S&=N===2?31:N===3?15:7;1<N&&v<T;)S=S<<6|63&x[v++],N--;1<N?k[A++]=65533:S<65536?k[A++]=S:(S-=65536,k[A++]=55296|S>>10&1023,k[A++]=56320|1023&S)}return b(k,A)},u.utf8border=function(x,m){var v;for((m=m||x.length)>x.length&&(m=x.length),v=m-1;0<=v&&(192&x[v])==128;)v--;return v<0||v===0?m:v+g[x[v]]>m?v:m}},{"./common":41}],43:[function(r,s,u){s.exports=function(f,c,o,g){for(var _=65535&f|0,b=f>>>16&65535|0,x=0;o!==0;){for(o-=x=2e3<o?2e3:o;b=b+(_=_+c[g++]|0)|0,--x;);_%=65521,b%=65521}return _|b<<16|0}},{}],44:[function(r,s,u){s.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}},{}],45:[function(r,s,u){var f=(function(){for(var c,o=[],g=0;g<256;g++){c=g;for(var _=0;_<8;_++)c=1&c?3988292384^c>>>1:c>>>1;o[g]=c}return o})();s.exports=function(c,o,g,_){var b=f,x=_+g;c^=-1;for(var m=_;m<x;m++)c=c>>>8^b[255&(c^o[m])];return-1^c}},{}],46:[function(r,s,u){var f,c=r("../utils/common"),o=r("./trees"),g=r("./adler32"),_=r("./crc32"),b=r("./messages"),x=0,m=4,v=0,A=-2,S=-1,N=4,T=2,k=8,j=9,U=286,B=30,W=19,X=2*U+1,Q=15,I=3,ut=258,vt=ut+I+1,R=42,P=113,w=1,it=2,G=3,L=4;function rt(y,st){return y.msg=b[st],st}function nt(y){return(y<<1)-(4<y?9:0)}function mt(y){for(var st=y.length;0<=--st;)y[st]=0}function $(y){var st=y.state,lt=st.pending;lt>y.avail_out&&(lt=y.avail_out),lt!==0&&(c.arraySet(y.output,st.pending_buf,st.pending_out,lt,y.next_out),y.next_out+=lt,st.pending_out+=lt,y.total_out+=lt,y.avail_out-=lt,st.pending-=lt,st.pending===0&&(st.pending_out=0))}function et(y,st){o._tr_flush_block(y,0<=y.block_start?y.block_start:-1,y.strstart-y.block_start,st),y.block_start=y.strstart,$(y.strm)}function kt(y,st){y.pending_buf[y.pending++]=st}function M(y,st){y.pending_buf[y.pending++]=st>>>8&255,y.pending_buf[y.pending++]=255&st}function K(y,st){var lt,O,C=y.max_chain_length,q=y.strstart,dt=y.prev_length,ht=y.nice_match,tt=y.strstart>y.w_size-vt?y.strstart-(y.w_size-vt):0,gt=y.window,Tt=y.w_mask,yt=y.prev,At=y.strstart+ut,Wt=gt[q+dt-1],Gt=gt[q+dt];y.prev_length>=y.good_match&&(C>>=2),ht>y.lookahead&&(ht=y.lookahead);do if(gt[(lt=st)+dt]===Gt&>[lt+dt-1]===Wt&>[lt]===gt[q]&>[++lt]===gt[q+1]){q+=2,lt++;do;while(gt[++q]===gt[++lt]&>[++q]===gt[++lt]&>[++q]===gt[++lt]&>[++q]===gt[++lt]&>[++q]===gt[++lt]&>[++q]===gt[++lt]&>[++q]===gt[++lt]&>[++q]===gt[++lt]&&q<At);if(O=ut-(At-q),q=At-ut,dt<O){if(y.match_start=st,ht<=(dt=O))break;Wt=gt[q+dt-1],Gt=gt[q+dt]}}while((st=yt[st&Tt])>tt&&--C!=0);return dt<=y.lookahead?dt:y.lookahead}function xt(y){var st,lt,O,C,q,dt,ht,tt,gt,Tt,yt=y.w_size;do{if(C=y.window_size-y.lookahead-y.strstart,y.strstart>=yt+(yt-vt)){for(c.arraySet(y.window,y.window,yt,yt,0),y.match_start-=yt,y.strstart-=yt,y.block_start-=yt,st=lt=y.hash_size;O=y.head[--st],y.head[st]=yt<=O?O-yt:0,--lt;);for(st=lt=yt;O=y.prev[--st],y.prev[st]=yt<=O?O-yt:0,--lt;);C+=yt}if(y.strm.avail_in===0)break;if(dt=y.strm,ht=y.window,tt=y.strstart+y.lookahead,gt=C,Tt=void 0,Tt=dt.avail_in,gt<Tt&&(Tt=gt),lt=Tt===0?0:(dt.avail_in-=Tt,c.arraySet(ht,dt.input,dt.next_in,Tt,tt),dt.state.wrap===1?dt.adler=g(dt.adler,ht,Tt,tt):dt.state.wrap===2&&(dt.adler=_(dt.adler,ht,Tt,tt)),dt.next_in+=Tt,dt.total_in+=Tt,Tt),y.lookahead+=lt,y.lookahead+y.insert>=I)for(q=y.strstart-y.insert,y.ins_h=y.window[q],y.ins_h=(y.ins_h<<y.hash_shift^y.window[q+1])&y.hash_mask;y.insert&&(y.ins_h=(y.ins_h<<y.hash_shift^y.window[q+I-1])&y.hash_mask,y.prev[q&y.w_mask]=y.head[y.ins_h],y.head[y.ins_h]=q,q++,y.insert--,!(y.lookahead+y.insert<I)););}while(y.lookahead<vt&&y.strm.avail_in!==0)}function wt(y,st){for(var lt,O;;){if(y.lookahead<vt){if(xt(y),y.lookahead<vt&&st===x)return w;if(y.lookahead===0)break}if(lt=0,y.lookahead>=I&&(y.ins_h=(y.ins_h<<y.hash_shift^y.window[y.strstart+I-1])&y.hash_mask,lt=y.prev[y.strstart&y.w_mask]=y.head[y.ins_h],y.head[y.ins_h]=y.strstart),lt!==0&&y.strstart-lt<=y.w_size-vt&&(y.match_length=K(y,lt)),y.match_length>=I)if(O=o._tr_tally(y,y.strstart-y.match_start,y.match_length-I),y.lookahead-=y.match_length,y.match_length<=y.max_lazy_match&&y.lookahead>=I){for(y.match_length--;y.strstart++,y.ins_h=(y.ins_h<<y.hash_shift^y.window[y.strstart+I-1])&y.hash_mask,lt=y.prev[y.strstart&y.w_mask]=y.head[y.ins_h],y.head[y.ins_h]=y.strstart,--y.match_length!=0;);y.strstart++}else y.strstart+=y.match_length,y.match_length=0,y.ins_h=y.window[y.strstart],y.ins_h=(y.ins_h<<y.hash_shift^y.window[y.strstart+1])&y.hash_mask;else O=o._tr_tally(y,0,y.window[y.strstart]),y.lookahead--,y.strstart++;if(O&&(et(y,!1),y.strm.avail_out===0))return w}return y.insert=y.strstart<I-1?y.strstart:I-1,st===m?(et(y,!0),y.strm.avail_out===0?G:L):y.last_lit&&(et(y,!1),y.strm.avail_out===0)?w:it}function Nt(y,st){for(var lt,O,C;;){if(y.lookahead<vt){if(xt(y),y.lookahead<vt&&st===x)return w;if(y.lookahead===0)break}if(lt=0,y.lookahead>=I&&(y.ins_h=(y.ins_h<<y.hash_shift^y.window[y.strstart+I-1])&y.hash_mask,lt=y.prev[y.strstart&y.w_mask]=y.head[y.ins_h],y.head[y.ins_h]=y.strstart),y.prev_length=y.match_length,y.prev_match=y.match_start,y.match_length=I-1,lt!==0&&y.prev_length<y.max_lazy_match&&y.strstart-lt<=y.w_size-vt&&(y.match_length=K(y,lt),y.match_length<=5&&(y.strategy===1||y.match_length===I&&4096<y.strstart-y.match_start)&&(y.match_length=I-1)),y.prev_length>=I&&y.match_length<=y.prev_length){for(C=y.strstart+y.lookahead-I,O=o._tr_tally(y,y.strstart-1-y.prev_match,y.prev_length-I),y.lookahead-=y.prev_length-1,y.prev_length-=2;++y.strstart<=C&&(y.ins_h=(y.ins_h<<y.hash_shift^y.window[y.strstart+I-1])&y.hash_mask,lt=y.prev[y.strstart&y.w_mask]=y.head[y.ins_h],y.head[y.ins_h]=y.strstart),--y.prev_length!=0;);if(y.match_available=0,y.match_length=I-1,y.strstart++,O&&(et(y,!1),y.strm.avail_out===0))return w}else if(y.match_available){if((O=o._tr_tally(y,0,y.window[y.strstart-1]))&&et(y,!1),y.strstart++,y.lookahead--,y.strm.avail_out===0)return w}else y.match_available=1,y.strstart++,y.lookahead--}return y.match_available&&(O=o._tr_tally(y,0,y.window[y.strstart-1]),y.match_available=0),y.insert=y.strstart<I-1?y.strstart:I-1,st===m?(et(y,!0),y.strm.avail_out===0?G:L):y.last_lit&&(et(y,!1),y.strm.avail_out===0)?w:it}function ft(y,st,lt,O,C){this.good_length=y,this.max_lazy=st,this.nice_length=lt,this.max_chain=O,this.func=C}function St(){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=k,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 c.Buf16(2*X),this.dyn_dtree=new c.Buf16(2*(2*B+1)),this.bl_tree=new c.Buf16(2*(2*W+1)),mt(this.dyn_ltree),mt(this.dyn_dtree),mt(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new c.Buf16(Q+1),this.heap=new c.Buf16(2*U+1),mt(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new c.Buf16(2*U+1),mt(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 pt(y){var st;return y&&y.state?(y.total_in=y.total_out=0,y.data_type=T,(st=y.state).pending=0,st.pending_out=0,st.wrap<0&&(st.wrap=-st.wrap),st.status=st.wrap?R:P,y.adler=st.wrap===2?0:1,st.last_flush=x,o._tr_init(st),v):rt(y,A)}function _t(y){var st=pt(y);return st===v&&(function(lt){lt.window_size=2*lt.w_size,mt(lt.head),lt.max_lazy_match=f[lt.level].max_lazy,lt.good_match=f[lt.level].good_length,lt.nice_match=f[lt.level].nice_length,lt.max_chain_length=f[lt.level].max_chain,lt.strstart=0,lt.block_start=0,lt.lookahead=0,lt.insert=0,lt.match_length=lt.prev_length=I-1,lt.match_available=0,lt.ins_h=0})(y.state),st}function Ht(y,st,lt,O,C,q){if(!y)return A;var dt=1;if(st===S&&(st=6),O<0?(dt=0,O=-O):15<O&&(dt=2,O-=16),C<1||j<C||lt!==k||O<8||15<O||st<0||9<st||q<0||N<q)return rt(y,A);O===8&&(O=9);var ht=new St;return(y.state=ht).strm=y,ht.wrap=dt,ht.gzhead=null,ht.w_bits=O,ht.w_size=1<<ht.w_bits,ht.w_mask=ht.w_size-1,ht.hash_bits=C+7,ht.hash_size=1<<ht.hash_bits,ht.hash_mask=ht.hash_size-1,ht.hash_shift=~~((ht.hash_bits+I-1)/I),ht.window=new c.Buf8(2*ht.w_size),ht.head=new c.Buf16(ht.hash_size),ht.prev=new c.Buf16(ht.w_size),ht.lit_bufsize=1<<C+6,ht.pending_buf_size=4*ht.lit_bufsize,ht.pending_buf=new c.Buf8(ht.pending_buf_size),ht.d_buf=1*ht.lit_bufsize,ht.l_buf=3*ht.lit_bufsize,ht.level=st,ht.strategy=q,ht.method=lt,_t(y)}f=[new ft(0,0,0,0,function(y,st){var lt=65535;for(lt>y.pending_buf_size-5&&(lt=y.pending_buf_size-5);;){if(y.lookahead<=1){if(xt(y),y.lookahead===0&&st===x)return w;if(y.lookahead===0)break}y.strstart+=y.lookahead,y.lookahead=0;var O=y.block_start+lt;if((y.strstart===0||y.strstart>=O)&&(y.lookahead=y.strstart-O,y.strstart=O,et(y,!1),y.strm.avail_out===0)||y.strstart-y.block_start>=y.w_size-vt&&(et(y,!1),y.strm.avail_out===0))return w}return y.insert=0,st===m?(et(y,!0),y.strm.avail_out===0?G:L):(y.strstart>y.block_start&&(et(y,!1),y.strm.avail_out),w)}),new ft(4,4,8,4,wt),new ft(4,5,16,8,wt),new ft(4,6,32,32,wt),new ft(4,4,16,16,Nt),new ft(8,16,32,32,Nt),new ft(8,16,128,128,Nt),new ft(8,32,128,256,Nt),new ft(32,128,258,1024,Nt),new ft(32,258,258,4096,Nt)],u.deflateInit=function(y,st){return Ht(y,st,k,15,8,0)},u.deflateInit2=Ht,u.deflateReset=_t,u.deflateResetKeep=pt,u.deflateSetHeader=function(y,st){return y&&y.state?y.state.wrap!==2?A:(y.state.gzhead=st,v):A},u.deflate=function(y,st){var lt,O,C,q;if(!y||!y.state||5<st||st<0)return y?rt(y,A):A;if(O=y.state,!y.output||!y.input&&y.avail_in!==0||O.status===666&&st!==m)return rt(y,y.avail_out===0?-5:A);if(O.strm=y,lt=O.last_flush,O.last_flush=st,O.status===R)if(O.wrap===2)y.adler=0,kt(O,31),kt(O,139),kt(O,8),O.gzhead?(kt(O,(O.gzhead.text?1:0)+(O.gzhead.hcrc?2:0)+(O.gzhead.extra?4:0)+(O.gzhead.name?8:0)+(O.gzhead.comment?16:0)),kt(O,255&O.gzhead.time),kt(O,O.gzhead.time>>8&255),kt(O,O.gzhead.time>>16&255),kt(O,O.gzhead.time>>24&255),kt(O,O.level===9?2:2<=O.strategy||O.level<2?4:0),kt(O,255&O.gzhead.os),O.gzhead.extra&&O.gzhead.extra.length&&(kt(O,255&O.gzhead.extra.length),kt(O,O.gzhead.extra.length>>8&255)),O.gzhead.hcrc&&(y.adler=_(y.adler,O.pending_buf,O.pending,0)),O.gzindex=0,O.status=69):(kt(O,0),kt(O,0),kt(O,0),kt(O,0),kt(O,0),kt(O,O.level===9?2:2<=O.strategy||O.level<2?4:0),kt(O,3),O.status=P);else{var dt=k+(O.w_bits-8<<4)<<8;dt|=(2<=O.strategy||O.level<2?0:O.level<6?1:O.level===6?2:3)<<6,O.strstart!==0&&(dt|=32),dt+=31-dt%31,O.status=P,M(O,dt),O.strstart!==0&&(M(O,y.adler>>>16),M(O,65535&y.adler)),y.adler=1}if(O.status===69)if(O.gzhead.extra){for(C=O.pending;O.gzindex<(65535&O.gzhead.extra.length)&&(O.pending!==O.pending_buf_size||(O.gzhead.hcrc&&O.pending>C&&(y.adler=_(y.adler,O.pending_buf,O.pending-C,C)),$(y),C=O.pending,O.pending!==O.pending_buf_size));)kt(O,255&O.gzhead.extra[O.gzindex]),O.gzindex++;O.gzhead.hcrc&&O.pending>C&&(y.adler=_(y.adler,O.pending_buf,O.pending-C,C)),O.gzindex===O.gzhead.extra.length&&(O.gzindex=0,O.status=73)}else O.status=73;if(O.status===73)if(O.gzhead.name){C=O.pending;do{if(O.pending===O.pending_buf_size&&(O.gzhead.hcrc&&O.pending>C&&(y.adler=_(y.adler,O.pending_buf,O.pending-C,C)),$(y),C=O.pending,O.pending===O.pending_buf_size)){q=1;break}q=O.gzindex<O.gzhead.name.length?255&O.gzhead.name.charCodeAt(O.gzindex++):0,kt(O,q)}while(q!==0);O.gzhead.hcrc&&O.pending>C&&(y.adler=_(y.adler,O.pending_buf,O.pending-C,C)),q===0&&(O.gzindex=0,O.status=91)}else O.status=91;if(O.status===91)if(O.gzhead.comment){C=O.pending;do{if(O.pending===O.pending_buf_size&&(O.gzhead.hcrc&&O.pending>C&&(y.adler=_(y.adler,O.pending_buf,O.pending-C,C)),$(y),C=O.pending,O.pending===O.pending_buf_size)){q=1;break}q=O.gzindex<O.gzhead.comment.length?255&O.gzhead.comment.charCodeAt(O.gzindex++):0,kt(O,q)}while(q!==0);O.gzhead.hcrc&&O.pending>C&&(y.adler=_(y.adler,O.pending_buf,O.pending-C,C)),q===0&&(O.status=103)}else O.status=103;if(O.status===103&&(O.gzhead.hcrc?(O.pending+2>O.pending_buf_size&&$(y),O.pending+2<=O.pending_buf_size&&(kt(O,255&y.adler),kt(O,y.adler>>8&255),y.adler=0,O.status=P)):O.status=P),O.pending!==0){if($(y),y.avail_out===0)return O.last_flush=-1,v}else if(y.avail_in===0&&nt(st)<=nt(lt)&&st!==m)return rt(y,-5);if(O.status===666&&y.avail_in!==0)return rt(y,-5);if(y.avail_in!==0||O.lookahead!==0||st!==x&&O.status!==666){var ht=O.strategy===2?(function(tt,gt){for(var Tt;;){if(tt.lookahead===0&&(xt(tt),tt.lookahead===0)){if(gt===x)return w;break}if(tt.match_length=0,Tt=o._tr_tally(tt,0,tt.window[tt.strstart]),tt.lookahead--,tt.strstart++,Tt&&(et(tt,!1),tt.strm.avail_out===0))return w}return tt.insert=0,gt===m?(et(tt,!0),tt.strm.avail_out===0?G:L):tt.last_lit&&(et(tt,!1),tt.strm.avail_out===0)?w:it})(O,st):O.strategy===3?(function(tt,gt){for(var Tt,yt,At,Wt,Gt=tt.window;;){if(tt.lookahead<=ut){if(xt(tt),tt.lookahead<=ut&>===x)return w;if(tt.lookahead===0)break}if(tt.match_length=0,tt.lookahead>=I&&0<tt.strstart&&(yt=Gt[At=tt.strstart-1])===Gt[++At]&&yt===Gt[++At]&&yt===Gt[++At]){Wt=tt.strstart+ut;do;while(yt===Gt[++At]&&yt===Gt[++At]&&yt===Gt[++At]&&yt===Gt[++At]&&yt===Gt[++At]&&yt===Gt[++At]&&yt===Gt[++At]&&yt===Gt[++At]&&At<Wt);tt.match_length=ut-(Wt-At),tt.match_length>tt.lookahead&&(tt.match_length=tt.lookahead)}if(tt.match_length>=I?(Tt=o._tr_tally(tt,1,tt.match_length-I),tt.lookahead-=tt.match_length,tt.strstart+=tt.match_length,tt.match_length=0):(Tt=o._tr_tally(tt,0,tt.window[tt.strstart]),tt.lookahead--,tt.strstart++),Tt&&(et(tt,!1),tt.strm.avail_out===0))return w}return tt.insert=0,gt===m?(et(tt,!0),tt.strm.avail_out===0?G:L):tt.last_lit&&(et(tt,!1),tt.strm.avail_out===0)?w:it})(O,st):f[O.level].func(O,st);if(ht!==G&&ht!==L||(O.status=666),ht===w||ht===G)return y.avail_out===0&&(O.last_flush=-1),v;if(ht===it&&(st===1?o._tr_align(O):st!==5&&(o._tr_stored_block(O,0,0,!1),st===3&&(mt(O.head),O.lookahead===0&&(O.strstart=0,O.block_start=0,O.insert=0))),$(y),y.avail_out===0))return O.last_flush=-1,v}return st!==m?v:O.wrap<=0?1:(O.wrap===2?(kt(O,255&y.adler),kt(O,y.adler>>8&255),kt(O,y.adler>>16&255),kt(O,y.adler>>24&255),kt(O,255&y.total_in),kt(O,y.total_in>>8&255),kt(O,y.total_in>>16&255),kt(O,y.total_in>>24&255)):(M(O,y.adler>>>16),M(O,65535&y.adler)),$(y),0<O.wrap&&(O.wrap=-O.wrap),O.pending!==0?v:1)},u.deflateEnd=function(y){var st;return y&&y.state?(st=y.state.status)!==R&&st!==69&&st!==73&&st!==91&&st!==103&&st!==P&&st!==666?rt(y,A):(y.state=null,st===P?rt(y,-3):v):A},u.deflateSetDictionary=function(y,st){var lt,O,C,q,dt,ht,tt,gt,Tt=st.length;if(!y||!y.state||(q=(lt=y.state).wrap)===2||q===1&<.status!==R||lt.lookahead)return A;for(q===1&&(y.adler=g(y.adler,st,Tt,0)),lt.wrap=0,Tt>=lt.w_size&&(q===0&&(mt(lt.head),lt.strstart=0,lt.block_start=0,lt.insert=0),gt=new c.Buf8(lt.w_size),c.arraySet(gt,st,Tt-lt.w_size,lt.w_size,0),st=gt,Tt=lt.w_size),dt=y.avail_in,ht=y.next_in,tt=y.input,y.avail_in=Tt,y.next_in=0,y.input=st,xt(lt);lt.lookahead>=I;){for(O=lt.strstart,C=lt.lookahead-(I-1);lt.ins_h=(lt.ins_h<<lt.hash_shift^lt.window[O+I-1])<.hash_mask,lt.prev[O<.w_mask]=lt.head[lt.ins_h],lt.head[lt.ins_h]=O,O++,--C;);lt.strstart=O,lt.lookahead=I-1,xt(lt)}return lt.strstart+=lt.lookahead,lt.block_start=lt.strstart,lt.insert=lt.lookahead,lt.lookahead=0,lt.match_length=lt.prev_length=I-1,lt.match_available=0,y.next_in=ht,y.input=tt,y.avail_in=dt,lt.wrap=q,v},u.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(r,s,u){s.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}},{}],48:[function(r,s,u){s.exports=function(f,c){var o,g,_,b,x,m,v,A,S,N,T,k,j,U,B,W,X,Q,I,ut,vt,R,P,w,it;o=f.state,g=f.next_in,w=f.input,_=g+(f.avail_in-5),b=f.next_out,it=f.output,x=b-(c-f.avail_out),m=b+(f.avail_out-257),v=o.dmax,A=o.wsize,S=o.whave,N=o.wnext,T=o.window,k=o.hold,j=o.bits,U=o.lencode,B=o.distcode,W=(1<<o.lenbits)-1,X=(1<<o.distbits)-1;t:do{j<15&&(k+=w[g++]<<j,j+=8,k+=w[g++]<<j,j+=8),Q=U[k&W];e:for(;;){if(k>>>=I=Q>>>24,j-=I,(I=Q>>>16&255)===0)it[b++]=65535&Q;else{if(!(16&I)){if((64&I)==0){Q=U[(65535&Q)+(k&(1<<I)-1)];continue e}if(32&I){o.mode=12;break t}f.msg="invalid literal/length code",o.mode=30;break t}ut=65535&Q,(I&=15)&&(j<I&&(k+=w[g++]<<j,j+=8),ut+=k&(1<<I)-1,k>>>=I,j-=I),j<15&&(k+=w[g++]<<j,j+=8,k+=w[g++]<<j,j+=8),Q=B[k&X];a:for(;;){if(k>>>=I=Q>>>24,j-=I,!(16&(I=Q>>>16&255))){if((64&I)==0){Q=B[(65535&Q)+(k&(1<<I)-1)];continue a}f.msg="invalid distance code",o.mode=30;break t}if(vt=65535&Q,j<(I&=15)&&(k+=w[g++]<<j,(j+=8)<I&&(k+=w[g++]<<j,j+=8)),v<(vt+=k&(1<<I)-1)){f.msg="invalid distance too far back",o.mode=30;break t}if(k>>>=I,j-=I,(I=b-x)<vt){if(S<(I=vt-I)&&o.sane){f.msg="invalid distance too far back",o.mode=30;break t}if(P=T,(R=0)===N){if(R+=A-I,I<ut){for(ut-=I;it[b++]=T[R++],--I;);R=b-vt,P=it}}else if(N<I){if(R+=A+N-I,(I-=N)<ut){for(ut-=I;it[b++]=T[R++],--I;);if(R=0,N<ut){for(ut-=I=N;it[b++]=T[R++],--I;);R=b-vt,P=it}}}else if(R+=N-I,I<ut){for(ut-=I;it[b++]=T[R++],--I;);R=b-vt,P=it}for(;2<ut;)it[b++]=P[R++],it[b++]=P[R++],it[b++]=P[R++],ut-=3;ut&&(it[b++]=P[R++],1<ut&&(it[b++]=P[R++]))}else{for(R=b-vt;it[b++]=it[R++],it[b++]=it[R++],it[b++]=it[R++],2<(ut-=3););ut&&(it[b++]=it[R++],1<ut&&(it[b++]=it[R++]))}break}}break}}while(g<_&&b<m);g-=ut=j>>3,k&=(1<<(j-=ut<<3))-1,f.next_in=g,f.next_out=b,f.avail_in=g<_?_-g+5:5-(g-_),f.avail_out=b<m?m-b+257:257-(b-m),o.hold=k,o.bits=j}},{}],49:[function(r,s,u){var f=r("../utils/common"),c=r("./adler32"),o=r("./crc32"),g=r("./inffast"),_=r("./inftrees"),b=1,x=2,m=0,v=-2,A=1,S=852,N=592;function T(R){return(R>>>24&255)+(R>>>8&65280)+((65280&R)<<8)+((255&R)<<24)}function k(){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 f.Buf16(320),this.work=new f.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function j(R){var P;return R&&R.state?(P=R.state,R.total_in=R.total_out=P.total=0,R.msg="",P.wrap&&(R.adler=1&P.wrap),P.mode=A,P.last=0,P.havedict=0,P.dmax=32768,P.head=null,P.hold=0,P.bits=0,P.lencode=P.lendyn=new f.Buf32(S),P.distcode=P.distdyn=new f.Buf32(N),P.sane=1,P.back=-1,m):v}function U(R){var P;return R&&R.state?((P=R.state).wsize=0,P.whave=0,P.wnext=0,j(R)):v}function B(R,P){var w,it;return R&&R.state?(it=R.state,P<0?(w=0,P=-P):(w=1+(P>>4),P<48&&(P&=15)),P&&(P<8||15<P)?v:(it.window!==null&&it.wbits!==P&&(it.window=null),it.wrap=w,it.wbits=P,U(R))):v}function W(R,P){var w,it;return R?(it=new k,(R.state=it).window=null,(w=B(R,P))!==m&&(R.state=null),w):v}var X,Q,I=!0;function ut(R){if(I){var P;for(X=new f.Buf32(512),Q=new f.Buf32(32),P=0;P<144;)R.lens[P++]=8;for(;P<256;)R.lens[P++]=9;for(;P<280;)R.lens[P++]=7;for(;P<288;)R.lens[P++]=8;for(_(b,R.lens,0,288,X,0,R.work,{bits:9}),P=0;P<32;)R.lens[P++]=5;_(x,R.lens,0,32,Q,0,R.work,{bits:5}),I=!1}R.lencode=X,R.lenbits=9,R.distcode=Q,R.distbits=5}function vt(R,P,w,it){var G,L=R.state;return L.window===null&&(L.wsize=1<<L.wbits,L.wnext=0,L.whave=0,L.window=new f.Buf8(L.wsize)),it>=L.wsize?(f.arraySet(L.window,P,w-L.wsize,L.wsize,0),L.wnext=0,L.whave=L.wsize):(it<(G=L.wsize-L.wnext)&&(G=it),f.arraySet(L.window,P,w-it,G,L.wnext),(it-=G)?(f.arraySet(L.window,P,w-it,it,0),L.wnext=it,L.whave=L.wsize):(L.wnext+=G,L.wnext===L.wsize&&(L.wnext=0),L.whave<L.wsize&&(L.whave+=G))),0}u.inflateReset=U,u.inflateReset2=B,u.inflateResetKeep=j,u.inflateInit=function(R){return W(R,15)},u.inflateInit2=W,u.inflate=function(R,P){var w,it,G,L,rt,nt,mt,$,et,kt,M,K,xt,wt,Nt,ft,St,pt,_t,Ht,y,st,lt,O,C=0,q=new f.Buf8(4),dt=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!R||!R.state||!R.output||!R.input&&R.avail_in!==0)return v;(w=R.state).mode===12&&(w.mode=13),rt=R.next_out,G=R.output,mt=R.avail_out,L=R.next_in,it=R.input,nt=R.avail_in,$=w.hold,et=w.bits,kt=nt,M=mt,st=m;t:for(;;)switch(w.mode){case A:if(w.wrap===0){w.mode=13;break}for(;et<16;){if(nt===0)break t;nt--,$+=it[L++]<<et,et+=8}if(2&w.wrap&&$===35615){q[w.check=0]=255&$,q[1]=$>>>8&255,w.check=o(w.check,q,2,0),et=$=0,w.mode=2;break}if(w.flags=0,w.head&&(w.head.done=!1),!(1&w.wrap)||(((255&$)<<8)+($>>8))%31){R.msg="incorrect header check",w.mode=30;break}if((15&$)!=8){R.msg="unknown compression method",w.mode=30;break}if(et-=4,y=8+(15&($>>>=4)),w.wbits===0)w.wbits=y;else if(y>w.wbits){R.msg="invalid window size",w.mode=30;break}w.dmax=1<<y,R.adler=w.check=1,w.mode=512&$?10:12,et=$=0;break;case 2:for(;et<16;){if(nt===0)break t;nt--,$+=it[L++]<<et,et+=8}if(w.flags=$,(255&w.flags)!=8){R.msg="unknown compression method",w.mode=30;break}if(57344&w.flags){R.msg="unknown header flags set",w.mode=30;break}w.head&&(w.head.text=$>>8&1),512&w.flags&&(q[0]=255&$,q[1]=$>>>8&255,w.check=o(w.check,q,2,0)),et=$=0,w.mode=3;case 3:for(;et<32;){if(nt===0)break t;nt--,$+=it[L++]<<et,et+=8}w.head&&(w.head.time=$),512&w.flags&&(q[0]=255&$,q[1]=$>>>8&255,q[2]=$>>>16&255,q[3]=$>>>24&255,w.check=o(w.check,q,4,0)),et=$=0,w.mode=4;case 4:for(;et<16;){if(nt===0)break t;nt--,$+=it[L++]<<et,et+=8}w.head&&(w.head.xflags=255&$,w.head.os=$>>8),512&w.flags&&(q[0]=255&$,q[1]=$>>>8&255,w.check=o(w.check,q,2,0)),et=$=0,w.mode=5;case 5:if(1024&w.flags){for(;et<16;){if(nt===0)break t;nt--,$+=it[L++]<<et,et+=8}w.length=$,w.head&&(w.head.extra_len=$),512&w.flags&&(q[0]=255&$,q[1]=$>>>8&255,w.check=o(w.check,q,2,0)),et=$=0}else w.head&&(w.head.extra=null);w.mode=6;case 6:if(1024&w.flags&&(nt<(K=w.length)&&(K=nt),K&&(w.head&&(y=w.head.extra_len-w.length,w.head.extra||(w.head.extra=new Array(w.head.extra_len)),f.arraySet(w.head.extra,it,L,K,y)),512&w.flags&&(w.check=o(w.check,it,K,L)),nt-=K,L+=K,w.length-=K),w.length))break t;w.length=0,w.mode=7;case 7:if(2048&w.flags){if(nt===0)break t;for(K=0;y=it[L+K++],w.head&&y&&w.length<65536&&(w.head.name+=String.fromCharCode(y)),y&&K<nt;);if(512&w.flags&&(w.check=o(w.check,it,K,L)),nt-=K,L+=K,y)break t}else w.head&&(w.head.name=null);w.length=0,w.mode=8;case 8:if(4096&w.flags){if(nt===0)break t;for(K=0;y=it[L+K++],w.head&&y&&w.length<65536&&(w.head.comment+=String.fromCharCode(y)),y&&K<nt;);if(512&w.flags&&(w.check=o(w.check,it,K,L)),nt-=K,L+=K,y)break t}else w.head&&(w.head.comment=null);w.mode=9;case 9:if(512&w.flags){for(;et<16;){if(nt===0)break t;nt--,$+=it[L++]<<et,et+=8}if($!==(65535&w.check)){R.msg="header crc mismatch",w.mode=30;break}et=$=0}w.head&&(w.head.hcrc=w.flags>>9&1,w.head.done=!0),R.adler=w.check=0,w.mode=12;break;case 10:for(;et<32;){if(nt===0)break t;nt--,$+=it[L++]<<et,et+=8}R.adler=w.check=T($),et=$=0,w.mode=11;case 11:if(w.havedict===0)return R.next_out=rt,R.avail_out=mt,R.next_in=L,R.avail_in=nt,w.hold=$,w.bits=et,2;R.adler=w.check=1,w.mode=12;case 12:if(P===5||P===6)break t;case 13:if(w.last){$>>>=7&et,et-=7&et,w.mode=27;break}for(;et<3;){if(nt===0)break t;nt--,$+=it[L++]<<et,et+=8}switch(w.last=1&$,et-=1,3&($>>>=1)){case 0:w.mode=14;break;case 1:if(ut(w),w.mode=20,P!==6)break;$>>>=2,et-=2;break t;case 2:w.mode=17;break;case 3:R.msg="invalid block type",w.mode=30}$>>>=2,et-=2;break;case 14:for($>>>=7&et,et-=7&et;et<32;){if(nt===0)break t;nt--,$+=it[L++]<<et,et+=8}if((65535&$)!=($>>>16^65535)){R.msg="invalid stored block lengths",w.mode=30;break}if(w.length=65535&$,et=$=0,w.mode=15,P===6)break t;case 15:w.mode=16;case 16:if(K=w.length){if(nt<K&&(K=nt),mt<K&&(K=mt),K===0)break t;f.arraySet(G,it,L,K,rt),nt-=K,L+=K,mt-=K,rt+=K,w.length-=K;break}w.mode=12;break;case 17:for(;et<14;){if(nt===0)break t;nt--,$+=it[L++]<<et,et+=8}if(w.nlen=257+(31&$),$>>>=5,et-=5,w.ndist=1+(31&$),$>>>=5,et-=5,w.ncode=4+(15&$),$>>>=4,et-=4,286<w.nlen||30<w.ndist){R.msg="too many length or distance symbols",w.mode=30;break}w.have=0,w.mode=18;case 18:for(;w.have<w.ncode;){for(;et<3;){if(nt===0)break t;nt--,$+=it[L++]<<et,et+=8}w.lens[dt[w.have++]]=7&$,$>>>=3,et-=3}for(;w.have<19;)w.lens[dt[w.have++]]=0;if(w.lencode=w.lendyn,w.lenbits=7,lt={bits:w.lenbits},st=_(0,w.lens,0,19,w.lencode,0,w.work,lt),w.lenbits=lt.bits,st){R.msg="invalid code lengths set",w.mode=30;break}w.have=0,w.mode=19;case 19:for(;w.have<w.nlen+w.ndist;){for(;ft=(C=w.lencode[$&(1<<w.lenbits)-1])>>>16&255,St=65535&C,!((Nt=C>>>24)<=et);){if(nt===0)break t;nt--,$+=it[L++]<<et,et+=8}if(St<16)$>>>=Nt,et-=Nt,w.lens[w.have++]=St;else{if(St===16){for(O=Nt+2;et<O;){if(nt===0)break t;nt--,$+=it[L++]<<et,et+=8}if($>>>=Nt,et-=Nt,w.have===0){R.msg="invalid bit length repeat",w.mode=30;break}y=w.lens[w.have-1],K=3+(3&$),$>>>=2,et-=2}else if(St===17){for(O=Nt+3;et<O;){if(nt===0)break t;nt--,$+=it[L++]<<et,et+=8}et-=Nt,y=0,K=3+(7&($>>>=Nt)),$>>>=3,et-=3}else{for(O=Nt+7;et<O;){if(nt===0)break t;nt--,$+=it[L++]<<et,et+=8}et-=Nt,y=0,K=11+(127&($>>>=Nt)),$>>>=7,et-=7}if(w.have+K>w.nlen+w.ndist){R.msg="invalid bit length repeat",w.mode=30;break}for(;K--;)w.lens[w.have++]=y}}if(w.mode===30)break;if(w.lens[256]===0){R.msg="invalid code -- missing end-of-block",w.mode=30;break}if(w.lenbits=9,lt={bits:w.lenbits},st=_(b,w.lens,0,w.nlen,w.lencode,0,w.work,lt),w.lenbits=lt.bits,st){R.msg="invalid literal/lengths set",w.mode=30;break}if(w.distbits=6,w.distcode=w.distdyn,lt={bits:w.distbits},st=_(x,w.lens,w.nlen,w.ndist,w.distcode,0,w.work,lt),w.distbits=lt.bits,st){R.msg="invalid distances set",w.mode=30;break}if(w.mode=20,P===6)break t;case 20:w.mode=21;case 21:if(6<=nt&&258<=mt){R.next_out=rt,R.avail_out=mt,R.next_in=L,R.avail_in=nt,w.hold=$,w.bits=et,g(R,M),rt=R.next_out,G=R.output,mt=R.avail_out,L=R.next_in,it=R.input,nt=R.avail_in,$=w.hold,et=w.bits,w.mode===12&&(w.back=-1);break}for(w.back=0;ft=(C=w.lencode[$&(1<<w.lenbits)-1])>>>16&255,St=65535&C,!((Nt=C>>>24)<=et);){if(nt===0)break t;nt--,$+=it[L++]<<et,et+=8}if(ft&&(240&ft)==0){for(pt=Nt,_t=ft,Ht=St;ft=(C=w.lencode[Ht+(($&(1<<pt+_t)-1)>>pt)])>>>16&255,St=65535&C,!(pt+(Nt=C>>>24)<=et);){if(nt===0)break t;nt--,$+=it[L++]<<et,et+=8}$>>>=pt,et-=pt,w.back+=pt}if($>>>=Nt,et-=Nt,w.back+=Nt,w.length=St,ft===0){w.mode=26;break}if(32&ft){w.back=-1,w.mode=12;break}if(64&ft){R.msg="invalid literal/length code",w.mode=30;break}w.extra=15&ft,w.mode=22;case 22:if(w.extra){for(O=w.extra;et<O;){if(nt===0)break t;nt--,$+=it[L++]<<et,et+=8}w.length+=$&(1<<w.extra)-1,$>>>=w.extra,et-=w.extra,w.back+=w.extra}w.was=w.length,w.mode=23;case 23:for(;ft=(C=w.distcode[$&(1<<w.distbits)-1])>>>16&255,St=65535&C,!((Nt=C>>>24)<=et);){if(nt===0)break t;nt--,$+=it[L++]<<et,et+=8}if((240&ft)==0){for(pt=Nt,_t=ft,Ht=St;ft=(C=w.distcode[Ht+(($&(1<<pt+_t)-1)>>pt)])>>>16&255,St=65535&C,!(pt+(Nt=C>>>24)<=et);){if(nt===0)break t;nt--,$+=it[L++]<<et,et+=8}$>>>=pt,et-=pt,w.back+=pt}if($>>>=Nt,et-=Nt,w.back+=Nt,64&ft){R.msg="invalid distance code",w.mode=30;break}w.offset=St,w.extra=15&ft,w.mode=24;case 24:if(w.extra){for(O=w.extra;et<O;){if(nt===0)break t;nt--,$+=it[L++]<<et,et+=8}w.offset+=$&(1<<w.extra)-1,$>>>=w.extra,et-=w.extra,w.back+=w.extra}if(w.offset>w.dmax){R.msg="invalid distance too far back",w.mode=30;break}w.mode=25;case 25:if(mt===0)break t;if(K=M-mt,w.offset>K){if((K=w.offset-K)>w.whave&&w.sane){R.msg="invalid distance too far back",w.mode=30;break}xt=K>w.wnext?(K-=w.wnext,w.wsize-K):w.wnext-K,K>w.length&&(K=w.length),wt=w.window}else wt=G,xt=rt-w.offset,K=w.length;for(mt<K&&(K=mt),mt-=K,w.length-=K;G[rt++]=wt[xt++],--K;);w.length===0&&(w.mode=21);break;case 26:if(mt===0)break t;G[rt++]=w.length,mt--,w.mode=21;break;case 27:if(w.wrap){for(;et<32;){if(nt===0)break t;nt--,$|=it[L++]<<et,et+=8}if(M-=mt,R.total_out+=M,w.total+=M,M&&(R.adler=w.check=w.flags?o(w.check,G,M,rt-M):c(w.check,G,M,rt-M)),M=mt,(w.flags?$:T($))!==w.check){R.msg="incorrect data check",w.mode=30;break}et=$=0}w.mode=28;case 28:if(w.wrap&&w.flags){for(;et<32;){if(nt===0)break t;nt--,$+=it[L++]<<et,et+=8}if($!==(4294967295&w.total)){R.msg="incorrect length check",w.mode=30;break}et=$=0}w.mode=29;case 29:st=1;break t;case 30:st=-3;break t;case 31:return-4;case 32:default:return v}return R.next_out=rt,R.avail_out=mt,R.next_in=L,R.avail_in=nt,w.hold=$,w.bits=et,(w.wsize||M!==R.avail_out&&w.mode<30&&(w.mode<27||P!==4))&&vt(R,R.output,R.next_out,M-R.avail_out)?(w.mode=31,-4):(kt-=R.avail_in,M-=R.avail_out,R.total_in+=kt,R.total_out+=M,w.total+=M,w.wrap&&M&&(R.adler=w.check=w.flags?o(w.check,G,M,R.next_out-M):c(w.check,G,M,R.next_out-M)),R.data_type=w.bits+(w.last?64:0)+(w.mode===12?128:0)+(w.mode===20||w.mode===15?256:0),(kt==0&&M===0||P===4)&&st===m&&(st=-5),st)},u.inflateEnd=function(R){if(!R||!R.state)return v;var P=R.state;return P.window&&(P.window=null),R.state=null,m},u.inflateGetHeader=function(R,P){var w;return R&&R.state?(2&(w=R.state).wrap)==0?v:((w.head=P).done=!1,m):v},u.inflateSetDictionary=function(R,P){var w,it=P.length;return R&&R.state?(w=R.state).wrap!==0&&w.mode!==11?v:w.mode===11&&c(1,P,it,0)!==w.check?-3:vt(R,P,it,it)?(w.mode=31,-4):(w.havedict=1,m):v},u.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(r,s,u){var f=r("../utils/common"),c=[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],g=[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],_=[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];s.exports=function(b,x,m,v,A,S,N,T){var k,j,U,B,W,X,Q,I,ut,vt=T.bits,R=0,P=0,w=0,it=0,G=0,L=0,rt=0,nt=0,mt=0,$=0,et=null,kt=0,M=new f.Buf16(16),K=new f.Buf16(16),xt=null,wt=0;for(R=0;R<=15;R++)M[R]=0;for(P=0;P<v;P++)M[x[m+P]]++;for(G=vt,it=15;1<=it&&M[it]===0;it--);if(it<G&&(G=it),it===0)return A[S++]=20971520,A[S++]=20971520,T.bits=1,0;for(w=1;w<it&&M[w]===0;w++);for(G<w&&(G=w),R=nt=1;R<=15;R++)if(nt<<=1,(nt-=M[R])<0)return-1;if(0<nt&&(b===0||it!==1))return-1;for(K[1]=0,R=1;R<15;R++)K[R+1]=K[R]+M[R];for(P=0;P<v;P++)x[m+P]!==0&&(N[K[x[m+P]]++]=P);if(X=b===0?(et=xt=N,19):b===1?(et=c,kt-=257,xt=o,wt-=257,256):(et=g,xt=_,-1),R=w,W=S,rt=P=$=0,U=-1,B=(mt=1<<(L=G))-1,b===1&&852<mt||b===2&&592<mt)return 1;for(;;){for(Q=R-rt,ut=N[P]<X?(I=0,N[P]):N[P]>X?(I=xt[wt+N[P]],et[kt+N[P]]):(I=96,0),k=1<<R-rt,w=j=1<<L;A[W+($>>rt)+(j-=k)]=Q<<24|I<<16|ut|0,j!==0;);for(k=1<<R-1;$&k;)k>>=1;if(k!==0?($&=k-1,$+=k):$=0,P++,--M[R]==0){if(R===it)break;R=x[m+N[P]]}if(G<R&&($&B)!==U){for(rt===0&&(rt=G),W+=w,nt=1<<(L=R-rt);L+rt<it&&!((nt-=M[L+rt])<=0);)L++,nt<<=1;if(mt+=1<<L,b===1&&852<mt||b===2&&592<mt)return 1;A[U=$&B]=G<<24|L<<16|W-S|0}}return $!==0&&(A[W+$]=R-rt<<24|64<<16|0),T.bits=G,0}},{"../utils/common":41}],51:[function(r,s,u){s.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"}},{}],52:[function(r,s,u){var f=r("../utils/common"),c=0,o=1;function g(C){for(var q=C.length;0<=--q;)C[q]=0}var _=0,b=29,x=256,m=x+1+b,v=30,A=19,S=2*m+1,N=15,T=16,k=7,j=256,U=16,B=17,W=18,X=[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],Q=[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],I=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],ut=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],vt=new Array(2*(m+2));g(vt);var R=new Array(2*v);g(R);var P=new Array(512);g(P);var w=new Array(256);g(w);var it=new Array(b);g(it);var G,L,rt,nt=new Array(v);function mt(C,q,dt,ht,tt){this.static_tree=C,this.extra_bits=q,this.extra_base=dt,this.elems=ht,this.max_length=tt,this.has_stree=C&&C.length}function $(C,q){this.dyn_tree=C,this.max_code=0,this.stat_desc=q}function et(C){return C<256?P[C]:P[256+(C>>>7)]}function kt(C,q){C.pending_buf[C.pending++]=255&q,C.pending_buf[C.pending++]=q>>>8&255}function M(C,q,dt){C.bi_valid>T-dt?(C.bi_buf|=q<<C.bi_valid&65535,kt(C,C.bi_buf),C.bi_buf=q>>T-C.bi_valid,C.bi_valid+=dt-T):(C.bi_buf|=q<<C.bi_valid&65535,C.bi_valid+=dt)}function K(C,q,dt){M(C,dt[2*q],dt[2*q+1])}function xt(C,q){for(var dt=0;dt|=1&C,C>>>=1,dt<<=1,0<--q;);return dt>>>1}function wt(C,q,dt){var ht,tt,gt=new Array(N+1),Tt=0;for(ht=1;ht<=N;ht++)gt[ht]=Tt=Tt+dt[ht-1]<<1;for(tt=0;tt<=q;tt++){var yt=C[2*tt+1];yt!==0&&(C[2*tt]=xt(gt[yt]++,yt))}}function Nt(C){var q;for(q=0;q<m;q++)C.dyn_ltree[2*q]=0;for(q=0;q<v;q++)C.dyn_dtree[2*q]=0;for(q=0;q<A;q++)C.bl_tree[2*q]=0;C.dyn_ltree[2*j]=1,C.opt_len=C.static_len=0,C.last_lit=C.matches=0}function ft(C){8<C.bi_valid?kt(C,C.bi_buf):0<C.bi_valid&&(C.pending_buf[C.pending++]=C.bi_buf),C.bi_buf=0,C.bi_valid=0}function St(C,q,dt,ht){var tt=2*q,gt=2*dt;return C[tt]<C[gt]||C[tt]===C[gt]&&ht[q]<=ht[dt]}function pt(C,q,dt){for(var ht=C.heap[dt],tt=dt<<1;tt<=C.heap_len&&(tt<C.heap_len&&St(q,C.heap[tt+1],C.heap[tt],C.depth)&&tt++,!St(q,ht,C.heap[tt],C.depth));)C.heap[dt]=C.heap[tt],dt=tt,tt<<=1;C.heap[dt]=ht}function _t(C,q,dt){var ht,tt,gt,Tt,yt=0;if(C.last_lit!==0)for(;ht=C.pending_buf[C.d_buf+2*yt]<<8|C.pending_buf[C.d_buf+2*yt+1],tt=C.pending_buf[C.l_buf+yt],yt++,ht===0?K(C,tt,q):(K(C,(gt=w[tt])+x+1,q),(Tt=X[gt])!==0&&M(C,tt-=it[gt],Tt),K(C,gt=et(--ht),dt),(Tt=Q[gt])!==0&&M(C,ht-=nt[gt],Tt)),yt<C.last_lit;);K(C,j,q)}function Ht(C,q){var dt,ht,tt,gt=q.dyn_tree,Tt=q.stat_desc.static_tree,yt=q.stat_desc.has_stree,At=q.stat_desc.elems,Wt=-1;for(C.heap_len=0,C.heap_max=S,dt=0;dt<At;dt++)gt[2*dt]!==0?(C.heap[++C.heap_len]=Wt=dt,C.depth[dt]=0):gt[2*dt+1]=0;for(;C.heap_len<2;)gt[2*(tt=C.heap[++C.heap_len]=Wt<2?++Wt:0)]=1,C.depth[tt]=0,C.opt_len--,yt&&(C.static_len-=Tt[2*tt+1]);for(q.max_code=Wt,dt=C.heap_len>>1;1<=dt;dt--)pt(C,gt,dt);for(tt=At;dt=C.heap[1],C.heap[1]=C.heap[C.heap_len--],pt(C,gt,1),ht=C.heap[1],C.heap[--C.heap_max]=dt,C.heap[--C.heap_max]=ht,gt[2*tt]=gt[2*dt]+gt[2*ht],C.depth[tt]=(C.depth[dt]>=C.depth[ht]?C.depth[dt]:C.depth[ht])+1,gt[2*dt+1]=gt[2*ht+1]=tt,C.heap[1]=tt++,pt(C,gt,1),2<=C.heap_len;);C.heap[--C.heap_max]=C.heap[1],(function(Gt,oe){var za,De,_n,le,Za,Sn,Ye=oe.dyn_tree,Bi=oe.max_code,Ns=oe.stat_desc.static_tree,Ae=oe.stat_desc.has_stree,Es=oe.stat_desc.extra_bits,Hl=oe.stat_desc.extra_base,Xa=oe.stat_desc.max_length,ka=0;for(le=0;le<=N;le++)Gt.bl_count[le]=0;for(Ye[2*Gt.heap[Gt.heap_max]+1]=0,za=Gt.heap_max+1;za<S;za++)Xa<(le=Ye[2*Ye[2*(De=Gt.heap[za])+1]+1]+1)&&(le=Xa,ka++),Ye[2*De+1]=le,Bi<De||(Gt.bl_count[le]++,Za=0,Hl<=De&&(Za=Es[De-Hl]),Sn=Ye[2*De],Gt.opt_len+=Sn*(le+Za),Ae&&(Gt.static_len+=Sn*(Ns[2*De+1]+Za)));if(ka!==0){do{for(le=Xa-1;Gt.bl_count[le]===0;)le--;Gt.bl_count[le]--,Gt.bl_count[le+1]+=2,Gt.bl_count[Xa]--,ka-=2}while(0<ka);for(le=Xa;le!==0;le--)for(De=Gt.bl_count[le];De!==0;)Bi<(_n=Gt.heap[--za])||(Ye[2*_n+1]!==le&&(Gt.opt_len+=(le-Ye[2*_n+1])*Ye[2*_n],Ye[2*_n+1]=le),De--)}})(C,q),wt(gt,Wt,C.bl_count)}function y(C,q,dt){var ht,tt,gt=-1,Tt=q[1],yt=0,At=7,Wt=4;for(Tt===0&&(At=138,Wt=3),q[2*(dt+1)+1]=65535,ht=0;ht<=dt;ht++)tt=Tt,Tt=q[2*(ht+1)+1],++yt<At&&tt===Tt||(yt<Wt?C.bl_tree[2*tt]+=yt:tt!==0?(tt!==gt&&C.bl_tree[2*tt]++,C.bl_tree[2*U]++):yt<=10?C.bl_tree[2*B]++:C.bl_tree[2*W]++,gt=tt,Wt=(yt=0)===Tt?(At=138,3):tt===Tt?(At=6,3):(At=7,4))}function st(C,q,dt){var ht,tt,gt=-1,Tt=q[1],yt=0,At=7,Wt=4;for(Tt===0&&(At=138,Wt=3),ht=0;ht<=dt;ht++)if(tt=Tt,Tt=q[2*(ht+1)+1],!(++yt<At&&tt===Tt)){if(yt<Wt)for(;K(C,tt,C.bl_tree),--yt!=0;);else tt!==0?(tt!==gt&&(K(C,tt,C.bl_tree),yt--),K(C,U,C.bl_tree),M(C,yt-3,2)):yt<=10?(K(C,B,C.bl_tree),M(C,yt-3,3)):(K(C,W,C.bl_tree),M(C,yt-11,7));gt=tt,Wt=(yt=0)===Tt?(At=138,3):tt===Tt?(At=6,3):(At=7,4)}}g(nt);var lt=!1;function O(C,q,dt,ht){M(C,(_<<1)+(ht?1:0),3),(function(tt,gt,Tt,yt){ft(tt),kt(tt,Tt),kt(tt,~Tt),f.arraySet(tt.pending_buf,tt.window,gt,Tt,tt.pending),tt.pending+=Tt})(C,q,dt)}u._tr_init=function(C){lt||((function(){var q,dt,ht,tt,gt,Tt=new Array(N+1);for(tt=ht=0;tt<b-1;tt++)for(it[tt]=ht,q=0;q<1<<X[tt];q++)w[ht++]=tt;for(w[ht-1]=tt,tt=gt=0;tt<16;tt++)for(nt[tt]=gt,q=0;q<1<<Q[tt];q++)P[gt++]=tt;for(gt>>=7;tt<v;tt++)for(nt[tt]=gt<<7,q=0;q<1<<Q[tt]-7;q++)P[256+gt++]=tt;for(dt=0;dt<=N;dt++)Tt[dt]=0;for(q=0;q<=143;)vt[2*q+1]=8,q++,Tt[8]++;for(;q<=255;)vt[2*q+1]=9,q++,Tt[9]++;for(;q<=279;)vt[2*q+1]=7,q++,Tt[7]++;for(;q<=287;)vt[2*q+1]=8,q++,Tt[8]++;for(wt(vt,m+1,Tt),q=0;q<v;q++)R[2*q+1]=5,R[2*q]=xt(q,5);G=new mt(vt,X,x+1,m,N),L=new mt(R,Q,0,v,N),rt=new mt(new Array(0),I,0,A,k)})(),lt=!0),C.l_desc=new $(C.dyn_ltree,G),C.d_desc=new $(C.dyn_dtree,L),C.bl_desc=new $(C.bl_tree,rt),C.bi_buf=0,C.bi_valid=0,Nt(C)},u._tr_stored_block=O,u._tr_flush_block=function(C,q,dt,ht){var tt,gt,Tt=0;0<C.level?(C.strm.data_type===2&&(C.strm.data_type=(function(yt){var At,Wt=4093624447;for(At=0;At<=31;At++,Wt>>>=1)if(1&Wt&&yt.dyn_ltree[2*At]!==0)return c;if(yt.dyn_ltree[18]!==0||yt.dyn_ltree[20]!==0||yt.dyn_ltree[26]!==0)return o;for(At=32;At<x;At++)if(yt.dyn_ltree[2*At]!==0)return o;return c})(C)),Ht(C,C.l_desc),Ht(C,C.d_desc),Tt=(function(yt){var At;for(y(yt,yt.dyn_ltree,yt.l_desc.max_code),y(yt,yt.dyn_dtree,yt.d_desc.max_code),Ht(yt,yt.bl_desc),At=A-1;3<=At&&yt.bl_tree[2*ut[At]+1]===0;At--);return yt.opt_len+=3*(At+1)+5+5+4,At})(C),tt=C.opt_len+3+7>>>3,(gt=C.static_len+3+7>>>3)<=tt&&(tt=gt)):tt=gt=dt+5,dt+4<=tt&&q!==-1?O(C,q,dt,ht):C.strategy===4||gt===tt?(M(C,2+(ht?1:0),3),_t(C,vt,R)):(M(C,4+(ht?1:0),3),(function(yt,At,Wt,Gt){var oe;for(M(yt,At-257,5),M(yt,Wt-1,5),M(yt,Gt-4,4),oe=0;oe<Gt;oe++)M(yt,yt.bl_tree[2*ut[oe]+1],3);st(yt,yt.dyn_ltree,At-1),st(yt,yt.dyn_dtree,Wt-1)})(C,C.l_desc.max_code+1,C.d_desc.max_code+1,Tt+1),_t(C,C.dyn_ltree,C.dyn_dtree)),Nt(C),ht&&ft(C)},u._tr_tally=function(C,q,dt){return C.pending_buf[C.d_buf+2*C.last_lit]=q>>>8&255,C.pending_buf[C.d_buf+2*C.last_lit+1]=255&q,C.pending_buf[C.l_buf+C.last_lit]=255&dt,C.last_lit++,q===0?C.dyn_ltree[2*dt]++:(C.matches++,q--,C.dyn_ltree[2*(w[dt]+x+1)]++,C.dyn_dtree[2*et(q)]++),C.last_lit===C.lit_bufsize-1},u._tr_align=function(C){M(C,2,3),K(C,j,vt),(function(q){q.bi_valid===16?(kt(q,q.bi_buf),q.bi_buf=0,q.bi_valid=0):8<=q.bi_valid&&(q.pending_buf[q.pending++]=255&q.bi_buf,q.bi_buf>>=8,q.bi_valid-=8)})(C)}},{"../utils/common":41}],53:[function(r,s,u){s.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}},{}],54:[function(r,s,u){(function(f){(function(c,o){if(!c.setImmediate){var g,_,b,x,m=1,v={},A=!1,S=c.document,N=Object.getPrototypeOf&&Object.getPrototypeOf(c);N=N&&N.setTimeout?N:c,g={}.toString.call(c.process)==="[object process]"?function(U){process.nextTick(function(){k(U)})}:(function(){if(c.postMessage&&!c.importScripts){var U=!0,B=c.onmessage;return c.onmessage=function(){U=!1},c.postMessage("","*"),c.onmessage=B,U}})()?(x="setImmediate$"+Math.random()+"$",c.addEventListener?c.addEventListener("message",j,!1):c.attachEvent("onmessage",j),function(U){c.postMessage(x+U,"*")}):c.MessageChannel?((b=new MessageChannel).port1.onmessage=function(U){k(U.data)},function(U){b.port2.postMessage(U)}):S&&"onreadystatechange"in S.createElement("script")?(_=S.documentElement,function(U){var B=S.createElement("script");B.onreadystatechange=function(){k(U),B.onreadystatechange=null,_.removeChild(B),B=null},_.appendChild(B)}):function(U){setTimeout(k,0,U)},N.setImmediate=function(U){typeof U!="function"&&(U=new Function(""+U));for(var B=new Array(arguments.length-1),W=0;W<B.length;W++)B[W]=arguments[W+1];var X={callback:U,args:B};return v[m]=X,g(m),m++},N.clearImmediate=T}function T(U){delete v[U]}function k(U){if(A)setTimeout(k,0,U);else{var B=v[U];if(B){A=!0;try{(function(W){var X=W.callback,Q=W.args;switch(Q.length){case 0:X();break;case 1:X(Q[0]);break;case 2:X(Q[0],Q[1]);break;case 3:X(Q[0],Q[1],Q[2]);break;default:X.apply(o,Q)}})(B)}finally{T(U),A=!1}}}}function j(U){U.source===c&&typeof U.data=="string"&&U.data.indexOf(x)===0&&k(+U.data.slice(x.length))}})(typeof self>"u"?f===void 0?this:f:self)}).call(this,typeof cs<"u"?cs:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(dc)),dc.exports}var sv=rv();const uv=bc(sv);function Cm(p){let d=`---+title: "${p.title}"+look: "${p.look}"+music: "${p.musicTrack}"+voiceRate: ${p.voiceRate}+voicePitch: ${p.voicePitch}+autoDuck: ${p.autoDuck}+---++`;return p.scenes.forEach((r,s)=>{d+=`## Scene ${s+1}: ${r.title}++`,d+=`${r.narration}++`,r.elements.length>0&&(d+=`<!-- Visual Elements Anchors:+`,r.elements.forEach(u=>{d+=` - [${u.type}] "${u.label||u.type}" triggers on word: "${u.triggerWord||"start"}"+`}),d+=`-->++`)}),d}function Mm(p){let d=`// Generated by Explainroo Studio (No-Code Visual Builder)+// Compatible with Explainroo CLI specifications: node bin/explainroo.js render++export const config = {+ width: 1280,+ height: 720,+ fps: 30,+ look: '${p.look}',+ music: '${p.musicTrack}',+};++export const scenes = [+`;return p.scenes.forEach((r,s)=>{d+=` {+`,d+=` id: '${r.id}',+`,d+=` title: '${r.title.replace(/'/g,"\\'")}',+`,d+=` durationSeconds: ${r.durationSeconds},+`,d+=` elements: [+`,r.elements.forEach(u=>{d+=` {+`,d+=` id: '${u.id}',+`,d+=` type: '${u.type}',+`,d+=` x: ${u.x},+`,d+=` y: ${u.y},+`,d+=` width: ${u.width},+`,d+=` height: ${u.height},+`,d+=` label: '${(u.label||"").replace(/'/g,"\\'")}',+`,d+=` color: '${u.color}',+`,d+=` animation: '${u.animation}',+`,d+=` triggerWord: '${u.triggerWord||""}',+`,d+=` triggerTimeSec: ${u.triggerTimeSec||0},+`,d+=` },+`}),d+=` ],+`,d+=` draw(ctx, rc, t) {+`,d+=` // Custom render callback for Explainroo CLI headless renderer+`,d+=` // Coordinates correspond to 1280x720 canvas canvas+`,d+=` }+`,d+=` }${s<p.scenes.length-1?",":""}+`}),d+=`];++export default scenes;+`,d}function ov(p){return JSON.stringify({name:p.title,version:"1.0.0",description:p.description,engine:"explainroo-v2",render:{width:1280,height:720,fps:30,look:p.look,autoDucking:p.autoDuck,backgroundMusic:p.musicTrack}},null,2)}async function cv(p){const d=new uv;d.file("script.md",Cm(p)),d.file("scenes.js",Mm(p)),d.file("explainroo.config.json",ov(p)),d.file("README.md",`# ${p.title}++Generated with **Explainroo UI** — Visual Explainer Video Studio.++## Quick CLI Render+If you have the Explainroo CLI installed:+\`\`\`bash+npm install -g explainroo+explainroo render+\`\`\`+`);const r=await d.generateAsync({type:"blob"}),s=URL.createObjectURL(r),u=document.createElement("a");u.href=s,u.download=`${p.title.toLowerCase().replace(/[^a-z0-9]/g,"-")}-explainroo.zip`,document.body.appendChild(u),u.click(),document.body.removeChild(u),URL.revokeObjectURL(s)}function mm(p,d){const r=new Blob([d],{type:"text/plain;charset=utf-8"}),s=URL.createObjectURL(r),u=document.createElement("a");u.href=s,u.download=p,document.body.appendChild(u),u.click(),document.body.removeChild(u),URL.revokeObjectURL(s)}class fv{constructor(){xe(this,"mediaRecorder",null);xe(this,"recordedChunks",[]);xe(this,"isRecording",!1)}start(d){try{this.recordedChunks=[];const r=d.captureStream(30),s={};return MediaRecorder.isTypeSupported("video/webm;codecs=vp9,opus")?s.mimeType="video/webm;codecs=vp9,opus":MediaRecorder.isTypeSupported("video/webm")?s.mimeType="video/webm":MediaRecorder.isTypeSupported("video/mp4")&&(s.mimeType="video/mp4"),this.mediaRecorder=new MediaRecorder(r,s),this.mediaRecorder.ondataavailable=u=>{u.data&&u.data.size>0&&this.recordedChunks.push(u.data)},this.mediaRecorder.start(250),this.isRecording=!0,!0}catch(r){return console.error("Failed to start MediaRecorder:",r),!1}}stop(){return new Promise(d=>{if(!this.mediaRecorder||!this.isRecording){d(null);return}this.mediaRecorder.onstop=()=>{var u;const r=((u=this.mediaRecorder)==null?void 0:u.mimeType)||"video/webm",s=new Blob(this.recordedChunks,{type:r});this.isRecording=!1,d(s)},this.mediaRecorder.stop()})}getIsRecording(){return this.isRecording}}const pm=new fv,dv=({isOpen:p,onClose:d,project:r})=>{const[s,u]=Dt.useState("video"),[f,c]=Dt.useState(null),[o,g]=Dt.useState(!1),[_,b]=Dt.useState(0);if(!p)return null;const x=Cm(r),m=Mm(r),v=(N,T)=>{navigator.clipboard.writeText(N),c(T),Qt.playPop(),setTimeout(()=>c(null),2e3)},A=()=>{const N=document.querySelector("canvas");if(!N)return;const T=N.toDataURL("image/png"),k=document.createElement("a");k.href=T,k.download=`${r.title.toLowerCase().replace(/[^a-z0-9]/g,"-")}-snapshot.png`,k.click(),Qt.playPop()},S=async()=>{const N=document.querySelector("canvas");if(!N)return;if(g(!0),b(0),!pm.start(N)){g(!1);return}let k=0;const j=setInterval(()=>{k+=.5,b(Math.min(100,Math.round(k/6*100))),k>=6&&(clearInterval(j),pm.stop().then(U=>{if(g(!1),U){const B=URL.createObjectURL(U),W=document.createElement("a");W.href=B,W.download=`${r.title.toLowerCase().replace(/[^a-z0-9]/g,"-")}.webm`,W.click(),URL.revokeObjectURL(B),Qt.playDrawChime()}}))},500)};return E.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4 bg-slate-950/80 backdrop-blur-md animate-fade-in",children:E.jsxs("div",{className:"relative w-full max-w-xl bg-slate-900 border border-slate-800 rounded-2xl p-6 shadow-2xl flex flex-col max-h-[85vh]",children:[E.jsxs("div",{className:"flex items-center justify-between pb-3 border-b border-slate-800",children:[E.jsxs("div",{children:[E.jsx("h3",{className:"text-base font-bold text-white tracking-tight",children:"Export & Share"}),E.jsx("p",{className:"text-xs text-slate-400",children:"Download your video or export ready-to-run Explainroo CLI project files"})]}),E.jsx("button",{onClick:d,className:"p-1.5 text-slate-400 hover:text-white rounded-lg hover:bg-slate-800 transition-colors cursor-pointer",children:E.jsx(Sc,{className:"w-5 h-5"})})]}),E.jsxs("div",{className:"flex items-center gap-1 p-1 bg-slate-950 rounded-xl my-4 text-xs font-medium",children:[E.jsxs("button",{onClick:()=>u("video"),className:`flex-1 py-1.5 rounded-lg flex items-center justify-center gap-1.5 transition-colors cursor-pointer ${s==="video"?"bg-slate-800 text-amber-300 font-bold shadow-sm":"text-slate-400 hover:text-white"}`,children:[E.jsx(pc,{className:"w-3.5 h-3.5"}),E.jsx("span",{children:"Video Recording"})]}),E.jsxs("button",{onClick:()=>u("cli"),className:`flex-1 py-1.5 rounded-lg flex items-center justify-center gap-1.5 transition-colors cursor-pointer ${s==="cli"?"bg-slate-800 text-cyan-300 font-bold shadow-sm":"text-slate-400 hover:text-white"}`,children:[E.jsx(Sm,{className:"w-3.5 h-3.5"}),E.jsx("span",{children:"Explainroo CLI Bundle"})]}),E.jsxs("button",{onClick:()=>u("snapshot"),className:`flex-1 py-1.5 rounded-lg flex items-center justify-center gap-1.5 transition-colors cursor-pointer ${s==="snapshot"?"bg-slate-800 text-emerald-300 font-bold shadow-sm":"text-slate-400 hover:text-white"}`,children:[E.jsx(nm,{className:"w-3.5 h-3.5"}),E.jsx("span",{children:"Snapshot PNG"})]})]}),s==="video"&&E.jsxs("div",{className:"space-y-4 py-2",children:[E.jsxs("div",{className:"p-4 rounded-xl bg-slate-950 border border-slate-800 flex flex-col gap-2",children:[E.jsxs("div",{className:"flex items-center justify-between",children:[E.jsx("span",{className:"text-xs font-bold text-slate-200",children:"Browser Video Capture"}),E.jsx("span",{className:"text-[11px] font-mono text-cyan-400",children:"1280x720 30FPS"})]}),E.jsx("p",{className:"text-xs text-slate-400",children:"Directly captures and renders the current video animation into a downloadable WebM/MP4 video file."}),o&&E.jsxs("div",{className:"pt-2",children:[E.jsxs("div",{className:"flex items-center justify-between text-[11px] text-amber-400 mb-1 font-mono",children:[E.jsx("span",{children:"Recording Canvas Stream..."}),E.jsxs("span",{children:[_,"%"]})]}),E.jsx("div",{className:"w-full h-1.5 bg-slate-800 rounded-full overflow-hidden",children:E.jsx("div",{className:"h-full bg-amber-400 transition-all duration-300",style:{width:`${_}%`}})})]})]}),E.jsxs("button",{onClick:S,disabled:o,className:"w-full flex items-center justify-center gap-2 py-3 rounded-xl bg-gradient-to-r from-amber-500 to-orange-500 hover:from-amber-400 hover:to-orange-400 text-slate-950 font-bold text-xs shadow-lg transition-transform active:scale-95 cursor-pointer disabled:opacity-50",children:[E.jsx(pc,{className:"w-4 h-4"}),E.jsx("span",{children:o?"Rendering Video...":"Record & Download Video"})]})]}),s==="cli"&&E.jsxs("div",{className:"space-y-4 py-2 overflow-y-auto",children:[E.jsxs("div",{className:"p-3.5 rounded-xl bg-slate-950 border border-slate-800",children:[E.jsxs("div",{className:"flex items-center justify-between mb-2",children:[E.jsxs("span",{className:"text-xs font-bold text-slate-200 flex items-center gap-1.5",children:[E.jsx(Zg,{className:"w-4 h-4 text-cyan-400"}),E.jsx("span",{children:"Full Project ZIP Package"})]}),E.jsx("button",{onClick:()=>cv(r),className:"px-3 py-1 bg-cyan-500 hover:bg-cyan-400 text-slate-950 text-xs font-bold rounded-lg transition-colors cursor-pointer",children:"Download .zip"})]}),E.jsxs("p",{className:"text-[11px] text-slate-400",children:["Includes ",E.jsx("code",{className:"text-slate-300",children:"script.md"}),", ",E.jsx("code",{className:"text-slate-300",children:"scenes.js"}),", and ",E.jsx("code",{className:"text-slate-300",children:"explainroo.config.json"})," ready to run via the Explainroo terminal CLI."]})]}),E.jsxs("div",{className:"p-3 rounded-xl bg-slate-950 border border-slate-800 flex items-center justify-between",children:[E.jsxs("div",{className:"flex items-center gap-2",children:[E.jsx(my,{className:"w-4 h-4 text-amber-400"}),E.jsxs("div",{children:[E.jsx("span",{className:"text-xs font-semibold text-slate-200 block",children:"script.md"}),E.jsx("span",{className:"text-[10px] text-slate-500",children:"Narration text & scene breaks"})]})]}),E.jsxs("div",{className:"flex items-center gap-1.5",children:[E.jsxs("button",{onClick:()=>v(x,"script"),className:"p-1.5 rounded-lg bg-slate-800 hover:bg-slate-700 text-slate-300 text-xs flex items-center gap-1 transition-colors cursor-pointer",children:[f==="script"?E.jsx(mc,{className:"w-3.5 h-3.5 text-emerald-400"}):E.jsx(vs,{className:"w-3.5 h-3.5"}),E.jsx("span",{children:f==="script"?"Copied":"Copy"})]}),E.jsx("button",{onClick:()=>mm("script.md",x),className:"p-1.5 rounded-lg bg-slate-800 hover:bg-slate-700 text-slate-300 text-xs transition-colors cursor-pointer",title:"Download script.md",children:E.jsx(ps,{className:"w-3.5 h-3.5"})})]})]}),E.jsxs("div",{className:"p-3 rounded-xl bg-slate-950 border border-slate-800 flex items-center justify-between",children:[E.jsxs("div",{className:"flex items-center gap-2",children:[E.jsx(dy,{className:"w-4 h-4 text-cyan-400"}),E.jsxs("div",{children:[E.jsx("span",{className:"text-xs font-semibold text-slate-200 block",children:"scenes.js"}),E.jsx("span",{className:"text-[10px] text-slate-500",children:"Canvas drawings & coordinates"})]})]}),E.jsxs("div",{className:"flex items-center gap-1.5",children:[E.jsxs("button",{onClick:()=>v(m,"scenes"),className:"p-1.5 rounded-lg bg-slate-800 hover:bg-slate-700 text-slate-300 text-xs flex items-center gap-1 transition-colors cursor-pointer",children:[f==="scenes"?E.jsx(mc,{className:"w-3.5 h-3.5 text-emerald-400"}):E.jsx(vs,{className:"w-3.5 h-3.5"}),E.jsx("span",{children:f==="scenes"?"Copied":"Copy"})]}),E.jsx("button",{onClick:()=>mm("scenes.js",m),className:"p-1.5 rounded-lg bg-slate-800 hover:bg-slate-700 text-slate-300 text-xs transition-colors cursor-pointer",title:"Download scenes.js",children:E.jsx(ps,{className:"w-3.5 h-3.5"})})]})]})]}),s==="snapshot"&&E.jsxs("div",{className:"space-y-4 py-2",children:[E.jsxs("div",{className:"p-4 rounded-xl bg-slate-950 border border-slate-800 text-center space-y-2",children:[E.jsx(nm,{className:"w-8 h-8 text-emerald-400 mx-auto"}),E.jsx("h4",{className:"text-xs font-bold text-slate-200",children:"High-Resolution Canvas Snapshot"}),E.jsx("p",{className:"text-xs text-slate-400 max-w-sm mx-auto",children:"Download a clean, crystal-clear 1280x720 PNG of your current visual scene for presentations, tweets, or documentation."})]}),E.jsxs("button",{onClick:A,className:"w-full flex items-center justify-center gap-2 py-3 rounded-xl bg-emerald-500 hover:bg-emerald-400 text-slate-950 font-bold text-xs shadow-lg transition-transform active:scale-95 cursor-pointer",children:[E.jsx(ps,{className:"w-4 h-4"}),E.jsx("span",{children:"Download Snapshot PNG"})]})]})]})})},hv=({isOpen:p,onClose:d,onSelectTemplate:r})=>p?E.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4 bg-slate-950/80 backdrop-blur-md animate-fade-in",children:E.jsxs("div",{className:"relative w-full max-w-2xl bg-slate-900 border border-slate-800 rounded-2xl p-6 shadow-2xl flex flex-col max-h-[85vh]",children:[E.jsxs("div",{className:"flex items-center justify-between pb-4 border-b border-slate-800",children:[E.jsxs("div",{className:"flex items-center gap-2",children:[E.jsx(xm,{className:"w-5 h-5 text-amber-400"}),E.jsxs("div",{children:[E.jsx("h3",{className:"text-base font-bold text-white tracking-tight",children:"Pre-built Explainer Templates"}),E.jsx("p",{className:"text-xs text-slate-400",children:"Jumpstart your video with hand-crafted diagrams and scripts"})]})]}),E.jsx("button",{onClick:d,className:"p-1.5 text-slate-400 hover:text-white rounded-lg hover:bg-slate-800 transition-colors cursor-pointer",children:E.jsx(Sc,{className:"w-5 h-5"})})]}),E.jsx("div",{className:"py-4 grid grid-cols-1 sm:grid-cols-2 gap-3 overflow-y-auto pr-1",children:hc.map(s=>E.jsxs("div",{className:"p-4 rounded-xl bg-slate-950 border border-slate-800/80 hover:border-slate-700 hover:bg-slate-950/90 transition-all flex flex-col justify-between group",children:[E.jsxs("div",{children:[E.jsxs("div",{className:"flex items-center justify-between text-[11px] font-mono text-slate-400 mb-2",children:[E.jsxs("span",{className:"capitalize px-2 py-0.5 rounded bg-slate-900 border border-slate-800 text-amber-300",children:[s.look," look"]}),E.jsxs("span",{children:[s.scenes.length," Scenes"]})]}),E.jsx("h4",{className:"text-sm font-bold text-slate-100 group-hover:text-amber-400 transition-colors",children:s.title}),E.jsx("p",{className:"text-xs text-slate-400 mt-1 line-clamp-2 leading-relaxed",children:s.description})]}),E.jsxs("div",{className:"pt-4 mt-2 flex items-center justify-between border-t border-slate-800/60",children:[E.jsxs("span",{className:"text-[11px] text-slate-500 font-mono",children:["Music: ",s.musicTrack]}),E.jsxs("button",{onClick:()=>{r(s),Qt.playDrawChime(),d()},className:"flex items-center gap-1 px-3 py-1.5 bg-amber-500/15 hover:bg-amber-500/25 border border-amber-500/30 text-amber-300 text-xs font-semibold rounded-lg transition-colors cursor-pointer",children:[E.jsx("span",{children:"Load Project"}),E.jsx(Qg,{className:"w-3.5 h-3.5"})]})]})]},s.id))})]})}):null,mv=()=>{const[p,d]=Dt.useState(()=>{try{const G=localStorage.getItem("explainroo_project");if(G)return JSON.parse(G)}catch{}return hc[0]}),[r,s]=Dt.useState(0),[u,f]=Dt.useState(null),[c,o]=Dt.useState(!1),[g,_]=Dt.useState(!1),[b,x]=Dt.useState(!1);Dt.useEffect(()=>{try{localStorage.setItem("explainroo_project",JSON.stringify(p))}catch{}},[p]);const m=p.scenes[r]||p.scenes[0]||{id:"scene-default",title:"Scene 1",narration:"",elements:[],durationSeconds:7},v=m.elements.find(G=>G.id===u)||null,A=m.lookOverride||p.look,S=Bl[A]||Bl.whiteboard,N=G=>{d(L=>({...L,title:G}))},T=G=>{d(L=>({...L,look:G})),Qt.playPop()},k=G=>{G>=0&&G<p.scenes.length&&(s(G),f(null),Qt.playWhoosh())},j=()=>{const G=p.scenes.length+1,L={id:`scene-${Date.now()}`,title:`Scene ${G}`,narration:"Describe what happens next in this part of the video...",durationSeconds:7,transition:"fade",elements:[]};d(rt=>({...rt,scenes:[...rt.scenes,L]})),s(p.scenes.length),f(null),Qt.playPop()},U=G=>{const L=p.scenes[G];if(!L)return;const rt={...L,id:`scene-${Date.now()}`,title:`${L.title} (Copy)`,elements:L.elements.map(mt=>({...mt,id:`el-${Date.now()}-${Math.random()}`}))},nt=[...p.scenes];nt.splice(G+1,0,rt),d(mt=>({...mt,scenes:nt})),s(G+1),Qt.playPop()},B=G=>{if(p.scenes.length<=1)return;const L=p.scenes.filter((rt,nt)=>nt!==G);d(rt=>({...rt,scenes:L})),s(Math.max(0,G-1)),f(null),Qt.playPop()},W=(G,L)=>{const rt=L==="prev"?G-1:G+1;if(rt<0||rt>=p.scenes.length)return;const nt=[...p.scenes],[mt]=nt.splice(G,1);nt.splice(rt,0,mt),d($=>({...$,scenes:nt})),s(rt),Qt.playPop()},X=G=>{const L={id:`el-${Date.now()}`,type:G.type||"rectangle",x:G.x??540,y:G.y??300,width:G.width??180,height:G.height??120,label:G.label||"",color:G.color||S.primaryColor,strokeWidth:G.strokeWidth??2.5,roughness:G.roughness??1.4,animation:G.animation||"pop",triggerTimeSec:G.triggerTimeSec??.5,...G};d(rt=>{const nt=[...rt.scenes],mt=nt[r];return mt?(nt[r]={...mt,elements:[...mt.elements,L]},{...rt,scenes:nt}):rt}),f(L.id)},Q=(G,L)=>{d(rt=>{const nt=[...rt.scenes],mt=nt[r];return mt?(nt[r]={...mt,elements:mt.elements.map($=>$.id===G?{...$,...L}:$)},{...rt,scenes:nt}):rt})},I=(G,L,rt)=>{Q(G,{x:L,y:rt})},ut=G=>{d(L=>{const rt=[...L.scenes],nt=rt[r];return nt?(rt[r]={...nt,elements:nt.elements.filter(mt=>mt.id!==G)},{...L,scenes:rt}):L}),f(null),Qt.playPop()},vt=G=>{const L={...G,id:`el-${Date.now()}`,x:G.x+30,y:G.y+30};X(L)},R=G=>{d(L=>{const rt=[...L.scenes],nt=rt[r];if(!nt)return L;const mt=G.split(/\s+/).filter(Boolean).length,$=Math.max(5,Math.round(mt/2.5));return rt[r]={...nt,narration:G,durationSeconds:$},{...L,scenes:rt}})},P=(G,L)=>{d(rt=>{const nt=[...rt.scenes],mt=nt[r];return mt?(nt[r]={...mt,customAudioUrl:G,customAudioName:L},{...rt,scenes:nt}):rt})},w=(G,L)=>{const rt=m.narration.split(/\s+/).map($=>$.toLowerCase().replace(/[^a-z0-9]/g,"")),nt=rt.indexOf(L.toLowerCase()),mt=nt>=0?Math.max(.2,nt/rt.length*m.durationSeconds):.5;Q(G,{triggerWord:L,triggerTimeSec:parseFloat(mt.toFixed(1))})},it=()=>{window.confirm("Reset project back to default template?")&&(d(hc[0]),s(0),f(null))};return Dt.useEffect(()=>{const G=L=>{L.target instanceof HTMLInputElement||L.target instanceof HTMLTextAreaElement||(L.key==="Escape"?f(null):L.key==="ArrowRight"&&L.altKey?k(r+1):L.key==="ArrowLeft"&&L.altKey&&k(r-1))};return window.addEventListener("keydown",G),()=>window.removeEventListener("keydown",G)},[r,p.scenes.length]),E.jsxs("div",{className:"min-h-screen w-full flex flex-col bg-slate-950 text-slate-100 font-sans antialiased overflow-x-hidden",children:[E.jsx(S2,{title:p.title,onUpdateTitle:N,look:p.look,onSelectLook:T,onOpenAiModal:()=>o(!0),onOpenTemplates:()=>_(!0),onOpenExport:()=>x(!0),onResetProject:it}),E.jsxs("main",{className:"flex-1 max-w-7xl mx-auto w-full p-3 sm:p-4 md:p-6 grid grid-cols-1 lg:grid-cols-12 gap-4 items-start",children:[E.jsxs("div",{className:"lg:col-span-3 flex flex-col gap-4",children:[E.jsx(P2,{scenes:p.scenes,activeSceneIndex:r,onSelectScene:k,onAddScene:j,onDuplicateScene:U,onDeleteScene:B,onMoveScene:W}),E.jsx(ev,{onAddElement:X,primaryColor:S.primaryColor})]}),E.jsxs("div",{className:"lg:col-span-6 flex flex-col gap-4",children:[E.jsx($2,{scene:m,theme:A,selectedElementId:u,onSelectElement:G=>f(G),onUpdateElementPosition:I,currentSceneIndex:r,totalScenes:p.scenes.length,onPrevScene:()=>k(r-1),onNextScene:()=>k(r+1),musicTrack:p.musicTrack,autoDuck:p.autoDuck,voiceRate:p.voiceRate,voicePitch:p.voicePitch}),E.jsx(tv,{scene:m,selectedElementId:u,onUpdateNarration:R,onUpdateElementTriggerWord:w,onUpdateCustomAudio:P,voiceRate:p.voiceRate,voicePitch:p.voicePitch})]}),E.jsxs("div",{className:"lg:col-span-3 flex flex-col gap-4",children:[E.jsx(nv,{element:v,onUpdateElement:Q,onDeleteElement:ut,onDuplicateElement:vt,sceneDuration:m.durationSeconds}),E.jsxs("div",{className:"bg-slate-900/60 border border-slate-800/80 rounded-2xl p-4 text-xs space-y-2",children:[E.jsx("span",{className:"font-bold text-amber-400 block uppercase tracking-wider text-[10px]",children:"How Explainroo Works"}),E.jsxs("p",{className:"text-slate-400 leading-relaxed text-[11px]",children:["1. ",E.jsx("strong",{children:"Write Narration"}),": Type what the voiceover says for each scene."]}),E.jsxs("p",{className:"text-slate-400 leading-relaxed text-[11px]",children:["2. ",E.jsx("strong",{children:"Add Visuals"}),": Click items in the toolbox and position them on the 16:9 canvas."]}),E.jsxs("p",{className:"text-slate-400 leading-relaxed text-[11px]",children:["3. ",E.jsx("strong",{children:"Word Sync"}),": Click any word in the script to anchor your drawing to that moment."]}),E.jsxs("p",{className:"text-slate-400 leading-relaxed text-[11px]",children:["4. ",E.jsx("strong",{children:"Export"}),": Download the video or export the ",E.jsx("code",{className:"text-slate-300",children:"script.md"})," & ",E.jsx("code",{className:"text-slate-300",children:"scenes.js"})," bundle!"]})]})]})]}),E.jsx("footer",{className:"w-full border-t border-slate-900 bg-slate-950 py-3 text-center text-xs text-slate-500",children:E.jsxs("div",{className:"max-w-7xl mx-auto px-4 flex items-center justify-between flex-wrap gap-2",children:[E.jsxs("div",{className:"flex items-center gap-2",children:[E.jsx("span",{className:"font-semibold text-slate-300",children:"Explainroo UI"}),E.jsx("span",{className:"text-slate-600",children:"·"}),E.jsx("span",{children:"Visual Studio for Explainer Videos & Architecture Demos"})]}),E.jsx("span",{className:"font-mono text-[11px] text-slate-600",children:"[Space] Play/Pause · [Alt + ←/→] Switch Scene · [Esc] Deselect"})]})}),E.jsx(iv,{isOpen:c,onClose:()=>o(!1),onProjectGenerated:G=>{d(G),s(0),f(null)}}),E.jsx(hv,{isOpen:g,onClose:()=>_(!1),onSelectTemplate:G=>{d(G),s(0),f(null)}}),E.jsx(dv,{isOpen:b,onClose:()=>x(!1),project:p})]})},pv="modulepreload",gv=function(p){return"/"+p},gm={},yv=function(d,r,s){let u=Promise.resolve();if(r&&r.length>0){let c=function(_){return Promise.all(_.map(b=>Promise.resolve(b).then(x=>({status:"fulfilled",value:x}),x=>({status:"rejected",reason:x}))))};document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),g=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));u=c(r.map(_=>{if(_=gv(_),_ in gm)return;gm[_]=!0;const b=_.endsWith(".css"),x=b?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${_}"]${x}`))return;const m=document.createElement("link");if(m.rel=b?"stylesheet":pv,b||(m.as="script"),m.crossOrigin="",m.href=_,g&&m.setAttribute("nonce",g),document.head.appendChild(m),b)return new Promise((v,A)=>{m.addEventListener("load",v),m.addEventListener("error",()=>A(new Error(`Unable to preload CSS for ${_}`)))})}))}function f(c){const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=c,window.dispatchEvent(o),!o.defaultPrevented)throw c}return u.then(c=>{for(const o of c||[])o.status==="rejected"&&f(o.reason);return d().catch(f)})};function vv(p={}){const{immediate:d=!1,onNeedReload:r,onNeedRefresh:s,onOfflineReady:u,onRegistered:f,onRegisteredSW:c,onRegisterError:o}=p;let g,_;const b=async(m=!0)=>{await _};async function x(){if("serviceWorker"in navigator){if(g=await yv(async()=>{const{Workbox:m}=await import("./workbox-window.prod.es5-BBnX5xw4.js");return{Workbox:m}},[]).then(({Workbox:m})=>new m("/sw.js",{scope:"/",type:"classic"})).catch(m=>{o==null||o(m)}),!g)return;g.addEventListener("activated",m=>{(m.isUpdate||m.isExternal)&&(r?r():window.location.reload())}),g.addEventListener("installed",m=>{m.isUpdate||u==null||u()}),g.register({immediate:d}).then(m=>{c?c("/sw.js",m):f==null||f(m)}).catch(m=>{o==null||o(m)})}}return _=x(),b}vv({immediate:!0,onNeedRefresh(){console.log("Explainroo Studio PWA update available")},onOfflineReady(){console.log("Explainroo Studio ready for offline creation")}});Bg.createRoot(document.getElementById("root")).render(E.jsx(Ag.StrictMode,{children:E.jsx(mv,{})}));diff --git a/dist/assets/logo.png b/dist/assets/logo.pngnew file mode 100644index 0000000..3a85936Binary files /dev/null and b/dist/assets/logo.png differdiff --git a/dist/assets/logo.svg b/dist/assets/logo.svgnew file mode 100644index 0000000..8a15e97--- /dev/null+++ b/dist/assets/logo.svg@@ -0,0 +1,42 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" width="512" height="512">+ <defs>+ <radialGradient id="bgGlow" cx="50%" cy="50%" r="50%">+ <stop offset="0%" stop-color="#0f172a" />+ <stop offset="100%" stop-color="#020617" />+ </radialGradient>+ <linearGradient id="primaryGrad" x1="0%" y1="0%" x2="100%" y2="100%">+ <stop offset="0%" stop-color="#f59e0b" />+ <stop offset="100%" stop-color="#ef4444" />+ </linearGradient>+ <linearGradient id="neonCyan" x1="0%" y1="0%" x2="100%" y2="100%">+ <stop offset="0%" stop-color="#38bdf8" />+ <stop offset="100%" stop-color="#0284c7" />+ </linearGradient>+ <filter id="glow" x="-20%" y="-20%" width="140%" height="140%">+ <feGaussianBlur stdDeviation="12" result="blur" />+ <feComposite in="SourceGraphic" in2="blur" operator="over" />+ </filter>+ </defs>++ <!-- Background Base -->+ <rect width="512" height="512" rx="112" fill="url(#bgGlow)" />+ <rect width="504" height="504" x="4" y="4" rx="108" fill="none" stroke="#1e293b" stroke-width="4" />++ <!-- Outer Canvas Frame (Hand-Drawn 16:9 Sketch aesthetic) -->+ <rect x="80" y="100" width="352" height="230" rx="24" fill="#090d16" stroke="#38bdf8" stroke-width="10" stroke-dasharray="2 0" />++ <!-- Clapper Header Bars -->+ <path d="M 80 100 L 432 100 L 432 150 L 80 150 Z" fill="#1e293b" stroke="#38bdf8" stroke-width="6" />+ <path d="M 130 100 L 160 150 M 210 100 L 240 150 M 290 100 L 320 150 M 370 100 L 400 150" stroke="#f59e0b" stroke-width="8" stroke-linecap="round" />++ <!-- Center Play / Explainer Action Symbol -->+ <polygon points="230,185 315,235 230,285" fill="url(#primaryGrad)" filter="url(#glow)" />++ <!-- Audio Waveform / Timeline Scrub Track -->+ <rect x="90" y="370" width="332" height="18" rx="9" fill="#1e293b" />+ <rect x="90" y="370" width="180" height="18" rx="9" fill="#38bdf8" />+ <circle cx="270" cy="379" r="14" fill="#f59e0b" stroke="#ffffff" stroke-width="3" filter="url(#glow)" />++ <!-- Sound Cue Waves -->+ <path d="M 120 425 Q 135 410 150 425 T 180 425 T 210 425 T 240 425 T 270 425 T 300 425 T 330 425 T 360 425 T 390 425" fill="none" stroke="#64748b" stroke-width="5" stroke-linecap="round" />+</svg>diff --git a/dist/assets/screenshot-desktop.png b/dist/assets/screenshot-desktop.pngnew file mode 100644index 0000000..848a574Binary files /dev/null and b/dist/assets/screenshot-desktop.png differdiff --git a/dist/assets/screenshot-mobile.png b/dist/assets/screenshot-mobile.pngnew file mode 100644index 0000000..e468a68Binary files /dev/null and b/dist/assets/screenshot-mobile.png differdiff --git a/dist/assets/screenshot-themes.png b/dist/assets/screenshot-themes.pngnew file mode 100644index 0000000..5f21816Binary files /dev/null and b/dist/assets/screenshot-themes.png differdiff --git a/dist/assets/workbox-window.prod.es5-BBnX5xw4.js b/dist/assets/workbox-window.prod.es5-BBnX5xw4.jsnew file mode 100644index 0000000..e68856e--- /dev/null+++ b/dist/assets/workbox-window.prod.es5-BBnX5xw4.js@@ -0,0 +1,2 @@+try{self["workbox:window:7.4.0"]&&_()}catch{}function b(t,r){return new Promise((function(n){var u=new MessageChannel;u.port1.onmessage=function(s){n(s.data)},t.postMessage(r,[u.port2])}))}function P(t,r){(r==null||r>t.length)&&(r=t.length);for(var n=0,u=Array(r);n<r;n++)u[n]=t[n];return u}function j(t,r,n){return r&&(function(u,s){for(var c=0;c<s.length;c++){var o=s[c];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(u,W(o.key),o)}})(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function S(t,r){var n=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=(function(s,c){if(s){if(typeof s=="string")return P(s,c);var o={}.toString.call(s).slice(8,-1);return o==="Object"&&s.constructor&&(o=s.constructor.name),o==="Map"||o==="Set"?Array.from(s):o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?P(s,c):void 0}})(t))||r){n&&(t=n);var u=0;return function(){return u>=t.length?{done:!0}:{done:!1,value:t[u++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.+In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function w(t,r){return w=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,u){return n.__proto__=u,n},w(t,r)}function W(t){var r=(function(n,u){if(typeof n!="object"||!n)return n;var s=n[Symbol.toPrimitive];if(s!==void 0){var c=s.call(n,u);if(typeof c!="object")return c;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(t,"string");return typeof r=="symbol"?r:r+""}try{self["workbox:core:7.4.0"]&&_()}catch{}var m=function(){var t=this;this.promise=new Promise((function(r,n){t.resolve=r,t.reject=n}))};function y(t,r){var n=location.href;return new URL(t,n).href===new URL(r,n).href}var d=function(t,r){this.type=t,Object.assign(this,r)};function l(t,r,n){return t&&t.then||(t=Promise.resolve(t)),r?t.then(r):t}function k(){}var L={type:"SKIP_WAITING"};function E(t,r){return t&&t.then?t.then(k):Promise.resolve()}var O=(function(t){function r(c,o){var e,i;return o===void 0&&(o={}),(e=t.call(this)||this).nn={},e.tn=0,e.rn=new m,e.en=new m,e.on=new m,e.un=0,e.an=new Set,e.cn=function(){var f=e.fn,a=f.installing;e.tn>0||!y(a.scriptURL,e.sn.toString())||performance.now()>e.un+6e4?(e.vn=a,f.removeEventListener("updatefound",e.cn)):(e.hn=a,e.an.add(a),e.rn.resolve(a)),++e.tn,a.addEventListener("statechange",e.ln)},e.ln=function(f){var a=e.fn,v=f.target,h=v.state,p=v===e.vn,g={sw:v,isExternal:p,originalEvent:f};!p&&e.mn&&(g.isUpdate=!0),e.dispatchEvent(new d(h,g)),h==="installed"?e.wn=self.setTimeout((function(){h==="installed"&&a.waiting===v&&e.dispatchEvent(new d("waiting",g))}),200):h==="activating"&&(clearTimeout(e.wn),p||e.en.resolve(v))},e.yn=function(f){var a=e.hn,v=a!==navigator.serviceWorker.controller;e.dispatchEvent(new d("controlling",{isExternal:v,originalEvent:f,sw:a,isUpdate:e.mn})),v||e.on.resolve(a)},e.gn=(i=function(f){var a=f.data,v=f.ports,h=f.source;return l(e.getSW(),(function(){e.an.has(h)&&e.dispatchEvent(new d("message",{data:a,originalEvent:f,ports:v,sw:h}))}))},function(){for(var f=[],a=0;a<arguments.length;a++)f[a]=arguments[a];try{return Promise.resolve(i.apply(this,f))}catch(v){return Promise.reject(v)}}),e.sn=c,e.nn=o,navigator.serviceWorker.addEventListener("message",e.gn),e}var n,u;u=t,(n=r).prototype=Object.create(u.prototype),n.prototype.constructor=n,w(n,u);var s=r.prototype;return s.register=function(c){var o=(c===void 0?{}:c).immediate,e=o!==void 0&&o;try{var i=this;return l((function(f,a){var v=f();return v&&v.then?v.then(a):a(v)})((function(){if(!e&&document.readyState!=="complete")return E(new Promise((function(f){return window.addEventListener("load",f)})))}),(function(){return i.mn=!!navigator.serviceWorker.controller,i.dn=i.pn(),l(i.bn(),(function(f){i.fn=f,i.dn&&(i.hn=i.dn,i.en.resolve(i.dn),i.on.resolve(i.dn),i.dn.addEventListener("statechange",i.ln,{once:!0}));var a=i.fn.waiting;return a&&y(a.scriptURL,i.sn.toString())&&(i.hn=a,Promise.resolve().then((function(){i.dispatchEvent(new d("waiting",{sw:a,wasWaitingBeforeRegister:!0}))})).then((function(){}))),i.hn&&(i.rn.resolve(i.hn),i.an.add(i.hn)),i.fn.addEventListener("updatefound",i.cn),navigator.serviceWorker.addEventListener("controllerchange",i.yn),i.fn}))})))}catch(f){return Promise.reject(f)}},s.update=function(){try{return this.fn?l(E(this.fn.update())):l()}catch(c){return Promise.reject(c)}},s.getSW=function(){return this.hn!==void 0?Promise.resolve(this.hn):this.rn.promise},s.messageSW=function(c){try{return l(this.getSW(),(function(o){return b(o,c)}))}catch(o){return Promise.reject(o)}},s.messageSkipWaiting=function(){this.fn&&this.fn.waiting&&b(this.fn.waiting,L)},s.pn=function(){var c=navigator.serviceWorker.controller;return c&&y(c.scriptURL,this.sn.toString())?c:void 0},s.bn=function(){try{var c=this;return l((function(o,e){try{var i=o()}catch(f){return e(f)}return i&&i.then?i.then(void 0,e):i})((function(){return l(navigator.serviceWorker.register(c.sn,c.nn),(function(o){return c.un=performance.now(),o}))}),(function(o){throw o})))}catch(o){return Promise.reject(o)}},j(r,[{key:"active",get:function(){return this.en.promise}},{key:"controlling",get:function(){return this.on.promise}}])})((function(){function t(){this.Pn=new Map}var r=t.prototype;return r.addEventListener=function(n,u){this.jn(n).add(u)},r.removeEventListener=function(n,u){this.jn(n).delete(u)},r.dispatchEvent=function(n){n.target=this;for(var u,s=S(this.jn(n.type));!(u=s()).done;)(0,u.value)(n)},r.jn=function(n){return this.Pn.has(n)||this.Pn.set(n,new Set),this.Pn.get(n)},t})());export{O as Workbox,d as WorkboxEvent,b as messageSW};diff --git a/dist/favicon.ico b/dist/favicon.iconew file mode 100644index 0000000..86de3bfBinary files /dev/null and b/dist/favicon.ico differdiff --git a/dist/icon.svg b/dist/icon.svgnew file mode 100644index 0000000..8a15e97--- /dev/null+++ b/dist/icon.svg@@ -0,0 +1,42 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" width="512" height="512">+ <defs>+ <radialGradient id="bgGlow" cx="50%" cy="50%" r="50%">+ <stop offset="0%" stop-color="#0f172a" />+ <stop offset="100%" stop-color="#020617" />+ </radialGradient>+ <linearGradient id="primaryGrad" x1="0%" y1="0%" x2="100%" y2="100%">+ <stop offset="0%" stop-color="#f59e0b" />+ <stop offset="100%" stop-color="#ef4444" />+ </linearGradient>+ <linearGradient id="neonCyan" x1="0%" y1="0%" x2="100%" y2="100%">+ <stop offset="0%" stop-color="#38bdf8" />+ <stop offset="100%" stop-color="#0284c7" />+ </linearGradient>+ <filter id="glow" x="-20%" y="-20%" width="140%" height="140%">+ <feGaussianBlur stdDeviation="12" result="blur" />+ <feComposite in="SourceGraphic" in2="blur" operator="over" />+ </filter>+ </defs>++ <!-- Background Base -->+ <rect width="512" height="512" rx="112" fill="url(#bgGlow)" />+ <rect width="504" height="504" x="4" y="4" rx="108" fill="none" stroke="#1e293b" stroke-width="4" />++ <!-- Outer Canvas Frame (Hand-Drawn 16:9 Sketch aesthetic) -->+ <rect x="80" y="100" width="352" height="230" rx="24" fill="#090d16" stroke="#38bdf8" stroke-width="10" stroke-dasharray="2 0" />++ <!-- Clapper Header Bars -->+ <path d="M 80 100 L 432 100 L 432 150 L 80 150 Z" fill="#1e293b" stroke="#38bdf8" stroke-width="6" />+ <path d="M 130 100 L 160 150 M 210 100 L 240 150 M 290 100 L 320 150 M 370 100 L 400 150" stroke="#f59e0b" stroke-width="8" stroke-linecap="round" />++ <!-- Center Play / Explainer Action Symbol -->+ <polygon points="230,185 315,235 230,285" fill="url(#primaryGrad)" filter="url(#glow)" />++ <!-- Audio Waveform / Timeline Scrub Track -->+ <rect x="90" y="370" width="332" height="18" rx="9" fill="#1e293b" />+ <rect x="90" y="370" width="180" height="18" rx="9" fill="#38bdf8" />+ <circle cx="270" cy="379" r="14" fill="#f59e0b" stroke="#ffffff" stroke-width="3" filter="url(#glow)" />++ <!-- Sound Cue Waves -->+ <path d="M 120 425 Q 135 410 150 425 T 180 425 T 210 425 T 240 425 T 270 425 T 300 425 T 330 425 T 360 425 T 390 425" fill="none" stroke="#64748b" stroke-width="5" stroke-linecap="round" />+</svg>diff --git a/dist/index.html b/dist/index.htmlnew file mode 100644index 0000000..bdb9364--- /dev/null+++ b/dist/index.html@@ -0,0 +1,124 @@+<!doctype html>+<html lang="en" class="h-full">+ <head>+ <meta charset="UTF-8" />+ <script>+ // Stub out Vite HMR WebSocket in cloud preview iframe where HMR is disabled+ (function() {+ if (typeof window !== 'undefined' && window.WebSocket) {+ const OrigWebSocket = window.WebSocket;+ const CustomWebSocket = function(url, protocols) {+ const isViteHmr =+ protocols === 'vite-hmr' ||+ (Array.isArray(protocols) && protocols.includes('vite-hmr')) ||+ (typeof url === 'string' && (url.includes('vite-hmr') || url.includes('@vite')));++ if (isViteHmr) {+ const mock = new EventTarget();+ mock.send = function() {};+ mock.close = function() {};+ mock.readyState = 1; // OPEN+ mock.url = url;+ mock.protocol = 'vite-hmr';+ mock.extensions = '';+ mock.binaryType = 'blob';+ setTimeout(() => {+ mock.dispatchEvent(new Event('open'));+ }, 10);+ return mock;+ }+ return new OrigWebSocket(url, protocols);+ };+ CustomWebSocket.prototype = OrigWebSocket.prototype;+ CustomWebSocket.CONNECTING = 0;+ CustomWebSocket.OPEN = 1;+ CustomWebSocket.CLOSING = 2;+ CustomWebSocket.CLOSED = 3;+ window.WebSocket = CustomWebSocket;+ }++ const origError = console.error;+ console.error = function(...args) {+ const text = args.map(a => (a && a.message) || String(a)).join(' ');+ if (text.includes('WebSocket') || text.includes('[vite]')) {+ return;+ }+ origError.apply(console, args);+ };+ window.addEventListener('error', function(e) {+ if (e.message && (e.message.includes('WebSocket') || e.message.includes('[vite]'))) {+ e.stopImmediatePropagation();+ e.preventDefault();+ }+ }, true);+ })();+ </script>+ <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover" />+ <title>Explainroo Studio - No-Code Animated Explainer Video Creator</title>+ <meta name="description" content="Transform GitHub repos and software concepts into narrated, animated explainer videos without terminal commands or code. Powered by Explainroo." />+ <meta name="keywords" content="explainroo, explainer video generator, software demo, animated diagrams, whiteboard animation, code to video, no-code video creator" />+ <meta name="author" content="Explainroo Studio" />+ <meta name="robots" content="index, follow" />+ <link rel="canonical" href="/" />++ <!-- Mobile & PWA Theme Colors -->+ <meta name="theme-color" content="#090d16" />+ <meta name="color-scheme" content="dark" />+ <meta name="mobile-web-app-capable" content="yes" />+ <meta name="apple-mobile-web-app-capable" content="yes" />+ <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />+ <meta name="apple-mobile-web-app-title" content="Explainroo" />+ <meta name="application-name" content="Explainroo Studio" />+ <meta name="msapplication-TileColor" content="#090d16" />++ <!-- Open Graph / Facebook -->+ <meta property="og:type" content="website" />+ <meta property="og:site_name" content="Explainroo Studio" />+ <meta property="og:title" content="Explainroo Studio - No-Code Animated Explainer Video Creator" />+ <meta property="og:description" content="Transform software repos and complex concepts into narrated, animated explainer videos with visual diagrams and synchronized voiceovers." />+ <meta property="og:image" content="/screenshot-desktop.png" />+ <meta property="og:image:width" content="1280" />+ <meta property="og:image:height" content="720" />+ <meta property="og:image:alt" content="Explainroo Studio Visual Video Builder" />++ <!-- Twitter Card -->+ <meta name="twitter:card" content="summary_large_image" />+ <meta name="twitter:title" content="Explainroo Studio - No-Code Explainer Video Creator" />+ <meta name="twitter:description" content="Turn complex code and system architecture into narrated, animated explainer videos in your browser." />+ <meta name="twitter:image" content="/screenshot-desktop.png" />++ <!-- Icons & Manifest Links -->+ <link rel="apple-touch-icon" href="/apple-touch-icon.png" />+ <link rel="icon" type="image/svg+xml" href="/icon.svg" />+ <link rel="alternate icon" href="/favicon.ico" />++ <!-- Typography -->+ <link rel="preconnect" href="https://fonts.googleapis.com">+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>+ <link href="https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600;700&family=Caveat:wght@600;700&display=swap" rel="stylesheet">++ <!-- Schema.org JSON-LD Structured Data for WebApplication -->+ <script type="application/ld+json">+ {+ "@context": "https://schema.org",+ "@type": "WebApplication",+ "name": "Explainroo Studio",+ "alternateName": "Explainroo",+ "description": "Visual, no-code studio for creating narrated animated explainer videos, software architecture diagrams, and product demos.",+ "applicationCategory": "DesignApplication",+ "operatingSystem": "Any",+ "browserRequirements": "Requires JavaScript. Requires HTML5 Canvas.",+ "offers": {+ "@type": "Offer",+ "price": "0",+ "priceCurrency": "USD"+ }+ }+ </script>+ <script type="module" crossorigin src="/assets/index-C1lOqGsA.js"></script>+ <link rel="stylesheet" crossorigin href="/assets/index-C0kCKPlA.css">+ <link rel="manifest" href="/manifest.webmanifest"></head>+ <body class="h-full bg-slate-950 text-slate-100 font-sans antialiased overflow-x-hidden">+ <div id="root" class="h-full"></div>+ </body>+</html>diff --git a/dist/manifest.webmanifest b/dist/manifest.webmanifestnew file mode 100644index 0000000..b00b855--- /dev/null+++ b/dist/manifest.webmanifest@@ -0,0 +1 @@+{"name":"Explainroo UI - No-Code Explainer Video Creator","short_name":"Explainroo UI","description":"Transform GitHub repos and software concepts into narrated, animated explainer videos without code or terminal commands.","start_url":"/?source=pwa","display":"standalone","background_color":"#020617","theme_color":"#090d16","lang":"en","scope":"/","id":"/?source=pwa","display_override":["window-controls-overlay","standalone","minimal-ui"],"orientation":"any","categories":["design","productivity","education"],"prefer_related_applications":false,"icons":[{"src":"/pwa-192x192.png","sizes":"192x192","type":"image/png","purpose":"any"},{"src":"/pwa-512x512.png","sizes":"512x512","type":"image/png","purpose":"any"},{"src":"/pwa-maskable-512x512.png","sizes":"512x512","type":"image/png","purpose":"maskable"}],"screenshots":[{"src":"/screenshot-desktop.png","sizes":"1280x720","type":"image/png","form_factor":"wide","label":"Explainroo Studio 16:9 Canvas Stage"},{"src":"/screenshot-mobile.png","sizes":"720x1280","type":"image/png","form_factor":"narrow","label":"Explainroo Studio Mobile View"}],"shortcuts":[{"name":"New Explainer","short_name":"Create","description":"Create a new animated explainer video","url":"/","icons":[{"src":"/pwa-192x192.png","sizes":"192x192"}]}]}diff --git a/dist/pwa-192x192.png b/dist/pwa-192x192.pngnew file mode 100644index 0000000..3a85936Binary files /dev/null and b/dist/pwa-192x192.png differdiff --git a/dist/pwa-512x512.png b/dist/pwa-512x512.pngnew file mode 100644index 0000000..4d58b84Binary files /dev/null and b/dist/pwa-512x512.png differdiff --git a/dist/pwa-maskable-512x512.png b/dist/pwa-maskable-512x512.pngnew file mode 100644index 0000000..1483a3bBinary files /dev/null and b/dist/pwa-maskable-512x512.png differdiff --git a/dist/screenshot-desktop.png b/dist/screenshot-desktop.pngnew file mode 100644index 0000000..848a574Binary files /dev/null and b/dist/screenshot-desktop.png differdiff --git a/dist/screenshot-mobile.png b/dist/screenshot-mobile.pngnew file mode 100644index 0000000..e468a68Binary files /dev/null and b/dist/screenshot-mobile.png differdiff --git a/dist/screenshot-themes.png b/dist/screenshot-themes.pngnew file mode 100644index 0000000..5f21816Binary files /dev/null and b/dist/screenshot-themes.png differdiff --git a/dist/sw.js b/dist/sw.jsnew file mode 100644index 0000000..b40a181--- /dev/null+++ b/dist/sw.js@@ -0,0 +1 @@+if(!self.define){let e,s={};const n=(n,i)=>(n=new URL(n+".js",i).href,s[n]||new Promise(s=>{if("document"in self){const e=document.createElement("script");e.src=n,e.onload=s,document.head.appendChild(e)}else e=n,importScripts(n),s()}).then(()=>{let e=s[n];if(!e)throw new Error(`Module ${n} didn’t register its module`);return e}));self.define=(i,o)=>{const r=e||("document"in self?document.currentScript.src:"")||location.href;if(s[r])return;let l={};const c=e=>n(e,r),t={module:{uri:r},exports:l,require:c};s[r]=Promise.all(i.map(e=>t[e]||c(e))).then(e=>(o(...e),l))}}define(["./workbox-835c8c05"],function(e){"use strict";self.skipWaiting(),e.clientsClaim(),e.precacheAndRoute([{url:"screenshot-themes.png",revision:"3f3a6a18997695017d0dc702bf790c0a"},{url:"screenshot-mobile.png",revision:"7377b8d1c330c1d8a3d74e796a5675db"},{url:"screenshot-desktop.png",revision:"ba67837929d4f70d5733405cba1b30f5"},{url:"pwa-maskable-512x512.png",revision:"4f3d35073a41d15248ded7d34e4457cd"},{url:"pwa-512x512.png",revision:"6703d13f6cb1cfe16342417604571a04"},{url:"pwa-192x192.png",revision:"6147536f94f50602be7d243b10641479"},{url:"index.html",revision:"5215139d18013dc3edb10ff7bc267ed2"},{url:"icon.svg",revision:"38adb836223a63714a9346601d4044a1"},{url:"favicon.ico",revision:"3666584c1af0ab75b0f56f346498abd6"},{url:"apple-touch-icon.png",revision:"e1743deecc67425fcd0856164f284014"},{url:"assets/workbox-window.prod.es5-BBnX5xw4.js",revision:null},{url:"assets/screenshot-themes.png",revision:null},{url:"assets/screenshot-mobile.png",revision:null},{url:"assets/screenshot-desktop.png",revision:null},{url:"assets/logo.svg",revision:null},{url:"assets/logo.png",revision:null},{url:"assets/index-C1lOqGsA.js",revision:null},{url:"assets/index-C0kCKPlA.css",revision:null},{url:"apple-touch-icon.png",revision:"e1743deecc67425fcd0856164f284014"},{url:"favicon.ico",revision:"3666584c1af0ab75b0f56f346498abd6"},{url:"icon.svg",revision:"38adb836223a63714a9346601d4044a1"},{url:"pwa-192x192.png",revision:"6147536f94f50602be7d243b10641479"},{url:"pwa-512x512.png",revision:"6703d13f6cb1cfe16342417604571a04"},{url:"pwa-maskable-512x512.png",revision:"4f3d35073a41d15248ded7d34e4457cd"},{url:"screenshot-desktop.png",revision:"ba67837929d4f70d5733405cba1b30f5"},{url:"screenshot-mobile.png",revision:"7377b8d1c330c1d8a3d74e796a5675db"},{url:"manifest.webmanifest",revision:"01102b82fe98e987c18af6ed1ef42047"}],{}),e.cleanupOutdatedCaches(),e.registerRoute(new e.NavigationRoute(e.createHandlerBoundToURL("index.html"))),e.registerRoute(/^https:\/\/fonts\.googleapis\.com\/.*/i,new e.CacheFirst({cacheName:"google-fonts-cache",plugins:[new e.ExpirationPlugin({maxEntries:10,maxAgeSeconds:31536e3}),new e.CacheableResponsePlugin({statuses:[0,200]})]}),"GET"),e.registerRoute(/^https:\/\/fonts\.gstatic\.com\/.*/i,new e.CacheFirst({cacheName:"gstatic-fonts-cache",plugins:[new e.ExpirationPlugin({maxEntries:10,maxAgeSeconds:31536e3}),new e.CacheableResponsePlugin({statuses:[0,200]})]}),"GET")});diff --git a/dist/workbox-835c8c05.js b/dist/workbox-835c8c05.jsnew file mode 100644index 0000000..30b968e--- /dev/null+++ b/dist/workbox-835c8c05.js@@ -0,0 +1 @@+define(["exports"],function(t){"use strict";try{self["workbox:core:7.4.0"]&&_()}catch(t){}const e=(t,...e)=>{let s=t;return e.length>0&&(s+=` :: ${JSON.stringify(e)}`),s};class s extends Error{constructor(t,s){super(e(t,s)),this.name=t,this.details=s}}try{self["workbox:routing:7.4.0"]&&_()}catch(t){}const n=t=>t&&"object"==typeof t?t:{handle:t};class i{constructor(t,e,s="GET"){this.handler=n(e),this.match=t,this.method=s}setCatchHandler(t){this.catchHandler=n(t)}}class r extends i{constructor(t,e,s){super(({url:e})=>{const s=t.exec(e.href);if(s&&(e.origin===location.origin||0===s.index))return s.slice(1)},e,s)}}class a{constructor(){this.t=new Map,this.i=new Map}get routes(){return this.t}addFetchListener(){self.addEventListener("fetch",t=>{const{request:e}=t,s=this.handleRequest({request:e,event:t});s&&t.respondWith(s)})}addCacheListener(){self.addEventListener("message",t=>{if(t.data&&"CACHE_URLS"===t.data.type){const{payload:e}=t.data,s=Promise.all(e.urlsToCache.map(e=>{"string"==typeof e&&(e=[e]);const s=new Request(...e);return this.handleRequest({request:s,event:t})}));t.waitUntil(s),t.ports&&t.ports[0]&&s.then(()=>t.ports[0].postMessage(!0))}})}handleRequest({request:t,event:e}){const s=new URL(t.url,location.href);if(!s.protocol.startsWith("http"))return;const n=s.origin===location.origin,{params:i,route:r}=this.findMatchingRoute({event:e,request:t,sameOrigin:n,url:s});let a=r&&r.handler;const o=t.method;if(!a&&this.i.has(o)&&(a=this.i.get(o)),!a)return;let c;try{c=a.handle({url:s,request:t,event:e,params:i})}catch(t){c=Promise.reject(t)}const h=r&&r.catchHandler;return c instanceof Promise&&(this.o||h)&&(c=c.catch(async n=>{if(h)try{return await h.handle({url:s,request:t,event:e,params:i})}catch(t){t instanceof Error&&(n=t)}if(this.o)return this.o.handle({url:s,request:t,event:e});throw n})),c}findMatchingRoute({url:t,sameOrigin:e,request:s,event:n}){const i=this.t.get(s.method)||[];for(const r of i){let i;const a=r.match({url:t,sameOrigin:e,request:s,event:n});if(a)return i=a,(Array.isArray(i)&&0===i.length||a.constructor===Object&&0===Object.keys(a).length||"boolean"==typeof a)&&(i=void 0),{route:r,params:i}}return{}}setDefaultHandler(t,e="GET"){this.i.set(e,n(t))}setCatchHandler(t){this.o=n(t)}registerRoute(t){this.t.has(t.method)||this.t.set(t.method,[]),this.t.get(t.method).push(t)}unregisterRoute(t){if(!this.t.has(t.method))throw new s("unregister-route-but-not-found-with-method",{method:t.method});const e=this.t.get(t.method).indexOf(t);if(!(e>-1))throw new s("unregister-route-route-not-registered");this.t.get(t.method).splice(e,1)}}let o;const c=()=>(o||(o=new a,o.addFetchListener(),o.addCacheListener()),o);function h(t,e,n){let a;if("string"==typeof t){const s=new URL(t,location.href);a=new i(({url:t})=>t.href===s.href,e,n)}else if(t instanceof RegExp)a=new r(t,e,n);else if("function"==typeof t)a=new i(t,e,n);else{if(!(t instanceof i))throw new s("unsupported-route-type",{moduleName:"workbox-routing",funcName:"registerRoute",paramName:"capture"});a=t}return c().registerRoute(a),a}const u={googleAnalytics:"googleAnalytics",precache:"precache-v2",prefix:"workbox",runtime:"runtime",suffix:"undefined"!=typeof registration?registration.scope:""},l=t=>[u.prefix,t,u.suffix].filter(t=>t&&t.length>0).join("-"),f=t=>t||l(u.precache),w=t=>t||l(u.runtime);function d(t){t.then(()=>{})}const p=new Set;function y(){return y=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var s=arguments[e];for(var n in s)({}).hasOwnProperty.call(s,n)&&(t[n]=s[n])}return t},y.apply(null,arguments)}let m,g;const R=new WeakMap,v=new WeakMap,b=new WeakMap,q=new WeakMap,D=new WeakMap;let U={get(t,e,s){if(t instanceof IDBTransaction){if("done"===e)return v.get(t);if("objectStoreNames"===e)return t.objectStoreNames||b.get(t);if("store"===e)return s.objectStoreNames[1]?void 0:s.objectStore(s.objectStoreNames[0])}return I(t[e])},set:(t,e,s)=>(t[e]=s,!0),has:(t,e)=>t instanceof IDBTransaction&&("done"===e||"store"===e)||e in t};function x(t){return t!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?(g||(g=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(t)?function(...e){return t.apply(C(this),e),I(R.get(this))}:function(...e){return I(t.apply(C(this),e))}:function(e,...s){const n=t.call(C(this),e,...s);return b.set(n,e.sort?e.sort():[e]),I(n)}}function L(t){return"function"==typeof t?x(t):(t instanceof IDBTransaction&&function(t){if(v.has(t))return;const e=new Promise((e,s)=>{const n=()=>{t.removeEventListener("complete",i),t.removeEventListener("error",r),t.removeEventListener("abort",r)},i=()=>{e(),n()},r=()=>{s(t.error||new DOMException("AbortError","AbortError")),n()};t.addEventListener("complete",i),t.addEventListener("error",r),t.addEventListener("abort",r)});v.set(t,e)}(t),e=t,(m||(m=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])).some(t=>e instanceof t)?new Proxy(t,U):t);var e}function I(t){if(t instanceof IDBRequest)return function(t){const e=new Promise((e,s)=>{const n=()=>{t.removeEventListener("success",i),t.removeEventListener("error",r)},i=()=>{e(I(t.result)),n()},r=()=>{s(t.error),n()};t.addEventListener("success",i),t.addEventListener("error",r)});return e.then(e=>{e instanceof IDBCursor&&R.set(e,t)}).catch(()=>{}),D.set(e,t),e}(t);if(q.has(t))return q.get(t);const e=L(t);return e!==t&&(q.set(t,e),D.set(e,t)),e}const C=t=>D.get(t);const E=["get","getKey","getAll","getAllKeys","count"],N=["put","add","delete","clear"],O=new Map;function B(t,e){if(!(t instanceof IDBDatabase)||e in t||"string"!=typeof e)return;if(O.get(e))return O.get(e);const s=e.replace(/FromIndex$/,""),n=e!==s,i=N.includes(s);if(!(s in(n?IDBIndex:IDBObjectStore).prototype)||!i&&!E.includes(s))return;const r=async function(t,...e){const r=this.transaction(t,i?"readwrite":"readonly");let a=r.store;return n&&(a=a.index(e.shift())),(await Promise.all([a[s](...e),i&&r.done]))[0]};return O.set(e,r),r}U=(t=>y({},t,{get:(e,s,n)=>B(e,s)||t.get(e,s,n),has:(e,s)=>!!B(e,s)||t.has(e,s)}))(U);try{self["workbox:expiration:7.4.0"]&&_()}catch(t){}const k="cache-entries",M=t=>{const e=new URL(t,location.href);return e.hash="",e.href};class T{constructor(t){this.h=null,this.u=t}l(t){const e=t.createObjectStore(k,{keyPath:"id"});e.createIndex("cacheName","cacheName",{unique:!1}),e.createIndex("timestamp","timestamp",{unique:!1})}p(t){this.l(t),this.u&&function(t,{blocked:e}={}){const s=indexedDB.deleteDatabase(t);e&&s.addEventListener("blocked",t=>e(t.oldVersion,t)),I(s).then(()=>{})}(this.u)}async setTimestamp(t,e){const s={url:t=M(t),timestamp:e,cacheName:this.u,id:this.m(t)},n=(await this.getDb()).transaction(k,"readwrite",{durability:"relaxed"});await n.store.put(s),await n.done}async getTimestamp(t){const e=await this.getDb(),s=await e.get(k,this.m(t));return null==s?void 0:s.timestamp}async expireEntries(t,e){const s=await this.getDb();let n=await s.transaction(k).store.index("timestamp").openCursor(null,"prev");const i=[];let r=0;for(;n;){const s=n.value;s.cacheName===this.u&&(t&&s.timestamp<t||e&&r>=e?i.push(n.value):r++),n=await n.continue()}const a=[];for(const t of i)await s.delete(k,t.id),a.push(t.url);return a}m(t){return this.u+"|"+M(t)}async getDb(){return this.h||(this.h=await function(t,e,{blocked:s,upgrade:n,blocking:i,terminated:r}={}){const a=indexedDB.open(t,e),o=I(a);return n&&a.addEventListener("upgradeneeded",t=>{n(I(a.result),t.oldVersion,t.newVersion,I(a.transaction),t)}),s&&a.addEventListener("blocked",t=>s(t.oldVersion,t.newVersion,t)),o.then(t=>{r&&t.addEventListener("close",()=>r()),i&&t.addEventListener("versionchange",t=>i(t.oldVersion,t.newVersion,t))}).catch(()=>{}),o}("workbox-expiration",1,{upgrade:this.p.bind(this)})),this.h}}class j{constructor(t,e={}){this.R=!1,this.v=!1,this.q=e.maxEntries,this.D=e.maxAgeSeconds,this.U=e.matchOptions,this.u=t,this._=new T(t)}async expireEntries(){if(this.R)return void(this.v=!0);this.R=!0;const t=this.D?Date.now()-1e3*this.D:0,e=await this._.expireEntries(t,this.q),s=await self.caches.open(this.u);for(const t of e)await s.delete(t,this.U);this.R=!1,this.v&&(this.v=!1,d(this.expireEntries()))}async updateTimestamp(t){await this._.setTimestamp(t,Date.now())}async isURLExpired(t){if(this.D){const e=await this._.getTimestamp(t),s=Date.now()-1e3*this.D;return void 0===e||e<s}return!1}async delete(){this.v=!1,await this._.expireEntries(1/0)}}try{self["workbox:cacheable-response:7.4.0"]&&_()}catch(t){}class P{constructor(t={}){this.L=t.statuses,this.I=t.headers}isResponseCacheable(t){let e=!0;return this.L&&(e=this.L.includes(t.status)),this.I&&e&&(e=Object.keys(this.I).some(e=>t.headers.get(e)===this.I[e])),e}}function W(t,e){const s=new URL(t);for(const t of e)s.searchParams.delete(t);return s.href}class S{constructor(){this.promise=new Promise((t,e)=>{this.resolve=t,this.reject=e})}}try{self["workbox:strategies:7.4.0"]&&_()}catch(t){}function K(t){return"string"==typeof t?new Request(t):t}class A{constructor(t,e){this.C={},Object.assign(this,e),this.event=e.event,this.N=t,this.O=new S,this.B=[],this.k=[...t.plugins],this.M=new Map;for(const t of this.k)this.M.set(t,{});this.event.waitUntil(this.O.promise)}async fetch(t){const{event:e}=this;let n=K(t);if("navigate"===n.mode&&e instanceof FetchEvent&&e.preloadResponse){const t=await e.preloadResponse;if(t)return t}const i=this.hasCallback("fetchDidFail")?n.clone():null;try{for(const t of this.iterateCallbacks("requestWillFetch"))n=await t({request:n.clone(),event:e})}catch(t){if(t instanceof Error)throw new s("plugin-error-request-will-fetch",{thrownErrorMessage:t.message})}const r=n.clone();try{let t;t=await fetch(n,"navigate"===n.mode?void 0:this.N.fetchOptions);for(const s of this.iterateCallbacks("fetchDidSucceed"))t=await s({event:e,request:r,response:t});return t}catch(t){throw i&&await this.runCallbacks("fetchDidFail",{error:t,event:e,originalRequest:i.clone(),request:r.clone()}),t}}async fetchAndCachePut(t){const e=await this.fetch(t),s=e.clone();return this.waitUntil(this.cachePut(t,s)),e}async cacheMatch(t){const e=K(t);let s;const{cacheName:n,matchOptions:i}=this.N,r=await this.getCacheKey(e,"read"),a=Object.assign(Object.assign({},i),{cacheName:n});s=await caches.match(r,a);for(const t of this.iterateCallbacks("cachedResponseWillBeUsed"))s=await t({cacheName:n,matchOptions:i,cachedResponse:s,request:r,event:this.event})||void 0;return s}async cachePut(t,e){const n=K(t);var i;await(i=0,new Promise(t=>setTimeout(t,i)));const r=await this.getCacheKey(n,"write");if(!e)throw new s("cache-put-with-no-response",{url:(a=r.url,new URL(String(a),location.href).href.replace(new RegExp(`^${location.origin}`),""))});var a;const o=await this.T(e);if(!o)return!1;const{cacheName:c,matchOptions:h}=this.N,u=await self.caches.open(c),l=this.hasCallback("cacheDidUpdate"),f=l?await async function(t,e,s,n){const i=W(e.url,s);if(e.url===i)return t.match(e,n);const r=Object.assign(Object.assign({},n),{ignoreSearch:!0}),a=await t.keys(e,r);for(const e of a)if(i===W(e.url,s))return t.match(e,n)}(u,r.clone(),["__WB_REVISION__"],h):null;try{await u.put(r,l?o.clone():o)}catch(t){if(t instanceof Error)throw"QuotaExceededError"===t.name&&await async function(){for(const t of p)await t()}(),t}for(const t of this.iterateCallbacks("cacheDidUpdate"))await t({cacheName:c,oldResponse:f,newResponse:o.clone(),request:r,event:this.event});return!0}async getCacheKey(t,e){const s=`${t.url} | ${e}`;if(!this.C[s]){let n=t;for(const t of this.iterateCallbacks("cacheKeyWillBeUsed"))n=K(await t({mode:e,request:n,event:this.event,params:this.params}));this.C[s]=n}return this.C[s]}hasCallback(t){for(const e of this.N.plugins)if(t in e)return!0;return!1}async runCallbacks(t,e){for(const s of this.iterateCallbacks(t))await s(e)}*iterateCallbacks(t){for(const e of this.N.plugins)if("function"==typeof e[t]){const s=this.M.get(e),n=n=>{const i=Object.assign(Object.assign({},n),{state:s});return e[t](i)};yield n}}waitUntil(t){return this.B.push(t),t}async doneWaiting(){for(;this.B.length;){const t=this.B.splice(0),e=(await Promise.allSettled(t)).find(t=>"rejected"===t.status);if(e)throw e.reason}}destroy(){this.O.resolve(null)}async T(t){let e=t,s=!1;for(const t of this.iterateCallbacks("cacheWillUpdate"))if(e=await t({request:this.request,response:e,event:this.event})||void 0,s=!0,!e)break;return s||e&&200!==e.status&&(e=void 0),e}}class F{constructor(t={}){this.cacheName=w(t.cacheName),this.plugins=t.plugins||[],this.fetchOptions=t.fetchOptions,this.matchOptions=t.matchOptions}handle(t){const[e]=this.handleAll(t);return e}handleAll(t){t instanceof FetchEvent&&(t={event:t,request:t.request});const e=t.event,s="string"==typeof t.request?new Request(t.request):t.request,n="params"in t?t.params:void 0,i=new A(this,{event:e,request:s,params:n}),r=this.j(i,s,e);return[r,this.P(r,i,s,e)]}async j(t,e,n){let i;await t.runCallbacks("handlerWillStart",{event:n,request:e});try{if(i=await this.W(e,t),!i||"error"===i.type)throw new s("no-response",{url:e.url})}catch(s){if(s instanceof Error)for(const r of t.iterateCallbacks("handlerDidError"))if(i=await r({error:s,event:n,request:e}),i)break;if(!i)throw s}for(const s of t.iterateCallbacks("handlerWillRespond"))i=await s({event:n,request:e,response:i});return i}async P(t,e,s,n){let i,r;try{i=await t}catch(r){}try{await e.runCallbacks("handlerDidRespond",{event:n,request:s,response:i}),await e.doneWaiting()}catch(t){t instanceof Error&&(r=t)}if(await e.runCallbacks("handlerDidComplete",{event:n,request:s,response:i,error:r}),e.destroy(),r)throw r}}function H(t,e){const s=e();return t.waitUntil(s),s}try{self["workbox:precaching:7.4.0"]&&_()}catch(t){}function $(t){if(!t)throw new s("add-to-cache-list-unexpected-type",{entry:t});if("string"==typeof t){const e=new URL(t,location.href);return{cacheKey:e.href,url:e.href}}const{revision:e,url:n}=t;if(!n)throw new s("add-to-cache-list-unexpected-type",{entry:t});if(!e){const t=new URL(n,location.href);return{cacheKey:t.href,url:t.href}}const i=new URL(n,location.href),r=new URL(n,location.href);return i.searchParams.set("__WB_REVISION__",e),{cacheKey:i.href,url:r.href}}class G{constructor(){this.updatedURLs=[],this.notUpdatedURLs=[],this.handlerWillStart=async({request:t,state:e})=>{e&&(e.originalRequest=t)},this.cachedResponseWillBeUsed=async({event:t,state:e,cachedResponse:s})=>{if("install"===t.type&&e&&e.originalRequest&&e.originalRequest instanceof Request){const t=e.originalRequest.url;s?this.notUpdatedURLs.push(t):this.updatedURLs.push(t)}return s}}}class V{constructor({precacheController:t}){this.cacheKeyWillBeUsed=async({request:t,params:e})=>{const s=(null==e?void 0:e.cacheKey)||this.S.getCacheKeyForURL(t.url);return s?new Request(s,{headers:t.headers}):t},this.S=t}}let J,Q;async function z(t,e){let n=null;if(t.url){n=new URL(t.url).origin}if(n!==self.location.origin)throw new s("cross-origin-copy-response",{origin:n});const i=t.clone(),r={headers:new Headers(i.headers),status:i.status,statusText:i.statusText},a=function(){if(void 0===J){const t=new Response("");if("body"in t)try{new Response(t.body),J=!0}catch(t){J=!1}J=!1}return J}()?i.body:await i.blob();return new Response(a,r)}class X extends F{constructor(t={}){t.cacheName=f(t.cacheName),super(t),this.K=!1!==t.fallbackToNetwork,this.plugins.push(X.copyRedirectedCacheableResponsesPlugin)}async W(t,e){const s=await e.cacheMatch(t);return s||(e.event&&"install"===e.event.type?await this.A(t,e):await this.F(t,e))}async F(t,e){let n;const i=e.params||{};if(!this.K)throw new s("missing-precache-entry",{cacheName:this.cacheName,url:t.url});{const s=i.integrity,r=t.integrity,a=!r||r===s;n=await e.fetch(new Request(t,{integrity:"no-cors"!==t.mode?r||s:void 0})),s&&a&&"no-cors"!==t.mode&&(this.H(),await e.cachePut(t,n.clone()))}return n}async A(t,e){this.H();const n=await e.fetch(t);if(!await e.cachePut(t,n.clone()))throw new s("bad-precaching-response",{url:t.url,status:n.status});return n}H(){let t=null,e=0;for(const[s,n]of this.plugins.entries())n!==X.copyRedirectedCacheableResponsesPlugin&&(n===X.defaultPrecacheCacheabilityPlugin&&(t=s),n.cacheWillUpdate&&e++);0===e?this.plugins.push(X.defaultPrecacheCacheabilityPlugin):e>1&&null!==t&&this.plugins.splice(t,1)}}X.defaultPrecacheCacheabilityPlugin={cacheWillUpdate:async({response:t})=>!t||t.status>=400?null:t},X.copyRedirectedCacheableResponsesPlugin={cacheWillUpdate:async({response:t})=>t.redirected?await z(t):t};class Y{constructor({cacheName:t,plugins:e=[],fallbackToNetwork:s=!0}={}){this.$=new Map,this.G=new Map,this.V=new Map,this.N=new X({cacheName:f(t),plugins:[...e,new V({precacheController:this})],fallbackToNetwork:s}),this.install=this.install.bind(this),this.activate=this.activate.bind(this)}get strategy(){return this.N}precache(t){this.addToCacheList(t),this.J||(self.addEventListener("install",this.install),self.addEventListener("activate",this.activate),this.J=!0)}addToCacheList(t){const e=[];for(const n of t){"string"==typeof n?e.push(n):n&&void 0===n.revision&&e.push(n.url);const{cacheKey:t,url:i}=$(n),r="string"!=typeof n&&n.revision?"reload":"default";if(this.$.has(i)&&this.$.get(i)!==t)throw new s("add-to-cache-list-conflicting-entries",{firstEntry:this.$.get(i),secondEntry:t});if("string"!=typeof n&&n.integrity){if(this.V.has(t)&&this.V.get(t)!==n.integrity)throw new s("add-to-cache-list-conflicting-integrities",{url:i});this.V.set(t,n.integrity)}if(this.$.set(i,t),this.G.set(i,r),e.length>0){const t=`Workbox is precaching URLs without revision info: ${e.join(", ")}\nThis is generally NOT safe. Learn more at https://bit.ly/wb-precache`;console.warn(t)}}}install(t){return H(t,async()=>{const e=new G;this.strategy.plugins.push(e);for(const[e,s]of this.$){const n=this.V.get(s),i=this.G.get(e),r=new Request(e,{integrity:n,cache:i,credentials:"same-origin"});await Promise.all(this.strategy.handleAll({params:{cacheKey:s},request:r,event:t}))}const{updatedURLs:s,notUpdatedURLs:n}=e;return{updatedURLs:s,notUpdatedURLs:n}})}activate(t){return H(t,async()=>{const t=await self.caches.open(this.strategy.cacheName),e=await t.keys(),s=new Set(this.$.values()),n=[];for(const i of e)s.has(i.url)||(await t.delete(i),n.push(i.url));return{deletedURLs:n}})}getURLsToCacheKeys(){return this.$}getCachedURLs(){return[...this.$.keys()]}getCacheKeyForURL(t){const e=new URL(t,location.href);return this.$.get(e.href)}getIntegrityForCacheKey(t){return this.V.get(t)}async matchPrecache(t){const e=t instanceof Request?t.url:t,s=this.getCacheKeyForURL(e);if(s){return(await self.caches.open(this.strategy.cacheName)).match(s)}}createHandlerBoundToURL(t){const e=this.getCacheKeyForURL(t);if(!e)throw new s("non-precached-url",{url:t});return s=>(s.request=new Request(t),s.params=Object.assign({cacheKey:e},s.params),this.strategy.handle(s))}}const Z=()=>(Q||(Q=new Y),Q);class tt extends i{constructor(t,e){super(({request:s})=>{const n=t.getURLsToCacheKeys();for(const i of function*(t,{ignoreURLParametersMatching:e=[/^utm_/,/^fbclid$/],directoryIndex:s="index.html",cleanURLs:n=!0,urlManipulation:i}={}){const r=new URL(t,location.href);r.hash="",yield r.href;const a=function(t,e=[]){for(const s of[...t.searchParams.keys()])e.some(t=>t.test(s))&&t.searchParams.delete(s);return t}(r,e);if(yield a.href,s&&a.pathname.endsWith("/")){const t=new URL(a.href);t.pathname+=s,yield t.href}if(n){const t=new URL(a.href);t.pathname+=".html",yield t.href}if(i){const t=i({url:r});for(const e of t)yield e.href}}(s.url,e)){const e=n.get(i);if(e){return{cacheKey:e,integrity:t.getIntegrityForCacheKey(e)}}}},t.strategy)}}t.CacheFirst=class extends F{async W(t,e){let n,i=await e.cacheMatch(t);if(!i)try{i=await e.fetchAndCachePut(t)}catch(t){t instanceof Error&&(n=t)}if(!i)throw new s("no-response",{url:t.url,error:n});return i}},t.CacheableResponsePlugin=class{constructor(t){this.cacheWillUpdate=async({response:t})=>this.X.isResponseCacheable(t)?t:null,this.X=new P(t)}},t.ExpirationPlugin=class{constructor(t={}){this.cachedResponseWillBeUsed=async({event:t,request:e,cacheName:s,cachedResponse:n})=>{if(!n)return null;const i=this.Y(n),r=this.Z(s);d(r.expireEntries());const a=r.updateTimestamp(e.url);if(t)try{t.waitUntil(a)}catch(t){}return i?n:null},this.cacheDidUpdate=async({cacheName:t,request:e})=>{const s=this.Z(t);await s.updateTimestamp(e.url),await s.expireEntries()},this.tt=t,this.D=t.maxAgeSeconds,this.et=new Map,t.purgeOnQuotaError&&function(t){p.add(t)}(()=>this.deleteCacheAndMetadata())}Z(t){if(t===w())throw new s("expire-custom-caches-only");let e=this.et.get(t);return e||(e=new j(t,this.tt),this.et.set(t,e)),e}Y(t){if(!this.D)return!0;const e=this.st(t);if(null===e)return!0;return e>=Date.now()-1e3*this.D}st(t){if(!t.headers.has("date"))return null;const e=t.headers.get("date"),s=new Date(e).getTime();return isNaN(s)?null:s}async deleteCacheAndMetadata(){for(const[t,e]of this.et)await self.caches.delete(t),await e.delete();this.et=new Map}},t.NavigationRoute=class extends i{constructor(t,{allowlist:e=[/./],denylist:s=[]}={}){super(t=>this.nt(t),t),this.it=e,this.rt=s}nt({url:t,request:e}){if(e&&"navigate"!==e.mode)return!1;const s=t.pathname+t.search;for(const t of this.rt)if(t.test(s))return!1;return!!this.it.some(t=>t.test(s))}},t.cleanupOutdatedCaches=function(){self.addEventListener("activate",t=>{const e=f();t.waitUntil((async(t,e="-precache-")=>{const s=(await self.caches.keys()).filter(s=>s.includes(e)&&s.includes(self.registration.scope)&&s!==t);return await Promise.all(s.map(t=>self.caches.delete(t))),s})(e).then(t=>{}))})},t.clientsClaim=function(){self.addEventListener("activate",()=>self.clients.claim())},t.createHandlerBoundToURL=function(t){return Z().createHandlerBoundToURL(t)},t.precacheAndRoute=function(t,e){!function(t){Z().precache(t)}(t),function(t){const e=Z();h(new tt(e,t))}(e)},t.registerRoute=h});