diff --git a/assets/js/52d269c5.85a6208e.js b/assets/js/52d269c5.85a6208e.js
new file mode 100644
index 00000000..d519bc97
--- /dev/null
+++ b/assets/js/52d269c5.85a6208e.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunkignite_cookbook=self.webpackChunkignite_cookbook||[]).push([[5292],{9220:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>r,default:()=>u,frontMatter:()=>o,metadata:()=>a,toc:()=>l});var s=t(7624),i=t(2172);const o={title:"Authentication with Supabase",description:"How to implement authentication with your React Native project using Supabase as the backend.",tags:["authentication","supabase","login","signup","session"],last_update:{author:"Nick Morgan (@morganick)",publish_date:new Date("2024-04-12T00:00:00.000Z")}},r=void 0,a={id:"recipes/Authentication",title:"Authentication with Supabase",description:"How to implement authentication with your React Native project using Supabase as the backend.",source:"@site/docs/recipes/Authentication.md",sourceDirName:"recipes",slug:"/recipes/Authentication",permalink:"/docs/recipes/Authentication",draft:!1,unlisted:!1,tags:[{label:"authentication",permalink:"/docs/tags/authentication"},{label:"supabase",permalink:"/docs/tags/supabase"},{label:"login",permalink:"/docs/tags/login"},{label:"signup",permalink:"/docs/tags/signup"},{label:"session",permalink:"/docs/tags/session"}],version:"current",lastUpdatedBy:"Nick Morgan (@morganick)",lastUpdatedAt:1718898689,formattedLastUpdatedAt:"Jun 20, 2024",frontMatter:{title:"Authentication with Supabase",description:"How to implement authentication with your React Native project using Supabase as the backend.",tags:["authentication","supabase","login","signup","session"],last_update:{author:"Nick Morgan (@morganick)",publish_date:"2024-04-12T00:00:00.000Z"}},sidebar:"mainSidebar",previous:{title:"Accessiblity Font Sizes",permalink:"/docs/recipes/AccessibilityFontSizes"},next:{title:"CircleCI CD Setup - React Native",permalink:"/docs/recipes/CircleCIRNSetup"}},c={},l=[{value:"Overview",id:"overview",level:2},{value:"Requirements",id:"requirements",level:2},{value:"Starting Point",id:"starting-point",level:2},{value:"Build Initial Sign In Screen",id:"build-initial-sign-in-screen",level:2},{value:"Environment Config",id:"environment-config",level:2},{value:"Dependencies",id:"dependencies",level:2},{value:"Session Storage",id:"session-storage",level:2},{value:"Encrypting the User Session",id:"encrypting-the-user-session",level:3},{value:"Creating and Managing the Session",id:"creating-and-managing-the-session",level:2},{value:"Initializing the Supabase Client",id:"initializing-the-supabase-client",level:3},{value:"Signing Up & Signing In",id:"signing-up--signing-in",level:3},{value:"Creating Authentication Context & Provider",id:"creating-authentication-context--provider",level:4},{value:"Signing Out",id:"signing-out",level:3},{value:"Listening for Session Changes",id:"listening-for-session-changes",level:3},{value:"Loading States",id:"loading-states",level:2},{value:"Error Handling",id:"error-handling",level:2},{value:"Form & Input Affordances",id:"form--input-affordances",level:2},{value:"Keyboard Type & Auto Complete",id:"keyboard-type--auto-complete",level:3},{value:"Keyboard Flow",id:"keyboard-flow",level:3},{value:"Show Password",id:"show-password",level:3},{value:"\ud83c\udf89 Congratulations!",id:"-congratulations",level:2}];function d(e){const n={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",h4:"h4",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,i.M)(),...e.components},{Details:t}=n;return t||function(e,n){throw new Error("Expected "+(n?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}("Details",!0),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h2,{id:"overview",children:"Overview"}),"\n",(0,s.jsx)(n.p,{children:"Many applications require an external service to authenticate the user. Setting up authentication for your application can feel daunting. Where do I start? What data do I need from my users? What service(s) should or could I use? What are the signup, signin, and other user flows that I'll need?"}),"\n",(0,s.jsxs)(n.p,{children:["This recipe is going to use ",(0,s.jsx)(n.a,{href:"https://supabase.com",children:"Supabase"})," as the backend. We'll build some primitives that will allow you to customize the authentication to your needs or existing backend service as well."]}),"\n",(0,s.jsx)(n.h2,{id:"requirements",children:"Requirements"}),"\n",(0,s.jsxs)(n.p,{children:["Since we're using ",(0,s.jsx)(n.a,{href:"https://supabase.com",children:"Supabase"})," for our backend, it is assumed that you have an account there. We're going to need two pieces of information from that account the project URL and anonymous public key. (Inside your Supabase account, ",(0,s.jsx)(n.a,{href:"https://supabase.com/dashboard/project/_/settings/api",children:"visit the API credentials section"}),".)"]}),"\n",(0,s.jsx)(n.h2,{id:"starting-point",children:"Starting Point"}),"\n",(0,s.jsx)(n.p,{children:"We're going to start from a freshly ignited project without any of the boilerplate screens:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",metastring:'title="Terminal"',children:"bunx ignite-cli@latest new AuthRecipe --workflow=cng --remove-demo --git --install-deps --packager=bun\n"})}),"\n",(0,s.jsx)(n.admonition,{type:"info",children:(0,s.jsxs)(n.p,{children:["Notice we're using ",(0,s.jsx)(n.a,{href:"https://docs.infinite.red/ignite-cli/expo/CNG/",children:"Expo Continuous Native Generation (CNG)"}),". We're also using ",(0,s.jsx)(n.code,{children:"bun"})," in this recipe, but feel free to change that to the package manager of your choice. ",(0,s.jsxs)(n.a,{href:"https://bun.sh",children:["Read more about ",(0,s.jsx)(n.code,{children:"bun"})]})]})}),"\n",(0,s.jsx)(n.p,{children:"Once the app is ignited \ud83d\udd25, we can make sure everything is working by running the app:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",metastring:'title="Terminal"',children:"cd AuthRecipe\nbun run ios\n"})}),"\n",(0,s.jsxs)(n.p,{children:["\u2705 ",(0,s.jsx)(n.strong,{children:"Checkpoint:"})," The iOS simulator should open up to the welcome screen of the application."]}),"\n",(0,s.jsx)(n.h2,{id:"build-initial-sign-in-screen",children:"Build Initial Sign In Screen"}),"\n",(0,s.jsxs)(n.p,{children:["We'll use the ",(0,s.jsx)(n.a,{href:"https://docs.infinite.red/ignite-cli/concept/Generators/",children:"ignite generators"})," to generate the Sign In screen:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",metastring:'title="Terminal"',children:"bunx ignite-cli@latest generate screen SignIn\n"})}),"\n",(0,s.jsx)(n.admonition,{type:"info",children:(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.code,{children:"bunx"})," auto-installs and runs packages from npm. It's Bun's equivalent of ",(0,s.jsx)(n.code,{children:"npx"})," or ",(0,s.jsx)(n.code,{children:"yarn dlx"}),"."]})}),"\n",(0,s.jsx)(n.p,{children:"Replace the contents of that screen with the following:"}),"\n",(0,s.jsxs)(t,{children:[(0,s.jsx)("summary",{children:"SignInScreen.tsx"}),(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-tsx",metastring:'title="/app/screens/SignInScreen.tsx"',children:'import React, { FC, useState } from "react"\nimport { observer } from "mobx-react-lite"\nimport {\n Image,\n ImageStyle,\n Pressable,\n TextStyle,\n View,\n ViewStyle,\n} from "react-native"\nimport { AppStackScreenProps } from "app/navigators"\nimport { Button, Screen, Text, TextField } from "app/components"\nimport { useSafeAreaInsetsStyle } from "app/utils/useSafeAreaInsetsStyle"\nimport { colors, spacing } from "app/theme"\n\nconst logo = require("../../assets/images/logo.png")\n\ninterface SignInScreenProps extends AppStackScreenProps<"SignIn"> {}\n\nexport const SignInScreen: FC
= observer(\n function SignInScreen() {\n const $bottomContainerInsets = useSafeAreaInsetsStyle(["bottom"])\n const [email, setEmail] = useState("")\n const [password, setPassword] = useState("")\n\n const onSignIn = () => {\n // Sign In Flow\n console.log("Sign In Flow", { email, password })\n }\n\n const onSignUp = () => {\n // Sign Up Flow\n console.log("Sign Up Flow")\n }\n\n const onForgotPassword = () => {\n // Forgot Password Flow\n console.log("Forgot Password Flow")\n }\n\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n Forgot Password?\n \n - or -\n \n \n \n \n \n \n )\n }\n)\n\nconst $root: ViewStyle = {\n minHeight: "100%",\n backgroundColor: colors.palette.neutral100,\n}\n\nconst $container: ViewStyle = {\n backgroundColor: colors.background,\n}\n\nconst $topContainer: ViewStyle = {\n height: 200,\n justifyContent: "center",\n alignItems: "center",\n}\n\nconst $bottomContainer: ViewStyle = {\n backgroundColor: colors.palette.neutral100,\n paddingBottom: spacing.xl,\n paddingHorizontal: spacing.lg,\n}\n\nconst $cap: ViewStyle = {\n backgroundColor: colors.palette.neutral100,\n borderTopLeftRadius: 16,\n borderTopRightRadius: 16,\n height: spacing.xl,\n position: "absolute",\n top: -spacing.xl,\n left: 0,\n right: 0,\n}\n\nconst $textField: ViewStyle = {\n marginBottom: spacing.md,\n}\n\nconst $forgotPassword: ViewStyle = {\n marginVertical: spacing.md,\n}\n\nconst $buttonDivider: TextStyle = {\n textAlign: "center",\n marginVertical: spacing.md,\n}\n\nconst $logo: ImageStyle = {\n height: 88,\n width: "100%",\n marginBottom: spacing.xxl,\n}\n'})})]}),"\n",(0,s.jsxs)(n.p,{children:["In order for us to be able to see this new Sign In screen, let's add an ",(0,s.jsx)(n.code,{children:"isAuthenticated"}),' conditional to show the "Welcome" screen when the user is signed in and the "Sign In" screen when they are not.']}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-typescript",metastring:'title="/app/navigators/AppNavigator.tsx"',children:'const AppStack = observer(function AppStack() {\n // success-line\n const isAuthenticated = false\n return (\n \n // success-line-start\n {isAuthenticated ? (\n <>\n {/** \ud83d\udd25 Your screens go here */}\n \n {/* IGNITE_GENERATOR_ANCHOR_APP_STACK_SCREENS */}\n >\n ) : (\n \n )}\n // success-line-end\n \n )\n})\n'})}),"\n",(0,s.jsxs)(n.p,{children:["This should cause the application to refresh and display our new Sign In screen. A couple of things to notice here is that we already have ",(0,s.jsx)(n.code,{children:"onPress"})," handlers for our buttons, ",(0,s.jsx)(n.code,{children:"onSubmitEditing"})," handlers for our inputs, and ",(0,s.jsx)(n.code,{children:"onChangeText"})," wired up for updating the ",(0,s.jsx)(n.code,{children:"email"})," and ",(0,s.jsx)(n.code,{children:"password"})," state."]}),"\n",(0,s.jsx)(n.admonition,{type:"info",children:(0,s.jsxs)(n.p,{children:["For brevity, we're leaving out internationalization for this recipe. For ",(0,s.jsx)(n.code,{children:"TextInput"})," labels, we would normally add those into our translation files under the common section as those words will likely be used often."]})}),"\n",(0,s.jsx)(n.h2,{id:"environment-config",children:"Environment Config"}),"\n",(0,s.jsxs)(n.p,{children:["We're going to take the project URL and the anonymous public key that we gathered from the ",(0,s.jsx)(n.a,{href:"#requirements",children:"Requirements section"})," and add them to our environment."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",metastring:'title="/.env"',children:'EXPO_PUBLIC_SUPABASE_URL="https://.supabase.co"\nEXPO_PUBLIC_SUPABASE_ANON_KEY=""\n'})}),"\n",(0,s.jsx)(n.admonition,{type:"tip",children:(0,s.jsx)(n.p,{children:"Why put these values inside of the environment config? When working on larger projects, it's common to have different URLs and keys for local, testing, staging, and production configurations. You may be thinking \"But that's what the base config is for!\" However, this assumes that every member of your team is using the same backend URL and key for development. Putting this information in the environment reduces code churn when these values change between the different environments and even team members."})}),"\n",(0,s.jsxs)(n.p,{children:["Typically ",(0,s.jsx)(n.code,{children:".env"})," is not commited to version control so let's update our ",(0,s.jsx)(n.code,{children:".gitignore"})," to ignore this file:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-git",metastring:'title="/.gitignore"',children:".env\n"})}),"\n",(0,s.jsx)(n.admonition,{type:"info",children:(0,s.jsxs)(n.p,{children:["Expo has great documentation on ",(0,s.jsx)(n.a,{href:"https://docs.expo.dev/guides/environment-variables/",children:"using environment variables"})," if you'd like to know more about how that works."]})}),"\n",(0,s.jsxs)(n.admonition,{type:"warning",children:[(0,s.jsxs)(n.p,{children:["If you're using EAS build to create builds in the cloud, you'll need to make sure the environment variables are available for the profile you want to use. Below the environment variables are added as secrets to EAS from the local ",(0,s.jsx)(n.code,{children:".env"}),":"]}),(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",metastring:'title="Terminal"',children:"bunx eas secret:push --scope project --env-file .env\n"})}),(0,s.jsxs)(n.p,{children:["There are multiple options for how to configure your environment variables depending on the sensitivity, profiles, and environments you have. ",(0,s.jsx)(n.a,{href:"https://docs.expo.dev/build-reference/variables/",children:"Read more about environment variables with EAS build."})]})]}),"\n",(0,s.jsx)(n.p,{children:"This allows us to have different configurations for our development, staging, testing, and production environments. For our purposes, we're going to add these values to the base configuration as these props are required for every environment."}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-typescript",metastring:'title="/app/config/config.base.ts"',children:'export interface ConfigBaseProps {\n persistNavigation: "always" | "dev" | "prod" | "never"\n catchErrors: "always" | "dev" | "prod" | "never"\n exitRoutes: string[]\n // success-line-start\n supabaseUrl: string\n supabaseAnonKey: string\n // success-line-end\n}\n\nexport type PersistNavigationConfig = ConfigBaseProps["persistNavigation"]\n\nconst BaseConfig: ConfigBaseProps = {\n // This feature is particularly useful in development mode, but\n // can be used in production as well if you prefer.\n persistNavigation: "dev",\n\n /**\n * Only enable if we\'re catching errors in the right environment\n */\n catchErrors: "always",\n\n /**\n * This is a list of all the route names that will exit the app if the back button\n * is pressed while in that screen. Only affects Android.\n */\n exitRoutes: ["Welcome"],\n // success-line-start\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n supabaseUrl: process.env.EXPO_PUBLIC_SUPABASE_URL!,\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n supabaseAnonKey: process.env.EXPO_PUBLIC_SUPABASE_ANON_KEY!,\n // success-line-end\n}\n\nexport default BaseConfig\n'})}),"\n",(0,s.jsx)(n.admonition,{type:"note",children:(0,s.jsxs)(n.p,{children:["These new environment variables will not be available until the next time you restart metro either with ",(0,s.jsx)(n.code,{children:"bun run ios"})," or ",(0,s.jsx)(n.code,{children:"bun start"}),"."]})}),"\n",(0,s.jsx)(n.h2,{id:"dependencies",children:"Dependencies"}),"\n",(0,s.jsx)(n.p,{children:"For this recipe we've made some specific choices around the packages that we'll use:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.a,{href:"https://supabase.com/docs/reference/javascript/installing",children:"@supabase/supabase-js"})," - Supabase client to handle authentication requests, sign up users, token refresh, etc."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.a,{href:"https://github.com/mrousavy/react-native-mmkv",children:"react-native-mmkv"})," - Fast key/value store we'll use for the session."]}),"\n"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",metastring:'title="Terminal"',children:"bunx expo install @supabase/supabase-js react-native-mmkv\n"})}),"\n",(0,s.jsxs)(n.p,{children:["Since ",(0,s.jsx)(n.code,{children:"react-native-mmkv"})," has a host platform dependency, we'll need to also rebuild the application with:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",metastring:'title="Terminal"',children:"bun ios\n# or\nbun android\n"})}),"\n",(0,s.jsx)(n.h2,{id:"session-storage",children:"Session Storage"}),"\n",(0,s.jsx)(n.admonition,{type:"note",children:(0,s.jsx)(n.p,{children:"If you're already using Async Storage in your application, you can take advantage of that and skip this section."})}),"\n",(0,s.jsxs)(n.p,{children:["We need a place to store the user's session after they login. This will allow us to log them back in after they close the application or refresh their access token after it has expired. Supabase's client is already setup for Async Storage's API. (e.g. ",(0,s.jsx)(n.code,{children:"getItem"}),", ",(0,s.jsx)(n.code,{children:"setItem"}),", and ",(0,s.jsx)(n.code,{children:"removeItem"}),") We're going to use ",(0,s.jsx)(n.code,{children:"react-native-mmkv"})," as it is not only faster, but has some additional features that we can utilize."]}),"\n",(0,s.jsxs)(t,{children:[(0,s.jsx)("summary",{children:"Initial session storage implementation"}),(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-typescript",metastring:'title="/app/utils/storage/SessionStorage.ts"',children:'import { MMKV } from "react-native-mmkv"\n\nconst storage = new MMKV({\n id: "session",\n})\n\n// TODO: Remove this workaround for encryption: https://github.com/mrousavy/react-native-mmkv/issues/665\nstorage.set("workaround", true)\n\n/**\n * A simple wrapper around MMKV that provides a base API\n * that matches AsyncStorage for use with Supabase.\n */\n\n/**\n * Get an item from storage by key\n *\n * @param {string} key of the item to fetch\n * @returns {Promise} value for the key as a string or null if not found\n */\nexport async function getItem(key: string): Promise {\n try {\n return storage.getString(key) ?? null\n } catch {\n console.warn(`Failed to get key "${key}" from secure storage`)\n return null\n }\n}\n\n/**\n * Sets an item in storage by key\n *\n * @param {string} key of the item to store\n * @param {string} value of the item to store\n */\nexport async function setItem(key: string, value: string): Promise {\n try {\n storage.set(key, value)\n } catch {\n console.warn(`Failed to set key "${key}" in secure storage`)\n }\n}\n\n/**\n * Removes a single item from storage by key\n *\n * @param {string} key of the item to remove\n */\nexport async function removeItem(key: string): Promise {\n try {\n storage.delete(key)\n } catch {\n console.warn(`Failed to remove key "${key}" from secure storage`)\n }\n}\n'})})]}),"\n",(0,s.jsx)(n.h3,{id:"encrypting-the-user-session",children:"Encrypting the User Session"}),"\n",(0,s.jsxs)(n.p,{children:["If you'd like to encrypt the user's session because it ",(0,s.jsx)(n.a,{href:"https://reactnative.dev/docs/security#storing-sensitive-info",children:"contains sensitive information"}),", you can take advantage of Expo SecureStore and MMKV's encryption. Expo SecureStore will securely store key-value pairs locally on device in the iOS keychain or Android Keystore. The reason we need both is that ",(0,s.jsx)(n.a,{href:"https://docs.expo.dev/versions/latest/sdk/securestore/",children:"Expo SecureStore has a size limit of 2048 bytes"}),". The Supabase session is already larger than 2048 bytes by default so we're going to generate a unique key with Expo Crypto to encrypt the Session Store with MMKV and store that key with Expo SecureStore."]}),"\n",(0,s.jsx)(n.p,{children:"First, we'll need to install those additional dependencies:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",metastring:'title="Terminal"',children:"bunx expo install expo-secure-store expo-crypto\n"})}),"\n",(0,s.jsxs)(n.p,{children:["We'll also need to add Expo SecureStorage to our ",(0,s.jsx)(n.a,{href:"https://docs.expo.dev/versions/latest/sdk/securestore/#configuration-in-appjsonappconfigjs",children:"plugin configuration"}),":"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-typescript",metastring:'title="/app.json"',children:'...\n "plugins": [\n "expo-localization",\n // success-line\n "expo-secure-store",\n [\n "expo-build-properties",\n {\n "ios": {\n "newArchEnabled": false,\n "flipper": false\n },\n "android": {\n "newArchEnabled": false\n }\n }\n ],\n "expo-font"\n ],\n...\n'})}),"\n",(0,s.jsx)(n.p,{children:"Rebuild the application with:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",metastring:'title="Terminal"',children:"bun ios\n# or\nbun android\n"})}),"\n",(0,s.jsx)(n.p,{children:"Now, we can use Expo SecureStore and Expo Crypto to securely generate and store our encrypting key for MMKV:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-typescript",metastring:'title="/app/utils/storage/SessionStorage.ts"',children:'import { MMKV } from "react-native-mmkv"\n// success-line-start\nimport * as SecureStore from "expo-secure-store"\nimport * as Crypto from "expo-crypto"\n\nconst fetchOrGenerateEncryptionKey = (): string => {\n const encryptionKey = SecureStore.getItem("session-encryption-key")\n\n if (encryptionKey) {\n return encryptionKey\n } else {\n const uuid = Crypto.randomUUID()\n SecureStore.setItem("session-encryption-key", uuid)\n return uuid\n }\n}\n// success-line-end\n\nconst storage = new MMKV({\n id: "session",\n // success-line\n encryptionKey: fetchOrGenerateEncryptionKey(),\n})\n\n...\n'})}),"\n",(0,s.jsx)(n.admonition,{type:"note",children:(0,s.jsxs)(n.p,{children:["If you're using Async Storage and you'd also like to encrypt the user's session, refer to the ",(0,s.jsx)(n.a,{href:"https://supabase.com/blog/react-native-authentication#encrypting-the-user-session",children:"Encrypting the user session section"})," of the Supabase guide."]})}),"\n",(0,s.jsx)(n.h2,{id:"creating-and-managing-the-session",children:"Creating and Managing the Session"}),"\n",(0,s.jsx)(n.p,{children:"There are three pieces that we're going to need to create and manage our session: a hook, context, and provider."}),"\n",(0,s.jsx)(n.h3,{id:"initializing-the-supabase-client",children:"Initializing the Supabase Client"}),"\n",(0,s.jsxs)(n.p,{children:["Let's start by creating the file for the hook to initialize the Supabase client with our environment config and ",(0,s.jsx)(n.code,{children:"SessionStorage"})," we set up earlier:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-typescript",metastring:'showLineNumbers title="/app/services/auth/supabase.ts"',children:'import Config from "app/config"\nimport { createClient } from "@supabase/supabase-js"\nimport * as SessionStorage from "app/utils/storage/SessionStorage"\nimport { AppState } from "react-native"\n\nexport const supabase = createClient(\n Config.supabaseUrl,\n Config.supabaseAnonKey,\n {\n auth: {\n storage: SessionStorage,\n autoRefreshToken: true,\n detectSessionInUrl: false,\n },\n }\n)\n\nexport { type Session, type AuthError } from "@supabase/supabase-js"\n\n/**\n * Tells Supabase to autorefresh the session while the application\n * is in the foreground. (Docs: https://supabase.com/docs/reference/javascript/auth-startautorefresh)\n */\nAppState.addEventListener("change", (nextAppState) => {\n if (nextAppState === "active") {\n supabase.auth.startAutoRefresh()\n } else {\n supabase.auth.stopAutoRefresh()\n }\n})\n'})}),"\n",(0,s.jsx)(n.admonition,{type:"note",children:(0,s.jsxs)(n.p,{children:["If you've opted to use Async Storage, change line 11 above to ",(0,s.jsx)(n.code,{children:"storage: AsyncStorage"}),"."]})}),"\n",(0,s.jsx)(n.admonition,{type:"info",children:(0,s.jsxs)(n.p,{children:[(0,s.jsxs)(n.strong,{children:["Why not use PKCE (pronounced pixy) by setting the ",(0,s.jsx)(n.code,{children:'flowType: "pkce"'}),"?"]}),' It stands for "',(0,s.jsx)(n.strong,{children:"P"}),"roof ",(0,s.jsx)(n.strong,{children:"K"}),"ey for ",(0,s.jsx)(n.strong,{children:"C"}),"ode ",(0,s.jsx)(n.strong,{children:"E"}),'xchange". ',(0,s.jsx)(n.a,{href:"https://supabase.com/blog/supabase-auth-sso-pkce#server-side-and-mobile-auth",children:"Read Supabase's write-up about why they did it and how it works"}),". You'd ecounter this with doing email confirmation for your sign up process as well as password resets. If you decided to turn it on, sign up will produce the console warning \"WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256.\", but it will still work. Since we currently have email confirmation disabled, we'll save email confirmation and password reset for a future recipe."]})}),"\n",(0,s.jsx)(n.p,{children:"Since we're allowing the Supabase client to manage session storage, it will automatically persist changes to the session. We've added an event listener to stop refreshing the session when the application is no longer in the foreground and restart it when it returns to the foreground. The Supabase client will then automatically refresh the session as necessary; one less thing that we'll need to handle manually. \ud83d\ude2e\u200d\ud83d\udca8"}),"\n",(0,s.jsx)(n.h3,{id:"signing-up--signing-in",children:"Signing Up & Signing In"}),"\n",(0,s.jsxs)(n.p,{children:["To keep this simple, we're going to use the same form for both. We'll need to create an ",(0,s.jsx)(n.code,{children:"onPress"})," and ",(0,s.jsx)(n.code,{children:"onSubmit"})," handler for the respective actions that are already stubbed out in the ",(0,s.jsx)(n.code,{children:"SignInScreen"}),' we created earlier. You may have more information you\'d like to capture (e.g. name, phone number, password confirmation, etc.) when a user signs up. In such a case, create a separate "Sign Up" screen that captures the additional data.']}),"\n",(0,s.jsx)(n.h4,{id:"creating-authentication-context--provider",children:"Creating Authentication Context & Provider"}),"\n",(0,s.jsx)(n.p,{children:"We're going to be using the session across components, at different depths in our component tree, and with navigation. For this access pattern we'll create a context and provider. This way if that information changes, we'll re-render the entire tree. (e.g. If the user signs out, we'll navigate back to the \"Sign In\" screen automatically.)"}),"\n",(0,s.jsx)(n.admonition,{type:"tip",children:(0,s.jsx)(n.p,{children:"Be careful when using contexts as anything that depends on data in the context is going to cause a re-render when the data changes. This can have performance implications if you're re-rendering the entire tree frequently. In the case of authentication, we want to re-render the entire tree when the session is updated as we may need to navigate to the sign in screen if the user's session expires."})}),"\n",(0,s.jsxs)(n.p,{children:["Let's setup our ",(0,s.jsx)(n.code,{children:"AuthContext"})," with our session state, add our ",(0,s.jsx)(n.code,{children:"AuthProvider"}),", and create a ",(0,s.jsx)(n.code,{children:"useAuth"})," hook that will return the value of our context:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-typescript",metastring:'title="/app/services/auth/useAuth.tsx"',children:'import React, {\n createContext,\n PropsWithChildren,\n useCallback,\n useContext,\n useState,\n} from "react"\nimport { Session, supabase } from "./supabase"\nimport { AuthResponse, AuthTokenResponsePassword } from "@supabase/supabase-js"\n\ntype AuthState = {\n isAuthenticated: boolean\n token?: Session["access_token"]\n}\n\ntype SignInProps = {\n email: string\n password: string\n}\n\ntype SignUpProps = {\n email: string\n password: string\n}\n\ntype AuthContextType = {\n signIn: (props: SignInProps) => Promise\n signUp: (props: SignUpProps) => Promise\n} & AuthState\n\nconst AuthContext = createContext({\n isAuthenticated: false,\n token: undefined,\n signIn: () => new Promise(() => ({})),\n signUp: () => new Promise(() => ({})),\n})\n\nexport function useAuth() {\n const value = useContext(AuthContext)\n\n if (process.env.NODE_ENV !== "production") {\n if (!value) {\n throw new Error("useAuth must be used within an AuthProvider")\n }\n }\n\n return value\n}\n\nexport const AuthProvider = ({ children }: PropsWithChildren) => {\n const [token, setToken] = useState(undefined)\n\n const signIn = useCallback(\n async ({ email, password }: SignInProps) => {\n const result = await supabase.auth.signInWithPassword({\n email,\n password,\n })\n\n if (result.data?.session?.access_token) {\n setToken(result.data.session.access_token)\n }\n\n return result\n },\n [supabase]\n )\n\n const signUp = useCallback(\n async ({ email, password }: SignUpProps) => {\n const result = await supabase.auth.signUp({\n email,\n password,\n })\n\n if (result.data?.session?.access_token) {\n setToken(result.data.session.access_token)\n }\n\n return result\n },\n [supabase]\n )\n\n return (\n \n {children}\n \n )\n}\n'})}),"\n",(0,s.jsxs)(n.p,{children:["Now that we have those pieces in place, we can wrap our application with the ",(0,s.jsx)(n.code,{children:"AuthProvider"})," so that we can access the ",(0,s.jsx)(n.code,{children:"AuthContext"})," inside of our compontents and navigation:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-typescript",metastring:'title="/app/app.tsx"',children:'...\nimport { ViewStyle } from "react-native"\n// success-line\nimport { AuthProvider } from "./services/auth/useAuth"\n\n...\n\n return (\n // success-line\n \n \n \n \n \n \n \n \n // success-line\n \n )\n}\n'})}),"\n",(0,s.jsxs)(n.p,{children:["Next, we'll wire up the ",(0,s.jsx)(n.code,{children:"isAuthenticated"})," to the ",(0,s.jsx)(n.code,{children:"useAuth"})," hook inside our ",(0,s.jsx)(n.code,{children:"AppStack"}),' to show the "Sign In" screen when the user is not authenticated and the "Welcome" screen when the are:']}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-typescript",metastring:'title="/app/navigators/AppNavigator.tsx"',children:'...\n\nimport { colors } from "app/theme"\n// success-line\nimport { useAuth } from "app/services/auth/useAuth"\n\n...\n\nconst AppStack = observer(function AppStack() {\n // error-line\n const isAuthenticated = false\n // success-line\n const { isAuthenticated } = useAuth()\n return (\n \n {isAuthenticated ? (\n <>\n {/** \ud83d\udd25 Your screens go here */}\n \n {/* IGNITE_GENERATOR_ANCHOR_APP_STACK_SCREENS */}\n >\n ) : (\n \n )}\n \n )\n})\n\n...\n'})}),"\n",(0,s.jsxs)(n.p,{children:["Lastly, let's wire up the ",(0,s.jsx)(n.code,{children:"SignInScreen"})," to use ",(0,s.jsx)(n.code,{children:"signIn"})," and ",(0,s.jsx)(n.code,{children:"signUp"})," from the ",(0,s.jsx)(n.code,{children:"useSession"})," hook:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-typescript",metastring:'title="/app/screens/SignInScreen.tsx"',children:'...\nimport { colors, spacing } from "app/theme"\n// success-line\nimport { useAuth } from "app/services/auth/useAuth"\n\n...\nexport const SignInScreen: FC = observer(function SignInScreen() {\n const $bottomContainerInsets = useSafeAreaInsetsStyle(["bottom"])\n // success-line\n const { signIn, signUp } = useAuth()\n const [email, setEmail] = useState("")\n const [password, setPassword] = useState("")\n\n const passwordInput = React.useRef(null)\n\n const onSignIn = () => {\n // error-line-start\n // Sign In Flow\n console.log("Sign In Flow", { email, password })\n // error-line-end\n // success-line\n signIn({ email, password })\n }\n\n const onSignUp = () => {\n // error-line-start\n // Sign Up Flow\n console.log("Sign Up Flow")\n // error-line-end\n // success-line\n signUp({ email, password })\n }\n\n...\n'})}),"\n",(0,s.jsx)(n.admonition,{type:"warning",children:(0,s.jsxs)(n.p,{children:["Before you try to sign in for the first time, we'll want to make sure that email confirmation is ",(0,s.jsx)(n.strong,{children:"turned off"})," inside of this Supabase project. With email confirmation turned on, creating a user will only return the user and ",(0,s.jsx)(n.strong,{children:"not return the session"}),". For now, ",(0,s.jsx)(n.a,{href:"https://supabase.com/dashboard/project/_/auth/providers",children:"disable email confirmation in your project"}),' by clicking on Authentication > Providers > Email and toggling "Confirm Email" to off.']})}),"\n",(0,s.jsxs)(n.p,{children:["\u2705 ",(0,s.jsx)(n.strong,{children:"Checkpoint:"}),' With those changes you should be able to enter an email and password and press the "Sign Up" button which will create a user, return the session, and navigate you to the "Welcome" screen.']}),"\n",(0,s.jsx)(n.h3,{id:"signing-out",children:"Signing Out"}),"\n",(0,s.jsxs)(n.p,{children:["Oh no! We're stuck in the signed in state. No dark patterns here! Let's fix that by adding the ",(0,s.jsx)(n.code,{children:"signOut"})," action to our ",(0,s.jsx)(n.code,{children:"useAuth"})," hook:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-typescript",metastring:'title="/app/services/auth/useAuth.tsx"',children:"...\ntype AuthContextType = {\n signIn: (props: SignInProps) => Promise\n signUp: (props: SignUpProps) => Promise\n // success-line\n signOut: () => void\n} & AuthState\n\nconst AuthContext = createContext({\n isAuthenticated: false,\n token: undefined,\n signIn: () => new Promise(() => ({})),\n signUp: () => new Promise(() => ({})),\n // success-line\n signOut: () => undefined,\n})\n...\nexport const AuthProvider = ({ children }: PropsWithChildren) => {\n...\n // success-line-start\n const signOut = useCallback(async () => {\n await supabase.auth.signOut()\n setToken(undefined)\n }, [supabase])\n // success-line-end\n\n return (\n \n {children}\n \n )\n}\n"})}),"\n",(0,s.jsx)(n.p,{children:'Now, we\'ll add the "Sign Out" button and update the screen to show some data from the session:'}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-typescript",metastring:'title="/app/screens/WelcomeScreen.tsx"',children:'import { observer } from "mobx-react-lite"\nimport React, { FC } from "react"\nimport { Image, ImageStyle, TextStyle, View, ViewStyle } from "react-native"\n// error-line\nimport { Text } from "app/components"\n// success-line\nimport { Button, Text } from "app/components"\nimport { isRTL } from "../i18n"\nimport { AppStackScreenProps } from "../navigators"\nimport { colors, spacing } from "../theme"\nimport { useSafeAreaInsetsStyle } from "../utils/useSafeAreaInsetsStyle"\n// success-line\nimport { useAuth } from "app/services/auth/useAuth"\n\nconst welcomeLogo = require("../../assets/images/logo.png")\nconst welcomeFace = require("../../assets/images/welcome-face.png")\n\ninterface WelcomeScreenProps extends AppStackScreenProps<"Welcome"> {}\n\nexport const WelcomeScreen: FC = observer(\n function WelcomeScreen() {\n const $bottomContainerInsets = useSafeAreaInsetsStyle(["bottom"])\n const { signOut } = useAuth()\n\n return (\n \n \n \n \n \n \n \n \n // error-line\n \n // success-line\n \n \n \n )\n }\n)\n'})}),"\n",(0,s.jsx)(n.p,{children:'If you\'re anything like me, you may have noticed that the screen transition always sliding to the left seems off. The way we mentally feel about "Sign In" and "Sign Out" is entering and existing. The way the animations are working right now, it feels like we just keep signing in. Let\'s adjust that navigation transition:'}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-typescript",metastring:'title="/app/navigators/AppNavigator.tsx"',children:'...\nconst AppStack = observer(function AppStack() {\n const { isAuthenticated } = useAuth()\n return (\n \n {isAuthenticated ? (\n <>\n {/** \ud83d\udd25 Your screens go here */}\n \n {/* IGNITE_GENERATOR_ANCHOR_APP_STACK_SCREENS */}\n >\n ) : (\n \n )}\n \n )\n})\n...\n'})}),"\n",(0,s.jsx)(n.p,{children:"All is right with the world again. \ud83d\ude05"}),"\n",(0,s.jsxs)(n.p,{children:["\u2705 ",(0,s.jsx)(n.strong,{children:"Checkpoint:"})," You should now be able to sign up, sign in, and sign out. This is a good time to commit what you have."]}),"\n",(0,s.jsx)(n.h3,{id:"listening-for-session-changes",children:"Listening for Session Changes"}),"\n",(0,s.jsxs)(n.p,{children:["As noted earlier, we're listening for changes in the ",(0,s.jsx)(n.code,{children:"AppState"})," for when the application comes back to the foreground. However, there are other session events we should listen for such as signing out of all devices, user updates, password recovery, etc. ",(0,s.jsx)(n.a,{href:"https://supabase.com/docs/reference/javascript/auth-onauthstatechange",children:'Checkout "Listen to Auth Events" in the Supabase docs for detailed information about each event.'})]}),"\n",(0,s.jsx)(n.p,{children:"To listen for these authentication state changes, we can subscribe to those events when the application initially loads."}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-typescript",metastring:'title="/app/services/auth/useAuth.tsx"',children:'...\n// error-line\nimport React, { createContext, PropsWithChildren, useCallback, useContext, useState } from "react"\n// success-line\nimport React, { createContext, PropsWithChildren, useCallback, useContext, useEffect, useState } from "react"\n...\nexport const AuthProvider = ({ children }: PropsWithChildren) => {\n const [token, setToken] = useState(undefined)\n\n // success-line-start\n useEffect(() => {\n const {\n data: { subscription },\n } = supabase.auth.onAuthStateChange((event, session) => {\n switch (event) {\n case "SIGNED_OUT":\n setToken(undefined)\n break\n case "INITIAL_SESSION":\n case "SIGNED_IN":\n case "TOKEN_REFRESHED":\n setToken(session?.access_token)\n break\n default:\n // no-op\n }\n })\n\n return () => {\n subscription.unsubscribe()\n }\n }, [supabase])\n // success-line-end\n...\n'})}),"\n",(0,s.jsx)(n.h2,{id:"loading-states",children:"Loading States"}),"\n",(0,s.jsxs)(n.p,{children:["Those with a keen eye will notice that our ",(0,s.jsx)(n.code,{children:"AuthContext"})," does not contain loading states. There's a reason for that. Loading states should be local to the UI that initiated them. Using loading states can make your application feel more responsive and set proper expectations for the user. You may have also noticed that our ",(0,s.jsx)(n.code,{children:"signIn"}),' function returns a promise. Let\'s add a loading state for the "Sign In" flow and (a)wait for the sign up request to complete:']}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-typescript",metastring:'title="/app/screens/SignInScreen.tsx"',children:'...\nexport const SignInScreen: FC = observer(function SignInScreen() {\n const $bottomContainerInsets = useSafeAreaInsetsStyle(["bottom"])\n const { signIn, signUp } = useAuth()\n const [email, setEmail] = useState("")\n const [password, setPassword] = useState("")\n // success-line\n const [isSigningIn, setIsSigningIn] = useState(false)\n\n // error-line-start\n const onSignIn = () => {\n signIn({ email, password })\n // error-line-end\n // success-line-start\n const onSignIn = async () => {\n try {\n setIsSigningIn(true)\n await signIn({ email, password })\n } finally {\n setIsSigningIn(false)\n }\n // success-line-end\n }\n ...\n // error-line\n \n // success-line-start\n \n // success-line-end\n ...\n\n'})}),"\n",(0,s.jsx)(n.p,{children:"\ud83d\ude4c Easy, let's do the same thing for sign up:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-typescript",metastring:'title="/app/screens/SignInScreen.tsx"',children:'...\nexport const SignInScreen: FC = observer(function SignInScreen() {\n const $bottomContainerInsets = useSafeAreaInsetsStyle(["bottom"])\n const { signIn, signUp } = useAuth()\n const [email, setEmail] = useState("")\n const [password, setPassword] = useState("")\n const [isSigningIn, setIsSigningIn] = useState(false)\n // success-line\n const [isSigningUp, setIsSigningUp] = useState(false)\n\n const onSignIn = async () => {\n try {\n setIsSigningIn(true)\n await signIn({ email, password })\n } finally {\n setIsSigningIn(false)\n }\n }\n\n // error-line-start\n const onSignUp = () => {\n signUp({ email, password })\n // error-line-end\n // success-line-start\n const onSignUp = async () => {\n try {\n setIsSigningUp(true)\n await signUp({ email, password })\n } finally {\n setIsSigningUp(false)\n }\n // success-line-end\n }\n ...\n // error-line\n \n // success-line-start\n \n // success-line-end\n ...\n\n'})}),"\n",(0,s.jsx)(n.p,{children:"Lastly, should a user be able to sign up and sign in at the same time? No. We can use a combined loading state to disable the buttons and make the text inputs read only while we are either signing in or signing up:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-typescript",metastring:'title="/app/screens/SignInScreen.tsx"',children:'...\nexport const SignInScreen: FC = observer(function SignInScreen() {\n const $bottomContainerInsets = useSafeAreaInsetsStyle(["bottom"])\n const { signIn, signUp } = useAuth()\n const [email, setEmail] = useState("")\n const [password, setPassword] = useState("")\n const [isSigningIn, setIsSigningIn] = useState(false)\n const [isSigningUp, setIsSigningUp] = useState(false)\n // success-line\n const isLoading = isSigningIn || isSigningUp\n...\n \n \n \n \n \n // success-line\n \n // success-line\n \n Forgot Password?\n \n - or -\n // success-line\n \n \n \n'})}),"\n",(0,s.jsx)(n.p,{children:"No more double sign up or sign in requests. This bit of defensive programming is minimal additional effort that saves you and your team time down the road as your users will not encounter that issue."}),"\n",(0,s.jsx)(n.h2,{id:"error-handling",children:"Error Handling"}),"\n",(0,s.jsx)(n.p,{children:"What would you expect to happen if the user submitted an empty form for Sign In or Sign Up? What if they submit an email and no password or vice versa? What if there's a network issue? What if there's a service outage? How can we allow the user to self diagnose the issue if it's something they can correct? That's where good error handling comes in. So let's start with errors on form submission."}),"\n",(0,s.jsx)(n.p,{children:"There's a reason that we return the result to the caller so we can present these errors locally to the user."}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-typescript",metastring:'title="/app/screens/SignInScreen.tsx"',children:'...\nexport const SignInScreen: FC = observer(function SignInScreen() {\n const $bottomContainerInsets = useSafeAreaInsetsStyle(["bottom"])\n const { signIn, signUp } = useAuth()\n const [email, setEmail] = useState("")\n const [password, setPassword] = useState("")\n // success-line\n const [error, setError] = useState(undefined)\n...\n const onSignIn = async () => {\n try {\n setIsSigningIn(true)\n // success-line\n setError(undefined)\n\n // error-line\n await signIn({ email, password })\n // success-line-start\n const { error } = await signIn({ email, password })\n if (error) {\n setError(error.message)\n }\n // success-line-end\n } finally {\n setIsSigningIn(false)\n }\n }\n\n const onSignUp = async () => {\n try {\n setIsSigningUp(true)\n // success-line\n setError(undefined)\n\n // error-line\n await signUp({ email, password })\n // success-line-start\n const { error } = await signUp({ email, password })\n if (error) {\n setError(error.message)\n }\n // success-line-end\n } finally {\n setIsSigningUp(false)\n }\n }\n ...\n return (\n \n \n \n \n \n \n // success-line\n {error && {error}}\n \n...\n\nconst $logo: ImageStyle = {\n height: 88,\n width: "100%",\n marginBottom: spacing.xxl,\n}\n\n// success-line-start\nconst $errorText: TextStyle = {\n color: colors.error,\n}\n// success-line-end\n\n'})}),"\n",(0,s.jsxs)(n.p,{children:["Now if there is an issue with our authentication request, the user will be one step closer to understanding why. But why would we send authentication requests that we ",(0,s.jsx)(n.strong,{children:"know"})," are going to fail? We shouldn't and we'll fix that next. We're going to add some simple form validation to validate the values of our text inputs. We not only want to make sure that both text inputs have values, but that they are also valid values. (e.g. an email address)"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-typescript",metastring:'title="/app/screens/SignInScreen.tsx"',children:'...\nexport const SignInScreen: FC = observer(function SignInScreen() {\n const $bottomContainerInsets = useSafeAreaInsetsStyle(["bottom"])\n const { signIn, signUp } = useAuth()\n const [email, setEmail] = useState("")\n const [password, setPassword] = useState("")\n // success-line\n const [validationErrors, setValidationErrors] = useState\\n }\\n />\\n \\n Hermes Enabled\\n {String(usingHermes)}\\n \\n }\\n />\\n \\n Fabric Enabled\\n {String(usingFabric)}\\n \\n }\\n />\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n );\\n}\\n\\nconst $container: ViewStyle = {\\n paddingTop: spacing.lg + spacing.xl,\\n paddingBottom: spacing.xxl,\\n paddingHorizontal: spacing.lg,\\n};\\n\\nconst $title: TextStyle = {\\n marginBottom: spacing.xxl,\\n};\\n\\nconst $reportBugsLink: TextStyle = {\\n color: colors.tint,\\n marginBottom: spacing.lg,\\n alignSelf: isRTL ? \\"flex-start\\" : \\"flex-end\\",\\n};\\n\\nconst $item: ViewStyle = {\\n marginBottom: spacing.md,\\n};\\n\\nconst $itemsContainer: ViewStyle = {\\n marginBottom: spacing.xl,\\n};\\n\\nconst $button: ViewStyle = {\\n marginBottom: spacing.xs,\\n};\\n\\nconst $buttonContainer: ViewStyle = {\\n marginBottom: spacing.md,\\n};\\n\\nconst $hint: TextStyle = {\\n color: colors.palette.neutral600,\\n fontSize: 12,\\n lineHeight: 15,\\n paddingBottom: spacing.lg,\\n};\\n\\nmv src/screens/DemoShowroomScreen src/components/Showroom\\nrm src/components/Showroom/DemoShowroomScreen.tsx\\n\\n> import { ReactElement } from \\"react\\";\\n>\\n> export interface Demo {\\n> name: string;\\n> description: string;\\n> data: ReactElement[];\\n> }\\n\\nconst WebListItem: FC = ({ item, sectionIndex }) => {\\n const sectionSlug = item.name.toLowerCase();\\n\\n return (\\n \\n \\n {item.name}\\n \\n {item.useCases.map((u) => {\\n const itemSlug = slugify(u);\\n\\n return (\\n \\n {u}\\n \\n );\\n })}\\n \\n );\\n};\\n\\nconst NativeListItem: FC = ({ item, sectionIndex, handleScroll }) => (\\n \\n handleScroll?.(sectionIndex)} preset=\\"bold\\" style={$menuContainer}>\\n {item.name}\\n \\n {item.useCases.map((u, index) => (\\n handleScroll?.(sectionIndex, index + 1)}\\n text={u}\\n rightIcon={isRTL ? \\"caretLeft\\" : \\"caretRight\\"}\\n />\\n ))}\\n \\n);\\n\\nconst ShowroomListItem = Platform.select({\\n web: WebListItem,\\n default: NativeListItem,\\n});\\n\\nconst ShowroomListItem: FC = ({ item, sectionIndex }) => {\\n const sectionSlug = item.name.toLowerCase();\\n\\n return (\\n \\n \\n {item.name}\\n \\n {item.useCases.map((u) => {\\n const itemSlug = slugify(u);\\n return (\\n \\n \\n \\n );\\n })}\\n \\n );\\n};\\n\\nimport React, { FC, useEffect, useRef, useState } from \\"react\\";\\nimport { Image, ImageStyle, SectionList, TextStyle, View, ViewStyle } from \\"react-native\\";\\nimport { Drawer } from \\"react-native-drawer-layout\\";\\nimport { type ContentStyle } from \\"@shopify/flash-list\\";\\nimport { ListItem, ListView, ListViewRef, Screen, Text } from \\"src/components\\";\\nimport { isRTL } from \\"src/i18n\\";\\nimport { colors, spacing } from \\"src/theme\\";\\nimport { useSafeAreaInsetsStyle } from \\"src/utils/useSafeAreaInsetsStyle\\";\\nimport * as Demos from \\"src/components/Showroom/demos\\";\\nimport { DrawerIconButton } from \\"src/components/Showroom/DrawerIconButton\\";\\nimport { Link, useLocalSearchParams } from \\"expo-router\\";\\n\\nconst logo = require(\\"assets/images/logo.png\\");\\n\\ninterface DemoListItem {\\n item: { name: string; useCases: string[] };\\n sectionIndex: number;\\n onPress?: () => void;\\n}\\n\\nconst slugify = (str: string) =>\\n str\\n .toLowerCase()\\n .trim()\\n .replace(/[^\\\\w\\\\s-]/g, \\"\\")\\n .replace(/[\\\\s_-]+/g, \\"-\\")\\n .replace(/^-+|-+$/g, \\"\\");\\n\\nconst ShowroomListItem: FC = ({ item, sectionIndex, onPress }) => {\\n const sectionSlug = item.name.toLowerCase();\\n\\n return (\\n \\n \\n {item.name}\\n \\n {item.useCases.map((u) => {\\n const itemSlug = slugify(u);\\n return (\\n \\n \\n \\n );\\n })}\\n \\n );\\n};\\n\\nexport default function DemoShowroomScreen() {\\n const [open, setOpen] = useState(false);\\n const timeout = useRef>();\\n const listRef = useRef(null);\\n const menuRef = useRef>(null);\\n\\n const params = useLocalSearchParams<{\\n sectionSlug?: string;\\n itemSlug?: string;\\n }>();\\n\\n // handle scroll when section/item params change\\n React.useEffect(() => {\\n if (Object.keys(params).length > 0) {\\n const demoValues = Object.values(Demos);\\n const findSectionIndex = demoValues.findIndex((x) => x.name.toLowerCase() === params.sectionSlug);\\n let findItemIndex = 0;\\n if (params.itemSlug) {\\n try {\\n findItemIndex =\\n demoValues[findSectionIndex].data.findIndex((u) => slugify(u.props.name) === params.itemSlug) + 1;\\n } catch (err) {\\n console.error(err);\\n }\\n }\\n handleScroll(findSectionIndex, findItemIndex);\\n }\\n }, [params]);\\n\\n const toggleDrawer = () => {\\n if (!open) {\\n setOpen(true);\\n } else {\\n setOpen(false);\\n }\\n };\\n\\n const handleScroll = (sectionIndex: number, itemIndex = 0) => {\\n listRef.current?.scrollToLocation({\\n animated: true,\\n itemIndex,\\n sectionIndex,\\n });\\n };\\n\\n const scrollToIndexFailed = (info: {\\n index: number;\\n highestMeasuredFrameIndex: number;\\n averageItemLength: number;\\n }) => {\\n listRef.current?.getScrollResponder()?.scrollToEnd();\\n timeout.current = setTimeout(\\n () =>\\n listRef.current?.scrollToLocation({\\n animated: true,\\n itemIndex: info.index,\\n sectionIndex: 0,\\n }),\\n 50\\n );\\n };\\n\\n useEffect(() => {\\n return () => timeout.current && clearTimeout(timeout.current);\\n }, []);\\n\\n const $drawerInsets = useSafeAreaInsetsStyle([\\"top\\"]);\\n\\n return (\\n setOpen(true)}\\n onClose={() => setOpen(false)}\\n drawerType={\\"slide\\"}\\n drawerPosition={isRTL ? \\"right\\" : \\"left\\"}\\n renderDrawerContent={() => (\\n \\n \\n \\n \\n\\n \\n ref={menuRef}\\n contentContainerStyle={$listContentContainer}\\n estimatedItemSize={250}\\n data={Object.values(Demos).map((d) => ({\\n name: d.name,\\n useCases: d.data.map((u) => u.props.name as string),\\n }))}\\n keyExtractor={(item) => item.name}\\n renderItem={({ item, index: sectionIndex, onPress }) => (\\n \\n )}\\n />\\n \\n )}\\n >\\n \\n \\n\\n item}\\n renderSectionFooter={() => }\\n ListHeaderComponent={\\n \\n \\n \\n }\\n onScrollToIndexFailed={scrollToIndexFailed}\\n renderSectionHeader={({ section }) => {\\n return (\\n \\n \\n {section.name}\\n \\n {section.description}\\n \\n );\\n }}\\n />\\n \\n \\n );\\n}\\n\\nconst $screenContainer: ViewStyle = {\\n flex: 1,\\n};\\n\\nconst $drawer: ViewStyle = {\\n backgroundColor: colors.background,\\n flex: 1,\\n};\\n\\nconst $listContentContainer: ContentStyle = {\\n paddingHorizontal: spacing.lg,\\n};\\n\\nconst $sectionListContentContainer: ViewStyle = {\\n paddingHorizontal: spacing.lg,\\n};\\n\\nconst $heading: ViewStyle = {\\n marginBottom: spacing.xxxl,\\n};\\n\\nconst $logoImage: ImageStyle = {\\n height: 42,\\n width: 77,\\n};\\n\\nconst $logoContainer: ViewStyle = {\\n alignSelf: \\"flex-start\\",\\n justifyContent: \\"center\\",\\n height: 56,\\n paddingHorizontal: spacing.lg,\\n};\\n\\nconst $demoItemName: TextStyle = {\\n fontSize: 24,\\n marginBottom: spacing.md,\\n};\\n\\nconst $demoItemDescription: TextStyle = {\\n marginBottom: spacing.xxl,\\n};\\n\\nconst $demoUseCasesSpacer: ViewStyle = {\\n paddingBottom: spacing.xxl,\\n};\\n\\nnpx uri-scheme open exp://localhost:8081/--/showroom --ios\\n\\nrm src/app.tsx\\nrm -rf src/screens\\nrm -rf src/navigators\\n\\n// error-line\\nimport { goBack, resetRoot, navigate } from \\"src/navigators/navigationUtilities\\";\\n// success-line\\nimport { router } from \\"expo-router\\";\\n// ...\\n// error-line-start\\nreactotron.onCustomCommand({\\n title: \\"Reset Navigation State\\",\\n description: \\"Resets the navigation state\\",\\n command: \\"resetNavigation\\",\\n handler: () => {\\n Reactotron.log(\\"resetting navigation state\\");\\n resetRoot({ index: 0, routes: [] });\\n },\\n});\\n// error-line-end\\n\\nreactotron.onCustomCommand<[{ name: \\"route\\"; type: ArgType.String }]>({\\n command: \\"navigateTo\\",\\n handler: (args) => {\\n const { route } = args ?? {};\\n if (route) {\\n Reactotron.log(`Navigating to: ${route}`);\\n // error-line\\n navigate(route as any); // this should be tied to the navigator, but since this is for debugging, we can navigate to illegal routes\\n // success-line-start\\n // @ts-ignore - bypass Expo Router Typed Routes\\n router.push(route);\\n // success-line-end\\n } else {\\n Reactotron.log(\\"Could not navigate. No route provided.\\");\\n }\\n },\\n title: \\"Navigate To Screen\\",\\n description: \\"Navigates to a screen by name.\\",\\n args: [{ name: \\"route\\", type: ArgType.String }],\\n});\\n\\nreactotron.onCustomCommand({\\n title: \\"Go Back\\",\\n description: \\"Goes back\\",\\n command: \\"goBack\\",\\n handler: () => {\\n Reactotron.log(\\"Going back\\");\\n // error-line\\n goBack();\\n // success-line\\n router.back();\\n },\\n});\\n\\nERROR Warning: Function components cannot be given refs. Attempts to access this ref will fail. Did you mean to use React.forwardRef()?\\n\\n/**\\n * A styled row component that can be used in FlatList, SectionList, or by itself.\\n * @see [Documentation and Examples]{@link https://docs.infinite.red/ignite-cli/boilerplate/components/ListItem/}\\n * @param {ListItemProps} props - The props for the `ListItem` component.\\n * @returns {JSX.Element} The rendered `ListItem` component.\\n */\\n// error-line\\n export function ListItem(props: ListItemProps) {\\n// success-line-start\\n export const ListItem = React.forwardRef(function ListItem(\\n props: ListItemProps,\\n ref,\\n) {\\n// success-line-end\\n const {\\n bottomSeparator,\\n children,\\n height = 56,\\n LeftComponent,\\n leftIcon,\\n leftIconColor,\\n RightComponent,\\n rightIcon,\\n rightIconColor,\\n style,\\n text,\\n TextProps,\\n topSeparator,\\n tx,\\n txOptions,\\n textStyle: $textStyleOverride,\\n containerStyle: $containerStyleOverride,\\n ...TouchableOpacityProps\\n } = props\\n\\n const $textStyles = [$textStyle, $textStyleOverride, TextProps?.style]\\n\\n const $containerStyles = [\\n topSeparator && $separatorTop,\\n bottomSeparator && $separatorBottom,\\n $containerStyleOverride,\\n ]\\n\\n const $touchableStyles = [$touchableStyle, { minHeight: height }, style]\\n\\n return (\\n // error-line\\n \\n // success-line\\n \\n \\n \\n\\n \\n {children}\\n \\n\\n \\n \\n \\n )\\n //error-line\\n}\\n //success-line\\n})\\n\\n\\n","lastUpdated":"3 days ago","title":"Expo Router","publish_date":"2024-01-25","doc_name":"ExpoRouter.md"},{"author":"Joshua Yoes","content":"---\\ndestinationDir: app/components/specs\\n---\\n// https://reactnativetesting.io/component/testing/\\n\\nimport React from \\"react\\"\\nimport { fireEvent, render, screen } from \\"@testing-library/react-native\\"\\nimport { <%= props.pascalCaseName %> } from \\"../<%= props.pascalCaseName %>\\"\\n\\ndescribe(\\"<%= props.pascalCaseName %>\\", () => {\\n it(\\"renders\\", () => {\\n render(<<%= props.pascalCaseName %> />)\\n expect(screen.getByText(\\"Hello\\")).toBeTruthy()\\n })\\n})\\n\\n","lastUpdated":"1 year, 2 months ago","title":"Generator for Component Tests","publish_date":"2022-10-10","doc_name":"GeneratorComponentTests.md"},{"author":"Trevor Coleman","content":" npx ignite-cli@latest new PowerSyncIgnite --remove-demo --workflow=cng --yes\\n\\nnpx expo install \\\\\\n @powersync/react-native \\\\\\n @journeyapps/react-native-quick-sqlite \\n\\nnpx expo install \\\\\\n react-native-fetch-api \\\\\\n react-native-polyfill-globals \\\\\\n react-native-url-polyfill \\\\\\n text-encoding \\\\\\n web-streams-polyfill@^3.2.1 \\\\\\n base-64 \\\\\\n @azure/core-asynciterator-polyfill \\\\\\n react-native-get-random-values\\n\\nyarn add -D @babel/plugin-transform-async-generator-functions\\n\\nnpx expo install @supabase/supabase-js\\n\\nnpx expo install @react-native-async-storage/async-storage\\n\\n import \\"react-native-polyfill-globals/auto\\"\\n import \\"@azure/core-asynciterator-polyfill\\"\\n\\n /** @type {import(\'@babel/core\').TransformOptions[\'plugins\']} */\\n const plugins = [\\n //... other plugins\\n // success-line\\n \'@babel/plugin-transform-async-generator-functions\', // <-- Add this\\n /** NOTE: This must be last in the plugins @see https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/installation/#babel-plugin */\\n \\"react-native-reanimated/plugin\\",\\n ]\\n \\n\\n{\\n \\"expo\\": {\\n \\"plugins\\": [\\n // ...\\n [\\n \\"expo-build-properties\\",\\n {\\n \\"ios\\": {\\n \\"newArchEnabled\\": false,\\n \\"flipper\\": false\\n },\\n \\"android\\": {\\n \\"newArchEnabled\\": false,\\n // success-line\\n \\"networkInspector\\": false\\n }\\n }\\n ]\\n //...\\n ]\\n //...\\n }\\n}\\n\\n// `app/config/config.base.ts`:\\n\\n// update the interface to include the new properties\\nexport interface ConfigBaseProps {\\n // Existing config properties\\n\\n // success-line\\n supabaseUrl: string\\n // success-line\\n supabaseAnonKey: string\\n}\\n\\n// Add the new properties to the config object\\nconst BaseConfig: ConfigBaseProps = {\\n // Existing config values\\n // success-line\\n supabaseUrl: \'<>\',\\n // success-line\\n supabaseAnonKey: \'<>\',\\n}\\n\\n// app/services/database/supabase.ts\\nimport AsyncStorage from \'@react-native-async-storage/async-storage\'\\nimport { createClient } from \\"@supabase/supabase-js\\"\\nimport { Config } from \'../../config\'\\n\\nexport const supabase = createClient(Config.supabaseUrl, Config.supabaseAnonKey, {\\n auth: {\\n persistSession: true, storage: AsyncStorage,\\n },\\n})\\n\\n// app/services/database/use-auth.tsx\\nimport { User } from \\"@supabase/supabase-js\\"\\nimport { supabase } from \\"app/services/database/supabase\\"\\nimport React, { createContext, PropsWithChildren, useCallback, useContext, useMemo, useState } from \\"react\\"\\n\\ntype AuthContextType = {\\n signIn: (email: string, password: string) => void\\n signUp: (email: string, password: string) => void\\n signOut: () => Promise\\n signedIn: boolean\\n loading: boolean\\n error: string\\n user: User | null\\n}\\n\\n// We initialize the context with null to ensure that it is not used outside of the provider\\nconst AuthContext = createContext(null)\\n\\n/**\\n * AuthProvider manages the authentication state and provides the necessary methods to sign in, sign up and sign out.\\n */\\nexport const AuthProvider = ({ children }: PropsWithChildren) => {\\n const [signedIn, setSignedIn] = useState(false)\\n const [loading, setLoading] = useState(false)\\n const [error, setError] = useState(\\"\\")\\n const [user, setUser] = useState(null)\\n\\n\\n // Sign in with provided email and password\\n const signIn = useCallback(async (email: string, password: string) => {\\n setLoading(true)\\n setError(\\"\\")\\n setUser(null)\\n \\n try {\\n // get the session and user from supabase\\n const { \\n data: {session, user}, \\n error \\n } = await supabase.auth.signInWithPassword({ email, password })\\n \\n // if we have a session and user, sign them in\\n if (session && user) {\\n setSignedIn(true)\\n setUser(user)\\n // otherwise sign them out and set an error\\n } else {\\n throw new Error(error?.message);\\n setSignedIn(false)\\n setUser(null)\\n }\\n } catch (error: any) {\\n setError(error?.message ?? \\"Unknown error\\")\\n setSignedIn(false)\\n setUser(null)\\n } finally {\\n setLoading(false)\\n }\\n }, [\\n setSignedIn, setLoading, setError, setUser, supabase\\n ])\\n\\n // Create a new account with provided email and password\\n const signUp = useCallback(async (email: string, password: string) => {\\n setLoading(true)\\n setError(\\"\\")\\n setUser(null)\\n try {\\n const { data, error } = await supabase.auth.signUp({ email, password })\\n if (error) {\\n setSignedIn(false)\\n setError(error.message)\\n } else if (data.session) {\\n await supabase.auth.setSession(data.session)\\n setSignedIn(true)\\n setUser(data.user)\\n }\\n } catch (error: any) {\\n setUser(null)\\n setSignedIn(false)\\n setError(error?.message ?? \\"Unknown error\\")\\n } finally {\\n setLoading(false)\\n }\\n }, [\\n setSignedIn, setLoading, setError, setUser, supabase\\n ])\\n\\n // Sign out the current user\\n const signOut = useCallback(async () => {\\n setLoading(true)\\n await supabase.auth.signOut()\\n setError(\\"\\")\\n setSignedIn(false)\\n setLoading(false)\\n setUser(null)\\n }, [\\n setSignedIn, setLoading, setError, setUser, supabase\\n ])\\n\\n // Always memoize context values as they can cause unnecessary re-renders if they aren\'t stable!\\n const value = useMemo(() => ({\\n signIn, signOut, signUp, signedIn, loading, error, user\\n }), [\\n signIn, signOut, signUp, signedIn, loading, error, user\\n ])\\n return { children }\\n}\\n\\nexport const useAuth = () => {\\n const context = useContext(AuthContext)\\n\\n // It\'s a good idea to throw an error if the context is null, as it means the hook is being used outside of the provider\\n if (context === null) {\\n throw new Error(\'useAuthContext must be used within a AuthProvider\')\\n }\\n return context\\n}\\n\\n\\n// app/app.tsx\\n// ...other imports\\n// success-line\\nimport { AuthProvider } from \\"app/services/database/use-auth\\"\\n\\n// ...\\nfunction App(props: AppProps) {\\n // ...\\n return (\\n // success-line\\n \\n \\n {/* ... */ }\\n \\n // success-line\\n \\n )\\n}\\n\\n\\n\\nnpx ignite-cli generate screen Auth\\n\\n// app/screens/AuthScreen.tsx\\nimport { AppStackScreenProps } from \\"app/navigators\\"\\nimport { Button, Screen, Text, TextField } from \\"app/components\\"\\nimport { useAuth } from \\"app/services/database/use-auth\\"\\nimport React, { useEffect, useState } from \\"react\\"\\nimport { ActivityIndicator, Modal, TextStyle, View, ViewStyle } from \\"react-native\\"\\nimport { colors, spacing } from \\"../theme\\"\\n\\ninterface AuthScreenProps extends AppStackScreenProps<\\"Auth\\"> {}\\n\\nexport const AuthScreen: React.FC = ({ navigation }) => {\\n const { signUp, signIn, loading, error, user } = useAuth()\\n const [email, setEmail] = useState(\\"\\")\\n const [password, setPassword] = useState(\\"\\")\\n\\n const handleSignIn = async () => {\\n signIn(email, password)\\n }\\n\\n const handleSignUp = async () => {\\n signUp(email, password)\\n }\\n\\n useEffect(() => {\\n if (user) {\\n navigation.navigate(\\"Welcome\\")\\n }\\n }, [user])\\n\\n return (\\n \\n PowerSync + Supabase\\n Sign in or Create Account\\n \\n \\n\\n \\n \\n\\n \\n \\n { error ? : null }\\n \\n \\n \\n \\n \\n \\n )\\n}\\n\\nconst $container: ViewStyle = {\\n backgroundColor: colors.background,\\n flex: 1,\\n justifyContent: \\"center\\",\\n paddingHorizontal: spacing.lg,\\n}\\n\\nconst $inputContainer: TextStyle = {\\n marginTop: spacing.md,\\n}\\n\\nconst $inputWrapper: TextStyle = {\\n backgroundColor: colors.palette.neutral100,\\n}\\nconst $modalBackground: ViewStyle = {\\n alignItems: \\"center\\",\\n backgroundColor: \\"#00000040\\",\\n flex: 1,\\n flexDirection: \\"column\\",\\n justifyContent: \\"space-around\\",\\n}\\n\\nconst $error: TextStyle = {\\n color: colors.error,\\n marginVertical: spacing.md,\\n textAlign: \\"center\\",\\n width: \\"100%\\",\\n fontSize: 20,\\n}\\n\\nconst $buttonContainer: ViewStyle = {\\n display: \\"flex\\",\\n flexDirection: \\"column\\",\\n justifyContent: \\"space-between\\",\\n marginVertical: spacing.md,\\n}\\n\\nconst $button: ViewStyle = {\\n marginTop: spacing.xs,\\n}\\n\\nnpx ignite-cli generate component SignOutButton\\n\\n// app/components/SignOutButton.tsx\\n\\nimport { Button } from \\"app/components/Button\\"\\nimport { useAuth } from \\"app/services/database/use-auth\\"\\nimport * as React from \\"react\\"\\nimport { StyleProp, View, ViewStyle } from \\"react-native\\"\\nimport { observer } from \\"mobx-react-lite\\"\\nimport { spacing } from \\"app/theme\\"\\n\\nexport interface SignOutButtonProps {\\n /**\\n * An optional style override useful for padding & margin.\\n */\\n style?: StyleProp\\n}\\n\\n/**\\n * Describe your component here\\n */\\nexport const SignOutButton = observer(function SignOutButton(props: SignOutButtonProps) {\\n const { style } = props\\n const $styles = [$container, style]\\n\\n const { signOut } = useAuth()\\n\\n const handleSignOut = async () => {\\n await signOut()\\n }\\n\\n return (\\n \\n \\n \\n )\\n})\\n\\nconst $container: ViewStyle = {\\n padding: spacing.md,\\n}\\n\\n// app/screens/WelcomeScreen.tsx\\nimport { NativeStackScreenProps } from \\"@react-navigation/native-stack\\"\\nimport { Lists, SignOutButton } from \\"app/components\\"\\nimport { DatabaseProvider } from \\"app/services/database/database\\"\\nimport { observer } from \\"mobx-react-lite\\"\\nimport React, { FC } from \\"react\\"\\nimport { ViewStyle } from \\"react-native\\"\\nimport { SafeAreaView } from \\"react-native-safe-area-context\\"\\nimport { SignedInNavigatorParamList } from \\"../navigators\\"\\nimport { colors } from \\"../theme\\"\\n\\nexport const WelcomeScreen: FC = observer(function WelcomeScreen() {\\n return (\\n \\n \\n \\n \\n \\n )\\n})\\n\\nconst $container: ViewStyle = {\\n flex: 1,\\n backgroundColor: colors.palette.neutral300,\\n display: \\"flex\\",\\n justifyContent: \\"flex-start\\",\\n height: \\"100%\\",\\n flexDirection: \\"column\\",\\n}\\n\\n// app/navigators/AppNavigator.tsx\\n\\n//...\\n\\nconst AppStack = observer(function AppStack() {\\n // Fetch the user from the auth context\\n // success-line\\n // success-line\\n const { signedIn } = useAuth()\\n return (\\n \\n {/**\\n * by wrapping the Welcome screen in a conditional, we ensure that\\n * the user can only access it if they are signed in\\n */ }\\n // success-line\\n { signedIn\\n // success-line\\n ? \\n // success-line\\n : null\\n // success-line\\n }\\n \\n {/* IGNITE_GENERATOR_ANCHOR_APP_STACK_SCREENS */ }\\n \\n )\\n})\\n\\n// ...\\n\\n// app/config/config.base.ts:\\n\\n// update the interface to include the new properties\\nexport interface ConfigBaseProps {\\n // Existing config properties\\n supabaseUrl: string\\n supabaseAnonKey: string\\n // success-line\\n powersyncUrl: string\\n}\\n\\n// Add the new properties to the config object\\nconst BaseConfig: ConfigBaseProps = {\\n // Existing config values\\n supabaseUrl: \'<>\',\\n supabaseAnonKey: \'<>\',\\n // success-line\\n powersyncUrl: \'<>\',\\n}\\n\\n// app/services/database/schema.ts\\nimport {\\n Column,\\n ColumnType,\\n Index,\\n IndexedColumn,\\n Schema,\\n Table\\n} from \'@powersync/react-native\'\\n\\nexport const TODO_TABLE = \'todos\'\\nexport const LIST_TABLE = \'lists\'\\n\\nexport interface ListRecord {\\n id: string\\n name: string\\n created_at: string\\n owner_id?: string\\n}\\n\\nexport interface TodoRecord {\\n id: string\\n created_at: string\\n completed: boolean\\n description: string\\n completed_at?: string\\n created_by: string\\n completed_by?: string\\n list_id: string\\n photo_id?: string\\n}\\n\\nexport const AppSchema = new Schema([\\n new Table({\\n name: \'todos\',\\n columns: [\\n new Column({ name: \'list_id\', type: ColumnType.TEXT }),\\n new Column({ name: \'created_at\', type: ColumnType.TEXT }),\\n new Column({ name: \'completed_at\', type: ColumnType.TEXT }),\\n new Column({ name: \'description\', type: ColumnType.TEXT }),\\n new Column({ name: \'completed\', type: ColumnType.INTEGER }),\\n new Column({ name: \'created_by\', type: ColumnType.TEXT }),\\n new Column({ name: \'completed_by\', type: ColumnType.TEXT })\\n ],\\n indexes: [\\n new Index({\\n name: \'list\',\\n columns: [new IndexedColumn({ name: \'list_id\' })]\\n })\\n ]\\n }),\\n new Table({\\n name: \'lists\',\\n columns: [\\n new Column({ name: \'created_at\', type: ColumnType.TEXT }),\\n new Column({ name: \'name\', type: ColumnType.TEXT }),\\n new Column({ name: \'owner_id\', type: ColumnType.TEXT })\\n ]\\n }),\\n])\\n\\n\\n// from @journeyapps/powersync-sdk-common \\nexport interface PowerSyncBackendConnector {\\n /** Allows the PowerSync client to retrieve an authentication token from your backend\\n * which is used to authenticate against the PowerSync service.\\n *\\n * This should always fetch a fresh set of credentials - don\'t use cached\\n * values.\\n *\\n * Return null if the user is not signed in. Throw an error if credentials\\n * cannot be fetched due to a network error or other temporary error.\\n *\\n * This token is kept for the duration of a sync connection.\\n */\\n fetchCredentials: () => Promise\\n\\n /** Upload local changes to the app backend.\\n *\\n * Use {@link AbstractPowerSyncDatabase.getCrudBatch} to get a batch of changes to upload.\\n *\\n * Any thrown errors will result in a retry after the configured wait period (default: 5 seconds).\\n */\\n uploadData: (database: AbstractPowerSyncDatabase) => Promise\\n}\\n\\n// app/services/database/supabase.ts\\nimport {\\n AbstractPowerSyncDatabase,\\n CrudEntry, PowerSyncBackendConnector,\\n UpdateType, PowerSyncCredentials\\n} from \\"@powersync/react-native\\"\\nimport AsyncStorage from \'@react-native-async-storage/async-storage\'\\nimport { createClient } from \\"@supabase/supabase-js\\"\\nimport Config from \\"../../config\\"\\n\\nexport const supabase = createClient(Config.supabaseUrl, Config.supabaseAnonKey, {\\n auth: {\\n persistSession: true, storage: AsyncStorage,\\n },\\n})\\n\\n\\n// This function fetches the session token from Supabase, it should return null if the user is not signed in, and the session token if they are.\\nasync function fetchCredentials(): Promise {\\n const { data: { session }, error } = await supabase.auth.getSession()\\n\\n if (error) {\\n throw new Error(`Could not fetch Supabase credentials: ${ error }`)\\n }\\n\\n if (!session) {\\n return null\\n }\\n\\n return {\\n endpoint: Config.powersyncUrl,\\n token: session.access_token ?? \\"\\",\\n expiresAt: session.expires_at\\n ? new Date(session.expires_at * 1000)\\n : undefined\\n }\\n}\\n\\n\\n// Regexes for response codes indicating unrecoverable errors.\\nconst FATAL_RESPONSE_CODES = [\\n /^22...$/, // Data Exception\\n /^23...$/, // Integrity Constraint Violation\\n /^42501$/, // INSUFFICIENT PRIVILEGE\\n]\\n\\n// PowerSync will call this function to upload data to the backend\\nconst uploadData: (database: AbstractPowerSyncDatabase) => Promise = async (database) => {\\n const transaction = await database.getNextCrudTransaction()\\n\\n if (!transaction) {\\n return\\n }\\n\\n\\n let lastOp: CrudEntry | null = null\\n try {\\n // Note: If transactional consistency is important, use database functions\\n // or edge functions to process the entire transaction in a single call.\\n for (const op of transaction.crud) {\\n lastOp = op\\n const table = supabase.from(op.table)\\n let result: any = null\\n switch (op.op) {\\n case UpdateType.PUT:\\n // eslint-disable-next-line no-case-declarations\\n const record = { ...op.opData, id: op.id }\\n result = await table.upsert(record)\\n break\\n case UpdateType.PATCH:\\n result = await table.update(op.opData).eq(\'id\', op.id)\\n break\\n case UpdateType.DELETE:\\n result = await table.delete().eq(\'id\', op.id)\\n break\\n }\\n\\n if (result?.error) {\\n throw new Error(`Could not ${ op.op } data to Supabase error: ${ JSON.stringify(result) }`)\\n }\\n }\\n\\n await transaction.complete()\\n } catch (ex: any) {\\n console.debug(ex)\\n if (typeof ex.code === \'string\' && FATAL_RESPONSE_CODES.some((regex) => regex.test(ex.code))) {\\n /**\\n * Instead of blocking the queue with these errors,\\n * discard the (rest of the) transaction.\\n *\\n * Note that these errors typically indicate a bug in the application.\\n * If protecting against data loss is important, save the failing records\\n * elsewhere instead of discarding, and/or notify the user.\\n */\\n console.error(`Data upload error - discarding ${ lastOp }`, ex)\\n await transaction.complete()\\n } else {\\n // Error may be retryable - e.g. network error or temporary server error.\\n // Throwing an error here causes this call to be retried after a delay.\\n throw ex\\n }\\n }\\n}\\n\\nexport const supabaseConnector: PowerSyncBackendConnector = {\\n fetchCredentials, uploadData,\\n}\\n\\n// app/services/database/database.tsx\\nimport { SupabaseClient } from \\"@supabase/supabase-js\\"\\nimport { useAuth } from \\"./use-auth\\"\\nimport React, { PropsWithChildren, useEffect } from \\"react\\"\\nimport {\\n AbstractPowerSyncDatabase,\\n PowerSyncContext,\\n RNQSPowerSyncDatabaseOpenFactory,\\n} from \\"@powersync/react-native\\"\\nimport { supabase, supabaseConnector } from \\"./supabase\\" // Adjust the path as needed\\nimport { AppSchema } from \\"./schema\\" // Adjust the path as needed\\n\\nexport class Database {\\n // We expose the PowerSync and Supabase instances for easy access elsewhere in the app\\n powersync: AbstractPowerSyncDatabase\\n supabase: SupabaseClient = supabase\\n\\n /**\\n * Initialize the Database class with a new PowerSync instance\\n */\\n constructor() {\\n const factory = new RNQSPowerSyncDatabaseOpenFactory({\\n schema: AppSchema,\\n dbFilename: \\"sqlite.db\\",\\n })\\n this.powersync = factory.getInstance()\\n }\\n\\n /**\\n * Initialize the PowerSync instance and connect it to the Supabase backend.\\n * This will call `fetchCredentials` on the Supabase connector to get the session token.\\n * So if your database requires authentication, the user will need to be signed in before this is\\n * called.\\n */\\n async init() {\\n await this.powersync.init()\\n await this.powersync.connect(supabaseConnector)\\n }\\n\\n async disconnect() {\\n await this.powersync.disconnectAndClear()\\n }\\n}\\n\\nconst database = new Database()\\n\\n// A context to provide our singleton to the rest of the app\\nconst DatabaseContext = React.createContext(null)\\n\\nexport const useDatabase = () => {\\n const context: Database | null = React.useContext(DatabaseContext)\\n if (!context) {\\n throw new Error(\\"useDatabase must be used within a DatabaseProvider\\")\\n }\\n\\n return context\\n}\\n\\n// Finally, we create a provider component that initializes the database and provides it to the app\\nexport function DatabaseProvider({ children }: PropsWithChildren) {\\n const { user } = useAuth()\\n useEffect(() => {\\n if (user) {\\n database.init().catch(console.error)\\n }\\n }, [database, user])\\n return (\\n \\n \\n { children }\\n \\n \\n )\\n}\\n\\n// app/app.tsx\\n\\n\\n//... other imports\\n// success-line\\n// Import the provder\\n// success-line\\nimport { DatabaseProvider } from \\"app/services/database/database\\"\\n\\n// ...\\n\\nfunction App(props: AppProps) {\\n // ...\\n return (\\n \\n // success-line\\n {/* Add the Database Provider inside the AuthProvider */ }\\n // success-line\\n \\n \\n // ...\\n \\n // success-line\\n \\n \\n )\\n}\\n\\nexport default App\\n\\nconst $container: ViewStyle = {\\n flex: 1,\\n}\\n\\n\\nconst lists = usePowerSyncWatchedQuery(`\\n SELECT ${ LIST_TABLE }.*,\\n COUNT(${ TODO_TABLE }.id) AS total_tasks,\\n SUM(CASE WHEN ${ TODO_TABLE }.completed = true THEN 1 ELSE 0 END) AS completed_tasks\\n FROM ${ LIST_TABLE }\\n LEFT JOIN ${ TODO_TABLE } ON ${ LIST_TABLE }.id = ${ TODO_TABLE }.list_id\\n GROUP BY ${ LIST_TABLE }.id;\\n `);\\n\\nconst deleteList = useCallback(async (id: string) => {\\n console.log(\'Deleting list\', id)\\n return powersync.execute(`DELETE FROM ${ LIST_TABLE } WHERE id = ?`, [id])\\n}, [powersync])\\n\\n// app/components/SignOutButton.tsx\\n\\n//...other imports\\nimport { useDatabase } from \\"app/services/database/database\\"\\n\\n// ...\\nexport const SignOutButton = observer(function SignOutButton(props: SignOutButtonProps) {\\n // ...\\n\\n const { signOut } = useAuth()\\n // success-line\\n const { powersync } = useDatabase()\\n\\n // success-line\\n const handleSignOut = async () => { // make this async\\n // success-line\\n await powersync.disconnectAndClear()\\n await signOut()\\n }\\n\\n return (\\n \\n \\n \\n )\\n})\\n\\n\\nnpx expo add expo-crypto\\n\\n// app/services/database/use-lists.ts\\nimport { usePowerSyncWatchedQuery } from \\"@powersync/react-native\\"\\nimport { useAuth } from \\"app/services/database/use-auth\\"\\nimport { useCallback } from \\"react\\"\\nimport { useDatabase } from \\"app/services/database/database\\"\\nimport { LIST_TABLE, ListRecord, TODO_TABLE } from \\"app/services/database/schema\\"\\nimport { randomUUID } from \'expo-crypto\'\\n\\n// Extend the base type with the calculated fields from our query \\nexport type ListItemRecord = ListRecord & { total_tasks: number; completed_tasks: number }\\n\\nexport const useLists = () => {\\n // Get the current user from the auth context \\n const { user } = useAuth()\\n // Get the database instance from the context\\n const { powersync } = useDatabase()\\n\\n // List fetching logic here. You can modify it as per your needs.\\n const lists = usePowerSyncWatchedQuery(`\\n SELECT ${ LIST_TABLE }.*,\\n COUNT(${ TODO_TABLE }.id) AS total_tasks,\\n SUM(CASE WHEN ${ TODO_TABLE }.completed = true THEN 1 ELSE 0 END) as completed_tasks\\n FROM ${ LIST_TABLE }\\n LEFT JOIN ${ TODO_TABLE } ON ${ LIST_TABLE }.id = ${ TODO_TABLE }.list_id\\n GROUP BY ${ LIST_TABLE }.id\\n `)\\n\\n\\n const createList = useCallback(async (name: string) => {\\n\\n if (!user) {throw new Error(\\"Can\'t add list -- user is undefined\\")}\\n\\n return powersync.execute(\\n `\\n INSERT INTO ${ LIST_TABLE }\\n (id, name, created_at, owner_id)\\n VALUES (?, ?, ?, ?)`,\\n [randomUUID(), name, new Date().toISOString(), user?.id],\\n )\\n }, [user, powersync])\\n\\n const deleteList = useCallback(async (id: string) => {\\n console.log(\'Deleting list\', id)\\n return powersync.execute(`DELETE\\n FROM ${ LIST_TABLE }\\n WHERE id = ?`, [id])\\n }, [powersync])\\n\\n return { lists, createList, deleteList }\\n}\\n\\n\\nnpx ignite-cli generate component AddList\\n\\nnpx ignite-cli generate component Lists\\n\\n// app/screens/WelcomeScreen.tsx\\nimport { NativeStackScreenProps } from \\"@react-navigation/native-stack\\"\\nimport { Lists, SignOutButton } from \\"app/components\\"\\nimport { observer } from \\"mobx-react-lite\\"\\nimport React, { FC } from \\"react\\"\\nimport { ViewStyle } from \\"react-native\\"\\nimport { SafeAreaView } from \\"react-native-safe-area-context\\"\\nimport { SignedInNavigatorParamList } from \\"../navigators\\"\\nimport { colors } from \\"../theme\\"\\n\\ninterface WelcomeScreenProps\\n extends NativeStackScreenProps {}\\n\\nexport const WelcomeScreen: FC = observer(function WelcomeScreen() {\\n return (\\n \\n \\n \\n \\n )\\n})\\n\\nconst $container: ViewStyle = {\\n flex: 1,\\n backgroundColor: colors.palette.neutral300,\\n display: \\"flex\\",\\n justifyContent: \\"flex-start\\",\\n height: \\"100%\\",\\n flexDirection: \\"column\\",\\n}\\n\\n\\n\\n// app/components/Lists.tsx\\nimport { NavigationProp, useNavigation } from \\"@react-navigation/native\\"\\nimport { AddList, Icon, ListItem, Text } from \\"app/components\\"\\nimport { AppStackParamList } from \\"app/navigators\\"\\nimport { ListItemRecord, useLists } from \\"app/services/database/use-lists\\"\\nimport React, { useCallback } from \\"react\\"\\nimport { FlatList, TextStyle, View, ViewStyle } from \\"react-native\\"\\nimport { colors, spacing } from \\"../theme\\"\\n\\nexport function Lists() {\\n \\n // use our hook to fetch the lists\\n const { lists, deleteList } = useLists()\\n const navigation = useNavigation>()\\n\\n // This function tells FlatList how to render each item\\n const renderItem = useCallback(({ item }: { item: ListItemRecord }) => {\\n return (\\n {\\n // Eventually this si where we\'ll navigate to the todo, but for now we\'ll just log the list name\\n console.log(\'Pressed: \', item.name)\\n } }\\n text={ `${ item.name }` }\\n RightComponent={\\n \\n {/* Let users delete lists */}\\n deleteList(item.id) }/>\\n \\n }\\n />\\n )\\n }, [])\\n\\n return (\\n \\n Lists\\n \\n \\n \\n \\n Your Lists\\n item.id }\\n ItemSeparatorComponent={ () => }\\n // show a message if the list is empty\\n ListEmptyComponent={ No lists found }\\n />\\n \\n \\n )\\n}\\n\\n// STYLES\\nconst $separator: ViewStyle = { height: 1, backgroundColor: colors.border }\\nconst $emptyList: TextStyle = {\\n textAlign: \\"center\\",\\n color: colors.textDim,\\n opacity: 0.5,\\n padding: spacing.lg,\\n}\\nconst $card: ViewStyle = {\\n shadowColor: colors.palette.neutral800,\\n shadowOffset: { width: 0, height: 1 },\\n shadowRadius: 2,\\n shadowOpacity: 0.35,\\n borderRadius: 8,\\n}\\nconst $listContainer: ViewStyle = {\\n backgroundColor: colors.palette.neutral100,\\n paddingHorizontal: spacing.md,\\n height: \\"100%\\",\\n borderColor: colors.border,\\n borderWidth: 1,\\n}\\nconst $list: ViewStyle = {\\n flex: 1,\\n marginVertical: spacing.md,\\n backgroundColor: colors.palette.neutral200,\\n padding: spacing.md,\\n}\\nconst $container: ViewStyle = {\\n flex: 1,\\n display: \\"flex\\",\\n flexGrow: 1,\\n padding: spacing.md,\\n}\\nconst $listItemText: TextStyle = {\\n height: 44,\\n width: 44,\\n}\\nconst $deleteListIcon: ViewStyle = {\\n display: \\"flex\\",\\n justifyContent: \\"center\\",\\n alignItems: \\"center\\",\\n height: 44,\\n marginVertical: spacing.xxs,\\n}\\n\\n// app/components/AddList.tsx\\nimport { Button, Text, TextField } from \\"app/components\\"\\nimport { useLists } from \\"app/services/database/use-lists\\"\\nimport { colors, spacing } from \\"app/theme\\"\\nimport { observer } from \\"mobx-react-lite\\"\\nimport React from \\"react\\"\\nimport { Keyboard, TextStyle, View, ViewStyle } from \\"react-native\\"\\n\\n/**\\n * Display a form to add a new list\\n */\\nexport const AddList = observer(function AddList() {\\n const [newListName, setNewListName] = React.useState(\\"\\")\\n const [error, setError] = React.useState(null)\\n\\n // we use the function from our hook to create a new list\\n const { createList } = useLists()\\n\\n const handleAddList = React.useCallback(async () => {\\n if (!newListName) {\\n Keyboard.dismiss()\\n return\\n }\\n try {\\n await createList(newListName)\\n setNewListName(\\"\\")\\n } catch (e: any) {\\n setError(`Failed to create list: ${ e?.message ?? \\"unknown error\\" }`)\\n } finally {\\n Keyboard.dismiss()\\n }\\n }, [createList, newListName])\\n\\n return (\\n \\n Add a List\\n \\n \\n \\n \\n { error && { error } }\\n \\n )\\n})\\n\\nconst $container: ViewStyle = {\\n padding: spacing.md,\\n backgroundColor: colors.palette.neutral200,\\n}\\n\\nconst $form: ViewStyle = {\\n display: \\"flex\\",\\n flexDirection: \\"row\\",\\n alignItems: \\"center\\",\\n}\\n\\nconst $textField: ViewStyle = {\\n flex: 1,\\n}\\n\\nconst $textInput: ViewStyle = {\\n backgroundColor: colors.palette.neutral100,\\n}\\n\\nconst $button: ViewStyle = {\\n marginHorizontal: spacing.xs,\\n padding: 0,\\n paddingHorizontal: spacing.xs,\\n paddingVertical: 0,\\n minHeight: 44,\\n}\\n\\nconst $error: TextStyle = {\\n color: colors.error,\\n marginTop: spacing.sm,\\n}\\n\\n\\n\\nnpx ignite-cli generate screen TodoList\\n\\n // app/navigators/AppNavigator.tsx\\n export type AppStackParamList = {\\n Welcome: undefined\\n Auth: undefined\\n // success-line\\n TodoList: { listId: string } // add this line\\n // IGNITE_GENERATOR_ANCHOR_APP_STACK_PARAM_LIST\\n }\\n\\n // ...\\n \\n const AppStack = observer(function AppStack() {\\n // Fetch the user from the auth context\\n const { signedIn } = useAuth()\\n return (\\n \\n \\n // success-line\\n { signedIn ? (\\n // success-line\\n <>\\n // success-line\\n \\n // success-line\\n \\n // success-line\\n >\\n // success-line\\n ) : null }\\n {/* IGNITE_GENERATOR_ANCHOR_APP_STACK_SCREENS */ }\\n \\n )\\n })\\n \\n export const AppNavigator = observer(function AppNavigator(props: NavigationProps) {\\n // ... \\n })\\n\\n // app/screens/TodoListScreen.tsx\\n // ...\\n \\n export const TodoListScreen: FC = function TodoListScreen({\\n navigation,\\n // success-line\\n // We get the listId from the route params\\n // success-line\\n route: { params: {listId} }\\n }) {\\n return (\\n \\n // success-line\\n navigation.goBack() }>\\n \\n \\n // success-line\\n \\n \\n )\\n }\\n \\n const $root: ViewStyle = {\\n flex: 1,\\n }\\n \\n const $backButton: ViewStyle = {\\n height: 44,\\n }\\n \\n \\n\\n// app/components/Lists.tsx\\n\\n// ... other imports\\nimport { NavigationProp, useNavigation } from \\"@react-navigation/native\\"\\nimport { AppStackParamList } from \\"app/navigators\\"\\n\\nexport function Lists() {\\n\\n const { lists, deleteList } = useLists()\\n // We use the root param list, because this component might be reusing in other screens/navigators\\n // success-line\\n const navigation = useNavigation>()\\n\\n const renderItem = useCallback(({ item }: { item: ListItemRecord }) => {\\n return {\\n // success-line\\n navigation.navigate(\\"TodoList\\", { listId: item.id })\\n } }\\n />\\n }, [])\\n\\n return (\\n //... component body\\n )\\n}\\n\\n// app/services/database/use-list.ts\\n\\nimport { usePowerSyncQuery, usePowerSyncWatchedQuery } from \\"@powersync/react-native\\"\\nimport { useDatabase } from \\"app/services/database/database\\"\\nimport { LIST_TABLE, ListRecord, TODO_TABLE, TodoRecord } from \\"app/services/database/schema\\"\\nimport { useAuth } from \\"app/services/database/use-auth\\"\\nimport { useCallback } from \\"react\\"\\nimport { randomUUID } from \'expo-crypto\'\\n\\n\\nexport function useList(listId: string) {\\n const { user } = useAuth()\\n const { powersync } = useDatabase()\\n\\n\\n const listRecords = usePowerSyncQuery(`\\n SELECT *\\n FROM ${ LIST_TABLE }\\n WHERE id = ?\\n `, [listId])\\n\\n // we only expect one list record\\n const list = listRecords[0]\\n\\n\\n const todos = usePowerSyncWatchedQuery(`\\n SELECT *\\n FROM ${ TODO_TABLE }\\n WHERE list_id = ?\\n `, [listId])\\n\\n\\n const addTodo = useCallback(async (description: string): Promise<{ error: string | null }> => {\\n if (!user) {\\n throw new Error(\\"Can\'t add todo -- user is undefined\\")\\n }\\n try {\\n await powersync.execute(\\n `INSERT INTO ${ TODO_TABLE }\\n (id, description, created_at, list_id, created_by, completed)\\n VALUES (?, ?, ?, ?, ?, ?)`,\\n [randomUUID(), description, new Date().toISOString(), listId, user?.id, 0],\\n )\\n\\n return { error: null }\\n } catch (error: any) {\\n return { error: `Error adding todo: ${ error?.message }` }\\n }\\n }, [user, powersync, listId])\\n\\n const removeTodo = useCallback(async (id: string): Promise<{ error: string | null }> => {\\n try {\\n await powersync.execute(`DELETE\\n FROM ${ TODO_TABLE }\\n WHERE id = ?`, [id])\\n return { error: null }\\n } catch (error: any) {\\n console.error(\\"Error removing todo\\", error)\\n return { error: `Error removing todo: ${ error?.message }` }\\n }\\n\\n }, [\\n powersync,\\n ])\\n\\n const setTodoCompleted = useCallback(async (id: string, completed: boolean): Promise<{ error: string | null }> => {\\n\\n const completedAt = completed ? new Date().toISOString() : null\\n const completedBy = completed ? user?.id : null\\n\\n try {\\n await powersync.execute(`\\n UPDATE ${ TODO_TABLE }\\n SET completed = ?, completed_at = ?, completed_by = ?\\n WHERE id = ?\\n `, [completed, completedAt, completedBy, id])\\n\\n return { error: null }\\n\\n } catch (error: any) {\\n console.error(\'Error toggling todo\', error)\\n return { error: `Error toggling todo: ${ error?.message }` }\\n }\\n }, [powersync])\\n\\n\\n return { list, todos, addTodo, removeTodo, setTodoCompleted }\\n\\n}\\n\\n\\n// app/screens/TodoListScreen.tsx\\nimport { Button, Icon, ListItem, Screen, Text, TextField } from \\"app/components\\"\\nimport { SignedInNavigatorScreenProps } from \\"app/navigators\\"\\nimport { TodoRecord } from \\"app/services/database/schema\\"\\nimport { useList } from \\"app/services/database/use-list\\"\\nimport { colors, spacing } from \\"app/theme\\"\\nimport React, { FC, useCallback } from \\"react\\"\\nimport { FlatList, Pressable, TextStyle, View, ViewStyle } from \\"react-native\\"\\nimport { SafeAreaView } from \\"react-native-safe-area-context\\"\\n\\ninterface TodoListScreenProps extends SignedInNavigatorScreenProps<\\"TodoList\\"> {}\\n\\nexport const TodoListScreen: FC = function TodoListScreen({\\n navigation,\\n route: { params: { listId } },\\n}) {\\n\\n // We use the hook to get the list and todos for the list\\n const { list, todos, addTodo, removeTodo, setTodoCompleted } = useList(listId)\\n\\n // State for managing the new todo input and errors\\n const [newTodo, setNewTodo] = React.useState(\\"\\")\\n const [error, setError] = React.useState(null)\\n\\n // We wrap the addTodo from the hook with a bit of error handling\\n const handleAddTodo = useCallback(async () => {\\n const { error } = await addTodo(newTodo)\\n if (error) {\\n setError(error)\\n return\\n }\\n setNewTodo(\\"\\")\\n }, [newTodo])\\n\\n // And do the same for removeTodo\\n const handleRemoveTodo = useCallback(async (id: string) => {\\n const { error } = await removeTodo(id)\\n if (error) {\\n setError(error)\\n }\\n }, [removeTodo, setError])\\n\\n // We\'ll use the ListItem component to display each todo, as we did with the lists\\n const renderItem = useCallback(({ item }: { item: TodoRecord }) => {\\n return \\n handleRemoveTodo(item.id) }/>\\n ) }\\n onPress={ () => setTodoCompleted(item.id, !item.completed) }\\n />\\n }, [\\n handleRemoveTodo,\\n ])\\n\\n return (\\n \\n \\n navigation.goBack() }>\\n \\n \\n \\n \\n \\n Add a list\\n \\n \\n \\n \\n { error && { error } }\\n \\n \\n }\\n ListEmptyComponent={ List is Empty }\\n />\\n \\n \\n )\\n}\\n\\nconst $root: ViewStyle = {\\n flex: 1,\\n}\\nconst $listItemContainer: ViewStyle = {\\n alignItems: \\"center\\",\\n}\\n\\nconst $strikeThrough: TextStyle = { textDecorationLine: \\"line-through\\" }\\n\\nconst $form: ViewStyle = {\\n display: \\"flex\\",\\n flexDirection: \\"row\\",\\n alignItems: \\"center\\",\\n}\\n\\nconst $separator: ViewStyle = { height: 1, backgroundColor: colors.border }\\n\\nconst $emptyList: TextStyle = {\\n color: colors.textDim,\\n opacity: 0.5,\\n padding: spacing.lg,\\n fontSize: 24,\\n}\\n\\nconst $textField: ViewStyle = {\\n flex: 1,\\n}\\n\\nconst $textInput: ViewStyle = {\\n backgroundColor: colors.palette.neutral100,\\n}\\n\\n\\nconst $button: ViewStyle = {\\n marginHorizontal: spacing.xs,\\n padding: 0,\\n paddingHorizontal: spacing.xs,\\n paddingVertical: 0,\\n}\\n\\nconst $addTodoContainer: ViewStyle = {\\n padding: spacing.md,\\n backgroundColor: colors.palette.neutral300,\\n}\\nconst $header: ViewStyle = {\\n display: \\"flex\\",\\n flexDirection: \\"row\\",\\n alignItems: \\"center\\",\\n backgroundColor: colors.palette.secondary200,\\n paddingBottom: spacing.md,\\n}\\n\\nconst $listName: TextStyle = {\\n marginLeft: spacing.sm,\\n flex: 1,\\n}\\n\\nconst $error: TextStyle = {\\n color: colors.error,\\n marginTop: spacing.sm,\\n}\\n\\nconst $container: ViewStyle = {\\n padding: spacing.md,\\n}\\n\\nconst $listItemText: TextStyle = {\\n height: 44,\\n verticalAlign: \\"middle\\"\\n}\\n\\nconst $deleteIcon: ViewStyle = {\\n display: \\"flex\\",\\n justifyContent: \\"center\\",\\n alignItems: \\"center\\",\\n height: 44,\\n marginVertical: spacing.xxs,\\n}\\n\\n\\n","lastUpdated":"8 weeks ago","title":"PowerSync and Supabase for Local-First Data Management","publish_date":"2024-03-22","doc_name":"LocalFirstDataWithPowerSync.md"},{"author":"Dan Edwards","content":"curl -Ls \\"https://get.maestro.mobile.dev\\" | bash\\n\\nbrew tap facebook/fb\\nbrew install idb-companion\\n\\n#flow: Login\\n#intent:\\n# Open up our app and use the default credentials to login\\n# and navigate to the demo screen\\n\\nappId: com.maestroapp # the app id of the app we want to test\\n# You can find the appId of an Ignite app in the `app.json` file\\n# as the \\"package\\" under the \\"android\\" section and \\"bundleIdentifier\\" under the \\"ios\\" section\\n---\\n- clearState # clears the state of our app (navigation and authentication)\\n- launchApp # launches the app\\n- assertVisible: \\"Sign In\\"\\n- tapOn:\\n text: \\"Tap to sign in!\\"\\n- assertVisible: \\"Your app, almost ready for launch!\\"\\n- tapOn:\\n text: \\"Let\'s go!\\"\\n- assertVisible: \\"Components to jump start your project!\\"\\n\\ncd .maestro\\nmaestro test Login.yaml\\n\\n \u2551 > Flow\\n Running on iPhone 11 - iOS 16.2 - 5A269AA1-2704-429B-BF30-D6965060E03E\\n \u2551 \u2705 Clear state of com.maestroapp\\n \u2551 \u2705 Launch app \\"com.maestroapp\\"\\n \u2551 \u2705 Assert that \\"Sign In\\" is visible\\n \u2551 \u2705 Tap on \\"Tap to sign in!\\"\\n \u2551 \u2705 Assert that \\"Your app, almost ready for launch!\\" is visible\\n \u2551 \u2705 Tap on \\"Let\'s go!\\"\\n \u2551 \u2705 Assert that \\"Components to jump start your project!\\" is visible\\n\\n# flow: run the login flow and then navigate to the demo podcast list screen, favorite a podcast, and then switch the list to only be favorites.\\n\\nappId: com.maestroapp\\nenv:\\n TITLE: \\"RNR 257 - META RESPONDS! How can we improve React Native, part 2\\"\\n FAVORITES_TEXT: \\"Switch on to only show favorites\\"\\n\\n---\\n- runFlow: Login.yaml\\n- tapOn: \\"Podcast, tab, 3 of 4\\"\\n- assertVisible: \\"React Native Radio episodes\\"\\n- tapOn:\\n text: ${FAVORITES_TEXT}\\n- assertVisible: \\"This looks a bit empty\\"\\n- tapOn:\\n text: ${FAVORITES_TEXT}\\n- scrollUntilVisible:\\n element:\\n text: ${TITLE}\\n direction: DOWN\\n timeout: 50000\\n speed: 40\\n visibilityPercentage: 100\\n- longPressOn: ${TITLE}\\n- scrollUntilVisible:\\n element:\\n text: ${FAVORITES_TEXT}\\n direction: UP\\n timeout: 50000\\n speed: 40\\n visibilityPercentage: 100\\n- tapOn:\\n text: ${FAVORITES_TEXT}\\n- assertVisible: ${TITLE}\\n\\n","lastUpdated":"4 months ago","title":"Maestro Setup","publish_date":"2023-02-01","doc_name":"MaestroSetup.md"},{"author":"Frank Calise","content":"npx ignite-cli new PizzaApp --workflow=cng --yes\\ncd PizzaApp\\n\\nyarn remove @react-native-async-storage/async-storage\\nyarn add react-native-mmkv\\nyarn prebuild\\n\\n// error-line\\nimport AsyncStorage from \\"@react-native-async-storage/async-storage\\";\\n// success-line\\nimport { MMKV } from \\"react-native-mmkv\\";\\n// success-line\\nexport const storage = new MMKV();\\n\\n/**\\n * Loads a string from storage.\\n *\\n * @param key The key to fetch.\\n */\\n// error-line\\nexport async function loadString(key: string): Promise {\\n// success-line\\nexport function loadString(key: string): string | null {\\n try {\\n // error-line\\n return await AsyncStorage.getItem(key);\\n // success-line\\n return storage.getString(key);\\n } catch {\\n // not sure why this would fail... even reading the RN docs I\'m unclear\\n return null;\\n }\\n}\\n\\n/**\\n * Saves a string to storage.\\n *\\n * @param key The key to fetch.\\n * @param value The value to store.\\n */\\n// error-line\\nexport async function saveString(key: string, value: string): Promise {\\n// success-line\\nexport function saveString(key: string, value: string): boolean {\\n try {\\n // error-line\\n await AsyncStorage.setItem(key, value);\\n // success-line\\n storage.set(key, value);\\n return true;\\n } catch {\\n return false;\\n }\\n}\\n\\n/**\\n * Loads something from storage and runs it thru JSON.parse.\\n *\\n * @param key The key to fetch.\\n */\\n// error-line\\nexport async function load(key: string): Promise {\\n// success-line\\nexport function load(key: string): unknown | null {\\n try {\\n // error-line\\n const almostThere = await AsyncStorage.getItem(key)\\n // success-line\\n const almostThere = storage.getString(key);\\n return JSON.parse(almostThere);\\n } catch {\\n return null;\\n }\\n}\\n\\n/**\\n * Saves an object to storage.\\n *\\n * @param key The key to fetch.\\n * @param value The value to store.\\n */\\n// error-line\\nexport async function save(key: string, value: unknown): Promise {\\n// success-line\\nexport function save(key: string, value: unknown): boolean {\\n try {\\n // error-line\\n await AsyncStorage.setItem(key, JSON.stringify(value));\\n // success-line\\n saveString(key, JSON.stringify(value));\\n return true;\\n } catch {\\n return false;\\n }\\n}\\n\\n/**\\n * Removes something from storage.\\n *\\n * @param key The key to kill.\\n */\\n// error-line\\nexport async function remove(key: string): Promise {\\n// success-line\\nexport function remove(key: string): void {\\n try {\\n // error-line\\n await AsyncStorage.removeItem(key);\\n // success-line\\n storage.delete(key);\\n } catch {}\\n}\\n\\n/**\\n * Burn it all to the ground.\\n */\\n// error-line\\nexport async function clear(): Promise {\\n// success-line\\nexport function clear(): void {\\n try {\\n // error-line\\n await AsyncStorage.clear();\\n // success-line\\n storage.clearAll();\\n } catch {}\\n}\\n\\nimport {\\n storage,\\n load,\\n loadString,\\n save,\\n saveString,\\n clear,\\n remove,\\n} from \\"./storage\\";\\n\\nconst VALUE_OBJECT = { x: 1 };\\nconst VALUE_STRING = JSON.stringify(VALUE_OBJECT);\\n\\ndescribe(\\"MMKV Storage\\", () => {\\n beforeEach(() => {\\n storage.clearAll();\\n storage.set(\\"string\\", \\"string\\");\\n storage.set(\\"object\\", JSON.stringify(VALUE_OBJECT));\\n });\\n\\n it(\\"should be defined\\", () => {\\n expect(storage).toBeDefined();\\n });\\n\\n it(\\"should have default keys\\", () => {\\n expect(storage.getAllKeys()).toEqual([\\"string\\", \\"object\\"]);\\n });\\n\\n it(\\"should load data\\", () => {\\n expect(load(\\"object\\")).toEqual(VALUE_OBJECT);\\n expect(loadString(\\"object\\")).toEqual(VALUE_STRING);\\n\\n expect(load(\\"string\\")).toEqual(\\"string\\");\\n expect(loadString(\\"string\\")).toEqual(\\"string\\");\\n });\\n\\n it(\\"should save strings\\", () => {\\n saveString(\\"string\\", \\"new string\\");\\n expect(loadString(\\"string\\")).toEqual(\\"new string\\");\\n });\\n\\n it(\\"should save objects\\", () => {\\n save(\\"object\\", { y: 2 });\\n expect(load(\\"object\\")).toEqual({ y: 2 });\\n save(\\"object\\", { z: 3, also: true });\\n expect(load(\\"object\\")).toEqual({ z: 3, also: true });\\n });\\n\\n it(\\"should save strings and objects\\", () => {\\n saveString(\\"object\\", \\"new string\\");\\n expect(loadString(\\"object\\")).toEqual(\\"new string\\");\\n });\\n\\n it(\\"should remove data\\", () => {\\n remove(\\"object\\");\\n expect(load(\\"object\\")).toBeUndefined();\\n expect(storage.getAllKeys()).toEqual([\\"string\\"]);\\n\\n remove(\\"string\\");\\n expect(load(\\"string\\")).toBeUndefined();\\n expect(storage.getAllKeys()).toEqual([]);\\n });\\n\\n it(\\"should clear all data\\", () => {\\n expect(storage.getAllKeys()).toEqual([\\"string\\", \\"object\\"]);\\n clear();\\n expect(storage.getAllKeys()).toEqual([]);\\n });\\n});\\n\\n","lastUpdated":"5 weeks ago","title":"Migrating to MMKV","publish_date":"2022-12-28","doc_name":"MigratingToMMKV.md"},{"author":"Yulian Glukhenko","content":"sdk.dir=/Users/path/to/sdk\\nndk.dir=/Users/path/to/ndk\\n\\nsdk.dir=/Users/~Usernamehere~/Library/Android/sdk\\nndk.dir=/Users/~Usernamehere~/Library/Android/sdk/ndk/21.4.7075529\\n\\narch -x86_64 ./gradlew :ReactAndroid:installArchives --no-daemon\\n\\n","lastUpdated":"4 months ago","title":"Patching/Building Android .aar From Source","publish_date":"2022-10-09","doc_name":"PatchingBuildingAndroid.md"},{"author":"Frank Calise","content":"npx ignite-cli@latest new PizzaApp --workflow=prebuild --yes\\n\\nnpm install -g eas-cli\\n\\nbrew install cocoapods fastlane\\n\\nyarn add expo-dev-client\\n\\neas init\\n\\nWarning: Your project uses dynamic app configuration, and the EAS project ID can\'t automatically be added to it.\\nhttps://docs.expo.dev/workflow/configuration/#dynamic-configuration-with-appconfigjs\\n\\nTo complete the setup process, set \\"extra.eas.projectId\\" in your app.config.ts or app.json:\\n\\n{\\n \\"expo\\": {\\n \\"extra\\": {\\n \\"eas\\": {\\n \\"projectId\\": \\"...id here...\\"\\n }\\n }\\n }\\n}\\n\\neas build:configure\\n\\n{\\n \\"cli\\": {\\n \\"version\\": \\">= 0.60.0\\"\\n },\\n \\"build\\": {\\n \\"development\\": {\\n \\"developmentClient\\": true,\\n \\"distribution\\": \\"internal\\"\\n },\\n \\"preview\\": {\\n \\"developmentClient\\": true,\\n \\"ios\\": {\\n \\"simulator\\": true\\n }\\n },\\n \\"production\\": {}\\n },\\n \\"submit\\": {\\n \\"production\\": {}\\n }\\n}\\n\\neas build --profile preview\\n\\neas build --profile preview --local\\n\\nEAS_LOCAL_BUILD_ARTIFACTS_DIR=build eas build --profile preview --local\\n\\n--\\"start\\": \\"expo start\\"\\n++\\"start\\": \\"expo start --dev-client\\"\\n\\n","lastUpdated":"4 months ago","title":"Prepping Ignite for EAS Build","publish_date":"2023-12-04","doc_name":"PrepForEASBuild.md"},{"author":"Frank Calise","content":"npx ignite-cli@latest new PizzaApp --remove-demo --workflow=cng --yes\\ncd PizzaApp\\n\\nnpx expo install react-native-vision-camera\\n\\n\\"plugins\\": [\\n \\"expo-localization\\",\\n [\\n \\"expo-build-properties\\",\\n {\\n \\"ios\\": {\\n \\"newArchEnabled\\": false\\n },\\n \\"android\\": {\\n \\"newArchEnabled\\": false\\n }\\n }\\n ],\\n [\\n \\"react-native-vision-camera\\",\\n {\\n \\"cameraPermissionText\\": \\"$(PRODUCT_NAME) needs access to your Camera.\\",\\n \\"enableCodeScanner\\": true\\n }\\n ]\\n],\\n\\nnpx expo prebuild\\nyarn android\\n\\nimport { observer } from \\"mobx-react-lite\\";\\nimport React, { FC } from \\"react\\";\\nimport { AppStackScreenProps } from \\"../navigators\\";\\nimport { Camera, CameraPermissionStatus } from \\"react-native-vision-camera\\";\\nimport { Linking, View, ViewStyle } from \\"react-native\\";\\nimport { Button, Screen, Text } from \\"app/components\\";\\n\\ninterface WelcomeScreenProps extends AppStackScreenProps<\\"Welcome\\"> {}\\n\\nexport const WelcomeScreen: FC = observer(\\n function WelcomeScreen(_props) {\\n const [cameraPermission, setCameraPermission] =\\n React.useState();\\n\\n React.useEffect(() => {\\n Camera.getCameraPermissionStatus().then(setCameraPermission);\\n }, []);\\n\\n const promptForCameraPermissions = React.useCallback(async () => {\\n const permission = await Camera.requestCameraPermission();\\n Camera.getCameraPermissionStatus().then(setCameraPermission);\\n\\n if (permission === \\"denied\\") await Linking.openSettings();\\n }, [cameraPermission]);\\n\\n if (cameraPermission == null) {\\n // still loading\\n return null;\\n }\\n\\n return (\\n \\n \\n \\n Camera Permission:{\\" \\"}\\n {cameraPermission === null ? \\"Loading...\\" : cameraPermission}\\n \\n {cameraPermission !== \\"granted\\" && (\\n \\n )}\\n \\n \\n );\\n }\\n);\\n\\nconst $container: ViewStyle = {\\n flex: 1,\\n padding: 20,\\n justifyContent: \\"space-evenly\\",\\n};\\n\\nnpx ignite-cli@next g model CodeStore\\nnpx ignite-cli@next g screen Codes\\n\\nimport { Instance, SnapshotIn, SnapshotOut, types } from \\"mobx-state-tree\\";\\nimport { withSetPropAction } from \\"./helpers/withSetPropAction\\";\\n\\n/**\\n * Model description here for TypeScript hints.\\n */\\nexport const CodeStoreModel = types\\n .model(\\"CodeStore\\")\\n .props({\\n codes: types.array(types.string),\\n })\\n .actions(withSetPropAction)\\n .actions((self) => ({\\n addCode(code: string) {\\n self.codes.push(code);\\n },\\n }));\\n\\nexport interface CodeStore extends Instance {}\\nexport interface CodeStoreSnapshotOut\\n extends SnapshotOut {}\\nexport interface CodeStoreSnapshotIn\\n extends SnapshotIn {}\\nexport const createCodeStoreDefaultModel = () =>\\n types.optional(CodeStoreModel, {});\\n\\nimport React, { FC } from \\"react\\";\\nimport { observer } from \\"mobx-react-lite\\";\\nimport { View, ViewStyle } from \\"react-native\\";\\nimport { AppStackScreenProps } from \\"app/navigators\\";\\nimport { Button, Screen, Text } from \\"app/components\\";\\nimport { useNavigation } from \\"@react-navigation/native\\";\\nimport { useStores } from \\"app/models\\";\\nimport { spacing } from \\"app/theme\\";\\n\\ninterface CodesScreenProps extends AppStackScreenProps<\\"Codes\\"> {}\\n\\nexport const CodesScreen: FC = observer(\\n function CodesScreen() {\\n // Pull in one of our MST stores\\n const { codeStore } = useStores();\\n\\n // Pull in navigation via hook\\n const navigation = useNavigation();\\n return (\\n \\n \\n \\n\\n {codeStore.codes.map((code, index) => (\\n \\n ))}\\n \\n\\n \\n );\\n }\\n);\\n\\nconst $root: ViewStyle = {\\n flex: 1,\\n};\\n\\nconst $container: ViewStyle = {\\n flex: 1,\\n justifyContent: \\"space-between\\",\\n paddingHorizontal: spacing.md,\\n};\\n\\nimport { observer } from \\"mobx-react-lite\\";\\nimport React, { FC } from \\"react\\";\\nimport { AppStackScreenProps } from \\"../navigators\\";\\n// success-line-start\\nimport {\\n Camera,\\n CameraPermissionStatus,\\n useCameraDevice,\\n useCodeScanner,\\n} from \\"react-native-vision-camera\\";\\nimport {\\n Alert,\\n Linking,\\n StyleSheet,\\n TouchableOpacity,\\n View,\\n ViewStyle,\\n} from \\"react-native\\";\\nimport { Button, Icon, Screen, Text } from \\"app/components\\";\\nimport { useSafeAreaInsets } from \\"react-native-safe-area-context\\";\\nimport { useStores } from \\"app/models\\";\\nimport { spacing } from \\"app/theme\\";\\n// success-line-end\\n\\ninterface WelcomeScreenProps extends AppStackScreenProps<\\"Welcome\\"> {}\\n\\nexport const WelcomeScreen: FC = observer(\\n function WelcomeScreen(_props) {\\n const [cameraPermission, setCameraPermission] =\\n React.useState();\\n // success-line-start\\n const [showScanner, setShowScanner] = React.useState(false);\\n const [isActive, setIsActive] = React.useState(false);\\n\\n const { codeStore } = useStores();\\n // success-line-end\\n\\n React.useEffect(() => {\\n Camera.getCameraPermissionStatus().then(setCameraPermission);\\n }, []);\\n\\n const promptForCameraPermissions = React.useCallback(async () => {\\n const permission = await Camera.requestCameraPermission();\\n Camera.getCameraPermissionStatus().then(setCameraPermission);\\n\\n if (permission === \\"denied\\") await Linking.openSettings();\\n }, [cameraPermission]);\\n\\n // success-line-start\\n const codeScanner = useCodeScanner({\\n codeTypes: [\\"qr\\", \\"ean-13\\"],\\n onCodeScanned: (codes) => {\\n setIsActive(false);\\n\\n codes.every((code) => {\\n if (code.value) {\\n codeStore.addCode(code.value);\\n }\\n return true;\\n });\\n\\n setShowScanner(false);\\n Alert.alert(\\"Code scanned!\\");\\n },\\n });\\n\\n const device = useCameraDevice(\\"back\\");\\n\\n const { right, top } = useSafeAreaInsets();\\n // success-line-end\\n\\n if (cameraPermission == null) {\\n // still loading\\n return null;\\n }\\n\\n // success-line-start\\n if (showScanner && device) {\\n return (\\n \\n \\n \\n setShowScanner(false)}\\n >\\n \\n \\n \\n \\n );\\n }\\n // success-line-end\\n\\n return (\\n \\n \\n \\n Camera Permission:{\\" \\"}\\n {cameraPermission === null ? \\"Loading...\\" : cameraPermission}\\n \\n {cameraPermission !== \\"granted\\" && (\\n \\n )}\\n \\n // success-line-start\\n \\n \\n \\n \\n \\n );\\n }\\n);\\n\\nconst $container: ViewStyle = {\\n flex: 1,\\n padding: 20,\\n justifyContent: \\"space-evenly\\",\\n};\\n\\n// success-line-start\\nconst $cameraContainer: ViewStyle = {\\n flex: 1,\\n};\\n\\nconst $cameraButtons: ViewStyle = {\\n position: \\"absolute\\",\\n};\\n\\nconst $closeCamera: ViewStyle = {\\n marginBottom: spacing.md,\\n width: 100,\\n height: 100,\\n borderRadius: 100 / 2,\\n backgroundColor: \\"rgba(140, 140, 140, 0.3)\\",\\n justifyContent: \\"center\\",\\n alignItems: \\"center\\",\\n};\\n// success-line-end\\n\\n","lastUpdated":"3 months ago","title":"React Native Vision Camera","publish_date":"2023-10-23","doc_name":"ReactNativeVisionCamera.md"},{"author":"Justin Poliachik","content":"npx ignite-cli new ReduxApp --yes --removeDemo\\n\\nyarn add @reduxjs/toolkit\\nyarn add react-redux\\n\\nimport { configureStore } from \\"@reduxjs/toolkit\\";\\nimport { TypedUseSelectorHook, useDispatch, useSelector } from \\"react-redux\\";\\nimport counterReducer from \\"./counterSlice\\";\\n\\nexport const store = configureStore({\\n reducer: {\\n counter: counterReducer,\\n // add other state here\\n },\\n});\\n\\n// Infer the `RootState` and `AppDispatch` types from the store itself\\nexport type RootState = ReturnType;\\nexport type AppDispatch = typeof store.dispatch;\\n\\n// Use throughout app instead of plain `useDispatch` and `useSelector` for type safety\\ntype DispatchFunc = () => AppDispatch;\\nexport const useAppDispatch: DispatchFunc = useDispatch;\\nexport const useAppSelector: TypedUseSelectorHook = useSelector;\\n\\nimport { createSlice } from \\"@reduxjs/toolkit\\";\\n\\n// Define a type for the slice state\\ninterface CounterState {\\n value: number;\\n}\\n\\n// Define the initial state using that type\\nconst initialState: CounterState = {\\n value: 0,\\n};\\n\\nexport const counterSlice = createSlice({\\n name: \\"counter\\",\\n // `createSlice` will infer the state type from the `initialState` argument\\n initialState,\\n reducers: {\\n increment: (state) => {\\n state.value += 1;\\n },\\n decrement: (state) => {\\n state.value -= 1;\\n },\\n },\\n});\\n\\nexport const { increment, decrement } = counterSlice.actions;\\nexport default counterSlice.reducer;\\n\\nimport { Provider } from \\"react-redux\\";\\nimport { store } from \\"./store/store\\";\\n\\n...\\n\\n\\n \\n\\n\\nimport React, { FC } from \\"react\\";\\nimport { View, ViewStyle } from \\"react-native\\";\\nimport { Button, Text } from \\"app/components\\";\\nimport { AppStackScreenProps } from \\"../navigators\\";\\nimport { colors } from \\"../theme\\";\\nimport { useSafeAreaInsetsStyle } from \\"../utils/useSafeAreaInsetsStyle\\";\\nimport { useAppDispatch, useAppSelector } from \\"app/store/store\\";\\nimport { decrement, increment } from \\"app/store/counterSlice\\";\\n\\ninterface WelcomeScreenProps extends AppStackScreenProps<\\"Welcome\\"> {}\\n\\nexport const WelcomeScreen: FC = () => {\\n const $containerInsets = useSafeAreaInsetsStyle([\\"top\\", \\"bottom\\"]);\\n const count = useAppSelector((state) => state.counter.value);\\n const dispatch = useAppDispatch();\\n return (\\n \\n \\n );\\n};\\n\\nconst $container: ViewStyle = {\\n flex: 1,\\n backgroundColor: colors.background,\\n};\\n\\nyarn add redux-persist\\n\\nimport { combineReducers, configureStore } from \\"@reduxjs/toolkit\\";\\nimport counterReducer from \\"./counterSlice\\";\\nimport { TypedUseSelectorHook, useDispatch, useSelector } from \\"react-redux\\";\\nimport { persistStore, persistReducer, FLUSH, REHYDRATE, PAUSE, PERSIST, PURGE, REGISTER } from \\"redux-persist\\";\\nimport AsyncStorage from \\"@react-native-async-storage/async-storage\\";\\n\\nconst persistConfig = {\\n key: \\"root\\",\\n version: 1,\\n storage: AsyncStorage,\\n};\\n\\nconst rootReducer = combineReducers({\\n counter: counterReducer,\\n});\\n\\nconst persistedReducer = persistReducer(persistConfig, rootReducer);\\n\\nexport const store = configureStore({\\n reducer: persistedReducer,\\n middleware: (getDefaultMiddleware) =>\\n getDefaultMiddleware({\\n serializableCheck: {\\n ignoredActions: [FLUSH, REHYDRATE, PAUSE, PERSIST, PURGE, REGISTER],\\n },\\n }),\\n});\\n\\nexport const persistor = persistStore(store);\\n\\n// Infer the `RootState` and `AppDispatch` types from the store itself\\nexport type RootState = ReturnType;\\nexport type AppDispatch = typeof store.dispatch;\\n\\n// Use throughout app instead of plain `useDispatch` and `useSelector` for type safety\\ntype DispatchFunc = () => AppDispatch;\\nexport const useAppDispatch: DispatchFunc = useDispatch;\\nexport const useAppSelector: TypedUseSelectorHook = useSelector;\\n\\n...\\n\\nimport { persistor, store } from \\"./store/store\\"\\nimport { PersistGate } from \\"redux-persist/integration/react\\"\\n\\n...\\n\\nfunction App(props: AppProps) {\\n const { hideSplashScreen } = props\\n...\\n const onBeforeLiftPersistGate = () => {\\n // If your initialization scripts run very fast, it\'s good to show the splash screen for just a bit longer to prevent flicker.\\n // Slightly delaying splash screen hiding for better UX; can be customized or removed as needed,\\n // Note: (vanilla Android) The splash-screen will not appear if you launch your app via the terminal or Android Studio. Kill the app and launch it normally by tapping on the launcher icon. https://stackoverflow.com/a/69831106\\n // Note: (vanilla iOS) You might notice the splash-screen logo change size. This happens in debug/development mode. Try building the app for release.\\n setTimeout(hideSplashScreen, 500)\\n }\\n...\\n return (\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n )\\n}\\n\\nexport default App\\n\\n","lastUpdated":"3 days ago","title":"Redux","publish_date":"2024-01-16","doc_name":"Redux.md"},{"author":"Justin Poliachik","content":"yarn remove mobx mobx-react-lite mobx-state-tree reactotron-mst\\n\\nrm -rf ./app/models\\n\\n--import { mst } from \\"reactotron-mst\\"\\n\\n...\\n\\nconst reactotron = Reactotron.configure({\\n name: require(\\"../../package.json\\").name,\\n onConnect: () => {\\n /** since this file gets hot reloaded, let\'s clear the past logs every time we connect */\\n Reactotron.clear()\\n },\\n--}).use(\\n-- mst({\\n-- /** ignore some chatty `mobx-state-tree` actions */\\n-- filter: (event) => /postProcessSnapshot|@APPLY_SNAPSHOT/.test(event.name) === false,\\n-- }),\\n--)\\n++})\\n\\n--import { observer } from \\"mobx-react-lite\\"\\n\\n--export const WelcomeScreen: FC = observer(function WelcomeScreen(props) {\\n++export const WelcomeScreen: FC = (props) => {\\n ...\\n--})\\n++}\\n\\n--import { useStores } from \\"../models\\"\\n\\nconst AppStack = () => {\\n-- const { authenticationStore: { isAuthenticated } } = useStores()\\n++ const isAuthenticated = false // TODO: TEMPORARY VALUE - replace with alternative state management solution\\n\\n--import { observer } from \\"mobx-react-lite\\"\\n\\n--export const <%= props.pascalCaseName %> = observer(function <%= props.pascalCaseName %>(props: <%= props.pascalCaseName %>Props) {\\n++export const <%= props.pascalCaseName %> = (props: <%= props.pascalCaseName %>Props) => {\\n ...\\n--})\\n++}\\n\\n--import { useInitialRootStore } from \\"./models\\"\\n\\n--const { rehydrated } = useInitialRootStore(() => {\\n--setTimeout(hideSplashScreen, 500)\\n--})\\n++React.useEffect(() => {\\n++ setTimeout(hideSplashScreen, 500)\\n++}, [])\\n\\n--if (!rehydrated || !isNavigationStateRestored || !areFontsLoaded) return null\\n++if (!isNavigationStateRestored || !areFontsLoaded) return null\\n\\n--import type { ApiConfig, ApiFeedResponse } from \\"./api.types\\"\\n--import type { EpisodeSnapshotIn } from \\"../../models/Episode\\"\\n++import type { ApiConfig, ApiFeedResponse, EpisodeItem } from \\"./api.types\\"\\n\\n\\n--async getEpisodes(): Promise<{ kind: \\"ok\\"; episodes: EpisodeSnapshotIn[] } | GeneralApiProblem> {\\n++async getEpisodes(): Promise<{ kind: \\"ok\\"; episodes: EpisodeItem[] } | GeneralApiProblem> {\\n// make the api call\\n\\n--// This is where we transform the data into the shape we expect for our MST model.\\n--const episodes: EpisodeSnapshotIn[] =\\n-- rawData?.items.map((raw) => ({\\n-- ...raw,\\n-- })) ?? []\\n++const episodes = rawData?.items ?? []\\n\\n","lastUpdated":"4 months ago","title":"Remove MobX-State-Tree","publish_date":"2024-02-05","doc_name":"RemoveMobxStateTree.md"},{"author":"Mark Rickert","content":"npx ignite-cli new PizzaApp --workflow=cng --yes\\ncd PizzaApp\\n\\nimport {\\n withInfoPlist,\\n withAndroidManifest,\\n type ConfigPlugin,\\n type AndroidConfig,\\n type IOSConfig,\\n} from \\"@expo/config-plugins\\"\\n\\n// More info: https://developer.android.com/guide/topics/manifest/uses-feature-element\\nconst validAndroidFeatures = [\\n \\"android.hardware.audio.low_latency\\",\\n \\"android.hardware.audio.output\\",\\n \\"android.hardware.audio.pro\\",\\n \\"android.hardware.bluetooth\\",\\n \\"android.hardware.bluetooth_le\\",\\n \\"android.hardware.camera\\",\\n \\"android.hardware.camera.any\\",\\n \\"android.hardware.camera.autofocus\\",\\n \\"android.hardware.camera.capability.manual_post_processing\\",\\n \\"android.hardware.camera.capability.manual_sensor\\",\\n \\"android.hardware.camera.capability.raw\\",\\n \\"android.hardware.camera.external\\",\\n \\"android.hardware.camera.flash\\",\\n \\"android.hardware.camera.front\\",\\n \\"android.hardware.camera.level.full\\",\\n \\"android.hardware.consumerir\\",\\n \\"android.hardware.faketouch\\",\\n \\"android.hardware.faketouch.multitouch.distinct\\",\\n \\"android.hardware.faketouch.multitouch.jazzhand\\",\\n \\"android.hardware.fingerprint\\",\\n \\"android.hardware.gamepad\\",\\n \\"android.hardware.location\\",\\n \\"android.hardware.location.gps\\",\\n \\"android.hardware.location.network\\",\\n \\"android.hardware.microphone\\",\\n \\"android.hardware.nfc\\",\\n \\"android.hardware.nfc.hce\\",\\n \\"android.hardware.opengles.aep\\",\\n \\"android.hardware.screen.landscape\\",\\n \\"android.hardware.screen.portrait\\",\\n \\"android.hardware.sensor.accelerometer\\",\\n \\"android.hardware.sensor.ambient_temperature\\",\\n \\"android.hardware.sensor.barometer\\",\\n \\"android.hardware.sensor.compass\\",\\n \\"android.hardware.sensor.gyroscope\\",\\n \\"android.hardware.sensor.heartrate\\",\\n \\"android.hardware.sensor.heartrate.ecg\\",\\n \\"android.hardware.sensor.hifi_sensors\\",\\n \\"android.hardware.sensor.light\\",\\n \\"android.hardware.sensor.proximity\\",\\n \\"android.hardware.sensor.relative_humidity\\",\\n \\"android.hardware.sensor.stepcounter\\",\\n \\"android.hardware.sensor.stepdetector\\",\\n \\"android.hardware.telephony\\",\\n \\"android.hardware.telephony.cdma\\",\\n \\"android.hardware.telephony.gsm\\",\\n \\"android.hardware.touchscreen\\",\\n \\"android.hardware.touchscreen.multitouch\\",\\n \\"android.hardware.touchscreen.multitouch.distinct\\",\\n \\"android.hardware.touchscreen.multitouch.jazzhand\\",\\n \\"android.hardware.type.automotive\\",\\n \\"android.hardware.type.pc\\",\\n \\"android.hardware.type.television\\",\\n \\"android.hardware.type.watch\\",\\n \\"android.hardware.usb.accessory\\",\\n \\"android.hardware.usb.host\\",\\n \\"android.hardware.vulkan.compute\\",\\n \\"android.hardware.vulkan.level\\",\\n \\"android.hardware.vulkan.version\\",\\n \\"android.hardware.wifi\\",\\n \\"android.hardware.wifi.direct\\",\\n] as const\\n\\n// More info: https://developer.apple.com/documentation/bundleresources/information_property_list/uirequireddevicecapabilities/\\nconst validIOSFeatures = [\\n \\"accelerometer\\",\\n \\"arkit\\",\\n \\"arm64\\",\\n \\"armv7\\",\\n \\"auto-focus-camera\\",\\n \\"bluetooth-le\\",\\n \\"camera-flash\\",\\n \\"driverkit\\",\\n \\"front-facing-camera\\",\\n \\"gamekit\\",\\n \\"gps\\",\\n \\"gyroscope\\",\\n \\"healthkit\\",\\n \\"iphone-ipad-minimum-performance-a12\\",\\n \\"iphone-performance-gaming-tier\\",\\n \\"location-services\\",\\n \\"magnetometer\\",\\n \\"metal\\",\\n \\"microphone\\",\\n \\"nfc\\",\\n \\"opengles-1\\",\\n \\"opengles-2\\",\\n \\"opengles-3\\",\\n \\"peer-peer\\",\\n \\"sms\\",\\n \\"still-camera\\",\\n \\"telephony\\",\\n \\"video-camera\\",\\n \\"wifi\\",\\n] as const\\n\\ntype HardwareFeatureAndroid = (typeof validAndroidFeatures)[number]\\ntype HardwareFeatureIOS = (typeof validIOSFeatures)[number]\\n\\nexport const withRequiredHardware: ConfigPlugin<{\\n ios: Array\\n android: Array\\n}> = (config, { android, ios }) => {\\n // Add android required hardware\\n config = withAndroidManifest(config, (config) => {\\n config.modResults = addHardwareFeaturesToAndroidManifestManifest(config.modResults, android)\\n return config\\n })\\n\\n // Add ios required hardware\\n config = withInfoPlist(config, (config) => {\\n config.modResults = addRequiredDeviceCapabilitiesToInfoPlist(config.modResults, ios)\\n return config\\n })\\n\\n return config\\n}\\n\\nexport function addHardwareFeaturesToAndroidManifestManifest(\\n androidManifest: AndroidConfig.Manifest.AndroidManifest,\\n requiredFeatures: Array,\\n) {\\n // Add `` to the AndroidManifest.xml\\n if (!Array.isArray(androidManifest.manifest[\\"uses-feature\\"])) {\\n androidManifest.manifest[\\"uses-feature\\"] = []\\n }\\n\\n // Here we add the feature to the manifest:\\n // loop through the array of features and add them to the manifest if they don\'t exist\\n for (const feature of requiredFeatures) {\\n if (\\n !androidManifest.manifest[\\"uses-feature\\"].find((item) => item.$[\\"android:name\\"] === feature)\\n ) {\\n androidManifest.manifest[\\"uses-feature\\"]?.push({\\n $: {\\n \\"android:name\\": feature,\\n \\"android:required\\": \\"true\\",\\n },\\n })\\n }\\n }\\n\\n return androidManifest\\n}\\n\\nexport function addRequiredDeviceCapabilitiesToInfoPlist(\\n infoPlist: IOSConfig.InfoPlist,\\n requiredFeatures: Array,\\n) {\\n if (!infoPlist.UIRequiredDeviceCapabilities) {\\n infoPlist.UIRequiredDeviceCapabilities = []\\n }\\n const existingFeatures = infoPlist.UIRequiredDeviceCapabilities as Array\\n for (const f of requiredFeatures) {\\n if (!existingFeatures.includes(f)) {\\n existingFeatures.push(f)\\n }\\n }\\n\\n infoPlist.UIRequiredDeviceCapabilities = existingFeatures\\n return infoPlist\\n}\\n\\n return {\\n ...config,\\n plugins: [\\n ...existingPlugins,\\n require(\\"./plugins/withSplashScreen\\").withSplashScreen,\\n require(\\"./plugins/withFlipperDisabled\\").withFlipperDisabled,\\n // success-line-start\\n [\\n require(\\"./plugins/withRequiredHardware\\").withRequiredHardware,\\n {\\n // More info: https://developer.apple.com/documentation/bundleresources/information_property_list/uirequireddevicecapabilities/\\n ios: [\\"front-facing-camera\\", \\"microphone\\"],\\n // More info: https://developer.android.com/guide/topics/manifest/uses-feature-element\\n android: [\\"android.hardware.camera.front\\", \\"android.hardware.microphone\\"],\\n },\\n ],\\n // success-line-end\\n ],\\n }\\n\\nUIRequiredDeviceCapabilities\\n\\n armv7\\n // success-line-start\\n front-facing-camera\\n microphone\\n // success-line-end\\n\\n\\n// success-line\\n\\n// success-line\\n\\n\\n","lastUpdated":"4 months ago","title":"Requiring Hardware Features with Expo","publish_date":"2024-02-28","doc_name":"RequiringHardwareFeaturesWithExpo.md"},{"author":"Robin Heinze","content":"# Javascript Node CircleCI 2.0 configuration file\\n#\\n# Check https://circleci.com/docs/2.0/language-javascript/ for more details\\n#\\n\\ndefaults: &defaults\\n docker:\\n # Choose the version of Node you want here\\n - image: circleci/node:10.11\\n working_directory: ~/repo\\n\\nversion: 2\\njobs:\\n setup:\\n <<: *defaults\\n steps:\\n - checkout\\n - restore_cache:\\n name: Restore node modules\\n keys:\\n - v1-dependencies-{{ checksum \\"package.json\\" }}\\n # fallback to using the latest cache if no exact match is found\\n - v1-dependencies-\\n - run:\\n name: Install dependencies\\n command: |\\n yarn install\\n - save_cache:\\n name: Save node modules\\n paths:\\n - node_modules\\n key: v1-dependencies-{{ checksum \\"package.json\\" }}\\n\\n tests:\\n <<: *defaults\\n steps:\\n - checkout\\n - restore_cache:\\n name: Restore node modules\\n keys:\\n - v1-dependencies-{{ checksum \\"package.json\\" }}\\n # fallback to using the latest cache if no exact match is found\\n - v1-dependencies-\\n - run:\\n name: Install React Native CLI and Ignite CLI\\n command: |\\n sudo npm i -g ignite-cli react-native-cli\\n - run:\\n name: Run tests\\n command: yarn ci:test # this command will be added to/found in your package.json scripts\\n\\n publish:\\n <<: *defaults\\n steps:\\n - checkout\\n - run: echo \\"//registry.npmjs.org/:_authToken=$NPM_TOKEN\\" >> ~/.npmrc\\n - restore_cache:\\n name: Restore node modules\\n keys:\\n - v1-dependencies-{{ checksum \\"package.json\\" }}\\n # fallback to using the latest cache if no exact match is found\\n - v1-dependencies-\\n # Run semantic-release after all the above is set.\\n - run:\\n name: Publish to NPM\\n command: yarn ci:publish # this will be added to your package.json scripts\\n\\nworkflows:\\n version: 2\\n test_and_release:\\n jobs:\\n - setup\\n - tests:\\n requires:\\n - setup\\n - publish:\\n requires:\\n - tests\\n filters:\\n branches:\\n only: master\\n\\n","lastUpdated":"4 months ago","title":"Sample YAML for CircleCi for Ignite","publish_date":"2022-10-09","doc_name":"SampleYAMLCircleCI.md"},{"author":"Yulian Glukhenko","content":"yarn add @gorhom/bottom-sheet@^4\\n\\nyarn add react-native-reanimated react-native-gesture-handler\\n# or\\nexpo install react-native-reanimated react-native-gesture-handler\\n\\ntouch ./app/components/SelectField.tsx\\n\\nimport React, { forwardRef, Ref, useImperativeHandle } from \\"react\\";\\nimport { View, TouchableOpacity } from \\"react-native\\";\\nimport { TextField, TextFieldProps } from \\"./TextField\\";\\n\\nexport interface SelectFieldProps\\n extends Omit<\\n TextFieldProps,\\n \\"ref\\" | \\"onValueChange\\" | \\"onChange\\" | \\"value\\"\\n > {}\\nexport interface SelectFieldRef {}\\n\\nexport const SelectField = forwardRef(function SelectField(\\n props: SelectFieldProps,\\n ref: Ref\\n) {\\n const { ...TextFieldProps } = props;\\n\\n const disabled =\\n TextFieldProps.editable === false || TextFieldProps.status === \\"disabled\\";\\n\\n useImperativeHandle(ref, () => ({}));\\n\\n return (\\n <>\\n \\n \\n \\n \\n \\n >\\n );\\n});\\n\\nimport { SelectField } from \\"../components/SelectField\\";\\n\\nfunction FavoriteNBATeamsScreen() {\\n return (\\n \\n );\\n}\\n\\n (\\n \\n )}\\n/>\\n\\nexport interface SelectFieldProps\\n extends Omit {\\n value?: string[];\\n renderValue?: (value: string[]) => string;\\n onSelect?: (newValue: string[]) => void;\\n multiple?: boolean;\\n options: { label: string; value: string }[];\\n}\\n\\n// ...\\n\\nconst {\\n value = [],\\n renderValue,\\n onSelect,\\n options = [],\\n multiple = true,\\n ...TextFieldProps\\n} = props;\\n\\nconst valueString =\\n renderValue?.(value) ??\\n value\\n .map((v) => options.find((o) => o.value === v)?.label)\\n .filter(Boolean)\\n .join(\\", \\");\\n\\nimport React, { forwardRef, Ref, useImperativeHandle } from \\"react\\";\\nimport { TouchableOpacity, View } from \\"react-native\\";\\n// success-line\\nimport { Icon } from \\"./Icon\\";\\nimport { TextField, TextFieldProps } from \\"./TextField\\";\\n\\nexport interface SelectFieldProps\\n extends Omit {\\n // success-line-start\\n value?: string[];\\n renderValue?: (value: string[]) => string;\\n onSelect?: (newValue: string[]) => void;\\n multiple?: boolean;\\n options: { label: string; value: string }[];\\n // success-line-end\\n}\\nexport interface SelectFieldRef {}\\n\\nexport const SelectField = forwardRef(function SelectField(\\n props: SelectFieldProps,\\n ref: Ref\\n) {\\n const {\\n // success-line-start\\n value = [],\\n onSelect,\\n renderValue,\\n options = [],\\n multiple = true,\\n // success-line-end\\n ...TextFieldProps\\n } = props;\\n\\n const disabled =\\n TextFieldProps.editable === false || TextFieldProps.status === \\"disabled\\";\\n\\n useImperativeHandle(ref, () => ({}));\\n\\n // success-line-start\\n const valueString =\\n renderValue?.(value) ??\\n value\\n .map((v) => options.find((o) => o.value === v)?.label)\\n .filter(Boolean)\\n .join(\\", \\");\\n // success-line-end\\n\\n return (\\n <>\\n \\n \\n (\\n \\n )}\\n // success-line-end\\n />\\n \\n \\n >\\n );\\n});\\n\\nimport { SelectField } from \\"../components/SelectField\\";\\n\\nconst teams = [\\n { label: \\"Hawks\\", value: \\"ATL\\" },\\n { label: \\"Celtics\\", value: \\"BOS\\" },\\n // ...\\n { label: \\"Jazz\\", value: \\"UTA\\" },\\n { label: \\"Wizards\\", value: \\"WAS\\" },\\n];\\n\\n// prettier-ignore\\nfunction FavoriteNBATeamsScreen() {\\n return (\\n <>\\n \\n\\n \\n\\n `Selected ${value.length} Teams`}\\n />\\n >\\n )\\n}\\n\\n//...\\n// success-line\\nimport { BottomSheetModalProvider } from \\"@gorhom/bottom-sheet\\";\\n\\n//...\\n\\nreturn (\\n \\n \\n // success-line\\n \\n \\n // success-line\\n \\n \\n \\n);\\n\\n//...\\n\\n// success-line-start\\nimport {\\n BottomSheetBackdrop,\\n BottomSheetFlatList,\\n BottomSheetFooter,\\n BottomSheetModal,\\n} from \\"@gorhom/bottom-sheet\\";\\n// success-line-end\\nimport React, { forwardRef, Ref, useImperativeHandle, useRef } from \\"react\\";\\nimport { TouchableOpacity, View, ViewStyle } from \\"react-native\\";\\n// success-line\\nimport { useSafeAreaInsets } from \\"react-native-safe-area-context\\";\\n// success-line\\nimport { spacing } from \\"../theme\\";\\n// success-line\\nimport { Button } from \\"./Button\\";\\nimport { Icon } from \\"./Icon\\";\\n// success-line\\nimport { ListItem } from \\"./ListItem\\";\\nimport { TextField, TextFieldProps } from \\"./TextField\\";\\n\\nexport interface SelectFieldProps\\n extends Omit {\\n value?: string[];\\n renderValue?: (value: string[]) => string;\\n onSelect?: (newValue: string[]) => void;\\n multiple?: boolean;\\n options: { label: string; value: string }[];\\n}\\nexport interface SelectFieldRef {\\n // success-line-start\\n presentOptions: () => void;\\n dismissOptions: () => void;\\n // success-line-end\\n}\\n\\nexport const SelectField = forwardRef(function SelectField(\\n props: SelectFieldProps,\\n ref: Ref\\n) {\\n const {\\n value = [],\\n onSelect,\\n renderValue,\\n options = [],\\n multiple = true,\\n ...TextFieldProps\\n } = props;\\n // success-line-start\\n const sheet = useRef(null);\\n const { bottom } = useSafeAreaInsets();\\n // success-line-end\\n\\n const disabled =\\n TextFieldProps.editable === false || TextFieldProps.status === \\"disabled\\";\\n\\n // success-line\\n useImperativeHandle(ref, () => ({ presentOptions, dismissOptions }));\\n\\n const valueString =\\n renderValue?.(value) ??\\n value\\n .map((v) => options.find((o) => o.value === v)?.label)\\n .filter(Boolean)\\n .join(\\", \\");\\n\\n // success-line-start\\n function presentOptions() {\\n if (disabled) return;\\n sheet.current?.present();\\n }\\n\\n function dismissOptions() {\\n sheet.current?.dismiss();\\n }\\n // success-line-end\\n\\n return (\\n <>\\n \\n \\n (\\n \\n )}\\n />\\n \\n \\n\\n {/* success-line-start */}\\n (\\n \\n )}\\n footerComponent={\\n !multiple\\n ? undefined\\n : (props) => (\\n \\n \\n \\n )\\n }\\n >\\n o.value}\\n renderItem={({ item, index }) => (\\n \\n )}\\n />\\n \\n {/* success-line-end */}\\n >\\n );\\n});\\n\\n// success-line-start\\nconst $bottomSheetFooter: ViewStyle = {\\n paddingHorizontal: spacing.lg,\\n};\\n\\nconst $listItem: ViewStyle = {\\n paddingHorizontal: spacing.lg,\\n};\\n// success-line-end\\n\\nimport {\\n BottomSheetBackdrop,\\n BottomSheetFlatList,\\n BottomSheetFooter,\\n BottomSheetModal,\\n} from \\"@gorhom/bottom-sheet\\";\\nimport React, { forwardRef, Ref, useImperativeHandle, useRef } from \\"react\\";\\nimport { TouchableOpacity, View, ViewStyle } from \\"react-native\\";\\nimport { useSafeAreaInsets } from \\"react-native-safe-area-context\\";\\n// success-line\\nimport { colors, spacing } from \\"../theme\\";\\nimport { Button } from \\"./Button\\";\\nimport { Icon } from \\"./Icon\\";\\nimport { ListItem } from \\"./ListItem\\";\\nimport { TextField, TextFieldProps } from \\"./TextField\\";\\n\\nexport interface SelectFieldProps\\n extends Omit {\\n value?: string[];\\n renderValue?: (value: string[]) => string;\\n onSelect?: (newValue: string[]) => void;\\n multiple?: boolean;\\n options: { label: string; value: string }[];\\n}\\nexport interface SelectFieldRef {\\n presentOptions: () => void;\\n dismissOptions: () => void;\\n}\\n\\n// success-line-start\\nfunction without(array: T[], value: T) {\\n return array.filter((v) => v !== value);\\n}\\n// success-line-end\\n\\nexport const SelectField = forwardRef(function SelectField(\\n props: SelectFieldProps,\\n ref: Ref\\n) {\\n const {\\n value = [],\\n onSelect,\\n renderValue,\\n options = [],\\n multiple = true,\\n ...TextFieldProps\\n } = props;\\n const sheet = useRef(null);\\n const { bottom } = useSafeAreaInsets();\\n\\n const disabled =\\n TextFieldProps.editable === false || TextFieldProps.status === \\"disabled\\";\\n\\n useImperativeHandle(ref, () => ({ presentOptions, dismissOptions }));\\n\\n const valueString =\\n renderValue?.(value) ??\\n value\\n .map((v) => options.find((o) => o.value === v)?.label)\\n .filter(Boolean)\\n .join(\\", \\");\\n\\n function presentOptions() {\\n if (disabled) return;\\n\\n sheet.current?.present();\\n }\\n\\n function dismissOptions() {\\n sheet.current?.dismiss();\\n }\\n\\n // success-line-start\\n function updateValue(optionValue: string) {\\n if (value.includes(optionValue)) {\\n onSelect?.(multiple ? without(value, optionValue) : []);\\n } else {\\n onSelect?.(multiple ? [...value, optionValue] : [optionValue]);\\n if (!multiple) dismissOptions();\\n }\\n }\\n // success-line-end\\n\\n return (\\n <>\\n \\n \\n (\\n \\n )}\\n />\\n \\n \\n\\n (\\n \\n )}\\n footerComponent={\\n !multiple\\n ? undefined\\n : (props) => (\\n \\n \\n \\n )\\n }\\n >\\n o.value}\\n renderItem={({ item, index }) => (\\n updateValue(item.value)}\\n // success-line-end\\n />\\n )}\\n />\\n \\n >\\n );\\n});\\n\\nconst $bottomSheetFooter: ViewStyle = {\\n paddingHorizontal: spacing.lg,\\n};\\n\\nconst $listItem: ViewStyle = {\\n paddingHorizontal: spacing.lg,\\n};\\n\\nimport { SelectField } from \\"../components/SelectField\\";\\n\\nconst teams = [\\n { label: \\"Hawks\\", value: \\"ATL\\" },\\n { label: \\"Celtics\\", value: \\"BOS\\" },\\n // ...\\n { label: \\"Jazz\\", value: \\"UTA\\" },\\n { label: \\"Wizards\\", value: \\"WAS\\" },\\n];\\n\\nfunction FavoriteNBATeamsScreen() {\\n const [selectedTeam, setSelectedTeam] = useState([]);\\n const [selectedTeams, setSelectedTeams] = useState([]);\\n\\n return (\\n <>\\n \\n\\n `Selected ${value.length} Teams`}\\n />\\n >\\n );\\n}\\n\\n","lastUpdated":"6 weeks ago","title":"SelectField using `react-native-bottom-sheet`","publish_date":"2023-02-15","doc_name":"SelectFieldWithBottomSheet.mdx"},{"author":"Justin Poliachik","content":"--\\"android\\": \\"npx expo start --android\\",\\n--\\"ios\\": \\"npx expo start --ios\\",\\n++\\"android\\": \\"npx expo run:android\\",\\n++\\"ios\\": \\"npx expo run:ios\\",\\n\\n--\\"android\\": \\"npx expo run:android\\",\\n--\\"ios\\": \\"npx expo run:ios\\",\\n++\\"android\\": \\"npx expo start --android\\",\\n++\\"ios\\": \\"npx expo start --ios\\",\\n\\n\\"@react-native-async-storage/async-storage\\": \\"1.18.2\\",\\n\\"@shopify/flash-list\\": \\"1.4.3\\",\\n\\"expo-application\\": \\"~5.3.0\\",\\n\\"expo-font\\": \\"~11.4.0\\",\\n\\"expo-localization\\": \\"~14.3.0\\",\\n\\"react-native\\": \\"0.72.6\\",\\n\\n","lastUpdated":"5 months ago","title":"Switch Between Expo Go and Expo CNG","publish_date":"2024-01-11","doc_name":"SwitchBetweenExpoGoCNG.md"},{"author":"Frank Calise","content":"import { Thing } from \\"../../../../../components/thing\\";\\n\\nimport { Thing } from \\"~/components/thing\\";\\n\\nyarn add -D babel-plugin-root-import\\n\\n{\\n // ...\\n \\"baseUrl\\": \\"./\\",\\n // the following assumes Ignite\'s app/ structure, however yours may differ\\n \\"paths\\": { \\"~/*\\": [\\"app/*\\"] }\\n}\\n\\n[\\n \\"babel-plugin-root-import\\",\\n {\\n root: __dirname,\\n rootPathPrefix: \\"~/\\",\\n // mapping ~/ to the ./app directory (again, your app structure may differ here)\\n rootPathSuffix: \\"app\\",\\n },\\n],\\n\\nimport { ListItem, Screen, Text } from \\"../../components\\";\\nimport { isRTL } from \\"../../i18n\\";\\nimport { DemoTabScreenProps } from \\"../../navigators/DemoNavigator\\";\\nimport { colors, spacing } from \\"../../theme\\";\\n\\nimport { ListItem, Screen, Text } from \\"~/components\\";\\nimport { isRTL } from \\"~/i18n\\";\\nimport { DemoTabScreenProps } from \\"~/navigators/DemoNavigator\\";\\nimport { colors, spacing } from \\"~/theme\\";\\n\\nyarn expo:start\\n\\nyarn expo:start --clear\\n\\n","lastUpdated":"1 year, 4 months ago","title":"TypeScript baseUrl Configuration","publish_date":"2022-10-24","doc_name":"TypeScriptBaseURL.md"},{"author":"Mark Rickert","content":"import * as React from \'react\';\\nimport { SectionList, SectionListProps, SectionListScrollParams } from \'react-native\';\\n\\ninterface SectionListHandle {\\n scrollToLocation: (params: SectionListScrollParams) => void;\\n}\\n\\n/**\\n * This is a wrapper around react-native\'s SectionList that adds protection against scrolling to an\\n * unknown (not rendered yet) location. This is useful for cases where the user wants to scroll to a\\n * position very far down the list but we haven\'t rendered that far yet.\\n *\\n * This adds onScrollToIndexFailed property to SectionList so that if the scroll fails, we calculate the approximate\\n * scroll position, scroll there, and then try again to get the exact position requested.\\n *\\n * Essentially, it\'s a \\"guess the position and retry the operation\\" strategy until the list is scrolled to the\\n * correct location.\\n */\\nexport const ScrollProtectedSectionList = React.forwardRef<\\n SectionListHandle,\\n SectionListProps\\n>((props, forwardedRef) => {\\n const internalRef = React.useRef(null);\\n const [lastScrollRequest, setLastScrollRequest] = React.useState();\\n const timeout = React.useRef>();\\n\\n const onScrollToIndexFailed = (info: {\\n index: number;\\n highestMeasuredFrameIndex: number;\\n averageItemLength: number;\\n }) => {\\n console.log(\'ScrollProtectedSectionList.onScrollToIndexFailed\', info);\\n\\n // Calculate the possible position of the item and scroll there using the internal scroll responder.\\n const offset = info.averageItemLength * info.index;\\n internalRef.current?.getScrollResponder()?.scrollTo({ x: 0, y: offset, animated: false });\\n\\n // If we know exactly where we want to scroll to, we can just scroll now since the item is likely visible.\\n // Otherwise it\'ll call this function recursively again.\\n if (lastScrollRequest) {\\n timeout.current = setTimeout(() => {\\n internalRef.current?.scrollToLocation(lastScrollRequest);\\n }, 100);\\n }\\n };\\n\\n // Clear the timeout if it still exists when the component unmounts.\\n React.useEffect(() => {\\n return () => timeout.current && clearTimeout(timeout.current);\\n }, []);\\n\\n React.useImperativeHandle(\\n forwardedRef,\\n () => ({\\n scrollToLocation: (params: SectionListScrollParams) => {\\n internalRef.current?.scrollToLocation(params);\\n setLastScrollRequest(params);\\n },\\n }),\\n [internalRef],\\n );\\n\\n return ;\\n});\\n\\n","lastUpdated":"3 days ago","title":"Scrolling to a location that hasn\'t been rendered using FlatList or SectionList","publish_date":"2022-10-09","doc_name":"UnrenderedItemInScrollView.md"},{"author":"Derek Greenberg","content":"yarn audit\\n\\nyarn outdated\\n\\nyarn upgrade-interactive\\nyarn upgrade-interactive --latest\\n\\n","lastUpdated":"4 months ago","title":"Updating Dependencies with Yarn Audit, Outdated and Upgrade","publish_date":"2022-10-09","doc_name":"UpdatingDependencies.md"},{"author":"Lizzi Lindboe","content":"# enable\\nadb shell settings put secure enabled_accessibility_services \\\\\\ncom.google.android.marvin.talkback/com.google.android.marvin.talkback.TalkBackService\\n# disable\\nadb shell settings put secure enabled_accessibility_services \\\\\\ncom.android.talkback/com.google.android.marvin.talkback.TalkBackService\\n\\n","lastUpdated":"1 year, 5 months ago","title":"Using Screen Readers","publish_date":"2022-10-09","doc_name":"UsingScreenReaders.md"},{"author":"Justin Poliachik","content":"npx ignite-cli new ZustandApp --yes\\n\\nyarn add zustand\\n\\nmkdir app/store\\n\\nimport { Instance, SnapshotOut, types } from \\"mobx-state-tree\\";\\n\\nexport const AuthenticationStoreModel = types\\n .model(\\"AuthenticationStore\\")\\n .props({\\n authToken: types.maybe(types.string),\\n authEmail: \\"\\",\\n })\\n .views((store) => ({\\n get isAuthenticated() {\\n return !!store.authToken;\\n },\\n get validationError() {\\n if (store.authEmail.length === 0) return \\"can\'t be blank\\";\\n if (store.authEmail.length < 6) return \\"must be at least 6 characters\\";\\n if (!/^[^\\\\s@]+@[^\\\\s@]+\\\\.[^\\\\s@]+$/.test(store.authEmail)) return \\"must be a valid email address\\";\\n return \\"\\";\\n },\\n }))\\n .actions((store) => ({\\n setAuthToken(value?: string) {\\n store.authToken = value;\\n },\\n setAuthEmail(value: string) {\\n store.authEmail = value.replace(/ /g, \\"\\");\\n },\\n logout() {\\n store.authToken = undefined;\\n store.authEmail = \\"\\";\\n },\\n }));\\n\\nexport interface AuthenticationStore extends Instance {}\\nexport interface AuthenticationStoreSnapshot extends SnapshotOut {}\\n\\nimport { StateCreator } from \\"zustand\\";\\nimport { RootStore } from \\"./RootStore\\";\\n\\n// Typescript interface for this store slice\\nexport interface AuthenticationStore {\\n authToken?: string;\\n authEmail: string;\\n setAuthToken: (value?: string) => void;\\n setAuthEmail: (value: string) => void;\\n logout: () => void;\\n}\\n\\n// create our store slice with default data and actions\\nexport const createAuthenticationSlice: StateCreator = (set) => ({\\n authToken: undefined,\\n authEmail: \\"\\",\\n setAuthToken: (value) => set({ authToken: value }),\\n setAuthEmail: (value) => set({ authEmail: value.replace(/ /g, \\"\\") }),\\n logout: () => set({ authToken: undefined, authEmail: \\"\\" }),\\n});\\n\\n// a selector can be used to grab the full AuthenticationStore\\nexport const authenticationStoreSelector = (state: RootStore) => ({\\n authToken: state.authToken,\\n authEmail: state.authEmail,\\n isAuthenticated: isAuthenticatedSelector(state),\\n setAuthToken: state.setAuthToken,\\n setAuthEmail: state.setAuthEmail,\\n logout: state.logout,\\n});\\n\\n// selectors can also be used for derived values\\nexport const isAuthenticatedSelector = (state: RootStore) => !!state.authToken;\\n\\nexport const validationErrorSelector = (state: RootStore) => {\\n if (state.authEmail.length === 0) return \\"can\'t be blank\\";\\n if (state.authEmail.length < 6) return \\"must be at least 6 characters\\";\\n if (!/^[^\\\\s@]+@[^\\\\s@]+\\\\.[^\\\\s@]+$/.test(state.authEmail)) return \\"must be a valid email address\\";\\n return \\"\\";\\n};\\n\\nimport { Instance, SnapshotOut, types } from \\"mobx-state-tree\\";\\nimport { api } from \\"../services/api\\";\\nimport { Episode, EpisodeModel } from \\"./Episode\\";\\nimport { withSetPropAction } from \\"./helpers/withSetPropAction\\";\\n\\nexport const EpisodeStoreModel = types\\n .model(\\"EpisodeStore\\")\\n .props({\\n episodes: types.array(EpisodeModel),\\n favorites: types.array(types.reference(EpisodeModel)),\\n favoritesOnly: false,\\n })\\n .actions(withSetPropAction)\\n .actions((store) => ({\\n async fetchEpisodes() {\\n const response = await api.getEpisodes();\\n if (response.kind === \\"ok\\") {\\n store.setProp(\\"episodes\\", response.episodes);\\n } else {\\n console.error(`Error fetching episodes: ${JSON.stringify(response)}`);\\n }\\n },\\n addFavorite(episode: Episode) {\\n store.favorites.push(episode);\\n },\\n removeFavorite(episode: Episode) {\\n store.favorites.remove(episode);\\n },\\n }))\\n .views((store) => ({\\n get episodesForList() {\\n return store.favoritesOnly ? store.favorites : store.episodes;\\n },\\n\\n hasFavorite(episode: Episode) {\\n return store.favorites.includes(episode);\\n },\\n }))\\n .actions((store) => ({\\n toggleFavorite(episode: Episode) {\\n if (store.hasFavorite(episode)) {\\n store.removeFavorite(episode);\\n } else {\\n store.addFavorite(episode);\\n }\\n },\\n }));\\n\\nexport interface EpisodeStore extends Instance {}\\nexport interface EpisodeStoreSnapshot extends SnapshotOut {}\\n\\nimport { api } from \\"../services/api\\";\\nimport { Episode } from \\"./Episode\\";\\nimport { StateCreator } from \\"zustand\\";\\nimport { RootStore } from \\"./RootStore\\";\\n\\nexport interface EpisodeStore {\\n episodes: Episode[];\\n favorites: string[];\\n favoritesOnly: boolean;\\n\\n fetchEpisodes: () => Promise;\\n addFavorite: (episode: Episode) => void;\\n removeFavorite: (episode: Episode) => void;\\n toggleFavorite: (episode: Episode) => void;\\n setFavoritesOnly: (value: boolean) => void;\\n}\\n\\nexport const createEpisodeSlice: StateCreator = (set, get) => ({\\n episodes: [],\\n favorites: [],\\n favoritesOnly: false,\\n\\n // Zustand supports async actions\\n fetchEpisodes: async () => {\\n const response = await api.getEpisodes();\\n if (response.kind === \\"ok\\") {\\n set({ episodes: response.episodes });\\n } else {\\n console.error(`Error fetching episodes: ${JSON.stringify(response)}`);\\n }\\n },\\n addFavorite: (episode) => set((state) => ({ favorites: [...state.favorites, episode.guid] })),\\n removeFavorite: (episode) => set((state) => ({ favorites: state.favorites.filter((guid) => guid !== episode.guid) })),\\n toggleFavorite: (episode) => {\\n // get() can be used within actions\\n if (get().favorites.includes(episode.guid)) {\\n get().removeFavorite(episode);\\n } else {\\n get().addFavorite(episode);\\n }\\n },\\n setFavoritesOnly: (value: boolean) => set({ favoritesOnly: value }),\\n});\\n\\nexport const episodeStoreSelector = (state: RootStore) => ({\\n episodes: state.episodes,\\n favorites: state.favorites,\\n favoritesOnly: state.favoritesOnly,\\n\\n // derived values can be included in selectors like this\\n episodesForList: getEpisodesForList(state),\\n\\n fetchEpisodes: state.fetchEpisodes,\\n addFavorite: state.addFavorite,\\n removeFavorite: state.removeFavorite,\\n toggleFavorite: state.toggleFavorite,\\n setFavoritesOnly: state.setFavoritesOnly,\\n\\n // we can also include helper functions that have access to state\\n hasFavorite: (episode: Episode) => {\\n return state.favorites.includes(episode.guid);\\n },\\n});\\n\\nexport const getEpisodesForList = (store: EpisodeStore) => {\\n return store.favoritesOnly ? store.episodes.filter((a) => store.favorites.includes(a.guid)) : store.episodes;\\n};\\n\\nimport { Instance, SnapshotIn, SnapshotOut, types } from \\"mobx-state-tree\\";\\nimport { withSetPropAction } from \\"./helpers/withSetPropAction\\";\\nimport { formatDate } from \\"../utils/formatDate\\";\\nimport { translate } from \\"../i18n\\";\\n\\ninterface Enclosure {\\n link: string;\\n type: string;\\n length: number;\\n duration: number;\\n rating: { scheme: string; value: string };\\n}\\n\\n/**\\n * This represents an episode of React Native Radio.\\n */\\nexport const EpisodeModel = types\\n .model(\\"Episode\\")\\n .props({\\n guid: types.identifier,\\n title: \\"\\",\\n pubDate: \\"\\", // Ex: 2022-08-12 21:05:36\\n link: \\"\\",\\n author: \\"\\",\\n thumbnail: \\"\\",\\n description: \\"\\",\\n content: \\"\\",\\n enclosure: types.frozen(),\\n categories: types.array(types.string),\\n })\\n .actions(withSetPropAction)\\n .views((episode) => ({\\n get parsedTitleAndSubtitle() {\\n const defaultValue = { title: episode.title?.trim(), subtitle: \\"\\" };\\n\\n if (!defaultValue.title) return defaultValue;\\n\\n const titleMatches = defaultValue.title.match(/^(RNR.*\\\\d)(?: - )(.*$)/);\\n\\n if (!titleMatches || titleMatches.length !== 3) return defaultValue;\\n\\n return { title: titleMatches[1], subtitle: titleMatches[2] };\\n },\\n get datePublished() {\\n try {\\n const formatted = formatDate(episode.pubDate);\\n return {\\n textLabel: formatted,\\n accessibilityLabel: translate(\\"demoPodcastListScreen.accessibility.publishLabel\\", {\\n date: formatted,\\n }),\\n };\\n } catch (error) {\\n return { textLabel: \\"\\", accessibilityLabel: \\"\\" };\\n }\\n },\\n get duration() {\\n const seconds = Number(episode.enclosure.duration);\\n const h = Math.floor(seconds / 3600);\\n const m = Math.floor((seconds % 3600) / 60);\\n const s = Math.floor((seconds % 3600) % 60);\\n\\n const hDisplay = h > 0 ? `${h}:` : \\"\\";\\n const mDisplay = m > 0 ? `${m}:` : \\"\\";\\n const sDisplay = s > 0 ? s : \\"\\";\\n return {\\n textLabel: hDisplay + mDisplay + sDisplay,\\n accessibilityLabel: translate(\\"demoPodcastListScreen.accessibility.durationLabel\\", {\\n hours: h,\\n minutes: m,\\n seconds: s,\\n }),\\n };\\n },\\n }));\\n\\nexport interface Episode extends Instance {}\\nexport interface EpisodeSnapshotOut extends SnapshotOut {}\\nexport interface EpisodeSnapshotIn extends SnapshotIn {}\\n\\nimport { formatDate } from \\"../utils/formatDate\\";\\nimport { translate } from \\"../i18n\\";\\n\\ninterface Enclosure {\\n link: string;\\n type: string;\\n length: number;\\n duration: number;\\n rating: { scheme: string; value: string };\\n}\\n\\nexport type Episode = {\\n guid: string;\\n title: string;\\n pubDate: string;\\n link: string;\\n author: string;\\n thumbnail: string;\\n description: string;\\n content: string;\\n enclosure: Enclosure;\\n categories: string[];\\n};\\n\\nexport const getParsedTitleAndSubtitle = (episode: Episode) => {\\n const defaultValue = { title: episode.title?.trim(), subtitle: \\"\\" };\\n\\n if (!defaultValue.title) return defaultValue;\\n\\n const titleMatches = defaultValue.title.match(/^(RNR.*\\\\d)(?: - )(.*$)/);\\n\\n if (!titleMatches || titleMatches.length !== 3) return defaultValue;\\n\\n return { title: titleMatches[1], subtitle: titleMatches[2] };\\n};\\n\\nexport const getDatePublished = (episode: Episode) => {\\n try {\\n const formatted = formatDate(episode.pubDate);\\n return {\\n textLabel: formatted,\\n accessibilityLabel: translate(\\"demoPodcastListScreen.accessibility.publishLabel\\", {\\n date: formatted,\\n }),\\n };\\n } catch (error) {\\n return { textLabel: \\"\\", accessibilityLabel: \\"\\" };\\n }\\n};\\n\\nexport const getDuration = (episode: Episode) => {\\n const seconds = Number(episode.enclosure.duration);\\n const h = Math.floor(seconds / 3600);\\n const m = Math.floor((seconds % 3600) / 60);\\n const s = Math.floor((seconds % 3600) % 60);\\n\\n const hDisplay = h > 0 ? `${h}:` : \\"\\";\\n const mDisplay = m > 0 ? `${m}:` : \\"\\";\\n const sDisplay = s > 0 ? s : \\"\\";\\n return {\\n textLabel: hDisplay + mDisplay + sDisplay,\\n accessibilityLabel: translate(\\"demoPodcastListScreen.accessibility.durationLabel\\", {\\n hours: h,\\n minutes: m,\\n seconds: s,\\n }),\\n };\\n};\\n\\nimport { create } from \\"zustand\\";\\nimport { useShallow } from \\"zustand/react/shallow\\";\\nimport { AuthenticationStore, authenticationStoreSelector, createAuthenticationSlice } from \\"./AuthenticationStore\\";\\nimport { EpisodeStore, createEpisodeSlice, episodeStoreSelector } from \\"./EpisodeStore\\";\\n\\nexport interface RootStore extends AuthenticationStore, EpisodeStore {}\\n\\nexport const useStore = create()((...a) => ({\\n ...createAuthenticationSlice(...a),\\n ...createEpisodeSlice(...a),\\n // add your state slices here\\n}));\\n\\n// optional: custom hooks can be used to pick pieces from state\\n// useShallow is used to help prevent unnecessary rerenders\\nexport const useAuthenticationStore = () => useStore(useShallow(authenticationStoreSelector));\\nexport const useEpisodeStore = () => useStore(useShallow(episodeStoreSelector));\\n\\nexport * from \\"./RootStore\\";\\nexport * from \\"./AuthenticationStore\\";\\nexport * from \\"./EpisodeStore\\";\\nexport * from \\"./Episode\\";\\n\\nimport { useStore, isAuthenticatedSelector } from \\"app/store\\";\\n\\nconst AppStack = () => {\\n\\n // use a selector to pick only that value\\n const isAuthenticated = useStore(isAuthenticatedSelector)\\n\\n return (\\n \\n-- episodeStore.setProp(\\"favoritesOnly\\", !episodeStore.favoritesOnly)\\n++ episodeStore.setFavoritesOnly(!episodeStore.favoritesOnly)\\n }\\n\\n\\nconst datePublished = getDatePublished(episode);\\nconst duration = getDuration(episode);\\nconst parsedTitleAndSubtitle = getParsedTitleAndSubtitle(episode);\\n\\n \\n--{episode.datePublished.textLabel}\\n++{datePublished.textLabel}\\n\\n\\n++import { useStore } from \\"app/store\\"\\n\\n--const {\\n-- authenticationStore: { logout },\\n--} = useStores()\\n++const logout = useStore((state) => state.logout)\\n\\n++import { useStore } from \\"app/store\\"\\n\\n--const {\\n-- authenticationStore: { logout },\\n--} = useStores()\\n++const logout = useStore((state) => state.logout)\\n\\n+import { Episode } from \\"app/store/Episode\\";\\n\\n-const episodes: EpisodeSnapshotIn[] =\\n+const episodes: Episode[] =\\n\\nimport { create } from \\"zustand\\";\\nimport { useShallow } from \\"zustand/react/shallow\\";\\nimport { persist, createJSONStorage } from \\"zustand/middleware\\";\\n\\nimport { AuthenticationStore, authenticationStoreSelector, createAuthenticationSlice } from \\"./AuthenticationStore\\";\\nimport { EpisodeStore, createEpisodeSlice, episodeStoreSelector } from \\"./EpisodeStore\\";\\nimport AsyncStorage from \\"@react-native-async-storage/async-storage\\";\\n\\nexport interface RootStore extends AuthenticationStore, EpisodeStore {\\n _hasHydrated: boolean;\\n setHasHydrated: (state: boolean) => void;\\n}\\n\\nexport const useStore = create()(\\n persist(\\n (...a) => ({\\n ...createAuthenticationSlice(...a),\\n ...createEpisodeSlice(...a),\\n // add your state slices here\\n\\n _hasHydrated: false,\\n setHasHydrated: (state) => {\\n const set = a[0];\\n set({\\n _hasHydrated: state,\\n });\\n },\\n }),\\n {\\n name: \\"zustand-app\\",\\n storage: createJSONStorage(() => AsyncStorage),\\n onRehydrateStorage: () => (state) => {\\n state?.setHasHydrated(true);\\n },\\n }\\n )\\n);\\n\\nexport const useAuthenticationStore = () => useStore(useShallow(authenticationStoreSelector));\\nexport const useEpisodeStore = () => useStore(useShallow(episodeStoreSelector));\\n\\n+import { useStore } from \\"./store\\"\\n\\n...\\n\\nconst [areFontsLoaded] = useFonts(customFontsToLoad)\\n\\n-useEffect(() => {\\n- hideSplashScreen()\\n-}, [])\\n\\n+const hasHydrated = useStore((state) => state._hasHydrated)\\n+useEffect(() => {\\n+ if (hasHydrated) {\\n+ setTimeout(hideSplashScreen, 500)\\n+ }\\n+}, [hasHydrated])\\n\\n-if (!isNavigationStateRestored || !areFontsLoaded) return null\\n+if (!hasHydrated || !isNavigationStateRestored || !areFontsLoaded) return null\\n\\n\\n","lastUpdated":"3 days ago","title":"Zustand","publish_date":"2024-02-05","doc_name":"Zustand.md"}]}},"docusaurus-plugin-content-docs":{"default":{"path":"/docs","versions":[{"name":"current","label":"Next","isLast":true,"path":"/docs","mainDocId":"intro","docs":[{"id":"archive/index","path":"/docs/archive/","sidebar":"mainSidebar"},{"id":"archive/PristineExpoProject","path":"/docs/archive/PristineExpoProject","sidebar":"mainSidebar"},{"id":"intro","path":"/docs/intro","sidebar":"mainSidebar"},{"id":"recipes/AccessibilityFontSizes","path":"/docs/recipes/AccessibilityFontSizes","sidebar":"mainSidebar"},{"id":"recipes/Authentication","path":"/docs/recipes/Authentication","sidebar":"mainSidebar"},{"id":"recipes/CircleCIRNSetup","path":"/docs/recipes/CircleCIRNSetup","sidebar":"mainSidebar"},{"id":"recipes/CreatingGreateExperienceForScreenReaders","path":"/docs/recipes/CreatingGreateExperienceForScreenReaders","sidebar":"mainSidebar"},{"id":"recipes/CustomVectorIcons","path":"/docs/recipes/CustomVectorIcons","sidebar":"mainSidebar"},{"id":"recipes/DetoxIntro","path":"/docs/recipes/DetoxIntro","sidebar":"mainSidebar"},{"id":"recipes/DistributingAuthTokenToAPI","path":"/docs/recipes/DistributingAuthTokenToAPI","sidebar":"mainSidebar"},{"id":"recipes/EASUpdate","path":"/docs/recipes/EASUpdate","sidebar":"mainSidebar"},{"id":"recipes/EnforcingImportOrder","path":"/docs/recipes/EnforcingImportOrder","sidebar":"mainSidebar"},{"id":"recipes/EnvironmentVariables","path":"/docs/recipes/EnvironmentVariables","sidebar":"mainSidebar"},{"id":"recipes/ExpoRouter","path":"/docs/recipes/ExpoRouter","sidebar":"mainSidebar"},{"id":"recipes/GeneratorComponentTests","path":"/docs/recipes/GeneratorComponentTests","sidebar":"mainSidebar"},{"id":"recipes/LocalFirstDataWithPowerSync","path":"/docs/recipes/LocalFirstDataWithPowerSync","sidebar":"mainSidebar"},{"id":"recipes/MaestroSetup","path":"/docs/recipes/MaestroSetup","sidebar":"mainSidebar"},{"id":"recipes/MigratingToMMKV","path":"/docs/recipes/MigratingToMMKV","sidebar":"mainSidebar"},{"id":"recipes/PatchingBuildingAndroid","path":"/docs/recipes/PatchingBuildingAndroid","sidebar":"mainSidebar"},{"id":"recipes/PrepForEASBuild","path":"/docs/recipes/PrepForEASBuild","sidebar":"mainSidebar"},{"id":"recipes/ReactNativeVisionCamera","path":"/docs/recipes/ReactNativeVisionCamera","sidebar":"mainSidebar"},{"id":"recipes/Redux","path":"/docs/recipes/Redux","sidebar":"mainSidebar"},{"id":"recipes/RemoveMobxStateTree","path":"/docs/recipes/RemoveMobxStateTree","sidebar":"mainSidebar"},{"id":"recipes/RequiringHardwareFeaturesWithExpo","path":"/docs/recipes/RequiringHardwareFeaturesWithExpo","sidebar":"mainSidebar"},{"id":"recipes/SampleYAMLCircleCI","path":"/docs/recipes/SampleYAMLCircleCI","sidebar":"mainSidebar"},{"id":"recipes/SelectFieldWithBottomSheet","path":"/docs/recipes/SelectFieldWithBottomSheet","sidebar":"mainSidebar"},{"id":"recipes/SwitchBetweenExpoGoCNG","path":"/docs/recipes/SwitchBetweenExpoGoCNG","sidebar":"mainSidebar"},{"id":"recipes/TypeScriptBaseURL","path":"/docs/recipes/TypeScriptBaseURL","sidebar":"mainSidebar"},{"id":"recipes/UnrenderedItemInScrollView","path":"/docs/recipes/UnrenderedItemInScrollView","sidebar":"mainSidebar"},{"id":"recipes/UpdatingDependencies","path":"/docs/recipes/UpdatingDependencies","sidebar":"mainSidebar"},{"id":"recipes/UpdatingIgnite","path":"/docs/recipes/UpdatingIgnite","sidebar":"mainSidebar"},{"id":"recipes/UsingScreenReaders","path":"/docs/recipes/UsingScreenReaders","sidebar":"mainSidebar"},{"id":"recipes/Zustand","path":"/docs/recipes/Zustand","sidebar":"mainSidebar"}],"draftIds":[],"sidebars":{"mainSidebar":{"link":{"path":"/docs/intro","label":"intro"}}}}],"breadcrumbs":true}}}'),s=JSON.parse('{"defaultLocale":"en","locales":["en"],"path":"i18n","currentLocale":"en","localeConfigs":{"en":{"label":"English","direction":"ltr","htmlLang":"en","calendar":"gregory","path":"en"}}}');var i=t(144);const l=JSON.parse('{"docusaurusVersion":"3.1.1","siteVersion":"0.0.0","pluginVersions":{"docusaurus-plugin-content-docs":{"type":"package","name":"@docusaurus/plugin-content-docs","version":"3.1.1"},"docusaurus-plugin-content-pages":{"type":"package","name":"@docusaurus/plugin-content-pages","version":"3.1.1"},"docusaurus-plugin-google-gtag":{"type":"package","name":"@docusaurus/plugin-google-gtag","version":"3.1.1"},"docusaurus-plugin-sitemap":{"type":"package","name":"@docusaurus/plugin-sitemap","version":"3.1.1"},"docusaurus-theme-classic":{"type":"package","name":"@docusaurus/theme-classic","version":"3.1.1"},"docusaurus-theme-search-algolia":{"type":"package","name":"@docusaurus/theme-search-algolia","version":"3.1.1"},"example-code-snippets":{"type":"local"}}}');var c=t(7624);const u={siteConfig:o.default,siteMetadata:l,globalData:a,i18n:s,codeTranslations:i},d=r.createContext(u);function p(e){let{children:n}=e;return(0,c.jsx)(d.Provider,{value:u,children:n})}},5852:(e,n,t)=>{"use strict";t.d(n,{c:()=>f});var r=t(1504),o=t(8684),a=t(6952),s=t(5684),i=t(7468),l=t(7624);function c(e){let{error:n,tryAgain:t}=e;return(0,l.jsxs)("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"flex-start",minHeight:"100vh",width:"100%",maxWidth:"80ch",fontSize:"20px",margin:"0 auto",padding:"1rem"},children:[(0,l.jsx)("h1",{style:{fontSize:"3rem"},children:"This page crashed"}),(0,l.jsx)("button",{type:"button",onClick:t,style:{margin:"1rem 0",fontSize:"2rem",cursor:"pointer",borderRadius:20,padding:"1rem"},children:"Try again"}),(0,l.jsx)(u,{error:n})]})}function u(e){let{error:n}=e;const t=(0,s.getErrorCausalChain)(n).map((e=>e.message)).join("\n\nCause:\n");return(0,l.jsx)("p",{style:{whiteSpace:"pre-wrap"},children:t})}function d(e){let{error:n,tryAgain:t}=e;return(0,l.jsxs)(f,{fallback:()=>(0,l.jsx)(c,{error:n,tryAgain:t}),children:[(0,l.jsx)(a.c,{children:(0,l.jsx)("title",{children:"Page Error"})}),(0,l.jsx)(i.c,{children:(0,l.jsx)(c,{error:n,tryAgain:t})})]})}const p=e=>(0,l.jsx)(d,{...e});class f extends r.Component{constructor(e){super(e),this.state={error:null}}componentDidCatch(e){o.c.canUseDOM&&this.setState({error:e})}render(){const{children:e}=this.props,{error:n}=this.state;if(n){const e={error:n,tryAgain:()=>this.setState({error:null})};return(this.props.fallback??p)(e)}return e??null}}},8684:(e,n,t)=>{"use strict";t.d(n,{c:()=>o});const r="undefined"!=typeof window&&"document"in window&&"createElement"in window.document,o={canUseDOM:r,canUseEventListeners:r&&("addEventListener"in window||"attachEvent"in window),canUseIntersectionObserver:r&&"IntersectionObserver"in window,canUseViewport:r&&"screen"in window}},6952:(e,n,t)=>{"use strict";t.d(n,{c:()=>a});t(1504);var r=t(2160),o=t(7624);function a(e){return(0,o.jsx)(r.So,{...e})}},867:(e,n,t)=>{"use strict";t.d(n,{c:()=>f});var r=t(1504),o=t(440),a=t(5684),s=t(8264),i=t(8136),l=t(8684),c=t(5976),u=t(964),d=t(7624);function p(e,n){let{isNavLink:t,to:p,href:f,activeClassName:m,isActive:g,"data-noBrokenLinkCheck":h,autoAddBaseUrl:y=!0,...b}=e;const{siteConfig:{trailingSlash:v,baseUrl:S}}=(0,s.c)(),{withBaseUrl:w}=(0,u.E)(),x=(0,c.c)(),k=(0,r.useRef)(null);(0,r.useImperativeHandle)(n,(()=>k.current));const T=p||f;const E=(0,i.c)(T),C=T?.replace("pathname://","");let A=void 0!==C?(I=C,y&&(e=>e.startsWith("/"))(I)?w(I):I):void 0;var I;A&&E&&(A=(0,a.applyTrailingSlash)(A,{trailingSlash:v,baseUrl:S}));const _=(0,r.useRef)(!1),P=t?o.Af:o.cH,L=l.c.canUseIntersectionObserver,R=(0,r.useRef)(),O=()=>{_.current||null==A||(window.docusaurus.preload(A),_.current=!0)};(0,r.useEffect)((()=>(!L&&E&&null!=A&&window.docusaurus.prefetch(A),()=>{L&&R.current&&R.current.disconnect()})),[R,A,L,E]);const F=A?.startsWith("#")??!1,N=!b.target||"_self"===b.target,j=!A||!E||!N||F;return h||!F&&j||x.collectLink(A),b.id&&x.collectAnchor(b.id),j?(0,d.jsx)("a",{ref:k,href:A,...T&&!E&&{target:"_blank",rel:"noopener noreferrer"},...b}):(0,d.jsx)(P,{...b,onMouseEnter:O,onTouchStart:O,innerRef:e=>{k.current=e,L&&e&&E&&(R.current=new window.IntersectionObserver((n=>{n.forEach((n=>{e===n.target&&(n.isIntersecting||n.intersectionRatio>0)&&(R.current.unobserve(e),R.current.disconnect(),null!=A&&window.docusaurus.prefetch(A))}))})),R.current.observe(e))},to:A,...t&&{isActive:g,activeClassName:m}})}const f=r.forwardRef(p)},4357:(e,n,t)=>{"use strict";t.d(n,{c:()=>c,G:()=>l});var r=t(1504),o=t(7624);function a(e,n){const t=e.split(/(\{\w+\})/).map(((e,t)=>{if(t%2==1){const t=n?.[e.slice(1,-1)];if(void 0!==t)return t}return e}));return t.some((e=>(0,r.isValidElement)(e)))?t.map(((e,n)=>(0,r.isValidElement)(e)?r.cloneElement(e,{key:n}):e)).filter((e=>""!==e)):t.join("")}var s=t(144);function i(e){let{id:n,message:t}=e;if(void 0===n&&void 0===t)throw new Error("Docusaurus translation declarations must have at least a translation id or a default translation message");return s[n??t]??t??n}function l(e,n){let{message:t,id:r}=e;return a(i({message:t,id:r}),n)}function c(e){let{children:n,id:t,values:r}=e;if(n&&"string"!=typeof n)throw console.warn("Illegal children",n),new Error("The Docusaurus component only accept simple string values");const s=i({message:n,id:t});return(0,o.jsx)(o.Fragment,{children:a(s,r)})}},2488:(e,n,t)=>{"use strict";t.d(n,{M:()=>r});const r="default"},8136:(e,n,t)=>{"use strict";function r(e){return/^(?:\w*:|\/\/)/.test(e)}function o(e){return void 0!==e&&!r(e)}t.d(n,{_:()=>r,c:()=>o})},964:(e,n,t)=>{"use strict";t.d(n,{E:()=>s,c:()=>i});var r=t(1504),o=t(8264),a=t(8136);function s(){const{siteConfig:{baseUrl:e,url:n}}=(0,o.c)(),t=(0,r.useCallback)(((t,r)=>function(e,n,t,r){let{forcePrependBaseUrl:o=!1,absolute:s=!1}=void 0===r?{}:r;if(!t||t.startsWith("#")||(0,a._)(t))return t;if(o)return n+t.replace(/^\//,"");if(t===n.replace(/\/$/,""))return n;const i=t.startsWith(n)?t:n+t.replace(/^\//,"");return s?e+i:i}(n,e,t,r)),[n,e]);return{withBaseUrl:t}}function i(e,n){void 0===n&&(n={});const{withBaseUrl:t}=s();return t(e,n)}},5976:(e,n,t)=>{"use strict";t.d(n,{c:()=>s});var r=t(1504);t(7624);const o=r.createContext({collectAnchor:()=>{},collectLink:()=>{}}),a=()=>(0,r.useContext)(o);function s(){return a()}},8264:(e,n,t)=>{"use strict";t.d(n,{c:()=>a});var r=t(1504),o=t(136);function a(){return(0,r.useContext)(o.e)}},3160:(e,n,t)=>{"use strict";t.d(n,{MP:()=>s,mm:()=>a});var r=t(8264),o=t(2488);function a(e,n){void 0===n&&(n={});const t=function(){const{globalData:e}=(0,r.c)();return e}()[e];if(!t&&n.failfast)throw new Error(`Docusaurus plugin global data not found for "${e}" plugin.`);return t}function s(e,n,t){void 0===n&&(n=o.M),void 0===t&&(t={});const r=a(e),s=r?.[n];if(!s&&t.failfast)throw new Error(`Docusaurus plugin global data not found for "${e}" plugin with id "${n}".`);return s}},3664:(e,n,t)=>{"use strict";t.d(n,{c:()=>a});var r=t(1504),o=t(240);function a(){return(0,r.useContext)(o.e)}},5288:(e,n,t)=>{"use strict";t.d(n,{c:()=>o});var r=t(1504);const o=t(8684).c.canUseDOM?r.useLayoutEffect:r.useEffect},8120:(e,n,t)=>{"use strict";t.d(n,{c:()=>o});const r=e=>"object"==typeof e&&!!e&&Object.keys(e).length>0;function o(e){const n={};return function e(t,o){Object.entries(t).forEach((t=>{let[a,s]=t;const i=o?`${o}.${a}`:a;r(s)?e(s,i):n[i]=s}))}(e),n}},5548:(e,n,t)=>{"use strict";t.d(n,{Y:()=>s,e:()=>a});var r=t(1504),o=t(7624);const a=r.createContext(null);function s(e){let{children:n,value:t}=e;const s=r.useContext(a),i=(0,r.useMemo)((()=>function(e){let{parent:n,value:t}=e;if(!n){if(!t)throw new Error("Unexpected: no Docusaurus route context found");if(!("plugin"in t))throw new Error("Unexpected: Docusaurus topmost route context has no `plugin` attribute");return t}const r={...n.data,...t?.data};return{plugin:n.plugin,data:r}}({parent:s,value:t})),[s,t]);return(0,o.jsx)(a.Provider,{value:i,children:n})}},5172:(e,n,t)=>{"use strict";t.d(n,{wB:()=>g,UF:()=>d,mU:()=>p,L0:()=>c,i8:()=>h,OK:()=>u,aA:()=>m,gN:()=>f});var r=t(5592),o=t(3160);const a=e=>e.versions.find((e=>e.isLast));function s(e,n){const t=a(e);return[...e.versions.filter((e=>e!==t)),t].find((e=>!!(0,r.ot)(n,{path:e.path,exact:!1,strict:!1})))}function i(e,n){const t=s(e,n),o=t?.docs.find((e=>!!(0,r.ot)(n,{path:e.path,exact:!0,strict:!1})));return{activeVersion:t,activeDoc:o,alternateDocVersions:o?function(n){const t={};return e.versions.forEach((e=>{e.docs.forEach((r=>{r.id===n&&(t[e.name]=r)}))})),t}(o.id):{}}}const l={},c=()=>(0,o.mm)("docusaurus-plugin-content-docs")??l,u=e=>(0,o.MP)("docusaurus-plugin-content-docs",e,{failfast:!0});function d(e){void 0===e&&(e={});const n=c(),{pathname:t}=(0,r.IT)();return function(e,n,t){void 0===t&&(t={});const o=Object.entries(e).sort(((e,n)=>n[1].path.localeCompare(e[1].path))).find((e=>{let[,t]=e;return!!(0,r.ot)(n,{path:t.path,exact:!1,strict:!1})})),a=o?{pluginId:o[0],pluginData:o[1]}:void 0;if(!a&&t.failfast)throw new Error(`Can't find active docs plugin for "${n}" pathname, while it was expected to be found. Maybe you tried to use a docs feature that can only be used on a docs-related page? Existing docs plugin paths are: ${Object.values(e).map((e=>e.path)).join(", ")}`);return a}(n,t,e)}function p(e){void 0===e&&(e={});const n=d(e),{pathname:t}=(0,r.IT)();if(!n)return;return{activePlugin:n,activeVersion:s(n.pluginData,t)}}function f(e){return u(e).versions}function m(e){const n=u(e);return a(n)}function g(e){const n=u(e),{pathname:t}=(0,r.IT)();return i(n,t)}function h(e){const n=u(e),{pathname:t}=(0,r.IT)();return function(e,n){const t=a(e);return{latestDocSuggestion:i(e,n).alternateDocVersions[t.name],latestVersionSuggestion:t}}(n,t)}},7483:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>r});const r={onRouteDidUpdate(e){let{location:n,previousLocation:t}=e;!t||n.pathname===t.pathname&&n.search===t.search&&n.hash===t.hash||setTimeout((()=>{window.gtag("set","page_path",n.pathname+n.search+n.hash),window.gtag("event","page_view")}))}}},1976:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>a});var r=t(2272),o=t.n(r);o().configure({showSpinner:!1});const a={onRouteUpdate(e){let{location:n,previousLocation:t}=e;if(t&&n.pathname!==t.pathname){const e=window.setTimeout((()=>{o().start()}),200);return()=>window.clearTimeout(e)}},onRouteDidUpdate(){o().done()}}},5396:(e,n,t)=>{"use strict";t.r(n);var r=t(5720),o=t(7768);!function(e){const{themeConfig:{prism:n}}=o.default,{additionalLanguages:r}=n;globalThis.Prism=e,r.forEach((e=>{"php"===e&&t(1808),t(4096)(`./prism-${e}`)})),delete globalThis.Prism}(r.sp)},6448:(e,n,t)=>{"use strict";t.d(n,{c:()=>u});t(1504);var r=t(5456),o=t(4357),a=t(1824),s=t(867),i=t(5976);const l={anchorWithStickyNavbar:"anchorWithStickyNavbar_LWe7",anchorWithHideOnScrollNavbar:"anchorWithHideOnScrollNavbar_WYt5"};var c=t(7624);function u(e){let{as:n,id:t,...u}=e;const d=(0,i.c)(),{navbar:{hideOnScroll:p}}=(0,a.y)();if("h1"===n||!t)return(0,c.jsx)(n,{...u,id:void 0});d.collectAnchor(t);const f=(0,o.G)({id:"theme.common.headingLinkTitle",message:"Direct link to {heading}",description:"Title for link to heading"},{heading:"string"==typeof u.children?u.children:t});return(0,c.jsxs)(n,{...u,className:(0,r.c)("anchor",p?l.anchorWithHideOnScrollNavbar:l.anchorWithStickyNavbar,u.className),id:t,children:[u.children,(0,c.jsx)(s.c,{className:"hash-link",to:`#${t}`,"aria-label":f,title:f,children:"\u200b"})]})}},3232:(e,n,t)=>{"use strict";t.d(n,{c:()=>a});t(1504);const r={iconExternalLink:"iconExternalLink_nPIU"};var o=t(7624);function a(e){let{width:n=13.5,height:t=13.5}=e;return(0,o.jsx)("svg",{width:n,height:t,"aria-hidden":"true",viewBox:"0 0 24 24",className:r.iconExternalLink,children:(0,o.jsx)("path",{fill:"currentColor",d:"M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"})})}},7468:(e,n,t)=>{"use strict";t.d(n,{c:()=>On});var r=t(1504),o=t(5456),a=t(5852),s=t(5008),i=t(5592),l=t(4357),c=t(7124),u=t(7624);const d="__docusaurus_skipToContent_fallback";function p(e){e.setAttribute("tabindex","-1"),e.focus(),e.removeAttribute("tabindex")}function f(){const e=(0,r.useRef)(null),{action:n}=(0,i.Uz)(),t=(0,r.useCallback)((e=>{e.preventDefault();const n=document.querySelector("main:first-of-type")??document.getElementById(d);n&&p(n)}),[]);return(0,c.c)((t=>{let{location:r}=t;e.current&&!r.hash&&"PUSH"===n&&p(e.current)})),{containerRef:e,onClick:t}}const m=(0,l.G)({id:"theme.common.skipToMainContent",description:"The skip to content label used for accessibility, allowing to rapidly navigate to main content with keyboard tab/enter navigation",message:"Skip to main content"});function g(e){const n=e.children??m,{containerRef:t,onClick:r}=f();return(0,u.jsx)("div",{ref:t,role:"region","aria-label":m,children:(0,u.jsx)("a",{...e,href:`#${d}`,onClick:r,children:n})})}var h=t(5864),y=t(204);const b={skipToContent:"skipToContent_fXgn"};function v(){return(0,u.jsx)(g,{className:b.skipToContent})}var S=t(1824),w=t(3868);function x(e){let{width:n=21,height:t=21,color:r="currentColor",strokeWidth:o=1.2,className:a,...s}=e;return(0,u.jsx)("svg",{viewBox:"0 0 15 15",width:n,height:t,...s,children:(0,u.jsx)("g",{stroke:r,strokeWidth:o,children:(0,u.jsx)("path",{d:"M.75.75l13.5 13.5M14.25.75L.75 14.25"})})})}const k={closeButton:"closeButton_CVFx"};function T(e){return(0,u.jsx)("button",{type:"button","aria-label":(0,l.G)({id:"theme.AnnouncementBar.closeButtonAriaLabel",message:"Close",description:"The ARIA label for close button of announcement bar"}),...e,className:(0,o.c)("clean-btn close",k.closeButton,e.className),children:(0,u.jsx)(x,{width:14,height:14,strokeWidth:3.1})})}const E={content:"content_knG7"};function C(e){const{announcementBar:n}=(0,S.y)(),{content:t}=n;return(0,u.jsx)("div",{...e,className:(0,o.c)(E.content,e.className),dangerouslySetInnerHTML:{__html:t}})}const A={announcementBar:"announcementBar_mb4j",announcementBarPlaceholder:"announcementBarPlaceholder_vyr4",announcementBarClose:"announcementBarClose_gvF7",announcementBarContent:"announcementBarContent_xLdY"};function I(){const{announcementBar:e}=(0,S.y)(),{isActive:n,close:t}=(0,w.el)();if(!n)return null;const{backgroundColor:r,textColor:o,isCloseable:a}=e;return(0,u.jsxs)("div",{className:A.announcementBar,style:{backgroundColor:r,color:o},role:"banner",children:[a&&(0,u.jsx)("div",{className:A.announcementBarPlaceholder}),(0,u.jsx)(C,{className:A.announcementBarContent}),a&&(0,u.jsx)(T,{onClick:t,className:A.announcementBarClose})]})}var _=t(8200),P=t(3943);var L=t(1100),R=t(5168);const O=r.createContext(null);function F(e){let{children:n}=e;const t=function(){const e=(0,_.q)(),n=(0,R.MF)(),[t,o]=(0,r.useState)(!1),a=null!==n.component,s=(0,L.i0)(a);return(0,r.useEffect)((()=>{a&&!s&&o(!0)}),[a,s]),(0,r.useEffect)((()=>{a?e.shown||o(!0):o(!1)}),[e.shown,a]),(0,r.useMemo)((()=>[t,o]),[t])}();return(0,u.jsx)(O.Provider,{value:t,children:n})}function N(e){if(e.component){const n=e.component;return(0,u.jsx)(n,{...e.props})}}function j(){const e=(0,r.useContext)(O);if(!e)throw new L.AH("NavbarSecondaryMenuDisplayProvider");const[n,t]=e,o=(0,r.useCallback)((()=>t(!1)),[t]),a=(0,R.MF)();return(0,r.useMemo)((()=>({shown:n,hide:o,content:N(a)})),[o,a,n])}function D(e){let{header:n,primaryMenu:t,secondaryMenu:r}=e;const{shown:a}=j();return(0,u.jsxs)("div",{className:"navbar-sidebar",children:[n,(0,u.jsxs)("div",{className:(0,o.c)("navbar-sidebar__items",{"navbar-sidebar__items--show-secondary":a}),children:[(0,u.jsx)("div",{className:"navbar-sidebar__item menu",children:t}),(0,u.jsx)("div",{className:"navbar-sidebar__item menu",children:r})]})]})}var M=t(6528),B=t(3664);function $(e){return(0,u.jsx)("svg",{viewBox:"0 0 24 24",width:24,height:24,...e,children:(0,u.jsx)("path",{fill:"currentColor",d:"M12,9c1.65,0,3,1.35,3,3s-1.35,3-3,3s-3-1.35-3-3S10.35,9,12,9 M12,7c-2.76,0-5,2.24-5,5s2.24,5,5,5s5-2.24,5-5 S14.76,7,12,7L12,7z M2,13l2,0c0.55,0,1-0.45,1-1s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S1.45,13,2,13z M20,13l2,0c0.55,0,1-0.45,1-1 s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S19.45,13,20,13z M11,2v2c0,0.55,0.45,1,1,1s1-0.45,1-1V2c0-0.55-0.45-1-1-1S11,1.45,11,2z M11,20v2c0,0.55,0.45,1,1,1s1-0.45,1-1v-2c0-0.55-0.45-1-1-1C11.45,19,11,19.45,11,20z M5.99,4.58c-0.39-0.39-1.03-0.39-1.41,0 c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0s0.39-1.03,0-1.41L5.99,4.58z M18.36,16.95 c-0.39-0.39-1.03-0.39-1.41,0c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0c0.39-0.39,0.39-1.03,0-1.41 L18.36,16.95z M19.42,5.99c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06c-0.39,0.39-0.39,1.03,0,1.41 s1.03,0.39,1.41,0L19.42,5.99z M7.05,18.36c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06 c-0.39,0.39-0.39,1.03,0,1.41s1.03,0.39,1.41,0L7.05,18.36z"})})}function V(e){return(0,u.jsx)("svg",{viewBox:"0 0 24 24",width:24,height:24,...e,children:(0,u.jsx)("path",{fill:"currentColor",d:"M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27C17.45,17.19,14.93,19,12,19 c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z M12,3c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9c0-0.46-0.04-0.92-0.1-1.36 c-0.98,1.37-2.58,2.26-4.4,2.26c-2.98,0-5.4-2.42-5.4-5.4c0-1.81,0.89-3.42,2.26-4.4C12.92,3.04,12.46,3,12,3L12,3z"})})}const U={toggle:"toggle_vylO",toggleButton:"toggleButton_gllP",darkToggleIcon:"darkToggleIcon_wfgR",lightToggleIcon:"lightToggleIcon_pyhR",toggleButtonDisabled:"toggleButtonDisabled_aARS"};function z(e){let{className:n,buttonClassName:t,value:r,onChange:a}=e;const s=(0,B.c)(),i=(0,l.G)({message:"Switch between dark and light mode (currently {mode})",id:"theme.colorToggle.ariaLabel",description:"The ARIA label for the navbar color mode toggle"},{mode:"dark"===r?(0,l.G)({message:"dark mode",id:"theme.colorToggle.ariaLabel.mode.dark",description:"The name for the dark color mode"}):(0,l.G)({message:"light mode",id:"theme.colorToggle.ariaLabel.mode.light",description:"The name for the light color mode"})});return(0,u.jsx)("div",{className:(0,o.c)(U.toggle,n),children:(0,u.jsxs)("button",{className:(0,o.c)("clean-btn",U.toggleButton,!s&&U.toggleButtonDisabled,t),type:"button",onClick:()=>a("dark"===r?"light":"dark"),disabled:!s,title:i,"aria-label":i,"aria-live":"polite",children:[(0,u.jsx)($,{className:(0,o.c)(U.toggleIcon,U.lightToggleIcon)}),(0,u.jsx)(V,{className:(0,o.c)(U.toggleIcon,U.darkToggleIcon)})]})})}const H=r.memo(z),W={darkNavbarColorModeToggle:"darkNavbarColorModeToggle_X3D1"};function G(e){let{className:n}=e;const t=(0,S.y)().navbar.style,r=(0,S.y)().colorMode.disableSwitch,{colorMode:o,setColorMode:a}=(0,M.U)();return r?null:(0,u.jsx)(H,{className:n,buttonClassName:"dark"===t?W.darkNavbarColorModeToggle:void 0,value:o,onChange:a})}var q=t(8164);function Y(){return(0,u.jsx)(q.c,{className:"navbar__brand",imageClassName:"navbar__logo",titleClassName:"navbar__title text--truncate"})}function K(){const e=(0,_.q)();return(0,u.jsx)("button",{type:"button","aria-label":(0,l.G)({id:"theme.docs.sidebar.closeSidebarButtonAriaLabel",message:"Close navigation bar",description:"The ARIA label for close button of mobile sidebar"}),className:"clean-btn navbar-sidebar__close",onClick:()=>e.toggle(),children:(0,u.jsx)(x,{color:"var(--ifm-color-emphasis-600)"})})}function X(){return(0,u.jsxs)("div",{className:"navbar-sidebar__brand",children:[(0,u.jsx)(Y,{}),(0,u.jsx)(G,{className:"margin-right--md"}),(0,u.jsx)(K,{})]})}var Q=t(867),Z=t(964),J=t(8136),ee=t(1064),ne=t(3232);function te(e){let{activeBasePath:n,activeBaseRegex:t,to:r,href:o,label:a,html:s,isDropdownLink:i,prependBaseUrlToHref:l,...c}=e;const d=(0,Z.c)(r),p=(0,Z.c)(n),f=(0,Z.c)(o,{forcePrependBaseUrl:!0}),m=a&&o&&!(0,J.c)(o),g=s?{dangerouslySetInnerHTML:{__html:s}}:{children:(0,u.jsxs)(u.Fragment,{children:[a,m&&(0,u.jsx)(ne.c,{...i&&{width:12,height:12}})]})};return o?(0,u.jsx)(Q.c,{href:l?f:o,...c,...g}):(0,u.jsx)(Q.c,{to:d,isNavLink:!0,...(n||t)&&{isActive:(e,n)=>t?(0,ee._)(t,n.pathname):n.pathname.startsWith(p)},...c,...g})}function re(e){let{className:n,isDropdownItem:t=!1,...r}=e;const a=(0,u.jsx)(te,{className:(0,o.c)(t?"dropdown__link":"navbar__item navbar__link",n),isDropdownLink:t,...r});return t?(0,u.jsx)("li",{children:a}):a}function oe(e){let{className:n,isDropdownItem:t,...r}=e;return(0,u.jsx)("li",{className:"menu__list-item",children:(0,u.jsx)(te,{className:(0,o.c)("menu__link",n),...r})})}function ae(e){let{mobile:n=!1,position:t,...r}=e;const o=n?oe:re;return(0,u.jsx)(o,{...r,activeClassName:r.activeClassName??(n?"menu__link--active":"navbar__link--active")})}var se=t(8448),ie=t(3376),le=t(8264);const ce={dropdownNavbarItemMobile:"dropdownNavbarItemMobile_S0Fm"};function ue(e,n){return e.some((e=>function(e,n){return!!(0,ie.Sc)(e.to,n)||!!(0,ee._)(e.activeBaseRegex,n)||!(!e.activeBasePath||!n.startsWith(e.activeBasePath))}(e,n)))}function de(e){let{items:n,position:t,className:a,onClick:s,...i}=e;const l=(0,r.useRef)(null),[c,d]=(0,r.useState)(!1);return(0,r.useEffect)((()=>{const e=e=>{l.current&&!l.current.contains(e.target)&&d(!1)};return document.addEventListener("mousedown",e),document.addEventListener("touchstart",e),document.addEventListener("focusin",e),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("touchstart",e),document.removeEventListener("focusin",e)}}),[l]),(0,u.jsxs)("div",{ref:l,className:(0,o.c)("navbar__item","dropdown","dropdown--hoverable",{"dropdown--right":"right"===t,"dropdown--show":c}),children:[(0,u.jsx)(te,{"aria-haspopup":"true","aria-expanded":c,role:"button",href:i.to?void 0:"#",className:(0,o.c)("navbar__link",a),...i,onClick:i.to?void 0:e=>e.preventDefault(),onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),d(!c))},children:i.children??i.label}),(0,u.jsx)("ul",{className:"dropdown__menu",children:n.map(((e,n)=>(0,r.createElement)(He,{isDropdownItem:!0,activeClassName:"dropdown__link--active",...e,key:n})))})]})}function pe(e){let{items:n,className:t,position:a,onClick:s,...l}=e;const c=function(){const{siteConfig:{baseUrl:e}}=(0,le.c)(),{pathname:n}=(0,i.IT)();return n.replace(e,"/")}(),d=ue(n,c),{collapsed:p,toggleCollapsed:f,setCollapsed:m}=(0,se.a)({initialState:()=>!d});return(0,r.useEffect)((()=>{d&&m(!d)}),[c,d,m]),(0,u.jsxs)("li",{className:(0,o.c)("menu__list-item",{"menu__list-item--collapsed":p}),children:[(0,u.jsx)(te,{role:"button",className:(0,o.c)(ce.dropdownNavbarItemMobile,"menu__link menu__link--sublist menu__link--sublist-caret",t),...l,onClick:e=>{e.preventDefault(),f()},children:l.children??l.label}),(0,u.jsx)(se.U,{lazy:!0,as:"ul",className:"menu__list",collapsed:p,children:n.map(((e,n)=>(0,r.createElement)(He,{mobile:!0,isDropdownItem:!0,onClick:s,activeClassName:"menu__link--active",...e,key:n})))})]})}function fe(e){let{mobile:n=!1,...t}=e;const r=n?pe:de;return(0,u.jsx)(r,{...t})}var me=t(1616);function ge(e){let{width:n=20,height:t=20,...r}=e;return(0,u.jsx)("svg",{viewBox:"0 0 24 24",width:n,height:t,"aria-hidden":!0,...r,children:(0,u.jsx)("path",{fill:"currentColor",d:"M12.87 15.07l-2.54-2.51.03-.03c1.74-1.94 2.98-4.17 3.71-6.53H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11.76-2.04zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2l-4.5-12zm-2.62 7l1.62-4.33L19.12 17h-3.24z"})})}const he="iconLanguage_nlXk";var ye=t(7104);function be(){return r.createElement("svg",{width:"15",height:"15",className:"DocSearch-Control-Key-Icon"},r.createElement("path",{d:"M4.505 4.496h2M5.505 5.496v5M8.216 4.496l.055 5.993M10 7.5c.333.333.5.667.5 1v2M12.326 4.5v5.996M8.384 4.496c1.674 0 2.116 0 2.116 1.5s-.442 1.5-2.116 1.5M3.205 9.303c-.09.448-.277 1.21-1.241 1.203C1 10.5.5 9.513.5 8V7c0-1.57.5-2.5 1.464-2.494.964.006 1.134.598 1.24 1.342M12.553 10.5h1.953",strokeWidth:"1.2",stroke:"currentColor",fill:"none",strokeLinecap:"square"}))}var ve=t(5052),Se=["translations"];function we(){return we=Object.assign||function(e){for(var n=1;ne.length)&&(n=e.length);for(var t=0,r=new Array(n);t=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var Ee="Ctrl";var Ce=r.forwardRef((function(e,n){var t=e.translations,o=void 0===t?{}:t,a=Te(e,Se),s=o.buttonText,i=void 0===s?"Search":s,l=o.buttonAriaLabel,c=void 0===l?"Search":l,u=xe((0,r.useState)(null),2),d=u[0],p=u[1];return(0,r.useEffect)((function(){"undefined"!=typeof navigator&&(/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)?p("\u2318"):p(Ee))}),[]),r.createElement("button",we({type:"button",className:"DocSearch DocSearch-Button","aria-label":c},a,{ref:n}),r.createElement("span",{className:"DocSearch-Button-Container"},r.createElement(ve.I,null),r.createElement("span",{className:"DocSearch-Button-Placeholder"},i)),r.createElement("span",{className:"DocSearch-Button-Keys"},null!==d&&r.createElement(r.Fragment,null,r.createElement("kbd",{className:"DocSearch-Button-Key"},d===Ee?r.createElement(be,null):d),r.createElement("kbd",{className:"DocSearch-Button-Key"},"K"))))})),Ae=t(6952),Ie=t(7092),_e=t(9032),Pe=t(4456);const Le={button:{buttonText:(0,l.G)({id:"theme.SearchBar.label",message:"Search",description:"The ARIA label and placeholder for search button"}),buttonAriaLabel:(0,l.G)({id:"theme.SearchBar.label",message:"Search",description:"The ARIA label and placeholder for search button"})},modal:{searchBox:{resetButtonTitle:(0,l.G)({id:"theme.SearchModal.searchBox.resetButtonTitle",message:"Clear the query",description:"The label and ARIA label for search box reset button"}),resetButtonAriaLabel:(0,l.G)({id:"theme.SearchModal.searchBox.resetButtonTitle",message:"Clear the query",description:"The label and ARIA label for search box reset button"}),cancelButtonText:(0,l.G)({id:"theme.SearchModal.searchBox.cancelButtonText",message:"Cancel",description:"The label and ARIA label for search box cancel button"}),cancelButtonAriaLabel:(0,l.G)({id:"theme.SearchModal.searchBox.cancelButtonText",message:"Cancel",description:"The label and ARIA label for search box cancel button"})},startScreen:{recentSearchesTitle:(0,l.G)({id:"theme.SearchModal.startScreen.recentSearchesTitle",message:"Recent",description:"The title for recent searches"}),noRecentSearchesText:(0,l.G)({id:"theme.SearchModal.startScreen.noRecentSearchesText",message:"No recent searches",description:"The text when no recent searches"}),saveRecentSearchButtonTitle:(0,l.G)({id:"theme.SearchModal.startScreen.saveRecentSearchButtonTitle",message:"Save this search",description:"The label for save recent search button"}),removeRecentSearchButtonTitle:(0,l.G)({id:"theme.SearchModal.startScreen.removeRecentSearchButtonTitle",message:"Remove this search from history",description:"The label for remove recent search button"}),favoriteSearchesTitle:(0,l.G)({id:"theme.SearchModal.startScreen.favoriteSearchesTitle",message:"Favorite",description:"The title for favorite searches"}),removeFavoriteSearchButtonTitle:(0,l.G)({id:"theme.SearchModal.startScreen.removeFavoriteSearchButtonTitle",message:"Remove this search from favorites",description:"The label for remove favorite search button"})},errorScreen:{titleText:(0,l.G)({id:"theme.SearchModal.errorScreen.titleText",message:"Unable to fetch results",description:"The title for error screen of search modal"}),helpText:(0,l.G)({id:"theme.SearchModal.errorScreen.helpText",message:"You might want to check your network connection.",description:"The help text for error screen of search modal"})},footer:{selectText:(0,l.G)({id:"theme.SearchModal.footer.selectText",message:"to select",description:"The explanatory text of the action for the enter key"}),selectKeyAriaLabel:(0,l.G)({id:"theme.SearchModal.footer.selectKeyAriaLabel",message:"Enter key",description:"The ARIA label for the Enter key button that makes the selection"}),navigateText:(0,l.G)({id:"theme.SearchModal.footer.navigateText",message:"to navigate",description:"The explanatory text of the action for the Arrow up and Arrow down key"}),navigateUpKeyAriaLabel:(0,l.G)({id:"theme.SearchModal.footer.navigateUpKeyAriaLabel",message:"Arrow up",description:"The ARIA label for the Arrow up key button that makes the navigation"}),navigateDownKeyAriaLabel:(0,l.G)({id:"theme.SearchModal.footer.navigateDownKeyAriaLabel",message:"Arrow down",description:"The ARIA label for the Arrow down key button that makes the navigation"}),closeText:(0,l.G)({id:"theme.SearchModal.footer.closeText",message:"to close",description:"The explanatory text of the action for Escape key"}),closeKeyAriaLabel:(0,l.G)({id:"theme.SearchModal.footer.closeKeyAriaLabel",message:"Escape key",description:"The ARIA label for the Escape key button that close the modal"}),searchByText:(0,l.G)({id:"theme.SearchModal.footer.searchByText",message:"Search by",description:"The text explain that the search is making by Algolia"})},noResultsScreen:{noResultsText:(0,l.G)({id:"theme.SearchModal.noResultsScreen.noResultsText",message:"No results for",description:"The text explains that there are no results for the following search"}),suggestedQueryText:(0,l.G)({id:"theme.SearchModal.noResultsScreen.suggestedQueryText",message:"Try searching for",description:"The text for the suggested query when no results are found for the following search"}),reportMissingResultsText:(0,l.G)({id:"theme.SearchModal.noResultsScreen.reportMissingResultsText",message:"Believe this query should return results?",description:"The text for the question where the user thinks there are missing results"}),reportMissingResultsLinkText:(0,l.G)({id:"theme.SearchModal.noResultsScreen.reportMissingResultsLinkText",message:"Let us know.",description:"The text for the link to report missing results"})}},placeholder:(0,l.G)({id:"theme.SearchModal.placeholder",message:"Search docs",description:"The placeholder of the input of the DocSearch pop-up modal"})};let Re=null;function Oe(e){let{hit:n,children:t}=e;return(0,u.jsx)(Q.c,{to:n.url,children:t})}function Fe(e){let{state:n,onClose:t}=e;const r=(0,Ie.Y)();return(0,u.jsx)(Q.c,{to:r(n.query),onClick:t,children:(0,u.jsx)(l.c,{id:"theme.SearchBar.seeAll",values:{count:n.context.nbHits},children:"See all {count} results"})})}function Ne(e){let{contextualSearch:n,externalUrlRegex:o,...a}=e;const{siteMetadata:s}=(0,le.c)(),l=(0,_e.Q)(),c=function(){const{locale:e,tags:n}=(0,Pe.mY)();return[`language:${e}`,n.map((e=>`docusaurus_tag:${e}`))]}(),d=a.searchParameters?.facetFilters??[],p=n?function(e,n){const t=e=>"string"==typeof e?[e]:e;return[...t(e),...t(n)]}(c,d):d,f={...a.searchParameters,facetFilters:p},m=(0,i.Uz)(),g=(0,r.useRef)(null),h=(0,r.useRef)(null),[y,b]=(0,r.useState)(!1),[v,S]=(0,r.useState)(void 0),w=(0,r.useCallback)((()=>Re?Promise.resolve():Promise.all([t.e(2528).then(t.bind(t,148)),Promise.all([t.e(2176),t.e(1676)]).then(t.bind(t,1676)),Promise.all([t.e(2176),t.e(8879)]).then(t.bind(t,8879))]).then((e=>{let[{DocSearchModal:n}]=e;Re=n}))),[]),x=(0,r.useCallback)((()=>{w().then((()=>{g.current=document.createElement("div"),document.body.insertBefore(g.current,document.body.firstChild),b(!0)}))}),[w,b]),k=(0,r.useCallback)((()=>{b(!1),g.current?.remove()}),[b]),T=(0,r.useCallback)((e=>{w().then((()=>{b(!0),S(e.key)}))}),[w,b,S]),E=(0,r.useRef)({navigate(e){let{itemUrl:n}=e;(0,ee._)(o,n)?window.location.href=n:m.push(n)}}).current,C=(0,r.useRef)((e=>a.transformItems?a.transformItems(e):e.map((e=>({...e,url:l(e.url)}))))).current,A=(0,r.useMemo)((()=>e=>(0,u.jsx)(Fe,{...e,onClose:k})),[k]),I=(0,r.useCallback)((e=>(e.addAlgoliaAgent("docusaurus",s.docusaurusVersion),e)),[s.docusaurusVersion]);return function(e){var n=e.isOpen,t=e.onOpen,o=e.onClose,a=e.onInput,s=e.searchButtonRef;r.useEffect((function(){function e(e){var r;(27===e.keyCode&&n||"k"===(null===(r=e.key)||void 0===r?void 0:r.toLowerCase())&&(e.metaKey||e.ctrlKey)||!function(e){var n=e.target,t=n.tagName;return n.isContentEditable||"INPUT"===t||"SELECT"===t||"TEXTAREA"===t}(e)&&"/"===e.key&&!n)&&(e.preventDefault(),n?o():document.body.classList.contains("DocSearch--active")||document.body.classList.contains("DocSearch--active")||t()),s&&s.current===document.activeElement&&a&&/[a-zA-Z0-9]/.test(String.fromCharCode(e.keyCode))&&a(e)}return window.addEventListener("keydown",e),function(){window.removeEventListener("keydown",e)}}),[n,t,o,a,s])}({isOpen:y,onOpen:x,onClose:k,onInput:T,searchButtonRef:h}),(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(Ae.c,{children:(0,u.jsx)("link",{rel:"preconnect",href:`https://${a.appId}-dsn.algolia.net`,crossOrigin:"anonymous"})}),(0,u.jsx)(Ce,{onTouchStart:w,onFocus:w,onMouseOver:w,onClick:x,ref:h,translations:Le.button}),y&&Re&&g.current&&(0,ye.createPortal)((0,u.jsx)(Re,{onClose:k,initialScrollY:window.scrollY,initialQuery:v,navigator:E,transformItems:C,hitComponent:Oe,transformSearchClient:I,...a.searchPagePath&&{resultsFooterComponent:A},...a,searchParameters:f,placeholder:Le.placeholder,translations:Le.modal}),g.current)]})}function je(){const{siteConfig:e}=(0,le.c)();return(0,u.jsx)(Ne,{...e.themeConfig.algolia})}const De={navbarSearchContainer:"navbarSearchContainer_Bca1"};function Me(e){let{children:n,className:t}=e;return(0,u.jsx)("div",{className:(0,o.c)(t,De.navbarSearchContainer),children:n})}var Be=t(5172),$e=t(9940);var Ve=t(4592);const Ue=e=>e.docs.find((n=>n.id===e.mainDocId));const ze={default:ae,localeDropdown:function(e){let{mobile:n,dropdownItemsBefore:t,dropdownItemsAfter:r,queryString:o="",...a}=e;const{i18n:{currentLocale:s,locales:c,localeConfigs:d}}=(0,le.c)(),p=(0,me.D)(),{search:f,hash:m}=(0,i.IT)(),g=[...t,...c.map((e=>{const t=`${`pathname://${p.createUrl({locale:e,fullyQualified:!1})}`}${f}${m}${o}`;return{label:d[e].label,lang:d[e].htmlLang,to:t,target:"_self",autoAddBaseUrl:!1,className:e===s?n?"menu__link--active":"dropdown__link--active":""}})),...r],h=n?(0,l.G)({message:"Languages",id:"theme.navbar.mobileLanguageDropdown.label",description:"The label for the mobile language switcher dropdown"}):d[s].label;return(0,u.jsx)(fe,{...a,mobile:n,label:(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(ge,{className:he}),h]}),items:g})},search:function(e){let{mobile:n,className:t}=e;return n?null:(0,u.jsx)(Me,{className:t,children:(0,u.jsx)(je,{})})},dropdown:fe,html:function(e){let{value:n,className:t,mobile:r=!1,isDropdownItem:a=!1}=e;const s=a?"li":"div";return(0,u.jsx)(s,{className:(0,o.c)({navbar__item:!r&&!a,"menu__list-item":r},t),dangerouslySetInnerHTML:{__html:n}})},doc:function(e){let{docId:n,label:t,docsPluginId:r,...o}=e;const{activeDoc:a}=(0,Be.wB)(r),s=(0,$e.Qf)(n,r),i=a?.path===s?.path;return null===s||s.unlisted&&!i?null:(0,u.jsx)(ae,{exact:!0,...o,isActive:()=>i||!!a?.sidebar&&a.sidebar===s.sidebar,label:t??s.id,to:s.path})},docSidebar:function(e){let{sidebarId:n,label:t,docsPluginId:r,...o}=e;const{activeDoc:a}=(0,Be.wB)(r),s=(0,$e.Ab)(n,r).link;if(!s)throw new Error(`DocSidebarNavbarItem: Sidebar with ID "${n}" doesn't have anything to be linked to.`);return(0,u.jsx)(ae,{exact:!0,...o,isActive:()=>a?.sidebar===n,label:t??s.label,to:s.path})},docsVersion:function(e){let{label:n,to:t,docsPluginId:r,...o}=e;const a=(0,$e.b7)(r)[0],s=n??a.label,i=t??(e=>e.docs.find((n=>n.id===e.mainDocId)))(a).path;return(0,u.jsx)(ae,{...o,label:s,to:i})},docsVersionDropdown:function(e){let{mobile:n,docsPluginId:t,dropdownActiveClassDisabled:r,dropdownItemsBefore:o,dropdownItemsAfter:a,...s}=e;const{search:c,hash:d}=(0,i.IT)(),p=(0,Be.wB)(t),f=(0,Be.gN)(t),{savePreferredVersionName:m}=(0,Ve.iy)(t),g=[...o,...f.map((e=>{const n=p.alternateDocVersions[e.name]??Ue(e);return{label:e.label,to:`${n.path}${c}${d}`,isActive:()=>e===p.activeVersion,onClick:()=>m(e.name)}})),...a],h=(0,$e.b7)(t)[0],y=n&&g.length>1?(0,l.G)({id:"theme.navbar.mobileVersionsDropdown.label",message:"Versions",description:"The label for the navbar versions dropdown on mobile view"}):h.label,b=n&&g.length>1?void 0:Ue(h).path;return g.length<=1?(0,u.jsx)(ae,{...s,mobile:n,label:y,to:b,isActive:r?()=>!1:void 0}):(0,u.jsx)(fe,{...s,mobile:n,label:y,to:b,items:g,isActive:r?()=>!1:void 0})}};function He(e){let{type:n,...t}=e;const r=function(e,n){return e&&"default"!==e?e:"items"in n?"dropdown":"default"}(n,t),o=ze[r];if(!o)throw new Error(`No NavbarItem component found for type "${n}".`);return(0,u.jsx)(o,{...t})}function We(){const e=(0,_.q)(),n=(0,S.y)().navbar.items;return(0,u.jsx)("ul",{className:"menu__list",children:n.map(((n,t)=>(0,r.createElement)(He,{mobile:!0,...n,onClick:()=>e.toggle(),key:t})))})}function Ge(e){return(0,u.jsx)("button",{...e,type:"button",className:"clean-btn navbar-sidebar__back",children:(0,u.jsx)(l.c,{id:"theme.navbar.mobileSidebarSecondaryMenu.backButtonLabel",description:"The label of the back button to return to main menu, inside the mobile navbar sidebar secondary menu (notably used to display the docs sidebar)",children:"\u2190 Back to main menu"})})}function qe(){const e=0===(0,S.y)().navbar.items.length,n=j();return(0,u.jsxs)(u.Fragment,{children:[!e&&(0,u.jsx)(Ge,{onClick:()=>n.hide()}),n.content]})}function Ye(){const e=(0,_.q)();var n;return void 0===(n=e.shown)&&(n=!0),(0,r.useEffect)((()=>(document.body.style.overflow=n?"hidden":"visible",()=>{document.body.style.overflow="visible"})),[n]),e.shouldRender?(0,u.jsx)(D,{header:(0,u.jsx)(X,{}),primaryMenu:(0,u.jsx)(We,{}),secondaryMenu:(0,u.jsx)(qe,{})}):null}const Ke={navbarHideable:"navbarHideable_m1mJ",navbarHidden:"navbarHidden_jGov"};function Xe(e){return(0,u.jsx)("div",{role:"presentation",...e,className:(0,o.c)("navbar-sidebar__backdrop",e.className)})}function Qe(e){let{children:n}=e;const{navbar:{hideOnScroll:t,style:a}}=(0,S.y)(),s=(0,_.q)(),{navbarRef:i,isNavbarVisible:d}=function(e){const[n,t]=(0,r.useState)(e),o=(0,r.useRef)(!1),a=(0,r.useRef)(0),s=(0,r.useCallback)((e=>{null!==e&&(a.current=e.getBoundingClientRect().height)}),[]);return(0,P.SM)(((n,r)=>{let{scrollY:s}=n;if(!e)return;if(s=i?t(!1):s+c{if(!e)return;const r=n.location.hash;if(r?document.getElementById(r.substring(1)):void 0)return o.current=!0,void t(!1);t(!0)})),{navbarRef:s,isNavbarVisible:n}}(t);return(0,u.jsxs)("nav",{ref:i,"aria-label":(0,l.G)({id:"theme.NavBar.navAriaLabel",message:"Main",description:"The ARIA label for the main navigation"}),className:(0,o.c)("navbar","navbar--fixed-top",t&&[Ke.navbarHideable,!d&&Ke.navbarHidden],{"navbar--dark":"dark"===a,"navbar--primary":"primary"===a,"navbar-sidebar--show":s.shown}),children:[n,(0,u.jsx)(Xe,{onClick:s.toggle}),(0,u.jsx)(Ye,{})]})}var Ze=t(5684);const Je={errorBoundaryError:"errorBoundaryError_a6uf",errorBoundaryFallback:"errorBoundaryFallback_VBag"};function en(e){return(0,u.jsx)("button",{type:"button",...e,children:(0,u.jsx)(l.c,{id:"theme.ErrorPageContent.tryAgain",description:"The label of the button to try again rendering when the React error boundary captures an error",children:"Try again"})})}function nn(e){let{error:n}=e;const t=(0,Ze.getErrorCausalChain)(n).map((e=>e.message)).join("\n\nCause:\n");return(0,u.jsx)("p",{className:Je.errorBoundaryError,children:t})}class tn extends r.Component{componentDidCatch(e,n){throw this.props.onError(e,n)}render(){return this.props.children}}const rn="right";function on(e){let{width:n=30,height:t=30,className:r,...o}=e;return(0,u.jsx)("svg",{className:r,width:n,height:t,viewBox:"0 0 30 30","aria-hidden":"true",...o,children:(0,u.jsx)("path",{stroke:"currentColor",strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"2",d:"M4 7h22M4 15h22M4 23h22"})})}function an(){const{toggle:e,shown:n}=(0,_.q)();return(0,u.jsx)("button",{onClick:e,"aria-label":(0,l.G)({id:"theme.docs.sidebar.toggleSidebarButtonAriaLabel",message:"Toggle navigation bar",description:"The ARIA label for hamburger menu button of mobile navigation"}),"aria-expanded":n,className:"navbar__toggle clean-btn",type:"button",children:(0,u.jsx)(on,{})})}const sn={colorModeToggle:"colorModeToggle_DEke"};function ln(e){let{items:n}=e;return(0,u.jsx)(u.Fragment,{children:n.map(((e,n)=>(0,u.jsx)(tn,{onError:n=>new Error(`A theme navbar item failed to render.\nPlease double-check the following navbar item (themeConfig.navbar.items) of your Docusaurus config:\n${JSON.stringify(e,null,2)}`,{cause:n}),children:(0,u.jsx)(He,{...e})},n)))})}function cn(e){let{left:n,right:t}=e;return(0,u.jsxs)("div",{className:"navbar__inner",children:[(0,u.jsx)("div",{className:"navbar__items",children:n}),(0,u.jsx)("div",{className:"navbar__items navbar__items--right",children:t})]})}function un(){const e=(0,_.q)(),n=(0,S.y)().navbar.items,[t,r]=function(e){function n(e){return"left"===(e.position??rn)}return[e.filter(n),e.filter((e=>!n(e)))]}(n),o=n.find((e=>"search"===e.type));return(0,u.jsx)(cn,{left:(0,u.jsxs)(u.Fragment,{children:[!e.disabled&&(0,u.jsx)(an,{}),(0,u.jsx)(Y,{}),(0,u.jsx)(ln,{items:t})]}),right:(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(ln,{items:r}),(0,u.jsx)(G,{className:sn.colorModeToggle}),!o&&(0,u.jsx)(Me,{children:(0,u.jsx)(je,{})})]})})}function dn(){return(0,u.jsx)(Qe,{children:(0,u.jsx)(un,{})})}function pn(e){let{item:n}=e;const{to:t,href:r,label:o,prependBaseUrlToHref:a,...s}=n,i=(0,Z.c)(t),l=(0,Z.c)(r,{forcePrependBaseUrl:!0});return(0,u.jsxs)(Q.c,{className:"footer__link-item",...r?{href:a?l:r}:{to:i},...s,children:[o,r&&!(0,J.c)(r)&&(0,u.jsx)(ne.c,{})]})}function fn(e){let{item:n}=e;return n.html?(0,u.jsx)("li",{className:"footer__item",dangerouslySetInnerHTML:{__html:n.html}}):(0,u.jsx)("li",{className:"footer__item",children:(0,u.jsx)(pn,{item:n})},n.href??n.to)}function mn(e){let{column:n}=e;return(0,u.jsxs)("div",{className:"col footer__col",children:[(0,u.jsx)("div",{className:"footer__title",children:n.title}),(0,u.jsx)("ul",{className:"footer__items clean-list",children:n.items.map(((e,n)=>(0,u.jsx)(fn,{item:e},n)))})]})}function gn(e){let{columns:n}=e;return(0,u.jsx)("div",{className:"row footer__links",children:n.map(((e,n)=>(0,u.jsx)(mn,{column:e},n)))})}function hn(){return(0,u.jsx)("span",{className:"footer__link-separator",children:"\xb7"})}function yn(e){let{item:n}=e;return n.html?(0,u.jsx)("span",{className:"footer__link-item",dangerouslySetInnerHTML:{__html:n.html}}):(0,u.jsx)(pn,{item:n})}function bn(e){let{links:n}=e;return(0,u.jsx)("div",{className:"footer__links text--center",children:(0,u.jsx)("div",{className:"footer__links",children:n.map(((e,t)=>(0,u.jsxs)(r.Fragment,{children:[(0,u.jsx)(yn,{item:e}),n.length!==t+1&&(0,u.jsx)(hn,{})]},t)))})})}function vn(e){let{links:n}=e;return function(e){return"title"in e[0]}(n)?(0,u.jsx)(gn,{columns:n}):(0,u.jsx)(bn,{links:n})}var Sn=t(1964);const wn={footerLogoLink:"footerLogoLink_BH7S"};function xn(e){let{logo:n}=e;const{withBaseUrl:t}=(0,Z.E)(),r={light:t(n.src),dark:t(n.srcDark??n.src)};return(0,u.jsx)(Sn.c,{className:(0,o.c)("footer__logo",n.className),alt:n.alt,sources:r,width:n.width,height:n.height,style:n.style})}function kn(e){let{logo:n}=e;return n.href?(0,u.jsx)(Q.c,{href:n.href,className:wn.footerLogoLink,target:n.target,children:(0,u.jsx)(xn,{logo:n})}):(0,u.jsx)(xn,{logo:n})}function Tn(e){let{copyright:n}=e;return(0,u.jsx)("div",{className:"footer__copyright",dangerouslySetInnerHTML:{__html:n}})}function En(e){let{style:n,links:t,logo:r,copyright:a}=e;return(0,u.jsx)("footer",{className:(0,o.c)("footer",{"footer--dark":"dark"===n}),children:(0,u.jsxs)("div",{className:"container container-fluid",children:[t,(r||a)&&(0,u.jsxs)("div",{className:"footer__bottom text--center",children:[r&&(0,u.jsx)("div",{className:"margin-bottom--sm",children:r}),a]})]})})}function Cn(){const{footer:e}=(0,S.y)();if(!e)return null;const{copyright:n,links:t,logo:r,style:o}=e;return(0,u.jsx)(En,{style:o,links:t&&t.length>0&&(0,u.jsx)(vn,{links:t}),logo:r&&(0,u.jsx)(kn,{logo:r}),copyright:n&&(0,u.jsx)(Tn,{copyright:n})})}const An=r.memo(Cn),In=(0,L.qY)([M.C,w.qu,P.S2,Ve.gc,s.w7,function(e){let{children:n}=e;return(0,u.jsx)(R.Ub,{children:(0,u.jsx)(_.y,{children:(0,u.jsx)(F,{children:n})})})}]);function _n(e){let{children:n}=e;return(0,u.jsx)(In,{children:n})}var Pn=t(6448);function Ln(e){let{error:n,tryAgain:t}=e;return(0,u.jsx)("main",{className:"container margin-vert--xl",children:(0,u.jsx)("div",{className:"row",children:(0,u.jsxs)("div",{className:"col col--6 col--offset-3",children:[(0,u.jsx)(Pn.c,{as:"h1",className:"hero__title",children:(0,u.jsx)(l.c,{id:"theme.ErrorPageContent.title",description:"The title of the fallback page when the page crashed",children:"This page crashed."})}),(0,u.jsx)("div",{className:"margin-vert--lg",children:(0,u.jsx)(en,{onClick:t,className:"button button--primary shadow--lw"})}),(0,u.jsx)("hr",{}),(0,u.jsx)("div",{className:"margin-vert--md",children:(0,u.jsx)(nn,{error:n})})]})})})}const Rn={mainWrapper:"mainWrapper_z2l0"};function On(e){const{children:n,noFooter:t,wrapperClassName:r,title:i,description:l}=e;return(0,y.W)(),(0,u.jsxs)(_n,{children:[(0,u.jsx)(s.U7,{title:i,description:l}),(0,u.jsx)(v,{}),(0,u.jsx)(I,{}),(0,u.jsx)(dn,{}),(0,u.jsx)("div",{id:d,className:(0,o.c)(h.W.wrapper.main,Rn.mainWrapper,r),children:(0,u.jsx)(a.c,{fallback:e=>(0,u.jsx)(Ln,{...e}),children:n})}),!t&&(0,u.jsx)(An,{})]})}},8164:(e,n,t)=>{"use strict";t.d(n,{c:()=>u});t(1504);var r=t(867),o=t(964),a=t(8264),s=t(1824),i=t(1964),l=t(7624);function c(e){let{logo:n,alt:t,imageClassName:r}=e;const a={light:(0,o.c)(n.src),dark:(0,o.c)(n.srcDark||n.src)},s=(0,l.jsx)(i.c,{className:n.className,sources:a,height:n.height,width:n.width,alt:t,style:n.style});return r?(0,l.jsx)("div",{className:r,children:s}):s}function u(e){const{siteConfig:{title:n}}=(0,a.c)(),{navbar:{title:t,logo:i}}=(0,s.y)(),{imageClassName:u,titleClassName:d,...p}=e,f=(0,o.c)(i?.href||"/"),m=t?"":n,g=i?.alt??m;return(0,l.jsxs)(r.c,{to:f,...p,...i?.target&&{target:i.target},children:[i&&(0,l.jsx)(c,{logo:i,alt:g,imageClassName:u}),null!=t&&(0,l.jsx)("b",{className:d,children:t})]})}},8712:(e,n,t)=>{"use strict";t.d(n,{c:()=>a});t(1504);var r=t(6952),o=t(7624);function a(e){let{locale:n,version:t,tag:a}=e;const s=n;return(0,o.jsxs)(r.c,{children:[n&&(0,o.jsx)("meta",{name:"docusaurus_locale",content:n}),t&&(0,o.jsx)("meta",{name:"docusaurus_version",content:t}),a&&(0,o.jsx)("meta",{name:"docusaurus_tag",content:a}),s&&(0,o.jsx)("meta",{name:"docsearch:language",content:s}),t&&(0,o.jsx)("meta",{name:"docsearch:version",content:t}),a&&(0,o.jsx)("meta",{name:"docsearch:docusaurus_tag",content:a})]})}},1964:(e,n,t)=>{"use strict";t.d(n,{c:()=>u});var r=t(1504),o=t(5456),a=t(3664),s=t(6528);const i={themedComponent:"themedComponent_mlkZ","themedComponent--light":"themedComponent--light_NVdE","themedComponent--dark":"themedComponent--dark_xIcU"};var l=t(7624);function c(e){let{className:n,children:t}=e;const c=(0,a.c)(),{colorMode:u}=(0,s.U)();return(0,l.jsx)(l.Fragment,{children:(c?"dark"===u?["dark"]:["light"]:["light","dark"]).map((e=>{const a=t({theme:e,className:(0,o.c)(n,i.themedComponent,i[`themedComponent--${e}`])});return(0,l.jsx)(r.Fragment,{children:a},e)}))})}function u(e){const{sources:n,className:t,alt:r,...o}=e;return(0,l.jsx)(c,{className:t,children:e=>{let{theme:t,className:a}=e;return(0,l.jsx)("img",{src:n[t],alt:r,className:a,...o})}})}},8448:(e,n,t)=>{"use strict";t.d(n,{U:()=>y,a:()=>c});var r=t(1504),o=t(8684),a=t(5288),s=t(3856),i=t(7624);const l="ease-in-out";function c(e){let{initialState:n}=e;const[t,o]=(0,r.useState)(n??!1),a=(0,r.useCallback)((()=>{o((e=>!e))}),[]);return{collapsed:t,setCollapsed:o,toggleCollapsed:a}}const u={display:"none",overflow:"hidden",height:"0px"},d={display:"block",overflow:"visible",height:"auto"};function p(e,n){const t=n?u:d;e.style.display=t.display,e.style.overflow=t.overflow,e.style.height=t.height}function f(e){let{collapsibleRef:n,collapsed:t,animation:o}=e;const a=(0,r.useRef)(!1);(0,r.useEffect)((()=>{const e=n.current;function r(){const n=e.scrollHeight,t=o?.duration??function(e){if((0,s.I)())return 1;const n=e/36;return Math.round(10*(4+15*n**.25+n/5))}(n);return{transition:`height ${t}ms ${o?.easing??l}`,height:`${n}px`}}function i(){const n=r();e.style.transition=n.transition,e.style.height=n.height}if(!a.current)return p(e,t),void(a.current=!0);return e.style.willChange="height",function(){const n=requestAnimationFrame((()=>{t?(i(),requestAnimationFrame((()=>{e.style.height=u.height,e.style.overflow=u.overflow}))):(e.style.display="block",requestAnimationFrame((()=>{i()})))}));return()=>cancelAnimationFrame(n)}()}),[n,t,o])}function m(e){if(!o.c.canUseDOM)return e?u:d}function g(e){let{as:n="div",collapsed:t,children:o,animation:a,onCollapseTransitionEnd:s,className:l,disableSSRStyle:c}=e;const u=(0,r.useRef)(null);return f({collapsibleRef:u,collapsed:t,animation:a}),(0,i.jsx)(n,{ref:u,style:c?void 0:m(t),onTransitionEnd:e=>{"height"===e.propertyName&&(p(u.current,t),s?.(t))},className:l,children:o})}function h(e){let{collapsed:n,...t}=e;const[o,s]=(0,r.useState)(!n),[l,c]=(0,r.useState)(n);return(0,a.c)((()=>{n||s(!0)}),[n]),(0,a.c)((()=>{o&&c(n)}),[o,n]),o?(0,i.jsx)(g,{...t,collapsed:l}):null}function y(e){let{lazy:n,...t}=e;const r=n?h:g;return(0,i.jsx)(r,{...t})}},3868:(e,n,t)=>{"use strict";t.d(n,{el:()=>g,qu:()=>m});var r=t(1504),o=t(3664),a=t(1148),s=t(1100),i=t(1824),l=t(7624);const c=(0,a.GS)("docusaurus.announcement.dismiss"),u=(0,a.GS)("docusaurus.announcement.id"),d=()=>"true"===c.get(),p=e=>c.set(String(e)),f=r.createContext(null);function m(e){let{children:n}=e;const t=function(){const{announcementBar:e}=(0,i.y)(),n=(0,o.c)(),[t,a]=(0,r.useState)((()=>!!n&&d()));(0,r.useEffect)((()=>{a(d())}),[]);const s=(0,r.useCallback)((()=>{p(!0),a(!0)}),[]);return(0,r.useEffect)((()=>{if(!e)return;const{id:n}=e;let t=u.get();"annoucement-bar"===t&&(t="announcement-bar");const r=n!==t;u.set(n),r&&p(!1),!r&&d()||a(!1)}),[e]),(0,r.useMemo)((()=>({isActive:!!e&&!t,close:s})),[e,t,s])}();return(0,l.jsx)(f.Provider,{value:t,children:n})}function g(){const e=(0,r.useContext)(f);if(!e)throw new s.AH("AnnouncementBarProvider");return e}},6528:(e,n,t)=>{"use strict";t.d(n,{C:()=>h,U:()=>y});var r=t(1504),o=t(8684),a=t(1100),s=t(1148),i=t(1824),l=t(7624);const c=r.createContext(void 0),u="theme",d=(0,s.GS)(u),p={light:"light",dark:"dark"},f=e=>e===p.dark?p.dark:p.light,m=e=>o.c.canUseDOM?f(document.documentElement.getAttribute("data-theme")):f(e),g=e=>{d.set(f(e))};function h(e){let{children:n}=e;const t=function(){const{colorMode:{defaultMode:e,disableSwitch:n,respectPrefersColorScheme:t}}=(0,i.y)(),[o,a]=(0,r.useState)(m(e));(0,r.useEffect)((()=>{n&&d.del()}),[n]);const s=(0,r.useCallback)((function(n,r){void 0===r&&(r={});const{persist:o=!0}=r;n?(a(n),o&&g(n)):(a(t?window.matchMedia("(prefers-color-scheme: dark)").matches?p.dark:p.light:e),d.del())}),[t,e]);(0,r.useEffect)((()=>{document.documentElement.setAttribute("data-theme",f(o))}),[o]),(0,r.useEffect)((()=>{if(n)return;const e=e=>{if(e.key!==u)return;const n=d.get();null!==n&&s(f(n))};return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)}),[n,s]);const l=(0,r.useRef)(!1);return(0,r.useEffect)((()=>{if(n&&!t)return;const e=window.matchMedia("(prefers-color-scheme: dark)"),r=()=>{window.matchMedia("print").matches||l.current?l.current=window.matchMedia("print").matches:s(null)};return e.addListener(r),()=>e.removeListener(r)}),[s,n,t]),(0,r.useMemo)((()=>({colorMode:o,setColorMode:s,get isDarkTheme(){return o===p.dark},setLightTheme(){s(p.light)},setDarkTheme(){s(p.dark)}})),[o,s])}();return(0,l.jsx)(c.Provider,{value:t,children:n})}function y(){const e=(0,r.useContext)(c);if(null==e)throw new a.AH("ColorModeProvider","Please see https://docusaurus.io/docs/api/themes/configuration#use-color-mode.");return e}},4592:(e,n,t)=>{"use strict";t.d(n,{eM:()=>S,gc:()=>y,iy:()=>v});var r=t(1504),o=t(5172),a=t(2488),s=t(1824),i=t(9940),l=t(1100),c=t(1148),u=t(7624);const d=e=>`docs-preferred-version-${e}`,p={save:(e,n,t)=>{(0,c.GS)(d(e),{persistence:n}).set(t)},read:(e,n)=>(0,c.GS)(d(e),{persistence:n}).get(),clear:(e,n)=>{(0,c.GS)(d(e),{persistence:n}).del()}},f=e=>Object.fromEntries(e.map((e=>[e,{preferredVersionName:null}])));const m=r.createContext(null);function g(){const e=(0,o.L0)(),n=(0,s.y)().docs.versionPersistence,t=(0,r.useMemo)((()=>Object.keys(e)),[e]),[a,i]=(0,r.useState)((()=>f(t)));(0,r.useEffect)((()=>{i(function(e){let{pluginIds:n,versionPersistence:t,allDocsData:r}=e;function o(e){const n=p.read(e,t);return r[e].versions.some((e=>e.name===n))?{preferredVersionName:n}:(p.clear(e,t),{preferredVersionName:null})}return Object.fromEntries(n.map((e=>[e,o(e)])))}({allDocsData:e,versionPersistence:n,pluginIds:t}))}),[e,n,t]);return[a,(0,r.useMemo)((()=>({savePreferredVersion:function(e,t){p.save(e,n,t),i((n=>({...n,[e]:{preferredVersionName:t}})))}})),[n])]}function h(e){let{children:n}=e;const t=g();return(0,u.jsx)(m.Provider,{value:t,children:n})}function y(e){let{children:n}=e;return i.c1?(0,u.jsx)(h,{children:n}):(0,u.jsx)(u.Fragment,{children:n})}function b(){const e=(0,r.useContext)(m);if(!e)throw new l.AH("DocsPreferredVersionContextProvider");return e}function v(e){void 0===e&&(e=a.M);const n=(0,o.OK)(e),[t,s]=b(),{preferredVersionName:i}=t[e];return{preferredVersion:n.versions.find((e=>e.name===i))??null,savePreferredVersionName:(0,r.useCallback)((n=>{s.savePreferredVersion(e,n)}),[s,e])}}function S(){const e=(0,o.L0)(),[n]=b();function t(t){const r=e[t],{preferredVersionName:o}=n[t];return r.versions.find((e=>e.name===o))??null}const r=Object.keys(e);return Object.fromEntries(r.map((e=>[e,t(e)])))}},6192:(e,n,t)=>{"use strict";t.d(n,{m:()=>c,y:()=>l});var r=t(1504),o=t(1100),a=t(7624);const s=Symbol("EmptyContext"),i=r.createContext(s);function l(e){let{children:n,name:t,items:o}=e;const s=(0,r.useMemo)((()=>t&&o?{name:t,items:o}:null),[t,o]);return(0,a.jsx)(i.Provider,{value:s,children:n})}function c(){const e=(0,r.useContext)(i);if(e===s)throw new o.AH("DocsSidebarProvider");return e}},9920:(e,n,t)=>{"use strict";t.d(n,{E:()=>l,Q:()=>i});var r=t(1504),o=t(1100),a=t(7624);const s=r.createContext(null);function i(e){let{children:n,version:t}=e;return(0,a.jsx)(s.Provider,{value:t,children:n})}function l(){const e=(0,r.useContext)(s);if(null===e)throw new o.AH("DocsVersionProvider");return e}},8200:(e,n,t)=>{"use strict";t.d(n,{q:()=>f,y:()=>p});var r=t(1504),o=t(5168),a=t(1432),s=t(632),i=t(1824),l=t(1100),c=t(7624);const u=r.createContext(void 0);function d(){const e=function(){const e=(0,o.MF)(),{items:n}=(0,i.y)().navbar;return 0===n.length&&!e.component}(),n=(0,a.U)(),t=!e&&"mobile"===n,[l,c]=(0,r.useState)(!1);(0,s.a4)((()=>{if(l)return c(!1),!1}));const u=(0,r.useCallback)((()=>{c((e=>!e))}),[]);return(0,r.useEffect)((()=>{"desktop"===n&&c(!1)}),[n]),(0,r.useMemo)((()=>({disabled:e,shouldRender:t,toggle:u,shown:l})),[e,t,u,l])}function p(e){let{children:n}=e;const t=d();return(0,c.jsx)(u.Provider,{value:t,children:n})}function f(){const e=r.useContext(u);if(void 0===e)throw new l.AH("NavbarMobileSidebarProvider");return e}},5168:(e,n,t)=>{"use strict";t.d(n,{MF:()=>l,Mx:()=>c,Ub:()=>i});var r=t(1504),o=t(1100),a=t(7624);const s=r.createContext(null);function i(e){let{children:n}=e;const t=(0,r.useState)({component:null,props:null});return(0,a.jsx)(s.Provider,{value:t,children:n})}function l(){const e=(0,r.useContext)(s);if(!e)throw new o.AH("NavbarSecondaryMenuContentProvider");return e[0]}function c(e){let{component:n,props:t}=e;const a=(0,r.useContext)(s);if(!a)throw new o.AH("NavbarSecondaryMenuContentProvider");const[,i]=a,l=(0,o.Mh)(t);return(0,r.useEffect)((()=>{i({component:n,props:l})}),[i,n,l]),(0,r.useEffect)((()=>()=>i({component:null,props:null})),[i]),null}},204:(e,n,t)=>{"use strict";t.d(n,{m:()=>o,W:()=>a});var r=t(1504);const o="navigation-with-keyboard";function a(){(0,r.useEffect)((()=>{function e(e){"keydown"===e.type&&"Tab"===e.key&&document.body.classList.add(o),"mousedown"===e.type&&document.body.classList.remove(o)}return document.addEventListener("keydown",e),document.addEventListener("mousedown",e),()=>{document.body.classList.remove(o),document.removeEventListener("keydown",e),document.removeEventListener("mousedown",e)}}),[])}},7092:(e,n,t)=>{"use strict";t.d(n,{Y:()=>l,a:()=>i});var r=t(1504),o=t(8264),a=t(632);const s="q";function i(){return(0,a.E9)(s)}function l(){const{siteConfig:{baseUrl:e,themeConfig:n}}=(0,o.c)(),{algolia:{searchPagePath:t}}=n;return(0,r.useCallback)((n=>`${e}${t}?${s}=${encodeURIComponent(n)}`),[e,t])}},1432:(e,n,t)=>{"use strict";t.d(n,{U:()=>i});var r=t(1504),o=t(8684);const a={desktop:"desktop",mobile:"mobile",ssr:"ssr"},s=996;function i(e){let{desktopBreakpoint:n=s}=void 0===e?{}:e;const[t,i]=(0,r.useState)((()=>"ssr"));return(0,r.useEffect)((()=>{function e(){i(function(e){if(!o.c.canUseDOM)throw new Error("getWindowSize() should only be called after React hydration");return window.innerWidth>e?a.desktop:a.mobile}(n))}return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[n]),t}},5864:(e,n,t)=>{"use strict";t.d(n,{W:()=>r});const r={page:{blogListPage:"blog-list-page",blogPostPage:"blog-post-page",blogTagsListPage:"blog-tags-list-page",blogTagPostListPage:"blog-tags-post-list-page",docsDocPage:"docs-doc-page",docsTagsListPage:"docs-tags-list-page",docsTagDocListPage:"docs-tags-doc-list-page",mdxPage:"mdx-page"},wrapper:{main:"main-wrapper",blogPages:"blog-wrapper",docsPages:"docs-wrapper",mdxPages:"mdx-wrapper"},common:{editThisPage:"theme-edit-this-page",lastUpdated:"theme-last-updated",backToTopButton:"theme-back-to-top-button",codeBlock:"theme-code-block",admonition:"theme-admonition",unlistedBanner:"theme-unlisted-banner",admonitionType:e=>`theme-admonition-${e}`},layout:{},docs:{docVersionBanner:"theme-doc-version-banner",docVersionBadge:"theme-doc-version-badge",docBreadcrumbs:"theme-doc-breadcrumbs",docMarkdown:"theme-doc-markdown",docTocMobile:"theme-doc-toc-mobile",docTocDesktop:"theme-doc-toc-desktop",docFooter:"theme-doc-footer",docFooterTagsRow:"theme-doc-footer-tags-row",docFooterEditMetaRow:"theme-doc-footer-edit-meta-row",docSidebarContainer:"theme-doc-sidebar-container",docSidebarMenu:"theme-doc-sidebar-menu",docSidebarItemCategory:"theme-doc-sidebar-item-category",docSidebarItemLink:"theme-doc-sidebar-item-link",docSidebarItemCategoryLevel:e=>`theme-doc-sidebar-item-category-level-${e}`,docSidebarItemLinkLevel:e=>`theme-doc-sidebar-item-link-level-${e}`},blog:{}}},3856:(e,n,t)=>{"use strict";function r(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}t.d(n,{I:()=>r})},9940:(e,n,t)=>{"use strict";t.d(n,{Gw:()=>f,Md:()=>h,c1:()=>p,Uj:()=>T,b7:()=>w,Qf:()=>k,Ab:()=>x,js:()=>S,mg:()=>b});var r=t(1504),o=t(5592),a=t(5464),s=t(5172),i=t(4592),l=t(9920),c=t(6192);function u(e){return Array.from(new Set(e))}var d=t(3376);const p=!!s.L0;function f(e){return"link"!==e.type||e.unlisted?"category"===e.type?function(e){if(e.href&&!e.linkUnlisted)return e.href;for(const n of e.items){const e=f(n);if(e)return e}}(e):void 0:e.href}const m=(e,n)=>void 0!==e&&(0,d.Sc)(e,n),g=(e,n)=>e.some((e=>h(e,n)));function h(e,n){return"link"===e.type?m(e.href,n):"category"===e.type&&(m(e.href,n)||g(e.items,n))}function y(e,n){switch(e.type){case"category":return h(e,n)||e.items.some((e=>y(e,n)));case"link":return!e.unlisted||h(e,n);default:return!0}}function b(e,n){return(0,r.useMemo)((()=>e.filter((e=>y(e,n)))),[e,n])}function v(e){let{sidebarItems:n,pathname:t,onlyCategories:r=!1}=e;const o=[];return function e(n){for(const a of n)if("category"===a.type&&((0,d.Sc)(a.href,t)||e(a.items))||"link"===a.type&&(0,d.Sc)(a.href,t)){return r&&"category"!==a.type||o.unshift(a),!0}return!1}(n),o}function S(){const e=(0,c.m)(),{pathname:n}=(0,o.IT)(),t=(0,s.UF)()?.pluginData.breadcrumbs;return!1!==t&&e?v({sidebarItems:e.items,pathname:n}):null}function w(e){const{activeVersion:n}=(0,s.wB)(e),{preferredVersion:t}=(0,i.iy)(e),o=(0,s.aA)(e);return(0,r.useMemo)((()=>u([n,t,o].filter(Boolean))),[n,t,o])}function x(e,n){const t=w(n);return(0,r.useMemo)((()=>{const n=t.flatMap((e=>e.sidebars?Object.entries(e.sidebars):[])),r=n.find((n=>n[0]===e));if(!r)throw new Error(`Can't find any sidebar with id "${e}" in version${t.length>1?"s":""} ${t.map((e=>e.name)).join(", ")}".\nAvailable sidebar ids are:\n- ${n.map((e=>e[0])).join("\n- ")}`);return r[1]}),[e,t])}function k(e,n){const t=w(n);return(0,r.useMemo)((()=>{const n=t.flatMap((e=>e.docs)),r=n.find((n=>n.id===e));if(!r){if(t.flatMap((e=>e.draftIds)).includes(e))return null;throw new Error(`Couldn't find any doc with id "${e}" in version${t.length>1?"s":""} "${t.map((e=>e.name)).join(", ")}".\nAvailable doc ids are:\n- ${u(n.map((e=>e.id))).join("\n- ")}`)}return r}),[e,t])}function T(e){let{route:n}=e;const t=(0,o.IT)(),r=(0,l.E)(),s=n.routes,i=s.find((e=>(0,o.ot)(t.pathname,e)));if(!i)return null;const c=i.sidebar,u=c?r.docsSidebars[c]:void 0;return{docElement:(0,a.k)(s),sidebarName:c,sidebarItems:u}}},8648:(e,n,t)=>{"use strict";t.d(n,{g:()=>o});var r=t(8264);function o(e){const{siteConfig:n}=(0,r.c)(),{title:t,titleDelimiter:o}=n;return e?.trim().length?`${e.trim()} ${o} ${t}`:t}},632:(e,n,t)=>{"use strict";t.d(n,{E9:()=>l,a4:()=>s});var r=t(1504),o=t(5592),a=t(1100);function s(e){!function(e){const n=(0,o.Uz)(),t=(0,a.yA)(e);(0,r.useEffect)((()=>n.block(((e,n)=>t(e,n)))),[n,t])}(((n,t)=>{if("POP"===t)return e(n,t)}))}function i(e){return function(e){const n=(0,o.Uz)();return(0,r.useSyncExternalStore)(n.listen,(()=>e(n)),(()=>e(n)))}((n=>null===e?null:new URLSearchParams(n.location.search).get(e)))}function l(e){const n=i(e)??"",t=function(){const e=(0,o.Uz)();return(0,r.useCallback)(((n,t,r)=>{const o=new URLSearchParams(e.location.search);t?o.set(n,t):o.delete(n),(r?.push?e.push:e.replace)({search:o.toString()})}),[e])}();return[n,(0,r.useCallback)(((n,r)=>{t(e,n,r)}),[t,e])]}},5008:(e,n,t)=>{"use strict";t.d(n,{cr:()=>f,U7:()=>d,w7:()=>m});var r=t(1504),o=t(5456),a=t(6952),s=t(5548);function i(){const e=r.useContext(s.e);if(!e)throw new Error("Unexpected: no Docusaurus route context found");return e}var l=t(964),c=t(8648),u=t(7624);function d(e){let{title:n,description:t,keywords:r,image:o,children:s}=e;const i=(0,c.g)(n),{withBaseUrl:d}=(0,l.E)(),p=o?d(o,{absolute:!0}):void 0;return(0,u.jsxs)(a.c,{children:[n&&(0,u.jsx)("title",{children:i}),n&&(0,u.jsx)("meta",{property:"og:title",content:i}),t&&(0,u.jsx)("meta",{name:"description",content:t}),t&&(0,u.jsx)("meta",{property:"og:description",content:t}),r&&(0,u.jsx)("meta",{name:"keywords",content:Array.isArray(r)?r.join(","):r}),p&&(0,u.jsx)("meta",{property:"og:image",content:p}),p&&(0,u.jsx)("meta",{name:"twitter:image",content:p}),s]})}const p=r.createContext(void 0);function f(e){let{className:n,children:t}=e;const s=r.useContext(p),i=(0,o.c)(s,n);return(0,u.jsxs)(p.Provider,{value:i,children:[(0,u.jsx)(a.c,{children:(0,u.jsx)("html",{className:i})}),t]})}function m(e){let{children:n}=e;const t=i(),r=`plugin-${t.plugin.name.replace(/docusaurus-(?:plugin|theme)-(?:content-)?/gi,"")}`;const a=`plugin-id-${t.plugin.id}`;return(0,u.jsx)(f,{className:(0,o.c)(r,a),children:n})}},1100:(e,n,t)=>{"use strict";t.d(n,{AH:()=>l,Mh:()=>c,i0:()=>i,qY:()=>u,yA:()=>s});var r=t(1504),o=t(5288),a=t(7624);function s(e){const n=(0,r.useRef)(e);return(0,o.c)((()=>{n.current=e}),[e]),(0,r.useCallback)((function(){return n.current(...arguments)}),[])}function i(e){const n=(0,r.useRef)();return(0,o.c)((()=>{n.current=e})),n.current}class l extends Error{constructor(e,n){super(),this.name="ReactContextError",this.message=`Hook ${this.stack?.split("\n")[1]?.match(/at (?:\w+\.)?(?\w+)/)?.groups.name??""} is called outside the <${e}>. ${n??""}`}}function c(e){const n=Object.entries(e);return n.sort(((e,n)=>e[0].localeCompare(n[0]))),(0,r.useMemo)((()=>e),n.flat())}function u(e){return n=>{let{children:t}=n;return(0,a.jsx)(a.Fragment,{children:e.reduceRight(((e,n)=>(0,a.jsx)(n,{children:e})),t)})}}},1064:(e,n,t)=>{"use strict";function r(e,n){return void 0!==e&&void 0!==n&&new RegExp(e,"gi").test(n)}t.d(n,{_:()=>r})},3376:(e,n,t)=>{"use strict";t.d(n,{Sc:()=>s,Y5:()=>i});var r=t(1504),o=t(628),a=t(8264);function s(e,n){const t=e=>(!e||e.endsWith("/")?e:`${e}/`)?.toLowerCase();return t(e)===t(n)}function i(){const{baseUrl:e}=(0,a.c)().siteConfig;return(0,r.useMemo)((()=>function(e){let{baseUrl:n,routes:t}=e;function r(e){return e.path===n&&!0===e.exact}function o(e){return e.path===n&&!e.exact}return function e(n){if(0===n.length)return;return n.find(r)||e(n.filter(o).flatMap((e=>e.routes??[])))}(t)}({routes:o.c,baseUrl:e})),[e])}},3943:(e,n,t)=>{"use strict";t.d(n,{S2:()=>c,SM:()=>p,yI:()=>f});var r=t(1504),o=t(8684),a=t(3664),s=(t(5288),t(1100)),i=t(7624);const l=r.createContext(void 0);function c(e){let{children:n}=e;const t=function(){const e=(0,r.useRef)(!0);return(0,r.useMemo)((()=>({scrollEventsEnabledRef:e,enableScrollEvents:()=>{e.current=!0},disableScrollEvents:()=>{e.current=!1}})),[])}();return(0,i.jsx)(l.Provider,{value:t,children:n})}function u(){const e=(0,r.useContext)(l);if(null==e)throw new s.AH("ScrollControllerProvider");return e}const d=()=>o.c.canUseDOM?{scrollX:window.pageXOffset,scrollY:window.pageYOffset}:null;function p(e,n){void 0===n&&(n=[]);const{scrollEventsEnabledRef:t}=u(),o=(0,r.useRef)(d()),a=(0,s.yA)(e);(0,r.useEffect)((()=>{const e=()=>{if(!t.current)return;const e=d();a(e,o.current),o.current=e},n={passive:!0};return e(),window.addEventListener("scroll",e,n),()=>window.removeEventListener("scroll",e,n)}),[a,t,...n])}function f(){const e=(0,r.useRef)(null),n=(0,a.c)()&&"smooth"===getComputedStyle(document.documentElement).scrollBehavior;return{startScroll:t=>{e.current=n?function(e){return window.scrollTo({top:e,behavior:"smooth"}),()=>{}}(t):function(e){let n=null;const t=document.documentElement.scrollTop>e;return function r(){const o=document.documentElement.scrollTop;(t&&o>e||!t&&on&&cancelAnimationFrame(n)}(t)},cancelScroll:()=>e.current?.()}}},4456:(e,n,t)=>{"use strict";t.d(n,{SE:()=>i,e6:()=>s,mY:()=>l});var r=t(5172),o=t(8264),a=t(4592);const s="default";function i(e,n){return`docs-${e}-${n}`}function l(){const{i18n:e}=(0,o.c)(),n=(0,r.L0)(),t=(0,r.mU)(),l=(0,a.eM)();const c=[s,...Object.keys(n).map((function(e){const r=t?.activePlugin.pluginId===e?t.activeVersion:void 0,o=l[e],a=n[e].versions.find((e=>e.isLast));return i(e,(r??o??a).name)}))];return{locale:e.currentLocale,tags:c}}},1148:(e,n,t)=>{"use strict";t.d(n,{GS:()=>l});t(1504);const r="localStorage";function o(e){let{key:n,oldValue:t,newValue:r,storage:o}=e;if(t===r)return;const a=document.createEvent("StorageEvent");a.initStorageEvent("storage",!1,!1,n,t,r,window.location.href,o),window.dispatchEvent(a)}function a(e){if(void 0===e&&(e=r),"undefined"==typeof window)throw new Error("Browser storage is not available on Node.js/Docusaurus SSR process.");if("none"===e)return null;try{return window[e]}catch(t){return n=t,s||(console.warn("Docusaurus browser storage is not available.\nPossible reasons: running Docusaurus in an iframe, in an incognito browser session, or using too strict browser privacy settings.",n),s=!0),null}var n}let s=!1;const i={get:()=>null,set:()=>{},del:()=>{},listen:()=>()=>{}};function l(e,n){if("undefined"==typeof window)return function(e){function n(){throw new Error(`Illegal storage API usage for storage key "${e}".\nDocusaurus storage APIs are not supposed to be called on the server-rendering process.\nPlease only call storage APIs in effects and event handlers.`)}return{get:n,set:n,del:n,listen:n}}(e);const t=a(n?.persistence);return null===t?i:{get:()=>{try{return t.getItem(e)}catch(n){return console.error(`Docusaurus storage error, can't get key=${e}`,n),null}},set:n=>{try{const r=t.getItem(e);t.setItem(e,n),o({key:e,oldValue:r,newValue:n,storage:t})}catch(r){console.error(`Docusaurus storage error, can't set ${e}=${n}`,r)}},del:()=>{try{const n=t.getItem(e);t.removeItem(e),o({key:e,oldValue:n,newValue:null,storage:t})}catch(n){console.error(`Docusaurus storage error, can't delete key=${e}`,n)}},listen:n=>{try{const r=r=>{r.storageArea===t&&r.key===e&&n(r)};return window.addEventListener("storage",r),()=>window.removeEventListener("storage",r)}catch(r){return console.error(`Docusaurus storage error, can't listen for changes of key=${e}`,r),()=>{}}}}}},1616:(e,n,t)=>{"use strict";t.d(n,{D:()=>s});var r=t(8264),o=t(5592),a=t(5684);function s(){const{siteConfig:{baseUrl:e,url:n,trailingSlash:t},i18n:{defaultLocale:s,currentLocale:i}}=(0,r.c)(),{pathname:l}=(0,o.IT)(),c=(0,a.applyTrailingSlash)(l,{trailingSlash:t,baseUrl:e}),u=i===s?e:e.replace(`/${i}/`,"/"),d=c.replace(e,"");return{createUrl:function(e){let{locale:t,fullyQualified:r}=e;return`${r?n:""}${function(e){return e===s?`${u}`:`${u}${e}/`}(t)}${d}`}}}},7124:(e,n,t)=>{"use strict";t.d(n,{c:()=>s});var r=t(1504),o=t(5592),a=t(1100);function s(e){const n=(0,o.IT)(),t=(0,a.i0)(n),s=(0,a.yA)(e);(0,r.useEffect)((()=>{t&&n!==t&&s({location:n,previousLocation:t})}),[s,n,t])}},1824:(e,n,t)=>{"use strict";t.d(n,{y:()=>o});var r=t(8264);function o(){return(0,r.c)().siteConfig.themeConfig}},8589:(e,n,t)=>{"use strict";t.d(n,{E:()=>o});var r=t(8264);function o(){const{siteConfig:{themeConfig:e}}=(0,r.c)();return e}},9032:(e,n,t)=>{"use strict";t.d(n,{Q:()=>i});var r=t(1504),o=t(1064),a=t(964),s=t(8589);function i(){const{withBaseUrl:e}=(0,a.E)(),{algolia:{externalUrlRegex:n,replaceSearchResultPathname:t}}=(0,s.E)();return(0,r.useCallback)((r=>{const a=new URL(r);if((0,o._)(n,a.href))return r;const s=`${a.pathname+a.hash}`;return e(function(e,n){return n?e.replaceAll(new RegExp(n.from,"g"),n.to):e}(s,t))}),[e,n,t])}},1600:(e,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(e,n){const{trailingSlash:t,baseUrl:r}=n;if(e.startsWith("#"))return e;if(void 0===t)return e;const[o]=e.split(/[#?]/),a="/"===o||o===r?o:(s=o,t?function(e){return e.endsWith("/")?e:`${e}/`}(s):function(e){return e.endsWith("/")?e.slice(0,-1):e}(s));var s;return e.replace(o,a)}},4292:(e,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getErrorCausalChain=void 0,n.getErrorCausalChain=function e(n){return n.cause?[n,...e(n.cause)]:[n]}},5684:function(e,n,t){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.getErrorCausalChain=n.applyTrailingSlash=n.blogPostContainerID=void 0,n.blogPostContainerID="__blog-post-container";var o=t(1600);Object.defineProperty(n,"applyTrailingSlash",{enumerable:!0,get:function(){return r(o).default}});var a=t(4292);Object.defineProperty(n,"getErrorCausalChain",{enumerable:!0,get:function(){return a.getErrorCausalChain}})},8064:(e,n,t)=>{"use strict";t.d(n,{iU:()=>S,Yf:()=>C,gh:()=>f,Wi:()=>I,Ep:()=>p});var r=t(6404);function o(e){return"/"===e.charAt(0)}function a(e,n){for(var t=n,r=t+1,o=e.length;r=0;p--){var f=s[p];"."===f?a(s,p):".."===f?(a(s,p),d++):d&&(a(s,p),d--)}if(!c)for(;d--;d)s.unshift("..");!c||""===s[0]||s[0]&&o(s[0])||s.unshift("");var m=s.join("/");return t&&"/"!==m.substr(-1)&&(m+="/"),m};var i=t(6136);function l(e){return"/"===e.charAt(0)?e:"/"+e}function c(e){return"/"===e.charAt(0)?e.substr(1):e}function u(e,n){return function(e,n){return 0===e.toLowerCase().indexOf(n.toLowerCase())&&-1!=="/?#".indexOf(e.charAt(n.length))}(e,n)?e.substr(n.length):e}function d(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e}function p(e){var n=e.pathname,t=e.search,r=e.hash,o=n||"/";return t&&"?"!==t&&(o+="?"===t.charAt(0)?t:"?"+t),r&&"#"!==r&&(o+="#"===r.charAt(0)?r:"#"+r),o}function f(e,n,t,o){var a;"string"==typeof e?(a=function(e){var n=e||"/",t="",r="",o=n.indexOf("#");-1!==o&&(r=n.substr(o),n=n.substr(0,o));var a=n.indexOf("?");return-1!==a&&(t=n.substr(a),n=n.substr(0,a)),{pathname:n,search:"?"===t?"":t,hash:"#"===r?"":r}}(e),a.state=n):(void 0===(a=(0,r.c)({},e)).pathname&&(a.pathname=""),a.search?"?"!==a.search.charAt(0)&&(a.search="?"+a.search):a.search="",a.hash?"#"!==a.hash.charAt(0)&&(a.hash="#"+a.hash):a.hash="",void 0!==n&&void 0===a.state&&(a.state=n));try{a.pathname=decodeURI(a.pathname)}catch(i){throw i instanceof URIError?new URIError('Pathname "'+a.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):i}return t&&(a.key=t),o?a.pathname?"/"!==a.pathname.charAt(0)&&(a.pathname=s(a.pathname,o.pathname)):a.pathname=o.pathname:a.pathname||(a.pathname="/"),a}function m(){var e=null;var n=[];return{setPrompt:function(n){return e=n,function(){e===n&&(e=null)}},confirmTransitionTo:function(n,t,r,o){if(null!=e){var a="function"==typeof e?e(n,t):e;"string"==typeof a?"function"==typeof r?r(a,o):o(!0):o(!1!==a)}else o(!0)},appendListener:function(e){var t=!0;function r(){t&&e.apply(void 0,arguments)}return n.push(r),function(){t=!1,n=n.filter((function(e){return e!==r}))}},notifyListeners:function(){for(var e=arguments.length,t=new Array(e),r=0;rn?t.splice(n,t.length-n,o):t.push(o),d({action:r,location:o,index:n,entries:t})}}))},replace:function(e,n){var r="REPLACE",o=f(e,n,g(),S.location);u.confirmTransitionTo(o,r,t,(function(e){e&&(S.entries[S.index]=o,d({action:r,location:o}))}))},go:v,goBack:function(){v(-1)},goForward:function(){v(1)},canGo:function(e){var n=S.index+e;return n>=0&&n{"use strict";var r=t(2168),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},a={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},s={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},i={};function l(e){return r.isMemo(e)?s:i[e.$$typeof]||o}i[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},i[r.Memo]=s;var c=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,p=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,m=Object.prototype;e.exports=function e(n,t,r){if("string"!=typeof t){if(m){var o=f(t);o&&o!==m&&e(n,o,r)}var s=u(t);d&&(s=s.concat(d(t)));for(var i=l(n),g=l(t),h=0;h{"use strict";e.exports=function(e,n,t,r,o,a,s,i){if(!e){var l;if(void 0===n)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[t,r,o,a,s,i],u=0;(l=new Error(n.replace(/%s/g,(function(){return c[u++]})))).name="Invariant Violation"}throw l.framesToPop=1,l}}},9600:e=>{e.exports=Array.isArray||function(e){return"[object Array]"==Object.prototype.toString.call(e)}},1462:(e,n,t)=>{"use strict";t.r(n)},9115:(e,n,t)=>{"use strict";t.r(n)},2272:function(e,n,t){var r,o;r=function(){var e,n,t={version:"0.2.0"},r=t.settings={minimum:.08,easing:"ease",positionUsing:"",speed:200,trickle:!0,trickleRate:.02,trickleSpeed:800,showSpinner:!0,barSelector:'[role="bar"]',spinnerSelector:'[role="spinner"]',parent:"body",template:''};function o(e,n,t){return et?t:e}function a(e){return 100*(-1+e)}function s(e,n,t){var o;return(o="translate3d"===r.positionUsing?{transform:"translate3d("+a(e)+"%,0,0)"}:"translate"===r.positionUsing?{transform:"translate("+a(e)+"%,0)"}:{"margin-left":a(e)+"%"}).transition="all "+n+"ms "+t,o}t.configure=function(e){var n,t;for(n in e)void 0!==(t=e[n])&&e.hasOwnProperty(n)&&(r[n]=t);return this},t.status=null,t.set=function(e){var n=t.isStarted();e=o(e,r.minimum,1),t.status=1===e?null:e;var a=t.render(!n),c=a.querySelector(r.barSelector),u=r.speed,d=r.easing;return a.offsetWidth,i((function(n){""===r.positionUsing&&(r.positionUsing=t.getPositioningCSS()),l(c,s(e,u,d)),1===e?(l(a,{transition:"none",opacity:1}),a.offsetWidth,setTimeout((function(){l(a,{transition:"all "+u+"ms linear",opacity:0}),setTimeout((function(){t.remove(),n()}),u)}),u)):setTimeout(n,u)})),this},t.isStarted=function(){return"number"==typeof t.status},t.start=function(){t.status||t.set(0);var e=function(){setTimeout((function(){t.status&&(t.trickle(),e())}),r.trickleSpeed)};return r.trickle&&e(),this},t.done=function(e){return e||t.status?t.inc(.3+.5*Math.random()).set(1):this},t.inc=function(e){var n=t.status;return n?("number"!=typeof e&&(e=(1-n)*o(Math.random()*n,.1,.95)),n=o(n+e,0,.994),t.set(n)):t.start()},t.trickle=function(){return t.inc(Math.random()*r.trickleRate)},e=0,n=0,t.promise=function(r){return r&&"resolved"!==r.state()?(0===n&&t.start(),e++,n++,r.always((function(){0==--n?(e=0,t.done()):t.set((e-n)/e)})),this):this},t.render=function(e){if(t.isRendered())return document.getElementById("nprogress");u(document.documentElement,"nprogress-busy");var n=document.createElement("div");n.id="nprogress",n.innerHTML=r.template;var o,s=n.querySelector(r.barSelector),i=e?"-100":a(t.status||0),c=document.querySelector(r.parent);return l(s,{transition:"all 0 linear",transform:"translate3d("+i+"%,0,0)"}),r.showSpinner||(o=n.querySelector(r.spinnerSelector))&&f(o),c!=document.body&&u(c,"nprogress-custom-parent"),c.appendChild(n),n},t.remove=function(){d(document.documentElement,"nprogress-busy"),d(document.querySelector(r.parent),"nprogress-custom-parent");var e=document.getElementById("nprogress");e&&f(e)},t.isRendered=function(){return!!document.getElementById("nprogress")},t.getPositioningCSS=function(){var e=document.body.style,n="WebkitTransform"in e?"Webkit":"MozTransform"in e?"Moz":"msTransform"in e?"ms":"OTransform"in e?"O":"";return n+"Perspective"in e?"translate3d":n+"Transform"in e?"translate":"margin"};var i=function(){var e=[];function n(){var t=e.shift();t&&t(n)}return function(t){e.push(t),1==e.length&&n()}}(),l=function(){var e=["Webkit","O","Moz","ms"],n={};function t(e){return e.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,(function(e,n){return n.toUpperCase()}))}function r(n){var t=document.body.style;if(n in t)return n;for(var r,o=e.length,a=n.charAt(0).toUpperCase()+n.slice(1);o--;)if((r=e[o]+a)in t)return r;return n}function o(e){return e=t(e),n[e]||(n[e]=r(e))}function a(e,n,t){n=o(n),e.style[n]=t}return function(e,n){var t,r,o=arguments;if(2==o.length)for(t in n)void 0!==(r=n[t])&&n.hasOwnProperty(t)&&a(e,t,r);else a(e,o[1],o[2])}}();function c(e,n){return("string"==typeof e?e:p(e)).indexOf(" "+n+" ")>=0}function u(e,n){var t=p(e),r=t+n;c(t,n)||(e.className=r.substring(1))}function d(e,n){var t,r=p(e);c(e,n)&&(t=r.replace(" "+n+" "," "),e.className=t.substring(1,t.length-1))}function p(e){return(" "+(e.className||"")+" ").replace(/\s+/gi," ")}function f(e){e&&e.parentNode&&e.parentNode.removeChild(e)}return t},void 0===(o="function"==typeof r?r.call(n,t,n,e):r)||(e.exports=o)},1596:()=>{!function(e){var n="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",t={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},r={bash:t,environment:{pattern:RegExp("\\$"+n),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+n),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};e.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+n),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},parameter:{pattern:/(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/,alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:r},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:t}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:r},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:r.entity}}],environment:{pattern:RegExp("\\$?"+n),alias:"constant"},variable:r.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},t.inside=e.languages.bash;for(var o=["comment","function-name","for-or-select","assign-left","parameter","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],a=r.variable[1].inside,s=0;s{!function(e){e.languages.diff={coord:[/^(?:\*{3}|-{3}|\+{3}).*$/m,/^@@.*@@$/m,/^\d.*$/m]};var n={"deleted-sign":"-","deleted-arrow":"<","inserted-sign":"+","inserted-arrow":">",unchanged:" ",diff:"!"};Object.keys(n).forEach((function(t){var r=n[t],o=[];/^\w+$/.test(t)||o.push(/\w+/.exec(t)[0]),"diff"===t&&o.push("bold"),e.languages.diff[t]={pattern:RegExp("^(?:["+r+"].*(?:\r\n?|\n|(?![\\s\\S])))+","m"),alias:o,inside:{line:{pattern:/(.)(?=[\s\S]).*(?:\r\n?|\n)?/,lookbehind:!0},prefix:{pattern:/[\s\S]/,alias:/\w+/.exec(t)[0]}}}})),Object.defineProperty(e.languages.diff,"PREFIXES",{value:n})}(Prism)},5960:()=>{!function(e){e.languages.ejs={delimiter:{pattern:/^<%[-_=]?|[-_]?%>$/,alias:"punctuation"},comment:/^#[\s\S]*/,"language-javascript":{pattern:/[\s\S]+/,inside:e.languages.javascript}},e.hooks.add("before-tokenize",(function(n){e.languages["markup-templating"].buildPlaceholders(n,"ejs",/<%(?!%)[\s\S]+?%>/g)})),e.hooks.add("after-tokenize",(function(n){e.languages["markup-templating"].tokenizePlaceholders(n,"ejs")})),e.languages.eta=e.languages.ejs}(Prism)},9264:()=>{Prism.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},Prism.languages.webmanifest=Prism.languages.json},1808:()=>{!function(e){function n(e,n){return"___"+e.toUpperCase()+n+"___"}Object.defineProperties(e.languages["markup-templating"]={},{buildPlaceholders:{value:function(t,r,o,a){if(t.language===r){var s=t.tokenStack=[];t.code=t.code.replace(o,(function(e){if("function"==typeof a&&!a(e))return e;for(var o,i=s.length;-1!==t.code.indexOf(o=n(r,i));)++i;return s[i]=e,o})),t.grammar=e.languages.markup}}},tokenizePlaceholders:{value:function(t,r){if(t.language===r&&t.tokenStack){t.grammar=e.languages[r];var o=0,a=Object.keys(t.tokenStack);!function s(i){for(var l=0;l=a.length);l++){var c=i[l];if("string"==typeof c||c.content&&"string"==typeof c.content){var u=a[o],d=t.tokenStack[u],p="string"==typeof c?c:c.content,f=n(r,u),m=p.indexOf(f);if(m>-1){++o;var g=p.substring(0,m),h=new e.Token(r,e.tokenize(d,t.grammar),"language-"+r,d),y=p.substring(m+f.length),b=[];g&&b.push.apply(b,s([g])),b.push(h),y&&b.push.apply(b,s([y])),"string"==typeof c?i.splice.apply(i,[l,1].concat(b)):c.content=b}}else c.content&&s(c.content)}return i}(t.tokens)}}}})}(Prism)},712:()=>{!function(e){e.languages.ruby=e.languages.extend("clike",{comment:{pattern:/#.*|^=begin\s[\s\S]*?^=end/m,greedy:!0},"class-name":{pattern:/(\b(?:class|module)\s+|\bcatch\s+\()[\w.\\]+|\b[A-Z_]\w*(?=\s*\.\s*new\b)/,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:BEGIN|END|alias|and|begin|break|case|class|def|define_method|defined|do|each|else|elsif|end|ensure|extend|for|if|in|include|module|new|next|nil|not|or|prepend|private|protected|public|raise|redo|require|rescue|retry|return|self|super|then|throw|undef|unless|until|when|while|yield)\b/,operator:/\.{2,3}|&\.|===|=>|[!=]?~|(?:&&|\|\||<<|>>|\*\*|[+\-*/%<>!^&|=])=?|[?:]/,punctuation:/[(){}[\].,;]/}),e.languages.insertBefore("ruby","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}});var n={pattern:/((?:^|[^\\])(?:\\{2})*)#\{(?:[^{}]|\{[^{}]*\})*\}/,lookbehind:!0,inside:{content:{pattern:/^(#\{)[\s\S]+(?=\}$)/,lookbehind:!0,inside:e.languages.ruby},delimiter:{pattern:/^#\{|\}$/,alias:"punctuation"}}};delete e.languages.ruby.function;var t="(?:"+[/([^a-zA-Z0-9\s{(\[<=])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/\((?:[^()\\]|\\[\s\S]|\((?:[^()\\]|\\[\s\S])*\))*\)/.source,/\{(?:[^{}\\]|\\[\s\S]|\{(?:[^{}\\]|\\[\s\S])*\})*\}/.source,/\[(?:[^\[\]\\]|\\[\s\S]|\[(?:[^\[\]\\]|\\[\s\S])*\])*\]/.source,/<(?:[^<>\\]|\\[\s\S]|<(?:[^<>\\]|\\[\s\S])*>)*>/.source].join("|")+")",r=/(?:"(?:\\.|[^"\\\r\n])*"|(?:\b[a-zA-Z_]\w*|[^\s\0-\x7F]+)[?!]?|\$.)/.source;e.languages.insertBefore("ruby","keyword",{"regex-literal":[{pattern:RegExp(/%r/.source+t+/[egimnosux]{0,6}/.source),greedy:!0,inside:{interpolation:n,regex:/[\s\S]+/}},{pattern:/(^|[^/])\/(?!\/)(?:\[[^\r\n\]]+\]|\\.|[^[/\\\r\n])+\/[egimnosux]{0,6}(?=\s*(?:$|[\r\n,.;})#]))/,lookbehind:!0,greedy:!0,inside:{interpolation:n,regex:/[\s\S]+/}}],variable:/[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/,symbol:[{pattern:RegExp(/(^|[^:]):/.source+r),lookbehind:!0,greedy:!0},{pattern:RegExp(/([\r\n{(,][ \t]*)/.source+r+/(?=:(?!:))/.source),lookbehind:!0,greedy:!0}],"method-definition":{pattern:/(\bdef\s+)\w+(?:\s*\.\s*\w+)?/,lookbehind:!0,inside:{function:/\b\w+$/,keyword:/^self\b/,"class-name":/^\w+/,punctuation:/\./}}}),e.languages.insertBefore("ruby","string",{"string-literal":[{pattern:RegExp(/%[qQiIwWs]?/.source+t),greedy:!0,inside:{interpolation:n,string:/[\s\S]+/}},{pattern:/("|')(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|(?!\1)[^\\#\r\n])*\1/,greedy:!0,inside:{interpolation:n,string:/[\s\S]+/}},{pattern:/<<[-~]?([a-z_]\w*)[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?[a-z_]\w*|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?/}},interpolation:n,string:/[\s\S]+/}},{pattern:/<<[-~]?'([a-z_]\w*)'[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?'[a-z_]\w*'|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?'|'$/}},string:/[\s\S]+/}}],"command-literal":[{pattern:RegExp(/%x/.source+t),greedy:!0,inside:{interpolation:n,command:{pattern:/[\s\S]+/,alias:"string"}}},{pattern:/`(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|[^\\`#\r\n])*`/,greedy:!0,inside:{interpolation:n,command:{pattern:/[\s\S]+/,alias:"string"}}}]}),delete e.languages.ruby.string,e.languages.insertBefore("ruby","number",{builtin:/\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Fixnum|Float|Hash|IO|Integer|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|Stat|String|Struct|Symbol|TMS|Thread|ThreadGroup|Time|TrueClass)\b/,constant:/\b[A-Z][A-Z0-9_]*(?:[?!]|\b)/}),e.languages.rb=e.languages.ruby}(Prism)},4096:(e,n,t)=>{var r={"./prism-bash":1596,"./prism-diff":1496,"./prism-ejs":5960,"./prism-json":9264,"./prism-markup-templating":1808,"./prism-ruby":712};function o(e){var n=a(e);return t(n)}function a(e){if(!t.o(r,e)){var n=new Error("Cannot find module '"+e+"'");throw n.code="MODULE_NOT_FOUND",n}return r[e]}o.keys=function(){return Object.keys(r)},o.resolve=a,e.exports=o,o.id=4096},9776:(e,n,t)=>{"use strict";var r=t(9143);function o(){}function a(){}a.resetWarningCache=o,e.exports=function(){function e(e,n,t,o,a,s){if(s!==r){var i=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}function n(){return e}e.isRequired=e;var t={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:n,element:e,elementType:e,instanceOf:n,node:e,objectOf:n,oneOf:n,oneOfType:n,shape:n,exact:n,checkPropTypes:a,resetWarningCache:o};return t.PropTypes=t,t}},3268:(e,n,t)=>{e.exports=t(9776)()},9143:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},9516:(e,n,t)=>{"use strict";var r=t(1504),o=t(4712);function a(e){for(var n="https://reactjs.org/docs/error-decoder.html?invariant="+e,t=1;tn}return!1}(n,t,o,r)&&(t=null),r||null===o?function(e){return!!d.call(m,e)||!d.call(f,e)&&(p.test(e)?m[e]=!0:(f[e]=!0,!1))}(n)&&(null===t?e.removeAttribute(n):e.setAttribute(n,""+t)):o.mustUseProperty?e[o.propertyName]=null===t?3!==o.type&&"":t:(n=o.attributeName,r=o.attributeNamespace,null===t?e.removeAttribute(n):(t=3===(o=o.type)||4===o&&!0===t?"":""+t,r?e.setAttributeNS(r,n,t):e.setAttribute(n,t))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var n=e.replace(y,b);h[n]=new g(n,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var n=e.replace(y,b);h[n]=new g(n,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var n=e.replace(y,b);h[n]=new g(n,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){h[e]=new g(e,1,!1,e.toLowerCase(),null,!1,!1)})),h.xlinkHref=new g("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){h[e]=new g(e,1,!1,e.toLowerCase(),null,!0,!0)}));var S=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,w=Symbol.for("react.element"),x=Symbol.for("react.portal"),k=Symbol.for("react.fragment"),T=Symbol.for("react.strict_mode"),E=Symbol.for("react.profiler"),C=Symbol.for("react.provider"),A=Symbol.for("react.context"),I=Symbol.for("react.forward_ref"),_=Symbol.for("react.suspense"),P=Symbol.for("react.suspense_list"),L=Symbol.for("react.memo"),R=Symbol.for("react.lazy");Symbol.for("react.scope"),Symbol.for("react.debug_trace_mode");var O=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden"),Symbol.for("react.cache"),Symbol.for("react.tracing_marker");var F=Symbol.iterator;function N(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=F&&e[F]||e["@@iterator"])?e:null}var j,D=Object.assign;function M(e){if(void 0===j)try{throw Error()}catch(t){var n=t.stack.trim().match(/\n( *(at )?)/);j=n&&n[1]||""}return"\n"+j+e}var B=!1;function $(e,n){if(!e||B)return"";B=!0;var t=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(n)if(n=function(){throw Error()},Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(n,[])}catch(c){var r=c}Reflect.construct(e,[],n)}else{try{n.call()}catch(c){r=c}e.call(n.prototype)}else{try{throw Error()}catch(c){r=c}e()}}catch(c){if(c&&r&&"string"==typeof c.stack){for(var o=c.stack.split("\n"),a=r.stack.split("\n"),s=o.length-1,i=a.length-1;1<=s&&0<=i&&o[s]!==a[i];)i--;for(;1<=s&&0<=i;s--,i--)if(o[s]!==a[i]){if(1!==s||1!==i)do{if(s--,0>--i||o[s]!==a[i]){var l="\n"+o[s].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}}while(1<=s&&0<=i);break}}}finally{B=!1,Error.prepareStackTrace=t}return(e=e?e.displayName||e.name:"")?M(e):""}function V(e){switch(e.tag){case 5:return M(e.type);case 16:return M("Lazy");case 13:return M("Suspense");case 19:return M("SuspenseList");case 0:case 2:case 15:return e=$(e.type,!1);case 11:return e=$(e.type.render,!1);case 1:return e=$(e.type,!0);default:return""}}function U(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case k:return"Fragment";case x:return"Portal";case E:return"Profiler";case T:return"StrictMode";case _:return"Suspense";case P:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case A:return(e.displayName||"Context")+".Consumer";case C:return(e._context.displayName||"Context")+".Provider";case I:var n=e.render;return(e=e.displayName)||(e=""!==(e=n.displayName||n.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case L:return null!==(n=e.displayName||null)?n:U(e.type)||"Memo";case R:n=e._payload,e=e._init;try{return U(e(n))}catch(t){}}return null}function z(e){var n=e.type;switch(e.tag){case 24:return"Cache";case 9:return(n.displayName||"Context")+".Consumer";case 10:return(n._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=(e=n.render).displayName||e.name||"",n.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return n;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return U(n);case 8:return n===T?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"==typeof n)return n.displayName||n.name||null;if("string"==typeof n)return n}return null}function H(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function W(e){var n=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===n||"radio"===n)}function G(e){e._valueTracker||(e._valueTracker=function(e){var n=W(e)?"checked":"value",t=Object.getOwnPropertyDescriptor(e.constructor.prototype,n),r=""+e[n];if(!e.hasOwnProperty(n)&&void 0!==t&&"function"==typeof t.get&&"function"==typeof t.set){var o=t.get,a=t.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return o.call(this)},set:function(e){r=""+e,a.call(this,e)}}),Object.defineProperty(e,n,{enumerable:t.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}(e))}function q(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var t=n.getValue(),r="";return e&&(r=W(e)?e.checked?"true":"false":e.value),(e=r)!==t&&(n.setValue(e),!0)}function Y(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(n){return e.body}}function K(e,n){var t=n.checked;return D({},n,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=t?t:e._wrapperState.initialChecked})}function X(e,n){var t=null==n.defaultValue?"":n.defaultValue,r=null!=n.checked?n.checked:n.defaultChecked;t=H(null!=n.value?n.value:t),e._wrapperState={initialChecked:r,initialValue:t,controlled:"checkbox"===n.type||"radio"===n.type?null!=n.checked:null!=n.value}}function Q(e,n){null!=(n=n.checked)&&v(e,"checked",n,!1)}function Z(e,n){Q(e,n);var t=H(n.value),r=n.type;if(null!=t)"number"===r?(0===t&&""===e.value||e.value!=t)&&(e.value=""+t):e.value!==""+t&&(e.value=""+t);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");n.hasOwnProperty("value")?ee(e,n.type,t):n.hasOwnProperty("defaultValue")&&ee(e,n.type,H(n.defaultValue)),null==n.checked&&null!=n.defaultChecked&&(e.defaultChecked=!!n.defaultChecked)}function J(e,n,t){if(n.hasOwnProperty("value")||n.hasOwnProperty("defaultValue")){var r=n.type;if(!("submit"!==r&&"reset"!==r||void 0!==n.value&&null!==n.value))return;n=""+e._wrapperState.initialValue,t||n===e.value||(e.value=n),e.defaultValue=n}""!==(t=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==t&&(e.name=t)}function ee(e,n,t){"number"===n&&Y(e.ownerDocument)===e||(null==t?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+t&&(e.defaultValue=""+t))}var ne=Array.isArray;function te(e,n,t,r){if(e=e.options,n){n={};for(var o=0;o"+n.valueOf().toString()+"",n=ce.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;n.firstChild;)e.appendChild(n.firstChild)}},"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,n,t,r){MSApp.execUnsafeLocalFunction((function(){return ue(e,n)}))}:ue);function pe(e,n){if(n){var t=e.firstChild;if(t&&t===e.lastChild&&3===t.nodeType)return void(t.nodeValue=n)}e.textContent=n}var fe={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},me=["Webkit","ms","Moz","O"];function ge(e,n,t){return null==n||"boolean"==typeof n||""===n?"":t||"number"!=typeof n||0===n||fe.hasOwnProperty(e)&&fe[e]?(""+n).trim():n+"px"}function he(e,n){for(var t in e=e.style,n)if(n.hasOwnProperty(t)){var r=0===t.indexOf("--"),o=ge(t,n[t],r);"float"===t&&(t="cssFloat"),r?e.setProperty(t,o):e[t]=o}}Object.keys(fe).forEach((function(e){me.forEach((function(n){n=n+e.charAt(0).toUpperCase()+e.substring(1),fe[n]=fe[e]}))}));var ye=D({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function be(e,n){if(n){if(ye[e]&&(null!=n.children||null!=n.dangerouslySetInnerHTML))throw Error(a(137,e));if(null!=n.dangerouslySetInnerHTML){if(null!=n.children)throw Error(a(60));if("object"!=typeof n.dangerouslySetInnerHTML||!("__html"in n.dangerouslySetInnerHTML))throw Error(a(61))}if(null!=n.style&&"object"!=typeof n.style)throw Error(a(62))}}function ve(e,n){if(-1===e.indexOf("-"))return"string"==typeof n.is;switch(e){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 Se=null;function we(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var xe=null,ke=null,Te=null;function Ee(e){if(e=So(e)){if("function"!=typeof xe)throw Error(a(280));var n=e.stateNode;n&&(n=xo(n),xe(e.stateNode,e.type,n))}}function Ce(e){ke?Te?Te.push(e):Te=[e]:ke=e}function Ae(){if(ke){var e=ke,n=Te;if(Te=ke=null,Ee(e),n)for(e=0;e>>=0,0===e?32:31-(ln(e)/cn|0)|0},ln=Math.log,cn=Math.LN2;var un=64,dn=4194304;function pn(e){switch(e&-e){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: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 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function fn(e,n){var t=e.pendingLanes;if(0===t)return 0;var r=0,o=e.suspendedLanes,a=e.pingedLanes,s=268435455&t;if(0!==s){var i=s&~o;0!==i?r=pn(i):0!==(a&=s)&&(r=pn(a))}else 0!==(s=t&~o)?r=pn(s):0!==a&&(r=pn(a));if(0===r)return 0;if(0!==n&&n!==r&&0==(n&o)&&((o=r&-r)>=(a=n&-n)||16===o&&0!=(4194240&a)))return n;if(0!=(4&r)&&(r|=16&t),0!==(n=e.entangledLanes))for(e=e.entanglements,n&=r;0t;t++)n.push(e);return n}function bn(e,n,t){e.pendingLanes|=n,536870912!==n&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[n=31-sn(n)]=t}function vn(e,n){var t=e.entangledLanes|=n;for(e=e.entanglements;t;){var r=31-sn(t),o=1<=Nt),Mt=String.fromCharCode(32),Bt=!1;function $t(e,n){switch(e){case"keyup":return-1!==Ot.indexOf(n.keyCode);case"keydown":return 229!==n.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Vt(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var Ut=!1;var zt={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 Ht(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===n?!!zt[e.type]:"textarea"===n}function Wt(e,n,t,r){Ce(r),0<(n=Gr(n,"onChange")).length&&(t=new ut("onChange","change",null,t,r),e.push({event:t,listeners:n}))}var Gt=null,qt=null;function Yt(e){Mr(e,0)}function Kt(e){if(q(wo(e)))return e}function Xt(e,n){if("change"===e)return n}var Qt=!1;if(u){var Zt;if(u){var Jt="oninput"in document;if(!Jt){var er=document.createElement("div");er.setAttribute("oninput","return;"),Jt="function"==typeof er.oninput}Zt=Jt}else Zt=!1;Qt=Zt&&(!document.documentMode||9=n)return{node:r,offset:n-e};e=t}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=cr(r)}}function dr(e,n){return!(!e||!n)&&(e===n||(!e||3!==e.nodeType)&&(n&&3===n.nodeType?dr(e,n.parentNode):"contains"in e?e.contains(n):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(n))))}function pr(){for(var e=window,n=Y();n instanceof e.HTMLIFrameElement;){try{var t="string"==typeof n.contentWindow.location.href}catch(r){t=!1}if(!t)break;n=Y((e=n.contentWindow).document)}return n}function fr(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n&&("input"===n&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===n||"true"===e.contentEditable)}function mr(e){var n=pr(),t=e.focusedElem,r=e.selectionRange;if(n!==t&&t&&t.ownerDocument&&dr(t.ownerDocument.documentElement,t)){if(null!==r&&fr(t))if(n=r.start,void 0===(e=r.end)&&(e=n),"selectionStart"in t)t.selectionStart=n,t.selectionEnd=Math.min(e,t.value.length);else if((e=(n=t.ownerDocument||document)&&n.defaultView||window).getSelection){e=e.getSelection();var o=t.textContent.length,a=Math.min(r.start,o);r=void 0===r.end?a:Math.min(r.end,o),!e.extend&&a>r&&(o=r,r=a,a=o),o=ur(t,a);var s=ur(t,r);o&&s&&(1!==e.rangeCount||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&((n=n.createRange()).setStart(o.node,o.offset),e.removeAllRanges(),a>r?(e.addRange(n),e.extend(s.node,s.offset)):(n.setEnd(s.node,s.offset),e.addRange(n)))}for(n=[],e=t;e=e.parentNode;)1===e.nodeType&&n.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"==typeof t.focus&&t.focus(),t=0;t=document.documentMode,hr=null,yr=null,br=null,vr=!1;function Sr(e,n,t){var r=t.window===t?t.document:9===t.nodeType?t:t.ownerDocument;vr||null==hr||hr!==Y(r)||("selectionStart"in(r=hr)&&fr(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},br&&lr(br,r)||(br=r,0<(r=Gr(yr,"onSelect")).length&&(n=new ut("onSelect","select",null,n,t),e.push({event:n,listeners:r}),n.target=hr)))}function wr(e,n){var t={};return t[e.toLowerCase()]=n.toLowerCase(),t["Webkit"+e]="webkit"+n,t["Moz"+e]="moz"+n,t}var xr={animationend:wr("Animation","AnimationEnd"),animationiteration:wr("Animation","AnimationIteration"),animationstart:wr("Animation","AnimationStart"),transitionend:wr("Transition","TransitionEnd")},kr={},Tr={};function Er(e){if(kr[e])return kr[e];if(!xr[e])return e;var n,t=xr[e];for(n in t)if(t.hasOwnProperty(n)&&n in Tr)return kr[e]=t[n];return e}u&&(Tr=document.createElement("div").style,"AnimationEvent"in window||(delete xr.animationend.animation,delete xr.animationiteration.animation,delete xr.animationstart.animation),"TransitionEvent"in window||delete xr.transitionend.transition);var Cr=Er("animationend"),Ar=Er("animationiteration"),Ir=Er("animationstart"),_r=Er("transitionend"),Pr=new Map,Lr="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error 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(" ");function Rr(e,n){Pr.set(e,n),l(n,[e])}for(var Or=0;OrTo||(e.current=ko[To],ko[To]=null,To--)}function Ao(e,n){To++,ko[To]=e.current,e.current=n}var Io={},_o=Eo(Io),Po=Eo(!1),Lo=Io;function Ro(e,n){var t=e.type.contextTypes;if(!t)return Io;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===n)return r.__reactInternalMemoizedMaskedChildContext;var o,a={};for(o in t)a[o]=n[o];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=n,e.__reactInternalMemoizedMaskedChildContext=a),a}function Oo(e){return null!=(e=e.childContextTypes)}function Fo(){Co(Po),Co(_o)}function No(e,n,t){if(_o.current!==Io)throw Error(a(168));Ao(_o,n),Ao(Po,t)}function jo(e,n,t){var r=e.stateNode;if(n=n.childContextTypes,"function"!=typeof r.getChildContext)return t;for(var o in r=r.getChildContext())if(!(o in n))throw Error(a(108,z(e)||"Unknown",o));return D({},t,r)}function Do(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Io,Lo=_o.current,Ao(_o,e),Ao(Po,Po.current),!0}function Mo(e,n,t){var r=e.stateNode;if(!r)throw Error(a(169));t?(e=jo(e,n,Lo),r.__reactInternalMemoizedMergedChildContext=e,Co(Po),Co(_o),Ao(_o,e)):Co(Po),Ao(Po,t)}var Bo=null,$o=!1,Vo=!1;function Uo(e){null===Bo?Bo=[e]:Bo.push(e)}function zo(){if(!Vo&&null!==Bo){Vo=!0;var e=0,n=Sn;try{var t=Bo;for(Sn=1;e>=s,o-=s,Qo=1<<32-sn(n)+o|t<g?(h=d,d=null):h=d.sibling;var y=f(o,d,i[g],l);if(null===y){null===d&&(d=h);break}e&&d&&null===y.alternate&&n(o,d),a=s(y,a,g),null===u?c=y:u.sibling=y,u=y,d=h}if(g===i.length)return t(o,d),aa&&Jo(o,g),c;if(null===d){for(;gh?(y=g,g=null):y=g.sibling;var v=f(o,g,b.value,c);if(null===v){null===g&&(g=y);break}e&&g&&null===v.alternate&&n(o,g),i=s(v,i,h),null===d?u=v:d.sibling=v,d=v,g=y}if(b.done)return t(o,g),aa&&Jo(o,h),u;if(null===g){for(;!b.done;h++,b=l.next())null!==(b=p(o,b.value,c))&&(i=s(b,i,h),null===d?u=b:d.sibling=b,d=b);return aa&&Jo(o,h),u}for(g=r(o,g);!b.done;h++,b=l.next())null!==(b=m(g,o,h,b.value,c))&&(e&&null!==b.alternate&&g.delete(null===b.key?h:b.key),i=s(b,i,h),null===d?u=b:d.sibling=b,d=b);return e&&g.forEach((function(e){return n(o,e)})),aa&&Jo(o,h),u}return function e(r,a,s,l){if("object"==typeof s&&null!==s&&s.type===k&&null===s.key&&(s=s.props.children),"object"==typeof s&&null!==s){switch(s.$$typeof){case w:e:{for(var c=s.key,u=a;null!==u;){if(u.key===c){if((c=s.type)===k){if(7===u.tag){t(r,u.sibling),(a=o(u,s.props.children)).return=r,r=a;break e}}else if(u.elementType===c||"object"==typeof c&&null!==c&&c.$$typeof===R&&Ka(c)===u.type){t(r,u.sibling),(a=o(u,s.props)).ref=qa(r,u,s),a.return=r,r=a;break e}t(r,u);break}n(r,u),u=u.sibling}s.type===k?((a=jc(s.props.children,r.mode,l,s.key)).return=r,r=a):((l=Nc(s.type,s.key,s.props,null,r.mode,l)).ref=qa(r,a,s),l.return=r,r=l)}return i(r);case x:e:{for(u=s.key;null!==a;){if(a.key===u){if(4===a.tag&&a.stateNode.containerInfo===s.containerInfo&&a.stateNode.implementation===s.implementation){t(r,a.sibling),(a=o(a,s.children||[])).return=r,r=a;break e}t(r,a);break}n(r,a),a=a.sibling}(a=Bc(s,r.mode,l)).return=r,r=a}return i(r);case R:return e(r,a,(u=s._init)(s._payload),l)}if(ne(s))return g(r,a,s,l);if(N(s))return h(r,a,s,l);Ya(r,s)}return"string"==typeof s&&""!==s||"number"==typeof s?(s=""+s,null!==a&&6===a.tag?(t(r,a.sibling),(a=o(a,s)).return=r,r=a):(t(r,a),(a=Mc(s,r.mode,l)).return=r,r=a),i(r)):t(r,a)}}var Qa=Xa(!0),Za=Xa(!1),Ja={},es=Eo(Ja),ns=Eo(Ja),ts=Eo(Ja);function rs(e){if(e===Ja)throw Error(a(174));return e}function os(e,n){switch(Ao(ts,n),Ao(ns,e),Ao(es,Ja),e=n.nodeType){case 9:case 11:n=(n=n.documentElement)?n.namespaceURI:le(null,"");break;default:n=le(n=(e=8===e?n.parentNode:n).namespaceURI||null,e=e.tagName)}Co(es),Ao(es,n)}function as(){Co(es),Co(ns),Co(ts)}function ss(e){rs(ts.current);var n=rs(es.current),t=le(n,e.type);n!==t&&(Ao(ns,e),Ao(es,t))}function is(e){ns.current===e&&(Co(es),Co(ns))}var ls=Eo(0);function cs(e){for(var n=e;null!==n;){if(13===n.tag){var t=n.memoizedState;if(null!==t&&(null===(t=t.dehydrated)||"$?"===t.data||"$!"===t.data))return n}else if(19===n.tag&&void 0!==n.memoizedProps.revealOrder){if(0!=(128&n.flags))return n}else if(null!==n.child){n.child.return=n,n=n.child;continue}if(n===e)break;for(;null===n.sibling;){if(null===n.return||n.return===e)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}var us=[];function ds(){for(var e=0;et?t:4,e(!0);var r=fs.transition;fs.transition={};try{e(!1),n()}finally{Sn=t,fs.transition=r}}function ei(){return As().memoizedState}function ni(e,n,t){var r=tc(e);if(t={lane:r,action:t,hasEagerState:!1,eagerState:null,next:null},ri(e))oi(n,t);else if(null!==(t=_a(e,n,t,r))){rc(t,e,r,nc()),ai(t,n,r)}}function ti(e,n,t){var r=tc(e),o={lane:r,action:t,hasEagerState:!1,eagerState:null,next:null};if(ri(e))oi(n,o);else{var a=e.alternate;if(0===e.lanes&&(null===a||0===a.lanes)&&null!==(a=n.lastRenderedReducer))try{var s=n.lastRenderedState,i=a(s,t);if(o.hasEagerState=!0,o.eagerState=i,ir(i,s)){var l=n.interleaved;return null===l?(o.next=o,Ia(n)):(o.next=l.next,l.next=o),void(n.interleaved=o)}}catch(c){}null!==(t=_a(e,n,o,r))&&(rc(t,e,r,o=nc()),ai(t,n,r))}}function ri(e){var n=e.alternate;return e===gs||null!==n&&n===gs}function oi(e,n){vs=bs=!0;var t=e.pending;null===t?n.next=n:(n.next=t.next,t.next=n),e.pending=n}function ai(e,n,t){if(0!=(4194240&t)){var r=n.lanes;t|=r&=e.pendingLanes,n.lanes=t,vn(e,t)}}var si={readContext:Ca,useCallback:xs,useContext:xs,useEffect:xs,useImperativeHandle:xs,useInsertionEffect:xs,useLayoutEffect:xs,useMemo:xs,useReducer:xs,useRef:xs,useState:xs,useDebugValue:xs,useDeferredValue:xs,useTransition:xs,useMutableSource:xs,useSyncExternalStore:xs,useId:xs,unstable_isNewReconciler:!1},ii={readContext:Ca,useCallback:function(e,n){return Cs().memoizedState=[e,void 0===n?null:n],e},useContext:Ca,useEffect:zs,useImperativeHandle:function(e,n,t){return t=null!=t?t.concat([e]):null,Vs(4194308,4,qs.bind(null,n,e),t)},useLayoutEffect:function(e,n){return Vs(4194308,4,e,n)},useInsertionEffect:function(e,n){return Vs(4,2,e,n)},useMemo:function(e,n){var t=Cs();return n=void 0===n?null:n,e=e(),t.memoizedState=[e,n],e},useReducer:function(e,n,t){var r=Cs();return n=void 0!==t?t(n):n,r.memoizedState=r.baseState=n,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:n},r.queue=e,e=e.dispatch=ni.bind(null,gs,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},Cs().memoizedState=e},useState:Ms,useDebugValue:Ks,useDeferredValue:function(e){return Cs().memoizedState=e},useTransition:function(){var e=Ms(!1),n=e[0];return e=Js.bind(null,e[1]),Cs().memoizedState=e,[n,e]},useMutableSource:function(){},useSyncExternalStore:function(e,n,t){var r=gs,o=Cs();if(aa){if(void 0===t)throw Error(a(407));t=t()}else{if(t=n(),null===Pl)throw Error(a(349));0!=(30&ms)||Os(r,n,t)}o.memoizedState=t;var s={value:t,getSnapshot:n};return o.queue=s,zs(Ns.bind(null,r,s,e),[e]),r.flags|=2048,Bs(9,Fs.bind(null,r,s,t,n),void 0,null),t},useId:function(){var e=Cs(),n=Pl.identifierPrefix;if(aa){var t=Zo;n=":"+n+"R"+(t=(Qo&~(1<<32-sn(Qo)-1)).toString(32)+t),0<(t=Ss++)&&(n+="H"+t.toString(32)),n+=":"}else n=":"+n+"r"+(t=ws++).toString(32)+":";return e.memoizedState=n},unstable_isNewReconciler:!1},li={readContext:Ca,useCallback:Xs,useContext:Ca,useEffect:Hs,useImperativeHandle:Ys,useInsertionEffect:Ws,useLayoutEffect:Gs,useMemo:Qs,useReducer:_s,useRef:$s,useState:function(){return _s(Is)},useDebugValue:Ks,useDeferredValue:function(e){return Zs(As(),hs.memoizedState,e)},useTransition:function(){return[_s(Is)[0],As().memoizedState]},useMutableSource:Ls,useSyncExternalStore:Rs,useId:ei,unstable_isNewReconciler:!1},ci={readContext:Ca,useCallback:Xs,useContext:Ca,useEffect:Hs,useImperativeHandle:Ys,useInsertionEffect:Ws,useLayoutEffect:Gs,useMemo:Qs,useReducer:Ps,useRef:$s,useState:function(){return Ps(Is)},useDebugValue:Ks,useDeferredValue:function(e){var n=As();return null===hs?n.memoizedState=e:Zs(n,hs.memoizedState,e)},useTransition:function(){return[Ps(Is)[0],As().memoizedState]},useMutableSource:Ls,useSyncExternalStore:Rs,useId:ei,unstable_isNewReconciler:!1};function ui(e,n){try{var t="",r=n;do{t+=V(r),r=r.return}while(r);var o=t}catch(a){o="\nError generating stack: "+a.message+"\n"+a.stack}return{value:e,source:n,stack:o,digest:null}}function di(e,n,t){return{value:e,source:null,stack:null!=t?t:null,digest:null!=n?n:null}}function pi(e,n){try{console.error(n.value)}catch(t){setTimeout((function(){throw t}))}}var fi="function"==typeof WeakMap?WeakMap:Map;function mi(e,n,t){(t=Fa(-1,t)).tag=3,t.payload={element:null};var r=n.value;return t.callback=function(){Wl||(Wl=!0,Gl=r),pi(0,n)},t}function gi(e,n,t){(t=Fa(-1,t)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var o=n.value;t.payload=function(){return r(o)},t.callback=function(){pi(0,n)}}var a=e.stateNode;return null!==a&&"function"==typeof a.componentDidCatch&&(t.callback=function(){pi(0,n),"function"!=typeof r&&(null===ql?ql=new Set([this]):ql.add(this));var e=n.stack;this.componentDidCatch(n.value,{componentStack:null!==e?e:""})}),t}function hi(e,n,t){var r=e.pingCache;if(null===r){r=e.pingCache=new fi;var o=new Set;r.set(n,o)}else void 0===(o=r.get(n))&&(o=new Set,r.set(n,o));o.has(t)||(o.add(t),e=Cc.bind(null,e,n,t),n.then(e,e))}function yi(e){do{var n;if((n=13===e.tag)&&(n=null===(n=e.memoizedState)||null!==n.dehydrated),n)return e;e=e.return}while(null!==e);return null}function bi(e,n,t,r,o){return 0==(1&e.mode)?(e===n?e.flags|=65536:(e.flags|=128,t.flags|=131072,t.flags&=-52805,1===t.tag&&(null===t.alternate?t.tag=17:((n=Fa(-1,1)).tag=2,Na(t,n,1))),t.lanes|=1),e):(e.flags|=65536,e.lanes=o,e)}var vi=S.ReactCurrentOwner,Si=!1;function wi(e,n,t,r){n.child=null===e?Za(n,null,t,r):Qa(n,e.child,t,r)}function xi(e,n,t,r,o){t=t.render;var a=n.ref;return Ea(n,o),r=Ts(e,n,t,r,a,o),t=Es(),null===e||Si?(aa&&t&&na(n),n.flags|=1,wi(e,n,r,o),n.child):(n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~o,Wi(e,n,o))}function ki(e,n,t,r,o){if(null===e){var a=t.type;return"function"!=typeof a||Oc(a)||void 0!==a.defaultProps||null!==t.compare||void 0!==t.defaultProps?((e=Nc(t.type,null,r,n,n.mode,o)).ref=n.ref,e.return=n,n.child=e):(n.tag=15,n.type=a,Ti(e,n,a,r,o))}if(a=e.child,0==(e.lanes&o)){var s=a.memoizedProps;if((t=null!==(t=t.compare)?t:lr)(s,r)&&e.ref===n.ref)return Wi(e,n,o)}return n.flags|=1,(e=Fc(a,r)).ref=n.ref,e.return=n,n.child=e}function Ti(e,n,t,r,o){if(null!==e){var a=e.memoizedProps;if(lr(a,r)&&e.ref===n.ref){if(Si=!1,n.pendingProps=r=a,0==(e.lanes&o))return n.lanes=e.lanes,Wi(e,n,o);0!=(131072&e.flags)&&(Si=!0)}}return Ai(e,n,t,r,o)}function Ei(e,n,t){var r=n.pendingProps,o=r.children,a=null!==e?e.memoizedState:null;if("hidden"===r.mode)if(0==(1&n.mode))n.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ao(Fl,Ol),Ol|=t;else{if(0==(1073741824&t))return e=null!==a?a.baseLanes|t:t,n.lanes=n.childLanes=1073741824,n.memoizedState={baseLanes:e,cachePool:null,transitions:null},n.updateQueue=null,Ao(Fl,Ol),Ol|=e,null;n.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==a?a.baseLanes:t,Ao(Fl,Ol),Ol|=r}else null!==a?(r=a.baseLanes|t,n.memoizedState=null):r=t,Ao(Fl,Ol),Ol|=r;return wi(e,n,o,t),n.child}function Ci(e,n){var t=n.ref;(null===e&&null!==t||null!==e&&e.ref!==t)&&(n.flags|=512,n.flags|=2097152)}function Ai(e,n,t,r,o){var a=Oo(t)?Lo:_o.current;return a=Ro(n,a),Ea(n,o),t=Ts(e,n,t,r,a,o),r=Es(),null===e||Si?(aa&&r&&na(n),n.flags|=1,wi(e,n,t,o),n.child):(n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~o,Wi(e,n,o))}function Ii(e,n,t,r,o){if(Oo(t)){var a=!0;Do(n)}else a=!1;if(Ea(n,o),null===n.stateNode)Hi(e,n),Ha(n,t,r),Ga(n,t,r,o),r=!0;else if(null===e){var s=n.stateNode,i=n.memoizedProps;s.props=i;var l=s.context,c=t.contextType;"object"==typeof c&&null!==c?c=Ca(c):c=Ro(n,c=Oo(t)?Lo:_o.current);var u=t.getDerivedStateFromProps,d="function"==typeof u||"function"==typeof s.getSnapshotBeforeUpdate;d||"function"!=typeof s.UNSAFE_componentWillReceiveProps&&"function"!=typeof s.componentWillReceiveProps||(i!==r||l!==c)&&Wa(n,s,r,c),La=!1;var p=n.memoizedState;s.state=p,Ma(n,r,s,o),l=n.memoizedState,i!==r||p!==l||Po.current||La?("function"==typeof u&&(Va(n,t,u,r),l=n.memoizedState),(i=La||za(n,t,i,r,p,l,c))?(d||"function"!=typeof s.UNSAFE_componentWillMount&&"function"!=typeof s.componentWillMount||("function"==typeof s.componentWillMount&&s.componentWillMount(),"function"==typeof s.UNSAFE_componentWillMount&&s.UNSAFE_componentWillMount()),"function"==typeof s.componentDidMount&&(n.flags|=4194308)):("function"==typeof s.componentDidMount&&(n.flags|=4194308),n.memoizedProps=r,n.memoizedState=l),s.props=r,s.state=l,s.context=c,r=i):("function"==typeof s.componentDidMount&&(n.flags|=4194308),r=!1)}else{s=n.stateNode,Oa(e,n),i=n.memoizedProps,c=n.type===n.elementType?i:ya(n.type,i),s.props=c,d=n.pendingProps,p=s.context,"object"==typeof(l=t.contextType)&&null!==l?l=Ca(l):l=Ro(n,l=Oo(t)?Lo:_o.current);var f=t.getDerivedStateFromProps;(u="function"==typeof f||"function"==typeof s.getSnapshotBeforeUpdate)||"function"!=typeof s.UNSAFE_componentWillReceiveProps&&"function"!=typeof s.componentWillReceiveProps||(i!==d||p!==l)&&Wa(n,s,r,l),La=!1,p=n.memoizedState,s.state=p,Ma(n,r,s,o);var m=n.memoizedState;i!==d||p!==m||Po.current||La?("function"==typeof f&&(Va(n,t,f,r),m=n.memoizedState),(c=La||za(n,t,c,r,p,m,l)||!1)?(u||"function"!=typeof s.UNSAFE_componentWillUpdate&&"function"!=typeof s.componentWillUpdate||("function"==typeof s.componentWillUpdate&&s.componentWillUpdate(r,m,l),"function"==typeof s.UNSAFE_componentWillUpdate&&s.UNSAFE_componentWillUpdate(r,m,l)),"function"==typeof s.componentDidUpdate&&(n.flags|=4),"function"==typeof s.getSnapshotBeforeUpdate&&(n.flags|=1024)):("function"!=typeof s.componentDidUpdate||i===e.memoizedProps&&p===e.memoizedState||(n.flags|=4),"function"!=typeof s.getSnapshotBeforeUpdate||i===e.memoizedProps&&p===e.memoizedState||(n.flags|=1024),n.memoizedProps=r,n.memoizedState=m),s.props=r,s.state=m,s.context=l,r=c):("function"!=typeof s.componentDidUpdate||i===e.memoizedProps&&p===e.memoizedState||(n.flags|=4),"function"!=typeof s.getSnapshotBeforeUpdate||i===e.memoizedProps&&p===e.memoizedState||(n.flags|=1024),r=!1)}return _i(e,n,t,r,a,o)}function _i(e,n,t,r,o,a){Ci(e,n);var s=0!=(128&n.flags);if(!r&&!s)return o&&Mo(n,t,!1),Wi(e,n,a);r=n.stateNode,vi.current=n;var i=s&&"function"!=typeof t.getDerivedStateFromError?null:r.render();return n.flags|=1,null!==e&&s?(n.child=Qa(n,e.child,null,a),n.child=Qa(n,null,i,a)):wi(e,n,i,a),n.memoizedState=r.state,o&&Mo(n,t,!0),n.child}function Pi(e){var n=e.stateNode;n.pendingContext?No(0,n.pendingContext,n.pendingContext!==n.context):n.context&&No(0,n.context,!1),os(e,n.containerInfo)}function Li(e,n,t,r,o){return ma(),ga(o),n.flags|=256,wi(e,n,t,r),n.child}var Ri,Oi,Fi,Ni,ji={dehydrated:null,treeContext:null,retryLane:0};function Di(e){return{baseLanes:e,cachePool:null,transitions:null}}function Mi(e,n,t){var r,o=n.pendingProps,s=ls.current,i=!1,l=0!=(128&n.flags);if((r=l)||(r=(null===e||null!==e.memoizedState)&&0!=(2&s)),r?(i=!0,n.flags&=-129):null!==e&&null===e.memoizedState||(s|=1),Ao(ls,1&s),null===e)return ua(n),null!==(e=n.memoizedState)&&null!==(e=e.dehydrated)?(0==(1&n.mode)?n.lanes=1:"$!"===e.data?n.lanes=8:n.lanes=1073741824,null):(l=o.children,e=o.fallback,i?(o=n.mode,i=n.child,l={mode:"hidden",children:l},0==(1&o)&&null!==i?(i.childLanes=0,i.pendingProps=l):i=Dc(l,o,0,null),e=jc(e,o,t,null),i.return=n,e.return=n,i.sibling=e,n.child=i,n.child.memoizedState=Di(t),n.memoizedState=ji,e):Bi(n,l));if(null!==(s=e.memoizedState)&&null!==(r=s.dehydrated))return function(e,n,t,r,o,s,i){if(t)return 256&n.flags?(n.flags&=-257,$i(e,n,i,r=di(Error(a(422))))):null!==n.memoizedState?(n.child=e.child,n.flags|=128,null):(s=r.fallback,o=n.mode,r=Dc({mode:"visible",children:r.children},o,0,null),(s=jc(s,o,i,null)).flags|=2,r.return=n,s.return=n,r.sibling=s,n.child=r,0!=(1&n.mode)&&Qa(n,e.child,null,i),n.child.memoizedState=Di(i),n.memoizedState=ji,s);if(0==(1&n.mode))return $i(e,n,i,null);if("$!"===o.data){if(r=o.nextSibling&&o.nextSibling.dataset)var l=r.dgst;return r=l,$i(e,n,i,r=di(s=Error(a(419)),r,void 0))}if(l=0!=(i&e.childLanes),Si||l){if(null!==(r=Pl)){switch(i&-i){case 4:o=2;break;case 16:o=8;break;case 64: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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:o=32;break;case 536870912:o=268435456;break;default:o=0}0!==(o=0!=(o&(r.suspendedLanes|i))?0:o)&&o!==s.retryLane&&(s.retryLane=o,Pa(e,o),rc(r,e,o,-1))}return hc(),$i(e,n,i,r=di(Error(a(421))))}return"$?"===o.data?(n.flags|=128,n.child=e.child,n=Ic.bind(null,e),o._reactRetry=n,null):(e=s.treeContext,oa=co(o.nextSibling),ra=n,aa=!0,sa=null,null!==e&&(Yo[Ko++]=Qo,Yo[Ko++]=Zo,Yo[Ko++]=Xo,Qo=e.id,Zo=e.overflow,Xo=n),n=Bi(n,r.children),n.flags|=4096,n)}(e,n,l,o,r,s,t);if(i){i=o.fallback,l=n.mode,r=(s=e.child).sibling;var c={mode:"hidden",children:o.children};return 0==(1&l)&&n.child!==s?((o=n.child).childLanes=0,o.pendingProps=c,n.deletions=null):(o=Fc(s,c)).subtreeFlags=14680064&s.subtreeFlags,null!==r?i=Fc(r,i):(i=jc(i,l,t,null)).flags|=2,i.return=n,o.return=n,o.sibling=i,n.child=o,o=i,i=n.child,l=null===(l=e.child.memoizedState)?Di(t):{baseLanes:l.baseLanes|t,cachePool:null,transitions:l.transitions},i.memoizedState=l,i.childLanes=e.childLanes&~t,n.memoizedState=ji,o}return e=(i=e.child).sibling,o=Fc(i,{mode:"visible",children:o.children}),0==(1&n.mode)&&(o.lanes=t),o.return=n,o.sibling=null,null!==e&&(null===(t=n.deletions)?(n.deletions=[e],n.flags|=16):t.push(e)),n.child=o,n.memoizedState=null,o}function Bi(e,n){return(n=Dc({mode:"visible",children:n},e.mode,0,null)).return=e,e.child=n}function $i(e,n,t,r){return null!==r&&ga(r),Qa(n,e.child,null,t),(e=Bi(n,n.pendingProps.children)).flags|=2,n.memoizedState=null,e}function Vi(e,n,t){e.lanes|=n;var r=e.alternate;null!==r&&(r.lanes|=n),Ta(e.return,n,t)}function Ui(e,n,t,r,o){var a=e.memoizedState;null===a?e.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:r,tail:t,tailMode:o}:(a.isBackwards=n,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=t,a.tailMode=o)}function zi(e,n,t){var r=n.pendingProps,o=r.revealOrder,a=r.tail;if(wi(e,n,r.children,t),0!=(2&(r=ls.current)))r=1&r|2,n.flags|=128;else{if(null!==e&&0!=(128&e.flags))e:for(e=n.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&Vi(e,t,n);else if(19===e.tag)Vi(e,t,n);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===n)break e;for(;null===e.sibling;){if(null===e.return||e.return===n)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Ao(ls,r),0==(1&n.mode))n.memoizedState=null;else switch(o){case"forwards":for(t=n.child,o=null;null!==t;)null!==(e=t.alternate)&&null===cs(e)&&(o=t),t=t.sibling;null===(t=o)?(o=n.child,n.child=null):(o=t.sibling,t.sibling=null),Ui(n,!1,o,t,a);break;case"backwards":for(t=null,o=n.child,n.child=null;null!==o;){if(null!==(e=o.alternate)&&null===cs(e)){n.child=o;break}e=o.sibling,o.sibling=t,t=o,o=e}Ui(n,!0,t,null,a);break;case"together":Ui(n,!1,null,null,void 0);break;default:n.memoizedState=null}return n.child}function Hi(e,n){0==(1&n.mode)&&null!==e&&(e.alternate=null,n.alternate=null,n.flags|=2)}function Wi(e,n,t){if(null!==e&&(n.dependencies=e.dependencies),Dl|=n.lanes,0==(t&n.childLanes))return null;if(null!==e&&n.child!==e.child)throw Error(a(153));if(null!==n.child){for(t=Fc(e=n.child,e.pendingProps),n.child=t,t.return=n;null!==e.sibling;)e=e.sibling,(t=t.sibling=Fc(e,e.pendingProps)).return=n;t.sibling=null}return n.child}function Gi(e,n){if(!aa)switch(e.tailMode){case"hidden":n=e.tail;for(var t=null;null!==n;)null!==n.alternate&&(t=n),n=n.sibling;null===t?e.tail=null:t.sibling=null;break;case"collapsed":t=e.tail;for(var r=null;null!==t;)null!==t.alternate&&(r=t),t=t.sibling;null===r?n||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function qi(e){var n=null!==e.alternate&&e.alternate.child===e.child,t=0,r=0;if(n)for(var o=e.child;null!==o;)t|=o.lanes|o.childLanes,r|=14680064&o.subtreeFlags,r|=14680064&o.flags,o.return=e,o=o.sibling;else for(o=e.child;null!==o;)t|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=t,n}function Yi(e,n,t){var r=n.pendingProps;switch(ta(n),n.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return qi(n),null;case 1:case 17:return Oo(n.type)&&Fo(),qi(n),null;case 3:return r=n.stateNode,as(),Co(Po),Co(_o),ds(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(pa(n)?n.flags|=4:null===e||e.memoizedState.isDehydrated&&0==(256&n.flags)||(n.flags|=1024,null!==sa&&(ic(sa),sa=null))),Oi(e,n),qi(n),null;case 5:is(n);var o=rs(ts.current);if(t=n.type,null!==e&&null!=n.stateNode)Fi(e,n,t,r,o),e.ref!==n.ref&&(n.flags|=512,n.flags|=2097152);else{if(!r){if(null===n.stateNode)throw Error(a(166));return qi(n),null}if(e=rs(es.current),pa(n)){r=n.stateNode,t=n.type;var s=n.memoizedProps;switch(r[fo]=n,r[mo]=s,e=0!=(1&n.mode),t){case"dialog":Br("cancel",r),Br("close",r);break;case"iframe":case"object":case"embed":Br("load",r);break;case"video":case"audio":for(o=0;o<\/script>",e=e.removeChild(e.firstChild)):"string"==typeof r.is?e=l.createElement(t,{is:r.is}):(e=l.createElement(t),"select"===t&&(l=e,r.multiple?l.multiple=!0:r.size&&(l.size=r.size))):e=l.createElementNS(e,t),e[fo]=n,e[mo]=r,Ri(e,n,!1,!1),n.stateNode=e;e:{switch(l=ve(t,r),t){case"dialog":Br("cancel",e),Br("close",e),o=r;break;case"iframe":case"object":case"embed":Br("load",e),o=r;break;case"video":case"audio":for(o=0;ozl&&(n.flags|=128,r=!0,Gi(s,!1),n.lanes=4194304)}else{if(!r)if(null!==(e=cs(l))){if(n.flags|=128,r=!0,null!==(t=e.updateQueue)&&(n.updateQueue=t,n.flags|=4),Gi(s,!0),null===s.tail&&"hidden"===s.tailMode&&!l.alternate&&!aa)return qi(n),null}else 2*Qe()-s.renderingStartTime>zl&&1073741824!==t&&(n.flags|=128,r=!0,Gi(s,!1),n.lanes=4194304);s.isBackwards?(l.sibling=n.child,n.child=l):(null!==(t=s.last)?t.sibling=l:n.child=l,s.last=l)}return null!==s.tail?(n=s.tail,s.rendering=n,s.tail=n.sibling,s.renderingStartTime=Qe(),n.sibling=null,t=ls.current,Ao(ls,r?1&t|2:1&t),n):(qi(n),null);case 22:case 23:return pc(),r=null!==n.memoizedState,null!==e&&null!==e.memoizedState!==r&&(n.flags|=8192),r&&0!=(1&n.mode)?0!=(1073741824&Ol)&&(qi(n),6&n.subtreeFlags&&(n.flags|=8192)):qi(n),null;case 24:case 25:return null}throw Error(a(156,n.tag))}function Ki(e,n){switch(ta(n),n.tag){case 1:return Oo(n.type)&&Fo(),65536&(e=n.flags)?(n.flags=-65537&e|128,n):null;case 3:return as(),Co(Po),Co(_o),ds(),0!=(65536&(e=n.flags))&&0==(128&e)?(n.flags=-65537&e|128,n):null;case 5:return is(n),null;case 13:if(Co(ls),null!==(e=n.memoizedState)&&null!==e.dehydrated){if(null===n.alternate)throw Error(a(340));ma()}return 65536&(e=n.flags)?(n.flags=-65537&e|128,n):null;case 19:return Co(ls),null;case 4:return as(),null;case 10:return ka(n.type._context),null;case 22:case 23:return pc(),null;default:return null}}Ri=function(e,n){for(var t=n.child;null!==t;){if(5===t.tag||6===t.tag)e.appendChild(t.stateNode);else if(4!==t.tag&&null!==t.child){t.child.return=t,t=t.child;continue}if(t===n)break;for(;null===t.sibling;){if(null===t.return||t.return===n)return;t=t.return}t.sibling.return=t.return,t=t.sibling}},Oi=function(){},Fi=function(e,n,t,r){var o=e.memoizedProps;if(o!==r){e=n.stateNode,rs(es.current);var a,s=null;switch(t){case"input":o=K(e,o),r=K(e,r),s=[];break;case"select":o=D({},o,{value:void 0}),r=D({},r,{value:void 0}),s=[];break;case"textarea":o=re(e,o),r=re(e,r),s=[];break;default:"function"!=typeof o.onClick&&"function"==typeof r.onClick&&(e.onclick=Jr)}for(u in be(t,r),t=null,o)if(!r.hasOwnProperty(u)&&o.hasOwnProperty(u)&&null!=o[u])if("style"===u){var l=o[u];for(a in l)l.hasOwnProperty(a)&&(t||(t={}),t[a]="")}else"dangerouslySetInnerHTML"!==u&&"children"!==u&&"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&"autoFocus"!==u&&(i.hasOwnProperty(u)?s||(s=[]):(s=s||[]).push(u,null));for(u in r){var c=r[u];if(l=null!=o?o[u]:void 0,r.hasOwnProperty(u)&&c!==l&&(null!=c||null!=l))if("style"===u)if(l){for(a in l)!l.hasOwnProperty(a)||c&&c.hasOwnProperty(a)||(t||(t={}),t[a]="");for(a in c)c.hasOwnProperty(a)&&l[a]!==c[a]&&(t||(t={}),t[a]=c[a])}else t||(s||(s=[]),s.push(u,t)),t=c;else"dangerouslySetInnerHTML"===u?(c=c?c.__html:void 0,l=l?l.__html:void 0,null!=c&&l!==c&&(s=s||[]).push(u,c)):"children"===u?"string"!=typeof c&&"number"!=typeof c||(s=s||[]).push(u,""+c):"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&(i.hasOwnProperty(u)?(null!=c&&"onScroll"===u&&Br("scroll",e),s||l===c||(s=[])):(s=s||[]).push(u,c))}t&&(s=s||[]).push("style",t);var u=s;(n.updateQueue=u)&&(n.flags|=4)}},Ni=function(e,n,t,r){t!==r&&(n.flags|=4)};var Xi=!1,Qi=!1,Zi="function"==typeof WeakSet?WeakSet:Set,Ji=null;function el(e,n){var t=e.ref;if(null!==t)if("function"==typeof t)try{t(null)}catch(r){Ec(e,n,r)}else t.current=null}function nl(e,n,t){try{t()}catch(r){Ec(e,n,r)}}var tl=!1;function rl(e,n,t){var r=n.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var o=r=r.next;do{if((o.tag&e)===e){var a=o.destroy;o.destroy=void 0,void 0!==a&&nl(n,t,a)}o=o.next}while(o!==r)}}function ol(e,n){if(null!==(n=null!==(n=n.updateQueue)?n.lastEffect:null)){var t=n=n.next;do{if((t.tag&e)===e){var r=t.create;t.destroy=r()}t=t.next}while(t!==n)}}function al(e){var n=e.ref;if(null!==n){var t=e.stateNode;e.tag,e=t,"function"==typeof n?n(e):n.current=e}}function sl(e){var n=e.alternate;null!==n&&(e.alternate=null,sl(n)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(n=e.stateNode)&&(delete n[fo],delete n[mo],delete n[ho],delete n[yo],delete n[bo])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function il(e){return 5===e.tag||3===e.tag||4===e.tag}function ll(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||il(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function cl(e,n,t){var r=e.tag;if(5===r||6===r)e=e.stateNode,n?8===t.nodeType?t.parentNode.insertBefore(e,n):t.insertBefore(e,n):(8===t.nodeType?(n=t.parentNode).insertBefore(e,t):(n=t).appendChild(e),null!=(t=t._reactRootContainer)||null!==n.onclick||(n.onclick=Jr));else if(4!==r&&null!==(e=e.child))for(cl(e,n,t),e=e.sibling;null!==e;)cl(e,n,t),e=e.sibling}function ul(e,n,t){var r=e.tag;if(5===r||6===r)e=e.stateNode,n?t.insertBefore(e,n):t.appendChild(e);else if(4!==r&&null!==(e=e.child))for(ul(e,n,t),e=e.sibling;null!==e;)ul(e,n,t),e=e.sibling}var dl=null,pl=!1;function fl(e,n,t){for(t=t.child;null!==t;)ml(e,n,t),t=t.sibling}function ml(e,n,t){if(an&&"function"==typeof an.onCommitFiberUnmount)try{an.onCommitFiberUnmount(on,t)}catch(i){}switch(t.tag){case 5:Qi||el(t,n);case 6:var r=dl,o=pl;dl=null,fl(e,n,t),pl=o,null!==(dl=r)&&(pl?(e=dl,t=t.stateNode,8===e.nodeType?e.parentNode.removeChild(t):e.removeChild(t)):dl.removeChild(t.stateNode));break;case 18:null!==dl&&(pl?(e=dl,t=t.stateNode,8===e.nodeType?lo(e.parentNode,t):1===e.nodeType&&lo(e,t),zn(e)):lo(dl,t.stateNode));break;case 4:r=dl,o=pl,dl=t.stateNode.containerInfo,pl=!0,fl(e,n,t),dl=r,pl=o;break;case 0:case 11:case 14:case 15:if(!Qi&&(null!==(r=t.updateQueue)&&null!==(r=r.lastEffect))){o=r=r.next;do{var a=o,s=a.destroy;a=a.tag,void 0!==s&&(0!=(2&a)||0!=(4&a))&&nl(t,n,s),o=o.next}while(o!==r)}fl(e,n,t);break;case 1:if(!Qi&&(el(t,n),"function"==typeof(r=t.stateNode).componentWillUnmount))try{r.props=t.memoizedProps,r.state=t.memoizedState,r.componentWillUnmount()}catch(i){Ec(t,n,i)}fl(e,n,t);break;case 21:fl(e,n,t);break;case 22:1&t.mode?(Qi=(r=Qi)||null!==t.memoizedState,fl(e,n,t),Qi=r):fl(e,n,t);break;default:fl(e,n,t)}}function gl(e){var n=e.updateQueue;if(null!==n){e.updateQueue=null;var t=e.stateNode;null===t&&(t=e.stateNode=new Zi),n.forEach((function(n){var r=_c.bind(null,e,n);t.has(n)||(t.add(n),n.then(r,r))}))}}function hl(e,n){var t=n.deletions;if(null!==t)for(var r=0;ro&&(o=i),r&=~s}if(r=o,10<(r=(120>(r=Qe()-r)?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*El(r/1960))-r)){e.timeoutHandle=ro(xc.bind(null,e,Vl,Hl),r);break}xc(e,Vl,Hl);break;default:throw Error(a(329))}}}return oc(e,Qe()),e.callbackNode===t?ac.bind(null,e):null}function sc(e,n){var t=$l;return e.current.memoizedState.isDehydrated&&(fc(e,n).flags|=256),2!==(e=yc(e,n))&&(n=Vl,Vl=t,null!==n&&ic(n)),e}function ic(e){null===Vl?Vl=e:Vl.push.apply(Vl,e)}function lc(e,n){for(n&=~Bl,n&=~Ml,e.suspendedLanes|=n,e.pingedLanes&=~n,e=e.expirationTimes;0e?16:e,null===Kl)var r=!1;else{if(e=Kl,Kl=null,Xl=0,0!=(6&_l))throw Error(a(331));var o=_l;for(_l|=4,Ji=e.current;null!==Ji;){var s=Ji,i=s.child;if(0!=(16&Ji.flags)){var l=s.deletions;if(null!==l){for(var c=0;cQe()-Ul?fc(e,0):Bl|=t),oc(e,n)}function Ac(e,n){0===n&&(0==(1&e.mode)?n=1:(n=dn,0==(130023424&(dn<<=1))&&(dn=4194304)));var t=nc();null!==(e=Pa(e,n))&&(bn(e,n,t),oc(e,t))}function Ic(e){var n=e.memoizedState,t=0;null!==n&&(t=n.retryLane),Ac(e,t)}function _c(e,n){var t=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;null!==o&&(t=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(a(314))}null!==r&&r.delete(n),Ac(e,t)}function Pc(e,n){return qe(e,n)}function Lc(e,n,t,r){this.tag=e,this.key=t,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Rc(e,n,t,r){return new Lc(e,n,t,r)}function Oc(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Fc(e,n){var t=e.alternate;return null===t?((t=Rc(e.tag,n,e.key,e.mode)).elementType=e.elementType,t.type=e.type,t.stateNode=e.stateNode,t.alternate=e,e.alternate=t):(t.pendingProps=n,t.type=e.type,t.flags=0,t.subtreeFlags=0,t.deletions=null),t.flags=14680064&e.flags,t.childLanes=e.childLanes,t.lanes=e.lanes,t.child=e.child,t.memoizedProps=e.memoizedProps,t.memoizedState=e.memoizedState,t.updateQueue=e.updateQueue,n=e.dependencies,t.dependencies=null===n?null:{lanes:n.lanes,firstContext:n.firstContext},t.sibling=e.sibling,t.index=e.index,t.ref=e.ref,t}function Nc(e,n,t,r,o,s){var i=2;if(r=e,"function"==typeof e)Oc(e)&&(i=1);else if("string"==typeof e)i=5;else e:switch(e){case k:return jc(t.children,o,s,n);case T:i=8,o|=8;break;case E:return(e=Rc(12,t,n,2|o)).elementType=E,e.lanes=s,e;case _:return(e=Rc(13,t,n,o)).elementType=_,e.lanes=s,e;case P:return(e=Rc(19,t,n,o)).elementType=P,e.lanes=s,e;case O:return Dc(t,o,s,n);default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case C:i=10;break e;case A:i=9;break e;case I:i=11;break e;case L:i=14;break e;case R:i=16,r=null;break e}throw Error(a(130,null==e?e:typeof e,""))}return(n=Rc(i,t,n,o)).elementType=e,n.type=r,n.lanes=s,n}function jc(e,n,t,r){return(e=Rc(7,e,r,n)).lanes=t,e}function Dc(e,n,t,r){return(e=Rc(22,e,r,n)).elementType=O,e.lanes=t,e.stateNode={isHidden:!1},e}function Mc(e,n,t){return(e=Rc(6,e,null,n)).lanes=t,e}function Bc(e,n,t){return(n=Rc(4,null!==e.children?e.children:[],e.key,n)).lanes=t,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}function $c(e,n,t,r,o){this.tag=n,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=yn(0),this.expirationTimes=yn(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=yn(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function Vc(e,n,t,r,o,a,s,i,l){return e=new $c(e,n,t,i,l),1===n?(n=1,!0===a&&(n|=8)):n=0,a=Rc(3,null,null,n),e.current=a,a.stateNode=e,a.memoizedState={element:r,isDehydrated:t,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ra(a),e}function Uc(e){if(!e)return Io;e:{if(Ue(e=e._reactInternals)!==e||1!==e.tag)throw Error(a(170));var n=e;do{switch(n.tag){case 3:n=n.stateNode.context;break e;case 1:if(Oo(n.type)){n=n.stateNode.__reactInternalMemoizedMergedChildContext;break e}}n=n.return}while(null!==n);throw Error(a(171))}if(1===e.tag){var t=e.type;if(Oo(t))return jo(e,t,n)}return n}function zc(e,n,t,r,o,a,s,i,l){return(e=Vc(t,r,!0,e,0,a,0,i,l)).context=Uc(null),t=e.current,(a=Fa(r=nc(),o=tc(t))).callback=null!=n?n:null,Na(t,a,o),e.current.lanes=o,bn(e,o,r),oc(e,r),e}function Hc(e,n,t,r){var o=n.current,a=nc(),s=tc(o);return t=Uc(t),null===n.context?n.context=t:n.pendingContext=t,(n=Fa(a,s)).payload={element:e},null!==(r=void 0===r?null:r)&&(n.callback=r),null!==(e=Na(o,n,s))&&(rc(e,o,s,a),ja(e,o,s)),s}function Wc(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function Gc(e,n){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var t=e.retryLane;e.retryLane=0!==t&&t{"use strict";var r=t(7104);n.createRoot=r.createRoot,n.hydrateRoot=r.hydrateRoot},7104:(e,n,t)=>{"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(n){console.error(n)}}(),e.exports=t(9516)},448:e=>{var n="undefined"!=typeof Element,t="function"==typeof Map,r="function"==typeof Set,o="function"==typeof ArrayBuffer&&!!ArrayBuffer.isView;function a(e,s){if(e===s)return!0;if(e&&s&&"object"==typeof e&&"object"==typeof s){if(e.constructor!==s.constructor)return!1;var i,l,c,u;if(Array.isArray(e)){if((i=e.length)!=s.length)return!1;for(l=i;0!=l--;)if(!a(e[l],s[l]))return!1;return!0}if(t&&e instanceof Map&&s instanceof Map){if(e.size!==s.size)return!1;for(u=e.entries();!(l=u.next()).done;)if(!s.has(l.value[0]))return!1;for(u=e.entries();!(l=u.next()).done;)if(!a(l.value[1],s.get(l.value[0])))return!1;return!0}if(r&&e instanceof Set&&s instanceof Set){if(e.size!==s.size)return!1;for(u=e.entries();!(l=u.next()).done;)if(!s.has(l.value[0]))return!1;return!0}if(o&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(s)){if((i=e.length)!=s.length)return!1;for(l=i;0!=l--;)if(e[l]!==s[l])return!1;return!0}if(e.constructor===RegExp)return e.source===s.source&&e.flags===s.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===s.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===s.toString();if((i=(c=Object.keys(e)).length)!==Object.keys(s).length)return!1;for(l=i;0!=l--;)if(!Object.prototype.hasOwnProperty.call(s,c[l]))return!1;if(n&&e instanceof Element)return!1;for(l=i;0!=l--;)if(("_owner"!==c[l]&&"__v"!==c[l]&&"__o"!==c[l]||!e.$$typeof)&&!a(e[c[l]],s[c[l]]))return!1;return!0}return e!=e&&s!=s}e.exports=function(e,n){try{return a(e,n)}catch(t){if((t.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw t}}},2160:(e,n,t)=>{"use strict";t.d(n,{EN:()=>W,So:()=>J});var r=t(1504),o=t(3268),a=t.n(o),s=t(448),i=t.n(s),l=t(9328),c=t.n(l),u=t(1072),d=t.n(u);function p(){return p=Object.assign||function(e){for(var n=1;n=0||(o[t]=e[t]);return o}var h={BASE:"base",BODY:"body",HEAD:"head",HTML:"html",LINK:"link",META:"meta",NOSCRIPT:"noscript",SCRIPT:"script",STYLE:"style",TITLE:"title",FRAGMENT:"Symbol(react.fragment)"},y={rel:["amphtml","canonical","alternate"]},b={type:["application/ld+json"]},v={charset:"",name:["robots","description"],property:["og:type","og:title","og:url","og:image","og:image:alt","og:description","twitter:url","twitter:title","twitter:description","twitter:image","twitter:image:alt","twitter:card","twitter:site"]},S=Object.keys(h).map((function(e){return h[e]})),w={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},x=Object.keys(w).reduce((function(e,n){return e[w[n]]=n,e}),{}),k=function(e,n){for(var t=e.length-1;t>=0;t-=1){var r=e[t];if(Object.prototype.hasOwnProperty.call(r,n))return r[n]}return null},T=function(e){var n=k(e,h.TITLE),t=k(e,"titleTemplate");if(Array.isArray(n)&&(n=n.join("")),t&&n)return t.replace(/%s/g,(function(){return n}));var r=k(e,"defaultTitle");return n||r||void 0},E=function(e){return k(e,"onChangeClientState")||function(){}},C=function(e,n){return n.filter((function(n){return void 0!==n[e]})).map((function(n){return n[e]})).reduce((function(e,n){return p({},e,n)}),{})},A=function(e,n){return n.filter((function(e){return void 0!==e[h.BASE]})).map((function(e){return e[h.BASE]})).reverse().reduce((function(n,t){if(!n.length)for(var r=Object.keys(t),o=0;o/g,">").replace(/"/g,""").replace(/'/g,"'")},N=function(e){return Object.keys(e).reduce((function(n,t){var r=void 0!==e[t]?t+'="'+e[t]+'"':""+t;return n?n+" "+r:r}),"")},j=function(e,n){return void 0===n&&(n={}),Object.keys(e).reduce((function(n,t){return n[w[t]||t]=e[t],n}),n)},D=function(e,n){return n.map((function(n,t){var o,a=((o={key:t})["data-rh"]=!0,o);return Object.keys(n).forEach((function(e){var t=w[e]||e;"innerHTML"===t||"cssText"===t?a.dangerouslySetInnerHTML={__html:n.innerHTML||n.cssText}:a[t]=n[e]})),r.createElement(e,a)}))},M=function(e,n,t){switch(e){case h.TITLE:return{toComponent:function(){return t=n.titleAttributes,(o={key:e=n.title})["data-rh"]=!0,a=j(t,o),[r.createElement(h.TITLE,a,e)];var e,t,o,a},toString:function(){return function(e,n,t,r){var o=N(t),a=P(n);return o?"<"+e+' data-rh="true" '+o+">"+F(a,r)+""+e+">":"<"+e+' data-rh="true">'+F(a,r)+""+e+">"}(e,n.title,n.titleAttributes,t)}};case"bodyAttributes":case"htmlAttributes":return{toComponent:function(){return j(n)},toString:function(){return N(n)}};default:return{toComponent:function(){return D(e,n)},toString:function(){return function(e,n,t){return n.reduce((function(n,r){var o=Object.keys(r).filter((function(e){return!("innerHTML"===e||"cssText"===e)})).reduce((function(e,n){var o=void 0===r[n]?n:n+'="'+F(r[n],t)+'"';return e?e+" "+o:o}),""),a=r.innerHTML||r.cssText||"",s=-1===O.indexOf(e);return n+"<"+e+' data-rh="true" '+o+(s?"/>":">"+a+""+e+">")}),"")}(e,n,t)}}}},B=function(e){var n=e.baseTag,t=e.bodyAttributes,r=e.encode,o=e.htmlAttributes,a=e.noscriptTags,s=e.styleTags,i=e.title,l=void 0===i?"":i,c=e.titleAttributes,u=e.linkTags,d=e.metaTags,p=e.scriptTags,f={toComponent:function(){},toString:function(){return""}};if(e.prioritizeSeoTags){var m=function(e){var n=e.linkTags,t=e.scriptTags,r=e.encode,o=L(e.metaTags,v),a=L(n,y),s=L(t,b);return{priorityMethods:{toComponent:function(){return[].concat(D(h.META,o.priority),D(h.LINK,a.priority),D(h.SCRIPT,s.priority))},toString:function(){return M(h.META,o.priority,r)+" "+M(h.LINK,a.priority,r)+" "+M(h.SCRIPT,s.priority,r)}},metaTags:o.default,linkTags:a.default,scriptTags:s.default}}(e);f=m.priorityMethods,u=m.linkTags,d=m.metaTags,p=m.scriptTags}return{priority:f,base:M(h.BASE,n,r),bodyAttributes:M("bodyAttributes",t,r),htmlAttributes:M("htmlAttributes",o,r),link:M(h.LINK,u,r),meta:M(h.META,d,r),noscript:M(h.NOSCRIPT,a,r),script:M(h.SCRIPT,p,r),style:M(h.STYLE,s,r),title:M(h.TITLE,{title:l,titleAttributes:c},r)}},$=[],V=function(e,n){var t=this;void 0===n&&(n="undefined"!=typeof document),this.instances=[],this.value={setHelmet:function(e){t.context.helmet=e},helmetInstances:{get:function(){return t.canUseDOM?$:t.instances},add:function(e){(t.canUseDOM?$:t.instances).push(e)},remove:function(e){var n=(t.canUseDOM?$:t.instances).indexOf(e);(t.canUseDOM?$:t.instances).splice(n,1)}}},this.context=e,this.canUseDOM=n,n||(e.helmet=B({baseTag:[],bodyAttributes:{},encodeSpecialCharacters:!0,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}}))},U=r.createContext({}),z=a().shape({setHelmet:a().func,helmetInstances:a().shape({get:a().func,add:a().func,remove:a().func})}),H="undefined"!=typeof document,W=function(e){function n(t){var r;return(r=e.call(this,t)||this).helmetData=new V(r.props.context,n.canUseDOM),r}return f(n,e),n.prototype.render=function(){return r.createElement(U.Provider,{value:this.helmetData.value},this.props.children)},n}(r.Component);W.canUseDOM=H,W.propTypes={context:a().shape({helmet:a().shape()}),children:a().node.isRequired},W.defaultProps={context:{}},W.displayName="HelmetProvider";var G=function(e,n){var t,r=document.head||document.querySelector(h.HEAD),o=r.querySelectorAll(e+"[data-rh]"),a=[].slice.call(o),s=[];return n&&n.length&&n.forEach((function(n){var r=document.createElement(e);for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&("innerHTML"===o?r.innerHTML=n.innerHTML:"cssText"===o?r.styleSheet?r.styleSheet.cssText=n.cssText:r.appendChild(document.createTextNode(n.cssText)):r.setAttribute(o,void 0===n[o]?"":n[o]));r.setAttribute("data-rh","true"),a.some((function(e,n){return t=n,r.isEqualNode(e)}))?a.splice(t,1):s.push(r)})),a.forEach((function(e){return e.parentNode.removeChild(e)})),s.forEach((function(e){return r.appendChild(e)})),{oldTags:a,newTags:s}},q=function(e,n){var t=document.getElementsByTagName(e)[0];if(t){for(var r=t.getAttribute("data-rh"),o=r?r.split(","):[],a=[].concat(o),s=Object.keys(n),i=0;i=0;d-=1)t.removeAttribute(a[d]);o.length===a.length?t.removeAttribute("data-rh"):t.getAttribute("data-rh")!==s.join(",")&&t.setAttribute("data-rh",s.join(","))}},Y=function(e,n){var t=e.baseTag,r=e.htmlAttributes,o=e.linkTags,a=e.metaTags,s=e.noscriptTags,i=e.onChangeClientState,l=e.scriptTags,c=e.styleTags,u=e.title,d=e.titleAttributes;q(h.BODY,e.bodyAttributes),q(h.HTML,r),function(e,n){void 0!==e&&document.title!==e&&(document.title=P(e)),q(h.TITLE,n)}(u,d);var p={baseTag:G(h.BASE,t),linkTags:G(h.LINK,o),metaTags:G(h.META,a),noscriptTags:G(h.NOSCRIPT,s),scriptTags:G(h.SCRIPT,l),styleTags:G(h.STYLE,c)},f={},m={};Object.keys(p).forEach((function(e){var n=p[e],t=n.newTags,r=n.oldTags;t.length&&(f[e]=t),r.length&&(m[e]=p[e].oldTags)})),n&&n(),i(e,f,m)},K=null,X=function(e){function n(){for(var n,t=arguments.length,r=new Array(t),o=0;o elements are self-closing and can not contain children. Refer to our API for more information.")}},t.flattenArrayTypeChildren=function(e){var n,t=e.child,r=e.arrayTypeChildren;return p({},r,((n={})[t.type]=[].concat(r[t.type]||[],[p({},e.newChildProps,this.mapNestedChildrenToProps(t,e.nestedChildren))]),n))},t.mapObjectTypeChildren=function(e){var n,t,r=e.child,o=e.newProps,a=e.newChildProps,s=e.nestedChildren;switch(r.type){case h.TITLE:return p({},o,((n={})[r.type]=s,n.titleAttributes=p({},a),n));case h.BODY:return p({},o,{bodyAttributes:p({},a)});case h.HTML:return p({},o,{htmlAttributes:p({},a)});default:return p({},o,((t={})[r.type]=p({},a),t))}},t.mapArrayTypeChildrenToProps=function(e,n){var t=p({},n);return Object.keys(e).forEach((function(n){var r;t=p({},t,((r={})[n]=e[n],r))})),t},t.warnOnInvalidChildren=function(e,n){return c()(S.some((function(n){return e.type===n})),"function"==typeof e.type?"You may be attempting to nest components within each other, which is not allowed. Refer to our API for more information.":"Only elements types "+S.join(", ")+" are allowed. Helmet does not support rendering <"+e.type+"> elements. Refer to our API for more information."),c()(!n||"string"==typeof n||Array.isArray(n)&&!n.some((function(e){return"string"!=typeof e})),"Helmet expects a string as a child of <"+e.type+">. Did you forget to wrap your children in braces? ( <"+e.type+">{``}"+e.type+"> ) Refer to our API for more information."),!0},t.mapChildrenToProps=function(e,n){var t=this,o={};return r.Children.forEach(e,(function(e){if(e&&e.props){var r=e.props,a=r.children,s=g(r,Q),i=Object.keys(s).reduce((function(e,n){return e[x[n]||n]=s[n],e}),{}),l=e.type;switch("symbol"==typeof l?l=l.toString():t.warnOnInvalidChildren(e,a),l){case h.FRAGMENT:n=t.mapChildrenToProps(a,n);break;case h.LINK:case h.META:case h.NOSCRIPT:case h.SCRIPT:case h.STYLE:o=t.flattenArrayTypeChildren({child:e,arrayTypeChildren:o,newChildProps:i,nestedChildren:a});break;default:n=t.mapObjectTypeChildren({child:e,newProps:n,newChildProps:i,nestedChildren:a})}}})),this.mapArrayTypeChildrenToProps(o,n)},t.render=function(){var e=this.props,n=e.children,t=g(e,Z),o=p({},t),a=t.helmetData;return n&&(o=this.mapChildrenToProps(n,o)),!a||a instanceof V||(a=new V(a.context,a.instances)),a?r.createElement(X,p({},o,{context:a.value,helmetData:void 0})):r.createElement(U.Consumer,null,(function(e){return r.createElement(X,p({},o,{context:e}))}))},n}(r.Component);J.propTypes={base:a().object,bodyAttributes:a().object,children:a().oneOfType([a().arrayOf(a().node),a().node]),defaultTitle:a().string,defer:a().bool,encodeSpecialCharacters:a().bool,htmlAttributes:a().object,link:a().arrayOf(a().object),meta:a().arrayOf(a().object),noscript:a().arrayOf(a().object),onChangeClientState:a().func,script:a().arrayOf(a().object),style:a().arrayOf(a().object),title:a().string,titleAttributes:a().object,titleTemplate:a().string,prioritizeSeoTags:a().bool,helmetData:a().object},J.defaultProps={defer:!0,encodeSpecialCharacters:!0,prioritizeSeoTags:!1},J.displayName="Helmet"},9764:(e,n)=>{"use strict";var t="function"==typeof Symbol&&Symbol.for,r=t?Symbol.for("react.element"):60103,o=t?Symbol.for("react.portal"):60106,a=t?Symbol.for("react.fragment"):60107,s=t?Symbol.for("react.strict_mode"):60108,i=t?Symbol.for("react.profiler"):60114,l=t?Symbol.for("react.provider"):60109,c=t?Symbol.for("react.context"):60110,u=t?Symbol.for("react.async_mode"):60111,d=t?Symbol.for("react.concurrent_mode"):60111,p=t?Symbol.for("react.forward_ref"):60112,f=t?Symbol.for("react.suspense"):60113,m=t?Symbol.for("react.suspense_list"):60120,g=t?Symbol.for("react.memo"):60115,h=t?Symbol.for("react.lazy"):60116,y=t?Symbol.for("react.block"):60121,b=t?Symbol.for("react.fundamental"):60117,v=t?Symbol.for("react.responder"):60118,S=t?Symbol.for("react.scope"):60119;function w(e){if("object"==typeof e&&null!==e){var n=e.$$typeof;switch(n){case r:switch(e=e.type){case u:case d:case a:case i:case s:case f:return e;default:switch(e=e&&e.$$typeof){case c:case p:case h:case g:case l:return e;default:return n}}case o:return n}}}function x(e){return w(e)===d}n.AsyncMode=u,n.ConcurrentMode=d,n.ContextConsumer=c,n.ContextProvider=l,n.Element=r,n.ForwardRef=p,n.Fragment=a,n.Lazy=h,n.Memo=g,n.Portal=o,n.Profiler=i,n.StrictMode=s,n.Suspense=f,n.isAsyncMode=function(e){return x(e)||w(e)===u},n.isConcurrentMode=x,n.isContextConsumer=function(e){return w(e)===c},n.isContextProvider=function(e){return w(e)===l},n.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},n.isForwardRef=function(e){return w(e)===p},n.isFragment=function(e){return w(e)===a},n.isLazy=function(e){return w(e)===h},n.isMemo=function(e){return w(e)===g},n.isPortal=function(e){return w(e)===o},n.isProfiler=function(e){return w(e)===i},n.isStrictMode=function(e){return w(e)===s},n.isSuspense=function(e){return w(e)===f},n.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===a||e===d||e===i||e===s||e===f||e===m||"object"==typeof e&&null!==e&&(e.$$typeof===h||e.$$typeof===g||e.$$typeof===l||e.$$typeof===c||e.$$typeof===p||e.$$typeof===b||e.$$typeof===v||e.$$typeof===S||e.$$typeof===y)},n.typeOf=w},2168:(e,n,t)=>{"use strict";e.exports=t(9764)},8852:(e,n,t)=>{"use strict";function r(e,n){e.prototype=Object.create(n.prototype),e.prototype.constructor=e,e.__proto__=n}function o(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function a(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function s(){return s=Object.assign||function(e){for(var n=1;n{"use strict";t.d(n,{C:()=>s,k:()=>i});var r=t(5592),o=t(6404),a=t(1504);function s(e,n,t){return void 0===t&&(t=[]),e.some((function(e){var o=e.path?(0,r.ot)(n,e):t.length?t[t.length-1].match:r.E5.computeRootMatch(n);return o&&(t.push({route:e,match:o}),e.routes&&s(e.routes,n,t)),o})),t}function i(e,n,t){return void 0===n&&(n={}),void 0===t&&(t={}),e?a.createElement(r.Wk,t,e.map((function(e,t){return a.createElement(r.kX,{key:e.key||t,path:e.path,exact:e.exact,strict:e.strict,render:function(t){return e.render?e.render((0,o.c)({},t,{},n,{route:e})):a.createElement(e.component,(0,o.c)({},t,n,{route:e}))}})}))):null}},440:(e,n,t)=>{"use strict";t.d(n,{Af:()=>v,cH:()=>h,kn:()=>u});var r=t(5592),o=t(9948),a=t(1504),s=t(8064),i=t(6404),l=t(4384),c=t(6136),u=function(e){function n(){for(var n,t=arguments.length,r=new Array(t),o=0;o{"use strict";t.d(n,{E5:()=>v,IT:()=>O,Os:()=>b,Uz:()=>R,Wk:()=>P,kX:()=>T,ot:()=>k});var r=t(9948),o=t(1504),a=t(3268),s=t.n(a),i=t(8064),l=t(6136),c=t(6404),u=t(8216),d=t.n(u),p=(t(2168),t(4384)),f=(t(4792),1073741823),m="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==t.g?t.g:{};var g=o.createContext||function(e,n){var t,a,i="__create-react-context-"+function(){var e="__global_unique_id__";return m[e]=(m[e]||0)+1}()+"__",l=function(e){function t(){for(var n,t,r,o=arguments.length,a=new Array(o),s=0;s{var r=t(9600);e.exports=f,e.exports.parse=a,e.exports.compile=function(e,n){return i(a(e,n),n)},e.exports.tokensToFunction=i,e.exports.tokensToRegExp=p;var o=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function a(e,n){for(var t,r=[],a=0,s=0,i="",u=n&&n.delimiter||"/";null!=(t=o.exec(e));){var d=t[0],p=t[1],f=t.index;if(i+=e.slice(s,f),s=f+d.length,p)i+=p[1];else{var m=e[s],g=t[2],h=t[3],y=t[4],b=t[5],v=t[6],S=t[7];i&&(r.push(i),i="");var w=null!=g&&null!=m&&m!==g,x="+"===v||"*"===v,k="?"===v||"*"===v,T=t[2]||u,E=y||b;r.push({name:h||a++,prefix:g||"",delimiter:T,optional:k,repeat:x,partial:w,asterisk:!!S,pattern:E?c(E):S?".*":"[^"+l(T)+"]+?"})}}return s{"use strict";var r=t(1504),o=Symbol.for("react.element"),a=Symbol.for("react.fragment"),s=Object.prototype.hasOwnProperty,i=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function c(e,n,t){var r,a={},c=null,u=null;for(r in void 0!==t&&(c=""+t),void 0!==n.key&&(c=""+n.key),void 0!==n.ref&&(u=n.ref),n)s.call(n,r)&&!l.hasOwnProperty(r)&&(a[r]=n[r]);if(e&&e.defaultProps)for(r in n=e.defaultProps)void 0===a[r]&&(a[r]=n[r]);return{$$typeof:o,type:e,key:c,ref:u,props:a,_owner:i.current}}n.Fragment=a,n.jsx=c,n.jsxs=c},3028:(e,n)=>{"use strict";var t=Symbol.for("react.element"),r=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),f=Symbol.iterator;var m={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,h={};function y(e,n,t){this.props=e,this.context=n,this.refs=h,this.updater=t||m}function b(){}function v(e,n,t){this.props=e,this.context=n,this.refs=h,this.updater=t||m}y.prototype.isReactComponent={},y.prototype.setState=function(e,n){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,n,"setState")},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},b.prototype=y.prototype;var S=v.prototype=new b;S.constructor=v,g(S,y.prototype),S.isPureReactComponent=!0;var w=Array.isArray,x=Object.prototype.hasOwnProperty,k={current:null},T={key:!0,ref:!0,__self:!0,__source:!0};function E(e,n,r){var o,a={},s=null,i=null;if(null!=n)for(o in void 0!==n.ref&&(i=n.ref),void 0!==n.key&&(s=""+n.key),n)x.call(n,o)&&!T.hasOwnProperty(o)&&(a[o]=n[o]);var l=arguments.length-2;if(1===l)a.children=r;else if(1{"use strict";e.exports=t(3028)},7624:(e,n,t)=>{"use strict";e.exports=t(4808)},8328:(e,n)=>{"use strict";function t(e,n){var t=e.length;e.push(n);e:for(;0>>1,o=e[r];if(!(0>>1;ra(l,t))ca(u,l)?(e[r]=u,e[c]=t,r=c):(e[r]=l,e[i]=t,r=i);else{if(!(ca(u,t)))break e;e[r]=u,e[c]=t,r=c}}}return n}function a(e,n){var t=e.sortIndex-n.sortIndex;return 0!==t?t:e.id-n.id}if("object"==typeof performance&&"function"==typeof performance.now){var s=performance;n.unstable_now=function(){return s.now()}}else{var i=Date,l=i.now();n.unstable_now=function(){return i.now()-l}}var c=[],u=[],d=1,p=null,f=3,m=!1,g=!1,h=!1,y="function"==typeof setTimeout?setTimeout:null,b="function"==typeof clearTimeout?clearTimeout:null,v="undefined"!=typeof setImmediate?setImmediate:null;function S(e){for(var n=r(u);null!==n;){if(null===n.callback)o(u);else{if(!(n.startTime<=e))break;o(u),n.sortIndex=n.expirationTime,t(c,n)}n=r(u)}}function w(e){if(h=!1,S(e),!g)if(null!==r(c))g=!0,O(x);else{var n=r(u);null!==n&&F(w,n.startTime-e)}}function x(e,t){g=!1,h&&(h=!1,b(C),C=-1),m=!0;var a=f;try{for(S(t),p=r(c);null!==p&&(!(p.expirationTime>t)||e&&!_());){var s=p.callback;if("function"==typeof s){p.callback=null,f=p.priorityLevel;var i=s(p.expirationTime<=t);t=n.unstable_now(),"function"==typeof i?p.callback=i:p===r(c)&&o(c),S(t)}else o(c);p=r(c)}if(null!==p)var l=!0;else{var d=r(u);null!==d&&F(w,d.startTime-t),l=!1}return l}finally{p=null,f=a,m=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var k,T=!1,E=null,C=-1,A=5,I=-1;function _(){return!(n.unstable_now()-Ie||125s?(e.sortIndex=a,t(u,e),null===r(c)&&e===r(u)&&(h?(b(C),C=-1):h=!0,F(w,a-s))):(e.sortIndex=i,t(c,e),g||m||(g=!0,O(x))),e},n.unstable_shouldYield=_,n.unstable_wrapCallback=function(e){var n=f;return function(){var t=f;f=n;try{return e.apply(this,arguments)}finally{f=t}}}},4712:(e,n,t)=>{"use strict";e.exports=t(8328)},1072:e=>{e.exports=function(e,n,t,r){var o=t?t.call(r,e,n):void 0;if(void 0!==o)return!!o;if(e===n)return!0;if("object"!=typeof e||!e||"object"!=typeof n||!n)return!1;var a=Object.keys(e),s=Object.keys(n);if(a.length!==s.length)return!1;for(var i=Object.prototype.hasOwnProperty.bind(n),l=0;l{"use strict";t.d(n,{c:()=>a});var r=!0,o="Invariant failed";function a(e,n){if(!e){if(r)throw new Error(o);var t="function"==typeof n?n():n;throw new Error(t?o+": "+t:o)}}},7768:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>r});const r={title:"Ignite Cookbook for React Native",tagline:"Cooking up some cool recipes in Ignite for React Native!",url:"https://infinitered.github.io",baseUrl:"/",onBrokenLinks:"throw",onBrokenMarkdownLinks:"warn",favicon:"img/favicon.ico",organizationName:"infinitered",projectName:"ignite-cookbook",i18n:{defaultLocale:"en",locales:["en"],path:"i18n",localeConfigs:{}},plugins:[null],presets:[["classic",{docs:{path:"docs",showLastUpdateAuthor:!0,showLastUpdateTime:!0,sidebarPath:"/home/runner/work/ignite-cookbook/ignite-cookbook/sidebars.js"},blog:!1,theme:{customCss:"/home/runner/work/ignite-cookbook/ignite-cookbook/src/css/custom.css"},gtag:{trackingID:"G-1NP64B0XVM",anonymizeIP:!0}}]],themeConfig:{colorMode:{defaultMode:"light",disableSwitch:!0,respectPrefersColorScheme:!1},navbar:{hideOnScroll:!0,logo:{alt:"React Native Cookbook Logo",src:"img/logo.svg"},items:[{type:"search",position:"right"},{type:"doc",docId:"intro",position:"right",html:'Recipes
'},{position:"right",html:'Ignite Boilerplate
',to:"https://github.com/infinitered/ignite"},{position:"right",html:'Infinite Red
',to:"https://infinite.red"},{style:{marginRight:"0px"},type:"dropdown",html:' \n Community\n
\n
\n ',position:"right",items:[{html:' \n
\n Slack community\n
\n
\n
\n
Join a growing React Native community with 2,000 developers and counting.
\n
\n
\n ',to:"https://join.slack.com/t/infiniteredcommunity/shared_invite/zt-1e1gob8vn-pcFjKM~n1c~aXFsTnvHpdg"},{html:' \n
\n Submit an idea\n
\n
\n
\n
Have an recipe idea for the cookbook? Contribute your ideas on GitHub!
\n
\n
\n ',to:"https://github.com/infinitered/ignite-cookbook/issues/new?assignees=&labels=new+recipe&template=recipe_idea.yml"}]}]},footer:{copyright:'From the team at ',style:"dark",links:[{title:"Community",items:[{html:''},{html:''},{html:''}]},{title:"Resources",items:[{html:''},{html:''},{html:''},{html:''},{html:''}]},{title:"Infinite Red",items:[{html:''},{html:''},{html:''}]}]},prism:{theme:{plain:{color:"#393A34",backgroundColor:"#f6f8fa"},styles:[{types:["comment","prolog","doctype","cdata"],style:{color:"#999988",fontStyle:"italic"}},{types:["namespace"],style:{opacity:.7}},{types:["string","attr-value"],style:{color:"#e3116c"}},{types:["punctuation","operator"],style:{color:"#393A34"}},{types:["entity","url","symbol","number","boolean","variable","constant","property","regex","inserted"],style:{color:"#36acaa"}},{types:["atrule","keyword","attr-name","selector"],style:{color:"#00a4db"}},{types:["function","deleted","tag"],style:{color:"#d73a49"}},{types:["function-variable"],style:{color:"#6f42c1"}},{types:["tag","selector","keyword"],style:{color:"#00009f"}}]},darkTheme:{plain:{color:"#F8F8F2",backgroundColor:"#282A36"},styles:[{types:["prolog","constant","builtin"],style:{color:"rgb(189, 147, 249)"}},{types:["inserted","function"],style:{color:"rgb(80, 250, 123)"}},{types:["deleted"],style:{color:"rgb(255, 85, 85)"}},{types:["changed"],style:{color:"rgb(255, 184, 108)"}},{types:["punctuation","symbol"],style:{color:"rgb(248, 248, 242)"}},{types:["string","char","tag","selector"],style:{color:"rgb(255, 121, 198)"}},{types:["keyword","variable"],style:{color:"rgb(189, 147, 249)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(98, 114, 164)"}},{types:["attr-name"],style:{color:"rgb(241, 250, 140)"}}]},additionalLanguages:["bash","ruby","json","ejs","diff","markup-templating"],magicComments:[{className:"theme-code-block-highlighted-line",line:"highlight-next-line",block:{start:"highlight-start",end:"highlight-end"}},{className:"code-block-error-line",line:"error-line",block:{start:"error-line-start",end:"error-line-end"}},{className:"code-block-success-line",line:"success-line",block:{start:"success-line-start",end:"success-line-end"}}]},algolia:{appId:"MFHD60DIB5",apiKey:"4e924e740d603ec90f106067754ccf50",indexName:"ignite-cookbook",searchParameters:{},searchPagePath:"search",contextualSearch:!0},docs:{versionPersistence:"localStorage",sidebar:{hideable:!1,autoCollapseCategories:!1}},metadata:[],tableOfContents:{minHeadingLevel:2,maxHeadingLevel:3}},baseUrlIssueBanner:!0,onBrokenAnchors:"warn",onDuplicateRoutes:"warn",staticDirectories:["static"],customFields:{},themes:[],scripts:[],headTags:[],stylesheets:[],clientModules:[],titleDelimiter:"|",noIndex:!1,markdown:{format:"mdx",mermaid:!1,mdx1Compat:{comments:!0,admonitions:!0,headingIds:!0}}}},6404:(e,n,t)=>{"use strict";function r(){return r=Object.assign?Object.assign.bind():function(e){for(var n=1;nr})},9948:(e,n,t)=>{"use strict";function r(e,n){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,n){return e.__proto__=n,e},r(e,n)}function o(e,n){e.prototype=Object.create(n.prototype),e.prototype.constructor=e,r(e,n)}t.d(n,{c:()=>o})},4384:(e,n,t)=>{"use strict";function r(e,n){if(null==e)return{};var t,r,o={},a=Object.keys(e);for(r=0;r=0||(o[t]=e[t]);return o}t.d(n,{c:()=>r})},5456:(e,n,t)=>{"use strict";function r(e){var n,t,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e)if(Array.isArray(e)){var a=e.length;for(n=0;no});const o=function(){for(var e,n,t=0,o="",a=arguments.length;t{"use strict";t.d(n,{gl:()=>ee,sp:()=>A});var r,o,a,s,i,l,c,u=t(1504),d=t(5456),p=Object.create,f=Object.defineProperty,m=Object.defineProperties,g=Object.getOwnPropertyDescriptor,h=Object.getOwnPropertyDescriptors,y=Object.getOwnPropertyNames,b=Object.getOwnPropertySymbols,v=Object.getPrototypeOf,S=Object.prototype.hasOwnProperty,w=Object.prototype.propertyIsEnumerable,x=(e,n,t)=>n in e?f(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,k=(e,n)=>{for(var t in n||(n={}))S.call(n,t)&&x(e,t,n[t]);if(b)for(var t of b(n))w.call(n,t)&&x(e,t,n[t]);return e},T=(e,n)=>m(e,h(n)),E=(e,n)=>{var t={};for(var r in e)S.call(e,r)&&n.indexOf(r)<0&&(t[r]=e[r]);if(null!=e&&b)for(var r of b(e))n.indexOf(r)<0&&w.call(e,r)&&(t[r]=e[r]);return t},C=(r={"../../node_modules/.pnpm/prismjs@1.29.0_patch_hash=vrxx3pzkik6jpmgpayxfjunetu/node_modules/prismjs/prism.js"(e,n){var t=function(){var e=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,n=0,t={},r={util:{encode:function e(n){return n instanceof o?new o(n.type,e(n.content),n.alias):Array.isArray(n)?n.map(e):n.replace(/&/g,"&").replace(/=d.reach);k+=x.value.length,x=x.next){var T=x.value;if(n.length>e.length)return;if(!(T instanceof o)){var E,C=1;if(b){if(!(E=a(w,k,e,y))||E.index>=e.length)break;var A=E.index,I=E.index+E[0].length,_=k;for(_+=x.value.length;A>=_;)_+=(x=x.next).value.length;if(k=_-=x.value.length,x.value instanceof o)continue;for(var P=x;P!==n.tail&&(_d.reach&&(d.reach=F);var N=x.prev;if(R&&(N=l(n,N,R),k+=R.length),c(n,N,C),x=l(n,N,new o(p,h?r.tokenize(L,h):L,v,L)),O&&l(n,x,O),C>1){var j={cause:p+","+m,reach:F};s(e,n,t,x.prev,k,j),d&&j.reach>d.reach&&(d.reach=j.reach)}}}}}}function i(){var e={value:null,prev:null,next:null},n={value:null,prev:e,next:null};e.next=n,this.head=e,this.tail=n,this.length=0}function l(e,n,t){var r=n.next,o={value:t,prev:n,next:r};return n.next=o,r.prev=o,e.length++,o}function c(e,n,t){for(var r=n.next,o=0;o"+a.content+""+a.tag+">"},r}();n.exports=t,t.default=t}},function(){return o||(0,r[y(r)[0]])((o={exports:{}}).exports,o),o.exports}),A=((e,n,t)=>(t=null!=e?p(v(e)):{},((e,n,t,r)=>{if(n&&"object"==typeof n||"function"==typeof n)for(let o of y(n))S.call(e,o)||o===t||f(e,o,{get:()=>n[o],enumerable:!(r=g(n,o))||r.enumerable});return e})(!n&&e&&e.__esModule?t:f(t,"default",{value:e,enumerable:!0}),e)))(C());A.languages.markup={comment:{pattern://,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/?[\da-f]{1,8};/i]},A.languages.markup.tag.inside["attr-value"].inside.entity=A.languages.markup.entity,A.languages.markup.doctype.inside["internal-subset"].inside=A.languages.markup,A.hooks.add("wrap",(function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&/,"&"))})),Object.defineProperty(A.languages.markup.tag,"addInlined",{value:function(e,n){var t;(n=((t=((t={})["language-"+n]={pattern:/(^$)/i,lookbehind:!0,inside:A.languages[n]},t.cdata=/^$/i,{"included-cdata":{pattern://i,inside:t}}))["language-"+n]={pattern:/[\s\S]+/,inside:A.languages[n]},{}))[e]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,(function(){return e})),"i"),lookbehind:!0,greedy:!0,inside:t},A.languages.insertBefore("markup","cdata",n)}}),Object.defineProperty(A.languages.markup.tag,"addAttribute",{value:function(e,n){A.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[n,"language-"+n],inside:A.languages[n]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),A.languages.html=A.languages.markup,A.languages.mathml=A.languages.markup,A.languages.svg=A.languages.markup,A.languages.xml=A.languages.extend("markup",{}),A.languages.ssml=A.languages.xml,A.languages.atom=A.languages.xml,A.languages.rss=A.languages.xml,a=A,s={pattern:/\\[\\(){}[\]^$+*?|.]/,alias:"escape"},l="(?:[^\\\\-]|"+(i=/\\(?:x[\da-fA-F]{2}|u[\da-fA-F]{4}|u\{[\da-fA-F]+\}|0[0-7]{0,2}|[123][0-7]{2}|c[a-zA-Z]|.)/).source+")",l=RegExp(l+"-"+l),c={pattern:/(<|')[^<>']+(?=[>']$)/,lookbehind:!0,alias:"variable"},a.languages.regex={"char-class":{pattern:/((?:^|[^\\])(?:\\\\)*)\[(?:[^\\\]]|\\[\s\S])*\]/,lookbehind:!0,inside:{"char-class-negation":{pattern:/(^\[)\^/,lookbehind:!0,alias:"operator"},"char-class-punctuation":{pattern:/^\[|\]$/,alias:"punctuation"},range:{pattern:l,inside:{escape:i,"range-punctuation":{pattern:/-/,alias:"operator"}}},"special-escape":s,"char-set":{pattern:/\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},escape:i}},"special-escape":s,"char-set":{pattern:/\.|\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},backreference:[{pattern:/\\(?![123][0-7]{2})[1-9]/,alias:"keyword"},{pattern:/\\k<[^<>']+>/,alias:"keyword",inside:{"group-name":c}}],anchor:{pattern:/[$^]|\\[ABbGZz]/,alias:"function"},escape:i,group:[{pattern:/\((?:\?(?:<[^<>']+>|'[^<>']+'|[>:]|[=!]|[idmnsuxU]+(?:-[idmnsuxU]+)?:?))?/,alias:"punctuation",inside:{"group-name":c}},{pattern:/\)/,alias:"punctuation"}],quantifier:{pattern:/(?:[+*?]|\{\d+(?:,\d*)?\})[?+]?/,alias:"number"},alternation:{pattern:/\|/,alias:"keyword"}},A.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},A.languages.javascript=A.languages.extend("clike",{"class-name":[A.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),A.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,A.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:A.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:A.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:A.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:A.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:A.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),A.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:A.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),A.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),A.languages.markup&&(A.languages.markup.tag.addInlined("script","javascript"),A.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),A.languages.js=A.languages.javascript,A.languages.actionscript=A.languages.extend("javascript",{keyword:/\b(?:as|break|case|catch|class|const|default|delete|do|dynamic|each|else|extends|final|finally|for|function|get|if|implements|import|in|include|instanceof|interface|internal|is|namespace|native|new|null|override|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|use|var|void|while|with)\b/,operator:/\+\+|--|(?:[+\-*\/%^]|&&?|\|\|?|<|>>?>?|[!=]=?)=?|[~?@]/}),A.languages.actionscript["class-name"].alias="function",delete A.languages.actionscript.parameter,delete A.languages.actionscript["literal-property"],A.languages.markup&&A.languages.insertBefore("actionscript","string",{xml:{pattern:/(^|[^.])<\/?\w+(?:\s+[^\s>\/=]+=("|')(?:\\[\s\S]|(?!\2)[^\\])*\2)*\s*\/?>/,lookbehind:!0,inside:A.languages.markup}}),function(e){var n=/#(?!\{).+/,t={pattern:/#\{[^}]+\}/,alias:"variable"};e.languages.coffeescript=e.languages.extend("javascript",{comment:n,string:[{pattern:/'(?:\\[\s\S]|[^\\'])*'/,greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0,inside:{interpolation:t}}],keyword:/\b(?:and|break|by|catch|class|continue|debugger|delete|do|each|else|extend|extends|false|finally|for|if|in|instanceof|is|isnt|let|loop|namespace|new|no|not|null|of|off|on|or|own|return|super|switch|then|this|throw|true|try|typeof|undefined|unless|until|when|while|window|with|yes|yield)\b/,"class-member":{pattern:/@(?!\d)\w+/,alias:"variable"}}),e.languages.insertBefore("coffeescript","comment",{"multiline-comment":{pattern:/###[\s\S]+?###/,alias:"comment"},"block-regex":{pattern:/\/{3}[\s\S]*?\/{3}/,alias:"regex",inside:{comment:n,interpolation:t}}}),e.languages.insertBefore("coffeescript","string",{"inline-javascript":{pattern:/`(?:\\[\s\S]|[^\\`])*`/,inside:{delimiter:{pattern:/^`|`$/,alias:"punctuation"},script:{pattern:/[\s\S]+/,alias:"language-javascript",inside:e.languages.javascript}}},"multiline-string":[{pattern:/'''[\s\S]*?'''/,greedy:!0,alias:"string"},{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string",inside:{interpolation:t}}]}),e.languages.insertBefore("coffeescript","keyword",{property:/(?!\d)\w+(?=\s*:(?!:))/}),delete e.languages.coffeescript["template-string"],e.languages.coffee=e.languages.coffeescript}(A),function(e){var n=e.languages.javadoclike={parameter:{pattern:/(^[\t ]*(?:\/{3}|\*|\/\*\*)\s*@(?:arg|arguments|param)\s+)\w+/m,lookbehind:!0},keyword:{pattern:/(^[\t ]*(?:\/{3}|\*|\/\*\*)\s*|\{)@[a-z][a-zA-Z-]+\b/m,lookbehind:!0},punctuation:/[{}]/};Object.defineProperty(n,"addSupport",{value:function(n,t){(n="string"==typeof n?[n]:n).forEach((function(n){var r=function(e){e.inside||(e.inside={}),e.inside.rest=t},o="doc-comment";if(a=e.languages[n]){var a,s=a[o];if((s=s||(a=e.languages.insertBefore(n,"comment",{"doc-comment":{pattern:/(^|[^\\])\/\*\*[^/][\s\S]*?(?:\*\/|$)/,lookbehind:!0,alias:"comment"}}))[o])instanceof RegExp&&(s=a[o]={pattern:s}),Array.isArray(s))for(var i=0,l=s.length;i|\+|~|\|\|/,punctuation:/[(),]/}},e.languages.css.atrule.inside["selector-function-argument"].inside=n,e.languages.insertBefore("css","property",{variable:{pattern:/(^|[^-\w\xA0-\uFFFF])--(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*/i,lookbehind:!0}}),{pattern:/(\b\d+)(?:%|[a-z]+(?![\w-]))/,lookbehind:!0}),{pattern:/(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,lookbehind:!0});e.languages.insertBefore("css","function",{operator:{pattern:/(\s)[+\-*\/](?=\s)/,lookbehind:!0},hexcode:{pattern:/\B#[\da-f]{3,8}\b/i,alias:"color"},color:[{pattern:/(^|[^\w-])(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|RebeccaPurple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)(?![\w-])/i,lookbehind:!0},{pattern:/\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:n,number:t,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:n,number:t})}(A),function(e){var n=/[*&][^\s[\]{},]+/,t=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,r="(?:"+t.source+"(?:[ \t]+"+n.source+")?|"+n.source+"(?:[ \t]+"+t.source+")?)",o=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-])(?:[ \t]*(?:(?![#:])|:))*/.source.replace(//g,(function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source})),a=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function s(e,n){n=(n||"").replace(/m/g,"")+"m";var t=/([:\-,[{]\s*(?:\s<>[ \t]+)?)(?:<>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<>/g,(function(){return r})).replace(/<>/g,(function(){return e}));return RegExp(t,n)}e.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<>/g,(function(){return r}))),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<>[ \t]+)?)<>(?=\s*:\s)/.source.replace(/<>/g,(function(){return r})).replace(/<>/g,(function(){return"(?:"+o+"|"+a+")"}))),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:s(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:s(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:s(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:s(a),lookbehind:!0,greedy:!0},number:{pattern:s(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:t,important:n,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},e.languages.yml=e.languages.yaml}(A),function(e){var n=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function t(e){return e=e.replace(//g,(function(){return n})),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+e+")")}var r=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,o=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,(function(){return r})),a=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source,s=(e.languages.markdown=e.languages.extend("markup",{}),e.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:e.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+o+a+"(?:"+o+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+o+a+")(?:"+o+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(r),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+o+")"+a+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+o+"$"),inside:{"table-header":{pattern:RegExp(r),alias:"important",inside:e.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:t(/\b__(?:(?!_)|_(?:(?!_))+_)+__\b|\*\*(?:(?!\*)|\*(?:(?!\*))+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:t(/\b_(?:(?!_)|__(?:(?!_))+__)+_\b|\*(?:(?!\*)|\*\*(?:(?!\*))+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:t(/(~~?)(?:(?!~))+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:t(/!?\[(?:(?!\]))+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\]))+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach((function(n){["url","bold","italic","strike","code-snippet"].forEach((function(t){n!==t&&(e.languages.markdown[n].inside.content.inside[t]=e.languages.markdown[t])}))})),e.hooks.add("after-tokenize",(function(e){"markdown"!==e.language&&"md"!==e.language||function e(n){if(n&&"string"!=typeof n)for(var t=0,r=n.length;t",quot:'"'},l=String.fromCodePoint||String.fromCharCode;e.languages.md=e.languages.markdown}(A),A.languages.graphql={comment:/#.*/,description:{pattern:/(?:"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*")(?=\s*[a-z_])/i,greedy:!0,alias:"string",inside:{"language-markdown":{pattern:/(^"(?:"")?)(?!\1)[\s\S]+(?=\1$)/,lookbehind:!0,inside:A.languages.markdown}}},string:{pattern:/"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},number:/(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,boolean:/\b(?:false|true)\b/,variable:/\$[a-z_]\w*/i,directive:{pattern:/@[a-z_]\w*/i,alias:"function"},"attr-name":{pattern:/\b[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\"\r\n])*")*\))?:)/i,greedy:!0},"atom-input":{pattern:/\b[A-Z]\w*Input\b/,alias:"class-name"},scalar:/\b(?:Boolean|Float|ID|Int|String)\b/,constant:/\b[A-Z][A-Z_\d]*\b/,"class-name":{pattern:/(\b(?:enum|implements|interface|on|scalar|type|union)\s+|&\s*|:\s*|\[)[A-Z_]\w*/,lookbehind:!0},fragment:{pattern:/(\bfragment\s+|\.{3}\s*(?!on\b))[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-mutation":{pattern:/(\bmutation\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-query":{pattern:/(\bquery\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},keyword:/\b(?:directive|enum|extend|fragment|implements|input|interface|mutation|on|query|repeatable|scalar|schema|subscription|type|union)\b/,operator:/[!=|&]|\.{3}/,"property-query":/\w+(?=\s*\()/,object:/\w+(?=\s*\{)/,punctuation:/[!(){}\[\]:=,]/,property:/\w+/},A.hooks.add("after-tokenize",(function(e){if("graphql"===e.language)for(var n=e.tokens.filter((function(e){return"string"!=typeof e&&"comment"!==e.type&&"scalar"!==e.type})),t=0;t?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/},function(e){var n=e.languages.javascript["template-string"],t=n.pattern.source,r=n.inside.interpolation,o=r.inside["interpolation-punctuation"],a=r.pattern.source;function s(n,r){if(e.languages[n])return{pattern:RegExp("((?:"+r+")\\s*)"+t),lookbehind:!0,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},"embedded-code":{pattern:/[\s\S]+/,alias:n}}}}function i(n,t,r){return n={code:n,grammar:t,language:r},e.hooks.run("before-tokenize",n),n.tokens=e.tokenize(n.code,n.grammar),e.hooks.run("after-tokenize",n),n.tokens}function l(n,t,s){var l=e.tokenize(n,{interpolation:{pattern:RegExp(a),lookbehind:!0}}),c=0,u={},d=(l=i(l.map((function(e){if("string"==typeof e)return e;var t,r;for(e=e.content;-1!==n.indexOf((r=c++,t="___"+s.toUpperCase()+"_"+r+"___")););return u[t]=e,t})).join(""),t,s),Object.keys(u));return c=0,function n(t){for(var a=0;a=d.length)return;var s,l,p,f,m,g,h,y=t[a];"string"==typeof y||"string"==typeof y.content?(s=d[c],-1!==(h=(g="string"==typeof y?y:y.content).indexOf(s))&&(++c,l=g.substring(0,h),m=u[s],p=void 0,(f={})["interpolation-punctuation"]=o,3===(f=e.tokenize(m,f)).length&&((p=[1,1]).push.apply(p,i(f[1],e.languages.javascript,"javascript")),f.splice.apply(f,p)),p=new e.Token("interpolation",f,r.alias,m),f=g.substring(h+s.length),m=[],l&&m.push(l),m.push(p),f&&(n(g=[f]),m.push.apply(m,g)),"string"==typeof y?(t.splice.apply(t,[a,1].concat(m)),a+=m.length-1):y.content=m)):(h=y.content,Array.isArray(h)?n(h):n([h]))}}(l),new e.Token(s,l,"language-"+s,n)}e.languages.javascript["template-string"]=[s("css",/\b(?:styled(?:\([^)]*\))?(?:\s*\.\s*\w+(?:\([^)]*\))*)*|css(?:\s*\.\s*(?:global|resolve))?|createGlobalStyle|keyframes)/.source),s("html",/\bhtml|\.\s*(?:inner|outer)HTML\s*\+?=/.source),s("svg",/\bsvg/.source),s("markdown",/\b(?:markdown|md)/.source),s("graphql",/\b(?:gql|graphql(?:\s*\.\s*experimental)?)/.source),s("sql",/\bsql/.source),n].filter(Boolean);var c={javascript:!0,js:!0,typescript:!0,ts:!0,jsx:!0,tsx:!0};function u(e){return"string"==typeof e?e:Array.isArray(e)?e.map(u).join(""):u(e.content)}e.hooks.add("after-tokenize",(function(n){n.language in c&&function n(t){for(var r=0,o=t.length;r]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var n=e.languages.extend("typescript",{});delete n["class-name"],e.languages.typescript["class-name"].inside=n,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:n}}}}),e.languages.ts=e.languages.typescript}(A),function(e){var n=e.languages.javascript,t=/\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})+\}/.source,r="(@(?:arg|argument|param|property)\\s+(?:"+t+"\\s+)?)";e.languages.jsdoc=e.languages.extend("javadoclike",{parameter:{pattern:RegExp(r+/(?:(?!\s)[$\w\xA0-\uFFFF.])+(?=\s|$)/.source),lookbehind:!0,inside:{punctuation:/\./}}}),e.languages.insertBefore("jsdoc","keyword",{"optional-parameter":{pattern:RegExp(r+/\[(?:(?!\s)[$\w\xA0-\uFFFF.])+(?:=[^[\]]+)?\](?=\s|$)/.source),lookbehind:!0,inside:{parameter:{pattern:/(^\[)[$\w\xA0-\uFFFF\.]+/,lookbehind:!0,inside:{punctuation:/\./}},code:{pattern:/(=)[\s\S]*(?=\]$)/,lookbehind:!0,inside:n,alias:"language-javascript"},punctuation:/[=[\]]/}},"class-name":[{pattern:RegExp(/(@(?:augments|class|extends|interface|memberof!?|template|this|typedef)\s+(?:\s+)?)[A-Z]\w*(?:\.[A-Z]\w*)*/.source.replace(//g,(function(){return t}))),lookbehind:!0,inside:{punctuation:/\./}},{pattern:RegExp("(@[a-z]+\\s+)"+t),lookbehind:!0,inside:{string:n.string,number:n.number,boolean:n.boolean,keyword:e.languages.typescript.keyword,operator:/=>|\.\.\.|[&|?:*]/,punctuation:/[.,;=<>{}()[\]]/}}],example:{pattern:/(@example\s+(?!\s))(?:[^@\s]|\s+(?!\s))+?(?=\s*(?:\*\s*)?(?:@\w|\*\/))/,lookbehind:!0,inside:{code:{pattern:/^([\t ]*(?:\*\s*)?)\S.*$/m,lookbehind:!0,inside:n,alias:"language-javascript"}}}}),e.languages.javadoclike.addSupport("javascript",e.languages.jsdoc)}(A),function(e){e.languages.flow=e.languages.extend("javascript",{}),e.languages.insertBefore("flow","keyword",{type:[{pattern:/\b(?:[Bb]oolean|Function|[Nn]umber|[Ss]tring|[Ss]ymbol|any|mixed|null|void)\b/,alias:"class-name"}]}),e.languages.flow["function-variable"].pattern=/(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=\s*(?:function\b|(?:\([^()]*\)(?:\s*:\s*\w+)?|(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/i,delete e.languages.flow.parameter,e.languages.insertBefore("flow","operator",{"flow-punctuation":{pattern:/\{\||\|\}/,alias:"punctuation"}}),Array.isArray(e.languages.flow.keyword)||(e.languages.flow.keyword=[e.languages.flow.keyword]),e.languages.flow.keyword.unshift({pattern:/(^|[^$]\b)(?:Class|declare|opaque|type)\b(?!\$)/,lookbehind:!0},{pattern:/(^|[^$]\B)\$(?:Diff|Enum|Exact|Keys|ObjMap|PropertyType|Record|Shape|Subtype|Supertype|await)\b(?!\$)/,lookbehind:!0})}(A),A.languages.n4js=A.languages.extend("javascript",{keyword:/\b(?:Array|any|boolean|break|case|catch|class|const|constructor|continue|debugger|declare|default|delete|do|else|enum|export|extends|false|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|module|new|null|number|package|private|protected|public|return|set|static|string|super|switch|this|throw|true|try|typeof|var|void|while|with|yield)\b/}),A.languages.insertBefore("n4js","constant",{annotation:{pattern:/@+\w+/,alias:"operator"}}),A.languages.n4jsd=A.languages.n4js,function(e){function n(e,n){return RegExp(e.replace(//g,(function(){return/(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/.source})),n)}e.languages.insertBefore("javascript","function-variable",{"method-variable":{pattern:RegExp("(\\.\\s*)"+e.languages.javascript["function-variable"].pattern.source),lookbehind:!0,alias:["function-variable","method","function","property-access"]}}),e.languages.insertBefore("javascript","function",{method:{pattern:RegExp("(\\.\\s*)"+e.languages.javascript.function.source),lookbehind:!0,alias:["function","property-access"]}}),e.languages.insertBefore("javascript","constant",{"known-class-name":[{pattern:/\b(?:(?:Float(?:32|64)|(?:Int|Uint)(?:8|16|32)|Uint8Clamped)?Array|ArrayBuffer|BigInt|Boolean|DataView|Date|Error|Function|Intl|JSON|(?:Weak)?(?:Map|Set)|Math|Number|Object|Promise|Proxy|Reflect|RegExp|String|Symbol|WebAssembly)\b/,alias:"class-name"},{pattern:/\b(?:[A-Z]\w*)Error\b/,alias:"class-name"}]}),e.languages.insertBefore("javascript","keyword",{imports:{pattern:n(/(\bimport\b\s*)(?:(?:\s*,\s*(?:\*\s*as\s+|\{[^{}]*\}))?|\*\s*as\s+|\{[^{}]*\})(?=\s*\bfrom\b)/.source),lookbehind:!0,inside:e.languages.javascript},exports:{pattern:n(/(\bexport\b\s*)(?:\*(?:\s*as\s+)?(?=\s*\bfrom\b)|\{[^{}]*\})/.source),lookbehind:!0,inside:e.languages.javascript}}),e.languages.javascript.keyword.unshift({pattern:/\b(?:as|default|export|from|import)\b/,alias:"module"},{pattern:/\b(?:await|break|catch|continue|do|else|finally|for|if|return|switch|throw|try|while|yield)\b/,alias:"control-flow"},{pattern:/\bnull\b/,alias:["null","nil"]},{pattern:/\bundefined\b/,alias:"nil"}),e.languages.insertBefore("javascript","operator",{spread:{pattern:/\.{3}/,alias:"operator"},arrow:{pattern:/=>/,alias:"operator"}}),e.languages.insertBefore("javascript","punctuation",{"property-access":{pattern:n(/(\.\s*)#?/.source),lookbehind:!0},"maybe-class-name":{pattern:/(^|[^$\w\xA0-\uFFFF])[A-Z][$\w\xA0-\uFFFF]+/,lookbehind:!0},dom:{pattern:/\b(?:document|(?:local|session)Storage|location|navigator|performance|window)\b/,alias:"variable"},console:{pattern:/\bconsole(?=\s*\.)/,alias:"class-name"}});for(var t=["function","function-variable","method","method-variable","property-access"],r=0;r*\.{3}(?:[^{}]|)*\})/.source;function a(e,n){return e=e.replace(//g,(function(){return t})).replace(//g,(function(){return r})).replace(//g,(function(){return o})),RegExp(e,n)}function s(n){for(var t=[],r=0;r"!==o.content[o.content.length-1].content&&t.push({tagName:i(o.content[0].content[1]),openedBraces:0}):0+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|))?|))**\/?)?>/.source),e.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,e.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,e.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,e.languages.jsx.tag.inside.comment=n.comment,e.languages.insertBefore("inside","attr-name",{spread:{pattern:a(//.source),inside:e.languages.jsx}},e.languages.jsx.tag),e.languages.insertBefore("inside","special-attr",{script:{pattern:a(/=/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:e.languages.jsx}}},e.languages.jsx.tag);var i=function(e){return e?"string"==typeof e?e:"string"==typeof e.content?e.content:e.content.map(i).join(""):""};e.hooks.add("after-tokenize",(function(e){"jsx"!==e.language&&"tsx"!==e.language||s(e.tokens)}))}(A),function(e){var n=e.util.clone(e.languages.typescript);(n=(e.languages.tsx=e.languages.extend("jsx",n),delete e.languages.tsx.parameter,delete e.languages.tsx["literal-property"],e.languages.tsx.tag)).pattern=RegExp(/(^|[^\w$]|(?=<\/))/.source+"(?:"+n.pattern.source+")",n.pattern.flags),n.lookbehind=!0}(A),A.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+/(?:elseif|if)\b/.source+"(?:[ \t]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/},A.languages.swift["string-literal"].forEach((function(e){e.inside.interpolation.inside=A.languages.swift})),function(e){e.languages.kotlin=e.languages.extend("clike",{keyword:{pattern:/(^|[^.])\b(?:abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|to|try|typealias|val|var|vararg|when|where|while)\b/,lookbehind:!0},function:[{pattern:/(?:`[^\r\n`]+`|\b\w+)(?=\s*\()/,greedy:!0},{pattern:/(\.)(?:`[^\r\n`]+`|\w+)(?=\s*\{)/,lookbehind:!0,greedy:!0}],number:/\b(?:0[xX][\da-fA-F]+(?:_[\da-fA-F]+)*|0[bB][01]+(?:_[01]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?[fFL]?)\b/,operator:/\+[+=]?|-[-=>]?|==?=?|!(?:!|==?)?|[\/*%<>]=?|[?:]:?|\.\.|&&|\|\||\b(?:and|inv|or|shl|shr|ushr|xor)\b/}),delete e.languages.kotlin["class-name"];var n={"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:e.languages.kotlin}};e.languages.insertBefore("kotlin","string",{"string-literal":[{pattern:/"""(?:[^$]|\$(?:(?!\{)|\{[^{}]*\}))*?"""/,alias:"multiline",inside:{interpolation:{pattern:/\$(?:[a-z_]\w*|\{[^{}]*\})/i,inside:n},string:/[\s\S]+/}},{pattern:/"(?:[^"\\\r\n$]|\\.|\$(?:(?!\{)|\{[^{}]*\}))*"/,alias:"singleline",inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:[a-z_]\w*|\{[^{}]*\})/i,lookbehind:!0,inside:n},string:/[\s\S]+/}}],char:{pattern:/'(?:[^'\\\r\n]|\\(?:.|u[a-fA-F0-9]{0,4}))'/,greedy:!0}}),delete e.languages.kotlin.string,e.languages.insertBefore("kotlin","keyword",{annotation:{pattern:/\B@(?:\w+:)?(?:[A-Z]\w*|\[[^\]]+\])/,alias:"builtin"}}),e.languages.insertBefore("kotlin","function",{label:{pattern:/\b\w+@|@\w+\b/,alias:"symbol"}}),e.languages.kt=e.languages.kotlin,e.languages.kts=e.languages.kotlin}(A),A.languages.c=A.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),A.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),A.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},A.languages.c.string],char:A.languages.c.char,comment:A.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:A.languages.c}}}}),A.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete A.languages.c.boolean,A.languages.objectivec=A.languages.extend("c",{string:{pattern:/@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<=?|>>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete A.languages.objectivec["class-name"],A.languages.objc=A.languages.objectivec,A.languages.reason=A.languages.extend("clike",{string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^\\\r\n"])*"/,greedy:!0},"class-name":/\b[A-Z]\w*/,keyword:/\b(?:and|as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|method|module|mutable|new|nonrec|object|of|open|or|private|rec|sig|struct|switch|then|to|try|type|val|virtual|when|while|with)\b/,operator:/\.{3}|:[:=]|\|>|->|=(?:==?|>)?|<=?|>=?|[|^?'#!~`]|[+\-*\/]\.?|\b(?:asr|land|lor|lsl|lsr|lxor|mod)\b/}),A.languages.insertBefore("reason","class-name",{char:{pattern:/'(?:\\x[\da-f]{2}|\\o[0-3][0-7][0-7]|\\\d{3}|\\.|[^'\\\r\n])'/,greedy:!0},constructor:/\b[A-Z]\w*\b(?!\s*\.)/,label:{pattern:/\b[a-z]\w*(?=::)/,alias:"symbol"}}),delete A.languages.reason.function,function(e){for(var n=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|)*\*\//.source,t=0;t<2;t++)n=n.replace(//g,(function(){return n}));n=n.replace(//g,(function(){return/[^\s\S]/.source})),e.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+n),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<=?|>>?=?|[@?]/},e.languages.rust["closure-params"].inside.rest=e.languages.rust,e.languages.rust.attribute.inside.string=e.languages.rust.string}(A),A.languages.go=A.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),A.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete A.languages.go["class-name"],function(e){var n=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,t=/\b(?!)\w+(?:\s*\.\s*\w+)*\b/.source.replace(//g,(function(){return n.source}));e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!)\w+/.source.replace(//g,(function(){return n.source}))),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:n,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),e.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/(?:\s*:\s*)?|:\s*/.source.replace(//g,(function(){return t}))+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e.languages.cpp}}}}),e.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])}(A),A.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},A.languages.python["string-interpolation"].inside.interpolation.inside.rest=A.languages.python,A.languages.py=A.languages.python;((e,n)=>{for(var t in n)f(e,t,{get:n[t],enumerable:!0})})({},{dracula:()=>I,duotoneDark:()=>_,duotoneLight:()=>P,github:()=>L,jettwaveDark:()=>H,jettwaveLight:()=>W,nightOwl:()=>R,nightOwlLight:()=>O,oceanicNext:()=>j,okaidia:()=>D,oneDark:()=>G,oneLight:()=>q,palenight:()=>M,shadesOfPurple:()=>B,synthwave84:()=>$,ultramin:()=>V,vsDark:()=>U,vsLight:()=>z});var I={plain:{color:"#F8F8F2",backgroundColor:"#282A36"},styles:[{types:["prolog","constant","builtin"],style:{color:"rgb(189, 147, 249)"}},{types:["inserted","function"],style:{color:"rgb(80, 250, 123)"}},{types:["deleted"],style:{color:"rgb(255, 85, 85)"}},{types:["changed"],style:{color:"rgb(255, 184, 108)"}},{types:["punctuation","symbol"],style:{color:"rgb(248, 248, 242)"}},{types:["string","char","tag","selector"],style:{color:"rgb(255, 121, 198)"}},{types:["keyword","variable"],style:{color:"rgb(189, 147, 249)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(98, 114, 164)"}},{types:["attr-name"],style:{color:"rgb(241, 250, 140)"}}]},_={plain:{backgroundColor:"#2a2734",color:"#9a86fd"},styles:[{types:["comment","prolog","doctype","cdata","punctuation"],style:{color:"#6c6783"}},{types:["namespace"],style:{opacity:.7}},{types:["tag","operator","number"],style:{color:"#e09142"}},{types:["property","function"],style:{color:"#9a86fd"}},{types:["tag-id","selector","atrule-id"],style:{color:"#eeebff"}},{types:["attr-name"],style:{color:"#c4b9fe"}},{types:["boolean","string","entity","url","attr-value","keyword","control","directive","unit","statement","regex","atrule","placeholder","variable"],style:{color:"#ffcc99"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"#c4b9fe"}}]},P={plain:{backgroundColor:"#faf8f5",color:"#728fcb"},styles:[{types:["comment","prolog","doctype","cdata","punctuation"],style:{color:"#b6ad9a"}},{types:["namespace"],style:{opacity:.7}},{types:["tag","operator","number"],style:{color:"#063289"}},{types:["property","function"],style:{color:"#b29762"}},{types:["tag-id","selector","atrule-id"],style:{color:"#2d2006"}},{types:["attr-name"],style:{color:"#896724"}},{types:["boolean","string","entity","url","attr-value","keyword","control","directive","unit","statement","regex","atrule"],style:{color:"#728fcb"}},{types:["placeholder","variable"],style:{color:"#93abdc"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"#896724"}}]},L={plain:{color:"#393A34",backgroundColor:"#f6f8fa"},styles:[{types:["comment","prolog","doctype","cdata"],style:{color:"#999988",fontStyle:"italic"}},{types:["namespace"],style:{opacity:.7}},{types:["string","attr-value"],style:{color:"#e3116c"}},{types:["punctuation","operator"],style:{color:"#393A34"}},{types:["entity","url","symbol","number","boolean","variable","constant","property","regex","inserted"],style:{color:"#36acaa"}},{types:["atrule","keyword","attr-name","selector"],style:{color:"#00a4db"}},{types:["function","deleted","tag"],style:{color:"#d73a49"}},{types:["function-variable"],style:{color:"#6f42c1"}},{types:["tag","selector","keyword"],style:{color:"#00009f"}}]},R={plain:{color:"#d6deeb",backgroundColor:"#011627"},styles:[{types:["changed"],style:{color:"rgb(162, 191, 252)",fontStyle:"italic"}},{types:["deleted"],style:{color:"rgba(239, 83, 80, 0.56)",fontStyle:"italic"}},{types:["inserted","attr-name"],style:{color:"rgb(173, 219, 103)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(99, 119, 119)",fontStyle:"italic"}},{types:["string","url"],style:{color:"rgb(173, 219, 103)"}},{types:["variable"],style:{color:"rgb(214, 222, 235)"}},{types:["number"],style:{color:"rgb(247, 140, 108)"}},{types:["builtin","char","constant","function"],style:{color:"rgb(130, 170, 255)"}},{types:["punctuation"],style:{color:"rgb(199, 146, 234)"}},{types:["selector","doctype"],style:{color:"rgb(199, 146, 234)",fontStyle:"italic"}},{types:["class-name"],style:{color:"rgb(255, 203, 139)"}},{types:["tag","operator","keyword"],style:{color:"rgb(127, 219, 202)"}},{types:["boolean"],style:{color:"rgb(255, 88, 116)"}},{types:["property"],style:{color:"rgb(128, 203, 196)"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)"}}]},O={plain:{color:"#403f53",backgroundColor:"#FBFBFB"},styles:[{types:["changed"],style:{color:"rgb(162, 191, 252)",fontStyle:"italic"}},{types:["deleted"],style:{color:"rgba(239, 83, 80, 0.56)",fontStyle:"italic"}},{types:["inserted","attr-name"],style:{color:"rgb(72, 118, 214)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(152, 159, 177)",fontStyle:"italic"}},{types:["string","builtin","char","constant","url"],style:{color:"rgb(72, 118, 214)"}},{types:["variable"],style:{color:"rgb(201, 103, 101)"}},{types:["number"],style:{color:"rgb(170, 9, 130)"}},{types:["punctuation"],style:{color:"rgb(153, 76, 195)"}},{types:["function","selector","doctype"],style:{color:"rgb(153, 76, 195)",fontStyle:"italic"}},{types:["class-name"],style:{color:"rgb(17, 17, 17)"}},{types:["tag"],style:{color:"rgb(153, 76, 195)"}},{types:["operator","property","keyword","namespace"],style:{color:"rgb(12, 150, 155)"}},{types:["boolean"],style:{color:"rgb(188, 84, 84)"}}]},F="#c5a5c5",N="#8dc891",j={plain:{backgroundColor:"#282c34",color:"#ffffff"},styles:[{types:["attr-name"],style:{color:F}},{types:["attr-value"],style:{color:N}},{types:["comment","block-comment","prolog","doctype","cdata","shebang"],style:{color:"#999999"}},{types:["property","number","function-name","constant","symbol","deleted"],style:{color:"#5a9bcf"}},{types:["boolean"],style:{color:"#ff8b50"}},{types:["tag"],style:{color:"#fc929e"}},{types:["string"],style:{color:N}},{types:["punctuation"],style:{color:N}},{types:["selector","char","builtin","inserted"],style:{color:"#D8DEE9"}},{types:["function"],style:{color:"#79b6f2"}},{types:["operator","entity","url","variable"],style:{color:"#d7deea"}},{types:["keyword"],style:{color:F}},{types:["atrule","class-name"],style:{color:"#FAC863"}},{types:["important"],style:{fontWeight:"400"}},{types:["bold"],style:{fontWeight:"bold"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["namespace"],style:{opacity:.7}}]},D={plain:{color:"#f8f8f2",backgroundColor:"#272822"},styles:[{types:["changed"],style:{color:"rgb(162, 191, 252)",fontStyle:"italic"}},{types:["deleted"],style:{color:"#f92672",fontStyle:"italic"}},{types:["inserted"],style:{color:"rgb(173, 219, 103)",fontStyle:"italic"}},{types:["comment"],style:{color:"#8292a2",fontStyle:"italic"}},{types:["string","url"],style:{color:"#a6e22e"}},{types:["variable"],style:{color:"#f8f8f2"}},{types:["number"],style:{color:"#ae81ff"}},{types:["builtin","char","constant","function","class-name"],style:{color:"#e6db74"}},{types:["punctuation"],style:{color:"#f8f8f2"}},{types:["selector","doctype"],style:{color:"#a6e22e",fontStyle:"italic"}},{types:["tag","operator","keyword"],style:{color:"#66d9ef"}},{types:["boolean"],style:{color:"#ae81ff"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)",opacity:.7}},{types:["tag","property"],style:{color:"#f92672"}},{types:["attr-name"],style:{color:"#a6e22e !important"}},{types:["doctype"],style:{color:"#8292a2"}},{types:["rule"],style:{color:"#e6db74"}}]},M={plain:{color:"#bfc7d5",backgroundColor:"#292d3e"},styles:[{types:["comment"],style:{color:"rgb(105, 112, 152)",fontStyle:"italic"}},{types:["string","inserted"],style:{color:"rgb(195, 232, 141)"}},{types:["number"],style:{color:"rgb(247, 140, 108)"}},{types:["builtin","char","constant","function"],style:{color:"rgb(130, 170, 255)"}},{types:["punctuation","selector"],style:{color:"rgb(199, 146, 234)"}},{types:["variable"],style:{color:"rgb(191, 199, 213)"}},{types:["class-name","attr-name"],style:{color:"rgb(255, 203, 107)"}},{types:["tag","deleted"],style:{color:"rgb(255, 85, 114)"}},{types:["operator"],style:{color:"rgb(137, 221, 255)"}},{types:["boolean"],style:{color:"rgb(255, 88, 116)"}},{types:["keyword"],style:{fontStyle:"italic"}},{types:["doctype"],style:{color:"rgb(199, 146, 234)",fontStyle:"italic"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)"}},{types:["url"],style:{color:"rgb(221, 221, 221)"}}]},B={plain:{color:"#9EFEFF",backgroundColor:"#2D2A55"},styles:[{types:["changed"],style:{color:"rgb(255, 238, 128)"}},{types:["deleted"],style:{color:"rgba(239, 83, 80, 0.56)"}},{types:["inserted"],style:{color:"rgb(173, 219, 103)"}},{types:["comment"],style:{color:"rgb(179, 98, 255)",fontStyle:"italic"}},{types:["punctuation"],style:{color:"rgb(255, 255, 255)"}},{types:["constant"],style:{color:"rgb(255, 98, 140)"}},{types:["string","url"],style:{color:"rgb(165, 255, 144)"}},{types:["variable"],style:{color:"rgb(255, 238, 128)"}},{types:["number","boolean"],style:{color:"rgb(255, 98, 140)"}},{types:["attr-name"],style:{color:"rgb(255, 180, 84)"}},{types:["keyword","operator","property","namespace","tag","selector","doctype"],style:{color:"rgb(255, 157, 0)"}},{types:["builtin","char","constant","function","class-name"],style:{color:"rgb(250, 208, 0)"}}]},$={plain:{backgroundColor:"linear-gradient(to bottom, #2a2139 75%, #34294f)",backgroundImage:"#34294f",color:"#f92aad",textShadow:"0 0 2px #100c0f, 0 0 5px #dc078e33, 0 0 10px #fff3"},styles:[{types:["comment","block-comment","prolog","doctype","cdata"],style:{color:"#495495",fontStyle:"italic"}},{types:["punctuation"],style:{color:"#ccc"}},{types:["tag","attr-name","namespace","number","unit","hexcode","deleted"],style:{color:"#e2777a"}},{types:["property","selector"],style:{color:"#72f1b8",textShadow:"0 0 2px #100c0f, 0 0 10px #257c5575, 0 0 35px #21272475"}},{types:["function-name"],style:{color:"#6196cc"}},{types:["boolean","selector-id","function"],style:{color:"#fdfdfd",textShadow:"0 0 2px #001716, 0 0 3px #03edf975, 0 0 5px #03edf975, 0 0 8px #03edf975"}},{types:["class-name","maybe-class-name","builtin"],style:{color:"#fff5f6",textShadow:"0 0 2px #000, 0 0 10px #fc1f2c75, 0 0 5px #fc1f2c75, 0 0 25px #fc1f2c75"}},{types:["constant","symbol"],style:{color:"#f92aad",textShadow:"0 0 2px #100c0f, 0 0 5px #dc078e33, 0 0 10px #fff3"}},{types:["important","atrule","keyword","selector-class"],style:{color:"#f4eee4",textShadow:"0 0 2px #393a33, 0 0 8px #f39f0575, 0 0 2px #f39f0575"}},{types:["string","char","attr-value","regex","variable"],style:{color:"#f87c32"}},{types:["parameter"],style:{fontStyle:"italic"}},{types:["entity","url"],style:{color:"#67cdcc"}},{types:["operator"],style:{color:"ffffffee"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["entity"],style:{cursor:"help"}},{types:["inserted"],style:{color:"green"}}]},V={plain:{color:"#282a2e",backgroundColor:"#ffffff"},styles:[{types:["comment"],style:{color:"rgb(197, 200, 198)"}},{types:["string","number","builtin","variable"],style:{color:"rgb(150, 152, 150)"}},{types:["class-name","function","tag","attr-name"],style:{color:"rgb(40, 42, 46)"}}]},U={plain:{color:"#9CDCFE",backgroundColor:"#1E1E1E"},styles:[{types:["prolog"],style:{color:"rgb(0, 0, 128)"}},{types:["comment"],style:{color:"rgb(106, 153, 85)"}},{types:["builtin","changed","keyword","interpolation-punctuation"],style:{color:"rgb(86, 156, 214)"}},{types:["number","inserted"],style:{color:"rgb(181, 206, 168)"}},{types:["constant"],style:{color:"rgb(100, 102, 149)"}},{types:["attr-name","variable"],style:{color:"rgb(156, 220, 254)"}},{types:["deleted","string","attr-value","template-punctuation"],style:{color:"rgb(206, 145, 120)"}},{types:["selector"],style:{color:"rgb(215, 186, 125)"}},{types:["tag"],style:{color:"rgb(78, 201, 176)"}},{types:["tag"],languages:["markup"],style:{color:"rgb(86, 156, 214)"}},{types:["punctuation","operator"],style:{color:"rgb(212, 212, 212)"}},{types:["punctuation"],languages:["markup"],style:{color:"#808080"}},{types:["function"],style:{color:"rgb(220, 220, 170)"}},{types:["class-name"],style:{color:"rgb(78, 201, 176)"}},{types:["char"],style:{color:"rgb(209, 105, 105)"}}]},z={plain:{color:"#000000",backgroundColor:"#ffffff"},styles:[{types:["comment"],style:{color:"rgb(0, 128, 0)"}},{types:["builtin"],style:{color:"rgb(0, 112, 193)"}},{types:["number","variable","inserted"],style:{color:"rgb(9, 134, 88)"}},{types:["operator"],style:{color:"rgb(0, 0, 0)"}},{types:["constant","char"],style:{color:"rgb(129, 31, 63)"}},{types:["tag"],style:{color:"rgb(128, 0, 0)"}},{types:["attr-name"],style:{color:"rgb(255, 0, 0)"}},{types:["deleted","string"],style:{color:"rgb(163, 21, 21)"}},{types:["changed","punctuation"],style:{color:"rgb(4, 81, 165)"}},{types:["function","keyword"],style:{color:"rgb(0, 0, 255)"}},{types:["class-name"],style:{color:"rgb(38, 127, 153)"}}]},H={plain:{color:"#f8fafc",backgroundColor:"#011627"},styles:[{types:["prolog"],style:{color:"#000080"}},{types:["comment"],style:{color:"#6A9955"}},{types:["builtin","changed","keyword","interpolation-punctuation"],style:{color:"#569CD6"}},{types:["number","inserted"],style:{color:"#B5CEA8"}},{types:["constant"],style:{color:"#f8fafc"}},{types:["attr-name","variable"],style:{color:"#9CDCFE"}},{types:["deleted","string","attr-value","template-punctuation"],style:{color:"#cbd5e1"}},{types:["selector"],style:{color:"#D7BA7D"}},{types:["tag"],style:{color:"#0ea5e9"}},{types:["tag"],languages:["markup"],style:{color:"#0ea5e9"}},{types:["punctuation","operator"],style:{color:"#D4D4D4"}},{types:["punctuation"],languages:["markup"],style:{color:"#808080"}},{types:["function"],style:{color:"#7dd3fc"}},{types:["class-name"],style:{color:"#0ea5e9"}},{types:["char"],style:{color:"#D16969"}}]},W={plain:{color:"#0f172a",backgroundColor:"#f1f5f9"},styles:[{types:["prolog"],style:{color:"#000080"}},{types:["comment"],style:{color:"#6A9955"}},{types:["builtin","changed","keyword","interpolation-punctuation"],style:{color:"#0c4a6e"}},{types:["number","inserted"],style:{color:"#B5CEA8"}},{types:["constant"],style:{color:"#0f172a"}},{types:["attr-name","variable"],style:{color:"#0c4a6e"}},{types:["deleted","string","attr-value","template-punctuation"],style:{color:"#64748b"}},{types:["selector"],style:{color:"#D7BA7D"}},{types:["tag"],style:{color:"#0ea5e9"}},{types:["tag"],languages:["markup"],style:{color:"#0ea5e9"}},{types:["punctuation","operator"],style:{color:"#475569"}},{types:["punctuation"],languages:["markup"],style:{color:"#808080"}},{types:["function"],style:{color:"#0e7490"}},{types:["class-name"],style:{color:"#0ea5e9"}},{types:["char"],style:{color:"#D16969"}}]},G={plain:{backgroundColor:"hsl(220, 13%, 18%)",color:"hsl(220, 14%, 71%)",textShadow:"0 1px rgba(0, 0, 0, 0.3)"},styles:[{types:["comment","prolog","cdata"],style:{color:"hsl(220, 10%, 40%)"}},{types:["doctype","punctuation","entity"],style:{color:"hsl(220, 14%, 71%)"}},{types:["attr-name","class-name","maybe-class-name","boolean","constant","number","atrule"],style:{color:"hsl(29, 54%, 61%)"}},{types:["keyword"],style:{color:"hsl(286, 60%, 67%)"}},{types:["property","tag","symbol","deleted","important"],style:{color:"hsl(355, 65%, 65%)"}},{types:["selector","string","char","builtin","inserted","regex","attr-value"],style:{color:"hsl(95, 38%, 62%)"}},{types:["variable","operator","function"],style:{color:"hsl(207, 82%, 66%)"}},{types:["url"],style:{color:"hsl(187, 47%, 55%)"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"hsl(220, 14%, 71%)"}}]},q={plain:{backgroundColor:"hsl(230, 1%, 98%)",color:"hsl(230, 8%, 24%)"},styles:[{types:["comment","prolog","cdata"],style:{color:"hsl(230, 4%, 64%)"}},{types:["doctype","punctuation","entity"],style:{color:"hsl(230, 8%, 24%)"}},{types:["attr-name","class-name","boolean","constant","number","atrule"],style:{color:"hsl(35, 99%, 36%)"}},{types:["keyword"],style:{color:"hsl(301, 63%, 40%)"}},{types:["property","tag","symbol","deleted","important"],style:{color:"hsl(5, 74%, 59%)"}},{types:["selector","string","char","builtin","inserted","regex","attr-value","punctuation"],style:{color:"hsl(119, 34%, 47%)"}},{types:["variable","operator","function"],style:{color:"hsl(221, 87%, 60%)"}},{types:["url"],style:{color:"hsl(198, 99%, 37%)"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"hsl(230, 8%, 24%)"}}]},Y=(e,n)=>{const{plain:t}=e,r=e.styles.reduce(((e,t)=>{const{languages:r,style:o}=t;return r&&!r.includes(n)||t.types.forEach((n=>{const t=k(k({},e[n]),o);e[n]=t})),e}),{});return r.root=t,r.plain=T(k({},t),{backgroundColor:void 0}),r},K=/\r\n|\r|\n/,X=e=>{0===e.length?e.push({types:["plain"],content:"\n",empty:!0}):1===e.length&&""===e[0].content&&(e[0].content="\n",e[0].empty=!0)},Q=(e,n)=>{const t=e.length;return t>0&&e[t-1]===n?e:e.concat(n)},Z=e=>{const n=[[]],t=[e],r=[0],o=[e.length];let a=0,s=0,i=[];const l=[i];for(;s>-1;){for(;(a=r[s]++)