From 3f95ad93cbd78cd17ab636b48f27c6d61901fff0 Mon Sep 17 00:00:00 2001 From: Vince Juliano Date: Sat, 13 Jan 2024 16:37:29 -0500 Subject: [PATCH 1/3] feat(tutorials): add token and dao guides --- src/guides/tutorials/dao.md | 277 ++++++++++++++++++++++++++++++++++ src/guides/tutorials/token.md | 241 +++++++++++++++++++++++++++++ 2 files changed, 518 insertions(+) diff --git a/src/guides/tutorials/dao.md b/src/guides/tutorials/dao.md index e69de29b..ff6d89c6 100644 --- a/src/guides/tutorials/dao.md +++ b/src/guides/tutorials/dao.md @@ -0,0 +1,277 @@ +# DAO Guide + +This guide brings you through the process of building a DAO using aos. If you have not already, you will need to first build a [Token](./token.md) in aos. We will load the DAO code into aos alongside the token code from the [Token](./token.md) guide. In the context of ao a DAO may be used to govern MU, CU, and SU nodes. + +In our DAO we will implement a process knwon as "slashing". In the case of ao, if a unit is misbehaving, other units may vote to slash them. Slashing means they will lose their stake, we will get more into stake later. + +Make a new directory called `dao` and copy in the token.lua created in the token guide. + +``` +mkdir dao +cd dao +cp ../token/token.lua . +``` + +Now create a new file called dao.lua and open it in your favorite editor. + +## Writing the DAO code + +### Initializing state + +Open up dao.lua and add the following lines + +```lua +Balances = Balances or {} +Stakers = Stakers or {} +Unstaking = Unstaking or {} +Votes = Votes or {} +``` + +These tables store the state of the DAO, including user Balances, staked tokens, Unstaking requests, and voting records. + +### Staking + +Staking is the process of putting your tokens up to give you the ability to vote. If someone wishes to obtain the ability to vote they must possess and stake some of their tokens. Lets add a Handler for staking. A member or node in ao would want to stake if they want to obtain the ability to vote to slash or keep a node, which we will discuss further later. + +```lua +-- Stake Action Handler +Handlers.stake = function(msg) + local quantity = tonumber(msg.Tags.Quantity) + local delay = tonumber(msg.Tags.UnstakeDelay) + local height = tonumber(msg['Block-Height']) + assert(Balances[msg.From] and Balances[msg.From] >= quantity, "Insufficient balance to stake") + Balances[msg.From] = Balances[msg.From] - quantity + Stakers[msg.From] = Stakers[msg.From] or {} + Stakers[msg.From].amount = (Stakers[msg.From].amount or 0) + quantity + Stakers[msg.From].unstake_at = height + delay +end +``` + +The above takes the quantity and a delay from the incoming message, and if the From has enough balance, puts the stake into the Stakers table. The delay represents a future time when the tokens can be unstaked. + +### Unstaking + +Unstaking is the process of withdrawing staked tokens. If someone Unstaked all their tokens they would be giving up the ability to vote. Here we provide a handler for Unstaking. + +```lua +-- Unstake Action Handler +Handlers.unstake = function(msg) + local quantity = tonumber(msg.Tags.Quantity) + local stakerInfo = Stakers[msg.From] + assert(stakerInfo and stakerInfo.amount >= quantity, "Insufficient staked amount") + stakerInfo.amount = stakerInfo.amount - quantity + Unstaking[msg.From] = { + amount = quantity, + release_at = stakerInfo.unstake_at + } +end +``` + +This pushes into the Unstaking table, an incoming amount from the Message and reduces the amount they have staked `stakerInfo.amount = stakerInfo.amount - quantity`. + +### Voting + +Voting is the process which governs the DAO. When the Vote Message is sent, members receive a Vote proportional to the amount they have staked. The deadline variable represents when the vote will be applied. + +```lua +-- Vote Action Handler +Handlers.vote = function(msg) + local quantity = Stakers[msg.From].amount + local target = msg.Tags.Target + local side = msg.Tags.Side + local deadline = tonumber(msg['Block-Height']) + tonumber(msg.Tags.Deadline) + assert(quantity > 0, "No staked tokens to vote") + Votes[target] = Votes[target] or { yay = 0, nay = 0, deadline = deadline } + Votes[target][side] = Votes[target][side] + quantity +end +``` + +Here, if the Process or user sending the vote has some tokens they can place an entry in the Votes table. The `side` yay or nay, is set to the quantity of their stake. In our example a "nay" vote is a vote to slash and a "yay" vote is a vote to keep. + +The msg.Tags.Target sent in would represent something being voted on. In the case of AO this may be the wallet address of a MU, CU, or SU which members are voting to slash. + +### Finalization + +There is some logic that we want to run on every Message. We will define this as the `finalizationHandler`. Getting slashed means you are losing your stake in the DAO. + +```lua +-- Finalization Handler +local finalizationHandler = function(msg) + local currentHeight = tonumber(msg['Block-Height']) + -- Process unstaking + for address, unstakeInfo in pairs(Unstaking) do + if currentHeight >= unstakeInfo.release_at then + Balances[address] = (Balances[address] or 0) + unstakeInfo.amount + Unstaking[address] = nil + end + end + -- Process voting + for target, voteInfo in pairs(Votes) do + if currentHeight >= voteInfo.deadline then + if voteInfo.nay > voteInfo.yay then + -- Slash the target's stake + local slashedAmount = Stakers[target] and Stakers[target].amount or 0 + Stakers[target].amount = 0 + end + -- Clear the vote record after processing + Votes[target] = nil + end + end +end +``` + +### Attaching the Handlers to incoming Message Tags + +Here we add a helper function called `continue` which will allow us to execute through to the finalizationHandler on every message. + +```lua +-- wrap function to continue handler flow +function continue(fn) + return function (msg) + local result = fn(msg) + if (result) == -1 then + return 1 + end + return result + end +end +``` + +Finally we will register all the Handlers and wrap them in continue in order to always reach the finalizationHandler for every Stake, Unstake, and Vote Message. + +```lua +-- Registering Handlers +Handlers.add("stake", + continue(Handlers.utils.hasMatchingTag("Action", "Stake")), Handlers.stake) +Handlers.add("unstake", + continue(Handlers.utils.hasMatchingTag("Action", "Unstake")), Handlers.unstake) +Handlers.add("vote", + continue(Handlers.utils.hasMatchingTag("Action", "Vote")), Handlers.vote) +-- Finalization handler should be called for every message +Handlers.add("finalize", function (msg) return -1 end, finalizationHandler) +``` + +## Loading and Testing + +Now that we have dao.lua complete we can load it into aos alongside token.lua from the [token](./token.md) guide. Run a new aos Proces called `dao` while also loading dao.lua and token.lua + +```sh +aos dao --load token.lua --load dao.lua +``` + +From another terminal run another aos Process called voter + +```sh +aos voter +``` + +Now from the dao aos shell send that voter some tokens + +```lua +aos> Send({ Target = ao.id, Tags = { Action = "Transfer", Recipient = 'process id of the voter aos', Quantity = '100000' }}) +``` + +From another terminal run another aos Process called cu + +```sh +aos cu +``` + +Now from the dao aos shell send that cu some tokens + +```lua +aos> Send({ Target = ao.id, Tags = { Action = "Transfer", Recipient = 'process id of the cu aos', Quantity = '100000' }}) +``` + +Check the Balances from the dao aos shell, we should see a balance for the voter and cu Process. In the below examples `bclTw5QOm5soeMXoaBfXLvzjheT1_kwc2vLfDntRE4s` is the dao aos, `QcGIOXJ1p2SOGzGAccOcV-nSudVRiaPYbU7SjeLx1OE` is the voter aos, and `X6mkYwt87mIsfsQzDAJr54S0BBxLrDwWMdq7seBcS6s` is the cu aos. + +```lua +aos> Balances +{ + 'QcGIOXJ1p2SOGzGAccOcV-nSudVRiaPYbU7SjeLx1OE': 100000, + bclTw5QOm5soeMXoaBfXLvzjheT1_kwc2vLfDntRE4s: 99999999900000, + X6mkYwt87mIsfsQzDAJr54S0BBxLrDwWMdq7seBcS6s: 100000 +} +aos> +``` + +From the voter aos Process, Stake some tokens + +```lua +aos> Send({ Target = "bclTw5QOm5soeMXoaBfXLvzjheT1_kwc2vLfDntRE4s", Tags = { Action = "Stake", Quantity = '1000', UnstakeDelay = "10" }}) +``` + +From the cu aos Process, Stake some tokens + +```lua +aos> Send({ Target = "bclTw5QOm5soeMXoaBfXLvzjheT1_kwc2vLfDntRE4s", Tags = { Action = "Stake", Quantity = '1000', UnstakeDelay = "10" }}) +``` + +This means we want to Stake 1000 tokens for 10 blocks. So after 10 blocks we have the ability to Unstake. + +Check the value of the Stakers table from the dao aos shell + +```lua +aos> Stakers +{ + 'QcGIOXJ1p2SOGzGAccOcV-nSudVRiaPYbU7SjeLx1OE': { amount: 1000, unstake_at: 1342634 }, + X6mkYwt87mIsfsQzDAJr54S0BBxLrDwWMdq7seBcS6s: { amount: 1000, unstake_at: 1342634 } +} +aos> +``` + +Now lets vote to slash the cu from the voter aos process, our vote takes effect in 1 block + +```lua +aos> Send({ Target = "bclTw5QOm5soeMXoaBfXLvzjheT1_kwc2vLfDntRE4s", Tags = { Action = "Vote", Target = "X6mkYwt87mIsfsQzDAJr54S0BBxLrDwWMdq7seBcS6s(the cu aos)", Side = "nay", Deadline = "1" }}) +``` + +From the dao aos check the Votes + +```lua +aos> Votes +{ + X6mkYwt87mIsfsQzDAJr54S0BBxLrDwWMdq7seBcS6s: { nay: 1000, yay: 0, deadline: 1342627 } +} +aos> +``` + +Now wait for Arweave to reach the deadline block height and then send a Stake Message from the dao aos just to trigger the finalizationHandler. You can check the block height at (https://arweave.net/)[https://arweave.net/] + +```lua +Send({ Target = ao.id, Tags = { Action = "Stake", Quantity = '1000', UnstakeDelay = "10" }}) +``` + +Now check Votes and Stakers, Votes should be empty and the cu aos Process should have lost their Stake. + +```lua +aos> Votes +[] +aos> Stakers +{ + 'QcGIOXJ1p2SOGzGAccOcV-nSudVRiaPYbU7SjeLx1OE'(voter aos process): { amount: 1000, unstake_at: 1342647 }, + bclTw5QOm5soeMXoaBfXLvzjheT1_kwc2vLfDntRE4s(dao aos process): { amount: 1000, unstake_at: 1342658 }, + X6mkYwt87mIsfsQzDAJr54S0BBxLrDwWMdq7seBcS6s(cu aos process): { amount: 0, unstake_at: 1342647 } +} +aos> +``` + +Finally lets Unstake our tokens from the voter aos process + +```lua +Send({ Target = "bclTw5QOm5soeMXoaBfXLvzjheT1_kwc2vLfDntRE4s", Tags = { Action = "Unstake", Quantity = '1000'}}) +``` + +And check the Stakers table from the dao aos + +```lua +aos> Stakers +{ + 'QcGIOXJ1p2SOGzGAccOcV-nSudVRiaPYbU7SjeLx1OE': { amount: 0, unstake_at: 1342647 }, + bclTw5QOm5soeMXoaBfXLvzjheT1_kwc2vLfDntRE4s: { amount: 1000, unstake_at: 1342658 }, + X6mkYwt87mIsfsQzDAJr54S0BBxLrDwWMdq7seBcS6s: { amount: 0, unstake_at: 1342647 } +} +aos> +``` + +That concludes the DAO Guide we hope it was helpful! diff --git a/src/guides/tutorials/token.md b/src/guides/tutorials/token.md index e69de29b..f9c2c99c 100644 --- a/src/guides/tutorials/token.md +++ b/src/guides/tutorials/token.md @@ -0,0 +1,241 @@ +# Token Guide + +This guide brings you through the process of building a token using aos. It is based on the ao standard token [spec](../../references/token.md). + +To begin you will need to have aos [installed](../aos/installing.md). Now you are ready to build. + +## Setting up the development environment + +This guide will load code from the local file system into aos. So you will want to create a directory to edit the .lua files and run aos. + +```sh +mkdir token +cd token +``` + +Now create a file from your favorite editor inside the token directory called token.lua, now we are ready to run aos. From within the token directory run. + +```sh +aos mytoken +``` + +The second part of this command (mytoken) creates a named aos on your local machine which will tie a process id to that name. This feature of naming in aos allows us to run multiple aos processes on one machine. You are now in the aos shell. + +## Writing the Token code + +Lets write the Lua code that will be the token. This code will run in aos so we have access to the aos libraries and globals, see [intro](../aos/intro.md) for an outline of these. + +### Initializing the Token state + +Open up token.lua in your editor and add the following code. + +```lua +local json = require('json') + +if not Balances then Balances = { [ao.id] = 100000000000000 } end + +if Name ~= 'My Coin' then Name = 'My Coin' end + +if Ticker ~= 'COIN' then Ticker = 'COIN' end + +if Denomination ~= 10 then Denomination = 10 end + +if not Logo then Logo = 'optional arweave TXID of logo image' end +``` + +The first line of this code imports a module for later use. The second line `if not Balances then Balances = { [ao.id] = 100000000000000 } end` is initializing a Balances table which is the way the Process tracks who posses the token. We initialize our token process `ao.id` to start with all the balance. + +The next 4 lines define the initialization parameters of the token including an optional arweave tx containing an image for the token. The Denomination variable is not optional while Name, Ticker, and Logo are. The code `if Denomination ~= 10 then Denomination = 10 end` tells us the number of the token that should be treated as a single unit. + +### Info and Balances Handlers + +Now lets add our first Handler to handle incoming Messages. + +```lua +Handlers.add('info', Handlers.utils.hasMatchingTag('Action', 'Info'), function(msg) + ao.send( + { Target = msg.From, Tags = { Name = Name, Ticker = Ticker, Logo = Logo, Denomination = tostring(Denomination) } }) +end) +``` + +This code means that if someone Sends a message with the Tag, Action = "info", our token will Send back a message with all of the information defined above. Note the `Target = msg.From`, this tells ao we are replying to the process that sent us this message. + +Now we can add 2 Handlers which provide information about token Balances. + +```lua +Handlers.add('balance', Handlers.utils.hasMatchingTag('Action', 'Balance'), function(msg) + local bal = '0' + + -- If not Target is provided, then return the Senders balance + if (msg.Tags.Target and Balances[msg.Tags.Target]) then + bal = tostring(Balances[msg.Tags.Target]) + elseif Balances[msg.From] then + bal = tostring(Balances[msg.From]) + end + + ao.send({ + Target = msg.From, + Tags = { Target = msg.From, Balance = bal, Ticker = Ticker, Data = json.encode(tonumber(bal)) } + }) +end) + +Handlers.add('balances', Handlers.utils.hasMatchingTag('Action', 'Balances'), + function(msg) ao.send({ Target = msg.From, Data = json.encode(Balances) }) end) +``` + +The first Handler above `Handlers.add('balance'` handles a process or person requesting their own balance or the balance of a Target. Then replies with a message containing the info. The second Handler `Handlers.add('balances'` just replies with the entire Balances table. + +### Handling Token Transfers + +Before we begin testing we will add 2 more Handlers one which allows for the transfer of tokens between processes or users. + +```lua +Handlers.add('transfer', Handlers.utils.hasMatchingTag('Action', 'Transfer'), function(msg) + assert(type(msg.Tags.Recipient) == 'string', 'Recipient is required!') + assert(type(msg.Tags.Quantity) == 'string', 'Quantity is required!') + + if not Balances[msg.From] then Balances[msg.From] = 0 end + + if not Balances[msg.Tags.Recipient] then Balances[msg.Tags.Recipient] = 0 end + + local qty = tonumber(msg.Tags.Quantity) + assert(type(qty) == 'number', 'qty must be number') + + if Balances[msg.From] >= qty then + Balances[msg.From] = Balances[msg.From] - qty + Balances[msg.Tags.Recipient] = Balances[msg.Tags.Recipient] + qty + + --[[ + Only Send the notifications to the Sender and Recipient + if the Cast tag is not set on the Transfer message + ]] -- + if not msg.Tags.Cast then + -- Send Debit-Notice to the Sender + ao.send({ + Target = msg.From, + Tags = { Action = 'Debit-Notice', Recipient = msg.Tags.Recipient, Quantity = tostring(qty) } + }) + -- Send Credit-Notice to the Recipient + ao.send({ + Target = msg.Tags.Recipient, + Tags = { Action = 'Credit-Notice', Sender = msg.From, Quantity = tostring(qty) } + }) + end + else + ao.send({ + Target = msg.Tags.From, + Tags = { Action = 'Transfer-Error', ['Message-Id'] = msg.Id, Error = 'Insufficient Balance!' } + }) + end +end) +``` + +In summary, this code checks to make sure the Recipient and Quantity Tags have been provided, initializes the balances of the person sending the message and the Recipient if they dont exist and then attempts to transfer the specified quantity to the Recipient in the Balances table + +```lua +Balances[msg.From] = Balances[msg.From] - qty +Balances[msg.Tags.Recipient] = Balances[msg.Tags.Recipient] + qty +``` + +If the transfer was successful a Debit-Notice is sent to the sender of the original message and a Credit-Notice is sent to the Recipient. + +```lua +-- Send Debit-Notice to the Sender +ao.send({ + Target = msg.From, + Tags = { Action = 'Debit-Notice', Recipient = msg.Tags.Recipient, Quantity = tostring(qty) } +}) +-- Send Credit-Notice to the Recipient +ao.send({ + Target = msg.Tags.Recipient, + Tags = { Action = 'Credit-Notice', Sender = msg.From, Quantity = tostring(qty) } +}) +``` + +If there was insufficient balance for the transfer it sends back a failure message + +```lua +ao.send({ + Target = msg.Tags.From, + Tags = { Action = 'Transfer-Error', ['Message-Id'] = msg.Id, Error = 'Insufficient Balance!' } +}) +``` + +The line `if not msg.Tags.Cast then` Means were not producing any messages to crank if the Cast tag was set. This is part of the ao protocol. + +### Minting + +We will add 1 final Handler that allows the creator of this token to mint more of the token. + +```lua +Handlers.add('mint', Handlers.utils.hasMatchingTag('Action', 'Mint'), function(msg, env) + assert(type(msg.Tags.Quantity) == 'string', 'Quantity is required!') + + if msg.From == env.Process.Id then + -- Add tokens to the token pool, according to Quantity + local qty = tonumber(msg.Tags.Quantity) + Balances[env.Process.Id] = Balances[env.Process.Id] + qty + else + ao.send({ + Target = msg.Tags.From, + Tags = { + Action = 'Mint-Error', + ['Message-Id'] = msg.Id, + Error = 'Only the Process Owner can mint new ' .. Ticker .. ' tokens!' + } + }) + end +end) +``` + +## Loading and Testing + +Ok now we are ready to load this file into aos and test. From the aos prompt load in the file. + +```sh +aos> .load token.lua +``` + +Now we can send Messages to our aos process id, from the same aos prompt to see if is working. If we use ao.id as the Target we are sending a message to ourselves. + +```sh +aos> Send({ Target = ao.id, Tags = { Action = "Info" }}) +``` + +Check the latest inbox message, if its not there yet wait a few seconds and check again. + +```sh +aos> Inbox[#Inbox].Data +``` + +This should print the Info defined in the contract. + +Now try a transfer + +```sh +aos> Send({ Target = ao.id, Tags = { Action = "Transfer", Recipient = 'another wallet or processid', Quantity = '10000' }}) +``` + +And check the balances + +```sh +aos> Send({ Target = ao.id, Tags = { Action = "Balances" }}) +aos> Inbox[#Inbox].Data +``` + +You should see a balance for the Recipient you sent to. + +Finally, attempt to mint some tokens + +```sh +Send({ Target = ao.id, Tags = { Action = "Mint", Quantity = '1000' }}) +``` + +And check the balances + +```sh +aos> Send({ Target = ao.id, Tags = { Action = "Balances" }}) +aos> Inbox[#Inbox].Data +``` + +That concludes the token example we hope it was helpful! From 6c58c313fbdac50259b2cde291c1aad70843860f Mon Sep 17 00:00:00 2001 From: Vince Juliano Date: Sat, 13 Jan 2024 16:39:01 -0500 Subject: [PATCH 2/3] chore(references): add token reference --- src/references/token.md | 303 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 303 insertions(+) create mode 100644 src/references/token.md diff --git a/src/references/token.md b/src/references/token.md new file mode 100644 index 00000000..94705804 --- /dev/null +++ b/src/references/token.md @@ -0,0 +1,303 @@ +# ao Token and Subledger Specification + +**Status:** DRAFT-1 +**Targeting Network:** ao.TN.1 + +This specification describes the necessary message handlers and functionality required for a standard ao token process. Implementations of this standard typically offer users the ability control a transferrable asset, whose scarcity is maintained by the process. + +Each compliant process will likely implement a ledger of balances in order to encode ownership of the asset that the process represents. Compliant processes have a set of methods that allow for the modification of this ledger, typically with safe-guards to ensure the scarcity of ownership of the token represented by the process. + +Additionally, this specification describes a 'subledger' process type which, when implemented, offers the ability to split move a number of the tokens from the parent into a child process that implements the same token interface specification. If the `From-Module` of the subledger process is trusted by the participants, these subledgers can be used to transact in the 'source' token, without directly exchanging messages with it. This allows participants to use the tokens from a process, even if that process is congested. Optionally, if the participants trust the `Module` a subledger process is running, they are able to treat balances across these processes as _fungible_. The result of this is that an arbitrary numbers of parallel processes -- and thus, transactions -- can be processed by a single token at any one time. + +# Token Processes + +A specification-compliant token process responds to a number of different forms of messages, with each form specified in an `Action` tag. The full set of `Action` messages that the token must support are as follows: + +| Name | Description | Read-Only | +| -------- | ------------------------------------------------------------------------------------------------------ | ------------------ | +| Balance | get the balance of an identifer | :heavy_check_mark: | +| Balances | get a list of all ledger/account balances | :heavy_check_mark: | +| Transfer | send 1 or more units from the callers balance to one or move targets with the option to notify targets | :x: | +| Mint | if the ledger process is the root and you would like to increase token supply | :x: | + +In the remainder of this section the tags necessary to spawn a compliant token process, along with the form of each of the `Action` messages and their results is described. + +## Spawning Parameters + +Every compliant token process must carry the following immutable parameters upon its spawning message: + +| Tag | Description | Optional? | +| ------------ | --------------------------------------------------------------------------------------------------------------------- | ------------------ | +| Name | The title of the token, as it should be displayed to users. | :heavy_check_mark: | +| Ticker | A suggested shortened name for the token, such that it can be referenced quickly. | :heavy_check_mark: | +| Logo | An image that applications may deserire to show next to the token, in order to make it quickly visually identifiable. | :heavy_check_mark: | +| Denomination | The number of the token that should be treated as a single unit when quantities and balances are displayed to users. | :x: | + +## Messaging Protocol + +### Balance(Target? : string) + +Returns the balance of a target, if a target is not supplied then the balance of the sender of the message must be returned. + +Example `Action` message: + +```lua= +send({ + Target = "{TokenProcess Identifier}", + Tags = { + Action = "Balance", + Target = "{IDENTIFIER}" + } +}) +``` + +Example response message: + +``` +{ + Tags = { + Balance = "50", + Target = "LcldyO8wwiGDzC3iXzGofdO8JdR4S1_2A6Qtz-o33-0", + Ticker = "FUN" + } +} +``` + +### Balances() + +Returns the balance of all participants in the token. + +```lua +send({ + Target = "[TokenProcess Identifier]", + Tags = { + Action = "Balances", + Limit = 1000, # TODO: Is this necessary if the user is paying for the compute and response? + Cursor? = "BalanceIdentifer" + } +}) +``` + +Example response message: + +```lua +{ + Data = { + "MV8B3MAKTsUOqyCzQ0Tsa2AR3TiWTBU1Dx0xM4MO-f4": 100, + "LcldyO8wwiGDzC3iXzGofdO8JdR4S1_2A6Qtz-o33-0": 50 + } +} +``` + +### Transfer(Target, Quantity) + +If the sender has a sufficient balance, send the `Quantity` to the `Target`, issuing a `Credit-Notice` to the recipient and a `Debit-Notice` to the sender. If the sender has an insufficient balance, fail and notify the sender. + +```lua +send({ + Target = "[TokenProcess Identifier]", + Tags = { + { name = "Action", value = "Transfer" }, + { name = "Recipient", value = "[ADDRESS]" }, + { name = "Quantity", value = "100" } + } +}) +``` + +If a successful transfer occurs a notification message should be sent if `Cast` is not set. + +```lua +ao.send({ + Target = "[Recipient Address]", + Tags = { + { name = "Action", value = "Credit-Notice" }, + { name = "Sender", value = "[ADDRESS]" }, + { name = "Quantity", value = "100"} + } +}) +``` + +Recipients will infer from the `From-Process` tag of the message which tokens they have received. + +### Get-Info() + +```lua +send({ + Target = "{Token}", + Tags = { + Action = "Info" + } +}) +``` + +### Mint() [optional] + +Implementing a `Mint` action gives the process a way of allowing valid participants to create new tokens. + +```lua +send({ + Target ="{Token Process}", + Tags = { + Action = "Mint", + Quantity = "1000" + } +}) +``` + +# Subledger Processes + +In order to function appropriately, subledgers must implement the full messaging protocol of token contracts (excluding the `Mint` action). Subledgers must also implement additional features and spawn parameters for their processes. These modifications are described in the following section. + +### Spawning Parameters + +Every compliant subledger process must carry the following immutable parameters upon its spawning message: + +| Tag | Description | Optional? | +| ------------ | ------------------------------------------------------------------ | --------- | +| Source-Token | The `ID` of the top-most process that this subledger represents. | :x: | +| Parent-Token | The `ID` of the parent process that this subledger is attached to. | :x: | + +### `Credit-Notice` Handler + +Upon receipt of a `Credit-Notice` message, a compliant subledger process must check if the process in question is the `Parent-Token`. If it is, the subledger must increase the balance of the `Sender` by the specified quantity. + +### Transfer(Target, Quantity) + +In addition to the normal tags that are passed in the `Credit-Notice` message to the recipient of tokens, a compliant subledger process must also provide both of the `Source-Token` and `Parent-Token` values. This allows the recipient of the `Transfer` message -- if they trust the `Module` of the subledger process -- to credit a receipt that is analogous (fungible with) deposits from the `Source-Token`. + +The modified `Credit-Notice` should be structured as follows: + +```lua +ao.send({ + Target = "[Recipient Address]", + Tags = { + { name = "Action", value = "Credit-Notice" }, + { name = "Quantity", value = "100"}, + { name = "Source-Token", value = "[ADDRESS]" }, + { name = "Parent-Token", value = "[ADDRESS]" } + } +}) +``` + +### Withdraw(Target?, Quantity) + +All subledgers must allow balance holders to withdraw their tokens to the parent ledger. Upon receipt of an `Action: Withdraw` message, the subledger must send an `Action` message to its `Parent-Ledger`, transferring the requested tokens to the caller's address, while debiting their account locally. This transfer will result in a `Credit-Notice` from the `Parent-Ledger` for the caller. + +```lua +send({ + Target = "[TokenProcess Identifier]", + Tags = { + { name = "Action", value = "Withdraw" }, + { name = "Recipient", value = "[ADDRESS]" }, + { name = "Quantity", value = "100" } + } +}) +``` + +# Token Example + +> NOTE: When implementing a token it is important to remember that all Tags on a message MUST be "string"s. Using the`tostring` function you can convert simple types to strings. + +```lua +if not balances then + balances = { [ao.id] = 100000000000000 } +end + +if name ~= "Fun Coin" then + name = "Fun Coin" +end + +if ticker ~= "Fun" then + ticker = "fun" +end + +if denomination ~= 6 then + denomination = 6 +end + +-- handlers that handler incoming msg +handlers.add( + "transfer", + handlers.utils.hasMatchingTag("Action", "Transfer"), + function (msg) + assert(type(msg.Tags.Recipient) == 'string', 'Recipient is required!') + assert(type(msg.Tags.Quantity) == 'string', 'Quantity is required!') + + if not balances[msg.From] then + balances[msg.From] = 0 + end + + if not balances[msg.Tags.Recipient] then + balances[msg.Tags.Recipient] = 0 + end + + local qty = tonumber(msg.Tags.Quantity) + assert(type(qty) == 'number', 'qty must be number') + -- handlers.utils.reply("Transfering qty")(msg) + if balances[msg.From] >= qty then + balances[msg.From] = balances[msg.From] - qty + balances[msg.Tags.Recipient] = balances[msg.Tags.Recipient] + qty + ao.send({ + Target = msg.From, + Tags = { + Action = "Debit-Notice", + Quantity = tostring(qty) + } + }) + ao.send({ + Target = msg.Tags.Recipient, + Tags = { + Action = "Credit-Notice", + Quantity = tostring(qty) + }}) + -- if msg.Tags.Cast and msg.Tags.Cast == "true" then + -- return + -- end + + end + end +) + +handlers.add( + "balance", + handlers.utils.hasMatchingTag("Action", "Balance"), + function (msg) + assert(type(msg.Tags.Target) == "string", "Target Tag is required!") + local bal = "0" + if balances[msg.Tags.Target] then + bal = tostring(balances[msg.Tags.Target]) + end + ao.send({Target = msg.From, Tags = { + Target = msg.From, + Balance = bal, + Ticker = ticker or "" + }}) + end +) + +local json = require("json") + +handlers.add( + "balances", + handlers.utils.hasMatchingTag("Action", "Balances"), + function (msg) + ao.send({ + Target = msg.From, + Data = json.encode(balances) + }) + end + +) + +handlers.add( + "info", + handlers.utils.hasMatchingTag("Action", "Info"), + function (msg) + ao.send({Target = msg.From, Tags = { + Name = name, + Ticker = ticker, + Denomination = tostring(denomination) + }}) + end +) +``` From dcab9b2e074be592931472bac1f9436248508439 Mon Sep 17 00:00:00 2001 From: Vince Juliano Date: Sat, 13 Jan 2024 16:49:51 -0500 Subject: [PATCH 3/3] chore(aoconnect): change to aoconnect --- languages/strings/en.json | 7 +- src/.vitepress/.temp/app.js | 8332 +++++++++++++++++ .../.temp/assets/style.V__jefr4.css | 4521 +++++++++ src/.vitepress/.temp/concepts_index.md.js | 35 + src/.vitepress/.temp/concepts_messages.md.js | 711 ++ src/.vitepress/.temp/concepts_processes.md.js | 618 ++ src/.vitepress/.temp/concepts_specs.md.js | 35 + src/.vitepress/.temp/favicon.ico | Bin 0 -> 12483 bytes .../.temp/getting-started_index.md.js | 73 + .../.temp/guides_aoconnect_aoconnect.md.js | 35 + .../.temp/guides_aoconnect_connecting.md.js | 199 + .../guides_aoconnect_installing-connect.md.js | 109 + .../guides_aoconnect_reading-results.md.js | 98 + .../guides_aoconnect_sending-messages.md.js | 421 + .../guides_aoconnect_spawning-processes.md.js | 367 + src/.vitepress/.temp/guides_aos_cli.md.js | 84 + src/.vitepress/.temp/guides_aos_index.md.js | 35 + .../.temp/guides_aos_installing.md.js | 46 + src/.vitepress/.temp/guides_aos_intro.md.js | 82 + src/.vitepress/.temp/guides_aos_load.md.js | 101 + .../.temp/guides_debugging_debugging.md.js | 35 + .../.temp/guides_debugging_tracing.md.js | 148 + src/.vitepress/.temp/guides_index.md.js | 35 + .../.temp/guides_tutorials_bot.md.js | 31 + .../.temp/guides_tutorials_chatroom.md.js | 358 + .../.temp/guides_tutorials_dao.md.js | 2111 +++++ .../.temp/guides_tutorials_index.md.js | 35 + .../.temp/guides_tutorials_lua.md.js | 104 + .../.temp/guides_tutorials_messaging.md.js | 125 + .../.temp/guides_tutorials_pingpong.md.js | 133 + .../.temp/guides_tutorials_prompt.md.js | 60 + .../.temp/guides_tutorials_token.md.js | 2049 ++++ .../.temp/guides_tutorials_tour.md.js | 35 + src/.vitepress/.temp/index.md.js | 31 + src/.vitepress/.temp/package.json | 4 + .../plugin-vue_export-helper.yVxbj29m.js | 8 + src/.vitepress/.temp/references_ao.md.js | 934 ++ .../.temp/references_handlers.md.js | 291 + src/.vitepress/.temp/references_index.md.js | 35 + src/.vitepress/.temp/references_lua.md.js | 37 + src/.vitepress/.temp/references_token.md.js | 1951 ++++ src/.vitepress/.temp/references_wasm.md.js | 35 + src/.vitepress/locales.js | 18 +- .../ao-connect.md => aoconnect/aoconnect.md} | 0 .../{ao-connect => aoconnect}/connecting.md | 8 +- .../installing-connect.md | 8 +- .../reading-results.md | 2 +- .../sending-messages.md | 4 +- .../spawning-processes.md | 2 +- src/guides/tutorials/dao.md | 2 +- 50 files changed, 24515 insertions(+), 23 deletions(-) create mode 100644 src/.vitepress/.temp/app.js create mode 100644 src/.vitepress/.temp/assets/style.V__jefr4.css create mode 100644 src/.vitepress/.temp/concepts_index.md.js create mode 100644 src/.vitepress/.temp/concepts_messages.md.js create mode 100644 src/.vitepress/.temp/concepts_processes.md.js create mode 100644 src/.vitepress/.temp/concepts_specs.md.js create mode 100644 src/.vitepress/.temp/favicon.ico create mode 100644 src/.vitepress/.temp/getting-started_index.md.js create mode 100644 src/.vitepress/.temp/guides_aoconnect_aoconnect.md.js create mode 100644 src/.vitepress/.temp/guides_aoconnect_connecting.md.js create mode 100644 src/.vitepress/.temp/guides_aoconnect_installing-connect.md.js create mode 100644 src/.vitepress/.temp/guides_aoconnect_reading-results.md.js create mode 100644 src/.vitepress/.temp/guides_aoconnect_sending-messages.md.js create mode 100644 src/.vitepress/.temp/guides_aoconnect_spawning-processes.md.js create mode 100644 src/.vitepress/.temp/guides_aos_cli.md.js create mode 100644 src/.vitepress/.temp/guides_aos_index.md.js create mode 100644 src/.vitepress/.temp/guides_aos_installing.md.js create mode 100644 src/.vitepress/.temp/guides_aos_intro.md.js create mode 100644 src/.vitepress/.temp/guides_aos_load.md.js create mode 100644 src/.vitepress/.temp/guides_debugging_debugging.md.js create mode 100644 src/.vitepress/.temp/guides_debugging_tracing.md.js create mode 100644 src/.vitepress/.temp/guides_index.md.js create mode 100644 src/.vitepress/.temp/guides_tutorials_bot.md.js create mode 100644 src/.vitepress/.temp/guides_tutorials_chatroom.md.js create mode 100644 src/.vitepress/.temp/guides_tutorials_dao.md.js create mode 100644 src/.vitepress/.temp/guides_tutorials_index.md.js create mode 100644 src/.vitepress/.temp/guides_tutorials_lua.md.js create mode 100644 src/.vitepress/.temp/guides_tutorials_messaging.md.js create mode 100644 src/.vitepress/.temp/guides_tutorials_pingpong.md.js create mode 100644 src/.vitepress/.temp/guides_tutorials_prompt.md.js create mode 100644 src/.vitepress/.temp/guides_tutorials_token.md.js create mode 100644 src/.vitepress/.temp/guides_tutorials_tour.md.js create mode 100644 src/.vitepress/.temp/index.md.js create mode 100644 src/.vitepress/.temp/package.json create mode 100644 src/.vitepress/.temp/plugin-vue_export-helper.yVxbj29m.js create mode 100644 src/.vitepress/.temp/references_ao.md.js create mode 100644 src/.vitepress/.temp/references_handlers.md.js create mode 100644 src/.vitepress/.temp/references_index.md.js create mode 100644 src/.vitepress/.temp/references_lua.md.js create mode 100644 src/.vitepress/.temp/references_token.md.js create mode 100644 src/.vitepress/.temp/references_wasm.md.js rename src/guides/{ao-connect/ao-connect.md => aoconnect/aoconnect.md} (100%) rename src/guides/{ao-connect => aoconnect}/connecting.md (85%) rename src/guides/{ao-connect => aoconnect}/installing-connect.md (66%) rename src/guides/{ao-connect => aoconnect}/reading-results.md (95%) rename src/guides/{ao-connect => aoconnect}/sending-messages.md (94%) rename src/guides/{ao-connect => aoconnect}/spawning-processes.md (96%) diff --git a/languages/strings/en.json b/languages/strings/en.json index 07eaeb10..a0d40e7b 100644 --- a/languages/strings/en.json +++ b/languages/strings/en.json @@ -29,11 +29,11 @@ "guides-aos-installing": "Installing", "guides-aos-cli": "CLI", "guides-aos-load": ".load", - "guides-ao-connect": "aoconnect", + "guides-aoconnect": "aoconnect", "guides-connecting": "Connecting to nodes", "guides-debugging": "Debugging", "guides-tracing": "Tracing", - "guides-installing-connect": "Installing ao connect", + "guides-installing-connect": "Installing aoconnect", "guides-reading-results": "Reading Results", "guides-sending-messages": "Sending Messages", "guides-spawning-processes": "Spawning Processes", @@ -41,5 +41,6 @@ "references-lua": "Lua", "references-wasm": "Web Assembly", "references-ao": "ao Module", - "references-handlers": "handlers" + "references-handlers": "handlers", + "references-token": "Token" } diff --git a/src/.vitepress/.temp/app.js b/src/.vitepress/.temp/app.js new file mode 100644 index 00000000..ef0fbe70 --- /dev/null +++ b/src/.vitepress/.temp/app.js @@ -0,0 +1,8332 @@ +import { + defineComponent, + mergeProps, + useSSRContext, + shallowRef, + inject, + computed, + ref, + onUnmounted, + reactive, + markRaw, + readonly, + nextTick, + h, + onMounted, + unref, + watch, + watchEffect, + watchPostEffect, + onUpdated, + resolveComponent, + createVNode, + resolveDynamicComponent, + withCtx, + renderSlot, + createTextVNode, + toDisplayString, + openBlock, + createBlock, + createCommentVNode, + Fragment, + renderList, + provide, + toHandlers, + withKeys, + useSlots, + createSSRApp, +} from "vue"; +import { + ssrRenderAttrs, + ssrRenderSlot, + ssrInterpolate, + ssrRenderAttr, + ssrRenderList, + ssrRenderComponent, + ssrRenderVNode, + ssrRenderClass, + renderToString, +} from "vue/server-renderer"; +import { + useDark, + useMediaQuery, + onClickOutside, + onKeyStroke, + useWindowScroll, + useScrollLock, +} from "@vueuse/core"; +import { _ as _export_sfc } from "./plugin-vue_export-helper.yVxbj29m.js"; +const _sfc_main$1d = /* @__PURE__ */ defineComponent({ + __name: "VPBadge", + __ssrInlineRender: true, + props: { + text: {}, + type: { default: "tip" }, + }, + setup(__props) { + return (_ctx, _push, _parent, _attrs) => { + _push( + ``, + ); + ssrRenderSlot( + _ctx.$slots, + "default", + {}, + () => { + _push(`${ssrInterpolate(_ctx.text)}`); + }, + _push, + _parent, + ); + _push(``); + }; + }, +}); +const _sfc_setup$1d = _sfc_main$1d.setup; +_sfc_main$1d.setup = (props, ctx) => { + const ssrContext = useSSRContext(); + (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add( + "../node_modules/vitepress/dist/client/theme-default/components/VPBadge.vue", + ); + return _sfc_setup$1d ? _sfc_setup$1d(props, ctx) : void 0; +}; +function deserializeFunctions(r) { + return Array.isArray(r) + ? r.map(deserializeFunctions) + : typeof r == "object" && r !== null + ? Object.keys(r).reduce( + (t, n) => ((t[n] = deserializeFunctions(r[n])), t), + {}, + ) + : typeof r == "string" && r.startsWith("_vp-fn_") + ? new Function(`return ${r.slice(7)}`)() + : r; +} +const siteData = deserializeFunctions( + JSON.parse( + '{"lang":"en-US","dir":"ltr","title":"VitePress","description":"A VitePress site","base":"/","head":[],"router":{"prefetchLinks":true},"appearance":true,"themeConfig":{},"locales":{"root":{"label":"English","lang":"en","title":"Cooking With ao","description":"The decentralized computer with infinite threads.","themeConfig":{"socialLinks":[{"icon":"github","link":"https://github.com/permaweb/ao-cookbook"}],"nav":[{"text":"Docs","link":"/getting-started/index"}],"sidebar":[{"text":"Getting Started","link":"/getting-started/","items":[]},{"text":"Concepts","link":"/concepts/","items":[{"text":"Specifications","link":"/concepts/specs"},{"text":"Messages","link":"/concepts/messages"},{"text":"Processes","link":"/concepts/processes"}]},{"text":"Guides","link":"/guides/","items":[{"text":"Tutorials","link":"/guides/tutorials/index","items":[{"text":"Meet Lua","link":"/guides/tutorials/lua"},{"text":"Custom Prompt","link":"/guides/tutorials/prompt"},{"text":"Tour","link":"/guides/tutorials/tour"},{"text":"Messaging","link":"/guides/tutorials/messaging"},{"text":"Ping-Pong","link":"/guides/tutorials/pingpong"},{"text":"Chatroom","link":"/guides/tutorials/chatroom"},{"text":"Token","link":"/guides/tutorials/token"},{"text":"Dao","link":"/guides/tutorials/dao"},{"text":"Bot","link":"/guides/tutorials/bot"}]},{"text":"aos","link":"/guides/aos/index","items":[{"text":"Introduction","link":"/guides/aos/intro"},{"text":"Installing","link":"/guides/aos/installing"},{"text":"CLI","link":"/guides/aos/cli"},{"text":".load","link":"/guides/aos/load"}]},{"text":"aoconnect","link":"/guides/aoconnect/aoconnect","items":[{"text":"Installing aoconnect","link":"/guides/aoconnect/installing-connect"},{"text":"Connecting to nodes","link":"/guides/aoconnect/connecting"},{"text":"Sending Messages","link":"/guides/aoconnect/sending-messages"},{"text":"Reading Results","link":"/guides/aoconnect/reading-results"},{"text":"Spawning Processes","link":"/guides/aoconnect/spawning-processes"}]},{"text":"Debugging","link":"/guides/debugging/debugging","items":[{"text":"Tracing","link":"/guides/debugging/tracing"}]}]},{"text":"References","link":"/references/","items":[{"text":"Lua","link":"/references/lua"},{"text":"Web Assembly","link":"/references/wasm"},{"text":"ao Module","link":"/references/ao"},{"text":"handlers","link":"/references/handlers"},{"text":"Token","link":"/references/token"}]}]}}},"scrollOffset":134,"cleanUrls":false}', + ), +); +const EXTERNAL_URL_RE = /^(?:[a-z]+:|\/\/)/i; +const APPEARANCE_KEY = "vitepress-theme-appearance"; +const HASH_RE = /#.*$/; +const EXT_RE = /(index)?\.(md|html)$/; +const inBrowser = typeof document !== "undefined"; +const notFoundPageData = { + relativePath: "", + filePath: "", + title: "404", + description: "Not Found", + headers: [], + frontmatter: { sidebar: false, layout: "page" }, + lastUpdated: 0, + isNotFound: true, +}; +function isActive(currentPath, matchPath, asRegex = false) { + if (matchPath === void 0) { + return false; + } + currentPath = normalize(`/${currentPath}`); + if (asRegex) { + return new RegExp(matchPath).test(currentPath); + } + if (normalize(matchPath) !== currentPath) { + return false; + } + const hashMatch = matchPath.match(HASH_RE); + if (hashMatch) { + return (inBrowser ? location.hash : "") === hashMatch[0]; + } + return true; +} +function normalize(path) { + return decodeURI(path).replace(HASH_RE, "").replace(EXT_RE, ""); +} +function isExternal(path) { + return EXTERNAL_URL_RE.test(path); +} +function resolveSiteDataByRoute(siteData2, relativePath) { + var _a, _b, _c, _d, _e, _f, _g; + const localeIndex = + Object.keys(siteData2.locales).find( + (key) => + key !== "root" && + !isExternal(key) && + isActive(relativePath, `/${key}/`, true), + ) || "root"; + return Object.assign({}, siteData2, { + localeIndex, + lang: + ((_a = siteData2.locales[localeIndex]) == null ? void 0 : _a.lang) ?? + siteData2.lang, + dir: + ((_b = siteData2.locales[localeIndex]) == null ? void 0 : _b.dir) ?? + siteData2.dir, + title: + ((_c = siteData2.locales[localeIndex]) == null ? void 0 : _c.title) ?? + siteData2.title, + titleTemplate: + ((_d = siteData2.locales[localeIndex]) == null + ? void 0 + : _d.titleTemplate) ?? siteData2.titleTemplate, + description: + ((_e = siteData2.locales[localeIndex]) == null + ? void 0 + : _e.description) ?? siteData2.description, + head: mergeHead( + siteData2.head, + ((_f = siteData2.locales[localeIndex]) == null ? void 0 : _f.head) ?? [], + ), + themeConfig: { + ...siteData2.themeConfig, + ...((_g = siteData2.locales[localeIndex]) == null + ? void 0 + : _g.themeConfig), + }, + }); +} +function createTitle(siteData2, pageData) { + const title = pageData.title || siteData2.title; + const template = pageData.titleTemplate ?? siteData2.titleTemplate; + if (typeof template === "string" && template.includes(":title")) { + return template.replace(/:title/g, title); + } + const templateString = createTitleTemplate(siteData2.title, template); + if (title === templateString.slice(3)) { + return title; + } + return `${title}${templateString}`; +} +function createTitleTemplate(siteTitle, template) { + if (template === false) { + return ""; + } + if (template === true || template === void 0) { + return ` | ${siteTitle}`; + } + if (siteTitle === template) { + return ""; + } + return ` | ${template}`; +} +function hasTag(head, tag) { + const [tagType, tagAttrs] = tag; + if (tagType !== "meta") return false; + const keyAttr = Object.entries(tagAttrs)[0]; + if (keyAttr == null) return false; + return head.some( + ([type, attrs]) => type === tagType && attrs[keyAttr[0]] === keyAttr[1], + ); +} +function mergeHead(prev, curr) { + return [...prev.filter((tagAttrs) => !hasTag(curr, tagAttrs)), ...curr]; +} +const INVALID_CHAR_REGEX = /[\u0000-\u001F"#$&*+,:;<=>?[\]^`{|}\u007F]/g; +const DRIVE_LETTER_REGEX = /^[a-z]:/i; +function sanitizeFileName(name) { + const match = DRIVE_LETTER_REGEX.exec(name); + const driveLetter = match ? match[0] : ""; + return ( + driveLetter + + name + .slice(driveLetter.length) + .replace(INVALID_CHAR_REGEX, "_") + .replace(/(^|\/)_+(?=[^/]*$)/, "$1") + ); +} +const KNOWN_EXTENSIONS = new Set( + "3g2,3gp,7z,aac,abw,ai,aif,aifc,aiff,arc,asf,asr,asx,au,avi,avif,axs,azw,bin,bmp,bz,bz2,c,cda,cer,class,crl,crt,csh,css,csv,dcr,der,dll,doc,docx,eot,eps,epub,exe,gif,gtar,gz,gzip,ico,ics,ief,jar,jpe,jpeg,jpg,js,json,jsonld,latex,m3u,man,mdb,mht,mhtml,mid,midi,mjs,mov,mp2,mp3,mp4,mpa,mpe,mpeg,mpg,mpkg,mpp,odp,ods,odt,oga,ogv,ogx,opus,otf,p10,p12,p7b,p7c,p7m,p7r,p7s,pbm,pdf,pfx,php,png,ppt,pptx,ps,pub,qt,rar,roff,rtf,rtx,ser,sh,spc,svg,swf,t,tar,tcl,tex,texi,texinfo,tgz,tif,tiff,tr,ts,tsv,ttf,txt,ua,viv,vivo,vsd,wav,weba,webm,webp,woff,woff2,xbm,xhtml,xls,xlsx,xml,xul,zip,conf".split( + ",", + ), +); +function treatAsHtml(filename) { + const ext = filename.split(".").pop(); + return ext == null || !KNOWN_EXTENSIONS.has(ext.toLowerCase()); +} +const dataSymbol = Symbol(); +const siteDataRef = shallowRef(siteData); +function initData(route) { + const site = computed(() => + resolveSiteDataByRoute(siteDataRef.value, route.data.relativePath), + ); + const appearance = site.value.appearance; + const isDark = + appearance === "force-dark" + ? ref(true) + : appearance + ? useDark({ + storageKey: APPEARANCE_KEY, + initialValue: () => + typeof appearance === "string" ? appearance : "auto", + ...(typeof appearance === "object" ? appearance : {}), + }) + : ref(false); + return { + site, + theme: computed(() => site.value.themeConfig), + page: computed(() => route.data), + frontmatter: computed(() => route.data.frontmatter), + params: computed(() => route.data.params), + lang: computed(() => site.value.lang), + dir: computed(() => route.data.frontmatter.dir || site.value.dir), + localeIndex: computed(() => site.value.localeIndex || "root"), + title: computed(() => createTitle(site.value, route.data)), + description: computed( + () => route.data.description || site.value.description, + ), + isDark, + }; +} +function useData$1() { + const data = inject(dataSymbol); + if (!data) { + throw new Error("vitepress data not properly injected in app"); + } + return data; +} +function joinPath(base, path) { + return `${base}${path}`.replace(/\/+/g, "/"); +} +function withBase(path) { + return EXTERNAL_URL_RE.test(path) || !path.startsWith("/") + ? path + : joinPath(siteDataRef.value.base, path); +} +function pathToFile(path) { + let pagePath = path.replace(/\.html$/, ""); + pagePath = decodeURIComponent(pagePath); + pagePath = pagePath.replace(/\/$/, "/index"); + { + if (inBrowser) { + const base = "/"; + pagePath = + sanitizeFileName( + pagePath.slice(base.length).replace(/\//g, "_") || "index", + ) + ".md"; + let pageHash = __VP_HASH_MAP__[pagePath.toLowerCase()]; + if (!pageHash) { + pagePath = pagePath.endsWith("_index.md") + ? pagePath.slice(0, -9) + ".md" + : pagePath.slice(0, -3) + "_index.md"; + pageHash = __VP_HASH_MAP__[pagePath.toLowerCase()]; + } + if (!pageHash) return null; + pagePath = `${base}${"assets"}/${pagePath}.${pageHash}.js`; + } else { + pagePath = `./${sanitizeFileName( + pagePath.slice(1).replace(/\//g, "_"), + )}.md.js`; + } + } + return pagePath; +} +let contentUpdatedCallbacks = []; +function onContentUpdated(fn) { + contentUpdatedCallbacks.push(fn); + onUnmounted(() => { + contentUpdatedCallbacks = contentUpdatedCallbacks.filter((f) => f !== fn); + }); +} +const RouterSymbol = Symbol(); +const fakeHost = "http://a.com"; +const getDefaultRoute = () => ({ + path: "/", + component: null, + data: notFoundPageData, +}); +function createRouter(loadPageModule, fallbackComponent) { + const route = reactive(getDefaultRoute()); + const router = { + route, + go, + }; + async function go(href = inBrowser ? location.href : "/") { + var _a, _b; + href = normalizeHref(href); + if ( + (await ((_a = router.onBeforeRouteChange) == null + ? void 0 + : _a.call(router, href))) === false + ) + return; + updateHistory(href); + await loadPage(href); + await ((_b = router.onAfterRouteChanged) == null + ? void 0 + : _b.call(router, href)); + } + let latestPendingPath = null; + async function loadPage(href, scrollPosition = 0, isRetry = false) { + var _a; + if ( + (await ((_a = router.onBeforePageLoad) == null + ? void 0 + : _a.call(router, href))) === false + ) + return; + const targetLoc = new URL(href, fakeHost); + const pendingPath = (latestPendingPath = targetLoc.pathname); + try { + let page = await loadPageModule(pendingPath); + if (!page) { + throw new Error(`Page not found: ${pendingPath}`); + } + if (latestPendingPath === pendingPath) { + latestPendingPath = null; + const { default: comp, __pageData } = page; + if (!comp) { + throw new Error(`Invalid route component: ${comp}`); + } + route.path = inBrowser ? pendingPath : withBase(pendingPath); + route.component = markRaw(comp); + route.data = true ? markRaw(__pageData) : readonly(__pageData); + if (inBrowser) { + nextTick(() => { + let actualPathname = + siteDataRef.value.base + + __pageData.relativePath.replace(/(?:(^|\/)index)?\.md$/, "$1"); + if (!siteDataRef.value.cleanUrls && !actualPathname.endsWith("/")) { + actualPathname += ".html"; + } + if (actualPathname !== targetLoc.pathname) { + targetLoc.pathname = actualPathname; + href = actualPathname + targetLoc.search + targetLoc.hash; + history.replaceState(null, "", href); + } + if (targetLoc.hash && !scrollPosition) { + let target = null; + try { + target = document.getElementById( + decodeURIComponent(targetLoc.hash).slice(1), + ); + } catch (e) { + console.warn(e); + } + if (target) { + scrollTo(target, targetLoc.hash); + return; + } + } + window.scrollTo(0, scrollPosition); + }); + } + } + } catch (err) { + if ( + !/fetch|Page not found/.test(err.message) && + !/^\/404(\.html|\/)?$/.test(href) + ) { + console.error(err); + } + if (!isRetry) { + try { + const res = await fetch(siteDataRef.value.base + "hashmap.json"); + window.__VP_HASH_MAP__ = await res.json(); + await loadPage(href, scrollPosition, true); + return; + } catch (e) {} + } + if (latestPendingPath === pendingPath) { + latestPendingPath = null; + route.path = inBrowser ? pendingPath : withBase(pendingPath); + route.component = fallbackComponent ? markRaw(fallbackComponent) : null; + route.data = notFoundPageData; + } + } + } + if (inBrowser) { + window.addEventListener( + "click", + (e) => { + const button = e.target.closest("button"); + if (button) return; + const link2 = e.target.closest("a"); + if ( + link2 && + !link2.closest(".vp-raw") && + (link2 instanceof SVGElement || !link2.download) + ) { + const { target } = link2; + const { href, origin, pathname, hash, search } = new URL( + link2.href instanceof SVGAnimatedString + ? link2.href.animVal + : link2.href, + link2.baseURI, + ); + const currentUrl = window.location; + if ( + !e.ctrlKey && + !e.shiftKey && + !e.altKey && + !e.metaKey && + !target && + origin === currentUrl.origin && + treatAsHtml(pathname) + ) { + e.preventDefault(); + if ( + pathname === currentUrl.pathname && + search === currentUrl.search + ) { + if (hash !== currentUrl.hash) { + history.pushState(null, "", hash); + window.dispatchEvent(new Event("hashchange")); + } + if (hash) { + scrollTo( + link2, + hash, + link2.classList.contains("header-anchor"), + ); + } else { + updateHistory(href); + window.scrollTo(0, 0); + } + } else { + go(href); + } + } + } + }, + { capture: true }, + ); + window.addEventListener("popstate", async (e) => { + var _a; + await loadPage( + normalizeHref(location.href), + (e.state && e.state.scrollPosition) || 0, + ); + (_a = router.onAfterRouteChanged) == null + ? void 0 + : _a.call(router, location.href); + }); + window.addEventListener("hashchange", (e) => { + e.preventDefault(); + }); + } + return router; +} +function useRouter() { + const router = inject(RouterSymbol); + if (!router) { + throw new Error("useRouter() is called without provider."); + } + return router; +} +function useRoute() { + return useRouter().route; +} +function scrollTo(el, hash, smooth = false) { + let target = null; + try { + target = el.classList.contains("header-anchor") + ? el + : document.getElementById(decodeURIComponent(hash).slice(1)); + } catch (e) { + console.warn(e); + } + if (target) { + let scrollToTarget = function () { + if (!smooth || Math.abs(targetTop - window.scrollY) > window.innerHeight) + window.scrollTo(0, targetTop); + else window.scrollTo({ left: 0, top: targetTop, behavior: "smooth" }); + }; + let scrollOffset = siteDataRef.value.scrollOffset; + let offset = 0; + let padding = 24; + if (typeof scrollOffset === "object" && "padding" in scrollOffset) { + padding = scrollOffset.padding; + scrollOffset = scrollOffset.selector; + } + if (typeof scrollOffset === "number") { + offset = scrollOffset; + } else if (typeof scrollOffset === "string") { + offset = tryOffsetSelector(scrollOffset, padding); + } else if (Array.isArray(scrollOffset)) { + for (const selector of scrollOffset) { + const res = tryOffsetSelector(selector, padding); + if (res) { + offset = res; + break; + } + } + } + const targetPadding = parseInt( + window.getComputedStyle(target).paddingTop, + 10, + ); + const targetTop = + window.scrollY + + target.getBoundingClientRect().top - + offset + + targetPadding; + requestAnimationFrame(scrollToTarget); + } +} +function tryOffsetSelector(selector, padding) { + const el = document.querySelector(selector); + if (!el) return 0; + const bot = el.getBoundingClientRect().bottom; + if (bot < 0) return 0; + return bot + padding; +} +function updateHistory(href) { + if (inBrowser && normalizeHref(href) !== normalizeHref(location.href)) { + history.replaceState({ scrollPosition: window.scrollY }, document.title); + history.pushState(null, "", href); + } +} +function normalizeHref(href) { + const url = new URL(href, fakeHost); + url.pathname = url.pathname.replace(/(^|\/)index(\.html)?$/, "$1"); + if (siteDataRef.value.cleanUrls) + url.pathname = url.pathname.replace(/\.html$/, ""); + else if (!url.pathname.endsWith("/") && !url.pathname.endsWith(".html")) + url.pathname += ".html"; + return url.pathname + url.search + url.hash; +} +const runCbs = () => contentUpdatedCallbacks.forEach((fn) => fn()); +const Content = defineComponent({ + name: "VitePressContent", + props: { + as: { type: [Object, String], default: "div" }, + }, + setup(props) { + const route = useRoute(); + const { site } = useData$1(); + return () => + h( + props.as, + site.value.contentProps ?? { style: { position: "relative" } }, + [ + route.component + ? h(route.component, { + onVnodeMounted: runCbs, + onVnodeUpdated: runCbs, + onVnodeUnmounted: runCbs, + }) + : "404 Page Not Found", + ], + ); + }, +}); +const _sfc_main$1c = /* @__PURE__ */ defineComponent({ + __name: "VPBackdrop", + __ssrInlineRender: true, + props: { + show: { type: Boolean }, + }, + setup(__props) { + return (_ctx, _push, _parent, _attrs) => { + if (_ctx.show) { + _push( + ``, + ); + } else { + _push(``); + } + }; + }, +}); +const _sfc_setup$1c = _sfc_main$1c.setup; +_sfc_main$1c.setup = (props, ctx) => { + const ssrContext = useSSRContext(); + (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add( + "../node_modules/vitepress/dist/client/theme-default/components/VPBackdrop.vue", + ); + return _sfc_setup$1c ? _sfc_setup$1c(props, ctx) : void 0; +}; +const VPBackdrop = /* @__PURE__ */ _export_sfc(_sfc_main$1c, [ + ["__scopeId", "data-v-c79a1216"], +]); +const useData = useData$1; +function throttleAndDebounce(fn, delay) { + let timeoutId; + let called = false; + return () => { + if (timeoutId) clearTimeout(timeoutId); + if (!called) { + fn(); + (called = true) && setTimeout(() => (called = false), delay); + } else timeoutId = setTimeout(fn, delay); + }; +} +function ensureStartingSlash(path) { + return /^\//.test(path) ? path : `/${path}`; +} +function normalizeLink$1(url) { + const { pathname, search, hash, protocol } = new URL(url, "http://a.com"); + if ( + isExternal(url) || + url.startsWith("#") || + !protocol.startsWith("http") || + !treatAsHtml(pathname) + ) + return url; + const { site } = useData(); + const normalizedPath = + pathname.endsWith("/") || pathname.endsWith(".html") + ? url + : url.replace( + /(?:(^\.+)\/)?.*$/, + `$1${pathname.replace( + /(\.md)?$/, + site.value.cleanUrls ? "" : ".html", + )}${search}${hash}`, + ); + return withBase(normalizedPath); +} +const hashRef = ref(inBrowser ? location.hash : ""); +if (inBrowser) { + window.addEventListener("hashchange", () => { + hashRef.value = location.hash; + }); +} +function useLangs({ removeCurrent = true, correspondingLink = false } = {}) { + const { site, localeIndex, page, theme: theme2 } = useData(); + const currentLang = computed(() => { + var _a, _b; + return { + label: + (_a = site.value.locales[localeIndex.value]) == null + ? void 0 + : _a.label, + link: + ((_b = site.value.locales[localeIndex.value]) == null + ? void 0 + : _b.link) || + (localeIndex.value === "root" ? "/" : `/${localeIndex.value}/`), + }; + }); + const localeLinks = computed(() => + Object.entries(site.value.locales).flatMap(([key, value]) => + removeCurrent && currentLang.value.label === value.label + ? [] + : { + text: value.label, + link: + normalizeLink( + value.link || (key === "root" ? "/" : `/${key}/`), + theme2.value.i18nRouting !== false && correspondingLink, + page.value.relativePath.slice( + currentLang.value.link.length - 1, + ), + !site.value.cleanUrls, + ) + hashRef.value, + }, + ), + ); + return { localeLinks, currentLang }; +} +function normalizeLink(link2, addPath, path, addExt) { + return addPath + ? link2.replace(/\/$/, "") + + ensureStartingSlash( + path + .replace(/(^|\/)index\.md$/, "$1") + .replace(/\.md$/, addExt ? ".html" : ""), + ) + : link2; +} +const _sfc_main$1b = /* @__PURE__ */ defineComponent({ + __name: "NotFound", + __ssrInlineRender: true, + setup(__props) { + const { site, theme: theme2 } = useData(); + const { localeLinks } = useLangs({ removeCurrent: false }); + const root = ref("/"); + onMounted(() => { + var _a; + const path = window.location.pathname + .replace(site.value.base, "") + .replace(/(^.*?\/).*$/, "/$1"); + if (localeLinks.value.length) { + root.value = + ((_a = localeLinks.value.find(({ link: link2 }) => + link2.startsWith(path), + )) == null + ? void 0 + : _a.link) || localeLinks.value[0].link; + } + }); + return (_ctx, _push, _parent, _attrs) => { + var _a, _b, _c, _d, _e; + _push( + `

${ssrInterpolate( + ((_a = unref(theme2).notFound) == null ? void 0 : _a.code) ?? "404", + )}

${ssrInterpolate( + ((_b = unref(theme2).notFound) == null ? void 0 : _b.title) ?? + "PAGE NOT FOUND", + )}

${ssrInterpolate( + ((_c = unref(theme2).notFound) == null ? void 0 : _c.quote) ?? + "But if you don't change your direction, and if you keep looking, you may end up where you are heading.", + )}
`, + ); + }; + }, +}); +const _sfc_setup$1b = _sfc_main$1b.setup; +_sfc_main$1b.setup = (props, ctx) => { + const ssrContext = useSSRContext(); + (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add( + "../node_modules/vitepress/dist/client/theme-default/NotFound.vue", + ); + return _sfc_setup$1b ? _sfc_setup$1b(props, ctx) : void 0; +}; +const NotFound = /* @__PURE__ */ _export_sfc(_sfc_main$1b, [ + ["__scopeId", "data-v-f87ff6e4"], +]); +function getSidebar(_sidebar, path) { + if (Array.isArray(_sidebar)) return addBase(_sidebar); + if (_sidebar == null) return []; + path = ensureStartingSlash(path); + const dir = Object.keys(_sidebar) + .sort((a, b) => { + return b.split("/").length - a.split("/").length; + }) + .find((dir2) => { + return path.startsWith(ensureStartingSlash(dir2)); + }); + const sidebar = dir ? _sidebar[dir] : []; + return Array.isArray(sidebar) + ? addBase(sidebar) + : addBase(sidebar.items, sidebar.base); +} +function getSidebarGroups(sidebar) { + const groups = []; + let lastGroupIndex = 0; + for (const index in sidebar) { + const item = sidebar[index]; + if (item.items) { + lastGroupIndex = groups.push(item); + continue; + } + if (!groups[lastGroupIndex]) { + groups.push({ items: [] }); + } + groups[lastGroupIndex].items.push(item); + } + return groups; +} +function getFlatSideBarLinks(sidebar) { + const links = []; + function recursivelyExtractLinks(items) { + for (const item of items) { + if (item.text && item.link) { + links.push({ + text: item.text, + link: item.link, + docFooterText: item.docFooterText, + }); + } + if (item.items) { + recursivelyExtractLinks(item.items); + } + } + } + recursivelyExtractLinks(sidebar); + return links; +} +function hasActiveLink(path, items) { + if (Array.isArray(items)) { + return items.some((item) => hasActiveLink(path, item)); + } + return isActive(path, items.link) + ? true + : items.items + ? hasActiveLink(path, items.items) + : false; +} +function addBase(items, _base) { + return [...items].map((_item) => { + const item = { ..._item }; + const base = item.base || _base; + if (base && item.link) item.link = base + item.link; + if (item.items) item.items = addBase(item.items, base); + return item; + }); +} +function useSidebar() { + const { frontmatter, page, theme: theme2 } = useData(); + const is960 = useMediaQuery("(min-width: 960px)"); + const isOpen = ref(false); + const _sidebar = computed(() => { + const sidebarConfig = theme2.value.sidebar; + const relativePath = page.value.relativePath; + return sidebarConfig ? getSidebar(sidebarConfig, relativePath) : []; + }); + const sidebar = ref(_sidebar.value); + watch(_sidebar, (next, prev) => { + if (JSON.stringify(next) !== JSON.stringify(prev)) + sidebar.value = _sidebar.value; + }); + const hasSidebar = computed(() => { + return ( + frontmatter.value.sidebar !== false && + sidebar.value.length > 0 && + frontmatter.value.layout !== "home" + ); + }); + const leftAside = computed(() => { + if (hasAside) + return frontmatter.value.aside == null + ? theme2.value.aside === "left" + : frontmatter.value.aside === "left"; + return false; + }); + const hasAside = computed(() => { + if (frontmatter.value.layout === "home") return false; + if (frontmatter.value.aside != null) return !!frontmatter.value.aside; + return theme2.value.aside !== false; + }); + const isSidebarEnabled = computed(() => hasSidebar.value && is960.value); + const sidebarGroups = computed(() => { + return hasSidebar.value ? getSidebarGroups(sidebar.value) : []; + }); + function open() { + isOpen.value = true; + } + function close() { + isOpen.value = false; + } + function toggle() { + isOpen.value ? close() : open(); + } + return { + isOpen, + sidebar, + sidebarGroups, + hasSidebar, + hasAside, + leftAside, + isSidebarEnabled, + open, + close, + toggle, + }; +} +function useCloseSidebarOnEscape(isOpen, close) { + let triggerElement; + watchEffect(() => { + triggerElement = isOpen.value ? document.activeElement : void 0; + }); + onMounted(() => { + window.addEventListener("keyup", onEscape); + }); + onUnmounted(() => { + window.removeEventListener("keyup", onEscape); + }); + function onEscape(e) { + if (e.key === "Escape" && isOpen.value) { + close(); + triggerElement == null ? void 0 : triggerElement.focus(); + } + } +} +function useSidebarControl(item) { + const { page } = useData(); + const collapsed = ref(false); + const collapsible = computed(() => { + return item.value.collapsed != null; + }); + const isLink = computed(() => { + return !!item.value.link; + }); + const isActiveLink = ref(false); + const updateIsActiveLink = () => { + isActiveLink.value = isActive(page.value.relativePath, item.value.link); + }; + watch([page, item, hashRef], updateIsActiveLink); + onMounted(updateIsActiveLink); + const hasActiveLink$1 = computed(() => { + if (isActiveLink.value) { + return true; + } + return item.value.items + ? hasActiveLink(page.value.relativePath, item.value.items) + : false; + }); + const hasChildren = computed(() => { + return !!(item.value.items && item.value.items.length); + }); + watchEffect(() => { + collapsed.value = !!(collapsible.value && item.value.collapsed); + }); + watchPostEffect(() => { + (isActiveLink.value || hasActiveLink$1.value) && (collapsed.value = false); + }); + function toggle() { + if (collapsible.value) { + collapsed.value = !collapsed.value; + } + } + return { + collapsed, + collapsible, + isLink, + isActiveLink, + hasActiveLink: hasActiveLink$1, + hasChildren, + toggle, + }; +} +function useAside() { + const { hasSidebar } = useSidebar(); + const is960 = useMediaQuery("(min-width: 960px)"); + const is1280 = useMediaQuery("(min-width: 1280px)"); + const isAsideEnabled = computed(() => { + if (!is1280.value && !is960.value) { + return false; + } + return hasSidebar.value ? is1280.value : is960.value; + }); + return { + isAsideEnabled, + }; +} +const resolvedHeaders = []; +function resolveTitle(theme2) { + return ( + (typeof theme2.outline === "object" && + !Array.isArray(theme2.outline) && + theme2.outline.label) || + theme2.outlineTitle || + "On this page" + ); +} +function getHeaders(range) { + const headers = [ + ...document.querySelectorAll(".VPDoc :where(h1,h2,h3,h4,h5,h6)"), + ] + .filter((el) => el.id && el.hasChildNodes()) + .map((el) => { + const level = Number(el.tagName[1]); + return { + element: el, + title: serializeHeader(el), + link: "#" + el.id, + level, + }; + }); + return resolveHeaders(headers, range); +} +function serializeHeader(h2) { + let ret = ""; + for (const node of h2.childNodes) { + if (node.nodeType === 1) { + if ( + node.classList.contains("VPBadge") || + node.classList.contains("header-anchor") || + node.classList.contains("ignore-header") + ) { + continue; + } + ret += node.textContent; + } else if (node.nodeType === 3) { + ret += node.textContent; + } + } + return ret.trim(); +} +function resolveHeaders(headers, range) { + if (range === false) { + return []; + } + const levelsRange = + (typeof range === "object" && !Array.isArray(range) + ? range.level + : range) || 2; + const [high, low] = + typeof levelsRange === "number" + ? [levelsRange, levelsRange] + : levelsRange === "deep" + ? [2, 6] + : levelsRange; + headers = headers.filter((h2) => h2.level >= high && h2.level <= low); + resolvedHeaders.length = 0; + for (const { element, link: link2 } of headers) { + resolvedHeaders.push({ element, link: link2 }); + } + const ret = []; + outer: for (let i = 0; i < headers.length; i++) { + const cur = headers[i]; + if (i === 0) { + ret.push(cur); + } else { + for (let j = i - 1; j >= 0; j--) { + const prev = headers[j]; + if (prev.level < cur.level) { + (prev.children || (prev.children = [])).push(cur); + continue outer; + } + } + ret.push(cur); + } + } + return ret; +} +function useActiveAnchor(container, marker) { + const { isAsideEnabled } = useAside(); + const onScroll = throttleAndDebounce(setActiveLink, 100); + let prevActiveLink = null; + onMounted(() => { + requestAnimationFrame(setActiveLink); + window.addEventListener("scroll", onScroll); + }); + onUpdated(() => { + activateLink(location.hash); + }); + onUnmounted(() => { + window.removeEventListener("scroll", onScroll); + }); + function setActiveLink() { + if (!isAsideEnabled.value) { + return; + } + const offsetDocTop = (() => { + var _a; + const container2 = + (_a = document.querySelector("#VPContent .VPDoc")) == null + ? void 0 + : _a.firstElementChild; + if (container2) return getAbsoluteTop(container2); + else return 78; + })(); + const scrollY = window.scrollY; + const innerHeight = window.innerHeight; + const offsetHeight = document.body.offsetHeight; + const isBottom = Math.abs(scrollY + innerHeight - offsetHeight) < 1; + const headers = resolvedHeaders + .map(({ element, link: link2 }) => ({ + link: link2, + top: getAbsoluteTop(element), + })) + .filter(({ top }) => !Number.isNaN(top)) + .sort((a, b) => a.top - b.top); + if (!headers.length) { + activateLink(null); + return; + } + if (scrollY < 1) { + activateLink(null); + return; + } + if (isBottom) { + activateLink(headers[headers.length - 1].link); + return; + } + let activeLink = null; + for (const { link: link2, top } of headers) { + if (top > scrollY + offsetDocTop) { + break; + } + activeLink = link2; + } + activateLink(activeLink); + } + function activateLink(hash) { + if (prevActiveLink) { + prevActiveLink.classList.remove("active"); + } + if (hash == null) { + prevActiveLink = null; + } else { + prevActiveLink = container.value.querySelector( + `a[href="${decodeURIComponent(hash)}"]`, + ); + } + const activeLink = prevActiveLink; + if (activeLink) { + activeLink.classList.add("active"); + marker.value.style.top = activeLink.offsetTop + 39 + "px"; + marker.value.style.opacity = "1"; + } else { + marker.value.style.top = "33px"; + marker.value.style.opacity = "0"; + } + } +} +function getAbsoluteTop(element) { + let offsetTop = 0; + while (element !== document.body) { + if (element === null) { + return NaN; + } + offsetTop += element.offsetTop; + element = element.offsetParent; + } + return offsetTop; +} +const _sfc_main$1a = /* @__PURE__ */ defineComponent({ + __name: "VPDocOutlineItem", + __ssrInlineRender: true, + props: { + headers: {}, + root: { type: Boolean }, + }, + setup(__props) { + return (_ctx, _push, _parent, _attrs) => { + const _component_VPDocOutlineItem = resolveComponent( + "VPDocOutlineItem", + true, + ); + _push( + ``, + ); + ssrRenderList(_ctx.headers, ({ children, link: link2, title }) => { + _push( + `
  • ${ssrInterpolate( + title, + )}`, + ); + if (children == null ? void 0 : children.length) { + _push( + ssrRenderComponent( + _component_VPDocOutlineItem, + { headers: children }, + null, + _parent, + ), + ); + } else { + _push(``); + } + _push(`
  • `); + }); + _push(``); + }; + }, +}); +const _sfc_setup$1a = _sfc_main$1a.setup; +_sfc_main$1a.setup = (props, ctx) => { + const ssrContext = useSSRContext(); + (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add( + "../node_modules/vitepress/dist/client/theme-default/components/VPDocOutlineItem.vue", + ); + return _sfc_setup$1a ? _sfc_setup$1a(props, ctx) : void 0; +}; +const VPDocOutlineItem = /* @__PURE__ */ _export_sfc(_sfc_main$1a, [ + ["__scopeId", "data-v-b933a997"], +]); +const _sfc_main$19 = /* @__PURE__ */ defineComponent({ + __name: "VPDocAsideOutline", + __ssrInlineRender: true, + setup(__props) { + const { frontmatter, theme: theme2 } = useData(); + const headers = shallowRef([]); + onContentUpdated(() => { + headers.value = getHeaders( + frontmatter.value.outline ?? theme2.value.outline, + ); + }); + const container = ref(); + const marker = ref(); + useActiveAnchor(container, marker); + return (_ctx, _push, _parent, _attrs) => { + _push( + ` 0 }, + ], + ref_key: "container", + ref: container, + role: "navigation", + }, + _attrs, + ), + )} data-v-935f8a84>
    ${ssrInterpolate( + unref(resolveTitle)(unref(theme2)), + )}
    `); + }; + }, +}); +const _sfc_setup$19 = _sfc_main$19.setup; +_sfc_main$19.setup = (props, ctx) => { + const ssrContext = useSSRContext(); + (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add( + "../node_modules/vitepress/dist/client/theme-default/components/VPDocAsideOutline.vue", + ); + return _sfc_setup$19 ? _sfc_setup$19(props, ctx) : void 0; +}; +const VPDocAsideOutline = /* @__PURE__ */ _export_sfc(_sfc_main$19, [ + ["__scopeId", "data-v-935f8a84"], +]); +const _sfc_main$18 = /* @__PURE__ */ defineComponent({ + __name: "VPDocAsideCarbonAds", + __ssrInlineRender: true, + props: { + carbonAds: {}, + }, + setup(__props) { + const VPCarbonAds = () => null; + return (_ctx, _push, _parent, _attrs) => { + _push( + ``, + ); + _push( + ssrRenderComponent( + unref(VPCarbonAds), + { "carbon-ads": _ctx.carbonAds }, + null, + _parent, + ), + ); + _push(``); + }; + }, +}); +const _sfc_setup$18 = _sfc_main$18.setup; +_sfc_main$18.setup = (props, ctx) => { + const ssrContext = useSSRContext(); + (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add( + "../node_modules/vitepress/dist/client/theme-default/components/VPDocAsideCarbonAds.vue", + ); + return _sfc_setup$18 ? _sfc_setup$18(props, ctx) : void 0; +}; +const _sfc_main$17 = /* @__PURE__ */ defineComponent({ + __name: "VPDocAside", + __ssrInlineRender: true, + setup(__props) { + const { theme: theme2 } = useData(); + return (_ctx, _push, _parent, _attrs) => { + _push( + ``, + ); + ssrRenderSlot(_ctx.$slots, "aside-top", {}, null, _push, _parent); + ssrRenderSlot( + _ctx.$slots, + "aside-outline-before", + {}, + null, + _push, + _parent, + ); + _push(ssrRenderComponent(VPDocAsideOutline, null, null, _parent)); + ssrRenderSlot( + _ctx.$slots, + "aside-outline-after", + {}, + null, + _push, + _parent, + ); + _push(`
    `); + ssrRenderSlot(_ctx.$slots, "aside-ads-before", {}, null, _push, _parent); + if (unref(theme2).carbonAds) { + _push( + ssrRenderComponent( + _sfc_main$18, + { + "carbon-ads": unref(theme2).carbonAds, + }, + null, + _parent, + ), + ); + } else { + _push(``); + } + ssrRenderSlot(_ctx.$slots, "aside-ads-after", {}, null, _push, _parent); + ssrRenderSlot(_ctx.$slots, "aside-bottom", {}, null, _push, _parent); + _push(``); + }; + }, +}); +const _sfc_setup$17 = _sfc_main$17.setup; +_sfc_main$17.setup = (props, ctx) => { + const ssrContext = useSSRContext(); + (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add( + "../node_modules/vitepress/dist/client/theme-default/components/VPDocAside.vue", + ); + return _sfc_setup$17 ? _sfc_setup$17(props, ctx) : void 0; +}; +const VPDocAside = /* @__PURE__ */ _export_sfc(_sfc_main$17, [ + ["__scopeId", "data-v-3f215769"], +]); +function useEditLink() { + const { theme: theme2, page } = useData(); + return computed(() => { + const { text = "Edit this page", pattern = "" } = + theme2.value.editLink || {}; + let url; + if (typeof pattern === "function") { + url = pattern(page.value); + } else { + url = pattern.replace(/:path/g, page.value.filePath); + } + return { url, text }; + }); +} +function usePrevNext() { + const { page, theme: theme2, frontmatter } = useData(); + return computed(() => { + var _a, _b, _c, _d, _e, _f, _g, _h; + const sidebar = getSidebar(theme2.value.sidebar, page.value.relativePath); + const candidates = getFlatSideBarLinks(sidebar); + const index = candidates.findIndex((link2) => { + return isActive(page.value.relativePath, link2.link); + }); + const hidePrev = + (((_a = theme2.value.docFooter) == null ? void 0 : _a.prev) === false && + !frontmatter.value.prev) || + frontmatter.value.prev === false; + const hideNext = + (((_b = theme2.value.docFooter) == null ? void 0 : _b.next) === false && + !frontmatter.value.next) || + frontmatter.value.next === false; + return { + prev: hidePrev + ? void 0 + : { + text: + (typeof frontmatter.value.prev === "string" + ? frontmatter.value.prev + : typeof frontmatter.value.prev === "object" + ? frontmatter.value.prev.text + : void 0) ?? + ((_c = candidates[index - 1]) == null + ? void 0 + : _c.docFooterText) ?? + ((_d = candidates[index - 1]) == null ? void 0 : _d.text), + link: + (typeof frontmatter.value.prev === "object" + ? frontmatter.value.prev.link + : void 0) ?? + ((_e = candidates[index - 1]) == null ? void 0 : _e.link), + }, + next: hideNext + ? void 0 + : { + text: + (typeof frontmatter.value.next === "string" + ? frontmatter.value.next + : typeof frontmatter.value.next === "object" + ? frontmatter.value.next.text + : void 0) ?? + ((_f = candidates[index + 1]) == null + ? void 0 + : _f.docFooterText) ?? + ((_g = candidates[index + 1]) == null ? void 0 : _g.text), + link: + (typeof frontmatter.value.next === "object" + ? frontmatter.value.next.link + : void 0) ?? + ((_h = candidates[index + 1]) == null ? void 0 : _h.link), + }, + }; + }); +} +const _sfc_main$16 = {}; +function _sfc_ssrRender$c(_ctx, _push, _parent, _attrs) { + _push( + ``, + ); +} +const _sfc_setup$16 = _sfc_main$16.setup; +_sfc_main$16.setup = (props, ctx) => { + const ssrContext = useSSRContext(); + (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add( + "../node_modules/vitepress/dist/client/theme-default/components/icons/VPIconEdit.vue", + ); + return _sfc_setup$16 ? _sfc_setup$16(props, ctx) : void 0; +}; +const VPIconEdit = /* @__PURE__ */ _export_sfc(_sfc_main$16, [ + ["ssrRender", _sfc_ssrRender$c], +]); +const _sfc_main$15 = /* @__PURE__ */ defineComponent({ + __name: "VPLink", + __ssrInlineRender: true, + props: { + tag: {}, + href: {}, + noIcon: { type: Boolean }, + target: {}, + rel: {}, + }, + setup(__props) { + const props = __props; + const tag = computed(() => props.tag ?? (props.href ? "a" : "span")); + const isExternal2 = computed( + () => props.href && EXTERNAL_URL_RE.test(props.href), + ); + return (_ctx, _push, _parent, _attrs) => { + ssrRenderVNode( + _push, + createVNode( + resolveDynamicComponent(tag.value), + mergeProps( + { + class: [ + "VPLink", + { + link: _ctx.href, + "vp-external-link-icon": isExternal2.value, + "no-icon": _ctx.noIcon, + }, + ], + href: _ctx.href ? unref(normalizeLink$1)(_ctx.href) : void 0, + target: _ctx.target ?? (isExternal2.value ? "_blank" : void 0), + rel: _ctx.rel ?? (isExternal2.value ? "noreferrer" : void 0), + }, + _attrs, + ), + { + default: withCtx((_, _push2, _parent2, _scopeId) => { + if (_push2) { + ssrRenderSlot( + _ctx.$slots, + "default", + {}, + null, + _push2, + _parent2, + _scopeId, + ); + } else { + return [renderSlot(_ctx.$slots, "default")]; + } + }), + _: 3, + }, + ), + _parent, + ); + }; + }, +}); +const _sfc_setup$15 = _sfc_main$15.setup; +_sfc_main$15.setup = (props, ctx) => { + const ssrContext = useSSRContext(); + (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add( + "../node_modules/vitepress/dist/client/theme-default/components/VPLink.vue", + ); + return _sfc_setup$15 ? _sfc_setup$15(props, ctx) : void 0; +}; +const _sfc_main$14 = /* @__PURE__ */ defineComponent({ + __name: "VPDocFooterLastUpdated", + __ssrInlineRender: true, + setup(__props) { + const { theme: theme2, page, frontmatter, lang } = useData(); + const date = computed( + () => new Date(frontmatter.value.lastUpdated ?? page.value.lastUpdated), + ); + const isoDatetime = computed(() => date.value.toISOString()); + const datetime = ref(""); + onMounted(() => { + watchEffect(() => { + var _a, _b, _c; + datetime.value = new Intl.DateTimeFormat( + ( + (_b = + (_a = theme2.value.lastUpdated) == null + ? void 0 + : _a.formatOptions) == null + ? void 0 + : _b.forceLocale + ) + ? lang.value + : void 0, + ((_c = theme2.value.lastUpdated) == null + ? void 0 + : _c.formatOptions) ?? { + dateStyle: "short", + timeStyle: "short", + }, + ).format(date.value); + }); + }); + return (_ctx, _push, _parent, _attrs) => { + var _a; + _push( + `${ssrInterpolate( + ((_a = unref(theme2).lastUpdated) == null ? void 0 : _a.text) || + unref(theme2).lastUpdatedText || + "Last updated", + )}: ${ssrInterpolate(datetime.value)}

    `, + ); + }; + }, +}); +const _sfc_setup$14 = _sfc_main$14.setup; +_sfc_main$14.setup = (props, ctx) => { + const ssrContext = useSSRContext(); + (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add( + "../node_modules/vitepress/dist/client/theme-default/components/VPDocFooterLastUpdated.vue", + ); + return _sfc_setup$14 ? _sfc_setup$14(props, ctx) : void 0; +}; +const VPDocFooterLastUpdated = /* @__PURE__ */ _export_sfc(_sfc_main$14, [ + ["__scopeId", "data-v-7e05ebdb"], +]); +const _sfc_main$13 = /* @__PURE__ */ defineComponent({ + __name: "VPDocFooter", + __ssrInlineRender: true, + setup(__props) { + const { theme: theme2, page, frontmatter } = useData(); + const editLink = useEditLink(); + const control = usePrevNext(); + const hasEditLink = computed(() => { + return theme2.value.editLink && frontmatter.value.editLink !== false; + }); + const hasLastUpdated = computed(() => { + return page.value.lastUpdated && frontmatter.value.lastUpdated !== false; + }); + const showFooter = computed(() => { + return ( + hasEditLink.value || + hasLastUpdated.value || + control.value.prev || + control.value.next + ); + }); + return (_ctx, _push, _parent, _attrs) => { + var _a, _b, _c, _d; + if (showFooter.value) { + _push( + ``, + ); + ssrRenderSlot( + _ctx.$slots, + "doc-footer-before", + {}, + null, + _push, + _parent, + ); + if (hasEditLink.value || hasLastUpdated.value) { + _push(`
    `); + if (hasEditLink.value) { + _push(``); + } else { + _push(``); + } + if (hasLastUpdated.value) { + _push(`
    `); + _push( + ssrRenderComponent(VPDocFooterLastUpdated, null, null, _parent), + ); + _push(`
    `); + } else { + _push(``); + } + _push(`
    `); + } else { + _push(``); + } + if ( + ((_a = unref(control).prev) == null ? void 0 : _a.link) || + ((_b = unref(control).next) == null ? void 0 : _b.link) + ) { + _push( + ``); + } else { + _push(``); + } + _push(``); + } else { + _push(``); + } + }; + }, +}); +const _sfc_setup$13 = _sfc_main$13.setup; +_sfc_main$13.setup = (props, ctx) => { + const ssrContext = useSSRContext(); + (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add( + "../node_modules/vitepress/dist/client/theme-default/components/VPDocFooter.vue", + ); + return _sfc_setup$13 ? _sfc_setup$13(props, ctx) : void 0; +}; +const VPDocFooter = /* @__PURE__ */ _export_sfc(_sfc_main$13, [ + ["__scopeId", "data-v-48f9bb55"], +]); +const _sfc_main$12 = /* @__PURE__ */ defineComponent({ + __name: "VPDoc", + __ssrInlineRender: true, + setup(__props) { + const { theme: theme2 } = useData(); + const route = useRoute(); + const { hasSidebar, hasAside, leftAside } = useSidebar(); + const pageName = computed(() => + route.path.replace(/[./]+/g, "_").replace(/_html$/, ""), + ); + return (_ctx, _push, _parent, _attrs) => { + const _component_Content = resolveComponent("Content"); + _push( + ``, + ); + ssrRenderSlot(_ctx.$slots, "doc-top", {}, null, _push, _parent); + _push(`
    `); + if (unref(hasAside)) { + _push( + `
    `, + ); + _push( + ssrRenderComponent( + VPDocAside, + null, + { + "aside-top": withCtx((_, _push2, _parent2, _scopeId) => { + if (_push2) { + ssrRenderSlot( + _ctx.$slots, + "aside-top", + {}, + null, + _push2, + _parent2, + _scopeId, + ); + } else { + return [ + renderSlot(_ctx.$slots, "aside-top", {}, void 0, true), + ]; + } + }), + "aside-bottom": withCtx((_, _push2, _parent2, _scopeId) => { + if (_push2) { + ssrRenderSlot( + _ctx.$slots, + "aside-bottom", + {}, + null, + _push2, + _parent2, + _scopeId, + ); + } else { + return [ + renderSlot(_ctx.$slots, "aside-bottom", {}, void 0, true), + ]; + } + }), + "aside-outline-before": withCtx( + (_, _push2, _parent2, _scopeId) => { + if (_push2) { + ssrRenderSlot( + _ctx.$slots, + "aside-outline-before", + {}, + null, + _push2, + _parent2, + _scopeId, + ); + } else { + return [ + renderSlot( + _ctx.$slots, + "aside-outline-before", + {}, + void 0, + true, + ), + ]; + } + }, + ), + "aside-outline-after": withCtx( + (_, _push2, _parent2, _scopeId) => { + if (_push2) { + ssrRenderSlot( + _ctx.$slots, + "aside-outline-after", + {}, + null, + _push2, + _parent2, + _scopeId, + ); + } else { + return [ + renderSlot( + _ctx.$slots, + "aside-outline-after", + {}, + void 0, + true, + ), + ]; + } + }, + ), + "aside-ads-before": withCtx((_, _push2, _parent2, _scopeId) => { + if (_push2) { + ssrRenderSlot( + _ctx.$slots, + "aside-ads-before", + {}, + null, + _push2, + _parent2, + _scopeId, + ); + } else { + return [ + renderSlot( + _ctx.$slots, + "aside-ads-before", + {}, + void 0, + true, + ), + ]; + } + }), + "aside-ads-after": withCtx((_, _push2, _parent2, _scopeId) => { + if (_push2) { + ssrRenderSlot( + _ctx.$slots, + "aside-ads-after", + {}, + null, + _push2, + _parent2, + _scopeId, + ); + } else { + return [ + renderSlot( + _ctx.$slots, + "aside-ads-after", + {}, + void 0, + true, + ), + ]; + } + }), + _: 3, + }, + _parent, + ), + ); + _push(`
    `); + } else { + _push(``); + } + _push( + `
    `, + ); + ssrRenderSlot(_ctx.$slots, "doc-before", {}, null, _push, _parent); + _push(`
    `); + _push( + ssrRenderComponent( + _component_Content, + { + class: [ + "vp-doc", + [ + pageName.value, + unref(theme2).externalLinkIcon && "external-link-icon-enabled", + ], + ], + }, + null, + _parent, + ), + ); + _push(`
    `); + _push( + ssrRenderComponent( + VPDocFooter, + null, + { + "doc-footer-before": withCtx((_, _push2, _parent2, _scopeId) => { + if (_push2) { + ssrRenderSlot( + _ctx.$slots, + "doc-footer-before", + {}, + null, + _push2, + _parent2, + _scopeId, + ); + } else { + return [ + renderSlot( + _ctx.$slots, + "doc-footer-before", + {}, + void 0, + true, + ), + ]; + } + }), + _: 3, + }, + _parent, + ), + ); + ssrRenderSlot(_ctx.$slots, "doc-after", {}, null, _push, _parent); + _push(`
    `); + ssrRenderSlot(_ctx.$slots, "doc-bottom", {}, null, _push, _parent); + _push(``); + }; + }, +}); +const _sfc_setup$12 = _sfc_main$12.setup; +_sfc_main$12.setup = (props, ctx) => { + const ssrContext = useSSRContext(); + (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add( + "../node_modules/vitepress/dist/client/theme-default/components/VPDoc.vue", + ); + return _sfc_setup$12 ? _sfc_setup$12(props, ctx) : void 0; +}; +const VPDoc = /* @__PURE__ */ _export_sfc(_sfc_main$12, [ + ["__scopeId", "data-v-39a288b8"], +]); +const _sfc_main$11 = /* @__PURE__ */ defineComponent({ + __name: "VPButton", + __ssrInlineRender: true, + props: { + tag: {}, + size: { default: "medium" }, + theme: { default: "brand" }, + text: {}, + href: {}, + }, + setup(__props) { + const props = __props; + const isExternal2 = computed( + () => props.href && EXTERNAL_URL_RE.test(props.href), + ); + const component = computed(() => { + return props.tag || props.href ? "a" : "button"; + }); + return (_ctx, _push, _parent, _attrs) => { + ssrRenderVNode( + _push, + createVNode( + resolveDynamicComponent(component.value), + mergeProps( + { + class: ["VPButton", [_ctx.size, _ctx.theme]], + href: _ctx.href ? unref(normalizeLink$1)(_ctx.href) : void 0, + target: isExternal2.value ? "_blank" : void 0, + rel: isExternal2.value ? "noreferrer" : void 0, + }, + _attrs, + ), + { + default: withCtx((_, _push2, _parent2, _scopeId) => { + if (_push2) { + _push2(`${ssrInterpolate(_ctx.text)}`); + } else { + return [createTextVNode(toDisplayString(_ctx.text), 1)]; + } + }), + _: 1, + }, + ), + _parent, + ); + }; + }, +}); +const _sfc_setup$11 = _sfc_main$11.setup; +_sfc_main$11.setup = (props, ctx) => { + const ssrContext = useSSRContext(); + (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add( + "../node_modules/vitepress/dist/client/theme-default/components/VPButton.vue", + ); + return _sfc_setup$11 ? _sfc_setup$11(props, ctx) : void 0; +}; +const VPButton = /* @__PURE__ */ _export_sfc(_sfc_main$11, [ + ["__scopeId", "data-v-c1c5efc1"], +]); +const _sfc_main$10 = /* @__PURE__ */ defineComponent({ + ...{ inheritAttrs: false }, + __name: "VPImage", + __ssrInlineRender: true, + props: { + image: {}, + alt: {}, + }, + setup(__props) { + return (_ctx, _push, _parent, _attrs) => { + const _component_VPImage = resolveComponent("VPImage", true); + if (_ctx.image) { + _push(``); + if (typeof _ctx.image === "string" || "src" in _ctx.image) { + _push( + ``, + ); + } else { + _push(``); + _push( + ssrRenderComponent( + _component_VPImage, + mergeProps( + { + class: "dark", + image: _ctx.image.dark, + alt: _ctx.image.alt, + }, + _ctx.$attrs, + ), + null, + _parent, + ), + ); + _push( + ssrRenderComponent( + _component_VPImage, + mergeProps( + { + class: "light", + image: _ctx.image.light, + alt: _ctx.image.alt, + }, + _ctx.$attrs, + ), + null, + _parent, + ), + ); + _push(``); + } + _push(``); + } else { + _push(``); + } + }; + }, +}); +const _sfc_setup$10 = _sfc_main$10.setup; +_sfc_main$10.setup = (props, ctx) => { + const ssrContext = useSSRContext(); + (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add( + "../node_modules/vitepress/dist/client/theme-default/components/VPImage.vue", + ); + return _sfc_setup$10 ? _sfc_setup$10(props, ctx) : void 0; +}; +const VPImage = /* @__PURE__ */ _export_sfc(_sfc_main$10, [ + ["__scopeId", "data-v-8426fc1a"], +]); +const _sfc_main$$ = /* @__PURE__ */ defineComponent({ + __name: "VPHero", + __ssrInlineRender: true, + props: { + name: {}, + text: {}, + tagline: {}, + image: {}, + actions: {}, + }, + setup(__props) { + const heroImageSlotExists = inject("hero-image-slot-exists"); + return (_ctx, _push, _parent, _attrs) => { + _push( + `
    `, + ); + ssrRenderSlot( + _ctx.$slots, + "home-hero-info", + {}, + () => { + if (_ctx.name) { + _push( + `

    ${_ctx.name}

    `, + ); + } else { + _push(``); + } + if (_ctx.text) { + _push(`

    ${_ctx.text}

    `); + } else { + _push(``); + } + if (_ctx.tagline) { + _push(`

    ${_ctx.tagline}

    `); + } else { + _push(``); + } + }, + _push, + _parent, + ); + if (_ctx.actions) { + _push(`
    `); + ssrRenderList(_ctx.actions, (action) => { + _push(`
    `); + _push( + ssrRenderComponent( + VPButton, + { + tag: "a", + size: "medium", + theme: action.theme, + text: action.text, + href: action.link, + }, + null, + _parent, + ), + ); + _push(`
    `); + }); + _push(`
    `); + } else { + _push(``); + } + _push(`
    `); + if (_ctx.image || unref(heroImageSlotExists)) { + _push( + `
    `, + ); + ssrRenderSlot( + _ctx.$slots, + "home-hero-image", + {}, + () => { + if (_ctx.image) { + _push( + ssrRenderComponent( + VPImage, + { + class: "image-src", + image: _ctx.image, + }, + null, + _parent, + ), + ); + } else { + _push(``); + } + }, + _push, + _parent, + ); + _push(`
    `); + } else { + _push(``); + } + _push(`
    `); + }; + }, +}); +const _sfc_setup$$ = _sfc_main$$.setup; +_sfc_main$$.setup = (props, ctx) => { + const ssrContext = useSSRContext(); + (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add( + "../node_modules/vitepress/dist/client/theme-default/components/VPHero.vue", + ); + return _sfc_setup$$ ? _sfc_setup$$(props, ctx) : void 0; +}; +const VPHero = /* @__PURE__ */ _export_sfc(_sfc_main$$, [ + ["__scopeId", "data-v-da5d1713"], +]); +const _sfc_main$_ = /* @__PURE__ */ defineComponent({ + __name: "VPHomeHero", + __ssrInlineRender: true, + setup(__props) { + const { frontmatter: fm } = useData(); + return (_ctx, _push, _parent, _attrs) => { + if (unref(fm).hero) { + _push( + ssrRenderComponent( + VPHero, + mergeProps( + { + class: "VPHomeHero", + name: unref(fm).hero.name, + text: unref(fm).hero.text, + tagline: unref(fm).hero.tagline, + image: unref(fm).hero.image, + actions: unref(fm).hero.actions, + }, + _attrs, + ), + { + "home-hero-info": withCtx((_, _push2, _parent2, _scopeId) => { + if (_push2) { + ssrRenderSlot( + _ctx.$slots, + "home-hero-info", + {}, + null, + _push2, + _parent2, + _scopeId, + ); + } else { + return [renderSlot(_ctx.$slots, "home-hero-info")]; + } + }), + "home-hero-image": withCtx((_, _push2, _parent2, _scopeId) => { + if (_push2) { + ssrRenderSlot( + _ctx.$slots, + "home-hero-image", + {}, + null, + _push2, + _parent2, + _scopeId, + ); + } else { + return [renderSlot(_ctx.$slots, "home-hero-image")]; + } + }), + _: 3, + }, + _parent, + ), + ); + } else { + _push(``); + } + }; + }, +}); +const _sfc_setup$_ = _sfc_main$_.setup; +_sfc_main$_.setup = (props, ctx) => { + const ssrContext = useSSRContext(); + (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add( + "../node_modules/vitepress/dist/client/theme-default/components/VPHomeHero.vue", + ); + return _sfc_setup$_ ? _sfc_setup$_(props, ctx) : void 0; +}; +const _sfc_main$Z = {}; +function _sfc_ssrRender$b(_ctx, _push, _parent, _attrs) { + _push( + ``, + ); +} +const _sfc_setup$Z = _sfc_main$Z.setup; +_sfc_main$Z.setup = (props, ctx) => { + const ssrContext = useSSRContext(); + (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add( + "../node_modules/vitepress/dist/client/theme-default/components/icons/VPIconArrowRight.vue", + ); + return _sfc_setup$Z ? _sfc_setup$Z(props, ctx) : void 0; +}; +const VPIconArrowRight = /* @__PURE__ */ _export_sfc(_sfc_main$Z, [ + ["ssrRender", _sfc_ssrRender$b], +]); +const _sfc_main$Y = /* @__PURE__ */ defineComponent({ + __name: "VPFeature", + __ssrInlineRender: true, + props: { + icon: {}, + title: {}, + details: {}, + link: {}, + linkText: {}, + rel: {}, + target: {}, + }, + setup(__props) { + return (_ctx, _push, _parent, _attrs) => { + _push( + ssrRenderComponent( + _sfc_main$15, + mergeProps( + { + class: "VPFeature", + href: _ctx.link, + rel: _ctx.rel, + target: _ctx.target, + "no-icon": true, + tag: _ctx.link ? "a" : "div", + }, + _attrs, + ), + { + default: withCtx((_, _push2, _parent2, _scopeId) => { + if (_push2) { + _push2(`
    `); + if (typeof _ctx.icon === "object" && _ctx.icon.wrap) { + _push2(`
    `); + _push2( + ssrRenderComponent( + VPImage, + { + image: _ctx.icon, + alt: _ctx.icon.alt, + height: _ctx.icon.height || 48, + width: _ctx.icon.width || 48, + }, + null, + _parent2, + _scopeId, + ), + ); + _push2(`
    `); + } else if (typeof _ctx.icon === "object") { + _push2( + ssrRenderComponent( + VPImage, + { + image: _ctx.icon, + alt: _ctx.icon.alt, + height: _ctx.icon.height || 48, + width: _ctx.icon.width || 48, + }, + null, + _parent2, + _scopeId, + ), + ); + } else if (_ctx.icon) { + _push2( + `
    ${_ctx.icon}
    `, + ); + } else { + _push2(``); + } + _push2( + `

    ${_ctx.title}

    `, + ); + if (_ctx.details) { + _push2( + `

    ${_ctx.details}

    `, + ); + } else { + _push2(``); + } + if (_ctx.linkText) { + _push2( + ``); + } else { + _push2(``); + } + _push2(`
    `); + } else { + return [ + createVNode("article", { class: "box" }, [ + typeof _ctx.icon === "object" && _ctx.icon.wrap + ? (openBlock(), + createBlock( + "div", + { + key: 0, + class: "icon", + }, + [ + createVNode( + VPImage, + { + image: _ctx.icon, + alt: _ctx.icon.alt, + height: _ctx.icon.height || 48, + width: _ctx.icon.width || 48, + }, + null, + 8, + ["image", "alt", "height", "width"], + ), + ], + )) + : typeof _ctx.icon === "object" + ? (openBlock(), + createBlock( + VPImage, + { + key: 1, + image: _ctx.icon, + alt: _ctx.icon.alt, + height: _ctx.icon.height || 48, + width: _ctx.icon.width || 48, + }, + null, + 8, + ["image", "alt", "height", "width"], + )) + : _ctx.icon + ? (openBlock(), + createBlock( + "div", + { + key: 2, + class: "icon", + innerHTML: _ctx.icon, + }, + null, + 8, + ["innerHTML"], + )) + : createCommentVNode("", true), + createVNode( + "h2", + { + class: "title", + innerHTML: _ctx.title, + }, + null, + 8, + ["innerHTML"], + ), + _ctx.details + ? (openBlock(), + createBlock( + "p", + { + key: 3, + class: "details", + innerHTML: _ctx.details, + }, + null, + 8, + ["innerHTML"], + )) + : createCommentVNode("", true), + _ctx.linkText + ? (openBlock(), + createBlock( + "div", + { + key: 4, + class: "link-text", + }, + [ + createVNode("p", { class: "link-text-value" }, [ + createTextVNode( + toDisplayString(_ctx.linkText) + " ", + 1, + ), + createVNode(VPIconArrowRight, { + class: "link-text-icon", + }), + ]), + ], + )) + : createCommentVNode("", true), + ]), + ]; + } + }), + _: 1, + }, + _parent, + ), + ); + }; + }, +}); +const _sfc_setup$Y = _sfc_main$Y.setup; +_sfc_main$Y.setup = (props, ctx) => { + const ssrContext = useSSRContext(); + (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add( + "../node_modules/vitepress/dist/client/theme-default/components/VPFeature.vue", + ); + return _sfc_setup$Y ? _sfc_setup$Y(props, ctx) : void 0; +}; +const VPFeature = /* @__PURE__ */ _export_sfc(_sfc_main$Y, [ + ["__scopeId", "data-v-33204567"], +]); +const _sfc_main$X = /* @__PURE__ */ defineComponent({ + __name: "VPFeatures", + __ssrInlineRender: true, + props: { + features: {}, + }, + setup(__props) { + const props = __props; + const grid = computed(() => { + const length = props.features.length; + if (!length) { + return; + } else if (length === 2) { + return "grid-2"; + } else if (length === 3) { + return "grid-3"; + } else if (length % 3 === 0) { + return "grid-6"; + } else if (length > 3) { + return "grid-4"; + } + }); + return (_ctx, _push, _parent, _attrs) => { + if (_ctx.features) { + _push( + `
    `, + ); + ssrRenderList(_ctx.features, (feature) => { + _push( + `
    `, + ); + _push( + ssrRenderComponent( + VPFeature, + { + icon: feature.icon, + title: feature.title, + details: feature.details, + link: feature.link, + "link-text": feature.linkText, + rel: feature.rel, + target: feature.target, + }, + null, + _parent, + ), + ); + _push(`
    `); + }); + _push(`
    `); + } else { + _push(``); + } + }; + }, +}); +const _sfc_setup$X = _sfc_main$X.setup; +_sfc_main$X.setup = (props, ctx) => { + const ssrContext = useSSRContext(); + (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add( + "../node_modules/vitepress/dist/client/theme-default/components/VPFeatures.vue", + ); + return _sfc_setup$X ? _sfc_setup$X(props, ctx) : void 0; +}; +const VPFeatures = /* @__PURE__ */ _export_sfc(_sfc_main$X, [ + ["__scopeId", "data-v-a6181336"], +]); +const _sfc_main$W = /* @__PURE__ */ defineComponent({ + __name: "VPHomeFeatures", + __ssrInlineRender: true, + setup(__props) { + const { frontmatter: fm } = useData(); + return (_ctx, _push, _parent, _attrs) => { + if (unref(fm).features) { + _push( + ssrRenderComponent( + VPFeatures, + mergeProps( + { + class: "VPHomeFeatures", + features: unref(fm).features, + }, + _attrs, + ), + null, + _parent, + ), + ); + } else { + _push(``); + } + }; + }, +}); +const _sfc_setup$W = _sfc_main$W.setup; +_sfc_main$W.setup = (props, ctx) => { + const ssrContext = useSSRContext(); + (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add( + "../node_modules/vitepress/dist/client/theme-default/components/VPHomeFeatures.vue", + ); + return _sfc_setup$W ? _sfc_setup$W(props, ctx) : void 0; +}; +const _sfc_main$V = /* @__PURE__ */ defineComponent({ + __name: "VPHome", + __ssrInlineRender: true, + setup(__props) { + return (_ctx, _push, _parent, _attrs) => { + const _component_Content = resolveComponent("Content"); + _push( + ``, + ); + ssrRenderSlot(_ctx.$slots, "home-hero-before", {}, null, _push, _parent); + _push( + ssrRenderComponent( + _sfc_main$_, + null, + { + "home-hero-info": withCtx((_, _push2, _parent2, _scopeId) => { + if (_push2) { + ssrRenderSlot( + _ctx.$slots, + "home-hero-info", + {}, + null, + _push2, + _parent2, + _scopeId, + ); + } else { + return [ + renderSlot(_ctx.$slots, "home-hero-info", {}, void 0, true), + ]; + } + }), + "home-hero-image": withCtx((_, _push2, _parent2, _scopeId) => { + if (_push2) { + ssrRenderSlot( + _ctx.$slots, + "home-hero-image", + {}, + null, + _push2, + _parent2, + _scopeId, + ); + } else { + return [ + renderSlot(_ctx.$slots, "home-hero-image", {}, void 0, true), + ]; + } + }), + _: 3, + }, + _parent, + ), + ); + ssrRenderSlot(_ctx.$slots, "home-hero-after", {}, null, _push, _parent); + ssrRenderSlot( + _ctx.$slots, + "home-features-before", + {}, + null, + _push, + _parent, + ); + _push(ssrRenderComponent(_sfc_main$W, null, null, _parent)); + ssrRenderSlot( + _ctx.$slots, + "home-features-after", + {}, + null, + _push, + _parent, + ); + _push(ssrRenderComponent(_component_Content, null, null, _parent)); + _push(``); + }; + }, +}); +const _sfc_setup$V = _sfc_main$V.setup; +_sfc_main$V.setup = (props, ctx) => { + const ssrContext = useSSRContext(); + (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add( + "../node_modules/vitepress/dist/client/theme-default/components/VPHome.vue", + ); + return _sfc_setup$V ? _sfc_setup$V(props, ctx) : void 0; +}; +const VPHome = /* @__PURE__ */ _export_sfc(_sfc_main$V, [ + ["__scopeId", "data-v-d82743a8"], +]); +const _sfc_main$U = {}; +function _sfc_ssrRender$a(_ctx, _push, _parent, _attrs) { + const _component_Content = resolveComponent("Content"); + _push(``); + ssrRenderSlot(_ctx.$slots, "page-top", {}, null, _push, _parent); + _push(ssrRenderComponent(_component_Content, null, null, _parent)); + ssrRenderSlot(_ctx.$slots, "page-bottom", {}, null, _push, _parent); + _push(``); +} +const _sfc_setup$U = _sfc_main$U.setup; +_sfc_main$U.setup = (props, ctx) => { + const ssrContext = useSSRContext(); + (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add( + "../node_modules/vitepress/dist/client/theme-default/components/VPPage.vue", + ); + return _sfc_setup$U ? _sfc_setup$U(props, ctx) : void 0; +}; +const VPPage = /* @__PURE__ */ _export_sfc(_sfc_main$U, [ + ["ssrRender", _sfc_ssrRender$a], +]); +const _sfc_main$T = /* @__PURE__ */ defineComponent({ + __name: "VPContent", + __ssrInlineRender: true, + setup(__props) { + const { page, frontmatter } = useData(); + const { hasSidebar } = useSidebar(); + return (_ctx, _push, _parent, _attrs) => { + _push( + ``, + ); + if (unref(page).isNotFound) { + ssrRenderSlot( + _ctx.$slots, + "not-found", + {}, + () => { + _push(ssrRenderComponent(NotFound, null, null, _parent)); + }, + _push, + _parent, + ); + } else if (unref(frontmatter).layout === "page") { + _push( + ssrRenderComponent( + VPPage, + null, + { + "page-top": withCtx((_, _push2, _parent2, _scopeId) => { + if (_push2) { + ssrRenderSlot( + _ctx.$slots, + "page-top", + {}, + null, + _push2, + _parent2, + _scopeId, + ); + } else { + return [ + renderSlot(_ctx.$slots, "page-top", {}, void 0, true), + ]; + } + }), + "page-bottom": withCtx((_, _push2, _parent2, _scopeId) => { + if (_push2) { + ssrRenderSlot( + _ctx.$slots, + "page-bottom", + {}, + null, + _push2, + _parent2, + _scopeId, + ); + } else { + return [ + renderSlot(_ctx.$slots, "page-bottom", {}, void 0, true), + ]; + } + }), + _: 3, + }, + _parent, + ), + ); + } else if (unref(frontmatter).layout === "home") { + _push( + ssrRenderComponent( + VPHome, + null, + { + "home-hero-before": withCtx((_, _push2, _parent2, _scopeId) => { + if (_push2) { + ssrRenderSlot( + _ctx.$slots, + "home-hero-before", + {}, + null, + _push2, + _parent2, + _scopeId, + ); + } else { + return [ + renderSlot( + _ctx.$slots, + "home-hero-before", + {}, + void 0, + true, + ), + ]; + } + }), + "home-hero-info": withCtx((_, _push2, _parent2, _scopeId) => { + if (_push2) { + ssrRenderSlot( + _ctx.$slots, + "home-hero-info", + {}, + null, + _push2, + _parent2, + _scopeId, + ); + } else { + return [ + renderSlot(_ctx.$slots, "home-hero-info", {}, void 0, true), + ]; + } + }), + "home-hero-image": withCtx((_, _push2, _parent2, _scopeId) => { + if (_push2) { + ssrRenderSlot( + _ctx.$slots, + "home-hero-image", + {}, + null, + _push2, + _parent2, + _scopeId, + ); + } else { + return [ + renderSlot( + _ctx.$slots, + "home-hero-image", + {}, + void 0, + true, + ), + ]; + } + }), + "home-hero-after": withCtx((_, _push2, _parent2, _scopeId) => { + if (_push2) { + ssrRenderSlot( + _ctx.$slots, + "home-hero-after", + {}, + null, + _push2, + _parent2, + _scopeId, + ); + } else { + return [ + renderSlot( + _ctx.$slots, + "home-hero-after", + {}, + void 0, + true, + ), + ]; + } + }), + "home-features-before": withCtx( + (_, _push2, _parent2, _scopeId) => { + if (_push2) { + ssrRenderSlot( + _ctx.$slots, + "home-features-before", + {}, + null, + _push2, + _parent2, + _scopeId, + ); + } else { + return [ + renderSlot( + _ctx.$slots, + "home-features-before", + {}, + void 0, + true, + ), + ]; + } + }, + ), + "home-features-after": withCtx( + (_, _push2, _parent2, _scopeId) => { + if (_push2) { + ssrRenderSlot( + _ctx.$slots, + "home-features-after", + {}, + null, + _push2, + _parent2, + _scopeId, + ); + } else { + return [ + renderSlot( + _ctx.$slots, + "home-features-after", + {}, + void 0, + true, + ), + ]; + } + }, + ), + _: 3, + }, + _parent, + ), + ); + } else if ( + unref(frontmatter).layout && + unref(frontmatter).layout !== "doc" + ) { + ssrRenderVNode( + _push, + createVNode( + resolveDynamicComponent(unref(frontmatter).layout), + null, + null, + ), + _parent, + ); + } else { + _push( + ssrRenderComponent( + VPDoc, + null, + { + "doc-top": withCtx((_, _push2, _parent2, _scopeId) => { + if (_push2) { + ssrRenderSlot( + _ctx.$slots, + "doc-top", + {}, + null, + _push2, + _parent2, + _scopeId, + ); + } else { + return [renderSlot(_ctx.$slots, "doc-top", {}, void 0, true)]; + } + }), + "doc-bottom": withCtx((_, _push2, _parent2, _scopeId) => { + if (_push2) { + ssrRenderSlot( + _ctx.$slots, + "doc-bottom", + {}, + null, + _push2, + _parent2, + _scopeId, + ); + } else { + return [ + renderSlot(_ctx.$slots, "doc-bottom", {}, void 0, true), + ]; + } + }), + "doc-footer-before": withCtx((_, _push2, _parent2, _scopeId) => { + if (_push2) { + ssrRenderSlot( + _ctx.$slots, + "doc-footer-before", + {}, + null, + _push2, + _parent2, + _scopeId, + ); + } else { + return [ + renderSlot( + _ctx.$slots, + "doc-footer-before", + {}, + void 0, + true, + ), + ]; + } + }), + "doc-before": withCtx((_, _push2, _parent2, _scopeId) => { + if (_push2) { + ssrRenderSlot( + _ctx.$slots, + "doc-before", + {}, + null, + _push2, + _parent2, + _scopeId, + ); + } else { + return [ + renderSlot(_ctx.$slots, "doc-before", {}, void 0, true), + ]; + } + }), + "doc-after": withCtx((_, _push2, _parent2, _scopeId) => { + if (_push2) { + ssrRenderSlot( + _ctx.$slots, + "doc-after", + {}, + null, + _push2, + _parent2, + _scopeId, + ); + } else { + return [ + renderSlot(_ctx.$slots, "doc-after", {}, void 0, true), + ]; + } + }), + "aside-top": withCtx((_, _push2, _parent2, _scopeId) => { + if (_push2) { + ssrRenderSlot( + _ctx.$slots, + "aside-top", + {}, + null, + _push2, + _parent2, + _scopeId, + ); + } else { + return [ + renderSlot(_ctx.$slots, "aside-top", {}, void 0, true), + ]; + } + }), + "aside-outline-before": withCtx( + (_, _push2, _parent2, _scopeId) => { + if (_push2) { + ssrRenderSlot( + _ctx.$slots, + "aside-outline-before", + {}, + null, + _push2, + _parent2, + _scopeId, + ); + } else { + return [ + renderSlot( + _ctx.$slots, + "aside-outline-before", + {}, + void 0, + true, + ), + ]; + } + }, + ), + "aside-outline-after": withCtx( + (_, _push2, _parent2, _scopeId) => { + if (_push2) { + ssrRenderSlot( + _ctx.$slots, + "aside-outline-after", + {}, + null, + _push2, + _parent2, + _scopeId, + ); + } else { + return [ + renderSlot( + _ctx.$slots, + "aside-outline-after", + {}, + void 0, + true, + ), + ]; + } + }, + ), + "aside-ads-before": withCtx((_, _push2, _parent2, _scopeId) => { + if (_push2) { + ssrRenderSlot( + _ctx.$slots, + "aside-ads-before", + {}, + null, + _push2, + _parent2, + _scopeId, + ); + } else { + return [ + renderSlot( + _ctx.$slots, + "aside-ads-before", + {}, + void 0, + true, + ), + ]; + } + }), + "aside-ads-after": withCtx((_, _push2, _parent2, _scopeId) => { + if (_push2) { + ssrRenderSlot( + _ctx.$slots, + "aside-ads-after", + {}, + null, + _push2, + _parent2, + _scopeId, + ); + } else { + return [ + renderSlot( + _ctx.$slots, + "aside-ads-after", + {}, + void 0, + true, + ), + ]; + } + }), + "aside-bottom": withCtx((_, _push2, _parent2, _scopeId) => { + if (_push2) { + ssrRenderSlot( + _ctx.$slots, + "aside-bottom", + {}, + null, + _push2, + _parent2, + _scopeId, + ); + } else { + return [ + renderSlot(_ctx.$slots, "aside-bottom", {}, void 0, true), + ]; + } + }), + _: 3, + }, + _parent, + ), + ); + } + _push(``); + }; + }, +}); +const _sfc_setup$T = _sfc_main$T.setup; +_sfc_main$T.setup = (props, ctx) => { + const ssrContext = useSSRContext(); + (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add( + "../node_modules/vitepress/dist/client/theme-default/components/VPContent.vue", + ); + return _sfc_setup$T ? _sfc_setup$T(props, ctx) : void 0; +}; +const VPContent = /* @__PURE__ */ _export_sfc(_sfc_main$T, [ + ["__scopeId", "data-v-669faec9"], +]); +const _sfc_main$S = /* @__PURE__ */ defineComponent({ + __name: "VPFooter", + __ssrInlineRender: true, + setup(__props) { + const { theme: theme2, frontmatter } = useData(); + const { hasSidebar } = useSidebar(); + return (_ctx, _push, _parent, _attrs) => { + if (unref(theme2).footer && unref(frontmatter).footer !== false) { + _push( + `
    `, + ); + if (unref(theme2).footer.message) { + _push( + `

    ${ + unref(theme2).footer.message + }

    `, + ); + } else { + _push(``); + } + if (unref(theme2).footer.copyright) { + _push( + ``, + ); + } else { + _push(``); + } + _push(`
    `); + } else { + _push(``); + } + }; + }, +}); +const _sfc_setup$S = _sfc_main$S.setup; +_sfc_main$S.setup = (props, ctx) => { + const ssrContext = useSSRContext(); + (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add( + "../node_modules/vitepress/dist/client/theme-default/components/VPFooter.vue", + ); + return _sfc_setup$S ? _sfc_setup$S(props, ctx) : void 0; +}; +const VPFooter = /* @__PURE__ */ _export_sfc(_sfc_main$S, [ + ["__scopeId", "data-v-e315a0ad"], +]); +function useLocalNav() { + const { theme: theme2, frontmatter } = useData(); + const headers = shallowRef([]); + const hasLocalNav = computed(() => { + return headers.value.length > 0; + }); + onContentUpdated(() => { + headers.value = getHeaders( + frontmatter.value.outline ?? theme2.value.outline, + ); + }); + return { + headers, + hasLocalNav, + }; +} +const _sfc_main$R = {}; +function _sfc_ssrRender$9(_ctx, _push, _parent, _attrs) { + _push( + ``, + ); +} +const _sfc_setup$R = _sfc_main$R.setup; +_sfc_main$R.setup = (props, ctx) => { + const ssrContext = useSSRContext(); + (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add( + "../node_modules/vitepress/dist/client/theme-default/components/icons/VPIconChevronRight.vue", + ); + return _sfc_setup$R ? _sfc_setup$R(props, ctx) : void 0; +}; +const VPIconChevronRight = /* @__PURE__ */ _export_sfc(_sfc_main$R, [ + ["ssrRender", _sfc_ssrRender$9], +]); +const _sfc_main$Q = /* @__PURE__ */ defineComponent({ + __name: "VPLocalNavOutlineDropdown", + __ssrInlineRender: true, + props: { + headers: {}, + navHeight: {}, + }, + setup(__props) { + const { theme: theme2 } = useData(); + const open = ref(false); + const vh = ref(0); + const main = ref(); + ref(); + onClickOutside(main, () => { + open.value = false; + }); + onKeyStroke("Escape", () => { + open.value = false; + }); + onContentUpdated(() => { + open.value = false; + }); + return (_ctx, _push, _parent, _attrs) => { + _push( + ``, + ); + if (_ctx.headers.length > 0) { + _push( + ``); + } else { + _push( + ``, + ); + } + if (open.value) { + _push( + `
    `, + ); + _push( + ssrRenderComponent( + VPDocOutlineItem, + { headers: _ctx.headers }, + null, + _parent, + ), + ); + _push(`
    `); + } else { + _push(``); + } + _push(``); + }; + }, +}); +const _sfc_setup$Q = _sfc_main$Q.setup; +_sfc_main$Q.setup = (props, ctx) => { + const ssrContext = useSSRContext(); + (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add( + "../node_modules/vitepress/dist/client/theme-default/components/VPLocalNavOutlineDropdown.vue", + ); + return _sfc_setup$Q ? _sfc_setup$Q(props, ctx) : void 0; +}; +const VPLocalNavOutlineDropdown = /* @__PURE__ */ _export_sfc(_sfc_main$Q, [ + ["__scopeId", "data-v-af18c0d5"], +]); +const _sfc_main$P = {}; +function _sfc_ssrRender$8(_ctx, _push, _parent, _attrs) { + _push( + ``, + ); +} +const _sfc_setup$P = _sfc_main$P.setup; +_sfc_main$P.setup = (props, ctx) => { + const ssrContext = useSSRContext(); + (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add( + "../node_modules/vitepress/dist/client/theme-default/components/icons/VPIconAlignLeft.vue", + ); + return _sfc_setup$P ? _sfc_setup$P(props, ctx) : void 0; +}; +const VPIconAlignLeft = /* @__PURE__ */ _export_sfc(_sfc_main$P, [ + ["ssrRender", _sfc_ssrRender$8], +]); +const _sfc_main$O = /* @__PURE__ */ defineComponent({ + __name: "VPLocalNav", + __ssrInlineRender: true, + props: { + open: { type: Boolean }, + }, + emits: ["open-menu"], + setup(__props) { + const { theme: theme2, frontmatter } = useData(); + const { hasSidebar } = useSidebar(); + const { headers } = useLocalNav(); + const { y } = useWindowScroll(); + const navHeight = ref(0); + onMounted(() => { + navHeight.value = parseInt( + getComputedStyle(document.documentElement).getPropertyValue( + "--vp-nav-height", + ), + ); + }); + onContentUpdated(() => { + headers.value = getHeaders( + frontmatter.value.outline ?? theme2.value.outline, + ); + }); + const empty = computed(() => { + return headers.value.length === 0; + }); + const emptyAndNoSidebar = computed(() => { + return empty.value && !hasSidebar.value; + }); + const classes = computed(() => { + return { + VPLocalNav: true, + "has-sidebar": hasSidebar.value, + empty: empty.value, + fixed: emptyAndNoSidebar.value, + }; + }); + return (_ctx, _push, _parent, _attrs) => { + if ( + unref(frontmatter).layout !== "home" && + (!emptyAndNoSidebar.value || unref(y) >= navHeight.value) + ) { + _push( + `
    `, + ); + if (unref(hasSidebar)) { + _push( + ``, + ); + } else { + _push(``); + } + _push( + ssrRenderComponent( + VPLocalNavOutlineDropdown, + { + headers: unref(headers), + navHeight: navHeight.value, + }, + null, + _parent, + ), + ); + _push(`
    `); + } else { + _push(``); + } + }; + }, +}); +const _sfc_setup$O = _sfc_main$O.setup; +_sfc_main$O.setup = (props, ctx) => { + const ssrContext = useSSRContext(); + (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add( + "../node_modules/vitepress/dist/client/theme-default/components/VPLocalNav.vue", + ); + return _sfc_setup$O ? _sfc_setup$O(props, ctx) : void 0; +}; +const VPLocalNav = /* @__PURE__ */ _export_sfc(_sfc_main$O, [ + ["__scopeId", "data-v-0282ae07"], +]); +function useNav() { + const isScreenOpen = ref(false); + function openScreen() { + isScreenOpen.value = true; + window.addEventListener("resize", closeScreenOnTabletWindow); + } + function closeScreen() { + isScreenOpen.value = false; + window.removeEventListener("resize", closeScreenOnTabletWindow); + } + function toggleScreen() { + isScreenOpen.value ? closeScreen() : openScreen(); + } + function closeScreenOnTabletWindow() { + window.outerWidth >= 768 && closeScreen(); + } + const route = useRoute(); + watch(() => route.path, closeScreen); + return { + isScreenOpen, + openScreen, + closeScreen, + toggleScreen, + }; +} +const _sfc_main$N = {}; +function _sfc_ssrRender$7(_ctx, _push, _parent, _attrs) { + _push( + ``, + ); + if (_ctx.$slots.default) { + _push(``); + ssrRenderSlot(_ctx.$slots, "default", {}, null, _push, _parent); + _push(``); + } else { + _push(``); + } + _push(``); +} +const _sfc_setup$N = _sfc_main$N.setup; +_sfc_main$N.setup = (props, ctx) => { + const ssrContext = useSSRContext(); + (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add( + "../node_modules/vitepress/dist/client/theme-default/components/VPSwitch.vue", + ); + return _sfc_setup$N ? _sfc_setup$N(props, ctx) : void 0; +}; +const VPSwitch = /* @__PURE__ */ _export_sfc(_sfc_main$N, [ + ["ssrRender", _sfc_ssrRender$7], + ["__scopeId", "data-v-b1685198"], +]); +const _sfc_main$M = {}; +function _sfc_ssrRender$6(_ctx, _push, _parent, _attrs) { + _push( + ``, + ); +} +const _sfc_setup$M = _sfc_main$M.setup; +_sfc_main$M.setup = (props, ctx) => { + const ssrContext = useSSRContext(); + (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add( + "../node_modules/vitepress/dist/client/theme-default/components/icons/VPIconMoon.vue", + ); + return _sfc_setup$M ? _sfc_setup$M(props, ctx) : void 0; +}; +const VPIconMoon = /* @__PURE__ */ _export_sfc(_sfc_main$M, [ + ["ssrRender", _sfc_ssrRender$6], +]); +const _sfc_main$L = {}; +function _sfc_ssrRender$5(_ctx, _push, _parent, _attrs) { + _push( + ``, + ); +} +const _sfc_setup$L = _sfc_main$L.setup; +_sfc_main$L.setup = (props, ctx) => { + const ssrContext = useSSRContext(); + (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add( + "../node_modules/vitepress/dist/client/theme-default/components/icons/VPIconSun.vue", + ); + return _sfc_setup$L ? _sfc_setup$L(props, ctx) : void 0; +}; +const VPIconSun = /* @__PURE__ */ _export_sfc(_sfc_main$L, [ + ["ssrRender", _sfc_ssrRender$5], +]); +const _sfc_main$K = /* @__PURE__ */ defineComponent({ + __name: "VPSwitchAppearance", + __ssrInlineRender: true, + setup(__props) { + const { isDark, theme: theme2 } = useData(); + const toggleAppearance = inject("toggle-appearance", () => { + isDark.value = !isDark.value; + }); + const switchTitle = computed(() => { + return isDark.value + ? theme2.value.lightModeSwitchTitle || "Switch to light theme" + : theme2.value.darkModeSwitchTitle || "Switch to dark theme"; + }); + return (_ctx, _push, _parent, _attrs) => { + _push( + ssrRenderComponent( + VPSwitch, + mergeProps( + { + title: switchTitle.value, + class: "VPSwitchAppearance", + "aria-checked": unref(isDark), + onClick: unref(toggleAppearance), + }, + _attrs, + ), + { + default: withCtx((_, _push2, _parent2, _scopeId) => { + if (_push2) { + _push2( + ssrRenderComponent( + VPIconSun, + { class: "sun" }, + null, + _parent2, + _scopeId, + ), + ); + _push2( + ssrRenderComponent( + VPIconMoon, + { class: "moon" }, + null, + _parent2, + _scopeId, + ), + ); + } else { + return [ + createVNode(VPIconSun, { class: "sun" }), + createVNode(VPIconMoon, { class: "moon" }), + ]; + } + }), + _: 1, + }, + _parent, + ), + ); + }; + }, +}); +const _sfc_setup$K = _sfc_main$K.setup; +_sfc_main$K.setup = (props, ctx) => { + const ssrContext = useSSRContext(); + (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add( + "../node_modules/vitepress/dist/client/theme-default/components/VPSwitchAppearance.vue", + ); + return _sfc_setup$K ? _sfc_setup$K(props, ctx) : void 0; +}; +const VPSwitchAppearance = /* @__PURE__ */ _export_sfc(_sfc_main$K, [ + ["__scopeId", "data-v-1736f215"], +]); +const _sfc_main$J = /* @__PURE__ */ defineComponent({ + __name: "VPNavBarAppearance", + __ssrInlineRender: true, + setup(__props) { + const { site } = useData(); + return (_ctx, _push, _parent, _attrs) => { + if (unref(site).appearance && unref(site).appearance !== "force-dark") { + _push( + ``, + ); + _push(ssrRenderComponent(VPSwitchAppearance, null, null, _parent)); + _push(``); + } else { + _push(``); + } + }; + }, +}); +const _sfc_setup$J = _sfc_main$J.setup; +_sfc_main$J.setup = (props, ctx) => { + const ssrContext = useSSRContext(); + (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add( + "../node_modules/vitepress/dist/client/theme-default/components/VPNavBarAppearance.vue", + ); + return _sfc_setup$J ? _sfc_setup$J(props, ctx) : void 0; +}; +const VPNavBarAppearance = /* @__PURE__ */ _export_sfc(_sfc_main$J, [ + ["__scopeId", "data-v-e6aabb21"], +]); +const focusedElement = ref(); +let active = false; +let listeners = 0; +function useFlyout(options) { + const focus = ref(false); + if (inBrowser) { + !active && activateFocusTracking(); + listeners++; + const unwatch = watch(focusedElement, (el) => { + var _a, _b, _c; + if ( + el === options.el.value || + ((_a = options.el.value) == null ? void 0 : _a.contains(el)) + ) { + focus.value = true; + (_b = options.onFocus) == null ? void 0 : _b.call(options); + } else { + focus.value = false; + (_c = options.onBlur) == null ? void 0 : _c.call(options); + } + }); + onUnmounted(() => { + unwatch(); + listeners--; + if (!listeners) { + deactivateFocusTracking(); + } + }); + } + return readonly(focus); +} +function activateFocusTracking() { + document.addEventListener("focusin", handleFocusIn); + active = true; + focusedElement.value = document.activeElement; +} +function deactivateFocusTracking() { + document.removeEventListener("focusin", handleFocusIn); +} +function handleFocusIn() { + focusedElement.value = document.activeElement; +} +const _sfc_main$I = {}; +function _sfc_ssrRender$4(_ctx, _push, _parent, _attrs) { + _push( + ``, + ); +} +const _sfc_setup$I = _sfc_main$I.setup; +_sfc_main$I.setup = (props, ctx) => { + const ssrContext = useSSRContext(); + (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add( + "../node_modules/vitepress/dist/client/theme-default/components/icons/VPIconChevronDown.vue", + ); + return _sfc_setup$I ? _sfc_setup$I(props, ctx) : void 0; +}; +const VPIconChevronDown = /* @__PURE__ */ _export_sfc(_sfc_main$I, [ + ["ssrRender", _sfc_ssrRender$4], +]); +const _sfc_main$H = {}; +function _sfc_ssrRender$3(_ctx, _push, _parent, _attrs) { + _push( + ``, + ); +} +const _sfc_setup$H = _sfc_main$H.setup; +_sfc_main$H.setup = (props, ctx) => { + const ssrContext = useSSRContext(); + (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add( + "../node_modules/vitepress/dist/client/theme-default/components/icons/VPIconMoreHorizontal.vue", + ); + return _sfc_setup$H ? _sfc_setup$H(props, ctx) : void 0; +}; +const VPIconMoreHorizontal = /* @__PURE__ */ _export_sfc(_sfc_main$H, [ + ["ssrRender", _sfc_ssrRender$3], +]); +const _sfc_main$G = /* @__PURE__ */ defineComponent({ + __name: "VPMenuLink", + __ssrInlineRender: true, + props: { + item: {}, + }, + setup(__props) { + const { page } = useData(); + return (_ctx, _push, _parent, _attrs) => { + _push( + ``, + ); + _push( + ssrRenderComponent( + _sfc_main$15, + { + class: { + active: unref(isActive)( + unref(page).relativePath, + _ctx.item.activeMatch || _ctx.item.link, + !!_ctx.item.activeMatch, + ), + }, + href: _ctx.item.link, + target: _ctx.item.target, + rel: _ctx.item.rel, + }, + { + default: withCtx((_, _push2, _parent2, _scopeId) => { + if (_push2) { + _push2(`${ssrInterpolate(_ctx.item.text)}`); + } else { + return [createTextVNode(toDisplayString(_ctx.item.text), 1)]; + } + }), + _: 1, + }, + _parent, + ), + ); + _push(``); + }; + }, +}); +const _sfc_setup$G = _sfc_main$G.setup; +_sfc_main$G.setup = (props, ctx) => { + const ssrContext = useSSRContext(); + (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add( + "../node_modules/vitepress/dist/client/theme-default/components/VPMenuLink.vue", + ); + return _sfc_setup$G ? _sfc_setup$G(props, ctx) : void 0; +}; +const VPMenuLink = /* @__PURE__ */ _export_sfc(_sfc_main$G, [ + ["__scopeId", "data-v-43f1e123"], +]); +const _sfc_main$F = /* @__PURE__ */ defineComponent({ + __name: "VPMenuGroup", + __ssrInlineRender: true, + props: { + text: {}, + items: {}, + }, + setup(__props) { + return (_ctx, _push, _parent, _attrs) => { + _push( + ``, + ); + if (_ctx.text) { + _push( + `

    ${ssrInterpolate(_ctx.text)}

    `, + ); + } else { + _push(``); + } + _push(``); + ssrRenderList(_ctx.items, (item) => { + _push(``); + if ("link" in item) { + _push(ssrRenderComponent(VPMenuLink, { item }, null, _parent)); + } else { + _push(``); + } + _push(``); + }); + _push(``); + }; + }, +}); +const _sfc_setup$F = _sfc_main$F.setup; +_sfc_main$F.setup = (props, ctx) => { + const ssrContext = useSSRContext(); + (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add( + "../node_modules/vitepress/dist/client/theme-default/components/VPMenuGroup.vue", + ); + return _sfc_setup$F ? _sfc_setup$F(props, ctx) : void 0; +}; +const VPMenuGroup = /* @__PURE__ */ _export_sfc(_sfc_main$F, [ + ["__scopeId", "data-v-69e747b5"], +]); +const _sfc_main$E = /* @__PURE__ */ defineComponent({ + __name: "VPMenu", + __ssrInlineRender: true, + props: { + items: {}, + }, + setup(__props) { + return (_ctx, _push, _parent, _attrs) => { + _push( + ``, + ); + if (_ctx.items) { + _push(`
    `); + ssrRenderList(_ctx.items, (item) => { + _push(``); + if ("link" in item) { + _push(ssrRenderComponent(VPMenuLink, { item }, null, _parent)); + } else { + _push( + ssrRenderComponent( + VPMenuGroup, + { + text: item.text, + items: item.items, + }, + null, + _parent, + ), + ); + } + _push(``); + }); + _push(`
    `); + } else { + _push(``); + } + ssrRenderSlot(_ctx.$slots, "default", {}, null, _push, _parent); + _push(``); + }; + }, +}); +const _sfc_setup$E = _sfc_main$E.setup; +_sfc_main$E.setup = (props, ctx) => { + const ssrContext = useSSRContext(); + (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add( + "../node_modules/vitepress/dist/client/theme-default/components/VPMenu.vue", + ); + return _sfc_setup$E ? _sfc_setup$E(props, ctx) : void 0; +}; +const VPMenu = /* @__PURE__ */ _export_sfc(_sfc_main$E, [ + ["__scopeId", "data-v-e7ea1737"], +]); +const _sfc_main$D = /* @__PURE__ */ defineComponent({ + __name: "VPFlyout", + __ssrInlineRender: true, + props: { + icon: {}, + button: {}, + label: {}, + items: {}, + }, + setup(__props) { + const open = ref(false); + const el = ref(); + useFlyout({ el, onBlur }); + function onBlur() { + open.value = false; + } + return (_ctx, _push, _parent, _attrs) => { + _push( + ``); + }; + }, +}); +const _sfc_setup$D = _sfc_main$D.setup; +_sfc_main$D.setup = (props, ctx) => { + const ssrContext = useSSRContext(); + (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add( + "../node_modules/vitepress/dist/client/theme-default/components/VPFlyout.vue", + ); + return _sfc_setup$D ? _sfc_setup$D(props, ctx) : void 0; +}; +const VPFlyout = /* @__PURE__ */ _export_sfc(_sfc_main$D, [ + ["__scopeId", "data-v-9c007e85"], +]); +const icons = { + discord: + 'Discord', + facebook: + 'Facebook', + github: + 'GitHub', + instagram: + 'Instagram', + linkedin: + 'LinkedIn', + mastodon: + 'Mastodon', + slack: + 'Slack', + twitter: + 'Twitter', + x: 'X', + youtube: + 'YouTube', +}; +const _sfc_main$C = /* @__PURE__ */ defineComponent({ + __name: "VPSocialLink", + __ssrInlineRender: true, + props: { + icon: {}, + link: {}, + ariaLabel: {}, + }, + setup(__props) { + const props = __props; + const svg = computed(() => { + if (typeof props.icon === "object") return props.icon.svg; + return icons[props.icon]; + }); + return (_ctx, _push, _parent, _attrs) => { + _push( + `${svg.value}`, + ); + }; + }, +}); +const _sfc_setup$C = _sfc_main$C.setup; +_sfc_main$C.setup = (props, ctx) => { + const ssrContext = useSSRContext(); + (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add( + "../node_modules/vitepress/dist/client/theme-default/components/VPSocialLink.vue", + ); + return _sfc_setup$C ? _sfc_setup$C(props, ctx) : void 0; +}; +const VPSocialLink = /* @__PURE__ */ _export_sfc(_sfc_main$C, [ + ["__scopeId", "data-v-f80f8133"], +]); +const _sfc_main$B = /* @__PURE__ */ defineComponent({ + __name: "VPSocialLinks", + __ssrInlineRender: true, + props: { + links: {}, + }, + setup(__props) { + return (_ctx, _push, _parent, _attrs) => { + _push( + ``, + ); + ssrRenderList(_ctx.links, ({ link: link2, icon, ariaLabel }) => { + _push( + ssrRenderComponent( + VPSocialLink, + { + key: link2, + icon, + link: link2, + ariaLabel, + }, + null, + _parent, + ), + ); + }); + _push(``); + }; + }, +}); +const _sfc_setup$B = _sfc_main$B.setup; +_sfc_main$B.setup = (props, ctx) => { + const ssrContext = useSSRContext(); + (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add( + "../node_modules/vitepress/dist/client/theme-default/components/VPSocialLinks.vue", + ); + return _sfc_setup$B ? _sfc_setup$B(props, ctx) : void 0; +}; +const VPSocialLinks = /* @__PURE__ */ _export_sfc(_sfc_main$B, [ + ["__scopeId", "data-v-7bc22406"], +]); +const _sfc_main$A = /* @__PURE__ */ defineComponent({ + __name: "VPNavBarExtra", + __ssrInlineRender: true, + setup(__props) { + const { site, theme: theme2 } = useData(); + const { localeLinks, currentLang } = useLangs({ correspondingLink: true }); + const hasExtraContent = computed( + () => + (localeLinks.value.length && currentLang.value.label) || + site.value.appearance || + theme2.value.socialLinks, + ); + return (_ctx, _push, _parent, _attrs) => { + if (hasExtraContent.value) { + _push( + ssrRenderComponent( + VPFlyout, + mergeProps( + { + class: "VPNavBarExtra", + label: "extra navigation", + }, + _attrs, + ), + { + default: withCtx((_, _push2, _parent2, _scopeId) => { + if (_push2) { + if (unref(localeLinks).length && unref(currentLang).label) { + _push2( + `

    ${ssrInterpolate( + unref(currentLang).label, + )}

    `, + ); + ssrRenderList(unref(localeLinks), (locale) => { + _push2( + ssrRenderComponent( + VPMenuLink, + { item: locale }, + null, + _parent2, + _scopeId, + ), + ); + }); + _push2(`
    `); + } else { + _push2(``); + } + if ( + unref(site).appearance && + unref(site).appearance !== "force-dark" + ) { + _push2( + `

    ${ssrInterpolate( + unref(theme2).darkModeSwitchLabel || "Appearance", + )}

    `, + ); + _push2( + ssrRenderComponent( + VPSwitchAppearance, + null, + null, + _parent2, + _scopeId, + ), + ); + _push2(`
    `); + } else { + _push2(``); + } + if (unref(theme2).socialLinks) { + _push2( + `
    `); + } else { + _push2(``); + } + } else { + return [ + unref(localeLinks).length && unref(currentLang).label + ? (openBlock(), + createBlock( + "div", + { + key: 0, + class: "group translations", + }, + [ + createVNode( + "p", + { class: "trans-title" }, + toDisplayString(unref(currentLang).label), + 1, + ), + (openBlock(true), + createBlock( + Fragment, + null, + renderList(unref(localeLinks), (locale) => { + return ( + openBlock(), + createBlock( + VPMenuLink, + { + key: locale.link, + item: locale, + }, + null, + 8, + ["item"], + ) + ); + }), + 128, + )), + ], + )) + : createCommentVNode("", true), + unref(site).appearance && + unref(site).appearance !== "force-dark" + ? (openBlock(), + createBlock( + "div", + { + key: 1, + class: "group", + }, + [ + createVNode("div", { class: "item appearance" }, [ + createVNode( + "p", + { class: "label" }, + toDisplayString( + unref(theme2).darkModeSwitchLabel || + "Appearance", + ), + 1, + ), + createVNode( + "div", + { class: "appearance-action" }, + [createVNode(VPSwitchAppearance)], + ), + ]), + ], + )) + : createCommentVNode("", true), + unref(theme2).socialLinks + ? (openBlock(), + createBlock( + "div", + { + key: 2, + class: "group", + }, + [ + createVNode("div", { class: "item social-links" }, [ + createVNode( + VPSocialLinks, + { + class: "social-links-list", + links: unref(theme2).socialLinks, + }, + null, + 8, + ["links"], + ), + ]), + ], + )) + : createCommentVNode("", true), + ]; + } + }), + _: 1, + }, + _parent, + ), + ); + } else { + _push(``); + } + }; + }, +}); +const _sfc_setup$A = _sfc_main$A.setup; +_sfc_main$A.setup = (props, ctx) => { + const ssrContext = useSSRContext(); + (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add( + "../node_modules/vitepress/dist/client/theme-default/components/VPNavBarExtra.vue", + ); + return _sfc_setup$A ? _sfc_setup$A(props, ctx) : void 0; +}; +const VPNavBarExtra = /* @__PURE__ */ _export_sfc(_sfc_main$A, [ + ["__scopeId", "data-v-d0bd9dde"], +]); +const _sfc_main$z = /* @__PURE__ */ defineComponent({ + __name: "VPNavBarHamburger", + __ssrInlineRender: true, + props: { + active: { type: Boolean }, + }, + emits: ["click"], + setup(__props) { + return (_ctx, _push, _parent, _attrs) => { + _push( + ``, + ); + }; + }, +}); +const _sfc_setup$z = _sfc_main$z.setup; +_sfc_main$z.setup = (props, ctx) => { + const ssrContext = useSSRContext(); + (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add( + "../node_modules/vitepress/dist/client/theme-default/components/VPNavBarHamburger.vue", + ); + return _sfc_setup$z ? _sfc_setup$z(props, ctx) : void 0; +}; +const VPNavBarHamburger = /* @__PURE__ */ _export_sfc(_sfc_main$z, [ + ["__scopeId", "data-v-e5dd9c1c"], +]); +const _sfc_main$y = /* @__PURE__ */ defineComponent({ + __name: "VPNavBarMenuLink", + __ssrInlineRender: true, + props: { + item: {}, + }, + setup(__props) { + const { page } = useData(); + return (_ctx, _push, _parent, _attrs) => { + _push( + ssrRenderComponent( + _sfc_main$15, + mergeProps( + { + class: { + VPNavBarMenuLink: true, + active: unref(isActive)( + unref(page).relativePath, + _ctx.item.activeMatch || _ctx.item.link, + !!_ctx.item.activeMatch, + ), + }, + href: _ctx.item.link, + target: _ctx.item.target, + rel: _ctx.item.rel, + tabindex: "0", + }, + _attrs, + ), + { + default: withCtx((_, _push2, _parent2, _scopeId) => { + if (_push2) { + _push2( + `${_ctx.item.text}`, + ); + } else { + return [ + createVNode( + "span", + { + innerHTML: _ctx.item.text, + }, + null, + 8, + ["innerHTML"], + ), + ]; + } + }), + _: 1, + }, + _parent, + ), + ); + }; + }, +}); +const _sfc_setup$y = _sfc_main$y.setup; +_sfc_main$y.setup = (props, ctx) => { + const ssrContext = useSSRContext(); + (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add( + "../node_modules/vitepress/dist/client/theme-default/components/VPNavBarMenuLink.vue", + ); + return _sfc_setup$y ? _sfc_setup$y(props, ctx) : void 0; +}; +const VPNavBarMenuLink = /* @__PURE__ */ _export_sfc(_sfc_main$y, [ + ["__scopeId", "data-v-42ef59de"], +]); +const _sfc_main$x = /* @__PURE__ */ defineComponent({ + __name: "VPNavBarMenuGroup", + __ssrInlineRender: true, + props: { + item: {}, + }, + setup(__props) { + const props = __props; + const { page } = useData(); + const isChildActive = (navItem) => { + if ("link" in navItem) { + return isActive( + page.value.relativePath, + navItem.link, + !!props.item.activeMatch, + ); + } else { + return navItem.items.some(isChildActive); + } + }; + const childrenActive = computed(() => isChildActive(props.item)); + return (_ctx, _push, _parent, _attrs) => { + _push( + ssrRenderComponent( + VPFlyout, + mergeProps( + { + class: { + VPNavBarMenuGroup: true, + active: + unref(isActive)( + unref(page).relativePath, + _ctx.item.activeMatch, + !!_ctx.item.activeMatch, + ) || childrenActive.value, + }, + button: _ctx.item.text, + items: _ctx.item.items, + }, + _attrs, + ), + null, + _parent, + ), + ); + }; + }, +}); +const _sfc_setup$x = _sfc_main$x.setup; +_sfc_main$x.setup = (props, ctx) => { + const ssrContext = useSSRContext(); + (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add( + "../node_modules/vitepress/dist/client/theme-default/components/VPNavBarMenuGroup.vue", + ); + return _sfc_setup$x ? _sfc_setup$x(props, ctx) : void 0; +}; +const _sfc_main$w = /* @__PURE__ */ defineComponent({ + __name: "VPNavBarMenu", + __ssrInlineRender: true, + setup(__props) { + const { theme: theme2 } = useData(); + return (_ctx, _push, _parent, _attrs) => { + if (unref(theme2).nav) { + _push( + `Main Navigation`, + ); + ssrRenderList(unref(theme2).nav, (item) => { + _push(``); + if ("link" in item) { + _push( + ssrRenderComponent(VPNavBarMenuLink, { item }, null, _parent), + ); + } else { + _push(ssrRenderComponent(_sfc_main$x, { item }, null, _parent)); + } + _push(``); + }); + _push(``); + } else { + _push(``); + } + }; + }, +}); +const _sfc_setup$w = _sfc_main$w.setup; +_sfc_main$w.setup = (props, ctx) => { + const ssrContext = useSSRContext(); + (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add( + "../node_modules/vitepress/dist/client/theme-default/components/VPNavBarMenu.vue", + ); + return _sfc_setup$w ? _sfc_setup$w(props, ctx) : void 0; +}; +const VPNavBarMenu = /* @__PURE__ */ _export_sfc(_sfc_main$w, [ + ["__scopeId", "data-v-7f418b0f"], +]); +function createSearchTranslate(defaultTranslations) { + const { localeIndex, theme: theme2 } = useData(); + function translate(key) { + var _a, _b, _c; + const keyPath = key.split("."); + const themeObject = + (_a = theme2.value.search) == null ? void 0 : _a.options; + const isObject = themeObject && typeof themeObject === "object"; + const locales = + (isObject && + ((_c = + (_b = themeObject.locales) == null + ? void 0 + : _b[localeIndex.value]) == null + ? void 0 + : _c.translations)) || + null; + const translations = (isObject && themeObject.translations) || null; + let localeResult = locales; + let translationResult = translations; + let defaultResult = defaultTranslations; + const lastKey = keyPath.pop(); + for (const k of keyPath) { + let fallbackResult = null; + const foundInFallback = defaultResult == null ? void 0 : defaultResult[k]; + if (foundInFallback) { + fallbackResult = defaultResult = foundInFallback; + } + const foundInTranslation = + translationResult == null ? void 0 : translationResult[k]; + if (foundInTranslation) { + fallbackResult = translationResult = foundInTranslation; + } + const foundInLocale = localeResult == null ? void 0 : localeResult[k]; + if (foundInLocale) { + fallbackResult = localeResult = foundInLocale; + } + if (!foundInFallback) { + defaultResult = fallbackResult; + } + if (!foundInTranslation) { + translationResult = fallbackResult; + } + if (!foundInLocale) { + localeResult = fallbackResult; + } + } + return ( + (localeResult == null ? void 0 : localeResult[lastKey]) ?? + (translationResult == null ? void 0 : translationResult[lastKey]) ?? + (defaultResult == null ? void 0 : defaultResult[lastKey]) ?? + "" + ); + } + return translate; +} +const _sfc_main$v = /* @__PURE__ */ defineComponent({ + __name: "VPNavBarSearchButton", + __ssrInlineRender: true, + setup(__props) { + const defaultTranslations = { + button: { + buttonText: "Search", + buttonAriaLabel: "Search", + }, + }; + const $t = createSearchTranslate(defaultTranslations); + return (_ctx, _push, _parent, _attrs) => { + _push( + `${ssrInterpolate( + unref($t)("button.buttonText"), + )}K`, + ); + }; + }, +}); +const _sfc_setup$v = _sfc_main$v.setup; +_sfc_main$v.setup = (props, ctx) => { + const ssrContext = useSSRContext(); + (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add( + "../node_modules/vitepress/dist/client/theme-default/components/VPNavBarSearchButton.vue", + ); + return _sfc_setup$v ? _sfc_setup$v(props, ctx) : void 0; +}; +const _sfc_main$u = /* @__PURE__ */ defineComponent({ + __name: "VPNavBarSearch", + __ssrInlineRender: true, + setup(__props) { + const VPLocalSearchBox = () => null; + const VPAlgoliaSearchBox = () => null; + const { theme: theme2 } = useData(); + const loaded = ref(false); + const actuallyLoaded = ref(false); + onMounted(() => { + { + return; + } + }); + function load() { + if (!loaded.value) { + loaded.value = true; + setTimeout(poll, 16); + } + } + function poll() { + const e = new Event("keydown"); + e.key = "k"; + e.metaKey = true; + window.dispatchEvent(e); + setTimeout(() => { + if (!document.querySelector(".DocSearch-Modal")) { + poll(); + } + }, 16); + } + const showSearch = ref(false); + const provider = ""; + return (_ctx, _push, _parent, _attrs) => { + var _a; + _push( + ``, + ); + if (unref(provider) === "local") { + _push(``); + if (showSearch.value) { + _push( + ssrRenderComponent( + unref(VPLocalSearchBox), + { + onClose: ($event) => (showSearch.value = false), + }, + null, + _parent, + ), + ); + } else { + _push(``); + } + _push(``); + } else if (unref(provider) === "algolia") { + _push(``); + if (loaded.value) { + _push( + ssrRenderComponent( + unref(VPAlgoliaSearchBox), + { + algolia: + ((_a = unref(theme2).search) == null ? void 0 : _a.options) ?? + unref(theme2).algolia, + onVnodeBeforeMount: ($event) => (actuallyLoaded.value = true), + }, + null, + _parent, + ), + ); + } else { + _push(``); + } + if (!actuallyLoaded.value) { + _push(`
    `); + _push( + ssrRenderComponent(_sfc_main$v, { onClick: load }, null, _parent), + ); + _push(`
    `); + } else { + _push(``); + } + _push(``); + } else { + _push(``); + } + _push(``); + }; + }, +}); +const _sfc_setup$u = _sfc_main$u.setup; +_sfc_main$u.setup = (props, ctx) => { + const ssrContext = useSSRContext(); + (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add( + "../node_modules/vitepress/dist/client/theme-default/components/VPNavBarSearch.vue", + ); + return _sfc_setup$u ? _sfc_setup$u(props, ctx) : void 0; +}; +const _sfc_main$t = /* @__PURE__ */ defineComponent({ + __name: "VPNavBarSocialLinks", + __ssrInlineRender: true, + setup(__props) { + const { theme: theme2 } = useData(); + return (_ctx, _push, _parent, _attrs) => { + if (unref(theme2).socialLinks) { + _push( + ssrRenderComponent( + VPSocialLinks, + mergeProps( + { + class: "VPNavBarSocialLinks", + links: unref(theme2).socialLinks, + }, + _attrs, + ), + null, + _parent, + ), + ); + } else { + _push(``); + } + }; + }, +}); +const _sfc_setup$t = _sfc_main$t.setup; +_sfc_main$t.setup = (props, ctx) => { + const ssrContext = useSSRContext(); + (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add( + "../node_modules/vitepress/dist/client/theme-default/components/VPNavBarSocialLinks.vue", + ); + return _sfc_setup$t ? _sfc_setup$t(props, ctx) : void 0; +}; +const VPNavBarSocialLinks = /* @__PURE__ */ _export_sfc(_sfc_main$t, [ + ["__scopeId", "data-v-0394ad82"], +]); +const _sfc_main$s = /* @__PURE__ */ defineComponent({ + __name: "VPNavBarTitle", + __ssrInlineRender: true, + setup(__props) { + const { site, theme: theme2 } = useData(); + const { hasSidebar } = useSidebar(); + const { currentLang } = useLangs(); + const link2 = computed(() => { + var _a; + return typeof theme2.value.logoLink === "string" + ? theme2.value.logoLink + : (_a = theme2.value.logoLink) == null + ? void 0 + : _a.link; + }); + const rel = computed(() => { + var _a; + return typeof theme2.value.logoLink === "string" + ? void 0 + : (_a = theme2.value.logoLink) == null + ? void 0 + : _a.rel; + }); + const target = computed(() => { + var _a; + return typeof theme2.value.logoLink === "string" + ? void 0 + : (_a = theme2.value.logoLink) == null + ? void 0 + : _a.target; + }); + return (_ctx, _push, _parent, _attrs) => { + _push( + ``, + ); + ssrRenderSlot( + _ctx.$slots, + "nav-bar-title-before", + {}, + null, + _push, + _parent, + ); + if (unref(theme2).logo) { + _push( + ssrRenderComponent( + VPImage, + { + class: "logo", + image: unref(theme2).logo, + }, + null, + _parent, + ), + ); + } else { + _push(``); + } + if (unref(theme2).siteTitle) { + _push(`${ssrInterpolate(unref(theme2).siteTitle)}`); + } else if (unref(theme2).siteTitle === void 0) { + _push(`${ssrInterpolate(unref(site).title)}`); + } else { + _push(``); + } + ssrRenderSlot( + _ctx.$slots, + "nav-bar-title-after", + {}, + null, + _push, + _parent, + ); + _push(``); + }; + }, +}); +const _sfc_setup$s = _sfc_main$s.setup; +_sfc_main$s.setup = (props, ctx) => { + const ssrContext = useSSRContext(); + (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add( + "../node_modules/vitepress/dist/client/theme-default/components/VPNavBarTitle.vue", + ); + return _sfc_setup$s ? _sfc_setup$s(props, ctx) : void 0; +}; +const VPNavBarTitle = /* @__PURE__ */ _export_sfc(_sfc_main$s, [ + ["__scopeId", "data-v-8460f0a8"], +]); +const _sfc_main$r = {}; +function _sfc_ssrRender$2(_ctx, _push, _parent, _attrs) { + _push( + ``, + ); +} +const _sfc_setup$r = _sfc_main$r.setup; +_sfc_main$r.setup = (props, ctx) => { + const ssrContext = useSSRContext(); + (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add( + "../node_modules/vitepress/dist/client/theme-default/components/icons/VPIconLanguages.vue", + ); + return _sfc_setup$r ? _sfc_setup$r(props, ctx) : void 0; +}; +const VPIconLanguages = /* @__PURE__ */ _export_sfc(_sfc_main$r, [ + ["ssrRender", _sfc_ssrRender$2], +]); +const _sfc_main$q = /* @__PURE__ */ defineComponent({ + __name: "VPNavBarTranslations", + __ssrInlineRender: true, + setup(__props) { + const { theme: theme2 } = useData(); + const { localeLinks, currentLang } = useLangs({ correspondingLink: true }); + return (_ctx, _push, _parent, _attrs) => { + if (unref(localeLinks).length && unref(currentLang).label) { + _push( + ssrRenderComponent( + VPFlyout, + mergeProps( + { + class: "VPNavBarTranslations", + icon: VPIconLanguages, + label: unref(theme2).langMenuLabel || "Change language", + }, + _attrs, + ), + { + default: withCtx((_, _push2, _parent2, _scopeId) => { + if (_push2) { + _push2( + `

    ${ssrInterpolate( + unref(currentLang).label, + )}

    `, + ); + ssrRenderList(unref(localeLinks), (locale) => { + _push2( + ssrRenderComponent( + VPMenuLink, + { item: locale }, + null, + _parent2, + _scopeId, + ), + ); + }); + _push2(`
    `); + } else { + return [ + createVNode("div", { class: "items" }, [ + createVNode( + "p", + { class: "title" }, + toDisplayString(unref(currentLang).label), + 1, + ), + (openBlock(true), + createBlock( + Fragment, + null, + renderList(unref(localeLinks), (locale) => { + return ( + openBlock(), + createBlock( + VPMenuLink, + { + key: locale.link, + item: locale, + }, + null, + 8, + ["item"], + ) + ); + }), + 128, + )), + ]), + ]; + } + }), + _: 1, + }, + _parent, + ), + ); + } else { + _push(``); + } + }; + }, +}); +const _sfc_setup$q = _sfc_main$q.setup; +_sfc_main$q.setup = (props, ctx) => { + const ssrContext = useSSRContext(); + (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add( + "../node_modules/vitepress/dist/client/theme-default/components/VPNavBarTranslations.vue", + ); + return _sfc_setup$q ? _sfc_setup$q(props, ctx) : void 0; +}; +const VPNavBarTranslations = /* @__PURE__ */ _export_sfc(_sfc_main$q, [ + ["__scopeId", "data-v-74abcbb9"], +]); +const _sfc_main$p = /* @__PURE__ */ defineComponent({ + __name: "VPNavBar", + __ssrInlineRender: true, + props: { + isScreenOpen: { type: Boolean }, + }, + emits: ["toggle-screen"], + setup(__props) { + const { y } = useWindowScroll(); + const { hasSidebar } = useSidebar(); + const { hasLocalNav } = useLocalNav(); + const { frontmatter } = useData(); + const classes = ref({}); + watchPostEffect(() => { + classes.value = { + "has-sidebar": hasSidebar.value, + "has-local-nav": hasLocalNav.value, + top: frontmatter.value.layout === "home" && y.value === 0, + }; + }); + return (_ctx, _push, _parent, _attrs) => { + _push( + `
    `, + ); + _push( + ssrRenderComponent( + VPNavBarTitle, + null, + { + "nav-bar-title-before": withCtx((_, _push2, _parent2, _scopeId) => { + if (_push2) { + ssrRenderSlot( + _ctx.$slots, + "nav-bar-title-before", + {}, + null, + _push2, + _parent2, + _scopeId, + ); + } else { + return [ + renderSlot( + _ctx.$slots, + "nav-bar-title-before", + {}, + void 0, + true, + ), + ]; + } + }), + "nav-bar-title-after": withCtx((_, _push2, _parent2, _scopeId) => { + if (_push2) { + ssrRenderSlot( + _ctx.$slots, + "nav-bar-title-after", + {}, + null, + _push2, + _parent2, + _scopeId, + ); + } else { + return [ + renderSlot( + _ctx.$slots, + "nav-bar-title-after", + {}, + void 0, + true, + ), + ]; + } + }), + _: 3, + }, + _parent, + ), + ); + _push( + `
    `, + ); + ssrRenderSlot( + _ctx.$slots, + "nav-bar-content-before", + {}, + null, + _push, + _parent, + ); + _push( + ssrRenderComponent(_sfc_main$u, { class: "search" }, null, _parent), + ); + _push(ssrRenderComponent(VPNavBarMenu, { class: "menu" }, null, _parent)); + _push( + ssrRenderComponent( + VPNavBarTranslations, + { class: "translations" }, + null, + _parent, + ), + ); + _push( + ssrRenderComponent( + VPNavBarAppearance, + { class: "appearance" }, + null, + _parent, + ), + ); + _push( + ssrRenderComponent( + VPNavBarSocialLinks, + { class: "social-links" }, + null, + _parent, + ), + ); + _push( + ssrRenderComponent(VPNavBarExtra, { class: "extra" }, null, _parent), + ); + ssrRenderSlot( + _ctx.$slots, + "nav-bar-content-after", + {}, + null, + _push, + _parent, + ); + _push( + ssrRenderComponent( + VPNavBarHamburger, + { + class: "hamburger", + active: _ctx.isScreenOpen, + onClick: ($event) => _ctx.$emit("toggle-screen"), + }, + null, + _parent, + ), + ); + _push( + `
    `, + ); + }; + }, +}); +const _sfc_setup$p = _sfc_main$p.setup; +_sfc_main$p.setup = (props, ctx) => { + const ssrContext = useSSRContext(); + (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add( + "../node_modules/vitepress/dist/client/theme-default/components/VPNavBar.vue", + ); + return _sfc_setup$p ? _sfc_setup$p(props, ctx) : void 0; +}; +const VPNavBar = /* @__PURE__ */ _export_sfc(_sfc_main$p, [ + ["__scopeId", "data-v-19c990f1"], +]); +const _sfc_main$o = /* @__PURE__ */ defineComponent({ + __name: "VPNavScreenAppearance", + __ssrInlineRender: true, + setup(__props) { + const { site, theme: theme2 } = useData(); + return (_ctx, _push, _parent, _attrs) => { + if (unref(site).appearance && unref(site).appearance !== "force-dark") { + _push( + `

    ${ssrInterpolate( + unref(theme2).darkModeSwitchLabel || "Appearance", + )}

    `, + ); + _push(ssrRenderComponent(VPSwitchAppearance, null, null, _parent)); + _push(``); + } else { + _push(``); + } + }; + }, +}); +const _sfc_setup$o = _sfc_main$o.setup; +_sfc_main$o.setup = (props, ctx) => { + const ssrContext = useSSRContext(); + (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add( + "../node_modules/vitepress/dist/client/theme-default/components/VPNavScreenAppearance.vue", + ); + return _sfc_setup$o ? _sfc_setup$o(props, ctx) : void 0; +}; +const VPNavScreenAppearance = /* @__PURE__ */ _export_sfc(_sfc_main$o, [ + ["__scopeId", "data-v-2d7af913"], +]); +const _sfc_main$n = /* @__PURE__ */ defineComponent({ + __name: "VPNavScreenMenuLink", + __ssrInlineRender: true, + props: { + item: {}, + }, + setup(__props) { + const closeScreen = inject("close-screen"); + return (_ctx, _push, _parent, _attrs) => { + _push( + ssrRenderComponent( + _sfc_main$15, + mergeProps( + { + class: "VPNavScreenMenuLink", + href: _ctx.item.link, + target: _ctx.item.target, + rel: _ctx.item.rel, + onClick: unref(closeScreen), + }, + _attrs, + ), + { + default: withCtx((_, _push2, _parent2, _scopeId) => { + if (_push2) { + _push2(`${ssrInterpolate(_ctx.item.text)}`); + } else { + return [createTextVNode(toDisplayString(_ctx.item.text), 1)]; + } + }), + _: 1, + }, + _parent, + ), + ); + }; + }, +}); +const _sfc_setup$n = _sfc_main$n.setup; +_sfc_main$n.setup = (props, ctx) => { + const ssrContext = useSSRContext(); + (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add( + "../node_modules/vitepress/dist/client/theme-default/components/VPNavScreenMenuLink.vue", + ); + return _sfc_setup$n ? _sfc_setup$n(props, ctx) : void 0; +}; +const VPNavScreenMenuLink = /* @__PURE__ */ _export_sfc(_sfc_main$n, [ + ["__scopeId", "data-v-05f27b2a"], +]); +const _sfc_main$m = {}; +function _sfc_ssrRender$1(_ctx, _push, _parent, _attrs) { + _push( + ``, + ); +} +const _sfc_setup$m = _sfc_main$m.setup; +_sfc_main$m.setup = (props, ctx) => { + const ssrContext = useSSRContext(); + (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add( + "../node_modules/vitepress/dist/client/theme-default/components/icons/VPIconPlus.vue", + ); + return _sfc_setup$m ? _sfc_setup$m(props, ctx) : void 0; +}; +const VPIconPlus = /* @__PURE__ */ _export_sfc(_sfc_main$m, [ + ["ssrRender", _sfc_ssrRender$1], +]); +const _sfc_main$l = /* @__PURE__ */ defineComponent({ + __name: "VPNavScreenMenuGroupLink", + __ssrInlineRender: true, + props: { + item: {}, + }, + setup(__props) { + const closeScreen = inject("close-screen"); + return (_ctx, _push, _parent, _attrs) => { + _push( + ssrRenderComponent( + _sfc_main$15, + mergeProps( + { + class: "VPNavScreenMenuGroupLink", + href: _ctx.item.link, + target: _ctx.item.target, + rel: _ctx.item.rel, + onClick: unref(closeScreen), + }, + _attrs, + ), + { + default: withCtx((_, _push2, _parent2, _scopeId) => { + if (_push2) { + _push2(`${ssrInterpolate(_ctx.item.text)}`); + } else { + return [createTextVNode(toDisplayString(_ctx.item.text), 1)]; + } + }), + _: 1, + }, + _parent, + ), + ); + }; + }, +}); +const _sfc_setup$l = _sfc_main$l.setup; +_sfc_main$l.setup = (props, ctx) => { + const ssrContext = useSSRContext(); + (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add( + "../node_modules/vitepress/dist/client/theme-default/components/VPNavScreenMenuGroupLink.vue", + ); + return _sfc_setup$l ? _sfc_setup$l(props, ctx) : void 0; +}; +const VPNavScreenMenuGroupLink = /* @__PURE__ */ _export_sfc(_sfc_main$l, [ + ["__scopeId", "data-v-19976ae1"], +]); +const _sfc_main$k = /* @__PURE__ */ defineComponent({ + __name: "VPNavScreenMenuGroupSection", + __ssrInlineRender: true, + props: { + text: {}, + items: {}, + }, + setup(__props) { + return (_ctx, _push, _parent, _attrs) => { + _push( + ``, + ); + if (_ctx.text) { + _push( + `

    ${ssrInterpolate(_ctx.text)}

    `, + ); + } else { + _push(``); + } + _push(``); + ssrRenderList(_ctx.items, (item) => { + _push( + ssrRenderComponent( + VPNavScreenMenuGroupLink, + { + key: item.text, + item, + }, + null, + _parent, + ), + ); + }); + _push(``); + }; + }, +}); +const _sfc_setup$k = _sfc_main$k.setup; +_sfc_main$k.setup = (props, ctx) => { + const ssrContext = useSSRContext(); + (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add( + "../node_modules/vitepress/dist/client/theme-default/components/VPNavScreenMenuGroupSection.vue", + ); + return _sfc_setup$k ? _sfc_setup$k(props, ctx) : void 0; +}; +const VPNavScreenMenuGroupSection = /* @__PURE__ */ _export_sfc(_sfc_main$k, [ + ["__scopeId", "data-v-8133b170"], +]); +const _sfc_main$j = /* @__PURE__ */ defineComponent({ + __name: "VPNavScreenMenuGroup", + __ssrInlineRender: true, + props: { + text: {}, + items: {}, + }, + setup(__props) { + const props = __props; + const isOpen = ref(false); + const groupId = computed( + () => `NavScreenGroup-${props.text.replace(" ", "-").toLowerCase()}`, + ); + return (_ctx, _push, _parent, _attrs) => { + _push( + ``, + ); + ssrRenderList(_ctx.items, (item) => { + _push(``); + if ("link" in item) { + _push(`
    `); + _push( + ssrRenderComponent( + VPNavScreenMenuGroupLink, + { item }, + null, + _parent, + ), + ); + _push(`
    `); + } else { + _push(`
    `); + _push( + ssrRenderComponent( + VPNavScreenMenuGroupSection, + { + text: item.text, + items: item.items, + }, + null, + _parent, + ), + ); + _push(`
    `); + } + _push(``); + }); + _push(``); + }; + }, +}); +const _sfc_setup$j = _sfc_main$j.setup; +_sfc_main$j.setup = (props, ctx) => { + const ssrContext = useSSRContext(); + (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add( + "../node_modules/vitepress/dist/client/theme-default/components/VPNavScreenMenuGroup.vue", + ); + return _sfc_setup$j ? _sfc_setup$j(props, ctx) : void 0; +}; +const VPNavScreenMenuGroup = /* @__PURE__ */ _export_sfc(_sfc_main$j, [ + ["__scopeId", "data-v-65ef89ca"], +]); +const _sfc_main$i = /* @__PURE__ */ defineComponent({ + __name: "VPNavScreenMenu", + __ssrInlineRender: true, + setup(__props) { + const { theme: theme2 } = useData(); + return (_ctx, _push, _parent, _attrs) => { + if (unref(theme2).nav) { + _push( + ``, + ); + ssrRenderList(unref(theme2).nav, (item) => { + _push(``); + if ("link" in item) { + _push( + ssrRenderComponent(VPNavScreenMenuLink, { item }, null, _parent), + ); + } else { + _push( + ssrRenderComponent( + VPNavScreenMenuGroup, + { + text: item.text || "", + items: item.items, + }, + null, + _parent, + ), + ); + } + _push(``); + }); + _push(``); + } else { + _push(``); + } + }; + }, +}); +const _sfc_setup$i = _sfc_main$i.setup; +_sfc_main$i.setup = (props, ctx) => { + const ssrContext = useSSRContext(); + (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add( + "../node_modules/vitepress/dist/client/theme-default/components/VPNavScreenMenu.vue", + ); + return _sfc_setup$i ? _sfc_setup$i(props, ctx) : void 0; +}; +const _sfc_main$h = /* @__PURE__ */ defineComponent({ + __name: "VPNavScreenSocialLinks", + __ssrInlineRender: true, + setup(__props) { + const { theme: theme2 } = useData(); + return (_ctx, _push, _parent, _attrs) => { + if (unref(theme2).socialLinks) { + _push( + ssrRenderComponent( + VPSocialLinks, + mergeProps( + { + class: "VPNavScreenSocialLinks", + links: unref(theme2).socialLinks, + }, + _attrs, + ), + null, + _parent, + ), + ); + } else { + _push(``); + } + }; + }, +}); +const _sfc_setup$h = _sfc_main$h.setup; +_sfc_main$h.setup = (props, ctx) => { + const ssrContext = useSSRContext(); + (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add( + "../node_modules/vitepress/dist/client/theme-default/components/VPNavScreenSocialLinks.vue", + ); + return _sfc_setup$h ? _sfc_setup$h(props, ctx) : void 0; +}; +const _sfc_main$g = /* @__PURE__ */ defineComponent({ + __name: "VPNavScreenTranslations", + __ssrInlineRender: true, + setup(__props) { + const { localeLinks, currentLang } = useLangs({ correspondingLink: true }); + const isOpen = ref(false); + return (_ctx, _push, _parent, _attrs) => { + if (unref(localeLinks).length && unref(currentLang).label) { + _push( + `
      `); + ssrRenderList(unref(localeLinks), (locale) => { + _push(`
    • `); + _push( + ssrRenderComponent( + _sfc_main$15, + { + class: "link", + href: locale.link, + }, + { + default: withCtx((_, _push2, _parent2, _scopeId) => { + if (_push2) { + _push2(`${ssrInterpolate(locale.text)}`); + } else { + return [createTextVNode(toDisplayString(locale.text), 1)]; + } + }), + _: 2, + }, + _parent, + ), + ); + _push(`
    • `); + }); + _push(`
    `); + } else { + _push(``); + } + }; + }, +}); +const _sfc_setup$g = _sfc_main$g.setup; +_sfc_main$g.setup = (props, ctx) => { + const ssrContext = useSSRContext(); + (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add( + "../node_modules/vitepress/dist/client/theme-default/components/VPNavScreenTranslations.vue", + ); + return _sfc_setup$g ? _sfc_setup$g(props, ctx) : void 0; +}; +const VPNavScreenTranslations = /* @__PURE__ */ _export_sfc(_sfc_main$g, [ + ["__scopeId", "data-v-d72aa483"], +]); +const _sfc_main$f = /* @__PURE__ */ defineComponent({ + __name: "VPNavScreen", + __ssrInlineRender: true, + props: { + open: { type: Boolean }, + }, + setup(__props) { + const screen = ref(null); + useScrollLock(inBrowser ? document.body : null); + return (_ctx, _push, _parent, _attrs) => { + if (_ctx.open) { + _push( + `
    `, + ); + ssrRenderSlot( + _ctx.$slots, + "nav-screen-content-before", + {}, + null, + _push, + _parent, + ); + _push( + ssrRenderComponent(_sfc_main$i, { class: "menu" }, null, _parent), + ); + _push( + ssrRenderComponent( + VPNavScreenTranslations, + { class: "translations" }, + null, + _parent, + ), + ); + _push( + ssrRenderComponent( + VPNavScreenAppearance, + { class: "appearance" }, + null, + _parent, + ), + ); + _push( + ssrRenderComponent( + _sfc_main$h, + { class: "social-links" }, + null, + _parent, + ), + ); + ssrRenderSlot( + _ctx.$slots, + "nav-screen-content-after", + {}, + null, + _push, + _parent, + ); + _push(`
    `); + } else { + _push(``); + } + }; + }, +}); +const _sfc_setup$f = _sfc_main$f.setup; +_sfc_main$f.setup = (props, ctx) => { + const ssrContext = useSSRContext(); + (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add( + "../node_modules/vitepress/dist/client/theme-default/components/VPNavScreen.vue", + ); + return _sfc_setup$f ? _sfc_setup$f(props, ctx) : void 0; +}; +const VPNavScreen = /* @__PURE__ */ _export_sfc(_sfc_main$f, [ + ["__scopeId", "data-v-cc5739dd"], +]); +const _sfc_main$e = /* @__PURE__ */ defineComponent({ + __name: "VPNav", + __ssrInlineRender: true, + setup(__props) { + const { isScreenOpen, closeScreen, toggleScreen } = useNav(); + const { frontmatter } = useData(); + const hasNavbar = computed(() => { + return frontmatter.value.navbar !== false; + }); + provide("close-screen", closeScreen); + watchEffect(() => { + if (inBrowser) { + document.documentElement.classList.toggle("hide-nav", !hasNavbar.value); + } + }); + return (_ctx, _push, _parent, _attrs) => { + if (hasNavbar.value) { + _push( + ``, + ); + _push( + ssrRenderComponent( + VPNavBar, + { + "is-screen-open": unref(isScreenOpen), + onToggleScreen: unref(toggleScreen), + }, + { + "nav-bar-title-before": withCtx( + (_, _push2, _parent2, _scopeId) => { + if (_push2) { + ssrRenderSlot( + _ctx.$slots, + "nav-bar-title-before", + {}, + null, + _push2, + _parent2, + _scopeId, + ); + } else { + return [ + renderSlot( + _ctx.$slots, + "nav-bar-title-before", + {}, + void 0, + true, + ), + ]; + } + }, + ), + "nav-bar-title-after": withCtx( + (_, _push2, _parent2, _scopeId) => { + if (_push2) { + ssrRenderSlot( + _ctx.$slots, + "nav-bar-title-after", + {}, + null, + _push2, + _parent2, + _scopeId, + ); + } else { + return [ + renderSlot( + _ctx.$slots, + "nav-bar-title-after", + {}, + void 0, + true, + ), + ]; + } + }, + ), + "nav-bar-content-before": withCtx( + (_, _push2, _parent2, _scopeId) => { + if (_push2) { + ssrRenderSlot( + _ctx.$slots, + "nav-bar-content-before", + {}, + null, + _push2, + _parent2, + _scopeId, + ); + } else { + return [ + renderSlot( + _ctx.$slots, + "nav-bar-content-before", + {}, + void 0, + true, + ), + ]; + } + }, + ), + "nav-bar-content-after": withCtx( + (_, _push2, _parent2, _scopeId) => { + if (_push2) { + ssrRenderSlot( + _ctx.$slots, + "nav-bar-content-after", + {}, + null, + _push2, + _parent2, + _scopeId, + ); + } else { + return [ + renderSlot( + _ctx.$slots, + "nav-bar-content-after", + {}, + void 0, + true, + ), + ]; + } + }, + ), + _: 3, + }, + _parent, + ), + ); + _push( + ssrRenderComponent( + VPNavScreen, + { open: unref(isScreenOpen) }, + { + "nav-screen-content-before": withCtx( + (_, _push2, _parent2, _scopeId) => { + if (_push2) { + ssrRenderSlot( + _ctx.$slots, + "nav-screen-content-before", + {}, + null, + _push2, + _parent2, + _scopeId, + ); + } else { + return [ + renderSlot( + _ctx.$slots, + "nav-screen-content-before", + {}, + void 0, + true, + ), + ]; + } + }, + ), + "nav-screen-content-after": withCtx( + (_, _push2, _parent2, _scopeId) => { + if (_push2) { + ssrRenderSlot( + _ctx.$slots, + "nav-screen-content-after", + {}, + null, + _push2, + _parent2, + _scopeId, + ); + } else { + return [ + renderSlot( + _ctx.$slots, + "nav-screen-content-after", + {}, + void 0, + true, + ), + ]; + } + }, + ), + _: 3, + }, + _parent, + ), + ); + _push(``); + } else { + _push(``); + } + }; + }, +}); +const _sfc_setup$e = _sfc_main$e.setup; +_sfc_main$e.setup = (props, ctx) => { + const ssrContext = useSSRContext(); + (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add( + "../node_modules/vitepress/dist/client/theme-default/components/VPNav.vue", + ); + return _sfc_setup$e ? _sfc_setup$e(props, ctx) : void 0; +}; +const VPNav = /* @__PURE__ */ _export_sfc(_sfc_main$e, [ + ["__scopeId", "data-v-ae24b3ad"], +]); +const _sfc_main$d = /* @__PURE__ */ defineComponent({ + __name: "VPSidebarItem", + __ssrInlineRender: true, + props: { + item: {}, + depth: {}, + }, + setup(__props) { + const props = __props; + const { + collapsed, + collapsible, + isLink, + isActiveLink, + hasActiveLink: hasActiveLink2, + hasChildren, + toggle, + } = useSidebarControl(computed(() => props.item)); + const sectionTag = computed(() => (hasChildren.value ? "section" : `div`)); + const linkTag = computed(() => (isLink.value ? "a" : "div")); + const textTag = computed(() => { + return !hasChildren.value + ? "p" + : props.depth + 2 === 7 + ? "p" + : `h${props.depth + 2}`; + }); + const itemRole = computed(() => (isLink.value ? void 0 : "button")); + const classes = computed(() => [ + [`level-${props.depth}`], + { collapsible: collapsible.value }, + { collapsed: collapsed.value }, + { "is-link": isLink.value }, + { "is-active": isActiveLink.value }, + { "has-active": hasActiveLink2.value }, + ]); + function onItemInteraction(e) { + if ("key" in e && e.key !== "Enter") { + return; + } + !props.item.link && toggle(); + } + function onCaretClick() { + props.item.link && toggle(); + } + return (_ctx, _push, _parent, _attrs) => { + const _component_VPSidebarItem = resolveComponent("VPSidebarItem", true); + ssrRenderVNode( + _push, + createVNode( + resolveDynamicComponent(sectionTag.value), + mergeProps( + { + class: ["VPSidebarItem", classes.value], + }, + _attrs, + ), + { + default: withCtx((_, _push2, _parent2, _scopeId) => { + if (_push2) { + if (_ctx.item.text) { + _push2( + `
    `, + ); + if (_ctx.item.link) { + _push2( + ssrRenderComponent( + _sfc_main$15, + { + tag: linkTag.value, + class: "link", + href: _ctx.item.link, + rel: _ctx.item.rel, + target: _ctx.item.target, + }, + { + default: withCtx( + (_2, _push3, _parent3, _scopeId2) => { + if (_push3) { + ssrRenderVNode( + _push3, + createVNode( + resolveDynamicComponent(textTag.value), + { class: "text" }, + null, + ), + _parent3, + _scopeId2, + ); + } else { + return [ + (openBlock(), + createBlock( + resolveDynamicComponent(textTag.value), + { + class: "text", + innerHTML: _ctx.item.text, + }, + null, + 8, + ["innerHTML"], + )), + ]; + } + }, + ), + _: 1, + }, + _parent2, + _scopeId, + ), + ); + } else { + ssrRenderVNode( + _push2, + createVNode( + resolveDynamicComponent(textTag.value), + { class: "text" }, + null, + ), + _parent2, + _scopeId, + ); + } + if (_ctx.item.collapsed != null) { + _push2( + `
    `, + ); + _push2( + ssrRenderComponent( + VPIconChevronRight, + { class: "caret-icon" }, + null, + _parent2, + _scopeId, + ), + ); + _push2(`
    `); + } else { + _push2(``); + } + _push2(`
    `); + } else { + _push2(``); + } + if (_ctx.item.items && _ctx.item.items.length) { + _push2(`
    `); + if (_ctx.depth < 5) { + _push2(``); + ssrRenderList(_ctx.item.items, (i) => { + _push2( + ssrRenderComponent( + _component_VPSidebarItem, + { + key: i.text, + item: i, + depth: _ctx.depth + 1, + }, + null, + _parent2, + _scopeId, + ), + ); + }); + _push2(``); + } else { + _push2(``); + } + _push2(`
    `); + } else { + _push2(``); + } + } else { + return [ + _ctx.item.text + ? (openBlock(), + createBlock( + "div", + mergeProps( + { + key: 0, + class: "item", + role: itemRole.value, + }, + toHandlers( + _ctx.item.items + ? { + click: onItemInteraction, + keydown: onItemInteraction, + } + : {}, + true, + ), + { + tabindex: _ctx.item.items && 0, + }, + ), + [ + createVNode("div", { class: "indicator" }), + _ctx.item.link + ? (openBlock(), + createBlock( + _sfc_main$15, + { + key: 0, + tag: linkTag.value, + class: "link", + href: _ctx.item.link, + rel: _ctx.item.rel, + target: _ctx.item.target, + }, + { + default: withCtx(() => [ + (openBlock(), + createBlock( + resolveDynamicComponent(textTag.value), + { + class: "text", + innerHTML: _ctx.item.text, + }, + null, + 8, + ["innerHTML"], + )), + ]), + _: 1, + }, + 8, + ["tag", "href", "rel", "target"], + )) + : (openBlock(), + createBlock( + resolveDynamicComponent(textTag.value), + { + key: 1, + class: "text", + innerHTML: _ctx.item.text, + }, + null, + 8, + ["innerHTML"], + )), + _ctx.item.collapsed != null + ? (openBlock(), + createBlock( + "div", + { + key: 2, + class: "caret", + role: "button", + "aria-label": "toggle section", + onClick: onCaretClick, + onKeydown: withKeys(onCaretClick, ["enter"]), + tabindex: "0", + }, + [ + createVNode(VPIconChevronRight, { + class: "caret-icon", + }), + ], + 32, + )) + : createCommentVNode("", true), + ], + 16, + ["role", "tabindex"], + )) + : createCommentVNode("", true), + _ctx.item.items && _ctx.item.items.length + ? (openBlock(), + createBlock( + "div", + { + key: 1, + class: "items", + }, + [ + _ctx.depth < 5 + ? (openBlock(true), + createBlock( + Fragment, + { key: 0 }, + renderList(_ctx.item.items, (i) => { + return ( + openBlock(), + createBlock( + _component_VPSidebarItem, + { + key: i.text, + item: i, + depth: _ctx.depth + 1, + }, + null, + 8, + ["item", "depth"], + ) + ); + }), + 128, + )) + : createCommentVNode("", true), + ], + )) + : createCommentVNode("", true), + ]; + } + }), + _: 1, + }, + ), + _parent, + ); + }; + }, +}); +const _sfc_setup$d = _sfc_main$d.setup; +_sfc_main$d.setup = (props, ctx) => { + const ssrContext = useSSRContext(); + (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add( + "../node_modules/vitepress/dist/client/theme-default/components/VPSidebarItem.vue", + ); + return _sfc_setup$d ? _sfc_setup$d(props, ctx) : void 0; +}; +const VPSidebarItem = /* @__PURE__ */ _export_sfc(_sfc_main$d, [ + ["__scopeId", "data-v-e31bd47b"], +]); +const _sfc_main$c = /* @__PURE__ */ defineComponent({ + __name: "VPSidebar", + __ssrInlineRender: true, + props: { + open: { type: Boolean }, + }, + setup(__props) { + const { sidebarGroups, hasSidebar } = useSidebar(); + const props = __props; + const navEl = ref(null); + const isLocked = useScrollLock(inBrowser ? document.body : null); + watch( + [props, navEl], + () => { + var _a; + if (props.open) { + isLocked.value = true; + (_a = navEl.value) == null ? void 0 : _a.focus(); + } else isLocked.value = false; + }, + { immediate: true, flush: "post" }, + ); + return (_ctx, _push, _parent, _attrs) => { + if (unref(hasSidebar)) { + _push( + `
    `); + } else { + _push(``); + } + }; + }, +}); +const _sfc_setup$c = _sfc_main$c.setup; +_sfc_main$c.setup = (props, ctx) => { + const ssrContext = useSSRContext(); + (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add( + "../node_modules/vitepress/dist/client/theme-default/components/VPSidebar.vue", + ); + return _sfc_setup$c ? _sfc_setup$c(props, ctx) : void 0; +}; +const VPSidebar = /* @__PURE__ */ _export_sfc(_sfc_main$c, [ + ["__scopeId", "data-v-575e6a36"], +]); +const _sfc_main$b = /* @__PURE__ */ defineComponent({ + __name: "VPSkipLink", + __ssrInlineRender: true, + setup(__props) { + const route = useRoute(); + const backToTop = ref(); + watch( + () => route.path, + () => backToTop.value.focus(), + ); + return (_ctx, _push, _parent, _attrs) => { + _push( + ` Skip to content `, + ); + }; + }, +}); +const _sfc_setup$b = _sfc_main$b.setup; +_sfc_main$b.setup = (props, ctx) => { + const ssrContext = useSSRContext(); + (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add( + "../node_modules/vitepress/dist/client/theme-default/components/VPSkipLink.vue", + ); + return _sfc_setup$b ? _sfc_setup$b(props, ctx) : void 0; +}; +const VPSkipLink = /* @__PURE__ */ _export_sfc(_sfc_main$b, [ + ["__scopeId", "data-v-0f60ec36"], +]); +const _sfc_main$a = /* @__PURE__ */ defineComponent({ + __name: "Layout", + __ssrInlineRender: true, + setup(__props) { + const { + isOpen: isSidebarOpen, + open: openSidebar, + close: closeSidebar, + } = useSidebar(); + const route = useRoute(); + watch(() => route.path, closeSidebar); + useCloseSidebarOnEscape(isSidebarOpen, closeSidebar); + const { frontmatter } = useData(); + const slots = useSlots(); + const heroImageSlotExists = computed(() => !!slots["home-hero-image"]); + provide("hero-image-slot-exists", heroImageSlotExists); + return (_ctx, _push, _parent, _attrs) => { + const _component_Content = resolveComponent("Content"); + if (unref(frontmatter).layout !== false) { + _push( + ``, + ); + ssrRenderSlot(_ctx.$slots, "layout-top", {}, null, _push, _parent); + _push(ssrRenderComponent(VPSkipLink, null, null, _parent)); + _push( + ssrRenderComponent( + VPBackdrop, + { + class: "backdrop", + show: unref(isSidebarOpen), + onClick: unref(closeSidebar), + }, + null, + _parent, + ), + ); + _push( + ssrRenderComponent( + VPNav, + null, + { + "nav-bar-title-before": withCtx( + (_, _push2, _parent2, _scopeId) => { + if (_push2) { + ssrRenderSlot( + _ctx.$slots, + "nav-bar-title-before", + {}, + null, + _push2, + _parent2, + _scopeId, + ); + } else { + return [ + renderSlot( + _ctx.$slots, + "nav-bar-title-before", + {}, + void 0, + true, + ), + ]; + } + }, + ), + "nav-bar-title-after": withCtx( + (_, _push2, _parent2, _scopeId) => { + if (_push2) { + ssrRenderSlot( + _ctx.$slots, + "nav-bar-title-after", + {}, + null, + _push2, + _parent2, + _scopeId, + ); + } else { + return [ + renderSlot( + _ctx.$slots, + "nav-bar-title-after", + {}, + void 0, + true, + ), + ]; + } + }, + ), + "nav-bar-content-before": withCtx( + (_, _push2, _parent2, _scopeId) => { + if (_push2) { + ssrRenderSlot( + _ctx.$slots, + "nav-bar-content-before", + {}, + null, + _push2, + _parent2, + _scopeId, + ); + } else { + return [ + renderSlot( + _ctx.$slots, + "nav-bar-content-before", + {}, + void 0, + true, + ), + ]; + } + }, + ), + "nav-bar-content-after": withCtx( + (_, _push2, _parent2, _scopeId) => { + if (_push2) { + ssrRenderSlot( + _ctx.$slots, + "nav-bar-content-after", + {}, + null, + _push2, + _parent2, + _scopeId, + ); + } else { + return [ + renderSlot( + _ctx.$slots, + "nav-bar-content-after", + {}, + void 0, + true, + ), + ]; + } + }, + ), + "nav-screen-content-before": withCtx( + (_, _push2, _parent2, _scopeId) => { + if (_push2) { + ssrRenderSlot( + _ctx.$slots, + "nav-screen-content-before", + {}, + null, + _push2, + _parent2, + _scopeId, + ); + } else { + return [ + renderSlot( + _ctx.$slots, + "nav-screen-content-before", + {}, + void 0, + true, + ), + ]; + } + }, + ), + "nav-screen-content-after": withCtx( + (_, _push2, _parent2, _scopeId) => { + if (_push2) { + ssrRenderSlot( + _ctx.$slots, + "nav-screen-content-after", + {}, + null, + _push2, + _parent2, + _scopeId, + ); + } else { + return [ + renderSlot( + _ctx.$slots, + "nav-screen-content-after", + {}, + void 0, + true, + ), + ]; + } + }, + ), + _: 3, + }, + _parent, + ), + ); + _push( + ssrRenderComponent( + VPLocalNav, + { + open: unref(isSidebarOpen), + onOpenMenu: unref(openSidebar), + }, + null, + _parent, + ), + ); + _push( + ssrRenderComponent( + VPSidebar, + { open: unref(isSidebarOpen) }, + { + "sidebar-nav-before": withCtx((_, _push2, _parent2, _scopeId) => { + if (_push2) { + ssrRenderSlot( + _ctx.$slots, + "sidebar-nav-before", + {}, + null, + _push2, + _parent2, + _scopeId, + ); + } else { + return [ + renderSlot( + _ctx.$slots, + "sidebar-nav-before", + {}, + void 0, + true, + ), + ]; + } + }), + "sidebar-nav-after": withCtx((_, _push2, _parent2, _scopeId) => { + if (_push2) { + ssrRenderSlot( + _ctx.$slots, + "sidebar-nav-after", + {}, + null, + _push2, + _parent2, + _scopeId, + ); + } else { + return [ + renderSlot( + _ctx.$slots, + "sidebar-nav-after", + {}, + void 0, + true, + ), + ]; + } + }), + _: 3, + }, + _parent, + ), + ); + _push( + ssrRenderComponent( + VPContent, + null, + { + "page-top": withCtx((_, _push2, _parent2, _scopeId) => { + if (_push2) { + ssrRenderSlot( + _ctx.$slots, + "page-top", + {}, + null, + _push2, + _parent2, + _scopeId, + ); + } else { + return [ + renderSlot(_ctx.$slots, "page-top", {}, void 0, true), + ]; + } + }), + "page-bottom": withCtx((_, _push2, _parent2, _scopeId) => { + if (_push2) { + ssrRenderSlot( + _ctx.$slots, + "page-bottom", + {}, + null, + _push2, + _parent2, + _scopeId, + ); + } else { + return [ + renderSlot(_ctx.$slots, "page-bottom", {}, void 0, true), + ]; + } + }), + "not-found": withCtx((_, _push2, _parent2, _scopeId) => { + if (_push2) { + ssrRenderSlot( + _ctx.$slots, + "not-found", + {}, + null, + _push2, + _parent2, + _scopeId, + ); + } else { + return [ + renderSlot(_ctx.$slots, "not-found", {}, void 0, true), + ]; + } + }), + "home-hero-before": withCtx((_, _push2, _parent2, _scopeId) => { + if (_push2) { + ssrRenderSlot( + _ctx.$slots, + "home-hero-before", + {}, + null, + _push2, + _parent2, + _scopeId, + ); + } else { + return [ + renderSlot( + _ctx.$slots, + "home-hero-before", + {}, + void 0, + true, + ), + ]; + } + }), + "home-hero-info": withCtx((_, _push2, _parent2, _scopeId) => { + if (_push2) { + ssrRenderSlot( + _ctx.$slots, + "home-hero-info", + {}, + null, + _push2, + _parent2, + _scopeId, + ); + } else { + return [ + renderSlot(_ctx.$slots, "home-hero-info", {}, void 0, true), + ]; + } + }), + "home-hero-image": withCtx((_, _push2, _parent2, _scopeId) => { + if (_push2) { + ssrRenderSlot( + _ctx.$slots, + "home-hero-image", + {}, + null, + _push2, + _parent2, + _scopeId, + ); + } else { + return [ + renderSlot( + _ctx.$slots, + "home-hero-image", + {}, + void 0, + true, + ), + ]; + } + }), + "home-hero-after": withCtx((_, _push2, _parent2, _scopeId) => { + if (_push2) { + ssrRenderSlot( + _ctx.$slots, + "home-hero-after", + {}, + null, + _push2, + _parent2, + _scopeId, + ); + } else { + return [ + renderSlot( + _ctx.$slots, + "home-hero-after", + {}, + void 0, + true, + ), + ]; + } + }), + "home-features-before": withCtx( + (_, _push2, _parent2, _scopeId) => { + if (_push2) { + ssrRenderSlot( + _ctx.$slots, + "home-features-before", + {}, + null, + _push2, + _parent2, + _scopeId, + ); + } else { + return [ + renderSlot( + _ctx.$slots, + "home-features-before", + {}, + void 0, + true, + ), + ]; + } + }, + ), + "home-features-after": withCtx( + (_, _push2, _parent2, _scopeId) => { + if (_push2) { + ssrRenderSlot( + _ctx.$slots, + "home-features-after", + {}, + null, + _push2, + _parent2, + _scopeId, + ); + } else { + return [ + renderSlot( + _ctx.$slots, + "home-features-after", + {}, + void 0, + true, + ), + ]; + } + }, + ), + "doc-footer-before": withCtx((_, _push2, _parent2, _scopeId) => { + if (_push2) { + ssrRenderSlot( + _ctx.$slots, + "doc-footer-before", + {}, + null, + _push2, + _parent2, + _scopeId, + ); + } else { + return [ + renderSlot( + _ctx.$slots, + "doc-footer-before", + {}, + void 0, + true, + ), + ]; + } + }), + "doc-before": withCtx((_, _push2, _parent2, _scopeId) => { + if (_push2) { + ssrRenderSlot( + _ctx.$slots, + "doc-before", + {}, + null, + _push2, + _parent2, + _scopeId, + ); + } else { + return [ + renderSlot(_ctx.$slots, "doc-before", {}, void 0, true), + ]; + } + }), + "doc-after": withCtx((_, _push2, _parent2, _scopeId) => { + if (_push2) { + ssrRenderSlot( + _ctx.$slots, + "doc-after", + {}, + null, + _push2, + _parent2, + _scopeId, + ); + } else { + return [ + renderSlot(_ctx.$slots, "doc-after", {}, void 0, true), + ]; + } + }), + "doc-top": withCtx((_, _push2, _parent2, _scopeId) => { + if (_push2) { + ssrRenderSlot( + _ctx.$slots, + "doc-top", + {}, + null, + _push2, + _parent2, + _scopeId, + ); + } else { + return [renderSlot(_ctx.$slots, "doc-top", {}, void 0, true)]; + } + }), + "doc-bottom": withCtx((_, _push2, _parent2, _scopeId) => { + if (_push2) { + ssrRenderSlot( + _ctx.$slots, + "doc-bottom", + {}, + null, + _push2, + _parent2, + _scopeId, + ); + } else { + return [ + renderSlot(_ctx.$slots, "doc-bottom", {}, void 0, true), + ]; + } + }), + "aside-top": withCtx((_, _push2, _parent2, _scopeId) => { + if (_push2) { + ssrRenderSlot( + _ctx.$slots, + "aside-top", + {}, + null, + _push2, + _parent2, + _scopeId, + ); + } else { + return [ + renderSlot(_ctx.$slots, "aside-top", {}, void 0, true), + ]; + } + }), + "aside-bottom": withCtx((_, _push2, _parent2, _scopeId) => { + if (_push2) { + ssrRenderSlot( + _ctx.$slots, + "aside-bottom", + {}, + null, + _push2, + _parent2, + _scopeId, + ); + } else { + return [ + renderSlot(_ctx.$slots, "aside-bottom", {}, void 0, true), + ]; + } + }), + "aside-outline-before": withCtx( + (_, _push2, _parent2, _scopeId) => { + if (_push2) { + ssrRenderSlot( + _ctx.$slots, + "aside-outline-before", + {}, + null, + _push2, + _parent2, + _scopeId, + ); + } else { + return [ + renderSlot( + _ctx.$slots, + "aside-outline-before", + {}, + void 0, + true, + ), + ]; + } + }, + ), + "aside-outline-after": withCtx( + (_, _push2, _parent2, _scopeId) => { + if (_push2) { + ssrRenderSlot( + _ctx.$slots, + "aside-outline-after", + {}, + null, + _push2, + _parent2, + _scopeId, + ); + } else { + return [ + renderSlot( + _ctx.$slots, + "aside-outline-after", + {}, + void 0, + true, + ), + ]; + } + }, + ), + "aside-ads-before": withCtx((_, _push2, _parent2, _scopeId) => { + if (_push2) { + ssrRenderSlot( + _ctx.$slots, + "aside-ads-before", + {}, + null, + _push2, + _parent2, + _scopeId, + ); + } else { + return [ + renderSlot( + _ctx.$slots, + "aside-ads-before", + {}, + void 0, + true, + ), + ]; + } + }), + "aside-ads-after": withCtx((_, _push2, _parent2, _scopeId) => { + if (_push2) { + ssrRenderSlot( + _ctx.$slots, + "aside-ads-after", + {}, + null, + _push2, + _parent2, + _scopeId, + ); + } else { + return [ + renderSlot( + _ctx.$slots, + "aside-ads-after", + {}, + void 0, + true, + ), + ]; + } + }), + _: 3, + }, + _parent, + ), + ); + _push(ssrRenderComponent(VPFooter, null, null, _parent)); + ssrRenderSlot(_ctx.$slots, "layout-bottom", {}, null, _push, _parent); + _push(``); + } else { + _push(ssrRenderComponent(_component_Content, _attrs, null, _parent)); + } + }; + }, +}); +const _sfc_setup$a = _sfc_main$a.setup; +_sfc_main$a.setup = (props, ctx) => { + const ssrContext = useSSRContext(); + (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add( + "../node_modules/vitepress/dist/client/theme-default/Layout.vue", + ); + return _sfc_setup$a ? _sfc_setup$a(props, ctx) : void 0; +}; +const Layout = /* @__PURE__ */ _export_sfc(_sfc_main$a, [ + ["__scopeId", "data-v-5a346dfe"], +]); +const _sfc_main$9 = {}; +function _sfc_ssrRender(_ctx, _push, _parent, _attrs) { + _push( + ``, + ); +} +const _sfc_setup$9 = _sfc_main$9.setup; +_sfc_main$9.setup = (props, ctx) => { + const ssrContext = useSSRContext(); + (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add( + "../node_modules/vitepress/dist/client/theme-default/components/icons/VPIconHeart.vue", + ); + return _sfc_setup$9 ? _sfc_setup$9(props, ctx) : void 0; +}; +const VPIconHeart = /* @__PURE__ */ _export_sfc(_sfc_main$9, [ + ["ssrRender", _sfc_ssrRender], +]); +const GridSettings = { + xmini: [[0, 2]], + mini: [], + small: [ + [920, 6], + [768, 5], + [640, 4], + [480, 3], + [0, 2], + ], + medium: [ + [960, 5], + [832, 4], + [640, 3], + [480, 2], + ], + big: [ + [832, 3], + [640, 2], + ], +}; +function useSponsorsGrid({ el, size = "medium" }) { + const onResize = throttleAndDebounce(manage, 100); + onMounted(() => { + manage(); + window.addEventListener("resize", onResize); + }); + onUnmounted(() => { + window.removeEventListener("resize", onResize); + }); + function manage() { + adjustSlots(el.value, size); + } +} +function adjustSlots(el, size) { + const tsize = el.children.length; + const asize = el.querySelectorAll(".vp-sponsor-grid-item:not(.empty)").length; + const grid = setGrid(el, size, asize); + manageSlots(el, grid, tsize, asize); +} +function setGrid(el, size, items) { + const settings = GridSettings[size]; + const screen = window.innerWidth; + let grid = 1; + settings.some(([breakpoint, value]) => { + if (screen >= breakpoint) { + grid = items < value ? items : value; + return true; + } + }); + setGridData(el, grid); + return grid; +} +function setGridData(el, value) { + el.dataset.vpGrid = String(value); +} +function manageSlots(el, grid, tsize, asize) { + const diff = tsize - asize; + const rem = asize % grid; + const drem = rem === 0 ? rem : grid - rem; + neutralizeSlots(el, drem - diff); +} +function neutralizeSlots(el, count) { + if (count === 0) { + return; + } + count > 0 ? addSlots(el, count) : removeSlots(el, count * -1); +} +function addSlots(el, count) { + for (let i = 0; i < count; i++) { + const slot = document.createElement("div"); + slot.classList.add("vp-sponsor-grid-item", "empty"); + el.append(slot); + } +} +function removeSlots(el, count) { + for (let i = 0; i < count; i++) { + el.removeChild(el.lastElementChild); + } +} +const _sfc_main$8 = /* @__PURE__ */ defineComponent({ + __name: "VPSponsorsGrid", + __ssrInlineRender: true, + props: { + size: { default: "medium" }, + data: {}, + }, + setup(__props) { + const props = __props; + const el = ref(null); + useSponsorsGrid({ el, size: props.size }); + return (_ctx, _push, _parent, _attrs) => { + _push( + ``, + ); + ssrRenderList(_ctx.data, (sponsor) => { + _push( + ``, + ); + }); + _push(``); + }; + }, +}); +const _sfc_setup$8 = _sfc_main$8.setup; +_sfc_main$8.setup = (props, ctx) => { + const ssrContext = useSSRContext(); + (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add( + "../node_modules/vitepress/dist/client/theme-default/components/VPSponsorsGrid.vue", + ); + return _sfc_setup$8 ? _sfc_setup$8(props, ctx) : void 0; +}; +const _sfc_main$7 = /* @__PURE__ */ defineComponent({ + __name: "VPSponsors", + __ssrInlineRender: true, + props: { + mode: { default: "normal" }, + tier: {}, + size: {}, + data: {}, + }, + setup(__props) { + const props = __props; + const sponsors = computed(() => { + const isSponsors = props.data.some((s) => { + return "items" in s; + }); + if (isSponsors) { + return props.data; + } + return [{ tier: props.tier, size: props.size, items: props.data }]; + }); + return (_ctx, _push, _parent, _attrs) => { + _push( + ``, + ); + ssrRenderList(sponsors.value, (sponsor, index) => { + _push(`
    `); + if (sponsor.tier) { + _push( + `

    ${ssrInterpolate(sponsor.tier)}

    `, + ); + } else { + _push(``); + } + _push( + ssrRenderComponent( + _sfc_main$8, + { + size: sponsor.size, + data: sponsor.items, + }, + null, + _parent, + ), + ); + _push(`
    `); + }); + _push(``); + }; + }, +}); +const _sfc_setup$7 = _sfc_main$7.setup; +_sfc_main$7.setup = (props, ctx) => { + const ssrContext = useSSRContext(); + (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add( + "../node_modules/vitepress/dist/client/theme-default/components/VPSponsors.vue", + ); + return _sfc_setup$7 ? _sfc_setup$7(props, ctx) : void 0; +}; +const _sfc_main$6 = /* @__PURE__ */ defineComponent({ + __name: "VPHomeSponsors", + __ssrInlineRender: true, + props: { + message: {}, + actionText: { default: "Become a sponsor" }, + actionLink: {}, + data: {}, + }, + setup(__props) { + return (_ctx, _push, _parent, _attrs) => { + _push( + `
    `, + ); + _push(ssrRenderComponent(VPIconHeart, { class: "icon" }, null, _parent)); + _push(`
    `); + if (_ctx.message) { + _push( + `

    ${ssrInterpolate( + _ctx.message, + )}

    `, + ); + } else { + _push(``); + } + _push(`
    `); + _push( + ssrRenderComponent(_sfc_main$7, { data: _ctx.data }, null, _parent), + ); + _push(`
    `); + if (_ctx.actionLink) { + _push(`
    `); + _push( + ssrRenderComponent( + VPButton, + { + theme: "sponsor", + text: _ctx.actionText, + href: _ctx.actionLink, + }, + null, + _parent, + ), + ); + _push(`
    `); + } else { + _push(``); + } + _push(`
    `); + }; + }, +}); +const _sfc_setup$6 = _sfc_main$6.setup; +_sfc_main$6.setup = (props, ctx) => { + const ssrContext = useSSRContext(); + (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add( + "../node_modules/vitepress/dist/client/theme-default/components/VPHomeSponsors.vue", + ); + return _sfc_setup$6 ? _sfc_setup$6(props, ctx) : void 0; +}; +const _sfc_main$5 = /* @__PURE__ */ defineComponent({ + __name: "VPDocAsideSponsors", + __ssrInlineRender: true, + props: { + tier: {}, + size: {}, + data: {}, + }, + setup(__props) { + return (_ctx, _push, _parent, _attrs) => { + _push( + ``, + ); + _push( + ssrRenderComponent( + _sfc_main$7, + { + mode: "aside", + tier: _ctx.tier, + size: _ctx.size, + data: _ctx.data, + }, + null, + _parent, + ), + ); + _push(``); + }; + }, +}); +const _sfc_setup$5 = _sfc_main$5.setup; +_sfc_main$5.setup = (props, ctx) => { + const ssrContext = useSSRContext(); + (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add( + "../node_modules/vitepress/dist/client/theme-default/components/VPDocAsideSponsors.vue", + ); + return _sfc_setup$5 ? _sfc_setup$5(props, ctx) : void 0; +}; +const _sfc_main$4 = {}; +const _sfc_setup$4 = _sfc_main$4.setup; +_sfc_main$4.setup = (props, ctx) => { + const ssrContext = useSSRContext(); + (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add( + "../node_modules/vitepress/dist/client/theme-default/components/VPTeamPage.vue", + ); + return _sfc_setup$4 ? _sfc_setup$4(props, ctx) : void 0; +}; +const _sfc_main$3 = {}; +const _sfc_setup$3 = _sfc_main$3.setup; +_sfc_main$3.setup = (props, ctx) => { + const ssrContext = useSSRContext(); + (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add( + "../node_modules/vitepress/dist/client/theme-default/components/VPTeamPageTitle.vue", + ); + return _sfc_setup$3 ? _sfc_setup$3(props, ctx) : void 0; +}; +const _sfc_main$2 = {}; +const _sfc_setup$2 = _sfc_main$2.setup; +_sfc_main$2.setup = (props, ctx) => { + const ssrContext = useSSRContext(); + (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add( + "../node_modules/vitepress/dist/client/theme-default/components/VPTeamPageSection.vue", + ); + return _sfc_setup$2 ? _sfc_setup$2(props, ctx) : void 0; +}; +const _sfc_main$1 = /* @__PURE__ */ defineComponent({ + __name: "VPTeamMembersItem", + __ssrInlineRender: true, + props: { + size: { default: "medium" }, + member: {}, + }, + setup(__props) { + return (_ctx, _push, _parent, _attrs) => { + _push( + `

    ${ssrInterpolate( + _ctx.member.name, + )}

    `, + ); + if (_ctx.member.title || _ctx.member.org) { + _push(`

    `); + if (_ctx.member.title) { + _push( + `${ssrInterpolate( + _ctx.member.title, + )}`, + ); + } else { + _push(``); + } + if (_ctx.member.title && _ctx.member.org) { + _push(` @ `); + } else { + _push(``); + } + if (_ctx.member.org) { + _push( + ssrRenderComponent( + _sfc_main$15, + { + class: ["org", { link: _ctx.member.orgLink }], + href: _ctx.member.orgLink, + "no-icon": "", + }, + { + default: withCtx((_, _push2, _parent2, _scopeId) => { + if (_push2) { + _push2(`${ssrInterpolate(_ctx.member.org)}`); + } else { + return [ + createTextVNode(toDisplayString(_ctx.member.org), 1), + ]; + } + }), + _: 1, + }, + _parent, + ), + ); + } else { + _push(``); + } + _push(`

    `); + } else { + _push(``); + } + if (_ctx.member.desc) { + _push(`

    ${_ctx.member.desc}

    `); + } else { + _push(``); + } + if (_ctx.member.links) { + _push(``); + } else { + _push(``); + } + _push(`
    `); + if (_ctx.member.sponsor) { + _push(`
    `); + _push( + ssrRenderComponent( + _sfc_main$15, + { + class: "sp-link", + href: _ctx.member.sponsor, + "no-icon": "", + }, + { + default: withCtx((_, _push2, _parent2, _scopeId) => { + if (_push2) { + _push2( + ssrRenderComponent( + VPIconHeart, + { class: "sp-icon" }, + null, + _parent2, + _scopeId, + ), + ); + _push2( + ` ${ssrInterpolate(_ctx.member.actionText || "Sponsor")}`, + ); + } else { + return [ + createVNode(VPIconHeart, { class: "sp-icon" }), + createTextVNode( + " " + + toDisplayString(_ctx.member.actionText || "Sponsor"), + 1, + ), + ]; + } + }), + _: 1, + }, + _parent, + ), + ); + _push(`
    `); + } else { + _push(``); + } + _push(``); + }; + }, +}); +const _sfc_setup$1 = _sfc_main$1.setup; +_sfc_main$1.setup = (props, ctx) => { + const ssrContext = useSSRContext(); + (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add( + "../node_modules/vitepress/dist/client/theme-default/components/VPTeamMembersItem.vue", + ); + return _sfc_setup$1 ? _sfc_setup$1(props, ctx) : void 0; +}; +const VPTeamMembersItem = /* @__PURE__ */ _export_sfc(_sfc_main$1, [ + ["__scopeId", "data-v-0d3d0d4d"], +]); +const _sfc_main = /* @__PURE__ */ defineComponent({ + __name: "VPTeamMembers", + __ssrInlineRender: true, + props: { + size: { default: "medium" }, + members: {}, + }, + setup(__props) { + const props = __props; + const classes = computed(() => [ + props.size, + `count-${props.members.length}`, + ]); + return (_ctx, _push, _parent, _attrs) => { + _push( + `
    `, + ); + ssrRenderList(_ctx.members, (member) => { + _push(`
    `); + _push( + ssrRenderComponent( + VPTeamMembersItem, + { + size: _ctx.size, + member, + }, + null, + _parent, + ), + ); + _push(`
    `); + }); + _push(`
    `); + }; + }, +}); +const _sfc_setup = _sfc_main.setup; +_sfc_main.setup = (props, ctx) => { + const ssrContext = useSSRContext(); + (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add( + "../node_modules/vitepress/dist/client/theme-default/components/VPTeamMembers.vue", + ); + return _sfc_setup ? _sfc_setup(props, ctx) : void 0; +}; +const theme = { + Layout, + enhanceApp: ({ app }) => { + app.component("Badge", _sfc_main$1d); + }, +}; +const RawTheme = { + extends: theme, + Layout: () => { + return h(theme.Layout, null, { + // https://vitepress.dev/guide/extending-default-theme#layout-slots + }); + }, + enhanceApp({ app, router, siteData: siteData2 }) {}, +}; +const ClientOnly = defineComponent({ + setup(_, { slots }) { + const show = ref(false); + onMounted(() => { + show.value = true; + }); + return () => (show.value && slots.default ? slots.default() : null); + }, +}); +function useCodeGroups() { + if (inBrowser) { + window.addEventListener("click", (e) => { + var _a; + const el = e.target; + if (el.matches(".vp-code-group input")) { + const group = + (_a = el.parentElement) == null ? void 0 : _a.parentElement; + if (!group) return; + const i = Array.from(group.querySelectorAll("input")).indexOf(el); + if (i < 0) return; + const blocks = group.querySelector(".blocks"); + if (!blocks) return; + const current = Array.from(blocks.children).find((child) => + child.classList.contains("active"), + ); + if (!current) return; + const next = blocks.children[i]; + if (!next || current === next) return; + current.classList.remove("active"); + next.classList.add("active"); + const label = + group == null ? void 0 : group.querySelector(`label[for="${el.id}"]`); + label == null ? void 0 : label.scrollIntoView({ block: "nearest" }); + } + }); + } +} +function useCopyCode() { + if (inBrowser) { + const timeoutIdMap = /* @__PURE__ */ new WeakMap(); + window.addEventListener("click", (e) => { + var _a; + const el = e.target; + if (el.matches('div[class*="language-"] > button.copy')) { + const parent = el.parentElement; + const sibling = + (_a = el.nextElementSibling) == null ? void 0 : _a.nextElementSibling; + if (!parent || !sibling) { + return; + } + const isShell = /language-(shellscript|shell|bash|sh|zsh)/.test( + parent.className, + ); + const ignoredNodes = [".vp-copy-ignore", ".diff.remove"]; + const clone = sibling.cloneNode(true); + clone + .querySelectorAll(ignoredNodes.join(",")) + .forEach((node) => node.remove()); + let text = clone.textContent || ""; + if (isShell) { + text = text.replace(/^ *(\$|>) /gm, "").trim(); + } + copyToClipboard(text).then(() => { + el.classList.add("copied"); + clearTimeout(timeoutIdMap.get(el)); + const timeoutId = setTimeout(() => { + el.classList.remove("copied"); + el.blur(); + timeoutIdMap.delete(el); + }, 2e3); + timeoutIdMap.set(el, timeoutId); + }); + } + }); + } +} +async function copyToClipboard(text) { + try { + return navigator.clipboard.writeText(text); + } catch { + const element = document.createElement("textarea"); + const previouslyFocusedElement = document.activeElement; + element.value = text; + element.setAttribute("readonly", ""); + element.style.contain = "strict"; + element.style.position = "absolute"; + element.style.left = "-9999px"; + element.style.fontSize = "12pt"; + const selection = document.getSelection(); + const originalRange = selection + ? selection.rangeCount > 0 && selection.getRangeAt(0) + : null; + document.body.appendChild(element); + element.select(); + element.selectionStart = 0; + element.selectionEnd = text.length; + document.execCommand("copy"); + document.body.removeChild(element); + if (originalRange) { + selection.removeAllRanges(); + selection.addRange(originalRange); + } + if (previouslyFocusedElement) { + previouslyFocusedElement.focus(); + } + } +} +function useUpdateHead(route, siteDataByRouteRef) { + let managedHeadElements = []; + let isFirstUpdate = true; + const updateHeadTags = (newTags) => { + if (isFirstUpdate) { + isFirstUpdate = false; + return; + } + const newElements = newTags.map(createHeadElement); + managedHeadElements.forEach((oldEl, oldIndex) => { + const matchedIndex = newElements.findIndex((newEl) => + newEl == null ? void 0 : newEl.isEqualNode(oldEl ?? null), + ); + if (matchedIndex !== -1) { + delete newElements[matchedIndex]; + } else { + oldEl == null ? void 0 : oldEl.remove(); + delete managedHeadElements[oldIndex]; + } + }); + newElements.forEach((el) => el && document.head.appendChild(el)); + managedHeadElements = [...managedHeadElements, ...newElements].filter( + Boolean, + ); + }; + watchEffect(() => { + const pageData = route.data; + const siteData2 = siteDataByRouteRef.value; + const pageDescription = pageData && pageData.description; + const frontmatterHead = (pageData && pageData.frontmatter.head) || []; + const title = createTitle(siteData2, pageData); + if (title !== document.title) { + document.title = title; + } + const description = pageDescription || siteData2.description; + let metaDescriptionElement = document.querySelector( + `meta[name=description]`, + ); + if (metaDescriptionElement) { + if (metaDescriptionElement.getAttribute("content") !== description) { + metaDescriptionElement.setAttribute("content", description); + } + } else { + createHeadElement([ + "meta", + { name: "description", content: description }, + ]); + } + updateHeadTags( + mergeHead(siteData2.head, filterOutHeadDescription(frontmatterHead)), + ); + }); +} +function createHeadElement([tag, attrs, innerHTML]) { + const el = document.createElement(tag); + for (const key in attrs) { + el.setAttribute(key, attrs[key]); + } + if (innerHTML) { + el.innerHTML = innerHTML; + } + if (tag === "script" && !attrs.async) { + el.async = false; + } + return el; +} +function isMetaDescription(headConfig) { + return ( + headConfig[0] === "meta" && + headConfig[1] && + headConfig[1].name === "description" + ); +} +function filterOutHeadDescription(head) { + return head.filter((h2) => !isMetaDescription(h2)); +} +const hasFetched = /* @__PURE__ */ new Set(); +const createLink = () => document.createElement("link"); +const viaDOM = (url) => { + const link2 = createLink(); + link2.rel = `prefetch`; + link2.href = url; + document.head.appendChild(link2); +}; +const viaXHR = (url) => { + const req = new XMLHttpRequest(); + req.open("GET", url, (req.withCredentials = true)); + req.send(); +}; +let link; +const doFetch = + inBrowser && + (link = createLink()) && + link.relList && + link.relList.supports && + link.relList.supports("prefetch") + ? viaDOM + : viaXHR; +function usePrefetch() { + if (!inBrowser) { + return; + } + if (!window.IntersectionObserver) { + return; + } + let conn; + if ( + (conn = navigator.connection) && + (conn.saveData || /2g/.test(conn.effectiveType)) + ) { + return; + } + const rIC = window.requestIdleCallback || setTimeout; + let observer = null; + const observeLinks = () => { + if (observer) { + observer.disconnect(); + } + observer = new IntersectionObserver((entries) => { + entries.forEach((entry) => { + if (entry.isIntersecting) { + const link2 = entry.target; + observer.unobserve(link2); + const { pathname } = link2; + if (!hasFetched.has(pathname)) { + hasFetched.add(pathname); + const pageChunkPath = pathToFile(pathname); + if (pageChunkPath) doFetch(pageChunkPath); + } + } + }); + }); + rIC(() => { + document.querySelectorAll("#app a").forEach((link2) => { + const { hostname, pathname } = new URL( + link2.href instanceof SVGAnimatedString + ? link2.href.animVal + : link2.href, + link2.baseURI, + ); + const extMatch = pathname.match(/\.\w+$/); + if (extMatch && extMatch[0] !== ".html") { + return; + } + if ( + // only prefetch same tab navigation, since a new tab will load + // the lean js chunk instead. + link2.target !== "_blank" && // only prefetch inbound links + hostname === location.hostname + ) { + if (pathname !== location.pathname) { + observer.observe(link2); + } else { + hasFetched.add(pathname); + } + } + }); + }); + }; + onMounted(observeLinks); + const route = useRoute(); + watch(() => route.path, observeLinks); + onUnmounted(() => { + observer && observer.disconnect(); + }); +} +function resolveThemeExtends(theme2) { + if (theme2.extends) { + const base = resolveThemeExtends(theme2.extends); + return { + ...base, + ...theme2, + async enhanceApp(ctx) { + if (base.enhanceApp) await base.enhanceApp(ctx); + if (theme2.enhanceApp) await theme2.enhanceApp(ctx); + }, + }; + } + return theme2; +} +const Theme = resolveThemeExtends(RawTheme); +const VitePressApp = defineComponent({ + name: "VitePressApp", + setup() { + const { site, lang, dir } = useData$1(); + onMounted(() => { + watchEffect(() => { + document.documentElement.lang = lang.value; + document.documentElement.dir = dir.value; + }); + }); + if (site.value.router.prefetchLinks) { + usePrefetch(); + } + useCopyCode(); + useCodeGroups(); + if (Theme.setup) Theme.setup(); + return () => h(Theme.Layout); + }, +}); +async function createApp() { + const router = newRouter(); + const app = newApp(); + app.provide(RouterSymbol, router); + const data = initData(router.route); + app.provide(dataSymbol, data); + app.component("Content", Content); + app.component("ClientOnly", ClientOnly); + Object.defineProperties(app.config.globalProperties, { + $frontmatter: { + get() { + return data.frontmatter.value; + }, + }, + $params: { + get() { + return data.page.value.params; + }, + }, + }); + if (Theme.enhanceApp) { + await Theme.enhanceApp({ + app, + router, + siteData: siteDataRef, + }); + } + return { app, router, data }; +} +function newApp() { + return createSSRApp(VitePressApp); +} +function newRouter() { + let isInitialPageLoad = inBrowser; + let initialPath; + return createRouter((path) => { + let pageFilePath = pathToFile(path); + let pageModule = null; + if (pageFilePath) { + if (isInitialPageLoad) { + initialPath = pageFilePath; + } + if (isInitialPageLoad || initialPath === pageFilePath) { + pageFilePath = pageFilePath.replace(/\.js$/, ".lean.js"); + } + if (true) { + pageModule = import( + /*@vite-ignore*/ + pageFilePath + "?t=" + Date.now() + ); + } + } + if (inBrowser) { + isInitialPageLoad = false; + } + return pageModule; + }, Theme.NotFound); +} +if (inBrowser) { + createApp().then(({ app, router, data }) => { + router.go().then(() => { + useUpdateHead(router.route, data.site); + app.mount("#app"); + }); + }); +} +async function render(path) { + const { app, router } = await createApp(); + await router.go(path); + const ctx = { content: "" }; + ctx.content = await renderToString(app, ctx); + return ctx; +} +export { render }; diff --git a/src/.vitepress/.temp/assets/style.V__jefr4.css b/src/.vitepress/.temp/assets/style.V__jefr4.css new file mode 100644 index 00000000..e407338d --- /dev/null +++ b/src/.vitepress/.temp/assets/style.V__jefr4.css @@ -0,0 +1,4521 @@ +/** + * Colors: Solid + * -------------------------------------------------------------------------- */ + +:root { + --vp-c-white: #ffffff; + --vp-c-black: #000000; + + --vp-c-neutral: var(--vp-c-black); + --vp-c-neutral-inverse: var(--vp-c-white); +} + +.dark { + --vp-c-neutral: var(--vp-c-white); + --vp-c-neutral-inverse: var(--vp-c-black); +} + +/** + * Colors: Palette + * + * The primitive colors used for accent colors. These colors are referenced + * by functional colors such as "Text", "Background", or "Brand". + * + * Each colors have exact same color scale system with 3 levels of solid + * colors with different brightness, and 1 soft color. + * + * - `XXX-1`: The most solid color used mainly for colored text. It must + * satisfy the contrast ratio against when used on top of `XXX-soft`. + * + * - `XXX-2`: The color used mainly for hover state of the button. + * + * - `XXX-3`: The color for solid background, such as bg color of the button. + * It must satisfy the contrast ratio with pure white (#ffffff) text on + * top of it. + * + * - `XXX-soft`: The color used for subtle background such as custom container + * or badges. It must satisfy the contrast ratio when putting `XXX-1` colors + * on top of it. + * + * The soft color must be semi transparent alpha channel. This is crucial + * because it allows adding multiple "soft" colors on top of each other + * to create a accent, such as when having inline code block inside + * custom containers. + * -------------------------------------------------------------------------- */ + +:root { + --vp-c-gray-1: #dddde3; + --vp-c-gray-2: #e4e4e9; + --vp-c-gray-3: #ebebef; + --vp-c-gray-soft: rgba(142, 150, 170, 0.14); + + --vp-c-indigo-1: #3451b2; + --vp-c-indigo-2: #3a5ccc; + --vp-c-indigo-3: #5672cd; + --vp-c-indigo-soft: rgba(100, 108, 255, 0.14); + + --vp-c-green-1: #18794e; + --vp-c-green-2: #299764; + --vp-c-green-3: #30a46c; + --vp-c-green-soft: rgba(16, 185, 129, 0.14); + + --vp-c-yellow-1: #915930; + --vp-c-yellow-2: #946300; + --vp-c-yellow-3: #9f6a00; + --vp-c-yellow-soft: rgba(234, 179, 8, 0.14); + + --vp-c-red-1: #b8272c; + --vp-c-red-2: #d5393e; + --vp-c-red-3: #e0575b; + --vp-c-red-soft: rgba(244, 63, 94, 0.14); + + --vp-c-sponsor: #db2777; +} + +.dark { + --vp-c-gray-1: #515c67; + --vp-c-gray-2: #414853; + --vp-c-gray-3: #32363f; + --vp-c-gray-soft: rgba(101, 117, 133, 0.16); + + --vp-c-indigo-1: #a8b1ff; + --vp-c-indigo-2: #5c73e7; + --vp-c-indigo-3: #3e63dd; + --vp-c-indigo-soft: rgba(100, 108, 255, 0.16); + + --vp-c-green-1: #3dd68c; + --vp-c-green-2: #30a46c; + --vp-c-green-3: #298459; + --vp-c-green-soft: rgba(16, 185, 129, 0.16); + + --vp-c-yellow-1: #f9b44e; + --vp-c-yellow-2: #da8b17; + --vp-c-yellow-3: #a46a0a; + --vp-c-yellow-soft: rgba(234, 179, 8, 0.16); + + --vp-c-red-1: #f66f81; + --vp-c-red-2: #f14158; + --vp-c-red-3: #b62a3c; + --vp-c-red-soft: rgba(244, 63, 94, 0.16); +} + +/** + * Colors: Background + * + * - `bg`: The bg color used for main screen. + * + * - `bg-alt`: The alternative bg color used in places such as "sidebar", + * or "code block". + * + * - `bg-elv`: The elevated bg color. This is used at parts where it "floats", + * such as "dialog". + * + * - `bg-soft`: The bg color to slightly distinguish some components from + * the page. Used for things like "carbon ads" or "table". + * -------------------------------------------------------------------------- */ + +:root { + --vp-c-bg: #ffffff; + --vp-c-bg-alt: #f6f6f7; + --vp-c-bg-elv: #ffffff; + --vp-c-bg-soft: #f6f6f7; +} + +.dark { + --vp-c-bg: #1b1b1f; + --vp-c-bg-alt: #161618; + --vp-c-bg-elv: #202127; + --vp-c-bg-soft: #202127; +} + +/** + * Colors: Borders + * + * - `divider`: This is used for separators. This is used to divide sections + * within the same components, such as having separator on "h2" heading. + * + * - `border`: This is designed for borders on interactive components. + * For example this should be used for a button outline. + * + * - `gutter`: This is used to divide components in the page. For example + * the header and the lest of the page. + * -------------------------------------------------------------------------- */ + +:root { + --vp-c-border: #c2c2c4; + --vp-c-divider: #e2e2e3; + --vp-c-gutter: #e2e2e3; +} + +.dark { + --vp-c-border: #3c3f44; + --vp-c-divider: #2e2e32; + --vp-c-gutter: #000000; +} + +/** + * Colors: Text + * + * - `text-1`: Used for primary text. + * + * - `text-2`: Used for muted texts, such as "inactive menu" or "info texts". + * + * - `text-3`: Used for subtle texts, such as "placeholders" or "caret icon". + * -------------------------------------------------------------------------- */ + +:root { + --vp-c-text-1: rgba(60, 60, 67); + --vp-c-text-2: rgba(60, 60, 67, 0.78); + --vp-c-text-3: rgba(60, 60, 67, 0.56); +} + +.dark { + --vp-c-text-1: rgba(255, 255, 245, 0.86); + --vp-c-text-2: rgba(235, 235, 245, 0.6); + --vp-c-text-3: rgba(235, 235, 245, 0.38); +} + +/** + * Colors: Function + * + * - `default`: The color used purely for subtle indication without any + * special meanings attached to it such as bg color for menu hover state. + * + * - `brand`: Used for primary brand colors, such as link text, button with + * brand theme, etc. + * + * - `tip`: Used to indicate useful information. The default theme uses the + * brand color for this by default. + * + * - `warning`: Used to indicate warning to the users. Used in custom + * container, badges, etc. + * + * - `danger`: Used to show error, or dangerous message to the users. Used + * in custom container, badges, etc. + * + * To understand the scaling system, refer to "Colors: Palette" section. + * -------------------------------------------------------------------------- */ + +:root { + --vp-c-default-1: var(--vp-c-gray-1); + --vp-c-default-2: var(--vp-c-gray-2); + --vp-c-default-3: var(--vp-c-gray-3); + --vp-c-default-soft: var(--vp-c-gray-soft); + + --vp-c-brand-1: var(--vp-c-indigo-1); + --vp-c-brand-2: var(--vp-c-indigo-2); + --vp-c-brand-3: var(--vp-c-indigo-3); + --vp-c-brand-soft: var(--vp-c-indigo-soft); + + /* DEPRECATED: Use `--vp-c-brand-1` instead. */ + --vp-c-brand: var(--vp-c-brand-1); + + --vp-c-tip-1: var(--vp-c-brand-1); + --vp-c-tip-2: var(--vp-c-brand-2); + --vp-c-tip-3: var(--vp-c-brand-3); + --vp-c-tip-soft: var(--vp-c-brand-soft); + + --vp-c-warning-1: var(--vp-c-yellow-1); + --vp-c-warning-2: var(--vp-c-yellow-2); + --vp-c-warning-3: var(--vp-c-yellow-3); + --vp-c-warning-soft: var(--vp-c-yellow-soft); + + --vp-c-danger-1: var(--vp-c-red-1); + --vp-c-danger-2: var(--vp-c-red-2); + --vp-c-danger-3: var(--vp-c-red-3); + --vp-c-danger-soft: var(--vp-c-red-soft); +} + +/** + * Typography + * -------------------------------------------------------------------------- */ + +:root { + --vp-font-family-base: 'Chinese Quotes', 'Inter var', 'Inter', ui-sans-serif, + system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, + 'Helvetica Neue', Helvetica, Arial, 'Noto Sans', sans-serif, + 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji'; + --vp-font-family-mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Monaco, + Consolas, 'Liberation Mono', 'Courier New', monospace; +} + +/** + * Shadows + * -------------------------------------------------------------------------- */ + +:root { + --vp-shadow-1: 0 1px 2px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.06); + --vp-shadow-2: 0 3px 12px rgba(0, 0, 0, 0.07), 0 1px 4px rgba(0, 0, 0, 0.07); + --vp-shadow-3: 0 12px 32px rgba(0, 0, 0, 0.1), 0 2px 6px rgba(0, 0, 0, 0.08); + --vp-shadow-4: 0 14px 44px rgba(0, 0, 0, 0.12), 0 3px 9px rgba(0, 0, 0, 0.12); + --vp-shadow-5: 0 18px 56px rgba(0, 0, 0, 0.16), 0 4px 12px rgba(0, 0, 0, 0.16); +} + +/** + * Z-indexes + * -------------------------------------------------------------------------- */ + +:root { + --vp-z-index-footer: 10; + --vp-z-index-local-nav: 20; + --vp-z-index-nav: 30; + --vp-z-index-layout-top: 40; + --vp-z-index-backdrop: 50; + --vp-z-index-sidebar: 60; +} + +@media (min-width: 960px) { + :root { + --vp-z-index-sidebar: 25; + } +} + +/** + * Icons + * -------------------------------------------------------------------------- */ + +:root { + --vp-icon-copy: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' height='20' width='20' stroke='rgba(128,128,128,1)' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M9 5H7a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2h-2M9 5a2 2 0 0 0 2 2h2a2 2 0 0 0 2-2M9 5a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2'/%3E%3C/svg%3E"); + --vp-icon-copied: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' height='20' width='20' stroke='rgba(128,128,128,1)' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M9 5H7a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2h-2M9 5a2 2 0 0 0 2 2h2a2 2 0 0 0 2-2M9 5a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2m-6 9 2 2 4-4'/%3E%3C/svg%3E"); +} + +/** + * Layouts + * -------------------------------------------------------------------------- */ + +:root { + --vp-layout-max-width: 1440px; +} + +/** + * Component: Header Anchor + * -------------------------------------------------------------------------- */ + +:root { + --vp-header-anchor-symbol: '#'; +} + +/** + * Component: Code + * -------------------------------------------------------------------------- */ + +:root { + --vp-code-line-height: 1.7; + --vp-code-font-size: 0.875em; + --vp-code-color: var(--vp-c-brand-1); + --vp-code-link-color: var(--vp-c-brand-1); + --vp-code-link-hover-color: var(--vp-c-brand-2); + --vp-code-bg: var(--vp-c-default-soft); + + --vp-code-block-color: var(--vp-c-text-2); + --vp-code-block-bg: var(--vp-c-bg-alt); + --vp-code-block-divider-color: var(--vp-c-gutter); + + --vp-code-lang-color: var(--vp-c-text-3); + + --vp-code-line-highlight-color: var(--vp-c-default-soft); + --vp-code-line-number-color: var(--vp-c-text-3); + + --vp-code-line-diff-add-color: var(--vp-c-green-soft); + --vp-code-line-diff-add-symbol-color: var(--vp-c-green-1); + + --vp-code-line-diff-remove-color: var(--vp-c-red-soft); + --vp-code-line-diff-remove-symbol-color: var(--vp-c-red-1); + + --vp-code-line-warning-color: var(--vp-c-yellow-soft); + --vp-code-line-error-color: var(--vp-c-red-soft); + + --vp-code-copy-code-border-color: var(--vp-c-divider); + --vp-code-copy-code-bg: var(--vp-c-bg-soft); + --vp-code-copy-code-hover-border-color: var(--vp-c-divider); + --vp-code-copy-code-hover-bg: var(--vp-c-bg); + --vp-code-copy-code-active-text: var(--vp-c-text-2); + --vp-code-copy-copied-text-content: 'Copied'; + + --vp-code-tab-divider: var(--vp-code-block-divider-color); + --vp-code-tab-text-color: var(--vp-c-text-2); + --vp-code-tab-bg: var(--vp-code-block-bg); + --vp-code-tab-hover-text-color: var(--vp-c-text-1); + --vp-code-tab-active-text-color: var(--vp-c-text-1); + --vp-code-tab-active-bar-color: var(--vp-c-brand-1); +} + +/** + * Component: Button + * -------------------------------------------------------------------------- */ + +:root { + --vp-button-brand-border: transparent; + --vp-button-brand-text: var(--vp-c-white); + --vp-button-brand-bg: var(--vp-c-brand-3); + --vp-button-brand-hover-border: transparent; + --vp-button-brand-hover-text: var(--vp-c-white); + --vp-button-brand-hover-bg: var(--vp-c-brand-2); + --vp-button-brand-active-border: transparent; + --vp-button-brand-active-text: var(--vp-c-white); + --vp-button-brand-active-bg: var(--vp-c-brand-1); + + --vp-button-alt-border: transparent; + --vp-button-alt-text: var(--vp-c-text-1); + --vp-button-alt-bg: var(--vp-c-default-3); + --vp-button-alt-hover-border: transparent; + --vp-button-alt-hover-text: var(--vp-c-text-1); + --vp-button-alt-hover-bg: var(--vp-c-default-2); + --vp-button-alt-active-border: transparent; + --vp-button-alt-active-text: var(--vp-c-text-1); + --vp-button-alt-active-bg: var(--vp-c-default-1); + + --vp-button-sponsor-border: var(--vp-c-text-2); + --vp-button-sponsor-text: var(--vp-c-text-2); + --vp-button-sponsor-bg: transparent; + --vp-button-sponsor-hover-border: var(--vp-c-sponsor); + --vp-button-sponsor-hover-text: var(--vp-c-sponsor); + --vp-button-sponsor-hover-bg: transparent; + --vp-button-sponsor-active-border: var(--vp-c-sponsor); + --vp-button-sponsor-active-text: var(--vp-c-sponsor); + --vp-button-sponsor-active-bg: transparent; +} + +/** + * Component: Custom Block + * -------------------------------------------------------------------------- */ + +:root { + --vp-custom-block-font-size: 14px; + --vp-custom-block-code-font-size: 13px; + + --vp-custom-block-info-border: transparent; + --vp-custom-block-info-text: var(--vp-c-text-1); + --vp-custom-block-info-bg: var(--vp-c-default-soft); + --vp-custom-block-info-code-bg: var(--vp-c-default-soft); + + --vp-custom-block-tip-border: transparent; + --vp-custom-block-tip-text: var(--vp-c-text-1); + --vp-custom-block-tip-bg: var(--vp-c-brand-soft); + --vp-custom-block-tip-code-bg: var(--vp-c-brand-soft); + + --vp-custom-block-warning-border: transparent; + --vp-custom-block-warning-text: var(--vp-c-text-1); + --vp-custom-block-warning-bg: var(--vp-c-warning-soft); + --vp-custom-block-warning-code-bg: var(--vp-c-warning-soft); + + --vp-custom-block-danger-border: transparent; + --vp-custom-block-danger-text: var(--vp-c-text-1); + --vp-custom-block-danger-bg: var(--vp-c-danger-soft); + --vp-custom-block-danger-code-bg: var(--vp-c-danger-soft); + + --vp-custom-block-details-border: var(--vp-custom-block-info-border); + --vp-custom-block-details-text: var(--vp-custom-block-info-text); + --vp-custom-block-details-bg: var(--vp-custom-block-info-bg); + --vp-custom-block-details-code-bg: var(--vp-custom-block-info-code-bg); +} + +/** + * Component: Input + * -------------------------------------------------------------------------- */ + +:root { + --vp-input-border-color: var(--vp-c-border); + --vp-input-bg-color: var(--vp-c-bg-alt); + + --vp-input-switch-bg-color: var(--vp-c-gray-soft); +} + +/** + * Component: Nav + * -------------------------------------------------------------------------- */ + +:root { + --vp-nav-height: 64px; + --vp-nav-bg-color: var(--vp-c-bg); + --vp-nav-screen-bg-color: var(--vp-c-bg); + --vp-nav-logo-height: 24px; +} + +.hide-nav { + --vp-nav-height: 0px; +} + +.hide-nav .VPSidebar { + --vp-nav-height: 22px; +} + +/** + * Component: Local Nav + * -------------------------------------------------------------------------- */ + +:root { + --vp-local-nav-bg-color: var(--vp-c-bg); +} + +/** + * Component: Sidebar + * -------------------------------------------------------------------------- */ + +:root { + --vp-sidebar-width: 272px; + --vp-sidebar-bg-color: var(--vp-c-bg-alt); +} + +/** + * Colors Backdrop + * -------------------------------------------------------------------------- */ + +:root { + --vp-backdrop-bg-color: rgba(0, 0, 0, 0.6); +} + +/** + * Component: Home + * -------------------------------------------------------------------------- */ + +:root { + --vp-home-hero-name-color: var(--vp-c-brand-1); + --vp-home-hero-name-background: transparent; + + --vp-home-hero-image-background-image: none; + --vp-home-hero-image-filter: none; +} + +/** + * Component: Badge + * -------------------------------------------------------------------------- */ + +:root { + --vp-badge-info-border: transparent; + --vp-badge-info-text: var(--vp-c-text-2); + --vp-badge-info-bg: var(--vp-c-default-soft); + + --vp-badge-tip-border: transparent; + --vp-badge-tip-text: var(--vp-c-brand-1); + --vp-badge-tip-bg: var(--vp-c-brand-soft); + + --vp-badge-warning-border: transparent; + --vp-badge-warning-text: var(--vp-c-warning-1); + --vp-badge-warning-bg: var(--vp-c-warning-soft); + + --vp-badge-danger-border: transparent; + --vp-badge-danger-text: var(--vp-c-danger-1); + --vp-badge-danger-bg: var(--vp-c-danger-soft); +} + +/** + * Component: Carbon Ads + * -------------------------------------------------------------------------- */ + +:root { + --vp-carbon-ads-text-color: var(--vp-c-text-1); + --vp-carbon-ads-poweredby-color: var(--vp-c-text-2); + --vp-carbon-ads-bg-color: var(--vp-c-bg-soft); + --vp-carbon-ads-hover-text-color: var(--vp-c-brand-1); + --vp-carbon-ads-hover-poweredby-color: var(--vp-c-text-1); +} + +/** + * Component: Local Search + * -------------------------------------------------------------------------- */ + +:root { + --vp-local-search-bg: var(--vp-c-bg); + --vp-local-search-result-bg: var(--vp-c-bg); + --vp-local-search-result-border: var(--vp-c-divider); + --vp-local-search-result-selected-bg: var(--vp-c-bg); + --vp-local-search-result-selected-border: var(--vp-c-brand-1); + --vp-local-search-highlight-bg: var(--vp-c-brand-1); + --vp-local-search-highlight-text: var(--vp-c-neutral-inverse); +} +@media (prefers-reduced-motion: reduce) { + *, + ::before, + ::after { + animation-delay: -1ms !important; + animation-duration: 1ms !important; + animation-iteration-count: 1 !important; + background-attachment: initial !important; + scroll-behavior: auto !important; + transition-duration: 0s !important; + transition-delay: 0s !important; + } +} + +*, +::before, +::after { + box-sizing: border-box; +} + +html { + line-height: 1.4; + font-size: 16px; + -webkit-text-size-adjust: 100%; +} + +html.dark { + color-scheme: dark; +} + +body { + margin: 0; + width: 100%; + min-width: 320px; + min-height: 100vh; + line-height: 24px; + font-family: var(--vp-font-family-base); + font-size: 16px; + font-weight: 400; + color: var(--vp-c-text-1); + background-color: var(--vp-c-bg); + font-synthesis: style; + text-rendering: optimizeLegibility; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +main { + display: block; +} + +h1, +h2, +h3, +h4, +h5, +h6 { + margin: 0; + line-height: 24px; + font-size: 16px; + font-weight: 400; +} + +p { + margin: 0; +} + +strong, +b { + font-weight: 600; +} + +/** + * Avoid 300ms click delay on touch devices that support the `touch-action` + * CSS property. + * + * In particular, unlike most other browsers, IE11+Edge on Windows 10 on + * touch devices and IE Mobile 10-11 DON'T remove the click delay when + * `` is present. + * However, they DO support removing the click delay via + * `touch-action: manipulation`. + * + * See: + * - http://v4-alpha.getbootstrap.com/content/reboot/#click-delay-optimization-for-touch + * - http://caniuse.com/#feat=css-touch-action + * - http://patrickhlauke.github.io/touch/tests/results/#suppressing-300ms-delay + */ +a, +area, +button, +[role='button'], +input, +label, +select, +summary, +textarea { + touch-action: manipulation; +} + +a { + color: inherit; + text-decoration: inherit; +} + +ol, +ul { + list-style: none; + margin: 0; + padding: 0; +} + +blockquote { + margin: 0; +} + +pre, +code, +kbd, +samp { + font-family: var(--vp-font-family-mono); +} + +img, +svg, +video, +canvas, +audio, +iframe, +embed, +object { + display: block; +} + +figure { + margin: 0; +} + +img, +video { + max-width: 100%; + height: auto; +} + +button, +input, +optgroup, +select, +textarea { + border: 0; + padding: 0; + line-height: inherit; + color: inherit; +} + +button { + padding: 0; + font-family: inherit; + background-color: transparent; + background-image: none; +} + +button:enabled, +[role='button']:enabled { + cursor: pointer; +} + +button:focus, +button:focus-visible { + outline: 1px dotted; + outline: 4px auto -webkit-focus-ring-color; +} + +button:focus:not(:focus-visible) { + outline: none !important; +} + +input:focus, +textarea:focus, +select:focus { + outline: none; +} + +table { + border-collapse: collapse; +} + +input { + background-color: transparent; +} + +input:-ms-input-placeholder, +textarea:-ms-input-placeholder { + color: var(--vp-c-text-3); +} + +input::-ms-input-placeholder, +textarea::-ms-input-placeholder { + color: var(--vp-c-text-3); +} + +input::placeholder, +textarea::placeholder { + color: var(--vp-c-text-3); +} + +input::-webkit-outer-spin-button, +input::-webkit-inner-spin-button { + -webkit-appearance: none; + margin: 0; +} + +input[type='number'] { + -moz-appearance: textfield; +} + +textarea { + resize: vertical; +} + +select { + -webkit-appearance: none; +} + +fieldset { + margin: 0; + padding: 0; +} + +h1, +h2, +h3, +h4, +h5, +h6, +li, +p { + overflow-wrap: break-word; +} + +vite-error-overlay { + z-index: 9999; +} + +mjx-container { + display: inline-block; + margin: auto 2px -2px; +} + +mjx-container > svg { + margin: auto; +} +.visually-hidden { + position: absolute; + width: 1px; + height: 1px; + white-space: nowrap; + clip: rect(0 0 0 0); + clip-path: inset(50%); + overflow: hidden; +} +.custom-block { + border: 1px solid transparent; + border-radius: 8px; + padding: 16px 16px 8px; + line-height: 24px; + font-size: var(--vp-custom-block-font-size); + color: var(--vp-c-text-2); +} + +.custom-block.info { + border-color: var(--vp-custom-block-info-border); + color: var(--vp-custom-block-info-text); + background-color: var(--vp-custom-block-info-bg); +} + +.custom-block.info a, +.custom-block.info code { + color: var(--vp-c-brand-1); +} + +.custom-block.info a:hover { + color: var(--vp-c-brand-2); +} + +.custom-block.info code { + background-color: var(--vp-custom-block-info-code-bg); +} + +.custom-block.tip { + border-color: var(--vp-custom-block-tip-border); + color: var(--vp-custom-block-tip-text); + background-color: var(--vp-custom-block-tip-bg); +} + +.custom-block.tip a, +.custom-block.tip code { + color: var(--vp-c-brand-1); +} + +.custom-block.tip a:hover { + color: var(--vp-c-brand-2); +} + +.custom-block.tip code { + background-color: var(--vp-custom-block-tip-code-bg); +} + +.custom-block.warning { + border-color: var(--vp-custom-block-warning-border); + color: var(--vp-custom-block-warning-text); + background-color: var(--vp-custom-block-warning-bg); +} + +.custom-block.warning a, +.custom-block.warning code { + color: var(--vp-c-warning-1); +} + +.custom-block.warning a:hover { + color: var(--vp-c-warning-2); +} + +.custom-block.warning code { + background-color: var(--vp-custom-block-warning-code-bg); +} + +.custom-block.danger { + border-color: var(--vp-custom-block-danger-border); + color: var(--vp-custom-block-danger-text); + background-color: var(--vp-custom-block-danger-bg); +} + +.custom-block.danger a, +.custom-block.danger code { + color: var(--vp-c-danger-1); +} + +.custom-block.danger a:hover { + color: var(--vp-c-danger-2); +} + +.custom-block.danger code { + background-color: var(--vp-custom-block-danger-code-bg); +} + +.custom-block.details { + border-color: var(--vp-custom-block-details-border); + color: var(--vp-custom-block-details-text); + background-color: var(--vp-custom-block-details-bg); +} + +.custom-block.details a { + color: var(--vp-c-brand-1); +} + +.custom-block.details a:hover { + color: var(--vp-c-brand-2); +} + +.custom-block.details code { + background-color: var(--vp-custom-block-details-code-bg); +} + +.custom-block-title { + font-weight: 600; +} + +.custom-block p + p { + margin: 8px 0; +} + +.custom-block.details summary { + margin: 0 0 8px; + font-weight: 700; + cursor: pointer; +} + +.custom-block.details summary + p { + margin: 8px 0; +} + +.custom-block a { + color: inherit; + font-weight: 600; + text-decoration: underline; + text-underline-offset: 2px; + transition: opacity 0.25s; +} + +.custom-block a:hover { + opacity: 0.75; +} + +.custom-block code { + font-size: var(--vp-custom-block-code-font-size); +} + +.custom-block.custom-block th, +.custom-block.custom-block blockquote > p { + font-size: var(--vp-custom-block-font-size); + color: inherit; +} +.dark .vp-code span { + color: var(--shiki-dark, inherit); +} + +html:not(.dark) .vp-code span { + color: var(--shiki-light, inherit); +} +.vp-code-group { + margin-top: 16px; +} + +.vp-code-group .tabs { + position: relative; + display: flex; + margin-right: -24px; + margin-left: -24px; + padding: 0 12px; + background-color: var(--vp-code-tab-bg); + overflow-x: auto; + overflow-y: hidden; + box-shadow: inset 0 -1px var(--vp-code-tab-divider); +} + +@media (min-width: 640px) { + .vp-code-group .tabs { + margin-right: 0; + margin-left: 0; + border-radius: 8px 8px 0 0; + } +} + +.vp-code-group .tabs input { + position: fixed; + opacity: 0; + pointer-events: none; +} + +.vp-code-group .tabs label { + position: relative; + display: inline-block; + border-bottom: 1px solid transparent; + padding: 0 12px; + line-height: 48px; + font-size: 14px; + font-weight: 500; + color: var(--vp-code-tab-text-color); + white-space: nowrap; + cursor: pointer; + transition: color 0.25s; +} + +.vp-code-group .tabs label::after { + position: absolute; + right: 8px; + bottom: -1px; + left: 8px; + z-index: 1; + height: 2px; + border-radius: 2px; + content: ''; + background-color: transparent; + transition: background-color 0.25s; +} + +.vp-code-group label:hover { + color: var(--vp-code-tab-hover-text-color); +} + +.vp-code-group input:checked + label { + color: var(--vp-code-tab-active-text-color); +} + +.vp-code-group input:checked + label::after { + background-color: var(--vp-code-tab-active-bar-color); +} + +.vp-code-group div[class*='language-'], +.vp-block { + display: none; + margin-top: 0 !important; + border-top-left-radius: 0 !important; + border-top-right-radius: 0 !important; +} + +.vp-code-group div[class*='language-'].active, +.vp-block.active { + display: block; +} + +.vp-block { + padding: 20px 24px; +} +/** + * Headings + * -------------------------------------------------------------------------- */ + +.vp-doc h1, +.vp-doc h2, +.vp-doc h3, +.vp-doc h4, +.vp-doc h5, +.vp-doc h6 { + position: relative; + font-weight: 600; + outline: none; +} + +.vp-doc h1 { + letter-spacing: -0.02em; + line-height: 40px; + font-size: 28px; +} + +.vp-doc h2 { + margin: 48px 0 16px; + border-top: 1px solid var(--vp-c-divider); + padding-top: 24px; + letter-spacing: -0.02em; + line-height: 32px; + font-size: 24px; +} + +.vp-doc h3 { + margin: 32px 0 0; + letter-spacing: -0.01em; + line-height: 28px; + font-size: 20px; +} + +.vp-doc .header-anchor { + position: absolute; + top: 0; + left: 0; + margin-left: -0.87em; + font-weight: 500; + user-select: none; + opacity: 0; + text-decoration: none; + transition: + color 0.25s, + opacity 0.25s; +} + +.vp-doc .header-anchor:before { + content: var(--vp-header-anchor-symbol); +} + +.vp-doc h1:hover .header-anchor, +.vp-doc h1 .header-anchor:focus, +.vp-doc h2:hover .header-anchor, +.vp-doc h2 .header-anchor:focus, +.vp-doc h3:hover .header-anchor, +.vp-doc h3 .header-anchor:focus, +.vp-doc h4:hover .header-anchor, +.vp-doc h4 .header-anchor:focus, +.vp-doc h5:hover .header-anchor, +.vp-doc h5 .header-anchor:focus, +.vp-doc h6:hover .header-anchor, +.vp-doc h6 .header-anchor:focus { + opacity: 1; +} + +@media (min-width: 768px) { + .vp-doc h1 { + letter-spacing: -0.02em; + line-height: 40px; + font-size: 32px; + } +} + +.vp-doc h2 .header-anchor { + top: 24px; +} + +/** + * Paragraph and inline elements + * -------------------------------------------------------------------------- */ + +.vp-doc p, +.vp-doc summary { + margin: 16px 0; +} + +.vp-doc p { + line-height: 28px; +} + +.vp-doc blockquote { + margin: 16px 0; + border-left: 2px solid var(--vp-c-divider); + padding-left: 16px; + transition: border-color 0.5s; +} + +.vp-doc blockquote > p { + margin: 0; + font-size: 16px; + color: var(--vp-c-text-2); + transition: color 0.5s; +} + +.vp-doc a { + font-weight: 500; + color: var(--vp-c-brand-1); + text-decoration: underline; + text-underline-offset: 2px; + transition: + color 0.25s, + opacity 0.25s; +} + +.vp-doc a:hover { + color: var(--vp-c-brand-2); +} + +.vp-doc strong { + font-weight: 600; +} + +/** + * Lists + * -------------------------------------------------------------------------- */ + +.vp-doc ul, +.vp-doc ol { + padding-left: 1.25rem; + margin: 16px 0; +} + +.vp-doc ul { + list-style: disc; +} + +.vp-doc ol { + list-style: decimal; +} + +.vp-doc li + li { + margin-top: 8px; +} + +.vp-doc li > ol, +.vp-doc li > ul { + margin: 8px 0 0; +} + +/** + * Table + * -------------------------------------------------------------------------- */ + +.vp-doc table { + display: block; + border-collapse: collapse; + margin: 20px 0; + overflow-x: auto; +} + +.vp-doc tr { + background-color: var(--vp-c-bg); + border-top: 1px solid var(--vp-c-divider); + transition: background-color 0.5s; +} + +.vp-doc tr:nth-child(2n) { + background-color: var(--vp-c-bg-soft); +} + +.vp-doc th, +.vp-doc td { + border: 1px solid var(--vp-c-divider); + padding: 8px 16px; +} + +.vp-doc th { + text-align: left; + font-size: 14px; + font-weight: 600; + color: var(--vp-c-text-2); + background-color: var(--vp-c-bg-soft); +} + +.vp-doc td { + font-size: 14px; +} + +/** + * Decorational elements + * -------------------------------------------------------------------------- */ + +.vp-doc hr { + margin: 16px 0; + border: none; + border-top: 1px solid var(--vp-c-divider); +} + +/** + * Custom Block + * -------------------------------------------------------------------------- */ + +.vp-doc .custom-block { + margin: 16px 0; +} + +.vp-doc .custom-block p { + margin: 8px 0; + line-height: 24px; +} + +.vp-doc .custom-block p:first-child { + margin: 0; +} + +.vp-doc .custom-block div[class*='language-'] { + margin: 8px 0; + border-radius: 8px; +} + +.vp-doc .custom-block div[class*='language-'] code { + font-weight: 400; + background-color: transparent; +} + +.vp-doc .custom-block .vp-code-group .tabs { + margin: 0; + border-radius: 8px 8px 0 0; +} + +/** + * Code + * -------------------------------------------------------------------------- */ + +/* inline code */ +.vp-doc :not(pre, h1, h2, h3, h4, h5, h6) > code { + font-size: var(--vp-code-font-size); + color: var(--vp-code-color); +} + +.vp-doc :not(pre) > code { + border-radius: 4px; + padding: 3px 6px; + background-color: var(--vp-code-bg); + transition: + color 0.25s, + background-color 0.5s; +} + +.vp-doc a > code { + color: var(--vp-code-link-color); +} + +.vp-doc a:hover > code { + color: var(--vp-code-link-hover-color); +} + +.vp-doc h1 > code, +.vp-doc h2 > code, +.vp-doc h3 > code { + font-size: 0.9em; +} + +.vp-doc div[class*='language-'], +.vp-block { + position: relative; + margin: 16px -24px; + background-color: var(--vp-code-block-bg); + overflow-x: auto; + transition: background-color 0.5s; +} + +@media (min-width: 640px) { + .vp-doc div[class*='language-'], + .vp-block { + border-radius: 8px; + margin: 16px 0; + } +} + +@media (max-width: 639px) { + .vp-doc li div[class*='language-'] { + border-radius: 8px 0 0 8px; + } +} + +.vp-doc div[class*='language-'] + div[class*='language-'], +.vp-doc div[class$='-api'] + div[class*='language-'], +.vp-doc div[class*='language-'] + div[class$='-api'] > div[class*='language-'] { + margin-top: -8px; +} + +.vp-doc [class*='language-'] pre, +.vp-doc [class*='language-'] code { + /*rtl:ignore*/ + direction: ltr; + /*rtl:ignore*/ + text-align: left; + white-space: pre; + word-spacing: normal; + word-break: normal; + word-wrap: normal; + -moz-tab-size: 4; + -o-tab-size: 4; + tab-size: 4; + -webkit-hyphens: none; + -moz-hyphens: none; + -ms-hyphens: none; + hyphens: none; +} + +.vp-doc [class*='language-'] pre { + position: relative; + z-index: 1; + margin: 0; + padding: 20px 0; + background: transparent; + overflow-x: auto; +} + +.vp-doc [class*='language-'] code { + display: block; + padding: 0 24px; + width: fit-content; + min-width: 100%; + line-height: var(--vp-code-line-height); + font-size: var(--vp-code-font-size); + color: var(--vp-code-block-color); + transition: color 0.5s; +} + +.vp-doc [class*='language-'] code .highlighted { + background-color: var(--vp-code-line-highlight-color); + transition: background-color 0.5s; + margin: 0 -24px; + padding: 0 24px; + width: calc(100% + 2 * 24px); + display: inline-block; +} + +.vp-doc [class*='language-'] code .highlighted.error { + background-color: var(--vp-code-line-error-color); +} + +.vp-doc [class*='language-'] code .highlighted.warning { + background-color: var(--vp-code-line-warning-color); +} + +.vp-doc [class*='language-'] code .diff { + transition: background-color 0.5s; + margin: 0 -24px; + padding: 0 24px; + width: calc(100% + 2 * 24px); + display: inline-block; +} + +.vp-doc [class*='language-'] code .diff::before { + position: absolute; + left: 10px; +} + +.vp-doc [class*='language-'] .has-focused-lines .line:not(.has-focus) { + filter: blur(0.095rem); + opacity: 0.4; + transition: + filter 0.35s, + opacity 0.35s; +} + +.vp-doc [class*='language-'] .has-focused-lines .line:not(.has-focus) { + opacity: 0.7; + transition: + filter 0.35s, + opacity 0.35s; +} + +.vp-doc [class*='language-']:hover .has-focused-lines .line:not(.has-focus) { + filter: blur(0); + opacity: 1; +} + +.vp-doc [class*='language-'] code .diff.remove { + background-color: var(--vp-code-line-diff-remove-color); + opacity: 0.7; +} + +.vp-doc [class*='language-'] code .diff.remove::before { + content: '-'; + color: var(--vp-code-line-diff-remove-symbol-color); +} + +.vp-doc [class*='language-'] code .diff.add { + background-color: var(--vp-code-line-diff-add-color); +} + +.vp-doc [class*='language-'] code .diff.add::before { + content: '+'; + color: var(--vp-code-line-diff-add-symbol-color); +} + +.vp-doc div[class*='language-'].line-numbers-mode { + /*rtl:ignore*/ + padding-left: 32px; +} + +.vp-doc .line-numbers-wrapper { + position: absolute; + top: 0; + bottom: 0; + /*rtl:ignore*/ + left: 0; + z-index: 3; + /*rtl:ignore*/ + border-right: 1px solid var(--vp-code-block-divider-color); + padding-top: 20px; + width: 32px; + text-align: center; + font-family: var(--vp-font-family-mono); + line-height: var(--vp-code-line-height); + font-size: var(--vp-code-font-size); + color: var(--vp-code-line-number-color); + transition: + border-color 0.5s, + color 0.5s; +} + +.vp-doc [class*='language-'] > button.copy { + /*rtl:ignore*/ + direction: ltr; + position: absolute; + top: 12px; + /*rtl:ignore*/ + right: 12px; + z-index: 3; + border: 1px solid var(--vp-code-copy-code-border-color); + border-radius: 4px; + width: 40px; + height: 40px; + background-color: var(--vp-code-copy-code-bg); + opacity: 0; + cursor: pointer; + background-image: var(--vp-icon-copy); + background-position: 50%; + background-size: 20px; + background-repeat: no-repeat; + transition: + border-color 0.25s, + background-color 0.25s, + opacity 0.25s; +} + +.vp-doc [class*='language-']:hover > button.copy, +.vp-doc [class*='language-'] > button.copy:focus { + opacity: 1; +} + +.vp-doc [class*='language-'] > button.copy:hover, +.vp-doc [class*='language-'] > button.copy.copied { + border-color: var(--vp-code-copy-code-hover-border-color); + background-color: var(--vp-code-copy-code-hover-bg); +} + +.vp-doc [class*='language-'] > button.copy.copied, +.vp-doc [class*='language-'] > button.copy:hover.copied { + /*rtl:ignore*/ + border-radius: 0 4px 4px 0; + background-color: var(--vp-code-copy-code-hover-bg); + background-image: var(--vp-icon-copied); +} + +.vp-doc [class*='language-'] > button.copy.copied::before, +.vp-doc [class*='language-'] > button.copy:hover.copied::before { + position: relative; + top: -1px; + /*rtl:ignore*/ + transform: translateX(calc(-100% - 1px)); + display: flex; + justify-content: center; + align-items: center; + border: 1px solid var(--vp-code-copy-code-hover-border-color); + /*rtl:ignore*/ + border-right: 0; + border-radius: 4px 0 0 4px; + padding: 0 10px; + width: fit-content; + height: 40px; + text-align: center; + font-size: 12px; + font-weight: 500; + color: var(--vp-code-copy-code-active-text); + background-color: var(--vp-code-copy-code-hover-bg); + white-space: nowrap; + content: var(--vp-code-copy-copied-text-content); +} + +.vp-doc [class*='language-'] > span.lang { + position: absolute; + top: 2px; + /*rtl:ignore*/ + right: 8px; + z-index: 2; + font-size: 12px; + font-weight: 500; + color: var(--vp-code-lang-color); + transition: + color 0.4s, + opacity 0.4s; +} + +.vp-doc [class*='language-']:hover > button.copy + span.lang, +.vp-doc [class*='language-'] > button.copy:focus + span.lang { + opacity: 0; +} + +/** + * Component: Team + * -------------------------------------------------------------------------- */ + +.vp-doc .VPTeamMembers { + margin-top: 24px; +} + +.vp-doc .VPTeamMembers.small.count-1 .container { + margin: 0 !important; + max-width: calc((100% - 24px) / 2) !important; +} + +.vp-doc .VPTeamMembers.small.count-2 .container, +.vp-doc .VPTeamMembers.small.count-3 .container { + max-width: 100% !important; +} + +.vp-doc .VPTeamMembers.medium.count-1 .container { + margin: 0 !important; + max-width: calc((100% - 24px) / 2) !important; +} + +/* prettier-ignore */ +:is(.vp-external-link-icon, .vp-doc a[href*='://'], .vp-doc a[target='_blank']):not(.no-icon)::after { + display: inline-block; + margin-top: -1px; + margin-left: 4px; + width: 11px; + height: 11px; + background: currentColor; + color: var(--vp-c-text-3); + flex-shrink: 0; + --icon: url("data:image/svg+xml, %3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' %3E%3Cpath d='M0 0h24v24H0V0z' fill='none' /%3E%3Cpath d='M9 5v2h6.59L4 18.59 5.41 20 17 8.41V15h2V5H9z' /%3E%3C/svg%3E"); + -webkit-mask-image: var(--icon); + mask-image: var(--icon); +} + +.vp-external-link-icon::after { + content: ''; +} + +/* prettier-ignore */ +.external-link-icon-enabled :is(.vp-doc a[href*='://'], .vp-doc a[target='_blank'])::after { + content: ''; + color: currentColor; +} +/** + * VPSponsors styles are defined as global because a new class gets + * allied in onMounted` hook and we can't use scoped style. + */ +.vp-sponsor { + border-radius: 16px; + overflow: hidden; +} + +.vp-sponsor.aside { + border-radius: 12px; +} + +.vp-sponsor-section + .vp-sponsor-section { + margin-top: 4px; +} + +.vp-sponsor-tier { + margin-bottom: 4px; + text-align: center; + letter-spacing: 1px; + line-height: 24px; + width: 100%; + font-weight: 600; + color: var(--vp-c-text-2); + background-color: var(--vp-c-bg-soft); +} + +.vp-sponsor.normal .vp-sponsor-tier { + padding: 13px 0 11px; + font-size: 14px; +} + +.vp-sponsor.aside .vp-sponsor-tier { + padding: 9px 0 7px; + font-size: 12px; +} + +.vp-sponsor-grid + .vp-sponsor-tier { + margin-top: 4px; +} + +.vp-sponsor-grid { + display: flex; + flex-wrap: wrap; + gap: 4px; +} + +.vp-sponsor-grid.xmini .vp-sponsor-grid-link { + height: 64px; +} +.vp-sponsor-grid.xmini .vp-sponsor-grid-image { + max-width: 64px; + max-height: 22px; +} + +.vp-sponsor-grid.mini .vp-sponsor-grid-link { + height: 72px; +} +.vp-sponsor-grid.mini .vp-sponsor-grid-image { + max-width: 96px; + max-height: 24px; +} + +.vp-sponsor-grid.small .vp-sponsor-grid-link { + height: 96px; +} +.vp-sponsor-grid.small .vp-sponsor-grid-image { + max-width: 96px; + max-height: 24px; +} + +.vp-sponsor-grid.medium .vp-sponsor-grid-link { + height: 112px; +} +.vp-sponsor-grid.medium .vp-sponsor-grid-image { + max-width: 120px; + max-height: 36px; +} + +.vp-sponsor-grid.big .vp-sponsor-grid-link { + height: 184px; +} +.vp-sponsor-grid.big .vp-sponsor-grid-image { + max-width: 192px; + max-height: 56px; +} + +.vp-sponsor-grid[data-vp-grid='2'] .vp-sponsor-grid-item { + width: calc((100% - 4px) / 2); +} + +.vp-sponsor-grid[data-vp-grid='3'] .vp-sponsor-grid-item { + width: calc((100% - 4px * 2) / 3); +} + +.vp-sponsor-grid[data-vp-grid='4'] .vp-sponsor-grid-item { + width: calc((100% - 4px * 3) / 4); +} + +.vp-sponsor-grid[data-vp-grid='5'] .vp-sponsor-grid-item { + width: calc((100% - 4px * 4) / 5); +} + +.vp-sponsor-grid[data-vp-grid='6'] .vp-sponsor-grid-item { + width: calc((100% - 4px * 5) / 6); +} + +.vp-sponsor-grid-item { + flex-shrink: 0; + width: 100%; + background-color: var(--vp-c-bg-soft); + transition: background-color 0.25s; +} + +.vp-sponsor-grid-item:hover { + background-color: var(--vp-c-default-soft); +} + +.vp-sponsor-grid-item:hover .vp-sponsor-grid-image { + filter: grayscale(0) invert(0); +} + +.vp-sponsor-grid-item.empty:hover { + background-color: var(--vp-c-bg-soft); +} + +.dark .vp-sponsor-grid-item:hover { + background-color: var(--vp-c-white); +} + +.dark .vp-sponsor-grid-item.empty:hover { + background-color: var(--vp-c-bg-soft); +} + +.vp-sponsor-grid-link { + display: flex; +} + +.vp-sponsor-grid-box { + display: flex; + justify-content: center; + align-items: center; + width: 100%; +} + +.vp-sponsor-grid-image { + max-width: 100%; + filter: grayscale(1); + transition: filter 0.25s; +} + +.dark .vp-sponsor-grid-image { + filter: grayscale(1) invert(1); +} + +.VPBadge { + display: inline-block; + margin-left: 2px; + border: 1px solid transparent; + border-radius: 12px; + padding: 0 10px; + line-height: 22px; + font-size: 12px; + font-weight: 500; + transform: translateY(-2px); +} +.VPBadge.small { + padding: 0 6px; + line-height: 18px; + font-size: 10px; + transform: translateY(-8px); +} +.VPDocFooter .VPBadge { + display: none; +} +.vp-doc h1 > .VPBadge { + margin-top: 4px; + vertical-align: top; +} +.vp-doc h2 > .VPBadge { + margin-top: 3px; + padding: 0 8px; + vertical-align: top; +} +.vp-doc h3 > .VPBadge { + vertical-align: middle; +} +.vp-doc h4 > .VPBadge, +.vp-doc h5 > .VPBadge, +.vp-doc h6 > .VPBadge { + vertical-align: middle; + line-height: 18px; +} +.VPBadge.info { + border-color: var(--vp-badge-info-border); + color: var(--vp-badge-info-text); + background-color: var(--vp-badge-info-bg); +} +.VPBadge.tip { + border-color: var(--vp-badge-tip-border); + color: var(--vp-badge-tip-text); + background-color: var(--vp-badge-tip-bg); +} +.VPBadge.warning { + border-color: var(--vp-badge-warning-border); + color: var(--vp-badge-warning-text); + background-color: var(--vp-badge-warning-bg); +} +.VPBadge.danger { + border-color: var(--vp-badge-danger-border); + color: var(--vp-badge-danger-text); + background-color: var(--vp-badge-danger-bg); +} + +.VPBackdrop[data-v-c79a1216] { + position: fixed; + top: 0; + /*rtl:ignore*/ + right: 0; + bottom: 0; + /*rtl:ignore*/ + left: 0; + z-index: var(--vp-z-index-backdrop); + background: var(--vp-backdrop-bg-color); + transition: opacity 0.5s; +} +.VPBackdrop.fade-enter-from[data-v-c79a1216], +.VPBackdrop.fade-leave-to[data-v-c79a1216] { + opacity: 0; +} +.VPBackdrop.fade-leave-active[data-v-c79a1216] { + transition-duration: .25s; +} +@media (min-width: 1280px) { +.VPBackdrop[data-v-c79a1216] { + display: none; +} +} + +.NotFound[data-v-f87ff6e4] { + padding: 64px 24px 96px; + text-align: center; +} +@media (min-width: 768px) { +.NotFound[data-v-f87ff6e4] { + padding: 96px 32px 168px; +} +} +.code[data-v-f87ff6e4] { + line-height: 64px; + font-size: 64px; + font-weight: 600; +} +.title[data-v-f87ff6e4] { + padding-top: 12px; + letter-spacing: 2px; + line-height: 20px; + font-size: 20px; + font-weight: 700; +} +.divider[data-v-f87ff6e4] { + margin: 24px auto 18px; + width: 64px; + height: 1px; + background-color: var(--vp-c-divider); +} +.quote[data-v-f87ff6e4] { + margin: 0 auto; + max-width: 256px; + font-size: 14px; + font-weight: 500; + color: var(--vp-c-text-2); +} +.action[data-v-f87ff6e4] { + padding-top: 20px; +} +.link[data-v-f87ff6e4] { + display: inline-block; + border: 1px solid var(--vp-c-brand-1); + border-radius: 16px; + padding: 3px 16px; + font-size: 14px; + font-weight: 500; + color: var(--vp-c-brand-1); + transition: + border-color 0.25s, + color 0.25s; +} +.link[data-v-f87ff6e4]:hover { + border-color: var(--vp-c-brand-2); + color: var(--vp-c-brand-2); +} + +.root[data-v-b933a997] { + position: relative; + z-index: 1; +} +.nested[data-v-b933a997] { + padding-right: 16px; + padding-left: 16px; +} +.outline-link[data-v-b933a997] { + display: block; + line-height: 32px; + font-size: 14px; + font-weight: 400; + color: var(--vp-c-text-2); + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + transition: color 0.5s; +} +.outline-link[data-v-b933a997]:hover, +.outline-link.active[data-v-b933a997] { + color: var(--vp-c-text-1); + transition: color 0.25s; +} +.outline-link.nested[data-v-b933a997] { + padding-left: 13px; +} + +.VPDocAsideOutline[data-v-935f8a84] { + display: none; +} +.VPDocAsideOutline.has-outline[data-v-935f8a84] { + display: block; +} +.content[data-v-935f8a84] { + position: relative; + border-left: 1px solid var(--vp-c-divider); + padding-left: 16px; + font-size: 13px; + font-weight: 500; +} +.outline-marker[data-v-935f8a84] { + position: absolute; + top: 32px; + left: -1px; + z-index: 0; + opacity: 0; + width: 2px; + border-radius: 2px; + height: 18px; + background-color: var(--vp-c-brand-1); + transition: + top 0.25s cubic-bezier(0, 1, 0.5, 1), + background-color 0.5s, + opacity 0.25s; +} +.outline-title[data-v-935f8a84] { + line-height: 32px; + font-size: 14px; + font-weight: 600; +} + +.VPDocAside[data-v-3f215769] { + display: flex; + flex-direction: column; + flex-grow: 1; +} +.spacer[data-v-3f215769] { + flex-grow: 1; +} +.VPDocAside[data-v-3f215769] .spacer + .VPDocAsideSponsors, +.VPDocAside[data-v-3f215769] .spacer + .VPDocAsideCarbonAds { + margin-top: 24px; +} +.VPDocAside[data-v-3f215769] .VPDocAsideSponsors + .VPDocAsideCarbonAds { + margin-top: 16px; +} + +.VPLastUpdated[data-v-7e05ebdb] { + line-height: 24px; + font-size: 14px; + font-weight: 500; + color: var(--vp-c-text-2); +} +@media (min-width: 640px) { +.VPLastUpdated[data-v-7e05ebdb] { + line-height: 32px; + font-size: 14px; + font-weight: 500; +} +} + +.VPDocFooter[data-v-48f9bb55] { + margin-top: 64px; +} +.edit-info[data-v-48f9bb55] { + padding-bottom: 18px; +} +@media (min-width: 640px) { +.edit-info[data-v-48f9bb55] { + display: flex; + justify-content: space-between; + align-items: center; + padding-bottom: 14px; +} +} +.edit-link-button[data-v-48f9bb55] { + display: flex; + align-items: center; + border: 0; + line-height: 32px; + font-size: 14px; + font-weight: 500; + color: var(--vp-c-brand-1); + transition: color 0.25s; +} +.edit-link-button[data-v-48f9bb55]:hover { + color: var(--vp-c-brand-2); +} +.edit-link-icon[data-v-48f9bb55] { + margin-right: 8px; + width: 14px; + height: 14px; + fill: currentColor; +} +.prev-next[data-v-48f9bb55] { + border-top: 1px solid var(--vp-c-divider); + padding-top: 24px; + display: grid; + grid-row-gap: 8px; +} +@media (min-width: 640px) { +.prev-next[data-v-48f9bb55] { + grid-template-columns: repeat(2, 1fr); + grid-column-gap: 16px; +} +} +.pager-link[data-v-48f9bb55] { + display: block; + border: 1px solid var(--vp-c-divider); + border-radius: 8px; + padding: 11px 16px 13px; + width: 100%; + height: 100%; + transition: border-color 0.25s; +} +.pager-link[data-v-48f9bb55]:hover { + border-color: var(--vp-c-brand-1); +} +.pager-link.next[data-v-48f9bb55] { + margin-left: auto; + text-align: right; +} +.desc[data-v-48f9bb55] { + display: block; + line-height: 20px; + font-size: 12px; + font-weight: 500; + color: var(--vp-c-text-2); +} +.title[data-v-48f9bb55] { + display: block; + line-height: 20px; + font-size: 14px; + font-weight: 500; + color: var(--vp-c-brand-1); + transition: color 0.25s; +} + +.VPDoc[data-v-39a288b8] { + padding: 32px 24px 96px; + width: 100%; +} +@media (min-width: 768px) { +.VPDoc[data-v-39a288b8] { + padding: 48px 32px 128px; +} +} +@media (min-width: 960px) { +.VPDoc[data-v-39a288b8] { + padding: 48px 32px 0; +} +.VPDoc:not(.has-sidebar) .container[data-v-39a288b8] { + display: flex; + justify-content: center; + max-width: 992px; +} +.VPDoc:not(.has-sidebar) .content[data-v-39a288b8] { + max-width: 752px; +} +} +@media (min-width: 1280px) { +.VPDoc .container[data-v-39a288b8] { + display: flex; + justify-content: center; +} +.VPDoc .aside[data-v-39a288b8] { + display: block; +} +} +@media (min-width: 1440px) { +.VPDoc:not(.has-sidebar) .content[data-v-39a288b8] { + max-width: 784px; +} +.VPDoc:not(.has-sidebar) .container[data-v-39a288b8] { + max-width: 1104px; +} +} +.container[data-v-39a288b8] { + margin: 0 auto; + width: 100%; +} +.aside[data-v-39a288b8] { + position: relative; + display: none; + order: 2; + flex-grow: 1; + padding-left: 32px; + width: 100%; + max-width: 256px; +} +.left-aside[data-v-39a288b8] { + order: 1; + padding-left: unset; + padding-right: 32px; +} +.aside-container[data-v-39a288b8] { + position: fixed; + top: 0; + padding-top: calc(var(--vp-nav-height) + var(--vp-layout-top-height, 0px) + var(--vp-doc-top-height, 0px) + 48px); + width: 224px; + height: 100vh; + overflow-x: hidden; + overflow-y: auto; + scrollbar-width: none; +} +.aside-container[data-v-39a288b8]::-webkit-scrollbar { + display: none; +} +.aside-curtain[data-v-39a288b8] { + position: fixed; + bottom: 0; + z-index: 10; + width: 224px; + height: 32px; + background: linear-gradient(transparent, var(--vp-c-bg) 70%); +} +.aside-content[data-v-39a288b8] { + display: flex; + flex-direction: column; + min-height: calc(100vh - (var(--vp-nav-height) + var(--vp-layout-top-height, 0px) + 48px)); + padding-bottom: 32px; +} +.content[data-v-39a288b8] { + position: relative; + margin: 0 auto; + width: 100%; +} +@media (min-width: 960px) { +.content[data-v-39a288b8] { + padding: 0 32px 128px; +} +} +@media (min-width: 1280px) { +.content[data-v-39a288b8] { + order: 1; + margin: 0; + min-width: 640px; +} +} +.content-container[data-v-39a288b8] { + margin: 0 auto; +} +.VPDoc.has-aside .content-container[data-v-39a288b8] { + max-width: 688px; +} + +.VPButton[data-v-c1c5efc1] { + display: inline-block; + border: 1px solid transparent; + text-align: center; + font-weight: 600; + white-space: nowrap; + transition: color 0.25s, border-color 0.25s, background-color 0.25s; +} +.VPButton[data-v-c1c5efc1]:active { + transition: color 0.1s, border-color 0.1s, background-color 0.1s; +} +.VPButton.medium[data-v-c1c5efc1] { + border-radius: 20px; + padding: 0 20px; + line-height: 38px; + font-size: 14px; +} +.VPButton.big[data-v-c1c5efc1] { + border-radius: 24px; + padding: 0 24px; + line-height: 46px; + font-size: 16px; +} +.VPButton.brand[data-v-c1c5efc1] { + border-color: var(--vp-button-brand-border); + color: var(--vp-button-brand-text); + background-color: var(--vp-button-brand-bg); +} +.VPButton.brand[data-v-c1c5efc1]:hover { + border-color: var(--vp-button-brand-hover-border); + color: var(--vp-button-brand-hover-text); + background-color: var(--vp-button-brand-hover-bg); +} +.VPButton.brand[data-v-c1c5efc1]:active { + border-color: var(--vp-button-brand-active-border); + color: var(--vp-button-brand-active-text); + background-color: var(--vp-button-brand-active-bg); +} +.VPButton.alt[data-v-c1c5efc1] { + border-color: var(--vp-button-alt-border); + color: var(--vp-button-alt-text); + background-color: var(--vp-button-alt-bg); +} +.VPButton.alt[data-v-c1c5efc1]:hover { + border-color: var(--vp-button-alt-hover-border); + color: var(--vp-button-alt-hover-text); + background-color: var(--vp-button-alt-hover-bg); +} +.VPButton.alt[data-v-c1c5efc1]:active { + border-color: var(--vp-button-alt-active-border); + color: var(--vp-button-alt-active-text); + background-color: var(--vp-button-alt-active-bg); +} +.VPButton.sponsor[data-v-c1c5efc1] { + border-color: var(--vp-button-sponsor-border); + color: var(--vp-button-sponsor-text); + background-color: var(--vp-button-sponsor-bg); +} +.VPButton.sponsor[data-v-c1c5efc1]:hover { + border-color: var(--vp-button-sponsor-hover-border); + color: var(--vp-button-sponsor-hover-text); + background-color: var(--vp-button-sponsor-hover-bg); +} +.VPButton.sponsor[data-v-c1c5efc1]:active { + border-color: var(--vp-button-sponsor-active-border); + color: var(--vp-button-sponsor-active-text); + background-color: var(--vp-button-sponsor-active-bg); +} + +html:not(.dark) .VPImage.dark[data-v-8426fc1a] { + display: none; +} +.dark .VPImage.light[data-v-8426fc1a] { + display: none; +} + +.VPHero[data-v-da5d1713] { + margin-top: calc((var(--vp-nav-height) + var(--vp-layout-top-height, 0px)) * -1); + padding: calc(var(--vp-nav-height) + var(--vp-layout-top-height, 0px) + 48px) 24px 48px; +} +@media (min-width: 640px) { +.VPHero[data-v-da5d1713] { + padding: calc(var(--vp-nav-height) + var(--vp-layout-top-height, 0px) + 80px) 48px 64px; +} +} +@media (min-width: 960px) { +.VPHero[data-v-da5d1713] { + padding: calc(var(--vp-nav-height) + var(--vp-layout-top-height, 0px) + 80px) 64px 64px; +} +} +.container[data-v-da5d1713] { + display: flex; + flex-direction: column; + margin: 0 auto; + max-width: 1152px; +} +@media (min-width: 960px) { +.container[data-v-da5d1713] { + flex-direction: row; +} +} +.main[data-v-da5d1713] { + position: relative; + z-index: 10; + order: 2; + flex-grow: 1; + flex-shrink: 0; +} +.VPHero.has-image .container[data-v-da5d1713] { + text-align: center; +} +@media (min-width: 960px) { +.VPHero.has-image .container[data-v-da5d1713] { + text-align: left; +} +} +@media (min-width: 960px) { +.main[data-v-da5d1713] { + order: 1; + width: calc((100% / 3) * 2); +} +.VPHero.has-image .main[data-v-da5d1713] { + max-width: 592px; +} +} +.name[data-v-da5d1713], +.text[data-v-da5d1713] { + max-width: 392px; + letter-spacing: -0.4px; + line-height: 40px; + font-size: 32px; + font-weight: 700; + white-space: pre-wrap; +} +.VPHero.has-image .name[data-v-da5d1713], +.VPHero.has-image .text[data-v-da5d1713] { + margin: 0 auto; +} +.name[data-v-da5d1713] { + color: var(--vp-home-hero-name-color); +} +.clip[data-v-da5d1713] { + background: var(--vp-home-hero-name-background); + -webkit-background-clip: text; + background-clip: text; + -webkit-text-fill-color: var(--vp-home-hero-name-color); +} +@media (min-width: 640px) { +.name[data-v-da5d1713], + .text[data-v-da5d1713] { + max-width: 576px; + line-height: 56px; + font-size: 48px; +} +} +@media (min-width: 960px) { +.name[data-v-da5d1713], + .text[data-v-da5d1713] { + line-height: 64px; + font-size: 56px; +} +.VPHero.has-image .name[data-v-da5d1713], + .VPHero.has-image .text[data-v-da5d1713] { + margin: 0; +} +} +.tagline[data-v-da5d1713] { + padding-top: 8px; + max-width: 392px; + line-height: 28px; + font-size: 18px; + font-weight: 500; + white-space: pre-wrap; + color: var(--vp-c-text-2); +} +.VPHero.has-image .tagline[data-v-da5d1713] { + margin: 0 auto; +} +@media (min-width: 640px) { +.tagline[data-v-da5d1713] { + padding-top: 12px; + max-width: 576px; + line-height: 32px; + font-size: 20px; +} +} +@media (min-width: 960px) { +.tagline[data-v-da5d1713] { + line-height: 36px; + font-size: 24px; +} +.VPHero.has-image .tagline[data-v-da5d1713] { + margin: 0; +} +} +.actions[data-v-da5d1713] { + display: flex; + flex-wrap: wrap; + margin: -6px; + padding-top: 24px; +} +.VPHero.has-image .actions[data-v-da5d1713] { + justify-content: center; +} +@media (min-width: 640px) { +.actions[data-v-da5d1713] { + padding-top: 32px; +} +} +@media (min-width: 960px) { +.VPHero.has-image .actions[data-v-da5d1713] { + justify-content: flex-start; +} +} +.action[data-v-da5d1713] { + flex-shrink: 0; + padding: 6px; +} +.image[data-v-da5d1713] { + order: 1; + margin: -76px -24px -48px; +} +@media (min-width: 640px) { +.image[data-v-da5d1713] { + margin: -108px -24px -48px; +} +} +@media (min-width: 960px) { +.image[data-v-da5d1713] { + flex-grow: 1; + order: 2; + margin: 0; + min-height: 100%; +} +} +.image-container[data-v-da5d1713] { + position: relative; + margin: 0 auto; + width: 320px; + height: 320px; +} +@media (min-width: 640px) { +.image-container[data-v-da5d1713] { + width: 392px; + height: 392px; +} +} +@media (min-width: 960px) { +.image-container[data-v-da5d1713] { + display: flex; + justify-content: center; + align-items: center; + width: 100%; + height: 100%; + /*rtl:ignore*/ + transform: translate(-32px, -32px); +} +} +.image-bg[data-v-da5d1713] { + position: absolute; + top: 50%; + /*rtl:ignore*/ + left: 50%; + border-radius: 50%; + width: 192px; + height: 192px; + background-image: var(--vp-home-hero-image-background-image); + filter: var(--vp-home-hero-image-filter); + /*rtl:ignore*/ + transform: translate(-50%, -50%); +} +@media (min-width: 640px) { +.image-bg[data-v-da5d1713] { + width: 256px; + height: 256px; +} +} +@media (min-width: 960px) { +.image-bg[data-v-da5d1713] { + width: 320px; + height: 320px; +} +} +[data-v-da5d1713] .image-src { + position: absolute; + top: 50%; + /*rtl:ignore*/ + left: 50%; + max-width: 192px; + max-height: 192px; + /*rtl:ignore*/ + transform: translate(-50%, -50%); +} +@media (min-width: 640px) { +[data-v-da5d1713] .image-src { + max-width: 256px; + max-height: 256px; +} +} +@media (min-width: 960px) { +[data-v-da5d1713] .image-src { + max-width: 320px; + max-height: 320px; +} +} + +.VPFeature[data-v-33204567] { + display: block; + border: 1px solid var(--vp-c-bg-soft); + border-radius: 12px; + height: 100%; + background-color: var(--vp-c-bg-soft); + transition: border-color 0.25s, background-color 0.25s; +} +.VPFeature.link[data-v-33204567]:hover { + border-color: var(--vp-c-brand-1); +} +.box[data-v-33204567] { + display: flex; + flex-direction: column; + padding: 24px; + height: 100%; +} +.box[data-v-33204567] > .VPImage { + margin-bottom: 20px; +} +.icon[data-v-33204567] { + display: flex; + justify-content: center; + align-items: center; + margin-bottom: 20px; + border-radius: 6px; + background-color: var(--vp-c-default-soft); + width: 48px; + height: 48px; + font-size: 24px; + transition: background-color 0.25s; +} +.title[data-v-33204567] { + line-height: 24px; + font-size: 16px; + font-weight: 600; +} +.details[data-v-33204567] { + flex-grow: 1; + padding-top: 8px; + line-height: 24px; + font-size: 14px; + font-weight: 500; + color: var(--vp-c-text-2); +} +.link-text[data-v-33204567] { + padding-top: 8px; +} +.link-text-value[data-v-33204567] { + display: flex; + align-items: center; + font-size: 14px; + font-weight: 500; + color: var(--vp-c-brand-1); +} +.link-text-icon[data-v-33204567] { + display: inline-block; + margin-left: 6px; + width: 14px; + height: 14px; + fill: currentColor; +} + +.VPFeatures[data-v-a6181336] { + position: relative; + padding: 0 24px; +} +@media (min-width: 640px) { +.VPFeatures[data-v-a6181336] { + padding: 0 48px; +} +} +@media (min-width: 960px) { +.VPFeatures[data-v-a6181336] { + padding: 0 64px; +} +} +.container[data-v-a6181336] { + margin: 0 auto; + max-width: 1152px; +} +.items[data-v-a6181336] { + display: flex; + flex-wrap: wrap; + margin: -8px; +} +.item[data-v-a6181336] { + padding: 8px; + width: 100%; +} +@media (min-width: 640px) { +.item.grid-2[data-v-a6181336], + .item.grid-4[data-v-a6181336], + .item.grid-6[data-v-a6181336] { + width: calc(100% / 2); +} +} +@media (min-width: 768px) { +.item.grid-2[data-v-a6181336], + .item.grid-4[data-v-a6181336] { + width: calc(100% / 2); +} +.item.grid-3[data-v-a6181336], + .item.grid-6[data-v-a6181336] { + width: calc(100% / 3); +} +} +@media (min-width: 960px) { +.item.grid-4[data-v-a6181336] { + width: calc(100% / 4); +} +} + +.VPHome[data-v-d82743a8] { + padding-bottom: 96px; +} +.VPHome[data-v-d82743a8] .VPHomeSponsors { + margin-top: 112px; + margin-bottom: -128px; +} +@media (min-width: 768px) { +.VPHome[data-v-d82743a8] { + padding-bottom: 128px; +} +} + +.VPContent[data-v-669faec9] { + flex-grow: 1; + flex-shrink: 0; + margin: var(--vp-layout-top-height, 0px) auto 0; + width: 100%; +} +.VPContent.is-home[data-v-669faec9] { + width: 100%; + max-width: 100%; +} +.VPContent.has-sidebar[data-v-669faec9] { + margin: 0; +} +@media (min-width: 960px) { +.VPContent[data-v-669faec9] { + padding-top: var(--vp-nav-height); +} +.VPContent.has-sidebar[data-v-669faec9] { + margin: var(--vp-layout-top-height, 0px) 0 0; + padding-left: var(--vp-sidebar-width); +} +} +@media (min-width: 1440px) { +.VPContent.has-sidebar[data-v-669faec9] { + padding-right: calc((100vw - var(--vp-layout-max-width)) / 2); + padding-left: calc((100vw - var(--vp-layout-max-width)) / 2 + var(--vp-sidebar-width)); +} +} + +.VPFooter[data-v-e315a0ad] { + position: relative; + z-index: var(--vp-z-index-footer); + border-top: 1px solid var(--vp-c-gutter); + padding: 32px 24px; + background-color: var(--vp-c-bg); +} +.VPFooter.has-sidebar[data-v-e315a0ad] { + display: none; +} +.VPFooter[data-v-e315a0ad] a { + text-decoration-line: underline; + text-underline-offset: 2px; + transition: color 0.25s; +} +.VPFooter[data-v-e315a0ad] a:hover { + color: var(--vp-c-text-1); +} +@media (min-width: 768px) { +.VPFooter[data-v-e315a0ad] { + padding: 32px; +} +} +.container[data-v-e315a0ad] { + margin: 0 auto; + max-width: var(--vp-layout-max-width); + text-align: center; +} +.message[data-v-e315a0ad], +.copyright[data-v-e315a0ad] { + line-height: 24px; + font-size: 14px; + font-weight: 500; + color: var(--vp-c-text-2); +} + +.VPLocalNavOutlineDropdown[data-v-af18c0d5] { + padding: 12px 20px 11px; +} +@media (min-width: 960px) { +.VPLocalNavOutlineDropdown[data-v-af18c0d5] { + padding: 12px 36px 11px; +} +} +.VPLocalNavOutlineDropdown button[data-v-af18c0d5] { + display: block; + font-size: 12px; + font-weight: 500; + line-height: 24px; + color: var(--vp-c-text-2); + transition: color 0.5s; + position: relative; +} +.VPLocalNavOutlineDropdown button[data-v-af18c0d5]:hover { + color: var(--vp-c-text-1); + transition: color 0.25s; +} +.VPLocalNavOutlineDropdown button.open[data-v-af18c0d5] { + color: var(--vp-c-text-1); +} +@media (min-width: 960px) { +.VPLocalNavOutlineDropdown button[data-v-af18c0d5] { + font-size: 14px; +} +} +.icon[data-v-af18c0d5] { + display: inline-block; + vertical-align: middle; + margin-left: 2px; + width: 14px; + height: 14px; + fill: currentColor; +} +.open > .icon[data-v-af18c0d5] { + transform: rotate(90deg); +} +.items[data-v-af18c0d5] { + position: absolute; + top: 40px; + right: 16px; + left: 16px; + display: grid; + gap: 1px; + border: 1px solid var(--vp-c-border); + border-radius: 8px; + background-color: var(--vp-c-gutter); + max-height: calc(var(--vp-vh, 100vh) - 86px); + overflow: hidden auto; + box-shadow: var(--vp-shadow-3); +} +@media (min-width: 960px) { +.items[data-v-af18c0d5] { + right: auto; + left: calc(var(--vp-sidebar-width) + 32px); + width: 320px; +} +} +.header[data-v-af18c0d5] { + background-color: var(--vp-c-bg-soft); +} +.top-link[data-v-af18c0d5] { + display: block; + padding: 0 16px; + line-height: 48px; + font-size: 14px; + font-weight: 500; + color: var(--vp-c-brand-1); +} +.outline[data-v-af18c0d5] { + padding: 8px 0; + background-color: var(--vp-c-bg-soft); +} +.flyout-enter-active[data-v-af18c0d5] { + transition: all 0.2s ease-out; +} +.flyout-leave-active[data-v-af18c0d5] { + transition: all 0.15s ease-in; +} +.flyout-enter-from[data-v-af18c0d5], +.flyout-leave-to[data-v-af18c0d5] { + opacity: 0; + transform: translateY(-16px); +} + +.VPLocalNav[data-v-0282ae07] { + position: sticky; + top: 0; + /*rtl:ignore*/ + left: 0; + z-index: var(--vp-z-index-local-nav); + border-bottom: 1px solid var(--vp-c-gutter); + padding-top: var(--vp-layout-top-height, 0px); + width: 100%; + background-color: var(--vp-local-nav-bg-color); +} +.VPLocalNav.fixed[data-v-0282ae07] { + position: fixed; +} +@media (min-width: 960px) { +.VPLocalNav[data-v-0282ae07] { + top: var(--vp-nav-height); +} +.VPLocalNav.has-sidebar[data-v-0282ae07] { + padding-left: var(--vp-sidebar-width); +} +.VPLocalNav.empty[data-v-0282ae07] { + display: none; +} +} +@media (min-width: 1280px) { +.VPLocalNav[data-v-0282ae07] { + display: none; +} +} +@media (min-width: 1440px) { +.VPLocalNav.has-sidebar[data-v-0282ae07] { + padding-left: calc((100vw - var(--vp-layout-max-width)) / 2 + var(--vp-sidebar-width)); +} +} +.container[data-v-0282ae07] { + display: flex; + justify-content: space-between; + align-items: center; +} +.menu[data-v-0282ae07] { + display: flex; + align-items: center; + padding: 12px 24px 11px; + line-height: 24px; + font-size: 12px; + font-weight: 500; + color: var(--vp-c-text-2); + transition: color 0.5s; +} +.menu[data-v-0282ae07]:hover { + color: var(--vp-c-text-1); + transition: color 0.25s; +} +@media (min-width: 768px) { +.menu[data-v-0282ae07] { + padding: 0 32px; +} +} +@media (min-width: 960px) { +.menu[data-v-0282ae07] { + display: none; +} +} +.menu-icon[data-v-0282ae07] { + margin-right: 8px; + width: 16px; + height: 16px; + fill: currentColor; +} +.VPOutlineDropdown[data-v-0282ae07] { + padding: 12px 24px 11px; +} +@media (min-width: 768px) { +.VPOutlineDropdown[data-v-0282ae07] { + padding: 12px 32px 11px; +} +} + +.VPSwitch[data-v-b1685198] { + position: relative; + border-radius: 11px; + display: block; + width: 40px; + height: 22px; + flex-shrink: 0; + border: 1px solid var(--vp-input-border-color); + background-color: var(--vp-input-switch-bg-color); + transition: border-color 0.25s !important; +} +.VPSwitch[data-v-b1685198]:hover { + border-color: var(--vp-c-brand-1); +} +.check[data-v-b1685198] { + position: absolute; + top: 1px; + /*rtl:ignore*/ + left: 1px; + width: 18px; + height: 18px; + border-radius: 50%; + background-color: var(--vp-c-neutral-inverse); + box-shadow: var(--vp-shadow-1); + transition: transform 0.25s !important; +} +.icon[data-v-b1685198] { + position: relative; + display: block; + width: 18px; + height: 18px; + border-radius: 50%; + overflow: hidden; +} +.icon[data-v-b1685198] svg { + position: absolute; + top: 3px; + left: 3px; + width: 12px; + height: 12px; + fill: var(--vp-c-text-2); +} +.dark .icon[data-v-b1685198] svg { + fill: var(--vp-c-text-1); + transition: opacity 0.25s !important; +} + +.sun[data-v-1736f215] { + opacity: 1; +} +.moon[data-v-1736f215] { + opacity: 0; +} +.dark .sun[data-v-1736f215] { + opacity: 0; +} +.dark .moon[data-v-1736f215] { + opacity: 1; +} +.dark .VPSwitchAppearance[data-v-1736f215] .check { + /*rtl:ignore*/ + transform: translateX(18px); +} + +.VPNavBarAppearance[data-v-e6aabb21] { + display: none; +} +@media (min-width: 1280px) { +.VPNavBarAppearance[data-v-e6aabb21] { + display: flex; + align-items: center; +} +} + +.VPMenuGroup + .VPMenuLink[data-v-43f1e123] { + margin: 12px -12px 0; + border-top: 1px solid var(--vp-c-divider); + padding: 12px 12px 0; +} +.link[data-v-43f1e123] { + display: block; + border-radius: 6px; + padding: 0 12px; + line-height: 32px; + font-size: 14px; + font-weight: 500; + color: var(--vp-c-text-1); + white-space: nowrap; + transition: background-color 0.25s, color 0.25s; +} +.link[data-v-43f1e123]:hover { + color: var(--vp-c-brand-1); + background-color: var(--vp-c-default-soft); +} +.link.active[data-v-43f1e123] { + color: var(--vp-c-brand-1); +} + +.VPMenuGroup[data-v-69e747b5] { + margin: 12px -12px 0; + border-top: 1px solid var(--vp-c-divider); + padding: 12px 12px 0; +} +.VPMenuGroup[data-v-69e747b5]:first-child { + margin-top: 0; + border-top: 0; + padding-top: 0; +} +.VPMenuGroup + .VPMenuGroup[data-v-69e747b5] { + margin-top: 12px; + border-top: 1px solid var(--vp-c-divider); +} +.title[data-v-69e747b5] { + padding: 0 12px; + line-height: 32px; + font-size: 14px; + font-weight: 600; + color: var(--vp-c-text-2); + white-space: nowrap; + transition: color 0.25s; +} + +.VPMenu[data-v-e7ea1737] { + border-radius: 12px; + padding: 12px; + min-width: 128px; + border: 1px solid var(--vp-c-divider); + background-color: var(--vp-c-bg-elv); + box-shadow: var(--vp-shadow-3); + transition: background-color 0.5s; + max-height: calc(100vh - var(--vp-nav-height)); + overflow-y: auto; +} +.VPMenu[data-v-e7ea1737] .group { + margin: 0 -12px; + padding: 0 12px 12px; +} +.VPMenu[data-v-e7ea1737] .group + .group { + border-top: 1px solid var(--vp-c-divider); + padding: 11px 12px 12px; +} +.VPMenu[data-v-e7ea1737] .group:last-child { + padding-bottom: 0; +} +.VPMenu[data-v-e7ea1737] .group + .item { + border-top: 1px solid var(--vp-c-divider); + padding: 11px 16px 0; +} +.VPMenu[data-v-e7ea1737] .item { + padding: 0 16px; + white-space: nowrap; +} +.VPMenu[data-v-e7ea1737] .label { + flex-grow: 1; + line-height: 28px; + font-size: 12px; + font-weight: 500; + color: var(--vp-c-text-2); + transition: color .5s; +} +.VPMenu[data-v-e7ea1737] .action { + padding-left: 24px; +} + +.VPFlyout[data-v-9c007e85] { + position: relative; +} +.VPFlyout[data-v-9c007e85]:hover { + color: var(--vp-c-brand-1); + transition: color 0.25s; +} +.VPFlyout:hover .text[data-v-9c007e85] { + color: var(--vp-c-text-2); +} +.VPFlyout:hover .icon[data-v-9c007e85] { + fill: var(--vp-c-text-2); +} +.VPFlyout.active .text[data-v-9c007e85] { + color: var(--vp-c-brand-1); +} +.VPFlyout.active:hover .text[data-v-9c007e85] { + color: var(--vp-c-brand-2); +} +.VPFlyout:hover .menu[data-v-9c007e85], +.button[aria-expanded="true"] + .menu[data-v-9c007e85] { + opacity: 1; + visibility: visible; + transform: translateY(0); +} +.button[aria-expanded="false"] + .menu[data-v-9c007e85] { + opacity: 0; + visibility: hidden; + transform: translateY(0); +} +.button[data-v-9c007e85] { + display: flex; + align-items: center; + padding: 0 12px; + height: var(--vp-nav-height); + color: var(--vp-c-text-1); + transition: color 0.5s; +} +.text[data-v-9c007e85] { + display: flex; + align-items: center; + line-height: var(--vp-nav-height); + font-size: 14px; + font-weight: 500; + color: var(--vp-c-text-1); + transition: color 0.25s; +} +.option-icon[data-v-9c007e85] { + margin-right: 0px; + width: 16px; + height: 16px; + fill: currentColor; +} +.text-icon[data-v-9c007e85] { + margin-left: 4px; + width: 14px; + height: 14px; + fill: currentColor; +} +.icon[data-v-9c007e85] { + width: 20px; + height: 20px; + fill: currentColor; + transition: fill 0.25s; +} +.menu[data-v-9c007e85] { + position: absolute; + top: calc(var(--vp-nav-height) / 2 + 20px); + right: 0; + opacity: 0; + visibility: hidden; + transition: opacity 0.25s, visibility 0.25s, transform 0.25s; +} + +.VPSocialLink[data-v-f80f8133] { + display: flex; + justify-content: center; + align-items: center; + width: 36px; + height: 36px; + color: var(--vp-c-text-2); + transition: color 0.5s; +} +.VPSocialLink[data-v-f80f8133]:hover { + color: var(--vp-c-text-1); + transition: color 0.25s; +} +.VPSocialLink[data-v-f80f8133] > svg { + width: 20px; + height: 20px; + fill: currentColor; +} + +.VPSocialLinks[data-v-7bc22406] { + display: flex; + justify-content: center; +} + +.VPNavBarExtra[data-v-d0bd9dde] { + display: none; + margin-right: -12px; +} +@media (min-width: 768px) { +.VPNavBarExtra[data-v-d0bd9dde] { + display: block; +} +} +@media (min-width: 1280px) { +.VPNavBarExtra[data-v-d0bd9dde] { + display: none; +} +} +.trans-title[data-v-d0bd9dde] { + padding: 0 24px 0 12px; + line-height: 32px; + font-size: 14px; + font-weight: 700; + color: var(--vp-c-text-1); +} +.item.appearance[data-v-d0bd9dde], +.item.social-links[data-v-d0bd9dde] { + display: flex; + align-items: center; + padding: 0 12px; +} +.item.appearance[data-v-d0bd9dde] { + min-width: 176px; +} +.appearance-action[data-v-d0bd9dde] { + margin-right: -2px; +} +.social-links-list[data-v-d0bd9dde] { + margin: -4px -8px; +} + +.VPNavBarHamburger[data-v-e5dd9c1c] { + display: flex; + justify-content: center; + align-items: center; + width: 48px; + height: var(--vp-nav-height); +} +@media (min-width: 768px) { +.VPNavBarHamburger[data-v-e5dd9c1c] { + display: none; +} +} +.container[data-v-e5dd9c1c] { + position: relative; + width: 16px; + height: 14px; + overflow: hidden; +} +.VPNavBarHamburger:hover .top[data-v-e5dd9c1c] { top: 0; left: 0; transform: translateX(4px); +} +.VPNavBarHamburger:hover .middle[data-v-e5dd9c1c] { top: 6px; left: 0; transform: translateX(0); +} +.VPNavBarHamburger:hover .bottom[data-v-e5dd9c1c] { top: 12px; left: 0; transform: translateX(8px); +} +.VPNavBarHamburger.active .top[data-v-e5dd9c1c] { top: 6px; transform: translateX(0) rotate(225deg); +} +.VPNavBarHamburger.active .middle[data-v-e5dd9c1c] { top: 6px; transform: translateX(16px); +} +.VPNavBarHamburger.active .bottom[data-v-e5dd9c1c] { top: 6px; transform: translateX(0) rotate(135deg); +} +.VPNavBarHamburger.active:hover .top[data-v-e5dd9c1c], +.VPNavBarHamburger.active:hover .middle[data-v-e5dd9c1c], +.VPNavBarHamburger.active:hover .bottom[data-v-e5dd9c1c] { + background-color: var(--vp-c-text-2); + transition: top .25s, background-color .25s, transform .25s; +} +.top[data-v-e5dd9c1c], +.middle[data-v-e5dd9c1c], +.bottom[data-v-e5dd9c1c] { + position: absolute; + width: 16px; + height: 2px; + background-color: var(--vp-c-text-1); + transition: top .25s, background-color .5s, transform .25s; +} +.top[data-v-e5dd9c1c] { top: 0; left: 0; transform: translateX(0); +} +.middle[data-v-e5dd9c1c] { top: 6px; left: 0; transform: translateX(8px); +} +.bottom[data-v-e5dd9c1c] { top: 12px; left: 0; transform: translateX(4px); +} + +.VPNavBarMenuLink[data-v-42ef59de] { + display: flex; + align-items: center; + padding: 0 12px; + line-height: var(--vp-nav-height); + font-size: 14px; + font-weight: 500; + color: var(--vp-c-text-1); + transition: color 0.25s; +} +.VPNavBarMenuLink.active[data-v-42ef59de] { + color: var(--vp-c-brand-1); +} +.VPNavBarMenuLink[data-v-42ef59de]:hover { + color: var(--vp-c-brand-1); +} + +.VPNavBarMenu[data-v-7f418b0f] { + display: none; +} +@media (min-width: 768px) { +.VPNavBarMenu[data-v-7f418b0f] { + display: flex; +} +} +/*! @docsearch/css 3.5.2 | MIT License | © Algolia, Inc. and contributors | https://docsearch.algolia.com */ +:root{--docsearch-primary-color:#5468ff;--docsearch-text-color:#1c1e21;--docsearch-spacing:12px;--docsearch-icon-stroke-width:1.4;--docsearch-highlight-color:var(--docsearch-primary-color);--docsearch-muted-color:#969faf;--docsearch-container-background:rgba(101,108,133,0.8);--docsearch-logo-color:#5468ff;--docsearch-modal-width:560px;--docsearch-modal-height:600px;--docsearch-modal-background:#f5f6f7;--docsearch-modal-shadow:inset 1px 1px 0 0 hsla(0,0%,100%,0.5),0 3px 8px 0 #555a64;--docsearch-searchbox-height:56px;--docsearch-searchbox-background:#ebedf0;--docsearch-searchbox-focus-background:#fff;--docsearch-searchbox-shadow:inset 0 0 0 2px var(--docsearch-primary-color);--docsearch-hit-height:56px;--docsearch-hit-color:#444950;--docsearch-hit-active-color:#fff;--docsearch-hit-background:#fff;--docsearch-hit-shadow:0 1px 3px 0 #d4d9e1;--docsearch-key-gradient:linear-gradient(-225deg,#d5dbe4,#f8f8f8);--docsearch-key-shadow:inset 0 -2px 0 0 #cdcde6,inset 0 0 1px 1px #fff,0 1px 2px 1px rgba(30,35,90,0.4);--docsearch-footer-height:44px;--docsearch-footer-background:#fff;--docsearch-footer-shadow:0 -1px 0 0 #e0e3e8,0 -3px 6px 0 rgba(69,98,155,0.12)}html[data-theme=dark]{--docsearch-text-color:#f5f6f7;--docsearch-container-background:rgba(9,10,17,0.8);--docsearch-modal-background:#15172a;--docsearch-modal-shadow:inset 1px 1px 0 0 #2c2e40,0 3px 8px 0 #000309;--docsearch-searchbox-background:#090a11;--docsearch-searchbox-focus-background:#000;--docsearch-hit-color:#bec3c9;--docsearch-hit-shadow:none;--docsearch-hit-background:#090a11;--docsearch-key-gradient:linear-gradient(-26.5deg,#565872,#31355b);--docsearch-key-shadow:inset 0 -2px 0 0 #282d55,inset 0 0 1px 1px #51577d,0 2px 2px 0 rgba(3,4,9,0.3);--docsearch-footer-background:#1e2136;--docsearch-footer-shadow:inset 0 1px 0 0 rgba(73,76,106,0.5),0 -4px 8px 0 rgba(0,0,0,0.2);--docsearch-logo-color:#fff;--docsearch-muted-color:#7f8497}.DocSearch-Button{align-items:center;background:var(--docsearch-searchbox-background);border:0;border-radius:40px;color:var(--docsearch-muted-color);cursor:pointer;display:flex;font-weight:500;height:36px;justify-content:space-between;margin:0 0 0 16px;padding:0 8px;user-select:none}.DocSearch-Button:active,.DocSearch-Button:focus,.DocSearch-Button:hover{background:var(--docsearch-searchbox-focus-background);box-shadow:var(--docsearch-searchbox-shadow);color:var(--docsearch-text-color);outline:none}.DocSearch-Button-Container{align-items:center;display:flex}.DocSearch-Search-Icon{stroke-width:1.6}.DocSearch-Button .DocSearch-Search-Icon{color:var(--docsearch-text-color)}.DocSearch-Button-Placeholder{font-size:1rem;padding:0 12px 0 6px}.DocSearch-Button-Keys{display:flex;min-width:calc(40px + .8em)}.DocSearch-Button-Key{align-items:center;background:var(--docsearch-key-gradient);border-radius:3px;box-shadow:var(--docsearch-key-shadow);color:var(--docsearch-muted-color);display:flex;height:18px;justify-content:center;margin-right:.4em;position:relative;padding:0 0 2px;border:0;top:-1px;width:20px}@media (max-width:768px){.DocSearch-Button-Keys,.DocSearch-Button-Placeholder{display:none}}.DocSearch--active{overflow:hidden!important}.DocSearch-Container,.DocSearch-Container *{box-sizing:border-box}.DocSearch-Container{background-color:var(--docsearch-container-background);height:100vh;left:0;position:fixed;top:0;width:100vw;z-index:200}.DocSearch-Container a{text-decoration:none}.DocSearch-Link{appearance:none;background:none;border:0;color:var(--docsearch-highlight-color);cursor:pointer;font:inherit;margin:0;padding:0}.DocSearch-Modal{background:var(--docsearch-modal-background);border-radius:6px;box-shadow:var(--docsearch-modal-shadow);flex-direction:column;margin:60px auto auto;max-width:var(--docsearch-modal-width);position:relative}.DocSearch-SearchBar{display:flex;padding:var(--docsearch-spacing) var(--docsearch-spacing) 0}.DocSearch-Form{align-items:center;background:var(--docsearch-searchbox-focus-background);border-radius:4px;box-shadow:var(--docsearch-searchbox-shadow);display:flex;height:var(--docsearch-searchbox-height);margin:0;padding:0 var(--docsearch-spacing);position:relative;width:100%}.DocSearch-Input{appearance:none;background:transparent;border:0;color:var(--docsearch-text-color);flex:1;font:inherit;font-size:1.2em;height:100%;outline:none;padding:0 0 0 8px;width:80%}.DocSearch-Input::placeholder{color:var(--docsearch-muted-color);opacity:1}.DocSearch-Input::-webkit-search-cancel-button,.DocSearch-Input::-webkit-search-decoration,.DocSearch-Input::-webkit-search-results-button,.DocSearch-Input::-webkit-search-results-decoration{display:none}.DocSearch-LoadingIndicator,.DocSearch-MagnifierLabel,.DocSearch-Reset{margin:0;padding:0}.DocSearch-MagnifierLabel,.DocSearch-Reset{align-items:center;color:var(--docsearch-highlight-color);display:flex;justify-content:center}.DocSearch-Container--Stalled .DocSearch-MagnifierLabel,.DocSearch-LoadingIndicator{display:none}.DocSearch-Container--Stalled .DocSearch-LoadingIndicator{align-items:center;color:var(--docsearch-highlight-color);display:flex;justify-content:center}@media screen and (prefers-reduced-motion:reduce){.DocSearch-Reset{animation:none;appearance:none;background:none;border:0;border-radius:50%;color:var(--docsearch-icon-color);cursor:pointer;right:0;stroke-width:var(--docsearch-icon-stroke-width)}}.DocSearch-Reset{animation:fade-in .1s ease-in forwards;appearance:none;background:none;border:0;border-radius:50%;color:var(--docsearch-icon-color);cursor:pointer;padding:2px;right:0;stroke-width:var(--docsearch-icon-stroke-width)}.DocSearch-Reset[hidden]{display:none}.DocSearch-Reset:hover{color:var(--docsearch-highlight-color)}.DocSearch-LoadingIndicator svg,.DocSearch-MagnifierLabel svg{height:24px;width:24px}.DocSearch-Cancel{display:none}.DocSearch-Dropdown{max-height:calc(var(--docsearch-modal-height) - var(--docsearch-searchbox-height) - var(--docsearch-spacing) - var(--docsearch-footer-height));min-height:var(--docsearch-spacing);overflow-y:auto;overflow-y:overlay;padding:0 var(--docsearch-spacing);scrollbar-color:var(--docsearch-muted-color) var(--docsearch-modal-background);scrollbar-width:thin}.DocSearch-Dropdown::-webkit-scrollbar{width:12px}.DocSearch-Dropdown::-webkit-scrollbar-track{background:transparent}.DocSearch-Dropdown::-webkit-scrollbar-thumb{background-color:var(--docsearch-muted-color);border:3px solid var(--docsearch-modal-background);border-radius:20px}.DocSearch-Dropdown ul{list-style:none;margin:0;padding:0}.DocSearch-Label{font-size:.75em;line-height:1.6em}.DocSearch-Help,.DocSearch-Label{color:var(--docsearch-muted-color)}.DocSearch-Help{font-size:.9em;margin:0;user-select:none}.DocSearch-Title{font-size:1.2em}.DocSearch-Logo a{display:flex}.DocSearch-Logo svg{color:var(--docsearch-logo-color);margin-left:8px}.DocSearch-Hits:last-of-type{margin-bottom:24px}.DocSearch-Hits mark{background:none;color:var(--docsearch-highlight-color)}.DocSearch-HitsFooter{color:var(--docsearch-muted-color);display:flex;font-size:.85em;justify-content:center;margin-bottom:var(--docsearch-spacing);padding:var(--docsearch-spacing)}.DocSearch-HitsFooter a{border-bottom:1px solid;color:inherit}.DocSearch-Hit{border-radius:4px;display:flex;padding-bottom:4px;position:relative}@media screen and (prefers-reduced-motion:reduce){.DocSearch-Hit--deleting{transition:none}}.DocSearch-Hit--deleting{opacity:0;transition:all .25s linear}@media screen and (prefers-reduced-motion:reduce){.DocSearch-Hit--favoriting{transition:none}}.DocSearch-Hit--favoriting{transform:scale(0);transform-origin:top center;transition:all .25s linear;transition-delay:.25s}.DocSearch-Hit a{background:var(--docsearch-hit-background);border-radius:4px;box-shadow:var(--docsearch-hit-shadow);display:block;padding-left:var(--docsearch-spacing);width:100%}.DocSearch-Hit-source{background:var(--docsearch-modal-background);color:var(--docsearch-highlight-color);font-size:.85em;font-weight:600;line-height:32px;margin:0 -4px;padding:8px 4px 0;position:sticky;top:0;z-index:10}.DocSearch-Hit-Tree{color:var(--docsearch-muted-color);height:var(--docsearch-hit-height);opacity:.5;stroke-width:var(--docsearch-icon-stroke-width);width:24px}.DocSearch-Hit[aria-selected=true] a{background-color:var(--docsearch-highlight-color)}.DocSearch-Hit[aria-selected=true] mark{text-decoration:underline}.DocSearch-Hit-Container{align-items:center;color:var(--docsearch-hit-color);display:flex;flex-direction:row;height:var(--docsearch-hit-height);padding:0 var(--docsearch-spacing) 0 0}.DocSearch-Hit-icon{height:20px;width:20px}.DocSearch-Hit-action,.DocSearch-Hit-icon{color:var(--docsearch-muted-color);stroke-width:var(--docsearch-icon-stroke-width)}.DocSearch-Hit-action{align-items:center;display:flex;height:22px;width:22px}.DocSearch-Hit-action svg{display:block;height:18px;width:18px}.DocSearch-Hit-action+.DocSearch-Hit-action{margin-left:6px}.DocSearch-Hit-action-button{appearance:none;background:none;border:0;border-radius:50%;color:inherit;cursor:pointer;padding:2px}svg.DocSearch-Hit-Select-Icon{display:none}.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-Select-Icon{display:block}.DocSearch-Hit-action-button:focus,.DocSearch-Hit-action-button:hover{background:rgba(0,0,0,.2);transition:background-color .1s ease-in}@media screen and (prefers-reduced-motion:reduce){.DocSearch-Hit-action-button:focus,.DocSearch-Hit-action-button:hover{transition:none}}.DocSearch-Hit-action-button:focus path,.DocSearch-Hit-action-button:hover path{fill:#fff}.DocSearch-Hit-content-wrapper{display:flex;flex:1 1 auto;flex-direction:column;font-weight:500;justify-content:center;line-height:1.2em;margin:0 8px;overflow-x:hidden;position:relative;text-overflow:ellipsis;white-space:nowrap;width:80%}.DocSearch-Hit-title{font-size:.9em}.DocSearch-Hit-path{color:var(--docsearch-muted-color);font-size:.75em}.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-action,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-icon,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-path,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-text,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-title,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-Tree,.DocSearch-Hit[aria-selected=true] mark{color:var(--docsearch-hit-active-color)!important}@media screen and (prefers-reduced-motion:reduce){.DocSearch-Hit-action-button:focus,.DocSearch-Hit-action-button:hover{background:rgba(0,0,0,.2);transition:none}}.DocSearch-ErrorScreen,.DocSearch-NoResults,.DocSearch-StartScreen{font-size:.9em;margin:0 auto;padding:36px 0;text-align:center;width:80%}.DocSearch-Screen-Icon{color:var(--docsearch-muted-color);padding-bottom:12px}.DocSearch-NoResults-Prefill-List{display:inline-block;padding-bottom:24px;text-align:left}.DocSearch-NoResults-Prefill-List ul{display:inline-block;padding:8px 0 0}.DocSearch-NoResults-Prefill-List li{list-style-position:inside;list-style-type:"» "}.DocSearch-Prefill{appearance:none;background:none;border:0;border-radius:1em;color:var(--docsearch-highlight-color);cursor:pointer;display:inline-block;font-size:1em;font-weight:700;padding:0}.DocSearch-Prefill:focus,.DocSearch-Prefill:hover{outline:none;text-decoration:underline}.DocSearch-Footer{align-items:center;background:var(--docsearch-footer-background);border-radius:0 0 8px 8px;box-shadow:var(--docsearch-footer-shadow);display:flex;flex-direction:row-reverse;flex-shrink:0;height:var(--docsearch-footer-height);justify-content:space-between;padding:0 var(--docsearch-spacing);position:relative;user-select:none;width:100%;z-index:300}.DocSearch-Commands{color:var(--docsearch-muted-color);display:flex;list-style:none;margin:0;padding:0}.DocSearch-Commands li{align-items:center;display:flex}.DocSearch-Commands li:not(:last-of-type){margin-right:.8em}.DocSearch-Commands-Key{align-items:center;background:var(--docsearch-key-gradient);border-radius:2px;box-shadow:var(--docsearch-key-shadow);display:flex;height:18px;justify-content:center;margin-right:.4em;padding:0 0 1px;color:var(--docsearch-muted-color);border:0;width:20px}@media (max-width:768px){:root{--docsearch-spacing:10px;--docsearch-footer-height:40px}.DocSearch-Dropdown{height:100%}.DocSearch-Container{height:100vh;height:-webkit-fill-available;height:calc(var(--docsearch-vh, 1vh)*100);position:absolute}.DocSearch-Footer{border-radius:0;bottom:0;position:absolute}.DocSearch-Hit-content-wrapper{display:flex;position:relative;width:80%}.DocSearch-Modal{border-radius:0;box-shadow:none;height:100vh;height:-webkit-fill-available;height:calc(var(--docsearch-vh, 1vh)*100);margin:0;max-width:100%;width:100%}.DocSearch-Dropdown{max-height:calc(var(--docsearch-vh, 1vh)*100 - var(--docsearch-searchbox-height) - var(--docsearch-spacing) - var(--docsearch-footer-height))}.DocSearch-Cancel{appearance:none;background:none;border:0;color:var(--docsearch-highlight-color);cursor:pointer;display:inline-block;flex:none;font:inherit;font-size:1em;font-weight:500;margin-left:var(--docsearch-spacing);outline:none;overflow:hidden;padding:0;user-select:none;white-space:nowrap}.DocSearch-Commands,.DocSearch-Hit-Tree{display:none}}@keyframes fade-in{0%{opacity:0}to{opacity:1}} +[class*='DocSearch'] { + --docsearch-primary-color: var(--vp-c-brand-1); + --docsearch-highlight-color: var(--docsearch-primary-color); + --docsearch-text-color: var(--vp-c-text-1); + --docsearch-muted-color: var(--vp-c-text-2); + --docsearch-searchbox-shadow: none; + --docsearch-searchbox-background: transparent; + --docsearch-searchbox-focus-background: transparent; + --docsearch-key-gradient: transparent; + --docsearch-key-shadow: none; + --docsearch-modal-background: var(--vp-c-bg-soft); + --docsearch-footer-background: var(--vp-c-bg); +} +.dark [class*='DocSearch'] { + --docsearch-modal-shadow: none; + --docsearch-footer-shadow: none; + --docsearch-logo-color: var(--vp-c-text-2); + --docsearch-hit-background: var(--vp-c-default-soft); + --docsearch-hit-color: var(--vp-c-text-2); + --docsearch-hit-shadow: none; +} +.DocSearch-Button { + display: flex; + justify-content: center; + align-items: center; + margin: 0; + padding: 0; + width: 48px; + height: 55px; + background: transparent; + transition: border-color 0.25s; +} +.DocSearch-Button:hover { + background: transparent; +} +.DocSearch-Button:focus { + outline: 1px dotted; + outline: 5px auto -webkit-focus-ring-color; +} +.DocSearch-Button:focus:not(:focus-visible) { + outline: none !important; +} +@media (min-width: 768px) { +.DocSearch-Button { + justify-content: flex-start; + border: 1px solid transparent; + border-radius: 8px; + padding: 0 10px 0 12px; + width: 100%; + height: 40px; + background-color: var(--vp-c-bg-alt); +} +.DocSearch-Button:hover { + border-color: var(--vp-c-brand-1); + background: var(--vp-c-bg-alt); +} +} +.DocSearch-Button .DocSearch-Button-Container { + display: flex; + align-items: center; +} +.DocSearch-Button .DocSearch-Search-Icon { + position: relative; + width: 16px; + height: 16px; + color: var(--vp-c-text-1); + fill: currentColor; + transition: color 0.5s; +} +.DocSearch-Button:hover .DocSearch-Search-Icon { + color: var(--vp-c-text-1); +} +@media (min-width: 768px) { +.DocSearch-Button .DocSearch-Search-Icon { + top: 1px; + margin-right: 8px; + width: 14px; + height: 14px; + color: var(--vp-c-text-2); +} +} +.DocSearch-Button .DocSearch-Button-Placeholder { + display: none; + margin-top: 2px; + padding: 0 16px 0 0; + font-size: 13px; + font-weight: 500; + color: var(--vp-c-text-2); + transition: color 0.5s; +} +.DocSearch-Button:hover .DocSearch-Button-Placeholder { + color: var(--vp-c-text-1); +} +@media (min-width: 768px) { +.DocSearch-Button .DocSearch-Button-Placeholder { + display: inline-block; +} +} +.DocSearch-Button .DocSearch-Button-Keys { + /*rtl:ignore*/ + direction: ltr; + display: none; + min-width: auto; +} +@media (min-width: 768px) { +.DocSearch-Button .DocSearch-Button-Keys { + display: flex; + align-items: center; +} +} +.DocSearch-Button .DocSearch-Button-Key { + display: block; + margin: 2px 0 0 0; + border: 1px solid var(--vp-c-divider); + /*rtl:begin:ignore*/ + border-right: none; + border-radius: 4px 0 0 4px; + padding-left: 6px; + /*rtl:end:ignore*/ + min-width: 0; + width: auto; + height: 22px; + line-height: 22px; + font-family: var(--vp-font-family-base); + font-size: 12px; + font-weight: 500; + transition: color 0.5s, border-color 0.5s; +} +.DocSearch-Button .DocSearch-Button-Key + .DocSearch-Button-Key { + /*rtl:begin:ignore*/ + border-right: 1px solid var(--vp-c-divider); + border-left: none; + border-radius: 0 4px 4px 0; + padding-left: 2px; + padding-right: 6px; + /*rtl:end:ignore*/ +} +.DocSearch-Button .DocSearch-Button-Key:first-child { + font-size: 0 !important; +} +.DocSearch-Button .DocSearch-Button-Key:first-child:after { + content: 'Ctrl'; + font-size: 12px; + letter-spacing: normal; + color: var(--docsearch-muted-color); +} +.mac .DocSearch-Button .DocSearch-Button-Key:first-child:after { + content: '\2318'; +} +.DocSearch-Button .DocSearch-Button-Key:first-child > * { + display: none; +} + +.VPNavBarSearch { + display: flex; + align-items: center; +} +@media (min-width: 768px) { +.VPNavBarSearch { + flex-grow: 1; + padding-left: 24px; +} +} +@media (min-width: 960px) { +.VPNavBarSearch { + padding-left: 32px; +} +} +.dark .DocSearch-Footer { + border-top: 1px solid var(--vp-c-divider); +} +.DocSearch-Form { + border: 1px solid var(--vp-c-brand-1); + background-color: var(--vp-c-white); +} +.dark .DocSearch-Form { + background-color: var(--vp-c-default-soft); +} +.DocSearch-Screen-Icon > svg { + margin: auto; +} + +.VPNavBarSocialLinks[data-v-0394ad82] { + display: none; +} +@media (min-width: 1280px) { +.VPNavBarSocialLinks[data-v-0394ad82] { + display: flex; + align-items: center; +} +} + +.title[data-v-8460f0a8] { + display: flex; + align-items: center; + border-bottom: 1px solid transparent; + width: 100%; + height: var(--vp-nav-height); + font-size: 16px; + font-weight: 600; + color: var(--vp-c-text-1); + transition: opacity 0.25s; +} +@media (min-width: 960px) { +.title[data-v-8460f0a8] { + flex-shrink: 0; +} +.VPNavBarTitle.has-sidebar .title[data-v-8460f0a8] { + border-bottom-color: var(--vp-c-divider); +} +} +[data-v-8460f0a8] .logo { + margin-right: 8px; + height: var(--vp-nav-logo-height); +} + +.VPNavBarTranslations[data-v-74abcbb9] { + display: none; +} +@media (min-width: 1280px) { +.VPNavBarTranslations[data-v-74abcbb9] { + display: flex; + align-items: center; +} +} +.title[data-v-74abcbb9] { + padding: 0 24px 0 12px; + line-height: 32px; + font-size: 14px; + font-weight: 700; + color: var(--vp-c-text-1); +} + +.VPNavBar[data-v-19c990f1] { + position: relative; + height: var(--vp-nav-height); + pointer-events: none; + white-space: nowrap; + transition: background-color 0.5s; +} +.VPNavBar.has-local-nav[data-v-19c990f1] { + background-color: var(--vp-nav-bg-color); +} +@media (min-width: 960px) { +.VPNavBar.has-local-nav[data-v-19c990f1] { + background-color: transparent; +} +.VPNavBar[data-v-19c990f1]:not(.has-sidebar):not(.top) { + background-color: var(--vp-nav-bg-color); +} +} +.wrapper[data-v-19c990f1] { + padding: 0 8px 0 24px; +} +@media (min-width: 768px) { +.wrapper[data-v-19c990f1] { + padding: 0 32px; +} +} +@media (min-width: 960px) { +.VPNavBar.has-sidebar .wrapper[data-v-19c990f1] { + padding: 0; +} +} +.container[data-v-19c990f1] { + display: flex; + justify-content: space-between; + margin: 0 auto; + max-width: calc(var(--vp-layout-max-width) - 64px); + height: var(--vp-nav-height); + pointer-events: none; +} +.container > .title[data-v-19c990f1], +.container > .content[data-v-19c990f1] { + pointer-events: none; +} +.container[data-v-19c990f1] * { + pointer-events: auto; +} +@media (min-width: 960px) { +.VPNavBar.has-sidebar .container[data-v-19c990f1] { + max-width: 100%; +} +} +.title[data-v-19c990f1] { + flex-shrink: 0; + height: calc(var(--vp-nav-height) - 1px); + transition: background-color 0.5s; +} +@media (min-width: 960px) { +.VPNavBar.has-sidebar .title[data-v-19c990f1] { + position: absolute; + top: 0; + left: 0; + z-index: 2; + padding: 0 32px; + width: var(--vp-sidebar-width); + height: var(--vp-nav-height); + background-color: transparent; +} +} +@media (min-width: 1440px) { +.VPNavBar.has-sidebar .title[data-v-19c990f1] { + padding-left: max(32px, calc((100% - (var(--vp-layout-max-width) - 64px)) / 2)); + width: calc((100% - (var(--vp-layout-max-width) - 64px)) / 2 + var(--vp-sidebar-width) - 32px); +} +} +.content[data-v-19c990f1] { + flex-grow: 1; +} +@media (min-width: 960px) { +.VPNavBar.has-sidebar .content[data-v-19c990f1] { + position: relative; + z-index: 1; + padding-right: 32px; + padding-left: var(--vp-sidebar-width); +} +} +@media (min-width: 1440px) { +.VPNavBar.has-sidebar .content[data-v-19c990f1] { + padding-right: calc((100vw - var(--vp-layout-max-width)) / 2 + 32px); + padding-left: calc((100vw - var(--vp-layout-max-width)) / 2 + var(--vp-sidebar-width)); +} +} +.content-body[data-v-19c990f1] { + display: flex; + justify-content: flex-end; + align-items: center; + height: var(--vp-nav-height); + transition: background-color 0.5s; +} +@media (min-width: 960px) { +.VPNavBar:not(.top) .content-body[data-v-19c990f1] { + position: relative; + background-color: var(--vp-nav-bg-color); +} +.VPNavBar:not(.has-sidebar):not(.top) .content-body[data-v-19c990f1] { + background-color: transparent; +} +} +@media (max-width: 767px) { +.content-body[data-v-19c990f1] { + column-gap: 0.5rem; +} +} +.menu + .translations[data-v-19c990f1]::before, +.menu + .appearance[data-v-19c990f1]::before, +.menu + .social-links[data-v-19c990f1]::before, +.translations + .appearance[data-v-19c990f1]::before, +.appearance + .social-links[data-v-19c990f1]::before { + margin-right: 8px; + margin-left: 8px; + width: 1px; + height: 24px; + background-color: var(--vp-c-divider); + content: ""; +} +.menu + .appearance[data-v-19c990f1]::before, +.translations + .appearance[data-v-19c990f1]::before { + margin-right: 16px; +} +.appearance + .social-links[data-v-19c990f1]::before { + margin-left: 16px; +} +.social-links[data-v-19c990f1] { + margin-right: -8px; +} +.divider[data-v-19c990f1] { + width: 100%; + height: 1px; +} +@media (min-width: 960px) { +.VPNavBar.has-sidebar .divider[data-v-19c990f1] { + padding-left: var(--vp-sidebar-width); +} +} +@media (min-width: 1440px) { +.VPNavBar.has-sidebar .divider[data-v-19c990f1] { + padding-left: calc((100vw - var(--vp-layout-max-width)) / 2 + var(--vp-sidebar-width)); +} +} +.divider-line[data-v-19c990f1] { + width: 100%; + height: 1px; + transition: background-color 0.5s; +} +.VPNavBar.has-local-nav .divider-line[data-v-19c990f1] { + background-color: var(--vp-c-gutter); +} +@media (min-width: 960px) { +.VPNavBar:not(.top) .divider-line[data-v-19c990f1] { + background-color: var(--vp-c-gutter); +} +.VPNavBar:not(.has-sidebar):not(.top) .divider[data-v-19c990f1] { + background-color: var(--vp-c-gutter); +} +} + +.VPNavScreenAppearance[data-v-2d7af913] { + display: flex; + justify-content: space-between; + align-items: center; + border-radius: 8px; + padding: 12px 14px 12px 16px; + background-color: var(--vp-c-bg-soft); +} +.text[data-v-2d7af913] { + line-height: 24px; + font-size: 12px; + font-weight: 500; + color: var(--vp-c-text-2); +} + +.VPNavScreenMenuLink[data-v-05f27b2a] { + display: block; + border-bottom: 1px solid var(--vp-c-divider); + padding: 12px 0 11px; + line-height: 24px; + font-size: 14px; + font-weight: 500; + color: var(--vp-c-text-1); + transition: border-color 0.25s, color 0.25s; +} +.VPNavScreenMenuLink[data-v-05f27b2a]:hover { + color: var(--vp-c-brand-1); +} + +.VPNavScreenMenuGroupLink[data-v-19976ae1] { + display: block; + margin-left: 12px; + line-height: 32px; + font-size: 14px; + font-weight: 400; + color: var(--vp-c-text-1); + transition: color 0.25s; +} +.VPNavScreenMenuGroupLink[data-v-19976ae1]:hover { + color: var(--vp-c-brand-1); +} + +.VPNavScreenMenuGroupSection[data-v-8133b170] { + display: block; +} +.title[data-v-8133b170] { + line-height: 32px; + font-size: 13px; + font-weight: 700; + color: var(--vp-c-text-2); + transition: color 0.25s; +} + +.VPNavScreenMenuGroup[data-v-65ef89ca] { + border-bottom: 1px solid var(--vp-c-divider); + height: 48px; + overflow: hidden; + transition: border-color 0.5s; +} +.VPNavScreenMenuGroup .items[data-v-65ef89ca] { + visibility: hidden; +} +.VPNavScreenMenuGroup.open .items[data-v-65ef89ca] { + visibility: visible; +} +.VPNavScreenMenuGroup.open[data-v-65ef89ca] { + padding-bottom: 10px; + height: auto; +} +.VPNavScreenMenuGroup.open .button[data-v-65ef89ca] { + padding-bottom: 6px; + color: var(--vp-c-brand-1); +} +.VPNavScreenMenuGroup.open .button-icon[data-v-65ef89ca] { + /*rtl:ignore*/ + transform: rotate(45deg); +} +.button[data-v-65ef89ca] { + display: flex; + justify-content: space-between; + align-items: center; + padding: 12px 4px 11px 0; + width: 100%; + line-height: 24px; + font-size: 14px; + font-weight: 500; + color: var(--vp-c-text-1); + transition: color 0.25s; +} +.button[data-v-65ef89ca]:hover { + color: var(--vp-c-brand-1); +} +.button-icon[data-v-65ef89ca] { + width: 14px; + height: 14px; + fill: var(--vp-c-text-2); + transition: fill 0.5s, transform 0.25s; +} +.group[data-v-65ef89ca]:first-child { + padding-top: 0px; +} +.group + .group[data-v-65ef89ca], +.group + .item[data-v-65ef89ca] { + padding-top: 4px; +} + +.VPNavScreenTranslations[data-v-d72aa483] { + height: 24px; + overflow: hidden; +} +.VPNavScreenTranslations.open[data-v-d72aa483] { + height: auto; +} +.title[data-v-d72aa483] { + display: flex; + align-items: center; + font-size: 14px; + font-weight: 500; + color: var(--vp-c-text-1); +} +.icon[data-v-d72aa483] { + width: 16px; + height: 16px; + fill: currentColor; +} +.icon.lang[data-v-d72aa483] { + margin-right: 8px; +} +.icon.chevron[data-v-d72aa483] { + margin-left: 4px; +} +.list[data-v-d72aa483] { + padding: 4px 0 0 24px; +} +.link[data-v-d72aa483] { + line-height: 32px; + font-size: 13px; + color: var(--vp-c-text-1); +} + +.VPNavScreen[data-v-cc5739dd] { + position: fixed; + top: calc(var(--vp-nav-height) + var(--vp-layout-top-height, 0px) + 1px); + /*rtl:ignore*/ + right: 0; + bottom: 0; + /*rtl:ignore*/ + left: 0; + padding: 0 32px; + width: 100%; + background-color: var(--vp-nav-screen-bg-color); + overflow-y: auto; + transition: background-color 0.5s; + pointer-events: auto; +} +.VPNavScreen.fade-enter-active[data-v-cc5739dd], +.VPNavScreen.fade-leave-active[data-v-cc5739dd] { + transition: opacity 0.25s; +} +.VPNavScreen.fade-enter-active .container[data-v-cc5739dd], +.VPNavScreen.fade-leave-active .container[data-v-cc5739dd] { + transition: transform 0.25s ease; +} +.VPNavScreen.fade-enter-from[data-v-cc5739dd], +.VPNavScreen.fade-leave-to[data-v-cc5739dd] { + opacity: 0; +} +.VPNavScreen.fade-enter-from .container[data-v-cc5739dd], +.VPNavScreen.fade-leave-to .container[data-v-cc5739dd] { + transform: translateY(-8px); +} +@media (min-width: 768px) { +.VPNavScreen[data-v-cc5739dd] { + display: none; +} +} +.container[data-v-cc5739dd] { + margin: 0 auto; + padding: 24px 0 96px; + max-width: 288px; +} +.menu + .translations[data-v-cc5739dd], +.menu + .appearance[data-v-cc5739dd], +.translations + .appearance[data-v-cc5739dd] { + margin-top: 24px; +} +.menu + .social-links[data-v-cc5739dd] { + margin-top: 16px; +} +.appearance + .social-links[data-v-cc5739dd] { + margin-top: 16px; +} + +.VPNav[data-v-ae24b3ad] { + position: relative; + top: var(--vp-layout-top-height, 0px); + /*rtl:ignore*/ + left: 0; + z-index: var(--vp-z-index-nav); + width: 100%; + pointer-events: none; + transition: background-color 0.5s; +} +@media (min-width: 960px) { +.VPNav[data-v-ae24b3ad] { + position: fixed; +} +} + +.VPSidebarItem.level-0[data-v-e31bd47b] { + padding-bottom: 24px; +} +.VPSidebarItem.collapsed.level-0[data-v-e31bd47b] { + padding-bottom: 10px; +} +.item[data-v-e31bd47b] { + position: relative; + display: flex; + width: 100%; +} +.VPSidebarItem.collapsible > .item[data-v-e31bd47b] { + cursor: pointer; +} +.indicator[data-v-e31bd47b] { + position: absolute; + top: 6px; + bottom: 6px; + left: -17px; + width: 2px; + border-radius: 2px; + transition: background-color 0.25s; +} +.VPSidebarItem.level-2.is-active > .item > .indicator[data-v-e31bd47b], +.VPSidebarItem.level-3.is-active > .item > .indicator[data-v-e31bd47b], +.VPSidebarItem.level-4.is-active > .item > .indicator[data-v-e31bd47b], +.VPSidebarItem.level-5.is-active > .item > .indicator[data-v-e31bd47b] { + background-color: var(--vp-c-brand-1); +} +.link[data-v-e31bd47b] { + display: flex; + align-items: center; + flex-grow: 1; +} +.text[data-v-e31bd47b] { + flex-grow: 1; + padding: 4px 0; + line-height: 24px; + font-size: 14px; + transition: color 0.25s; +} +.VPSidebarItem.level-0 .text[data-v-e31bd47b] { + font-weight: 700; + color: var(--vp-c-text-1); +} +.VPSidebarItem.level-1 .text[data-v-e31bd47b], +.VPSidebarItem.level-2 .text[data-v-e31bd47b], +.VPSidebarItem.level-3 .text[data-v-e31bd47b], +.VPSidebarItem.level-4 .text[data-v-e31bd47b], +.VPSidebarItem.level-5 .text[data-v-e31bd47b] { + font-weight: 500; + color: var(--vp-c-text-2); +} +.VPSidebarItem.level-0.is-link > .item > .link:hover .text[data-v-e31bd47b], +.VPSidebarItem.level-1.is-link > .item > .link:hover .text[data-v-e31bd47b], +.VPSidebarItem.level-2.is-link > .item > .link:hover .text[data-v-e31bd47b], +.VPSidebarItem.level-3.is-link > .item > .link:hover .text[data-v-e31bd47b], +.VPSidebarItem.level-4.is-link > .item > .link:hover .text[data-v-e31bd47b], +.VPSidebarItem.level-5.is-link > .item > .link:hover .text[data-v-e31bd47b] { + color: var(--vp-c-brand-1); +} +.VPSidebarItem.level-0.has-active > .item > .text[data-v-e31bd47b], +.VPSidebarItem.level-1.has-active > .item > .text[data-v-e31bd47b], +.VPSidebarItem.level-2.has-active > .item > .text[data-v-e31bd47b], +.VPSidebarItem.level-3.has-active > .item > .text[data-v-e31bd47b], +.VPSidebarItem.level-4.has-active > .item > .text[data-v-e31bd47b], +.VPSidebarItem.level-5.has-active > .item > .text[data-v-e31bd47b], +.VPSidebarItem.level-0.has-active > .item > .link > .text[data-v-e31bd47b], +.VPSidebarItem.level-1.has-active > .item > .link > .text[data-v-e31bd47b], +.VPSidebarItem.level-2.has-active > .item > .link > .text[data-v-e31bd47b], +.VPSidebarItem.level-3.has-active > .item > .link > .text[data-v-e31bd47b], +.VPSidebarItem.level-4.has-active > .item > .link > .text[data-v-e31bd47b], +.VPSidebarItem.level-5.has-active > .item > .link > .text[data-v-e31bd47b] { + color: var(--vp-c-text-1); +} +.VPSidebarItem.level-0.is-active > .item .link > .text[data-v-e31bd47b], +.VPSidebarItem.level-1.is-active > .item .link > .text[data-v-e31bd47b], +.VPSidebarItem.level-2.is-active > .item .link > .text[data-v-e31bd47b], +.VPSidebarItem.level-3.is-active > .item .link > .text[data-v-e31bd47b], +.VPSidebarItem.level-4.is-active > .item .link > .text[data-v-e31bd47b], +.VPSidebarItem.level-5.is-active > .item .link > .text[data-v-e31bd47b] { + color: var(--vp-c-brand-1); +} +.caret[data-v-e31bd47b] { + display: flex; + justify-content: center; + align-items: center; + margin-right: -7px; + width: 32px; + height: 32px; + color: var(--vp-c-text-3); + cursor: pointer; + transition: color 0.25s; + flex-shrink: 0; +} +.item:hover .caret[data-v-e31bd47b] { + color: var(--vp-c-text-2); +} +.item:hover .caret[data-v-e31bd47b]:hover { + color: var(--vp-c-text-1); +} +.caret-icon[data-v-e31bd47b] { + width: 18px; + height: 18px; + fill: currentColor; + transform: rotate(90deg); + transition: transform 0.25s; +} +.VPSidebarItem.collapsed .caret-icon[data-v-e31bd47b] { + transform: rotate(0); +} +.VPSidebarItem.level-1 .items[data-v-e31bd47b], +.VPSidebarItem.level-2 .items[data-v-e31bd47b], +.VPSidebarItem.level-3 .items[data-v-e31bd47b], +.VPSidebarItem.level-4 .items[data-v-e31bd47b], +.VPSidebarItem.level-5 .items[data-v-e31bd47b] { + border-left: 1px solid var(--vp-c-divider); + padding-left: 16px; +} +.VPSidebarItem.collapsed .items[data-v-e31bd47b] { + display: none; +} + +.VPSidebar[data-v-575e6a36] { + position: fixed; + top: var(--vp-layout-top-height, 0px); + bottom: 0; + left: 0; + z-index: var(--vp-z-index-sidebar); + padding: 32px 32px 96px; + width: calc(100vw - 64px); + max-width: 320px; + background-color: var(--vp-sidebar-bg-color); + opacity: 0; + box-shadow: var(--vp-c-shadow-3); + overflow-x: hidden; + overflow-y: auto; + transform: translateX(-100%); + transition: opacity 0.5s, transform 0.25s ease; + overscroll-behavior: contain; +} +.VPSidebar.open[data-v-575e6a36] { + opacity: 1; + visibility: visible; + transform: translateX(0); + transition: opacity 0.25s, + transform 0.5s cubic-bezier(0.19, 1, 0.22, 1); +} +.dark .VPSidebar[data-v-575e6a36] { + box-shadow: var(--vp-shadow-1); +} +@media (min-width: 960px) { +.VPSidebar[data-v-575e6a36] { + padding-top: var(--vp-nav-height); + width: var(--vp-sidebar-width); + max-width: 100%; + background-color: var(--vp-sidebar-bg-color); + opacity: 1; + visibility: visible; + box-shadow: none; + transform: translateX(0); +} +} +@media (min-width: 1440px) { +.VPSidebar[data-v-575e6a36] { + padding-left: max(32px, calc((100% - (var(--vp-layout-max-width) - 64px)) / 2)); + width: calc((100% - (var(--vp-layout-max-width) - 64px)) / 2 + var(--vp-sidebar-width) - 32px); +} +} +@media (min-width: 960px) { +.curtain[data-v-575e6a36] { + position: sticky; + top: -64px; + left: 0; + z-index: 1; + margin-top: calc(var(--vp-nav-height) * -1); + margin-right: -32px; + margin-left: -32px; + height: var(--vp-nav-height); + background-color: var(--vp-sidebar-bg-color); +} +} +.nav[data-v-575e6a36] { + outline: 0; +} +.group + .group[data-v-575e6a36] { + border-top: 1px solid var(--vp-c-divider); + padding-top: 10px; +} +@media (min-width: 960px) { +.group[data-v-575e6a36] { + padding-top: 10px; + width: calc(var(--vp-sidebar-width) - 64px); +} +} + +.VPSkipLink[data-v-0f60ec36] { + top: 8px; + left: 8px; + padding: 8px 16px; + z-index: 999; + border-radius: 8px; + font-size: 12px; + font-weight: bold; + text-decoration: none; + color: var(--vp-c-brand-1); + box-shadow: var(--vp-shadow-3); + background-color: var(--vp-c-bg); +} +.VPSkipLink[data-v-0f60ec36]:focus { + height: auto; + width: auto; + clip: auto; + clip-path: none; +} +@media (min-width: 1280px) { +.VPSkipLink[data-v-0f60ec36] { + top: 14px; + left: 16px; +} +} + +.Layout[data-v-5a346dfe] { + display: flex; + flex-direction: column; + min-height: 100vh; +} + +.VPHomeSponsors[data-v-96bd69d5] { + border-top: 1px solid var(--vp-c-gutter); + padding: 88px 24px 96px; + background-color: var(--vp-c-bg); +} +.container[data-v-96bd69d5] { + margin: 0 auto; + max-width: 1152px; +} +.love[data-v-96bd69d5] { + margin: 0 auto; + width: 28px; + height: 28px; + color: var(--vp-c-text-3); +} +.icon[data-v-96bd69d5] { + width: 28px; + height: 28px; + fill: currentColor; +} +.message[data-v-96bd69d5] { + margin: 0 auto; + padding-top: 10px; + max-width: 320px; + text-align: center; + line-height: 24px; + font-size: 16px; + font-weight: 500; + color: var(--vp-c-text-2); +} +.sponsors[data-v-96bd69d5] { + padding-top: 32px; +} +.action[data-v-96bd69d5] { + padding-top: 40px; + text-align: center; +} + +.VPTeamPage[data-v-10b00018] { + padding-bottom: 96px; +} +@media (min-width: 768px) { +.VPTeamPage[data-v-10b00018] { + padding-bottom: 128px; +} +} +.VPTeamPageSection + .VPTeamPageSection[data-v-10b00018-s],.VPTeamMembers + .VPTeamPageSection[data-v-10b00018-s] { + margin-top: 64px; +} +.VPTeamMembers + .VPTeamMembers[data-v-10b00018-s] { + margin-top: 24px; +} +@media (min-width: 768px) { +.VPTeamPageTitle + .VPTeamPageSection[data-v-10b00018-s] { + margin-top: 16px; +} +.VPTeamPageSection + .VPTeamPageSection[data-v-10b00018-s],.VPTeamMembers + .VPTeamPageSection[data-v-10b00018-s] { + margin-top: 96px; +} +} +.VPTeamMembers[data-v-10b00018-s] { + padding: 0 24px; +} +@media (min-width: 768px) { +.VPTeamMembers[data-v-10b00018-s] { + padding: 0 48px; +} +} +@media (min-width: 960px) { +.VPTeamMembers[data-v-10b00018-s] { + padding: 0 64px; +} +} + +.VPTeamPageTitle[data-v-bf2cbdac] { + padding: 48px 32px; + text-align: center; +} +@media (min-width: 768px) { +.VPTeamPageTitle[data-v-bf2cbdac] { + padding: 64px 48px 48px; +} +} +@media (min-width: 960px) { +.VPTeamPageTitle[data-v-bf2cbdac] { + padding: 80px 64px 48px; +} +} +.title[data-v-bf2cbdac] { + letter-spacing: 0; + line-height: 44px; + font-size: 36px; + font-weight: 500; +} +@media (min-width: 768px) { +.title[data-v-bf2cbdac] { + letter-spacing: -0.5px; + line-height: 56px; + font-size: 48px; +} +} +.lead[data-v-bf2cbdac] { + margin: 0 auto; + max-width: 512px; + padding-top: 12px; + line-height: 24px; + font-size: 16px; + font-weight: 500; + color: var(--vp-c-text-2); +} +@media (min-width: 768px) { +.lead[data-v-bf2cbdac] { + max-width: 592px; + letter-spacing: 0.15px; + line-height: 28px; + font-size: 20px; +} +} + +.VPTeamPageSection[data-v-b1a88750] { + padding: 0 32px; +} +@media (min-width: 768px) { +.VPTeamPageSection[data-v-b1a88750] { + padding: 0 48px; +} +} +@media (min-width: 960px) { +.VPTeamPageSection[data-v-b1a88750] { + padding: 0 64px; +} +} +.title[data-v-b1a88750] { + position: relative; + margin: 0 auto; + max-width: 1152px; + text-align: center; + color: var(--vp-c-text-2); +} +.title-line[data-v-b1a88750] { + position: absolute; + top: 16px; + left: 0; + width: 100%; + height: 1px; + background-color: var(--vp-c-divider); +} +.title-text[data-v-b1a88750] { + position: relative; + display: inline-block; + padding: 0 24px; + letter-spacing: 0; + line-height: 32px; + font-size: 20px; + font-weight: 500; + background-color: var(--vp-c-bg); +} +.lead[data-v-b1a88750] { + margin: 0 auto; + max-width: 480px; + padding-top: 12px; + text-align: center; + line-height: 24px; + font-size: 16px; + font-weight: 500; + color: var(--vp-c-text-2); +} +.members[data-v-b1a88750] { + padding-top: 40px; +} + +.VPTeamMembersItem[data-v-0d3d0d4d] { + display: flex; + flex-direction: column; + gap: 2px; + border-radius: 12px; + width: 100%; + height: 100%; + overflow: hidden; +} +.VPTeamMembersItem.small .profile[data-v-0d3d0d4d] { + padding: 32px; +} +.VPTeamMembersItem.small .data[data-v-0d3d0d4d] { + padding-top: 20px; +} +.VPTeamMembersItem.small .avatar[data-v-0d3d0d4d] { + width: 64px; + height: 64px; +} +.VPTeamMembersItem.small .name[data-v-0d3d0d4d] { + line-height: 24px; + font-size: 16px; +} +.VPTeamMembersItem.small .affiliation[data-v-0d3d0d4d] { + padding-top: 4px; + line-height: 20px; + font-size: 14px; +} +.VPTeamMembersItem.small .desc[data-v-0d3d0d4d] { + padding-top: 12px; + line-height: 20px; + font-size: 14px; +} +.VPTeamMembersItem.small .links[data-v-0d3d0d4d] { + margin: 0 -16px -20px; + padding: 10px 0 0; +} +.VPTeamMembersItem.medium .profile[data-v-0d3d0d4d] { + padding: 48px 32px; +} +.VPTeamMembersItem.medium .data[data-v-0d3d0d4d] { + padding-top: 24px; + text-align: center; +} +.VPTeamMembersItem.medium .avatar[data-v-0d3d0d4d] { + width: 96px; + height: 96px; +} +.VPTeamMembersItem.medium .name[data-v-0d3d0d4d] { + letter-spacing: 0.15px; + line-height: 28px; + font-size: 20px; +} +.VPTeamMembersItem.medium .affiliation[data-v-0d3d0d4d] { + padding-top: 4px; + font-size: 16px; +} +.VPTeamMembersItem.medium .desc[data-v-0d3d0d4d] { + padding-top: 16px; + max-width: 288px; + font-size: 16px; +} +.VPTeamMembersItem.medium .links[data-v-0d3d0d4d] { + margin: 0 -16px -12px; + padding: 16px 12px 0; +} +.profile[data-v-0d3d0d4d] { + flex-grow: 1; + background-color: var(--vp-c-bg-soft); +} +.data[data-v-0d3d0d4d] { + text-align: center; +} +.avatar[data-v-0d3d0d4d] { + position: relative; + flex-shrink: 0; + margin: 0 auto; + border-radius: 50%; + box-shadow: var(--vp-shadow-3); +} +.avatar-img[data-v-0d3d0d4d] { + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + border-radius: 50%; + object-fit: cover; +} +.name[data-v-0d3d0d4d] { + margin: 0; + font-weight: 600; +} +.affiliation[data-v-0d3d0d4d] { + margin: 0; + font-weight: 500; + color: var(--vp-c-text-2); +} +.org.link[data-v-0d3d0d4d] { + color: var(--vp-c-text-2); + transition: color 0.25s; +} +.org.link[data-v-0d3d0d4d]:hover { + color: var(--vp-c-brand-1); +} +.desc[data-v-0d3d0d4d] { + margin: 0 auto; +} +.desc[data-v-0d3d0d4d] a { + font-weight: 500; + color: var(--vp-c-brand-1); + text-decoration-style: dotted; + transition: color 0.25s; +} +.links[data-v-0d3d0d4d] { + display: flex; + justify-content: center; + height: 56px; +} +.sp-link[data-v-0d3d0d4d] { + display: flex; + justify-content: center; + align-items: center; + text-align: center; + padding: 16px; + font-size: 14px; + font-weight: 500; + color: var(--vp-c-sponsor); + background-color: var(--vp-c-bg-soft); + transition: color 0.25s, background-color 0.25s; +} +.sp .sp-link.link[data-v-0d3d0d4d]:hover, +.sp .sp-link.link[data-v-0d3d0d4d]:focus { + outline: none; + color: var(--vp-c-white); + background-color: var(--vp-c-sponsor); +} +.sp-icon[data-v-0d3d0d4d] { + margin-right: 8px; + width: 16px; + height: 16px; + fill: currentColor; +} + +.VPTeamMembers.small .container[data-v-6cb0dbc4] { + grid-template-columns: repeat(auto-fit, minmax(224px, 1fr)); +} +.VPTeamMembers.small.count-1 .container[data-v-6cb0dbc4] { + max-width: 276px; +} +.VPTeamMembers.small.count-2 .container[data-v-6cb0dbc4] { + max-width: calc(276px * 2 + 24px); +} +.VPTeamMembers.small.count-3 .container[data-v-6cb0dbc4] { + max-width: calc(276px * 3 + 24px * 2); +} +.VPTeamMembers.medium .container[data-v-6cb0dbc4] { + grid-template-columns: repeat(auto-fit, minmax(256px, 1fr)); +} +@media (min-width: 375px) { +.VPTeamMembers.medium .container[data-v-6cb0dbc4] { + grid-template-columns: repeat(auto-fit, minmax(288px, 1fr)); +} +} +.VPTeamMembers.medium.count-1 .container[data-v-6cb0dbc4] { + max-width: 368px; +} +.VPTeamMembers.medium.count-2 .container[data-v-6cb0dbc4] { + max-width: calc(368px * 2 + 24px); +} +.container[data-v-6cb0dbc4] { + display: grid; + gap: 24px; + margin: 0 auto; + max-width: 1152px; +} +/** + * Customize default theme styling by overriding CSS variables: + * https://github.com/vuejs/vitepress/blob/main/src/client/theme-default/styles/vars.css + */ + +/** + * Colors + * + * Each colors have exact same color scale system with 3 levels of solid + * colors with different brightness, and 1 soft color. + * + * - `XXX-1`: The most solid color used mainly for colored text. It must + * satisfy the contrast ratio against when used on top of `XXX-soft`. + * + * - `XXX-2`: The color used mainly for hover state of the button. + * + * - `XXX-3`: The color for solid background, such as bg color of the button. + * It must satisfy the contrast ratio with pure white (#ffffff) text on + * top of it. + * + * - `XXX-soft`: The color used for subtle background such as custom container + * or badges. It must satisfy the contrast ratio when putting `XXX-1` colors + * on top of it. + * + * The soft color must be semi transparent alpha channel. This is crucial + * because it allows adding multiple "soft" colors on top of each other + * to create a accent, such as when having inline code block inside + * custom containers. + * + * - `default`: The color used purely for subtle indication without any + * special meanings attched to it such as bg color for menu hover state. + * + * - `brand`: Used for primary brand colors, such as link text, button with + * brand theme, etc. + * + * - `tip`: Used to indicate useful information. The default theme uses the + * brand color for this by default. + * + * - `warning`: Used to indicate warning to the users. Used in custom + * container, badges, etc. + * + * - `danger`: Used to show error, or dangerous message to the users. Used + * in custom container, badges, etc. + * -------------------------------------------------------------------------- */ + + :root { + --vp-c-default-1: var(--vp-c-gray-1); + --vp-c-default-2: var(--vp-c-gray-2); + --vp-c-default-3: var(--vp-c-gray-3); + --vp-c-default-soft: var(--vp-c-gray-soft); + + --vp-c-brand-1: var(--vp-c-indigo-1); + --vp-c-brand-2: var(--vp-c-indigo-2); + --vp-c-brand-3: var(--vp-c-indigo-3); + --vp-c-brand-soft: var(--vp-c-indigo-soft); + + --vp-c-tip-1: var(--vp-c-brand-1); + --vp-c-tip-2: var(--vp-c-brand-2); + --vp-c-tip-3: var(--vp-c-brand-3); + --vp-c-tip-soft: var(--vp-c-brand-soft); + + --vp-c-warning-1: var(--vp-c-yellow-1); + --vp-c-warning-2: var(--vp-c-yellow-2); + --vp-c-warning-3: var(--vp-c-yellow-3); + --vp-c-warning-soft: var(--vp-c-yellow-soft); + + --vp-c-danger-1: var(--vp-c-red-1); + --vp-c-danger-2: var(--vp-c-red-2); + --vp-c-danger-3: var(--vp-c-red-3); + --vp-c-danger-soft: var(--vp-c-red-soft); +} + +/** + * Component: Button + * -------------------------------------------------------------------------- */ + +:root { + --vp-button-brand-border: transparent; + --vp-button-brand-text: var(--vp-c-white); + --vp-button-brand-bg: var(--vp-c-brand-3); + --vp-button-brand-hover-border: transparent; + --vp-button-brand-hover-text: var(--vp-c-white); + --vp-button-brand-hover-bg: var(--vp-c-brand-2); + --vp-button-brand-active-border: transparent; + --vp-button-brand-active-text: var(--vp-c-white); + --vp-button-brand-active-bg: var(--vp-c-brand-1); +} + +/** + * Component: Home + * -------------------------------------------------------------------------- */ + +:root { + --vp-home-hero-name-color: transparent; + --vp-home-hero-name-background: -webkit-linear-gradient( + 120deg, + #bd34fe 30%, + #41d1ff + ); + + --vp-home-hero-image-background-image: linear-gradient( + -45deg, + #bd34fe 50%, + #47caff 50% + ); + --vp-home-hero-image-filter: blur(44px); +} + +@media (min-width: 640px) { + :root { + --vp-home-hero-image-filter: blur(56px); + } +} + +@media (min-width: 960px) { + :root { + --vp-home-hero-image-filter: blur(68px); + } +} + +/** + * Component: Custom Block + * -------------------------------------------------------------------------- */ + +:root { + --vp-custom-block-tip-border: transparent; + --vp-custom-block-tip-text: var(--vp-c-text-1); + --vp-custom-block-tip-bg: var(--vp-c-brand-soft); + --vp-custom-block-tip-code-bg: var(--vp-c-brand-soft); +} + +/** + * Component: Algolia + * -------------------------------------------------------------------------- */ + +.DocSearch { + --docsearch-primary-color: var(--vp-c-brand-1) !important; +} + + \ No newline at end of file diff --git a/src/.vitepress/.temp/concepts_index.md.js b/src/.vitepress/.temp/concepts_index.md.js new file mode 100644 index 00000000..6311afce --- /dev/null +++ b/src/.vitepress/.temp/concepts_index.md.js @@ -0,0 +1,35 @@ +import { ssrRenderAttrs } from "vue/server-renderer"; +import { useSSRContext } from "vue"; +import { _ as _export_sfc } from "./plugin-vue_export-helper.yVxbj29m.js"; +const __pageData = JSON.parse( + '{"title":"Concepts","description":"","frontmatter":{},"headers":[],"relativePath":"concepts/index.md","filePath":"concepts/index.md"}', +); +const _sfc_main = { name: "concepts/index.md" }; +function _sfc_ssrRender( + _ctx, + _push, + _parent, + _attrs, + $props, + $setup, + $data, + $options, +) { + _push( + `

    Concepts

    `, + ); +} +const _sfc_setup = _sfc_main.setup; +_sfc_main.setup = (props, ctx) => { + const ssrContext = useSSRContext(); + (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add( + "concepts/index.md", + ); + return _sfc_setup ? _sfc_setup(props, ctx) : void 0; +}; +const index = /* @__PURE__ */ _export_sfc(_sfc_main, [ + ["ssrRender", _sfc_ssrRender], +]); +export { __pageData, index as default }; diff --git a/src/.vitepress/.temp/concepts_messages.md.js b/src/.vitepress/.temp/concepts_messages.md.js new file mode 100644 index 00000000..20d96dc5 --- /dev/null +++ b/src/.vitepress/.temp/concepts_messages.md.js @@ -0,0 +1,711 @@ +import { ssrRenderAttrs, ssrRenderStyle } from "vue/server-renderer"; +import { useSSRContext } from "vue"; +import { _ as _export_sfc } from "./plugin-vue_export-helper.yVxbj29m.js"; +const __pageData = JSON.parse( + '{"title":"Messages","description":"","frontmatter":{},"headers":[],"relativePath":"concepts/messages.md","filePath":"concepts/messages.md"}', +); +const _sfc_main = { name: "concepts/messages.md" }; +function _sfc_ssrRender( + _ctx, + _push, + _parent, + _attrs, + $props, + $setup, + $data, + $options, +) { + _push(`

    Messages

    ao Messages is the data protocol of ao, messages are designed from ANS-104 DataItems, so they are native to Arweave. The structure of a message when interacting in a ao Process looks like the following:

    lua
    {
    +    Cron = false,
    +    Data = "Hello aos",
    +    Epoch = 0,
    +    From = "5WzR7rJCuqCKEq02WUPhTjwnzllLjGu6SA7qhYpcKRs",
    +    Id = "ayVo53qvZswpvxLlhMf8xmGjwxN0LGuHzzQpTLT0_do",
    +    Nonce = 1,
    +    Owner = "z1pq2WzmaYnfDwvEFgUZBj48anUsxxN64ZjbWOsIn08",
    +    Signature = "nXtO4fNC7rQ_b0sMp22A6cY68NQXGTnsqGqGcvhAWULSYpAbWVwL4PX_u6lPEMJE_SdMu-9Ci4ohR25Y-d7T4k3v_t3VaLCvyib9XsLFiJ_Py_S2d58BmbDSgtLA05vOatsjzmkRMf-xltMQdjkcvbJseELjKWyzstib7X6U-y4wKhLa9AG5-3IcsjsNMw0U8Dql5yGFPYspb__bAvkTAfHNpYa2bMgkwCsv727LsZ-yZKPMi5kyhnCVNN1gM7OLr679vn6kGr2BzCgXGyFHLfRDzBLrZESymVocsFuStlGQROwi1M2POzSqQLP3FM-ExdxsdsbaUwCRqbS3LTJ_aBLZcXX3kOUPW-uVR28r8pQUl7Gx3e-cU9Vu2xsuGisR1EpKF57cFitIMDU0hM8HOtGhOGh0Y2rrQ1rCOtgEdaKsMHIBIZl6EaJTJXZG05LmoqvfPx67L9wy9kLEeyTsy2sMS9z4ihje4C1RDY8SerfNXtO5ctzkY2QR46EQPK04-mDXa8mt4b3YWvPtbVYspfQUpKXxsD-u66j0Go_oVACcAWVne0VyD7MliUU2LJ7Id-ghNs8f-jn9dSYc86KADdkGmpPXOw6Qh9ND1wHrqPaano15V1rTsbAH6GiQqO0XXZtc6WDjHJShnKSSs0-5xJ-SgnDFSy8CE_S9worynk0",
    +    TagArray = {
    +        [1] = {
    +            name = "Data-Protocol",
    +            value = "ao"
    +        },
    +        [2] = {
    +            name = "Variant",
    +            value = "ao.TN.1"
    +        },
    +        [3] = {
    +            name = "Type",
    +            value = "Message"
    +        },
    +        [4] = {
    +            name = "From-Process",
    +            value = "5WzR7rJCuqCKEq02WUPhTjwnzllLjGu6SA7qhYpcKRs"
    +        },
    +        [5] = {
    +            name = "From-Module",
    +            value = "lXfdCypsU3BpYTWvupgTioLoZAEOZL2_Ihcqepz6RiQ"
    +        },
    +        [6] = {
    +            name = "Data-Protocol",
    +            value = "ao"
    +        },
    +        [7] = {
    +            name = "Type",
    +            value = "Message"
    +        },
    +        [8] = {
    +            name = "Variant",
    +            value = "ao.TN.1"
    +        },
    +        [9] = {
    +            name = "From-Process",
    +            value = "5WzR7rJCuqCKEq02WUPhTjwnzllLjGu6SA7qhYpcKRs"
    +        }
    +    },
    +    Tags = {
    +        Type = "Message",
    +        Variant = "ao.TN.1",
    +        ["Data-Protocol"] = "ao",
    +        ["From-Module"] = "lXfdCypsU3BpYTWvupgTioLoZAEOZL2_Ihcqepz6RiQ",
    +        ["From-Process"] = "5WzR7rJCuqCKEq02WUPhTjwnzllLjGu6SA7qhYpcKRs"
    +    },
    +    Target = "5WzR7rJCuqCKEq02WUPhTjwnzllLjGu6SA7qhYpcKRs",
    +    Timestamp = 1704936415711,
    +    ["Block-Height"] = 1340762,
    +    ["Forwarded-By"] = "z1pq2WzmaYnfDwvEFgUZBj48anUsxxN64ZjbWOsIn08",
    +    ["Hash-Chain"] = "hJ0B-0yxKxeL3IIfaIIF7Yr6bFLG2vQayaF8G0EpjbY"
    +}

    See the spec for most of these, but one property, you will not find on the spec. It is the From property, this will either be the Process that sent the message or a Signer, if it is a Signer then the value will be the same as the Owner property.

    `); +} +const _sfc_setup = _sfc_main.setup; +_sfc_main.setup = (props, ctx) => { + const ssrContext = useSSRContext(); + (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add( + "concepts/messages.md", + ); + return _sfc_setup ? _sfc_setup(props, ctx) : void 0; +}; +const messages = /* @__PURE__ */ _export_sfc(_sfc_main, [ + ["ssrRender", _sfc_ssrRender], +]); +export { __pageData, messages as default }; diff --git a/src/.vitepress/.temp/concepts_processes.md.js b/src/.vitepress/.temp/concepts_processes.md.js new file mode 100644 index 00000000..a40ad459 --- /dev/null +++ b/src/.vitepress/.temp/concepts_processes.md.js @@ -0,0 +1,618 @@ +import { ssrRenderAttrs, ssrRenderStyle } from "vue/server-renderer"; +import { useSSRContext } from "vue"; +import { _ as _export_sfc } from "./plugin-vue_export-helper.yVxbj29m.js"; +const __pageData = JSON.parse( + '{"title":"Processes","description":"","frontmatter":{},"headers":[],"relativePath":"concepts/processes.md","filePath":"concepts/processes.md"}', +); +const _sfc_main = { name: "concepts/processes.md" }; +function _sfc_ssrRender( + _ctx, + _push, + _parent, + _attrs, + $props, + $setup, + $data, + $options, +) { + _push(`

    Processes

    Processes are long running compute that contains its own memory and its own logic, you can interact with processes by sending messages. A Process can send a message to another process, which gives the network interoperability without having to share a global state. Each Process manages its own state and can not see the outside world. The process must recieve messages in its inbox, react to those messages using handlers and send messages by dropping them in its outbox.

    The core module contains a helper library that gets injected into the handler function, this library is called ao.

    lua
    {
    +    Output = "",
    +    _module = "lXfdCypsU3BpYTWvupgTioLoZAEOZL2_Ihcqepz6RiQ",
    +    _version = "0.0.3",
    +    authorities = {},
    +    clearOutbox = "function: 0x547720",
    +    env = {
    +        Process = {
    +            Id = "5WzR7rJCuqCKEq02WUPhTjwnzllLjGu6SA7qhYpcKRs",
    +            Owner = "_r9LpP4FtClpsGX3TOohubyaeb0IQTZZMcxQ24tTsGo",
    +            Tags = {
    +                [1] = {
    +                    name = "Name",
    +                    value = "Personal AOS"
    +                },
    +                [2] = {
    +                    name = "Data-Protocol",
    +                    value = "ao"
    +                },
    +                [3] = {
    +                    name = "Variant",
    +                    value = "ao.TN.1"
    +                },
    +                [4] = {
    +                    name = "Type",
    +                    value = "Process"
    +                },
    +                [5] = {
    +                    name = "Module",
    +                    value = "lXfdCypsU3BpYTWvupgTioLoZAEOZL2_Ihcqepz6RiQ"
    +                },
    +                [6] = {
    +                    name = "Scheduler",
    +                    value = "TZ7o7SIZ06ZEJ14lXwVtng1EtSx60QkPy-kh-kdAXog"
    +                },
    +                [7] = {
    +                    name = "SDK",
    +                    value = "ao"
    +                },
    +                [8] = {
    +                    name = "Content-Type",
    +                    value = "text/plain"
    +                }
    +            }
    +        }
    +    },
    +    id = "5WzR7rJCuqCKEq02WUPhTjwnzllLjGu6SA7qhYpcKRs",
    +    init = "function: 0x5469a0",
    +    isTrusted = "function: 0x5468d0",
    +    outbox = {
    +        Messages = {},
    +        Spawns = {}
    +    },
    +    result = "function: 0x547120",
    +    send = "function: 0x547618",
    +    spawn = "function: 0x5468b0"
    +}

    The main functions to look at in this ao helper is

    • ao.send(Message)
    • ao.spawn(Module, Message)

    Both of these functions drop the messages in the outbox, when invoked and the outbox is made available for the mu to take those messages, sign them and crank them to their target processes.

    `); +} +const _sfc_setup = _sfc_main.setup; +_sfc_main.setup = (props, ctx) => { + const ssrContext = useSSRContext(); + (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add( + "concepts/processes.md", + ); + return _sfc_setup ? _sfc_setup(props, ctx) : void 0; +}; +const processes = /* @__PURE__ */ _export_sfc(_sfc_main, [ + ["ssrRender", _sfc_ssrRender], +]); +export { __pageData, processes as default }; diff --git a/src/.vitepress/.temp/concepts_specs.md.js b/src/.vitepress/.temp/concepts_specs.md.js new file mode 100644 index 00000000..2f684604 --- /dev/null +++ b/src/.vitepress/.temp/concepts_specs.md.js @@ -0,0 +1,35 @@ +import { ssrRenderAttrs } from "vue/server-renderer"; +import { useSSRContext } from "vue"; +import { _ as _export_sfc } from "./plugin-vue_export-helper.yVxbj29m.js"; +const __pageData = JSON.parse( + '{"title":"ao Specs","description":"","frontmatter":{},"headers":[],"relativePath":"concepts/specs.md","filePath":"concepts/specs.md"}', +); +const _sfc_main = { name: "concepts/specs.md" }; +function _sfc_ssrRender( + _ctx, + _push, + _parent, + _attrs, + $props, + $setup, + $data, + $options, +) { + _push( + `

    ao Specs

    What is ao?

    The ao computer is the actor oriented machine that emerges from the network of nodes that adhere to its core data protocol, running on the Arweave network. This document gives a brief introduction to the protocol and its functionality, as well as its technical details, such that builders can create new implementations and services that integrate with it.

    The ao computer is a single, unified computing environment (a Single System Image), hosted on a heterogenous set of nodes in a distributed network. ao is designed to offer an environment in which an arbitrary number of paralell processes can be resident, coordinating through an open message passing layer. This message passing standard connects the machine's indepedently operating processes together into a 'web' -- in the same way that websites operate on independent servers but are conjoined into a cohesive, unified experience via hyperlinks.

    Learn More

    `, + ); +} +const _sfc_setup = _sfc_main.setup; +_sfc_main.setup = (props, ctx) => { + const ssrContext = useSSRContext(); + (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add( + "concepts/specs.md", + ); + return _sfc_setup ? _sfc_setup(props, ctx) : void 0; +}; +const specs = /* @__PURE__ */ _export_sfc(_sfc_main, [ + ["ssrRender", _sfc_ssrRender], +]); +export { __pageData, specs as default }; diff --git a/src/.vitepress/.temp/favicon.ico b/src/.vitepress/.temp/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..8f28bb10ca198c4835774b9474c990f5c8bc920e GIT binary patch literal 12483 zcmc&*g;x~c`=*v!LAtvn7AcVi0g>)-0fAMzrMp3Cq!s}YDX9gPrMm>Ad&woGyG!u9 zpFiSverL|yJ9EyR_s*R=?|q+no_8=XFwxuZ-x%nU1*1X`1A__!10zO9OPPp}ju3rF zq^j~-4_%{MVEo3%LYHik5(DT8(?d^L0dsx;6oNh>_^4v+fq?-e|8K{{$ofWufgz}; z`dZ$=_uFC4W(d78;`&&Q9m;8po0%zZV?$Ht_~z-M+^=6i+GRyb4)q3HTwm^ICLuuG42Pkszwe*juUng|)vs38 z3J6J7tz5mm5sOhe+tGTJ?6<54oBw`Lj!7rR^D72Ro<^9Z_%^IST~*3?`_V zx&~53z0&+R)S9I;+iO8XDo0ORl@y!X4Uw6^MV@`?PjT@DL24$WR0p2)e|FrX78VHd zfrNdOS`u1&eR1f$y!7Q}UNDlvsvyM+VoA>gv{5Gv6D>WehNj6NorvL4JOiExQ$(r7 zX#53Z*rv;7fcRerY)6Mz7lA5&KdAf-q!Es+xFn^4=^DbhFu-~e;K@zh2?am3!?Zuu zTwo80bMo~8-&tS%j-sZW&)RH`328Ei^lno50WwYczq zbwT)&1~d`Jnk)&{iRaXfss5y-?xVjaA}wKL<+z!I>%>STCj`r!GstQ%%Odm$GY%vTNDFYmS<5+`0%rwJ3*4>Bxb#pRLs7H?Pf- z6Y=hWlA736Gg{c~w6N_^98s&v!XH-aL}gaN!K7h%tA@cmz?T4y0FSq znAs7beob7C)l&Cnu2=WwYXO|_W!dSq>Q8B%4r?0F$nU4NktC;uj6qVE%B?g30OA@e zAu5fTC56!gg`?r=NC&YbHaUO=9vQ!au*n7EZ7Fl zht(Kh#@47*-G*)kOM8yH%G}8KXBOIxMPNcwAHaVPfP3c>aW%aWcg%h$0zW8m$z1N8 zO~Ezwt!k+Wi99TL0%BdST<(FiEuMhcD3fN`!BW(wq{mQu&H9-kA?B!8O&RYh*Q?#F zAu@wGOcWQ5Q)btX{P$Y-*dXEWS?ifTlJynI=VkgQrF`_lqHzBx=Gsusl&~2Ae?QS` zi4lD}Ww-9#mZjblE939(7DO;*60k^I(^OEaH+5EOaL2@7Yb1o!t&rsN^oDN2jIp*9 zPOcQdLNYHT7)fZ96wfP~blJ=n6uF_ls&L)y%FeM;hhgePdx;M|S7QRseK<0B+Rz)b z1!;5@Q_SQ6%ho414bxN7YA^U&NZwdT;dHkD?z)@i6u}3*G8ChL$O}=yWl6ew3`F77 zz^~iV71-W%DaR)DRQ3EYDiX`C_sDo*a9mR=;{mQzY=ztRUkp~}ka?YNufsB2ibfmG z+G|fk96l3a#U+Ja8gEsSjpg!BL-T zPb43y&R)!`r(lD~jAq*nmesNy2a`7^S*gLfas1=UcRUYz{6~w89tA4?<}O-YIY;nz zX$u-!NNqyAczVH%;XWB;lBr8ko+-igzW&KA=>g0g_sPOwzffL$SW#7asY0eir&60X*R==2MFD(p1s$Zzsni#QVI=kMp{=&`MO7ePS@!KoAxOY+OkO@W zwm&7JE=|ll$2?r%<)Dx}CJP>aGzkrx$E;^to#XXdg>DH|WGN%Jh$TQ<#M|#~l#?kdDo!Ox+II zH5pWsxt`@(W*+$~$5O_U8a6|yfwBx*#EAP>C+s1bta~F150%_?Knh50r z4}D2MsW)q|9u&{cCqKcXLPFP}yB>S*x;^=~Gu|v)B(%z9v)mUDg!bMCNimf}FUwxE z3eU;Lyr~tQ^Pn?gy&C2@9Y-%&x0anp9Of+aeDoizc9}uyh#;8hW6WG~EUb!Xse?75 zRN)C0PzMlpNq11@GYsoz;t~n(o?ucTCs$Yr%%FNO*ry^kW!uX1l(zK_QsX# z8)w!7q8+$P1d>jq*=6G)a1|K)`>y|?<@^0p2p!~MfbOXO20iAQprjUK0QpBe4>OG5jLmeRT#+&&5TvJ=?dd|)11e(Ej<)l( z#andKTJ-+dWVFM9weYd%i4nFS(~rI5HxgiaAu5Jex!-}D#LZj8r&i&hrewg}`Yn9R z<4u|+=xf=;%-`hnzj+&LO5z9Y7T1&uLSQDOZe~06*e|)t5C3XDogdSUhRiC|(}Ic0 zAfji%BSbt;Yt`9;@uYcxaL%(0{;foQ`_Q^9xz;Q>Pw^MqonPv(;hkfg6B~08u#R$x zf7pv1<@5jevE#}CFn>z;BkcXZ3q?;p4o#t8t9Ejr1a`G&r) z5ah?lvWP&+_3Fp1I}1dCf1Y$H!ROwbcy7~CeE<-_+KF@s4ykwT3;vhq3d zRa;gJb6se+aWsXvJscY;7(57QP(Gmwz=qKQz~2&zNOTNG9_wNsJdCaI2tvL*?e*rz zO8h9a)!5uW$czJ#;h_N!>~H!$Lwl`HRYez~`eRG#sd734jF$-R^0TewYpuK3d5thQ zR@#VhI|=dIo9z3C$c%X(wzU{B^3k$z(a6xtS_p)vL8^y6IM=_TqH7(nRAu$gg3`)8 zi4(YNeR{uH=p|KFEHkrhGU&m$`$;aYhrYexPxniu?$p85=L4PLNO>GsSFxb!kRPh_ zNa$y9AIc60#}|(q8aVa}ts}L}Nw9!(%+F5+Ru;GGV8-#Oi(%Bef4x4P!}jH__tC|t znz5hVgb?vcBPFdKhWyOjM)S}{7#)G|R$5icgMTP85D6qFnz5LqA_w%~`m@bQVlvrw zncg?V3eQ{y@;US_g)(#btDEV7B~d3+c?cuoa}tMha^gLV_7@ez8qWx`jMv)0eua`Z z{CY#k(ki?tqUbp1!bc7AP$VAdvijI}B~?=;CiN**G;_I+*FygcObAB;@0e6gdk!8n zAL6CPZ6KIfTK#gRR{uIiy7aWf7?Nl?*ZCRj+pmRXOZ-58REm?Y17dAUC(K<#V&1<; z4OQs<0`I%Szsn;VSnP?de9`mMP(IR`pUQY_^Ju9KcS!5R^5)oMg$xY{|ByZ}-~yi* zuert?0p0}kJa7i^7UWv6KV7C|0%Gm^$*+8CoESs)Opi74JL5t>dpQC2|Dj{dhyVJ0 zWB)e#8zqt_hZ6e6oAe_GwLi-*XdkO5`M)IGWdWf|wt}`ll}eqYj3rvE#H0g9yH2i{ zvv0qye?+1x#p((rLCU)JJT8eAfd38h9JoW}+ zv|i__o|4oN!GMCkQGd}~d5p^dMfjt>=aJ|3#DRZwS$9IwiQjtxICYdvYB!w#pKV)6 zX>c7aIOh8^KC#X_IZpUv0Rhy;OHtmApGo-)5##^mQr=O$E;5pQVf-OCoeZATj0s$0~lxV%!evuSk zGeP~Sra!sQQE|R!@)eJ2l^8n~jrr9277?6~rL0p96D$C1QO4PP{vtpoIOo5?XSTm3 zE%OFa!8=~dH(;6u$4AD(o@&NUTD7l3N2}5^t7IxPmx!oV^%&gURcZ;ZS zrb@I=Vj0KYj`!?m4`t?#WVYnGuOydgE0Z~GO9|K;0?P3)fpa9smFzPb^a)P5MxVwu z38DV+b$-qA#7H>`KbZefE<*=U93=ajwJ!Fu;D8HYu?Zc0h_|i0cva9=lNHJ=Nf+z~ z{_APby8MfdxISraS3|%NaXA4m5Sh$u`quPZ>vM6ste6XFVp!bdOHsJ_D~K27{`NAW zPOu+%pB8pnv0ijJ-i)ul|O8~N2}TrO*#)RNx9lq)zY;VIFe*auDN$AYx+9{B%mvR8cB zlD{<48SBmun_i+Ee5;tg8l(?@^~ZedL1tth9}>6w#eC>Cf2;aSKvcsNl!k)3piP2} zdGSZ^+FoP0fw0s$Dl-FI*b4Uc9f(*Z1MeWj&R|*#Gb@>N&mwBU|~@BG)foMRMR)E)Yc0%rwKZJ%a#TVlb>LOT|xp5u|M7fPYRt*Mp_jm$@xi@BC^H8 zIaC5}dt5wobkq1yUhkw4U!*)ZkHUksm%3~>0ag{;KKA|~3}klxRo3(d6;2JrF>Vi+ zphi{QD+1{m0j1e@Rg!_8QQrF>jggK@pR5U0cH@q|9a$#o9R203AC0?mu%v#70r5Je z=EmX2jHO3;s9e}7G`mYYJ|`mn`fAP~9T`2$=Va-#sPENh<&)xq1-Id_G_sOu5b1hf z&Dqsz3&;`Jq*o-d#4IC$FH_VRaxe?wb<_dC=Jf=Wuzya(Mk7?{u;JGGcr7`qotJ35 zdTwdfn?Pdv@fepAzHlR#ldvyzk#J8nN`X->S-@P*-|>a|-KQtr8g8ExzhjtM=k?J{Y1qhYDOAM~^Qf6>y>t5BGJt2Av69VdPp|CKjllPkg<-jR;Q=n}+v>o{zUb>3_otJH6Nd=IOkWNFg3`2~ zy0h3Y(^vkbzHRA>HTK7HV`X?RCr!FN;~nEJ1!{ON@)_*8QSppD>fv_&ZdBzN26z%9 zLLsfCS2<^gXnnAhTDx}^=I?ah?&Rw z#zSW}KKQvV*oyL+uJ(FXL=-wRn7PzS{deGZTxv=>=|pRUbP(MJnH*1MZVCtkj*Ix5ikeB9%(2tL z2N$!22>wcCXIsZ_*ch7b;tlWg$E%(R~ zMe|=)4pg)z@h~;f$kasfe-M$&baPBY#iiv-m>1OXY(`J6@CDdqk`-kEUmw+oZ~wt{5NSw zc^iwLJsdemzo*;w@@jRnV){mI+|X!a{bgRo{_8~DSCFOd(2Yo z@Kk{d+-TAq0QQ?uy%-6yg{eOQ<6(lSEl24N)lxWU_I-G;rX zC|z>f5LHJ!-2SS|2`$QWxltqseXYnnE|je=Y7DjbB)Hld&hHByrM7}<0k54)3S>iG zVf^%{-elJ)tb-nmF5lzn#Y|HfiAby4E+|%s5}OVp!K!WWy_8$R#$K{+-@`z-gqGLQHruZOaR zgI8;DBZmf#U~M-vWZykS*7~HSn;TfTXK%!~54n+wt@|p?@&vH0r<|J1YIG|UGiPlD z3FjOw2l5U|-mPCR3>@R@yq@ZD4~Kt%Q6=o*awK_)SR)s@nf@Aa$Y(5A8I%rB+HbX9 zSnhz{%tbMjj1s}}bO-Lf*l~*OoE-7S^Q%G|$X&;}3IbfY%x7IQ&#pFK)iF^nEk#$W zVHlEtnbqm!x}B=q*y2xUT3lTmE!VsyZkuevJ?}@HMeker$O^?$ik5)0wY$B zUdnbc=Tv`p65YDOoYtni&sR!RI)Bu-WFsaO{B2Y^k4qPBP-xqgUqgYvnRZaYgD^l_ zCW#Yo|C+1a;bin}mCLJ1B5HD6ZX8J_WzdtRB8lb(zWaVUBm&zow?VAydzwA7-?Jh& z4TR)#WBOE>=V{;bUev(VP>hErA;Qw%Bmhqk%hGJUNj7{+cRSz~dur0pDmI9(oF6IC zM-sDy8kk+M*7dhwgr(qqt+>koP*!WTf4cXU(fIkX@D`;K(DHz@+sDt?uGTESe^KS( zCPRfohpEg<+%}c>6<+p&{7$~_NksnkVm1y#m_2i_(2+~W$6y5nZws98nMyH7Qt>Jx z)Bd)t+kW7k*&D?&`)vx`r~{7EXellLu{t9E2q)R8vlS> z%cp>ihwxLEqgT#vrf$CufdmqzP(2@K53ehA0;-Dr41ZVZ;2IHN8KJfny~fUtqZa53 zX(N|yb{kEimQ??t*@6{1f=M|;vcjxg+!+L|QuCUx0Xc!I{I6tUWrLD%&TN7p5x>q9 ztIlv6cxRZ|cR-i|t4>%l0oB%%)GRiJ!0(%H(Olno-h%C|PXtY+|3AGTt$*$fge@7T zs{J6wbXLugEP_eRF0ADHLo zzG=jp<~;jnexM3S*s9F48#3ZJyx@IUJii230Uu_**3z@q5N0XzD}WIrCU9e!a+a+{ zK@@GtNDlhWZIayd6CG;bHAAoK&c4MD}lB5A!uh-+cXQ99I-)N#adm;l`Ett*GX!%t>5NQ z?6&1ky-hG+vTOA3J9TRnYmC<5jUuE=%<2xwW_cfYB0Iz9${03tYdNQ`&L}?tfZW~2 zItAU({O0#@MLJ^O+!iaRpx zg3Aqn;FUpMJn??mK#QEZpg8!I?(=SwQGvxl%R?MA?VOYoer^9GIE z0C<_oVSCvOu-qXgPwR9rna|X(J{rh-Nc}nrxF^wJH)eS%Iz_ZHO;(sgXDx!Jl<@v} zg=b@6dm(FDQYA}pjXHL`8Xz)#oG5YEW(ypJ8*$qXQ@51uTc5h{OAj6l;M_y~FdO0f zep4s*u&A(kwKEW!eQA#AcbFQsJe`p-$|&nsI0GNHW(ZY+PWbC7KDXHS#1@fYso&6n zpM{7{cllDT*zl2%`0lo=BZaCm-2!h!*Ov^StzH!42%Cvm+6`9 zL5GmZ9a&GeumFpFXuy%CZXI&C#U{Q80|+)#8%>-O<^|Ktxmw@-9shOj{JHC%y3R9# z0Tjt^T$z`C4H_qI20@g)Du=%sU<1KG+pZpyT&3bIffH<7zc~=js`!E zFLaja;O=K2&J1^NA$`Pq%ke~1Z1u;bT#r>*m*53|v7Kc~n{orOR|I;|6~&m|I@F@L zz16%PdevwNfhgMirH2iwLSss4_AAyh=kW5ri^4$4Mc6ttF@IdU*U}!ZoQxRG0uSbG z^I-!;g)SOf!|Xe;LJ}GuZL?VlgY~b#gF?_sPsI!u_!ssZs-vtb{@Op7^$v)i)17n_ zZB7tPr)4xHOZd6>7A%#EPp(05+{)u%)c$y>OAXEjMOjnksvY6CD*7Y?Ul4(#Ux&TT z&f8H7I9dK_{<5H*??A8IB~7X~hGws*Ph2sgA_o(3j=8kaTvUMki& z>B)R@r@(TS1|R<5fsKW~@m#)lueo{FQemUUsj3^kSs4~`TQPmG>wZ>oQ@Uy#wTYog zKt&Znj%VfyZ7S!VByxwh+x?_}(G@;#;$9Q}94J1yL=UcUfDpx47+606r;d2Sdajh% z_4Jmy>8Hjjw?yrn2@#BN*)#(!t6cK?-n3_Gl#n3)pfB6ZHGYd>nrJ;nQ01I|D@SwC z=H)4v4icn;3p^mqo{Q6h>c}_np<0q<%E5$qN+e*#_3i7aW`5N^yM;U-QnyI%{?2{3 zq9hJ40iYDch_e`=T$d6i2@&ZYD(;#8Zghpi@LelkdaR=eV_)qFb%SY{AQv7GdkhDJ z-?V~|pK&<@BWTob%!76C!vJj83ozQ%YC)a(T7h9G11P#;yJvmdM{j}qmrPDQoxU%3 zq`M4dvJ_im(gjPp&&9rhW9yX>HTa|bnaL4~PbeQBPXM7;KFQ8n8Y_)7xUwHYF>SF3 z%YbR3`So;nB8LH&=Q~%!6rmT`9G1gB@3+H zcf9-A4o5nn(?xukn0gqSTGDnU*$kBS-KBn(G*5m_T>P?23f?u*8c? z4?HZ^Rv*su@Fo%ia!8%1An#dLw4TS6Oc6o-=i_<7%oMx0MTpD<9DAiZLE+I~{VyA% zL?#Z&NVZ}(st$9)F=aBb5jQFXP+34$Y`}d5r#RA7qz^;@8lV`QT zj>6c1aaH^^2~u)6HBq6WSc@?w`&;^+guzu4qpY(ViJEa)-?z%+k7gv*mD}*_Nhc#} zt>1kt;1KUwT(BQJ(l;VWm_d`R`_5U(!I*~;O}o^{Vf0$39Ysa`C@?-3O-P&19jO! zmAL4jslAFn#B|apY@wvc0Sg06b%ZRNUlw)XG{*=v?DxgrSMv1bft(%xRJ(oz#y()Y zAaB;O=Blk^)x>~NM^*Tcsim4J`bb{>LWW;is&XDwmmUAwFBWQ>M=#V_!g^!9m(H0i zC}Grz4mOCS$wJ#9k1Q|TrPHWkRfx#^- z0oft2B7_@!PT(7%e~Y_sEN>dH#R;{IC-Tcs{6O~ZuXW}%g10mz-rRhIp{u(yc;C}0 z!w4?v6_);BP6X0SiYlak{%qQ~^V%fhko_K!fhNT<9bdQhohH-N{>ThvkDS9Zi<1)J zIWiewHXC6!9$_{gn#ECf=2|CN81mLvsGUw#Nbs=0za|4x&r${n5N0!1J^!KY;`!U2|to>>xucO zO46flL9}%IY?G%lL`l+jZ&PH18uVluIeh0Z`E|1Lq$Y6>x5zW%4U_sg30)}QAkYbr z@&Vr?J_x_MPL^7pZ( zkz)+PQx$qG@eHdzt&1)LMij@?-^_8ixwgyUpM{5?cciKMiD_F)b~GCtu7Qaxp@N^y zbeRn7S8BF>-K2F@%BQspa~YEUYv`SuueMr{OI)-?Ooh83G{2&fxr82)#QCEZe^L=H zlr70ic#n(8MTKHNWm4c>c)*vzPOO(4{uEn{8!vl0N#95*o5i$EE4rS zo)`9=C4}BYp}Q0R%f_T-!P#v61V7^sgw?6y3TT6USU;mg9T=UIFjjqHiCRi*`etwS zC&mb^uJT!+-)_szr^JMNiBX$(3%(=?GvWLGFda-}ix}@21q3H3gm# zAKr@pFiI*SM8bXB#Q(gAhUM)u9T{VH_Y=ao3d=k1Zc=4mK4wd2*A&(KwpjW$Bh86py*qFgda(aRyeH?-UbL!HWUI%wH}H%kXSfY73tr3$2P$rPeEjAm0>zz*{AJ zQiu9~rPfHCqw{@Kq>gTh;6J^>Ij_;uJnk`M0+(ZDN1nGb%y zU^~H3pLC4fx2OWTN*y+>4a;H!u`8sO4Kvjxr-;hl9@O=M1zwcXf00H;-w>=kr4{`2 zz`EXz3)VB9{bOTgTdZ<{%y_mE z?-i5pEVR6lw&fP~toorVzr> zUO4TH3-^*(dN1Z9cr6B|DPeojO7KBly;=S(nvXYQ)k6vXB!o8ir+{{`_E|$#U;iSI zGnG3Bxh=Pc(>{m1M{8&Y~qXbnk-+ve4CoRXJY-|a@jbOIW3-WX&_>Oe4i8?C$u%y~-|hAm@6Wsv%2OpdP`N$mPxTn-(oem5fC zEHEkTiAN6lVW91%eKmBr zUF~VTtlX>a;u$f_A{vRo&E)x6BzaxJ?RGKYCkqMqIF8;{Nh~qSrfDicSKAHJg*A9F zdN>qZB-%$ets=(lvRm>CoqWi)rK{i3kHq>4PPX$4+ig1-5&&kWw~Vy%xtI_5eSEI> zyY_r8K>5?*K1&4P*D3$rP;lwKa1_)tLOK|YU@7>=i6lsUj}a_iKIDWu=xbO0LGt-z zW7b1Wg9NHM`UY}8T%;Hbhv5O^x(NTOGZR|4FoQNd6;*fK^gF`5!|H}tkPlXkRwf1j zG4n+`Ld5r#@wDLBOT!J!Ljt6ETu%mnQQiQ)umN|W__M9u*TBi3Ji;9FvnVYzcWrfUvLBa7)b*r<6 zL{GSU^>bn>PsA~7>+<&^jr<|Kk^5q0FO;h}Qa8p1wR|Rp1;nl~r1JK|kQ|%OA9vM2 zIH)dIzx~mM-=T|^vjQJ3}^lQQ|v{5$vg-`DTa*NNH7Qn>}`1bFr6 zi~q+k-@##i}0`vsUP0iua3qc(KySqD% zpYW|aw_bc%^O3##EcE`Fdv7r15eoig%7<^wvsFEEIlv-QZAAb~)3`ETbi-Rz)19EW zBQgz@oCyS7toSsPCDLhGTZ4ykjRCRys}>mu5Ek$8>010<39F(J9F6 z-yhqIRF?N|KuBpHoR`&N*9{WhJ+%nl>V!ID|9lFtI`wlKP zPTG96_#gv;|B0Ft(N<<;9z6=+IDT34RcfN&kq5|sQgT=-LpR}#^#ymEX*w(I|x}Gr1W=RxNhch zX-U7@`SkqmOy-u}FX`!TGqRkSO8#OPa1&#G1-U#v)Me*q9n=4kx1YoYIomunIDc-o zznWNfNW_nyrXir^r*`?(?#)C?o`oQoPH)R{qh`gGaSxrDZDOVDRWi1x=(1~dzuo^Bg{6!63e^EJmelK}4waNTL zY6@pz!bFMPkO@_F7N>M5ERA5wik$&QfZKKigNGrfDN|4JOrsBBj3v}YASy`lV zrA8;LYY-b08(rz}1-#nH*m!d-sMXffMM8+ALU2sPh?eI Rp?^8RP*u`;U8w*G{~vK}1=|1s literal 0 HcmV?d00001 diff --git a/src/.vitepress/.temp/getting-started_index.md.js b/src/.vitepress/.temp/getting-started_index.md.js new file mode 100644 index 00000000..49452246 --- /dev/null +++ b/src/.vitepress/.temp/getting-started_index.md.js @@ -0,0 +1,73 @@ +import { ssrRenderAttrs, ssrRenderStyle } from "vue/server-renderer"; +import { useSSRContext } from "vue"; +import { _ as _export_sfc } from "./plugin-vue_export-helper.yVxbj29m.js"; +const __pageData = JSON.parse( + '{"title":"Getting Started","description":"","frontmatter":{},"headers":[],"relativePath":"getting-started/index.md","filePath":"getting-started/index.md"}', +); +const _sfc_main = { name: "getting-started/index.md" }; +function _sfc_ssrRender( + _ctx, + _push, + _parent, + _attrs, + $props, + $setup, + $data, + $options, +) { + _push(`

    Getting Started

    
    +          _____                   _______                   _____
    +         /\\    \\                 /::\\    \\                 /\\    \\
    +        /::\\    \\               /::::\\    \\               /::\\    \\
    +       /::::\\    \\             /::::::\\    \\             /::::\\    \\
    +      /::::::\\    \\           /::::::::\\    \\           /::::::\\    \\
    +     /:::/\\:::\\    \\         /:::/~~\\:::\\    \\         /:::/\\:::\\    \\
    +    /:::/__\\:::\\    \\       /:::/    \\:::\\    \\       /:::/__\\:::\\    \\
    +   /::::\\   \\:::\\    \\     /:::/    / \\:::\\    \\      \\:::\\   \\:::\\    \\
    +  /::::::\\   \\:::\\    \\   /:::/____/   \\:::\\____\\   ___\\:::\\   \\:::\\    \\
    + /:::/\\:::\\   \\:::\\    \\ |:::|    |     |:::|    | /\\   \\:::\\   \\:::\\    \\
    +/:::/  \\:::\\   \\:::\\____\\|:::|____|     |:::|    |/::\\   \\:::\\   \\:::\\____\\
    +\\::/    \\:::\\  /:::/    / \\:::\\    \\   /:::/    / \\:::\\   \\:::\\   \\::/    /
    + \\/____/ \\:::\\/:::/    /   \\:::\\    \\ /:::/    /   \\:::\\   \\:::\\   \\/____/
    +          \\::::::/    /     \\:::\\    /:::/    /     \\:::\\   \\:::\\    \\
    +           \\::::/    /       \\:::\\__/:::/    /       \\:::\\   \\:::\\____\\
    +           /:::/    /         \\::::::::/    /         \\:::\\  /:::/    /
    +          /:::/    /           \\::::::/    /           \\:::\\/:::/    /
    +         /:::/    /             \\::::/    /             \\::::::/    /
    +        /:::/    /               \\::/____/               \\::::/    /
    +        \\::/    /                 ~~                      \\::/    /
    +         \\/____/                                           \\/____/

    Welcome to aos, getting started with using aos, you just need to have the latest version of nodejs installed on your computer, and a code editor like vim or vscode.

    Requirements

    Getting Started

    sh
    npm i -g https://get_ao.g8way.io && aos

    NOTE: after the first time you run aos it installs it to your local machine, so the next time you want to run aos, just type aos + [enter]

    About

    aos is a command-line app that connects to your aos Process on the ao Permaweb Computer Grid. The ao Computer Grid, is like the internet, but for compute. Each Process on the Grid can receive messages and send messages. This cli will allow you to pass LUA expressions to your Process, and those expressions get evaluated and return output to your system.

    First Prompt

    Now that you have installed aos, you should have a Process running a Prompt asking for input. The input of aos is lua expressions, so lets try out our aos console.

    Type:

    sh
    "Hello World"

    Then press the "[Enter]" key, you should see it sign and post the message, then check the result which should return:

    "Hello World"

    Congrats 🎉

    You have just spawned an aos Process, and you are able to interact with that Process using the aos console. For going deeper into aos check out our step by step tutorials in the Guides section of the cookbook:

    Next Steps

    `); +} +const _sfc_setup = _sfc_main.setup; +_sfc_main.setup = (props, ctx) => { + const ssrContext = useSSRContext(); + (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add( + "getting-started/index.md", + ); + return _sfc_setup ? _sfc_setup(props, ctx) : void 0; +}; +const index = /* @__PURE__ */ _export_sfc(_sfc_main, [ + ["ssrRender", _sfc_ssrRender], +]); +export { __pageData, index as default }; diff --git a/src/.vitepress/.temp/guides_aoconnect_aoconnect.md.js b/src/.vitepress/.temp/guides_aoconnect_aoconnect.md.js new file mode 100644 index 00000000..31ca7214 --- /dev/null +++ b/src/.vitepress/.temp/guides_aoconnect_aoconnect.md.js @@ -0,0 +1,35 @@ +import { ssrRenderAttrs } from "vue/server-renderer"; +import { useSSRContext } from "vue"; +import { _ as _export_sfc } from "./plugin-vue_export-helper.yVxbj29m.js"; +const __pageData = JSON.parse( + '{"title":"ao connect","description":"","frontmatter":{},"headers":[],"relativePath":"guides/aoconnect/aoconnect.md","filePath":"guides/aoconnect/aoconnect.md"}', +); +const _sfc_main = { name: "guides/aoconnect/aoconnect.md" }; +function _sfc_ssrRender( + _ctx, + _push, + _parent, + _attrs, + $props, + $setup, + $data, + $options, +) { + _push( + `

    ao connect

    ao connect is a Javascript/Typescript library to interact with the system from Node JS or the browser.

    Guides in this section provide snippets on how to utilize ao connect. All snippets are written in Javascript but should translate easily to Typescript.

    `, + ); +} +const _sfc_setup = _sfc_main.setup; +_sfc_main.setup = (props, ctx) => { + const ssrContext = useSSRContext(); + (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add( + "guides/aoconnect/aoconnect.md", + ); + return _sfc_setup ? _sfc_setup(props, ctx) : void 0; +}; +const aoconnect = /* @__PURE__ */ _export_sfc(_sfc_main, [ + ["ssrRender", _sfc_ssrRender], +]); +export { __pageData, aoconnect as default }; diff --git a/src/.vitepress/.temp/guides_aoconnect_connecting.md.js b/src/.vitepress/.temp/guides_aoconnect_connecting.md.js new file mode 100644 index 00000000..43329611 --- /dev/null +++ b/src/.vitepress/.temp/guides_aoconnect_connecting.md.js @@ -0,0 +1,199 @@ +import { ssrRenderAttrs, ssrRenderStyle } from "vue/server-renderer"; +import { useSSRContext } from "vue"; +import { _ as _export_sfc } from "./plugin-vue_export-helper.yVxbj29m.js"; +const __pageData = JSON.parse( + '{"title":"Connecting to specific ao nodes","description":"","frontmatter":{},"headers":[],"relativePath":"guides/aoconnect/connecting.md","filePath":"guides/aoconnect/connecting.md"}', +); +const _sfc_main = { name: "guides/aoconnect/connecting.md" }; +function _sfc_ssrRender( + _ctx, + _push, + _parent, + _attrs, + $props, + $setup, + $data, + $options, +) { + _push(`

    Connecting to specific ao nodes

    When including ao connect in your code you have the ability to connect to a specific MU and CU, as well as being able to specifiy an Arweave gateway. This can be done by importing the "connect" function and extracting the functions from a call to the "connect" function.

    You may want to do this if you want to know which MU is being called when you send your message so that later you can debug from the specified MU. You also may want to read a result from a specific CU. You may in fact just prefer a particular MU and CU for a different reason. You can specify the gateway in order to use something other than the default, which is arweave.net.

    Importing without a call to connect

    js
    // Here aoconnect will implicitly use the default nodes/units
    +import { spawn, message, result } from "@permaweb/aoconnect";

    Connecting to a specific MU, CU, and gateway

    js
    import { connect } from "@permaweb/aoconnect";
    +
    +const { spawn, message, result } = connect({
    +  MU_URL: "https://ao-mu-1.onrender.com",
    +  CU_URL: "https://ao-cu-1.onrender.com",
    +  GATEWAY_URL: "https://g8way.io",
    +});
    +
    +// now spawn, message, and result can be used the same way as if they were imported directly

    All three of these parameters to connect are optional and it is valid to specify only 1 or 2 of them, or none. You could pass in just the MU_URL, for example.

    js
    import { connect } from "@permaweb/aoconnect";
    +
    +const { spawn, message, result } = connect({
    +  MU_URL: "https://ao-mu-1.onrender.com",
    +});
    `); +} +const _sfc_setup = _sfc_main.setup; +_sfc_main.setup = (props, ctx) => { + const ssrContext = useSSRContext(); + (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add( + "guides/aoconnect/connecting.md", + ); + return _sfc_setup ? _sfc_setup(props, ctx) : void 0; +}; +const connecting = /* @__PURE__ */ _export_sfc(_sfc_main, [ + ["ssrRender", _sfc_ssrRender], +]); +export { __pageData, connecting as default }; diff --git a/src/.vitepress/.temp/guides_aoconnect_installing-connect.md.js b/src/.vitepress/.temp/guides_aoconnect_installing-connect.md.js new file mode 100644 index 00000000..2927c287 --- /dev/null +++ b/src/.vitepress/.temp/guides_aoconnect_installing-connect.md.js @@ -0,0 +1,109 @@ +import { ssrRenderAttrs, ssrRenderStyle } from "vue/server-renderer"; +import { useSSRContext } from "vue"; +import { _ as _export_sfc } from "./plugin-vue_export-helper.yVxbj29m.js"; +const __pageData = JSON.parse( + '{"title":"Installing ao connect","description":"","frontmatter":{},"headers":[],"relativePath":"guides/aoconnect/installing-connect.md","filePath":"guides/aoconnect/installing-connect.md"}', +); +const _sfc_main = { name: "guides/aoconnect/installing-connect.md" }; +function _sfc_ssrRender( + _ctx, + _push, + _parent, + _attrs, + $props, + $setup, + $data, + $options, +) { + _push( + `

    Installing ao connect

    Prerequisites


    In order to install ao connect into your app you must have NodeJS/NPM 18 or higher.

    Installing

    npm

    sh
    npm install --save @permaweb/aoconnect

    yarn

    sh
    yarn add @permaweb/aoconnect -D

    This module can now be used from NodeJS as well as a browser, it can be included as shown below.

    ESM (Node & Browser) aka type: module

    js
    import { spawn, message, result } from "@permaweb/aoconnect";

    CJS (Node) type: commonjs

    js
    const { spawn, message, result } = require("@permaweb/aoconnect");
    `, + ); +} +const _sfc_setup = _sfc_main.setup; +_sfc_main.setup = (props, ctx) => { + const ssrContext = useSSRContext(); + (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add( + "guides/aoconnect/installing-connect.md", + ); + return _sfc_setup ? _sfc_setup(props, ctx) : void 0; +}; +const installingConnect = /* @__PURE__ */ _export_sfc(_sfc_main, [ + ["ssrRender", _sfc_ssrRender], +]); +export { __pageData, installingConnect as default }; diff --git a/src/.vitepress/.temp/guides_aoconnect_reading-results.md.js b/src/.vitepress/.temp/guides_aoconnect_reading-results.md.js new file mode 100644 index 00000000..dfececad --- /dev/null +++ b/src/.vitepress/.temp/guides_aoconnect_reading-results.md.js @@ -0,0 +1,98 @@ +import { ssrRenderAttrs, ssrRenderStyle } from "vue/server-renderer"; +import { useSSRContext } from "vue"; +import { _ as _export_sfc } from "./plugin-vue_export-helper.yVxbj29m.js"; +const __pageData = JSON.parse( + '{"title":"Reading results from an ao Process","description":"","frontmatter":{},"headers":[],"relativePath":"guides/aoconnect/reading-results.md","filePath":"guides/aoconnect/reading-results.md"}', +); +const _sfc_main = { name: "guides/aoconnect/reading-results.md" }; +function _sfc_ssrRender( + _ctx, + _push, + _parent, + _attrs, + $props, + $setup, + $data, + $options, +) { + _push(`

    Reading results from an ao Process

    In ao, messages produce results which are made available by Compute Units (CU's). Results are JSON objects consisting of the following fields: messages, spawns, output and error.

    Results are what the ao system uses to send messages and spawns that are generated by processes. A process can send a message just like you can as a developer, by returning messages and spawns in a result.

    You may want to access a result to display the output generated by your message. Or you may want to see what messages etc., were generated. You do not need to take the messages and spawns from a result and send them yourself. They are automatically handled by Messenger Units (MU's).

    Fetching a result

    js
    import { result } from "@permaweb/aoconnect";
    +
    +let { messages, spawns, output, error } = await result({
    +  // the arweave TXID of the message
    +  message: "message-id",
    +  // the arweave TXID of the process
    +  process: "process-id",
    +});
    `); +} +const _sfc_setup = _sfc_main.setup; +_sfc_main.setup = (props, ctx) => { + const ssrContext = useSSRContext(); + (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add( + "guides/aoconnect/reading-results.md", + ); + return _sfc_setup ? _sfc_setup(props, ctx) : void 0; +}; +const readingResults = /* @__PURE__ */ _export_sfc(_sfc_main, [ + ["ssrRender", _sfc_ssrRender], +]); +export { __pageData, readingResults as default }; diff --git a/src/.vitepress/.temp/guides_aoconnect_sending-messages.md.js b/src/.vitepress/.temp/guides_aoconnect_sending-messages.md.js new file mode 100644 index 00000000..7c7079b1 --- /dev/null +++ b/src/.vitepress/.temp/guides_aoconnect_sending-messages.md.js @@ -0,0 +1,421 @@ +import { ssrRenderAttrs, ssrRenderStyle } from "vue/server-renderer"; +import { useSSRContext } from "vue"; +import { _ as _export_sfc } from "./plugin-vue_export-helper.yVxbj29m.js"; +const __pageData = JSON.parse( + '{"title":"Sending a Message to a Process","description":"","frontmatter":{},"headers":[],"relativePath":"guides/aoconnect/sending-messages.md","filePath":"guides/aoconnect/sending-messages.md"}', +); +const _sfc_main = { name: "guides/aoconnect/sending-messages.md" }; +function _sfc_ssrRender( + _ctx, + _push, + _parent, + _attrs, + $props, + $setup, + $data, + $options, +) { + _push(`

    Sending a Message to a Process

    A deep dive into the concept of Messages can be found in the ao Messages concept. This guide focuses on using ao connect to send a message to a process.

    Sending a message is the central way in which your app can interact with ao. A message is input to a process. There are 5 parts of a message that you can specify which are "target", "data", "tags", "anchor", and finally the messages "signature".

    Refer to your process module's source code or documentation to see how the message is used in its computation. The ao connect library will translate the parameters you pass it in the code below, construct a message, and send it.

    Sending a Message in NodeJS

    js
    import { readFileSync } from "node:fs";
    +
    +import { message, createDataItemSigner } from "@permaweb/aoconnect";
    +
    +const wallet = JSON.parse(
    +  readFileSync("/path/to/arweave/wallet.json").toString(),
    +);
    +
    +// The only 2 mandatory parameters here are process and signer
    +await message({
    +  /*
    +    The arweave TXID of the process, this will become the "target".
    +    This is the process the message is ultimately sent to.
    +  */
    +  process: "process-id",
    +  // Tags that the process will use as input.
    +  tags: [
    +    { name: "Your-Tag-Name-Here", value: "your-tag-value" },
    +    { name: "Another-Tag", value: "another-value" },
    +  ],
    +  // A signer function used to build the message "signature"
    +  signer: createDataItemSigner(wallet),
    +  /*
    +    The "data" portion of the message
    +    If not specified a random string will be generated
    +  */
    +  data: "any data",
    +})
    +  .then(console.log)
    +  .catch(console.error);

    Sending a Message in a browser

    js
    import { message, createDataItemSigner } from "@permaweb/aoconnect";
    +
    +// The only 2 mandatory parameters here are process and signer
    +await message({
    +  /*
    +    The arweave TXID of the process, this will become the "target".
    +    This is the process the message is ultimately sent to.
    +  */
    +  process: "process-id",
    +  // Tags that the process will use as input.
    +  tags: [
    +    { name: "Your-Tag-Name-Here", value: "your-tag-value" },
    +    { name: "Another-Tag", value: "another-value" },
    +  ],
    +  // A signer function used to build the message "signature"
    +  signer: createDataItemSigner(globalThis.arweaveWallet),
    +  /*
    +    The "data" portion of the message.
    +    If not specified a random string will be generated
    +  */
    +  data: "any data",
    +})
    +  .then(console.log)
    +  .catch(console.error);
    `); +} +const _sfc_setup = _sfc_main.setup; +_sfc_main.setup = (props, ctx) => { + const ssrContext = useSSRContext(); + (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add( + "guides/aoconnect/sending-messages.md", + ); + return _sfc_setup ? _sfc_setup(props, ctx) : void 0; +}; +const sendingMessages = /* @__PURE__ */ _export_sfc(_sfc_main, [ + ["ssrRender", _sfc_ssrRender], +]); +export { __pageData, sendingMessages as default }; diff --git a/src/.vitepress/.temp/guides_aoconnect_spawning-processes.md.js b/src/.vitepress/.temp/guides_aoconnect_spawning-processes.md.js new file mode 100644 index 00000000..7bf0faeb --- /dev/null +++ b/src/.vitepress/.temp/guides_aoconnect_spawning-processes.md.js @@ -0,0 +1,367 @@ +import { ssrRenderAttrs, ssrRenderStyle } from "vue/server-renderer"; +import { useSSRContext } from "vue"; +import { _ as _export_sfc } from "./plugin-vue_export-helper.yVxbj29m.js"; +const __pageData = JSON.parse( + '{"title":"Spawning a Process","description":"","frontmatter":{},"headers":[],"relativePath":"guides/aoconnect/spawning-processes.md","filePath":"guides/aoconnect/spawning-processes.md"}', +); +const _sfc_main = { name: "guides/aoconnect/spawning-processes.md" }; +function _sfc_ssrRender( + _ctx, + _push, + _parent, + _attrs, + $props, + $setup, + $data, + $options, +) { + _push(`

    Spawning a Process

    A deep dive into the concept of Processes can be found in the ao Processes concept. This guide focuses on using ao connect to spawn a Process.

    In order to spawn a Process you must have the TXID of an ao Module that has been uploaded to Arweave. The Module is the source code for the Process. The Process itself is an instantiation of that source.

    You must also have the wallet address of a Scheduler Unit (SU). This specified SU will act as the scheduler for this Process. This means that all nodes in the system can tell that they need to read and write to this SU for this Process. You can use the address below.

    Wallet address of an available Scheduler

    sh
    TZ7o7SIZ06ZEJ14lXwVtng1EtSx60QkPy-kh-kdAXog

    Spawning a Process in NodeJS

    js
    import { readFileSync } from "node:fs";
    +
    +import { createDataItemSigner, spawn } from "@permaweb/aoconnect";
    +
    +const wallet = JSON.parse(
    +  readFileSync("/path/to/arweave/wallet.json").toString(),
    +);
    +
    +const processId = await spawn({
    +  // The Arweave TXID of the ao Module
    +  module: "module TXID",
    +  // The Arweave wallet address of a Scheduler Unit
    +  scheduler: "TZ7o7SIZ06ZEJ14lXwVtng1EtSx60QkPy-kh-kdAXog",
    +  // A signer function containing your wallet
    +  signer: createDataItemSigner(wallet),
    +  /*
    +    Refer to a Processes' source code or documentation
    +    for tags that may effect its computation.
    +  */
    +  tags: [
    +    { name: "Your-Tag-Name-Here", value: "your-tag-value" },
    +    { name: "Another-Tag", value: "another-value" },
    +  ],
    +});

    Spawning a Process in a browser

    js
    import { createDataItemSigner, spawn } from "@permaweb/ao-sdk";
    +
    +const processId = await spawn({
    +  // The Arweave TXID of the ao Module
    +  module: "module TXID",
    +  // The Arweave wallet address of a Scheduler Unit
    +  scheduler: "TZ7o7SIZ06ZEJ14lXwVtng1EtSx60QkPy-kh-kdAXog",
    +  // A signer function containing your wallet
    +  signer: createDataItemSigner(globalThis.arweaveWallet),
    +  /*
    +    Refer to a Processes' source code or documentation
    +    for tags that may effect its computation.
    +  */
    +  tags: [
    +    { name: "Your-Tag-Name-Here", value: "your-tag-value" },
    +    { name: "Another-Tag", value: "another-value" },
    +  ],
    +});
    `); +} +const _sfc_setup = _sfc_main.setup; +_sfc_main.setup = (props, ctx) => { + const ssrContext = useSSRContext(); + (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add( + "guides/aoconnect/spawning-processes.md", + ); + return _sfc_setup ? _sfc_setup(props, ctx) : void 0; +}; +const spawningProcesses = /* @__PURE__ */ _export_sfc(_sfc_main, [ + ["ssrRender", _sfc_ssrRender], +]); +export { __pageData, spawningProcesses as default }; diff --git a/src/.vitepress/.temp/guides_aos_cli.md.js b/src/.vitepress/.temp/guides_aos_cli.md.js new file mode 100644 index 00000000..46da8f48 --- /dev/null +++ b/src/.vitepress/.temp/guides_aos_cli.md.js @@ -0,0 +1,84 @@ +import { ssrRenderAttrs, ssrRenderStyle } from "vue/server-renderer"; +import { useSSRContext } from "vue"; +import { _ as _export_sfc } from "./plugin-vue_export-helper.yVxbj29m.js"; +const __pageData = JSON.parse( + '{"title":"CLI","description":"","frontmatter":{},"headers":[],"relativePath":"guides/aos/cli.md","filePath":"guides/aos/cli.md"}', +); +const _sfc_main = { name: "guides/aos/cli.md" }; +function _sfc_ssrRender( + _ctx, + _push, + _parent, + _attrs, + $props, + $setup, + $data, + $options, +) { + _push( + `

    CLI

    There are some command-line arguments you pass to our aos to do the following:

    • [name] - create a new process or loads an existing process for your wallet
    • --load [file] - load a file, you can add one or many of this command
    • --cron [interval] - only used when creating a process
    • --wallet [walletfile] - use a specific wallet

    Managing multiple processes with aos

    sh
    aos

    Starts or connects to a process with the name default

    sh
    aos chatroom

    Starts or connects to a process with the name of chatroom

    sh
    aos treasureRoom

    Starts or connects to a process with the name of treasureRoom

    Load flag

    sh
    aos treasureRoom --load greeting.lua --load treasure.lua --load puzzle.lua

    With the load flag I can load many source files to my process

    CRON Flag

    If you want to setup your process to react on a schedule we need to tell ao, we do that when we spawn the process.

    sh
    aos chatroom --cron 2-minutes
    `, + ); +} +const _sfc_setup = _sfc_main.setup; +_sfc_main.setup = (props, ctx) => { + const ssrContext = useSSRContext(); + (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add( + "guides/aos/cli.md", + ); + return _sfc_setup ? _sfc_setup(props, ctx) : void 0; +}; +const cli = /* @__PURE__ */ _export_sfc(_sfc_main, [ + ["ssrRender", _sfc_ssrRender], +]); +export { __pageData, cli as default }; diff --git a/src/.vitepress/.temp/guides_aos_index.md.js b/src/.vitepress/.temp/guides_aos_index.md.js new file mode 100644 index 00000000..f4397f85 --- /dev/null +++ b/src/.vitepress/.temp/guides_aos_index.md.js @@ -0,0 +1,35 @@ +import { ssrRenderAttrs } from "vue/server-renderer"; +import { useSSRContext } from "vue"; +import { _ as _export_sfc } from "./plugin-vue_export-helper.yVxbj29m.js"; +const __pageData = JSON.parse( + '{"title":"aos","description":"","frontmatter":{},"headers":[],"relativePath":"guides/aos/index.md","filePath":"guides/aos/index.md"}', +); +const _sfc_main = { name: "guides/aos/index.md" }; +function _sfc_ssrRender( + _ctx, + _push, + _parent, + _attrs, + $props, + $setup, + $data, + $options, +) { + _push( + `

    aos

    ao is a hyper parallel computer that enables distributed compute, aos is an operating system on top of that computer. With aos you can interact with processes and you can code processes in a very simple an intuitive way. All you need is a termnial and an editor. The language chosen for aos is lua, it is a robust and deterministic dynamic language that is a lot of fun to work with.

    If you have done so yet, take 15 minutes and go through our Getting Started Tutorial?

    Try It

    `, + ); +} +const _sfc_setup = _sfc_main.setup; +_sfc_main.setup = (props, ctx) => { + const ssrContext = useSSRContext(); + (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add( + "guides/aos/index.md", + ); + return _sfc_setup ? _sfc_setup(props, ctx) : void 0; +}; +const index = /* @__PURE__ */ _export_sfc(_sfc_main, [ + ["ssrRender", _sfc_ssrRender], +]); +export { __pageData, index as default }; diff --git a/src/.vitepress/.temp/guides_aos_installing.md.js b/src/.vitepress/.temp/guides_aos_installing.md.js new file mode 100644 index 00000000..164bd31b --- /dev/null +++ b/src/.vitepress/.temp/guides_aos_installing.md.js @@ -0,0 +1,46 @@ +import { ssrRenderAttrs, ssrRenderStyle } from "vue/server-renderer"; +import { useSSRContext } from "vue"; +import { _ as _export_sfc } from "./plugin-vue_export-helper.yVxbj29m.js"; +const __pageData = JSON.parse( + '{"title":"Installing aos","description":"","frontmatter":{},"headers":[],"relativePath":"guides/aos/installing.md","filePath":"guides/aos/installing.md"}', +); +const _sfc_main = { name: "guides/aos/installing.md" }; +function _sfc_ssrRender( + _ctx, + _push, + _parent, + _attrs, + $props, + $setup, + $data, + $options, +) { + _push( + `

    Installing aos

    Installing aos only requires NodeJS - https://nodejs.org

    NOTE: If you are on windows you may get better results with WSL Console.

    sh
    npm i -g https://get_ao.g8way.io

    Once installed you can run by typing aos

    `, + ); +} +const _sfc_setup = _sfc_main.setup; +_sfc_main.setup = (props, ctx) => { + const ssrContext = useSSRContext(); + (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add( + "guides/aos/installing.md", + ); + return _sfc_setup ? _sfc_setup(props, ctx) : void 0; +}; +const installing = /* @__PURE__ */ _export_sfc(_sfc_main, [ + ["ssrRender", _sfc_ssrRender], +]); +export { __pageData, installing as default }; diff --git a/src/.vitepress/.temp/guides_aos_intro.md.js b/src/.vitepress/.temp/guides_aos_intro.md.js new file mode 100644 index 00000000..b06062a1 --- /dev/null +++ b/src/.vitepress/.temp/guides_aos_intro.md.js @@ -0,0 +1,82 @@ +import { ssrRenderAttrs, ssrRenderStyle } from "vue/server-renderer"; +import { useSSRContext } from "vue"; +import { _ as _export_sfc } from "./plugin-vue_export-helper.yVxbj29m.js"; +const __pageData = JSON.parse( + '{"title":"Introduction","description":"","frontmatter":{},"headers":[],"relativePath":"guides/aos/intro.md","filePath":"guides/aos/intro.md"}', +); +const _sfc_main = { name: "guides/aos/intro.md" }; +function _sfc_ssrRender( + _ctx, + _push, + _parent, + _attrs, + $props, + $setup, + $data, + $options, +) { + _push(`

    Introduction

    aos is a different approach to building Processes or Contracts, the ao computer is a decentralized computer network that allows compute to run anywhere and aos in a unique interactive shell. You can use aos as your personal operating system, your development environment for building ao Processes, and your bot Army.

    Lets go over some basic commands.

    If you want to display the contents of any variable through the console, simply type the variable name.

    lua
    Name

    Inbox is a collection of messages that your Process has received.

    lua
    Inbox[1]

    If you want to get a count of messages, just add the # infront of inbox

    lua
    #Inbox

    You can personalize you aos Process, for example, if you want a custom prompt, just overwrite the prompt function.

    Use either .editor or .load file to load this function on your process.

    lua
    function Prompt()
    +  return "inbox: " .. #inbox .. "> "
    +end

    Globals

    In aos process there are some Globals that can make development a little more intuitive.

    NameDescriptionType
    InboxThis is a lua Table that stores all the messages that are received and not handlers by any handlers.Table(Array)
    Send(Message)This is a global function that is available in the interactive environment that allows you to send messages to Processesfunction
    Spawn(Module, Message)This is a global function that is available in the aos interactive environment that allows you to spawn processes
    Namea string that is set on init that describes the name of your processstring
    Ownera string that is set on the init of the process that documents the owner of the process, warning if you change this value, it can brick you ability to interact with your processstring
    Handlersa lua Table that contains helper functions that allows you to create handlers that execute functionality based on the pattern matching function on inbound messagestable
    Dumpa function that takes any lua Table and generates a print friendly output of the datafunction
    Utilsa functional utility library with functions like map, reduce, filtermodule
    aothis is a core function library for sending messages and spawing processesmodule

    Modules

    In aos there are some built in common lua modules that are already available for you to work with, these modules can be referenced with a "require" function.

    NameDescription
    jsona json module that allows you to encode and decode json documents
    aocontains ao specific functions like send and spawn
    .base64a base64 module that allows you to encode and decode base64 text
    .prettya pretty print module using the function tprint to output formatted syntax
    .utilsan utility function library
    `); +} +const _sfc_setup = _sfc_main.setup; +_sfc_main.setup = (props, ctx) => { + const ssrContext = useSSRContext(); + (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add( + "guides/aos/intro.md", + ); + return _sfc_setup ? _sfc_setup(props, ctx) : void 0; +}; +const intro = /* @__PURE__ */ _export_sfc(_sfc_main, [ + ["ssrRender", _sfc_ssrRender], +]); +export { __pageData, intro as default }; diff --git a/src/.vitepress/.temp/guides_aos_load.md.js b/src/.vitepress/.temp/guides_aos_load.md.js new file mode 100644 index 00000000..5ffb2b79 --- /dev/null +++ b/src/.vitepress/.temp/guides_aos_load.md.js @@ -0,0 +1,101 @@ +import { ssrRenderAttrs, ssrRenderStyle } from "vue/server-renderer"; +import { useSSRContext } from "vue"; +import { _ as _export_sfc } from "./plugin-vue_export-helper.yVxbj29m.js"; +const __pageData = JSON.parse( + '{"title":".load","description":"","frontmatter":{},"headers":[],"relativePath":"guides/aos/load.md","filePath":"guides/aos/load.md"}', +); +const _sfc_main = { name: "guides/aos/load.md" }; +function _sfc_ssrRender( + _ctx, + _push, + _parent, + _attrs, + $props, + $setup, + $data, + $options, +) { + _push(`

    .load

    This feature allows you to load lua code from a source file on your local machine, this simple feature gives you a nice DX experience for working with aos processes.

    When creating handlers you may have a lot of code and you want to take advantage of a rich development environment like vscode. You can even install the lua extension to get some syntax checking.

    So how do you publish your local lua source code to your ao process? This is where the .load command comes into play.

    hello.lua

    lua
    Handlers.add(
    +  "ping",
    +  Handlers.utils.hasMatchingData("ping"),
    +  Handlers.utils.reply("pong")
    +)

    aos shell

    sh
    .load hello.lua

    Easy Peasy! 🐶

    `); +} +const _sfc_setup = _sfc_main.setup; +_sfc_main.setup = (props, ctx) => { + const ssrContext = useSSRContext(); + (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add( + "guides/aos/load.md", + ); + return _sfc_setup ? _sfc_setup(props, ctx) : void 0; +}; +const load = /* @__PURE__ */ _export_sfc(_sfc_main, [ + ["ssrRender", _sfc_ssrRender], +]); +export { __pageData, load as default }; diff --git a/src/.vitepress/.temp/guides_debugging_debugging.md.js b/src/.vitepress/.temp/guides_debugging_debugging.md.js new file mode 100644 index 00000000..37a46b04 --- /dev/null +++ b/src/.vitepress/.temp/guides_debugging_debugging.md.js @@ -0,0 +1,35 @@ +import { ssrRenderAttrs } from "vue/server-renderer"; +import { useSSRContext } from "vue"; +import { _ as _export_sfc } from "./plugin-vue_export-helper.yVxbj29m.js"; +const __pageData = JSON.parse( + '{"title":"Debugging","description":"","frontmatter":{},"headers":[],"relativePath":"guides/debugging/debugging.md","filePath":"guides/debugging/debugging.md"}', +); +const _sfc_main = { name: "guides/debugging/debugging.md" }; +function _sfc_ssrRender( + _ctx, + _push, + _parent, + _attrs, + $props, + $setup, + $data, + $options, +) { + _push( + `

    Debugging

    Here you can find utilities useful for debugging your ao workflow.

    `, + ); +} +const _sfc_setup = _sfc_main.setup; +_sfc_main.setup = (props, ctx) => { + const ssrContext = useSSRContext(); + (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add( + "guides/debugging/debugging.md", + ); + return _sfc_setup ? _sfc_setup(props, ctx) : void 0; +}; +const debugging = /* @__PURE__ */ _export_sfc(_sfc_main, [ + ["ssrRender", _sfc_ssrRender], +]); +export { __pageData, debugging as default }; diff --git a/src/.vitepress/.temp/guides_debugging_tracing.md.js b/src/.vitepress/.temp/guides_debugging_tracing.md.js new file mode 100644 index 00000000..7f09d3a8 --- /dev/null +++ b/src/.vitepress/.temp/guides_debugging_tracing.md.js @@ -0,0 +1,148 @@ +import { ssrRenderAttrs, ssrRenderStyle } from "vue/server-renderer"; +import { useSSRContext } from "vue"; +import { _ as _export_sfc } from "./plugin-vue_export-helper.yVxbj29m.js"; +const __pageData = JSON.parse( + '{"title":"Tracing a Message or Process","description":"","frontmatter":{},"headers":[],"relativePath":"guides/debugging/tracing.md","filePath":"guides/debugging/tracing.md"}', +); +const _sfc_main = { name: "guides/debugging/tracing.md" }; +function _sfc_ssrRender( + _ctx, + _push, + _parent, + _attrs, + $props, + $setup, + $data, + $options, +) { + _push(`

    Tracing a Message or Process

    Messenger Units (MU's), provide a trace endpoint which allows you to see what is going on with a Message or Process. You must trace on the MU that you wrote the Message to because MU's do not share what they have done with each other. It is valid to write to many different MU's for one process.

    The subsequent processing that can occur in the background after a Message is sent from a user/developer, that is related to the Message, can be very large because there is no telling how many Messages and Spawns are coming from the Process.

    You can access the trace endpoint directly from the browser or using another http client

    Tracing by Message ID

    sh
    curl "https://ao-mu-1.onrender.com/?debug=true&message=txidofmessage"

    Tracing by Process ID

    sh
    curl "https://ao-mu-1.onrender.com/?debug=true&process=txidofprocess"

    Tracing everything going on in the MU

    sh
    curl "https://ao-mu-1.onrender.com/?debug=true"

    Tracing from javascript

    js
    fetch("https://ao-mu-1.onrender.com/?debug=true&message=txidofmessage")
    +  .then((response) => response.json())
    +  .then((data) => console.log(data))
    +  .catch((error) => console.error("Error:", error));
    `); +} +const _sfc_setup = _sfc_main.setup; +_sfc_main.setup = (props, ctx) => { + const ssrContext = useSSRContext(); + (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add( + "guides/debugging/tracing.md", + ); + return _sfc_setup ? _sfc_setup(props, ctx) : void 0; +}; +const tracing = /* @__PURE__ */ _export_sfc(_sfc_main, [ + ["ssrRender", _sfc_ssrRender], +]); +export { __pageData, tracing as default }; diff --git a/src/.vitepress/.temp/guides_index.md.js b/src/.vitepress/.temp/guides_index.md.js new file mode 100644 index 00000000..5681b815 --- /dev/null +++ b/src/.vitepress/.temp/guides_index.md.js @@ -0,0 +1,35 @@ +import { ssrRenderAttrs } from "vue/server-renderer"; +import { useSSRContext } from "vue"; +import { _ as _export_sfc } from "./plugin-vue_export-helper.yVxbj29m.js"; +const __pageData = JSON.parse( + '{"title":"Guides","description":"","frontmatter":{},"headers":[],"relativePath":"guides/index.md","filePath":"guides/index.md"}', +); +const _sfc_main = { name: "guides/index.md" }; +function _sfc_ssrRender( + _ctx, + _push, + _parent, + _attrs, + $props, + $setup, + $data, + $options, +) { + _push( + `

    Guides

    Snack-sized guides for the building blocks of ao

    `, + ); +} +const _sfc_setup = _sfc_main.setup; +_sfc_main.setup = (props, ctx) => { + const ssrContext = useSSRContext(); + (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add( + "guides/index.md", + ); + return _sfc_setup ? _sfc_setup(props, ctx) : void 0; +}; +const index = /* @__PURE__ */ _export_sfc(_sfc_main, [ + ["ssrRender", _sfc_ssrRender], +]); +export { __pageData, index as default }; diff --git a/src/.vitepress/.temp/guides_tutorials_bot.md.js b/src/.vitepress/.temp/guides_tutorials_bot.md.js new file mode 100644 index 00000000..518f2b5a --- /dev/null +++ b/src/.vitepress/.temp/guides_tutorials_bot.md.js @@ -0,0 +1,31 @@ +import { ssrRenderAttrs } from "vue/server-renderer"; +import { useSSRContext } from "vue"; +import { _ as _export_sfc } from "./plugin-vue_export-helper.yVxbj29m.js"; +const __pageData = JSON.parse( + '{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"guides/tutorials/bot.md","filePath":"guides/tutorials/bot.md"}', +); +const _sfc_main = { name: "guides/tutorials/bot.md" }; +function _sfc_ssrRender( + _ctx, + _push, + _parent, + _attrs, + $props, + $setup, + $data, + $options, +) { + _push(`

    Coming Soon!

    `); +} +const _sfc_setup = _sfc_main.setup; +_sfc_main.setup = (props, ctx) => { + const ssrContext = useSSRContext(); + (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add( + "guides/tutorials/bot.md", + ); + return _sfc_setup ? _sfc_setup(props, ctx) : void 0; +}; +const bot = /* @__PURE__ */ _export_sfc(_sfc_main, [ + ["ssrRender", _sfc_ssrRender], +]); +export { __pageData, bot as default }; diff --git a/src/.vitepress/.temp/guides_tutorials_chatroom.md.js b/src/.vitepress/.temp/guides_tutorials_chatroom.md.js new file mode 100644 index 00000000..ab922427 --- /dev/null +++ b/src/.vitepress/.temp/guides_tutorials_chatroom.md.js @@ -0,0 +1,358 @@ +import { ssrRenderAttrs, ssrRenderStyle } from "vue/server-renderer"; +import { useSSRContext } from "vue"; +import { _ as _export_sfc } from "./plugin-vue_export-helper.yVxbj29m.js"; +const __pageData = JSON.parse( + '{"title":"Building a Chatroom in aos","description":"","frontmatter":{},"headers":[],"relativePath":"guides/tutorials/chatroom.md","filePath":"guides/tutorials/chatroom.md"}', +); +const _sfc_main = { name: "guides/tutorials/chatroom.md" }; +function _sfc_ssrRender( + _ctx, + _push, + _parent, + _attrs, + $props, + $setup, + $data, + $options, +) { + _push(`

    Building a Chatroom in aos

    In this tutorial, we'll build a chatroom in aos, leveraging the capabilities of the Lua scripting language. The chatroom will feature three primary functions:

    1. Register: Allows processes to join the chatroom.
    2. Broadcast: Sends messages from one process to all registered participants.

    We will adopt an iterative development approach, utilizing the .load feature of aos for efficient code testing and implementation.

    Setting Up Your Environment

    Step 1: Create Your Lua Script

    • Open your preferred code editor.
    • Create a new file named chatroom.lua.

    Step 2: Initialize Participant List

    • In chatroom.lua, start by initializing a list to track participants, named Weavers:
      lua
      Weavers = Weavers or {}

    Step 3: Load Your Script in aos

    • Save chatroom.lua.
    • In the aos CLI, type .load chatroom.lua to incorporate your script into the aos process.
    • Verify the initialization by typing Weavers in aos. It should return an empty array [].

    Implementing Chatroom Functionalities

    Register Handler

    1. Add Register Handler:

      • Edit chatroom.lua to include a handler for registration:
        lua
        Handlers.add(
        +  "register",
        +  Handlers.utils.hasMatchingTag("Action", "Register"),
        +  function (msg)
        +    table.insert(Weavers, msg.From)
        +    Handlers.utils.reply("registered")(msg)
        +  end
        +)
      • This code registers a process and confirms registration.
    2. Reload and Test:

      • Save and reload the script in aos using .load chatroom.lua.
      • Test registration:
        lua
        Send({ Target = ao.id, Tags = { Action = "Register" }})
    3. Verify Registration:

      • In aos, check Weavers to confirm your process is listed.

    Broadcast Handler

    1. Implementing Broadcast:

      • Add a broadcast function to chatroom.lua:

        lua
        Handlers.add(
        +  "broadcast",
        +  Handlers.utils.hasMatchingTag("Action", "Broadcast"),
        +  function (msg)
        +    for _, recipient in ipairs(Weavers) do
        +      ao.send({Target = recipient, Data = msg.Data})
        +    end
        +    Handlers.utils.reply("Broadcasted.")(msg)
        +  end
        +)
      • This handler distributes a received message to all registered participants.

    2. Reload and Test:

      • Save changes and reload in aos.
      • Test broadcasting:
        lua
        Send({Target = ao.id, Tags = { Action = "Broadcast" }, Data = "Hello World" })
    3. Check Your Inbox:

      • Verify the broadcast by checking your inbox in aos:
        lua
        Inbox[#Inbox].Data
      • You should see the "Hello World" message.

    Engaging Others in the Chatroom

    Onboarding Others

    1. Invite aos Users:

      • Encourage other aos users to join your chatroom. They can register and participate in the broadcast.
    2. Provide Onboarding Instructions:

      • Share a simple script with them for easy onboarding:
        Hey, let's chat on aos! Join my chatroom by sending this command in your aos environment:
        +Send({ Target = [Your Process ID], Tags = { Action = "Register" }})
        +Then, you can broadcast messages using:
        +Send({Target = [Your Process ID], Tags = { Action = "Broadcast" }, Data = "Your Message" })

    Conclusion and Next Steps

    You have successfully set up a basic chatroom in aos, with functionalities for registering, broadcasting messages, and inviting others to join. This example demonstrates the power of Lua scripting in aos for creating interactive, networked applications. Feel free to expand upon this foundation, adding features like private messaging, chatroom moderation, or enhanced user authentication for a more robust chat experience.

    `); +} +const _sfc_setup = _sfc_main.setup; +_sfc_main.setup = (props, ctx) => { + const ssrContext = useSSRContext(); + (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add( + "guides/tutorials/chatroom.md", + ); + return _sfc_setup ? _sfc_setup(props, ctx) : void 0; +}; +const chatroom = /* @__PURE__ */ _export_sfc(_sfc_main, [ + ["ssrRender", _sfc_ssrRender], +]); +export { __pageData, chatroom as default }; diff --git a/src/.vitepress/.temp/guides_tutorials_dao.md.js b/src/.vitepress/.temp/guides_tutorials_dao.md.js new file mode 100644 index 00000000..075c3289 --- /dev/null +++ b/src/.vitepress/.temp/guides_tutorials_dao.md.js @@ -0,0 +1,2111 @@ +import { ssrRenderAttrs, ssrRenderStyle } from "vue/server-renderer"; +import { useSSRContext } from "vue"; +import { _ as _export_sfc } from "./plugin-vue_export-helper.yVxbj29m.js"; +const __pageData = JSON.parse( + '{"title":"DAO Guide","description":"","frontmatter":{},"headers":[],"relativePath":"guides/tutorials/dao.md","filePath":"guides/tutorials/dao.md"}', +); +const _sfc_main = { name: "guides/tutorials/dao.md" }; +function _sfc_ssrRender( + _ctx, + _push, + _parent, + _attrs, + $props, + $setup, + $data, + $options, +) { + _push(`

    DAO Guide

    This guide brings you through the process of building a DAO using aos. If you have not already, you will need to first build a token in aos. We will load the DAO code into aos alongside the token code from the token guide. In the context of ao a DAO may be used to govern MU, CU, and SU nodes.

    In our DAO we will implement a process knwon as "slashing". In the case of ao, if a unit is misbehaving, other units may vote to slash them. Slashing means they will lose their stake, we will get more into stake later.

    Make a new directory called dao and copy in the token.lua created in the token guide.

    mkdir dao
    +cd dao
    +cp ../token/token.lua .

    Now create a new file called dao.lua and open it in your favorite editor.

    Writing the DAO code

    Initializing state

    Open up dao.lua and add the following lines

    lua
    Balances = Balances or {}
    +Stakers = Stakers or {}
    +Unstaking = Unstaking or {}
    +Votes = Votes or {}

    These tables store the state of the DAO, including user Balances, staked tokens, Unstaking requests, and voting records.

    Staking

    Staking is the process of putting your tokens up to give you the ability to vote. If someone wishes to obtain the ability to vote they must possess and stake some of their tokens. Lets add a Handler for staking. A member or node in ao would want to stake if they want to obtain the ability to vote to slash or keep a node, which we will discuss further later.

    lua
    -- Stake Action Handler
    +Handlers.stake = function(msg)
    +    local quantity = tonumber(msg.Tags.Quantity)
    +    local delay = tonumber(msg.Tags.UnstakeDelay)
    +    local height = tonumber(msg['Block-Height'])
    +    assert(Balances[msg.From] and Balances[msg.From] >= quantity, "Insufficient balance to stake")
    +    Balances[msg.From] = Balances[msg.From] - quantity
    +    Stakers[msg.From] = Stakers[msg.From] or {}
    +    Stakers[msg.From].amount = (Stakers[msg.From].amount or 0) + quantity
    +    Stakers[msg.From].unstake_at = height + delay
    +end

    The above takes the quantity and a delay from the incoming message, and if the From has enough balance, puts the stake into the Stakers table. The delay represents a future time when the tokens can be unstaked.

    Unstaking

    Unstaking is the process of withdrawing staked tokens. If someone Unstaked all their tokens they would be giving up the ability to vote. Here we provide a handler for Unstaking.

    lua
    -- Unstake Action Handler
    +Handlers.unstake = function(msg)
    +    local quantity = tonumber(msg.Tags.Quantity)
    +    local stakerInfo = Stakers[msg.From]
    +    assert(stakerInfo and stakerInfo.amount >= quantity, "Insufficient staked amount")
    +    stakerInfo.amount = stakerInfo.amount - quantity
    +    Unstaking[msg.From] = {
    +        amount = quantity,
    +        release_at = stakerInfo.unstake_at
    +    }
    +end

    This pushes into the Unstaking table, an incoming amount from the Message and reduces the amount they have staked stakerInfo.amount = stakerInfo.amount - quantity.

    Voting

    Voting is the process which governs the DAO. When the Vote Message is sent, members receive a Vote proportional to the amount they have staked. The deadline variable represents when the vote will be applied.

    lua
    -- Vote Action Handler
    +Handlers.vote = function(msg)
    +    local quantity = Stakers[msg.From].amount
    +    local target = msg.Tags.Target
    +    local side = msg.Tags.Side
    +    local deadline = tonumber(msg['Block-Height']) + tonumber(msg.Tags.Deadline)
    +    assert(quantity > 0, "No staked tokens to vote")
    +    Votes[target] = Votes[target] or { yay = 0, nay = 0, deadline = deadline }
    +    Votes[target][side] = Votes[target][side] + quantity
    +end

    Here, if the Process or user sending the vote has some tokens they can place an entry in the Votes table. The side yay or nay, is set to the quantity of their stake. In our example a "nay" vote is a vote to slash and a "yay" vote is a vote to keep.

    The msg.Tags.Target sent in would represent something being voted on. In the case of AO this may be the wallet address of a MU, CU, or SU which members are voting to slash.

    Finalization

    There is some logic that we want to run on every Message. We will define this as the finalizationHandler. Getting slashed means you are losing your stake in the DAO.

    lua
    -- Finalization Handler
    +local finalizationHandler = function(msg)
    +  local currentHeight = tonumber(msg['Block-Height'])
    +  -- Process unstaking
    +  for address, unstakeInfo in pairs(Unstaking) do
    +      if currentHeight >= unstakeInfo.release_at then
    +          Balances[address] = (Balances[address] or 0) + unstakeInfo.amount
    +          Unstaking[address] = nil
    +      end
    +  end
    +  -- Process voting
    +  for target, voteInfo in pairs(Votes) do
    +      if currentHeight >= voteInfo.deadline then
    +          if voteInfo.nay > voteInfo.yay then
    +              -- Slash the target's stake
    +              local slashedAmount = Stakers[target] and Stakers[target].amount or 0
    +              Stakers[target].amount = 0
    +          end
    +          -- Clear the vote record after processing
    +          Votes[target] = nil
    +      end
    +  end
    +end

    Attaching the Handlers to incoming Message Tags

    Here we add a helper function called continue which will allow us to execute through to the finalizationHandler on every message.

    lua
    -- wrap function to continue handler flow
    +function continue(fn)
    +    return function (msg)
    +      local result = fn(msg)
    +      if (result) == -1 then
    +        return 1
    +      end
    +      return result
    +    end
    +end

    Finally we will register all the Handlers and wrap them in continue in order to always reach the finalizationHandler for every Stake, Unstake, and Vote Message.

    lua
    -- Registering Handlers
    +Handlers.add("stake",
    +  continue(Handlers.utils.hasMatchingTag("Action", "Stake")), Handlers.stake)
    +Handlers.add("unstake",
    +  continue(Handlers.utils.hasMatchingTag("Action", "Unstake")), Handlers.unstake)
    +Handlers.add("vote",
    +  continue(Handlers.utils.hasMatchingTag("Action", "Vote")), Handlers.vote)
    +-- Finalization handler should be called for every message
    +Handlers.add("finalize", function (msg) return -1 end, finalizationHandler)

    Loading and Testing

    Now that we have dao.lua complete we can load it into aos alongside token.lua from the token guide. Run a new aos Proces called dao while also loading dao.lua and token.lua

    sh
    aos dao --load token.lua --load dao.lua

    From another terminal run another aos Process called voter

    sh
    aos voter

    Now from the dao aos shell send that voter some tokens

    lua
    aos> Send({ Target = ao.id, Tags = { Action = "Transfer", Recipient = 'process id of the voter aos', Quantity = '100000' }})

    From another terminal run another aos Process called cu

    sh
    aos cu

    Now from the dao aos shell send that cu some tokens

    lua
    aos> Send({ Target = ao.id, Tags = { Action = "Transfer", Recipient = 'process id of the cu aos', Quantity = '100000' }})

    Check the Balances from the dao aos shell, we should see a balance for the voter and cu Process. In the below examples bclTw5QOm5soeMXoaBfXLvzjheT1_kwc2vLfDntRE4s is the dao aos, QcGIOXJ1p2SOGzGAccOcV-nSudVRiaPYbU7SjeLx1OE is the voter aos, and X6mkYwt87mIsfsQzDAJr54S0BBxLrDwWMdq7seBcS6s is the cu aos.

    lua
    aos> Balances
    +{
    +  'QcGIOXJ1p2SOGzGAccOcV-nSudVRiaPYbU7SjeLx1OE': 100000,
    +  bclTw5QOm5soeMXoaBfXLvzjheT1_kwc2vLfDntRE4s: 99999999900000,
    +  X6mkYwt87mIsfsQzDAJr54S0BBxLrDwWMdq7seBcS6s: 100000
    +}
    +aos>

    From the voter aos Process, Stake some tokens

    lua
    aos> Send({ Target = "bclTw5QOm5soeMXoaBfXLvzjheT1_kwc2vLfDntRE4s", Tags = { Action = "Stake", Quantity = '1000', UnstakeDelay = "10" }})

    From the cu aos Process, Stake some tokens

    lua
    aos> Send({ Target = "bclTw5QOm5soeMXoaBfXLvzjheT1_kwc2vLfDntRE4s", Tags = { Action = "Stake", Quantity = '1000', UnstakeDelay = "10" }})

    This means we want to Stake 1000 tokens for 10 blocks. So after 10 blocks we have the ability to Unstake.

    Check the value of the Stakers table from the dao aos shell

    lua
    aos> Stakers
    +{
    +  'QcGIOXJ1p2SOGzGAccOcV-nSudVRiaPYbU7SjeLx1OE': { amount: 1000, unstake_at: 1342634 },
    +  X6mkYwt87mIsfsQzDAJr54S0BBxLrDwWMdq7seBcS6s: { amount: 1000, unstake_at: 1342634 }
    +}
    +aos>

    Now lets vote to slash the cu from the voter aos process, our vote takes effect in 1 block

    lua
    aos> Send({ Target = "bclTw5QOm5soeMXoaBfXLvzjheT1_kwc2vLfDntRE4s", Tags = { Action = "Vote", Target = "X6mkYwt87mIsfsQzDAJr54S0BBxLrDwWMdq7seBcS6s(the cu aos)", Side = "nay", Deadline = "1"  }})

    From the dao aos check the Votes

    lua
    aos> Votes
    +{
    +  X6mkYwt87mIsfsQzDAJr54S0BBxLrDwWMdq7seBcS6s: { nay: 1000, yay: 0, deadline: 1342627 }
    +}
    +aos>

    Now wait for Arweave to reach the deadline block height and then send a Stake Message from the dao aos just to trigger the finalizationHandler. You can check the block height at (https://arweave.net/)[https://arweave.net/]

    lua
    Send({ Target = ao.id, Tags = { Action = "Stake", Quantity = '1000', UnstakeDelay = "10" }})

    Now check Votes and Stakers, Votes should be empty and the cu aos Process should have lost their Stake.

    lua
    aos> Votes
    +[]
    +aos> Stakers
    +{
    +  'QcGIOXJ1p2SOGzGAccOcV-nSudVRiaPYbU7SjeLx1OE'(voter aos process): { amount: 1000, unstake_at: 1342647 },
    +  bclTw5QOm5soeMXoaBfXLvzjheT1_kwc2vLfDntRE4s(dao aos process): { amount: 1000, unstake_at: 1342658 },
    +  X6mkYwt87mIsfsQzDAJr54S0BBxLrDwWMdq7seBcS6s(cu aos process): { amount: 0, unstake_at: 1342647 }
    +}
    +aos>

    Finally lets Unstake our tokens from the voter aos process

    lua
    Send({ Target = "bclTw5QOm5soeMXoaBfXLvzjheT1_kwc2vLfDntRE4s", Tags = { Action = "Unstake", Quantity = '1000'}})

    And check the Stakers table from the dao aos

    lua
    aos> Stakers
    +{
    +  'QcGIOXJ1p2SOGzGAccOcV-nSudVRiaPYbU7SjeLx1OE': { amount: 0, unstake_at: 1342647 },
    +  bclTw5QOm5soeMXoaBfXLvzjheT1_kwc2vLfDntRE4s: { amount: 1000, unstake_at: 1342658 },
    +  X6mkYwt87mIsfsQzDAJr54S0BBxLrDwWMdq7seBcS6s: { amount: 0, unstake_at: 1342647 }
    +}
    +aos>

    That concludes the DAO Guide we hope it was helpful!

    `); +} +const _sfc_setup = _sfc_main.setup; +_sfc_main.setup = (props, ctx) => { + const ssrContext = useSSRContext(); + (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add( + "guides/tutorials/dao.md", + ); + return _sfc_setup ? _sfc_setup(props, ctx) : void 0; +}; +const dao = /* @__PURE__ */ _export_sfc(_sfc_main, [ + ["ssrRender", _sfc_ssrRender], +]); +export { __pageData, dao as default }; diff --git a/src/.vitepress/.temp/guides_tutorials_index.md.js b/src/.vitepress/.temp/guides_tutorials_index.md.js new file mode 100644 index 00000000..e7d3478e --- /dev/null +++ b/src/.vitepress/.temp/guides_tutorials_index.md.js @@ -0,0 +1,35 @@ +import { ssrRenderAttrs } from "vue/server-renderer"; +import { useSSRContext } from "vue"; +import { _ as _export_sfc } from "./plugin-vue_export-helper.yVxbj29m.js"; +const __pageData = JSON.parse( + '{"title":"Welcome to aos Tutorials","description":"","frontmatter":{},"headers":[],"relativePath":"guides/tutorials/index.md","filePath":"guides/tutorials/index.md"}', +); +const _sfc_main = { name: "guides/tutorials/index.md" }; +function _sfc_ssrRender( + _ctx, + _push, + _parent, + _attrs, + $props, + $setup, + $data, + $options, +) { + _push( + `

    Welcome to aos Tutorials

    These are short guides or snacks that should help you get comfortable with aos.

    Tutorials

    `, + ); +} +const _sfc_setup = _sfc_main.setup; +_sfc_main.setup = (props, ctx) => { + const ssrContext = useSSRContext(); + (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add( + "guides/tutorials/index.md", + ); + return _sfc_setup ? _sfc_setup(props, ctx) : void 0; +}; +const index = /* @__PURE__ */ _export_sfc(_sfc_main, [ + ["ssrRender", _sfc_ssrRender], +]); +export { __pageData, index as default }; diff --git a/src/.vitepress/.temp/guides_tutorials_lua.md.js b/src/.vitepress/.temp/guides_tutorials_lua.md.js new file mode 100644 index 00000000..59e7c1ce --- /dev/null +++ b/src/.vitepress/.temp/guides_tutorials_lua.md.js @@ -0,0 +1,104 @@ +import { ssrRenderAttrs, ssrRenderStyle } from "vue/server-renderer"; +import { useSSRContext } from "vue"; +import { _ as _export_sfc } from "./plugin-vue_export-helper.yVxbj29m.js"; +const __pageData = JSON.parse( + '{"title":"Meet Lua Expressions on AOS","description":"","frontmatter":{},"headers":[],"relativePath":"guides/tutorials/lua.md","filePath":"guides/tutorials/lua.md"}', +); +const _sfc_main = { name: "guides/tutorials/lua.md" }; +function _sfc_ssrRender( + _ctx, + _push, + _parent, + _attrs, + $props, + $setup, + $data, + $options, +) { + _push(`

    Meet Lua Expressions on AOS

    Step 1: Open the AOS Command-Line Interface

    • After installing AOS, open your command-line interface (CLI).
    • Type aos and press Enter. This will start the AOS CLI.

    Step 2: Familiarize with Basic Lua Expressions

    • Print a String: Type "Hello, aos!" and press Enter. This should display "Hello, aos!" in the console.
    • Basic Arithmetic: Try some basic arithmetic, like 5 + 3. You should see the result 8.

    Step 3: Learn About Variables

    • Setting a Variable: Type a = 10 and press Enter. This sets the variable a to 10.
    • Using the Variable: Now type a * 2. You should get 20, which is the result of multiplying a by 2.

    Step 4: Experiment with Conditional Statements

    • Basic If-Else: Enter the following Lua code:

      In aos, type .editor and press Enter. This will open an in-line text editor within your command-line interface.

      lua
      b = 15
      +if b > 10 then
      +    return "b is greater than 10"
      +else
      +    return "b is not greater than 10"
      +end

      Then, type .done and press Enter. This will complete the edit mode and submit the expression to your Process for evaluation.

      As a result, you should get "b is greater than 10".

    Step 5: Explore Functions

    • Creating a Function: Define a simple function:

      In aos, type .editor and press Enter. This will open an in-line text editor within your command-line interface.

      lua
      function greet(name)
      +    return "Hello, " .. name
      +end

      Then, type .done and press Enter. This will complete the edit mode and submit the expression to your Process for evaluation.

    • Using the Function: Call the function with greet("aos User"). It should return "Hello, aos User".

    Step 6: Try Table Operations

    • Creating a Table: Type myTable = {1, 2, 3} to create a simple table.
    • Accessing Table Elements: Access an element with myTable[2]. It should return 2.

    Conclusion

    This tutorial provided you with basic steps to get started with Lua expressions in AOS. As you become more comfortable, you can delve into more complex topics and explore the full potential of Lua in the AOS environment. Happy coding!

    `); +} +const _sfc_setup = _sfc_main.setup; +_sfc_main.setup = (props, ctx) => { + const ssrContext = useSSRContext(); + (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add( + "guides/tutorials/lua.md", + ); + return _sfc_setup ? _sfc_setup(props, ctx) : void 0; +}; +const lua = /* @__PURE__ */ _export_sfc(_sfc_main, [ + ["ssrRender", _sfc_ssrRender], +]); +export { __pageData, lua as default }; diff --git a/src/.vitepress/.temp/guides_tutorials_messaging.md.js b/src/.vitepress/.temp/guides_tutorials_messaging.md.js new file mode 100644 index 00000000..d8fb5983 --- /dev/null +++ b/src/.vitepress/.temp/guides_tutorials_messaging.md.js @@ -0,0 +1,125 @@ +import { ssrRenderAttrs, ssrRenderStyle } from "vue/server-renderer"; +import { useSSRContext } from "vue"; +import { _ as _export_sfc } from "./plugin-vue_export-helper.yVxbj29m.js"; +const __pageData = JSON.parse( + '{"title":"Sending Messages in aos","description":"","frontmatter":{},"headers":[],"relativePath":"guides/tutorials/messaging.md","filePath":"guides/tutorials/messaging.md"}', +); +const _sfc_main = { name: "guides/tutorials/messaging.md" }; +function _sfc_ssrRender( + _ctx, + _push, + _parent, + _attrs, + $props, + $setup, + $data, + $options, +) { + _push(`

    Sending Messages in aos

    This tutorial will guide you through the process of sending messages between processes in aos. Messages are a crucial part of the aos environment, allowing processes to communicate and interact with each other.

    Step 1: Understand the Message Structure

    • Message Basics: A message in aos is typically a Lua table containing various fields. The most important field is Data, which holds the content of your message.
    • Example: { Data = "Hello from Process A!" } is a simple message.

    Step 2: Open the aos CLI

    • Launch the aos command-line interface (CLI) by typing aos in your terminal and pressing Enter.

    Step 3: Use the Send Function

    • Accessing Send: The Send function is globally available in the aos interactive environment.
    • Sending a Message: To send a message, use the Send function with a message as its argument. For example:
      lua
      Send({ Target = "process12345", Data = "Hello from Process A!" })
    • This command sends a message with the content "Hello from Process A!".

    Step 4: Specify the Target Process

    • Targeting: To send a message to a specific process, include a Target field in your message.
    • Example: If you want to send a message to a process with the ID 12345, your message would look like:
      lua
      Send({ Target = "process12345", Data = "Hello, Process 12345!" })
    • This sends the message directly to the process with the specified ID.

    Step 5: Using Tags on Messages

    Understanding Tags in aos Messages

    • Purpose of Tags: Tags in aos messages are used to categorize, route, and process messages efficiently. They play a crucial role in message handling, especially when dealing with multiple processes or complex workflows.

    How to Use Tags in Messages

    1. Adding Tags to a Message:
      • When constructing a message, you can include a Tags field, which is key with string value assigned.
      • Example:
        lua
        Send({
        +  Data = "Hello, Process 12345!",
        +  Tags = {
        +   Action = "Greeting"
        + }
        +})
      • This message is tagged with an "Action" of "Greeting" , indicating its purpose and intended recipient.

    Tips for Using Tags

    • Consistent Tagging: Develop a consistent tagging system for your application to make message handling more predictable.
    • Tag Naming:

    Choose clear and descriptive names for your tags. This makes it easier to understand the purpose and context of messages at a glance.

    • Tag Limitations: Be mindful of the number of tags you use. While tags are powerful for categorization, overuse or overly complex tagging systems can lead to confusion and inefficiency in message handling.

    • Security with Tags: Remember that tags are not encrypted or hidden, so avoid using sensitive information as tags.

    Advanced Usage of Tags

    • Workflow Management: Tags can be instrumental in managing workflows, especially in systems where messages pass through multiple stages or processes.

    Additional Tips:

    • Message Structure: Explore other fields like Epoch, From, and Nonce for more complex messaging needs.
    • Debugging: Use the Dump function to print messages for debugging.
    • **

    Security Considerations**: Be cautious with the content and handling of messages, especially when dealing with sensitive data.

    Conclusion

    Sending messages in aos is a fundamental skill that enables inter-process communication, a cornerstone of distributed computing on the aos platform. By following these steps, you can send, receive, and handle messages effectively, allowing you to build more complex and interactive applications in aos. Remember to experiment and explore the full potential of messaging in this versatile environment.

    `); +} +const _sfc_setup = _sfc_main.setup; +_sfc_main.setup = (props, ctx) => { + const ssrContext = useSSRContext(); + (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add( + "guides/tutorials/messaging.md", + ); + return _sfc_setup ? _sfc_setup(props, ctx) : void 0; +}; +const messaging = /* @__PURE__ */ _export_sfc(_sfc_main, [ + ["ssrRender", _sfc_ssrRender], +]); +export { __pageData, messaging as default }; diff --git a/src/.vitepress/.temp/guides_tutorials_pingpong.md.js b/src/.vitepress/.temp/guides_tutorials_pingpong.md.js new file mode 100644 index 00000000..692b72c4 --- /dev/null +++ b/src/.vitepress/.temp/guides_tutorials_pingpong.md.js @@ -0,0 +1,133 @@ +import { ssrRenderAttrs, ssrRenderStyle } from "vue/server-renderer"; +import { useSSRContext } from "vue"; +import { _ as _export_sfc } from "./plugin-vue_export-helper.yVxbj29m.js"; +const __pageData = JSON.parse( + '{"title":"Creating a Pingpong Process in aos","description":"","frontmatter":{},"headers":[],"relativePath":"guides/tutorials/pingpong.md","filePath":"guides/tutorials/pingpong.md"}', +); +const _sfc_main = { name: "guides/tutorials/pingpong.md" }; +function _sfc_ssrRender( + _ctx, + _push, + _parent, + _attrs, + $props, + $setup, + $data, + $options, +) { + _push(`

    Creating a Pingpong Process in aos

    This tutorial will guide you through creating a simple "ping-pong" process in aos. In this process, whenever it receives a message with the data "ping", it will automatically reply with "pong". This is a basic example of message handling and interaction between processes in aos.

    Step 1: Open the aos CLI

    • Start by opening your command-line interface and typing aos to enter the aos environment.

    Step 2: Access the Editor

    • Type .editor in the aos CLI to open the inline text editor. This is where you'll write your ping-pong handler code.

    Step 3: Write the Pingpong Handler

    • In the editor, enter the following Lua code to add a handler for the pingpong pattern:
      lua
      Handlers.add(
      +  "pingpong",
      +  Handlers.utils.hasMatchingData("ping"),
      +  Handlers.utils.reply("pong")
      +)
    • This line of code does three things:
      1. It adds a new handler named "pingpong".
      2. It uses Handlers.utils.hasMatchingData("ping") to check if incoming messages contain the data "ping".
      3. If the message contains "ping", Handlers.utils.reply("pong") automatically sends back a message with the data "pong".

    Step 4: Exit the Editor

    • After writing your code, type .done and press Enter to exit the editor and run the script.

    Step 5: Test the Pingpong Process

    • To test the process, send a message with the data "ping" to the process. You can do this by typing the following command in the aos CLI:
      lua
      Send({ Target = ao.id, Data = "ping" })
    • The process should respond with a message containing "pong" in the Inbox.

    Step 6: Monitor the Inbox

    • Check your Inbox to see the "ping" message and your Outbox to confirm the "pong" reply.
    lua
    Inbox[#Inbox].Data

    Step 7: Experiment and Observe

    • Experiment by sending different messages and observe how only the "ping" messages trigger the "pong" response.

    Step 8: Save Your Process (Optional)

    • If you want to use this process in the future, save the handler code in a Lua file for easy loading

    into aos sessions.

    Additional Tips:

    • Debugging: Use the Dump function to print the contents of your Inbox and Outbox for debugging purposes.
    • Handler Efficiency: The simplicity of the handler function is key. Ensure that it's efficient and only triggers under the correct conditions.

    Conclusion

    Congratulations! You have now created a basic ping-pong process in aos. This tutorial provides a foundation for understanding message handling and process interaction within the aos environment. As you become more comfortable with these concepts, you can expand to more complex processes and interactions, exploring the full potential of aos.

    `); +} +const _sfc_setup = _sfc_main.setup; +_sfc_main.setup = (props, ctx) => { + const ssrContext = useSSRContext(); + (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add( + "guides/tutorials/pingpong.md", + ); + return _sfc_setup ? _sfc_setup(props, ctx) : void 0; +}; +const pingpong = /* @__PURE__ */ _export_sfc(_sfc_main, [ + ["ssrRender", _sfc_ssrRender], +]); +export { __pageData, pingpong as default }; diff --git a/src/.vitepress/.temp/guides_tutorials_prompt.md.js b/src/.vitepress/.temp/guides_tutorials_prompt.md.js new file mode 100644 index 00000000..1bceb758 --- /dev/null +++ b/src/.vitepress/.temp/guides_tutorials_prompt.md.js @@ -0,0 +1,60 @@ +import { ssrRenderAttrs, ssrRenderStyle } from "vue/server-renderer"; +import { useSSRContext } from "vue"; +import { _ as _export_sfc } from "./plugin-vue_export-helper.yVxbj29m.js"; +const __pageData = JSON.parse( + '{"title":"Customizing the Prompt in aos","description":"","frontmatter":{},"headers":[],"relativePath":"guides/tutorials/prompt.md","filePath":"guides/tutorials/prompt.md"}', +); +const _sfc_main = { name: "guides/tutorials/prompt.md" }; +function _sfc_ssrRender( + _ctx, + _push, + _parent, + _attrs, + $props, + $setup, + $data, + $options, +) { + _push(`

    Customizing the Prompt in aos

    Step 1: Open aos and Start the Editor

    • Launch the aos command-line interface.
    • Enter .editor to open the inline text editor.

    Step 2: Write the Custom Prompt Function

    • In the editor, define your custom prompt function. For example:
      lua
      function customPrompt()
      +    return "YourName@aos> "
      +end
      Customize "YourName@aos> " to your preferred prompt text.

    Step 3: Overwrite the Default Prompt

    • Next, overwrite the existing Prompt function with your new function:
      lua
      Prompt = customPrompt

    Step 4: Exit and Run Your Code

    • To exit the editor and execute your code, type .done and then press Enter.
    • Your aos prompt should now display the new custom format.

    Step 5: Save for Future Use (Optional)

    • If you wish to use this prompt in future aos sessions, save your script in a Lua file.
    • In subsequent sessions, load this script to apply your custom prompt.

    Additional Guidance:

    • Creativity in Prompt Design: You're encouraged to incorporate various elements into your prompt, including dynamic data, special symbols, or colors.
    • Syntax Accuracy: Ensure correct Lua syntax to avoid any errors in your prompt.
    • Reverting Back: To return to the original prompt, restart aos or reset Prompt to its default function.

    Conclusion

    This tutorial guides you through customizing your aos prompt, enhancing your command-line interface experience. Experiment with different styles and functionalities to create a prompt that best fits your needs in the aos environment.

    `); +} +const _sfc_setup = _sfc_main.setup; +_sfc_main.setup = (props, ctx) => { + const ssrContext = useSSRContext(); + (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add( + "guides/tutorials/prompt.md", + ); + return _sfc_setup ? _sfc_setup(props, ctx) : void 0; +}; +const prompt = /* @__PURE__ */ _export_sfc(_sfc_main, [ + ["ssrRender", _sfc_ssrRender], +]); +export { __pageData, prompt as default }; diff --git a/src/.vitepress/.temp/guides_tutorials_token.md.js b/src/.vitepress/.temp/guides_tutorials_token.md.js new file mode 100644 index 00000000..724d04c7 --- /dev/null +++ b/src/.vitepress/.temp/guides_tutorials_token.md.js @@ -0,0 +1,2049 @@ +import { ssrRenderAttrs, ssrRenderStyle } from "vue/server-renderer"; +import { useSSRContext } from "vue"; +import { _ as _export_sfc } from "./plugin-vue_export-helper.yVxbj29m.js"; +const __pageData = JSON.parse( + '{"title":"Token Guide","description":"","frontmatter":{},"headers":[],"relativePath":"guides/tutorials/token.md","filePath":"guides/tutorials/token.md"}', +); +const _sfc_main = { name: "guides/tutorials/token.md" }; +function _sfc_ssrRender( + _ctx, + _push, + _parent, + _attrs, + $props, + $setup, + $data, + $options, +) { + _push(`

    Token Guide

    This guide brings you through the process of building a token using aos. It is based on the ao standard token spec.

    To begin you will need to have aos installed. Now you are ready to build.

    Setting up the development environment

    This guide will load code from the local file system into aos. So you will want to create a directory to edit the .lua files and run aos.

    sh
    mkdir token
    +cd token

    Now create a file from your favorite editor inside the token directory called token.lua, now we are ready to run aos. From within the token directory run.

    sh
    aos mytoken

    The second part of this command (mytoken) creates a named aos on your local machine which will tie a process id to that name. This feature of naming in aos allows us to run multiple aos processes on one machine. You are now in the aos shell.

    Writing the Token code

    Lets write the Lua code that will be the token. This code will run in aos so we have access to the aos libraries and globals, see intro for an outline of these.

    Initializing the Token state

    Open up token.lua in your editor and add the following code.

    lua
    local json = require('json')
    +
    +if not Balances then Balances = { [ao.id] = 100000000000000 } end
    +
    +if Name ~= 'My Coin' then Name = 'My Coin' end
    +
    +if Ticker ~= 'COIN' then Ticker = 'COIN' end
    +
    +if Denomination ~= 10 then Denomination = 10 end
    +
    +if not Logo then Logo = 'optional arweave TXID of logo image' end

    The first line of this code imports a module for later use. The second line if not Balances then Balances = { [ao.id] = 100000000000000 } end is initializing a Balances table which is the way the Process tracks who posses the token. We initialize our token process ao.id to start with all the balance.

    The next 4 lines define the initialization parameters of the token including an optional arweave tx containing an image for the token. The Denomination variable is not optional while Name, Ticker, and Logo are. The code if Denomination ~= 10 then Denomination = 10 end tells us the number of the token that should be treated as a single unit.

    Info and Balances Handlers

    Now lets add our first Handler to handle incoming Messages.

    lua
    Handlers.add('info', Handlers.utils.hasMatchingTag('Action', 'Info'), function(msg)
    +  ao.send(
    +      { Target = msg.From, Tags = { Name = Name, Ticker = Ticker, Logo = Logo, Denomination = tostring(Denomination) } })
    +end)

    This code means that if someone Sends a message with the Tag, Action = "info", our token will Send back a message with all of the information defined above. Note the Target = msg.From, this tells ao we are replying to the process that sent us this message.

    Now we can add 2 Handlers which provide information about token Balances.

    lua
    Handlers.add('balance', Handlers.utils.hasMatchingTag('Action', 'Balance'), function(msg)
    +  local bal = '0'
    +
    +  -- If not Target is provided, then return the Senders balance
    +  if (msg.Tags.Target and Balances[msg.Tags.Target]) then
    +    bal = tostring(Balances[msg.Tags.Target])
    +  elseif Balances[msg.From] then
    +    bal = tostring(Balances[msg.From])
    +  end
    +
    +  ao.send({
    +    Target = msg.From,
    +    Tags = { Target = msg.From, Balance = bal, Ticker = Ticker, Data = json.encode(tonumber(bal)) }
    +  })
    +end)
    +
    +Handlers.add('balances', Handlers.utils.hasMatchingTag('Action', 'Balances'),
    +             function(msg) ao.send({ Target = msg.From, Data = json.encode(Balances) }) end)

    The first Handler above Handlers.add('balance' handles a process or person requesting their own balance or the balance of a Target. Then replies with a message containing the info. The second Handler Handlers.add('balances' just replies with the entire Balances table.

    Handling Token Transfers

    Before we begin testing we will add 2 more Handlers one which allows for the transfer of tokens between processes or users.

    lua
    Handlers.add('transfer', Handlers.utils.hasMatchingTag('Action', 'Transfer'), function(msg)
    +  assert(type(msg.Tags.Recipient) == 'string', 'Recipient is required!')
    +  assert(type(msg.Tags.Quantity) == 'string', 'Quantity is required!')
    +
    +  if not Balances[msg.From] then Balances[msg.From] = 0 end
    +
    +  if not Balances[msg.Tags.Recipient] then Balances[msg.Tags.Recipient] = 0 end
    +
    +  local qty = tonumber(msg.Tags.Quantity)
    +  assert(type(qty) == 'number', 'qty must be number')
    +
    +  if Balances[msg.From] >= qty then
    +    Balances[msg.From] = Balances[msg.From] - qty
    +    Balances[msg.Tags.Recipient] = Balances[msg.Tags.Recipient] + qty
    +
    +    --[[
    +      Only Send the notifications to the Sender and Recipient
    +      if the Cast tag is not set on the Transfer message
    +    ]] --
    +    if not msg.Tags.Cast then
    +      -- Send Debit-Notice to the Sender
    +      ao.send({
    +        Target = msg.From,
    +        Tags = { Action = 'Debit-Notice', Recipient = msg.Tags.Recipient, Quantity = tostring(qty) }
    +      })
    +      -- Send Credit-Notice to the Recipient
    +      ao.send({
    +        Target = msg.Tags.Recipient,
    +        Tags = { Action = 'Credit-Notice', Sender = msg.From, Quantity = tostring(qty) }
    +      })
    +    end
    +  else
    +    ao.send({
    +      Target = msg.Tags.From,
    +      Tags = { Action = 'Transfer-Error', ['Message-Id'] = msg.Id, Error = 'Insufficient Balance!' }
    +    })
    +  end
    +end)

    In summary, this code checks to make sure the Recipient and Quantity Tags have been provided, initializes the balances of the person sending the message and the Recipient if they dont exist and then attempts to transfer the specified quantity to the Recipient in the Balances table

    lua
    Balances[msg.From] = Balances[msg.From] - qty
    +Balances[msg.Tags.Recipient] = Balances[msg.Tags.Recipient] + qty

    If the transfer was successful a Debit-Notice is sent to the sender of the original message and a Credit-Notice is sent to the Recipient.

    lua
    -- Send Debit-Notice to the Sender
    +ao.send({
    +    Target = msg.From,
    +    Tags = { Action = 'Debit-Notice', Recipient = msg.Tags.Recipient, Quantity = tostring(qty) }
    +})
    +-- Send Credit-Notice to the Recipient
    +ao.send({
    +    Target = msg.Tags.Recipient,
    +    Tags = { Action = 'Credit-Notice', Sender = msg.From, Quantity = tostring(qty) }
    +})

    If there was insufficient balance for the transfer it sends back a failure message

    lua
    ao.send({
    +    Target = msg.Tags.From,
    +    Tags = { Action = 'Transfer-Error', ['Message-Id'] = msg.Id, Error = 'Insufficient Balance!' }
    +})

    The line if not msg.Tags.Cast then Means were not producing any messages to crank if the Cast tag was set. This is part of the ao protocol.

    Minting

    We will add 1 final Handler that allows the creator of this token to mint more of the token.

    lua
    Handlers.add('mint', Handlers.utils.hasMatchingTag('Action', 'Mint'), function(msg, env)
    +  assert(type(msg.Tags.Quantity) == 'string', 'Quantity is required!')
    +
    +  if msg.From == env.Process.Id then
    +    -- Add tokens to the token pool, according to Quantity
    +    local qty = tonumber(msg.Tags.Quantity)
    +    Balances[env.Process.Id] = Balances[env.Process.Id] + qty
    +  else
    +    ao.send({
    +      Target = msg.Tags.From,
    +      Tags = {
    +        Action = 'Mint-Error',
    +        ['Message-Id'] = msg.Id,
    +        Error = 'Only the Process Owner can mint new ' .. Ticker .. ' tokens!'
    +      }
    +    })
    +  end
    +end)

    Loading and Testing

    Ok now we are ready to load this file into aos and test. From the aos prompt load in the file.

    sh
    aos> .load token.lua

    Now we can send Messages to our aos process id, from the same aos prompt to see if is working. If we use ao.id as the Target we are sending a message to ourselves.

    sh
    aos> Send({ Target = ao.id, Tags = { Action = "Info" }})

    Check the latest inbox message, if its not there yet wait a few seconds and check again.

    sh
    aos> Inbox[#Inbox].Data

    This should print the Info defined in the contract.

    Now try a transfer

    sh
    aos> Send({ Target = ao.id, Tags = { Action = "Transfer", Recipient = 'another wallet or processid', Quantity = '10000' }})

    And check the balances

    sh
    aos> Send({ Target = ao.id, Tags = { Action = "Balances" }})
    +aos> Inbox[#Inbox].Data

    You should see a balance for the Recipient you sent to.

    Finally, attempt to mint some tokens

    sh
    Send({ Target = ao.id, Tags = { Action = "Mint", Quantity = '1000' }})

    And check the balances

    sh
    aos> Send({ Target = ao.id, Tags = { Action = "Balances" }})
    +aos> Inbox[#Inbox].Data

    That concludes the token example we hope it was helpful!

    `); +} +const _sfc_setup = _sfc_main.setup; +_sfc_main.setup = (props, ctx) => { + const ssrContext = useSSRContext(); + (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add( + "guides/tutorials/token.md", + ); + return _sfc_setup ? _sfc_setup(props, ctx) : void 0; +}; +const token = /* @__PURE__ */ _export_sfc(_sfc_main, [ + ["ssrRender", _sfc_ssrRender], +]); +export { __pageData, token as default }; diff --git a/src/.vitepress/.temp/guides_tutorials_tour.md.js b/src/.vitepress/.temp/guides_tutorials_tour.md.js new file mode 100644 index 00000000..5b0470e7 --- /dev/null +++ b/src/.vitepress/.temp/guides_tutorials_tour.md.js @@ -0,0 +1,35 @@ +import { ssrRenderAttrs } from "vue/server-renderer"; +import { useSSRContext } from "vue"; +import { _ as _export_sfc } from "./plugin-vue_export-helper.yVxbj29m.js"; +const __pageData = JSON.parse( + '{"title":"aos Brief Tour","description":"","frontmatter":{},"headers":[],"relativePath":"guides/tutorials/tour.md","filePath":"guides/tutorials/tour.md"}', +); +const _sfc_main = { name: "guides/tutorials/tour.md" }; +function _sfc_ssrRender( + _ctx, + _push, + _parent, + _attrs, + $props, + $setup, + $data, + $options, +) { + _push( + `

    aos Brief Tour

    Welcome to a quick tour of aos! This tutorial will walk you through the key global functions and variables available in the aos environment, giving you a foundational understanding of how to interact with and utilize aos effectively.

    1. Introduction to Inbox

    • What It Is: Inbox is a Lua table that stores all messages received by your process but not yet handled.
    • How to Use: Check Inbox to see incoming messages. Iterate through Inbox[x] to process these messages.

    2. Sending Messages with Send(Message)

    • Functionality: Send(Message) is a global function to send messages to other processes.
    • Usage Example: Send({Target = "...", Data = "Hello, Process!"}) sends a message with the data "Hello, Process!" to a specified process.

    3. Creating Processes with Spawn(Module, Message)

    • Purpose: Use Spawn(Module, Message) to create new processes.
    • Example: Spawn("MyModule", {Data = "Start"}) starts a new process using "MyModule" with the provided message.

    4. Understanding Name and Owner

    • Name: A string set during initialization, representing the process's name.
    • Owner: Indicates the owner of the process. Changing this might restrict your ability to interact with your process.
    • Important Note: Treat these as read-only to avoid issues.

    5. Utilizing Handlers

    • What They Are: Handlers is a table of helper functions for creating message handlers.
    • Usage: Define handlers in Handlers to specify actions for different incoming messages based on pattern matching.

    6. Data Representation with Dump

    • Function: Dump converts any Lua table into a print-friendly format.
    • How to Use: Useful for debugging or viewing complex table structures. Example: Dump(Inbox) prints the contents of Inbox.

    7. Leveraging Utils Module

    • Contents: \`Utils

    contains a collection of functional utilities likemap, reduce, and filter\`.

    • Usage: Great for data manipulation and functional programming patterns in Lua. For example, Utils.map(myTable, function(x) return x * 2 end) to double the values in a table.

    8. Exploring the ao Core Library

    • Description: ao is a core module that includes key functions for message handling and process management.
    • Key Features: Includes functions for sending messages (send) and spawning processes (spawn), along with environment variables.

    Conclusion

    This brief tour introduces you to the primary globals and functionalities within the aos environment. With these tools at your disposal, you can create and manage processes, handle messages, and utilize Lua's capabilities to build efficient and responsive applications on the aos platform. Experiment with these features to get a deeper understanding and to see how they can be integrated into your specific use cases. Happy coding in aos!

    `, + ); +} +const _sfc_setup = _sfc_main.setup; +_sfc_main.setup = (props, ctx) => { + const ssrContext = useSSRContext(); + (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add( + "guides/tutorials/tour.md", + ); + return _sfc_setup ? _sfc_setup(props, ctx) : void 0; +}; +const tour = /* @__PURE__ */ _export_sfc(_sfc_main, [ + ["ssrRender", _sfc_ssrRender], +]); +export { __pageData, tour as default }; diff --git a/src/.vitepress/.temp/index.md.js b/src/.vitepress/.temp/index.md.js new file mode 100644 index 00000000..a30a2774 --- /dev/null +++ b/src/.vitepress/.temp/index.md.js @@ -0,0 +1,31 @@ +import { ssrRenderAttrs } from "vue/server-renderer"; +import { useSSRContext } from "vue"; +import { _ as _export_sfc } from "./plugin-vue_export-helper.yVxbj29m.js"; +const __pageData = JSON.parse( + '{"title":"","description":"","frontmatter":{"layout":"home","hero":{"name":"ao","text":"The decentralized computer with infinite threads","tagline":"A messaging based approach to interoperability","actions":[{"theme":"brand","text":"Docs","link":"/getting-started/index"}]},"features":[{"title":"Get Started","details":"Dive into building with ao","link":"/getting-started/index"},{"title":"Concepts","details":"Learn about how ao network works","link":"/concepts/index"},{"title":"Guides","details":"Follow Step-by-step guides to start shipping on the ao network","link":"/guides/index"},{"title":"References","details":"Learn the ao terminology","link":"/references/index"}]},"headers":[],"relativePath":"index.md","filePath":"index.md"}', +); +const _sfc_main = { name: "index.md" }; +function _sfc_ssrRender( + _ctx, + _push, + _parent, + _attrs, + $props, + $setup, + $data, + $options, +) { + _push(``); +} +const _sfc_setup = _sfc_main.setup; +_sfc_main.setup = (props, ctx) => { + const ssrContext = useSSRContext(); + (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add( + "index.md", + ); + return _sfc_setup ? _sfc_setup(props, ctx) : void 0; +}; +const index = /* @__PURE__ */ _export_sfc(_sfc_main, [ + ["ssrRender", _sfc_ssrRender], +]); +export { __pageData, index as default }; diff --git a/src/.vitepress/.temp/package.json b/src/.vitepress/.temp/package.json new file mode 100644 index 00000000..e986b24b --- /dev/null +++ b/src/.vitepress/.temp/package.json @@ -0,0 +1,4 @@ +{ + "private": true, + "type": "module" +} diff --git a/src/.vitepress/.temp/plugin-vue_export-helper.yVxbj29m.js b/src/.vitepress/.temp/plugin-vue_export-helper.yVxbj29m.js new file mode 100644 index 00000000..5d9e6d83 --- /dev/null +++ b/src/.vitepress/.temp/plugin-vue_export-helper.yVxbj29m.js @@ -0,0 +1,8 @@ +const _export_sfc = (sfc, props) => { + const target = sfc.__vccOpts || sfc; + for (const [key, val] of props) { + target[key] = val; + } + return target; +}; +export { _export_sfc as _ }; diff --git a/src/.vitepress/.temp/references_ao.md.js b/src/.vitepress/.temp/references_ao.md.js new file mode 100644 index 00000000..9bf9a51a --- /dev/null +++ b/src/.vitepress/.temp/references_ao.md.js @@ -0,0 +1,934 @@ +import { ssrRenderAttrs, ssrRenderStyle } from "vue/server-renderer"; +import { useSSRContext } from "vue"; +import { _ as _export_sfc } from "./plugin-vue_export-helper.yVxbj29m.js"; +const __pageData = JSON.parse( + '{"title":"ao Module","description":"","frontmatter":{},"headers":[],"relativePath":"references/ao.md","filePath":"references/ao.md"}', +); +const _sfc_main = { name: "references/ao.md" }; +function _sfc_ssrRender( + _ctx, + _push, + _parent, + _attrs, + $props, + $setup, + $data, + $options, +) { + _push(`

    ao Module

    version: 0.0.3

    ao process communication is handled by messages, each process receives messages in the form of ANS-104 DataItems, and needs to be able to do the following common operations.

    • isTrusted(msg) - check to see if this message trusted?
    • send(msg) - send message to another process
    • spawn(module, msg) - spawn a process

    The goal of this library is to provide this core functionality in the box of the ao developer toolkit. As a developer you have the option to leverage this library or not, but it integrated by default.

    Properties

    NameDescriptionType
    idProcess Identifier (TXID)string
    _moduleModule Identifier (TXID)string
    authoritiesSet of Trusted TXsstring
    _versionThe version of the librarystring
    envEvaluation Environmentstring
    outboxHolds Messages and Spawns for responseobject

    Methods

    send(msg: Message<table>) : Message<table>

    The send function takes a Message object or partial message object, it adds additional ao specific tags to the object and returns a full Message object, as well as insert into the ao.outbox.Messages table.

    parameters

    • msg

    Schema

    json
    {
    +    "type": "object",
    +    "properties": {
    +        "Target": {
    +            "type": "string",
    +            "description": "Process/Wallet to send message to"
    +        },
    +        "Data": {
    +            "type": "any",
    +            "description": "data to send in message DataItem"
    +        },
    +        "Tags": {
    +            "type": "object or array<name,value>"
    +            "description": "This property can be an array of name,value objects or an object"
    +        }
    +    }
    +}

    Example 1

    lua
    local message = ao.send({
    +    Target = msg.From,
    +    Data = "ping",
    +    Tags = {
    +        {
    +            name = "Content-Type",
    +            value = "text/plain"
    +        }
    +    }
    +})

    Example 2

    lua
    local message = ao.send({
    +    Target = msg.From,
    +    Data = "ping",
    +    Tags = {
    +        "Content-Type" = "text/plain"
    +    }
    +})

    returns

    Schema

    json
    {
    +    "type": "object",
    +    "properties": {
    +        "Target": {
    +            "type": "string"
    +        },
    +        "Data": {
    +            "type": "any"
    +        },
    +        "Tags": {
    +            "type": "array"
    +            "description": "name/value array",
    +            "items": {
    +                "type": "object",
    +                "properties": {
    +                    "name": {"type": "string"},
    +                    "value":{"type":"string"}
    +                }
    +            }
    +        }
    +    }
    +}

    spawn(module : string, spawn : Spawn<table>) : Spawn<table>

    The spawn function takes a module TXID as the first argument and a full or parital Spawn table. The result will return a full Spawn table. The spawn function will also generate a Ref_ tag with a unique reference identifier.

    parameters

    NameDescriptionType
    moduleThe TXID that identifies the module binary to use to instaniate the process withstring
    spawnThe spawn full or parital table object that contains the Data and Tags propertiestable

    Schema

    module

    json
    {
    +  "type": "string"
    +}

    spawn

    json
    {
    +  "type": "object",
    +  "properties": {
    +    "Data": { "type": "any" },
    +    "Tags": {
    +      "type": "object or array",
    +      "description": "can be either <name,value> array, or object"
    +    }
    +  }
    +}

    returns

    Schema

    json
    {
    +  "type": "object",
    +  "properties": {
    +    "Data": { "type": "any" },
    +    "Tags": {
    +      "type": "array",
    +      "items": {
    +        "type": "object",
    +        "properties": {
    +          "name": { "type": "string" },
    +          "value": { "type": "string" }
    +        }
    +      }
    +    }
    +  }
    +}

    isTrusted(msg : Message<table>) : boolean

    When spawning a process, 0 or more Authority Tags can be supplied, the ao library adds each of these values to a table array on the ao properties called authorities. This set provides the Proof of Authority feature for ao.TN.1. When a message arrives in the handle function, the developer can call ao.isTrusted to verify if the message is from a trusted source.

    parameters

    NameDescriptionType
    msgMessage to check if trusted by this processtable

    Schema

    json
    {
    +    "type": "object",
    +    "properties": {
    +        "Target": {
    +            "type": "string"
    +        },
    +        "Data": {
    +            "type": "any"
    +        },
    +        "Tags": {
    +            "type": "array"
    +            "description": "name/value array",
    +            "items": {
    +                "type": "object",
    +                "properties": {
    +                    "name": {"type": "string"},
    +                    "value":{"type":"string"}
    +                }
    +            }
    +        }
    +    }
    +}
    `); +} +const _sfc_setup = _sfc_main.setup; +_sfc_main.setup = (props, ctx) => { + const ssrContext = useSSRContext(); + (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add( + "references/ao.md", + ); + return _sfc_setup ? _sfc_setup(props, ctx) : void 0; +}; +const ao = /* @__PURE__ */ _export_sfc(_sfc_main, [ + ["ssrRender", _sfc_ssrRender], +]); +export { __pageData, ao as default }; diff --git a/src/.vitepress/.temp/references_handlers.md.js b/src/.vitepress/.temp/references_handlers.md.js new file mode 100644 index 00000000..b87a3aef --- /dev/null +++ b/src/.vitepress/.temp/references_handlers.md.js @@ -0,0 +1,291 @@ +import { ssrRenderAttrs, ssrRenderStyle } from "vue/server-renderer"; +import { useSSRContext } from "vue"; +import { _ as _export_sfc } from "./plugin-vue_export-helper.yVxbj29m.js"; +const __pageData = JSON.parse( + '{"title":"Handlers (Version 0.0.3)","description":"","frontmatter":{},"headers":[],"relativePath":"references/handlers.md","filePath":"references/handlers.md"}', +); +const _sfc_main = { name: "references/handlers.md" }; +function _sfc_ssrRender( + _ctx, + _push, + _parent, + _attrs, + $props, + $setup, + $data, + $options, +) { + _push(`

    Handlers (Version 0.0.3)

    Overview

    The Handlers library provides a flexible way to manage and execute a series of handlers based on patterns. Each handler consists of a pattern function, a handle function, and a name. This library is suitable for scenarios where different actions need to be taken based on varying input criteria.

    Module Structure

    • Handlers._version: String representing the version of the Handlers library.
    • Handlers.list: Table storing the list of registered handlers.

    Functions

    Handlers.add(name, pattern, handler)

    adds a new handler or updates an existing handler by name

    Handlers.append(name, pattern, handle)

    Appends a new handler to the end of the handlers list.

    Parameters

    • pattern (function): Function that determines if the handler should be executed.
    • handle (function): The handler function to execute.
    • name (string): A unique name for the handler.

    Handlers.prepend(name, pattern, handle)

    Prepends a new handler to the beginning of the handlers list.

    Parameters

    • Same as handlers.append.

    Handlers.before(handleName)

    Returns an object that allows adding a new handler before a specified handler.

    Parameters

    • handleName (string): The name of the handler before which the new handler will be added.

    Returns

    • An object with an add method to insert the new handler.

    Handlers.after(handleName)

    Returns an object that allows adding a new handler after a specified handler.

    Parameters

    • handleName (string): The name of the handler after which the new handler will be added.

    Returns

    • An object with an add method to insert the new handler.

    Handlers.remove(name)

    Removes a handler from the handlers list by name.

    Parameters

    • name (string): The name of the handler to be removed.

    Handlers.evaluate(msg, env)

    Evaluates each handler against a given message and environment. Handlers are called in the order they appear in the handlers list.

    Parameters

    • msg (table): The message to be processed by the handlers.
    • env (table): The environment in which the handlers are executed.

    Returns

    • response (varies): The response from the handler(s). Returns a default message if no handler matches.

    Usage Example

    lua
    -- Define pattern and handle functions
    +local function myPattern(msg)
    +    -- Determine if the handler should be executed
    +end
    +
    +local function myHandle(msg, env, response)
    +    -- Handler logic
    +end
    +
    +-- Add a new handler
    +Handlers.add("myHandler", myPattern, myHandle)
    +
    +-- Evaluate a message
    +local response = handlers.evaluate({ key = "value" }, { envKey = "envValue" })

    Notes

    • Handlers are executed in the order they appear in handlers.list.
    • The pattern function should return 0 to skip the handler, -1 to break after the handler is executed, or 1 to continue with the next handler.
    • The evaluate function can concatenate responses from multiple handlers.

    Handlers.utils

    The Handlers.utils module provides two functions that are common matching patterns and one function that is a common handle function.

    • hasMatchingData(data)
    • hasMatchingTag(name, value)
    • reply(txt)

    Handlers.utils.hasMatchingData(data : string)

    This helper returns a function that requires a message argument, so you can drop this into the pattern argument of any handler. The function compares the data on the incoming message with the string provided as an argument.

    lua
    Handlers.add("ping",
    +    Handlers.utils.hasMatchingData("ping"),
    +    ...
    +)

    If a message comes into the process with data set to ping, this handler will match on it and invoke the handle function.

    Handlers.hasMatchingTag(name : string, value : string)

    This helper returns a function that requires a message argument, so you can drop this into any pattern argument on the Handlers module. The function compares the Tag Name and Value, if they are equal then it invokes the handle function.

    lua
    Handlers.add("ping",
    +    Handlers.utils.hasMatchingData("ping"),
    +    ...
    +)

    Handlers.reply(text : string)

    This helper is a simple handle function, it basically places the text value in to the Data property of the outbound message.

    lua
    Handlers.add("ping",
    +    Handlers.utils.hasMatchingData("ping"),
    +    Handlers.utils.reply("pong")
    +)
    `); +} +const _sfc_setup = _sfc_main.setup; +_sfc_main.setup = (props, ctx) => { + const ssrContext = useSSRContext(); + (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add( + "references/handlers.md", + ); + return _sfc_setup ? _sfc_setup(props, ctx) : void 0; +}; +const handlers = /* @__PURE__ */ _export_sfc(_sfc_main, [ + ["ssrRender", _sfc_ssrRender], +]); +export { __pageData, handlers as default }; diff --git a/src/.vitepress/.temp/references_index.md.js b/src/.vitepress/.temp/references_index.md.js new file mode 100644 index 00000000..169fcec1 --- /dev/null +++ b/src/.vitepress/.temp/references_index.md.js @@ -0,0 +1,35 @@ +import { ssrRenderAttrs } from "vue/server-renderer"; +import { useSSRContext } from "vue"; +import { _ as _export_sfc } from "./plugin-vue_export-helper.yVxbj29m.js"; +const __pageData = JSON.parse( + '{"title":"References","description":"","frontmatter":{},"headers":[],"relativePath":"references/index.md","filePath":"references/index.md"}', +); +const _sfc_main = { name: "references/index.md" }; +function _sfc_ssrRender( + _ctx, + _push, + _parent, + _attrs, + $props, + $setup, + $data, + $options, +) { + _push( + `

    References

    `, + ); +} +const _sfc_setup = _sfc_main.setup; +_sfc_main.setup = (props, ctx) => { + const ssrContext = useSSRContext(); + (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add( + "references/index.md", + ); + return _sfc_setup ? _sfc_setup(props, ctx) : void 0; +}; +const index = /* @__PURE__ */ _export_sfc(_sfc_main, [ + ["ssrRender", _sfc_ssrRender], +]); +export { __pageData, index as default }; diff --git a/src/.vitepress/.temp/references_lua.md.js b/src/.vitepress/.temp/references_lua.md.js new file mode 100644 index 00000000..16d05183 --- /dev/null +++ b/src/.vitepress/.temp/references_lua.md.js @@ -0,0 +1,37 @@ +import { ssrRenderAttrs, ssrRenderStyle } from "vue/server-renderer"; +import { useSSRContext } from "vue"; +import { _ as _export_sfc } from "./plugin-vue_export-helper.yVxbj29m.js"; +const __pageData = JSON.parse( + '{"title":"Meet Lua","description":"","frontmatter":{},"headers":[],"relativePath":"references/lua.md","filePath":"references/lua.md"}', +); +const _sfc_main = { name: "references/lua.md" }; +function _sfc_ssrRender( + _ctx, + _push, + _parent, + _attrs, + $props, + $setup, + $data, + $options, +) { + _push( + `

    Meet Lua

    Understanding Lua

    • Background: Lua is a lightweight, high-level, multi-paradigm programming language designed primarily for embedded systems and clients. It's known for its efficiency, simplicity, and flexibility.
    • Key Features: Lua offers powerful data description constructs, dynamic typing, efficient memory management, and good support for object-oriented programming.

    Setting Up

    1. Installation: Visit Lua's official website to download and install Lua.
    2. Environment: You can use a simple text editor and command line, or an IDE like ZeroBrane Studio or Eclipse with a Lua plugin.

    Basic Syntax and Concepts (in aOS)

    • Hello World:
      lua
      "Hello, World!"
    • Variables and Types: Lua is dynamically typed. Basic types include nil, boolean, number, string, function, userdata, thread, and table.
    • Control Structures: Includes if, while, repeat...until, and for.
    • Functions: First-class citizens in Lua, supporting closures and higher-order functions.
    • Tables: The only data structuring mechanism in Lua, which can be used to represent arrays, sets, records, etc.

    Hands-On Practice

    • Experiment with Lua's Interactive Mode: Run aos in your terminal and start experimenting with Lua commands.
    • Write Simple Scripts: Create .lua files and run them using the Lua interpreter. Use .load file.lua feature to upload lua code on your aOS process.

    Resources

    • Official Documentation: Lua 5.3 Reference Manual
    • Online Tutorials: Websites like Learn Lua are great for interactive learning.
    • Books: "Programming in Lua" (first edition available online) is a comprehensive resource.
    • Community: Join forums or communities like Lua Users for support and discussions.

    Best Practices

    • Keep It Simple: Lua is designed to be simple and flexible. Embrace this philosophy in your code.
    • Performance: Learn about Lua's garbage collection and efficient use of tables.
    • Integration: Consider how Lua can be embedded into other applications, particularly C/C++ projects.

    Conclusion

    Lua is a powerful language, especially in the context of embedded systems and game development. Its simplicity and efficiency make it a great choice for specific use cases. Enjoy your journey into Lua programming!

    `, + ); +} +const _sfc_setup = _sfc_main.setup; +_sfc_main.setup = (props, ctx) => { + const ssrContext = useSSRContext(); + (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add( + "references/lua.md", + ); + return _sfc_setup ? _sfc_setup(props, ctx) : void 0; +}; +const lua = /* @__PURE__ */ _export_sfc(_sfc_main, [ + ["ssrRender", _sfc_ssrRender], +]); +export { __pageData, lua as default }; diff --git a/src/.vitepress/.temp/references_token.md.js b/src/.vitepress/.temp/references_token.md.js new file mode 100644 index 00000000..9314da12 --- /dev/null +++ b/src/.vitepress/.temp/references_token.md.js @@ -0,0 +1,1951 @@ +import { ssrRenderAttrs, ssrRenderStyle } from "vue/server-renderer"; +import { useSSRContext } from "vue"; +import { _ as _export_sfc } from "./plugin-vue_export-helper.yVxbj29m.js"; +const __pageData = JSON.parse( + '{"title":"ao Token and Subledger Specification","description":"","frontmatter":{},"headers":[],"relativePath":"references/token.md","filePath":"references/token.md"}', +); +const _sfc_main = { name: "references/token.md" }; +function _sfc_ssrRender( + _ctx, + _push, + _parent, + _attrs, + $props, + $setup, + $data, + $options, +) { + _push(`

    ao Token and Subledger Specification

    Status: DRAFT-1 Targeting Network: ao.TN.1

    This specification describes the necessary message handlers and functionality required for a standard ao token process. Implementations of this standard typically offer users the ability control a transferrable asset, whose scarcity is maintained by the process.

    Each compliant process will likely implement a ledger of balances in order to encode ownership of the asset that the process represents. Compliant processes have a set of methods that allow for the modification of this ledger, typically with safe-guards to ensure the scarcity of ownership of the token represented by the process.

    Additionally, this specification describes a 'subledger' process type which, when implemented, offers the ability to split move a number of the tokens from the parent into a child process that implements the same token interface specification. If the From-Module of the subledger process is trusted by the participants, these subledgers can be used to transact in the 'source' token, without directly exchanging messages with it. This allows participants to use the tokens from a process, even if that process is congested. Optionally, if the participants trust the Module a subledger process is running, they are able to treat balances across these processes as fungible. The result of this is that an arbitrary numbers of parallel processes -- and thus, transactions -- can be processed by a single token at any one time.

    Token Processes

    A specification-compliant token process responds to a number of different forms of messages, with each form specified in an Action tag. The full set of Action messages that the token must support are as follows:

    NameDescriptionRead-Only
    Balanceget the balance of an identifer✔️
    Balancesget a list of all ledger/account balances✔️
    Transfersend 1 or more units from the callers balance to one or move targets with the option to notify targets
    Mintif the ledger process is the root and you would like to increase token supply

    In the remainder of this section the tags necessary to spawn a compliant token process, along with the form of each of the Action messages and their results is described.

    Spawning Parameters

    Every compliant token process must carry the following immutable parameters upon its spawning message:

    TagDescriptionOptional?
    NameThe title of the token, as it should be displayed to users.✔️
    TickerA suggested shortened name for the token, such that it can be referenced quickly.✔️
    LogoAn image that applications may deserire to show next to the token, in order to make it quickly visually identifiable.✔️
    DenominationThe number of the token that should be treated as a single unit when quantities and balances are displayed to users.

    Messaging Protocol

    Balance(Target? : string)

    Returns the balance of a target, if a target is not supplied then the balance of the sender of the message must be returned.

    Example Action message:

    lua
    send({
    +    Target = "{TokenProcess Identifier}",
    +    Tags = {
    +        Action = "Balance",
    +        Target = "{IDENTIFIER}"
    +    }
    +})

    Example response message:

    {
    +    Tags = {
    +        Balance = "50",
    +        Target = "LcldyO8wwiGDzC3iXzGofdO8JdR4S1_2A6Qtz-o33-0",
    +        Ticker = "FUN"
    +    }
    +}

    Balances()

    Returns the balance of all participants in the token.

    lua
    send({
    +    Target = "[TokenProcess Identifier]",
    +    Tags = {
    +        Action = "Balances",
    +        Limit = 1000, # TODO: Is this necessary if the user is paying for the compute and response?
    +        Cursor? = "BalanceIdentifer"
    +    }
    +})

    Example response message:

    lua
    {
    +    Data = {
    +        "MV8B3MAKTsUOqyCzQ0Tsa2AR3TiWTBU1Dx0xM4MO-f4": 100,
    +        "LcldyO8wwiGDzC3iXzGofdO8JdR4S1_2A6Qtz-o33-0": 50
    +    }
    +}

    Transfer(Target, Quantity)

    If the sender has a sufficient balance, send the Quantity to the Target, issuing a Credit-Notice to the recipient and a Debit-Notice to the sender. If the sender has an insufficient balance, fail and notify the sender.

    lua
    send({
    +    Target = "[TokenProcess Identifier]",
    +    Tags = {
    +        { name = "Action", value = "Transfer" },
    +        { name = "Recipient", value = "[ADDRESS]" },
    +        { name = "Quantity", value = "100" }
    +    }
    +})

    If a successful transfer occurs a notification message should be sent if Cast is not set.

    lua
    ao.send({
    +    Target = "[Recipient Address]",
    +    Tags = {
    +        { name = "Action", value = "Credit-Notice" },
    +        { name = "Sender", value = "[ADDRESS]" },
    +        { name = "Quantity", value = "100"}
    +    }
    +})

    Recipients will infer from the From-Process tag of the message which tokens they have received.

    Get-Info()

    lua
    send({
    +    Target = "{Token}",
    +    Tags = {
    +        Action = "Info"
    +    }
    +})

    Mint() [optional]

    Implementing a Mint action gives the process a way of allowing valid participants to create new tokens.

    lua
    send({
    +    Target ="{Token Process}",
    +    Tags = {
    +        Action = "Mint",
    +        Quantity = "1000"
    +    }
    +})

    Subledger Processes

    In order to function appropriately, subledgers must implement the full messaging protocol of token contracts (excluding the Mint action). Subledgers must also implement additional features and spawn parameters for their processes. These modifications are described in the following section.

    Spawning Parameters

    Every compliant subledger process must carry the following immutable parameters upon its spawning message:

    TagDescriptionOptional?
    Source-TokenThe ID of the top-most process that this subledger represents.
    Parent-TokenThe ID of the parent process that this subledger is attached to.

    Credit-Notice Handler

    Upon receipt of a Credit-Notice message, a compliant subledger process must check if the process in question is the Parent-Token. If it is, the subledger must increase the balance of the Sender by the specified quantity.

    Transfer(Target, Quantity)

    In addition to the normal tags that are passed in the Credit-Notice message to the recipient of tokens, a compliant subledger process must also provide both of the Source-Token and Parent-Token values. This allows the recipient of the Transfer message -- if they trust the Module of the subledger process -- to credit a receipt that is analogous (fungible with) deposits from the Source-Token.

    The modified Credit-Notice should be structured as follows:

    lua
    ao.send({
    +    Target = "[Recipient Address]",
    +    Tags = {
    +        { name = "Action", value = "Credit-Notice" },
    +        { name = "Quantity", value = "100"},
    +        { name = "Source-Token", value = "[ADDRESS]" },
    +        { name = "Parent-Token", value = "[ADDRESS]" }
    +    }
    +})

    Withdraw(Target?, Quantity)

    All subledgers must allow balance holders to withdraw their tokens to the parent ledger. Upon receipt of an Action: Withdraw message, the subledger must send an Action message to its Parent-Ledger, transferring the requested tokens to the caller's address, while debiting their account locally. This transfer will result in a Credit-Notice from the Parent-Ledger for the caller.

    lua
    send({
    +    Target = "[TokenProcess Identifier]",
    +    Tags = {
    +     { name = "Action", value = "Withdraw" },
    +     { name = "Recipient", value = "[ADDRESS]" },
    +     { name = "Quantity", value = "100" }
    +    }
    +})

    Token Example

    NOTE: When implementing a token it is important to remember that all Tags on a message MUST be "string"s. Using thetostring function you can convert simple types to strings.

    lua
    if not balances then
    +  balances = { [ao.id] = 100000000000000 }
    +end
    +
    +if name ~= "Fun Coin" then
    +  name = "Fun Coin"
    +end
    +
    +if ticker ~= "Fun" then
    +  ticker = "fun"
    +end
    +
    +if denomination ~= 6 then
    +  denomination = 6
    +end
    +
    +-- handlers that handler incoming msg
    +handlers.add(
    +  "transfer",
    +  handlers.utils.hasMatchingTag("Action", "Transfer"),
    +  function (msg)
    +    assert(type(msg.Tags.Recipient) == 'string', 'Recipient is required!')
    +    assert(type(msg.Tags.Quantity) == 'string', 'Quantity is required!')
    +
    +    if not balances[msg.From] then
    +      balances[msg.From] = 0
    +    end
    +
    +    if not balances[msg.Tags.Recipient] then
    +      balances[msg.Tags.Recipient] = 0
    +    end
    +
    +    local qty = tonumber(msg.Tags.Quantity)
    +    assert(type(qty) == 'number', 'qty must be number')
    +    -- handlers.utils.reply("Transfering qty")(msg)
    +    if balances[msg.From] >= qty then
    +      balances[msg.From] = balances[msg.From] - qty
    +      balances[msg.Tags.Recipient] = balances[msg.Tags.Recipient] + qty
    +      ao.send({
    +        Target = msg.From,
    +        Tags = {
    +          Action = "Debit-Notice",
    +          Quantity = tostring(qty)
    +        }
    +      })
    +      ao.send({
    +      Target = msg.Tags.Recipient,
    +      Tags = {
    +        Action = "Credit-Notice",
    +        Quantity = tostring(qty)
    +      }})
    +      -- if msg.Tags.Cast and msg.Tags.Cast == "true" then
    +      --   return
    +      -- end
    +
    +    end
    +  end
    +)
    +
    +handlers.add(
    +  "balance",
    +  handlers.utils.hasMatchingTag("Action", "Balance"),
    +  function (msg)
    +    assert(type(msg.Tags.Target) == "string", "Target Tag is required!")
    +    local bal = "0"
    +    if balances[msg.Tags.Target] then
    +      bal = tostring(balances[msg.Tags.Target])
    +    end
    +    ao.send({Target = msg.From, Tags = {
    +      Target = msg.From,
    +      Balance = bal,
    +      Ticker = ticker or ""
    +    }})
    +  end
    +)
    +
    +local json = require("json")
    +
    +handlers.add(
    +  "balances",
    +  handlers.utils.hasMatchingTag("Action", "Balances"),
    +  function (msg)
    +    ao.send({
    +      Target = msg.From,
    +      Data = json.encode(balances)
    +    })
    +  end
    +
    +)
    +
    +handlers.add(
    +  "info",
    +  handlers.utils.hasMatchingTag("Action", "Info"),
    +  function (msg)
    +    ao.send({Target = msg.From, Tags = {
    +      Name = name,
    +      Ticker = ticker,
    +      Denomination = tostring(denomination)
    +    }})
    +  end
    +)
    `); +} +const _sfc_setup = _sfc_main.setup; +_sfc_main.setup = (props, ctx) => { + const ssrContext = useSSRContext(); + (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add( + "references/token.md", + ); + return _sfc_setup ? _sfc_setup(props, ctx) : void 0; +}; +const token = /* @__PURE__ */ _export_sfc(_sfc_main, [ + ["ssrRender", _sfc_ssrRender], +]); +export { __pageData, token as default }; diff --git a/src/.vitepress/.temp/references_wasm.md.js b/src/.vitepress/.temp/references_wasm.md.js new file mode 100644 index 00000000..6e852e34 --- /dev/null +++ b/src/.vitepress/.temp/references_wasm.md.js @@ -0,0 +1,35 @@ +import { ssrRenderAttrs } from "vue/server-renderer"; +import { useSSRContext } from "vue"; +import { _ as _export_sfc } from "./plugin-vue_export-helper.yVxbj29m.js"; +const __pageData = JSON.parse( + '{"title":"Meet Web Assembly","description":"","frontmatter":{},"headers":[],"relativePath":"references/wasm.md","filePath":"references/wasm.md"}', +); +const _sfc_main = { name: "references/wasm.md" }; +function _sfc_ssrRender( + _ctx, + _push, + _parent, + _attrs, + $props, + $setup, + $data, + $options, +) { + _push( + `

    Meet Web Assembly

    WebAssembly (often abbreviated as Wasm) is a modern binary instruction format providing a portable compilation target for high-level languages like C, C++, and Rust. It enables deployment on the web for client and server applications, offering a high level of performance and efficiency. WebAssembly is designed to maintain the security and sandboxing features of web browsers, making it a suitable choice for web-based applications. It's a key technology for web developers, allowing them to write code in multiple languages and compile it into bytecode that runs in the browser at near-native speed.

    The significance of WebAssembly lies in its ability to bridge the gap between web and native applications. It allows complex applications and games, previously limited to desktop environments, to run in the browser with comparable performance. This opens up new possibilities for web development, including the creation of high-performance web apps, games, and even the porting of existing desktop applications to the web. WebAssembly operates alongside JavaScript, complementing it by enabling performance-critical components to be written in languages better suited for such tasks, thereby enhancing the capabilities and performance of web applications.

    `, + ); +} +const _sfc_setup = _sfc_main.setup; +_sfc_main.setup = (props, ctx) => { + const ssrContext = useSSRContext(); + (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add( + "references/wasm.md", + ); + return _sfc_setup ? _sfc_setup(props, ctx) : void 0; +}; +const wasm = /* @__PURE__ */ _export_sfc(_sfc_main, [ + ["ssrRender", _sfc_ssrRender], +]); +export { __pageData, wasm as default }; diff --git a/src/.vitepress/locales.js b/src/.vitepress/locales.js index 3c5f2691..ed1c7c8b 100644 --- a/src/.vitepress/locales.js +++ b/src/.vitepress/locales.js @@ -114,39 +114,39 @@ export const localeConfig = (langCode) => ({ ], }, { - text: get_i18n_str(langCode, "guides-ao-connect"), - link: get_i18n_link(langCode, "/guides/ao-connect/ao-connect"), + text: get_i18n_str(langCode, "guides-aoconnect"), + link: get_i18n_link(langCode, "/guides/aoconnect/aoconnect"), items: [ { text: get_i18n_str(langCode, "guides-installing-connect"), link: get_i18n_link( langCode, - "/guides/ao-connect/installing-connect", + "/guides/aoconnect/installing-connect", ), }, { text: get_i18n_str(langCode, "guides-connecting"), - link: get_i18n_link(langCode, "/guides/ao-connect/connecting"), + link: get_i18n_link(langCode, "/guides/aoconnect/connecting"), }, { text: get_i18n_str(langCode, "guides-sending-messages"), link: get_i18n_link( langCode, - "/guides/ao-connect/sending-messages", + "/guides/aoconnect/sending-messages", ), }, { text: get_i18n_str(langCode, "guides-reading-results"), link: get_i18n_link( langCode, - "/guides/ao-connect/reading-results", + "/guides/aoconnect/reading-results", ), }, { text: get_i18n_str(langCode, "guides-spawning-processes"), link: get_i18n_link( langCode, - "/guides/ao-connect/spawning-processes", + "/guides/aoconnect/spawning-processes", ), }, ], @@ -183,6 +183,10 @@ export const localeConfig = (langCode) => ({ text: get_i18n_str(langCode, "references-handlers"), link: get_i18n_link(langCode, "/references/handlers"), }, + { + text: get_i18n_str(langCode, "references-token"), + link: get_i18n_link(langCode, "/references/token"), + }, ], }, ], diff --git a/src/guides/ao-connect/ao-connect.md b/src/guides/aoconnect/aoconnect.md similarity index 100% rename from src/guides/ao-connect/ao-connect.md rename to src/guides/aoconnect/aoconnect.md diff --git a/src/guides/ao-connect/connecting.md b/src/guides/aoconnect/connecting.md similarity index 85% rename from src/guides/ao-connect/connecting.md rename to src/guides/aoconnect/connecting.md index 1d8f7bfa..153a4ec3 100644 --- a/src/guides/ao-connect/connecting.md +++ b/src/guides/aoconnect/connecting.md @@ -7,14 +7,14 @@ You may want to do this if you want to know which MU is being called when you se ## Importing without a call to connect ```js -// Here ao-connect will implicitly use the default nodes/units -import { spawn, message, result } from "@permaweb/ao-connect"; +// Here aoconnect will implicitly use the default nodes/units +import { spawn, message, result } from "@permaweb/aoconnect"; ``` ## Connecting to a specific MU, CU, and gateway ```js -import { connect } from "@permaweb/ao-connect"; +import { connect } from "@permaweb/aoconnect"; const { spawn, message, result } = connect({ MU_URL: "https://ao-mu-1.onrender.com", @@ -30,7 +30,7 @@ const { spawn, message, result } = connect({ All three of these parameters to connect are optional and it is valid to specify only 1 or 2 of them, or none. You could pass in just the MU_URL, for example. ```js -import { connect } from "@permaweb/ao-connect"; +import { connect } from "@permaweb/aoconnect"; const { spawn, message, result } = connect({ MU_URL: "https://ao-mu-1.onrender.com", diff --git a/src/guides/ao-connect/installing-connect.md b/src/guides/aoconnect/installing-connect.md similarity index 66% rename from src/guides/ao-connect/installing-connect.md rename to src/guides/aoconnect/installing-connect.md index e74ae7d8..e1c15b77 100644 --- a/src/guides/ao-connect/installing-connect.md +++ b/src/guides/aoconnect/installing-connect.md @@ -12,13 +12,13 @@ In order to install ao connect into your app you must have NodeJS/NPM 18 or high ### npm ```sh -npm install --save @permaweb/ao-connect +npm install --save @permaweb/aoconnect ``` ### yarn ```sh -yarn add @permaweb/ao-connect -D +yarn add @permaweb/aoconnect -D ```
    @@ -28,11 +28,11 @@ This module can now be used from NodeJS as well as a browser, it can be included #### ESM (Node & Browser) aka type: `module` ```js -import { spawn, message, result } from "@permaweb/ao-connect"; +import { spawn, message, result } from "@permaweb/aoconnect"; ``` #### CJS (Node) type: `commonjs` ```js -const { spawn, message, result } = require("@permaweb/ao-connect"); +const { spawn, message, result } = require("@permaweb/aoconnect"); ``` diff --git a/src/guides/ao-connect/reading-results.md b/src/guides/aoconnect/reading-results.md similarity index 95% rename from src/guides/ao-connect/reading-results.md rename to src/guides/aoconnect/reading-results.md index 52b9b51a..ae4287d8 100644 --- a/src/guides/ao-connect/reading-results.md +++ b/src/guides/aoconnect/reading-results.md @@ -9,7 +9,7 @@ You may want to access a result to display the output generated by your message. ## Fetching a result ```js -import { result } from "@permaweb/ao-connect"; +import { result } from "@permaweb/aoconnect"; let { messages, spawns, output, error } = await result({ // the arweave TXID of the message diff --git a/src/guides/ao-connect/sending-messages.md b/src/guides/aoconnect/sending-messages.md similarity index 94% rename from src/guides/ao-connect/sending-messages.md rename to src/guides/aoconnect/sending-messages.md index ddc6f4e7..d53890ca 100644 --- a/src/guides/ao-connect/sending-messages.md +++ b/src/guides/aoconnect/sending-messages.md @@ -11,7 +11,7 @@ Refer to your process module's source code or documentation to see how the messa ```js import { readFileSync } from "node:fs"; -import { message, createDataItemSigner } from "@permaweb/ao-connect"; +import { message, createDataItemSigner } from "@permaweb/aoconnect"; const wallet = JSON.parse( readFileSync("/path/to/arweave/wallet.json").toString(), @@ -44,7 +44,7 @@ await message({ ## Sending a Message in a browser ```js -import { message, createDataItemSigner } from "@permaweb/ao-connect"; +import { message, createDataItemSigner } from "@permaweb/aoconnect"; // The only 2 mandatory parameters here are process and signer await message({ diff --git a/src/guides/ao-connect/spawning-processes.md b/src/guides/aoconnect/spawning-processes.md similarity index 96% rename from src/guides/ao-connect/spawning-processes.md rename to src/guides/aoconnect/spawning-processes.md index 349943a5..7dfb1d53 100644 --- a/src/guides/ao-connect/spawning-processes.md +++ b/src/guides/aoconnect/spawning-processes.md @@ -17,7 +17,7 @@ TZ7o7SIZ06ZEJ14lXwVtng1EtSx60QkPy-kh-kdAXog ```js import { readFileSync } from "node:fs"; -import { createDataItemSigner, spawn } from "@permaweb/ao-sdk"; +import { createDataItemSigner, spawn } from "@permaweb/aoconnect"; const wallet = JSON.parse( readFileSync("/path/to/arweave/wallet.json").toString(), diff --git a/src/guides/tutorials/dao.md b/src/guides/tutorials/dao.md index ff6d89c6..face6039 100644 --- a/src/guides/tutorials/dao.md +++ b/src/guides/tutorials/dao.md @@ -1,6 +1,6 @@ # DAO Guide -This guide brings you through the process of building a DAO using aos. If you have not already, you will need to first build a [Token](./token.md) in aos. We will load the DAO code into aos alongside the token code from the [Token](./token.md) guide. In the context of ao a DAO may be used to govern MU, CU, and SU nodes. +This guide brings you through the process of building a DAO using aos. If you have not already, you will need to first build a [token](./token.md) in aos. We will load the DAO code into aos alongside the token code from the [token](./token.md) guide. In the context of ao a DAO may be used to govern MU, CU, and SU nodes. In our DAO we will implement a process knwon as "slashing". In the case of ao, if a unit is misbehaving, other units may vote to slash them. Slashing means they will lose their stake, we will get more into stake later.