[{"name":"Effect","comment":" This module provides a [`Effect`](#Effect) type that carry both Cmd and messages for\na shared update\n\n\n# Create\n\n@docs Effect, none, batch, fromCmd, fromSharedCmd, fromShared, perform, attempt\n\n\n# Transform\n\n@docs map, toCmd\n\n\n# Join effect to a model\n\nThese functions join an effect to a given model, for using pipeline syntax in\nyour 'update' functions\n\n@docs with, withNone, withBatch, withCmd, withSharedCmd, withShared, withMap, withPerform, withAttempt\n\n\n# Add effect to a (model, effect) pair\n\nThese functions add a new effect to a given (model, effect) pair, for using\npipeline syntax in your 'update' functions\n\n@docs add, addBatch, addCmd, addSharedCmd, addShared, addMap, addPerform, addAttempt\n\n","unions":[{"name":"Effect","comment":" A collection of shared and platform effects\n","args":["sharedMsg","msg"],"cases":[]}],"aliases":[],"values":[{"name":"add","comment":" Add a new Effect to an existing model-Effect pair\n","type":"Effect.Effect sharedMsg msg -> ( model, Effect.Effect sharedMsg msg ) -> ( model, Effect.Effect sharedMsg msg )"},{"name":"addAttempt","comment":" Add an affect that attempts a Task to an existing model-Effect pair\n","type":"(Result.Result x a -> msg) -> Task.Task x a -> ( model, Effect.Effect sharedMsg msg ) -> ( model, Effect.Effect sharedMsg msg )"},{"name":"addBatch","comment":" Add a list of new Effect to an existing model-Effect pair\n","type":"List.List (Effect.Effect sharedMsg msg) -> ( model, Effect.Effect sharedMsg msg ) -> ( model, Effect.Effect sharedMsg msg )"},{"name":"addCmd","comment":" Add a [`Cmd`](/packages/elm/core/latest/Platform-Cmd#Cmd) to an existing\nmodel-Effect pair\n","type":"Platform.Cmd.Cmd msg -> ( model, Effect.Effect sharedMsg msg ) -> ( model, Effect.Effect sharedMsg msg )"},{"name":"addMap","comment":" Add a new mapped Effect to an existing model-Effect pair\n","type":"(msg1 -> msg) -> Effect.Effect sharedMsg msg1 -> ( model, Effect.Effect sharedMsg msg ) -> ( model, Effect.Effect sharedMsg msg )"},{"name":"addPerform","comment":" Add an affect that performs a Task to an existing model-Effect pair\n","type":"(a -> msg) -> Task.Task Basics.Never a -> ( model, Effect.Effect sharedMsg msg ) -> ( model, Effect.Effect sharedMsg msg )"},{"name":"addShared","comment":" Add a new shared Msg to an existing model-Effect pair\n\n    ( model, effect )\n        |> Effect.addShared Shared.clearCache\n\n","type":"sharedMsg -> ( model, Effect.Effect sharedMsg msg ) -> ( model, Effect.Effect sharedMsg msg )"},{"name":"addSharedCmd","comment":" Add a shared [`Cmd`](/packages/elm/core/latest/Platform-Cmd#Cmd) to an existing\nmodel-Effect pair\n\n    ( model, effect )\n        |> Effect.addShared Shared.renewToken\n\n","type":"Platform.Cmd.Cmd sharedMsg -> ( model, Effect.Effect sharedMsg msg ) -> ( model, Effect.Effect sharedMsg msg )"},{"name":"attempt","comment":" Build an effect that attempts a Task\n","type":"(Result.Result x a -> msg) -> Task.Task x a -> Effect.Effect sharedMsg msg"},{"name":"batch","comment":" Batch effects. Similar to\n[`Cmd.map`](/packages/elm/core/latest/Platform-Cmd#batch)\n","type":"List.List (Effect.Effect sharedMsg msg) -> Effect.Effect sharedMsg msg"},{"name":"fromCmd","comment":" Build an effect from a Cmd\n","type":"Platform.Cmd.Cmd msg -> Effect.Effect sharedMsg msg"},{"name":"fromShared","comment":" Build an effect from a shared Msg. The message will be send as-is to the\nshared update\n","type":"sharedMsg -> Effect.Effect sharedMsg msg"},{"name":"fromSharedCmd","comment":" Build an effect from a shared Cmd. The result of this command will be handled\nby the shared update no matter where it is emitted from\n","type":"Platform.Cmd.Cmd sharedMsg -> Effect.Effect sharedMsg msg"},{"name":"map","comment":" Transform the messages produced by an Effect. Similar to\n[`Cmd.map`](/packages/elm/core/latest/Platform-Cmd#map).\n","type":"(a -> b) -> Effect.Effect sharedMsg a -> Effect.Effect sharedMsg b"},{"name":"none","comment":" Tells that there are no effect\n","type":"Effect.Effect sharedMsg msg"},{"name":"perform","comment":" Build an effect that performs a Task\n","type":"(a -> msg) -> Task.Task Basics.Never a -> Effect.Effect sharedMsg msg"},{"name":"toCmd","comment":" Convert a collection of effect to a connection of\n[`Cmd`](/packages/elm/core/latest/Platform-Cmd#Cmd)\n","type":"( sharedMsg -> msg, subMsg -> msg ) -> Effect.Effect sharedMsg subMsg -> Platform.Cmd.Cmd msg"},{"name":"with","comment":" Wraps the model with the given Effect\n","type":"Effect.Effect sharedMsg msg -> model -> ( model, Effect.Effect sharedMsg msg )"},{"name":"withAttempt","comment":" Wraps the model with an affect that attempts a Task\n","type":"(Result.Result x a -> msg) -> Task.Task x a -> model -> ( model, Effect.Effect sharedMsg msg )"},{"name":"withBatch","comment":" Wraps the model with a list of Effect\n\n    init : ( Model, Effect Msg )\n    init =\n        myModel\n            |> Effect.withBatch [ someEffect, anotherEffect ]\n\n","type":"List.List (Effect.Effect sharedMsg msg) -> model -> ( model, Effect.Effect sharedMsg msg )"},{"name":"withCmd","comment":" Wraps the model with a Cmd\n\n    init : ( Model, Effect Msg )\n    init =\n        myModel\n            |> Effect.withCmd someCmd\n\n","type":"Platform.Cmd.Cmd msg -> model -> ( model, Effect.Effect sharedMsg msg )"},{"name":"withMap","comment":" Wraps the model with a mapped effect. Should only be used in top-level\npackages\n\n    init : ( Model, Effect Msg )\n    init =\n        myModel\n            |> Effect.withMap SharedMsg Shared.refreshIdentity\n\n","type":"(msg1 -> msg) -> Effect.Effect sharedMsg msg1 -> model -> ( model, Effect.Effect sharedMsg msg )"},{"name":"withNone","comment":" Wraps the model with Effect.none\n\n    init : ( Model, Effect Msg )\n    init =\n        myModel\n            |> Effect.withNone\n\n","type":"model -> ( model, Effect.Effect sharedMsg msg )"},{"name":"withPerform","comment":" Wraps the model with an affect that performs a Task\n","type":"(a -> msg) -> Task.Task Basics.Never a -> model -> ( model, Effect.Effect sharedMsg msg )"},{"name":"withShared","comment":" Wraps the model with a shared Msg\n\n    init : ( Model, Effect Msg )\n    init =\n        myModel\n            |> Effect.withCmd Shared.clearCache\n\n","type":"sharedMsg -> model -> ( model, Effect.Effect sharedMsg msg )"},{"name":"withSharedCmd","comment":" Wraps the model with a shared Cmd\n\n    init : ( Model, Effect Msg )\n    init =\n        myModel\n            |> Effect.withCmd Shared.refreshIdentity\n\n","type":"Platform.Cmd.Cmd sharedMsg -> model -> ( model, Effect.Effect sharedMsg msg )"}],"binops":[]},{"name":"Spa","comment":"\n\n\n# Create the application\n\n@docs init, initNoShared\n\n\n# Add pages\n\n@docs addPublicPage, addProtectedPage\n\n\n# Finalize\n\nOnce all the pages are added to the application, we can change it into a record\nsuitable for the `Browser.application` function.\n\n@docs application\n\n","unions":[],"aliases":[],"values":[{"name":"addProtectedPage","comment":" Add a protected page to the application\n","type":"( (currentPageMsg -> Spa.Msg sharedMsg (Spa.PageMsg currentPageMsg previousPageMsg)) -> pageView -> view, (Spa.Msg sharedMsg previousPageMsg -> Spa.Msg sharedMsg (Spa.PageMsg currentPageMsg previousPageMsg)) -> previousView -> view ) -> (route -> Maybe.Maybe pageFlags) -> (shared -> identity -> Spa.Page pageFlags sharedMsg pageView currentPageModel currentPageMsg) -> Spa.Builder flags route identity shared sharedMsg previousView prev prevprev previousPageMsg -> Spa.Builder flags route identity shared sharedMsg view currentPageModel (Spa.PageModel prev prevprev) (Spa.PageMsg currentPageMsg previousPageMsg)"},{"name":"addPublicPage","comment":" Add a public page to the application\n","type":"( (currentPageMsg -> Spa.Msg sharedMsg (Spa.PageMsg currentPageMsg previousPageMsg)) -> pageView -> view, (Spa.Msg sharedMsg previousPageMsg -> Spa.Msg sharedMsg (Spa.PageMsg currentPageMsg previousPageMsg)) -> previousView -> view ) -> (route -> Maybe.Maybe pageFlags) -> (shared -> Spa.Page pageFlags sharedMsg pageView currentPageModel currentPageMsg) -> Spa.Builder flags route identity shared sharedMsg previousView prev prevprev previousPageMsg -> Spa.Builder flags route identity shared sharedMsg view currentPageModel (Spa.PageModel prev prevprev) (Spa.PageMsg currentPageMsg previousPageMsg)"},{"name":"application","comment":" Finalize the Spa application into a record suitable for the `Browser.application`\n\n`toDocument` is a function that convert a view to a `Browser.Document`\n\n    appWithPages\n        |> Spa.application { toDocument = View.toDocument }\n        |> Browser.application\n\n","type":"{ toDocument : shared -> view -> Browser.Document (Spa.Msg sharedMsg pageMsg) } -> Spa.Builder flags route identity shared sharedMsg view current previous pageMsg -> { init : flags -> Url.Url -> Browser.Navigation.Key -> ( Spa.Model route shared current previous, Platform.Cmd.Cmd (Spa.Msg sharedMsg pageMsg) ), view : Spa.Model route shared current previous -> Browser.Document (Spa.Msg sharedMsg pageMsg), update : Spa.Msg sharedMsg pageMsg -> Spa.Model route shared current previous -> ( Spa.Model route shared current previous, Platform.Cmd.Cmd (Spa.Msg sharedMsg pageMsg) ), subscriptions : Spa.Model route shared current previous -> Platform.Sub.Sub (Spa.Msg sharedMsg pageMsg), onUrlRequest : Browser.UrlRequest -> Spa.Msg sharedMsg pageMsg, onUrlChange : Url.Url -> Spa.Msg sharedMsg pageMsg }"},{"name":"init","comment":" Bootstrap a Spa application\n\n    Spa.init\n        { init = Shared.init\n        , subscriptions = Shared.subscriptions\n        , update = Shared.update\n        , defaultView = View.defaultView\n        , toRoute = Route.toRoute\n        , extractIdentity = Shared.identity\n        , protectPage = Route.toUrl >> Just >> Route.SignIn >> Route.toUrl\n        }\n\n","type":"{ init : flags -> Browser.Navigation.Key -> ( shared, Platform.Cmd.Cmd sharedMsg ), subscriptions : shared -> Platform.Sub.Sub sharedMsg, update : sharedMsg -> shared -> ( shared, Platform.Cmd.Cmd sharedMsg ), defaultView : view, toRoute : Url.Url -> route, extractIdentity : shared -> Maybe.Maybe identity, protectPage : route -> String.String } -> Spa.Builder flags route identity shared sharedMsg view () () ()"},{"name":"initNoShared","comment":" Bootstrap a Spa application that has no Shared state\n","type":"(Url.Url -> route) -> view -> Spa.Builder () route () () () view () () ()"}],"binops":[]},{"name":"Spa.Page","comment":" Provides `Page` builders\n\n@docs static, sandbox, element\n\n","unions":[],"aliases":[],"values":[{"name":"element","comment":" Create a page that can communicate with the outside world.\n\nIt is the page equivalent of a [element program](/packages/elm/browser/latest/Browser#element)\n\n","type":"{ init : flags -> ( model, Effect.Effect sharedMsg msg ), update : msg -> model -> ( model, Effect.Effect sharedMsg msg ), view : model -> view, subscriptions : model -> Platform.Sub.Sub msg } -> Internal.Page flags sharedMsg view model msg"},{"name":"sandbox","comment":" Create a \"sandboxed\" page that cannot communicate with the outside world.\n\nIt is the page equivalent of a [sanboxed program](/packages/elm/browser/latest/Browser#sandbox)\n\n","type":"{ init : flags -> model, update : msg -> model -> model, view : model -> view } -> Internal.Page flags sharedMsg view model msg"},{"name":"static","comment":" Create a static page that has no state, only a view\n","type":"view -> Internal.Page flags sharedMsg view () ()"}],"binops":[]}]