diff --git a/.github/workflows/swift.yml b/.github/workflows/swift.yml index f105ede..cf9c349 100644 --- a/.github/workflows/swift.yml +++ b/.github/workflows/swift.yml @@ -13,7 +13,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, macos-latest] - swift: ["5.9"] + swift: ["6.0"] steps: - uses: swift-actions/setup-swift@v1 with: diff --git a/.periphery.yml b/.periphery.yml new file mode 100644 index 0000000..2df913e --- /dev/null +++ b/.periphery.yml @@ -0,0 +1,3 @@ +retain_public: true +targets: +- Reducer diff --git a/.swift-version b/.swift-version index f0933d4..5049538 100644 --- a/.swift-version +++ b/.swift-version @@ -1 +1 @@ -5.10 \ No newline at end of file +6.0 \ No newline at end of file diff --git a/.swiftformat b/.swiftformat new file mode 100644 index 0000000..a000ba5 --- /dev/null +++ b/.swiftformat @@ -0,0 +1,50 @@ +# file options + +# --exclude Tests/XCTestManifests.swift,Tests/BadConfig,Snapshots,Build,PluginTests + +# format options + +--allman false +--binarygrouping 4,8 +--commas inline +--decimalgrouping 3,6 +--elseposition same-line +--voidtype void +--exponentcase lowercase +--exponentgrouping disabled +--fractiongrouping disabled +--header strip +--hexgrouping 4,8 +--hexliteralcase uppercase +--ifdef indent +--indent 4 +--indentcase false +--importgrouping alpha +--linebreaks lf +--maxwidth 150 +--octalgrouping 4,8 +--operatorfunc spaced +--typedelimiter space-after +--patternlet hoist +--ranges spaced +--self remove +--redundanttype inferred +--semicolons inline +--stripunusedargs always +--swiftversion 5.10 +--trimwhitespace always +--wraparguments before-first +--wrapcollections before-first +--wrapconditions after-first + +# rules + +--enable isEmpty +--acronyms "ID,URL,UUID" +--enable organizeDeclarations +--markcategories false +--organizationmode visibility +--structthreshold 1 +--classthreshold 1 +--enumthreshold 1 +--extensionlength 1 \ No newline at end of file diff --git a/.swiftlint.yml b/.swiftlint.yml index bba7650..fe4851b 100644 --- a/.swiftlint.yml +++ b/.swiftlint.yml @@ -71,7 +71,7 @@ opt_in_rules: # some rules are only opt-in - multiline_arguments - multiline_literal_brackets - multiline_parameters - - no_extension_access_modifier + # - no_extension_access_modifier - nslocalizedstring_key - number_separator - object_literal diff --git a/.swiftpm/configuration/Package.resolved b/.swiftpm/configuration/Package.resolved new file mode 100644 index 0000000..a54adf8 --- /dev/null +++ b/.swiftpm/configuration/Package.resolved @@ -0,0 +1,24 @@ +{ + "originHash" : "92071d932bcc245a6254633147125ac8851348c79823b708d0e51337b06aa0e2", + "pins" : [ + { + "identity" : "swiftformat", + "kind" : "remoteSourceControl", + "location" : "https://github.com/nicklockwood/SwiftFormat", + "state" : { + "revision" : "d6309f7440889427426143b4a0b100b959d3f3e6", + "version" : "0.54.3" + } + }, + { + "identity" : "swiftlintplugins", + "kind" : "remoteSourceControl", + "location" : "https://github.com/SimplyDanny/SwiftLintPlugins", + "state" : { + "revision" : "6c3d6c32a37224179dc290f21e03d1238f3d963b", + "version" : "0.56.2" + } + } + ], + "version" : 3 +} diff --git a/.swiftpm/xcode/xcshareddata/xcschemes/Reducer.xcscheme b/.swiftpm/xcode/xcshareddata/xcschemes/Reducer.xcscheme new file mode 100644 index 0000000..79956d6 --- /dev/null +++ b/.swiftpm/xcode/xcshareddata/xcschemes/Reducer.xcscheme @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Makefile b/Makefile deleted file mode 100644 index 86b5651..0000000 --- a/Makefile +++ /dev/null @@ -1,133 +0,0 @@ -.PHONY: set-version pod-push mint test code-coverage-summary code-coverage-details code-coverage-file code-coverage-upload lint-check lint-autocorrect sourcery jazzy docc prebuild notify-telegram help -.DEFAULT_GOAL := help - -# Version - -ifndef TO -set-version: - $(error Missing new version number. Please use `make set-version TO=1.2.3`) -else -set-version: - sed -i .bkp -E "s/(s\.version.*=.*)'.*'/\1'${TO}'/" *.podspec - sed -i .bkp -E "s/(, from: )\".*\"\)/\1\"${TO}\")/" README.md - rm *.bkp -endif - -# Pod push -pod-push: - bundle exec pod trunk push Reducer.podspec --allow-warnings - -mint: - command -v mint || brew install mint - mint bootstrap - -# Unit Test - -test: SHELL:=/bin/bash -test: - set -eo pipefail && \ - swift test --enable-code-coverage --build-path .build - -code-coverage-summary: - xcrun llvm-cov report \ - .build/x86_64-apple-macosx/debug/ReducerPackageTests.xctest/Contents/MacOS/ReducerPackageTests \ - --instr-profile .build/x86_64-apple-macosx/debug/codecov/default.profdata \ - --ignore-filename-regex='.*build/checkouts.*' \ - --ignore-filename-regex='Tests/.*' - -code-coverage-details: - xcrun llvm-cov show \ - .build/x86_64-apple-macosx/debug/ReducerPackageTests.xctest/Contents/MacOS/ReducerPackageTests \ - --instr-profile .build/x86_64-apple-macosx/debug/codecov/default.profdata \ - --ignore-filename-regex='.*build/checkouts.*' \ - --ignore-filename-regex='Tests/.*' - -code-coverage-file: - xcrun llvm-cov show \ - .build/x86_64-apple-macosx/debug/ReducerPackageTests.xctest/Contents/MacOS/ReducerPackageTests \ - --instr-profile .build/x86_64-apple-macosx/debug/codecov/default.profdata \ - --ignore-filename-regex='.*build/checkouts.*' \ - --ignore-filename-regex='Tests/.*' > coverage.txt - -code-coverage-upload: - bash <(curl -s https://codecov.io/bash) \ - -X xcodellvm \ - -X gcov \ - -f coverage.txt - -# Lint - -lint-check: - mint run swiftlint lint --strict -lint-autocorrect: - mint run swiftlint autocorrect - -# Sourcery - -sourcery: - mint run sourcery - -# Docc -docc: - xcodebuild docbuild -scheme "Reducer" -sdk macosx12.3 -configuration Debug -destination "platform=macOS" SYMROOT=tmp - cp -R tmp/Debug/Reducer.doccarchive docs/docc/ - mint run docc2html -f docs/docc/Reducer.doccarchive docs/docc/Reducer - rm -rf tmp - -# Jazzy - -jazzy: - bundle exec jazzy --module Reducer --swift-build-tool spm --build-tool-arguments -Xswiftc,-swift-version,-Xswiftc,5 --output docs/api/Reducer - -# Pre-Build - -prebuild: sourcery lint-autocorrect lint-check - -# Help - -help: - @echo Possible tasks - @echo - @echo make set-version TO=1.2.3 - @echo -- sets the SwiftRex version to the given value - @echo -- param1: TO = required, new version number - @echo - @echo make pod-push - @echo -- publishes the pod on CocoaPods repository - @echo - @echo make mint - @echo -- bootstrap mint dependency manager - @echo - @echo make test - @echo -- runs all the unit tests - @echo - @echo make code-coverage-summary - @echo -- shows a code coverage summary - @echo - @echo make code-coverage-details - @echo -- shows a code coverage detailed report - @echo - @echo make code-coverage-file - @echo -- creates a code coverage file to be uploaded to codecov - @echo - @echo make code-coverage-upload - @echo -- upload code coverage file to codecov - @echo - @echo make lint-check - @echo -- validates the code style - @echo - @echo make lint-autocorrect - @echo -- automatic linting for auto-fixable rules - @echo - @echo make sourcery - @echo -- code generation - @echo - @echo make jazzy - @echo -- generates documentation - @echo - @echo make docc - @echo "-- generates DocC documentation" - @echo - @echo make prebuild - @echo -- runs the pre-build phases - @echo diff --git a/Mintfile b/Mintfile deleted file mode 100644 index e925d9e..0000000 --- a/Mintfile +++ /dev/null @@ -1,2 +0,0 @@ -realm/SwiftLint@0.54.0 -DoccZz/docc2html@0.5.3 diff --git a/Package.resolved b/Package.resolved new file mode 100644 index 0000000..261b649 --- /dev/null +++ b/Package.resolved @@ -0,0 +1,24 @@ +{ + "originHash" : "803ac8338fe0c55943c1dbe80216b87723033a79498a9bea118b0c64ced165fe", + "pins" : [ + { + "identity" : "swiftformat", + "kind" : "remoteSourceControl", + "location" : "https://github.com/nicklockwood/SwiftFormat", + "state" : { + "revision" : "d6309f7440889427426143b4a0b100b959d3f3e6", + "version" : "0.54.3" + } + }, + { + "identity" : "swiftlintplugins", + "kind" : "remoteSourceControl", + "location" : "https://github.com/SimplyDanny/SwiftLintPlugins", + "state" : { + "revision" : "6c3d6c32a37224179dc290f21e03d1238f3d963b", + "version" : "0.56.2" + } + } + ], + "version" : 3 +} diff --git a/Package.swift b/Package.swift index cbcba31..71d1b64 100644 --- a/Package.swift +++ b/Package.swift @@ -1,32 +1,28 @@ -// swift-tools-version: 5.9 +// swift-tools-version: 5.10 import PackageDescription -let devModeInXcode = false - let package = Package( name: "Reducer", - platforms: [.macOS(.v10_13), .iOS(.v12), .tvOS(.v12), .watchOS(.v4)], + platforms: [.macOS(.v12), .iOS(.v12), .tvOS(.v12), .watchOS(.v4)], products: [ .library(name: "Reducer", targets: ["Reducer"]) - ].compactMap { $0 }, + ], + dependencies: [ + .package(url: "https://github.com/SimplyDanny/SwiftLintPlugins", from: "0.56.2"), + .package(url: "https://github.com/nicklockwood/SwiftFormat", from: "0.54.0") + ], targets: [ .target( name: "Reducer", - dependencies: [], - plugins: devModeInXcode ? ["SwiftLintXcode"] : [] - ), - .testTarget(name: "ReducerTests", dependencies: ["Reducer"]) - ] + (devModeInXcode ? [ - .binaryTarget( - name: "SwiftLintBinary", - url: "https://github.com/realm/SwiftLint/releases/download/0.54.0/SwiftLintBinary-macos.artifactbundle.zip", - checksum: "963121d6babf2bf5fd66a21ac9297e86d855cbc9d28322790646b88dceca00f1" + plugins: [ + .plugin(name: "SwiftLintBuildToolPlugin", package: "SwiftLintPlugins"), + .plugin(name: "SwiftFormat", package: "SwiftFormat") + ] ), - .plugin( - name: "SwiftLintXcode", - capability: .buildTool(), - dependencies: ["SwiftLintBinary"] + .testTarget( + name: "ReducerTests", + dependencies: ["Reducer"] ) - ] : []), + ], swiftLanguageVersions: [.v5] ) diff --git a/Plugins/SwiftLintXcode/Path+Helpers.swift b/Plugins/SwiftLintXcode/Path+Helpers.swift deleted file mode 100644 index 0698dc6..0000000 --- a/Plugins/SwiftLintXcode/Path+Helpers.swift +++ /dev/null @@ -1,42 +0,0 @@ -import Foundation -import PackagePlugin - -#if os(Linux) -import Glibc -#else -import Darwin -#endif - -extension Path { - /// Scans the receiver, then all of its parents looking for a configuration file with the name ".swiftlint.yml". - /// - /// - returns: Path to the configuration file, or nil if one cannot be found. - func firstConfigurationFileInParentDirectories() -> Path? { - let defaultConfigurationFileName = ".swiftlint.yml" - let proposedDirectory = sequence( - first: self, - next: { path in - guard path.stem.count > 1 else { - // Check we're not at the root of this filesystem, as `removingLastComponent()` - // will continually return the root from itself. - return nil - } - - return path.removingLastComponent() - } - ).first { path in - let potentialConfigurationFile = path.appending(subpath: defaultConfigurationFileName) - return potentialConfigurationFile.isAccessible() - } - return proposedDirectory?.appending(subpath: defaultConfigurationFileName) - } - - /// Safe way to check if the file is accessible from within the current process sandbox. - private func isAccessible() -> Bool { - let result = string.withCString { pointer in - access(pointer, R_OK) - } - - return result == 0 - } -} diff --git a/Plugins/SwiftLintXcode/SwiftLintPlugin.swift b/Plugins/SwiftLintXcode/SwiftLintPlugin.swift deleted file mode 100644 index 892edf0..0000000 --- a/Plugins/SwiftLintXcode/SwiftLintPlugin.swift +++ /dev/null @@ -1,102 +0,0 @@ -import Foundation -import PackagePlugin - -@main -struct SwiftLintPlugin: BuildToolPlugin { - func createBuildCommands(context: PluginContext, target: Target) async throws -> [Command] { - guard let sourceTarget = target as? SourceModuleTarget else { - return [] - } - return createBuildCommands( - inputFiles: sourceTarget.sourceFiles(withSuffix: "swift").map(\.path), - packageDirectory: context.package.directory, - workingDirectory: context.pluginWorkDirectory, - tool: try context.tool(named: "swiftlint") - ) - } - - private func addOptionalArguments( - to arguments: [String], - inputFiles: [Path], - packageDirectory: Path, - workingDirectory: Path - ) -> [String] { - // Determine whether we need to enable cache or not (for Xcode Cloud we don't) - var arguments = arguments - if ProcessInfo.processInfo.environment["CI_XCODE_CLOUD"] == "TRUE" { - arguments.append("--no-cache") - } else { - arguments.append("--cache-path") - arguments.append("\(workingDirectory)") - } - - // Manually look for configuration files, to avoid issues when the plugin does not execute our tool from the - // package source directory. - if let configuration = packageDirectory.firstConfigurationFileInParentDirectories() { - arguments.append(contentsOf: ["--config", "\(configuration.string)"]) - } - arguments += inputFiles.map(\.string) - return arguments - } - - private func createBuildCommands( - inputFiles: [Path], - packageDirectory: Path, - workingDirectory: Path, - tool: PluginContext.Tool - ) -> [Command] { - if inputFiles.isEmpty { - // Don't lint anything if there are no Swift source files in this target - return [] - } - - let differentCommands = [ - [ - "lint", - "--format", - "--quiet", - "--force-exclude" - ], - [ - "lint", - "--quiet", - "--force-exclude" - ] - ] - - // We are not producing output files and this is needed only to not include cache files into bundle - let outputFilesDirectory = workingDirectory.appending("Output") - - return differentCommands.map { arguments in - .prebuildCommand( - displayName: "SwiftLint", - executable: tool.path, - arguments: addOptionalArguments( - to: arguments, - inputFiles: inputFiles, - packageDirectory: packageDirectory, - workingDirectory: workingDirectory - ), - outputFilesDirectory: outputFilesDirectory - ) - } - } -} - -#if canImport(XcodeProjectPlugin) -import XcodeProjectPlugin - -extension SwiftLintPlugin: XcodeBuildToolPlugin { - func createBuildCommands(context: XcodePluginContext, target: XcodeTarget) throws -> [Command] { - let inputFilePaths = target.inputFiles - .filter { $0.type == .source && $0.path.extension == "swift" } - .map(\.path) - return createBuildCommands( - inputFiles: inputFilePaths, - packageDirectory: context.xcodeProject.directory, - workingDirectory: context.pluginWorkDirectory, - tool: try context.tool(named: "swiftlint") - ) - } -} -#endif diff --git a/README.md b/README.md index 43f924f..68e986e 100644 --- a/README.md +++ b/README.md @@ -30,13 +30,13 @@ This pattern, also known as ["Redux"](https://redux.js.org/basics/data-flow), al The ``MiddlewareProtocol`` pipeline can do two things: dispatch outgoing actions and handling incoming actions. But what they can NOT do is changing the app state. Middlewares have read-only access to the up-to-date state of our apps, but when mutations are required we use the ``MutableReduceFunction`` function: ```swift -(ActionType, inout StateType) -> Void +(Action, inout State) -> Void ``` Which has the same semantics (but better performance) than old ``ReduceFunction``: ```swift -(ActionType, StateType) -> StateType +(Action, State) -> State ``` Given an action and the current state (as a mutable inout), it calculates the new state and changes it: diff --git a/Sources/Reducer/Reducer+Compose.swift b/Sources/Reducer/Reducer+Compose.swift index 5251632..3384cb5 100644 --- a/Sources/Reducer/Reducer+Compose.swift +++ b/Sources/Reducer/Reducer+Compose.swift @@ -1,48 +1,12 @@ -extension Reducer { - /** - Composes two or more reducers in series, to be evaluated from the left to the right for each incoming action. - - When composing reducer A with reducer B, when an action X arrives, first it will be forwarded to - reducer A together with the initial state. This reducer may return a slightly (or completely) changed state from - that operation, and this state will then be forwarded to reducer B together with the same action X. If you change - the order, results may vary as you can imagine. Monoids don't necessarily hold the commutative axiom, although - sometimes they do. What they necessarily hold is the associativity axiom, which means that if you compose A and B, - and later C, it's exactly the same as if you compose A to a previously composed B and C: - `.compose(.compose(A, B), C) == .compose(A, .compose(B, C))`. So please don't worry about surrounding your reducers with parenthesis: - ``` - let globalReducer = .compose(firstReducer, secondReducer, thirdReducer, andSoOn) - ``` - - - Parameters: - - first: First reducer `(ActionType, inout StateType) -> Void`, let's call it `f(x)` - - others: Second, Third, nth reducers `(ActionType, inout StateType) -> Void`, let's call it `g(x)` - - Returns: a composed reducer `(ActionType, inout StateType) -> Void` equivalent to `g(f(x))` - */ - public static func compose(_ first: Reducer, _ others: Reducer...) -> Reducer { +public extension Reducer { + static func compose( + _ first: Reducer, + _ others: Reducer... + ) -> Reducer { compose([first] + others) } - /** - Composes reducers in series, to be evaluated in the same order as contained in the array, for each incoming action. - - When composing reducer A with reducer B, when an action X arrives, first it will be forwarded to - reducer A together with the initial state. This reducer may return a slightly (or completely) changed state from - that operation, and this state will then be forwarded to reducer B together with the same action X. If you change - the order, results may vary as you can imagine. Monoids don't necessarily hold the commutative axiom, although - sometimes they do. What they necessarily hold is the associativity axiom, which means that if you compose A and B, - and later C, it's exactly the same as if you compose A to a previously composed B and C: - `.compose(.compose(A, B), C) == .compose(A, .compose(B, C))`. So please don't worry about surrounding your reducers with parenthesis: - ``` - let globalReducer = .compose([firstReducer, secondReducer, thirdReducer, andSoOn]) - ``` - - - Parameters: - - reducers: Array with zero or many reducers `(ActionType, inout StateType) -> Void`, to be evaluated in the same - order as contained in the array. If the array is empty, no operation will happen, which is similar to - the `Reducer.identity` instance. - - Returns: a composed reducer `(ActionType, inout StateType) -> Void` equivalent to `g(f(x))` - */ - public static func compose(_ reducers: [Reducer]) -> Reducer { + static func compose(_ reducers: [Reducer]) -> Reducer { .reduce { action, state in reducers.forEach { $0.reduce(action, &state) } } diff --git a/Sources/Reducer/Reducer+DSL.swift b/Sources/Reducer/Reducer+DSL.swift index 14aef83..51b7ffe 100644 --- a/Sources/Reducer/Reducer+DSL.swift +++ b/Sources/Reducer/Reducer+DSL.swift @@ -1,53 +1,13 @@ import Foundation -/** - DSL Builder for Reducer compose - */ @resultBuilder public enum ReducerBuilder { - /** - DSL Builder for Reducer compose - - Parameter reducers: the reducers to be combined/ - - Returns: the composed reducer that will run all the inner reducers sequentially/ - */ public static func buildBlock(_ reducers: Reducer...) -> Reducer { .compose(reducers) } } -extension Reducer { - /** - Composes two or more reducers in series, to be evaluated from the top to the bottom for each incoming action. - - When composing reducer A with reducer B, when an action X arrives, first it will be forwarded to - reducer A together with the initial state. This reducer may return a slightly (or completely) changed state from - that operation, and this state will then be forwarded to reducer B together with the same action X. If you change - the order, results may vary as you can imagine. Monoids don't necessarily hold the commutative axiom, although - sometimes they do. - - For example you can compose reducers like this: - ``` - Reducer.compose { - Reducer - .login - .lift(action: \.loginAction, state: \.loginState) - - Reducer - .lifecycle - .lift(action: \.lifecycleAction, state: \.lifecycleState) - - Reducer.app - - Reducer.reduce { action, state in - // some inline reducer - } - } - ``` - - - Parameter content: a result builder (DSL) having zero or more reducers to be composed sequentially - - Returns: a composed reducer `(ActionType, inout StateType) -> Void` equivalent to running all the internal - reducers in series - */ - public static func compose(@ReducerBuilder content: () -> Reducer) -> Reducer { +public extension Reducer { + static func compose(@ReducerBuilder content: () -> Reducer) -> Reducer { content() } } diff --git a/Sources/Reducer/Reducer+Identity.swift b/Sources/Reducer/Reducer+Identity.swift index d559f54..c31b511 100644 --- a/Sources/Reducer/Reducer+Identity.swift +++ b/Sources/Reducer/Reducer+Identity.swift @@ -1,26 +1,5 @@ -extension Reducer { - /** - No-op reducer. Composing it with any other reducer will not change anything from the other reducer behaviour, regardless if the identity reducer - is on the left-hand side or the right-hand side or this composition. This is the neutral element in a monoidal composition. - - Therefore: - ``` - .compose( Reducer, .identity ) - == .compose( .identity, Reducer ) - == Reducer - ``` - - This is useful for composition purposes, for example when you call a function `Array.reduce` in an array of Reducers and you need a no-op start: - ``` - [reducer1, reducer2].reduce(.identity) { accumulator, nextReducer in - Reducer.compose(accumulator, nextReducer) - } - // .identity won't have any behaviour and the final composition ".identity >>> reducer1, reducer2" will be as if .identity wasn't there. - ``` - - The implementation of this reducer, as one should expect, simply ignores the action and returns the state unchanged - */ - public static var identity: Reducer { +public extension Reducer { + static var identity: Reducer { .init { _, _ in } } } diff --git a/Sources/Reducer/Reducer+LiftClosure.swift b/Sources/Reducer/Reducer+LiftClosure.swift index 5391d88..42627f7 100644 --- a/Sources/Reducer/Reducer+LiftClosure.swift +++ b/Sources/Reducer/Reducer+LiftClosure.swift @@ -1,82 +1,16 @@ -extension Reducer { - /** - A type-lifting method. The global state of your app is _Whole_, and the `Reducer` handles _Part_, that is a - sub-state. - - Let's suppose you may want to have a `gpsReducer` that knows about the following `struct`: - ``` - struct Location { - let latitude: Double - let longitude: Double - } - ``` - - Let's call it _Part_. Both, this state and its reducer will be part of an external framework, used by dozens of - apps. Internally probably the `Reducer` will receive some known `ActionType` and calculate a new location. On the - main app we have a global state, that we now call _Whole_. - - ``` - struct MyGlobalState { - let title: String? - let listOfItems: [Item] - let currentLocation: Location - } - ``` - - As expected, _Part_ (`Location`) is a property of _Whole_ (`MyGlobalState`). This relationship could be less - direct, for example there could be several levels of properties until you find the _Part_ in the _Whole_, like - `global.firstLevel.secondLevel.currentLocation`, but let's keep it a single-level for this example. - - Because our `Store` understands _Whole_ (`MyGlobalState`) and our `gpsReducer` understands _Part_ (`Location`), we - must `lift` the `Reducer` to the _Whole_ level, by using: - - ``` - let globalStateReducer = gpsReducer.lift( - actionGetter: { $0 }, - stateGetter: { global in global.currentLocation }, - stateSetter: { global, part in global.currentLocation = path } - ) - // where: - // globalStateReducer: Reducer - // ↑ lift - // gpsReducer: Reducer - ``` - - Now this reducer can be used within our `Store` or even composed with others. It also can be used in other apps as - long as we have a way to lift it to the world of _Whole_. - - Same strategy works for the `action`, as you can guess by the `actionGetter` parameter. You can provide a function - that takes a global action (_Whole_) and returns an optional local action (_Part_). It's optional because perhaps - you want to ignore actions that are not relevant for this reducer. - - - Parameters: - - actionGetter: a way to convert a global action into a local action, but it's optional because maybe this - reducer shouldn't care about certain actions. Because actions are usually enums, you can switch - over the enum and in case it's nothing you care about, you simply return nil in the closure. If - you don't want to lift this reducer in terms of `action`, just provide the identity function - `{ $0 }` as input. - - stateGetter: a way to read from a global state and extract only the part that it's relevant for this reducer, - by traversing the tree of the global state until you find the property you want, for example: - `{ $0.currentGame.scoreBoard }` - - stateSetter: a way to write back into the global state once you finished reducing the _Part_, so now you have - a new part that was calculated by this reducer and you want to set it into the global state, also - provided as the first parameter as an `inout` property: - `{ globalState, newScoreBoard in globalState.currentGame.scoreBoard = newScoreBoard }` - - Returns: a `Reducer` that maps actions and states from the original specialised - reducer into a more generic and global reducer, to be used in a larger context. - */ - public func lift( - action: PrismExtract - ) -> Reducer { + public extension Reducer { + func lift( + action: PrismExtract + ) -> Reducer { .reduce { globalAction, globalState in guard let localAction = action.tryToExtract(globalAction) else { return } self.reduce(localAction, &globalState) } } - public func lift( - state: Lens - ) -> Reducer { + func lift( + state: Lens + ) -> Reducer { .reduce { globalAction, globalState in var localState = state.extract(from: globalState) self.reduce(globalAction, &localState) @@ -84,10 +18,10 @@ extension Reducer { } } - public func lift( - action: PrismExtract, - state: Lens - ) -> Reducer { + func lift( + action: PrismExtract, + state: Lens + ) -> Reducer { .reduce { globalAction, globalState in guard let localAction = action.tryToExtract(globalAction) else { return } var localState = state.extract(from: globalState) @@ -96,17 +30,14 @@ extension Reducer { } } - public func lift( - _ lifter: ReducerLift - ) -> Reducer { + func lift( + _ lifter: ReducerLift + ) -> Reducer { lift(action: lifter.action, state: lifter.state) } } public struct ReducerLift { - fileprivate let action: PrismExtract - fileprivate let state: Lens - public init(action: PrismExtract, state: Lens) { self.state = state self.action = action @@ -121,10 +52,13 @@ public struct ReducerLift { state: Lens.compose(global.state, local.state) ) } + + fileprivate let action: PrismExtract + fileprivate let state: Lens } -extension ReducerLift where GlobalAction == LocalAction, GlobalState == LocalState { - public static var identity: ReducerLift { +public extension ReducerLift where GlobalAction == LocalAction, GlobalState == LocalState { + static var identity: ReducerLift { .init(action: .identity, state: .identity) } } @@ -137,12 +71,12 @@ public struct PrismExtract { } } -extension PrismExtract { - public static func keyPath(_ keyPath: KeyPath) -> Self { +public extension PrismExtract { + static func keyPath(_ keyPath: KeyPath) -> Self { .tryingToExtract { $0[keyPath: keyPath] } } - public static func compose( + static func compose( _ moreAbstract: PrismExtract, _ moreSpecific: PrismExtract ) -> PrismExtract { @@ -152,8 +86,8 @@ extension PrismExtract { } } -extension PrismExtract where Enum == Case { - public static var identity: Self { +public extension PrismExtract where Enum == Case { + static var identity: Self { .tryingToExtract { $0 } } } @@ -166,8 +100,8 @@ public struct PrismEmbed { } } -extension PrismEmbed { - public static func compose( +public extension PrismEmbed { + static func compose( _ moreAbstract: PrismEmbed, _ moreSpecific: PrismEmbed ) -> PrismEmbed { @@ -177,16 +111,13 @@ extension PrismEmbed { } } -extension PrismEmbed where EnumCase == AssociatedValue { - public static var identity: Self { +public extension PrismEmbed where EnumCase == AssociatedValue { + static var identity: Self { .embedding { $0 } } } public struct Prism { - private let _extract: PrismExtract - private let _embed: PrismEmbed - public static func on( extracting path: @escaping (Enum) -> Case?, embedding associatedValue: @escaping (Case) -> Enum @@ -207,14 +138,6 @@ public struct Prism { ) } - public func embed(associatedValue: Case) -> Enum { - _embed.embed(associatedValue) - } - - public func tryToExtract(from `enum`: Enum) -> Case? { - _extract.tryToExtract(`enum`) - } - public static func compose( _ moreAbstract: Prism, _ moreSpecific: Prism @@ -224,10 +147,21 @@ public struct Prism { embedding: PrismEmbed.compose(moreAbstract._embed, moreSpecific._embed).embed ) } + + public func embed(associatedValue: Case) -> Enum { + _embed.embed(associatedValue) + } + + public func tryToExtract(from enum: Enum) -> Case? { + _extract.tryToExtract(`enum`) + } + + private let _extract: PrismExtract + private let _embed: PrismEmbed } -extension Prism where Enum == Case { - public static var identity: Prism { +public extension Prism where Enum == Case { + static var identity: Prism { .on( extracting: PrismExtract.identity.tryToExtract, embedding: PrismEmbed.identity.embed @@ -243,12 +177,12 @@ public struct LensGet { } } -extension LensGet { - public static func keyPath(_ keyPath: KeyPath) -> LensGet { +public extension LensGet { + static func keyPath(_ keyPath: KeyPath) -> LensGet { .extracting { $0[keyPath: keyPath] } } - public static func compose( + static func compose( _ moreAbstract: LensGet, _ moreSpecific: LensGet ) -> LensGet { @@ -258,8 +192,8 @@ extension LensGet { } } -extension LensGet where Struct == Property { - public static var identity: Self { +public extension LensGet where Struct == Property { + static var identity: Self { .extracting { $0 } } } @@ -272,16 +206,13 @@ public struct LensSet { } } -extension LensSet where Struct == Property { - public static var identity: Self { +public extension LensSet where Struct == Property { + static var identity: Self { .setting { $0 = $1 } } } public struct Lens { - private let _extract: LensGet - private let _set: LensSet - public static func on( extracting path: @escaping (Struct) -> Property, setting property: @escaping (inout Struct, Property) -> Void @@ -306,14 +237,6 @@ public struct Lens { .on(extractingKeyPath: keyPath, setting: { $0[keyPath: keyPath] = $1 }) } - public func set(struct: inout Struct, with property: Property) { - _set.set(&`struct`, property) - } - - public func extract(from `struct`: Struct) -> Property { - _extract.extract(`struct`) - } - public static func compose( _ moreAbstract: Lens, _ moreSpecific: Lens @@ -327,10 +250,22 @@ public struct Lens { } ) } + + public func set(struct: inout Struct, with property: Property) { + _set.set(&`struct`, property) + } + + public func extract(from struct: Struct) -> Property { + _extract.extract(`struct`) + } + + private let _extract: LensGet + + private let _set: LensSet } -extension Lens where Struct == Property { - public static var identity: Lens { +public extension Lens where Struct == Property { + static var identity: Lens { .on(extracting: LensGet.identity.extract, setting: LensSet.identity.set) } } diff --git a/Sources/Reducer/Reducer+LiftToCollection.swift b/Sources/Reducer/Reducer+LiftToCollection.swift index e4fac13..d110172 100644 --- a/Sources/Reducer/Reducer+LiftToCollection.swift +++ b/Sources/Reducer/Reducer+LiftToCollection.swift @@ -1,82 +1,11 @@ import Foundation @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) -extension Reducer where StateType: Identifiable { - /** - A type-lifting method for collections. The global state of your app is _Whole_, and the `Reducer` handles an element - that is inside of a collection, which itself is sub-state of the global. Let's call this single element _Part_. - - Let's suppose you may want to have a `gpsReducer` that knows about the following `struct`: - ``` - struct Location { - let latitude: Double - let longitude: Double - } - ``` - - Let's call it _Part_. Both, this state and its reducer will be part of an external framework, used by dozens of - apps. Internally probably the `Reducer` will receive some known `ActionType` and calculate a new location. On the - main app we have a global state, that we now call _Whole_. - - ``` - struct MyGlobalState { - let title: String? - let knownLocations: [Location] - } - ``` - - As expected, _Part_ (`Location`) is an element of the array `knownLocations`, which is property of _Whole_ - (`MyGlobalState`). This relationship could be less direct, for example there could be several levels of properties - until you find the _Part_ in the _Whole_, like `global.firstLevel.secondLevel.knownLocations`, but let's keep it a - single-level for this example. - - To resolve this single element, we not only have to find the path to the array, but we have to find the element - inside of the array. There are three methods for doing so: - 1) the element is `Identifiable` (iOS 13 or later) - 2) the element has a `Hashable` property that makes it unique, so we can find it in the array using this identifier - 3) using the index of the element in the array - - Because our `Store` understands _Whole_ (`MyGlobalState`) and our `gpsReducer` understands _Part_ (`Location`), we - must `liftToCollection` the `Reducer` to the _Whole_ level, by using: - - ``` - let globalStateReducer = gpsReducer.liftToCollection( - actionMap: \.actionKeyPathToATuple, - state: \.knownLocations - ) - // where: - // globalStateReducer: Reducer - // ↑ lift - // gpsReducer: Reducer - ``` - - Different from simple `lift` to scalar, this one requires necessarily that you lift the action together with the state. - That's because your action has to contain the ID or Index of the element we will modify. The `actionMap` KeyPath has to - give us a tuple of either: - - `(id, actionToSingleElement)` - - `(index, actionToSingleElement)` - - The id or index is gonna be how we will search the array for the desired element, and only if we find it, we will run - the `gpsReducer` for that specific element, using the action that has to do with single elements only. - - As `Location` doesn't have an `id` property we will have to either use index, implement `Identifiable` protocol or - give another unique and `Hashable` property. - - Now this reducer can be used within our `Store` or even composed with others. It also can be used in other apps as - long as we have a way to lift it to the world of _Whole_. - - - Parameters: - - actionMap: a read-only key-path from global action into a tuple: (id, local action), but it's optional because - maybe this reducer shouldn't care about certain actions. - - stateCollection: a writable key-path from global state that traverses into a local state, by extracting only - the part that it's relevant for this reducer. This part needs to be a `MutableCollection`. - - Returns: a `Reducer` that maps actions and states from the original local reducer, which - is specialised in a single Element, into a more generic and global reducer, to be used in a larger context. - */ - public func liftToCollection( - actionForElement: PrismExtract, +public extension Reducer where State: Identifiable { + func liftToCollection( + actionForElement: PrismExtract, stateToCollection: Lens - ) -> Reducer where CollectionState.Element == StateType { + ) -> Reducer where CollectionState.Element == State { Reducer.reduce { (action: GlobalAction, state: inout GlobalState) in var collection = stateToCollection.extract(from: state) @@ -92,84 +21,12 @@ extension Reducer where StateType: Identifiable { } } -extension Reducer { - /** - A type-lifting method for collections. The global state of your app is _Whole_, and the `Reducer` handles an element - that is inside of a collection, which itself is sub-state of the global. Let's call this single element _Part_. - - Let's suppose you may want to have a `gpsReducer` that knows about the following `struct`: - ``` - struct Location { - let latitude: Double - let longitude: Double - } - ``` - - Let's call it _Part_. Both, this state and its reducer will be part of an external framework, used by dozens of - apps. Internally probably the `Reducer` will receive some known `ActionType` and calculate a new location. On the - main app we have a global state, that we now call _Whole_. - - ``` - struct MyGlobalState { - let title: String? - let knownLocations: [Location] - } - ``` - - As expected, _Part_ (`Location`) is an element of the array `knownLocations`, which is property of _Whole_ - (`MyGlobalState`). This relationship could be less direct, for example there could be several levels of properties - until you find the _Part_ in the _Whole_, like `global.firstLevel.secondLevel.knownLocations`, but let's keep it a - single-level for this example. - - To resolve this single element, we not only have to find the path to the array, but we have to find the element - inside of the array. There are three methods for doing so: - 1) the element is `Identifiable` (iOS 13 or later) - 2) the element has a `Hashable` property that makes it unique, so we can find it in the array using this identifier - 3) using the index of the element in the array - - Because our `Store` understands _Whole_ (`MyGlobalState`) and our `gpsReducer` understands _Part_ (`Location`), we - must `liftToCollection` the `Reducer` to the _Whole_ level, by using: - - ``` - let globalStateReducer = gpsReducer.liftToCollection( - actionMap: \.actionKeyPathToATuple, - state: \.knownLocations - ) - // where: - // globalStateReducer: Reducer - // ↑ lift - // gpsReducer: Reducer - ``` - - Different from simple `lift` to scalar, this one requires necessarily that you lift the action together with the state. - That's because your action has to contain the ID or Index of the element we will modify. The `actionMap` KeyPath has to - give us a tuple of either: - - `(id, actionToSingleElement)` - - `(index, actionToSingleElement)` - - The id or index is gonna be how we will search the array for the desired element, and only if we find it, we will run - the `gpsReducer` for that specific element, using the action that has to do with single elements only. - - As `Location` doesn't have an `id` property we will have to either use index, implement `Identifiable` protocol or - give another unique and `Hashable` property. - - Now this reducer can be used within our `Store` or even composed with others. It also can be used in other apps as - long as we have a way to lift it to the world of _Whole_. - - - Parameters: - - actionMap: a read-only key-path from global action into a tuple: (id, local action), but it's optional because - maybe this reducer shouldn't care about certain actions. - - stateCollection: a writable key-path from global state that traverses into a local state, by extracting only - the part that it's relevant for this reducer. This part needs to be a `MutableCollection`. - - identifier: a key-path to define who is the unique-identifier of the Element (it has to be `Hashable`) - - Returns: a `Reducer` that maps actions and states from the original local reducer, which - is specialised in a single Element, into a more generic and global reducer, to be used in a larger context. - */ - public func liftToCollection( - actionForElement: PrismExtract, +public extension Reducer { + func liftToCollection( + actionForElement: PrismExtract, stateToCollection: Lens, - identifier: KeyPath - ) -> Reducer where CollectionState.Element == StateType { + identifier: KeyPath + ) -> Reducer where CollectionState.Element == State { Reducer.reduce { action, state in var collection = stateToCollection.extract(from: state) @@ -185,82 +42,11 @@ extension Reducer { } } -extension Reducer { - /** - A type-lifting method for collections. The global state of your app is _Whole_, and the `Reducer` handles an element - that is inside of a collection, which itself is sub-state of the global. Let's call this single element _Part_. - - Let's suppose you may want to have a `gpsReducer` that knows about the following `struct`: - ``` - struct Location { - let latitude: Double - let longitude: Double - } - ``` - - Let's call it _Part_. Both, this state and its reducer will be part of an external framework, used by dozens of - apps. Internally probably the `Reducer` will receive some known `ActionType` and calculate a new location. On the - main app we have a global state, that we now call _Whole_. - - ``` - struct MyGlobalState { - let title: String? - let knownLocations: [Location] - } - ``` - - As expected, _Part_ (`Location`) is an element of the array `knownLocations`, which is property of _Whole_ - (`MyGlobalState`). This relationship could be less direct, for example there could be several levels of properties - until you find the _Part_ in the _Whole_, like `global.firstLevel.secondLevel.knownLocations`, but let's keep it a - single-level for this example. - - To resolve this single element, we not only have to find the path to the array, but we have to find the element - inside of the array. There are three methods for doing so: - 1) the element is `Identifiable` (iOS 13 or later) - 2) the element has a `Hashable` property that makes it unique, so we can find it in the array using this identifier - 3) using the index of the element in the array - - Because our `Store` understands _Whole_ (`MyGlobalState`) and our `gpsReducer` understands _Part_ (`Location`), we - must `liftToCollection` the `Reducer` to the _Whole_ level, by using: - - ``` - let globalStateReducer = gpsReducer.liftToCollection( - actionMap: \.actionKeyPathToATuple, - state: \.knownLocations - ) - // where: - // globalStateReducer: Reducer - // ↑ lift - // gpsReducer: Reducer - ``` - - Different from simple `lift` to scalar, this one requires necessarily that you lift the action together with the state. - That's because your action has to contain the ID or Index of the element we will modify. The `actionMap` KeyPath has to - give us a tuple of either: - - `(id, actionToSingleElement)` - - `(index, actionToSingleElement)` - - The id or index is gonna be how we will search the array for the desired element, and only if we find it, we will run - the `gpsReducer` for that specific element, using the action that has to do with single elements only. - - As `Location` doesn't have an `id` property we will have to either use index, implement `Identifiable` protocol or - give another unique and `Hashable` property. - - Now this reducer can be used within our `Store` or even composed with others. It also can be used in other apps as - long as we have a way to lift it to the world of _Whole_. - - - Parameters: - - actionMap: a read-only key-path from global action into a tuple: (index, local action), but it's optional because - maybe this reducer shouldn't care about certain actions. - - stateCollection: a writable key-path from global state that traverses into a local state, by extracting only - the part that it's relevant for this reducer. This part needs to be a `MutableCollection`. - - Returns: a `Reducer` that maps actions and states from the original local reducer, which - is specialised in a single Element, into a more generic and global reducer, to be used in a larger context. - */ - public func liftToCollection( - actionForElement: PrismExtract, +public extension Reducer { + func liftToCollection( + actionForElement: PrismExtract, stateToCollection: Lens - ) -> Reducer where CollectionState.Element == StateType { + ) -> Reducer where CollectionState.Element == State { Reducer.reduce { action, state in var collection = stateToCollection.extract(from: state) diff --git a/Sources/Reducer/Reducer.swift b/Sources/Reducer/Reducer.swift index 922ae4a..7e04f8c 100644 --- a/Sources/Reducer/Reducer.swift +++ b/Sources/Reducer/Reducer.swift @@ -1,60 +1,11 @@ -/** - An entity that calculates the new state when given current state and an incoming action `(Action, inout State) -> Void`. - - Create it using the following code: - ``` - let counterReducer = Reducer.reduce { action, state in - switch action { - case .increment: - state.counter += 1 - case .decrement: - state.counter -= 1 - case .reset: - state.counter = 0 - state.lastError = "" - case .gotError(let message): - state.lastError = message - case .print: - break - } - } - ``` +public struct Reducer { + init(reduce: @escaping (Action, inout State) -> Void) { + self.reduce = reduce + } - An app triggers several actions over time, either coming from user input (button tap, scroll, pinch gesture), from sensors (CoreLocation, NFC, - HealthKit), communication protocols (CoreBluetooth, networking, WebSocket), databases (CoreData, Realm), timers and many more. - An app also starts with an initial state, right after its cold launch. - For each action that arrives, the state can be modified, and this is exactly what a `Reducer` does: folds all actions that arrived since the app - launch, plus the initial state, into the current state. One at the time. - The shape of a `Reducer` could be represented as `(Action, State) -> State`, or given the incoming action and the latest known state, calculate the - new state. - For the sake of performance, and keeping the same semantics, the SwiftRex `Reducer` is represented as `(Action, inout State) -> Void`, avoiding - unnecessary copies and allowing performance tuning for arrays or other big collections. - A `Reducer` can focus in a small part, and be composed with other reducers. The order of this composition matters, because the state will be modified - in the order as the reducers were composed, but you should avoid two reducers changing the same domain. If you can't avoid, mind the order. - A `Reducer` can also focus in a subset of your full AppAction and AppState, and be "lifted" from the subset to the whole, for example it's focused on - LoginAction and LoginState, then lifted to the whole AppAction and AppState by providing the KeyPath where the subset LoginAction is in the - AppAction, and where the subset LoginState is in the AppState. - */ -public struct Reducer { - /** - Execute the wrapped reduce function. You must provide the parameters `action: ActionType` (the action to be - evaluated during the reducing process) and an `inout` version of the latest `state: StateType`, (the current - state in your single source-of-truth). - State will be mutated in place (`inout`) and finish with the calculated new state. - */ - public let reduce: (ActionType, inout StateType) -> Void + public let reduce: (Action, inout State) -> Void - /** - Reducer initialiser takes only the underlying function `(ActionType, inout StateType) -> Void` that is the reducer - function itself. - - Parameters: - - reduce: a pure function that calculates the new state from an action and the current state. - */ - public static func reduce(_ reduce: @escaping (ActionType, inout StateType) -> Void) -> Reducer { + public static func reduce(_ reduce: @escaping (Action, inout State) -> Void) -> Reducer { Reducer(reduce: reduce) } - - init(reduce: @escaping (ActionType, inout StateType) -> Void) { - self.reduce = reduce - } } diff --git a/Tests/ReducerTests/Mocks.swift b/Tests/ReducerTests/Mocks.swift index 75391a9..2c84bc8 100644 --- a/Tests/ReducerTests/Mocks.swift +++ b/Tests/ReducerTests/Mocks.swift @@ -1,18 +1,18 @@ import Foundation import Reducer -struct ActionScopedById: Equatable { +struct ActionScopedById: Equatable { let id: Int - let action: ActionType + let action: Action - var tuple: (id: Int, action: ActionType) { (id: id, action: action) } + var tuple: (id: Int, action: Action) { (id: id, action: action) } } -struct ActionScopedByIndex: Equatable { +struct ActionScopedByIndex: Equatable { let index: Int - let action: ActionType + let action: Action - var tuple: (index: Int, action: ActionType) { (index: index, action: action) } + var tuple: (index: Int, action: Action) { (index: index, action: action) } } enum AppAction: Equatable { @@ -69,7 +69,7 @@ enum AppAction: Equatable { return nil } set { - guard case .scoped = self, let newValue = newValue else { return } + guard case .scoped = self, let newValue else { return } self = .scoped(newValue) } } @@ -102,13 +102,13 @@ struct TestState: Equatable { } struct AppState: Equatable { - let testState: TestState - var list: [Item] - struct Item: Equatable, Identifiable { let id: Int var name: String } + + let testState: TestState + var list: [Item] } let createNameReducer: () -> Reducer = { @@ -135,14 +135,15 @@ let createReducerMock: () -> (Reducer, ReducerMock { +class ReducerMock { // MARK: - reduce var reduceCallsCount = 0 + var reduceReceivedArguments: (action: Action, currentState: State)? + var reduceReturnValue: State! + var reduceClosure: ((Action, State) -> State)? + var reduceCalled: Bool { reduceCallsCount > 0 } - var reduceReceivedArguments: (action: ActionType, currentState: StateType)? - var reduceReturnValue: StateType! - var reduceClosure: ((ActionType, StateType) -> StateType)? } diff --git a/Tests/ReducerTests/ReducerTests.swift b/Tests/ReducerTests/ReducerTests.swift index 883d1bd..958ac36 100644 --- a/Tests/ReducerTests/ReducerTests.swift +++ b/Tests/ReducerTests/ReducerTests.swift @@ -165,7 +165,7 @@ class ReducerTests: XCTestCase { global.name = string } ) - ) + ) var reduced = original liftedReducer.reduce(.bar(.charlie), &reduced) @@ -190,7 +190,7 @@ class ReducerTests: XCTestCase { global.name = string } ) - ) + ) var reduced = original liftedReducer.reduce(.foo, &reduced) diff --git a/codecov.yml b/codecov.yml deleted file mode 100644 index 67e2ae7..0000000 --- a/codecov.yml +++ /dev/null @@ -1,14 +0,0 @@ -ignore: - - "Tests/**/*" - - ".build/checkouts/**/*" - -fixes: - - "/Users/travis/build/::" - -coverage: - status: - project: - default: - target: auto - threshold: 10% - base: auto \ No newline at end of file diff --git a/docs/api/Reducer/Enums.html b/docs/api/Reducer/Enums.html deleted file mode 100644 index 26e7fc8..0000000 --- a/docs/api/Reducer/Enums.html +++ /dev/null @@ -1,106 +0,0 @@ - - - - Enumerations Reference - - - - - - - - - - - - - -
-
-

Reducer 0.9.0 Docs (100% documented)

-
-
- -
-
-
-
-
- -
-
- -
-
-
-

Enumerations

-

The following enumerations are available globally.

- -
-
-
-
    -
  • -
    - - - - ReducerBuilder - -
    -
    -
    -
    -
    -
    -

    DSL Builder for Reducer compose

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    @resultBuilder
    -public enum ReducerBuilder
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - diff --git a/docs/api/Reducer/Enums/ReducerBuilder.html b/docs/api/Reducer/Enums/ReducerBuilder.html deleted file mode 100644 index ed71222..0000000 --- a/docs/api/Reducer/Enums/ReducerBuilder.html +++ /dev/null @@ -1,135 +0,0 @@ - - - - ReducerBuilder Enumeration Reference - - - - - - - - - - - - - -
-
-

Reducer 0.9.0 Docs (100% documented)

-
-
- -
-
-
-
-
- -
-
- -
-
-
-

ReducerBuilder

-
-
- -
@resultBuilder
-public enum ReducerBuilder
- -
-
-

DSL Builder for Reducer compose

- -
-
-
-
    -
  • -
    - - - - buildBlock(_:) - -
    -
    -
    -
    -
    -
    -

    DSL Builder for Reducer compose

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func buildBlock<Action, State>(_ reducers: Reducer<Action, State>...) -> Reducer<Action, State>
    - -
    -
    -
    -

    Parameters

    - - - - - - - -
    - - reducers - - -
    -

    the reducers to be combined/

    -
    -
    -
    -
    -

    Return Value

    -

    the composed reducer that will run all the inner reducers sequentially/

    -
    -
    -
    -
  • -
-
-
-
- -
-
- - diff --git a/docs/api/Reducer/Structs.html b/docs/api/Reducer/Structs.html deleted file mode 100644 index f4e927b..0000000 --- a/docs/api/Reducer/Structs.html +++ /dev/null @@ -1,120 +0,0 @@ - - - - Structures Reference - - - - - - - - - - - - - -
-
-

Reducer 0.9.0 Docs (100% documented)

-
-
- -
-
-
-
-
- -
-
- -
-
-
-

Structures

-

The following structures are available globally.

- -
-
-
-
    -
  • -
    - - - - Reducer - -
    -
    -
    -
    -
    -
    -

    An entity that calculates the new state when given current state and an incoming action (Action, inout State) -> Void.

    - -

    An app triggers several actions over time, either coming from user input (button tap, scroll, pinch gesture), from sensors (CoreLocation, NFC, -HealthKit), communication protocols (CoreBluetooth, networking, WebSocket), databases (CoreData, Realm), timers and many more. -An app also starts with an initial state, right after its cold launch. -For each action that arrives, the state can be modified, and this is exactly what a Reducer does: folds all actions that arrived since the app -launch, plus the initial state, into the current state. One at the time. -The shape of a Reducer could be represented as (Action, State) -> State, or given the incoming action and the latest known state, calculate the -new state. -For the sake of performance, and keeping the same semantics, the SwiftRex Reducer is represented as (Action, inout State) -> Void, avoiding -unnecessary copies and allowing performance tuning for arrays or other big collections. -A Reducer can focus in a small part, and be composed with other reducers. The order of this composition matters, because the state will be modified -in the order as the reducers were composed, but you should avoid two reducers changing the same domain. If you can’t avoid, mind the order. -A Reducer can also focus in a subset of your full AppAction and AppState, and be “lifted” from the subset to the whole, for example it’s focused on -LoginAction and LoginState, then lifted to the whole AppAction and AppState by providing the KeyPath where the subset LoginAction is in the -AppAction, and where the subset LoginState is in the AppState.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct Reducer<ActionType, StateType>
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - diff --git a/docs/api/Reducer/Structs/Reducer.html b/docs/api/Reducer/Structs/Reducer.html deleted file mode 100644 index 2e7d76f..0000000 --- a/docs/api/Reducer/Structs/Reducer.html +++ /dev/null @@ -1,1205 +0,0 @@ - - - - Reducer Structure Reference - - - - - - - - - - - - - -
-
-

Reducer 0.9.0 Docs (100% documented)

-
-
- -
-
-
-
-
- -
-
- -
-
-
-

Reducer

-
-
- -
public struct Reducer<ActionType, StateType>
- -
-
-

An entity that calculates the new state when given current state and an incoming action (Action, inout State) -> Void.

- -

An app triggers several actions over time, either coming from user input (button tap, scroll, pinch gesture), from sensors (CoreLocation, NFC, -HealthKit), communication protocols (CoreBluetooth, networking, WebSocket), databases (CoreData, Realm), timers and many more. -An app also starts with an initial state, right after its cold launch. -For each action that arrives, the state can be modified, and this is exactly what a Reducer does: folds all actions that arrived since the app -launch, plus the initial state, into the current state. One at the time. -The shape of a Reducer could be represented as (Action, State) -> State, or given the incoming action and the latest known state, calculate the -new state. -For the sake of performance, and keeping the same semantics, the SwiftRex Reducer is represented as (Action, inout State) -> Void, avoiding -unnecessary copies and allowing performance tuning for arrays or other big collections. -A Reducer can focus in a small part, and be composed with other reducers. The order of this composition matters, because the state will be modified -in the order as the reducers were composed, but you should avoid two reducers changing the same domain. If you can’t avoid, mind the order. -A Reducer can also focus in a subset of your full AppAction and AppState, and be “lifted” from the subset to the whole, for example it’s focused on -LoginAction and LoginState, then lifted to the whole AppAction and AppState by providing the KeyPath where the subset LoginAction is in the -AppAction, and where the subset LoginState is in the AppState.

- -
-
-
-
    -
  • -
    - - - - reduce - -
    -
    -
    -
    -
    -
    -

    Execute the wrapped reduce function. You must provide the parameters action: ActionType (the action to be -evaluated during the reducing process) and an inout version of the latest state: StateType, (the current -state in your single source-of-truth). -State will be mutated in place (inout) and finish with the calculated new state.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let reduce: (ActionType, inout StateType) -> Void
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - reduce(_:) - -
    -
    -
    -
    -
    -
    -

    Reducer initialiser takes only the underlying function (ActionType, inout StateType) -> Void that is the reducer -function itself.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func reduce(_ reduce: @escaping (ActionType, inout StateType) -> Void) -> Reducer
    - -
    -
    -
    -

    Parameters

    - - - - - - - -
    - - reduce - - -
    -

    a pure function that calculates the new state from an action and the current state.

    -
    -
    -
    -
    -
    -
  • -
  • -
    - - - - compose(_:_:) - -
    -
    -
    -
    -
    -
    -

    Composes two or more reducers in series, to be evaluated from the left to the right for each incoming action.

    - -

    When composing reducer A with reducer B, when an action X arrives, first it will be forwarded to -reducer A together with the initial state. This reducer may return a slightly (or completely) changed state from -that operation, and this state will then be forwarded to reducer B together with the same action X. If you change -the order, results may vary as you can imagine. Monoids don’t necessarily hold the commutative axiom, although -sometimes they do. What they necessarily hold is the associativity axiom, which means that if you compose A and B, -and later C, it’s exactly the same as if you compose A to a previously composed B and C: -.compose(.compose(A, B), C) == .compose(A, .compose(B, C)). So please don’t worry about surrounding your reducers with parenthesis:

    -
    let globalReducer = .compose(firstReducer, secondReducer, thirdReducer, andSoOn)
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func compose(_ first: Reducer, _ others: Reducer...) -> Reducer
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - -
    - - first - - -
    -

    First reducer (ActionType, inout StateType) -> Void, let’s call it f(x)

    -
    -
    - - others - - -
    -

    Second, Third, nth reducers (ActionType, inout StateType) -> Void, let’s call it g(x)

    -
    -
    -
    -
    -

    Return Value

    -

    a composed reducer (ActionType, inout StateType) -> Void equivalent to g(f(x))

    -
    -
    -
    -
  • -
  • -
    - - - - compose(content:) - -
    -
    -
    -
    -
    -
    -

    Composes two or more reducers in series, to be evaluated from the top to the bottom for each incoming action.

    - -

    When composing reducer A with reducer B, when an action X arrives, first it will be forwarded to -reducer A together with the initial state. This reducer may return a slightly (or completely) changed state from -that operation, and this state will then be forwarded to reducer B together with the same action X. If you change -the order, results may vary as you can imagine. Monoids don’t necessarily hold the commutative axiom, although -sometimes they do.

    - -

    For example you can compose reducers like this:

    -
    Reducer.compose {
    -    Reducer
    -        .login
    -        .lift(action: \.loginAction, state: \.loginState)
    -
    -    Reducer
    -        .lifecycle
    -        .lift(action: \.lifecycleAction, state: \.lifecycleState)
    -
    -    Reducer.app
    -
    -    Reducer.reduce { action, state in
    -        // some inline reducer
    -    }
    -}
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func compose(@ReducerBuilder content: () -> Reducer) -> Reducer
    - -
    -
    -
    -

    Parameters

    - - - - - - - -
    - - content - - -
    -

    a result builder (DSL) having zero or more reducers to be composed sequentially

    -
    -
    -
    -
    -

    Return Value

    -

    a composed reducer (ActionType, inout StateType) -> Void equivalent to running all the internal - reducers in series

    -
    -
    -
    -
  • -
  • -
    - - - - identity - -
    -
    -
    -
    -
    -
    -

    No-op reducer. Composing it with any other reducer will not change anything from the other reducer behaviour, regardless if the identity reducer -is on the left-hand side or the right-hand side or this composition. This is the neutral element in a monoidal composition.

    - -

    Therefore:

    -
       .compose( Reducer<ActionType, StateType>, .identity )
    -== .compose( .identity, Reducer<ActionType, StateType> )
    -== Reducer<ActionType, StateType>
    -
    - -

    This is useful for composition purposes, for example when you call a function Array.reduce in an array of Reducers and you need a no-op start:

    -
    [reducer1, reducer2].reduce(.identity) { accumulator, nextReducer in
    -   Reducer.compose(accumulator, nextReducer)
    -}
    -// .identity won't have any behaviour and the final composition ".identity >>> reducer1, reducer2" will be as if .identity wasn't there.
    -
    - -

    The implementation of this reducer, as one should expect, simply ignores the action and returns the state unchanged

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static var identity: Reducer<ActionType, StateType> { get }
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    A type-lifting method. The global state of your app is Whole, and the Reducer handles Part, that is a -sub-state.

    - -

    Let’s suppose you may want to have a gpsReducer that knows about the following struct:

    -
    struct Location {
    -    let latitude: Double
    -    let longitude: Double
    -}
    -
    - -

    Let’s call it Part. Both, this state and its reducer will be part of an external framework, used by dozens of -apps. Internally probably the Reducer will receive some known ActionType and calculate a new location. On the -main app we have a global state, that we now call Whole.

    -
    struct MyGlobalState {
    -    let title: String?
    -    let listOfItems: [Item]
    -    let currentLocation: Location
    -}
    -
    - -

    As expected, Part (Location) is a property of Whole (MyGlobalState). This relationship could be less -direct, for example there could be several levels of properties until you find the Part in the Whole, like -global.firstLevel.secondLevel.currentLocation, but let’s keep it a single-level for this example.

    - -

    Because our Store understands Whole (MyGlobalState) and our gpsReducer understands Part (Location), we -must lift the Reducer to the Whole level, by using:

    -
    let globalStateReducer = gpsReducer.lift(
    -    actionGetter: { $0 },
    -    stateGetter: { global in global.currentLocation },
    -    stateSetter: { global, part in global.currentLocation = path }
    -)
    -// where:
    -//   globalStateReducer: Reducer<MyAction, MyGlobalState>
    -//                                             ↑ lift
    -//           gpsReducer: Reducer<MyAction, Location>
    -
    - -

    Now this reducer can be used within our Store or even composed with others. It also can be used in other apps as -long as we have a way to lift it to the world of Whole.

    - -

    Same strategy works for the action, as you can guess by the actionGetter parameter. You can provide a function -that takes a global action (Whole) and returns an optional local action (Part). It’s optional because perhaps -you want to ignore actions that are not relevant for this reducer.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func lift<GlobalActionType, GlobalStateType>(
    -    actionGetter: @escaping (GlobalActionType) -> ActionType?,
    -    stateGetter: @escaping (GlobalStateType) -> StateType,
    -    stateSetter: @escaping (inout GlobalStateType, StateType) -> Void)
    --> Reducer<GlobalActionType, GlobalStateType>
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - - - - - -
    - - actionGetter - - -
    -

    a way to convert a global action into a local action, but it’s optional because maybe this - reducer shouldn’t care about certain actions. Because actions are usually enums, you can switch - over the enum and in case it’s nothing you care about, you simply return nil in the closure. If - you don’t want to lift this reducer in terms of action, just provide the identity function - { $0 } as input.

    -
    -
    - - stateGetter - - -
    -

    a way to read from a global state and extract only the part that it’s relevant for this reducer, - by traversing the tree of the global state until you find the property you want, for example: - { $0.currentGame.scoreBoard }

    -
    -
    - - stateSetter - - -
    -

    a way to write back into the global state once you finished reducing the Part, so now you have - a new part that was calculated by this reducer and you want to set it into the global state, also - provided as the first parameter as an inout property: - { globalState, newScoreBoard in globalState.currentGame.scoreBoard = newScoreBoard }

    -
    -
    -
    -
    -

    Return Value

    -

    a Reducer<GlobalAction, GlobalState> that maps actions and states from the original specialised - reducer into a more generic and global reducer, to be used in a larger context.

    -
    -
    -
    -
  • -
  • -
    - - - - lift(action:state:) - -
    -
    -
    -
    -
    -
    -

    A type-lifting method. The global state of your app is Whole, and the Reducer handles Part, that is a -sub-state.

    - -

    Let’s suppose you may want to have a gpsReducer that knows about the following struct:

    -
    struct Location {
    -    let latitude: Double
    -    let longitude: Double
    -}
    -
    - -

    Let’s call it Part. Both, this state and its reducer will be part of an external framework, used by dozens of -apps. Internally probably the Reducer will receive some known ActionType and calculate a new location. On the -main app we have a global state, that we now call Whole.

    -
    struct MyGlobalState {
    -    let title: String?
    -    let listOfItems: [Item]
    -    let currentLocation: Location
    -}
    -
    - -

    As expected, Part (Location) is a property of Whole (MyGlobalState). This relationship could be less -direct, for example there could be several levels of properties until you find the Part in the Whole, like -global.firstLevel.secondLevel.currentLocation, but let’s keep it a single-level for this example.

    - -

    Because our Store understands Whole (MyGlobalState) and our gpsReducer understands Part (Location), we -must lift the Reducer to the Whole level, by using:

    -
    let globalStateReducer = gpsReducer.lift(
    -    action: \.self,
    -    state: \.currentLocation
    -)
    -// where:
    -//   globalStateReducer: Reducer<MyAction, MyGlobalState>
    -//                                             ↑ lift
    -//           gpsReducer: Reducer<MyAction, Location>
    -
    - -

    Now this reducer can be used within our Store or even composed with others. It also can be used in other apps as -long as we have a way to lift it to the world of Whole.

    - -

    Same strategy works for the action, as you can guess by the action KeyPath parameter. You can provide a KeyPath -that takes a global action (Whole) and returns an optional local action (Part). It’s optional because perhaps -you want to ignore actions that are not relevant for this reducer.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func lift<GlobalActionType, GlobalStateType>(
    -    action: KeyPath<GlobalActionType, ActionType?>,
    -    state: WritableKeyPath<GlobalStateType, StateType>)
    --> Reducer<GlobalActionType, GlobalStateType>
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - -
    - - action - - -
    -

    a read-only key-path from global action into a local action, but it’s optional because maybe this - reducer shouldn’t care about certain actions. Because actions are usually enums, you can switch over - the enum and in case it’s nothing you care about, you simply return nil in the closure. If you don’t - want to lift this reducer in terms of action, just remove this parameter from the call.

    -
    -
    - - state - - -
    -

    a writable key-path from global state that traverses into a local state, by extracting only the part - that it’s relevant for this reducer. This will also be used to set the new local state into the global - state once the reducer finishes it’s operation. For example: \.currentGame.scoreBoard.

    -
    -
    -
    -
    -

    Return Value

    -

    a Reducer<GlobalAction, GlobalState> that maps actions and states from the original specialised - reducer into a more generic and global reducer, to be used in a larger context.

    -
    -
    -
    -
  • -
  • -
    - - - - lift(state:) - -
    -
    -
    -
    -
    -
    -

    A type-lifting method. The global state of your app is Whole, and the Reducer handles Part, that is a -sub-state.

    - -

    Let’s suppose you may want to have a gpsReducer that knows about the following struct:

    -
    struct Location {
    -    let latitude: Double
    -    let longitude: Double
    -}
    -
    - -

    Let’s call it Part. Both, this state and its reducer will be part of an external framework, used by dozens of -apps. Internally probably the Reducer will receive some known ActionType and calculate a new location. On the -main app we have a global state, that we now call Whole.

    -
    struct MyGlobalState {
    -    let title: String?
    -    let listOfItems: [Item]
    -    let currentLocation: Location
    -}
    -
    - -

    As expected, Part (Location) is a property of Whole (MyGlobalState). This relationship could be less -direct, for example there could be several levels of properties until you find the Part in the Whole, like -global.firstLevel.secondLevel.currentLocation, but let’s keep it a single-level for this example.

    - -

    Because our Store understands Whole (MyGlobalState) and our gpsReducer understands Part (Location), we -must lift the Reducer to the Whole level, by using:

    -
    let globalStateReducer = gpsReducer.lift(
    -    action: \.self,
    -    state: \.currentLocation
    -)
    -// where:
    -//   globalStateReducer: Reducer<MyAction, MyGlobalState>
    -//                                             ↑ lift
    -//           gpsReducer: Reducer<MyAction, Location>
    -
    - -

    Now this reducer can be used within our Store or even composed with others. It also can be used in other apps as -long as we have a way to lift it to the world of Whole.

    - -

    Same strategy works for the action, as you can guess by the action KeyPath parameter. You can provide a KeyPath -that takes a global action (Whole) and returns an optional local action (Part). It’s optional because perhaps -you want to ignore actions that are not relevant for this reducer.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func lift<GlobalStateType>(
    -    state: WritableKeyPath<GlobalStateType, StateType>
    -) -> Reducer<ActionType, GlobalStateType>
    - -
    -
    -
    -

    Parameters

    - - - - - - - -
    - - state - - -
    -

    a writable key-path from global state that traverses into a local state, by extracting only the part - that it’s relevant for this reducer. This will also be used to set the new local state into the global - state once the reducer finishes it’s operation. For example: \.currentGame.scoreBoard.

    -
    -
    -
    -
    -

    Return Value

    -

    a Reducer<ActionType, GlobalState> that maps actions and states from the original specialized - reducer into a more generic and global reducer, to be used in a larger context.

    -
    -
    -
    -
  • -
  • -
    - - - - lift(action:) - -
    -
    -
    -
    -
    -
    -

    A type-lifting method. The global state of your app is Whole, and the Reducer handles Part, that is a -sub-state.

    - -

    Let’s suppose you may want to have a gpsReducer that knows about the following struct:

    -
    struct Location {
    -    let latitude: Double
    -    let longitude: Double
    -}
    -
    - -

    Let’s call it Part. Both, this state and its reducer will be part of an external framework, used by dozens of -apps. Internally probably the Reducer will receive some known ActionType and calculate a new location. On the -main app we have a global state, that we now call Whole.

    -
    struct MyGlobalState {
    -    let title: String?
    -    let listOfItems: [Item]
    -    let currentLocation: Location
    -}
    -
    - -

    As expected, Part (Location) is a property of Whole (MyGlobalState). This relationship could be less -direct, for example there could be several levels of properties until you find the Part in the Whole, like -global.firstLevel.secondLevel.currentLocation, but let’s keep it a single-level for this example.

    - -

    Because our Store understands Whole (MyGlobalState) and our gpsReducer understands Part (Location), we -must lift the Reducer to the Whole level, by using:

    -
    let globalStateReducer = gpsReducer.lift(
    -    action: \.self,
    -    state: \.currentLocation
    -)
    -// where:
    -//   globalStateReducer: Reducer<MyAction, MyGlobalState>
    -//                                             ↑ lift
    -//           gpsReducer: Reducer<MyAction, Location>
    -
    - -

    Now this reducer can be used within our Store or even composed with others. It also can be used in other apps as -long as we have a way to lift it to the world of Whole.

    - -

    Same strategy works for the action, as you can guess by the action KeyPath parameter. You can provide a KeyPath -that takes a global action (Whole) and returns an optional local action (Part). It’s optional because perhaps -you want to ignore actions that are not relevant for this reducer.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func lift<GlobalActionType>(
    -    action: KeyPath<GlobalActionType, ActionType?>)
    --> Reducer<GlobalActionType, StateType>
    - -
    -
    -
    -

    Parameters

    - - - - - - - -
    - - action - - -
    -

    a read-only key-path from global action into a local action, but it’s optional because maybe this - reducer shouldn’t care about certain actions. Because actions are usually enums, you can switch over - the enum and in case it’s nothing you care about, you simply return nil in the closure. If you don’t - want to lift this reducer in terms of action, just remove this parameter from the call.

    -
    -
    -
    -
    -

    Return Value

    -

    a Reducer<GlobalAction, StateType> that maps actions and states from the original specialized - reducer into a more generic and global reducer, to be used in a larger context.

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    A type-lifting method for collections. The global state of your app is Whole, and the Reducer handles an element -that is inside of a collection, which itself is sub-state of the global. Let’s call this single element Part.

    - -

    Let’s suppose you may want to have a gpsReducer that knows about the following struct:

    -
    struct Location {
    -    let latitude: Double
    -    let longitude: Double
    -}
    -
    - -

    Let’s call it Part. Both, this state and its reducer will be part of an external framework, used by dozens of -apps. Internally probably the Reducer will receive some known ActionType and calculate a new location. On the -main app we have a global state, that we now call Whole.

    -
    struct MyGlobalState {
    -    let title: String?
    -    let knownLocations: [Location]
    -}
    -
    - -

    As expected, Part (Location) is an element of the array knownLocations, which is property of Whole -(MyGlobalState). This relationship could be less direct, for example there could be several levels of properties -until you find the Part in the Whole, like global.firstLevel.secondLevel.knownLocations, but let’s keep it a -single-level for this example.

    - -

    To resolve this single element, we not only have to find the path to the array, but we have to find the element -inside of the array. There are three methods for doing so: -1) the element is Identifiable (iOS 13 or later) -2) the element has a Hashable property that makes it unique, so we can find it in the array using this identifier -3) using the index of the element in the array

    - -

    Because our Store understands Whole (MyGlobalState) and our gpsReducer understands Part (Location), we -must liftToCollection the Reducer to the Whole level, by using:

    -
    let globalStateReducer = gpsReducer.liftToCollection(
    -    actionMap: \.actionKeyPathToATuple,
    -    state: \.knownLocations
    -)
    -// where:
    -//   globalStateReducer: Reducer<MyAction, MyGlobalState>
    -//                                                 ↑ lift
    -//           gpsReducer: Reducer<LocationAction, Location>
    -
    - -

    Different from simple lift to scalar, this one requires necessarily that you lift the action together with the state. -That’s because your action has to contain the ID or Index of the element we will modify. The actionMap KeyPath has to -give us a tuple of either:

    - -
      -
    • (id, actionToSingleElement)
    • -
    • (index, actionToSingleElement)
    • -
    - -

    The id or index is gonna be how we will search the array for the desired element, and only if we find it, we will run -the gpsReducer for that specific element, using the action that has to do with single elements only.

    - -

    As Location doesn’t have an id property we will have to either use index, implement Identifiable protocol or -give another unique and Hashable property.

    - -

    Now this reducer can be used within our Store or even composed with others. It also can be used in other apps as -long as we have a way to lift it to the world of Whole.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func liftToCollection<GlobalAction, GlobalState, CollectionState: MutableCollection, ID: Hashable>(
    -    action actionMap: KeyPath<GlobalAction, (id: ID, action: ActionType)?>,
    -    stateCollection: WritableKeyPath<GlobalState, CollectionState>,
    -    identifier: KeyPath<StateType, ID>
    -) -> Reducer<GlobalAction, GlobalState> where CollectionState.Element == StateType
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - - - - - -
    - - actionMap - - -
    -

    a read-only key-path from global action into a tuple: (id, local action), but it’s optional because - maybe this reducer shouldn’t care about certain actions.

    -
    -
    - - stateCollection - - -
    -

    a writable key-path from global state that traverses into a local state, by extracting only - the part that it’s relevant for this reducer. This part needs to be a MutableCollection.

    -
    -
    - - identifier - - -
    -

    a key-path to define who is the unique-identifier of the Element (it has to be Hashable)

    -
    -
    -
    -
    -

    Return Value

    -

    a Reducer<GlobalAction, GlobalState> that maps actions and states from the original local reducer, which - is specialised in a single Element, into a more generic and global reducer, to be used in a larger context.

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    A type-lifting method for collections. The global state of your app is Whole, and the Reducer handles an element -that is inside of a collection, which itself is sub-state of the global. Let’s call this single element Part.

    - -

    Let’s suppose you may want to have a gpsReducer that knows about the following struct:

    -
    struct Location {
    -    let latitude: Double
    -    let longitude: Double
    -}
    -
    - -

    Let’s call it Part. Both, this state and its reducer will be part of an external framework, used by dozens of -apps. Internally probably the Reducer will receive some known ActionType and calculate a new location. On the -main app we have a global state, that we now call Whole.

    -
    struct MyGlobalState {
    -    let title: String?
    -    let knownLocations: [Location]
    -}
    -
    - -

    As expected, Part (Location) is an element of the array knownLocations, which is property of Whole -(MyGlobalState). This relationship could be less direct, for example there could be several levels of properties -until you find the Part in the Whole, like global.firstLevel.secondLevel.knownLocations, but let’s keep it a -single-level for this example.

    - -

    To resolve this single element, we not only have to find the path to the array, but we have to find the element -inside of the array. There are three methods for doing so: -1) the element is Identifiable (iOS 13 or later) -2) the element has a Hashable property that makes it unique, so we can find it in the array using this identifier -3) using the index of the element in the array

    - -

    Because our Store understands Whole (MyGlobalState) and our gpsReducer understands Part (Location), we -must liftToCollection the Reducer to the Whole level, by using:

    -
    let globalStateReducer = gpsReducer.liftToCollection(
    -    actionMap: \.actionKeyPathToATuple,
    -    state: \.knownLocations
    -)
    -// where:
    -//   globalStateReducer: Reducer<MyAction, MyGlobalState>
    -//                                                 ↑ lift
    -//           gpsReducer: Reducer<LocationAction, Location>
    -
    - -

    Different from simple lift to scalar, this one requires necessarily that you lift the action together with the state. -That’s because your action has to contain the ID or Index of the element we will modify. The actionMap KeyPath has to -give us a tuple of either:

    - -
      -
    • (id, actionToSingleElement)
    • -
    • (index, actionToSingleElement)
    • -
    - -

    The id or index is gonna be how we will search the array for the desired element, and only if we find it, we will run -the gpsReducer for that specific element, using the action that has to do with single elements only.

    - -

    As Location doesn’t have an id property we will have to either use index, implement Identifiable protocol or -give another unique and Hashable property.

    - -

    Now this reducer can be used within our Store or even composed with others. It also can be used in other apps as -long as we have a way to lift it to the world of Whole.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func liftToCollection<GlobalAction, GlobalState, CollectionState: MutableCollection>(
    -    action actionMap: KeyPath<GlobalAction, (index: CollectionState.Index, action: ActionType)?>,
    -    stateCollection: WritableKeyPath<GlobalState, CollectionState>
    -) -> Reducer<GlobalAction, GlobalState> where CollectionState.Element == StateType
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - -
    - - actionMap - - -
    -

    a read-only key-path from global action into a tuple: (index, local action), but it’s optional because - maybe this reducer shouldn’t care about certain actions.

    -
    -
    - - stateCollection - - -
    -

    a writable key-path from global state that traverses into a local state, by extracting only - the part that it’s relevant for this reducer. This part needs to be a MutableCollection.

    -
    -
    -
    -
    -

    Return Value

    -

    a Reducer<GlobalAction, GlobalState> that maps actions and states from the original local reducer, which - is specialised in a single Element, into a more generic and global reducer, to be used in a larger context.

    -
    -
    -
    -
  • -
-
-
-
- - -
- -

Available where StateType: Identifiable -

-
-
-
    -
  • - -
    -
    -
    -
    -
    -

    A type-lifting method for collections. The global state of your app is Whole, and the Reducer handles an element -that is inside of a collection, which itself is sub-state of the global. Let’s call this single element Part.

    - -

    Let’s suppose you may want to have a gpsReducer that knows about the following struct:

    -
    struct Location {
    -    let latitude: Double
    -    let longitude: Double
    -}
    -
    - -

    Let’s call it Part. Both, this state and its reducer will be part of an external framework, used by dozens of -apps. Internally probably the Reducer will receive some known ActionType and calculate a new location. On the -main app we have a global state, that we now call Whole.

    -
    struct MyGlobalState {
    -    let title: String?
    -    let knownLocations: [Location]
    -}
    -
    - -

    As expected, Part (Location) is an element of the array knownLocations, which is property of Whole -(MyGlobalState). This relationship could be less direct, for example there could be several levels of properties -until you find the Part in the Whole, like global.firstLevel.secondLevel.knownLocations, but let’s keep it a -single-level for this example.

    - -

    To resolve this single element, we not only have to find the path to the array, but we have to find the element -inside of the array. There are three methods for doing so: -1) the element is Identifiable (iOS 13 or later) -2) the element has a Hashable property that makes it unique, so we can find it in the array using this identifier -3) using the index of the element in the array

    - -

    Because our Store understands Whole (MyGlobalState) and our gpsReducer understands Part (Location), we -must liftToCollection the Reducer to the Whole level, by using:

    -
    let globalStateReducer = gpsReducer.liftToCollection(
    -    actionMap: \.actionKeyPathToATuple,
    -    state: \.knownLocations
    -)
    -// where:
    -//   globalStateReducer: Reducer<MyAction, MyGlobalState>
    -//                                                 ↑ lift
    -//           gpsReducer: Reducer<LocationAction, Location>
    -
    - -

    Different from simple lift to scalar, this one requires necessarily that you lift the action together with the state. -That’s because your action has to contain the ID or Index of the element we will modify. The actionMap KeyPath has to -give us a tuple of either:

    - -
      -
    • (id, actionToSingleElement)
    • -
    • (index, actionToSingleElement)
    • -
    - -

    The id or index is gonna be how we will search the array for the desired element, and only if we find it, we will run -the gpsReducer for that specific element, using the action that has to do with single elements only.

    - -

    As Location doesn’t have an id property we will have to either use index, implement Identifiable protocol or -give another unique and Hashable property.

    - -

    Now this reducer can be used within our Store or even composed with others. It also can be used in other apps as -long as we have a way to lift it to the world of Whole.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func liftToCollection<GlobalAction, GlobalState, CollectionState: MutableCollection>(
    -    action actionMap: KeyPath<GlobalAction, (id: StateType.ID, action: ActionType)?>,
    -    stateCollection: WritableKeyPath<GlobalState, CollectionState>
    -) -> Reducer<GlobalAction, GlobalState> where CollectionState.Element == StateType
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - -
    - - actionMap - - -
    -

    a read-only key-path from global action into a tuple: (id, local action), but it’s optional because - maybe this reducer shouldn’t care about certain actions.

    -
    -
    - - stateCollection - - -
    -

    a writable key-path from global state that traverses into a local state, by extracting only - the part that it’s relevant for this reducer. This part needs to be a MutableCollection.

    -
    -
    -
    -
    -

    Return Value

    -

    a Reducer<GlobalAction, GlobalState> that maps actions and states from the original local reducer, which - is specialised in a single Element, into a more generic and global reducer, to be used in a larger context.

    -
    -
    -
    -
  • -
-
-
-
- -
-
- - diff --git a/docs/api/Reducer/Structs/ReducerBuilder.html b/docs/api/Reducer/Structs/ReducerBuilder.html deleted file mode 100644 index aa0ef59..0000000 --- a/docs/api/Reducer/Structs/ReducerBuilder.html +++ /dev/null @@ -1,130 +0,0 @@ - - - - ReducerBuilder Structure Reference - - - - - - - - - - - - - -
-
-

Reducer 0.9.0 Docs (100% documented)

-
-
- -
-
-
-
-
- -
-
- -
-
-
-

ReducerBuilder

-
-
- -
@resultBuilder
-public struct ReducerBuilder
- -
-
-

DSL Builder for Reducer compose

- -
-
-
-
    -
  • -
    - - - - buildBlock(_:) - -
    -
    -
    -
    -
    -
    -

    DSL Builder for Reducer compose

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func buildBlock<Action, State>(_ rs: Reducer<Action, State>...) -> Reducer<Action, State>
    - -
    -
    -
    -

    Parameters

    - - - - - - - -
    - - rs - - -
    -

    the reducers to be combined/

    -
    -
    -
    -
    -

    Return Value

    -

    the composed reducer that will run all the inner reducers sequentially/

    -
    -
    -
    -
  • -
-
-
-
- -
-
- - diff --git a/docs/api/Reducer/badge.svg b/docs/api/Reducer/badge.svg deleted file mode 100644 index a096fec..0000000 --- a/docs/api/Reducer/badge.svg +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - documentation - - - documentation - - - 100% - - - 100% - - - diff --git a/docs/api/Reducer/css/highlight.css b/docs/api/Reducer/css/highlight.css deleted file mode 100644 index c170357..0000000 --- a/docs/api/Reducer/css/highlight.css +++ /dev/null @@ -1,202 +0,0 @@ -/*! Jazzy - https://github.com/realm/jazzy - * Copyright Realm Inc. - * SPDX-License-Identifier: MIT - */ -/* Credit to https://gist.github.com/wataru420/2048287 */ -.highlight .c { - color: #999988; - font-style: italic; } - -.highlight .err { - color: #a61717; - background-color: #e3d2d2; } - -.highlight .k { - color: #000000; - font-weight: bold; } - -.highlight .o { - color: #000000; - font-weight: bold; } - -.highlight .cm { - color: #999988; - font-style: italic; } - -.highlight .cp { - color: #999999; - font-weight: bold; } - -.highlight .c1 { - color: #999988; - font-style: italic; } - -.highlight .cs { - color: #999999; - font-weight: bold; - font-style: italic; } - -.highlight .gd { - color: #000000; - background-color: #ffdddd; } - -.highlight .gd .x { - color: #000000; - background-color: #ffaaaa; } - -.highlight .ge { - color: #000000; - font-style: italic; } - -.highlight .gr { - color: #aa0000; } - -.highlight .gh { - color: #999999; } - -.highlight .gi { - color: #000000; - background-color: #ddffdd; } - -.highlight .gi .x { - color: #000000; - background-color: #aaffaa; } - -.highlight .go { - color: #888888; } - -.highlight .gp { - color: #555555; } - -.highlight .gs { - font-weight: bold; } - -.highlight .gu { - color: #aaaaaa; } - -.highlight .gt { - color: #aa0000; } - -.highlight .kc { - color: #000000; - font-weight: bold; } - -.highlight .kd { - color: #000000; - font-weight: bold; } - -.highlight .kp { - color: #000000; - font-weight: bold; } - -.highlight .kr { - color: #000000; - font-weight: bold; } - -.highlight .kt { - color: #445588; } - -.highlight .m { - color: #009999; } - -.highlight .s { - color: #d14; } - -.highlight .na { - color: #008080; } - -.highlight .nb { - color: #0086B3; } - -.highlight .nc { - color: #445588; - font-weight: bold; } - -.highlight .no { - color: #008080; } - -.highlight .ni { - color: #800080; } - -.highlight .ne { - color: #990000; - font-weight: bold; } - -.highlight .nf { - color: #990000; } - -.highlight .nn { - color: #555555; } - -.highlight .nt { - color: #000080; } - -.highlight .nv { - color: #008080; } - -.highlight .ow { - color: #000000; - font-weight: bold; } - -.highlight .w { - color: #bbbbbb; } - -.highlight .mf { - color: #009999; } - -.highlight .mh { - color: #009999; } - -.highlight .mi { - color: #009999; } - -.highlight .mo { - color: #009999; } - -.highlight .sb { - color: #d14; } - -.highlight .sc { - color: #d14; } - -.highlight .sd { - color: #d14; } - -.highlight .s2 { - color: #d14; } - -.highlight .se { - color: #d14; } - -.highlight .sh { - color: #d14; } - -.highlight .si { - color: #d14; } - -.highlight .sx { - color: #d14; } - -.highlight .sr { - color: #009926; } - -.highlight .s1 { - color: #d14; } - -.highlight .ss { - color: #990073; } - -.highlight .bp { - color: #999999; } - -.highlight .vc { - color: #008080; } - -.highlight .vg { - color: #008080; } - -.highlight .vi { - color: #008080; } - -.highlight .il { - color: #009999; } diff --git a/docs/api/Reducer/css/jazzy.css b/docs/api/Reducer/css/jazzy.css deleted file mode 100644 index 2e38713..0000000 --- a/docs/api/Reducer/css/jazzy.css +++ /dev/null @@ -1,439 +0,0 @@ -/*! Jazzy - https://github.com/realm/jazzy - * Copyright Realm Inc. - * SPDX-License-Identifier: MIT - */ -html, body, div, span, h1, h3, h4, p, a, code, em, img, ul, li, table, tbody, tr, td { - background: transparent; - border: 0; - margin: 0; - outline: 0; - padding: 0; - vertical-align: baseline; } - -body { - background-color: #f2f2f2; - font-family: Helvetica, freesans, Arial, sans-serif; - font-size: 14px; - -webkit-font-smoothing: subpixel-antialiased; - word-wrap: break-word; } - -h1, h2, h3 { - margin-top: 0.8em; - margin-bottom: 0.3em; - font-weight: 100; - color: black; } - -h1 { - font-size: 2.5em; } - -h2 { - font-size: 2em; - border-bottom: 1px solid #e2e2e2; } - -h4 { - font-size: 13px; - line-height: 1.5; - margin-top: 21px; } - -h5 { - font-size: 1.1em; } - -h6 { - font-size: 1.1em; - color: #777; } - -.section-name { - color: gray; - display: block; - font-family: Helvetica; - font-size: 22px; - font-weight: 100; - margin-bottom: 15px; } - -pre, code { - font: 0.95em Menlo, monospace; - color: #777; - word-wrap: normal; } - -p code, li code { - background-color: #eee; - padding: 2px 4px; - border-radius: 4px; } - -pre > code { - padding: 0; } - -a { - color: #0088cc; - text-decoration: none; } - a code { - color: inherit; } - -ul { - padding-left: 15px; } - -li { - line-height: 1.8em; } - -img { - max-width: 100%; } - -blockquote { - margin-left: 0; - padding: 0 10px; - border-left: 4px solid #ccc; } - -hr { - height: 1px; - border: none; - background-color: #e2e2e2; } - -.footnote-ref { - display: inline-block; - scroll-margin-top: 70px; } - -.footnote-def { - scroll-margin-top: 70px; } - -.content-wrapper { - margin: 0 auto; - width: 980px; } - -header { - font-size: 0.85em; - line-height: 32px; - background-color: #414141; - position: fixed; - width: 100%; - z-index: 3; } - header img { - padding-right: 6px; - vertical-align: -3px; - height: 16px; } - header a { - color: #fff; } - header p { - float: left; - color: #999; } - header .header-right { - float: right; - margin-left: 16px; } - -#breadcrumbs { - background-color: #f2f2f2; - height: 21px; - padding-top: 17px; - position: fixed; - width: 100%; - z-index: 2; - margin-top: 32px; } - #breadcrumbs #carat { - height: 10px; - margin: 0 5px; } - -.sidebar { - background-color: #f9f9f9; - border: 1px solid #e2e2e2; - overflow-y: auto; - overflow-x: hidden; - position: fixed; - top: 70px; - bottom: 0; - width: 230px; - word-wrap: normal; } - -.nav-groups { - list-style-type: none; - background: #fff; - padding-left: 0; } - -.nav-group-name { - border-bottom: 1px solid #e2e2e2; - font-size: 1.1em; - font-weight: 100; - padding: 15px 0 15px 20px; } - .nav-group-name > a { - color: #333; } - -.nav-group-tasks { - margin-top: 5px; } - -.nav-group-task { - font-size: 0.9em; - list-style-type: none; - white-space: nowrap; } - .nav-group-task a { - color: #888; } - -.main-content { - background-color: #fff; - border: 1px solid #e2e2e2; - margin-left: 246px; - position: absolute; - overflow: hidden; - padding-bottom: 20px; - top: 70px; - width: 734px; } - .main-content p, .main-content a, .main-content code, .main-content em, .main-content ul, .main-content table, .main-content blockquote { - margin-bottom: 1em; } - .main-content p { - line-height: 1.8em; } - .main-content section .section:first-child { - margin-top: 0; - padding-top: 0; } - .main-content section .task-group-section .task-group:first-of-type { - padding-top: 10px; } - .main-content section .task-group-section .task-group:first-of-type .section-name { - padding-top: 15px; } - .main-content section .heading:before { - content: ""; - display: block; - padding-top: 70px; - margin: -70px 0 0; } - .main-content .section-name p { - margin-bottom: inherit; - line-height: inherit; } - .main-content .section-name code { - background-color: inherit; - padding: inherit; - color: inherit; } - -.section { - padding: 0 25px; } - -.highlight { - background-color: #eee; - padding: 10px 12px; - border: 1px solid #e2e2e2; - border-radius: 4px; - overflow-x: auto; } - -.declaration .highlight { - overflow-x: initial; - padding: 0 40px 40px 0; - margin-bottom: -25px; - background-color: transparent; - border: none; } - -.section-name { - margin: 0; - margin-left: 18px; } - -.task-group-section { - margin-top: 10px; - padding-left: 6px; - border-top: 1px solid #e2e2e2; } - -.task-group { - padding-top: 0px; } - -.task-name-container a[name]:before { - content: ""; - display: block; - padding-top: 70px; - margin: -70px 0 0; } - -.section-name-container { - position: relative; - display: inline-block; } - .section-name-container .section-name-link { - position: absolute; - top: 0; - left: 0; - bottom: 0; - right: 0; - margin-bottom: 0; } - .section-name-container .section-name { - position: relative; - pointer-events: none; - z-index: 1; } - .section-name-container .section-name a { - pointer-events: auto; } - -.item { - padding-top: 8px; - width: 100%; - list-style-type: none; } - .item a[name]:before { - content: ""; - display: block; - padding-top: 70px; - margin: -70px 0 0; } - .item code { - background-color: transparent; - padding: 0; } - .item .token, .item .direct-link { - display: inline-block; - text-indent: -20px; - padding-left: 3px; - margin-left: 35px; - font-size: 11.9px; - transition: all 300ms; } - .item .token-open { - margin-left: 20px; } - .item .discouraged { - text-decoration: line-through; } - .item .declaration-note { - font-size: .85em; - color: gray; - font-style: italic; } - -.pointer-container { - border-bottom: 1px solid #e2e2e2; - left: -23px; - padding-bottom: 13px; - position: relative; - width: 110%; } - -.pointer { - background: #f9f9f9; - border-left: 1px solid #e2e2e2; - border-top: 1px solid #e2e2e2; - height: 12px; - left: 21px; - top: -7px; - -webkit-transform: rotate(45deg); - -moz-transform: rotate(45deg); - -o-transform: rotate(45deg); - transform: rotate(45deg); - position: absolute; - width: 12px; } - -.height-container { - display: none; - left: -25px; - padding: 0 25px; - position: relative; - width: 100%; - overflow: hidden; } - .height-container .section { - background: #f9f9f9; - border-bottom: 1px solid #e2e2e2; - left: -25px; - position: relative; - width: 100%; - padding-top: 10px; - padding-bottom: 5px; } - -.aside, .language { - padding: 6px 12px; - margin: 12px 0; - border-left: 5px solid #dddddd; - overflow-y: hidden; } - .aside .aside-title, .language .aside-title { - font-size: 9px; - letter-spacing: 2px; - text-transform: uppercase; - padding-bottom: 0; - margin: 0; - color: #aaa; - -webkit-user-select: none; } - .aside p:last-child, .language p:last-child { - margin-bottom: 0; } - -.language { - border-left: 5px solid #cde9f4; } - .language .aside-title { - color: #4b8afb; } - -.aside-warning, .aside-deprecated, .aside-unavailable { - border-left: 5px solid #ff6666; } - .aside-warning .aside-title, .aside-deprecated .aside-title, .aside-unavailable .aside-title { - color: #ff0000; } - -.graybox { - border-collapse: collapse; - width: 100%; } - .graybox p { - margin: 0; - word-break: break-word; - min-width: 50px; } - .graybox td { - border: 1px solid #e2e2e2; - padding: 5px 25px 5px 10px; - vertical-align: middle; } - .graybox tr td:first-of-type { - text-align: right; - padding: 7px; - vertical-align: top; - word-break: normal; - width: 40px; } - -.slightly-smaller { - font-size: 0.9em; } - -#footer { - position: relative; - top: 10px; - bottom: 0px; - margin-left: 25px; } - #footer p { - margin: 0; - color: #aaa; - font-size: 0.8em; } - -html.dash header, html.dash #breadcrumbs, html.dash .sidebar { - display: none; } - -html.dash .main-content { - width: 980px; - margin-left: 0; - border: none; - width: 100%; - top: 0; - padding-bottom: 0; } - -html.dash .height-container { - display: block; } - -html.dash .item .token { - margin-left: 0; } - -html.dash .content-wrapper { - width: auto; } - -html.dash #footer { - position: static; } - -form[role=search] { - float: right; } - form[role=search] input { - font: Helvetica, freesans, Arial, sans-serif; - margin-top: 6px; - font-size: 13px; - line-height: 20px; - padding: 0px 10px; - border: none; - border-radius: 1em; } - .loading form[role=search] input { - background: white url(../img/spinner.gif) center right 4px no-repeat; } - form[role=search] .tt-menu { - margin: 0; - min-width: 300px; - background: #fff; - color: #333; - border: 1px solid #e2e2e2; - z-index: 4; } - form[role=search] .tt-highlight { - font-weight: bold; } - form[role=search] .tt-suggestion { - font: Helvetica, freesans, Arial, sans-serif; - font-size: 14px; - padding: 0 8px; } - form[role=search] .tt-suggestion span { - display: table-cell; - white-space: nowrap; } - form[role=search] .tt-suggestion .doc-parent-name { - width: 100%; - text-align: right; - font-weight: normal; - font-size: 0.9em; - padding-left: 16px; } - form[role=search] .tt-suggestion:hover, - form[role=search] .tt-suggestion.tt-cursor { - cursor: pointer; - background-color: #4183c4; - color: #fff; } - form[role=search] .tt-suggestion:hover .doc-parent-name, - form[role=search] .tt-suggestion.tt-cursor .doc-parent-name { - color: #fff; } diff --git a/docs/api/Reducer/docsets/Reducer.docset/Contents/Info.plist b/docs/api/Reducer/docsets/Reducer.docset/Contents/Info.plist deleted file mode 100644 index 287e47e..0000000 --- a/docs/api/Reducer/docsets/Reducer.docset/Contents/Info.plist +++ /dev/null @@ -1,20 +0,0 @@ - - - - - CFBundleIdentifier - com.jazzy.reducer - CFBundleName - Reducer - DocSetPlatformFamily - reducer - isDashDocset - - dashIndexFilePath - index.html - isJavaScriptEnabled - - DashDocSetFamily - dashtoc - - diff --git a/docs/api/Reducer/docsets/Reducer.docset/Contents/Resources/Documents/Enums.html b/docs/api/Reducer/docsets/Reducer.docset/Contents/Resources/Documents/Enums.html deleted file mode 100644 index 26e7fc8..0000000 --- a/docs/api/Reducer/docsets/Reducer.docset/Contents/Resources/Documents/Enums.html +++ /dev/null @@ -1,106 +0,0 @@ - - - - Enumerations Reference - - - - - - - - - - - - - -
-
-

Reducer 0.9.0 Docs (100% documented)

-
-
- -
-
-
-
-
- -
-
- -
-
-
-

Enumerations

-

The following enumerations are available globally.

- -
-
-
-
    -
  • -
    - - - - ReducerBuilder - -
    -
    -
    -
    -
    -
    -

    DSL Builder for Reducer compose

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    @resultBuilder
    -public enum ReducerBuilder
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - diff --git a/docs/api/Reducer/docsets/Reducer.docset/Contents/Resources/Documents/Enums/ReducerBuilder.html b/docs/api/Reducer/docsets/Reducer.docset/Contents/Resources/Documents/Enums/ReducerBuilder.html deleted file mode 100644 index ed71222..0000000 --- a/docs/api/Reducer/docsets/Reducer.docset/Contents/Resources/Documents/Enums/ReducerBuilder.html +++ /dev/null @@ -1,135 +0,0 @@ - - - - ReducerBuilder Enumeration Reference - - - - - - - - - - - - - -
-
-

Reducer 0.9.0 Docs (100% documented)

-
-
- -
-
-
-
-
- -
-
- -
-
-
-

ReducerBuilder

-
-
- -
@resultBuilder
-public enum ReducerBuilder
- -
-
-

DSL Builder for Reducer compose

- -
-
-
-
    -
  • -
    - - - - buildBlock(_:) - -
    -
    -
    -
    -
    -
    -

    DSL Builder for Reducer compose

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func buildBlock<Action, State>(_ reducers: Reducer<Action, State>...) -> Reducer<Action, State>
    - -
    -
    -
    -

    Parameters

    - - - - - - - -
    - - reducers - - -
    -

    the reducers to be combined/

    -
    -
    -
    -
    -

    Return Value

    -

    the composed reducer that will run all the inner reducers sequentially/

    -
    -
    -
    -
  • -
-
-
-
- -
-
- - diff --git a/docs/api/Reducer/docsets/Reducer.docset/Contents/Resources/Documents/Structs.html b/docs/api/Reducer/docsets/Reducer.docset/Contents/Resources/Documents/Structs.html deleted file mode 100644 index f4e927b..0000000 --- a/docs/api/Reducer/docsets/Reducer.docset/Contents/Resources/Documents/Structs.html +++ /dev/null @@ -1,120 +0,0 @@ - - - - Structures Reference - - - - - - - - - - - - - -
-
-

Reducer 0.9.0 Docs (100% documented)

-
-
- -
-
-
-
-
- -
-
- -
-
-
-

Structures

-

The following structures are available globally.

- -
-
-
-
    -
  • -
    - - - - Reducer - -
    -
    -
    -
    -
    -
    -

    An entity that calculates the new state when given current state and an incoming action (Action, inout State) -> Void.

    - -

    An app triggers several actions over time, either coming from user input (button tap, scroll, pinch gesture), from sensors (CoreLocation, NFC, -HealthKit), communication protocols (CoreBluetooth, networking, WebSocket), databases (CoreData, Realm), timers and many more. -An app also starts with an initial state, right after its cold launch. -For each action that arrives, the state can be modified, and this is exactly what a Reducer does: folds all actions that arrived since the app -launch, plus the initial state, into the current state. One at the time. -The shape of a Reducer could be represented as (Action, State) -> State, or given the incoming action and the latest known state, calculate the -new state. -For the sake of performance, and keeping the same semantics, the SwiftRex Reducer is represented as (Action, inout State) -> Void, avoiding -unnecessary copies and allowing performance tuning for arrays or other big collections. -A Reducer can focus in a small part, and be composed with other reducers. The order of this composition matters, because the state will be modified -in the order as the reducers were composed, but you should avoid two reducers changing the same domain. If you can’t avoid, mind the order. -A Reducer can also focus in a subset of your full AppAction and AppState, and be “lifted” from the subset to the whole, for example it’s focused on -LoginAction and LoginState, then lifted to the whole AppAction and AppState by providing the KeyPath where the subset LoginAction is in the -AppAction, and where the subset LoginState is in the AppState.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct Reducer<ActionType, StateType>
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - diff --git a/docs/api/Reducer/docsets/Reducer.docset/Contents/Resources/Documents/Structs/Reducer.html b/docs/api/Reducer/docsets/Reducer.docset/Contents/Resources/Documents/Structs/Reducer.html deleted file mode 100644 index 2e7d76f..0000000 --- a/docs/api/Reducer/docsets/Reducer.docset/Contents/Resources/Documents/Structs/Reducer.html +++ /dev/null @@ -1,1205 +0,0 @@ - - - - Reducer Structure Reference - - - - - - - - - - - - - -
-
-

Reducer 0.9.0 Docs (100% documented)

-
-
- -
-
-
-
-
- -
-
- -
-
-
-

Reducer

-
-
- -
public struct Reducer<ActionType, StateType>
- -
-
-

An entity that calculates the new state when given current state and an incoming action (Action, inout State) -> Void.

- -

An app triggers several actions over time, either coming from user input (button tap, scroll, pinch gesture), from sensors (CoreLocation, NFC, -HealthKit), communication protocols (CoreBluetooth, networking, WebSocket), databases (CoreData, Realm), timers and many more. -An app also starts with an initial state, right after its cold launch. -For each action that arrives, the state can be modified, and this is exactly what a Reducer does: folds all actions that arrived since the app -launch, plus the initial state, into the current state. One at the time. -The shape of a Reducer could be represented as (Action, State) -> State, or given the incoming action and the latest known state, calculate the -new state. -For the sake of performance, and keeping the same semantics, the SwiftRex Reducer is represented as (Action, inout State) -> Void, avoiding -unnecessary copies and allowing performance tuning for arrays or other big collections. -A Reducer can focus in a small part, and be composed with other reducers. The order of this composition matters, because the state will be modified -in the order as the reducers were composed, but you should avoid two reducers changing the same domain. If you can’t avoid, mind the order. -A Reducer can also focus in a subset of your full AppAction and AppState, and be “lifted” from the subset to the whole, for example it’s focused on -LoginAction and LoginState, then lifted to the whole AppAction and AppState by providing the KeyPath where the subset LoginAction is in the -AppAction, and where the subset LoginState is in the AppState.

- -
-
-
-
    -
  • -
    - - - - reduce - -
    -
    -
    -
    -
    -
    -

    Execute the wrapped reduce function. You must provide the parameters action: ActionType (the action to be -evaluated during the reducing process) and an inout version of the latest state: StateType, (the current -state in your single source-of-truth). -State will be mutated in place (inout) and finish with the calculated new state.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let reduce: (ActionType, inout StateType) -> Void
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - reduce(_:) - -
    -
    -
    -
    -
    -
    -

    Reducer initialiser takes only the underlying function (ActionType, inout StateType) -> Void that is the reducer -function itself.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func reduce(_ reduce: @escaping (ActionType, inout StateType) -> Void) -> Reducer
    - -
    -
    -
    -

    Parameters

    - - - - - - - -
    - - reduce - - -
    -

    a pure function that calculates the new state from an action and the current state.

    -
    -
    -
    -
    -
    -
  • -
  • -
    - - - - compose(_:_:) - -
    -
    -
    -
    -
    -
    -

    Composes two or more reducers in series, to be evaluated from the left to the right for each incoming action.

    - -

    When composing reducer A with reducer B, when an action X arrives, first it will be forwarded to -reducer A together with the initial state. This reducer may return a slightly (or completely) changed state from -that operation, and this state will then be forwarded to reducer B together with the same action X. If you change -the order, results may vary as you can imagine. Monoids don’t necessarily hold the commutative axiom, although -sometimes they do. What they necessarily hold is the associativity axiom, which means that if you compose A and B, -and later C, it’s exactly the same as if you compose A to a previously composed B and C: -.compose(.compose(A, B), C) == .compose(A, .compose(B, C)). So please don’t worry about surrounding your reducers with parenthesis:

    -
    let globalReducer = .compose(firstReducer, secondReducer, thirdReducer, andSoOn)
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func compose(_ first: Reducer, _ others: Reducer...) -> Reducer
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - -
    - - first - - -
    -

    First reducer (ActionType, inout StateType) -> Void, let’s call it f(x)

    -
    -
    - - others - - -
    -

    Second, Third, nth reducers (ActionType, inout StateType) -> Void, let’s call it g(x)

    -
    -
    -
    -
    -

    Return Value

    -

    a composed reducer (ActionType, inout StateType) -> Void equivalent to g(f(x))

    -
    -
    -
    -
  • -
  • -
    - - - - compose(content:) - -
    -
    -
    -
    -
    -
    -

    Composes two or more reducers in series, to be evaluated from the top to the bottom for each incoming action.

    - -

    When composing reducer A with reducer B, when an action X arrives, first it will be forwarded to -reducer A together with the initial state. This reducer may return a slightly (or completely) changed state from -that operation, and this state will then be forwarded to reducer B together with the same action X. If you change -the order, results may vary as you can imagine. Monoids don’t necessarily hold the commutative axiom, although -sometimes they do.

    - -

    For example you can compose reducers like this:

    -
    Reducer.compose {
    -    Reducer
    -        .login
    -        .lift(action: \.loginAction, state: \.loginState)
    -
    -    Reducer
    -        .lifecycle
    -        .lift(action: \.lifecycleAction, state: \.lifecycleState)
    -
    -    Reducer.app
    -
    -    Reducer.reduce { action, state in
    -        // some inline reducer
    -    }
    -}
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func compose(@ReducerBuilder content: () -> Reducer) -> Reducer
    - -
    -
    -
    -

    Parameters

    - - - - - - - -
    - - content - - -
    -

    a result builder (DSL) having zero or more reducers to be composed sequentially

    -
    -
    -
    -
    -

    Return Value

    -

    a composed reducer (ActionType, inout StateType) -> Void equivalent to running all the internal - reducers in series

    -
    -
    -
    -
  • -
  • -
    - - - - identity - -
    -
    -
    -
    -
    -
    -

    No-op reducer. Composing it with any other reducer will not change anything from the other reducer behaviour, regardless if the identity reducer -is on the left-hand side or the right-hand side or this composition. This is the neutral element in a monoidal composition.

    - -

    Therefore:

    -
       .compose( Reducer<ActionType, StateType>, .identity )
    -== .compose( .identity, Reducer<ActionType, StateType> )
    -== Reducer<ActionType, StateType>
    -
    - -

    This is useful for composition purposes, for example when you call a function Array.reduce in an array of Reducers and you need a no-op start:

    -
    [reducer1, reducer2].reduce(.identity) { accumulator, nextReducer in
    -   Reducer.compose(accumulator, nextReducer)
    -}
    -// .identity won't have any behaviour and the final composition ".identity >>> reducer1, reducer2" will be as if .identity wasn't there.
    -
    - -

    The implementation of this reducer, as one should expect, simply ignores the action and returns the state unchanged

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static var identity: Reducer<ActionType, StateType> { get }
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    A type-lifting method. The global state of your app is Whole, and the Reducer handles Part, that is a -sub-state.

    - -

    Let’s suppose you may want to have a gpsReducer that knows about the following struct:

    -
    struct Location {
    -    let latitude: Double
    -    let longitude: Double
    -}
    -
    - -

    Let’s call it Part. Both, this state and its reducer will be part of an external framework, used by dozens of -apps. Internally probably the Reducer will receive some known ActionType and calculate a new location. On the -main app we have a global state, that we now call Whole.

    -
    struct MyGlobalState {
    -    let title: String?
    -    let listOfItems: [Item]
    -    let currentLocation: Location
    -}
    -
    - -

    As expected, Part (Location) is a property of Whole (MyGlobalState). This relationship could be less -direct, for example there could be several levels of properties until you find the Part in the Whole, like -global.firstLevel.secondLevel.currentLocation, but let’s keep it a single-level for this example.

    - -

    Because our Store understands Whole (MyGlobalState) and our gpsReducer understands Part (Location), we -must lift the Reducer to the Whole level, by using:

    -
    let globalStateReducer = gpsReducer.lift(
    -    actionGetter: { $0 },
    -    stateGetter: { global in global.currentLocation },
    -    stateSetter: { global, part in global.currentLocation = path }
    -)
    -// where:
    -//   globalStateReducer: Reducer<MyAction, MyGlobalState>
    -//                                             ↑ lift
    -//           gpsReducer: Reducer<MyAction, Location>
    -
    - -

    Now this reducer can be used within our Store or even composed with others. It also can be used in other apps as -long as we have a way to lift it to the world of Whole.

    - -

    Same strategy works for the action, as you can guess by the actionGetter parameter. You can provide a function -that takes a global action (Whole) and returns an optional local action (Part). It’s optional because perhaps -you want to ignore actions that are not relevant for this reducer.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func lift<GlobalActionType, GlobalStateType>(
    -    actionGetter: @escaping (GlobalActionType) -> ActionType?,
    -    stateGetter: @escaping (GlobalStateType) -> StateType,
    -    stateSetter: @escaping (inout GlobalStateType, StateType) -> Void)
    --> Reducer<GlobalActionType, GlobalStateType>
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - - - - - -
    - - actionGetter - - -
    -

    a way to convert a global action into a local action, but it’s optional because maybe this - reducer shouldn’t care about certain actions. Because actions are usually enums, you can switch - over the enum and in case it’s nothing you care about, you simply return nil in the closure. If - you don’t want to lift this reducer in terms of action, just provide the identity function - { $0 } as input.

    -
    -
    - - stateGetter - - -
    -

    a way to read from a global state and extract only the part that it’s relevant for this reducer, - by traversing the tree of the global state until you find the property you want, for example: - { $0.currentGame.scoreBoard }

    -
    -
    - - stateSetter - - -
    -

    a way to write back into the global state once you finished reducing the Part, so now you have - a new part that was calculated by this reducer and you want to set it into the global state, also - provided as the first parameter as an inout property: - { globalState, newScoreBoard in globalState.currentGame.scoreBoard = newScoreBoard }

    -
    -
    -
    -
    -

    Return Value

    -

    a Reducer<GlobalAction, GlobalState> that maps actions and states from the original specialised - reducer into a more generic and global reducer, to be used in a larger context.

    -
    -
    -
    -
  • -
  • -
    - - - - lift(action:state:) - -
    -
    -
    -
    -
    -
    -

    A type-lifting method. The global state of your app is Whole, and the Reducer handles Part, that is a -sub-state.

    - -

    Let’s suppose you may want to have a gpsReducer that knows about the following struct:

    -
    struct Location {
    -    let latitude: Double
    -    let longitude: Double
    -}
    -
    - -

    Let’s call it Part. Both, this state and its reducer will be part of an external framework, used by dozens of -apps. Internally probably the Reducer will receive some known ActionType and calculate a new location. On the -main app we have a global state, that we now call Whole.

    -
    struct MyGlobalState {
    -    let title: String?
    -    let listOfItems: [Item]
    -    let currentLocation: Location
    -}
    -
    - -

    As expected, Part (Location) is a property of Whole (MyGlobalState). This relationship could be less -direct, for example there could be several levels of properties until you find the Part in the Whole, like -global.firstLevel.secondLevel.currentLocation, but let’s keep it a single-level for this example.

    - -

    Because our Store understands Whole (MyGlobalState) and our gpsReducer understands Part (Location), we -must lift the Reducer to the Whole level, by using:

    -
    let globalStateReducer = gpsReducer.lift(
    -    action: \.self,
    -    state: \.currentLocation
    -)
    -// where:
    -//   globalStateReducer: Reducer<MyAction, MyGlobalState>
    -//                                             ↑ lift
    -//           gpsReducer: Reducer<MyAction, Location>
    -
    - -

    Now this reducer can be used within our Store or even composed with others. It also can be used in other apps as -long as we have a way to lift it to the world of Whole.

    - -

    Same strategy works for the action, as you can guess by the action KeyPath parameter. You can provide a KeyPath -that takes a global action (Whole) and returns an optional local action (Part). It’s optional because perhaps -you want to ignore actions that are not relevant for this reducer.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func lift<GlobalActionType, GlobalStateType>(
    -    action: KeyPath<GlobalActionType, ActionType?>,
    -    state: WritableKeyPath<GlobalStateType, StateType>)
    --> Reducer<GlobalActionType, GlobalStateType>
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - -
    - - action - - -
    -

    a read-only key-path from global action into a local action, but it’s optional because maybe this - reducer shouldn’t care about certain actions. Because actions are usually enums, you can switch over - the enum and in case it’s nothing you care about, you simply return nil in the closure. If you don’t - want to lift this reducer in terms of action, just remove this parameter from the call.

    -
    -
    - - state - - -
    -

    a writable key-path from global state that traverses into a local state, by extracting only the part - that it’s relevant for this reducer. This will also be used to set the new local state into the global - state once the reducer finishes it’s operation. For example: \.currentGame.scoreBoard.

    -
    -
    -
    -
    -

    Return Value

    -

    a Reducer<GlobalAction, GlobalState> that maps actions and states from the original specialised - reducer into a more generic and global reducer, to be used in a larger context.

    -
    -
    -
    -
  • -
  • -
    - - - - lift(state:) - -
    -
    -
    -
    -
    -
    -

    A type-lifting method. The global state of your app is Whole, and the Reducer handles Part, that is a -sub-state.

    - -

    Let’s suppose you may want to have a gpsReducer that knows about the following struct:

    -
    struct Location {
    -    let latitude: Double
    -    let longitude: Double
    -}
    -
    - -

    Let’s call it Part. Both, this state and its reducer will be part of an external framework, used by dozens of -apps. Internally probably the Reducer will receive some known ActionType and calculate a new location. On the -main app we have a global state, that we now call Whole.

    -
    struct MyGlobalState {
    -    let title: String?
    -    let listOfItems: [Item]
    -    let currentLocation: Location
    -}
    -
    - -

    As expected, Part (Location) is a property of Whole (MyGlobalState). This relationship could be less -direct, for example there could be several levels of properties until you find the Part in the Whole, like -global.firstLevel.secondLevel.currentLocation, but let’s keep it a single-level for this example.

    - -

    Because our Store understands Whole (MyGlobalState) and our gpsReducer understands Part (Location), we -must lift the Reducer to the Whole level, by using:

    -
    let globalStateReducer = gpsReducer.lift(
    -    action: \.self,
    -    state: \.currentLocation
    -)
    -// where:
    -//   globalStateReducer: Reducer<MyAction, MyGlobalState>
    -//                                             ↑ lift
    -//           gpsReducer: Reducer<MyAction, Location>
    -
    - -

    Now this reducer can be used within our Store or even composed with others. It also can be used in other apps as -long as we have a way to lift it to the world of Whole.

    - -

    Same strategy works for the action, as you can guess by the action KeyPath parameter. You can provide a KeyPath -that takes a global action (Whole) and returns an optional local action (Part). It’s optional because perhaps -you want to ignore actions that are not relevant for this reducer.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func lift<GlobalStateType>(
    -    state: WritableKeyPath<GlobalStateType, StateType>
    -) -> Reducer<ActionType, GlobalStateType>
    - -
    -
    -
    -

    Parameters

    - - - - - - - -
    - - state - - -
    -

    a writable key-path from global state that traverses into a local state, by extracting only the part - that it’s relevant for this reducer. This will also be used to set the new local state into the global - state once the reducer finishes it’s operation. For example: \.currentGame.scoreBoard.

    -
    -
    -
    -
    -

    Return Value

    -

    a Reducer<ActionType, GlobalState> that maps actions and states from the original specialized - reducer into a more generic and global reducer, to be used in a larger context.

    -
    -
    -
    -
  • -
  • -
    - - - - lift(action:) - -
    -
    -
    -
    -
    -
    -

    A type-lifting method. The global state of your app is Whole, and the Reducer handles Part, that is a -sub-state.

    - -

    Let’s suppose you may want to have a gpsReducer that knows about the following struct:

    -
    struct Location {
    -    let latitude: Double
    -    let longitude: Double
    -}
    -
    - -

    Let’s call it Part. Both, this state and its reducer will be part of an external framework, used by dozens of -apps. Internally probably the Reducer will receive some known ActionType and calculate a new location. On the -main app we have a global state, that we now call Whole.

    -
    struct MyGlobalState {
    -    let title: String?
    -    let listOfItems: [Item]
    -    let currentLocation: Location
    -}
    -
    - -

    As expected, Part (Location) is a property of Whole (MyGlobalState). This relationship could be less -direct, for example there could be several levels of properties until you find the Part in the Whole, like -global.firstLevel.secondLevel.currentLocation, but let’s keep it a single-level for this example.

    - -

    Because our Store understands Whole (MyGlobalState) and our gpsReducer understands Part (Location), we -must lift the Reducer to the Whole level, by using:

    -
    let globalStateReducer = gpsReducer.lift(
    -    action: \.self,
    -    state: \.currentLocation
    -)
    -// where:
    -//   globalStateReducer: Reducer<MyAction, MyGlobalState>
    -//                                             ↑ lift
    -//           gpsReducer: Reducer<MyAction, Location>
    -
    - -

    Now this reducer can be used within our Store or even composed with others. It also can be used in other apps as -long as we have a way to lift it to the world of Whole.

    - -

    Same strategy works for the action, as you can guess by the action KeyPath parameter. You can provide a KeyPath -that takes a global action (Whole) and returns an optional local action (Part). It’s optional because perhaps -you want to ignore actions that are not relevant for this reducer.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func lift<GlobalActionType>(
    -    action: KeyPath<GlobalActionType, ActionType?>)
    --> Reducer<GlobalActionType, StateType>
    - -
    -
    -
    -

    Parameters

    - - - - - - - -
    - - action - - -
    -

    a read-only key-path from global action into a local action, but it’s optional because maybe this - reducer shouldn’t care about certain actions. Because actions are usually enums, you can switch over - the enum and in case it’s nothing you care about, you simply return nil in the closure. If you don’t - want to lift this reducer in terms of action, just remove this parameter from the call.

    -
    -
    -
    -
    -

    Return Value

    -

    a Reducer<GlobalAction, StateType> that maps actions and states from the original specialized - reducer into a more generic and global reducer, to be used in a larger context.

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    A type-lifting method for collections. The global state of your app is Whole, and the Reducer handles an element -that is inside of a collection, which itself is sub-state of the global. Let’s call this single element Part.

    - -

    Let’s suppose you may want to have a gpsReducer that knows about the following struct:

    -
    struct Location {
    -    let latitude: Double
    -    let longitude: Double
    -}
    -
    - -

    Let’s call it Part. Both, this state and its reducer will be part of an external framework, used by dozens of -apps. Internally probably the Reducer will receive some known ActionType and calculate a new location. On the -main app we have a global state, that we now call Whole.

    -
    struct MyGlobalState {
    -    let title: String?
    -    let knownLocations: [Location]
    -}
    -
    - -

    As expected, Part (Location) is an element of the array knownLocations, which is property of Whole -(MyGlobalState). This relationship could be less direct, for example there could be several levels of properties -until you find the Part in the Whole, like global.firstLevel.secondLevel.knownLocations, but let’s keep it a -single-level for this example.

    - -

    To resolve this single element, we not only have to find the path to the array, but we have to find the element -inside of the array. There are three methods for doing so: -1) the element is Identifiable (iOS 13 or later) -2) the element has a Hashable property that makes it unique, so we can find it in the array using this identifier -3) using the index of the element in the array

    - -

    Because our Store understands Whole (MyGlobalState) and our gpsReducer understands Part (Location), we -must liftToCollection the Reducer to the Whole level, by using:

    -
    let globalStateReducer = gpsReducer.liftToCollection(
    -    actionMap: \.actionKeyPathToATuple,
    -    state: \.knownLocations
    -)
    -// where:
    -//   globalStateReducer: Reducer<MyAction, MyGlobalState>
    -//                                                 ↑ lift
    -//           gpsReducer: Reducer<LocationAction, Location>
    -
    - -

    Different from simple lift to scalar, this one requires necessarily that you lift the action together with the state. -That’s because your action has to contain the ID or Index of the element we will modify. The actionMap KeyPath has to -give us a tuple of either:

    - -
      -
    • (id, actionToSingleElement)
    • -
    • (index, actionToSingleElement)
    • -
    - -

    The id or index is gonna be how we will search the array for the desired element, and only if we find it, we will run -the gpsReducer for that specific element, using the action that has to do with single elements only.

    - -

    As Location doesn’t have an id property we will have to either use index, implement Identifiable protocol or -give another unique and Hashable property.

    - -

    Now this reducer can be used within our Store or even composed with others. It also can be used in other apps as -long as we have a way to lift it to the world of Whole.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func liftToCollection<GlobalAction, GlobalState, CollectionState: MutableCollection, ID: Hashable>(
    -    action actionMap: KeyPath<GlobalAction, (id: ID, action: ActionType)?>,
    -    stateCollection: WritableKeyPath<GlobalState, CollectionState>,
    -    identifier: KeyPath<StateType, ID>
    -) -> Reducer<GlobalAction, GlobalState> where CollectionState.Element == StateType
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - - - - - -
    - - actionMap - - -
    -

    a read-only key-path from global action into a tuple: (id, local action), but it’s optional because - maybe this reducer shouldn’t care about certain actions.

    -
    -
    - - stateCollection - - -
    -

    a writable key-path from global state that traverses into a local state, by extracting only - the part that it’s relevant for this reducer. This part needs to be a MutableCollection.

    -
    -
    - - identifier - - -
    -

    a key-path to define who is the unique-identifier of the Element (it has to be Hashable)

    -
    -
    -
    -
    -

    Return Value

    -

    a Reducer<GlobalAction, GlobalState> that maps actions and states from the original local reducer, which - is specialised in a single Element, into a more generic and global reducer, to be used in a larger context.

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    A type-lifting method for collections. The global state of your app is Whole, and the Reducer handles an element -that is inside of a collection, which itself is sub-state of the global. Let’s call this single element Part.

    - -

    Let’s suppose you may want to have a gpsReducer that knows about the following struct:

    -
    struct Location {
    -    let latitude: Double
    -    let longitude: Double
    -}
    -
    - -

    Let’s call it Part. Both, this state and its reducer will be part of an external framework, used by dozens of -apps. Internally probably the Reducer will receive some known ActionType and calculate a new location. On the -main app we have a global state, that we now call Whole.

    -
    struct MyGlobalState {
    -    let title: String?
    -    let knownLocations: [Location]
    -}
    -
    - -

    As expected, Part (Location) is an element of the array knownLocations, which is property of Whole -(MyGlobalState). This relationship could be less direct, for example there could be several levels of properties -until you find the Part in the Whole, like global.firstLevel.secondLevel.knownLocations, but let’s keep it a -single-level for this example.

    - -

    To resolve this single element, we not only have to find the path to the array, but we have to find the element -inside of the array. There are three methods for doing so: -1) the element is Identifiable (iOS 13 or later) -2) the element has a Hashable property that makes it unique, so we can find it in the array using this identifier -3) using the index of the element in the array

    - -

    Because our Store understands Whole (MyGlobalState) and our gpsReducer understands Part (Location), we -must liftToCollection the Reducer to the Whole level, by using:

    -
    let globalStateReducer = gpsReducer.liftToCollection(
    -    actionMap: \.actionKeyPathToATuple,
    -    state: \.knownLocations
    -)
    -// where:
    -//   globalStateReducer: Reducer<MyAction, MyGlobalState>
    -//                                                 ↑ lift
    -//           gpsReducer: Reducer<LocationAction, Location>
    -
    - -

    Different from simple lift to scalar, this one requires necessarily that you lift the action together with the state. -That’s because your action has to contain the ID or Index of the element we will modify. The actionMap KeyPath has to -give us a tuple of either:

    - -
      -
    • (id, actionToSingleElement)
    • -
    • (index, actionToSingleElement)
    • -
    - -

    The id or index is gonna be how we will search the array for the desired element, and only if we find it, we will run -the gpsReducer for that specific element, using the action that has to do with single elements only.

    - -

    As Location doesn’t have an id property we will have to either use index, implement Identifiable protocol or -give another unique and Hashable property.

    - -

    Now this reducer can be used within our Store or even composed with others. It also can be used in other apps as -long as we have a way to lift it to the world of Whole.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func liftToCollection<GlobalAction, GlobalState, CollectionState: MutableCollection>(
    -    action actionMap: KeyPath<GlobalAction, (index: CollectionState.Index, action: ActionType)?>,
    -    stateCollection: WritableKeyPath<GlobalState, CollectionState>
    -) -> Reducer<GlobalAction, GlobalState> where CollectionState.Element == StateType
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - -
    - - actionMap - - -
    -

    a read-only key-path from global action into a tuple: (index, local action), but it’s optional because - maybe this reducer shouldn’t care about certain actions.

    -
    -
    - - stateCollection - - -
    -

    a writable key-path from global state that traverses into a local state, by extracting only - the part that it’s relevant for this reducer. This part needs to be a MutableCollection.

    -
    -
    -
    -
    -

    Return Value

    -

    a Reducer<GlobalAction, GlobalState> that maps actions and states from the original local reducer, which - is specialised in a single Element, into a more generic and global reducer, to be used in a larger context.

    -
    -
    -
    -
  • -
-
-
-
- - -
- -

Available where StateType: Identifiable -

-
-
-
    -
  • - -
    -
    -
    -
    -
    -

    A type-lifting method for collections. The global state of your app is Whole, and the Reducer handles an element -that is inside of a collection, which itself is sub-state of the global. Let’s call this single element Part.

    - -

    Let’s suppose you may want to have a gpsReducer that knows about the following struct:

    -
    struct Location {
    -    let latitude: Double
    -    let longitude: Double
    -}
    -
    - -

    Let’s call it Part. Both, this state and its reducer will be part of an external framework, used by dozens of -apps. Internally probably the Reducer will receive some known ActionType and calculate a new location. On the -main app we have a global state, that we now call Whole.

    -
    struct MyGlobalState {
    -    let title: String?
    -    let knownLocations: [Location]
    -}
    -
    - -

    As expected, Part (Location) is an element of the array knownLocations, which is property of Whole -(MyGlobalState). This relationship could be less direct, for example there could be several levels of properties -until you find the Part in the Whole, like global.firstLevel.secondLevel.knownLocations, but let’s keep it a -single-level for this example.

    - -

    To resolve this single element, we not only have to find the path to the array, but we have to find the element -inside of the array. There are three methods for doing so: -1) the element is Identifiable (iOS 13 or later) -2) the element has a Hashable property that makes it unique, so we can find it in the array using this identifier -3) using the index of the element in the array

    - -

    Because our Store understands Whole (MyGlobalState) and our gpsReducer understands Part (Location), we -must liftToCollection the Reducer to the Whole level, by using:

    -
    let globalStateReducer = gpsReducer.liftToCollection(
    -    actionMap: \.actionKeyPathToATuple,
    -    state: \.knownLocations
    -)
    -// where:
    -//   globalStateReducer: Reducer<MyAction, MyGlobalState>
    -//                                                 ↑ lift
    -//           gpsReducer: Reducer<LocationAction, Location>
    -
    - -

    Different from simple lift to scalar, this one requires necessarily that you lift the action together with the state. -That’s because your action has to contain the ID or Index of the element we will modify. The actionMap KeyPath has to -give us a tuple of either:

    - -
      -
    • (id, actionToSingleElement)
    • -
    • (index, actionToSingleElement)
    • -
    - -

    The id or index is gonna be how we will search the array for the desired element, and only if we find it, we will run -the gpsReducer for that specific element, using the action that has to do with single elements only.

    - -

    As Location doesn’t have an id property we will have to either use index, implement Identifiable protocol or -give another unique and Hashable property.

    - -

    Now this reducer can be used within our Store or even composed with others. It also can be used in other apps as -long as we have a way to lift it to the world of Whole.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func liftToCollection<GlobalAction, GlobalState, CollectionState: MutableCollection>(
    -    action actionMap: KeyPath<GlobalAction, (id: StateType.ID, action: ActionType)?>,
    -    stateCollection: WritableKeyPath<GlobalState, CollectionState>
    -) -> Reducer<GlobalAction, GlobalState> where CollectionState.Element == StateType
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - -
    - - actionMap - - -
    -

    a read-only key-path from global action into a tuple: (id, local action), but it’s optional because - maybe this reducer shouldn’t care about certain actions.

    -
    -
    - - stateCollection - - -
    -

    a writable key-path from global state that traverses into a local state, by extracting only - the part that it’s relevant for this reducer. This part needs to be a MutableCollection.

    -
    -
    -
    -
    -

    Return Value

    -

    a Reducer<GlobalAction, GlobalState> that maps actions and states from the original local reducer, which - is specialised in a single Element, into a more generic and global reducer, to be used in a larger context.

    -
    -
    -
    -
  • -
-
-
-
- -
-
- - diff --git a/docs/api/Reducer/docsets/Reducer.docset/Contents/Resources/Documents/Structs/ReducerBuilder.html b/docs/api/Reducer/docsets/Reducer.docset/Contents/Resources/Documents/Structs/ReducerBuilder.html deleted file mode 100644 index aa0ef59..0000000 --- a/docs/api/Reducer/docsets/Reducer.docset/Contents/Resources/Documents/Structs/ReducerBuilder.html +++ /dev/null @@ -1,130 +0,0 @@ - - - - ReducerBuilder Structure Reference - - - - - - - - - - - - - -
-
-

Reducer 0.9.0 Docs (100% documented)

-
-
- -
-
-
-
-
- -
-
- -
-
-
-

ReducerBuilder

-
-
- -
@resultBuilder
-public struct ReducerBuilder
- -
-
-

DSL Builder for Reducer compose

- -
-
-
-
    -
  • -
    - - - - buildBlock(_:) - -
    -
    -
    -
    -
    -
    -

    DSL Builder for Reducer compose

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func buildBlock<Action, State>(_ rs: Reducer<Action, State>...) -> Reducer<Action, State>
    - -
    -
    -
    -

    Parameters

    - - - - - - - -
    - - rs - - -
    -

    the reducers to be combined/

    -
    -
    -
    -
    -

    Return Value

    -

    the composed reducer that will run all the inner reducers sequentially/

    -
    -
    -
    -
  • -
-
-
-
- -
-
- - diff --git a/docs/api/Reducer/docsets/Reducer.docset/Contents/Resources/Documents/badge.svg b/docs/api/Reducer/docsets/Reducer.docset/Contents/Resources/Documents/badge.svg deleted file mode 100644 index a096fec..0000000 --- a/docs/api/Reducer/docsets/Reducer.docset/Contents/Resources/Documents/badge.svg +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - documentation - - - documentation - - - 100% - - - 100% - - - diff --git a/docs/api/Reducer/docsets/Reducer.docset/Contents/Resources/Documents/css/highlight.css b/docs/api/Reducer/docsets/Reducer.docset/Contents/Resources/Documents/css/highlight.css deleted file mode 100644 index c170357..0000000 --- a/docs/api/Reducer/docsets/Reducer.docset/Contents/Resources/Documents/css/highlight.css +++ /dev/null @@ -1,202 +0,0 @@ -/*! Jazzy - https://github.com/realm/jazzy - * Copyright Realm Inc. - * SPDX-License-Identifier: MIT - */ -/* Credit to https://gist.github.com/wataru420/2048287 */ -.highlight .c { - color: #999988; - font-style: italic; } - -.highlight .err { - color: #a61717; - background-color: #e3d2d2; } - -.highlight .k { - color: #000000; - font-weight: bold; } - -.highlight .o { - color: #000000; - font-weight: bold; } - -.highlight .cm { - color: #999988; - font-style: italic; } - -.highlight .cp { - color: #999999; - font-weight: bold; } - -.highlight .c1 { - color: #999988; - font-style: italic; } - -.highlight .cs { - color: #999999; - font-weight: bold; - font-style: italic; } - -.highlight .gd { - color: #000000; - background-color: #ffdddd; } - -.highlight .gd .x { - color: #000000; - background-color: #ffaaaa; } - -.highlight .ge { - color: #000000; - font-style: italic; } - -.highlight .gr { - color: #aa0000; } - -.highlight .gh { - color: #999999; } - -.highlight .gi { - color: #000000; - background-color: #ddffdd; } - -.highlight .gi .x { - color: #000000; - background-color: #aaffaa; } - -.highlight .go { - color: #888888; } - -.highlight .gp { - color: #555555; } - -.highlight .gs { - font-weight: bold; } - -.highlight .gu { - color: #aaaaaa; } - -.highlight .gt { - color: #aa0000; } - -.highlight .kc { - color: #000000; - font-weight: bold; } - -.highlight .kd { - color: #000000; - font-weight: bold; } - -.highlight .kp { - color: #000000; - font-weight: bold; } - -.highlight .kr { - color: #000000; - font-weight: bold; } - -.highlight .kt { - color: #445588; } - -.highlight .m { - color: #009999; } - -.highlight .s { - color: #d14; } - -.highlight .na { - color: #008080; } - -.highlight .nb { - color: #0086B3; } - -.highlight .nc { - color: #445588; - font-weight: bold; } - -.highlight .no { - color: #008080; } - -.highlight .ni { - color: #800080; } - -.highlight .ne { - color: #990000; - font-weight: bold; } - -.highlight .nf { - color: #990000; } - -.highlight .nn { - color: #555555; } - -.highlight .nt { - color: #000080; } - -.highlight .nv { - color: #008080; } - -.highlight .ow { - color: #000000; - font-weight: bold; } - -.highlight .w { - color: #bbbbbb; } - -.highlight .mf { - color: #009999; } - -.highlight .mh { - color: #009999; } - -.highlight .mi { - color: #009999; } - -.highlight .mo { - color: #009999; } - -.highlight .sb { - color: #d14; } - -.highlight .sc { - color: #d14; } - -.highlight .sd { - color: #d14; } - -.highlight .s2 { - color: #d14; } - -.highlight .se { - color: #d14; } - -.highlight .sh { - color: #d14; } - -.highlight .si { - color: #d14; } - -.highlight .sx { - color: #d14; } - -.highlight .sr { - color: #009926; } - -.highlight .s1 { - color: #d14; } - -.highlight .ss { - color: #990073; } - -.highlight .bp { - color: #999999; } - -.highlight .vc { - color: #008080; } - -.highlight .vg { - color: #008080; } - -.highlight .vi { - color: #008080; } - -.highlight .il { - color: #009999; } diff --git a/docs/api/Reducer/docsets/Reducer.docset/Contents/Resources/Documents/css/jazzy.css b/docs/api/Reducer/docsets/Reducer.docset/Contents/Resources/Documents/css/jazzy.css deleted file mode 100644 index 2e38713..0000000 --- a/docs/api/Reducer/docsets/Reducer.docset/Contents/Resources/Documents/css/jazzy.css +++ /dev/null @@ -1,439 +0,0 @@ -/*! Jazzy - https://github.com/realm/jazzy - * Copyright Realm Inc. - * SPDX-License-Identifier: MIT - */ -html, body, div, span, h1, h3, h4, p, a, code, em, img, ul, li, table, tbody, tr, td { - background: transparent; - border: 0; - margin: 0; - outline: 0; - padding: 0; - vertical-align: baseline; } - -body { - background-color: #f2f2f2; - font-family: Helvetica, freesans, Arial, sans-serif; - font-size: 14px; - -webkit-font-smoothing: subpixel-antialiased; - word-wrap: break-word; } - -h1, h2, h3 { - margin-top: 0.8em; - margin-bottom: 0.3em; - font-weight: 100; - color: black; } - -h1 { - font-size: 2.5em; } - -h2 { - font-size: 2em; - border-bottom: 1px solid #e2e2e2; } - -h4 { - font-size: 13px; - line-height: 1.5; - margin-top: 21px; } - -h5 { - font-size: 1.1em; } - -h6 { - font-size: 1.1em; - color: #777; } - -.section-name { - color: gray; - display: block; - font-family: Helvetica; - font-size: 22px; - font-weight: 100; - margin-bottom: 15px; } - -pre, code { - font: 0.95em Menlo, monospace; - color: #777; - word-wrap: normal; } - -p code, li code { - background-color: #eee; - padding: 2px 4px; - border-radius: 4px; } - -pre > code { - padding: 0; } - -a { - color: #0088cc; - text-decoration: none; } - a code { - color: inherit; } - -ul { - padding-left: 15px; } - -li { - line-height: 1.8em; } - -img { - max-width: 100%; } - -blockquote { - margin-left: 0; - padding: 0 10px; - border-left: 4px solid #ccc; } - -hr { - height: 1px; - border: none; - background-color: #e2e2e2; } - -.footnote-ref { - display: inline-block; - scroll-margin-top: 70px; } - -.footnote-def { - scroll-margin-top: 70px; } - -.content-wrapper { - margin: 0 auto; - width: 980px; } - -header { - font-size: 0.85em; - line-height: 32px; - background-color: #414141; - position: fixed; - width: 100%; - z-index: 3; } - header img { - padding-right: 6px; - vertical-align: -3px; - height: 16px; } - header a { - color: #fff; } - header p { - float: left; - color: #999; } - header .header-right { - float: right; - margin-left: 16px; } - -#breadcrumbs { - background-color: #f2f2f2; - height: 21px; - padding-top: 17px; - position: fixed; - width: 100%; - z-index: 2; - margin-top: 32px; } - #breadcrumbs #carat { - height: 10px; - margin: 0 5px; } - -.sidebar { - background-color: #f9f9f9; - border: 1px solid #e2e2e2; - overflow-y: auto; - overflow-x: hidden; - position: fixed; - top: 70px; - bottom: 0; - width: 230px; - word-wrap: normal; } - -.nav-groups { - list-style-type: none; - background: #fff; - padding-left: 0; } - -.nav-group-name { - border-bottom: 1px solid #e2e2e2; - font-size: 1.1em; - font-weight: 100; - padding: 15px 0 15px 20px; } - .nav-group-name > a { - color: #333; } - -.nav-group-tasks { - margin-top: 5px; } - -.nav-group-task { - font-size: 0.9em; - list-style-type: none; - white-space: nowrap; } - .nav-group-task a { - color: #888; } - -.main-content { - background-color: #fff; - border: 1px solid #e2e2e2; - margin-left: 246px; - position: absolute; - overflow: hidden; - padding-bottom: 20px; - top: 70px; - width: 734px; } - .main-content p, .main-content a, .main-content code, .main-content em, .main-content ul, .main-content table, .main-content blockquote { - margin-bottom: 1em; } - .main-content p { - line-height: 1.8em; } - .main-content section .section:first-child { - margin-top: 0; - padding-top: 0; } - .main-content section .task-group-section .task-group:first-of-type { - padding-top: 10px; } - .main-content section .task-group-section .task-group:first-of-type .section-name { - padding-top: 15px; } - .main-content section .heading:before { - content: ""; - display: block; - padding-top: 70px; - margin: -70px 0 0; } - .main-content .section-name p { - margin-bottom: inherit; - line-height: inherit; } - .main-content .section-name code { - background-color: inherit; - padding: inherit; - color: inherit; } - -.section { - padding: 0 25px; } - -.highlight { - background-color: #eee; - padding: 10px 12px; - border: 1px solid #e2e2e2; - border-radius: 4px; - overflow-x: auto; } - -.declaration .highlight { - overflow-x: initial; - padding: 0 40px 40px 0; - margin-bottom: -25px; - background-color: transparent; - border: none; } - -.section-name { - margin: 0; - margin-left: 18px; } - -.task-group-section { - margin-top: 10px; - padding-left: 6px; - border-top: 1px solid #e2e2e2; } - -.task-group { - padding-top: 0px; } - -.task-name-container a[name]:before { - content: ""; - display: block; - padding-top: 70px; - margin: -70px 0 0; } - -.section-name-container { - position: relative; - display: inline-block; } - .section-name-container .section-name-link { - position: absolute; - top: 0; - left: 0; - bottom: 0; - right: 0; - margin-bottom: 0; } - .section-name-container .section-name { - position: relative; - pointer-events: none; - z-index: 1; } - .section-name-container .section-name a { - pointer-events: auto; } - -.item { - padding-top: 8px; - width: 100%; - list-style-type: none; } - .item a[name]:before { - content: ""; - display: block; - padding-top: 70px; - margin: -70px 0 0; } - .item code { - background-color: transparent; - padding: 0; } - .item .token, .item .direct-link { - display: inline-block; - text-indent: -20px; - padding-left: 3px; - margin-left: 35px; - font-size: 11.9px; - transition: all 300ms; } - .item .token-open { - margin-left: 20px; } - .item .discouraged { - text-decoration: line-through; } - .item .declaration-note { - font-size: .85em; - color: gray; - font-style: italic; } - -.pointer-container { - border-bottom: 1px solid #e2e2e2; - left: -23px; - padding-bottom: 13px; - position: relative; - width: 110%; } - -.pointer { - background: #f9f9f9; - border-left: 1px solid #e2e2e2; - border-top: 1px solid #e2e2e2; - height: 12px; - left: 21px; - top: -7px; - -webkit-transform: rotate(45deg); - -moz-transform: rotate(45deg); - -o-transform: rotate(45deg); - transform: rotate(45deg); - position: absolute; - width: 12px; } - -.height-container { - display: none; - left: -25px; - padding: 0 25px; - position: relative; - width: 100%; - overflow: hidden; } - .height-container .section { - background: #f9f9f9; - border-bottom: 1px solid #e2e2e2; - left: -25px; - position: relative; - width: 100%; - padding-top: 10px; - padding-bottom: 5px; } - -.aside, .language { - padding: 6px 12px; - margin: 12px 0; - border-left: 5px solid #dddddd; - overflow-y: hidden; } - .aside .aside-title, .language .aside-title { - font-size: 9px; - letter-spacing: 2px; - text-transform: uppercase; - padding-bottom: 0; - margin: 0; - color: #aaa; - -webkit-user-select: none; } - .aside p:last-child, .language p:last-child { - margin-bottom: 0; } - -.language { - border-left: 5px solid #cde9f4; } - .language .aside-title { - color: #4b8afb; } - -.aside-warning, .aside-deprecated, .aside-unavailable { - border-left: 5px solid #ff6666; } - .aside-warning .aside-title, .aside-deprecated .aside-title, .aside-unavailable .aside-title { - color: #ff0000; } - -.graybox { - border-collapse: collapse; - width: 100%; } - .graybox p { - margin: 0; - word-break: break-word; - min-width: 50px; } - .graybox td { - border: 1px solid #e2e2e2; - padding: 5px 25px 5px 10px; - vertical-align: middle; } - .graybox tr td:first-of-type { - text-align: right; - padding: 7px; - vertical-align: top; - word-break: normal; - width: 40px; } - -.slightly-smaller { - font-size: 0.9em; } - -#footer { - position: relative; - top: 10px; - bottom: 0px; - margin-left: 25px; } - #footer p { - margin: 0; - color: #aaa; - font-size: 0.8em; } - -html.dash header, html.dash #breadcrumbs, html.dash .sidebar { - display: none; } - -html.dash .main-content { - width: 980px; - margin-left: 0; - border: none; - width: 100%; - top: 0; - padding-bottom: 0; } - -html.dash .height-container { - display: block; } - -html.dash .item .token { - margin-left: 0; } - -html.dash .content-wrapper { - width: auto; } - -html.dash #footer { - position: static; } - -form[role=search] { - float: right; } - form[role=search] input { - font: Helvetica, freesans, Arial, sans-serif; - margin-top: 6px; - font-size: 13px; - line-height: 20px; - padding: 0px 10px; - border: none; - border-radius: 1em; } - .loading form[role=search] input { - background: white url(../img/spinner.gif) center right 4px no-repeat; } - form[role=search] .tt-menu { - margin: 0; - min-width: 300px; - background: #fff; - color: #333; - border: 1px solid #e2e2e2; - z-index: 4; } - form[role=search] .tt-highlight { - font-weight: bold; } - form[role=search] .tt-suggestion { - font: Helvetica, freesans, Arial, sans-serif; - font-size: 14px; - padding: 0 8px; } - form[role=search] .tt-suggestion span { - display: table-cell; - white-space: nowrap; } - form[role=search] .tt-suggestion .doc-parent-name { - width: 100%; - text-align: right; - font-weight: normal; - font-size: 0.9em; - padding-left: 16px; } - form[role=search] .tt-suggestion:hover, - form[role=search] .tt-suggestion.tt-cursor { - cursor: pointer; - background-color: #4183c4; - color: #fff; } - form[role=search] .tt-suggestion:hover .doc-parent-name, - form[role=search] .tt-suggestion.tt-cursor .doc-parent-name { - color: #fff; } diff --git a/docs/api/Reducer/docsets/Reducer.docset/Contents/Resources/Documents/img/carat.png b/docs/api/Reducer/docsets/Reducer.docset/Contents/Resources/Documents/img/carat.png deleted file mode 100755 index 29d2f7f..0000000 Binary files a/docs/api/Reducer/docsets/Reducer.docset/Contents/Resources/Documents/img/carat.png and /dev/null differ diff --git a/docs/api/Reducer/docsets/Reducer.docset/Contents/Resources/Documents/img/dash.png b/docs/api/Reducer/docsets/Reducer.docset/Contents/Resources/Documents/img/dash.png deleted file mode 100755 index 6f694c7..0000000 Binary files a/docs/api/Reducer/docsets/Reducer.docset/Contents/Resources/Documents/img/dash.png and /dev/null differ diff --git a/docs/api/Reducer/docsets/Reducer.docset/Contents/Resources/Documents/img/spinner.gif b/docs/api/Reducer/docsets/Reducer.docset/Contents/Resources/Documents/img/spinner.gif deleted file mode 100644 index e3038d0..0000000 Binary files a/docs/api/Reducer/docsets/Reducer.docset/Contents/Resources/Documents/img/spinner.gif and /dev/null differ diff --git a/docs/api/Reducer/docsets/Reducer.docset/Contents/Resources/Documents/index.html b/docs/api/Reducer/docsets/Reducer.docset/Contents/Resources/Documents/index.html deleted file mode 100644 index c1df453..0000000 --- a/docs/api/Reducer/docsets/Reducer.docset/Contents/Resources/Documents/index.html +++ /dev/null @@ -1,366 +0,0 @@ - - - - Reducer Reference - - - - - - - - - - - - -
-
-

Reducer 0.9.0 Docs (100% documented)

-
-
- -
-
-
-
-
- -
-
- -
-
-
- -

- SwiftRex

- Unidirectional Dataflow for your favourite reactive framework

-

- -

Build Status -codecov -Jazzy Documentation -CocoaPods compatible -Swift Package Manager compatible - -Platform support -License Apache 2.0

- -

If you’ve got questions, about SwiftRex or redux and Functional Programming in general, please Join our Slack Channel.

-

SwiftRex

- -

This is part of “SwiftRex library”. Please read the library documentation to have full context about what Reducer is used for.

- -

SwiftRex is a framework that combines Unidirectional Dataflow architecture and reactive programming (Combine, RxSwift or ReactiveSwift), providing a central state Store for the whole state of your app, of which your SwiftUI Views or UIViewControllers can observe and react to, as well as dispatching events coming from the user interactions.

- -

This pattern, also known as “Redux”, allows us to rethink our app as a single pure function that receives user events as input and returns UI changes in response. The benefits of this workflow will hopefully become clear soon.

- -

API documentation can be found here.

-

Reducer

- -

Reducer is a pure function wrapped in a monoid container, that takes an action and the current state to calculate the new state.

- -

The MiddlewareProtocol pipeline can do two things: dispatch outgoing actions and handling incoming actions. But what they can NOT do is changing the app state. Middlewares have read-only access to the up-to-date state of our apps, but when mutations are required we use the MutableReduceFunction function:

-
(ActionType, inout StateType) -> Void
-
- -

Which has the same semantics (but better performance) than old ReduceFunction:

-
(ActionType, StateType) -> StateType
-
- -

Given an action and the current state (as a mutable inout), it calculates the new state and changes it:

-
initial state is 42
-action: increment
-reducer: increment 42 => new state 43
-
-current state is 43
-action: decrement
-reducer: decrement 43 => new state 42
-
-current state is 42
-action: half
-reducer: half 42 => new state 21
-
- -

The function is reducing all the actions in a cached state, and that happens incrementally for each new incoming action.

- -

It’s important to understand that reducer is a synchronous operations that calculates a new state without any kind of side-effect (including non-obvious ones as creating Date(), using DispatchQueue or Locale.current), so never add properties to the Reducer structs or call any external function. If you are tempted to do that, please create a middleware and dispatch actions with Dates or Locales from it.

- -

Reducers are also responsible for keeping the consistency of a state, so it’s always good to do a final sanity check before changing the state, like for example check other dependant properties that must be changed together.

- -

Once the reducer function executes, the store will update its single source-of-truth with the new calculated state, and propagate it to all its subscribers, that will react to the new state and update Views, for example.

- -

This function is wrapped in a struct to overcome some Swift limitations, for example, allowing us to compose multiple reducers into one (monoid operation, where two or more reducers become a single one) or lifting reducers from local types to global types.

- -

The ability to lift reducers allow us to write fine-grained “sub-reducer” that will handle only a subset of the state and/or action, place it in different frameworks and modules, and later plugged into a bigger state and action handler by providing a way to map state and actions between the global and local ones. For more information about that, please check Lifting.

- -

A possible implementation of a reducer would be:

-
let volumeReducer = Reducer<VolumeAction, VolumeState>.reduce { action, currentState in
-    switch action {
-    case .louder:
-        currentState = VolumeState(
-            isMute: false, // When increasing the volume, always unmute it.
-            volume: min(100, currentState.volume + 5)
-        )
-    case .quieter:
-        currentState = VolumeState(
-            isMute: currentState.isMute,
-            volume: max(0, currentState.volume - 5)
-        )
-    case .toggleMute:
-        currentState = VolumeState(
-            isMute: !currentState.isMute,
-            volume: currentState.volume
-        )
-    }
-}
-
- -

Please notice from the example above the following good practices:

- -
    -
  • No DispatchQueue, threading, operation queue, promises, reactive code in there.
  • -
  • All you need to implement this function is provided by the arguments action and currentState, don’t use any other variable coming from global scope, not even for reading purposes. If you need something else, it should either be in the state or come in the action payload.
  • -
  • Do not start side-effects, requests, I/O, database calls.
  • -
  • Avoid default when writing switch/case statements. That way the compiler will help you more.
  • -
  • Make the action and the state generic parameters as much specialised as you can. If volume state is part of a bigger state, you should not be tempted to pass the whole big state into this reducer. Make it short, brief and specialised, this also helps preventing default case or having to re-assign properties that are never mutated by this reducer.
  • -
-
                                                                                                                    ┌────────┐                                     
-                                                       IO closure                                                ┌─▶│ View 1 │                                     
-                      ┌─────┐                          (don't run yet)                       ┌─────┐             │  └────────┘                                     
-                      │     │ handle  ┌──────────┐  ┌───────────────────────────────────────▶│     │ send        │  ┌────────┐                                     
-                      │     ├────────▶│Middleware│──┘                                        │     │────────────▶├─▶│ View 2 │                                     
-                      │     │ Action  │ Pipeline │──┐  ┌─────┐ reduce ┌──────────┐           │     │ New state   │  └────────┘                                     
-                      │     │         └──────────┘  └─▶│     │───────▶│ Reducer  │──────────▶│     │             │  ┌────────┐                                     
-    ┌──────┐ dispatch │     │                          │Store│ Action │ Pipeline │ New state │     │             └─▶│ View 3 │                                     
-    │Button│─────────▶│Store│                          │     │ +      └──────────┘           │Store│                └────────┘                                     
-    └──────┘ Action   │     │                          └─────┘ State                         │     │                                   dispatch    ┌─────┐         
-                      │     │                                                                │     │       ┌─────────────────────────┐ New Action  │     │         
-                      │     │                                                                │     │─run──▶│       IO closure        ├────────────▶│Store│─ ─ ▶ ...
-                      │     │                                                                │     │       │                         │             │     │         
-                      │     │                                                                │     │       └─┬───────────────────────┘             └─────┘         
-                      └─────┘                                                                └─────┘         │                     ▲                               
-                                                                                                      request│ side-effects        │side-effects                   
-                                                                                                             ▼                      response                       
-                                                                                                        ┌ ─ ─ ─ ─ ─                │                               
-                                                                                                          External │─ ─ async ─ ─ ─                                
-                                                                                                        │  World                                                   
-                                                                                                         ─ ─ ─ ─ ─ ┘                                               
-
-

Lifting

- - -

Lifting

- -

An app can be a complex product, performing several activities that not necessarily are related. For example, the same app may need to perform a request to a weather API, check the current user location using CLLocation and read preferences from UserDefaults.

- -

Although these activities are combined to create the full experience, they can be isolated from each other in order to avoid URLSession logic and CLLocation logic in the same place, competing for the same resources and potentially causing race conditions. Also, testing these parts in isolation is often easier and leads to more significant tests.

- -

Ideally we should organise our AppState and AppAction to account for these parts as isolated trees. In the example above, we could have 3 different properties in our AppState and 3 different enum cases in our AppAction to group state and actions related to the weather API, to the user location and to the UserDefaults access.

- -

This gets even more helpful in case we split our app in 3 types of Reducer and 3 types of MiddlewareProtocol, and each of them work not on the full AppState and AppAction, but in the 3 paths we grouped in our model. The first pair of Reducer and MiddlewareProtocol would be generic over WeatherState and WeatherAction, the second pair over LocationState and LocationAction and the third pair over RepositoryState and RepositoryAction. They could even be in different frameworks, so the compiler will forbid us from coupling Weather API code with CLLocation code, which is great as this enforces better practices and unlocks code reusability. Maybe our CLLocation middleware/reducer can be useful in a completely different app that checks for public transport routes.

- -

But at some point we want to put these 3 different types of entities together, and the StoreType of our app “speaks” AppAction and AppState, not the subsets used by the specialised handlers.

-
enum AppAction {
-    case weather(WeatherAction)
-    case location(LocationAction)
-    case repository(RepositoryAction)
-}
-struct AppState {
-    let weather: WeatherState
-    let location: LocationState
-    let repository: RepositoryState
-}
-
- -

Given a reducer that is generic over WeatherAction and WeatherState, we can “lift” it to the global types AppAction and AppState by telling this reducer how to find in the global tree the properties that it needs. That would be \AppAction.weather and \AppState.weather. The same can be done for the middleware, and for the other 2 reducers and middlewares of our app.

- -

When all of them are lifted to a common type, they can be combined together using Reducer.compose(reducer1, reducer2, reducer3...) function, or the DSL form:

-
Reducer.compose {
-    reducer1
-
-    reducer2
-
-    Reducer
-        .login
-        .lift(action: \.loginAction, state: \.loginState)
-
-    Reducer
-        .lifecycle
-        .lift(action: \.lifecycleAction, state: \.lifecycleState)
-
-    Reducer.app
-
-    Reducer.reduce { action, state in
-        // some inline reducer
-    }
-
-}
-
- -
-

IMPORTANT: Because enums in Swift don’t have KeyPath as structs do, we strongly recommend reading Action Enum Properties document and implementing properties for each case, either manually or using code generators, so later you avoid writing lots and lots of error-prone switch/case. We also offer some templates to help you on that.

-
- -

Let’s explore how to lift reducers and middlewares.

-

Lifting Reducer

- -

Reducer has AppAction INPUT, AppState INPUT and AppState OUTPUT, because it can only handle actions (never dispatch them), read the state and write the state.

- -

The lifting direction, therefore, should be:

-
Reducer:
-- ReducerAction? ← AppAction
-- ReducerState ←→ AppState
-
- -

Given:

-
//      type 1         type 2
-Reducer<ReducerAction, ReducerState>
-
- -

Transformations:

-
                                                                                 ╔═══════════════════╗
-                                                                                 ║                   ║
-                       ╔═══════════════╗                                         ║                   ║
-                       ║    Reducer    ║ .lift                                   ║       Store       ║
-                       ╚═══════════════╝                                         ║                   ║
-                               │                                                 ║                   ║
-                                                                                 ╚═══════════════════╝
-                               │                                                           │          
-
-                               │                                                           │          
-                                                                                     ┌───────────┐    
-                         ┌─────┴─────┐   (AppAction) -> ReducerAction?               │           │    
-┌ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┐    │  Reducer  │   { $0.case?.reducerAction }                  │           │    
-    Input Action         │  Action   │◀──────────────────────────────────────────────│ AppAction │    
-└ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┘    │           │   KeyPath<AppAction, ReducerAction?>          │           │    
-                         └─────┬─────┘   \AppAction.case?.reducerAction              │           │    
-                                                                                     └───────────┘    
-                               │                                                           │          
-
-                               │         get: (AppState) -> ReducerState                   │          
-                                         { $0.reducerState }                         ┌───────────┐    
-                         ┌─────┴─────┐   set: (inout AppState, ReducerState) -> Void │           │    
-┌ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┐    │  Reducer  │   { $0.reducerState = $1 }                    │           │    
-        State            │   State   │◀─────────────────────────────────────────────▶│ AppState  │    
-└ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┘    │           │   WritableKeyPath<AppState, ReducerState>     │           │    
-                         └─────┬─────┘   \AppState.reducerState                      │           │    
-                                                                                     └───────────┘    
-                               │                                                           │          
-
-
Lifting Reducer using closures:
-
.lift(
-    actionGetter: { (action: AppAction) -> ReducerAction? /* type 1 */ in 
-        // prism3 has associated value of ReducerAction,
-        // and whole thing is Optional because Prism is always optional
-        action.prism1?.prism2?.prism3
-    },
-    stateGetter: { (state: AppState) -> ReducerState /* type 2 */ in 
-        // property2: ReducerState
-        state.property1.property2
-    },
-    stateSetter: { (state: inout AppState, newValue: ReducerState /* type 2 */) -> Void in 
-        // property2: ReducerState
-        state.property1.property2 = newValue
-    }
-)
-
- -

Steps:

- -
    -
  • Start plugging the 2 types from the Reducer into the 3 closure headers.
  • -
  • For type 1, find a prism that resolves from AppAction into the matching type. BE SURE TO RUN SOURCERY AND HAVING ALL ENUM CASES COVERED BY PRISM
  • -
  • For type 2 on the stateGetter closure, find lenses (property getters) that resolve from AppState into the matching type.
  • -
  • For type 2 on the stateSetter closure, find lenses (property setters) that can change the global state receive to the newValue received. Be sure that everything is writeable.
  • -
-
Lifting Reducer using KeyPath:
-
.lift(
-    action: \AppAction.prism1?.prism2?.prism3,
-    state: \AppState.property1.property2
-)
-
- -

Steps:

- -
    -
  • Start with the closure example above
  • -
  • For action, we can use KeyPath from \AppAction traversing the prism tree
  • -
  • For state, we can use WritableKeyPath from \AppState traversing the properties as long as all of them are declared as var, not let.
  • -
-

Functional Helpers

- -

Identity:

- -
    -
  • when some parts of your lift should be unchanged because they are already in the expected type
  • -
  • lift that using identity, which is { $0 }
  • -
-

Xcode Snippets:

-
// Reducer closure
-.lift(
-    actionGetter: { (action: AppAction) -> <#LocalAction#>? in action.<#something?.child#> },
-    stateGetter: { (state: AppState) -> <#LocalState#> in state.<#something.child#> },
-    stateSetter: { (state: inout AppState, newValue: <#LocalState#>) -> Void in state.<#something.child#> = newValue }
-)
-
-// Reducer KeyPath:
-.lift(
-    action: \AppAction.<#something?.child#>,
-    state: \AppState.<#something.child#>
-)
-
-

Installation

- -

Please use SwiftRex installation instructions, instead. Reducers are not supposed to be used independently from SwiftRex.

- -
-
- -
-
- - diff --git a/docs/api/Reducer/docsets/Reducer.docset/Contents/Resources/Documents/js/jazzy.js b/docs/api/Reducer/docsets/Reducer.docset/Contents/Resources/Documents/js/jazzy.js deleted file mode 100755 index 1984416..0000000 --- a/docs/api/Reducer/docsets/Reducer.docset/Contents/Resources/Documents/js/jazzy.js +++ /dev/null @@ -1,74 +0,0 @@ -// Jazzy - https://github.com/realm/jazzy -// Copyright Realm Inc. -// SPDX-License-Identifier: MIT - -window.jazzy = {'docset': false} -if (typeof window.dash != 'undefined') { - document.documentElement.className += ' dash' - window.jazzy.docset = true -} -if (navigator.userAgent.match(/xcode/i)) { - document.documentElement.className += ' xcode' - window.jazzy.docset = true -} - -function toggleItem($link, $content) { - var animationDuration = 300; - $link.toggleClass('token-open'); - $content.slideToggle(animationDuration); -} - -function itemLinkToContent($link) { - return $link.parent().parent().next(); -} - -// On doc load + hash-change, open any targetted item -function openCurrentItemIfClosed() { - if (window.jazzy.docset) { - return; - } - var $link = $(`a[name="${location.hash.substring(1)}"]`).nextAll('.token'); - $content = itemLinkToContent($link); - if ($content.is(':hidden')) { - toggleItem($link, $content); - } -} - -$(openCurrentItemIfClosed); -$(window).on('hashchange', openCurrentItemIfClosed); - -// On item link ('token') click, toggle its discussion -$('.token').on('click', function(event) { - if (window.jazzy.docset) { - return; - } - var $link = $(this); - toggleItem($link, itemLinkToContent($link)); - - // Keeps the document from jumping to the hash. - var href = $link.attr('href'); - if (history.pushState) { - history.pushState({}, '', href); - } else { - location.hash = href; - } - event.preventDefault(); -}); - -// Clicks on links to the current, closed, item need to open the item -$("a:not('.token')").on('click', function() { - if (location == this.href) { - openCurrentItemIfClosed(); - } -}); - -// KaTeX rendering -if ("katex" in window) { - $($('.math').each( (_, element) => { - katex.render(element.textContent, element, { - displayMode: $(element).hasClass('m-block'), - throwOnError: false, - trust: true - }); - })) -} diff --git a/docs/api/Reducer/docsets/Reducer.docset/Contents/Resources/Documents/js/jazzy.search.js b/docs/api/Reducer/docsets/Reducer.docset/Contents/Resources/Documents/js/jazzy.search.js deleted file mode 100644 index 359cdbb..0000000 --- a/docs/api/Reducer/docsets/Reducer.docset/Contents/Resources/Documents/js/jazzy.search.js +++ /dev/null @@ -1,74 +0,0 @@ -// Jazzy - https://github.com/realm/jazzy -// Copyright Realm Inc. -// SPDX-License-Identifier: MIT - -$(function(){ - var $typeahead = $('[data-typeahead]'); - var $form = $typeahead.parents('form'); - var searchURL = $form.attr('action'); - - function displayTemplate(result) { - return result.name; - } - - function suggestionTemplate(result) { - var t = '
'; - t += '' + result.name + ''; - if (result.parent_name) { - t += '' + result.parent_name + ''; - } - t += '
'; - return t; - } - - $typeahead.one('focus', function() { - $form.addClass('loading'); - - $.getJSON(searchURL).then(function(searchData) { - const searchIndex = lunr(function() { - this.ref('url'); - this.field('name'); - this.field('abstract'); - for (const [url, doc] of Object.entries(searchData)) { - this.add({url: url, name: doc.name, abstract: doc.abstract}); - } - }); - - $typeahead.typeahead( - { - highlight: true, - minLength: 3, - autoselect: true - }, - { - limit: 10, - display: displayTemplate, - templates: { suggestion: suggestionTemplate }, - source: function(query, sync) { - const lcSearch = query.toLowerCase(); - const results = searchIndex.query(function(q) { - q.term(lcSearch, { boost: 100 }); - q.term(lcSearch, { - boost: 10, - wildcard: lunr.Query.wildcard.TRAILING - }); - }).map(function(result) { - var doc = searchData[result.ref]; - doc.url = result.ref; - return doc; - }); - sync(results); - } - } - ); - $form.removeClass('loading'); - $typeahead.trigger('focus'); - }); - }); - - var baseURL = searchURL.slice(0, -"search.json".length); - - $typeahead.on('typeahead:select', function(e, result) { - window.location = baseURL + result.url; - }); -}); diff --git a/docs/api/Reducer/docsets/Reducer.docset/Contents/Resources/Documents/js/jquery.min.js b/docs/api/Reducer/docsets/Reducer.docset/Contents/Resources/Documents/js/jquery.min.js deleted file mode 100644 index 2c69bc9..0000000 --- a/docs/api/Reducer/docsets/Reducer.docset/Contents/Resources/Documents/js/jquery.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! jQuery v3.6.1 | (c) OpenJS Foundation and other contributors | jquery.org/license */ -!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,y=n.hasOwnProperty,a=y.toString,l=a.call(Object),v={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.6.1",S=function(e,t){return new S.fn.init(e,t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&v(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!y||!y.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ve(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace(B,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ye(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ve(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],y=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&y.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||y.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||y.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||y.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||y.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||y.push(".#.+[+~]"),e.querySelectorAll("\\\f"),y.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&y.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&y.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&y.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),y.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),y=y.length&&new RegExp(y.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),v=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},j=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&v(p,e)?-1:t==C||t.ownerDocument==p&&v(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!y||!y.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||D,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,D=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),v.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="",v.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="",v.option=!!ce.lastChild;var ge={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ye(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ve(e,t){for(var n=0,r=e.length;n",""]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function je(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function De(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function qe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Le(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var Ut,Xt=[],Vt=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Xt.pop()||S.expando+"_"+Ct.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Vt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Vt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Vt,"$1"+r):!1!==e.jsonp&&(e.url+=(Et.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Xt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),v.createHTMLDocument=((Ut=E.implementation.createHTMLDocument("").body).innerHTML="
",2===Ut.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(v.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return B(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=_e(v.pixelPosition,function(e,t){if(t)return t=Be(e,n),Pe.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return B(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 00){var c=e.utils.clone(r)||{};c.position=[a,l],c.index=s.length,s.push(new e.Token(i.slice(a,o),c))}a=o+1}}return s},e.tokenizer.separator=/[\s\-]+/,e.Pipeline=function(){this._stack=[]},e.Pipeline.registeredFunctions=Object.create(null),e.Pipeline.registerFunction=function(t,r){r in this.registeredFunctions&&e.utils.warn("Overwriting existing registered function: "+r),t.label=r,e.Pipeline.registeredFunctions[t.label]=t},e.Pipeline.warnIfFunctionNotRegistered=function(t){var r=t.label&&t.label in this.registeredFunctions;r||e.utils.warn("Function is not registered with pipeline. This may cause problems when serialising the index.\n",t)},e.Pipeline.load=function(t){var r=new e.Pipeline;return t.forEach(function(t){var i=e.Pipeline.registeredFunctions[t];if(!i)throw new Error("Cannot load unregistered function: "+t);r.add(i)}),r},e.Pipeline.prototype.add=function(){var t=Array.prototype.slice.call(arguments);t.forEach(function(t){e.Pipeline.warnIfFunctionNotRegistered(t),this._stack.push(t)},this)},e.Pipeline.prototype.after=function(t,r){e.Pipeline.warnIfFunctionNotRegistered(r);var i=this._stack.indexOf(t);if(i==-1)throw new Error("Cannot find existingFn");i+=1,this._stack.splice(i,0,r)},e.Pipeline.prototype.before=function(t,r){e.Pipeline.warnIfFunctionNotRegistered(r);var i=this._stack.indexOf(t);if(i==-1)throw new Error("Cannot find existingFn");this._stack.splice(i,0,r)},e.Pipeline.prototype.remove=function(e){var t=this._stack.indexOf(e);t!=-1&&this._stack.splice(t,1)},e.Pipeline.prototype.run=function(e){for(var t=this._stack.length,r=0;r1&&(se&&(r=n),s!=e);)i=r-t,n=t+Math.floor(i/2),s=this.elements[2*n];return s==e?2*n:s>e?2*n:sa?l+=2:o==a&&(t+=r[u+1]*i[l+1],u+=2,l+=2);return t},e.Vector.prototype.similarity=function(e){return this.dot(e)/this.magnitude()||0},e.Vector.prototype.toArray=function(){for(var e=new Array(this.elements.length/2),t=1,r=0;t0){var o,a=s.str.charAt(0);a in s.node.edges?o=s.node.edges[a]:(o=new e.TokenSet,s.node.edges[a]=o),1==s.str.length&&(o["final"]=!0),n.push({node:o,editsRemaining:s.editsRemaining,str:s.str.slice(1)})}if(0!=s.editsRemaining){if("*"in s.node.edges)var u=s.node.edges["*"];else{var u=new e.TokenSet;s.node.edges["*"]=u}if(0==s.str.length&&(u["final"]=!0),n.push({node:u,editsRemaining:s.editsRemaining-1,str:s.str}),s.str.length>1&&n.push({node:s.node,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)}),1==s.str.length&&(s.node["final"]=!0),s.str.length>=1){if("*"in s.node.edges)var l=s.node.edges["*"];else{var l=new e.TokenSet;s.node.edges["*"]=l}1==s.str.length&&(l["final"]=!0),n.push({node:l,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)})}if(s.str.length>1){var c,h=s.str.charAt(0),d=s.str.charAt(1);d in s.node.edges?c=s.node.edges[d]:(c=new e.TokenSet,s.node.edges[d]=c),1==s.str.length&&(c["final"]=!0),n.push({node:c,editsRemaining:s.editsRemaining-1,str:h+s.str.slice(2)})}}}return i},e.TokenSet.fromString=function(t){for(var r=new e.TokenSet,i=r,n=0,s=t.length;n=e;t--){var r=this.uncheckedNodes[t],i=r.child.toString();i in this.minimizedNodes?r.parent.edges[r["char"]]=this.minimizedNodes[i]:(r.child._str=i,this.minimizedNodes[i]=r.child),this.uncheckedNodes.pop()}},e.Index=function(e){this.invertedIndex=e.invertedIndex,this.fieldVectors=e.fieldVectors,this.tokenSet=e.tokenSet,this.fields=e.fields,this.pipeline=e.pipeline},e.Index.prototype.search=function(t){return this.query(function(r){var i=new e.QueryParser(t,r);i.parse()})},e.Index.prototype.query=function(t){for(var r=new e.Query(this.fields),i=Object.create(null),n=Object.create(null),s=Object.create(null),o=Object.create(null),a=Object.create(null),u=0;u1?this._b=1:this._b=e},e.Builder.prototype.k1=function(e){this._k1=e},e.Builder.prototype.add=function(t,r){var i=t[this._ref],n=Object.keys(this._fields);this._documents[i]=r||{},this.documentCount+=1;for(var s=0;s=this.length)return e.QueryLexer.EOS;var t=this.str.charAt(this.pos);return this.pos+=1,t},e.QueryLexer.prototype.width=function(){return this.pos-this.start},e.QueryLexer.prototype.ignore=function(){this.start==this.pos&&(this.pos+=1),this.start=this.pos},e.QueryLexer.prototype.backup=function(){this.pos-=1},e.QueryLexer.prototype.acceptDigitRun=function(){var t,r;do t=this.next(),r=t.charCodeAt(0);while(r>47&&r<58);t!=e.QueryLexer.EOS&&this.backup()},e.QueryLexer.prototype.more=function(){return this.pos1&&(t.backup(),t.emit(e.QueryLexer.TERM)),t.ignore(),t.more())return e.QueryLexer.lexText},e.QueryLexer.lexEditDistance=function(t){return t.ignore(),t.acceptDigitRun(),t.emit(e.QueryLexer.EDIT_DISTANCE),e.QueryLexer.lexText},e.QueryLexer.lexBoost=function(t){return t.ignore(),t.acceptDigitRun(),t.emit(e.QueryLexer.BOOST),e.QueryLexer.lexText},e.QueryLexer.lexEOS=function(t){t.width()>0&&t.emit(e.QueryLexer.TERM)},e.QueryLexer.termSeparator=e.tokenizer.separator,e.QueryLexer.lexText=function(t){for(;;){var r=t.next();if(r==e.QueryLexer.EOS)return e.QueryLexer.lexEOS;if(92!=r.charCodeAt(0)){if(":"==r)return e.QueryLexer.lexField;if("~"==r)return t.backup(),t.width()>0&&t.emit(e.QueryLexer.TERM),e.QueryLexer.lexEditDistance;if("^"==r)return t.backup(),t.width()>0&&t.emit(e.QueryLexer.TERM),e.QueryLexer.lexBoost;if("+"==r&&1===t.width())return t.emit(e.QueryLexer.PRESENCE),e.QueryLexer.lexText;if("-"==r&&1===t.width())return t.emit(e.QueryLexer.PRESENCE),e.QueryLexer.lexText;if(r.match(e.QueryLexer.termSeparator))return e.QueryLexer.lexTerm}else t.escapeCharacter()}},e.QueryParser=function(t,r){this.lexer=new e.QueryLexer(t),this.query=r,this.currentClause={},this.lexemeIdx=0},e.QueryParser.prototype.parse=function(){this.lexer.run(),this.lexemes=this.lexer.lexemes;for(var t=e.QueryParser.parseClause;t;)t=t(this);return this.query},e.QueryParser.prototype.peekLexeme=function(){return this.lexemes[this.lexemeIdx]},e.QueryParser.prototype.consumeLexeme=function(){var e=this.peekLexeme();return this.lexemeIdx+=1,e},e.QueryParser.prototype.nextClause=function(){var e=this.currentClause;this.query.clause(e),this.currentClause={}},e.QueryParser.parseClause=function(t){var r=t.peekLexeme();if(void 0!=r)switch(r.type){case e.QueryLexer.PRESENCE:return e.QueryParser.parsePresence;case e.QueryLexer.FIELD:return e.QueryParser.parseField;case e.QueryLexer.TERM:return e.QueryParser.parseTerm;default:var i="expected either a field or a term, found "+r.type;throw r.str.length>=1&&(i+=" with value '"+r.str+"'"),new e.QueryParseError(i,r.start,r.end)}},e.QueryParser.parsePresence=function(t){var r=t.consumeLexeme();if(void 0!=r){switch(r.str){case"-":t.currentClause.presence=e.Query.presence.PROHIBITED;break;case"+":t.currentClause.presence=e.Query.presence.REQUIRED;break;default:var i="unrecognised presence operator'"+r.str+"'";throw new e.QueryParseError(i,r.start,r.end)}var n=t.peekLexeme();if(void 0==n){var i="expecting term or field, found nothing";throw new e.QueryParseError(i,r.start,r.end)}switch(n.type){case e.QueryLexer.FIELD:return e.QueryParser.parseField;case e.QueryLexer.TERM:return e.QueryParser.parseTerm;default:var i="expecting term or field, found '"+n.type+"'";throw new e.QueryParseError(i,n.start,n.end)}}},e.QueryParser.parseField=function(t){var r=t.consumeLexeme();if(void 0!=r){if(t.query.allFields.indexOf(r.str)==-1){var i=t.query.allFields.map(function(e){return"'"+e+"'"}).join(", "),n="unrecognised field '"+r.str+"', possible fields: "+i;throw new e.QueryParseError(n,r.start,r.end)}t.currentClause.fields=[r.str];var s=t.peekLexeme();if(void 0==s){var n="expecting term, found nothing";throw new e.QueryParseError(n,r.start,r.end)}switch(s.type){case e.QueryLexer.TERM:return e.QueryParser.parseTerm;default:var n="expecting term, found '"+s.type+"'";throw new e.QueryParseError(n,s.start,s.end)}}},e.QueryParser.parseTerm=function(t){var r=t.consumeLexeme();if(void 0!=r){t.currentClause.term=r.str.toLowerCase(),r.str.indexOf("*")!=-1&&(t.currentClause.usePipeline=!1);var i=t.peekLexeme();if(void 0==i)return void t.nextClause();switch(i.type){case e.QueryLexer.TERM:return t.nextClause(),e.QueryParser.parseTerm;case e.QueryLexer.FIELD:return t.nextClause(),e.QueryParser.parseField;case e.QueryLexer.EDIT_DISTANCE:return e.QueryParser.parseEditDistance;case e.QueryLexer.BOOST:return e.QueryParser.parseBoost;case e.QueryLexer.PRESENCE:return t.nextClause(),e.QueryParser.parsePresence;default:var n="Unexpected lexeme type '"+i.type+"'";throw new e.QueryParseError(n,i.start,i.end)}}},e.QueryParser.parseEditDistance=function(t){var r=t.consumeLexeme();if(void 0!=r){var i=parseInt(r.str,10);if(isNaN(i)){var n="edit distance must be numeric";throw new e.QueryParseError(n,r.start,r.end)}t.currentClause.editDistance=i;var s=t.peekLexeme();if(void 0==s)return void t.nextClause();switch(s.type){case e.QueryLexer.TERM:return t.nextClause(),e.QueryParser.parseTerm;case e.QueryLexer.FIELD:return t.nextClause(),e.QueryParser.parseField;case e.QueryLexer.EDIT_DISTANCE:return e.QueryParser.parseEditDistance;case e.QueryLexer.BOOST:return e.QueryParser.parseBoost;case e.QueryLexer.PRESENCE:return t.nextClause(),e.QueryParser.parsePresence;default:var n="Unexpected lexeme type '"+s.type+"'";throw new e.QueryParseError(n,s.start,s.end)}}},e.QueryParser.parseBoost=function(t){var r=t.consumeLexeme();if(void 0!=r){var i=parseInt(r.str,10);if(isNaN(i)){var n="boost must be numeric";throw new e.QueryParseError(n,r.start,r.end)}t.currentClause.boost=i;var s=t.peekLexeme();if(void 0==s)return void t.nextClause();switch(s.type){case e.QueryLexer.TERM:return t.nextClause(),e.QueryParser.parseTerm;case e.QueryLexer.FIELD:return t.nextClause(),e.QueryParser.parseField;case e.QueryLexer.EDIT_DISTANCE:return e.QueryParser.parseEditDistance;case e.QueryLexer.BOOST:return e.QueryParser.parseBoost;case e.QueryLexer.PRESENCE:return t.nextClause(),e.QueryParser.parsePresence;default:var n="Unexpected lexeme type '"+s.type+"'";throw new e.QueryParseError(n,s.start,s.end)}}},function(e,t){"function"==typeof define&&define.amd?define(t):"object"==typeof exports?module.exports=t():e.lunr=t()}(this,function(){return e})}(); diff --git a/docs/api/Reducer/docsets/Reducer.docset/Contents/Resources/Documents/js/typeahead.jquery.js b/docs/api/Reducer/docsets/Reducer.docset/Contents/Resources/Documents/js/typeahead.jquery.js deleted file mode 100644 index 3a2d2ab..0000000 --- a/docs/api/Reducer/docsets/Reducer.docset/Contents/Resources/Documents/js/typeahead.jquery.js +++ /dev/null @@ -1,1694 +0,0 @@ -/*! - * typeahead.js 1.3.1 - * https://github.com/corejavascript/typeahead.js - * Copyright 2013-2020 Twitter, Inc. and other contributors; Licensed MIT - */ - - -(function(root, factory) { - if (typeof define === "function" && define.amd) { - define([ "jquery" ], function(a0) { - return factory(a0); - }); - } else if (typeof module === "object" && module.exports) { - module.exports = factory(require("jquery")); - } else { - factory(root["jQuery"]); - } -})(this, function($) { - var _ = function() { - "use strict"; - return { - isMsie: function() { - return /(msie|trident)/i.test(navigator.userAgent) ? navigator.userAgent.match(/(msie |rv:)(\d+(.\d+)?)/i)[2] : false; - }, - isBlankString: function(str) { - return !str || /^\s*$/.test(str); - }, - escapeRegExChars: function(str) { - return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"); - }, - isString: function(obj) { - return typeof obj === "string"; - }, - isNumber: function(obj) { - return typeof obj === "number"; - }, - isArray: $.isArray, - isFunction: $.isFunction, - isObject: $.isPlainObject, - isUndefined: function(obj) { - return typeof obj === "undefined"; - }, - isElement: function(obj) { - return !!(obj && obj.nodeType === 1); - }, - isJQuery: function(obj) { - return obj instanceof $; - }, - toStr: function toStr(s) { - return _.isUndefined(s) || s === null ? "" : s + ""; - }, - bind: $.proxy, - each: function(collection, cb) { - $.each(collection, reverseArgs); - function reverseArgs(index, value) { - return cb(value, index); - } - }, - map: $.map, - filter: $.grep, - every: function(obj, test) { - var result = true; - if (!obj) { - return result; - } - $.each(obj, function(key, val) { - if (!(result = test.call(null, val, key, obj))) { - return false; - } - }); - return !!result; - }, - some: function(obj, test) { - var result = false; - if (!obj) { - return result; - } - $.each(obj, function(key, val) { - if (result = test.call(null, val, key, obj)) { - return false; - } - }); - return !!result; - }, - mixin: $.extend, - identity: function(x) { - return x; - }, - clone: function(obj) { - return $.extend(true, {}, obj); - }, - getIdGenerator: function() { - var counter = 0; - return function() { - return counter++; - }; - }, - templatify: function templatify(obj) { - return $.isFunction(obj) ? obj : template; - function template() { - return String(obj); - } - }, - defer: function(fn) { - setTimeout(fn, 0); - }, - debounce: function(func, wait, immediate) { - var timeout, result; - return function() { - var context = this, args = arguments, later, callNow; - later = function() { - timeout = null; - if (!immediate) { - result = func.apply(context, args); - } - }; - callNow = immediate && !timeout; - clearTimeout(timeout); - timeout = setTimeout(later, wait); - if (callNow) { - result = func.apply(context, args); - } - return result; - }; - }, - throttle: function(func, wait) { - var context, args, timeout, result, previous, later; - previous = 0; - later = function() { - previous = new Date(); - timeout = null; - result = func.apply(context, args); - }; - return function() { - var now = new Date(), remaining = wait - (now - previous); - context = this; - args = arguments; - if (remaining <= 0) { - clearTimeout(timeout); - timeout = null; - previous = now; - result = func.apply(context, args); - } else if (!timeout) { - timeout = setTimeout(later, remaining); - } - return result; - }; - }, - stringify: function(val) { - return _.isString(val) ? val : JSON.stringify(val); - }, - guid: function() { - function _p8(s) { - var p = (Math.random().toString(16) + "000000000").substr(2, 8); - return s ? "-" + p.substr(0, 4) + "-" + p.substr(4, 4) : p; - } - return "tt-" + _p8() + _p8(true) + _p8(true) + _p8(); - }, - noop: function() {} - }; - }(); - var WWW = function() { - "use strict"; - var defaultClassNames = { - wrapper: "twitter-typeahead", - input: "tt-input", - hint: "tt-hint", - menu: "tt-menu", - dataset: "tt-dataset", - suggestion: "tt-suggestion", - selectable: "tt-selectable", - empty: "tt-empty", - open: "tt-open", - cursor: "tt-cursor", - highlight: "tt-highlight" - }; - return build; - function build(o) { - var www, classes; - classes = _.mixin({}, defaultClassNames, o); - www = { - css: buildCss(), - classes: classes, - html: buildHtml(classes), - selectors: buildSelectors(classes) - }; - return { - css: www.css, - html: www.html, - classes: www.classes, - selectors: www.selectors, - mixin: function(o) { - _.mixin(o, www); - } - }; - } - function buildHtml(c) { - return { - wrapper: '', - menu: '
' - }; - } - function buildSelectors(classes) { - var selectors = {}; - _.each(classes, function(v, k) { - selectors[k] = "." + v; - }); - return selectors; - } - function buildCss() { - var css = { - wrapper: { - position: "relative", - display: "inline-block" - }, - hint: { - position: "absolute", - top: "0", - left: "0", - borderColor: "transparent", - boxShadow: "none", - opacity: "1" - }, - input: { - position: "relative", - verticalAlign: "top", - backgroundColor: "transparent" - }, - inputWithNoHint: { - position: "relative", - verticalAlign: "top" - }, - menu: { - position: "absolute", - top: "100%", - left: "0", - zIndex: "100", - display: "none" - }, - ltr: { - left: "0", - right: "auto" - }, - rtl: { - left: "auto", - right: " 0" - } - }; - if (_.isMsie()) { - _.mixin(css.input, { - backgroundImage: "url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)" - }); - } - return css; - } - }(); - var EventBus = function() { - "use strict"; - var namespace, deprecationMap; - namespace = "typeahead:"; - deprecationMap = { - render: "rendered", - cursorchange: "cursorchanged", - select: "selected", - autocomplete: "autocompleted" - }; - function EventBus(o) { - if (!o || !o.el) { - $.error("EventBus initialized without el"); - } - this.$el = $(o.el); - } - _.mixin(EventBus.prototype, { - _trigger: function(type, args) { - var $e = $.Event(namespace + type); - this.$el.trigger.call(this.$el, $e, args || []); - return $e; - }, - before: function(type) { - var args, $e; - args = [].slice.call(arguments, 1); - $e = this._trigger("before" + type, args); - return $e.isDefaultPrevented(); - }, - trigger: function(type) { - var deprecatedType; - this._trigger(type, [].slice.call(arguments, 1)); - if (deprecatedType = deprecationMap[type]) { - this._trigger(deprecatedType, [].slice.call(arguments, 1)); - } - } - }); - return EventBus; - }(); - var EventEmitter = function() { - "use strict"; - var splitter = /\s+/, nextTick = getNextTick(); - return { - onSync: onSync, - onAsync: onAsync, - off: off, - trigger: trigger - }; - function on(method, types, cb, context) { - var type; - if (!cb) { - return this; - } - types = types.split(splitter); - cb = context ? bindContext(cb, context) : cb; - this._callbacks = this._callbacks || {}; - while (type = types.shift()) { - this._callbacks[type] = this._callbacks[type] || { - sync: [], - async: [] - }; - this._callbacks[type][method].push(cb); - } - return this; - } - function onAsync(types, cb, context) { - return on.call(this, "async", types, cb, context); - } - function onSync(types, cb, context) { - return on.call(this, "sync", types, cb, context); - } - function off(types) { - var type; - if (!this._callbacks) { - return this; - } - types = types.split(splitter); - while (type = types.shift()) { - delete this._callbacks[type]; - } - return this; - } - function trigger(types) { - var type, callbacks, args, syncFlush, asyncFlush; - if (!this._callbacks) { - return this; - } - types = types.split(splitter); - args = [].slice.call(arguments, 1); - while ((type = types.shift()) && (callbacks = this._callbacks[type])) { - syncFlush = getFlush(callbacks.sync, this, [ type ].concat(args)); - asyncFlush = getFlush(callbacks.async, this, [ type ].concat(args)); - syncFlush() && nextTick(asyncFlush); - } - return this; - } - function getFlush(callbacks, context, args) { - return flush; - function flush() { - var cancelled; - for (var i = 0, len = callbacks.length; !cancelled && i < len; i += 1) { - cancelled = callbacks[i].apply(context, args) === false; - } - return !cancelled; - } - } - function getNextTick() { - var nextTickFn; - if (window.setImmediate) { - nextTickFn = function nextTickSetImmediate(fn) { - setImmediate(function() { - fn(); - }); - }; - } else { - nextTickFn = function nextTickSetTimeout(fn) { - setTimeout(function() { - fn(); - }, 0); - }; - } - return nextTickFn; - } - function bindContext(fn, context) { - return fn.bind ? fn.bind(context) : function() { - fn.apply(context, [].slice.call(arguments, 0)); - }; - } - }(); - var highlight = function(doc) { - "use strict"; - var defaults = { - node: null, - pattern: null, - tagName: "strong", - className: null, - wordsOnly: false, - caseSensitive: false, - diacriticInsensitive: false - }; - var accented = { - A: "[AaªÀ-Åà-åĀ-ąǍǎȀ-ȃȦȧᴬᵃḀḁẚẠ-ảₐ℀℁℻⒜Ⓐⓐ㍱-㍴㎀-㎄㎈㎉㎩-㎯㏂㏊㏟㏿Aa]", - B: "[BbᴮᵇḂ-ḇℬ⒝Ⓑⓑ㍴㎅-㎇㏃㏈㏔㏝Bb]", - C: "[CcÇçĆ-čᶜ℀ℂ℃℅℆ℭⅭⅽ⒞Ⓒⓒ㍶㎈㎉㎝㎠㎤㏄-㏇Cc]", - D: "[DdĎďDŽ-džDZ-dzᴰᵈḊ-ḓⅅⅆⅮⅾ⒟Ⓓⓓ㋏㍲㍷-㍹㎗㎭-㎯㏅㏈Dd]", - E: "[EeÈ-Ëè-ëĒ-ěȄ-ȇȨȩᴱᵉḘ-ḛẸ-ẽₑ℡ℯℰⅇ⒠Ⓔⓔ㉐㋍㋎Ee]", - F: "[FfᶠḞḟ℉ℱ℻⒡Ⓕⓕ㎊-㎌㎙ff-fflFf]", - G: "[GgĜ-ģǦǧǴǵᴳᵍḠḡℊ⒢Ⓖⓖ㋌㋍㎇㎍-㎏㎓㎬㏆㏉㏒㏿Gg]", - H: "[HhĤĥȞȟʰᴴḢ-ḫẖℋ-ℎ⒣Ⓗⓗ㋌㍱㎐-㎔㏊㏋㏗Hh]", - I: "[IiÌ-Ïì-ïĨ-İIJijǏǐȈ-ȋᴵᵢḬḭỈ-ịⁱℐℑℹⅈⅠ-ⅣⅥ-ⅨⅪⅫⅰ-ⅳⅵ-ⅸⅺⅻ⒤Ⓘⓘ㍺㏌㏕fiffiIi]", - J: "[JjIJ-ĵLJ-njǰʲᴶⅉ⒥ⒿⓙⱼJj]", - K: "[KkĶķǨǩᴷᵏḰ-ḵK⒦Ⓚⓚ㎄㎅㎉㎏㎑㎘㎞㎢㎦㎪㎸㎾㏀㏆㏍-㏏Kk]", - L: "[LlĹ-ŀLJ-ljˡᴸḶḷḺ-ḽℒℓ℡Ⅼⅼ⒧Ⓛⓛ㋏㎈㎉㏐-㏓㏕㏖㏿flfflLl]", - M: "[MmᴹᵐḾ-ṃ℠™ℳⅯⅿ⒨Ⓜⓜ㍷-㍹㎃㎆㎎㎒㎖㎙-㎨㎫㎳㎷㎹㎽㎿㏁㏂㏎㏐㏔-㏖㏘㏙㏞㏟Mm]", - N: "[NnÑñŃ-ʼnNJ-njǸǹᴺṄ-ṋⁿℕ№⒩Ⓝⓝ㎁㎋㎚㎱㎵㎻㏌㏑Nn]", - O: "[OoºÒ-Öò-öŌ-őƠơǑǒǪǫȌ-ȏȮȯᴼᵒỌ-ỏₒ℅№ℴ⒪Ⓞⓞ㍵㏇㏒㏖Oo]", - P: "[PpᴾᵖṔ-ṗℙ⒫Ⓟⓟ㉐㍱㍶㎀㎊㎩-㎬㎰㎴㎺㏋㏗-㏚Pp]", - Q: "[Qqℚ⒬Ⓠⓠ㏃Qq]", - R: "[RrŔ-řȐ-ȓʳᴿᵣṘ-ṛṞṟ₨ℛ-ℝ⒭Ⓡⓡ㋍㍴㎭-㎯㏚㏛Rr]", - S: "[SsŚ-šſȘșˢṠ-ṣ₨℁℠⒮Ⓢⓢ㎧㎨㎮-㎳㏛㏜stSs]", - T: "[TtŢ-ťȚțᵀᵗṪ-ṱẗ℡™⒯Ⓣⓣ㉐㋏㎔㏏ſtstTt]", - U: "[UuÙ-Üù-üŨ-ųƯưǓǔȔ-ȗᵁᵘᵤṲ-ṷỤ-ủ℆⒰Ⓤⓤ㍳㍺Uu]", - V: "[VvᵛᵥṼ-ṿⅣ-Ⅷⅳ-ⅷ⒱Ⓥⓥⱽ㋎㍵㎴-㎹㏜㏞Vv]", - W: "[WwŴŵʷᵂẀ-ẉẘ⒲Ⓦⓦ㎺-㎿㏝Ww]", - X: "[XxˣẊ-ẍₓ℻Ⅸ-Ⅻⅸ-ⅻ⒳Ⓧⓧ㏓Xx]", - Y: "[YyÝýÿŶ-ŸȲȳʸẎẏẙỲ-ỹ⒴Ⓨⓨ㏉Yy]", - Z: "[ZzŹ-žDZ-dzᶻẐ-ẕℤℨ⒵Ⓩⓩ㎐-㎔Zz]" - }; - return function hightlight(o) { - var regex; - o = _.mixin({}, defaults, o); - if (!o.node || !o.pattern) { - return; - } - o.pattern = _.isArray(o.pattern) ? o.pattern : [ o.pattern ]; - regex = getRegex(o.pattern, o.caseSensitive, o.wordsOnly, o.diacriticInsensitive); - traverse(o.node, hightlightTextNode); - function hightlightTextNode(textNode) { - var match, patternNode, wrapperNode; - if (match = regex.exec(textNode.data)) { - wrapperNode = doc.createElement(o.tagName); - o.className && (wrapperNode.className = o.className); - patternNode = textNode.splitText(match.index); - patternNode.splitText(match[0].length); - wrapperNode.appendChild(patternNode.cloneNode(true)); - textNode.parentNode.replaceChild(wrapperNode, patternNode); - } - return !!match; - } - function traverse(el, hightlightTextNode) { - var childNode, TEXT_NODE_TYPE = 3; - for (var i = 0; i < el.childNodes.length; i++) { - childNode = el.childNodes[i]; - if (childNode.nodeType === TEXT_NODE_TYPE) { - i += hightlightTextNode(childNode) ? 1 : 0; - } else { - traverse(childNode, hightlightTextNode); - } - } - } - }; - function accent_replacer(chr) { - return accented[chr.toUpperCase()] || chr; - } - function getRegex(patterns, caseSensitive, wordsOnly, diacriticInsensitive) { - var escapedPatterns = [], regexStr; - for (var i = 0, len = patterns.length; i < len; i++) { - var escapedWord = _.escapeRegExChars(patterns[i]); - if (diacriticInsensitive) { - escapedWord = escapedWord.replace(/\S/g, accent_replacer); - } - escapedPatterns.push(escapedWord); - } - regexStr = wordsOnly ? "\\b(" + escapedPatterns.join("|") + ")\\b" : "(" + escapedPatterns.join("|") + ")"; - return caseSensitive ? new RegExp(regexStr) : new RegExp(regexStr, "i"); - } - }(window.document); - var Input = function() { - "use strict"; - var specialKeyCodeMap; - specialKeyCodeMap = { - 9: "tab", - 27: "esc", - 37: "left", - 39: "right", - 13: "enter", - 38: "up", - 40: "down" - }; - function Input(o, www) { - var id; - o = o || {}; - if (!o.input) { - $.error("input is missing"); - } - www.mixin(this); - this.$hint = $(o.hint); - this.$input = $(o.input); - this.$menu = $(o.menu); - id = this.$input.attr("id") || _.guid(); - this.$menu.attr("id", id + "_listbox"); - this.$hint.attr({ - "aria-hidden": true - }); - this.$input.attr({ - "aria-owns": id + "_listbox", - role: "combobox", - "aria-autocomplete": "list", - "aria-expanded": false - }); - this.query = this.$input.val(); - this.queryWhenFocused = this.hasFocus() ? this.query : null; - this.$overflowHelper = buildOverflowHelper(this.$input); - this._checkLanguageDirection(); - if (this.$hint.length === 0) { - this.setHint = this.getHint = this.clearHint = this.clearHintIfInvalid = _.noop; - } - this.onSync("cursorchange", this._updateDescendent); - } - Input.normalizeQuery = function(str) { - return _.toStr(str).replace(/^\s*/g, "").replace(/\s{2,}/g, " "); - }; - _.mixin(Input.prototype, EventEmitter, { - _onBlur: function onBlur() { - this.resetInputValue(); - this.trigger("blurred"); - }, - _onFocus: function onFocus() { - this.queryWhenFocused = this.query; - this.trigger("focused"); - }, - _onKeydown: function onKeydown($e) { - var keyName = specialKeyCodeMap[$e.which || $e.keyCode]; - this._managePreventDefault(keyName, $e); - if (keyName && this._shouldTrigger(keyName, $e)) { - this.trigger(keyName + "Keyed", $e); - } - }, - _onInput: function onInput() { - this._setQuery(this.getInputValue()); - this.clearHintIfInvalid(); - this._checkLanguageDirection(); - }, - _managePreventDefault: function managePreventDefault(keyName, $e) { - var preventDefault; - switch (keyName) { - case "up": - case "down": - preventDefault = !withModifier($e); - break; - - default: - preventDefault = false; - } - preventDefault && $e.preventDefault(); - }, - _shouldTrigger: function shouldTrigger(keyName, $e) { - var trigger; - switch (keyName) { - case "tab": - trigger = !withModifier($e); - break; - - default: - trigger = true; - } - return trigger; - }, - _checkLanguageDirection: function checkLanguageDirection() { - var dir = (this.$input.css("direction") || "ltr").toLowerCase(); - if (this.dir !== dir) { - this.dir = dir; - this.$hint.attr("dir", dir); - this.trigger("langDirChanged", dir); - } - }, - _setQuery: function setQuery(val, silent) { - var areEquivalent, hasDifferentWhitespace; - areEquivalent = areQueriesEquivalent(val, this.query); - hasDifferentWhitespace = areEquivalent ? this.query.length !== val.length : false; - this.query = val; - if (!silent && !areEquivalent) { - this.trigger("queryChanged", this.query); - } else if (!silent && hasDifferentWhitespace) { - this.trigger("whitespaceChanged", this.query); - } - }, - _updateDescendent: function updateDescendent(event, id) { - this.$input.attr("aria-activedescendant", id); - }, - bind: function() { - var that = this, onBlur, onFocus, onKeydown, onInput; - onBlur = _.bind(this._onBlur, this); - onFocus = _.bind(this._onFocus, this); - onKeydown = _.bind(this._onKeydown, this); - onInput = _.bind(this._onInput, this); - this.$input.on("blur.tt", onBlur).on("focus.tt", onFocus).on("keydown.tt", onKeydown); - if (!_.isMsie() || _.isMsie() > 9) { - this.$input.on("input.tt", onInput); - } else { - this.$input.on("keydown.tt keypress.tt cut.tt paste.tt", function($e) { - if (specialKeyCodeMap[$e.which || $e.keyCode]) { - return; - } - _.defer(_.bind(that._onInput, that, $e)); - }); - } - return this; - }, - focus: function focus() { - this.$input.focus(); - }, - blur: function blur() { - this.$input.blur(); - }, - getLangDir: function getLangDir() { - return this.dir; - }, - getQuery: function getQuery() { - return this.query || ""; - }, - setQuery: function setQuery(val, silent) { - this.setInputValue(val); - this._setQuery(val, silent); - }, - hasQueryChangedSinceLastFocus: function hasQueryChangedSinceLastFocus() { - return this.query !== this.queryWhenFocused; - }, - getInputValue: function getInputValue() { - return this.$input.val(); - }, - setInputValue: function setInputValue(value) { - this.$input.val(value); - this.clearHintIfInvalid(); - this._checkLanguageDirection(); - }, - resetInputValue: function resetInputValue() { - this.setInputValue(this.query); - }, - getHint: function getHint() { - return this.$hint.val(); - }, - setHint: function setHint(value) { - this.$hint.val(value); - }, - clearHint: function clearHint() { - this.setHint(""); - }, - clearHintIfInvalid: function clearHintIfInvalid() { - var val, hint, valIsPrefixOfHint, isValid; - val = this.getInputValue(); - hint = this.getHint(); - valIsPrefixOfHint = val !== hint && hint.indexOf(val) === 0; - isValid = val !== "" && valIsPrefixOfHint && !this.hasOverflow(); - !isValid && this.clearHint(); - }, - hasFocus: function hasFocus() { - return this.$input.is(":focus"); - }, - hasOverflow: function hasOverflow() { - var constraint = this.$input.width() - 2; - this.$overflowHelper.text(this.getInputValue()); - return this.$overflowHelper.width() >= constraint; - }, - isCursorAtEnd: function() { - var valueLength, selectionStart, range; - valueLength = this.$input.val().length; - selectionStart = this.$input[0].selectionStart; - if (_.isNumber(selectionStart)) { - return selectionStart === valueLength; - } else if (document.selection) { - range = document.selection.createRange(); - range.moveStart("character", -valueLength); - return valueLength === range.text.length; - } - return true; - }, - destroy: function destroy() { - this.$hint.off(".tt"); - this.$input.off(".tt"); - this.$overflowHelper.remove(); - this.$hint = this.$input = this.$overflowHelper = $("
"); - }, - setAriaExpanded: function setAriaExpanded(value) { - this.$input.attr("aria-expanded", value); - } - }); - return Input; - function buildOverflowHelper($input) { - return $('').css({ - position: "absolute", - visibility: "hidden", - whiteSpace: "pre", - fontFamily: $input.css("font-family"), - fontSize: $input.css("font-size"), - fontStyle: $input.css("font-style"), - fontVariant: $input.css("font-variant"), - fontWeight: $input.css("font-weight"), - wordSpacing: $input.css("word-spacing"), - letterSpacing: $input.css("letter-spacing"), - textIndent: $input.css("text-indent"), - textRendering: $input.css("text-rendering"), - textTransform: $input.css("text-transform") - }).insertAfter($input); - } - function areQueriesEquivalent(a, b) { - return Input.normalizeQuery(a) === Input.normalizeQuery(b); - } - function withModifier($e) { - return $e.altKey || $e.ctrlKey || $e.metaKey || $e.shiftKey; - } - }(); - var Dataset = function() { - "use strict"; - var keys, nameGenerator; - keys = { - dataset: "tt-selectable-dataset", - val: "tt-selectable-display", - obj: "tt-selectable-object" - }; - nameGenerator = _.getIdGenerator(); - function Dataset(o, www) { - o = o || {}; - o.templates = o.templates || {}; - o.templates.notFound = o.templates.notFound || o.templates.empty; - if (!o.source) { - $.error("missing source"); - } - if (!o.node) { - $.error("missing node"); - } - if (o.name && !isValidName(o.name)) { - $.error("invalid dataset name: " + o.name); - } - www.mixin(this); - this.highlight = !!o.highlight; - this.name = _.toStr(o.name || nameGenerator()); - this.limit = o.limit || 5; - this.displayFn = getDisplayFn(o.display || o.displayKey); - this.templates = getTemplates(o.templates, this.displayFn); - this.source = o.source.__ttAdapter ? o.source.__ttAdapter() : o.source; - this.async = _.isUndefined(o.async) ? this.source.length > 2 : !!o.async; - this._resetLastSuggestion(); - this.$el = $(o.node).attr("role", "presentation").addClass(this.classes.dataset).addClass(this.classes.dataset + "-" + this.name); - } - Dataset.extractData = function extractData(el) { - var $el = $(el); - if ($el.data(keys.obj)) { - return { - dataset: $el.data(keys.dataset) || "", - val: $el.data(keys.val) || "", - obj: $el.data(keys.obj) || null - }; - } - return null; - }; - _.mixin(Dataset.prototype, EventEmitter, { - _overwrite: function overwrite(query, suggestions) { - suggestions = suggestions || []; - if (suggestions.length) { - this._renderSuggestions(query, suggestions); - } else if (this.async && this.templates.pending) { - this._renderPending(query); - } else if (!this.async && this.templates.notFound) { - this._renderNotFound(query); - } else { - this._empty(); - } - this.trigger("rendered", suggestions, false, this.name); - }, - _append: function append(query, suggestions) { - suggestions = suggestions || []; - if (suggestions.length && this.$lastSuggestion.length) { - this._appendSuggestions(query, suggestions); - } else if (suggestions.length) { - this._renderSuggestions(query, suggestions); - } else if (!this.$lastSuggestion.length && this.templates.notFound) { - this._renderNotFound(query); - } - this.trigger("rendered", suggestions, true, this.name); - }, - _renderSuggestions: function renderSuggestions(query, suggestions) { - var $fragment; - $fragment = this._getSuggestionsFragment(query, suggestions); - this.$lastSuggestion = $fragment.children().last(); - this.$el.html($fragment).prepend(this._getHeader(query, suggestions)).append(this._getFooter(query, suggestions)); - }, - _appendSuggestions: function appendSuggestions(query, suggestions) { - var $fragment, $lastSuggestion; - $fragment = this._getSuggestionsFragment(query, suggestions); - $lastSuggestion = $fragment.children().last(); - this.$lastSuggestion.after($fragment); - this.$lastSuggestion = $lastSuggestion; - }, - _renderPending: function renderPending(query) { - var template = this.templates.pending; - this._resetLastSuggestion(); - template && this.$el.html(template({ - query: query, - dataset: this.name - })); - }, - _renderNotFound: function renderNotFound(query) { - var template = this.templates.notFound; - this._resetLastSuggestion(); - template && this.$el.html(template({ - query: query, - dataset: this.name - })); - }, - _empty: function empty() { - this.$el.empty(); - this._resetLastSuggestion(); - }, - _getSuggestionsFragment: function getSuggestionsFragment(query, suggestions) { - var that = this, fragment; - fragment = document.createDocumentFragment(); - _.each(suggestions, function getSuggestionNode(suggestion) { - var $el, context; - context = that._injectQuery(query, suggestion); - $el = $(that.templates.suggestion(context)).data(keys.dataset, that.name).data(keys.obj, suggestion).data(keys.val, that.displayFn(suggestion)).addClass(that.classes.suggestion + " " + that.classes.selectable); - fragment.appendChild($el[0]); - }); - this.highlight && highlight({ - className: this.classes.highlight, - node: fragment, - pattern: query - }); - return $(fragment); - }, - _getFooter: function getFooter(query, suggestions) { - return this.templates.footer ? this.templates.footer({ - query: query, - suggestions: suggestions, - dataset: this.name - }) : null; - }, - _getHeader: function getHeader(query, suggestions) { - return this.templates.header ? this.templates.header({ - query: query, - suggestions: suggestions, - dataset: this.name - }) : null; - }, - _resetLastSuggestion: function resetLastSuggestion() { - this.$lastSuggestion = $(); - }, - _injectQuery: function injectQuery(query, obj) { - return _.isObject(obj) ? _.mixin({ - _query: query - }, obj) : obj; - }, - update: function update(query) { - var that = this, canceled = false, syncCalled = false, rendered = 0; - this.cancel(); - this.cancel = function cancel() { - canceled = true; - that.cancel = $.noop; - that.async && that.trigger("asyncCanceled", query, that.name); - }; - this.source(query, sync, async); - !syncCalled && sync([]); - function sync(suggestions) { - if (syncCalled) { - return; - } - syncCalled = true; - suggestions = (suggestions || []).slice(0, that.limit); - rendered = suggestions.length; - that._overwrite(query, suggestions); - if (rendered < that.limit && that.async) { - that.trigger("asyncRequested", query, that.name); - } - } - function async(suggestions) { - suggestions = suggestions || []; - if (!canceled && rendered < that.limit) { - that.cancel = $.noop; - var idx = Math.abs(rendered - that.limit); - rendered += idx; - that._append(query, suggestions.slice(0, idx)); - that.async && that.trigger("asyncReceived", query, that.name); - } - } - }, - cancel: $.noop, - clear: function clear() { - this._empty(); - this.cancel(); - this.trigger("cleared"); - }, - isEmpty: function isEmpty() { - return this.$el.is(":empty"); - }, - destroy: function destroy() { - this.$el = $("
"); - } - }); - return Dataset; - function getDisplayFn(display) { - display = display || _.stringify; - return _.isFunction(display) ? display : displayFn; - function displayFn(obj) { - return obj[display]; - } - } - function getTemplates(templates, displayFn) { - return { - notFound: templates.notFound && _.templatify(templates.notFound), - pending: templates.pending && _.templatify(templates.pending), - header: templates.header && _.templatify(templates.header), - footer: templates.footer && _.templatify(templates.footer), - suggestion: templates.suggestion ? userSuggestionTemplate : suggestionTemplate - }; - function userSuggestionTemplate(context) { - var template = templates.suggestion; - return $(template(context)).attr("id", _.guid()); - } - function suggestionTemplate(context) { - return $('
').attr("id", _.guid()).text(displayFn(context)); - } - } - function isValidName(str) { - return /^[_a-zA-Z0-9-]+$/.test(str); - } - }(); - var Menu = function() { - "use strict"; - function Menu(o, www) { - var that = this; - o = o || {}; - if (!o.node) { - $.error("node is required"); - } - www.mixin(this); - this.$node = $(o.node); - this.query = null; - this.datasets = _.map(o.datasets, initializeDataset); - function initializeDataset(oDataset) { - var node = that.$node.find(oDataset.node).first(); - oDataset.node = node.length ? node : $("
").appendTo(that.$node); - return new Dataset(oDataset, www); - } - } - _.mixin(Menu.prototype, EventEmitter, { - _onSelectableClick: function onSelectableClick($e) { - this.trigger("selectableClicked", $($e.currentTarget)); - }, - _onRendered: function onRendered(type, dataset, suggestions, async) { - this.$node.toggleClass(this.classes.empty, this._allDatasetsEmpty()); - this.trigger("datasetRendered", dataset, suggestions, async); - }, - _onCleared: function onCleared() { - this.$node.toggleClass(this.classes.empty, this._allDatasetsEmpty()); - this.trigger("datasetCleared"); - }, - _propagate: function propagate() { - this.trigger.apply(this, arguments); - }, - _allDatasetsEmpty: function allDatasetsEmpty() { - return _.every(this.datasets, _.bind(function isDatasetEmpty(dataset) { - var isEmpty = dataset.isEmpty(); - this.$node.attr("aria-expanded", !isEmpty); - return isEmpty; - }, this)); - }, - _getSelectables: function getSelectables() { - return this.$node.find(this.selectors.selectable); - }, - _removeCursor: function _removeCursor() { - var $selectable = this.getActiveSelectable(); - $selectable && $selectable.removeClass(this.classes.cursor); - }, - _ensureVisible: function ensureVisible($el) { - var elTop, elBottom, nodeScrollTop, nodeHeight; - elTop = $el.position().top; - elBottom = elTop + $el.outerHeight(true); - nodeScrollTop = this.$node.scrollTop(); - nodeHeight = this.$node.height() + parseInt(this.$node.css("paddingTop"), 10) + parseInt(this.$node.css("paddingBottom"), 10); - if (elTop < 0) { - this.$node.scrollTop(nodeScrollTop + elTop); - } else if (nodeHeight < elBottom) { - this.$node.scrollTop(nodeScrollTop + (elBottom - nodeHeight)); - } - }, - bind: function() { - var that = this, onSelectableClick; - onSelectableClick = _.bind(this._onSelectableClick, this); - this.$node.on("click.tt", this.selectors.selectable, onSelectableClick); - this.$node.on("mouseover", this.selectors.selectable, function() { - that.setCursor($(this)); - }); - this.$node.on("mouseleave", function() { - that._removeCursor(); - }); - _.each(this.datasets, function(dataset) { - dataset.onSync("asyncRequested", that._propagate, that).onSync("asyncCanceled", that._propagate, that).onSync("asyncReceived", that._propagate, that).onSync("rendered", that._onRendered, that).onSync("cleared", that._onCleared, that); - }); - return this; - }, - isOpen: function isOpen() { - return this.$node.hasClass(this.classes.open); - }, - open: function open() { - this.$node.scrollTop(0); - this.$node.addClass(this.classes.open); - }, - close: function close() { - this.$node.attr("aria-expanded", false); - this.$node.removeClass(this.classes.open); - this._removeCursor(); - }, - setLanguageDirection: function setLanguageDirection(dir) { - this.$node.attr("dir", dir); - }, - selectableRelativeToCursor: function selectableRelativeToCursor(delta) { - var $selectables, $oldCursor, oldIndex, newIndex; - $oldCursor = this.getActiveSelectable(); - $selectables = this._getSelectables(); - oldIndex = $oldCursor ? $selectables.index($oldCursor) : -1; - newIndex = oldIndex + delta; - newIndex = (newIndex + 1) % ($selectables.length + 1) - 1; - newIndex = newIndex < -1 ? $selectables.length - 1 : newIndex; - return newIndex === -1 ? null : $selectables.eq(newIndex); - }, - setCursor: function setCursor($selectable) { - this._removeCursor(); - if ($selectable = $selectable && $selectable.first()) { - $selectable.addClass(this.classes.cursor); - this._ensureVisible($selectable); - } - }, - getSelectableData: function getSelectableData($el) { - return $el && $el.length ? Dataset.extractData($el) : null; - }, - getActiveSelectable: function getActiveSelectable() { - var $selectable = this._getSelectables().filter(this.selectors.cursor).first(); - return $selectable.length ? $selectable : null; - }, - getTopSelectable: function getTopSelectable() { - var $selectable = this._getSelectables().first(); - return $selectable.length ? $selectable : null; - }, - update: function update(query) { - var isValidUpdate = query !== this.query; - if (isValidUpdate) { - this.query = query; - _.each(this.datasets, updateDataset); - } - return isValidUpdate; - function updateDataset(dataset) { - dataset.update(query); - } - }, - empty: function empty() { - _.each(this.datasets, clearDataset); - this.query = null; - this.$node.addClass(this.classes.empty); - function clearDataset(dataset) { - dataset.clear(); - } - }, - destroy: function destroy() { - this.$node.off(".tt"); - this.$node = $("
"); - _.each(this.datasets, destroyDataset); - function destroyDataset(dataset) { - dataset.destroy(); - } - } - }); - return Menu; - }(); - var Status = function() { - "use strict"; - function Status(options) { - this.$el = $("", { - role: "status", - "aria-live": "polite" - }).css({ - position: "absolute", - padding: "0", - border: "0", - height: "1px", - width: "1px", - "margin-bottom": "-1px", - "margin-right": "-1px", - overflow: "hidden", - clip: "rect(0 0 0 0)", - "white-space": "nowrap" - }); - options.$input.after(this.$el); - _.each(options.menu.datasets, _.bind(function(dataset) { - if (dataset.onSync) { - dataset.onSync("rendered", _.bind(this.update, this)); - dataset.onSync("cleared", _.bind(this.cleared, this)); - } - }, this)); - } - _.mixin(Status.prototype, { - update: function update(event, suggestions) { - var length = suggestions.length; - var words; - if (length === 1) { - words = { - result: "result", - is: "is" - }; - } else { - words = { - result: "results", - is: "are" - }; - } - this.$el.text(length + " " + words.result + " " + words.is + " available, use up and down arrow keys to navigate."); - }, - cleared: function() { - this.$el.text(""); - } - }); - return Status; - }(); - var DefaultMenu = function() { - "use strict"; - var s = Menu.prototype; - function DefaultMenu() { - Menu.apply(this, [].slice.call(arguments, 0)); - } - _.mixin(DefaultMenu.prototype, Menu.prototype, { - open: function open() { - !this._allDatasetsEmpty() && this._show(); - return s.open.apply(this, [].slice.call(arguments, 0)); - }, - close: function close() { - this._hide(); - return s.close.apply(this, [].slice.call(arguments, 0)); - }, - _onRendered: function onRendered() { - if (this._allDatasetsEmpty()) { - this._hide(); - } else { - this.isOpen() && this._show(); - } - return s._onRendered.apply(this, [].slice.call(arguments, 0)); - }, - _onCleared: function onCleared() { - if (this._allDatasetsEmpty()) { - this._hide(); - } else { - this.isOpen() && this._show(); - } - return s._onCleared.apply(this, [].slice.call(arguments, 0)); - }, - setLanguageDirection: function setLanguageDirection(dir) { - this.$node.css(dir === "ltr" ? this.css.ltr : this.css.rtl); - return s.setLanguageDirection.apply(this, [].slice.call(arguments, 0)); - }, - _hide: function hide() { - this.$node.hide(); - }, - _show: function show() { - this.$node.css("display", "block"); - } - }); - return DefaultMenu; - }(); - var Typeahead = function() { - "use strict"; - function Typeahead(o, www) { - var onFocused, onBlurred, onEnterKeyed, onTabKeyed, onEscKeyed, onUpKeyed, onDownKeyed, onLeftKeyed, onRightKeyed, onQueryChanged, onWhitespaceChanged; - o = o || {}; - if (!o.input) { - $.error("missing input"); - } - if (!o.menu) { - $.error("missing menu"); - } - if (!o.eventBus) { - $.error("missing event bus"); - } - www.mixin(this); - this.eventBus = o.eventBus; - this.minLength = _.isNumber(o.minLength) ? o.minLength : 1; - this.input = o.input; - this.menu = o.menu; - this.enabled = true; - this.autoselect = !!o.autoselect; - this.active = false; - this.input.hasFocus() && this.activate(); - this.dir = this.input.getLangDir(); - this._hacks(); - this.menu.bind().onSync("selectableClicked", this._onSelectableClicked, this).onSync("asyncRequested", this._onAsyncRequested, this).onSync("asyncCanceled", this._onAsyncCanceled, this).onSync("asyncReceived", this._onAsyncReceived, this).onSync("datasetRendered", this._onDatasetRendered, this).onSync("datasetCleared", this._onDatasetCleared, this); - onFocused = c(this, "activate", "open", "_onFocused"); - onBlurred = c(this, "deactivate", "_onBlurred"); - onEnterKeyed = c(this, "isActive", "isOpen", "_onEnterKeyed"); - onTabKeyed = c(this, "isActive", "isOpen", "_onTabKeyed"); - onEscKeyed = c(this, "isActive", "_onEscKeyed"); - onUpKeyed = c(this, "isActive", "open", "_onUpKeyed"); - onDownKeyed = c(this, "isActive", "open", "_onDownKeyed"); - onLeftKeyed = c(this, "isActive", "isOpen", "_onLeftKeyed"); - onRightKeyed = c(this, "isActive", "isOpen", "_onRightKeyed"); - onQueryChanged = c(this, "_openIfActive", "_onQueryChanged"); - onWhitespaceChanged = c(this, "_openIfActive", "_onWhitespaceChanged"); - this.input.bind().onSync("focused", onFocused, this).onSync("blurred", onBlurred, this).onSync("enterKeyed", onEnterKeyed, this).onSync("tabKeyed", onTabKeyed, this).onSync("escKeyed", onEscKeyed, this).onSync("upKeyed", onUpKeyed, this).onSync("downKeyed", onDownKeyed, this).onSync("leftKeyed", onLeftKeyed, this).onSync("rightKeyed", onRightKeyed, this).onSync("queryChanged", onQueryChanged, this).onSync("whitespaceChanged", onWhitespaceChanged, this).onSync("langDirChanged", this._onLangDirChanged, this); - } - _.mixin(Typeahead.prototype, { - _hacks: function hacks() { - var $input, $menu; - $input = this.input.$input || $("
"); - $menu = this.menu.$node || $("
"); - $input.on("blur.tt", function($e) { - var active, isActive, hasActive; - active = document.activeElement; - isActive = $menu.is(active); - hasActive = $menu.has(active).length > 0; - if (_.isMsie() && (isActive || hasActive)) { - $e.preventDefault(); - $e.stopImmediatePropagation(); - _.defer(function() { - $input.focus(); - }); - } - }); - $menu.on("mousedown.tt", function($e) { - $e.preventDefault(); - }); - }, - _onSelectableClicked: function onSelectableClicked(type, $el) { - this.select($el); - }, - _onDatasetCleared: function onDatasetCleared() { - this._updateHint(); - }, - _onDatasetRendered: function onDatasetRendered(type, suggestions, async, dataset) { - this._updateHint(); - if (this.autoselect) { - var cursorClass = this.selectors.cursor.substr(1); - this.menu.$node.find(this.selectors.suggestion).first().addClass(cursorClass); - } - this.eventBus.trigger("render", suggestions, async, dataset); - }, - _onAsyncRequested: function onAsyncRequested(type, dataset, query) { - this.eventBus.trigger("asyncrequest", query, dataset); - }, - _onAsyncCanceled: function onAsyncCanceled(type, dataset, query) { - this.eventBus.trigger("asynccancel", query, dataset); - }, - _onAsyncReceived: function onAsyncReceived(type, dataset, query) { - this.eventBus.trigger("asyncreceive", query, dataset); - }, - _onFocused: function onFocused() { - this._minLengthMet() && this.menu.update(this.input.getQuery()); - }, - _onBlurred: function onBlurred() { - if (this.input.hasQueryChangedSinceLastFocus()) { - this.eventBus.trigger("change", this.input.getQuery()); - } - }, - _onEnterKeyed: function onEnterKeyed(type, $e) { - var $selectable; - if ($selectable = this.menu.getActiveSelectable()) { - if (this.select($selectable)) { - $e.preventDefault(); - $e.stopPropagation(); - } - } else if (this.autoselect) { - if (this.select(this.menu.getTopSelectable())) { - $e.preventDefault(); - $e.stopPropagation(); - } - } - }, - _onTabKeyed: function onTabKeyed(type, $e) { - var $selectable; - if ($selectable = this.menu.getActiveSelectable()) { - this.select($selectable) && $e.preventDefault(); - } else if (this.autoselect) { - if ($selectable = this.menu.getTopSelectable()) { - this.autocomplete($selectable) && $e.preventDefault(); - } - } - }, - _onEscKeyed: function onEscKeyed() { - this.close(); - }, - _onUpKeyed: function onUpKeyed() { - this.moveCursor(-1); - }, - _onDownKeyed: function onDownKeyed() { - this.moveCursor(+1); - }, - _onLeftKeyed: function onLeftKeyed() { - if (this.dir === "rtl" && this.input.isCursorAtEnd()) { - this.autocomplete(this.menu.getActiveSelectable() || this.menu.getTopSelectable()); - } - }, - _onRightKeyed: function onRightKeyed() { - if (this.dir === "ltr" && this.input.isCursorAtEnd()) { - this.autocomplete(this.menu.getActiveSelectable() || this.menu.getTopSelectable()); - } - }, - _onQueryChanged: function onQueryChanged(e, query) { - this._minLengthMet(query) ? this.menu.update(query) : this.menu.empty(); - }, - _onWhitespaceChanged: function onWhitespaceChanged() { - this._updateHint(); - }, - _onLangDirChanged: function onLangDirChanged(e, dir) { - if (this.dir !== dir) { - this.dir = dir; - this.menu.setLanguageDirection(dir); - } - }, - _openIfActive: function openIfActive() { - this.isActive() && this.open(); - }, - _minLengthMet: function minLengthMet(query) { - query = _.isString(query) ? query : this.input.getQuery() || ""; - return query.length >= this.minLength; - }, - _updateHint: function updateHint() { - var $selectable, data, val, query, escapedQuery, frontMatchRegEx, match; - $selectable = this.menu.getTopSelectable(); - data = this.menu.getSelectableData($selectable); - val = this.input.getInputValue(); - if (data && !_.isBlankString(val) && !this.input.hasOverflow()) { - query = Input.normalizeQuery(val); - escapedQuery = _.escapeRegExChars(query); - frontMatchRegEx = new RegExp("^(?:" + escapedQuery + ")(.+$)", "i"); - match = frontMatchRegEx.exec(data.val); - match && this.input.setHint(val + match[1]); - } else { - this.input.clearHint(); - } - }, - isEnabled: function isEnabled() { - return this.enabled; - }, - enable: function enable() { - this.enabled = true; - }, - disable: function disable() { - this.enabled = false; - }, - isActive: function isActive() { - return this.active; - }, - activate: function activate() { - if (this.isActive()) { - return true; - } else if (!this.isEnabled() || this.eventBus.before("active")) { - return false; - } else { - this.active = true; - this.eventBus.trigger("active"); - return true; - } - }, - deactivate: function deactivate() { - if (!this.isActive()) { - return true; - } else if (this.eventBus.before("idle")) { - return false; - } else { - this.active = false; - this.close(); - this.eventBus.trigger("idle"); - return true; - } - }, - isOpen: function isOpen() { - return this.menu.isOpen(); - }, - open: function open() { - if (!this.isOpen() && !this.eventBus.before("open")) { - this.input.setAriaExpanded(true); - this.menu.open(); - this._updateHint(); - this.eventBus.trigger("open"); - } - return this.isOpen(); - }, - close: function close() { - if (this.isOpen() && !this.eventBus.before("close")) { - this.input.setAriaExpanded(false); - this.menu.close(); - this.input.clearHint(); - this.input.resetInputValue(); - this.eventBus.trigger("close"); - } - return !this.isOpen(); - }, - setVal: function setVal(val) { - this.input.setQuery(_.toStr(val)); - }, - getVal: function getVal() { - return this.input.getQuery(); - }, - select: function select($selectable) { - var data = this.menu.getSelectableData($selectable); - if (data && !this.eventBus.before("select", data.obj, data.dataset)) { - this.input.setQuery(data.val, true); - this.eventBus.trigger("select", data.obj, data.dataset); - this.close(); - return true; - } - return false; - }, - autocomplete: function autocomplete($selectable) { - var query, data, isValid; - query = this.input.getQuery(); - data = this.menu.getSelectableData($selectable); - isValid = data && query !== data.val; - if (isValid && !this.eventBus.before("autocomplete", data.obj, data.dataset)) { - this.input.setQuery(data.val); - this.eventBus.trigger("autocomplete", data.obj, data.dataset); - return true; - } - return false; - }, - moveCursor: function moveCursor(delta) { - var query, $candidate, data, suggestion, datasetName, cancelMove, id; - query = this.input.getQuery(); - $candidate = this.menu.selectableRelativeToCursor(delta); - data = this.menu.getSelectableData($candidate); - suggestion = data ? data.obj : null; - datasetName = data ? data.dataset : null; - id = $candidate ? $candidate.attr("id") : null; - this.input.trigger("cursorchange", id); - cancelMove = this._minLengthMet() && this.menu.update(query); - if (!cancelMove && !this.eventBus.before("cursorchange", suggestion, datasetName)) { - this.menu.setCursor($candidate); - if (data) { - if (typeof data.val === "string") { - this.input.setInputValue(data.val); - } - } else { - this.input.resetInputValue(); - this._updateHint(); - } - this.eventBus.trigger("cursorchange", suggestion, datasetName); - return true; - } - return false; - }, - destroy: function destroy() { - this.input.destroy(); - this.menu.destroy(); - } - }); - return Typeahead; - function c(ctx) { - var methods = [].slice.call(arguments, 1); - return function() { - var args = [].slice.call(arguments); - _.each(methods, function(method) { - return ctx[method].apply(ctx, args); - }); - }; - } - }(); - (function() { - "use strict"; - var old, keys, methods; - old = $.fn.typeahead; - keys = { - www: "tt-www", - attrs: "tt-attrs", - typeahead: "tt-typeahead" - }; - methods = { - initialize: function initialize(o, datasets) { - var www; - datasets = _.isArray(datasets) ? datasets : [].slice.call(arguments, 1); - o = o || {}; - www = WWW(o.classNames); - return this.each(attach); - function attach() { - var $input, $wrapper, $hint, $menu, defaultHint, defaultMenu, eventBus, input, menu, status, typeahead, MenuConstructor; - _.each(datasets, function(d) { - d.highlight = !!o.highlight; - }); - $input = $(this); - $wrapper = $(www.html.wrapper); - $hint = $elOrNull(o.hint); - $menu = $elOrNull(o.menu); - defaultHint = o.hint !== false && !$hint; - defaultMenu = o.menu !== false && !$menu; - defaultHint && ($hint = buildHintFromInput($input, www)); - defaultMenu && ($menu = $(www.html.menu).css(www.css.menu)); - $hint && $hint.val(""); - $input = prepInput($input, www); - if (defaultHint || defaultMenu) { - $wrapper.css(www.css.wrapper); - $input.css(defaultHint ? www.css.input : www.css.inputWithNoHint); - $input.wrap($wrapper).parent().prepend(defaultHint ? $hint : null).append(defaultMenu ? $menu : null); - } - MenuConstructor = defaultMenu ? DefaultMenu : Menu; - eventBus = new EventBus({ - el: $input - }); - input = new Input({ - hint: $hint, - input: $input, - menu: $menu - }, www); - menu = new MenuConstructor({ - node: $menu, - datasets: datasets - }, www); - status = new Status({ - $input: $input, - menu: menu - }); - typeahead = new Typeahead({ - input: input, - menu: menu, - eventBus: eventBus, - minLength: o.minLength, - autoselect: o.autoselect - }, www); - $input.data(keys.www, www); - $input.data(keys.typeahead, typeahead); - } - }, - isEnabled: function isEnabled() { - var enabled; - ttEach(this.first(), function(t) { - enabled = t.isEnabled(); - }); - return enabled; - }, - enable: function enable() { - ttEach(this, function(t) { - t.enable(); - }); - return this; - }, - disable: function disable() { - ttEach(this, function(t) { - t.disable(); - }); - return this; - }, - isActive: function isActive() { - var active; - ttEach(this.first(), function(t) { - active = t.isActive(); - }); - return active; - }, - activate: function activate() { - ttEach(this, function(t) { - t.activate(); - }); - return this; - }, - deactivate: function deactivate() { - ttEach(this, function(t) { - t.deactivate(); - }); - return this; - }, - isOpen: function isOpen() { - var open; - ttEach(this.first(), function(t) { - open = t.isOpen(); - }); - return open; - }, - open: function open() { - ttEach(this, function(t) { - t.open(); - }); - return this; - }, - close: function close() { - ttEach(this, function(t) { - t.close(); - }); - return this; - }, - select: function select(el) { - var success = false, $el = $(el); - ttEach(this.first(), function(t) { - success = t.select($el); - }); - return success; - }, - autocomplete: function autocomplete(el) { - var success = false, $el = $(el); - ttEach(this.first(), function(t) { - success = t.autocomplete($el); - }); - return success; - }, - moveCursor: function moveCursoe(delta) { - var success = false; - ttEach(this.first(), function(t) { - success = t.moveCursor(delta); - }); - return success; - }, - val: function val(newVal) { - var query; - if (!arguments.length) { - ttEach(this.first(), function(t) { - query = t.getVal(); - }); - return query; - } else { - ttEach(this, function(t) { - t.setVal(_.toStr(newVal)); - }); - return this; - } - }, - destroy: function destroy() { - ttEach(this, function(typeahead, $input) { - revert($input); - typeahead.destroy(); - }); - return this; - } - }; - $.fn.typeahead = function(method) { - if (methods[method]) { - return methods[method].apply(this, [].slice.call(arguments, 1)); - } else { - return methods.initialize.apply(this, arguments); - } - }; - $.fn.typeahead.noConflict = function noConflict() { - $.fn.typeahead = old; - return this; - }; - function ttEach($els, fn) { - $els.each(function() { - var $input = $(this), typeahead; - (typeahead = $input.data(keys.typeahead)) && fn(typeahead, $input); - }); - } - function buildHintFromInput($input, www) { - return $input.clone().addClass(www.classes.hint).removeData().css(www.css.hint).css(getBackgroundStyles($input)).prop({ - readonly: true, - required: false - }).removeAttr("id name placeholder").removeClass("required").attr({ - spellcheck: "false", - tabindex: -1 - }); - } - function prepInput($input, www) { - $input.data(keys.attrs, { - dir: $input.attr("dir"), - autocomplete: $input.attr("autocomplete"), - spellcheck: $input.attr("spellcheck"), - style: $input.attr("style") - }); - $input.addClass(www.classes.input).attr({ - spellcheck: false - }); - try { - !$input.attr("dir") && $input.attr("dir", "auto"); - } catch (e) {} - return $input; - } - function getBackgroundStyles($el) { - return { - backgroundAttachment: $el.css("background-attachment"), - backgroundClip: $el.css("background-clip"), - backgroundColor: $el.css("background-color"), - backgroundImage: $el.css("background-image"), - backgroundOrigin: $el.css("background-origin"), - backgroundPosition: $el.css("background-position"), - backgroundRepeat: $el.css("background-repeat"), - backgroundSize: $el.css("background-size") - }; - } - function revert($input) { - var www, $wrapper; - www = $input.data(keys.www); - $wrapper = $input.parent().filter(www.selectors.wrapper); - _.each($input.data(keys.attrs), function(val, key) { - _.isUndefined(val) ? $input.removeAttr(key) : $input.attr(key, val); - }); - $input.removeData(keys.typeahead).removeData(keys.www).removeData(keys.attr).removeClass(www.classes.input); - if ($wrapper.length) { - $input.detach().insertAfter($wrapper); - $wrapper.remove(); - } - } - function $elOrNull(obj) { - var isValid, $el; - isValid = _.isJQuery(obj) || _.isElement(obj); - $el = isValid ? $(obj).first() : []; - return $el.length ? $el : null; - } - })(); -}); \ No newline at end of file diff --git a/docs/api/Reducer/docsets/Reducer.docset/Contents/Resources/Documents/search.json b/docs/api/Reducer/docsets/Reducer.docset/Contents/Resources/Documents/search.json deleted file mode 100644 index cd7224c..0000000 --- a/docs/api/Reducer/docsets/Reducer.docset/Contents/Resources/Documents/search.json +++ /dev/null @@ -1 +0,0 @@ -{"Structs/Reducer.html#/s:7ReducerAAV6reduceyyx_q_ztcvp":{"name":"reduce","abstract":"

Execute the wrapped reduce function. You must provide the parameters action: ActionType (the action to be","parent_name":"Reducer"},"Structs/Reducer.html#/s:7ReducerAAV6reduceyAByxq_Gyx_q_ztcFZ":{"name":"reduce(_:)","abstract":"

Reducer initialiser takes only the underlying function (ActionType, inout StateType) -> Void that is the reducer","parent_name":"Reducer"},"Structs/Reducer.html#/s:7ReducerAAV7composeyAByxq_GAD_ADdtFZ":{"name":"compose(_:_:)","abstract":"

Composes two or more reducers in series, to be evaluated from the left to the right for each incoming action.

","parent_name":"Reducer"},"Structs/Reducer.html#/s:7ReducerAAV7compose7contentAByxq_GAEyXE_tFZ":{"name":"compose(content:)","abstract":"

Composes two or more reducers in series, to be evaluated from the top to the bottom for each incoming action.

","parent_name":"Reducer"},"Structs/Reducer.html#/s:7ReducerAAV8identityAByxq_GvpZ":{"name":"identity","abstract":"

No-op reducer. Composing it with any other reducer will not change anything from the other reducer behaviour, regardless if the identity reducer","parent_name":"Reducer"},"Structs/Reducer.html#/s:7ReducerAAV4lift12actionGetter05stateD00E6SetterAByqd__qd_0_GxSgqd__c_q_qd_0_cyqd_0_z_q_tctr0_lF":{"name":"lift(actionGetter:stateGetter:stateSetter:)","abstract":"

A type-lifting method. The global state of your app is Whole, and the Reducer handles Part, that is a","parent_name":"Reducer"},"Structs/Reducer.html#/s:7ReducerAAV4lift6action5stateAByqd__qd_0_Gs7KeyPathCyqd__xSgG_s08WritableeF0Cyqd_0_q_Gtr0_lF":{"name":"lift(action:state:)","abstract":"

A type-lifting method. The global state of your app is Whole, and the Reducer handles Part, that is a","parent_name":"Reducer"},"Structs/Reducer.html#/s:7ReducerAAV4lift5stateAByxqd__Gs15WritableKeyPathCyqd__q_G_tlF":{"name":"lift(state:)","abstract":"

A type-lifting method. The global state of your app is Whole, and the Reducer handles Part, that is a","parent_name":"Reducer"},"Structs/Reducer.html#/s:7ReducerAAV4lift6actionAByqd__q_Gs7KeyPathCyqd__xSgG_tlF":{"name":"lift(action:)","abstract":"

A type-lifting method. The global state of your app is Whole, and the Reducer handles Part, that is a","parent_name":"Reducer"},"Structs/Reducer.html#/s:7ReducerAAV16liftToCollection6action05stateD010identifierAByqd__qd_0_Gs7KeyPathCyqd__qd_2_2id_xADtSgG_s08WritablehI0Cyqd_0_qd_1_GAIyq_qd_2_Gt7ElementQyd_1_Rs_SMRd_1_SHRd_2_r2_lF":{"name":"liftToCollection(action:stateCollection:identifier:)","abstract":"

A type-lifting method for collections. The global state of your app is Whole, and the Reducer handles an element","parent_name":"Reducer"},"Structs/Reducer.html#/s:7ReducerAAV16liftToCollection6action05stateD0AByqd__qd_0_Gs7KeyPathCyqd__5IndexQyd_1_5index_xADtSgG_s08WritablegH0Cyqd_0_qd_1_Gt7ElementQyd_1_Rs_SMRd_1_r1_lF":{"name":"liftToCollection(action:stateCollection:)","abstract":"

A type-lifting method for collections. The global state of your app is Whole, and the Reducer handles an element","parent_name":"Reducer"},"Structs/Reducer.html#/s:7ReducerAAVAAs12IdentifiableR_rlE16liftToCollection6action05stateE0AByqd__qd_0_Gs7KeyPathCyqd__2IDQy_2id_xAEtSgG_s08WritablehI0Cyqd_0_qd_1_Gt7ElementQyd_1_Rs_SMRd_1_r1_lF":{"name":"liftToCollection(action:stateCollection:)","abstract":"

A type-lifting method for collections. The global state of your app is Whole, and the Reducer handles an element","parent_name":"Reducer"},"Structs/Reducer.html":{"name":"Reducer","abstract":"

An entity that calculates the new state when given current state and an incoming action (Action, inout State) -> Void.

"},"Enums/ReducerBuilder.html#/s:7Reducer0A7BuilderO10buildBlockyA2AVyxq_GAFd_tr0_lFZ":{"name":"buildBlock(_:)","abstract":"

DSL Builder for Reducer compose

","parent_name":"ReducerBuilder"},"Enums/ReducerBuilder.html":{"name":"ReducerBuilder","abstract":"

DSL Builder for Reducer compose

"},"Enums.html":{"name":"Enumerations","abstract":"

The following enumerations are available globally.

"},"Structs.html":{"name":"Structures","abstract":"

The following structures are available globally.

"}} \ No newline at end of file diff --git a/docs/api/Reducer/docsets/Reducer.docset/Contents/Resources/Documents/undocumented.json b/docs/api/Reducer/docsets/Reducer.docset/Contents/Resources/Documents/undocumented.json deleted file mode 100644 index b637641..0000000 --- a/docs/api/Reducer/docsets/Reducer.docset/Contents/Resources/Documents/undocumented.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "warnings": [ - - ], - "source_directory": "/Users/luiz.barbosa/code/SwiftRex/Reducer" -} \ No newline at end of file diff --git a/docs/api/Reducer/docsets/Reducer.docset/Contents/Resources/docSet.dsidx b/docs/api/Reducer/docsets/Reducer.docset/Contents/Resources/docSet.dsidx deleted file mode 100644 index 40b0ff3..0000000 Binary files a/docs/api/Reducer/docsets/Reducer.docset/Contents/Resources/docSet.dsidx and /dev/null differ diff --git a/docs/api/Reducer/docsets/Reducer.tgz b/docs/api/Reducer/docsets/Reducer.tgz deleted file mode 100644 index b73a2e8..0000000 Binary files a/docs/api/Reducer/docsets/Reducer.tgz and /dev/null differ diff --git a/docs/api/Reducer/img/carat.png b/docs/api/Reducer/img/carat.png deleted file mode 100755 index 29d2f7f..0000000 Binary files a/docs/api/Reducer/img/carat.png and /dev/null differ diff --git a/docs/api/Reducer/img/dash.png b/docs/api/Reducer/img/dash.png deleted file mode 100755 index 6f694c7..0000000 Binary files a/docs/api/Reducer/img/dash.png and /dev/null differ diff --git a/docs/api/Reducer/img/spinner.gif b/docs/api/Reducer/img/spinner.gif deleted file mode 100644 index e3038d0..0000000 Binary files a/docs/api/Reducer/img/spinner.gif and /dev/null differ diff --git a/docs/api/Reducer/index.html b/docs/api/Reducer/index.html deleted file mode 100644 index c1df453..0000000 --- a/docs/api/Reducer/index.html +++ /dev/null @@ -1,366 +0,0 @@ - - - - Reducer Reference - - - - - - - - - - - - -
-
-

Reducer 0.9.0 Docs (100% documented)

-
-
- -
-
-
-
-
- -
-
- -
-
-
- -

- SwiftRex

- Unidirectional Dataflow for your favourite reactive framework

-

- -

Build Status -codecov -Jazzy Documentation -CocoaPods compatible -Swift Package Manager compatible - -Platform support -License Apache 2.0

- -

If you’ve got questions, about SwiftRex or redux and Functional Programming in general, please Join our Slack Channel.

-

SwiftRex

- -

This is part of “SwiftRex library”. Please read the library documentation to have full context about what Reducer is used for.

- -

SwiftRex is a framework that combines Unidirectional Dataflow architecture and reactive programming (Combine, RxSwift or ReactiveSwift), providing a central state Store for the whole state of your app, of which your SwiftUI Views or UIViewControllers can observe and react to, as well as dispatching events coming from the user interactions.

- -

This pattern, also known as “Redux”, allows us to rethink our app as a single pure function that receives user events as input and returns UI changes in response. The benefits of this workflow will hopefully become clear soon.

- -

API documentation can be found here.

-

Reducer

- -

Reducer is a pure function wrapped in a monoid container, that takes an action and the current state to calculate the new state.

- -

The MiddlewareProtocol pipeline can do two things: dispatch outgoing actions and handling incoming actions. But what they can NOT do is changing the app state. Middlewares have read-only access to the up-to-date state of our apps, but when mutations are required we use the MutableReduceFunction function:

-
(ActionType, inout StateType) -> Void
-
- -

Which has the same semantics (but better performance) than old ReduceFunction:

-
(ActionType, StateType) -> StateType
-
- -

Given an action and the current state (as a mutable inout), it calculates the new state and changes it:

-
initial state is 42
-action: increment
-reducer: increment 42 => new state 43
-
-current state is 43
-action: decrement
-reducer: decrement 43 => new state 42
-
-current state is 42
-action: half
-reducer: half 42 => new state 21
-
- -

The function is reducing all the actions in a cached state, and that happens incrementally for each new incoming action.

- -

It’s important to understand that reducer is a synchronous operations that calculates a new state without any kind of side-effect (including non-obvious ones as creating Date(), using DispatchQueue or Locale.current), so never add properties to the Reducer structs or call any external function. If you are tempted to do that, please create a middleware and dispatch actions with Dates or Locales from it.

- -

Reducers are also responsible for keeping the consistency of a state, so it’s always good to do a final sanity check before changing the state, like for example check other dependant properties that must be changed together.

- -

Once the reducer function executes, the store will update its single source-of-truth with the new calculated state, and propagate it to all its subscribers, that will react to the new state and update Views, for example.

- -

This function is wrapped in a struct to overcome some Swift limitations, for example, allowing us to compose multiple reducers into one (monoid operation, where two or more reducers become a single one) or lifting reducers from local types to global types.

- -

The ability to lift reducers allow us to write fine-grained “sub-reducer” that will handle only a subset of the state and/or action, place it in different frameworks and modules, and later plugged into a bigger state and action handler by providing a way to map state and actions between the global and local ones. For more information about that, please check Lifting.

- -

A possible implementation of a reducer would be:

-
let volumeReducer = Reducer<VolumeAction, VolumeState>.reduce { action, currentState in
-    switch action {
-    case .louder:
-        currentState = VolumeState(
-            isMute: false, // When increasing the volume, always unmute it.
-            volume: min(100, currentState.volume + 5)
-        )
-    case .quieter:
-        currentState = VolumeState(
-            isMute: currentState.isMute,
-            volume: max(0, currentState.volume - 5)
-        )
-    case .toggleMute:
-        currentState = VolumeState(
-            isMute: !currentState.isMute,
-            volume: currentState.volume
-        )
-    }
-}
-
- -

Please notice from the example above the following good practices:

- -
    -
  • No DispatchQueue, threading, operation queue, promises, reactive code in there.
  • -
  • All you need to implement this function is provided by the arguments action and currentState, don’t use any other variable coming from global scope, not even for reading purposes. If you need something else, it should either be in the state or come in the action payload.
  • -
  • Do not start side-effects, requests, I/O, database calls.
  • -
  • Avoid default when writing switch/case statements. That way the compiler will help you more.
  • -
  • Make the action and the state generic parameters as much specialised as you can. If volume state is part of a bigger state, you should not be tempted to pass the whole big state into this reducer. Make it short, brief and specialised, this also helps preventing default case or having to re-assign properties that are never mutated by this reducer.
  • -
-
                                                                                                                    ┌────────┐                                     
-                                                       IO closure                                                ┌─▶│ View 1 │                                     
-                      ┌─────┐                          (don't run yet)                       ┌─────┐             │  └────────┘                                     
-                      │     │ handle  ┌──────────┐  ┌───────────────────────────────────────▶│     │ send        │  ┌────────┐                                     
-                      │     ├────────▶│Middleware│──┘                                        │     │────────────▶├─▶│ View 2 │                                     
-                      │     │ Action  │ Pipeline │──┐  ┌─────┐ reduce ┌──────────┐           │     │ New state   │  └────────┘                                     
-                      │     │         └──────────┘  └─▶│     │───────▶│ Reducer  │──────────▶│     │             │  ┌────────┐                                     
-    ┌──────┐ dispatch │     │                          │Store│ Action │ Pipeline │ New state │     │             └─▶│ View 3 │                                     
-    │Button│─────────▶│Store│                          │     │ +      └──────────┘           │Store│                └────────┘                                     
-    └──────┘ Action   │     │                          └─────┘ State                         │     │                                   dispatch    ┌─────┐         
-                      │     │                                                                │     │       ┌─────────────────────────┐ New Action  │     │         
-                      │     │                                                                │     │─run──▶│       IO closure        ├────────────▶│Store│─ ─ ▶ ...
-                      │     │                                                                │     │       │                         │             │     │         
-                      │     │                                                                │     │       └─┬───────────────────────┘             └─────┘         
-                      └─────┘                                                                └─────┘         │                     ▲                               
-                                                                                                      request│ side-effects        │side-effects                   
-                                                                                                             ▼                      response                       
-                                                                                                        ┌ ─ ─ ─ ─ ─                │                               
-                                                                                                          External │─ ─ async ─ ─ ─                                
-                                                                                                        │  World                                                   
-                                                                                                         ─ ─ ─ ─ ─ ┘                                               
-
-

Lifting

- - -

Lifting

- -

An app can be a complex product, performing several activities that not necessarily are related. For example, the same app may need to perform a request to a weather API, check the current user location using CLLocation and read preferences from UserDefaults.

- -

Although these activities are combined to create the full experience, they can be isolated from each other in order to avoid URLSession logic and CLLocation logic in the same place, competing for the same resources and potentially causing race conditions. Also, testing these parts in isolation is often easier and leads to more significant tests.

- -

Ideally we should organise our AppState and AppAction to account for these parts as isolated trees. In the example above, we could have 3 different properties in our AppState and 3 different enum cases in our AppAction to group state and actions related to the weather API, to the user location and to the UserDefaults access.

- -

This gets even more helpful in case we split our app in 3 types of Reducer and 3 types of MiddlewareProtocol, and each of them work not on the full AppState and AppAction, but in the 3 paths we grouped in our model. The first pair of Reducer and MiddlewareProtocol would be generic over WeatherState and WeatherAction, the second pair over LocationState and LocationAction and the third pair over RepositoryState and RepositoryAction. They could even be in different frameworks, so the compiler will forbid us from coupling Weather API code with CLLocation code, which is great as this enforces better practices and unlocks code reusability. Maybe our CLLocation middleware/reducer can be useful in a completely different app that checks for public transport routes.

- -

But at some point we want to put these 3 different types of entities together, and the StoreType of our app “speaks” AppAction and AppState, not the subsets used by the specialised handlers.

-
enum AppAction {
-    case weather(WeatherAction)
-    case location(LocationAction)
-    case repository(RepositoryAction)
-}
-struct AppState {
-    let weather: WeatherState
-    let location: LocationState
-    let repository: RepositoryState
-}
-
- -

Given a reducer that is generic over WeatherAction and WeatherState, we can “lift” it to the global types AppAction and AppState by telling this reducer how to find in the global tree the properties that it needs. That would be \AppAction.weather and \AppState.weather. The same can be done for the middleware, and for the other 2 reducers and middlewares of our app.

- -

When all of them are lifted to a common type, they can be combined together using Reducer.compose(reducer1, reducer2, reducer3...) function, or the DSL form:

-
Reducer.compose {
-    reducer1
-
-    reducer2
-
-    Reducer
-        .login
-        .lift(action: \.loginAction, state: \.loginState)
-
-    Reducer
-        .lifecycle
-        .lift(action: \.lifecycleAction, state: \.lifecycleState)
-
-    Reducer.app
-
-    Reducer.reduce { action, state in
-        // some inline reducer
-    }
-
-}
-
- -
-

IMPORTANT: Because enums in Swift don’t have KeyPath as structs do, we strongly recommend reading Action Enum Properties document and implementing properties for each case, either manually or using code generators, so later you avoid writing lots and lots of error-prone switch/case. We also offer some templates to help you on that.

-
- -

Let’s explore how to lift reducers and middlewares.

-

Lifting Reducer

- -

Reducer has AppAction INPUT, AppState INPUT and AppState OUTPUT, because it can only handle actions (never dispatch them), read the state and write the state.

- -

The lifting direction, therefore, should be:

-
Reducer:
-- ReducerAction? ← AppAction
-- ReducerState ←→ AppState
-
- -

Given:

-
//      type 1         type 2
-Reducer<ReducerAction, ReducerState>
-
- -

Transformations:

-
                                                                                 ╔═══════════════════╗
-                                                                                 ║                   ║
-                       ╔═══════════════╗                                         ║                   ║
-                       ║    Reducer    ║ .lift                                   ║       Store       ║
-                       ╚═══════════════╝                                         ║                   ║
-                               │                                                 ║                   ║
-                                                                                 ╚═══════════════════╝
-                               │                                                           │          
-
-                               │                                                           │          
-                                                                                     ┌───────────┐    
-                         ┌─────┴─────┐   (AppAction) -> ReducerAction?               │           │    
-┌ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┐    │  Reducer  │   { $0.case?.reducerAction }                  │           │    
-    Input Action         │  Action   │◀──────────────────────────────────────────────│ AppAction │    
-└ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┘    │           │   KeyPath<AppAction, ReducerAction?>          │           │    
-                         └─────┬─────┘   \AppAction.case?.reducerAction              │           │    
-                                                                                     └───────────┘    
-                               │                                                           │          
-
-                               │         get: (AppState) -> ReducerState                   │          
-                                         { $0.reducerState }                         ┌───────────┐    
-                         ┌─────┴─────┐   set: (inout AppState, ReducerState) -> Void │           │    
-┌ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┐    │  Reducer  │   { $0.reducerState = $1 }                    │           │    
-        State            │   State   │◀─────────────────────────────────────────────▶│ AppState  │    
-└ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┘    │           │   WritableKeyPath<AppState, ReducerState>     │           │    
-                         └─────┬─────┘   \AppState.reducerState                      │           │    
-                                                                                     └───────────┘    
-                               │                                                           │          
-
-
Lifting Reducer using closures:
-
.lift(
-    actionGetter: { (action: AppAction) -> ReducerAction? /* type 1 */ in 
-        // prism3 has associated value of ReducerAction,
-        // and whole thing is Optional because Prism is always optional
-        action.prism1?.prism2?.prism3
-    },
-    stateGetter: { (state: AppState) -> ReducerState /* type 2 */ in 
-        // property2: ReducerState
-        state.property1.property2
-    },
-    stateSetter: { (state: inout AppState, newValue: ReducerState /* type 2 */) -> Void in 
-        // property2: ReducerState
-        state.property1.property2 = newValue
-    }
-)
-
- -

Steps:

- -
    -
  • Start plugging the 2 types from the Reducer into the 3 closure headers.
  • -
  • For type 1, find a prism that resolves from AppAction into the matching type. BE SURE TO RUN SOURCERY AND HAVING ALL ENUM CASES COVERED BY PRISM
  • -
  • For type 2 on the stateGetter closure, find lenses (property getters) that resolve from AppState into the matching type.
  • -
  • For type 2 on the stateSetter closure, find lenses (property setters) that can change the global state receive to the newValue received. Be sure that everything is writeable.
  • -
-
Lifting Reducer using KeyPath:
-
.lift(
-    action: \AppAction.prism1?.prism2?.prism3,
-    state: \AppState.property1.property2
-)
-
- -

Steps:

- -
    -
  • Start with the closure example above
  • -
  • For action, we can use KeyPath from \AppAction traversing the prism tree
  • -
  • For state, we can use WritableKeyPath from \AppState traversing the properties as long as all of them are declared as var, not let.
  • -
-

Functional Helpers

- -

Identity:

- -
    -
  • when some parts of your lift should be unchanged because they are already in the expected type
  • -
  • lift that using identity, which is { $0 }
  • -
-

Xcode Snippets:

-
// Reducer closure
-.lift(
-    actionGetter: { (action: AppAction) -> <#LocalAction#>? in action.<#something?.child#> },
-    stateGetter: { (state: AppState) -> <#LocalState#> in state.<#something.child#> },
-    stateSetter: { (state: inout AppState, newValue: <#LocalState#>) -> Void in state.<#something.child#> = newValue }
-)
-
-// Reducer KeyPath:
-.lift(
-    action: \AppAction.<#something?.child#>,
-    state: \AppState.<#something.child#>
-)
-
-

Installation

- -

Please use SwiftRex installation instructions, instead. Reducers are not supposed to be used independently from SwiftRex.

- -
-
- -
-
- - diff --git a/docs/api/Reducer/js/jazzy.js b/docs/api/Reducer/js/jazzy.js deleted file mode 100755 index 1984416..0000000 --- a/docs/api/Reducer/js/jazzy.js +++ /dev/null @@ -1,74 +0,0 @@ -// Jazzy - https://github.com/realm/jazzy -// Copyright Realm Inc. -// SPDX-License-Identifier: MIT - -window.jazzy = {'docset': false} -if (typeof window.dash != 'undefined') { - document.documentElement.className += ' dash' - window.jazzy.docset = true -} -if (navigator.userAgent.match(/xcode/i)) { - document.documentElement.className += ' xcode' - window.jazzy.docset = true -} - -function toggleItem($link, $content) { - var animationDuration = 300; - $link.toggleClass('token-open'); - $content.slideToggle(animationDuration); -} - -function itemLinkToContent($link) { - return $link.parent().parent().next(); -} - -// On doc load + hash-change, open any targetted item -function openCurrentItemIfClosed() { - if (window.jazzy.docset) { - return; - } - var $link = $(`a[name="${location.hash.substring(1)}"]`).nextAll('.token'); - $content = itemLinkToContent($link); - if ($content.is(':hidden')) { - toggleItem($link, $content); - } -} - -$(openCurrentItemIfClosed); -$(window).on('hashchange', openCurrentItemIfClosed); - -// On item link ('token') click, toggle its discussion -$('.token').on('click', function(event) { - if (window.jazzy.docset) { - return; - } - var $link = $(this); - toggleItem($link, itemLinkToContent($link)); - - // Keeps the document from jumping to the hash. - var href = $link.attr('href'); - if (history.pushState) { - history.pushState({}, '', href); - } else { - location.hash = href; - } - event.preventDefault(); -}); - -// Clicks on links to the current, closed, item need to open the item -$("a:not('.token')").on('click', function() { - if (location == this.href) { - openCurrentItemIfClosed(); - } -}); - -// KaTeX rendering -if ("katex" in window) { - $($('.math').each( (_, element) => { - katex.render(element.textContent, element, { - displayMode: $(element).hasClass('m-block'), - throwOnError: false, - trust: true - }); - })) -} diff --git a/docs/api/Reducer/js/jazzy.search.js b/docs/api/Reducer/js/jazzy.search.js deleted file mode 100644 index 359cdbb..0000000 --- a/docs/api/Reducer/js/jazzy.search.js +++ /dev/null @@ -1,74 +0,0 @@ -// Jazzy - https://github.com/realm/jazzy -// Copyright Realm Inc. -// SPDX-License-Identifier: MIT - -$(function(){ - var $typeahead = $('[data-typeahead]'); - var $form = $typeahead.parents('form'); - var searchURL = $form.attr('action'); - - function displayTemplate(result) { - return result.name; - } - - function suggestionTemplate(result) { - var t = '
'; - t += '' + result.name + ''; - if (result.parent_name) { - t += '' + result.parent_name + ''; - } - t += '
'; - return t; - } - - $typeahead.one('focus', function() { - $form.addClass('loading'); - - $.getJSON(searchURL).then(function(searchData) { - const searchIndex = lunr(function() { - this.ref('url'); - this.field('name'); - this.field('abstract'); - for (const [url, doc] of Object.entries(searchData)) { - this.add({url: url, name: doc.name, abstract: doc.abstract}); - } - }); - - $typeahead.typeahead( - { - highlight: true, - minLength: 3, - autoselect: true - }, - { - limit: 10, - display: displayTemplate, - templates: { suggestion: suggestionTemplate }, - source: function(query, sync) { - const lcSearch = query.toLowerCase(); - const results = searchIndex.query(function(q) { - q.term(lcSearch, { boost: 100 }); - q.term(lcSearch, { - boost: 10, - wildcard: lunr.Query.wildcard.TRAILING - }); - }).map(function(result) { - var doc = searchData[result.ref]; - doc.url = result.ref; - return doc; - }); - sync(results); - } - } - ); - $form.removeClass('loading'); - $typeahead.trigger('focus'); - }); - }); - - var baseURL = searchURL.slice(0, -"search.json".length); - - $typeahead.on('typeahead:select', function(e, result) { - window.location = baseURL + result.url; - }); -}); diff --git a/docs/api/Reducer/js/jquery.min.js b/docs/api/Reducer/js/jquery.min.js deleted file mode 100644 index 2c69bc9..0000000 --- a/docs/api/Reducer/js/jquery.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! jQuery v3.6.1 | (c) OpenJS Foundation and other contributors | jquery.org/license */ -!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,y=n.hasOwnProperty,a=y.toString,l=a.call(Object),v={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.6.1",S=function(e,t){return new S.fn.init(e,t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&v(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!y||!y.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ve(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace(B,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ye(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ve(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],y=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&y.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||y.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||y.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||y.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||y.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||y.push(".#.+[+~]"),e.querySelectorAll("\\\f"),y.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&y.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&y.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&y.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),y.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),y=y.length&&new RegExp(y.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),v=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},j=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&v(p,e)?-1:t==C||t.ownerDocument==p&&v(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!y||!y.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||D,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,D=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),v.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="",v.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="",v.option=!!ce.lastChild;var ge={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ye(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ve(e,t){for(var n=0,r=e.length;n",""]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function je(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function De(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function qe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Le(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var Ut,Xt=[],Vt=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Xt.pop()||S.expando+"_"+Ct.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Vt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Vt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Vt,"$1"+r):!1!==e.jsonp&&(e.url+=(Et.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Xt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),v.createHTMLDocument=((Ut=E.implementation.createHTMLDocument("").body).innerHTML="
",2===Ut.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(v.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return B(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=_e(v.pixelPosition,function(e,t){if(t)return t=Be(e,n),Pe.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return B(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 00){var c=e.utils.clone(r)||{};c.position=[a,l],c.index=s.length,s.push(new e.Token(i.slice(a,o),c))}a=o+1}}return s},e.tokenizer.separator=/[\s\-]+/,e.Pipeline=function(){this._stack=[]},e.Pipeline.registeredFunctions=Object.create(null),e.Pipeline.registerFunction=function(t,r){r in this.registeredFunctions&&e.utils.warn("Overwriting existing registered function: "+r),t.label=r,e.Pipeline.registeredFunctions[t.label]=t},e.Pipeline.warnIfFunctionNotRegistered=function(t){var r=t.label&&t.label in this.registeredFunctions;r||e.utils.warn("Function is not registered with pipeline. This may cause problems when serialising the index.\n",t)},e.Pipeline.load=function(t){var r=new e.Pipeline;return t.forEach(function(t){var i=e.Pipeline.registeredFunctions[t];if(!i)throw new Error("Cannot load unregistered function: "+t);r.add(i)}),r},e.Pipeline.prototype.add=function(){var t=Array.prototype.slice.call(arguments);t.forEach(function(t){e.Pipeline.warnIfFunctionNotRegistered(t),this._stack.push(t)},this)},e.Pipeline.prototype.after=function(t,r){e.Pipeline.warnIfFunctionNotRegistered(r);var i=this._stack.indexOf(t);if(i==-1)throw new Error("Cannot find existingFn");i+=1,this._stack.splice(i,0,r)},e.Pipeline.prototype.before=function(t,r){e.Pipeline.warnIfFunctionNotRegistered(r);var i=this._stack.indexOf(t);if(i==-1)throw new Error("Cannot find existingFn");this._stack.splice(i,0,r)},e.Pipeline.prototype.remove=function(e){var t=this._stack.indexOf(e);t!=-1&&this._stack.splice(t,1)},e.Pipeline.prototype.run=function(e){for(var t=this._stack.length,r=0;r1&&(se&&(r=n),s!=e);)i=r-t,n=t+Math.floor(i/2),s=this.elements[2*n];return s==e?2*n:s>e?2*n:sa?l+=2:o==a&&(t+=r[u+1]*i[l+1],u+=2,l+=2);return t},e.Vector.prototype.similarity=function(e){return this.dot(e)/this.magnitude()||0},e.Vector.prototype.toArray=function(){for(var e=new Array(this.elements.length/2),t=1,r=0;t0){var o,a=s.str.charAt(0);a in s.node.edges?o=s.node.edges[a]:(o=new e.TokenSet,s.node.edges[a]=o),1==s.str.length&&(o["final"]=!0),n.push({node:o,editsRemaining:s.editsRemaining,str:s.str.slice(1)})}if(0!=s.editsRemaining){if("*"in s.node.edges)var u=s.node.edges["*"];else{var u=new e.TokenSet;s.node.edges["*"]=u}if(0==s.str.length&&(u["final"]=!0),n.push({node:u,editsRemaining:s.editsRemaining-1,str:s.str}),s.str.length>1&&n.push({node:s.node,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)}),1==s.str.length&&(s.node["final"]=!0),s.str.length>=1){if("*"in s.node.edges)var l=s.node.edges["*"];else{var l=new e.TokenSet;s.node.edges["*"]=l}1==s.str.length&&(l["final"]=!0),n.push({node:l,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)})}if(s.str.length>1){var c,h=s.str.charAt(0),d=s.str.charAt(1);d in s.node.edges?c=s.node.edges[d]:(c=new e.TokenSet,s.node.edges[d]=c),1==s.str.length&&(c["final"]=!0),n.push({node:c,editsRemaining:s.editsRemaining-1,str:h+s.str.slice(2)})}}}return i},e.TokenSet.fromString=function(t){for(var r=new e.TokenSet,i=r,n=0,s=t.length;n=e;t--){var r=this.uncheckedNodes[t],i=r.child.toString();i in this.minimizedNodes?r.parent.edges[r["char"]]=this.minimizedNodes[i]:(r.child._str=i,this.minimizedNodes[i]=r.child),this.uncheckedNodes.pop()}},e.Index=function(e){this.invertedIndex=e.invertedIndex,this.fieldVectors=e.fieldVectors,this.tokenSet=e.tokenSet,this.fields=e.fields,this.pipeline=e.pipeline},e.Index.prototype.search=function(t){return this.query(function(r){var i=new e.QueryParser(t,r);i.parse()})},e.Index.prototype.query=function(t){for(var r=new e.Query(this.fields),i=Object.create(null),n=Object.create(null),s=Object.create(null),o=Object.create(null),a=Object.create(null),u=0;u1?this._b=1:this._b=e},e.Builder.prototype.k1=function(e){this._k1=e},e.Builder.prototype.add=function(t,r){var i=t[this._ref],n=Object.keys(this._fields);this._documents[i]=r||{},this.documentCount+=1;for(var s=0;s=this.length)return e.QueryLexer.EOS;var t=this.str.charAt(this.pos);return this.pos+=1,t},e.QueryLexer.prototype.width=function(){return this.pos-this.start},e.QueryLexer.prototype.ignore=function(){this.start==this.pos&&(this.pos+=1),this.start=this.pos},e.QueryLexer.prototype.backup=function(){this.pos-=1},e.QueryLexer.prototype.acceptDigitRun=function(){var t,r;do t=this.next(),r=t.charCodeAt(0);while(r>47&&r<58);t!=e.QueryLexer.EOS&&this.backup()},e.QueryLexer.prototype.more=function(){return this.pos1&&(t.backup(),t.emit(e.QueryLexer.TERM)),t.ignore(),t.more())return e.QueryLexer.lexText},e.QueryLexer.lexEditDistance=function(t){return t.ignore(),t.acceptDigitRun(),t.emit(e.QueryLexer.EDIT_DISTANCE),e.QueryLexer.lexText},e.QueryLexer.lexBoost=function(t){return t.ignore(),t.acceptDigitRun(),t.emit(e.QueryLexer.BOOST),e.QueryLexer.lexText},e.QueryLexer.lexEOS=function(t){t.width()>0&&t.emit(e.QueryLexer.TERM)},e.QueryLexer.termSeparator=e.tokenizer.separator,e.QueryLexer.lexText=function(t){for(;;){var r=t.next();if(r==e.QueryLexer.EOS)return e.QueryLexer.lexEOS;if(92!=r.charCodeAt(0)){if(":"==r)return e.QueryLexer.lexField;if("~"==r)return t.backup(),t.width()>0&&t.emit(e.QueryLexer.TERM),e.QueryLexer.lexEditDistance;if("^"==r)return t.backup(),t.width()>0&&t.emit(e.QueryLexer.TERM),e.QueryLexer.lexBoost;if("+"==r&&1===t.width())return t.emit(e.QueryLexer.PRESENCE),e.QueryLexer.lexText;if("-"==r&&1===t.width())return t.emit(e.QueryLexer.PRESENCE),e.QueryLexer.lexText;if(r.match(e.QueryLexer.termSeparator))return e.QueryLexer.lexTerm}else t.escapeCharacter()}},e.QueryParser=function(t,r){this.lexer=new e.QueryLexer(t),this.query=r,this.currentClause={},this.lexemeIdx=0},e.QueryParser.prototype.parse=function(){this.lexer.run(),this.lexemes=this.lexer.lexemes;for(var t=e.QueryParser.parseClause;t;)t=t(this);return this.query},e.QueryParser.prototype.peekLexeme=function(){return this.lexemes[this.lexemeIdx]},e.QueryParser.prototype.consumeLexeme=function(){var e=this.peekLexeme();return this.lexemeIdx+=1,e},e.QueryParser.prototype.nextClause=function(){var e=this.currentClause;this.query.clause(e),this.currentClause={}},e.QueryParser.parseClause=function(t){var r=t.peekLexeme();if(void 0!=r)switch(r.type){case e.QueryLexer.PRESENCE:return e.QueryParser.parsePresence;case e.QueryLexer.FIELD:return e.QueryParser.parseField;case e.QueryLexer.TERM:return e.QueryParser.parseTerm;default:var i="expected either a field or a term, found "+r.type;throw r.str.length>=1&&(i+=" with value '"+r.str+"'"),new e.QueryParseError(i,r.start,r.end)}},e.QueryParser.parsePresence=function(t){var r=t.consumeLexeme();if(void 0!=r){switch(r.str){case"-":t.currentClause.presence=e.Query.presence.PROHIBITED;break;case"+":t.currentClause.presence=e.Query.presence.REQUIRED;break;default:var i="unrecognised presence operator'"+r.str+"'";throw new e.QueryParseError(i,r.start,r.end)}var n=t.peekLexeme();if(void 0==n){var i="expecting term or field, found nothing";throw new e.QueryParseError(i,r.start,r.end)}switch(n.type){case e.QueryLexer.FIELD:return e.QueryParser.parseField;case e.QueryLexer.TERM:return e.QueryParser.parseTerm;default:var i="expecting term or field, found '"+n.type+"'";throw new e.QueryParseError(i,n.start,n.end)}}},e.QueryParser.parseField=function(t){var r=t.consumeLexeme();if(void 0!=r){if(t.query.allFields.indexOf(r.str)==-1){var i=t.query.allFields.map(function(e){return"'"+e+"'"}).join(", "),n="unrecognised field '"+r.str+"', possible fields: "+i;throw new e.QueryParseError(n,r.start,r.end)}t.currentClause.fields=[r.str];var s=t.peekLexeme();if(void 0==s){var n="expecting term, found nothing";throw new e.QueryParseError(n,r.start,r.end)}switch(s.type){case e.QueryLexer.TERM:return e.QueryParser.parseTerm;default:var n="expecting term, found '"+s.type+"'";throw new e.QueryParseError(n,s.start,s.end)}}},e.QueryParser.parseTerm=function(t){var r=t.consumeLexeme();if(void 0!=r){t.currentClause.term=r.str.toLowerCase(),r.str.indexOf("*")!=-1&&(t.currentClause.usePipeline=!1);var i=t.peekLexeme();if(void 0==i)return void t.nextClause();switch(i.type){case e.QueryLexer.TERM:return t.nextClause(),e.QueryParser.parseTerm;case e.QueryLexer.FIELD:return t.nextClause(),e.QueryParser.parseField;case e.QueryLexer.EDIT_DISTANCE:return e.QueryParser.parseEditDistance;case e.QueryLexer.BOOST:return e.QueryParser.parseBoost;case e.QueryLexer.PRESENCE:return t.nextClause(),e.QueryParser.parsePresence;default:var n="Unexpected lexeme type '"+i.type+"'";throw new e.QueryParseError(n,i.start,i.end)}}},e.QueryParser.parseEditDistance=function(t){var r=t.consumeLexeme();if(void 0!=r){var i=parseInt(r.str,10);if(isNaN(i)){var n="edit distance must be numeric";throw new e.QueryParseError(n,r.start,r.end)}t.currentClause.editDistance=i;var s=t.peekLexeme();if(void 0==s)return void t.nextClause();switch(s.type){case e.QueryLexer.TERM:return t.nextClause(),e.QueryParser.parseTerm;case e.QueryLexer.FIELD:return t.nextClause(),e.QueryParser.parseField;case e.QueryLexer.EDIT_DISTANCE:return e.QueryParser.parseEditDistance;case e.QueryLexer.BOOST:return e.QueryParser.parseBoost;case e.QueryLexer.PRESENCE:return t.nextClause(),e.QueryParser.parsePresence;default:var n="Unexpected lexeme type '"+s.type+"'";throw new e.QueryParseError(n,s.start,s.end)}}},e.QueryParser.parseBoost=function(t){var r=t.consumeLexeme();if(void 0!=r){var i=parseInt(r.str,10);if(isNaN(i)){var n="boost must be numeric";throw new e.QueryParseError(n,r.start,r.end)}t.currentClause.boost=i;var s=t.peekLexeme();if(void 0==s)return void t.nextClause();switch(s.type){case e.QueryLexer.TERM:return t.nextClause(),e.QueryParser.parseTerm;case e.QueryLexer.FIELD:return t.nextClause(),e.QueryParser.parseField;case e.QueryLexer.EDIT_DISTANCE:return e.QueryParser.parseEditDistance;case e.QueryLexer.BOOST:return e.QueryParser.parseBoost;case e.QueryLexer.PRESENCE:return t.nextClause(),e.QueryParser.parsePresence;default:var n="Unexpected lexeme type '"+s.type+"'";throw new e.QueryParseError(n,s.start,s.end)}}},function(e,t){"function"==typeof define&&define.amd?define(t):"object"==typeof exports?module.exports=t():e.lunr=t()}(this,function(){return e})}(); diff --git a/docs/api/Reducer/js/typeahead.jquery.js b/docs/api/Reducer/js/typeahead.jquery.js deleted file mode 100644 index 3a2d2ab..0000000 --- a/docs/api/Reducer/js/typeahead.jquery.js +++ /dev/null @@ -1,1694 +0,0 @@ -/*! - * typeahead.js 1.3.1 - * https://github.com/corejavascript/typeahead.js - * Copyright 2013-2020 Twitter, Inc. and other contributors; Licensed MIT - */ - - -(function(root, factory) { - if (typeof define === "function" && define.amd) { - define([ "jquery" ], function(a0) { - return factory(a0); - }); - } else if (typeof module === "object" && module.exports) { - module.exports = factory(require("jquery")); - } else { - factory(root["jQuery"]); - } -})(this, function($) { - var _ = function() { - "use strict"; - return { - isMsie: function() { - return /(msie|trident)/i.test(navigator.userAgent) ? navigator.userAgent.match(/(msie |rv:)(\d+(.\d+)?)/i)[2] : false; - }, - isBlankString: function(str) { - return !str || /^\s*$/.test(str); - }, - escapeRegExChars: function(str) { - return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"); - }, - isString: function(obj) { - return typeof obj === "string"; - }, - isNumber: function(obj) { - return typeof obj === "number"; - }, - isArray: $.isArray, - isFunction: $.isFunction, - isObject: $.isPlainObject, - isUndefined: function(obj) { - return typeof obj === "undefined"; - }, - isElement: function(obj) { - return !!(obj && obj.nodeType === 1); - }, - isJQuery: function(obj) { - return obj instanceof $; - }, - toStr: function toStr(s) { - return _.isUndefined(s) || s === null ? "" : s + ""; - }, - bind: $.proxy, - each: function(collection, cb) { - $.each(collection, reverseArgs); - function reverseArgs(index, value) { - return cb(value, index); - } - }, - map: $.map, - filter: $.grep, - every: function(obj, test) { - var result = true; - if (!obj) { - return result; - } - $.each(obj, function(key, val) { - if (!(result = test.call(null, val, key, obj))) { - return false; - } - }); - return !!result; - }, - some: function(obj, test) { - var result = false; - if (!obj) { - return result; - } - $.each(obj, function(key, val) { - if (result = test.call(null, val, key, obj)) { - return false; - } - }); - return !!result; - }, - mixin: $.extend, - identity: function(x) { - return x; - }, - clone: function(obj) { - return $.extend(true, {}, obj); - }, - getIdGenerator: function() { - var counter = 0; - return function() { - return counter++; - }; - }, - templatify: function templatify(obj) { - return $.isFunction(obj) ? obj : template; - function template() { - return String(obj); - } - }, - defer: function(fn) { - setTimeout(fn, 0); - }, - debounce: function(func, wait, immediate) { - var timeout, result; - return function() { - var context = this, args = arguments, later, callNow; - later = function() { - timeout = null; - if (!immediate) { - result = func.apply(context, args); - } - }; - callNow = immediate && !timeout; - clearTimeout(timeout); - timeout = setTimeout(later, wait); - if (callNow) { - result = func.apply(context, args); - } - return result; - }; - }, - throttle: function(func, wait) { - var context, args, timeout, result, previous, later; - previous = 0; - later = function() { - previous = new Date(); - timeout = null; - result = func.apply(context, args); - }; - return function() { - var now = new Date(), remaining = wait - (now - previous); - context = this; - args = arguments; - if (remaining <= 0) { - clearTimeout(timeout); - timeout = null; - previous = now; - result = func.apply(context, args); - } else if (!timeout) { - timeout = setTimeout(later, remaining); - } - return result; - }; - }, - stringify: function(val) { - return _.isString(val) ? val : JSON.stringify(val); - }, - guid: function() { - function _p8(s) { - var p = (Math.random().toString(16) + "000000000").substr(2, 8); - return s ? "-" + p.substr(0, 4) + "-" + p.substr(4, 4) : p; - } - return "tt-" + _p8() + _p8(true) + _p8(true) + _p8(); - }, - noop: function() {} - }; - }(); - var WWW = function() { - "use strict"; - var defaultClassNames = { - wrapper: "twitter-typeahead", - input: "tt-input", - hint: "tt-hint", - menu: "tt-menu", - dataset: "tt-dataset", - suggestion: "tt-suggestion", - selectable: "tt-selectable", - empty: "tt-empty", - open: "tt-open", - cursor: "tt-cursor", - highlight: "tt-highlight" - }; - return build; - function build(o) { - var www, classes; - classes = _.mixin({}, defaultClassNames, o); - www = { - css: buildCss(), - classes: classes, - html: buildHtml(classes), - selectors: buildSelectors(classes) - }; - return { - css: www.css, - html: www.html, - classes: www.classes, - selectors: www.selectors, - mixin: function(o) { - _.mixin(o, www); - } - }; - } - function buildHtml(c) { - return { - wrapper: '', - menu: '
' - }; - } - function buildSelectors(classes) { - var selectors = {}; - _.each(classes, function(v, k) { - selectors[k] = "." + v; - }); - return selectors; - } - function buildCss() { - var css = { - wrapper: { - position: "relative", - display: "inline-block" - }, - hint: { - position: "absolute", - top: "0", - left: "0", - borderColor: "transparent", - boxShadow: "none", - opacity: "1" - }, - input: { - position: "relative", - verticalAlign: "top", - backgroundColor: "transparent" - }, - inputWithNoHint: { - position: "relative", - verticalAlign: "top" - }, - menu: { - position: "absolute", - top: "100%", - left: "0", - zIndex: "100", - display: "none" - }, - ltr: { - left: "0", - right: "auto" - }, - rtl: { - left: "auto", - right: " 0" - } - }; - if (_.isMsie()) { - _.mixin(css.input, { - backgroundImage: "url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)" - }); - } - return css; - } - }(); - var EventBus = function() { - "use strict"; - var namespace, deprecationMap; - namespace = "typeahead:"; - deprecationMap = { - render: "rendered", - cursorchange: "cursorchanged", - select: "selected", - autocomplete: "autocompleted" - }; - function EventBus(o) { - if (!o || !o.el) { - $.error("EventBus initialized without el"); - } - this.$el = $(o.el); - } - _.mixin(EventBus.prototype, { - _trigger: function(type, args) { - var $e = $.Event(namespace + type); - this.$el.trigger.call(this.$el, $e, args || []); - return $e; - }, - before: function(type) { - var args, $e; - args = [].slice.call(arguments, 1); - $e = this._trigger("before" + type, args); - return $e.isDefaultPrevented(); - }, - trigger: function(type) { - var deprecatedType; - this._trigger(type, [].slice.call(arguments, 1)); - if (deprecatedType = deprecationMap[type]) { - this._trigger(deprecatedType, [].slice.call(arguments, 1)); - } - } - }); - return EventBus; - }(); - var EventEmitter = function() { - "use strict"; - var splitter = /\s+/, nextTick = getNextTick(); - return { - onSync: onSync, - onAsync: onAsync, - off: off, - trigger: trigger - }; - function on(method, types, cb, context) { - var type; - if (!cb) { - return this; - } - types = types.split(splitter); - cb = context ? bindContext(cb, context) : cb; - this._callbacks = this._callbacks || {}; - while (type = types.shift()) { - this._callbacks[type] = this._callbacks[type] || { - sync: [], - async: [] - }; - this._callbacks[type][method].push(cb); - } - return this; - } - function onAsync(types, cb, context) { - return on.call(this, "async", types, cb, context); - } - function onSync(types, cb, context) { - return on.call(this, "sync", types, cb, context); - } - function off(types) { - var type; - if (!this._callbacks) { - return this; - } - types = types.split(splitter); - while (type = types.shift()) { - delete this._callbacks[type]; - } - return this; - } - function trigger(types) { - var type, callbacks, args, syncFlush, asyncFlush; - if (!this._callbacks) { - return this; - } - types = types.split(splitter); - args = [].slice.call(arguments, 1); - while ((type = types.shift()) && (callbacks = this._callbacks[type])) { - syncFlush = getFlush(callbacks.sync, this, [ type ].concat(args)); - asyncFlush = getFlush(callbacks.async, this, [ type ].concat(args)); - syncFlush() && nextTick(asyncFlush); - } - return this; - } - function getFlush(callbacks, context, args) { - return flush; - function flush() { - var cancelled; - for (var i = 0, len = callbacks.length; !cancelled && i < len; i += 1) { - cancelled = callbacks[i].apply(context, args) === false; - } - return !cancelled; - } - } - function getNextTick() { - var nextTickFn; - if (window.setImmediate) { - nextTickFn = function nextTickSetImmediate(fn) { - setImmediate(function() { - fn(); - }); - }; - } else { - nextTickFn = function nextTickSetTimeout(fn) { - setTimeout(function() { - fn(); - }, 0); - }; - } - return nextTickFn; - } - function bindContext(fn, context) { - return fn.bind ? fn.bind(context) : function() { - fn.apply(context, [].slice.call(arguments, 0)); - }; - } - }(); - var highlight = function(doc) { - "use strict"; - var defaults = { - node: null, - pattern: null, - tagName: "strong", - className: null, - wordsOnly: false, - caseSensitive: false, - diacriticInsensitive: false - }; - var accented = { - A: "[AaªÀ-Åà-åĀ-ąǍǎȀ-ȃȦȧᴬᵃḀḁẚẠ-ảₐ℀℁℻⒜Ⓐⓐ㍱-㍴㎀-㎄㎈㎉㎩-㎯㏂㏊㏟㏿Aa]", - B: "[BbᴮᵇḂ-ḇℬ⒝Ⓑⓑ㍴㎅-㎇㏃㏈㏔㏝Bb]", - C: "[CcÇçĆ-čᶜ℀ℂ℃℅℆ℭⅭⅽ⒞Ⓒⓒ㍶㎈㎉㎝㎠㎤㏄-㏇Cc]", - D: "[DdĎďDŽ-džDZ-dzᴰᵈḊ-ḓⅅⅆⅮⅾ⒟Ⓓⓓ㋏㍲㍷-㍹㎗㎭-㎯㏅㏈Dd]", - E: "[EeÈ-Ëè-ëĒ-ěȄ-ȇȨȩᴱᵉḘ-ḛẸ-ẽₑ℡ℯℰⅇ⒠Ⓔⓔ㉐㋍㋎Ee]", - F: "[FfᶠḞḟ℉ℱ℻⒡Ⓕⓕ㎊-㎌㎙ff-fflFf]", - G: "[GgĜ-ģǦǧǴǵᴳᵍḠḡℊ⒢Ⓖⓖ㋌㋍㎇㎍-㎏㎓㎬㏆㏉㏒㏿Gg]", - H: "[HhĤĥȞȟʰᴴḢ-ḫẖℋ-ℎ⒣Ⓗⓗ㋌㍱㎐-㎔㏊㏋㏗Hh]", - I: "[IiÌ-Ïì-ïĨ-İIJijǏǐȈ-ȋᴵᵢḬḭỈ-ịⁱℐℑℹⅈⅠ-ⅣⅥ-ⅨⅪⅫⅰ-ⅳⅵ-ⅸⅺⅻ⒤Ⓘⓘ㍺㏌㏕fiffiIi]", - J: "[JjIJ-ĵLJ-njǰʲᴶⅉ⒥ⒿⓙⱼJj]", - K: "[KkĶķǨǩᴷᵏḰ-ḵK⒦Ⓚⓚ㎄㎅㎉㎏㎑㎘㎞㎢㎦㎪㎸㎾㏀㏆㏍-㏏Kk]", - L: "[LlĹ-ŀLJ-ljˡᴸḶḷḺ-ḽℒℓ℡Ⅼⅼ⒧Ⓛⓛ㋏㎈㎉㏐-㏓㏕㏖㏿flfflLl]", - M: "[MmᴹᵐḾ-ṃ℠™ℳⅯⅿ⒨Ⓜⓜ㍷-㍹㎃㎆㎎㎒㎖㎙-㎨㎫㎳㎷㎹㎽㎿㏁㏂㏎㏐㏔-㏖㏘㏙㏞㏟Mm]", - N: "[NnÑñŃ-ʼnNJ-njǸǹᴺṄ-ṋⁿℕ№⒩Ⓝⓝ㎁㎋㎚㎱㎵㎻㏌㏑Nn]", - O: "[OoºÒ-Öò-öŌ-őƠơǑǒǪǫȌ-ȏȮȯᴼᵒỌ-ỏₒ℅№ℴ⒪Ⓞⓞ㍵㏇㏒㏖Oo]", - P: "[PpᴾᵖṔ-ṗℙ⒫Ⓟⓟ㉐㍱㍶㎀㎊㎩-㎬㎰㎴㎺㏋㏗-㏚Pp]", - Q: "[Qqℚ⒬Ⓠⓠ㏃Qq]", - R: "[RrŔ-řȐ-ȓʳᴿᵣṘ-ṛṞṟ₨ℛ-ℝ⒭Ⓡⓡ㋍㍴㎭-㎯㏚㏛Rr]", - S: "[SsŚ-šſȘșˢṠ-ṣ₨℁℠⒮Ⓢⓢ㎧㎨㎮-㎳㏛㏜stSs]", - T: "[TtŢ-ťȚțᵀᵗṪ-ṱẗ℡™⒯Ⓣⓣ㉐㋏㎔㏏ſtstTt]", - U: "[UuÙ-Üù-üŨ-ųƯưǓǔȔ-ȗᵁᵘᵤṲ-ṷỤ-ủ℆⒰Ⓤⓤ㍳㍺Uu]", - V: "[VvᵛᵥṼ-ṿⅣ-Ⅷⅳ-ⅷ⒱Ⓥⓥⱽ㋎㍵㎴-㎹㏜㏞Vv]", - W: "[WwŴŵʷᵂẀ-ẉẘ⒲Ⓦⓦ㎺-㎿㏝Ww]", - X: "[XxˣẊ-ẍₓ℻Ⅸ-Ⅻⅸ-ⅻ⒳Ⓧⓧ㏓Xx]", - Y: "[YyÝýÿŶ-ŸȲȳʸẎẏẙỲ-ỹ⒴Ⓨⓨ㏉Yy]", - Z: "[ZzŹ-žDZ-dzᶻẐ-ẕℤℨ⒵Ⓩⓩ㎐-㎔Zz]" - }; - return function hightlight(o) { - var regex; - o = _.mixin({}, defaults, o); - if (!o.node || !o.pattern) { - return; - } - o.pattern = _.isArray(o.pattern) ? o.pattern : [ o.pattern ]; - regex = getRegex(o.pattern, o.caseSensitive, o.wordsOnly, o.diacriticInsensitive); - traverse(o.node, hightlightTextNode); - function hightlightTextNode(textNode) { - var match, patternNode, wrapperNode; - if (match = regex.exec(textNode.data)) { - wrapperNode = doc.createElement(o.tagName); - o.className && (wrapperNode.className = o.className); - patternNode = textNode.splitText(match.index); - patternNode.splitText(match[0].length); - wrapperNode.appendChild(patternNode.cloneNode(true)); - textNode.parentNode.replaceChild(wrapperNode, patternNode); - } - return !!match; - } - function traverse(el, hightlightTextNode) { - var childNode, TEXT_NODE_TYPE = 3; - for (var i = 0; i < el.childNodes.length; i++) { - childNode = el.childNodes[i]; - if (childNode.nodeType === TEXT_NODE_TYPE) { - i += hightlightTextNode(childNode) ? 1 : 0; - } else { - traverse(childNode, hightlightTextNode); - } - } - } - }; - function accent_replacer(chr) { - return accented[chr.toUpperCase()] || chr; - } - function getRegex(patterns, caseSensitive, wordsOnly, diacriticInsensitive) { - var escapedPatterns = [], regexStr; - for (var i = 0, len = patterns.length; i < len; i++) { - var escapedWord = _.escapeRegExChars(patterns[i]); - if (diacriticInsensitive) { - escapedWord = escapedWord.replace(/\S/g, accent_replacer); - } - escapedPatterns.push(escapedWord); - } - regexStr = wordsOnly ? "\\b(" + escapedPatterns.join("|") + ")\\b" : "(" + escapedPatterns.join("|") + ")"; - return caseSensitive ? new RegExp(regexStr) : new RegExp(regexStr, "i"); - } - }(window.document); - var Input = function() { - "use strict"; - var specialKeyCodeMap; - specialKeyCodeMap = { - 9: "tab", - 27: "esc", - 37: "left", - 39: "right", - 13: "enter", - 38: "up", - 40: "down" - }; - function Input(o, www) { - var id; - o = o || {}; - if (!o.input) { - $.error("input is missing"); - } - www.mixin(this); - this.$hint = $(o.hint); - this.$input = $(o.input); - this.$menu = $(o.menu); - id = this.$input.attr("id") || _.guid(); - this.$menu.attr("id", id + "_listbox"); - this.$hint.attr({ - "aria-hidden": true - }); - this.$input.attr({ - "aria-owns": id + "_listbox", - role: "combobox", - "aria-autocomplete": "list", - "aria-expanded": false - }); - this.query = this.$input.val(); - this.queryWhenFocused = this.hasFocus() ? this.query : null; - this.$overflowHelper = buildOverflowHelper(this.$input); - this._checkLanguageDirection(); - if (this.$hint.length === 0) { - this.setHint = this.getHint = this.clearHint = this.clearHintIfInvalid = _.noop; - } - this.onSync("cursorchange", this._updateDescendent); - } - Input.normalizeQuery = function(str) { - return _.toStr(str).replace(/^\s*/g, "").replace(/\s{2,}/g, " "); - }; - _.mixin(Input.prototype, EventEmitter, { - _onBlur: function onBlur() { - this.resetInputValue(); - this.trigger("blurred"); - }, - _onFocus: function onFocus() { - this.queryWhenFocused = this.query; - this.trigger("focused"); - }, - _onKeydown: function onKeydown($e) { - var keyName = specialKeyCodeMap[$e.which || $e.keyCode]; - this._managePreventDefault(keyName, $e); - if (keyName && this._shouldTrigger(keyName, $e)) { - this.trigger(keyName + "Keyed", $e); - } - }, - _onInput: function onInput() { - this._setQuery(this.getInputValue()); - this.clearHintIfInvalid(); - this._checkLanguageDirection(); - }, - _managePreventDefault: function managePreventDefault(keyName, $e) { - var preventDefault; - switch (keyName) { - case "up": - case "down": - preventDefault = !withModifier($e); - break; - - default: - preventDefault = false; - } - preventDefault && $e.preventDefault(); - }, - _shouldTrigger: function shouldTrigger(keyName, $e) { - var trigger; - switch (keyName) { - case "tab": - trigger = !withModifier($e); - break; - - default: - trigger = true; - } - return trigger; - }, - _checkLanguageDirection: function checkLanguageDirection() { - var dir = (this.$input.css("direction") || "ltr").toLowerCase(); - if (this.dir !== dir) { - this.dir = dir; - this.$hint.attr("dir", dir); - this.trigger("langDirChanged", dir); - } - }, - _setQuery: function setQuery(val, silent) { - var areEquivalent, hasDifferentWhitespace; - areEquivalent = areQueriesEquivalent(val, this.query); - hasDifferentWhitespace = areEquivalent ? this.query.length !== val.length : false; - this.query = val; - if (!silent && !areEquivalent) { - this.trigger("queryChanged", this.query); - } else if (!silent && hasDifferentWhitespace) { - this.trigger("whitespaceChanged", this.query); - } - }, - _updateDescendent: function updateDescendent(event, id) { - this.$input.attr("aria-activedescendant", id); - }, - bind: function() { - var that = this, onBlur, onFocus, onKeydown, onInput; - onBlur = _.bind(this._onBlur, this); - onFocus = _.bind(this._onFocus, this); - onKeydown = _.bind(this._onKeydown, this); - onInput = _.bind(this._onInput, this); - this.$input.on("blur.tt", onBlur).on("focus.tt", onFocus).on("keydown.tt", onKeydown); - if (!_.isMsie() || _.isMsie() > 9) { - this.$input.on("input.tt", onInput); - } else { - this.$input.on("keydown.tt keypress.tt cut.tt paste.tt", function($e) { - if (specialKeyCodeMap[$e.which || $e.keyCode]) { - return; - } - _.defer(_.bind(that._onInput, that, $e)); - }); - } - return this; - }, - focus: function focus() { - this.$input.focus(); - }, - blur: function blur() { - this.$input.blur(); - }, - getLangDir: function getLangDir() { - return this.dir; - }, - getQuery: function getQuery() { - return this.query || ""; - }, - setQuery: function setQuery(val, silent) { - this.setInputValue(val); - this._setQuery(val, silent); - }, - hasQueryChangedSinceLastFocus: function hasQueryChangedSinceLastFocus() { - return this.query !== this.queryWhenFocused; - }, - getInputValue: function getInputValue() { - return this.$input.val(); - }, - setInputValue: function setInputValue(value) { - this.$input.val(value); - this.clearHintIfInvalid(); - this._checkLanguageDirection(); - }, - resetInputValue: function resetInputValue() { - this.setInputValue(this.query); - }, - getHint: function getHint() { - return this.$hint.val(); - }, - setHint: function setHint(value) { - this.$hint.val(value); - }, - clearHint: function clearHint() { - this.setHint(""); - }, - clearHintIfInvalid: function clearHintIfInvalid() { - var val, hint, valIsPrefixOfHint, isValid; - val = this.getInputValue(); - hint = this.getHint(); - valIsPrefixOfHint = val !== hint && hint.indexOf(val) === 0; - isValid = val !== "" && valIsPrefixOfHint && !this.hasOverflow(); - !isValid && this.clearHint(); - }, - hasFocus: function hasFocus() { - return this.$input.is(":focus"); - }, - hasOverflow: function hasOverflow() { - var constraint = this.$input.width() - 2; - this.$overflowHelper.text(this.getInputValue()); - return this.$overflowHelper.width() >= constraint; - }, - isCursorAtEnd: function() { - var valueLength, selectionStart, range; - valueLength = this.$input.val().length; - selectionStart = this.$input[0].selectionStart; - if (_.isNumber(selectionStart)) { - return selectionStart === valueLength; - } else if (document.selection) { - range = document.selection.createRange(); - range.moveStart("character", -valueLength); - return valueLength === range.text.length; - } - return true; - }, - destroy: function destroy() { - this.$hint.off(".tt"); - this.$input.off(".tt"); - this.$overflowHelper.remove(); - this.$hint = this.$input = this.$overflowHelper = $("
"); - }, - setAriaExpanded: function setAriaExpanded(value) { - this.$input.attr("aria-expanded", value); - } - }); - return Input; - function buildOverflowHelper($input) { - return $('').css({ - position: "absolute", - visibility: "hidden", - whiteSpace: "pre", - fontFamily: $input.css("font-family"), - fontSize: $input.css("font-size"), - fontStyle: $input.css("font-style"), - fontVariant: $input.css("font-variant"), - fontWeight: $input.css("font-weight"), - wordSpacing: $input.css("word-spacing"), - letterSpacing: $input.css("letter-spacing"), - textIndent: $input.css("text-indent"), - textRendering: $input.css("text-rendering"), - textTransform: $input.css("text-transform") - }).insertAfter($input); - } - function areQueriesEquivalent(a, b) { - return Input.normalizeQuery(a) === Input.normalizeQuery(b); - } - function withModifier($e) { - return $e.altKey || $e.ctrlKey || $e.metaKey || $e.shiftKey; - } - }(); - var Dataset = function() { - "use strict"; - var keys, nameGenerator; - keys = { - dataset: "tt-selectable-dataset", - val: "tt-selectable-display", - obj: "tt-selectable-object" - }; - nameGenerator = _.getIdGenerator(); - function Dataset(o, www) { - o = o || {}; - o.templates = o.templates || {}; - o.templates.notFound = o.templates.notFound || o.templates.empty; - if (!o.source) { - $.error("missing source"); - } - if (!o.node) { - $.error("missing node"); - } - if (o.name && !isValidName(o.name)) { - $.error("invalid dataset name: " + o.name); - } - www.mixin(this); - this.highlight = !!o.highlight; - this.name = _.toStr(o.name || nameGenerator()); - this.limit = o.limit || 5; - this.displayFn = getDisplayFn(o.display || o.displayKey); - this.templates = getTemplates(o.templates, this.displayFn); - this.source = o.source.__ttAdapter ? o.source.__ttAdapter() : o.source; - this.async = _.isUndefined(o.async) ? this.source.length > 2 : !!o.async; - this._resetLastSuggestion(); - this.$el = $(o.node).attr("role", "presentation").addClass(this.classes.dataset).addClass(this.classes.dataset + "-" + this.name); - } - Dataset.extractData = function extractData(el) { - var $el = $(el); - if ($el.data(keys.obj)) { - return { - dataset: $el.data(keys.dataset) || "", - val: $el.data(keys.val) || "", - obj: $el.data(keys.obj) || null - }; - } - return null; - }; - _.mixin(Dataset.prototype, EventEmitter, { - _overwrite: function overwrite(query, suggestions) { - suggestions = suggestions || []; - if (suggestions.length) { - this._renderSuggestions(query, suggestions); - } else if (this.async && this.templates.pending) { - this._renderPending(query); - } else if (!this.async && this.templates.notFound) { - this._renderNotFound(query); - } else { - this._empty(); - } - this.trigger("rendered", suggestions, false, this.name); - }, - _append: function append(query, suggestions) { - suggestions = suggestions || []; - if (suggestions.length && this.$lastSuggestion.length) { - this._appendSuggestions(query, suggestions); - } else if (suggestions.length) { - this._renderSuggestions(query, suggestions); - } else if (!this.$lastSuggestion.length && this.templates.notFound) { - this._renderNotFound(query); - } - this.trigger("rendered", suggestions, true, this.name); - }, - _renderSuggestions: function renderSuggestions(query, suggestions) { - var $fragment; - $fragment = this._getSuggestionsFragment(query, suggestions); - this.$lastSuggestion = $fragment.children().last(); - this.$el.html($fragment).prepend(this._getHeader(query, suggestions)).append(this._getFooter(query, suggestions)); - }, - _appendSuggestions: function appendSuggestions(query, suggestions) { - var $fragment, $lastSuggestion; - $fragment = this._getSuggestionsFragment(query, suggestions); - $lastSuggestion = $fragment.children().last(); - this.$lastSuggestion.after($fragment); - this.$lastSuggestion = $lastSuggestion; - }, - _renderPending: function renderPending(query) { - var template = this.templates.pending; - this._resetLastSuggestion(); - template && this.$el.html(template({ - query: query, - dataset: this.name - })); - }, - _renderNotFound: function renderNotFound(query) { - var template = this.templates.notFound; - this._resetLastSuggestion(); - template && this.$el.html(template({ - query: query, - dataset: this.name - })); - }, - _empty: function empty() { - this.$el.empty(); - this._resetLastSuggestion(); - }, - _getSuggestionsFragment: function getSuggestionsFragment(query, suggestions) { - var that = this, fragment; - fragment = document.createDocumentFragment(); - _.each(suggestions, function getSuggestionNode(suggestion) { - var $el, context; - context = that._injectQuery(query, suggestion); - $el = $(that.templates.suggestion(context)).data(keys.dataset, that.name).data(keys.obj, suggestion).data(keys.val, that.displayFn(suggestion)).addClass(that.classes.suggestion + " " + that.classes.selectable); - fragment.appendChild($el[0]); - }); - this.highlight && highlight({ - className: this.classes.highlight, - node: fragment, - pattern: query - }); - return $(fragment); - }, - _getFooter: function getFooter(query, suggestions) { - return this.templates.footer ? this.templates.footer({ - query: query, - suggestions: suggestions, - dataset: this.name - }) : null; - }, - _getHeader: function getHeader(query, suggestions) { - return this.templates.header ? this.templates.header({ - query: query, - suggestions: suggestions, - dataset: this.name - }) : null; - }, - _resetLastSuggestion: function resetLastSuggestion() { - this.$lastSuggestion = $(); - }, - _injectQuery: function injectQuery(query, obj) { - return _.isObject(obj) ? _.mixin({ - _query: query - }, obj) : obj; - }, - update: function update(query) { - var that = this, canceled = false, syncCalled = false, rendered = 0; - this.cancel(); - this.cancel = function cancel() { - canceled = true; - that.cancel = $.noop; - that.async && that.trigger("asyncCanceled", query, that.name); - }; - this.source(query, sync, async); - !syncCalled && sync([]); - function sync(suggestions) { - if (syncCalled) { - return; - } - syncCalled = true; - suggestions = (suggestions || []).slice(0, that.limit); - rendered = suggestions.length; - that._overwrite(query, suggestions); - if (rendered < that.limit && that.async) { - that.trigger("asyncRequested", query, that.name); - } - } - function async(suggestions) { - suggestions = suggestions || []; - if (!canceled && rendered < that.limit) { - that.cancel = $.noop; - var idx = Math.abs(rendered - that.limit); - rendered += idx; - that._append(query, suggestions.slice(0, idx)); - that.async && that.trigger("asyncReceived", query, that.name); - } - } - }, - cancel: $.noop, - clear: function clear() { - this._empty(); - this.cancel(); - this.trigger("cleared"); - }, - isEmpty: function isEmpty() { - return this.$el.is(":empty"); - }, - destroy: function destroy() { - this.$el = $("
"); - } - }); - return Dataset; - function getDisplayFn(display) { - display = display || _.stringify; - return _.isFunction(display) ? display : displayFn; - function displayFn(obj) { - return obj[display]; - } - } - function getTemplates(templates, displayFn) { - return { - notFound: templates.notFound && _.templatify(templates.notFound), - pending: templates.pending && _.templatify(templates.pending), - header: templates.header && _.templatify(templates.header), - footer: templates.footer && _.templatify(templates.footer), - suggestion: templates.suggestion ? userSuggestionTemplate : suggestionTemplate - }; - function userSuggestionTemplate(context) { - var template = templates.suggestion; - return $(template(context)).attr("id", _.guid()); - } - function suggestionTemplate(context) { - return $('
').attr("id", _.guid()).text(displayFn(context)); - } - } - function isValidName(str) { - return /^[_a-zA-Z0-9-]+$/.test(str); - } - }(); - var Menu = function() { - "use strict"; - function Menu(o, www) { - var that = this; - o = o || {}; - if (!o.node) { - $.error("node is required"); - } - www.mixin(this); - this.$node = $(o.node); - this.query = null; - this.datasets = _.map(o.datasets, initializeDataset); - function initializeDataset(oDataset) { - var node = that.$node.find(oDataset.node).first(); - oDataset.node = node.length ? node : $("
").appendTo(that.$node); - return new Dataset(oDataset, www); - } - } - _.mixin(Menu.prototype, EventEmitter, { - _onSelectableClick: function onSelectableClick($e) { - this.trigger("selectableClicked", $($e.currentTarget)); - }, - _onRendered: function onRendered(type, dataset, suggestions, async) { - this.$node.toggleClass(this.classes.empty, this._allDatasetsEmpty()); - this.trigger("datasetRendered", dataset, suggestions, async); - }, - _onCleared: function onCleared() { - this.$node.toggleClass(this.classes.empty, this._allDatasetsEmpty()); - this.trigger("datasetCleared"); - }, - _propagate: function propagate() { - this.trigger.apply(this, arguments); - }, - _allDatasetsEmpty: function allDatasetsEmpty() { - return _.every(this.datasets, _.bind(function isDatasetEmpty(dataset) { - var isEmpty = dataset.isEmpty(); - this.$node.attr("aria-expanded", !isEmpty); - return isEmpty; - }, this)); - }, - _getSelectables: function getSelectables() { - return this.$node.find(this.selectors.selectable); - }, - _removeCursor: function _removeCursor() { - var $selectable = this.getActiveSelectable(); - $selectable && $selectable.removeClass(this.classes.cursor); - }, - _ensureVisible: function ensureVisible($el) { - var elTop, elBottom, nodeScrollTop, nodeHeight; - elTop = $el.position().top; - elBottom = elTop + $el.outerHeight(true); - nodeScrollTop = this.$node.scrollTop(); - nodeHeight = this.$node.height() + parseInt(this.$node.css("paddingTop"), 10) + parseInt(this.$node.css("paddingBottom"), 10); - if (elTop < 0) { - this.$node.scrollTop(nodeScrollTop + elTop); - } else if (nodeHeight < elBottom) { - this.$node.scrollTop(nodeScrollTop + (elBottom - nodeHeight)); - } - }, - bind: function() { - var that = this, onSelectableClick; - onSelectableClick = _.bind(this._onSelectableClick, this); - this.$node.on("click.tt", this.selectors.selectable, onSelectableClick); - this.$node.on("mouseover", this.selectors.selectable, function() { - that.setCursor($(this)); - }); - this.$node.on("mouseleave", function() { - that._removeCursor(); - }); - _.each(this.datasets, function(dataset) { - dataset.onSync("asyncRequested", that._propagate, that).onSync("asyncCanceled", that._propagate, that).onSync("asyncReceived", that._propagate, that).onSync("rendered", that._onRendered, that).onSync("cleared", that._onCleared, that); - }); - return this; - }, - isOpen: function isOpen() { - return this.$node.hasClass(this.classes.open); - }, - open: function open() { - this.$node.scrollTop(0); - this.$node.addClass(this.classes.open); - }, - close: function close() { - this.$node.attr("aria-expanded", false); - this.$node.removeClass(this.classes.open); - this._removeCursor(); - }, - setLanguageDirection: function setLanguageDirection(dir) { - this.$node.attr("dir", dir); - }, - selectableRelativeToCursor: function selectableRelativeToCursor(delta) { - var $selectables, $oldCursor, oldIndex, newIndex; - $oldCursor = this.getActiveSelectable(); - $selectables = this._getSelectables(); - oldIndex = $oldCursor ? $selectables.index($oldCursor) : -1; - newIndex = oldIndex + delta; - newIndex = (newIndex + 1) % ($selectables.length + 1) - 1; - newIndex = newIndex < -1 ? $selectables.length - 1 : newIndex; - return newIndex === -1 ? null : $selectables.eq(newIndex); - }, - setCursor: function setCursor($selectable) { - this._removeCursor(); - if ($selectable = $selectable && $selectable.first()) { - $selectable.addClass(this.classes.cursor); - this._ensureVisible($selectable); - } - }, - getSelectableData: function getSelectableData($el) { - return $el && $el.length ? Dataset.extractData($el) : null; - }, - getActiveSelectable: function getActiveSelectable() { - var $selectable = this._getSelectables().filter(this.selectors.cursor).first(); - return $selectable.length ? $selectable : null; - }, - getTopSelectable: function getTopSelectable() { - var $selectable = this._getSelectables().first(); - return $selectable.length ? $selectable : null; - }, - update: function update(query) { - var isValidUpdate = query !== this.query; - if (isValidUpdate) { - this.query = query; - _.each(this.datasets, updateDataset); - } - return isValidUpdate; - function updateDataset(dataset) { - dataset.update(query); - } - }, - empty: function empty() { - _.each(this.datasets, clearDataset); - this.query = null; - this.$node.addClass(this.classes.empty); - function clearDataset(dataset) { - dataset.clear(); - } - }, - destroy: function destroy() { - this.$node.off(".tt"); - this.$node = $("
"); - _.each(this.datasets, destroyDataset); - function destroyDataset(dataset) { - dataset.destroy(); - } - } - }); - return Menu; - }(); - var Status = function() { - "use strict"; - function Status(options) { - this.$el = $("", { - role: "status", - "aria-live": "polite" - }).css({ - position: "absolute", - padding: "0", - border: "0", - height: "1px", - width: "1px", - "margin-bottom": "-1px", - "margin-right": "-1px", - overflow: "hidden", - clip: "rect(0 0 0 0)", - "white-space": "nowrap" - }); - options.$input.after(this.$el); - _.each(options.menu.datasets, _.bind(function(dataset) { - if (dataset.onSync) { - dataset.onSync("rendered", _.bind(this.update, this)); - dataset.onSync("cleared", _.bind(this.cleared, this)); - } - }, this)); - } - _.mixin(Status.prototype, { - update: function update(event, suggestions) { - var length = suggestions.length; - var words; - if (length === 1) { - words = { - result: "result", - is: "is" - }; - } else { - words = { - result: "results", - is: "are" - }; - } - this.$el.text(length + " " + words.result + " " + words.is + " available, use up and down arrow keys to navigate."); - }, - cleared: function() { - this.$el.text(""); - } - }); - return Status; - }(); - var DefaultMenu = function() { - "use strict"; - var s = Menu.prototype; - function DefaultMenu() { - Menu.apply(this, [].slice.call(arguments, 0)); - } - _.mixin(DefaultMenu.prototype, Menu.prototype, { - open: function open() { - !this._allDatasetsEmpty() && this._show(); - return s.open.apply(this, [].slice.call(arguments, 0)); - }, - close: function close() { - this._hide(); - return s.close.apply(this, [].slice.call(arguments, 0)); - }, - _onRendered: function onRendered() { - if (this._allDatasetsEmpty()) { - this._hide(); - } else { - this.isOpen() && this._show(); - } - return s._onRendered.apply(this, [].slice.call(arguments, 0)); - }, - _onCleared: function onCleared() { - if (this._allDatasetsEmpty()) { - this._hide(); - } else { - this.isOpen() && this._show(); - } - return s._onCleared.apply(this, [].slice.call(arguments, 0)); - }, - setLanguageDirection: function setLanguageDirection(dir) { - this.$node.css(dir === "ltr" ? this.css.ltr : this.css.rtl); - return s.setLanguageDirection.apply(this, [].slice.call(arguments, 0)); - }, - _hide: function hide() { - this.$node.hide(); - }, - _show: function show() { - this.$node.css("display", "block"); - } - }); - return DefaultMenu; - }(); - var Typeahead = function() { - "use strict"; - function Typeahead(o, www) { - var onFocused, onBlurred, onEnterKeyed, onTabKeyed, onEscKeyed, onUpKeyed, onDownKeyed, onLeftKeyed, onRightKeyed, onQueryChanged, onWhitespaceChanged; - o = o || {}; - if (!o.input) { - $.error("missing input"); - } - if (!o.menu) { - $.error("missing menu"); - } - if (!o.eventBus) { - $.error("missing event bus"); - } - www.mixin(this); - this.eventBus = o.eventBus; - this.minLength = _.isNumber(o.minLength) ? o.minLength : 1; - this.input = o.input; - this.menu = o.menu; - this.enabled = true; - this.autoselect = !!o.autoselect; - this.active = false; - this.input.hasFocus() && this.activate(); - this.dir = this.input.getLangDir(); - this._hacks(); - this.menu.bind().onSync("selectableClicked", this._onSelectableClicked, this).onSync("asyncRequested", this._onAsyncRequested, this).onSync("asyncCanceled", this._onAsyncCanceled, this).onSync("asyncReceived", this._onAsyncReceived, this).onSync("datasetRendered", this._onDatasetRendered, this).onSync("datasetCleared", this._onDatasetCleared, this); - onFocused = c(this, "activate", "open", "_onFocused"); - onBlurred = c(this, "deactivate", "_onBlurred"); - onEnterKeyed = c(this, "isActive", "isOpen", "_onEnterKeyed"); - onTabKeyed = c(this, "isActive", "isOpen", "_onTabKeyed"); - onEscKeyed = c(this, "isActive", "_onEscKeyed"); - onUpKeyed = c(this, "isActive", "open", "_onUpKeyed"); - onDownKeyed = c(this, "isActive", "open", "_onDownKeyed"); - onLeftKeyed = c(this, "isActive", "isOpen", "_onLeftKeyed"); - onRightKeyed = c(this, "isActive", "isOpen", "_onRightKeyed"); - onQueryChanged = c(this, "_openIfActive", "_onQueryChanged"); - onWhitespaceChanged = c(this, "_openIfActive", "_onWhitespaceChanged"); - this.input.bind().onSync("focused", onFocused, this).onSync("blurred", onBlurred, this).onSync("enterKeyed", onEnterKeyed, this).onSync("tabKeyed", onTabKeyed, this).onSync("escKeyed", onEscKeyed, this).onSync("upKeyed", onUpKeyed, this).onSync("downKeyed", onDownKeyed, this).onSync("leftKeyed", onLeftKeyed, this).onSync("rightKeyed", onRightKeyed, this).onSync("queryChanged", onQueryChanged, this).onSync("whitespaceChanged", onWhitespaceChanged, this).onSync("langDirChanged", this._onLangDirChanged, this); - } - _.mixin(Typeahead.prototype, { - _hacks: function hacks() { - var $input, $menu; - $input = this.input.$input || $("
"); - $menu = this.menu.$node || $("
"); - $input.on("blur.tt", function($e) { - var active, isActive, hasActive; - active = document.activeElement; - isActive = $menu.is(active); - hasActive = $menu.has(active).length > 0; - if (_.isMsie() && (isActive || hasActive)) { - $e.preventDefault(); - $e.stopImmediatePropagation(); - _.defer(function() { - $input.focus(); - }); - } - }); - $menu.on("mousedown.tt", function($e) { - $e.preventDefault(); - }); - }, - _onSelectableClicked: function onSelectableClicked(type, $el) { - this.select($el); - }, - _onDatasetCleared: function onDatasetCleared() { - this._updateHint(); - }, - _onDatasetRendered: function onDatasetRendered(type, suggestions, async, dataset) { - this._updateHint(); - if (this.autoselect) { - var cursorClass = this.selectors.cursor.substr(1); - this.menu.$node.find(this.selectors.suggestion).first().addClass(cursorClass); - } - this.eventBus.trigger("render", suggestions, async, dataset); - }, - _onAsyncRequested: function onAsyncRequested(type, dataset, query) { - this.eventBus.trigger("asyncrequest", query, dataset); - }, - _onAsyncCanceled: function onAsyncCanceled(type, dataset, query) { - this.eventBus.trigger("asynccancel", query, dataset); - }, - _onAsyncReceived: function onAsyncReceived(type, dataset, query) { - this.eventBus.trigger("asyncreceive", query, dataset); - }, - _onFocused: function onFocused() { - this._minLengthMet() && this.menu.update(this.input.getQuery()); - }, - _onBlurred: function onBlurred() { - if (this.input.hasQueryChangedSinceLastFocus()) { - this.eventBus.trigger("change", this.input.getQuery()); - } - }, - _onEnterKeyed: function onEnterKeyed(type, $e) { - var $selectable; - if ($selectable = this.menu.getActiveSelectable()) { - if (this.select($selectable)) { - $e.preventDefault(); - $e.stopPropagation(); - } - } else if (this.autoselect) { - if (this.select(this.menu.getTopSelectable())) { - $e.preventDefault(); - $e.stopPropagation(); - } - } - }, - _onTabKeyed: function onTabKeyed(type, $e) { - var $selectable; - if ($selectable = this.menu.getActiveSelectable()) { - this.select($selectable) && $e.preventDefault(); - } else if (this.autoselect) { - if ($selectable = this.menu.getTopSelectable()) { - this.autocomplete($selectable) && $e.preventDefault(); - } - } - }, - _onEscKeyed: function onEscKeyed() { - this.close(); - }, - _onUpKeyed: function onUpKeyed() { - this.moveCursor(-1); - }, - _onDownKeyed: function onDownKeyed() { - this.moveCursor(+1); - }, - _onLeftKeyed: function onLeftKeyed() { - if (this.dir === "rtl" && this.input.isCursorAtEnd()) { - this.autocomplete(this.menu.getActiveSelectable() || this.menu.getTopSelectable()); - } - }, - _onRightKeyed: function onRightKeyed() { - if (this.dir === "ltr" && this.input.isCursorAtEnd()) { - this.autocomplete(this.menu.getActiveSelectable() || this.menu.getTopSelectable()); - } - }, - _onQueryChanged: function onQueryChanged(e, query) { - this._minLengthMet(query) ? this.menu.update(query) : this.menu.empty(); - }, - _onWhitespaceChanged: function onWhitespaceChanged() { - this._updateHint(); - }, - _onLangDirChanged: function onLangDirChanged(e, dir) { - if (this.dir !== dir) { - this.dir = dir; - this.menu.setLanguageDirection(dir); - } - }, - _openIfActive: function openIfActive() { - this.isActive() && this.open(); - }, - _minLengthMet: function minLengthMet(query) { - query = _.isString(query) ? query : this.input.getQuery() || ""; - return query.length >= this.minLength; - }, - _updateHint: function updateHint() { - var $selectable, data, val, query, escapedQuery, frontMatchRegEx, match; - $selectable = this.menu.getTopSelectable(); - data = this.menu.getSelectableData($selectable); - val = this.input.getInputValue(); - if (data && !_.isBlankString(val) && !this.input.hasOverflow()) { - query = Input.normalizeQuery(val); - escapedQuery = _.escapeRegExChars(query); - frontMatchRegEx = new RegExp("^(?:" + escapedQuery + ")(.+$)", "i"); - match = frontMatchRegEx.exec(data.val); - match && this.input.setHint(val + match[1]); - } else { - this.input.clearHint(); - } - }, - isEnabled: function isEnabled() { - return this.enabled; - }, - enable: function enable() { - this.enabled = true; - }, - disable: function disable() { - this.enabled = false; - }, - isActive: function isActive() { - return this.active; - }, - activate: function activate() { - if (this.isActive()) { - return true; - } else if (!this.isEnabled() || this.eventBus.before("active")) { - return false; - } else { - this.active = true; - this.eventBus.trigger("active"); - return true; - } - }, - deactivate: function deactivate() { - if (!this.isActive()) { - return true; - } else if (this.eventBus.before("idle")) { - return false; - } else { - this.active = false; - this.close(); - this.eventBus.trigger("idle"); - return true; - } - }, - isOpen: function isOpen() { - return this.menu.isOpen(); - }, - open: function open() { - if (!this.isOpen() && !this.eventBus.before("open")) { - this.input.setAriaExpanded(true); - this.menu.open(); - this._updateHint(); - this.eventBus.trigger("open"); - } - return this.isOpen(); - }, - close: function close() { - if (this.isOpen() && !this.eventBus.before("close")) { - this.input.setAriaExpanded(false); - this.menu.close(); - this.input.clearHint(); - this.input.resetInputValue(); - this.eventBus.trigger("close"); - } - return !this.isOpen(); - }, - setVal: function setVal(val) { - this.input.setQuery(_.toStr(val)); - }, - getVal: function getVal() { - return this.input.getQuery(); - }, - select: function select($selectable) { - var data = this.menu.getSelectableData($selectable); - if (data && !this.eventBus.before("select", data.obj, data.dataset)) { - this.input.setQuery(data.val, true); - this.eventBus.trigger("select", data.obj, data.dataset); - this.close(); - return true; - } - return false; - }, - autocomplete: function autocomplete($selectable) { - var query, data, isValid; - query = this.input.getQuery(); - data = this.menu.getSelectableData($selectable); - isValid = data && query !== data.val; - if (isValid && !this.eventBus.before("autocomplete", data.obj, data.dataset)) { - this.input.setQuery(data.val); - this.eventBus.trigger("autocomplete", data.obj, data.dataset); - return true; - } - return false; - }, - moveCursor: function moveCursor(delta) { - var query, $candidate, data, suggestion, datasetName, cancelMove, id; - query = this.input.getQuery(); - $candidate = this.menu.selectableRelativeToCursor(delta); - data = this.menu.getSelectableData($candidate); - suggestion = data ? data.obj : null; - datasetName = data ? data.dataset : null; - id = $candidate ? $candidate.attr("id") : null; - this.input.trigger("cursorchange", id); - cancelMove = this._minLengthMet() && this.menu.update(query); - if (!cancelMove && !this.eventBus.before("cursorchange", suggestion, datasetName)) { - this.menu.setCursor($candidate); - if (data) { - if (typeof data.val === "string") { - this.input.setInputValue(data.val); - } - } else { - this.input.resetInputValue(); - this._updateHint(); - } - this.eventBus.trigger("cursorchange", suggestion, datasetName); - return true; - } - return false; - }, - destroy: function destroy() { - this.input.destroy(); - this.menu.destroy(); - } - }); - return Typeahead; - function c(ctx) { - var methods = [].slice.call(arguments, 1); - return function() { - var args = [].slice.call(arguments); - _.each(methods, function(method) { - return ctx[method].apply(ctx, args); - }); - }; - } - }(); - (function() { - "use strict"; - var old, keys, methods; - old = $.fn.typeahead; - keys = { - www: "tt-www", - attrs: "tt-attrs", - typeahead: "tt-typeahead" - }; - methods = { - initialize: function initialize(o, datasets) { - var www; - datasets = _.isArray(datasets) ? datasets : [].slice.call(arguments, 1); - o = o || {}; - www = WWW(o.classNames); - return this.each(attach); - function attach() { - var $input, $wrapper, $hint, $menu, defaultHint, defaultMenu, eventBus, input, menu, status, typeahead, MenuConstructor; - _.each(datasets, function(d) { - d.highlight = !!o.highlight; - }); - $input = $(this); - $wrapper = $(www.html.wrapper); - $hint = $elOrNull(o.hint); - $menu = $elOrNull(o.menu); - defaultHint = o.hint !== false && !$hint; - defaultMenu = o.menu !== false && !$menu; - defaultHint && ($hint = buildHintFromInput($input, www)); - defaultMenu && ($menu = $(www.html.menu).css(www.css.menu)); - $hint && $hint.val(""); - $input = prepInput($input, www); - if (defaultHint || defaultMenu) { - $wrapper.css(www.css.wrapper); - $input.css(defaultHint ? www.css.input : www.css.inputWithNoHint); - $input.wrap($wrapper).parent().prepend(defaultHint ? $hint : null).append(defaultMenu ? $menu : null); - } - MenuConstructor = defaultMenu ? DefaultMenu : Menu; - eventBus = new EventBus({ - el: $input - }); - input = new Input({ - hint: $hint, - input: $input, - menu: $menu - }, www); - menu = new MenuConstructor({ - node: $menu, - datasets: datasets - }, www); - status = new Status({ - $input: $input, - menu: menu - }); - typeahead = new Typeahead({ - input: input, - menu: menu, - eventBus: eventBus, - minLength: o.minLength, - autoselect: o.autoselect - }, www); - $input.data(keys.www, www); - $input.data(keys.typeahead, typeahead); - } - }, - isEnabled: function isEnabled() { - var enabled; - ttEach(this.first(), function(t) { - enabled = t.isEnabled(); - }); - return enabled; - }, - enable: function enable() { - ttEach(this, function(t) { - t.enable(); - }); - return this; - }, - disable: function disable() { - ttEach(this, function(t) { - t.disable(); - }); - return this; - }, - isActive: function isActive() { - var active; - ttEach(this.first(), function(t) { - active = t.isActive(); - }); - return active; - }, - activate: function activate() { - ttEach(this, function(t) { - t.activate(); - }); - return this; - }, - deactivate: function deactivate() { - ttEach(this, function(t) { - t.deactivate(); - }); - return this; - }, - isOpen: function isOpen() { - var open; - ttEach(this.first(), function(t) { - open = t.isOpen(); - }); - return open; - }, - open: function open() { - ttEach(this, function(t) { - t.open(); - }); - return this; - }, - close: function close() { - ttEach(this, function(t) { - t.close(); - }); - return this; - }, - select: function select(el) { - var success = false, $el = $(el); - ttEach(this.first(), function(t) { - success = t.select($el); - }); - return success; - }, - autocomplete: function autocomplete(el) { - var success = false, $el = $(el); - ttEach(this.first(), function(t) { - success = t.autocomplete($el); - }); - return success; - }, - moveCursor: function moveCursoe(delta) { - var success = false; - ttEach(this.first(), function(t) { - success = t.moveCursor(delta); - }); - return success; - }, - val: function val(newVal) { - var query; - if (!arguments.length) { - ttEach(this.first(), function(t) { - query = t.getVal(); - }); - return query; - } else { - ttEach(this, function(t) { - t.setVal(_.toStr(newVal)); - }); - return this; - } - }, - destroy: function destroy() { - ttEach(this, function(typeahead, $input) { - revert($input); - typeahead.destroy(); - }); - return this; - } - }; - $.fn.typeahead = function(method) { - if (methods[method]) { - return methods[method].apply(this, [].slice.call(arguments, 1)); - } else { - return methods.initialize.apply(this, arguments); - } - }; - $.fn.typeahead.noConflict = function noConflict() { - $.fn.typeahead = old; - return this; - }; - function ttEach($els, fn) { - $els.each(function() { - var $input = $(this), typeahead; - (typeahead = $input.data(keys.typeahead)) && fn(typeahead, $input); - }); - } - function buildHintFromInput($input, www) { - return $input.clone().addClass(www.classes.hint).removeData().css(www.css.hint).css(getBackgroundStyles($input)).prop({ - readonly: true, - required: false - }).removeAttr("id name placeholder").removeClass("required").attr({ - spellcheck: "false", - tabindex: -1 - }); - } - function prepInput($input, www) { - $input.data(keys.attrs, { - dir: $input.attr("dir"), - autocomplete: $input.attr("autocomplete"), - spellcheck: $input.attr("spellcheck"), - style: $input.attr("style") - }); - $input.addClass(www.classes.input).attr({ - spellcheck: false - }); - try { - !$input.attr("dir") && $input.attr("dir", "auto"); - } catch (e) {} - return $input; - } - function getBackgroundStyles($el) { - return { - backgroundAttachment: $el.css("background-attachment"), - backgroundClip: $el.css("background-clip"), - backgroundColor: $el.css("background-color"), - backgroundImage: $el.css("background-image"), - backgroundOrigin: $el.css("background-origin"), - backgroundPosition: $el.css("background-position"), - backgroundRepeat: $el.css("background-repeat"), - backgroundSize: $el.css("background-size") - }; - } - function revert($input) { - var www, $wrapper; - www = $input.data(keys.www); - $wrapper = $input.parent().filter(www.selectors.wrapper); - _.each($input.data(keys.attrs), function(val, key) { - _.isUndefined(val) ? $input.removeAttr(key) : $input.attr(key, val); - }); - $input.removeData(keys.typeahead).removeData(keys.www).removeData(keys.attr).removeClass(www.classes.input); - if ($wrapper.length) { - $input.detach().insertAfter($wrapper); - $wrapper.remove(); - } - } - function $elOrNull(obj) { - var isValid, $el; - isValid = _.isJQuery(obj) || _.isElement(obj); - $el = isValid ? $(obj).first() : []; - return $el.length ? $el : null; - } - })(); -}); \ No newline at end of file diff --git a/docs/api/Reducer/search.json b/docs/api/Reducer/search.json deleted file mode 100644 index cd7224c..0000000 --- a/docs/api/Reducer/search.json +++ /dev/null @@ -1 +0,0 @@ -{"Structs/Reducer.html#/s:7ReducerAAV6reduceyyx_q_ztcvp":{"name":"reduce","abstract":"

Execute the wrapped reduce function. You must provide the parameters action: ActionType (the action to be","parent_name":"Reducer"},"Structs/Reducer.html#/s:7ReducerAAV6reduceyAByxq_Gyx_q_ztcFZ":{"name":"reduce(_:)","abstract":"

Reducer initialiser takes only the underlying function (ActionType, inout StateType) -> Void that is the reducer","parent_name":"Reducer"},"Structs/Reducer.html#/s:7ReducerAAV7composeyAByxq_GAD_ADdtFZ":{"name":"compose(_:_:)","abstract":"

Composes two or more reducers in series, to be evaluated from the left to the right for each incoming action.

","parent_name":"Reducer"},"Structs/Reducer.html#/s:7ReducerAAV7compose7contentAByxq_GAEyXE_tFZ":{"name":"compose(content:)","abstract":"

Composes two or more reducers in series, to be evaluated from the top to the bottom for each incoming action.

","parent_name":"Reducer"},"Structs/Reducer.html#/s:7ReducerAAV8identityAByxq_GvpZ":{"name":"identity","abstract":"

No-op reducer. Composing it with any other reducer will not change anything from the other reducer behaviour, regardless if the identity reducer","parent_name":"Reducer"},"Structs/Reducer.html#/s:7ReducerAAV4lift12actionGetter05stateD00E6SetterAByqd__qd_0_GxSgqd__c_q_qd_0_cyqd_0_z_q_tctr0_lF":{"name":"lift(actionGetter:stateGetter:stateSetter:)","abstract":"

A type-lifting method. The global state of your app is Whole, and the Reducer handles Part, that is a","parent_name":"Reducer"},"Structs/Reducer.html#/s:7ReducerAAV4lift6action5stateAByqd__qd_0_Gs7KeyPathCyqd__xSgG_s08WritableeF0Cyqd_0_q_Gtr0_lF":{"name":"lift(action:state:)","abstract":"

A type-lifting method. The global state of your app is Whole, and the Reducer handles Part, that is a","parent_name":"Reducer"},"Structs/Reducer.html#/s:7ReducerAAV4lift5stateAByxqd__Gs15WritableKeyPathCyqd__q_G_tlF":{"name":"lift(state:)","abstract":"

A type-lifting method. The global state of your app is Whole, and the Reducer handles Part, that is a","parent_name":"Reducer"},"Structs/Reducer.html#/s:7ReducerAAV4lift6actionAByqd__q_Gs7KeyPathCyqd__xSgG_tlF":{"name":"lift(action:)","abstract":"

A type-lifting method. The global state of your app is Whole, and the Reducer handles Part, that is a","parent_name":"Reducer"},"Structs/Reducer.html#/s:7ReducerAAV16liftToCollection6action05stateD010identifierAByqd__qd_0_Gs7KeyPathCyqd__qd_2_2id_xADtSgG_s08WritablehI0Cyqd_0_qd_1_GAIyq_qd_2_Gt7ElementQyd_1_Rs_SMRd_1_SHRd_2_r2_lF":{"name":"liftToCollection(action:stateCollection:identifier:)","abstract":"

A type-lifting method for collections. The global state of your app is Whole, and the Reducer handles an element","parent_name":"Reducer"},"Structs/Reducer.html#/s:7ReducerAAV16liftToCollection6action05stateD0AByqd__qd_0_Gs7KeyPathCyqd__5IndexQyd_1_5index_xADtSgG_s08WritablegH0Cyqd_0_qd_1_Gt7ElementQyd_1_Rs_SMRd_1_r1_lF":{"name":"liftToCollection(action:stateCollection:)","abstract":"

A type-lifting method for collections. The global state of your app is Whole, and the Reducer handles an element","parent_name":"Reducer"},"Structs/Reducer.html#/s:7ReducerAAVAAs12IdentifiableR_rlE16liftToCollection6action05stateE0AByqd__qd_0_Gs7KeyPathCyqd__2IDQy_2id_xAEtSgG_s08WritablehI0Cyqd_0_qd_1_Gt7ElementQyd_1_Rs_SMRd_1_r1_lF":{"name":"liftToCollection(action:stateCollection:)","abstract":"

A type-lifting method for collections. The global state of your app is Whole, and the Reducer handles an element","parent_name":"Reducer"},"Structs/Reducer.html":{"name":"Reducer","abstract":"

An entity that calculates the new state when given current state and an incoming action (Action, inout State) -> Void.

"},"Enums/ReducerBuilder.html#/s:7Reducer0A7BuilderO10buildBlockyA2AVyxq_GAFd_tr0_lFZ":{"name":"buildBlock(_:)","abstract":"

DSL Builder for Reducer compose

","parent_name":"ReducerBuilder"},"Enums/ReducerBuilder.html":{"name":"ReducerBuilder","abstract":"

DSL Builder for Reducer compose

"},"Enums.html":{"name":"Enumerations","abstract":"

The following enumerations are available globally.

"},"Structs.html":{"name":"Structures","abstract":"

The following structures are available globally.

"}} \ No newline at end of file diff --git a/docs/api/Reducer/undocumented.json b/docs/api/Reducer/undocumented.json deleted file mode 100644 index b637641..0000000 --- a/docs/api/Reducer/undocumented.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "warnings": [ - - ], - "source_directory": "/Users/luiz.barbosa/code/SwiftRex/Reducer" -} \ No newline at end of file diff --git a/docs/docc/Reducer.doccarchive/css/documentation-topic.3bca6578.css b/docs/docc/Reducer.doccarchive/css/documentation-topic.3bca6578.css deleted file mode 100644 index 3b8635a..0000000 --- a/docs/docc/Reducer.doccarchive/css/documentation-topic.3bca6578.css +++ /dev/null @@ -1,9 +0,0 @@ -/*! - * This source file is part of the Swift.org open source project - * - * Copyright (c) 2021 Apple Inc. and the Swift project authors - * Licensed under Apache License v2.0 with Runtime Library Exception - * - * See https://swift.org/LICENSE.txt for license information - * See https://swift.org/CONTRIBUTORS.txt for Swift project authors - */.betainfo[data-v-fe7602da]{font-size:.94118rem;padding:3rem 0;background-color:var(--color-fill-secondary)}.full-width-container .betainfo-container[data-v-fe7602da]{max-width:920px;margin-left:auto;margin-right:auto;padding-left:80px;padding-right:80px;box-sizing:border-box}@media only screen and (min-width:1251px){.full-width-container .betainfo-container[data-v-fe7602da]{box-sizing:unset;padding-left:120px;padding-right:120px;margin-left:0}}@media only screen and (max-width:735px){.full-width-container .betainfo-container[data-v-fe7602da]{width:auto;padding-left:20px;padding-right:20px}}.static-width-container .betainfo-container[data-v-fe7602da]{margin-left:auto;margin-right:auto;width:980px}@media only screen and (max-width:1250px){.static-width-container .betainfo-container[data-v-fe7602da]{width:692px}}@media only screen and (max-width:735px){.static-width-container .betainfo-container[data-v-fe7602da]{width:87.5%}}.betainfo-label[data-v-fe7602da]{font-weight:600;font-size:.94118rem}.betainfo-content[data-v-fe7602da] p{margin-bottom:10px}.contenttable+.betainfo[data-v-fe7602da]{background-color:var(--color-fill)}.summary-section[data-v-3aa6f694]:last-of-type{margin-right:0}@media only screen and (max-width:735px){.summary-section[data-v-3aa6f694]{margin-right:0}}.title[data-v-6796f6ea]{color:#fff;font-size:.82353rem;margin-right:.5rem;text-rendering:optimizeLegibility}.documentation-hero--disabled .title[data-v-6796f6ea]{color:var(--colors-text,var(--color-text))}.language[data-v-0de98d61]{padding-bottom:10px;justify-content:flex-end}.language-list[data-v-0de98d61],.language[data-v-0de98d61]{font-size:.82353rem;line-height:1.42857;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;margin-top:0;display:flex;align-items:center}.language-option.swift[data-v-0de98d61]{padding-right:10px;border-right:1px solid var(--color-fill-gray-tertiary)}.language-option.objc[data-v-0de98d61]{padding-left:10px}.language-option.active[data-v-0de98d61],.language-option.router-link-exact-active[data-v-0de98d61]{color:#ccc}.documentation-hero--disabled .language-option.active[data-v-0de98d61],.documentation-hero--disabled .language-option.router-link-exact-active[data-v-0de98d61]{color:var(--colors-secondary-label,var(--color-secondary-label))}.NavigatorLeafIcon[data-v-031bfabc]{width:1em;height:1em;margin-right:7px;flex:0 0 auto;color:var(--color-figure-gray-secondary)}.NavigatorLeafIcon svg[data-v-031bfabc]{width:100%;height:100%}.documentation-hero[data-v-14076498]{background:#000;color:#fff;overflow:hidden;text-align:left;position:relative}.documentation-hero[data-v-14076498]:before{content:"";background:#2a2a2a;position:absolute;width:100%;left:0;top:-50%;height:150%;right:0}.documentation-hero[data-v-14076498]:after{background:transparent;opacity:.7;width:100%;position:absolute;content:"";height:100%;left:0;top:0}.documentation-hero .icon[data-v-14076498]{position:absolute;margin-top:10px;margin-right:25px;right:0;width:250px;height:calc(100% - 20px);box-sizing:border-box}@media only screen and (max-width:735px){.documentation-hero .icon[data-v-14076498]{display:none}}.documentation-hero .background-icon[data-v-14076498]{color:#161616;display:block;width:250px;height:auto;opacity:1;position:absolute;top:50%;left:0;transform:translateY(-50%);max-height:100%}.documentation-hero .background-icon[data-v-14076498] svg{width:100%;height:100%}.documentation-hero__content[data-v-14076498]{padding-top:2.35294rem;padding-bottom:40px;position:relative;z-index:1}.full-width-container .documentation-hero__content[data-v-14076498]{max-width:920px;margin-left:auto;margin-right:auto;padding-left:80px;padding-right:80px;box-sizing:border-box}@media only screen and (min-width:1251px){.full-width-container .documentation-hero__content[data-v-14076498]{box-sizing:unset;padding-left:120px;padding-right:120px;margin-left:0}}@media only screen and (max-width:735px){.full-width-container .documentation-hero__content[data-v-14076498]{width:auto;padding-left:20px;padding-right:20px}}.static-width-container .documentation-hero__content[data-v-14076498]{margin-left:auto;margin-right:auto;width:980px}@media only screen and (max-width:1250px){.static-width-container .documentation-hero__content[data-v-14076498]{width:692px}}@media only screen and (max-width:735px){.static-width-container .documentation-hero__content[data-v-14076498]{width:87.5%}}.documentation-hero__above-content[data-v-14076498]{position:relative;z-index:1}.documentation-hero--disabled[data-v-14076498]{background:none;color:var(--colors-text,var(--color-text))}.documentation-hero--disabled[data-v-14076498]:after,.documentation-hero--disabled[data-v-14076498]:before{content:none}.short-hero[data-v-14076498]{padding-top:3.52941rem;padding-bottom:3.52941rem}.extra-bottom-padding[data-v-14076498]{padding-bottom:3.82353rem}.theme-dark[data-v-14076498] a:not(.button-cta){color:#09f}[data-v-002affcc] .code-listing{background:var(--background,var(--color-code-background));color:var(--text,var(--color-code-plain));border-color:var(--colors-grid,var(--color-grid));border-width:1px;border-style:solid}[data-v-002affcc]+.code-listing,[data-v-002affcc] .code-listing+*{margin-top:1.6em}[data-v-002affcc] .code-listing pre{padding:8px 14px;padding-right:0}[data-v-002affcc] .code-listing pre>code{font-size:.88235rem;line-height:1.66667;font-weight:400;font-family:Menlo,monospace}[data-v-002affcc] *+aside,[data-v-002affcc] *+figure,[data-v-002affcc]+.endpoint-example,[data-v-002affcc] .endpoint-example+*,[data-v-002affcc] aside+*,[data-v-002affcc] figure+*{margin-top:1.6em}[data-v-002affcc] img{display:block;margin:1.6em auto;max-width:100%}[data-v-002affcc] ol,[data-v-002affcc] ul{margin-top:.8em;margin-left:2rem}[data-v-002affcc] ol li:not(:first-child),[data-v-002affcc] ul li:not(:first-child){margin-top:.8em}@media only screen and (max-width:735px){[data-v-002affcc] ol,[data-v-002affcc] ul{margin-left:1.25rem}}[data-v-002affcc]+dl,[data-v-002affcc] dl+*,[data-v-002affcc] dt:not(:first-child){margin-top:.8em}[data-v-002affcc] dd{margin-left:2em}.abstract[data-v-702ec04e]{font-size:1.23529rem;line-height:1.38095;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif}@media only screen and (max-width:735px){.abstract[data-v-702ec04e]{font-size:1.11765rem;line-height:1.42105;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif}}[data-v-702ec04e] p:last-child{margin-bottom:0}.container[data-v-5a07ba83]{padding-bottom:40px}.full-width-container .container[data-v-5a07ba83]{max-width:920px;margin-left:auto;margin-right:auto;padding-left:80px;padding-right:80px;box-sizing:border-box}@media only screen and (min-width:1251px){.full-width-container .container[data-v-5a07ba83]{box-sizing:unset;padding-left:120px;padding-right:120px;margin-left:0}}@media only screen and (max-width:735px){.full-width-container .container[data-v-5a07ba83]{width:auto;padding-left:20px;padding-right:20px}}.static-width-container .container[data-v-5a07ba83]{margin-left:auto;margin-right:auto;width:980px}@media only screen and (max-width:1250px){.static-width-container .container[data-v-5a07ba83]{width:692px}}@media only screen and (max-width:735px){.static-width-container .container[data-v-5a07ba83]{width:87.5%}}.title[data-v-5a07ba83]{font-size:1.88235rem;line-height:1.125;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;padding-top:40px;border-top-color:var(--color-grid);border-top-style:solid;border-top-width:1px}@media only screen and (max-width:1250px){.title[data-v-5a07ba83]{font-size:1.64706rem;line-height:1.14286;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif}}@media only screen and (max-width:735px){.title[data-v-5a07ba83]{font-size:1.41176rem;line-height:1.16667;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif}}.title+.contenttable-section[data-v-627ab5f4]{margin-top:0}.contenttable-section[data-v-627ab5f4]{align-items:baseline;padding-top:2.353rem}.contenttable-section[data-v-627ab5f4]:last-child{margin-bottom:0}[data-v-627ab5f4] .title{font-size:1.41176rem;line-height:1.16667;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif}@media only screen and (max-width:1250px){[data-v-627ab5f4] .title{font-size:1.23529rem;line-height:1.19048;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif}}@media only screen and (max-width:735px){.contenttable-section[data-v-627ab5f4]{align-items:unset;border-top:none;display:inherit;margin:0}.section-content[data-v-627ab5f4],.section-title[data-v-627ab5f4]{padding:0}[data-v-627ab5f4] .title{margin:0 0 2.353rem 0;padding-bottom:.5rem}}.badge[data-v-5a8ba4e0]{--badge-color:var(--color-badge-default);--badge-dark-color:var(--color-badge-dark-default);font-size:.70588rem;line-height:1.33333;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;display:inline-block;padding:2px 10px;white-space:nowrap;background:none;border-radius:3px;margin-left:10px;border:1px solid var(--badge-color);color:var(--badge-color)}.theme-dark .badge[data-v-5a8ba4e0]{--badge-color:var(--badge-dark-color)}.badge-deprecated[data-v-5a8ba4e0]{--badge-color:var(--color-badge-deprecated);--badge-dark-color:var(--color-badge-dark-deprecated)}.badge-beta[data-v-5a8ba4e0]{--badge-color:var(--color-badge-beta);--badge-dark-color:var(--color-badge-dark-beta)}.topic-icon-wrapper[data-v-4d1e7968]{display:flex;align-items:center;justify-content:center;height:1.47059rem;flex:0 0 1.294rem;width:1.294rem;margin-right:1rem}.topic-icon[data-v-4d1e7968]{height:.88235rem;transform:scale(1);-webkit-transform:scale(1);overflow:visible}.topic-icon.curly-brackets-icon[data-v-4d1e7968]{height:1rem}.token-method[data-v-5caf1b5b]{font-weight:700}.token-keyword[data-v-5caf1b5b]{color:var(--syntax-keyword,var(--color-syntax-keywords))}.token-number[data-v-5caf1b5b]{color:var(--syntax-number,var(--color-syntax-numbers))}.token-string[data-v-5caf1b5b]{color:var(--syntax-string,var(--color-syntax-strings))}.token-attribute[data-v-5caf1b5b]{color:var(--syntax-attribute,var(--color-syntax-keywords))}.token-internalParam[data-v-5caf1b5b]{color:var(--color-syntax-param-internal-name)}.type-identifier-link[data-v-5caf1b5b]{color:var(--syntax-type,var(--color-syntax-other-type-names))}.token-removed[data-v-5caf1b5b]{background-color:var(--color-highlight-red)}.token-added[data-v-5caf1b5b]{background-color:var(--color-highlight-green)}.decorator[data-v-06ec7395],.label[data-v-06ec7395]{color:var(--colors-secondary-label,var(--color-secondary-label))}.label[data-v-06ec7395]{font-size:1rem;line-height:1.47059;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif}.empty-token[data-v-06ec7395]{font-size:0}.empty-token[data-v-06ec7395]:after{content:"\00a0";font-size:1rem}.conditional-constraints[data-v-1548fd90] code{color:var(--colors-secondary-label,var(--color-secondary-label))}.abstract[data-v-3152d122],.link-block[data-v-3152d122] .badge{margin-left:2.294rem}.link-block .badge+.badge[data-v-3152d122]{margin-left:1rem}.link[data-v-3152d122]{display:flex}.link-block .badge[data-v-3152d122]{margin-top:.5rem}.link-block.has-inline-element[data-v-3152d122]{display:flex;align-items:flex-start;flex-flow:row wrap}.link-block.has-inline-element .badge[data-v-3152d122]{margin-left:1rem;margin-top:0}.link-block .has-adjacent-elements[data-v-3152d122]{padding-top:5px;padding-bottom:5px;display:inline-flex}.link-block[data-v-3152d122],.link[data-v-3152d122]{box-sizing:inherit}.link-block.changed[data-v-3152d122],.link.changed[data-v-3152d122]{padding-right:1rem;padding-left:2.17647rem;padding-top:8px;padding-bottom:8px;display:inline-flex;width:100%;box-sizing:border-box}.link-block.changed.changed[data-v-3152d122],.link.changed.changed[data-v-3152d122]{padding-right:1rem}@media only screen and (max-width:735px){.link-block.changed[data-v-3152d122],.link.changed[data-v-3152d122]{padding-left:0;padding-right:0}.link-block.changed.changed[data-v-3152d122],.link.changed.changed[data-v-3152d122]{padding-right:17px;padding-left:2.17647rem}}@media only screen and (max-width:735px){.link-block.changed[data-v-3152d122],.link.changed[data-v-3152d122]{padding-left:0;padding-right:0}}.abstract .topic-required[data-v-3152d122]:not(:first-child){margin-top:4px}.topic-required[data-v-3152d122]{font-size:.8em}.deprecated[data-v-3152d122]{text-decoration:line-through}.conditional-constraints[data-v-3152d122]{font-size:.82353rem;margin-top:4px}.section-content>.content[data-v-eb97add6],.topic[data-v-eb97add6]{margin-top:15px}.datalist dd{padding-left:2rem}.datalist dt{font-weight:600;padding-left:1rem;padding-top:1.64706rem}.datalist dt:first-of-type{padding-top:0}.source[data-v-e2e09a16]{background:var(--background,var(--color-code-background));border-color:var(--color-grid);color:var(--text,var(--color-code-plain));border-radius:4px;border-style:solid;border-width:1px;padding:8px 14px;speak:literal-punctuation;line-height:25px}.source.has-multiple-lines[data-v-e2e09a16]{border-radius:4px}.source>code[data-v-e2e09a16]{font-size:.88235rem;line-height:1.66667;font-weight:400;font-family:Menlo,monospace;display:block}.platforms[data-v-c5ecdd3e]{font-size:.82353rem;line-height:1.42857;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;margin-bottom:.45rem;margin-top:1.6em}.changed .platforms[data-v-c5ecdd3e]{padding-left:.588rem}.platforms[data-v-c5ecdd3e]:first-of-type{margin-top:1rem}.source[data-v-c5ecdd3e]{margin:14px 0}.platforms+.source[data-v-c5ecdd3e]{margin:0}.changed.declaration-group[data-v-c5ecdd3e]{background:var(--background,var(--color-code-background))}.changed .source[data-v-c5ecdd3e]{background:none;border:none;margin-top:0;margin-bottom:0;margin-left:2.17647rem;padding-left:0}.declaration-diff[data-v-b3e21c4a]{background:var(--background,var(--color-code-background))}.declaration-diff-version[data-v-b3e21c4a]{padding-left:.588rem;padding-left:2.17647rem;font-size:1rem;line-height:1.52941;font-weight:600;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;color:var(--color-figure-gray-secondary);margin:0}.declaration-diff-current[data-v-b3e21c4a]{padding-top:8px;padding-bottom:5px}.declaration-diff-previous[data-v-b3e21c4a]{padding-top:5px;padding-bottom:8px;background-color:var(--color-changes-modified-previous-background);border-radius:0 0 4px 4px;position:relative}.conditional-constraints[data-v-e39c4ee4]{margin:1.17647rem 0 3rem 0}.type[data-v-791bac44]:first-letter{text-transform:capitalize}.detail-type[data-v-61ef551b]{font-weight:600;padding-left:1rem;padding-top:1.64706rem}.detail-type[data-v-61ef551b]:first-child{padding-top:0}@media only screen and (max-width:735px){.detail-type[data-v-61ef551b]{padding-left:0}}.detail-content[data-v-61ef551b]{padding-left:2rem}@media only screen and (max-width:735px){.detail-content[data-v-61ef551b]{padding-left:0}}.param-name[data-v-7bb7c035]{font-weight:600;padding-left:1rem;padding-top:1.64706rem}.param-name[data-v-7bb7c035]:first-child{padding-top:0}@media only screen and (max-width:735px){.param-name[data-v-7bb7c035]{padding-left:0}}.param-content[data-v-7bb7c035]{padding-left:2rem}@media only screen and (max-width:735px){.param-content[data-v-7bb7c035]{padding-left:0}}.param-content[data-v-7bb7c035] dt{font-weight:600}.param-content[data-v-7bb7c035] dd{margin-left:1em}.parameters-table[data-v-2d54624a] .change-added,.parameters-table[data-v-2d54624a] .change-removed{display:inline-block;max-width:100%}.parameters-table[data-v-2d54624a] .change-removed,.parameters-table[data-v-2d54624a] .token-removed{text-decoration:line-through}.param[data-v-2d54624a]{font-size:.88235rem;box-sizing:border-box}.param.changed[data-v-2d54624a]{display:flex;flex-flow:row wrap;padding-right:1rem;padding-left:2.17647rem;padding-top:8px;padding-bottom:8px;display:inline-flex;width:100%;box-sizing:border-box}.param.changed.changed[data-v-2d54624a]{padding-right:1rem}@media only screen and (max-width:735px){.param.changed[data-v-2d54624a]{padding-left:0;padding-right:0}.param.changed.changed[data-v-2d54624a]{padding-right:17px;padding-left:2.17647rem}}@media only screen and (max-width:735px){.param.changed[data-v-2d54624a]{padding-left:0;padding-right:0}}.param.changed+.param.changed[data-v-2d54624a]{margin-top:.82353rem}.changed .param-content[data-v-2d54624a],.changed .param-symbol[data-v-2d54624a]{padding-top:2px;padding-bottom:2px}@media only screen and (max-width:735px){.changed .param-content[data-v-2d54624a]{padding-top:0}.changed .param-symbol[data-v-2d54624a]{padding-bottom:0}}.param-symbol[data-v-2d54624a]{text-align:right}@media only screen and (max-width:735px){.param-symbol[data-v-2d54624a]{text-align:left}}.param-symbol[data-v-2d54624a] .type-identifier-link{color:var(--color-link)}.param+.param[data-v-2d54624a]{margin-top:1.64706rem}.param+.param[data-v-2d54624a]:first-child{margin-top:0}.param-content[data-v-2d54624a]{padding-left:1rem;padding-left:2.17647rem}@media only screen and (max-width:735px){.param-content[data-v-2d54624a]{padding-left:0;padding-right:0}}.property-metadata[data-v-8590589e]{color:var(--color-figure-gray-secondary)}.property-text{font-weight:700}.property-metadata[data-v-0a648a1e]{color:var(--color-figure-gray-secondary)}.property-name[data-v-1b54be82]{font-weight:700}.property-name.deprecated[data-v-1b54be82]{text-decoration:line-through}.property-deprecated[data-v-1b54be82]{margin-left:0}.content[data-v-1b54be82],.content[data-v-1b54be82] p:first-child{display:inline}.response-mimetype[data-v-2faa6020]{color:var(--color-figure-gray-secondary)}.part-name[data-v-1b311f59]{font-weight:700}.content[data-v-1b311f59],.content[data-v-1b311f59] p:first-child{display:inline}.param-name[data-v-5accae2c]{font-weight:700}.param-name.deprecated[data-v-5accae2c]{text-decoration:line-through}.param-deprecated[data-v-5accae2c]{margin-left:0}.content[data-v-5accae2c],.content[data-v-5accae2c] p:first-child{display:inline}.response-name[data-v-57796e8c],.response-reason[data-v-57796e8c]{font-weight:700}@media only screen and (max-width:735px){.response-reason[data-v-57796e8c]{display:none}}.response-name>code>.reason[data-v-57796e8c]{display:none}@media only screen and (max-width:735px){.response-name>code>.reason[data-v-57796e8c]{display:initial}}[data-v-0e405a2d] h2{font-size:1.88235rem;line-height:1.125;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif}@media only screen and (max-width:1250px){[data-v-0e405a2d] h2{font-size:1.64706rem;line-height:1.14286;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif}}@media only screen and (max-width:735px){[data-v-0e405a2d] h2{font-size:1.41176rem;line-height:1.16667;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif}}.primary-content.with-border[data-v-0e405a2d]:before{border-top-color:var(--colors-grid,var(--color-grid));border-top-style:solid;border-top-width:1px;content:"";display:block}.primary-content[data-v-0e405a2d]>*{margin-bottom:40px;margin-top:40px}.primary-content[data-v-0e405a2d]>:first-child{margin-top:2.353rem}.relationships-list[data-v-6497632e]{list-style:none}.relationships-list.column[data-v-6497632e]{margin-left:0;margin-top:15px}.relationships-list.inline[data-v-6497632e]{display:flex;flex-direction:row;flex-wrap:wrap;margin-top:15px;margin-left:0}.relationships-list.inline li[data-v-6497632e]:not(:last-child):after{content:",\00a0"}.relationships-list.changed[data-v-6497632e]{padding-right:1rem;padding-left:2.17647rem;padding-top:8px;padding-bottom:8px;display:inline-flex;width:100%;box-sizing:border-box}.relationships-list.changed.changed[data-v-6497632e]{padding-right:1rem}@media only screen and (max-width:735px){.relationships-list.changed[data-v-6497632e]{padding-left:0;padding-right:0}.relationships-list.changed.changed[data-v-6497632e]{padding-right:17px;padding-left:2.17647rem}}@media only screen and (max-width:735px){.relationships-list.changed[data-v-6497632e]{padding-left:0;padding-right:0}}.relationships-list.changed[data-v-6497632e]:after{margin-top:.61765rem}.relationships-list.changed.column[data-v-6497632e]{display:block;box-sizing:border-box}.relationships-item[data-v-6497632e],.relationships-list[data-v-6497632e]{box-sizing:inherit}.conditional-constraints[data-v-6497632e]{font-size:.82353rem;margin:.17647rem 0 .58824rem 1.17647rem}.availability[data-v-4df209be]{display:flex;flex-flow:row wrap;gap:10px;margin-top:20px}.badge[data-v-4df209be]{margin:0}.technology[data-v-4df209be]{display:inline-flex;align-items:center}.tech-icon[data-v-4df209be]{height:12px;padding-right:5px;fill:var(--badge-color)}.theme-dark .tech-icon[data-v-4df209be]{fill:var(--badge-color)}.beta[data-v-4df209be]{color:var(--color-badge-beta)}.theme-dark .beta[data-v-4df209be]{color:var(--color-badge-dark-beta)}.deprecated[data-v-4df209be]{color:var(--color-badge-deprecated)}.theme-dark .deprecated[data-v-4df209be]{color:var(--color-badge-dark-deprecated)}.changed[data-v-4df209be]{padding-left:26px}.changed[data-v-4df209be]:after{content:none}.changed[data-v-4df209be]:before{background-image:url(../img/modified-icon.f496e73d.svg);background-repeat:no-repeat;bottom:0;content:" ";margin:auto;margin-right:8px;position:absolute;top:0;width:16px;height:16px;left:5px}@media screen{[data-color-scheme=dark] .changed[data-v-4df209be]:before{background-image:url(../img/modified-icon.f496e73d.svg)}}@media screen and (prefers-color-scheme:dark){[data-color-scheme=auto] .changed[data-v-4df209be]:before{background-image:url(../img/modified-icon.f496e73d.svg)}}.theme-dark .changed[data-v-4df209be]:before{background-image:url(../img/modified-icon.f496e73d.svg)}.changed-added[data-v-4df209be]{border-color:var(--color-changes-added)}.changed-added[data-v-4df209be]:before{background-image:url(../img/added-icon.d6f7e47d.svg)}@media screen{[data-color-scheme=dark] .changed-added[data-v-4df209be]:before{background-image:url(../img/added-icon.d6f7e47d.svg)}}@media screen and (prefers-color-scheme:dark){[data-color-scheme=auto] .changed-added[data-v-4df209be]:before{background-image:url(../img/added-icon.d6f7e47d.svg)}}.theme-dark .changed-added[data-v-4df209be]:before{background-image:url(../img/added-icon.d6f7e47d.svg)}.changed-deprecated[data-v-4df209be]{border-color:var(--color-changes-deprecated)}.changed-deprecated[data-v-4df209be]:before{background-image:url(../img/deprecated-icon.015b4f17.svg)}@media screen{[data-color-scheme=dark] .changed-deprecated[data-v-4df209be]:before{background-image:url(../img/deprecated-icon.015b4f17.svg)}}@media screen and (prefers-color-scheme:dark){[data-color-scheme=auto] .changed-deprecated[data-v-4df209be]:before{background-image:url(../img/deprecated-icon.015b4f17.svg)}}.theme-dark .changed-deprecated[data-v-4df209be]:before{background-image:url(../img/deprecated-icon.015b4f17.svg)}.changed-modified[data-v-4df209be]{border-color:var(--color-changes-modified)}.eyebrow[data-v-2e777455]{font-size:1.23529rem;line-height:1.19048;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;color:#ccc;display:block;margin-bottom:1.17647rem}@media only screen and (max-width:735px){.eyebrow[data-v-2e777455]{font-size:1.11765rem;line-height:1.21053;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif}}.documentation-hero--disabled .eyebrow[data-v-2e777455]{color:var(--colors-secondary-label,var(--color-secondary-label))}.title[data-v-2e777455]{font-size:2.35294rem;line-height:1.1;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;color:#fff;margin-bottom:.70588rem}@media only screen and (max-width:1250px){.title[data-v-2e777455]{font-size:1.88235rem;line-height:1.125;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif}}@media only screen and (max-width:735px){.title[data-v-2e777455]{font-size:1.64706rem;line-height:1.14286;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif}}.documentation-hero--disabled .title[data-v-2e777455]{color:var(--colors-header-text,var(--color-header-text))}small[data-v-2e777455]{font-size:1.41176rem;line-height:1.16667;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;padding-left:10px}@media only screen and (max-width:1250px){small[data-v-2e777455]{font-size:1.23529rem;line-height:1.19048;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif}}small[data-v-2e777455]:before{content:attr(data-tag-name)}small.Beta[data-v-2e777455]{color:var(--color-badge-beta)}.theme-dark small.Beta[data-v-2e777455]{color:var(--color-badge-dark-beta)}small.Deprecated[data-v-2e777455]{color:var(--color-badge-deprecated)}.theme-dark small.Deprecated[data-v-2e777455]{color:var(--color-badge-dark-deprecated)}.doc-topic[data-v-a877f03c]{display:flex;flex-direction:column;height:100%}#main[data-v-a877f03c]{outline-style:none;height:100%}@media only screen and (min-width:1920px){.full-width-container #main[data-v-a877f03c]{border-right:1px solid var(--color-grid)}}.container[data-v-a877f03c]{outline-style:none}.full-width-container .container[data-v-a877f03c]{max-width:920px;margin-left:auto;margin-right:auto;padding-left:80px;padding-right:80px;box-sizing:border-box}@media only screen and (min-width:1251px){.full-width-container .container[data-v-a877f03c]{box-sizing:unset;padding-left:120px;padding-right:120px;margin-left:0}}@media only screen and (max-width:735px){.full-width-container .container[data-v-a877f03c]{width:auto;padding-left:20px;padding-right:20px}}.static-width-container .container[data-v-a877f03c]{margin-left:auto;margin-right:auto;width:980px}@media only screen and (max-width:1250px){.static-width-container .container[data-v-a877f03c]{width:692px}}@media only screen and (max-width:735px){.static-width-container .container[data-v-a877f03c]{width:87.5%}}.description[data-v-a877f03c]{margin-bottom:2.353rem}.description[data-v-a877f03c]:empty{display:none}.description.after-enhanced-hero[data-v-a877f03c]{margin-top:2.353rem}.description[data-v-a877f03c] .content+*{margin-top:.8em}[data-v-a877f03c] .documentation-hero+.contenttable .container>.title{border-top:none}.sample-download[data-v-a877f03c]{margin-top:20px}[data-v-a877f03c] h3{font-size:1.64706rem;line-height:1.14286;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif}@media only screen and (max-width:1250px){[data-v-a877f03c] h3{font-size:1.41176rem;line-height:1.16667;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif}}@media only screen and (max-width:735px){[data-v-a877f03c] h3{font-size:1.23529rem;line-height:1.19048;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif}}[data-v-a877f03c] h4{font-size:1.41176rem;line-height:1.16667;font-weight:600;font-family:Helvetica Neue,Helvetica,Arial,sans-serif}@media only screen and (max-width:1250px){[data-v-a877f03c] h4{font-size:1.23529rem;line-height:1.19048;font-weight:600;font-family:Helvetica Neue,Helvetica,Arial,sans-serif}}[data-v-a877f03c] h5{font-size:1.29412rem;line-height:1.18182;font-weight:600;font-family:Helvetica Neue,Helvetica,Arial,sans-serif}@media only screen and (max-width:1250px){[data-v-a877f03c] h5{font-size:1.17647rem;line-height:1.2;font-weight:600;font-family:Helvetica Neue,Helvetica,Arial,sans-serif}}@media only screen and (max-width:735px){[data-v-a877f03c] h5{font-size:1.05882rem;line-height:1.44444;font-weight:600;font-family:Helvetica Neue,Helvetica,Arial,sans-serif}}[data-v-a877f03c] h6{font-size:1rem;line-height:1.47059;font-weight:600;font-family:Helvetica Neue,Helvetica,Arial,sans-serif}.adjustable-sidebar-width[data-v-453b0e76]{display:flex}@media only screen and (max-width:1023px){.adjustable-sidebar-width[data-v-453b0e76]{display:block;position:relative}}.sidebar[data-v-453b0e76]{position:relative}@media only screen and (max-width:1023px){.sidebar[data-v-453b0e76]{position:static}}.aside[data-v-453b0e76]{width:250px;position:relative;height:100%;max-width:100vw}.aside.no-transition[data-v-453b0e76]{transition:none!important}@media only screen and (max-width:1023px){.aside[data-v-453b0e76]{width:100%!important;overflow:hidden;min-width:0;max-width:100%;height:calc(var(--app-height) - var(--top-offset-mobile));position:fixed;top:var(--top-offset-mobile);bottom:0;z-index:9997;transform:translateX(-100%);transition:transform .15s ease-in}.aside[data-v-453b0e76] .aside-animated-child{opacity:0}.aside.force-open[data-v-453b0e76]{transform:translateX(0)}.aside.force-open[data-v-453b0e76] .aside-animated-child{--index:0;opacity:1;transition:opacity .15s linear;transition-delay:calc(var(--index)*0.15s + .15s)}.aside.has-mobile-top-offset[data-v-453b0e76]{border-top:1px solid var(--color-fill-gray-tertiary)}}.content[data-v-453b0e76]{display:flex;flex-flow:column;min-width:0;flex:1 1 auto;height:100%}.resize-handle[data-v-453b0e76]{position:absolute;cursor:col-resize;top:0;bottom:0;right:0;width:5px;height:100%;-webkit-user-select:none;-moz-user-select:none;user-select:none;z-index:1;transition:background-color .15s;transform:translateX(50%)}@media only screen and (max-width:1023px){.resize-handle[data-v-453b0e76]{display:none}}.resize-handle[data-v-453b0e76]:hover{background:var(--color-fill-gray-tertiary)}.navigator-card-inner[data-v-7a09780d]{--nav-card-inner-vertical-offset:0px;position:sticky;top:var(--nav-height);height:calc(var(--app-height) - var(--nav-height) - var(--nav-card-inner-vertical-offset));display:flex;flex-flow:column}@media only screen and (max-width:1023px){.navigator-card-inner[data-v-7a09780d]{position:static;height:100%}}.highlight[data-v-d75876e2]{display:inline}.highlight[data-v-d75876e2] .match{font-weight:600;background:var(--color-fill-light-blue-secondary)}.navigator-card-item[data-v-6fb0778e]{height:32px;display:flex;align-items:center}.fromkeyboard .navigator-card-item[data-v-6fb0778e]:focus-within{margin:5px;height:22px;outline:4px solid var(--color-focus-color);outline-offset:1px}.fromkeyboard .navigator-card-item:focus-within .depth-spacer[data-v-6fb0778e]{margin-left:-5px}.depth-spacer[data-v-6fb0778e]{width:calc(var(--nesting-index)*15px + 25px);height:32px;position:relative;flex:0 0 auto}.fromkeyboard .depth-spacer[data-v-6fb0778e]:focus{margin:-5px}.head-wrapper[data-v-6fb0778e]{padding:0 20px 0 10px;position:relative;display:flex;align-items:center;flex:1;min-width:0;height:100%}@supports (padding:max(0px)){.head-wrapper[data-v-6fb0778e]{padding-left:max(10px,env(safe-area-inset-left));padding-right:max(20px,env(safe-area-inset-right))}}.head-wrapper.active[data-v-6fb0778e]{background:var(--color-fill-gray-quaternary)}.head-wrapper.is-group .leaf-link[data-v-6fb0778e]{color:var(--color-figure-gray-secondary);font-weight:600}.head-wrapper.is-group .leaf-link[data-v-6fb0778e]:after{display:none}.hover .head-wrapper[data-v-6fb0778e]:not(.is-group){background:var(--color-navigator-item-hover)}.head-wrapper .navigator-icon[data-v-6fb0778e]{display:flex;flex:0 0 auto}.head-wrapper .navigator-icon.changed[data-v-6fb0778e]{border:none;width:1em;height:1em;margin-right:7px;z-index:0}.head-wrapper .navigator-icon.changed[data-v-6fb0778e]:after{top:50%;left:50%;right:auto;bottom:auto;transform:translate(-50%,-50%);background-image:url(../img/modified-icon.f496e73d.svg);margin:0}@media screen{[data-color-scheme=dark] .head-wrapper .navigator-icon.changed[data-v-6fb0778e]:after{background-image:url(../img/modified-icon.f496e73d.svg)}}@media screen and (prefers-color-scheme:dark){[data-color-scheme=auto] .head-wrapper .navigator-icon.changed[data-v-6fb0778e]:after{background-image:url(../img/modified-icon.f496e73d.svg)}}.head-wrapper .navigator-icon.changed-added[data-v-6fb0778e]:after{background-image:url(../img/added-icon.d6f7e47d.svg)}@media screen{[data-color-scheme=dark] .head-wrapper .navigator-icon.changed-added[data-v-6fb0778e]:after{background-image:url(../img/added-icon.d6f7e47d.svg)}}@media screen and (prefers-color-scheme:dark){[data-color-scheme=auto] .head-wrapper .navigator-icon.changed-added[data-v-6fb0778e]:after{background-image:url(../img/added-icon.d6f7e47d.svg)}}.head-wrapper .navigator-icon.changed-deprecated[data-v-6fb0778e]:after{background-image:url(../img/deprecated-icon.015b4f17.svg)}@media screen{[data-color-scheme=dark] .head-wrapper .navigator-icon.changed-deprecated[data-v-6fb0778e]:after{background-image:url(../img/deprecated-icon.015b4f17.svg)}}@media screen and (prefers-color-scheme:dark){[data-color-scheme=auto] .head-wrapper .navigator-icon.changed-deprecated[data-v-6fb0778e]:after{background-image:url(../img/deprecated-icon.015b4f17.svg)}}.head-wrapper .leaf-link[data-v-6fb0778e]{color:var(--color-figure-gray);text-overflow:ellipsis;overflow:hidden;white-space:nowrap;max-width:100%;display:inline;vertical-align:middle;font-size:.82353rem;line-height:1.28571;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif}.fromkeyboard .head-wrapper .leaf-link[data-v-6fb0778e]:focus{outline:none}.head-wrapper .leaf-link[data-v-6fb0778e]:hover{text-decoration:none}.head-wrapper .leaf-link.bolded[data-v-6fb0778e]{font-weight:600}.head-wrapper .leaf-link[data-v-6fb0778e]:after{content:"";position:absolute;top:0;left:0;right:0;bottom:0}.extended-content[data-v-6fb0778e]{font-size:.82353rem;line-height:1.42857;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;color:var(--color-figure-gray-secondary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tree-toggle[data-v-6fb0778e]{overflow:hidden;position:absolute;width:100%;height:100%;padding-right:5px;box-sizing:border-box;z-index:1;display:flex;align-items:center;justify-content:flex-end}.title-container[data-v-6fb0778e]{min-width:0;display:flex;align-items:center}.chevron[data-v-6fb0778e]{width:10px}.chevron.animating[data-v-6fb0778e]{transition:transform .15s ease-in}.chevron.rotate[data-v-6fb0778e]{transform:rotate(90deg)}.tag[data-v-3b809bfa]{display:inline-block;padding-right:.58824rem}.tag[data-v-3b809bfa]:focus{outline:none}.tag button[data-v-3b809bfa]{color:var(--color-figure-gray);background-color:var(--color-fill-tertiary);font-size:.82353rem;line-height:1.28571;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;border-radius:.82353rem;padding:.23529rem .58824rem;white-space:nowrap;border:1px solid transparent}@media (hover:hover){.tag button[data-v-3b809bfa]:hover{transition:background-color .2s,color .2s;background-color:var(--color-fill-blue);color:#fff}}.tag button[data-v-3b809bfa]:focus:active{background-color:var(--color-fill-blue);color:#fff}.fromkeyboard .tag button[data-v-3b809bfa]:focus,.tag button.focus[data-v-3b809bfa],.tag button[data-v-3b809bfa]:focus{box-shadow:0 0 0 4px var(--color-focus-color);outline:none;border-color:var(--color-focus-border-color)}.tags[data-v-4b231516]{position:relative;margin:0;list-style:none;box-sizing:border-box;transition:padding-right .8s,padding-bottom .8s,max-height 1s,opacity 1s;padding:0}.tags .scroll-wrapper[data-v-4b231516]{overflow-x:auto;overflow-y:hidden;-ms-overflow-style:none;scrollbar-color:var(--color-figure-gray-tertiary) transparent;scrollbar-width:thin}.tags .scroll-wrapper[data-v-4b231516]::-webkit-scrollbar{height:0}@supports not ((-webkit-touch-callout:none) or (scrollbar-width:none) or (-ms-overflow-style:none)){.tags .scroll-wrapper.scrolling[data-v-4b231516]{--scrollbar-height:11px;padding-top:var(--scrollbar-height);height:calc(var(--scroll-target-height) - var(--scrollbar-height));display:flex;align-items:center}}.tags .scroll-wrapper.scrolling[data-v-4b231516]::-webkit-scrollbar{height:11px}.tags .scroll-wrapper.scrolling[data-v-4b231516]::-webkit-scrollbar-thumb{border-radius:10px;background-color:var(--color-figure-gray-tertiary);border:2px solid transparent;background-clip:padding-box}.tags .scroll-wrapper.scrolling[data-v-4b231516]::-webkit-scrollbar-track-piece:end{margin-right:8px}.tags .scroll-wrapper.scrolling[data-v-4b231516]::-webkit-scrollbar-track-piece:start{margin-left:8px}.tags ul[data-v-4b231516]{margin:0;padding:0;display:flex}.filter[data-v-3b91e60a]{--input-vertical-padding:.76471rem;--input-height:1.64706rem;--input-border-color:var(--color-fill-gray-secondary);--input-text:var(--color-fill-gray-secondary);position:relative;box-sizing:border-box;-webkit-tap-highlight-color:rgba(0,0,0,0);border-radius:5px}.fromkeyboard .filter[data-v-3b91e60a]:focus{outline:none}.filter__top-wrapper[data-v-3b91e60a]{display:flex}.filter__filter-button[data-v-3b91e60a]{position:relative;margin-left:.58824rem;z-index:1;cursor:text;margin-right:.17647rem}@media only screen and (max-width:735px){.filter__filter-button[data-v-3b91e60a]{margin-right:.41176rem}}.filter__filter-button .svg-icon[data-v-3b91e60a]{fill:var(--input-text);display:block;height:21px}.filter__filter-button.blue[data-v-3b91e60a]>*{fill:var(--color-figure-blue);color:var(--color-figure-blue)}.filter.focus .filter__wrapper[data-v-3b91e60a]{box-shadow:0 0 0 3pt var(--color-focus-color);--input-border-color:var(--color-fill-blue)}.filter__wrapper[data-v-3b91e60a]{border:1px solid var(--input-border-color);background:var(--color-fill);border-radius:4px}.filter__wrapper--reversed[data-v-3b91e60a]{display:flex;flex-direction:column-reverse}.filter__suggested-tags[data-v-3b91e60a]{border-top:1px solid var(--color-fill-gray-tertiary);z-index:1;overflow:hidden}.filter__suggested-tags[data-v-3b91e60a] ul{padding:var(--input-vertical-padding) .52941rem;border:1px solid transparent;border-bottom-left-radius:3px;border-bottom-right-radius:3px}.fromkeyboard .filter__suggested-tags[data-v-3b91e60a] ul:focus{outline:none;box-shadow:0 0 0 5px var(--color-focus-color)}.filter__wrapper--reversed .filter__suggested-tags[data-v-3b91e60a]{border-bottom:1px solid var(--color-fill-gray-tertiary);border-top:none}.filter__selected-tags[data-v-3b91e60a]{z-index:1;padding-left:4px;margin:-4px 0}@media only screen and (max-width:735px){.filter__selected-tags[data-v-3b91e60a]{padding-left:0}}.filter__selected-tags[data-v-3b91e60a] ul{padding:4px}@media only screen and (max-width:735px){.filter__selected-tags[data-v-3b91e60a] ul{padding-right:.41176rem}}.filter__selected-tags[data-v-3b91e60a] ul .tag:last-child{padding-right:0}.filter__delete-button[data-v-3b91e60a]{position:relative;margin:0;z-index:1;border-radius:100%}.fromkeyboard .filter__delete-button[data-v-3b91e60a]:focus{box-shadow:0 0 0 4px var(--color-focus-color);outline:none}.filter__delete-button .clear-rounded-icon[data-v-3b91e60a]{height:.94118rem;width:.94118rem;fill:var(--input-text);display:block}.filter__delete-button-wrapper[data-v-3b91e60a]{display:flex;align-items:center;padding:0 10px;border-top-right-radius:4px;border-bottom-right-radius:4px}.filter__input-label[data-v-3b91e60a]{position:relative;flex-grow:1;height:var(--input-height);padding:var(--input-vertical-padding) 0}.filter__input-label[data-v-3b91e60a]:after{content:attr(data-value);visibility:hidden;width:auto;white-space:nowrap;min-width:130px;display:block;text-indent:.41176rem}@media only screen and (max-width:735px){.filter__input-label[data-v-3b91e60a]:after{text-indent:.17647rem}}.filter__input-box-wrapper[data-v-3b91e60a]{overflow-y:hidden;-ms-overflow-style:none;scrollbar-color:var(--color-figure-gray-tertiary) transparent;scrollbar-width:thin;display:flex;overflow-x:auto;align-items:center;cursor:text;flex:1}.filter__input-box-wrapper[data-v-3b91e60a]::-webkit-scrollbar{height:0}@supports not ((-webkit-touch-callout:none) or (scrollbar-width:none) or (-ms-overflow-style:none)){.filter__input-box-wrapper.scrolling[data-v-3b91e60a]{--scrollbar-height:11px;padding-top:var(--scrollbar-height);height:calc(var(--scroll-target-height) - var(--scrollbar-height));display:flex;align-items:center}}.filter__input-box-wrapper.scrolling[data-v-3b91e60a]::-webkit-scrollbar{height:11px}.filter__input-box-wrapper.scrolling[data-v-3b91e60a]::-webkit-scrollbar-thumb{border-radius:10px;background-color:var(--color-figure-gray-tertiary);border:2px solid transparent;background-clip:padding-box}.filter__input-box-wrapper.scrolling[data-v-3b91e60a]::-webkit-scrollbar-track-piece:end{margin-right:8px}.filter__input-box-wrapper.scrolling[data-v-3b91e60a]::-webkit-scrollbar-track-piece:start{margin-left:8px}.filter__input[data-v-3b91e60a]{font-size:1.23529rem;line-height:1.38095;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;color:var(--color-text);height:var(--input-height);border:none;width:100%;position:absolute;background:transparent;z-index:1;text-indent:.41176rem}@media only screen and (max-width:735px){.filter__input[data-v-3b91e60a]{font-size:1.11765rem;line-height:1.42105;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;text-indent:.17647rem}}.filter__input[data-v-3b91e60a]:focus{outline:none}.filter__input[placeholder][data-v-3b91e60a]::-moz-placeholder{color:var(--input-text);opacity:1}.filter__input[placeholder][data-v-3b91e60a]::placeholder{color:var(--input-text);opacity:1}.filter__input[placeholder][data-v-3b91e60a]:-ms-input-placeholder{color:var(--input-text)}.filter__input[placeholder][data-v-3b91e60a]::-ms-input-placeholder{color:var(--input-text)}.vue-recycle-scroller{position:relative}.vue-recycle-scroller.direction-vertical:not(.page-mode){overflow-y:auto}.vue-recycle-scroller.direction-horizontal:not(.page-mode){overflow-x:auto}.vue-recycle-scroller.direction-horizontal{display:-webkit-box;display:-ms-flexbox;display:flex}.vue-recycle-scroller__slot{-webkit-box-flex:1;-ms-flex:auto 0 0px;flex:auto 0 0}.vue-recycle-scroller__item-wrapper{-webkit-box-flex:1;-ms-flex:1;flex:1;-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden;position:relative}.vue-recycle-scroller.ready .vue-recycle-scroller__item-view{position:absolute;top:0;left:0;will-change:transform}.vue-recycle-scroller.direction-vertical .vue-recycle-scroller__item-wrapper{width:100%}.vue-recycle-scroller.direction-horizontal .vue-recycle-scroller__item-wrapper{height:100%}.vue-recycle-scroller.ready.direction-vertical .vue-recycle-scroller__item-view{width:100%}.vue-recycle-scroller.ready.direction-horizontal .vue-recycle-scroller__item-view{height:100%}.resize-observer[data-v-b329ee4c]{border:none;background-color:transparent;opacity:0}.resize-observer[data-v-b329ee4c],.resize-observer[data-v-b329ee4c] object{position:absolute;top:0;left:0;z-index:-1;width:100%;height:100%;pointer-events:none;display:block;overflow:hidden}.navigator-card[data-v-d21551d4]{--card-vertical-spacing:8px;display:flex;flex-direction:column;flex:1 1 auto;min-height:0}.navigator-card .navigator-card-full-height[data-v-d21551d4]{height:100%}.navigator-card .navigator-card-inner[data-v-d21551d4]{--nav-card-inner-vertical-offset:71px}.navigator-card .head-wrapper[data-v-d21551d4]{position:relative}.navigator-card .navigator-head[data-v-d21551d4]{padding:10px 20px;background:var(--color-fill-secondary);border-bottom:1px solid var(--color-grid);display:flex;align-items:center;box-sizing:border-box}.navigator-card .navigator-head .badge[data-v-d21551d4]{margin-top:0}.navigator-card .navigator-head.router-link-exact-active[data-v-d21551d4]{background:var(--color-fill-tertiary)}.navigator-card .navigator-head.router-link-exact-active .card-link[data-v-d21551d4]{font-weight:700}.navigator-card .navigator-head[data-v-d21551d4]:hover{background:var(--color-navigator-item-hover);text-decoration:none}@media only screen and (max-width:1023px){.navigator-card .navigator-head[data-v-d21551d4]{justify-content:center;height:3.05882rem;padding:14px 20px}}@media only screen and (max-width:767px){.navigator-card .navigator-head[data-v-d21551d4]{height:2.82353rem;padding:12px 20px}}@supports (padding:max(0px)){.navigator-card .navigator-head[data-v-d21551d4]{padding-left:max(20px,env(safe-area-inset-left));padding-right:max(20px,env(safe-area-inset-right))}}.navigator-card .card-icon[data-v-d21551d4]{width:19px;height:19px}.no-items-wrapper[data-v-d21551d4]{color:var(--color-figure-gray-tertiary);font-size:.82353rem;line-height:1.42857;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;padding:var(--card-vertical-spacing) 20px}.close-card-mobile[data-v-d21551d4]{display:none;position:absolute;z-index:1;color:var(--color-link);align-items:center;justify-content:center}@media only screen and (max-width:1023px){.close-card-mobile[data-v-d21551d4]{display:flex;left:0;height:100%;padding-left:1.29412rem;padding-right:1.29412rem}@supports (padding:max(0px)){.close-card-mobile[data-v-d21551d4]{padding-left:max(1.29412rem,env(safe-area-inset-left))}}}@media only screen and (max-width:767px){.close-card-mobile[data-v-d21551d4]{padding-left:.94118rem;padding-right:.94118rem}}.close-card-mobile .close-icon[data-v-d21551d4]{width:19px;height:19px}.card-body[data-v-d21551d4]{padding-right:0;flex:1 1 auto;min-height:0}@media only screen and (max-width:1023px){.card-body[data-v-d21551d4]{--card-vertical-spacing:0px;padding-top:71px}}.card-link[data-v-d21551d4]{color:var(--color-text);font-size:.82353rem;line-height:1.42857;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-weight:600}.navigator-filter[data-v-d21551d4]{box-sizing:border-box;padding:15px 30px;border-top:1px solid var(--color-grid);height:71px;display:flex;align-items:flex-end}@supports (padding:max(0px)){.navigator-filter[data-v-d21551d4]{padding-left:max(30px,env(safe-area-inset-left));padding-right:max(30px,env(safe-area-inset-right))}}@media only screen and (max-width:1023px){.navigator-filter[data-v-d21551d4]{border:none;padding:10px 20px;align-items:flex-start;height:62px}@supports (padding:max(0px)){.navigator-filter[data-v-d21551d4]{padding-left:max(20px,env(safe-area-inset-left));padding-right:max(20px,env(safe-area-inset-right))}}}.navigator-filter .input-wrapper[data-v-d21551d4]{position:relative;flex:1;min-width:0}.navigator-filter .filter-component[data-v-d21551d4]{--input-vertical-padding:10px;--input-height:20px;--input-border-color:var(--color-grid);--input-text:var(--color-figure-gray-secondary)}.navigator-filter .filter-component[data-v-d21551d4] .filter__input{font-size:1rem;line-height:1.47059;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif}.scroller[data-v-d21551d4]{height:100%;box-sizing:border-box;padding:var(--card-vertical-spacing) 0;padding-bottom:calc(var(--top-offset, 0px) + var(--card-vertical-spacing));transition:padding-bottom .15s ease-in}@media only screen and (max-width:1023px){.scroller[data-v-d21551d4]{padding-bottom:10em}}.scroller[data-v-d21551d4] .vue-recycle-scroller__item-wrapper{transform:translateZ(0)}.filter-wrapper[data-v-d21551d4]{position:sticky;bottom:0;background:var(--color-fill)}@media only screen and (max-width:1023px){.filter-wrapper[data-v-d21551d4]{position:absolute;top:3.05882rem;bottom:auto;width:100%}}@media only screen and (max-width:767px){.filter-wrapper[data-v-d21551d4]{top:2.82353rem}}@-webkit-keyframes fadeout-data-v-60936b56{0%{opacity:1}to{opacity:0}}@keyframes fadeout-data-v-60936b56{0%{opacity:1}to{opacity:0}}path[data-v-60936b56]{-webkit-animation-duration:1s;animation-duration:1s;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;-webkit-animation-name:fadeout-data-v-60936b56;animation-name:fadeout-data-v-60936b56;fill:currentColor}path[data-v-60936b56]:first-of-type{-webkit-animation-delay:0ms;animation-delay:0ms}path[data-v-60936b56]:nth-of-type(2){-webkit-animation-delay:-125ms;animation-delay:-125ms}path[data-v-60936b56]:nth-of-type(3){-webkit-animation-delay:-.25s;animation-delay:-.25s}path[data-v-60936b56]:nth-of-type(4){-webkit-animation-delay:-375ms;animation-delay:-375ms}path[data-v-60936b56]:nth-of-type(5){-webkit-animation-delay:-.5s;animation-delay:-.5s}path[data-v-60936b56]:nth-of-type(6){-webkit-animation-delay:-625ms;animation-delay:-625ms}path[data-v-60936b56]:nth-of-type(7){-webkit-animation-delay:-.75s;animation-delay:-.75s}path[data-v-60936b56]:nth-of-type(8){-webkit-animation-delay:-875ms;animation-delay:-875ms}.navigator[data-v-0ea7ca2b]{--nav-height:3.05882rem;height:100%;display:flex;flex-flow:column}@media only screen and (min-width:1920px){.navigator[data-v-0ea7ca2b]{border-left:1px solid var(--color-grid)}}@media only screen and (max-width:1023px){.navigator[data-v-0ea7ca2b]{position:static;transition:none}}.loading-placeholder[data-v-0ea7ca2b]{align-items:center;color:var(--color-figure-gray-secondary);justify-content:center}.loading-spinner[data-v-0ea7ca2b]{--spinner-size:40px;--spinner-delay:1s;height:var(--spinner-size);width:var(--spinner-size)}.loading-spinner.delay-visibility-enter-active[data-v-0ea7ca2b]{transition:visibility var(--spinner-delay);visibility:hidden}.hierarchy-collapsed-items[data-v-74906830]{position:relative;display:inline-flex;align-items:center;margin-left:.17647rem}.hierarchy-collapsed-items .hierarchy-item-icon[data-v-74906830]{width:9px;height:15px;margin-right:.17647rem;display:flex;justify-content:center;font-size:1em;align-self:baseline}.nav--in-breakpoint-range .hierarchy-collapsed-items[data-v-74906830]{display:none}.hierarchy-collapsed-items .toggle[data-v-74906830]{background:var(--color-nav-hierarchy-collapse-background);border-color:var(--color-nav-hierarchy-collapse-borders);border-radius:4px;border-style:solid;border-width:0;font-weight:600;height:1.11765rem;text-align:center;width:2.11765rem;display:flex;align-items:center;justify-content:center}.theme-dark .hierarchy-collapsed-items .toggle[data-v-74906830]{background:var(--color-nav-dark-hierarchy-collapse-background)}.hierarchy-collapsed-items .toggle.focused[data-v-74906830],.hierarchy-collapsed-items .toggle[data-v-74906830]:active,.hierarchy-collapsed-items .toggle[data-v-74906830]:focus{box-shadow:0 0 0 4px var(--color-focus-color);outline:none}.indicator[data-v-74906830]{width:1em;height:1em;display:flex;align-items:center}.indicator .toggle-icon[data-v-74906830]{width:100%}.dropdown[data-v-74906830]{background:var(--color-nav-hierarchy-collapse-background);border-color:var(--color-nav-hierarchy-collapse-borders);border-radius:4px;border-style:solid;box-shadow:0 1px 4px -1px var(--color-figure-gray-secondary);border-width:0;padding:0 .5rem;position:absolute;z-index:42;top:calc(100% + .41176rem)}.theme-dark .dropdown[data-v-74906830]{background:var(--color-nav-dark-hierarchy-collapse-background);border-color:var(--color-nav-dark-hierarchy-collapse-borders)}.dropdown.collapsed[data-v-74906830]{opacity:0;transform:translate3d(0,-.41176rem,0);transition:opacity .25s ease,transform .25s ease,visibility 0s linear .25s;visibility:hidden}.dropdown[data-v-74906830]:not(.collapsed){opacity:1;transform:none;transition:opacity .25s ease,transform .25s ease,visibility 0s linear 0s;visibility:visible}.nav--in-breakpoint-range .dropdown[data-v-74906830]:not(.collapsed){display:none}.dropdown[data-v-74906830]:before{border-bottom-color:var(--color-nav-hierarchy-collapse-background);border-bottom-style:solid;border-bottom-width:.5rem;border-left-color:transparent;border-left-style:solid;border-left-width:.5rem;border-right-color:transparent;border-right-style:solid;border-right-width:.5rem;content:"";left:1.26471rem;position:absolute;top:-.44118rem}.theme-dark .dropdown[data-v-74906830]:before{border-bottom-color:var(--color-nav-dark-hierarchy-collapse-background)}.dropdown-item[data-v-74906830]{border-top-color:var(--color-nav-hierarchy-collapse-borders);border-top-style:solid;border-top-width:1px}.theme-dark .dropdown-item[data-v-74906830]{border-top-color:var(--color-nav-dark-hierarchy-collapse-borders)}.dropdown-item[data-v-74906830]:first-child{border-top:none}.nav-menu-link[data-v-74906830]{max-width:57.64706rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:block;padding:.75rem 1rem}.hierarchy-item[data-v-382bf39e]{display:flex;align-items:center;margin-left:.17647rem}.hierarchy-item[data-v-382bf39e] .hierarchy-item-icon{width:9px;height:15px;margin-right:.17647rem;display:flex;justify-content:center;font-size:1em;align-self:baseline}.nav--in-breakpoint-range .hierarchy-item[data-v-382bf39e] .hierarchy-item-icon{display:none}.nav--in-breakpoint-range .hierarchy-item[data-v-382bf39e]{border-top:1px solid var(--color-nav-hierarchy-item-borders);display:flex;align-items:center}.theme-dark.nav--in-breakpoint-range .hierarchy-item[data-v-382bf39e]{border-top-color:var(--color-nav-dark-hierarchy-item-borders)}.nav--in-breakpoint-range .hierarchy-item[data-v-382bf39e]:first-of-type{border-top:none}.hierarchy-item.collapsed[data-v-382bf39e]{display:none}.nav--in-breakpoint-range .hierarchy-item.collapsed[data-v-382bf39e]{display:inline-block}.item[data-v-382bf39e]{display:inline-block;vertical-align:middle}.nav--in-breakpoint-range .item[data-v-382bf39e]{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;height:100%;line-height:2.47059rem}@media only screen and (min-width:768px){.hierarchy-item:first-child:last-child .item[data-v-382bf39e],.hierarchy-item:first-child:last-child~.hierarchy-item .item[data-v-382bf39e]{max-width:45rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.has-badge .hierarchy-item:first-child:last-child .item[data-v-382bf39e],.has-badge .hierarchy-item:first-child:last-child~.hierarchy-item .item[data-v-382bf39e],.hierarchy-item:first-child:nth-last-child(2) .item[data-v-382bf39e],.hierarchy-item:first-child:nth-last-child(2)~.hierarchy-item .item[data-v-382bf39e]{max-width:36rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.has-badge .hierarchy-item:first-child:nth-last-child(2) .item[data-v-382bf39e],.has-badge .hierarchy-item:first-child:nth-last-child(2)~.hierarchy-item .item[data-v-382bf39e]{max-width:28.8rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.hierarchy-item:first-child:nth-last-child(3) .item[data-v-382bf39e],.hierarchy-item:first-child:nth-last-child(3)~.hierarchy-item .item[data-v-382bf39e]{max-width:27rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.has-badge .hierarchy-item:first-child:nth-last-child(3) .item[data-v-382bf39e],.has-badge .hierarchy-item:first-child:nth-last-child(3)~.hierarchy-item .item[data-v-382bf39e]{max-width:21.6rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.hierarchy-item:first-child:nth-last-child(4) .item[data-v-382bf39e],.hierarchy-item:first-child:nth-last-child(4)~.hierarchy-item .item[data-v-382bf39e]{max-width:18rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.has-badge .hierarchy-item:first-child:nth-last-child(4) .item[data-v-382bf39e],.has-badge .hierarchy-item:first-child:nth-last-child(4)~.hierarchy-item .item[data-v-382bf39e]{max-width:14.4rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.hierarchy-item:first-child:nth-last-child(5) .item[data-v-382bf39e],.hierarchy-item:first-child:nth-last-child(5)~.hierarchy-item .item[data-v-382bf39e]{max-width:9rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.has-badge .hierarchy-item:first-child:nth-last-child(5) .item[data-v-382bf39e],.has-badge .hierarchy-item:first-child:nth-last-child(5)~.hierarchy-item .item[data-v-382bf39e]{max-width:7.2rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.hierarchy-collapsed-items~.hierarchy-item .item[data-v-382bf39e]{max-width:10.8rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.hierarchy-collapsed-items~.hierarchy-item:last-child .item[data-v-382bf39e]{max-width:none}.has-badge .hierarchy-collapsed-items~.hierarchy-item .item[data-v-382bf39e]{max-width:8.64rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}}.hierarchy[data-v-30132cb0]{justify-content:flex-start;min-width:0;margin-right:80px}.nav--in-breakpoint-range .hierarchy[data-v-30132cb0]{margin-right:0}.hierarchy .root-hierarchy .item[data-v-30132cb0]{max-width:10rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.nav-menu-setting-label[data-v-126c8e14]{margin-right:.35294rem;white-space:nowrap}.language-dropdown[data-v-126c8e14]{-webkit-text-size-adjust:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;background-color:transparent;box-sizing:inherit;padding:0 11px 0 4px;margin-left:-4px;font-size:.82353rem;line-height:1.28571;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;cursor:pointer;position:relative;z-index:1}@media only screen and (max-width:1023px){.language-dropdown[data-v-126c8e14]{font-size:.82353rem;line-height:1.5;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif}}.language-dropdown[data-v-126c8e14]:focus{outline:none}.fromkeyboard .language-dropdown[data-v-126c8e14]:focus{outline:4px solid var(--color-focus-color);outline-offset:1px}.language-sizer[data-v-126c8e14]{position:absolute;opacity:0;pointer-events:none;padding:0}.language-toggle-container[data-v-126c8e14]{display:flex;align-items:center;padding-right:.17647rem;position:relative}.nav--in-breakpoint-range .language-toggle-container[data-v-126c8e14]{display:none}.language-toggle-container .toggle-icon[data-v-126c8e14]{width:.6em;height:.6em;position:absolute;right:7px}.language-toggle-label[data-v-126c8e14]{margin-right:2px}.language-toggle.nav-menu-toggle-label[data-v-126c8e14]{margin-right:6px}.language-list[data-v-126c8e14]{display:inline-block;margin-top:0}.language-list-container[data-v-126c8e14]{display:none}.language-list-item[data-v-126c8e14],.nav--in-breakpoint-range .language-list-container[data-v-126c8e14]{display:inline-block}.language-list-item[data-v-126c8e14]:not(:first-child){border-left:1px solid #424242;margin-left:6px;padding-left:6px}[data-v-cbd98416] .nav-menu{line-height:1.5;padding-top:0}[data-v-cbd98416] .nav-menu,[data-v-cbd98416] .nav-menu-settings{font-size:.82353rem;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif}[data-v-cbd98416] .nav-menu-settings{line-height:1.28571}@media only screen and (max-width:1023px){[data-v-cbd98416] .nav-menu-settings{font-size:.82353rem;line-height:1.5;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif}}@media only screen and (min-width:1024px){[data-v-cbd98416] .nav-menu-settings{margin-left:.58824rem}}.nav--in-breakpoint-range[data-v-cbd98416] .nav-menu-settings:not([data-previous-menu-children-count="0"]) .nav-menu-setting:first-child{border-top:1px solid #b0b0b0;display:flex;align-items:center}[data-v-cbd98416] .nav-menu-settings .nav-menu-setting{display:flex;align-items:center;color:var(--color-nav-current-link);margin-left:0}[data-v-cbd98416] .nav-menu-settings .nav-menu-setting:first-child:not(:only-child){margin-right:.58824rem}.nav--in-breakpoint-range[data-v-cbd98416] .nav-menu-settings .nav-menu-setting:first-child:not(:only-child){margin-right:0}.theme-dark[data-v-cbd98416] .nav-menu-settings .nav-menu-setting{color:var(--color-nav-dark-current-link)}.nav--in-breakpoint-range[data-v-cbd98416] .nav-menu-settings .nav-menu-setting:not(:first-child){border-top:1px solid #424242}.documentation-nav[data-v-cbd98416] .nav-title{font-size:.82353rem;line-height:1.5;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif}@media only screen and (max-width:1023px){.documentation-nav[data-v-cbd98416] .nav-title{padding-top:0}}.documentation-nav[data-v-cbd98416] .nav-title .nav-title-link.inactive{height:auto;color:var(--color-figure-gray-secondary-alt)}.theme-dark.documentation-nav .nav-title .nav-title-link.inactive[data-v-cbd98416]{color:#b0b0b0}.sidenav-toggle[data-v-cbd98416]{margin-left:-14px;margin-right:-14px;padding-left:14px;padding-right:14px}.sidenav-toggle .sidenav-icon[data-v-cbd98416]{display:flex;width:19px;height:19px}.doc-topic-view[data-v-6c414c34]{--delay:1s;display:flex;flex-flow:column;background:var(--colors-text-background,var(--color-text-background))}.doc-topic-view .delay-hiding-leave-active[data-v-6c414c34]{transition:display var(--delay)}.doc-topic-aside[data-v-6c414c34]{height:100%;box-sizing:border-box;border-right:1px solid var(--color-grid)}@media only screen and (max-width:1023px){.doc-topic-aside[data-v-6c414c34]{background:var(--color-fill);border-right:none}.animating .doc-topic-aside[data-v-6c414c34]{border-right:1px solid var(--color-grid)}}.topic-wrapper[data-v-6c414c34]{flex:1 1 auto;width:100%}.full-width-container[data-v-6c414c34]{max-width:1920px;margin-left:auto;margin-right:auto} \ No newline at end of file diff --git a/docs/docc/Reducer.doccarchive/css/documentation-topic~topic~tutorials-overview.82acfe22.css b/docs/docc/Reducer.doccarchive/css/documentation-topic~topic~tutorials-overview.82acfe22.css deleted file mode 100644 index 68c7acd..0000000 --- a/docs/docc/Reducer.doccarchive/css/documentation-topic~topic~tutorials-overview.82acfe22.css +++ /dev/null @@ -1,9 +0,0 @@ -/*! - * This source file is part of the Swift.org open source project - * - * Copyright (c) 2021 Apple Inc. and the Swift project authors - * Licensed under Apache License v2.0 with Runtime Library Exception - * - * See https://swift.org/LICENSE.txt for license information - * See https://swift.org/CONTRIBUTORS.txt for Swift project authors - */.svg-icon[data-v-0137d411]{fill:var(--colors-svg-icon-fill-light,var(--color-svg-icon));transform:scale(1);-webkit-transform:scale(1);overflow:visible}.theme-dark .svg-icon[data-v-0137d411]{fill:var(--colors-svg-icon-fill-dark,var(--color-svg-icon))}.svg-icon.icon-inline[data-v-0137d411]{display:inline-block;vertical-align:middle;fill:currentColor}.svg-icon.icon-inline[data-v-0137d411] .svg-icon-stroke{stroke:currentColor}[data-v-0137d411] .svg-icon-stroke{stroke:var(--colors-svg-icon-fill-light,var(--color-svg-icon))}.theme-dark[data-v-0137d411] .svg-icon-stroke{stroke:var(--colors-svg-icon-fill-dark,var(--color-svg-icon))}.label[data-v-5117d474]{font-size:.70588rem;line-height:1.33333;font-weight:600;font-family:Helvetica Neue,Helvetica,Arial,sans-serif}.label+[data-v-5117d474]{margin-top:.4em}.deprecated .label[data-v-5117d474]{color:var(--color-aside-deprecated)}.experiment .label[data-v-5117d474]{color:var(--color-aside-experiment)}.important .label[data-v-5117d474]{color:var(--color-aside-important)}.note .label[data-v-5117d474]{color:var(--color-aside-note)}.tip .label[data-v-5117d474]{color:var(--color-aside-tip)}.warning .label[data-v-5117d474]{color:var(--color-aside-warning)}.doc-topic aside[data-v-5117d474]{border-radius:4px;padding:.94118rem;border:0 solid;border-left-width:6px}.doc-topic aside.deprecated[data-v-5117d474]{background-color:var(--color-aside-deprecated-background);border-color:var(--color-aside-deprecated-border);box-shadow:0 0 0 0 var(--color-aside-deprecated-border) inset,0 0 0 0 var(--color-aside-deprecated-border)}.doc-topic aside.experiment[data-v-5117d474]{background-color:var(--color-aside-experiment-background);border-color:var(--color-aside-experiment-border);box-shadow:0 0 0 0 var(--color-aside-experiment-border) inset,0 0 0 0 var(--color-aside-experiment-border)}.doc-topic aside.important[data-v-5117d474]{background-color:var(--color-aside-important-background);border-color:var(--color-aside-important-border);box-shadow:0 0 0 0 var(--color-aside-important-border) inset,0 0 0 0 var(--color-aside-important-border)}.doc-topic aside.note[data-v-5117d474]{background-color:var(--color-aside-note-background);border-color:var(--color-aside-note-border);box-shadow:0 0 0 0 var(--color-aside-note-border) inset,0 0 0 0 var(--color-aside-note-border)}.doc-topic aside.tip[data-v-5117d474]{background-color:var(--color-aside-tip-background);border-color:var(--color-aside-tip-border);box-shadow:0 0 0 0 var(--color-aside-tip-border) inset,0 0 0 0 var(--color-aside-tip-border)}.doc-topic aside.warning[data-v-5117d474]{background-color:var(--color-aside-warning-background);border-color:var(--color-aside-warning-border);box-shadow:0 0 0 0 var(--color-aside-warning-border) inset,0 0 0 0 var(--color-aside-warning-border)}.doc-topic aside .label[data-v-5117d474]{font-size:1rem;line-height:1.52941;font-weight:600;font-family:Helvetica Neue,Helvetica,Arial,sans-serif}.file-icon[data-v-7c381064]{position:relative;align-items:flex-end;height:24px;margin:0 .5rem 0 1rem}.filename[data-v-c8c40662]{color:var(--text,var(--colors-secondary-label,var(--color-secondary-label)));font-size:.94118rem;line-height:1.1875;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;margin-top:1rem}@media only screen and (max-width:735px){.filename[data-v-c8c40662]{font-size:.82353rem;line-height:1.42857;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;margin-top:0}}.filename>a[data-v-c8c40662],.filename>span[data-v-c8c40662]{display:flex;align-items:center;line-height:normal}a[data-v-c8c40662]{color:var(--url,var(--color-link))}.code-line-container[data-v-df963650]{display:flex}.code-number[data-v-df963650]{padding:0 1rem 0 8px;text-align:right;min-width:2em;color:#666;-webkit-user-select:none;-moz-user-select:none;user-select:none}.code-number[data-v-df963650]:before{content:attr(data-line-number)}.highlighted[data-v-df963650]{background:var(--line-highlight,var(--color-code-line-highlight));border-left:4px solid var(--color-code-line-highlight-border)}.highlighted .code-number[data-v-df963650]{padding-left:4px}pre[data-v-df963650]{padding:14px 0;display:flex;overflow:unset;-webkit-overflow-scrolling:touch;white-space:pre;word-wrap:normal;height:100%}@media only screen and (max-width:735px){pre[data-v-df963650]{padding-top:.82353rem}}code[data-v-df963650]{display:flex;flex-direction:column;white-space:pre;word-wrap:normal;flex-grow:9999}.code-line-container[data-v-df963650]{flex-shrink:0;padding-right:14px}.code-listing[data-v-df963650],.container-general[data-v-df963650]{display:flex}.code-listing[data-v-df963650]{flex-direction:column;min-height:100%;border-radius:4px;overflow:auto}.code-listing.single-line[data-v-df963650]{border-radius:4px}.container-general[data-v-df963650],pre[data-v-df963650]{flex-grow:1}code[data-v-05f4a5b7]{speak-punctuation:code}code[data-v-d68ae420]{width:100%}.container-general[data-v-d68ae420]{display:flex;flex-flow:row wrap}.container-general .code-line[data-v-d68ae420]{flex:1 0 auto}.code-line-container[data-v-d68ae420]{align-items:center;display:flex;border-left:4px solid transparent;counter-increment:linenumbers;padding-right:14px}.code-number[data-v-d68ae420]{font-size:.70588rem;line-height:1.5;font-weight:400;font-family:Menlo,monospace;padding:0 1rem 0 8px;text-align:right;min-width:2.01em;-webkit-user-select:none;-moz-user-select:none;user-select:none}.code-number[data-v-d68ae420]:before{content:counter(linenumbers)}.code-line[data-v-d68ae420]{display:flex}pre[data-v-d68ae420]{padding:14px 0;display:flex;flex-flow:row wrap;overflow:auto;-webkit-overflow-scrolling:touch;white-space:pre;word-wrap:normal}@media only screen and (max-width:735px){pre[data-v-d68ae420]{padding-top:.82353rem}}.collapsible-code-listing[data-v-d68ae420]{background:var(--background,var(--color-code-background));border-color:var(--colors-grid,var(--color-grid));color:var(--text,var(--color-code-plain));border-radius:4px;border-style:solid;border-width:1px;counter-reset:linenumbers;font-size:15px}.collapsible-code-listing.single-line[data-v-d68ae420]{border-radius:4px}.collapsible[data-v-d68ae420]{background:var(--color-code-collapsible-background);color:var(--color-code-collapsible-text)}.collapsed[data-v-d68ae420]:before{content:"⋯";display:inline-block;font-family:monospace;font-weight:700;height:100%;line-height:1;text-align:right;width:2.3rem}.collapsed .code-line-container[data-v-d68ae420]{height:0;visibility:hidden}.row[data-v-be73599c]{box-sizing:border-box;display:flex;flex-flow:row wrap}.col[data-v-2ee3ad8b]{box-sizing:border-box;flex:none}.xlarge-1[data-v-2ee3ad8b]{flex-basis:8.33333%;max-width:8.33333%}.xlarge-2[data-v-2ee3ad8b]{flex-basis:16.66667%;max-width:16.66667%}.xlarge-3[data-v-2ee3ad8b]{flex-basis:25%;max-width:25%}.xlarge-4[data-v-2ee3ad8b]{flex-basis:33.33333%;max-width:33.33333%}.xlarge-5[data-v-2ee3ad8b]{flex-basis:41.66667%;max-width:41.66667%}.xlarge-6[data-v-2ee3ad8b]{flex-basis:50%;max-width:50%}.xlarge-7[data-v-2ee3ad8b]{flex-basis:58.33333%;max-width:58.33333%}.xlarge-8[data-v-2ee3ad8b]{flex-basis:66.66667%;max-width:66.66667%}.xlarge-9[data-v-2ee3ad8b]{flex-basis:75%;max-width:75%}.xlarge-10[data-v-2ee3ad8b]{flex-basis:83.33333%;max-width:83.33333%}.xlarge-11[data-v-2ee3ad8b]{flex-basis:91.66667%;max-width:91.66667%}.xlarge-12[data-v-2ee3ad8b]{flex-basis:100%;max-width:100%}.xlarge-centered[data-v-2ee3ad8b]{margin-left:auto;margin-right:auto}.xlarge-uncentered[data-v-2ee3ad8b]{margin-left:0;margin-right:0}.large-1[data-v-2ee3ad8b]{flex-basis:8.33333%;max-width:8.33333%}.large-2[data-v-2ee3ad8b]{flex-basis:16.66667%;max-width:16.66667%}.large-3[data-v-2ee3ad8b]{flex-basis:25%;max-width:25%}.large-4[data-v-2ee3ad8b]{flex-basis:33.33333%;max-width:33.33333%}.large-5[data-v-2ee3ad8b]{flex-basis:41.66667%;max-width:41.66667%}.large-6[data-v-2ee3ad8b]{flex-basis:50%;max-width:50%}.large-7[data-v-2ee3ad8b]{flex-basis:58.33333%;max-width:58.33333%}.large-8[data-v-2ee3ad8b]{flex-basis:66.66667%;max-width:66.66667%}.large-9[data-v-2ee3ad8b]{flex-basis:75%;max-width:75%}.large-10[data-v-2ee3ad8b]{flex-basis:83.33333%;max-width:83.33333%}.large-11[data-v-2ee3ad8b]{flex-basis:91.66667%;max-width:91.66667%}.large-12[data-v-2ee3ad8b]{flex-basis:100%;max-width:100%}.large-centered[data-v-2ee3ad8b]{margin-left:auto;margin-right:auto}.large-uncentered[data-v-2ee3ad8b]{margin-left:0;margin-right:0}@media only screen and (max-width:1250px){.medium-1[data-v-2ee3ad8b]{flex-basis:8.33333%;max-width:8.33333%}.medium-2[data-v-2ee3ad8b]{flex-basis:16.66667%;max-width:16.66667%}.medium-3[data-v-2ee3ad8b]{flex-basis:25%;max-width:25%}.medium-4[data-v-2ee3ad8b]{flex-basis:33.33333%;max-width:33.33333%}.medium-5[data-v-2ee3ad8b]{flex-basis:41.66667%;max-width:41.66667%}.medium-6[data-v-2ee3ad8b]{flex-basis:50%;max-width:50%}.medium-7[data-v-2ee3ad8b]{flex-basis:58.33333%;max-width:58.33333%}.medium-8[data-v-2ee3ad8b]{flex-basis:66.66667%;max-width:66.66667%}.medium-9[data-v-2ee3ad8b]{flex-basis:75%;max-width:75%}.medium-10[data-v-2ee3ad8b]{flex-basis:83.33333%;max-width:83.33333%}.medium-11[data-v-2ee3ad8b]{flex-basis:91.66667%;max-width:91.66667%}.medium-12[data-v-2ee3ad8b]{flex-basis:100%;max-width:100%}.medium-centered[data-v-2ee3ad8b]{margin-left:auto;margin-right:auto}.medium-uncentered[data-v-2ee3ad8b]{margin-left:0;margin-right:0}}@media only screen and (max-width:735px){.small-1[data-v-2ee3ad8b]{flex-basis:8.33333%;max-width:8.33333%}.small-2[data-v-2ee3ad8b]{flex-basis:16.66667%;max-width:16.66667%}.small-3[data-v-2ee3ad8b]{flex-basis:25%;max-width:25%}.small-4[data-v-2ee3ad8b]{flex-basis:33.33333%;max-width:33.33333%}.small-5[data-v-2ee3ad8b]{flex-basis:41.66667%;max-width:41.66667%}.small-6[data-v-2ee3ad8b]{flex-basis:50%;max-width:50%}.small-7[data-v-2ee3ad8b]{flex-basis:58.33333%;max-width:58.33333%}.small-8[data-v-2ee3ad8b]{flex-basis:66.66667%;max-width:66.66667%}.small-9[data-v-2ee3ad8b]{flex-basis:75%;max-width:75%}.small-10[data-v-2ee3ad8b]{flex-basis:83.33333%;max-width:83.33333%}.small-11[data-v-2ee3ad8b]{flex-basis:91.66667%;max-width:91.66667%}.small-12[data-v-2ee3ad8b]{flex-basis:100%;max-width:100%}.small-centered[data-v-2ee3ad8b]{margin-left:auto;margin-right:auto}.small-uncentered[data-v-2ee3ad8b]{margin-left:0;margin-right:0}}.tabnav[data-v-42371214]{margin:.88235rem 0 1.47059rem 0}.tabnav-items[data-v-42371214]{display:inline-block;margin:0;text-align:center}.tabnav-item[data-v-723a9588]{border-bottom:1px solid;border-color:var(--colors-tabnav-item-border-color,var(--color-tabnav-item-border-color));display:inline-block;list-style:none;padding-left:1.76471rem;margin:0;outline:none}.tabnav-item[data-v-723a9588]:first-child{padding-left:0}.tabnav-item[data-v-723a9588]:nth-child(n+1){margin:0}.tabnav-link[data-v-723a9588]{color:var(--colors-secondary-label,var(--color-secondary-label));font-size:1rem;line-height:1;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;padding:9px 0 11px;margin-top:2px;margin-bottom:4px;text-align:left;text-decoration:none;display:block;position:relative;z-index:0}.tabnav-link[data-v-723a9588]:hover{text-decoration:none}.tabnav-link[data-v-723a9588]:focus{outline-offset:-1px}.tabnav-link[data-v-723a9588]:after{content:"";position:absolute;bottom:-5px;left:0;width:100%;border:1px solid transparent}.tabnav-link.active[data-v-723a9588]{color:var(--colors-text,var(--color-text));cursor:default;z-index:10}.tabnav-link.active[data-v-723a9588]:after{border-bottom-color:var(--colors-text,var(--color-text))}.controls[data-v-6197ce3f]{margin-top:5px;font-size:14px;display:flex;justify-content:flex-end}.controls a[data-v-6197ce3f]{color:var(--colors-text,var(--color-text));display:flex;align-items:center}.controls .control-icon[data-v-6197ce3f]{width:1.05em;margin-right:.3em}[data-v-7be42fb4] figcaption+*{margin-top:1rem}.caption[data-v-0bcb8b58]{font-size:.82353rem;line-height:1.5;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif}[data-v-0bcb8b58] p{display:inline-block}[data-v-3a939631] img{max-width:100%}*+.table-wrapper,.table-wrapper+*{margin-top:1.6em}.nav-menu-items[data-v-67c1c0a5]{display:flex;justify-content:flex-end}.nav--in-breakpoint-range .nav-menu-items[data-v-67c1c0a5]{display:block;opacity:0;padding:1rem 1.88235rem 1.64706rem 1.88235rem;transform:translate3d(0,-50px,0);transition:transform 1s cubic-bezier(.07,1.06,.27,.95) .5s,opacity .7s cubic-bezier(.07,1.06,.27,.95) .2s}.nav--is-open.nav--in-breakpoint-range .nav-menu-items[data-v-67c1c0a5]{opacity:1;transform:translateZ(0);transition-delay:.2s,.4s}.nav--in-breakpoint-range .nav-menu-items[data-v-67c1c0a5]:not(:only-child):not(:last-child){padding-bottom:0}.nav--in-breakpoint-range .nav-menu-items[data-v-67c1c0a5]:not(:only-child):last-child{padding-top:0}.table-wrapper[data-v-358dcd5e]{overflow:auto;-webkit-overflow-scrolling:touch}[data-v-358dcd5e] th{font-weight:600}[data-v-358dcd5e] td,[data-v-358dcd5e] th{border-color:var(--color-fill-gray-tertiary);border-style:solid;border-width:1px 0;padding:.58824rem}.nav[data-v-be9ec8e8]{position:sticky;top:0;width:100%;height:3.05882rem;z-index:9997;--nav-padding:1.29412rem;color:var(--color-nav-color)}@media only screen and (max-width:767px){.nav[data-v-be9ec8e8]{min-width:320px;height:2.82353rem}}.theme-dark.nav[data-v-be9ec8e8]{background:none;color:var(--color-nav-dark-color)}.nav__wrapper[data-v-be9ec8e8]{position:absolute;top:0;left:0;width:100%;height:auto;min-height:100%;z-index:1}.nav__background[data-v-be9ec8e8]{position:absolute;left:0;top:0;width:100%;height:100%;z-index:1;transition:background-color 0s ease-in}.nav__background[data-v-be9ec8e8]:after{background-color:var(--color-nav-keyline)}.nav--no-bg-transition .nav__background[data-v-be9ec8e8]{transition:none!important}.nav--solid-background .nav__background[data-v-be9ec8e8]{background-color:var(--color-nav-solid-background);-webkit-backdrop-filter:none;backdrop-filter:none}.nav--is-open.nav--solid-background .nav__background[data-v-be9ec8e8],.nav--is-sticking.nav--solid-background .nav__background[data-v-be9ec8e8]{background-color:var(--color-nav-solid-background)}.nav--is-open.theme-dark.nav--solid-background .nav__background[data-v-be9ec8e8],.nav--is-sticking.theme-dark.nav--solid-background .nav__background[data-v-be9ec8e8],.theme-dark.nav--solid-background .nav__background[data-v-be9ec8e8]{background-color:var(--color-nav-dark-solid-background)}.nav--in-breakpoint-range .nav__background[data-v-be9ec8e8]{min-height:2.82353rem;transition:background-color 0s ease .7s}.nav--is-sticking .nav__background[data-v-be9ec8e8]{background-color:var(--color-nav-expanded);max-height:none;transition:background-color 0s ease;transition-property:background-color,-webkit-backdrop-filter;transition-property:background-color,backdrop-filter;transition-property:background-color,backdrop-filter,-webkit-backdrop-filter}.nav--is-sticking .nav__background[data-v-be9ec8e8]:after{background-color:var(--color-nav-sticking-expanded-keyline)}@supports ((-webkit-backdrop-filter:initial) or (backdrop-filter:initial)){.nav--is-sticking .nav__background[data-v-be9ec8e8]{-webkit-backdrop-filter:saturate(180%) blur(20px);backdrop-filter:saturate(180%) blur(20px);background-color:var(--color-nav-uiblur-stuck)}}.theme-dark.nav--is-sticking .nav__background[data-v-be9ec8e8]{background-color:var(--color-nav-dark-stuck)}@supports ((-webkit-backdrop-filter:initial) or (backdrop-filter:initial)){.theme-dark.nav--is-sticking .nav__background[data-v-be9ec8e8]{background-color:var(--color-nav-dark-uiblur-stuck)}}.nav--is-open .nav__background[data-v-be9ec8e8]{background-color:var(--color-nav-expanded);max-height:none;transition:background-color 0s ease;transition-property:background-color,-webkit-backdrop-filter;transition-property:background-color,backdrop-filter;transition-property:background-color,backdrop-filter,-webkit-backdrop-filter}.nav--is-open .nav__background[data-v-be9ec8e8]:after{background-color:var(--color-nav-sticking-expanded-keyline)}@supports ((-webkit-backdrop-filter:initial) or (backdrop-filter:initial)){.nav--is-open .nav__background[data-v-be9ec8e8]{-webkit-backdrop-filter:saturate(180%) blur(20px);backdrop-filter:saturate(180%) blur(20px);background-color:var(--color-nav-uiblur-expanded)}}.theme-dark.nav--is-open .nav__background[data-v-be9ec8e8]{background-color:var(--color-nav-dark-expanded)}@supports ((-webkit-backdrop-filter:initial) or (backdrop-filter:initial)){.theme-dark.nav--is-open .nav__background[data-v-be9ec8e8]{background-color:var(--color-nav-dark-uiblur-expanded)}}.theme-dark .nav__background[data-v-be9ec8e8]:after{background-color:var(--color-nav-dark-keyline)}.nav--is-open.theme-dark .nav__background[data-v-be9ec8e8]:after,.nav--is-sticking.theme-dark .nav__background[data-v-be9ec8e8]:after{background-color:var(--color-nav-dark-sticking-expanded-keyline)}.nav__background[data-v-be9ec8e8]:after{content:"";display:block;position:absolute;top:100%;left:50%;transform:translateX(-50%);width:980px;height:1px;z-index:1}@media only screen and (max-width:1023px){.nav__background[data-v-be9ec8e8]:after{width:100%}}.nav--noborder .nav__background[data-v-be9ec8e8]:after{display:none}.nav--is-sticking.nav--noborder .nav__background[data-v-be9ec8e8]:after{display:block}.nav--fullwidth-border .nav__background[data-v-be9ec8e8]:after,.nav--is-open .nav__background[data-v-be9ec8e8]:after,.nav--is-sticking .nav__background[data-v-be9ec8e8]:after,.nav--solid-background .nav__background[data-v-be9ec8e8]:after{width:100%}.nav-overlay[data-v-be9ec8e8]{position:fixed;left:0;right:0;top:0;display:block;opacity:0}.nav--is-open .nav-overlay[data-v-be9ec8e8]{background-color:rgba(51,51,51,.4);transition:opacity .7s cubic-bezier(.07,1.06,.27,.95) .2s;bottom:0;opacity:1}.nav-wrapper[data-v-be9ec8e8]{position:absolute;top:0;left:0;width:100%;height:auto;min-height:100%;z-index:1}.pre-title[data-v-be9ec8e8],.pre-title[data-v-be9ec8e8]:empty{display:none}.nav--in-breakpoint-range .pre-title[data-v-be9ec8e8]{display:flex;padding:0}.nav-content[data-v-be9ec8e8]{display:flex;padding:0 var(--nav-padding);max-width:980px;margin:0 auto;position:relative;z-index:2;justify-content:space-between}.nav--is-wide-format .nav-content[data-v-be9ec8e8]{box-sizing:border-box;max-width:1920px;margin-left:auto;margin-right:auto}@supports (padding:calc(max(0px))){.nav-content[data-v-be9ec8e8]{padding-left:calc(max(var(--nav-padding), env(safe-area-inset-left)));padding-right:calc(max(var(--nav-padding), env(safe-area-inset-right)))}}@media only screen and (max-width:767px){.nav-content[data-v-be9ec8e8]{padding:0 0 0 .94118rem}}.nav--in-breakpoint-range .nav-content[data-v-be9ec8e8]{display:grid;grid-template-columns:auto 1fr auto;grid-auto-rows:minmax(-webkit-min-content,-webkit-max-content);grid-auto-rows:minmax(min-content,max-content);grid-template-areas:"pre-title title actions" "menu menu menu"}.nav-menu[data-v-be9ec8e8]{font-size:.70588rem;line-height:1;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;flex:1 1 auto;display:flex;padding-top:10px;min-width:0}@media only screen and (max-width:767px){.nav-menu[data-v-be9ec8e8]{font-size:.82353rem;line-height:1;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif}}.nav--in-breakpoint-range .nav-menu[data-v-be9ec8e8]{font-size:.82353rem;line-height:1;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;padding-top:0;grid-area:menu}.nav-menu-tray[data-v-be9ec8e8]{width:100%;max-width:100%;align-items:center;display:flex;justify-content:space-between}.nav--in-breakpoint-range .nav-menu-tray[data-v-be9ec8e8]{display:block;overflow:hidden;pointer-events:none;visibility:hidden;max-height:0;transition:max-height .4s ease-in 0s,visibility 0s linear 1s}.nav--is-open.nav--in-breakpoint-range .nav-menu-tray[data-v-be9ec8e8]{max-height:calc(100vh - 5.64706rem);overflow-y:auto;-webkit-overflow-scrolling:touch;pointer-events:auto;visibility:visible;transition-delay:.2s,0s}.nav--is-transitioning.nav--is-open.nav--in-breakpoint-range .nav-menu-tray[data-v-be9ec8e8]{overflow-y:hidden}.nav--is-sticking.nav--is-open.nav--in-breakpoint-range .nav-menu-tray[data-v-be9ec8e8]{max-height:calc(100vh - 2.82353rem)}.nav-actions[data-v-be9ec8e8]{display:flex;align-items:center}.nav--in-breakpoint-range .nav-actions[data-v-be9ec8e8]{grid-area:actions;justify-content:flex-end}@media only screen and (max-width:767px){.nav-actions[data-v-be9ec8e8]{padding-right:.94118rem}}.nav-title[data-v-be9ec8e8]{height:3.05882rem;font-size:1.11765rem;line-height:1.42105;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;cursor:default;display:flex;align-items:center;white-space:nowrap;box-sizing:border-box}@media only screen and (max-width:767px){.nav-title[data-v-be9ec8e8]{padding-top:0;height:2.82353rem;width:90%}}.nav--in-breakpoint-range .nav-title[data-v-be9ec8e8]{grid-area:title}.nav--is-wide-format.nav--in-breakpoint-range .nav-title[data-v-be9ec8e8]{width:100%;justify-content:center}.nav-title[data-v-be9ec8e8] span{height:100%;line-height:normal}.nav-title a[data-v-be9ec8e8]{display:inline-block;letter-spacing:inherit;line-height:normal;margin:0;text-decoration:none;white-space:nowrap}.nav-title a[data-v-be9ec8e8]:hover{text-decoration:none}@media only screen and (max-width:767px){.nav-title a[data-v-be9ec8e8]{display:flex}}.nav-title[data-v-be9ec8e8],.nav-title a[data-v-be9ec8e8]{color:var(--color-figure-gray);transition:color 0s ease-in}.nav--is-open.theme-dark .nav-title[data-v-be9ec8e8],.nav--is-open.theme-dark .nav-title a[data-v-be9ec8e8],.nav--is-sticking.theme-dark .nav-title[data-v-be9ec8e8],.nav--is-sticking.theme-dark .nav-title a[data-v-be9ec8e8],.theme-dark .nav-title[data-v-be9ec8e8],.theme-dark .nav-title a[data-v-be9ec8e8]{color:var(--color-nav-dark-link-color)}.nav-ax-toggle[data-v-be9ec8e8]{display:none;position:absolute;top:0;left:0;width:1px;height:1px;z-index:10}.nav-ax-toggle[data-v-be9ec8e8]:focus{outline-offset:-6px;width:100%;height:100%}.nav--in-breakpoint-range .nav-ax-toggle[data-v-be9ec8e8]{display:block}.nav-menucta[data-v-be9ec8e8]{cursor:pointer;display:none;align-items:center;overflow:hidden;width:1.17647rem;-webkit-tap-highlight-color:transparent;height:2.82353rem}.nav--in-breakpoint-range .nav-menucta[data-v-be9ec8e8]{display:flex}.nav-menucta-chevron[data-v-be9ec8e8]{display:block;position:relative;width:100%;height:.70588rem;transition:transform .3s linear}.nav-menucta-chevron[data-v-be9ec8e8]:after,.nav-menucta-chevron[data-v-be9ec8e8]:before{content:"";display:block;position:absolute;top:.58824rem;width:.70588rem;height:.05882rem;transition:transform .3s linear;background:var(--color-figure-gray)}.nav-menucta-chevron[data-v-be9ec8e8]:before{right:50%;border-radius:.5px 0 0 .5px}.nav-menucta-chevron[data-v-be9ec8e8]:after{left:50%;border-radius:0 .5px .5px 0}.nav-menucta-chevron[data-v-be9ec8e8]:before{transform-origin:100% 100%;transform:rotate(40deg) scaleY(1.5)}.nav-menucta-chevron[data-v-be9ec8e8]:after{transform-origin:0 100%;transform:rotate(-40deg) scaleY(1.5)}.nav--is-open .nav-menucta-chevron[data-v-be9ec8e8]{transform:scaleY(-1)}.theme-dark .nav-menucta-chevron[data-v-be9ec8e8]:after,.theme-dark .nav-menucta-chevron[data-v-be9ec8e8]:before{background:var(--color-nav-dark-link-color)}[data-v-be9ec8e8] .nav-menu-link{color:var(--color-nav-link-color)}[data-v-be9ec8e8] .nav-menu-link:hover{color:var(--color-nav-link-color-hover);text-decoration:none}.theme-dark[data-v-be9ec8e8] .nav-menu-link{color:var(--color-nav-dark-link-color)}.theme-dark[data-v-be9ec8e8] .nav-menu-link:hover{color:var(--color-nav-dark-link-color-hover)}[data-v-be9ec8e8] .nav-menu-link.current{color:var(--color-nav-current-link);cursor:default}[data-v-be9ec8e8] .nav-menu-link.current:hover{color:var(--color-nav-current-link)}.theme-dark[data-v-be9ec8e8] .nav-menu-link.current,.theme-dark[data-v-be9ec8e8] .nav-menu-link.current:hover{color:var(--color-nav-dark-current-link)}s[data-v-eb91ce54]:after,s[data-v-eb91ce54]:before{position:absolute;clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(0 0 99.9% 99.9%);clip-path:inset(0 0 99.9% 99.9%);overflow:hidden;height:1px;width:1px;padding:0;border:0}s[data-v-eb91ce54]:before{content:" [start of stricken text] "}s[data-v-eb91ce54]:after{content:" [end of stricken text] "}.nav-menu-item[data-v-66cbfe4c]{margin-left:1.41176rem;list-style:none;min-width:0}.nav--in-breakpoint-range .nav-menu-item[data-v-66cbfe4c]{margin-left:0;width:100%;min-height:2.47059rem}.nav--in-breakpoint-range .nav-menu-item[data-v-66cbfe4c]:first-child .nav-menu-link{border-top:0}.nav--in-breakpoint-range .nav-menu-item--animated[data-v-66cbfe4c]{opacity:0;transform:none;transition:.5s ease;transition-property:transform,opacity}.nav--is-open.nav--in-breakpoint-range .nav-menu-item--animated[data-v-66cbfe4c]{opacity:1;transform:translateZ(0);transition-delay:0s}.nav--in-breakpoint-range [data-previous-menu-children-count="0"] .nav-menu-item--animated[data-v-66cbfe4c]:first-child,.nav--in-breakpoint-range [data-previous-menu-children-count="0"] .nav-menu-item--animated[data-v-66cbfe4c]:nth-child(2),.nav--in-breakpoint-range [data-previous-menu-children-count="0"] .nav-menu-item--animated[data-v-66cbfe4c]:nth-child(3),.nav--in-breakpoint-range [data-previous-menu-children-count="0"] .nav-menu-item--animated[data-v-66cbfe4c]:nth-child(4),.nav--in-breakpoint-range [data-previous-menu-children-count="0"] .nav-menu-item--animated[data-v-66cbfe4c]:nth-child(5),.nav--in-breakpoint-range [data-previous-menu-children-count="0"] .nav-menu-item--animated[data-v-66cbfe4c]:nth-child(6),.nav--in-breakpoint-range [data-previous-menu-children-count="0"] .nav-menu-item--animated[data-v-66cbfe4c]:nth-child(7),.nav--in-breakpoint-range [data-previous-menu-children-count="1"] .nav-menu-item--animated[data-v-66cbfe4c]:first-child,.nav--in-breakpoint-range [data-previous-menu-children-count="1"] .nav-menu-item--animated[data-v-66cbfe4c]:nth-child(2),.nav--in-breakpoint-range [data-previous-menu-children-count="1"] .nav-menu-item--animated[data-v-66cbfe4c]:nth-child(3),.nav--in-breakpoint-range [data-previous-menu-children-count="1"] .nav-menu-item--animated[data-v-66cbfe4c]:nth-child(4),.nav--in-breakpoint-range [data-previous-menu-children-count="1"] .nav-menu-item--animated[data-v-66cbfe4c]:nth-child(5),.nav--in-breakpoint-range [data-previous-menu-children-count="1"] .nav-menu-item--animated[data-v-66cbfe4c]:nth-child(6),.nav--in-breakpoint-range [data-previous-menu-children-count="1"] .nav-menu-item--animated[data-v-66cbfe4c]:nth-child(7),.nav--in-breakpoint-range [data-previous-menu-children-count="2"] .nav-menu-item--animated[data-v-66cbfe4c]:first-child,.nav--in-breakpoint-range [data-previous-menu-children-count="2"] .nav-menu-item--animated[data-v-66cbfe4c]:nth-child(2),.nav--in-breakpoint-range [data-previous-menu-children-count="2"] .nav-menu-item--animated[data-v-66cbfe4c]:nth-child(3),.nav--in-breakpoint-range [data-previous-menu-children-count="2"] .nav-menu-item--animated[data-v-66cbfe4c]:nth-child(4),.nav--in-breakpoint-range [data-previous-menu-children-count="2"] .nav-menu-item--animated[data-v-66cbfe4c]:nth-child(5),.nav--in-breakpoint-range [data-previous-menu-children-count="2"] .nav-menu-item--animated[data-v-66cbfe4c]:nth-child(6),.nav--in-breakpoint-range [data-previous-menu-children-count="2"] .nav-menu-item--animated[data-v-66cbfe4c]:nth-child(7),.nav--in-breakpoint-range [data-previous-menu-children-count="3"] .nav-menu-item--animated[data-v-66cbfe4c]:first-child,.nav--in-breakpoint-range [data-previous-menu-children-count="3"] .nav-menu-item--animated[data-v-66cbfe4c]:nth-child(2),.nav--in-breakpoint-range [data-previous-menu-children-count="3"] .nav-menu-item--animated[data-v-66cbfe4c]:nth-child(3),.nav--in-breakpoint-range [data-previous-menu-children-count="3"] .nav-menu-item--animated[data-v-66cbfe4c]:nth-child(4),.nav--in-breakpoint-range [data-previous-menu-children-count="3"] .nav-menu-item--animated[data-v-66cbfe4c]:nth-child(5),.nav--in-breakpoint-range [data-previous-menu-children-count="3"] .nav-menu-item--animated[data-v-66cbfe4c]:nth-child(6),.nav--in-breakpoint-range [data-previous-menu-children-count="3"] .nav-menu-item--animated[data-v-66cbfe4c]:nth-child(7),.nav--in-breakpoint-range [data-previous-menu-children-count="4"] .nav-menu-item--animated[data-v-66cbfe4c]:first-child,.nav--in-breakpoint-range [data-previous-menu-children-count="4"] .nav-menu-item--animated[data-v-66cbfe4c]:nth-child(2),.nav--in-breakpoint-range [data-previous-menu-children-count="4"] .nav-menu-item--animated[data-v-66cbfe4c]:nth-child(3),.nav--in-breakpoint-range [data-previous-menu-children-count="4"] .nav-menu-item--animated[data-v-66cbfe4c]:nth-child(4),.nav--in-breakpoint-range [data-previous-menu-children-count="4"] .nav-menu-item--animated[data-v-66cbfe4c]:nth-child(5),.nav--in-breakpoint-range [data-previous-menu-children-count="4"] .nav-menu-item--animated[data-v-66cbfe4c]:nth-child(6),.nav--in-breakpoint-range [data-previous-menu-children-count="4"] .nav-menu-item--animated[data-v-66cbfe4c]:nth-child(7),.nav--in-breakpoint-range [data-previous-menu-children-count="5"] .nav-menu-item--animated[data-v-66cbfe4c]:first-child,.nav--in-breakpoint-range [data-previous-menu-children-count="5"] .nav-menu-item--animated[data-v-66cbfe4c]:nth-child(2),.nav--in-breakpoint-range [data-previous-menu-children-count="5"] .nav-menu-item--animated[data-v-66cbfe4c]:nth-child(3),.nav--in-breakpoint-range [data-previous-menu-children-count="5"] .nav-menu-item--animated[data-v-66cbfe4c]:nth-child(4),.nav--in-breakpoint-range [data-previous-menu-children-count="5"] .nav-menu-item--animated[data-v-66cbfe4c]:nth-child(5),.nav--in-breakpoint-range [data-previous-menu-children-count="5"] .nav-menu-item--animated[data-v-66cbfe4c]:nth-child(6),.nav--in-breakpoint-range [data-previous-menu-children-count="5"] .nav-menu-item--animated[data-v-66cbfe4c]:nth-child(7),.nav--in-breakpoint-range [data-previous-menu-children-count="6"] .nav-menu-item--animated[data-v-66cbfe4c]:first-child,.nav--in-breakpoint-range [data-previous-menu-children-count="6"] .nav-menu-item--animated[data-v-66cbfe4c]:nth-child(2),.nav--in-breakpoint-range [data-previous-menu-children-count="6"] .nav-menu-item--animated[data-v-66cbfe4c]:nth-child(3),.nav--in-breakpoint-range [data-previous-menu-children-count="6"] .nav-menu-item--animated[data-v-66cbfe4c]:nth-child(4),.nav--in-breakpoint-range [data-previous-menu-children-count="6"] .nav-menu-item--animated[data-v-66cbfe4c]:nth-child(5),.nav--in-breakpoint-range [data-previous-menu-children-count="6"] .nav-menu-item--animated[data-v-66cbfe4c]:nth-child(6),.nav--in-breakpoint-range [data-previous-menu-children-count="6"] .nav-menu-item--animated[data-v-66cbfe4c]:nth-child(7),.nav--in-breakpoint-range [data-previous-menu-children-count="7"] .nav-menu-item--animated[data-v-66cbfe4c]:first-child,.nav--in-breakpoint-range [data-previous-menu-children-count="7"] .nav-menu-item--animated[data-v-66cbfe4c]:nth-child(2),.nav--in-breakpoint-range [data-previous-menu-children-count="7"] .nav-menu-item--animated[data-v-66cbfe4c]:nth-child(3),.nav--in-breakpoint-range [data-previous-menu-children-count="7"] .nav-menu-item--animated[data-v-66cbfe4c]:nth-child(4),.nav--in-breakpoint-range [data-previous-menu-children-count="7"] .nav-menu-item--animated[data-v-66cbfe4c]:nth-child(5),.nav--in-breakpoint-range [data-previous-menu-children-count="7"] .nav-menu-item--animated[data-v-66cbfe4c]:nth-child(6),.nav--in-breakpoint-range [data-previous-menu-children-count="7"] .nav-menu-item--animated[data-v-66cbfe4c]:nth-child(7),.nav--is-open.nav--in-breakpoint-range [data-previous-menu-children-count="0"] .nav-menu-item--animated[data-v-66cbfe4c]:first-child,.nav--is-open.nav--in-breakpoint-range [data-previous-menu-children-count="0"] .nav-menu-item--animated[data-v-66cbfe4c]:nth-child(2),.nav--is-open.nav--in-breakpoint-range [data-previous-menu-children-count="0"] .nav-menu-item--animated[data-v-66cbfe4c]:nth-child(3),.nav--is-open.nav--in-breakpoint-range [data-previous-menu-children-count="0"] .nav-menu-item--animated[data-v-66cbfe4c]:nth-child(4),.nav--is-open.nav--in-breakpoint-range [data-previous-menu-children-count="0"] .nav-menu-item--animated[data-v-66cbfe4c]:nth-child(5),.nav--is-open.nav--in-breakpoint-range [data-previous-menu-children-count="0"] .nav-menu-item--animated[data-v-66cbfe4c]:nth-child(6),.nav--is-open.nav--in-breakpoint-range [data-previous-menu-children-count="0"] .nav-menu-item--animated[data-v-66cbfe4c]:nth-child(7),.nav--is-open.nav--in-breakpoint-range [data-previous-menu-children-count="1"] .nav-menu-item--animated[data-v-66cbfe4c]:first-child,.nav--is-open.nav--in-breakpoint-range [data-previous-menu-children-count="1"] .nav-menu-item--animated[data-v-66cbfe4c]:nth-child(2),.nav--is-open.nav--in-breakpoint-range [data-previous-menu-children-count="1"] .nav-menu-item--animated[data-v-66cbfe4c]:nth-child(3),.nav--is-open.nav--in-breakpoint-range [data-previous-menu-children-count="1"] .nav-menu-item--animated[data-v-66cbfe4c]:nth-child(4),.nav--is-open.nav--in-breakpoint-range [data-previous-menu-children-count="1"] .nav-menu-item--animated[data-v-66cbfe4c]:nth-child(5),.nav--is-open.nav--in-breakpoint-range [data-previous-menu-children-count="1"] .nav-menu-item--animated[data-v-66cbfe4c]:nth-child(6),.nav--is-open.nav--in-breakpoint-range [data-previous-menu-children-count="1"] .nav-menu-item--animated[data-v-66cbfe4c]:nth-child(7),.nav--is-open.nav--in-breakpoint-range [data-previous-menu-children-count="2"] .nav-menu-item--animated[data-v-66cbfe4c]:first-child,.nav--is-open.nav--in-breakpoint-range [data-previous-menu-children-count="2"] .nav-menu-item--animated[data-v-66cbfe4c]:nth-child(2),.nav--is-open.nav--in-breakpoint-range [data-previous-menu-children-count="2"] .nav-menu-item--animated[data-v-66cbfe4c]:nth-child(3),.nav--is-open.nav--in-breakpoint-range [data-previous-menu-children-count="2"] .nav-menu-item--animated[data-v-66cbfe4c]:nth-child(4),.nav--is-open.nav--in-breakpoint-range [data-previous-menu-children-count="2"] .nav-menu-item--animated[data-v-66cbfe4c]:nth-child(5),.nav--is-open.nav--in-breakpoint-range [data-previous-menu-children-count="2"] .nav-menu-item--animated[data-v-66cbfe4c]:nth-child(6),.nav--is-open.nav--in-breakpoint-range [data-previous-menu-children-count="2"] .nav-menu-item--animated[data-v-66cbfe4c]:nth-child(7),.nav--is-open.nav--in-breakpoint-range [data-previous-menu-children-count="3"] .nav-menu-item--animated[data-v-66cbfe4c]:first-child,.nav--is-open.nav--in-breakpoint-range [data-previous-menu-children-count="3"] .nav-menu-item--animated[data-v-66cbfe4c]:nth-child(2),.nav--is-open.nav--in-breakpoint-range [data-previous-menu-children-count="3"] .nav-menu-item--animated[data-v-66cbfe4c]:nth-child(3),.nav--is-open.nav--in-breakpoint-range [data-previous-menu-children-count="3"] .nav-menu-item--animated[data-v-66cbfe4c]:nth-child(4),.nav--is-open.nav--in-breakpoint-range [data-previous-menu-children-count="3"] .nav-menu-item--animated[data-v-66cbfe4c]:nth-child(5),.nav--is-open.nav--in-breakpoint-range [data-previous-menu-children-count="3"] .nav-menu-item--animated[data-v-66cbfe4c]:nth-child(6),.nav--is-open.nav--in-breakpoint-range [data-previous-menu-children-count="3"] .nav-menu-item--animated[data-v-66cbfe4c]:nth-child(7),.nav--is-open.nav--in-breakpoint-range [data-previous-menu-children-count="4"] .nav-menu-item--animated[data-v-66cbfe4c]:first-child,.nav--is-open.nav--in-breakpoint-range [data-previous-menu-children-count="4"] .nav-menu-item--animated[data-v-66cbfe4c]:nth-child(2),.nav--is-open.nav--in-breakpoint-range [data-previous-menu-children-count="4"] .nav-menu-item--animated[data-v-66cbfe4c]:nth-child(3),.nav--is-open.nav--in-breakpoint-range [data-previous-menu-children-count="4"] .nav-menu-item--animated[data-v-66cbfe4c]:nth-child(4),.nav--is-open.nav--in-breakpoint-range [data-previous-menu-children-count="4"] .nav-menu-item--animated[data-v-66cbfe4c]:nth-child(5),.nav--is-open.nav--in-breakpoint-range [data-previous-menu-children-count="4"] .nav-menu-item--animated[data-v-66cbfe4c]:nth-child(6),.nav--is-open.nav--in-breakpoint-range [data-previous-menu-children-count="4"] .nav-menu-item--animated[data-v-66cbfe4c]:nth-child(7),.nav--is-open.nav--in-breakpoint-range [data-previous-menu-children-count="5"] .nav-menu-item--animated[data-v-66cbfe4c]:first-child,.nav--is-open.nav--in-breakpoint-range [data-previous-menu-children-count="5"] .nav-menu-item--animated[data-v-66cbfe4c]:nth-child(2),.nav--is-open.nav--in-breakpoint-range [data-previous-menu-children-count="5"] .nav-menu-item--animated[data-v-66cbfe4c]:nth-child(3),.nav--is-open.nav--in-breakpoint-range [data-previous-menu-children-count="5"] .nav-menu-item--animated[data-v-66cbfe4c]:nth-child(4),.nav--is-open.nav--in-breakpoint-range [data-previous-menu-children-count="5"] .nav-menu-item--animated[data-v-66cbfe4c]:nth-child(5),.nav--is-open.nav--in-breakpoint-range [data-previous-menu-children-count="5"] .nav-menu-item--animated[data-v-66cbfe4c]:nth-child(6),.nav--is-open.nav--in-breakpoint-range [data-previous-menu-children-count="5"] .nav-menu-item--animated[data-v-66cbfe4c]:nth-child(7),.nav--is-open.nav--in-breakpoint-range [data-previous-menu-children-count="6"] .nav-menu-item--animated[data-v-66cbfe4c]:first-child,.nav--is-open.nav--in-breakpoint-range [data-previous-menu-children-count="6"] .nav-menu-item--animated[data-v-66cbfe4c]:nth-child(2),.nav--is-open.nav--in-breakpoint-range [data-previous-menu-children-count="6"] .nav-menu-item--animated[data-v-66cbfe4c]:nth-child(3),.nav--is-open.nav--in-breakpoint-range [data-previous-menu-children-count="6"] .nav-menu-item--animated[data-v-66cbfe4c]:nth-child(4),.nav--is-open.nav--in-breakpoint-range [data-previous-menu-children-count="6"] .nav-menu-item--animated[data-v-66cbfe4c]:nth-child(5),.nav--is-open.nav--in-breakpoint-range [data-previous-menu-children-count="6"] .nav-menu-item--animated[data-v-66cbfe4c]:nth-child(6),.nav--is-open.nav--in-breakpoint-range [data-previous-menu-children-count="6"] .nav-menu-item--animated[data-v-66cbfe4c]:nth-child(7),.nav--is-open.nav--in-breakpoint-range [data-previous-menu-children-count="7"] .nav-menu-item--animated[data-v-66cbfe4c]:first-child,.nav--is-open.nav--in-breakpoint-range [data-previous-menu-children-count="7"] .nav-menu-item--animated[data-v-66cbfe4c]:nth-child(2),.nav--is-open.nav--in-breakpoint-range [data-previous-menu-children-count="7"] .nav-menu-item--animated[data-v-66cbfe4c]:nth-child(3),.nav--is-open.nav--in-breakpoint-range [data-previous-menu-children-count="7"] .nav-menu-item--animated[data-v-66cbfe4c]:nth-child(4),.nav--is-open.nav--in-breakpoint-range [data-previous-menu-children-count="7"] .nav-menu-item--animated[data-v-66cbfe4c]:nth-child(5),.nav--is-open.nav--in-breakpoint-range [data-previous-menu-children-count="7"] .nav-menu-item--animated[data-v-66cbfe4c]:nth-child(6),.nav--is-open.nav--in-breakpoint-range [data-previous-menu-children-count="7"] .nav-menu-item--animated[data-v-66cbfe4c]:nth-child(7){transition-delay:0s}.button-cta[data-v-494ad9c8]{border-radius:var(--style-button-borderRadius,4px);background:var(--colors-button-light-background,var(--color-button-background));color:var(--colors-button-text,var(--color-button-text));cursor:pointer;min-width:1.76471rem;padding:.23529rem .88235rem;text-align:center;white-space:nowrap;display:inline-block;font-size:1rem;line-height:1.47059;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif}.button-cta[data-v-494ad9c8]:active{background:var(--colors-button-light-backgroundActive,var(--color-button-background-active));outline:none}.button-cta[data-v-494ad9c8]:hover:not([disabled]){background:var(--colors-button-light-backgroundHover,var(--color-button-background-hover));text-decoration:none}.button-cta[data-v-494ad9c8]:disabled{opacity:.32;cursor:default}.fromkeyboard .button-cta[data-v-494ad9c8]:focus{box-shadow:0 0 0 4px var(--color-focus-color);outline:none}.button-cta.is-dark[data-v-494ad9c8]{background:var(--colors-button-dark-background,#06f)}.button-cta.is-dark[data-v-494ad9c8]:active{background:var(--colors-button-dark-backgroundActive,var(--color-button-background-active))}.button-cta.is-dark[data-v-494ad9c8]:hover:not([disabled]){background:var(--colors-button-dark-backgroundHover,var(--color-button-background-hover))} \ No newline at end of file diff --git a/docs/docc/Reducer.doccarchive/css/index.12bb178a.css b/docs/docc/Reducer.doccarchive/css/index.12bb178a.css deleted file mode 100644 index 381df10..0000000 --- a/docs/docc/Reducer.doccarchive/css/index.12bb178a.css +++ /dev/null @@ -1,9 +0,0 @@ -/*! - * This source file is part of the Swift.org open source project - * - * Copyright (c) 2021 Apple Inc. and the Swift project authors - * Licensed under Apache License v2.0 with Runtime Library Exception - * - * See https://swift.org/LICENSE.txt for license information - * See https://swift.org/CONTRIBUTORS.txt for Swift project authors - */.color-scheme-toggle[data-v-4472ec1e]{--toggle-color-fill:var(--color-button-background);--toggle-color-text:var(--color-fill-blue);font-size:.70588rem;line-height:1.33333;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;border:1px solid var(--toggle-color-fill);border-radius:var(--toggle-border-radius-outer,4px);display:inline-flex;padding:1px}@media screen{[data-color-scheme=dark] .color-scheme-toggle[data-v-4472ec1e]{--toggle-color-text:var(--color-figure-blue)}}@media screen and (prefers-color-scheme:dark){[data-color-scheme=auto] .color-scheme-toggle[data-v-4472ec1e]{--toggle-color-text:var(--color-figure-blue)}}input[data-v-4472ec1e]{position:absolute;clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(0 0 99.9% 99.9%);clip-path:inset(0 0 99.9% 99.9%);overflow:hidden;height:1px;width:1px;padding:0;border:0;-webkit-appearance:none;-moz-appearance:none;appearance:none}.text[data-v-4472ec1e]{border:1px solid transparent;border-radius:var(--toggle-border-radius-inner,2px);color:var(--toggle-color-text);display:inline-block;text-align:center;padding:1px 6px;min-width:42px;box-sizing:border-box}.text[data-v-4472ec1e]:hover{cursor:pointer}input:checked+.text[data-v-4472ec1e]{--toggle-color-text:var(--color-button-text);background:var(--toggle-color-fill);border-color:var(--toggle-color-fill)}.footer[data-v-72f2e2dc]{border-top:1px solid var(--color-grid)}.row[data-v-72f2e2dc]{margin-left:auto;margin-right:auto;width:980px;display:flex;flex-direction:row-reverse;padding:20px 0}@media only screen and (max-width:1250px){.row[data-v-72f2e2dc]{width:692px}}@media only screen and (max-width:735px){.row[data-v-72f2e2dc]{width:87.5%;width:100%;padding:20px .94118rem;box-sizing:border-box}}.InitialLoadingPlaceholder[data-v-35c356b6]{background:var(--colors-loading-placeholder-background,var(--color-loading-placeholder-background));height:100vh;width:100%}html{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;background-color:var(--colors-text-background,var(--color-text-background));height:100%}abbr,blockquote,body,button,dd,dl,dt,fieldset,figure,form,h1,h2,h3,h4,h5,h6,hgroup,input,legend,li,ol,p,pre,ul{margin:0;padding:0}address,caption,code,figcaption,pre,th{font-size:1em;font-weight:400;font-style:normal}fieldset,iframe,img{border:0}caption,th{text-align:left}table{border-collapse:collapse;border-spacing:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}button{background:none;border:0;box-sizing:content-box;color:inherit;cursor:pointer;font:inherit;line-height:inherit;overflow:visible;vertical-align:inherit}button:disabled{cursor:default}:focus{outline:4px solid var(--color-focus-color);outline-offset:1px}::-moz-focus-inner{border:0;padding:0}@media print{#content,#main,body{color:#000}a,a:link,a:visited{color:#000;text-decoration:none}.hide,.noprint{display:none}}body{height:100%;min-width:320px}html{font:var(--typography-html-font,17px "Helvetica Neue","Helvetica","Arial",sans-serif);quotes:"“" "”"}body{font-size:1rem;line-height:1.47059;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;background-color:var(--color-text-background);color:var(--colors-text,var(--color-text));font-style:normal;word-wrap:break-word}body,button,input,select,textarea{font-synthesis:none;-moz-font-feature-settings:"kern";-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;direction:ltr;text-align:left}h1,h2,h3,h4,h5,h6{color:var(--colors-header-text,var(--color-header-text))}h1+*,h2+*,h3+*,h4+*,h5+*,h6+*{margin-top:.8em}h1+h1,h1+h2,h1+h3,h1+h4,h1+h5,h1+h6,h2+h1,h2+h2,h2+h3,h2+h4,h2+h5,h2+h6,h3+h1,h3+h2,h3+h3,h3+h4,h3+h5,h3+h6,h4+h1,h4+h2,h4+h3,h4+h4,h4+h5,h4+h6,h5+h1,h5+h2,h5+h3,h5+h4,h5+h5,h5+h6,h6+h1,h6+h2,h6+h3,h6+h4,h6+h5,h6+h6{margin-top:.4em}ol+h1,ol+h2,ol+h3,ol+h4,ol+h5,ol+h6,p+h1,p+h2,p+h3,p+h4,p+h5,p+h6,ul+h1,ul+h2,ul+h3,ul+h4,ul+h5,ul+h6{margin-top:1.6em}ol+*,p+*,ul+*{margin-top:.8em}ol,ul{margin-left:1.17647em}ol ol,ol ul,ul ol,ul ul{margin-top:0;margin-bottom:0}nav ol,nav ul{margin:0;list-style:none}li li{font-size:1em}a{color:var(--colors-link,var(--color-link))}a:link,a:visited{text-decoration:none}a:hover{text-decoration:underline}a:active{text-decoration:none}p+a{display:inline-block}b,strong{font-weight:600}cite,dfn,em,i{font-style:italic}sup{font-size:.6em;vertical-align:top;position:relative;bottom:-.2em}h1 sup,h2 sup,h3 sup{font-size:.4em}sup a{vertical-align:inherit;color:inherit}sup a:hover{color:var(--figure-blue);text-decoration:none}sub{line-height:1}abbr{border:0}pre{overflow:auto;-webkit-overflow-scrolling:auto;white-space:pre;word-wrap:normal}code{font-family:Menlo,monospace;font-weight:inherit;letter-spacing:0}.syntax-comment{color:var(--syntax-comment,var(--color-syntax-comments))}.syntax-quote{color:var(--syntax-quote,var(--color-syntax-comments))}.syntax-keyword{color:var(--syntax-keyword,var(--color-syntax-keywords))}.syntax-literal{color:var(--syntax-literal,var(--color-syntax-keywords))}.syntax-selector-tag{color:var(--syntax-selector-tag,var(--color-syntax-keywords))}.syntax-string{color:var(--syntax-string,var(--color-syntax-strings))}.syntax-bullet{color:var(--syntax-bullet,var(--color-syntax-characters))}.syntax-meta{color:var(--syntax-meta,var(--color-syntax-characters))}.syntax-number{color:var(--syntax-number,var(--color-syntax-characters))}.syntax-symbol{color:var(--syntax-symbol,var(--color-syntax-characters))}.syntax-tag{color:var(--syntax-tag,var(--color-syntax-characters))}.syntax-attr{color:var(--syntax-attr,var(--color-syntax-other-type-names))}.syntax-built_in{color:var(--syntax-built_in,var(--color-syntax-other-type-names))}.syntax-builtin-name{color:var(--syntax-builtin-name,var(--color-syntax-other-type-names))}.syntax-class{color:var(--syntax-class,var(--color-syntax-other-type-names))}.syntax-params{color:var(--syntax-params,var(--color-syntax-other-type-names))}.syntax-section{color:var(--syntax-section,var(--color-syntax-other-type-names))}.syntax-title{color:var(--syntax-title,var(--color-syntax-other-type-names))}.syntax-type{color:var(--syntax-type,var(--color-syntax-other-type-names))}.syntax-attribute{color:var(--syntax-attribute,var(--color-syntax-plain-text))}.syntax-identifier{color:var(--syntax-identifier,var(--color-syntax-plain-text))}.syntax-subst{color:var(--syntax-subst,var(--color-syntax-plain-text))}.syntax-doctag,.syntax-strong{font-weight:700}.syntax-emphasis,.syntax-link{font-style:italic}[data-syntax=swift] .syntax-meta{color:var(--syntax-meta,var(--color-syntax-keywords))}[data-syntax=swift] .syntax-class,[data-syntax=swift] .syntax-keyword+.syntax-params,[data-syntax=swift] .syntax-params+.syntax-params{color:unset}[data-syntax=json] .syntax-attr{color:var(--syntax-attr,var(--color-syntax-strings))}#skip-nav{position:absolute;clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(0 0 99.9% 99.9%);clip-path:inset(0 0 99.9% 99.9%);overflow:hidden;height:1px;width:1px;padding:0;border:0}#skip-nav:active,#skip-nav:focus{position:relative;float:left;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;color:var(--color-figure-blue);font-size:1em;padding:0 10px;z-index:100000;top:0;left:0;height:44px;line-height:44px;-webkit-clip-path:unset;clip-path:unset}.nav--in-breakpoint-range #skip-nav{display:none}.visuallyhidden{position:absolute;clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(0 0 99.9% 99.9%);clip-path:inset(0 0 99.9% 99.9%);overflow:hidden;height:1px;width:1px;padding:0;border:0}.changed{border:1px solid var(--color-changes-modified);border-radius:4px;position:relative}.changed.has-multiple-lines,.has-multiple-lines .changed{border-radius:4px}.changed:after{left:8px;background-image:url(../img/modified-icon.f496e73d.svg);background-repeat:no-repeat;bottom:0;content:" ";margin:auto;margin-right:8px;position:absolute;top:0;width:1.17647rem;height:1.17647rem;margin-top:.61765rem;z-index:2}@media screen{[data-color-scheme=dark] .changed:after{background-image:url(../img/modified-icon.f496e73d.svg)}}@media screen and (prefers-color-scheme:dark){[data-color-scheme=auto] .changed:after{background-image:url(../img/modified-icon.f496e73d.svg)}}.changed-added{border-color:var(--color-changes-added)}.changed-added:after{background-image:url(../img/added-icon.d6f7e47d.svg)}@media screen{[data-color-scheme=dark] .changed-added:after{background-image:url(../img/added-icon.d6f7e47d.svg)}}@media screen and (prefers-color-scheme:dark){[data-color-scheme=auto] .changed-added:after{background-image:url(../img/added-icon.d6f7e47d.svg)}}.changed-deprecated{border-color:var(--color-changes-deprecated)}.changed-deprecated:after{background-image:url(../img/deprecated-icon.015b4f17.svg)}@media screen{[data-color-scheme=dark] .changed-deprecated:after{background-image:url(../img/deprecated-icon.015b4f17.svg)}}@media screen and (prefers-color-scheme:dark){[data-color-scheme=auto] .changed-deprecated:after{background-image:url(../img/deprecated-icon.015b4f17.svg)}}.changed.link-block:after,.changed.relationships-item:after,.link-block .changed:after{margin-top:10px}.change-added,.change-removed{padding:2px 0}.change-removed{background-color:var(--color-highlight-red)}.change-added{background-color:var(--color-highlight-green)}body{color-scheme:light dark}body[data-color-scheme=light]{color-scheme:light}body[data-color-scheme=dark]{color-scheme:dark}body{--color-fill:#fff;--color-fill-secondary:#f7f7f7;--color-fill-tertiary:#f0f0f0;--color-fill-quaternary:#282828;--color-fill-blue:#00f;--color-fill-light-blue-secondary:#d1d1ff;--color-fill-gray:#ccc;--color-fill-gray-secondary:#f5f5f5;--color-fill-gray-tertiary:#f0f0f0;--color-fill-gray-quaternary:#f0f0f0;--color-fill-green-secondary:#f0fff0;--color-fill-orange-secondary:#fffaf6;--color-fill-red-secondary:#fff0f5;--color-figure-blue:#36f;--color-figure-gray:#000;--color-figure-gray-secondary:#666;--color-figure-gray-secondary-alt:#666;--color-figure-gray-tertiary:#666;--color-figure-green:green;--color-figure-light-gray:#666;--color-figure-orange:#c30;--color-figure-red:red;--color-tutorials-teal:#000;--color-article-background:var(--color-fill-tertiary);--color-article-body-background:var(--color-fill);--color-aside-deprecated:var(--color-figure-gray);--color-aside-deprecated-background:var(--color-fill-orange-secondary);--color-aside-deprecated-border:var(--color-figure-orange);--color-aside-experiment:var(--color-figure-gray);--color-aside-experiment-background:var(--color-fill-gray-secondary);--color-aside-experiment-border:var(--color-figure-light-gray);--color-aside-important:var(--color-figure-gray);--color-aside-important-background:var(--color-fill-gray-secondary);--color-aside-important-border:var(--color-figure-light-gray);--color-aside-note:var(--color-figure-gray);--color-aside-note-background:var(--color-fill-gray-secondary);--color-aside-note-border:var(--color-figure-light-gray);--color-aside-tip:var(--color-figure-gray);--color-aside-tip-background:var(--color-fill-gray-secondary);--color-aside-tip-border:var(--color-figure-light-gray);--color-aside-warning:var(--color-figure-gray);--color-aside-warning-background:var(--color-fill-red-secondary);--color-aside-warning-border:var(--color-figure-red);--color-badge-default:var(--color-figure-light-gray);--color-badge-beta:var(--color-figure-gray-tertiary);--color-badge-deprecated:var(--color-figure-orange);--color-badge-dark-default:#fff;--color-badge-dark-beta:#b0b0b0;--color-badge-dark-deprecated:#f60;--color-button-background:var(--color-fill-blue);--color-button-background-active:#36f;--color-button-background-hover:var(--color-figure-blue);--color-button-text:#fff;--color-call-to-action-background:var(--color-fill-secondary);--color-changes-added:var(--color-figure-light-gray);--color-changes-added-hover:var(--color-figure-light-gray);--color-changes-deprecated:var(--color-figure-light-gray);--color-changes-deprecated-hover:var(--color-figure-light-gray);--color-changes-modified:var(--color-figure-light-gray);--color-changes-modified-hover:var(--color-figure-light-gray);--color-changes-modified-previous-background:var(--color-fill);--color-code-background:var(--color-fill-secondary);--color-code-collapsible-background:var(--color-fill-tertiary);--color-code-collapsible-text:var(--color-figure-gray-secondary-alt);--color-code-line-highlight:rgba(51,102,255,0.08);--color-code-line-highlight-border:var(--color-figure-blue);--color-code-plain:var(--color-figure-gray);--color-dropdown-background:hsla(0,0%,100%,0.8);--color-dropdown-border:#ccc;--color-dropdown-option-text:#666;--color-dropdown-text:#000;--color-dropdown-dark-background:hsla(0,0%,100%,0.1);--color-dropdown-dark-border:hsla(0,0%,94.1%,0.2);--color-dropdown-dark-option-text:#ccc;--color-dropdown-dark-text:#fff;--color-eyebrow:var(--color-figure-gray-secondary);--color-focus-border-color:var(--color-fill-blue);--color-focus-color:rgba(0,125,250,0.6);--color-form-error:var(--color-figure-red);--color-form-error-background:var(--color-fill-red-secondary);--color-form-valid:var(--color-figure-green);--color-form-valid-background:var(--color-fill-green-secondary);--color-generic-modal-background:var(--color-fill);--color-grid:var(--color-fill-gray);--color-header-text:var(--color-figure-gray);--color-hero-eyebrow:#ccc;--color-link:var(--color-figure-blue);--color-loading-placeholder-background:var(--color-fill);--color-nav-color:#666;--color-nav-current-link:rgba(0,0,0,0.6);--color-nav-expanded:#fff;--color-nav-hierarchy-collapse-background:#f0f0f0;--color-nav-hierarchy-collapse-borders:#ccc;--color-nav-hierarchy-item-borders:#ccc;--color-nav-keyline:rgba(0,0,0,0.2);--color-nav-link-color:#000;--color-nav-link-color-hover:#36f;--color-nav-outlines:#ccc;--color-nav-rule:hsla(0,0%,94.1%,0.5);--color-nav-solid-background:#fff;--color-nav-sticking-expanded-keyline:rgba(0,0,0,0.1);--color-nav-stuck:hsla(0,0%,100%,0.9);--color-nav-uiblur-expanded:hsla(0,0%,100%,0.9);--color-nav-uiblur-stuck:hsla(0,0%,100%,0.7);--color-nav-root-subhead:var(--color-tutorials-teal);--color-nav-dark-border-top-color:hsla(0,0%,100%,0.4);--color-nav-dark-color:#b0b0b0;--color-nav-dark-current-link:hsla(0,0%,100%,0.6);--color-nav-dark-expanded:#2a2a2a;--color-nav-dark-hierarchy-collapse-background:#424242;--color-nav-dark-hierarchy-collapse-borders:#666;--color-nav-dark-hierarchy-item-borders:#424242;--color-nav-dark-keyline:rgba(66,66,66,0.95);--color-nav-dark-link-color:#fff;--color-nav-dark-link-color-hover:#09f;--color-nav-dark-outlines:#575757;--color-nav-dark-rule:#575757;--color-nav-dark-solid-background:#000;--color-nav-dark-sticking-expanded-keyline:rgba(66,66,66,0.7);--color-nav-dark-stuck:rgba(42,42,42,0.9);--color-nav-dark-uiblur-expanded:rgba(42,42,42,0.9);--color-nav-dark-uiblur-stuck:rgba(42,42,42,0.7);--color-nav-dark-root-subhead:#fff;--color-runtime-preview-background:var(--color-fill-tertiary);--color-runtime-preview-disabled-text:hsla(0,0%,40%,0.6);--color-runtime-preview-text:var(--color-figure-gray-secondary);--color-secondary-label:var(--color-figure-gray-secondary);--color-step-background:var(--color-fill-secondary);--color-step-caption:var(--color-figure-gray-secondary);--color-step-focused:var(--color-figure-light-gray);--color-step-text:var(--color-figure-gray-secondary);--color-svg-icon:#666;--color-syntax-attributes:#947100;--color-syntax-characters:#272ad8;--color-syntax-comments:#707f8c;--color-syntax-documentation-markup:#506375;--color-syntax-documentation-markup-keywords:#506375;--color-syntax-heading:#ba2da2;--color-syntax-keywords:#ad3da4;--color-syntax-marks:#000;--color-syntax-numbers:#272ad8;--color-syntax-other-class-names:#703daa;--color-syntax-other-constants:#4b21b0;--color-syntax-other-declarations:#047cb0;--color-syntax-other-function-and-method-names:#4b21b0;--color-syntax-other-instance-variables-and-globals:#703daa;--color-syntax-other-preprocessor-macros:#78492a;--color-syntax-other-type-names:#703daa;--color-syntax-param-internal-name:#404040;--color-syntax-plain-text:#000;--color-syntax-preprocessor-statements:#78492a;--color-syntax-project-class-names:#3e8087;--color-syntax-project-constants:#2d6469;--color-syntax-project-function-and-method-names:#2d6469;--color-syntax-project-instance-variables-and-globals:#3e8087;--color-syntax-project-preprocessor-macros:#78492a;--color-syntax-project-type-names:#3e8087;--color-syntax-strings:#d12f1b;--color-syntax-type-declarations:#03638c;--color-syntax-urls:#1337ff;--color-tabnav-item-border-color:var(--color-fill-gray);--color-text:var(--color-figure-gray);--color-text-background:var(--color-fill);--color-tutorial-assessments-background:var(--color-fill-secondary);--color-tutorial-background:var(--color-fill);--color-tutorial-navbar-dropdown-background:var(--color-fill);--color-tutorial-navbar-dropdown-border:var(--color-fill-gray);--color-tutorial-quiz-border-active:var(--color-figure-blue);--color-tutorials-overview-background:#161616;--color-tutorials-overview-content:#fff;--color-tutorials-overview-content-alt:#fff;--color-tutorials-overview-eyebrow:#ccc;--color-tutorials-overview-icon:#b0b0b0;--color-tutorials-overview-link:#09f;--color-tutorials-overview-navigation-link:#ccc;--color-tutorials-overview-navigation-link-active:#fff;--color-tutorials-overview-navigation-link-hover:#fff;--color-tutorial-hero-text:#fff;--color-tutorial-hero-background:#000;--color-navigator-item-hover:rgba(0,0,255,0.05)}@media screen{body[data-color-scheme=dark]{--color-fill:#000;--color-fill-secondary:#161616;--color-fill-tertiary:#2a2a2a;--color-fill-blue:#06f;--color-fill-light-blue-secondary:#004ec4;--color-fill-gray:#575757;--color-fill-gray-secondary:#222;--color-fill-gray-tertiary:#424242;--color-fill-gray-quaternary:#424242;--color-fill-green-secondary:#030;--color-fill-orange-secondary:#472400;--color-fill-red-secondary:#300;--color-figure-blue:#09f;--color-figure-gray:#fff;--color-figure-gray-secondary:#ccc;--color-figure-gray-secondary-alt:#b0b0b0;--color-figure-gray-tertiary:#b0b0b0;--color-figure-green:#090;--color-figure-light-gray:#b0b0b0;--color-figure-orange:#f60;--color-figure-red:#f33;--color-tutorials-teal:#fff;--color-article-body-background:#111;--color-badge-default:var(--color-badge-dark-default);--color-button-background-active:#06f;--color-code-line-highlight:rgba(0,153,255,0.08);--color-dropdown-background:var(--color-dropdown-dark-background);--color-dropdown-border:var(--color-dropdown-dark-border);--color-dropdown-option-text:var(--color-dropdown-dark-option-text);--color-dropdown-text:var(--color-dropdown-dark-text);--color-nav-color:var(--color-nav-dark-color);--color-nav-current-link:var(--color-nav-dark-current-link);--color-nav-expanded:var(--color-nav-dark-expanded);--color-nav-hierarchy-collapse-background:var(--color-nav-dark-hierarchy-collapse-background);--color-nav-hierarchy-collapse-borders:var(--color-nav-dark-hierarchy-collapse-borders);--color-nav-hierarchy-item-borders:var(--color-nav-dark-hierarchy-item-borders);--color-nav-keyline:var(--color-nav-dark-keyline);--color-nav-link-color:var(--color-nav-dark-link-color);--color-nav-link-color-hover:var(--color-nav-dark-link-color-hover);--color-nav-outlines:var(--color-nav-dark-outlines);--color-nav-rule:var(--color-nav-dark-rule);--color-nav-solid-background:var(--color-nav-dark-solid-background);--color-nav-sticking-expanded-keyline:var(--color-nav-dark-sticking-expanded-keyline);--color-nav-stuck:var(--color-nav-dark-stuck);--color-nav-uiblur-expanded:var(--color-nav-dark-uiblur-expanded);--color-nav-uiblur-stuck:var(--color-nav-dark-uiblur-stuck);--color-runtime-preview-disabled-text:hsla(0,0%,80%,0.6);--color-syntax-attributes:#cc9768;--color-syntax-characters:#d9c97c;--color-syntax-comments:#7f8c98;--color-syntax-documentation-markup:#7f8c98;--color-syntax-documentation-markup-keywords:#a3b1bf;--color-syntax-keywords:#ff7ab2;--color-syntax-marks:#fff;--color-syntax-numbers:#d9c97c;--color-syntax-other-class-names:#dabaff;--color-syntax-other-constants:#a7ebdd;--color-syntax-other-declarations:#4eb0cc;--color-syntax-other-function-and-method-names:#b281eb;--color-syntax-other-instance-variables-and-globals:#b281eb;--color-syntax-other-preprocessor-macros:#ffa14f;--color-syntax-other-type-names:#dabaff;--color-syntax-param-internal-name:#bfbfbf;--color-syntax-plain-text:#fff;--color-syntax-preprocessor-statements:#ffa14f;--color-syntax-project-class-names:#acf2e4;--color-syntax-project-constants:#78c2b3;--color-syntax-project-function-and-method-names:#78c2b3;--color-syntax-project-instance-variables-and-globals:#78c2b3;--color-syntax-project-preprocessor-macros:#ffa14f;--color-syntax-project-type-names:#acf2e4;--color-syntax-strings:#ff8170;--color-syntax-type-declarations:#6bdfff;--color-syntax-urls:#69f;--color-tutorial-background:var(--color-fill-tertiary);--color-navigator-item-hover:rgba(0,102,255,0.5)}}@media screen and (prefers-color-scheme:dark){body[data-color-scheme=auto]{--color-fill:#000;--color-fill-secondary:#161616;--color-fill-tertiary:#2a2a2a;--color-fill-blue:#06f;--color-fill-light-blue-secondary:#004ec4;--color-fill-gray:#575757;--color-fill-gray-secondary:#222;--color-fill-gray-tertiary:#424242;--color-fill-gray-quaternary:#424242;--color-fill-green-secondary:#030;--color-fill-orange-secondary:#472400;--color-fill-red-secondary:#300;--color-figure-blue:#09f;--color-figure-gray:#fff;--color-figure-gray-secondary:#ccc;--color-figure-gray-secondary-alt:#b0b0b0;--color-figure-gray-tertiary:#b0b0b0;--color-figure-green:#090;--color-figure-light-gray:#b0b0b0;--color-figure-orange:#f60;--color-figure-red:#f33;--color-tutorials-teal:#fff;--color-article-body-background:#111;--color-badge-default:var(--color-badge-dark-default);--color-button-background-active:#06f;--color-code-line-highlight:rgba(0,153,255,0.08);--color-dropdown-background:var(--color-dropdown-dark-background);--color-dropdown-border:var(--color-dropdown-dark-border);--color-dropdown-option-text:var(--color-dropdown-dark-option-text);--color-dropdown-text:var(--color-dropdown-dark-text);--color-nav-color:var(--color-nav-dark-color);--color-nav-current-link:var(--color-nav-dark-current-link);--color-nav-expanded:var(--color-nav-dark-expanded);--color-nav-hierarchy-collapse-background:var(--color-nav-dark-hierarchy-collapse-background);--color-nav-hierarchy-collapse-borders:var(--color-nav-dark-hierarchy-collapse-borders);--color-nav-hierarchy-item-borders:var(--color-nav-dark-hierarchy-item-borders);--color-nav-keyline:var(--color-nav-dark-keyline);--color-nav-link-color:var(--color-nav-dark-link-color);--color-nav-link-color-hover:var(--color-nav-dark-link-color-hover);--color-nav-outlines:var(--color-nav-dark-outlines);--color-nav-rule:var(--color-nav-dark-rule);--color-nav-solid-background:var(--color-nav-dark-solid-background);--color-nav-sticking-expanded-keyline:var(--color-nav-dark-sticking-expanded-keyline);--color-nav-stuck:var(--color-nav-dark-stuck);--color-nav-uiblur-expanded:var(--color-nav-dark-uiblur-expanded);--color-nav-uiblur-stuck:var(--color-nav-dark-uiblur-stuck);--color-runtime-preview-disabled-text:hsla(0,0%,80%,0.6);--color-syntax-attributes:#cc9768;--color-syntax-characters:#d9c97c;--color-syntax-comments:#7f8c98;--color-syntax-documentation-markup:#7f8c98;--color-syntax-documentation-markup-keywords:#a3b1bf;--color-syntax-keywords:#ff7ab2;--color-syntax-marks:#fff;--color-syntax-numbers:#d9c97c;--color-syntax-other-class-names:#dabaff;--color-syntax-other-constants:#a7ebdd;--color-syntax-other-declarations:#4eb0cc;--color-syntax-other-function-and-method-names:#b281eb;--color-syntax-other-instance-variables-and-globals:#b281eb;--color-syntax-other-preprocessor-macros:#ffa14f;--color-syntax-other-type-names:#dabaff;--color-syntax-param-internal-name:#bfbfbf;--color-syntax-plain-text:#fff;--color-syntax-preprocessor-statements:#ffa14f;--color-syntax-project-class-names:#acf2e4;--color-syntax-project-constants:#78c2b3;--color-syntax-project-function-and-method-names:#78c2b3;--color-syntax-project-instance-variables-and-globals:#78c2b3;--color-syntax-project-preprocessor-macros:#ffa14f;--color-syntax-project-type-names:#acf2e4;--color-syntax-strings:#ff8170;--color-syntax-type-declarations:#6bdfff;--color-syntax-urls:#69f;--color-tutorial-background:var(--color-fill-tertiary);--color-navigator-item-hover:rgba(0,102,255,0.5)}}#main{outline-style:none}:root{--app-height:100vh}[data-v-6f639c59] :focus:not(input):not(textarea):not(select){outline:none}.fromkeyboard[data-v-6f639c59] :focus:not(input):not(textarea):not(select){outline:4px solid var(--color-focus-color);outline-offset:1px}#app[data-v-6f639c59]{display:grid;grid-template-rows:auto 1fr auto;min-height:100%}#app[data-v-6f639c59]>*{min-width:0}#app.hascustomheader[data-v-6f639c59]{grid-template-rows:auto auto 1fr auto}.container[data-v-790053de]{margin-left:auto;margin-right:auto;width:980px;outline-style:none;margin-top:92px;margin-bottom:140px}@media only screen and (max-width:1250px){.container[data-v-790053de]{width:692px}}@media only screen and (max-width:735px){.container[data-v-790053de]{width:87.5%}}.error-content[data-v-790053de]{box-sizing:border-box;width:502px;margin-left:auto;margin-right:auto;margin-bottom:54px}@media only screen and (max-width:1250px){.error-content[data-v-790053de]{width:420px;margin-bottom:45px}}@media only screen and (max-width:735px){.error-content[data-v-790053de]{max-width:330px;width:auto;margin-bottom:35px}}.title[data-v-790053de]{text-align:center;font-size:2.82353rem;line-height:1.08333;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif}@media only screen and (max-width:1250px){.title[data-v-790053de]{font-size:2.35294rem;line-height:1.1;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif}}@media only screen and (max-width:735px){.title[data-v-790053de]{font-size:1.88235rem;line-height:1.125;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif}} \ No newline at end of file diff --git a/docs/docc/Reducer.doccarchive/css/topic.ee15af52.css b/docs/docc/Reducer.doccarchive/css/topic.ee15af52.css deleted file mode 100644 index 82d8849..0000000 --- a/docs/docc/Reducer.doccarchive/css/topic.ee15af52.css +++ /dev/null @@ -1,9 +0,0 @@ -/*! - * This source file is part of the Swift.org open source project - * - * Copyright (c) 2021 Apple Inc. and the Swift project authors - * Licensed under Apache License v2.0 with Runtime Library Exception - * - * See https://swift.org/LICENSE.txt for license information - * See https://swift.org/CONTRIBUTORS.txt for Swift project authors - */.nav-title-content[data-v-60ea3af8]{max-width:100%}.title[data-v-60ea3af8]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;display:inline-block;vertical-align:top;max-width:296px}@media only screen and (max-width:1023px){.title[data-v-60ea3af8]{max-width:205px}}@media only screen and (max-width:767px){.title[data-v-60ea3af8]{flex-basis:fill;display:initial;vertical-align:initial;max-width:none}}.subhead[data-v-60ea3af8]{color:var(--color-nav-root-subhead)}.theme-dark .subhead[data-v-60ea3af8]{color:var(--color-nav-dark-root-subhead)}.mobile-dropdown[data-v-154acfbd]{box-sizing:border-box}.nav--in-breakpoint-range .mobile-dropdown[data-v-154acfbd]{padding-left:.23529rem;padding-right:.23529rem}.mobile-dropdown ul[data-v-154acfbd]{list-style:none}.mobile-dropdown .option[data-v-154acfbd]{cursor:pointer;font-size:.70588rem;padding:.5rem 0;display:block;text-decoration:none;color:inherit}.mobile-dropdown .option[data-v-154acfbd]:focus{outline-offset:0}.mobile-dropdown .option.depth1[data-v-154acfbd]{padding-left:.47059rem}.active[data-v-154acfbd],.tutorial.router-link-active[data-v-154acfbd]{font-weight:600}.active[data-v-154acfbd]:focus,.tutorial.router-link-active[data-v-154acfbd]:focus{outline:none}.chapter-list[data-v-154acfbd]:not(:first-child){margin-top:1rem}.chapter-name[data-v-154acfbd],.tutorial[data-v-154acfbd]{padding:.5rem 0;font-size:1rem;line-height:1.47059;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif}.section-list[data-v-154acfbd],.tutorial-list[data-v-154acfbd]{padding:0 .58824rem}.chapter-list:last-child .tutorial-list[data-v-154acfbd]:last-child{padding-bottom:10em}.chapter-list[data-v-154acfbd]{display:inline-block}.form-element[data-v-998803d8]{position:relative}.form-dropdown[data-v-998803d8]{font-size:1rem;line-height:1.23529;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;display:block;box-sizing:border-box;width:100%;height:3.3em;color:var(--color-dropdown-text);padding:1.11765rem 2.35294rem 0 .94118rem;text-align:left;border:1px solid var(--color-dropdown-border);border-radius:4px;background-clip:padding-box;margin-bottom:.82353rem;-webkit-appearance:none;-moz-appearance:none;appearance:none;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;min-height:32px}.form-dropdown[data-v-998803d8]:focus{box-shadow:0 0 0 4px var(--color-focus-color);outline:none;border-color:var(--color-focus-border-color)}.form-dropdown.no-eyebrow[data-v-998803d8]{padding-top:0}.form-dropdown[data-v-998803d8]:-moz-focusring{color:transparent;text-shadow:0 0 0 var(--color-dropdown-text)}.form-dropdown[data-v-998803d8]::-ms-expand{opacity:0}.form-dropdown~.form-icon[data-v-998803d8]{position:absolute;display:block;pointer-events:none;fill:var(--color-figure-gray-tertiary);right:14px;width:13px;height:auto;top:50%;transform:translateY(-50%)}.is-open .form-dropdown~.form-icon[data-v-998803d8]{transform:translateY(-50%) scale(-1)}@media only screen and (max-width:735px){.form-dropdown~.form-icon[data-v-998803d8]{right:14px}}.form-dropdown~.form-label[data-v-998803d8]{font-size:.70588rem;line-height:1.75;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;position:absolute;top:.47059rem;left:17px;color:var(--color-figure-gray-secondary);pointer-events:none;padding:0;z-index:1}.form-dropdown[data-v-998803d8] option{color:var(--color-dropdown-text)}.form-dropdown-selectnone[data-v-998803d8]{color:transparent}.form-dropdown-selectnone~.form-label[data-v-998803d8]{font-size:1rem;line-height:1.23529;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;top:19px;left:17px;color:var(--color-figure-gray-tertiary)}.form-dropdown-selectnone[data-v-998803d8]:-moz-focusring{text-shadow:none}.form-dropdown-selectnone[data-v-998803d8]::-ms-value{display:none}.theme-dark .form-dropdown[data-v-998803d8]{color:var(--color-dropdown-dark-text);background-color:var(--color-dropdown-dark-background);border-color:var(--color-dropdown-dark-border)}.theme-dark .form-dropdown~.form-label[data-v-998803d8]{color:#ccc}.theme-dark .form-dropdown[data-v-998803d8]:-moz-focusring{color:transparent;text-shadow:0 0 0 var(--color-dropdown-dark-text)}.theme-dark .form-dropdown.form-dropdown-selectnone[data-v-998803d8]{color:transparent}.theme-dark .form-dropdown.form-dropdown-selectnone[data-v-998803d8]:-moz-focusring{text-shadow:none}.theme-dark .form-dropdown-selectnone~.form-label[data-v-998803d8]{color:#b0b0b0}.dropdown-small[data-v-12dd746a]{height:30px;display:flex;align-items:center;position:relative;background:var(--color-fill)}.dropdown-small .form-dropdown-toggle[data-v-12dd746a]{line-height:1.5;font-size:12px;padding-top:0;padding-bottom:0;padding-left:20px;min-height:unset;height:30px;display:flex;align-items:center}.dropdown-small .form-dropdown-toggle[data-v-12dd746a]:focus{box-shadow:none;border-color:var(--color-dropdown-border)}.fromkeyboard .dropdown-small .form-dropdown-toggle[data-v-12dd746a]:focus{box-shadow:0 0 0 2px var(--color-focus-color);outline:none;border-color:var(--color-focus-border-color)}.form-dropdown-toggle[data-v-12dd746a]{margin:0}.is-open .form-dropdown-toggle[data-v-12dd746a]{border-radius:4px 4px 0 0;border-bottom:none;padding-bottom:1px}.fromkeyboard .is-open .form-dropdown-toggle[data-v-12dd746a]{box-shadow:1px -1px 0 1px var(--color-focus-color),-1px -1px 0 1px var(--color-focus-color);border-color:var(--color-focus-border-color)}.form-dropdown-title[data-v-12dd746a]{margin:0;padding:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.dropdown-custom[data-v-12dd746a]{border-radius:4px}.dropdown-custom.is-open[data-v-12dd746a]{border-radius:4px 4px 0 0}.dropdown-custom[data-v-12dd746a] .form-dropdown-content{background:var(--color-fill);position:absolute;right:0;left:0;top:100%;border-bottom-left-radius:4px;border-bottom-right-radius:4px;border:1px solid var(--color-dropdown-border);border-top:none;display:none;overflow-y:auto}.dropdown-custom[data-v-12dd746a] .form-dropdown-content.is-open{display:block}.fromkeyboard .dropdown-custom[data-v-12dd746a] .form-dropdown-content.is-open{box-shadow:1px 1px 0 1px var(--color-focus-color),-1px 1px 0 1px var(--color-focus-color);border-color:var(--color-focus-border-color);border-top-color:transparent}.nav .dropdown-custom[data-v-12dd746a] .form-dropdown-content{max-height:calc(100vh - 116px - 3.05882rem)}.nav--is-sticking.nav .dropdown-custom[data-v-12dd746a] .form-dropdown-content{max-height:calc(100vh - 3.05882rem - 72px)}.dropdown-custom[data-v-12dd746a] .options{list-style:none;margin:0;padding:0 0 20px}.dropdown-custom[data-v-12dd746a] .option{cursor:pointer;padding:5px 20px;font-size:12px;line-height:20px;outline:none}.dropdown-custom[data-v-12dd746a] .option:hover{background-color:var(--color-fill-tertiary)}.dropdown-custom[data-v-12dd746a] .option.option-active{font-weight:600}.fromkeyboard .dropdown-custom[data-v-12dd746a] .option:hover{background-color:transparent}.fromkeyboard .dropdown-custom[data-v-12dd746a] .option:focus{background-color:var(--color-fill-tertiary);outline:none}.tutorial-dropdown[data-v-4a151342]{grid-column:3}.section-tracker[data-v-4a151342]{font-size:.70588rem;line-height:1.33333;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;color:var(--color-figure-gray-secondary);margin-left:15px}.tutorial-dropdown[data-v-78dc103f]{grid-column:1/2}.tutorial-dropdown .options[data-v-78dc103f]{padding-top:1rem;padding-bottom:0}.tutorial-dropdown .option[data-v-78dc103f]{padding:5px 20px 5px 30px}.chapter-list[data-v-78dc103f]{padding-bottom:20px}.chapter-name[data-v-78dc103f]{margin:0 20px 5px 20px;line-height:normal;color:var(--color-figure-gray-secondary)}.chevron-icon[data-v-26e19f17]{padding:0;color:var(--color-nav-outlines);grid-column:2;height:20px;width:20px;margin:0 4px}@media only screen and (min-width:768px){.nav[data-v-26e19f17] .nav-content{display:grid;grid-template-columns:auto auto 3fr;align-items:center}.nav[data-v-26e19f17] .nav-menu{padding:0;grid-column:3/5}.nav[data-v-26e19f17] .nav-menu-item{margin:0}}.dropdown-container[data-v-26e19f17]{height:3.05882rem;display:grid;grid-template-columns:minmax(230px,285px) auto minmax(230px,1fr);align-items:center}@media only screen and (max-width:1023px){.dropdown-container[data-v-26e19f17]{grid-template-columns:minmax(173px,216px) auto minmax(173px,1fr)}}.separator[data-v-26e19f17]{height:20px;border-right:1px solid;border-color:var(--color-nav-outlines);margin:0 20px;grid-column:2}.mobile-dropdown-container[data-v-26e19f17],.nav--in-breakpoint-range.nav .dropdown-container[data-v-26e19f17],.nav--in-breakpoint-range.nav .separator[data-v-26e19f17]{display:none}.nav--in-breakpoint-range.nav .mobile-dropdown-container[data-v-26e19f17]{display:block}.nav--in-breakpoint-range.nav[data-v-26e19f17] .nav-title{grid-area:title}.nav--in-breakpoint-range.nav[data-v-26e19f17] .pre-title{display:none}.nav[data-v-26e19f17] .nav-title{grid-column:1;width:90%;padding-top:0}.primary-dropdown[data-v-26e19f17],.secondary-dropdown[data-v-26e19f17]{background:var(--color-tutorial-navbar-dropdown-background);border-color:var(--color-tutorial-navbar-dropdown-border)}.primary-dropdown[data-v-26e19f17] .form-dropdown,.primary-dropdown[data-v-26e19f17] .form-dropdown:focus,.secondary-dropdown[data-v-26e19f17] .form-dropdown,.secondary-dropdown[data-v-26e19f17] .form-dropdown:focus{border-color:var(--color-tutorial-navbar-dropdown-border)}.primary-dropdown[data-v-26e19f17] .options,.secondary-dropdown[data-v-26e19f17] .options{background:var(--color-tutorial-navbar-dropdown-background);border-color:var(--color-tutorial-navbar-dropdown-border)}.replay-button[data-v-59608016]{display:flex;align-items:center;justify-content:center;cursor:pointer;visibility:hidden;margin-top:.5rem;-webkit-tap-highlight-color:transparent}.replay-button.visible[data-v-59608016]{visibility:visible}.replay-button svg.replay-icon[data-v-59608016]{height:12px;width:12px;margin-left:.3em}[data-v-1b5cc854] img,[data-v-1b5cc854] video{display:block;margin-left:auto;margin-right:auto;-o-object-fit:contain;object-fit:contain;max-width:100%}[data-v-3cfe1c35] .code-listing+*,[data-v-3cfe1c35] aside+*,[data-v-3cfe1c35] h2+*,[data-v-3cfe1c35] h3+*,[data-v-3cfe1c35] ol+*,[data-v-3cfe1c35] p+*,[data-v-3cfe1c35] ul+*{margin-top:20px}[data-v-3cfe1c35] ol ol,[data-v-3cfe1c35] ol ul,[data-v-3cfe1c35] ul ol,[data-v-3cfe1c35] ul ul{margin-top:0}[data-v-3cfe1c35] h2{font-size:1.88235rem;line-height:1.25;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif}@media only screen and (max-width:1250px){[data-v-3cfe1c35] h2{font-size:1.64706rem;line-height:1.28571;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif}}@media only screen and (max-width:735px){[data-v-3cfe1c35] h2{font-size:1.41176rem;line-height:1.33333;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif}}[data-v-3cfe1c35] h3{font-size:1.41176rem;line-height:1.16667;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif}@media only screen and (max-width:1250px){[data-v-3cfe1c35] h3{font-size:1.23529rem;line-height:1.19048;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif}}[data-v-3cfe1c35] .code-listing{background:var(--color-code-background);border-color:var(--colors-grid,var(--color-grid));border-style:solid;border-width:1px}[data-v-3cfe1c35] .code-listing pre{font-size:.70588rem;line-height:1.83333;font-weight:400;font-family:Menlo,monospace;padding:20px 0}.columns[data-v-30edf911]{display:grid;grid-template-rows:repeat(2,auto)}.columns.cols-2[data-v-30edf911]{gap:20px 8.33333%;grid-template-columns:repeat(2,1fr)}.columns.cols-3[data-v-30edf911]{gap:20px 4.16667%;grid-template-columns:repeat(3,1fr)}.asset[data-v-30edf911]{align-self:end;grid-row:1}.content[data-v-30edf911]{grid-row:2}@media only screen and (max-width:735px){.columns.cols-2[data-v-30edf911],.columns.cols-3[data-v-30edf911]{grid-template-columns:unset}.asset[data-v-30edf911],.content[data-v-30edf911]{grid-row:auto}}.content-and-media[data-v-3fa44f9e]{display:flex}.content-and-media.media-leading[data-v-3fa44f9e]{flex-direction:row-reverse}.content-and-media.media-trailing[data-v-3fa44f9e]{flex-direction:row}@media only screen and (min-width:736px){.content-and-media[data-v-3fa44f9e]{align-items:center;justify-content:center}}.content[data-v-3fa44f9e]{width:62.5%}.asset[data-v-3fa44f9e]{width:29.16667%}.media-leading .asset[data-v-3fa44f9e]{margin-right:8.33333%}.media-trailing .asset[data-v-3fa44f9e]{margin-left:8.33333%}@media only screen and (max-width:735px){.content-and-media.media-leading[data-v-3fa44f9e],.content-and-media.media-trailing[data-v-3fa44f9e]{flex-direction:column}.asset[data-v-3fa44f9e],.content[data-v-3fa44f9e]{width:100%}.media-leading .asset[data-v-3fa44f9e],.media-trailing .asset[data-v-3fa44f9e]{margin:20px 0 0 0}}.group[id][data-v-1f2be54b]{margin-top:20px;padding-top:20px}[data-v-1f2be54b] img,[data-v-1f2be54b] video{display:block;margin:0 auto;max-width:100%}.layout+[data-v-4d5a806e]{margin-top:40px}@media only screen and (max-width:735px){.layout[data-v-4d5a806e]:first-child>:not(.group[id]){margin-top:40px}}.body[data-v-6499e2f2]{background:var(--colors-text-background,var(--color-article-body-background));margin-left:auto;margin-right:auto;width:980px;border-radius:10px;transform:translateY(-120px)}@media only screen and (max-width:1250px){.body[data-v-6499e2f2]{width:692px}}@media only screen and (max-width:735px){.body[data-v-6499e2f2]{width:87.5%;border-radius:0;transform:none}}.body[data-v-6499e2f2]~*{margin-top:-40px}.body-content[data-v-6499e2f2]{padding:40px 8.33333% 80px 8.33333%}@media only screen and (max-width:735px){.body-content[data-v-6499e2f2]{padding:0 0 40px 0}}.call-to-action[data-v-2016b288]{padding:65px 0;background:var(--color-call-to-action-background)}.theme-dark .call-to-action[data-v-2016b288]{--color-call-to-action-background:#424242}.row[data-v-2016b288]{margin-left:auto;margin-right:auto;width:980px;display:flex;align-items:center}@media only screen and (max-width:1250px){.row[data-v-2016b288]{width:692px}}@media only screen and (max-width:735px){.row[data-v-2016b288]{width:87.5%}}[data-v-2016b288] img,[data-v-2016b288] video{max-height:560px}h2[data-v-2016b288]{font-size:1.88235rem;line-height:1.25;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif}@media only screen and (max-width:1250px){h2[data-v-2016b288]{font-size:1.64706rem;line-height:1.28571;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif}}@media only screen and (max-width:735px){h2[data-v-2016b288]{font-size:1.41176rem;line-height:1.33333;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif}}.label[data-v-2016b288]{display:block;font-size:1.23529rem;line-height:1.19048;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;margin-bottom:.4em;color:var(--color-eyebrow)}@media only screen and (max-width:735px){.label[data-v-2016b288]{font-size:1.11765rem;line-height:1.21053;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif}}.content[data-v-2016b288]{margin-bottom:1.5rem}.right-column[data-v-2016b288]{margin-left:auto}@media only screen and (max-width:735px){.row[data-v-2016b288]{display:block}.col+.col[data-v-2016b288]{margin-top:40px}}@media only screen and (max-width:735px){.call-to-action[data-v-426a965c]{margin-top:0}}.headline[data-v-1898f592]{margin-bottom:.8em}.heading[data-v-1898f592]{font-size:2.82353rem;line-height:1.08333;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;color:var(--color-header-text)}@media only screen and (max-width:1250px){.heading[data-v-1898f592]{font-size:2.35294rem;line-height:1.1;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif}}@media only screen and (max-width:735px){.heading[data-v-1898f592]{font-size:1.88235rem;line-height:1.125;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif}}.dark .heading[data-v-1898f592]{color:#fff}.eyebrow[data-v-1898f592]{font-size:1.41176rem;line-height:1.16667;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;display:block;margin-bottom:.4em;color:var(--color-eyebrow)}@media only screen and (max-width:1250px){.eyebrow[data-v-1898f592]{font-size:1.23529rem;line-height:1.19048;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif}}.generic-modal[data-v-ea628b36]{position:fixed;top:0;left:0;right:0;bottom:0;margin:0;z-index:11000;display:flex;align-items:center;justify-content:center;flex-wrap:wrap;background:none;overflow:auto}.modal-fullscreen[data-v-ea628b36]{align-items:stretch}.modal-fullscreen .container[data-v-ea628b36]{margin:0;flex:1;width:100%;height:100%;padding-top:env(safe-area-inset-top);padding-right:env(safe-area-inset-right);padding-bottom:env(safe-area-inset-bottom);padding-left:env(safe-area-inset-left)}.modal-standard[data-v-ea628b36]{padding:20px}.modal-standard .container[data-v-ea628b36]{padding:60px;border-radius:4px}@media screen{[data-color-scheme=dark] .modal-standard .container[data-v-ea628b36]{background:#1d1d1f}}@media screen and (prefers-color-scheme:dark){[data-color-scheme=auto] .modal-standard .container[data-v-ea628b36]{background:#1d1d1f}}@media only screen and (max-width:735px){.modal-standard[data-v-ea628b36]{padding:0;align-items:stretch}.modal-standard .container[data-v-ea628b36]{margin:20px 0 0;padding:50px 30px;flex:1;width:100%;border-bottom-left-radius:0;border-bottom-right-radius:0}}.backdrop[data-v-ea628b36]{overflow:auto;background:rgba(0,0,0,.4);-webkit-overflow-scrolling:touch;width:100%;height:100%;position:fixed}.container[data-v-ea628b36]{margin-left:auto;margin-right:auto;width:980px;background:var(--colors-generic-modal-background,var(--color-generic-modal-background));z-index:1;position:relative;overflow:auto;max-width:100%}@media only screen and (max-width:1250px){.container[data-v-ea628b36]{width:692px}}@media only screen and (max-width:735px){.container[data-v-ea628b36]{width:87.5%}}.close[data-v-ea628b36]{position:absolute;z-index:9999;top:22px;left:22px;width:30px;height:30px;color:#666;cursor:pointer;background:none;border:0;display:flex;align-items:center}.close .close-icon[data-v-ea628b36]{fill:currentColor;width:100%;height:100%}.theme-dark .container[data-v-ea628b36]{background:#000}.theme-dark .container .close[data-v-ea628b36]{color:#b0b0b0}.theme-code .container[data-v-ea628b36]{background-color:var(--background,var(--color-code-background))}.metadata[data-v-2fa6f125]{display:flex}.item[data-v-2fa6f125]{font-size:.70588rem;line-height:1.33333;font-weight:600;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;display:flex;flex-direction:column;justify-content:flex-end;align-items:center;border-right:1px solid #fff;padding:0 27.5px}@media only screen and (max-width:735px){.item[data-v-2fa6f125]{font-size:.64706rem;line-height:1.63636;font-weight:600;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;padding:0 8px}}.item[data-v-2fa6f125]:first-of-type{padding-left:0}.item[data-v-2fa6f125]:last-of-type{border:none}@media only screen and (max-width:735px){.item[data-v-2fa6f125]:last-of-type{padding-right:0}}.content[data-v-2fa6f125]{color:#fff}.icon[data-v-2fa6f125]{font-size:2.82353rem;line-height:1.08333;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif}@media only screen and (max-width:1250px){.icon[data-v-2fa6f125]{font-size:2.35294rem;line-height:1.1;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif}}@media only screen and (max-width:735px){.icon[data-v-2fa6f125]{font-size:1.88235rem;line-height:1.125;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif}}.small-icon[data-v-2fa6f125]{width:1em;height:1em;margin-left:.2rem}.small-icon.xcode-icon[data-v-2fa6f125]{width:.8em;height:.8em}.content-link[data-v-2fa6f125]{display:flex;align-items:center}a[data-v-2fa6f125]{color:var(--colors-link,var(--color-tutorials-overview-link))}.duration[data-v-2fa6f125]{display:flex;align-items:baseline;font-size:2.35294rem;line-height:1;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;line-height:1.8rem}@media only screen and (max-width:735px){.duration[data-v-2fa6f125]{font-size:1.64706rem;line-height:1;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;line-height:1.3rem}}.minutes[data-v-2fa6f125]{display:inline-block;font-size:1.64706rem;line-height:1;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;line-height:1.3rem}@media only screen and (max-width:735px){.minutes[data-v-2fa6f125]{font-size:1rem;line-height:1.23529;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;line-height:.8rem}}.item-large-icon[data-v-2fa6f125]{height:2.3rem;max-width:100%}@media only screen and (max-width:735px){.item-large-icon[data-v-2fa6f125]{height:1.5rem;max-width:100%}}.bottom[data-v-2fa6f125]{margin-top:13px}@media only screen and (max-width:735px){.bottom[data-v-2fa6f125]{margin-top:8px}}.hero[data-v-cb87b2d0]{color:var(--color-tutorial-hero-text);position:relative}.bg[data-v-cb87b2d0],.hero[data-v-cb87b2d0]{background-color:var(--color-tutorial-hero-background)}.bg[data-v-cb87b2d0]{background-position:top;background-repeat:no-repeat;background-size:cover;content:"";height:100%;left:0;opacity:.3;position:absolute;top:0;width:100%}.row[data-v-cb87b2d0]{margin-left:auto;margin-right:auto;width:980px;padding:80px 0}@media only screen and (max-width:1250px){.row[data-v-cb87b2d0]{width:692px}}@media only screen and (max-width:735px){.row[data-v-cb87b2d0]{width:87.5%}}.col[data-v-cb87b2d0]{z-index:1}[data-v-cb87b2d0] .eyebrow{font-size:1.41176rem;line-height:1.16667;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;color:var(--color-hero-eyebrow)}@media only screen and (max-width:1250px){[data-v-cb87b2d0] .eyebrow{font-size:1.23529rem;line-height:1.19048;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif}}.headline[data-v-cb87b2d0]{font-size:2.82353rem;line-height:1.08333;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;margin-bottom:2rem}@media only screen and (max-width:1250px){.headline[data-v-cb87b2d0]{font-size:2.35294rem;line-height:1.1;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif}}@media only screen and (max-width:735px){.headline[data-v-cb87b2d0]{font-size:1.88235rem;line-height:1.125;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif}}.intro[data-v-cb87b2d0]{font-size:1.23529rem;line-height:1.38095;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif}@media only screen and (max-width:735px){.intro[data-v-cb87b2d0]{font-size:1.11765rem;line-height:1.42105;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif}}.content+p[data-v-cb87b2d0]{margin-top:.8em}@media only screen and (max-width:735px){.content+p[data-v-cb87b2d0]{margin-top:8px}}.call-to-action[data-v-cb87b2d0]{display:flex;align-items:center}.call-to-action .cta-icon[data-v-cb87b2d0]{margin-left:.4rem;width:1em;height:1em}.metadata[data-v-cb87b2d0]{margin-top:2rem}.video-asset[data-v-cb87b2d0]{display:grid;height:100vh;margin:0;place-items:center center}.video-asset[data-v-cb87b2d0] video{max-width:1280px;min-width:320px;width:100%}@media only screen and (max-width:735px){.headline[data-v-cb87b2d0]{margin-bottom:19px}}.tutorial-hero[data-v-35a9482f]{margin-bottom:80px}@media only screen and (max-width:735px){.tutorial-hero[data-v-35a9482f]{margin-bottom:0}}.title[data-v-8ec95972]{font-size:.70588rem;line-height:1.33333;color:var(--colors-secondary-label,var(--color-secondary-label))}.title[data-v-8ec95972],.title[data-v-455ff2a6]{font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif}.title[data-v-455ff2a6]{font-size:1.11765rem;line-height:1.21053;color:var(--colors-header-text,var(--color-header-text));margin:25px 0}.question-content[data-v-455ff2a6] code{font-size:.76471rem;line-height:1.84615;font-weight:400;font-family:Menlo,monospace}.choices[data-v-455ff2a6]{display:flex;flex-direction:column;padding:0;list-style:none;margin:25px 0}.choice[data-v-455ff2a6]{font-size:.82353rem;line-height:1.42857;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;flex:1;border-radius:4px;margin:8px 0;padding:1.5rem 40px;cursor:pointer;background:var(--colors-text-background,var(--color-text-background));display:flex;flex-direction:column;justify-content:center;border-width:1px;border-style:solid;border-color:var(--colors-grid,var(--color-grid));position:relative}.choice[data-v-455ff2a6] img{max-height:23.52941rem}.choice[data-v-455ff2a6]:first-of-type{margin-top:0}.choice[data-v-455ff2a6] code{font-size:.76471rem;line-height:1.84615;font-weight:400;font-family:Menlo,monospace}.controls[data-v-455ff2a6]{text-align:center;margin-bottom:40px}.controls .button-cta[data-v-455ff2a6]{margin:.5rem;margin-top:0;padding:.3rem 3rem;min-width:8rem}input[type=radio][data-v-455ff2a6]{position:absolute;width:100%;left:0;height:100%;opacity:0;z-index:-1}.active[data-v-455ff2a6]{border-color:var(--color-tutorial-quiz-border-active);box-shadow:0 0 0 4px var(--color-focus-color);outline:none}.active [data-v-455ff2a6]{color:var(--colors-text,var(--color-text))}.correct[data-v-455ff2a6]{background:var(--color-form-valid-background);border-color:var(--color-form-valid)}.correct .choice-icon[data-v-455ff2a6]{fill:var(--color-form-valid)}.incorrect[data-v-455ff2a6]{background:var(--color-form-error-background);border-color:var(--color-form-error)}.incorrect .choice-icon[data-v-455ff2a6]{fill:var(--color-form-error)}.correct[data-v-455ff2a6],.incorrect[data-v-455ff2a6]{position:relative}.correct .choice-icon[data-v-455ff2a6],.incorrect .choice-icon[data-v-455ff2a6]{position:absolute;top:11px;left:10px;font-size:20px;width:1.05em}.disabled[data-v-455ff2a6]{pointer-events:none}.answer[data-v-455ff2a6]{margin:.5rem 1.5rem .5rem 0;font-size:.70588rem;line-height:1.33333;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif}.answer[data-v-455ff2a6]:last-of-type{margin-bottom:0}[data-v-455ff2a6] .question>.code-listing{padding:unset;border-radius:0}[data-v-455ff2a6] pre{padding:0}[data-v-455ff2a6] img{display:block;margin-left:auto;margin-right:auto;max-width:100%}.title[data-v-c1de71de]{font-size:1.88235rem;line-height:1.25;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;color:var(--colors-header-text,var(--color-header-text))}@media only screen and (max-width:1250px){.title[data-v-c1de71de]{font-size:1.64706rem;line-height:1.28571;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif}}@media only screen and (max-width:735px){.title[data-v-c1de71de]{font-size:1.41176rem;line-height:1.33333;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif}}.title p[data-v-c1de71de]{color:var(--colors-text,var(--color-text))}.assessments[data-v-c1de71de]{box-sizing:content-box;padding:0 1rem;background:var(--color-tutorial-assessments-background);margin-left:auto;margin-right:auto;width:980px;margin-bottom:80px}@media only screen and (max-width:1250px){.assessments[data-v-c1de71de]{width:692px}}@media only screen and (max-width:735px){.assessments[data-v-c1de71de]{width:87.5%}}.banner[data-v-c1de71de]{padding:40px 0;border-bottom:1px solid;margin-bottom:40px;border-color:var(--colors-grid,var(--color-grid));text-align:center}.success[data-v-c1de71de]{text-align:center;padding-bottom:40px;font-size:1.88235rem;line-height:1.25;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;color:var(--colors-text,var(--color-text))}@media only screen and (max-width:1250px){.success[data-v-c1de71de]{font-size:1.64706rem;line-height:1.28571;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif}}@media only screen and (max-width:735px){.success[data-v-c1de71de]{font-size:1.41176rem;line-height:1.33333;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif}}.assessments-wrapper[data-v-c1de71de]{padding-top:80px}.assessments-wrapper[data-v-3c94366b]{padding-bottom:40px;padding-top:0}@media only screen and (max-width:735px){.assessments-wrapper[data-v-3c94366b]{padding-top:80px}}.article[data-v-d9f204d0]{background:var(--colors-article-background,var(--color-article-background))}@media only screen and (max-width:735px){.article[data-v-d9f204d0]{background:var(--colors-text-background,var(--color-article-body-background))}}.intro-container[data-v-54daa228]{margin-bottom:80px}.intro[data-v-54daa228]{display:flex;align-items:center}@media only screen and (max-width:735px){.intro[data-v-54daa228]{padding-bottom:0;flex-direction:column}}.intro.ide .media[data-v-54daa228] img{background-color:var(--colors-text-background,var(--color-text-background))}.col.left[data-v-54daa228]{padding-right:40px}@media only screen and (max-width:1250px){.col.left[data-v-54daa228]{padding-right:28px}}@media only screen and (max-width:735px){.col.left[data-v-54daa228]{margin-left:auto;margin-right:auto;width:980px;padding-right:0}}@media only screen and (max-width:735px) and (max-width:1250px){.col.left[data-v-54daa228]{width:692px}}@media only screen and (max-width:735px) and (max-width:735px){.col.left[data-v-54daa228]{width:87.5%}}.col.right[data-v-54daa228]{padding-left:40px}@media only screen and (max-width:1250px){.col.right[data-v-54daa228]{padding-left:28px}}@media only screen and (max-width:735px){.col.right[data-v-54daa228]{padding-left:0}}.content[data-v-54daa228]{font-size:1rem;line-height:1.47059;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif}.media[data-v-54daa228] img{width:auto;max-height:560px;min-height:18.82353rem;-o-object-fit:scale-down;object-fit:scale-down}@media only screen and (max-width:735px){.media[data-v-54daa228]{margin:0;margin-top:40px}.media[data-v-54daa228] img,.media[data-v-54daa228] video{max-height:80vh}}.media[data-v-54daa228] .asset{padding:0 20px}.headline[data-v-54daa228]{color:var(--colors-header-text,var(--color-header-text))}[data-v-54daa228] .eyebrow{font-size:1.23529rem;line-height:1.19048;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif}@media only screen and (max-width:735px){[data-v-54daa228] .eyebrow{font-size:1.11765rem;line-height:1.21053;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif}}[data-v-54daa228] .eyebrow a{color:inherit}[data-v-54daa228] .heading{font-size:1.88235rem;line-height:1.25;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif}@media only screen and (max-width:1250px){[data-v-54daa228] .heading{font-size:1.64706rem;line-height:1.28571;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif}}@media only screen and (max-width:735px){[data-v-54daa228] .heading{font-size:1.41176rem;line-height:1.33333;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif}}.expanded-intro[data-v-54daa228]{margin-left:auto;margin-right:auto;width:980px;margin-top:40px}@media only screen and (max-width:1250px){.expanded-intro[data-v-54daa228]{width:692px}}@media only screen and (max-width:735px){.expanded-intro[data-v-54daa228]{width:87.5%}}[data-v-54daa228] .cols-2{gap:20px 16.66667%}[data-v-54daa228] .cols-3 .column{gap:20px 12.5%}.code-preview[data-v-9acc0234]{position:sticky;overflow-y:auto;-webkit-overflow-scrolling:touch;background-color:var(--background,var(--color-step-background));height:calc(100vh - 3.05882rem)}.code-preview.ide[data-v-9acc0234]{height:100vh}.code-preview[data-v-9acc0234] .code-listing{color:var(--text,var(--color-code-plain))}.code-preview[data-v-9acc0234] pre{font-size:.70588rem;line-height:1.83333;font-weight:400;font-family:Menlo,monospace}.header[data-v-9acc0234]{font-size:.70588rem;line-height:1.33333;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;position:relative;display:flex;justify-content:space-between;align-items:center;width:-webkit-fill-available;width:-moz-available;width:stretch;cursor:pointer;font-weight:600;padding:8px 12px;border-radius:4px 4px 0 0;z-index:1;background:var(--color-runtime-preview-background);color:var(--colors-runtime-preview-text,var(--color-runtime-preview-text))}.header[data-v-9acc0234]:focus{outline-style:none}#app.fromkeyboard .header[data-v-9acc0234]:focus{box-shadow:0 0 0 4px var(--color-focus-color);outline:none;border-color:var(--color-focus-border-color)}.runtime-preview[data-v-9acc0234]{--color-runtime-preview-shadow:rgba(0,0,0,0.4);position:absolute;top:0;right:0;background:var(--color-runtime-preview-background);border-radius:4px;margin:1rem;margin-left:0;transition:width .2s ease-in;box-shadow:0 0 3px 0 var(--color-runtime-preview-shadow)}@media screen{[data-color-scheme=dark] .runtime-preview[data-v-9acc0234]{--color-runtime-preview-shadow:hsla(0,0%,100%,0.4)}}@media screen and (prefers-color-scheme:dark){[data-color-scheme=auto] .runtime-preview[data-v-9acc0234]{--color-runtime-preview-shadow:hsla(0,0%,100%,0.4)}}@supports not ((width:-webkit-fill-available) or (width:-moz-available) or (width:stretch)){.runtime-preview[data-v-9acc0234]{display:flex;flex-direction:column}}.runtime-preview .runtimve-preview__container[data-v-9acc0234]{border-radius:4px;overflow:hidden}.runtime-preview-ide[data-v-9acc0234]{top:0}.runtime-preview-ide .runtime-preview-asset[data-v-9acc0234] img{background-color:var(--color-runtime-preview-background)}.runtime-preview.collapsed[data-v-9acc0234]{box-shadow:0 0 3px 0 var(--color-runtime-preview-shadow);width:102px}.runtime-preview.collapsed .header[data-v-9acc0234]{border-radius:4px}.runtime-preview.disabled[data-v-9acc0234]{box-shadow:0 0 3px 0 transparent}.runtime-preview.disabled .header[data-v-9acc0234]{color:var(--color-runtime-preview-disabled-text);cursor:auto}.runtime-preview-asset[data-v-9acc0234]{border-radius:0 0 4px 4px}.runtime-preview-asset[data-v-9acc0234] img{border-bottom-left-radius:4px;border-bottom-right-radius:4px}.preview-icon[data-v-9acc0234]{height:.8em;width:.8em;-webkit-user-select:none;-moz-user-select:none;user-select:none}.preview-show[data-v-9acc0234]{transform:scale(-1)}[data-v-5ad4e037] pre{padding:10px 0}.toggle-preview[data-v-d0709828]{color:var(--color-runtime-preview-disabled-text);display:flex;align-items:center}a[data-v-d0709828]{color:var(--url,var(--color-link))}.toggle-text[data-v-d0709828]{display:flex;align-items:center}svg.toggle-icon[data-v-d0709828]{width:1em;height:1em;margin-left:.5em}.mobile-code-preview[data-v-3bee1128]{background-color:var(--background,var(--color-step-background));padding:14px 0}@media only screen and (max-width:735px){.mobile-code-preview[data-v-3bee1128]{display:flex;flex-direction:column}}.runtime-preview-modal-content[data-v-3bee1128]{padding:45px 60px 0 60px;min-width:200px}.runtime-preview-modal-content[data-v-3bee1128] img:not(.file-icon){border-radius:4px;box-shadow:0 0 3px rgba(0,0,0,.4);max-height:80vh;width:auto;display:block;margin-bottom:1rem}.runtime-preview-modal-content .runtime-preview-label[data-v-3bee1128]{font-size:.70588rem;line-height:1.33333;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;color:var(--color-runtime-preview-text);display:block;text-align:center;padding:.5em}[data-v-3bee1128] .code-listing{color:var(--text,var(--color-code-plain))}[data-v-3bee1128] .full-code-listing{padding-top:60px;min-height:calc(100vh - 60px)}[data-v-3bee1128] pre{font-size:.70588rem;line-height:1.83333;font-weight:400;font-family:Menlo,monospace}.preview-toggle-container[data-v-3bee1128]{align-self:flex-end;margin-right:20px}.step-container[data-v-4abdd121]{margin:0}.step-container[data-v-4abdd121]:not(:last-child){margin-bottom:100px}@media only screen and (max-width:735px){.step-container[data-v-4abdd121]:not(:last-child){margin-bottom:80px}}.step[data-v-4abdd121]{position:relative;border-radius:4px;padding:1rem 2rem;background-color:var(--color-step-background);overflow:hidden;-webkit-mask-image:-webkit-radial-gradient(#fff,#000)}.step[data-v-4abdd121]:before{content:"";position:absolute;top:0;left:0;border:1px solid var(--color-step-focused);background-color:var(--color-step-focused);height:calc(100% - 2px);width:4px;opacity:0;transition:opacity .15s ease-in}.step.focused[data-v-4abdd121],.step[data-v-4abdd121]:focus{outline:none}.step.focused[data-v-4abdd121]:before,.step[data-v-4abdd121]:focus:before{opacity:1}@media only screen and (max-width:735px){.step[data-v-4abdd121]{padding-left:2rem}.step[data-v-4abdd121]:before{opacity:1}}.step-label[data-v-4abdd121]{font-size:.70588rem;line-height:1.33333;font-weight:600;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;color:var(--colors-text,var(--color-step-text));margin-bottom:.4em}.caption[data-v-4abdd121]{border-top:1px solid;border-color:var(--color-step-caption);padding:1rem 0 0 0;margin-top:1rem}.media-container[data-v-4abdd121]{display:none}@media only screen and (max-width:735px){.step[data-v-4abdd121]{margin:0 .58824rem 1.17647rem .58824rem}.step.focused[data-v-4abdd121],.step[data-v-4abdd121]:focus{outline:none}.media-container[data-v-4abdd121]{display:block;position:relative}.media-container[data-v-4abdd121] img,.media-container[data-v-4abdd121] video{max-height:80vh}[data-v-4abdd121] .asset{padding:0 20px}}.steps[data-v-25d30c2c]{position:relative;font-size:.82353rem;line-height:1.42857;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;display:flex;color:var(--colors-text,var(--color-text))}@media only screen and (max-width:735px){.steps[data-v-25d30c2c]{padding-top:80px}.steps[data-v-25d30c2c]:before{position:absolute;top:0;border-top:1px solid var(--color-fill-gray-tertiary);content:"";width:calc(100% - 2.35294rem);margin:0 1.17647rem}}.content-container[data-v-25d30c2c]{flex:none;margin-right:4.16667%;width:37.5%;margin-top:140px;margin-bottom:94vh}@media only screen and (max-width:735px){.content-container[data-v-25d30c2c]{margin-top:0;margin-bottom:0;height:100%;margin-left:0;margin-right:0;position:relative;width:100%}}.asset-container[data-v-25d30c2c]{flex:none;height:calc(100vh - 3.05882rem);background-color:var(--background,var(--color-step-background));max-width:921px;width:calc(50vw + 8.33333%);position:sticky;top:3.05882rem;transition:margin .1s ease-in-out}@media only screen and (max-width:767px){.asset-container[data-v-25d30c2c]{top:2.82353rem;height:calc(100vh - 2.82353rem)}}.asset-container[data-v-25d30c2c]:not(.for-step-code){overflow-y:auto;-webkit-overflow-scrolling:touch}.asset-container.ide[data-v-25d30c2c]{height:100vh;top:0}@media only screen and (min-width:736px){.asset-container[data-v-25d30c2c]{display:grid}.asset-container>[data-v-25d30c2c]{grid-row:1;grid-column:1;height:calc(100vh - 3.05882rem)}.asset-container.ide>[data-v-25d30c2c]{height:100vh}}.asset-container .step-asset[data-v-25d30c2c]{box-sizing:border-box;padding:0;padding-left:40px;min-height:320px;height:100%}.asset-container .step-asset[data-v-25d30c2c],.asset-container .step-asset[data-v-25d30c2c] picture{height:100%;display:flex;align-items:center}.asset-container .step-asset[data-v-25d30c2c] .video-replay-container{height:100%;display:flex;flex-direction:column;justify-content:center}.asset-container .step-asset[data-v-25d30c2c] img,.asset-container .step-asset[data-v-25d30c2c] video{width:auto;max-height:calc(100vh - 3.05882rem - 80px);max-width:531.6634px;margin:0}@media only screen and (max-width:1250px){.asset-container .step-asset[data-v-25d30c2c] img,.asset-container .step-asset[data-v-25d30c2c] video{max-width:363.66436px}}.asset-container .step-asset[data-v-25d30c2c] .video-replay-container,.asset-container .step-asset[data-v-25d30c2c] img{min-height:320px}.asset-container .step-asset[data-v-25d30c2c] .video-replay-container video{min-height:280px}@media only screen and (max-width:735px){.asset-container[data-v-25d30c2c]{display:none}}.asset-wrapper[data-v-25d30c2c]{width:63.2%;align-self:center;transition:transform .25s ease-out;will-change:transform}.asset-wrapper.ide .step-asset[data-v-25d30c2c] img{background-color:var(--background,var(--color-step-background))}[data-v-25d30c2c] .runtime-preview-asset{display:grid}[data-v-25d30c2c] .runtime-preview-asset>*{grid-row:1;grid-column:1}.interstitial[data-v-25d30c2c]{padding:0 2rem}.interstitial[data-v-25d30c2c]:not(:first-child){margin-top:5.88235rem}.interstitial[data-v-25d30c2c]:not(:last-child){margin-bottom:30px}@media only screen and (max-width:735px){.interstitial[data-v-25d30c2c]{margin-left:auto;margin-right:auto;width:980px;padding:0}}@media only screen and (max-width:735px) and (max-width:1250px){.interstitial[data-v-25d30c2c]{width:692px}}@media only screen and (max-width:735px) and (max-width:735px){.interstitial[data-v-25d30c2c]{width:87.5%}}@media only screen and (max-width:735px){.interstitial[data-v-25d30c2c]:not(:first-child){margin-top:0}}.fade-enter-active[data-v-25d30c2c],.fade-leave-active[data-v-25d30c2c]{transition:opacity .3s ease-in-out}.fade-enter[data-v-25d30c2c],.fade-leave-to[data-v-25d30c2c]{opacity:0}.section[data-v-6b3a0b3a]{padding-top:80px}.sections[data-v-79a75e9e]{margin-left:auto;margin-right:auto;width:980px}@media only screen and (max-width:1250px){.sections[data-v-79a75e9e]{width:692px}}@media only screen and (max-width:735px){.sections[data-v-79a75e9e]{width:87.5%;margin:0;width:100%}}.tutorial[data-v-0f871b08]{background-color:var(--colors-text-background,var(--color-tutorial-background))} \ No newline at end of file diff --git a/docs/docc/Reducer.doccarchive/css/tutorials-overview.06e8bcf7.css b/docs/docc/Reducer.doccarchive/css/tutorials-overview.06e8bcf7.css deleted file mode 100644 index 9f65a57..0000000 --- a/docs/docc/Reducer.doccarchive/css/tutorials-overview.06e8bcf7.css +++ /dev/null @@ -1,9 +0,0 @@ -/*! - * This source file is part of the Swift.org open source project - * - * Copyright (c) 2021 Apple Inc. and the Swift project authors - * Licensed under Apache License v2.0 with Runtime Library Exception - * - * See https://swift.org/LICENSE.txt for license information - * See https://swift.org/CONTRIBUTORS.txt for Swift project authors - */.tutorials-navigation-link[data-v-6bb99205]{color:var(--color-tutorials-overview-navigation-link);transition:color .3s linear}.tutorials-navigation-link[data-v-6bb99205]:hover{text-decoration:none;transition:none;color:var(--color-tutorials-overview-navigation-link-hover)}.tutorials-navigation-link.active[data-v-6bb99205]{color:var(--color-tutorials-overview-navigation-link-active)}.tutorials-navigation-list[data-v-6f2800d1]{list-style-type:none;margin:0}.tutorials-navigation-list li+li[data-v-6f2800d1]:not(.volume--named){margin-top:24px}.tutorials-navigation-list .volume--named+.volume--named[data-v-6f2800d1]{margin-top:12px}.expand-enter-active,.expand-leave-active{transition:height .3s ease-in-out;overflow:hidden}.expand-enter,.expand-leave-to{height:0}.toggle[data-v-6513d652]{color:#f0f0f0;line-height:21px;display:flex;align-items:center;width:100%;font-weight:600;padding:6px 6px 6px 0;border-bottom:1px solid #2a2a2a;text-decoration:none;box-sizing:border-box}@media only screen and (max-width:767px){.toggle[data-v-6513d652]{padding-right:6px;border-bottom-color:hsla(0,0%,100%,.1)}}.toggle .text[data-v-6513d652]{word-break:break-word}.toggle[data-v-6513d652]:hover{text-decoration:none}.toggle .toggle-icon[data-v-6513d652]{display:inline-block;transition:transform .2s ease-in;height:.4em;width:.4em;margin-left:auto;margin-right:.2em}.collapsed .toggle .toggle-icon[data-v-6513d652]{transform:rotate(45deg)}.collapsed .toggle[data-v-6513d652],.collapsed .toggle[data-v-6513d652]:hover{color:#b0b0b0}.tutorials-navigation-menu-content[data-v-6513d652]{opacity:1;transition:height .2s ease-in,opacity .2s ease-in}.collapsed .tutorials-navigation-menu-content[data-v-6513d652]{height:0;opacity:0}.tutorials-navigation-menu-content .tutorials-navigation-list[data-v-6513d652]{padding:24px 0 12px 0}.tutorials-navigation[data-v-0cbd8adb]{font-size:1rem;line-height:1.23529;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif}.nav-title-content[data-v-60ea3af8]{max-width:100%}.title[data-v-60ea3af8]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;display:inline-block;vertical-align:top;max-width:296px}@media only screen and (max-width:1023px){.title[data-v-60ea3af8]{max-width:205px}}@media only screen and (max-width:767px){.title[data-v-60ea3af8]{flex-basis:fill;display:initial;vertical-align:initial;max-width:none}}.subhead[data-v-60ea3af8]{color:var(--color-nav-root-subhead)}.theme-dark .subhead[data-v-60ea3af8]{color:var(--color-nav-dark-root-subhead)}.nav[data-v-1001350c] .nav-menu{padding-top:0}.nav[data-v-1001350c] .nav-menu .nav-menu-items{margin-left:auto}@media only screen and (min-width:768px){.nav[data-v-1001350c] .nav-menu .nav-menu-items .in-page-navigation{display:none}}@media only screen and (min-width:320px) and (max-width:735px){.nav[data-v-1001350c] .nav-menu .nav-menu-items{padding:18px 0 40px}}.replay-button[data-v-59608016]{display:flex;align-items:center;justify-content:center;cursor:pointer;visibility:hidden;margin-top:.5rem;-webkit-tap-highlight-color:transparent}.replay-button.visible[data-v-59608016]{visibility:visible}.replay-button svg.replay-icon[data-v-59608016]{height:12px;width:12px;margin-left:.3em}[data-v-1b5cc854] img,[data-v-1b5cc854] video{display:block;margin-left:auto;margin-right:auto;-o-object-fit:contain;object-fit:contain;max-width:100%}.hero[data-v-fc7f508c]{margin-left:auto;margin-right:auto;width:980px;padding-bottom:4.70588rem;padding-top:4.70588rem}@media only screen and (max-width:1250px){.hero[data-v-fc7f508c]{width:692px}}@media only screen and (max-width:735px){.hero[data-v-fc7f508c]{width:87.5%}}.copy-container[data-v-fc7f508c]{margin:0 auto;text-align:center;width:720px}.title[data-v-fc7f508c]{font-size:2.82353rem;line-height:1.08333;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;color:var(--color-tutorials-overview-content)}@media only screen and (max-width:1250px){.title[data-v-fc7f508c]{font-size:2.35294rem;line-height:1.1;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif}}@media only screen and (max-width:735px){.title[data-v-fc7f508c]{font-size:1.88235rem;line-height:1.125;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif}}.content[data-v-fc7f508c]{font-size:1.23529rem;line-height:1.38095;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;color:var(--color-tutorials-overview-content)}@media only screen and (max-width:735px){.content[data-v-fc7f508c]{font-size:1.11765rem;line-height:1.42105;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif}}.meta[data-v-fc7f508c]{color:var(--color-tutorials-overview-content-alt);align-items:center;display:flex;justify-content:center}.meta-content[data-v-fc7f508c]{font-size:.82353rem;line-height:1.42857;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif}.meta .timer-icon[data-v-fc7f508c]{margin-right:.35294rem;height:.94118rem;width:.94118rem;fill:var(--color-tutorials-overview-icon)}@media only screen and (max-width:735px){.meta .timer-icon[data-v-fc7f508c]{margin-right:.29412rem;height:.82353rem;width:.82353rem}}.meta .time[data-v-fc7f508c]{font-size:1.11765rem;line-height:1.21053;font-weight:600;font-family:Helvetica Neue,Helvetica,Arial,sans-serif}@media only screen and (max-width:735px){.meta .time[data-v-fc7f508c]{font-size:1rem;line-height:1.11765;font-weight:600;font-family:Helvetica Neue,Helvetica,Arial,sans-serif}}.title+.content[data-v-fc7f508c]{margin-top:1.47059rem}.content+.meta[data-v-fc7f508c]{margin-top:1.17647rem}.button-cta[data-v-fc7f508c]{margin-top:1.76471rem}*+.asset[data-v-fc7f508c]{margin-top:4.11765rem}@media only screen and (max-width:1250px){.copy-container[data-v-fc7f508c]{width:636px}}@media only screen and (max-width:735px){.hero[data-v-fc7f508c]{padding-bottom:1.76471rem;padding-top:2.35294rem}.copy-container[data-v-fc7f508c]{width:100%}.title+.content[data-v-fc7f508c]{margin-top:.88235rem}.button-cta[data-v-fc7f508c]{margin-top:1.41176rem}*+.asset[data-v-fc7f508c]{margin-top:2.23529rem}}.image[data-v-14577284]{margin-bottom:10px}.name[data-v-14577284]{font-size:1.88235rem;line-height:1.125;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;color:#f0f0f0;word-break:break-word}@media only screen and (max-width:1250px){.name[data-v-14577284]{font-size:1.64706rem;line-height:1.14286;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif}}@media only screen and (max-width:735px){.name[data-v-14577284]{font-size:1.41176rem;line-height:1.16667;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif}}.content[data-v-14577284]{font-size:1rem;line-height:1.23529;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;color:var(--color-tutorials-overview-content-alt);margin-top:10px}.volume-name[data-v-14577284]{padding:50px 60px;text-align:center;background:#161616;margin:2px 0}@media only screen and (max-width:735px){.volume-name[data-v-14577284]{padding:40px 20px}}.document-icon[data-v-56114692]{margin-left:-3px}.tile[data-v-86db603a]{background:#161616;padding:40px 30px;color:var(--color-tutorials-overview-content-alt)}.content[data-v-86db603a] a,a[data-v-86db603a]{color:var(--colors-link,var(--color-tutorials-overview-link))}.icon[data-v-86db603a]{display:block;height:1.47059rem;line-height:1.47059rem;margin-bottom:.58824rem;width:1.47059rem}.icon[data-v-86db603a] svg.svg-icon{width:100%;max-height:100%;fill:var(--color-tutorials-overview-icon)}.icon[data-v-86db603a] svg.svg-icon .svg-icon-stroke{stroke:var(--color-tutorials-overview-content-alt)}.title[data-v-86db603a]{font-size:1.23529rem;line-height:1.19048;font-weight:600;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;margin-bottom:.8em}.content[data-v-86db603a],.link[data-v-86db603a]{font-size:.82353rem;line-height:1.42857;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif}.content[data-v-86db603a]{color:var(--color-tutorials-overview-content-alt)}.link[data-v-86db603a]{display:block;margin-top:1.17647rem}.link .link-icon[data-v-86db603a]{margin-left:.2em;width:.6em;height:.6em}[data-v-86db603a] .content ul{list-style-type:none;margin-left:0;font-size:.82353rem;line-height:1.28571;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif}[data-v-86db603a] .content ul li:before{content:"\200B";position:absolute}[data-v-86db603a] .content li+li{margin-top:8px}@media only screen and (max-width:735px){.tile[data-v-86db603a]{padding:1.76471rem 1.17647rem}}.tile-group[data-v-015f9f13]{display:grid;grid-column-gap:2px;grid-row-gap:2px}.tile-group.count-1[data-v-015f9f13]{grid-template-columns:1fr;text-align:center}.tile-group.count-1[data-v-015f9f13] .icon{margin-left:auto;margin-right:auto}.tile-group.count-2[data-v-015f9f13]{grid-template-columns:repeat(2,1fr)}.tile-group.count-3[data-v-015f9f13]{grid-template-columns:repeat(3,1fr)}.tile-group.count-4[data-v-015f9f13]{grid-template-columns:repeat(2,1fr);grid-template-rows:repeat(2,auto)}.tile-group.count-5[data-v-015f9f13]{grid-template-columns:repeat(6,1fr);grid-template-rows:repeat(2,auto)}.tile-group.count-5 .tile[data-v-015f9f13]{grid-column-end:span 2}.tile-group.count-5 .tile[data-v-015f9f13]:nth-of-type(-n+2){grid-column-end:span 3}.tile-group.count-6[data-v-015f9f13]{grid-template-columns:repeat(2,1fr);grid-template-rows:repeat(3,auto)}@media only screen and (min-width:768px) and (max-width:1250px){.tile-group.tile-group[data-v-015f9f13]{grid-template-columns:1fr;grid-template-rows:auto}}@media only screen and (max-width:735px){.tile-group.count-1[data-v-015f9f13],.tile-group.count-2[data-v-015f9f13],.tile-group.count-3[data-v-015f9f13],.tile-group.count-4[data-v-015f9f13],.tile-group.count-5[data-v-015f9f13],.tile-group.count-6[data-v-015f9f13]{grid-template-columns:1fr;grid-template-rows:auto}}.title[data-v-49ba6f62]{font-size:1.88235rem;line-height:1.125;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;color:#f0f0f0}@media only screen and (max-width:1250px){.title[data-v-49ba6f62]{font-size:1.64706rem;line-height:1.14286;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif}}@media only screen and (max-width:735px){.title[data-v-49ba6f62]{font-size:1.41176rem;line-height:1.16667;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif}}.content[data-v-49ba6f62]{font-size:1rem;line-height:1.23529;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;color:#b0b0b0;margin-top:10px}.topic-list[data-v-da979188]{list-style-type:none;margin:50px 0 0 0;position:relative}.topic-list li[data-v-da979188]:before{content:"\200B";position:absolute}.topic-list[data-v-da979188]:before{content:"";border-left:1px solid var(--color-fill-quaternary);display:block;height:calc(100% - .88235rem);left:.88235rem;position:absolute;top:50%;transform:translateY(-50%);width:0}.topic[data-v-da979188]{font-size:1rem;line-height:1.47059;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;display:flex;align-items:flex-start}@media only screen and (max-width:735px){.topic[data-v-da979188]{font-size:.82353rem;line-height:1.28571;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif}}.topic+.topic[data-v-da979188]{margin-top:.58824rem}.topic .topic-icon[data-v-da979188]{background-color:var(--color-fill-quaternary);border-radius:50%;flex-shrink:0;height:1.76471rem;width:1.76471rem;margin-right:1.17647rem;position:relative;text-align:center;-webkit-user-select:none;-moz-user-select:none;user-select:none;padding:.47059rem;box-sizing:border-box;display:flex;justify-content:center;align-items:center}.topic .topic-icon svg[data-v-da979188]{fill:var(--color-tutorials-overview-icon);max-width:100%;max-height:100%;width:100%}.container[data-v-da979188]{align-items:baseline;display:flex;justify-content:space-between;width:100%;padding-top:.11765rem}.container[data-v-da979188]:hover{text-decoration:none}.container:hover .link[data-v-da979188]{text-decoration:underline}.timer-icon[data-v-da979188]{margin-right:.29412rem;height:.70588rem;width:.70588rem;fill:var(--color-tutorials-overview-icon)}.time[data-v-da979188]{font-size:.82353rem;line-height:1.28571;font-weight:400;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;color:var(--color-tutorials-overview-content-alt);align-items:center;display:inline-flex}.link[data-v-da979188]{padding-right:.58824rem;color:var(--colors-link,var(--color-tutorials-overview-link))}@media only screen and (min-width:768px) and (max-width:1250px){.topic-list[data-v-da979188]{margin-top:2.35294rem}}@media only screen and (max-width:735px){.topic-list[data-v-da979188]{margin-top:1.76471rem}.topic[data-v-da979188]{height:auto;align-items:flex-start}.topic.no-time-estimate[data-v-da979188]{align-items:center}.topic.no-time-estimate .topic-icon[data-v-da979188]{align-self:flex-start;top:0}.topic+.topic[data-v-da979188]{margin-top:1.17647rem}.topic .topic-icon[data-v-da979188]{top:.29412rem;margin-right:.76471rem}.container[data-v-da979188]{flex-wrap:wrap;padding-top:0}.link[data-v-da979188],.time[data-v-da979188]{flex-basis:100%}.time[data-v-da979188]{margin-top:.29412rem}}.chapter[data-v-1d13969f]:focus{outline:none!important}.info[data-v-1d13969f]{align-items:center;display:flex;flex-wrap:wrap;justify-content:space-between}.name[data-v-1d13969f]{font-size:1.23529rem;line-height:1.19048;font-weight:600;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;color:#f0f0f0}.name-text[data-v-1d13969f]{word-break:break-word}.eyebrow[data-v-1d13969f]{font-size:1rem;line-height:1.23529;font-weight:400;color:var(--color-tutorials-overview-eyebrow);display:block;font-weight:600;margin-bottom:5px}.content[data-v-1d13969f],.eyebrow[data-v-1d13969f]{font-family:Helvetica Neue,Helvetica,Arial,sans-serif}.content[data-v-1d13969f]{font-size:.82353rem;line-height:1.42857;font-weight:400;color:var(--color-tutorials-overview-content-alt)}.asset[data-v-1d13969f]{flex:0 0 190px}.intro[data-v-1d13969f]{flex:0 1 360px}@media only screen and (min-width:768px) and (max-width:1250px){.asset[data-v-1d13969f]{flex:0 0 130px}.intro[data-v-1d13969f]{flex:0 1 260px}}@media only screen and (max-width:767px){.intro[data-v-1d13969f]{flex:0 1 340px}}@media only screen and (max-width:735px){.info[data-v-1d13969f]{display:block;text-align:center}.asset[data-v-1d13969f]{margin:0 45px}.eyebrow[data-v-1d13969f]{margin-bottom:7px}.intro[data-v-1d13969f]{margin-top:40px}}.tile[data-v-2129f58c]{background:#161616;margin:2px 0;padding:50px 60px}.asset[data-v-2129f58c]{margin-bottom:10px}@media only screen and (min-width:768px) and (max-width:1250px){.tile[data-v-2129f58c]{padding:40px 30px}}@media only screen and (max-width:735px){.volume[data-v-2129f58c]{border-radius:0}.tile[data-v-2129f58c]{padding:40px 20px}}.learning-path[data-v-48bfa85c]{background:#000;padding:4.70588rem 0}.main-container[data-v-48bfa85c]{margin-left:auto;margin-right:auto;width:980px;align-items:stretch;display:flex;justify-content:space-between}@media only screen and (max-width:1250px){.main-container[data-v-48bfa85c]{width:692px}}@media only screen and (max-width:735px){.main-container[data-v-48bfa85c]{width:87.5%}}.ide .main-container[data-v-48bfa85c]{justify-content:center}.secondary-content-container[data-v-48bfa85c]{flex:0 0 200px;width:200px}.tutorials-navigation[data-v-48bfa85c]{position:sticky;top:7.76471rem}.primary-content-container[data-v-48bfa85c]{flex:0 1 720px;max-width:100%}.content-sections-container .content-section[data-v-48bfa85c]{border-radius:12px;overflow:hidden}.content-sections-container .content-section+.content-section[data-v-48bfa85c]{margin-top:1.17647rem}@media only screen and (min-width:768px) and (max-width:1250px){.learning-path[data-v-48bfa85c]{padding:2.35294rem 0}.primary-content-container[data-v-48bfa85c]{flex-basis:auto;margin-left:1.29412rem}.secondary-content-container[data-v-48bfa85c]{flex:0 0 180px;width:180px}}@media only screen and (max-width:767px){.secondary-content-container[data-v-48bfa85c]{display:none}}@media only screen and (max-width:735px){.content-sections-container .content-section[data-v-48bfa85c]{border-radius:0}.content-sections-container .content-section.volume[data-v-48bfa85c]{margin-top:1.17647rem}.learning-path[data-v-48bfa85c]{padding:0}.main-container[data-v-48bfa85c]{width:100%}}.tutorials-overview[data-v-53888684]{height:100%}.tutorials-overview .radial-gradient[data-v-53888684]{margin-top:-3.05882rem;padding-top:3.05882rem;background:var(--color-tutorials-overview-background)}@media only screen and (max-width:735px){.tutorials-overview .radial-gradient[data-v-53888684]{margin-top:-2.82353rem;padding-top:2.82353rem}}@-moz-document url-prefix(){.tutorials-overview .radial-gradient{background:#111!important}} \ No newline at end of file diff --git a/docs/docc/Reducer.doccarchive/data/documentation/reducer.json b/docs/docc/Reducer.doccarchive/data/documentation/reducer.json deleted file mode 100644 index c407b78..0000000 --- a/docs/docc/Reducer.doccarchive/data/documentation/reducer.json +++ /dev/null @@ -1 +0,0 @@ -{"variants":[{"paths":["\/documentation\/reducer"],"traits":[{"interfaceLanguage":"swift"}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"identifier":{"url":"doc:\/\/Reducer\/documentation\/Reducer","interfaceLanguage":"swift"},"topicSections":[{"title":"Structures","identifiers":["doc:\/\/Reducer\/documentation\/Reducer\/Reducer"]},{"title":"Enumerations","identifiers":["doc:\/\/Reducer\/documentation\/Reducer\/ReducerBuilder"]}],"kind":"symbol","metadata":{"roleHeading":"Framework","externalID":"Reducer","title":"Reducer","symbolKind":"module","role":"collection","modules":[{"name":"Reducer"}]},"hierarchy":{"paths":[[]]},"references":{"doc://Reducer/documentation/Reducer/Reducer":{"role":"symbol","title":"Reducer","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Reducer"}],"abstract":[{"type":"text","text":"An entity that calculates the new state when given current state and an incoming action "},{"type":"codeVoice","code":"(Action, inout State) -> Void"},{"type":"text","text":"."}],"identifier":"doc:\/\/Reducer\/documentation\/Reducer\/Reducer","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Reducer"}],"url":"\/documentation\/reducer\/reducer"},"doc://Reducer/documentation/Reducer/ReducerBuilder":{"role":"symbol","title":"ReducerBuilder","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"ReducerBuilder"}],"abstract":[{"type":"text","text":"DSL Builder for Reducer compose"}],"identifier":"doc:\/\/Reducer\/documentation\/Reducer\/ReducerBuilder","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ReducerBuilder"}],"url":"\/documentation\/reducer\/reducerbuilder"},"doc://Reducer/documentation/Reducer":{"role":"collection","title":"Reducer","abstract":[],"identifier":"doc:\/\/Reducer\/documentation\/Reducer","kind":"symbol","type":"topic","url":"\/documentation\/reducer"}}} \ No newline at end of file diff --git a/docs/docc/Reducer.doccarchive/data/documentation/reducer/reducer.json b/docs/docc/Reducer.doccarchive/data/documentation/reducer/reducer.json deleted file mode 100644 index 618227e..0000000 --- a/docs/docc/Reducer.doccarchive/data/documentation/reducer/reducer.json +++ /dev/null @@ -1 +0,0 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Reducer"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"ActionType"},{"kind":"text","text":", "},{"kind":"genericParameter","text":"StateType"},{"kind":"text","text":">"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"anchor":"overview","level":2,"type":"heading","text":"Overview"},{"type":"paragraph","inlineContent":[{"type":"text","text":"An app triggers several actions over time, either coming from user input (button tap, scroll, pinch gesture), from sensors (CoreLocation, NFC,"},{"type":"text","text":" "},{"type":"text","text":"HealthKit), communication protocols (CoreBluetooth, networking, WebSocket), databases (CoreData, Realm), timers and many more."},{"type":"text","text":" "},{"type":"text","text":"An app also starts with an initial state, right after its cold launch."},{"type":"text","text":" "},{"type":"text","text":"For each action that arrives, the state can be modified, and this is exactly what a "},{"type":"codeVoice","code":"Reducer"},{"type":"text","text":" does: folds all actions that arrived since the app"},{"type":"text","text":" "},{"type":"text","text":"launch, plus the initial state, into the current state. One at the time."},{"type":"text","text":" "},{"type":"text","text":"The shape of a "},{"type":"codeVoice","code":"Reducer"},{"type":"text","text":" could be represented as "},{"type":"codeVoice","code":"(Action, State) -> State"},{"type":"text","text":", or given the incoming action and the latest known state, calculate the"},{"type":"text","text":" "},{"type":"text","text":"new state."},{"type":"text","text":" "},{"type":"text","text":"For the sake of performance, and keeping the same semantics, the SwiftRex "},{"type":"codeVoice","code":"Reducer"},{"type":"text","text":" is represented as "},{"type":"codeVoice","code":"(Action, inout State) -> Void"},{"type":"text","text":", avoiding"},{"type":"text","text":" "},{"type":"text","text":"unnecessary copies and allowing performance tuning for arrays or other big collections."},{"type":"text","text":" "},{"type":"text","text":"A "},{"type":"codeVoice","code":"Reducer"},{"type":"text","text":" can focus in a small part, and be composed with other reducers. The order of this composition matters, because the state will be modified"},{"type":"text","text":" "},{"type":"text","text":"in the order as the reducers were composed, but you should avoid two reducers changing the same domain. If you can’t avoid, mind the order."},{"type":"text","text":" "},{"type":"text","text":"A "},{"type":"codeVoice","code":"Reducer"},{"type":"text","text":" can also focus in a subset of your full AppAction and AppState, and be “lifted” from the subset to the whole, for example it’s focused on"},{"type":"text","text":" "},{"type":"text","text":"LoginAction and LoginState, then lifted to the whole AppAction and AppState by providing the KeyPath where the subset LoginAction is in the"},{"type":"text","text":" "},{"type":"text","text":"AppAction, and where the subset LoginState is in the AppState."}]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/reducer\/reducer"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Reducer\/documentation\/Reducer\/Reducer","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"An entity that calculates the new state when given current state and an incoming action "},{"type":"codeVoice","code":"(Action, inout State) -> Void"},{"type":"text","text":"."}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Reducer"}],"title":"Reducer","roleHeading":"Structure","role":"symbol","symbolKind":"struct","externalID":"s:7ReducerAAV","modules":[{"name":"Reducer"}],"navigatorTitle":[{"kind":"identifier","text":"Reducer"}]},"hierarchy":{"paths":[["doc:\/\/Reducer\/documentation\/Reducer"]]},"topicSections":[{"title":"Instance Properties","identifiers":["doc:\/\/Reducer\/documentation\/Reducer\/Reducer\/reduce"]},{"title":"Instance Methods","identifiers":["doc:\/\/Reducer\/documentation\/Reducer\/Reducer\/lift(action:)","doc:\/\/Reducer\/documentation\/Reducer\/Reducer\/lift(action:state:)","doc:\/\/Reducer\/documentation\/Reducer\/Reducer\/lift(actionGetter:stateGetter:stateSetter:)","doc:\/\/Reducer\/documentation\/Reducer\/Reducer\/lift(state:)","doc:\/\/Reducer\/documentation\/Reducer\/Reducer\/liftToCollection(action:stateCollection:)-4gphe","doc:\/\/Reducer\/documentation\/Reducer\/Reducer\/liftToCollection(action:stateCollection:)-5a160","doc:\/\/Reducer\/documentation\/Reducer\/Reducer\/liftToCollection(action:stateCollection:identifier:)"]},{"title":"Type Properties","identifiers":["doc:\/\/Reducer\/documentation\/Reducer\/Reducer\/identity"]},{"title":"Type Methods","identifiers":["doc:\/\/Reducer\/documentation\/Reducer\/Reducer\/compose(_:_:)","doc:\/\/Reducer\/documentation\/Reducer\/Reducer\/compose(content:)","doc:\/\/Reducer\/documentation\/Reducer\/Reducer\/reduce(_:)"]}],"references":{"doc://Reducer/documentation/Reducer/Reducer/reduce(_:)":{"role":"symbol","title":"reduce(_:)","fragments":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"reduce"},{"kind":"text","text":"(("},{"kind":"typeIdentifier","text":"ActionType","preciseIdentifier":"s:7ReducerAAV10ActionTypexmfp"},{"kind":"text","text":", "},{"kind":"keyword","text":"inout"},{"kind":"text","text":" "},{"kind":"typeIdentifier","text":"StateType","preciseIdentifier":"s:7ReducerAAV9StateTypeq_mfp"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Void","preciseIdentifier":"s:s4Voida"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Reducer","preciseIdentifier":"s:7ReducerAAV"}],"abstract":[{"type":"text","text":"Reducer initialiser takes only the underlying function "},{"type":"codeVoice","code":"(ActionType, inout StateType) -> Void"},{"type":"text","text":" that is the reducer"},{"type":"text","text":" "},{"type":"text","text":"function itself."}],"identifier":"doc:\/\/Reducer\/documentation\/Reducer\/Reducer\/reduce(_:)","kind":"symbol","type":"topic","url":"\/documentation\/reducer\/reducer\/reduce(_:)"},"doc://Reducer/documentation/Reducer":{"role":"collection","title":"Reducer","abstract":[],"identifier":"doc:\/\/Reducer\/documentation\/Reducer","kind":"symbol","type":"topic","url":"\/documentation\/reducer"},"doc://Reducer/documentation/Reducer/Reducer/compose(_:_:)":{"role":"symbol","title":"compose(_:_:)","fragments":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"compose"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"Reducer","preciseIdentifier":"s:7ReducerAAV"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"Reducer","preciseIdentifier":"s:7ReducerAAV"},{"kind":"text","text":"...) -> "},{"kind":"typeIdentifier","text":"Reducer","preciseIdentifier":"s:7ReducerAAV"}],"abstract":[{"type":"text","text":"Composes two or more reducers in series, to be evaluated from the left to the right for each incoming action."}],"identifier":"doc:\/\/Reducer\/documentation\/Reducer\/Reducer\/compose(_:_:)","kind":"symbol","type":"topic","url":"\/documentation\/reducer\/reducer\/compose(_:_:)"},"doc://Reducer/documentation/Reducer/Reducer/reduce":{"role":"symbol","title":"reduce","fragments":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"reduce"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"ActionType","preciseIdentifier":"s:7ReducerAAV10ActionTypexmfp"},{"kind":"text","text":", "},{"kind":"keyword","text":"inout"},{"kind":"text","text":" "},{"kind":"typeIdentifier","text":"StateType","preciseIdentifier":"s:7ReducerAAV9StateTypeq_mfp"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Void","preciseIdentifier":"s:s4Voida"}],"abstract":[{"type":"text","text":"Execute the wrapped reduce function. You must provide the parameters "},{"type":"codeVoice","code":"action: ActionType"},{"type":"text","text":" (the action to be"},{"type":"text","text":" "},{"type":"text","text":"evaluated during the reducing process) and an "},{"type":"codeVoice","code":"inout"},{"type":"text","text":" version of the latest "},{"type":"codeVoice","code":"state: StateType"},{"type":"text","text":", (the current"},{"type":"text","text":" "},{"type":"text","text":"state in your single source-of-truth)."},{"type":"text","text":" "},{"type":"text","text":"State will be mutated in place ("},{"type":"codeVoice","code":"inout"},{"type":"text","text":") and finish with the calculated new state."}],"identifier":"doc:\/\/Reducer\/documentation\/Reducer\/Reducer\/reduce","kind":"symbol","type":"topic","url":"\/documentation\/reducer\/reducer\/reduce"},"doc://Reducer/documentation/Reducer/Reducer/lift(actionGetter:stateGetter:stateSetter:)":{"role":"symbol","title":"lift(actionGetter:stateGetter:stateSetter:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"lift"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"GlobalActionType"},{"kind":"text","text":", "},{"kind":"genericParameter","text":"GlobalStateType"},{"kind":"text","text":">("},{"kind":"externalParam","text":"actionGetter"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"GlobalActionType","preciseIdentifier":"s:7ReducerAAV4lift12actionGetter05stateD00E6SetterAByqd__qd_0_GxSgqd__c_q_qd_0_cyqd_0_z_q_tctr0_lF16GlobalActionTypeL_qd__mfp"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"ActionType","preciseIdentifier":"s:7ReducerAAV10ActionTypexmfp"},{"kind":"text","text":"?, "},{"kind":"externalParam","text":"stateGetter"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"GlobalStateType","preciseIdentifier":"s:7ReducerAAV4lift12actionGetter05stateD00E6SetterAByqd__qd_0_GxSgqd__c_q_qd_0_cyqd_0_z_q_tctr0_lF15GlobalStateTypeL_qd_0_mfp"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"StateType","preciseIdentifier":"s:7ReducerAAV9StateTypeq_mfp"},{"kind":"text","text":", "},{"kind":"externalParam","text":"stateSetter"},{"kind":"text","text":": ("},{"kind":"keyword","text":"inout"},{"kind":"text","text":" "},{"kind":"typeIdentifier","text":"GlobalStateType","preciseIdentifier":"s:7ReducerAAV4lift12actionGetter05stateD00E6SetterAByqd__qd_0_GxSgqd__c_q_qd_0_cyqd_0_z_q_tctr0_lF15GlobalStateTypeL_qd_0_mfp"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"StateType","preciseIdentifier":"s:7ReducerAAV9StateTypeq_mfp"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Void","preciseIdentifier":"s:s4Voida"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Reducer","preciseIdentifier":"s:7ReducerAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"GlobalActionType","preciseIdentifier":"s:7ReducerAAV4lift12actionGetter05stateD00E6SetterAByqd__qd_0_GxSgqd__c_q_qd_0_cyqd_0_z_q_tctr0_lF16GlobalActionTypeL_qd__mfp"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"GlobalStateType","preciseIdentifier":"s:7ReducerAAV4lift12actionGetter05stateD00E6SetterAByqd__qd_0_GxSgqd__c_q_qd_0_cyqd_0_z_q_tctr0_lF15GlobalStateTypeL_qd_0_mfp"},{"kind":"text","text":">"}],"abstract":[{"type":"text","text":"A type-lifting method. The global state of your app is "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Whole"}]},{"type":"text","text":", and the "},{"type":"codeVoice","code":"Reducer"},{"type":"text","text":" handles "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Part"}]},{"type":"text","text":", that is a"},{"type":"text","text":" "},{"type":"text","text":"sub-state."}],"identifier":"doc:\/\/Reducer\/documentation\/Reducer\/Reducer\/lift(actionGetter:stateGetter:stateSetter:)","kind":"symbol","type":"topic","url":"\/documentation\/reducer\/reducer\/lift(actiongetter:stategetter:statesetter:)"},"doc://Reducer/documentation/Reducer/Reducer":{"role":"symbol","title":"Reducer","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Reducer"}],"abstract":[{"type":"text","text":"An entity that calculates the new state when given current state and an incoming action "},{"type":"codeVoice","code":"(Action, inout State) -> Void"},{"type":"text","text":"."}],"identifier":"doc:\/\/Reducer\/documentation\/Reducer\/Reducer","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Reducer"}],"url":"\/documentation\/reducer\/reducer"},"doc://Reducer/documentation/Reducer/Reducer/liftToCollection(action:stateCollection:)-5a160":{"conformance":{"constraints":[{"type":"codeVoice","code":"StateType"},{"type":"text","text":" conforms to "},{"type":"codeVoice","code":"Identifiable"},{"type":"text","text":"."}],"availabilityPrefix":[{"type":"text","text":"Available when"}],"conformancePrefix":[{"type":"text","text":"Conforms when"}]},"role":"symbol","title":"liftToCollection(action:stateCollection:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"liftToCollection"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"GlobalAction"},{"kind":"text","text":", "},{"kind":"genericParameter","text":"GlobalState"},{"kind":"text","text":", "},{"kind":"genericParameter","text":"CollectionState"},{"kind":"text","text":">("},{"kind":"externalParam","text":"action"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"KeyPath","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"GlobalAction","preciseIdentifier":"s:7ReducerAAVAAs12IdentifiableR_rlE16liftToCollection6action05stateE0AByqd__qd_0_Gs7KeyPathCyqd__2IDQy_2id_xAEtSgG_s08WritablehI0Cyqd_0_qd_1_Gt7ElementQyd_1_Rs_SMRd_1_r1_lF12GlobalActionL_qd__mfp"},{"kind":"text","text":", (id"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"StateType","preciseIdentifier":"s:7ReducerAAVAAs12IdentifiableR_rlE9StateTypeq_mfp"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"ID","preciseIdentifier":"s:s12IdentifiableP2IDQa"},{"kind":"text","text":", action"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"ActionType","preciseIdentifier":"s:7ReducerAAVAAs12IdentifiableR_rlE10ActionTypexmfp"},{"kind":"text","text":")?>, "},{"kind":"externalParam","text":"stateCollection"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"WritableKeyPath","preciseIdentifier":"s:s15WritableKeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"GlobalState","preciseIdentifier":"s:7ReducerAAVAAs12IdentifiableR_rlE16liftToCollection6action05stateE0AByqd__qd_0_Gs7KeyPathCyqd__2IDQy_2id_xAEtSgG_s08WritablehI0Cyqd_0_qd_1_Gt7ElementQyd_1_Rs_SMRd_1_r1_lF11GlobalStateL_qd_0_mfp"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"CollectionState","preciseIdentifier":"s:7ReducerAAVAAs12IdentifiableR_rlE16liftToCollection6action05stateE0AByqd__qd_0_Gs7KeyPathCyqd__2IDQy_2id_xAEtSgG_s08WritablehI0Cyqd_0_qd_1_Gt7ElementQyd_1_Rs_SMRd_1_r1_lF0E5StateL_qd_1_mfp"},{"kind":"text","text":">) -> "},{"kind":"typeIdentifier","text":"Reducer","preciseIdentifier":"s:7ReducerAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"GlobalAction","preciseIdentifier":"s:7ReducerAAVAAs12IdentifiableR_rlE16liftToCollection6action05stateE0AByqd__qd_0_Gs7KeyPathCyqd__2IDQy_2id_xAEtSgG_s08WritablehI0Cyqd_0_qd_1_Gt7ElementQyd_1_Rs_SMRd_1_r1_lF12GlobalActionL_qd__mfp"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"GlobalState","preciseIdentifier":"s:7ReducerAAVAAs12IdentifiableR_rlE16liftToCollection6action05stateE0AByqd__qd_0_Gs7KeyPathCyqd__2IDQy_2id_xAEtSgG_s08WritablehI0Cyqd_0_qd_1_Gt7ElementQyd_1_Rs_SMRd_1_r1_lF11GlobalStateL_qd_0_mfp"},{"kind":"text","text":">"}],"abstract":[{"type":"text","text":"A type-lifting method for collections. The global state of your app is "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Whole"}]},{"type":"text","text":", and the "},{"type":"codeVoice","code":"Reducer"},{"type":"text","text":" handles an element"},{"type":"text","text":" "},{"type":"text","text":"that is inside of a collection, which itself is sub-state of the global. Let’s call this single element "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Part"}]},{"type":"text","text":"."}],"identifier":"doc:\/\/Reducer\/documentation\/Reducer\/Reducer\/liftToCollection(action:stateCollection:)-5a160","kind":"symbol","type":"topic","url":"\/documentation\/reducer\/reducer\/lifttocollection(action:statecollection:)-5a160"},"doc://Reducer/documentation/Reducer/Reducer/lift(action:)":{"role":"symbol","title":"lift(action:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"lift"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"GlobalActionType"},{"kind":"text","text":">("},{"kind":"externalParam","text":"action"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"KeyPath","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"GlobalActionType","preciseIdentifier":"s:7ReducerAAV4lift6actionAByqd__q_Gs7KeyPathCyqd__xSgG_tlF16GlobalActionTypeL_qd__mfp"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"ActionType","preciseIdentifier":"s:7ReducerAAV10ActionTypexmfp"},{"kind":"text","text":"?>) -> "},{"kind":"typeIdentifier","text":"Reducer","preciseIdentifier":"s:7ReducerAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"GlobalActionType","preciseIdentifier":"s:7ReducerAAV4lift6actionAByqd__q_Gs7KeyPathCyqd__xSgG_tlF16GlobalActionTypeL_qd__mfp"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"StateType","preciseIdentifier":"s:7ReducerAAV9StateTypeq_mfp"},{"kind":"text","text":">"}],"abstract":[{"type":"text","text":"A type-lifting method. The global state of your app is "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Whole"}]},{"type":"text","text":", and the "},{"type":"codeVoice","code":"Reducer"},{"type":"text","text":" handles "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Part"}]},{"type":"text","text":", that is a"},{"type":"text","text":" "},{"type":"text","text":"sub-state."}],"identifier":"doc:\/\/Reducer\/documentation\/Reducer\/Reducer\/lift(action:)","kind":"symbol","type":"topic","url":"\/documentation\/reducer\/reducer\/lift(action:)"},"doc://Reducer/documentation/Reducer/Reducer/identity":{"role":"symbol","title":"identity","fragments":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"identity"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Reducer","preciseIdentifier":"s:7ReducerAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"ActionType","preciseIdentifier":"s:7ReducerAAV10ActionTypexmfp"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"StateType","preciseIdentifier":"s:7ReducerAAV9StateTypeq_mfp"},{"kind":"text","text":">"}],"abstract":[{"type":"text","text":"No-op reducer. Composing it with any other reducer will not change anything from the other reducer behaviour, regardless if the identity reducer"},{"type":"text","text":" "},{"type":"text","text":"is on the left-hand side or the right-hand side or this composition. This is the neutral element in a monoidal composition."}],"identifier":"doc:\/\/Reducer\/documentation\/Reducer\/Reducer\/identity","kind":"symbol","type":"topic","url":"\/documentation\/reducer\/reducer\/identity"},"doc://Reducer/documentation/Reducer/Reducer/lift(action:state:)":{"role":"symbol","title":"lift(action:state:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"lift"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"GlobalActionType"},{"kind":"text","text":", "},{"kind":"genericParameter","text":"GlobalStateType"},{"kind":"text","text":">("},{"kind":"externalParam","text":"action"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"KeyPath","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"GlobalActionType","preciseIdentifier":"s:7ReducerAAV4lift6action5stateAByqd__qd_0_Gs7KeyPathCyqd__xSgG_s08WritableeF0Cyqd_0_q_Gtr0_lF16GlobalActionTypeL_qd__mfp"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"ActionType","preciseIdentifier":"s:7ReducerAAV10ActionTypexmfp"},{"kind":"text","text":"?>, "},{"kind":"externalParam","text":"state"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"WritableKeyPath","preciseIdentifier":"s:s15WritableKeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"GlobalStateType","preciseIdentifier":"s:7ReducerAAV4lift6action5stateAByqd__qd_0_Gs7KeyPathCyqd__xSgG_s08WritableeF0Cyqd_0_q_Gtr0_lF15GlobalStateTypeL_qd_0_mfp"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"StateType","preciseIdentifier":"s:7ReducerAAV9StateTypeq_mfp"},{"kind":"text","text":">) -> "},{"kind":"typeIdentifier","text":"Reducer","preciseIdentifier":"s:7ReducerAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"GlobalActionType","preciseIdentifier":"s:7ReducerAAV4lift6action5stateAByqd__qd_0_Gs7KeyPathCyqd__xSgG_s08WritableeF0Cyqd_0_q_Gtr0_lF16GlobalActionTypeL_qd__mfp"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"GlobalStateType","preciseIdentifier":"s:7ReducerAAV4lift6action5stateAByqd__qd_0_Gs7KeyPathCyqd__xSgG_s08WritableeF0Cyqd_0_q_Gtr0_lF15GlobalStateTypeL_qd_0_mfp"},{"kind":"text","text":">"}],"abstract":[{"type":"text","text":"A type-lifting method. The global state of your app is "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Whole"}]},{"type":"text","text":", and the "},{"type":"codeVoice","code":"Reducer"},{"type":"text","text":" handles "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Part"}]},{"type":"text","text":", that is a"},{"type":"text","text":" "},{"type":"text","text":"sub-state."}],"identifier":"doc:\/\/Reducer\/documentation\/Reducer\/Reducer\/lift(action:state:)","kind":"symbol","type":"topic","url":"\/documentation\/reducer\/reducer\/lift(action:state:)"},"doc://Reducer/documentation/Reducer/Reducer/lift(state:)":{"role":"symbol","title":"lift(state:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"lift"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"GlobalStateType"},{"kind":"text","text":">("},{"kind":"externalParam","text":"state"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"WritableKeyPath","preciseIdentifier":"s:s15WritableKeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"GlobalStateType","preciseIdentifier":"s:7ReducerAAV4lift5stateAByxqd__Gs15WritableKeyPathCyqd__q_G_tlF15GlobalStateTypeL_qd__mfp"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"StateType","preciseIdentifier":"s:7ReducerAAV9StateTypeq_mfp"},{"kind":"text","text":">) -> "},{"kind":"typeIdentifier","text":"Reducer","preciseIdentifier":"s:7ReducerAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"ActionType","preciseIdentifier":"s:7ReducerAAV10ActionTypexmfp"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"GlobalStateType","preciseIdentifier":"s:7ReducerAAV4lift5stateAByxqd__Gs15WritableKeyPathCyqd__q_G_tlF15GlobalStateTypeL_qd__mfp"},{"kind":"text","text":">"}],"abstract":[{"type":"text","text":"A type-lifting method. The global state of your app is "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Whole"}]},{"type":"text","text":", and the "},{"type":"codeVoice","code":"Reducer"},{"type":"text","text":" handles "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Part"}]},{"type":"text","text":", that is a"},{"type":"text","text":" "},{"type":"text","text":"sub-state."}],"identifier":"doc:\/\/Reducer\/documentation\/Reducer\/Reducer\/lift(state:)","kind":"symbol","type":"topic","url":"\/documentation\/reducer\/reducer\/lift(state:)"},"doc://Reducer/documentation/Reducer/Reducer/liftToCollection(action:stateCollection:)-4gphe":{"role":"symbol","title":"liftToCollection(action:stateCollection:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"liftToCollection"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"GlobalAction"},{"kind":"text","text":", "},{"kind":"genericParameter","text":"GlobalState"},{"kind":"text","text":", "},{"kind":"genericParameter","text":"CollectionState"},{"kind":"text","text":">("},{"kind":"externalParam","text":"action"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"KeyPath","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"GlobalAction","preciseIdentifier":"s:7ReducerAAV16liftToCollection6action05stateD0AByqd__qd_0_Gs7KeyPathCyqd__5IndexQyd_1_5index_xADtSgG_s08WritablegH0Cyqd_0_qd_1_Gt7ElementQyd_1_Rs_SMRd_1_r1_lF12GlobalActionL_qd__mfp"},{"kind":"text","text":", (index"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"CollectionState","preciseIdentifier":"s:7ReducerAAV16liftToCollection6action05stateD0AByqd__qd_0_Gs7KeyPathCyqd__5IndexQyd_1_5index_xADtSgG_s08WritablegH0Cyqd_0_qd_1_Gt7ElementQyd_1_Rs_SMRd_1_r1_lF0D5StateL_qd_1_mfp"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Index","preciseIdentifier":"s:Sl5IndexQa"},{"kind":"text","text":", action"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"ActionType","preciseIdentifier":"s:7ReducerAAV10ActionTypexmfp"},{"kind":"text","text":")?>, "},{"kind":"externalParam","text":"stateCollection"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"WritableKeyPath","preciseIdentifier":"s:s15WritableKeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"GlobalState","preciseIdentifier":"s:7ReducerAAV16liftToCollection6action05stateD0AByqd__qd_0_Gs7KeyPathCyqd__5IndexQyd_1_5index_xADtSgG_s08WritablegH0Cyqd_0_qd_1_Gt7ElementQyd_1_Rs_SMRd_1_r1_lF11GlobalStateL_qd_0_mfp"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"CollectionState","preciseIdentifier":"s:7ReducerAAV16liftToCollection6action05stateD0AByqd__qd_0_Gs7KeyPathCyqd__5IndexQyd_1_5index_xADtSgG_s08WritablegH0Cyqd_0_qd_1_Gt7ElementQyd_1_Rs_SMRd_1_r1_lF0D5StateL_qd_1_mfp"},{"kind":"text","text":">) -> "},{"kind":"typeIdentifier","text":"Reducer","preciseIdentifier":"s:7ReducerAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"GlobalAction","preciseIdentifier":"s:7ReducerAAV16liftToCollection6action05stateD0AByqd__qd_0_Gs7KeyPathCyqd__5IndexQyd_1_5index_xADtSgG_s08WritablegH0Cyqd_0_qd_1_Gt7ElementQyd_1_Rs_SMRd_1_r1_lF12GlobalActionL_qd__mfp"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"GlobalState","preciseIdentifier":"s:7ReducerAAV16liftToCollection6action05stateD0AByqd__qd_0_Gs7KeyPathCyqd__5IndexQyd_1_5index_xADtSgG_s08WritablegH0Cyqd_0_qd_1_Gt7ElementQyd_1_Rs_SMRd_1_r1_lF11GlobalStateL_qd_0_mfp"},{"kind":"text","text":">"}],"abstract":[{"type":"text","text":"A type-lifting method for collections. The global state of your app is "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Whole"}]},{"type":"text","text":", and the "},{"type":"codeVoice","code":"Reducer"},{"type":"text","text":" handles an element"},{"type":"text","text":" "},{"type":"text","text":"that is inside of a collection, which itself is sub-state of the global. Let’s call this single element "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Part"}]},{"type":"text","text":"."}],"identifier":"doc:\/\/Reducer\/documentation\/Reducer\/Reducer\/liftToCollection(action:stateCollection:)-4gphe","kind":"symbol","type":"topic","url":"\/documentation\/reducer\/reducer\/lifttocollection(action:statecollection:)-4gphe"},"doc://Reducer/documentation/Reducer/Reducer/liftToCollection(action:stateCollection:identifier:)":{"role":"symbol","title":"liftToCollection(action:stateCollection:identifier:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"liftToCollection"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"GlobalAction"},{"kind":"text","text":", "},{"kind":"genericParameter","text":"GlobalState"},{"kind":"text","text":", "},{"kind":"genericParameter","text":"CollectionState"},{"kind":"text","text":", "},{"kind":"genericParameter","text":"ID"},{"kind":"text","text":">("},{"kind":"externalParam","text":"action"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"KeyPath","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"GlobalAction","preciseIdentifier":"s:7ReducerAAV16liftToCollection6action05stateD010identifierAByqd__qd_0_Gs7KeyPathCyqd__qd_2_2id_xADtSgG_s08WritablehI0Cyqd_0_qd_1_GAIyq_qd_2_Gt7ElementQyd_1_Rs_SMRd_1_SHRd_2_r2_lF12GlobalActionL_qd__mfp"},{"kind":"text","text":", (id"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"ID","preciseIdentifier":"s:7ReducerAAV16liftToCollection6action05stateD010identifierAByqd__qd_0_Gs7KeyPathCyqd__qd_2_2id_xADtSgG_s08WritablehI0Cyqd_0_qd_1_GAIyq_qd_2_Gt7ElementQyd_1_Rs_SMRd_1_SHRd_2_r2_lF2IDL_qd_2_mfp"},{"kind":"text","text":", action"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"ActionType","preciseIdentifier":"s:7ReducerAAV10ActionTypexmfp"},{"kind":"text","text":")?>, "},{"kind":"externalParam","text":"stateCollection"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"WritableKeyPath","preciseIdentifier":"s:s15WritableKeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"GlobalState","preciseIdentifier":"s:7ReducerAAV16liftToCollection6action05stateD010identifierAByqd__qd_0_Gs7KeyPathCyqd__qd_2_2id_xADtSgG_s08WritablehI0Cyqd_0_qd_1_GAIyq_qd_2_Gt7ElementQyd_1_Rs_SMRd_1_SHRd_2_r2_lF11GlobalStateL_qd_0_mfp"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"CollectionState","preciseIdentifier":"s:7ReducerAAV16liftToCollection6action05stateD010identifierAByqd__qd_0_Gs7KeyPathCyqd__qd_2_2id_xADtSgG_s08WritablehI0Cyqd_0_qd_1_GAIyq_qd_2_Gt7ElementQyd_1_Rs_SMRd_1_SHRd_2_r2_lF0D5StateL_qd_1_mfp"},{"kind":"text","text":">, "},{"kind":"externalParam","text":"identifier"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"KeyPath","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"StateType","preciseIdentifier":"s:7ReducerAAV9StateTypeq_mfp"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"ID","preciseIdentifier":"s:7ReducerAAV16liftToCollection6action05stateD010identifierAByqd__qd_0_Gs7KeyPathCyqd__qd_2_2id_xADtSgG_s08WritablehI0Cyqd_0_qd_1_GAIyq_qd_2_Gt7ElementQyd_1_Rs_SMRd_1_SHRd_2_r2_lF2IDL_qd_2_mfp"},{"kind":"text","text":">) -> "},{"kind":"typeIdentifier","text":"Reducer","preciseIdentifier":"s:7ReducerAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"GlobalAction","preciseIdentifier":"s:7ReducerAAV16liftToCollection6action05stateD010identifierAByqd__qd_0_Gs7KeyPathCyqd__qd_2_2id_xADtSgG_s08WritablehI0Cyqd_0_qd_1_GAIyq_qd_2_Gt7ElementQyd_1_Rs_SMRd_1_SHRd_2_r2_lF12GlobalActionL_qd__mfp"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"GlobalState","preciseIdentifier":"s:7ReducerAAV16liftToCollection6action05stateD010identifierAByqd__qd_0_Gs7KeyPathCyqd__qd_2_2id_xADtSgG_s08WritablehI0Cyqd_0_qd_1_GAIyq_qd_2_Gt7ElementQyd_1_Rs_SMRd_1_SHRd_2_r2_lF11GlobalStateL_qd_0_mfp"},{"kind":"text","text":">"}],"abstract":[{"type":"text","text":"A type-lifting method for collections. The global state of your app is "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Whole"}]},{"type":"text","text":", and the "},{"type":"codeVoice","code":"Reducer"},{"type":"text","text":" handles an element"},{"type":"text","text":" "},{"type":"text","text":"that is inside of a collection, which itself is sub-state of the global. Let’s call this single element "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Part"}]},{"type":"text","text":"."}],"identifier":"doc:\/\/Reducer\/documentation\/Reducer\/Reducer\/liftToCollection(action:stateCollection:identifier:)","kind":"symbol","type":"topic","url":"\/documentation\/reducer\/reducer\/lifttocollection(action:statecollection:identifier:)"},"doc://Reducer/documentation/Reducer/Reducer/compose(content:)":{"role":"symbol","title":"compose(content:)","fragments":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"compose"},{"kind":"text","text":"("},{"kind":"externalParam","text":"content"},{"kind":"text","text":": () -> "},{"kind":"typeIdentifier","text":"Reducer","preciseIdentifier":"s:7ReducerAAV"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Reducer","preciseIdentifier":"s:7ReducerAAV"}],"abstract":[{"type":"text","text":"Composes two or more reducers in series, to be evaluated from the top to the bottom for each incoming action."}],"identifier":"doc:\/\/Reducer\/documentation\/Reducer\/Reducer\/compose(content:)","kind":"symbol","type":"topic","url":"\/documentation\/reducer\/reducer\/compose(content:)"}}} \ No newline at end of file diff --git a/docs/docc/Reducer.doccarchive/data/documentation/reducer/reducer/compose(_:_:).json b/docs/docc/Reducer.doccarchive/data/documentation/reducer/reducer/compose(_:_:).json deleted file mode 100644 index 0aec46c..0000000 --- a/docs/docc/Reducer.doccarchive/data/documentation/reducer/reducer/compose(_:_:).json +++ /dev/null @@ -1 +0,0 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"compose"},{"kind":"text","text":"("},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"kind":"internalParam","text":"first"},{"kind":"text","text":": "},{"kind":"typeIdentifier","identifier":"doc:\/\/Reducer\/documentation\/Reducer\/Reducer","preciseIdentifier":"s:7ReducerAAV","text":"Reducer"},{"kind":"text","text":", "},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"kind":"internalParam","text":"others"},{"kind":"text","text":": "},{"kind":"typeIdentifier","identifier":"doc:\/\/Reducer\/documentation\/Reducer\/Reducer","preciseIdentifier":"s:7ReducerAAV","text":"Reducer"},{"kind":"text","text":"...) -> "},{"kind":"typeIdentifier","identifier":"doc:\/\/Reducer\/documentation\/Reducer\/Reducer","preciseIdentifier":"s:7ReducerAAV","text":"Reducer"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"anchor":"return-value","level":2,"type":"heading","text":"Return Value"},{"type":"paragraph","inlineContent":[{"type":"text","text":"a composed reducer "},{"type":"codeVoice","code":"(ActionType, inout StateType) -> Void"},{"type":"text","text":" equivalent to "},{"type":"codeVoice","code":"g(f(x))"}]}]},{"kind":"parameters","parameters":[{"name":"first","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"First reducer "},{"type":"codeVoice","code":"(ActionType, inout StateType) -> Void"},{"type":"text","text":", let’s call it "},{"type":"codeVoice","code":"f(x)"}]}]},{"name":"others","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"Second, Third, nth reducers "},{"type":"codeVoice","code":"(ActionType, inout StateType) -> Void"},{"type":"text","text":", let’s call it "},{"type":"codeVoice","code":"g(x)"}]}]}]},{"kind":"content","content":[{"anchor":"discussion","level":2,"type":"heading","text":"Discussion"},{"type":"paragraph","inlineContent":[{"type":"text","text":"When composing reducer A with reducer B, when an action X arrives, first it will be forwarded to"},{"type":"text","text":" "},{"type":"text","text":"reducer A together with the initial state. This reducer may return a slightly (or completely) changed state from"},{"type":"text","text":" "},{"type":"text","text":"that operation, and this state will then be forwarded to reducer B together with the same action X. If you change"},{"type":"text","text":" "},{"type":"text","text":"the order, results may vary as you can imagine. Monoids don’t necessarily hold the commutative axiom, although"},{"type":"text","text":" "},{"type":"text","text":"sometimes they do. What they necessarily hold is the associativity axiom, which means that if you compose A and B,"},{"type":"text","text":" "},{"type":"text","text":"and later C, it’s exactly the same as if you compose A to a previously composed B and C:"},{"type":"text","text":" "},{"type":"codeVoice","code":".compose(.compose(A, B), C) == .compose(A, .compose(B, C))"},{"type":"text","text":". So please don’t worry about surrounding your reducers with parenthesis:"}]},{"type":"codeListing","syntax":null,"code":["let globalReducer = .compose(firstReducer, secondReducer, thirdReducer, andSoOn)"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/reducer\/reducer\/compose(_:_:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Reducer\/documentation\/Reducer\/Reducer\/compose(_:_:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Composes two or more reducers in series, to be evaluated from the left to the right for each incoming action."}],"kind":"symbol","metadata":{"role":"symbol","title":"compose(_:_:)","roleHeading":"Type Method","fragments":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"compose"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"Reducer","preciseIdentifier":"s:7ReducerAAV"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"Reducer","preciseIdentifier":"s:7ReducerAAV"},{"kind":"text","text":"...) -> "},{"kind":"typeIdentifier","text":"Reducer","preciseIdentifier":"s:7ReducerAAV"}],"symbolKind":"method","externalID":"s:7ReducerAAV7composeyAByxq_GAD_ADdtFZ","extendedModule":"Reducer","modules":[{"name":"Reducer"}]},"hierarchy":{"paths":[["doc:\/\/Reducer\/documentation\/Reducer","doc:\/\/Reducer\/documentation\/Reducer\/Reducer"]]},"references":{"doc://Reducer/documentation/Reducer/Reducer/compose(_:_:)":{"role":"symbol","title":"compose(_:_:)","fragments":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"compose"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"Reducer","preciseIdentifier":"s:7ReducerAAV"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"Reducer","preciseIdentifier":"s:7ReducerAAV"},{"kind":"text","text":"...) -> "},{"kind":"typeIdentifier","text":"Reducer","preciseIdentifier":"s:7ReducerAAV"}],"abstract":[{"type":"text","text":"Composes two or more reducers in series, to be evaluated from the left to the right for each incoming action."}],"identifier":"doc:\/\/Reducer\/documentation\/Reducer\/Reducer\/compose(_:_:)","kind":"symbol","type":"topic","url":"\/documentation\/reducer\/reducer\/compose(_:_:)"},"doc://Reducer/documentation/Reducer/Reducer":{"role":"symbol","title":"Reducer","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Reducer"}],"abstract":[{"type":"text","text":"An entity that calculates the new state when given current state and an incoming action "},{"type":"codeVoice","code":"(Action, inout State) -> Void"},{"type":"text","text":"."}],"identifier":"doc:\/\/Reducer\/documentation\/Reducer\/Reducer","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Reducer"}],"url":"\/documentation\/reducer\/reducer"},"doc://Reducer/documentation/Reducer":{"role":"collection","title":"Reducer","abstract":[],"identifier":"doc:\/\/Reducer\/documentation\/Reducer","kind":"symbol","type":"topic","url":"\/documentation\/reducer"}}} \ No newline at end of file diff --git a/docs/docc/Reducer.doccarchive/data/documentation/reducer/reducer/compose(content:).json b/docs/docc/Reducer.doccarchive/data/documentation/reducer/reducer/compose(content:).json deleted file mode 100644 index 785b480..0000000 --- a/docs/docc/Reducer.doccarchive/data/documentation/reducer/reducer/compose(content:).json +++ /dev/null @@ -1 +0,0 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"compose"},{"kind":"text","text":"("},{"kind":"externalParam","text":"content"},{"kind":"text","text":": () -> "},{"kind":"typeIdentifier","identifier":"doc:\/\/Reducer\/documentation\/Reducer\/Reducer","preciseIdentifier":"s:7ReducerAAV","text":"Reducer"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","identifier":"doc:\/\/Reducer\/documentation\/Reducer\/Reducer","preciseIdentifier":"s:7ReducerAAV","text":"Reducer"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"anchor":"return-value","level":2,"type":"heading","text":"Return Value"},{"type":"paragraph","inlineContent":[{"type":"text","text":"a composed reducer "},{"type":"codeVoice","code":"(ActionType, inout StateType) -> Void"},{"type":"text","text":" equivalent to running all the internal"},{"type":"text","text":" "},{"type":"text","text":"reducers in series"}]}]},{"kind":"parameters","parameters":[{"name":"content","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"a result builder (DSL) having zero or more reducers to be composed sequentially"}]}]}]},{"kind":"content","content":[{"anchor":"discussion","level":2,"type":"heading","text":"Discussion"},{"type":"paragraph","inlineContent":[{"type":"text","text":"When composing reducer A with reducer B, when an action X arrives, first it will be forwarded to"},{"type":"text","text":" "},{"type":"text","text":"reducer A together with the initial state. This reducer may return a slightly (or completely) changed state from"},{"type":"text","text":" "},{"type":"text","text":"that operation, and this state will then be forwarded to reducer B together with the same action X. If you change"},{"type":"text","text":" "},{"type":"text","text":"the order, results may vary as you can imagine. Monoids don’t necessarily hold the commutative axiom, although"},{"type":"text","text":" "},{"type":"text","text":"sometimes they do."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"For example you can compose reducers like this:"}]},{"type":"codeListing","syntax":null,"code":["Reducer.compose {"," Reducer"," .login"," .lift(action: \\.loginAction, state: \\.loginState)",""," Reducer"," .lifecycle"," .lift(action: \\.lifecycleAction, state: \\.lifecycleState)",""," Reducer.app",""," Reducer.reduce { action, state in"," \/\/ some inline reducer"," }","}"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/reducer\/reducer\/compose(content:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Reducer\/documentation\/Reducer\/Reducer\/compose(content:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Composes two or more reducers in series, to be evaluated from the top to the bottom for each incoming action."}],"kind":"symbol","metadata":{"role":"symbol","title":"compose(content:)","roleHeading":"Type Method","fragments":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"compose"},{"kind":"text","text":"("},{"kind":"externalParam","text":"content"},{"kind":"text","text":": () -> "},{"kind":"typeIdentifier","text":"Reducer","preciseIdentifier":"s:7ReducerAAV"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Reducer","preciseIdentifier":"s:7ReducerAAV"}],"symbolKind":"method","externalID":"s:7ReducerAAV7compose7contentAByxq_GAEyXE_tFZ","extendedModule":"Reducer","modules":[{"name":"Reducer"}]},"hierarchy":{"paths":[["doc:\/\/Reducer\/documentation\/Reducer","doc:\/\/Reducer\/documentation\/Reducer\/Reducer"]]},"references":{"doc://Reducer/documentation/Reducer/Reducer":{"role":"symbol","title":"Reducer","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Reducer"}],"abstract":[{"type":"text","text":"An entity that calculates the new state when given current state and an incoming action "},{"type":"codeVoice","code":"(Action, inout State) -> Void"},{"type":"text","text":"."}],"identifier":"doc:\/\/Reducer\/documentation\/Reducer\/Reducer","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Reducer"}],"url":"\/documentation\/reducer\/reducer"},"doc://Reducer/documentation/Reducer/Reducer/compose(content:)":{"role":"symbol","title":"compose(content:)","fragments":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"compose"},{"kind":"text","text":"("},{"kind":"externalParam","text":"content"},{"kind":"text","text":": () -> "},{"kind":"typeIdentifier","text":"Reducer","preciseIdentifier":"s:7ReducerAAV"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Reducer","preciseIdentifier":"s:7ReducerAAV"}],"abstract":[{"type":"text","text":"Composes two or more reducers in series, to be evaluated from the top to the bottom for each incoming action."}],"identifier":"doc:\/\/Reducer\/documentation\/Reducer\/Reducer\/compose(content:)","kind":"symbol","type":"topic","url":"\/documentation\/reducer\/reducer\/compose(content:)"},"doc://Reducer/documentation/Reducer":{"role":"collection","title":"Reducer","abstract":[],"identifier":"doc:\/\/Reducer\/documentation\/Reducer","kind":"symbol","type":"topic","url":"\/documentation\/reducer"}}} \ No newline at end of file diff --git a/docs/docc/Reducer.doccarchive/data/documentation/reducer/reducer/identity.json b/docs/docc/Reducer.doccarchive/data/documentation/reducer/reducer/identity.json deleted file mode 100644 index 80b15a8..0000000 --- a/docs/docc/Reducer.doccarchive/data/documentation/reducer/reducer/identity.json +++ /dev/null @@ -1 +0,0 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"identity"},{"kind":"text","text":": "},{"kind":"typeIdentifier","identifier":"doc:\/\/Reducer\/documentation\/Reducer\/Reducer","preciseIdentifier":"s:7ReducerAAV","text":"Reducer"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"ActionType","preciseIdentifier":"s:7ReducerAAV10ActionTypexmfp"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"StateType","preciseIdentifier":"s:7ReducerAAV9StateTypeq_mfp"},{"kind":"text","text":"> { "},{"kind":"keyword","text":"get"},{"kind":"text","text":" }"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"anchor":"discussion","level":2,"type":"heading","text":"Discussion"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Therefore:"}]},{"type":"codeListing","syntax":null,"code":[" .compose( Reducer, .identity )","== .compose( .identity, Reducer )","== Reducer"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"This is useful for composition purposes, for example when you call a function "},{"type":"codeVoice","code":"Array.reduce"},{"type":"text","text":" in an array of Reducers and you need a no-op start:"}]},{"type":"codeListing","syntax":null,"code":["[reducer1, reducer2].reduce(.identity) { accumulator, nextReducer in"," Reducer.compose(accumulator, nextReducer)","}","\/\/ .identity won't have any behaviour and the final composition \".identity >>> reducer1, reducer2\" will be as if .identity wasn't there."]},{"type":"paragraph","inlineContent":[{"type":"text","text":"The implementation of this reducer, as one should expect, simply ignores the action and returns the state unchanged"}]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/reducer\/reducer\/identity"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Reducer\/documentation\/Reducer\/Reducer\/identity","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"No-op reducer. Composing it with any other reducer will not change anything from the other reducer behaviour, regardless if the identity reducer"},{"type":"text","text":" "},{"type":"text","text":"is on the left-hand side or the right-hand side or this composition. This is the neutral element in a monoidal composition."}],"kind":"symbol","metadata":{"role":"symbol","title":"identity","roleHeading":"Type Property","fragments":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"identity"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Reducer","preciseIdentifier":"s:7ReducerAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"ActionType","preciseIdentifier":"s:7ReducerAAV10ActionTypexmfp"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"StateType","preciseIdentifier":"s:7ReducerAAV9StateTypeq_mfp"},{"kind":"text","text":">"}],"symbolKind":"property","externalID":"s:7ReducerAAV8identityAByxq_GvpZ","extendedModule":"Reducer","modules":[{"name":"Reducer"}]},"hierarchy":{"paths":[["doc:\/\/Reducer\/documentation\/Reducer","doc:\/\/Reducer\/documentation\/Reducer\/Reducer"]]},"references":{"doc://Reducer/documentation/Reducer/Reducer/identity":{"role":"symbol","title":"identity","fragments":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"identity"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Reducer","preciseIdentifier":"s:7ReducerAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"ActionType","preciseIdentifier":"s:7ReducerAAV10ActionTypexmfp"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"StateType","preciseIdentifier":"s:7ReducerAAV9StateTypeq_mfp"},{"kind":"text","text":">"}],"abstract":[{"type":"text","text":"No-op reducer. Composing it with any other reducer will not change anything from the other reducer behaviour, regardless if the identity reducer"},{"type":"text","text":" "},{"type":"text","text":"is on the left-hand side or the right-hand side or this composition. This is the neutral element in a monoidal composition."}],"identifier":"doc:\/\/Reducer\/documentation\/Reducer\/Reducer\/identity","kind":"symbol","type":"topic","url":"\/documentation\/reducer\/reducer\/identity"},"doc://Reducer/documentation/Reducer":{"role":"collection","title":"Reducer","abstract":[],"identifier":"doc:\/\/Reducer\/documentation\/Reducer","kind":"symbol","type":"topic","url":"\/documentation\/reducer"},"doc://Reducer/documentation/Reducer/Reducer":{"role":"symbol","title":"Reducer","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Reducer"}],"abstract":[{"type":"text","text":"An entity that calculates the new state when given current state and an incoming action "},{"type":"codeVoice","code":"(Action, inout State) -> Void"},{"type":"text","text":"."}],"identifier":"doc:\/\/Reducer\/documentation\/Reducer\/Reducer","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Reducer"}],"url":"\/documentation\/reducer\/reducer"}}} \ No newline at end of file diff --git a/docs/docc/Reducer.doccarchive/data/documentation/reducer/reducer/lift(action:).json b/docs/docc/Reducer.doccarchive/data/documentation/reducer/reducer/lift(action:).json deleted file mode 100644 index e805a8e..0000000 --- a/docs/docc/Reducer.doccarchive/data/documentation/reducer/reducer/lift(action:).json +++ /dev/null @@ -1 +0,0 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"lift"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"GlobalActionType"},{"kind":"text","text":">("},{"kind":"externalParam","text":"action"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"KeyPath","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"GlobalActionType","preciseIdentifier":"s:7ReducerAAV4lift6actionAByqd__q_Gs7KeyPathCyqd__xSgG_tlF16GlobalActionTypeL_qd__mfp"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"ActionType","preciseIdentifier":"s:7ReducerAAV10ActionTypexmfp"},{"kind":"text","text":"?>) -> "},{"kind":"typeIdentifier","identifier":"doc:\/\/Reducer\/documentation\/Reducer\/Reducer","preciseIdentifier":"s:7ReducerAAV","text":"Reducer"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"GlobalActionType","preciseIdentifier":"s:7ReducerAAV4lift6actionAByqd__q_Gs7KeyPathCyqd__xSgG_tlF16GlobalActionTypeL_qd__mfp"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"StateType","preciseIdentifier":"s:7ReducerAAV9StateTypeq_mfp"},{"kind":"text","text":">"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"anchor":"return-value","level":2,"type":"heading","text":"Return Value"},{"type":"paragraph","inlineContent":[{"type":"text","text":"a "},{"type":"codeVoice","code":"Reducer"},{"type":"text","text":" that maps actions and states from the original specialized"},{"type":"text","text":" "},{"type":"text","text":"reducer into a more generic and global reducer, to be used in a larger context."}]}]},{"kind":"parameters","parameters":[{"name":"action","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"a read-only key-path from global action into a local action, but it’s optional because maybe this"},{"type":"text","text":" "},{"type":"text","text":"reducer shouldn’t care about certain actions. Because actions are usually enums, you can switch over"},{"type":"text","text":" "},{"type":"text","text":"the enum and in case it’s nothing you care about, you simply return nil in the closure. If you don’t"},{"type":"text","text":" "},{"type":"text","text":"want to lift this reducer in terms of "},{"type":"codeVoice","code":"action"},{"type":"text","text":", just remove this parameter from the call."}]}]}]},{"kind":"content","content":[{"anchor":"discussion","level":2,"type":"heading","text":"Discussion"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Let’s suppose you may want to have a "},{"type":"codeVoice","code":"gpsReducer"},{"type":"text","text":" that knows about the following "},{"type":"codeVoice","code":"struct"},{"type":"text","text":":"}]},{"type":"codeListing","syntax":null,"code":["struct Location {"," let latitude: Double"," let longitude: Double","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Let’s call it "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Part"}]},{"type":"text","text":". Both, this state and its reducer will be part of an external framework, used by dozens of"},{"type":"text","text":" "},{"type":"text","text":"apps. Internally probably the "},{"type":"codeVoice","code":"Reducer"},{"type":"text","text":" will receive some known "},{"type":"codeVoice","code":"ActionType"},{"type":"text","text":" and calculate a new location. On the"},{"type":"text","text":" "},{"type":"text","text":"main app we have a global state, that we now call "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Whole"}]},{"type":"text","text":"."}]},{"type":"codeListing","syntax":null,"code":["struct MyGlobalState {"," let title: String?"," let listOfItems: [Item]"," let currentLocation: Location","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"As expected, "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Part"}]},{"type":"text","text":" ("},{"type":"codeVoice","code":"Location"},{"type":"text","text":") is a property of "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Whole"}]},{"type":"text","text":" ("},{"type":"codeVoice","code":"MyGlobalState"},{"type":"text","text":"). This relationship could be less"},{"type":"text","text":" "},{"type":"text","text":"direct, for example there could be several levels of properties until you find the "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Part"}]},{"type":"text","text":" in the "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Whole"}]},{"type":"text","text":", like"},{"type":"text","text":" "},{"type":"codeVoice","code":"global.firstLevel.secondLevel.currentLocation"},{"type":"text","text":", but let’s keep it a single-level for this example."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Because our "},{"type":"codeVoice","code":"Store"},{"type":"text","text":" understands "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Whole"}]},{"type":"text","text":" ("},{"type":"codeVoice","code":"MyGlobalState"},{"type":"text","text":") and our "},{"type":"codeVoice","code":"gpsReducer"},{"type":"text","text":" understands "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Part"}]},{"type":"text","text":" ("},{"type":"codeVoice","code":"Location"},{"type":"text","text":"), we"},{"type":"text","text":" "},{"type":"text","text":"must "},{"type":"codeVoice","code":"lift"},{"type":"text","text":" the "},{"type":"codeVoice","code":"Reducer"},{"type":"text","text":" to the "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Whole"}]},{"type":"text","text":" level, by using:"}]},{"type":"codeListing","syntax":null,"code":["let globalStateReducer = gpsReducer.lift("," action: \\.self,"," state: \\.currentLocation",")","\/\/ where:","\/\/ globalStateReducer: Reducer","\/\/ ↑ lift","\/\/ gpsReducer: Reducer"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Now this reducer can be used within our "},{"type":"codeVoice","code":"Store"},{"type":"text","text":" or even composed with others. It also can be used in other apps as"},{"type":"text","text":" "},{"type":"text","text":"long as we have a way to lift it to the world of "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Whole"}]},{"type":"text","text":"."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Same strategy works for the "},{"type":"codeVoice","code":"action"},{"type":"text","text":", as you can guess by the "},{"type":"codeVoice","code":"action"},{"type":"text","text":" KeyPath parameter. You can provide a KeyPath"},{"type":"text","text":" "},{"type":"text","text":"that takes a global action ("},{"type":"emphasis","inlineContent":[{"type":"text","text":"Whole"}]},{"type":"text","text":") and returns an optional local action ("},{"type":"emphasis","inlineContent":[{"type":"text","text":"Part"}]},{"type":"text","text":"). It’s optional because perhaps"},{"type":"text","text":" "},{"type":"text","text":"you want to ignore actions that are not relevant for this reducer."}]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/reducer\/reducer\/lift(action:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Reducer\/documentation\/Reducer\/Reducer\/lift(action:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"A type-lifting method. The global state of your app is "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Whole"}]},{"type":"text","text":", and the "},{"type":"codeVoice","code":"Reducer"},{"type":"text","text":" handles "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Part"}]},{"type":"text","text":", that is a"},{"type":"text","text":" "},{"type":"text","text":"sub-state."}],"kind":"symbol","metadata":{"role":"symbol","title":"lift(action:)","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"lift"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"GlobalActionType"},{"kind":"text","text":">("},{"kind":"externalParam","text":"action"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"KeyPath","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"GlobalActionType","preciseIdentifier":"s:7ReducerAAV4lift6actionAByqd__q_Gs7KeyPathCyqd__xSgG_tlF16GlobalActionTypeL_qd__mfp"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"ActionType","preciseIdentifier":"s:7ReducerAAV10ActionTypexmfp"},{"kind":"text","text":"?>) -> "},{"kind":"typeIdentifier","text":"Reducer","preciseIdentifier":"s:7ReducerAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"GlobalActionType","preciseIdentifier":"s:7ReducerAAV4lift6actionAByqd__q_Gs7KeyPathCyqd__xSgG_tlF16GlobalActionTypeL_qd__mfp"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"StateType","preciseIdentifier":"s:7ReducerAAV9StateTypeq_mfp"},{"kind":"text","text":">"}],"symbolKind":"method","externalID":"s:7ReducerAAV4lift6actionAByqd__q_Gs7KeyPathCyqd__xSgG_tlF","extendedModule":"Reducer","modules":[{"name":"Reducer"}]},"hierarchy":{"paths":[["doc:\/\/Reducer\/documentation\/Reducer","doc:\/\/Reducer\/documentation\/Reducer\/Reducer"]]},"references":{"doc://Reducer/documentation/Reducer/Reducer":{"role":"symbol","title":"Reducer","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Reducer"}],"abstract":[{"type":"text","text":"An entity that calculates the new state when given current state and an incoming action "},{"type":"codeVoice","code":"(Action, inout State) -> Void"},{"type":"text","text":"."}],"identifier":"doc:\/\/Reducer\/documentation\/Reducer\/Reducer","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Reducer"}],"url":"\/documentation\/reducer\/reducer"},"doc://Reducer/documentation/Reducer/Reducer/lift(action:)":{"role":"symbol","title":"lift(action:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"lift"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"GlobalActionType"},{"kind":"text","text":">("},{"kind":"externalParam","text":"action"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"KeyPath","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"GlobalActionType","preciseIdentifier":"s:7ReducerAAV4lift6actionAByqd__q_Gs7KeyPathCyqd__xSgG_tlF16GlobalActionTypeL_qd__mfp"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"ActionType","preciseIdentifier":"s:7ReducerAAV10ActionTypexmfp"},{"kind":"text","text":"?>) -> "},{"kind":"typeIdentifier","text":"Reducer","preciseIdentifier":"s:7ReducerAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"GlobalActionType","preciseIdentifier":"s:7ReducerAAV4lift6actionAByqd__q_Gs7KeyPathCyqd__xSgG_tlF16GlobalActionTypeL_qd__mfp"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"StateType","preciseIdentifier":"s:7ReducerAAV9StateTypeq_mfp"},{"kind":"text","text":">"}],"abstract":[{"type":"text","text":"A type-lifting method. The global state of your app is "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Whole"}]},{"type":"text","text":", and the "},{"type":"codeVoice","code":"Reducer"},{"type":"text","text":" handles "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Part"}]},{"type":"text","text":", that is a"},{"type":"text","text":" "},{"type":"text","text":"sub-state."}],"identifier":"doc:\/\/Reducer\/documentation\/Reducer\/Reducer\/lift(action:)","kind":"symbol","type":"topic","url":"\/documentation\/reducer\/reducer\/lift(action:)"},"doc://Reducer/documentation/Reducer":{"role":"collection","title":"Reducer","abstract":[],"identifier":"doc:\/\/Reducer\/documentation\/Reducer","kind":"symbol","type":"topic","url":"\/documentation\/reducer"}}} \ No newline at end of file diff --git a/docs/docc/Reducer.doccarchive/data/documentation/reducer/reducer/lift(action:state:).json b/docs/docc/Reducer.doccarchive/data/documentation/reducer/reducer/lift(action:state:).json deleted file mode 100644 index 5d8bd1e..0000000 --- a/docs/docc/Reducer.doccarchive/data/documentation/reducer/reducer/lift(action:state:).json +++ /dev/null @@ -1 +0,0 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"lift"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"GlobalActionType"},{"kind":"text","text":", "},{"kind":"genericParameter","text":"GlobalStateType"},{"kind":"text","text":">("},{"kind":"externalParam","text":"action"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"KeyPath","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"GlobalActionType","preciseIdentifier":"s:7ReducerAAV4lift6action5stateAByqd__qd_0_Gs7KeyPathCyqd__xSgG_s08WritableeF0Cyqd_0_q_Gtr0_lF16GlobalActionTypeL_qd__mfp"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"ActionType","preciseIdentifier":"s:7ReducerAAV10ActionTypexmfp"},{"kind":"text","text":"?>, "},{"kind":"externalParam","text":"state"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"WritableKeyPath","preciseIdentifier":"s:s15WritableKeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"GlobalStateType","preciseIdentifier":"s:7ReducerAAV4lift6action5stateAByqd__qd_0_Gs7KeyPathCyqd__xSgG_s08WritableeF0Cyqd_0_q_Gtr0_lF15GlobalStateTypeL_qd_0_mfp"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"StateType","preciseIdentifier":"s:7ReducerAAV9StateTypeq_mfp"},{"kind":"text","text":">) -> "},{"kind":"typeIdentifier","identifier":"doc:\/\/Reducer\/documentation\/Reducer\/Reducer","preciseIdentifier":"s:7ReducerAAV","text":"Reducer"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"GlobalActionType","preciseIdentifier":"s:7ReducerAAV4lift6action5stateAByqd__qd_0_Gs7KeyPathCyqd__xSgG_s08WritableeF0Cyqd_0_q_Gtr0_lF16GlobalActionTypeL_qd__mfp"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"GlobalStateType","preciseIdentifier":"s:7ReducerAAV4lift6action5stateAByqd__qd_0_Gs7KeyPathCyqd__xSgG_s08WritableeF0Cyqd_0_q_Gtr0_lF15GlobalStateTypeL_qd_0_mfp"},{"kind":"text","text":">"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"anchor":"return-value","level":2,"type":"heading","text":"Return Value"},{"type":"paragraph","inlineContent":[{"type":"text","text":"a "},{"type":"codeVoice","code":"Reducer"},{"type":"text","text":" that maps actions and states from the original specialised"},{"type":"text","text":" "},{"type":"text","text":"reducer into a more generic and global reducer, to be used in a larger context."}]}]},{"kind":"parameters","parameters":[{"name":"action","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"a read-only key-path from global action into a local action, but it’s optional because maybe this"},{"type":"text","text":" "},{"type":"text","text":"reducer shouldn’t care about certain actions. Because actions are usually enums, you can switch over"},{"type":"text","text":" "},{"type":"text","text":"the enum and in case it’s nothing you care about, you simply return nil in the closure. If you don’t"},{"type":"text","text":" "},{"type":"text","text":"want to lift this reducer in terms of "},{"type":"codeVoice","code":"action"},{"type":"text","text":", just remove this parameter from the call."}]}]},{"name":"state","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"a writable key-path from global state that traverses into a local state, by extracting only the part"},{"type":"text","text":" "},{"type":"text","text":"that it’s relevant for this reducer. This will also be used to set the new local state into the global"},{"type":"text","text":" "},{"type":"text","text":"state once the reducer finishes it’s operation. For example: "},{"type":"codeVoice","code":"\\.currentGame.scoreBoard"},{"type":"text","text":"."}]}]}]},{"kind":"content","content":[{"anchor":"discussion","level":2,"type":"heading","text":"Discussion"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Let’s suppose you may want to have a "},{"type":"codeVoice","code":"gpsReducer"},{"type":"text","text":" that knows about the following "},{"type":"codeVoice","code":"struct"},{"type":"text","text":":"}]},{"type":"codeListing","syntax":null,"code":["struct Location {"," let latitude: Double"," let longitude: Double","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Let’s call it "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Part"}]},{"type":"text","text":". Both, this state and its reducer will be part of an external framework, used by dozens of"},{"type":"text","text":" "},{"type":"text","text":"apps. Internally probably the "},{"type":"codeVoice","code":"Reducer"},{"type":"text","text":" will receive some known "},{"type":"codeVoice","code":"ActionType"},{"type":"text","text":" and calculate a new location. On the"},{"type":"text","text":" "},{"type":"text","text":"main app we have a global state, that we now call "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Whole"}]},{"type":"text","text":"."}]},{"type":"codeListing","syntax":null,"code":["struct MyGlobalState {"," let title: String?"," let listOfItems: [Item]"," let currentLocation: Location","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"As expected, "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Part"}]},{"type":"text","text":" ("},{"type":"codeVoice","code":"Location"},{"type":"text","text":") is a property of "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Whole"}]},{"type":"text","text":" ("},{"type":"codeVoice","code":"MyGlobalState"},{"type":"text","text":"). This relationship could be less"},{"type":"text","text":" "},{"type":"text","text":"direct, for example there could be several levels of properties until you find the "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Part"}]},{"type":"text","text":" in the "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Whole"}]},{"type":"text","text":", like"},{"type":"text","text":" "},{"type":"codeVoice","code":"global.firstLevel.secondLevel.currentLocation"},{"type":"text","text":", but let’s keep it a single-level for this example."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Because our "},{"type":"codeVoice","code":"Store"},{"type":"text","text":" understands "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Whole"}]},{"type":"text","text":" ("},{"type":"codeVoice","code":"MyGlobalState"},{"type":"text","text":") and our "},{"type":"codeVoice","code":"gpsReducer"},{"type":"text","text":" understands "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Part"}]},{"type":"text","text":" ("},{"type":"codeVoice","code":"Location"},{"type":"text","text":"), we"},{"type":"text","text":" "},{"type":"text","text":"must "},{"type":"codeVoice","code":"lift"},{"type":"text","text":" the "},{"type":"codeVoice","code":"Reducer"},{"type":"text","text":" to the "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Whole"}]},{"type":"text","text":" level, by using:"}]},{"type":"codeListing","syntax":null,"code":["let globalStateReducer = gpsReducer.lift("," action: \\.self,"," state: \\.currentLocation",")","\/\/ where:","\/\/ globalStateReducer: Reducer","\/\/ ↑ lift","\/\/ gpsReducer: Reducer"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Now this reducer can be used within our "},{"type":"codeVoice","code":"Store"},{"type":"text","text":" or even composed with others. It also can be used in other apps as"},{"type":"text","text":" "},{"type":"text","text":"long as we have a way to lift it to the world of "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Whole"}]},{"type":"text","text":"."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Same strategy works for the "},{"type":"codeVoice","code":"action"},{"type":"text","text":", as you can guess by the "},{"type":"codeVoice","code":"action"},{"type":"text","text":" KeyPath parameter. You can provide a KeyPath"},{"type":"text","text":" "},{"type":"text","text":"that takes a global action ("},{"type":"emphasis","inlineContent":[{"type":"text","text":"Whole"}]},{"type":"text","text":") and returns an optional local action ("},{"type":"emphasis","inlineContent":[{"type":"text","text":"Part"}]},{"type":"text","text":"). It’s optional because perhaps"},{"type":"text","text":" "},{"type":"text","text":"you want to ignore actions that are not relevant for this reducer."}]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/reducer\/reducer\/lift(action:state:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Reducer\/documentation\/Reducer\/Reducer\/lift(action:state:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"A type-lifting method. The global state of your app is "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Whole"}]},{"type":"text","text":", and the "},{"type":"codeVoice","code":"Reducer"},{"type":"text","text":" handles "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Part"}]},{"type":"text","text":", that is a"},{"type":"text","text":" "},{"type":"text","text":"sub-state."}],"kind":"symbol","metadata":{"role":"symbol","title":"lift(action:state:)","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"lift"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"GlobalActionType"},{"kind":"text","text":", "},{"kind":"genericParameter","text":"GlobalStateType"},{"kind":"text","text":">("},{"kind":"externalParam","text":"action"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"KeyPath","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"GlobalActionType","preciseIdentifier":"s:7ReducerAAV4lift6action5stateAByqd__qd_0_Gs7KeyPathCyqd__xSgG_s08WritableeF0Cyqd_0_q_Gtr0_lF16GlobalActionTypeL_qd__mfp"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"ActionType","preciseIdentifier":"s:7ReducerAAV10ActionTypexmfp"},{"kind":"text","text":"?>, "},{"kind":"externalParam","text":"state"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"WritableKeyPath","preciseIdentifier":"s:s15WritableKeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"GlobalStateType","preciseIdentifier":"s:7ReducerAAV4lift6action5stateAByqd__qd_0_Gs7KeyPathCyqd__xSgG_s08WritableeF0Cyqd_0_q_Gtr0_lF15GlobalStateTypeL_qd_0_mfp"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"StateType","preciseIdentifier":"s:7ReducerAAV9StateTypeq_mfp"},{"kind":"text","text":">) -> "},{"kind":"typeIdentifier","text":"Reducer","preciseIdentifier":"s:7ReducerAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"GlobalActionType","preciseIdentifier":"s:7ReducerAAV4lift6action5stateAByqd__qd_0_Gs7KeyPathCyqd__xSgG_s08WritableeF0Cyqd_0_q_Gtr0_lF16GlobalActionTypeL_qd__mfp"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"GlobalStateType","preciseIdentifier":"s:7ReducerAAV4lift6action5stateAByqd__qd_0_Gs7KeyPathCyqd__xSgG_s08WritableeF0Cyqd_0_q_Gtr0_lF15GlobalStateTypeL_qd_0_mfp"},{"kind":"text","text":">"}],"symbolKind":"method","externalID":"s:7ReducerAAV4lift6action5stateAByqd__qd_0_Gs7KeyPathCyqd__xSgG_s08WritableeF0Cyqd_0_q_Gtr0_lF","extendedModule":"Reducer","modules":[{"name":"Reducer"}]},"hierarchy":{"paths":[["doc:\/\/Reducer\/documentation\/Reducer","doc:\/\/Reducer\/documentation\/Reducer\/Reducer"]]},"references":{"doc://Reducer/documentation/Reducer":{"role":"collection","title":"Reducer","abstract":[],"identifier":"doc:\/\/Reducer\/documentation\/Reducer","kind":"symbol","type":"topic","url":"\/documentation\/reducer"},"doc://Reducer/documentation/Reducer/Reducer/lift(action:state:)":{"role":"symbol","title":"lift(action:state:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"lift"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"GlobalActionType"},{"kind":"text","text":", "},{"kind":"genericParameter","text":"GlobalStateType"},{"kind":"text","text":">("},{"kind":"externalParam","text":"action"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"KeyPath","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"GlobalActionType","preciseIdentifier":"s:7ReducerAAV4lift6action5stateAByqd__qd_0_Gs7KeyPathCyqd__xSgG_s08WritableeF0Cyqd_0_q_Gtr0_lF16GlobalActionTypeL_qd__mfp"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"ActionType","preciseIdentifier":"s:7ReducerAAV10ActionTypexmfp"},{"kind":"text","text":"?>, "},{"kind":"externalParam","text":"state"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"WritableKeyPath","preciseIdentifier":"s:s15WritableKeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"GlobalStateType","preciseIdentifier":"s:7ReducerAAV4lift6action5stateAByqd__qd_0_Gs7KeyPathCyqd__xSgG_s08WritableeF0Cyqd_0_q_Gtr0_lF15GlobalStateTypeL_qd_0_mfp"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"StateType","preciseIdentifier":"s:7ReducerAAV9StateTypeq_mfp"},{"kind":"text","text":">) -> "},{"kind":"typeIdentifier","text":"Reducer","preciseIdentifier":"s:7ReducerAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"GlobalActionType","preciseIdentifier":"s:7ReducerAAV4lift6action5stateAByqd__qd_0_Gs7KeyPathCyqd__xSgG_s08WritableeF0Cyqd_0_q_Gtr0_lF16GlobalActionTypeL_qd__mfp"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"GlobalStateType","preciseIdentifier":"s:7ReducerAAV4lift6action5stateAByqd__qd_0_Gs7KeyPathCyqd__xSgG_s08WritableeF0Cyqd_0_q_Gtr0_lF15GlobalStateTypeL_qd_0_mfp"},{"kind":"text","text":">"}],"abstract":[{"type":"text","text":"A type-lifting method. The global state of your app is "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Whole"}]},{"type":"text","text":", and the "},{"type":"codeVoice","code":"Reducer"},{"type":"text","text":" handles "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Part"}]},{"type":"text","text":", that is a"},{"type":"text","text":" "},{"type":"text","text":"sub-state."}],"identifier":"doc:\/\/Reducer\/documentation\/Reducer\/Reducer\/lift(action:state:)","kind":"symbol","type":"topic","url":"\/documentation\/reducer\/reducer\/lift(action:state:)"},"doc://Reducer/documentation/Reducer/Reducer":{"role":"symbol","title":"Reducer","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Reducer"}],"abstract":[{"type":"text","text":"An entity that calculates the new state when given current state and an incoming action "},{"type":"codeVoice","code":"(Action, inout State) -> Void"},{"type":"text","text":"."}],"identifier":"doc:\/\/Reducer\/documentation\/Reducer\/Reducer","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Reducer"}],"url":"\/documentation\/reducer\/reducer"}}} \ No newline at end of file diff --git a/docs/docc/Reducer.doccarchive/data/documentation/reducer/reducer/lift(actiongetter:stategetter:statesetter:).json b/docs/docc/Reducer.doccarchive/data/documentation/reducer/reducer/lift(actiongetter:stategetter:statesetter:).json deleted file mode 100644 index aff1115..0000000 --- a/docs/docc/Reducer.doccarchive/data/documentation/reducer/reducer/lift(actiongetter:stategetter:statesetter:).json +++ /dev/null @@ -1 +0,0 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"lift"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"GlobalActionType"},{"kind":"text","text":", "},{"kind":"genericParameter","text":"GlobalStateType"},{"kind":"text","text":">("},{"kind":"externalParam","text":"actionGetter"},{"kind":"text","text":": "},{"kind":"attribute","text":"@escaping"},{"kind":"text","text":" ("},{"kind":"typeIdentifier","text":"GlobalActionType","preciseIdentifier":"s:7ReducerAAV4lift12actionGetter05stateD00E6SetterAByqd__qd_0_GxSgqd__c_q_qd_0_cyqd_0_z_q_tctr0_lF16GlobalActionTypeL_qd__mfp"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"ActionType","preciseIdentifier":"s:7ReducerAAV10ActionTypexmfp"},{"kind":"text","text":"?, "},{"kind":"externalParam","text":"stateGetter"},{"kind":"text","text":": "},{"kind":"attribute","text":"@escaping"},{"kind":"text","text":" ("},{"kind":"typeIdentifier","text":"GlobalStateType","preciseIdentifier":"s:7ReducerAAV4lift12actionGetter05stateD00E6SetterAByqd__qd_0_GxSgqd__c_q_qd_0_cyqd_0_z_q_tctr0_lF15GlobalStateTypeL_qd_0_mfp"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"StateType","preciseIdentifier":"s:7ReducerAAV9StateTypeq_mfp"},{"kind":"text","text":", "},{"kind":"externalParam","text":"stateSetter"},{"kind":"text","text":": "},{"kind":"attribute","text":"@escaping"},{"kind":"text","text":" ("},{"kind":"keyword","text":"inout"},{"kind":"text","text":" "},{"kind":"typeIdentifier","text":"GlobalStateType","preciseIdentifier":"s:7ReducerAAV4lift12actionGetter05stateD00E6SetterAByqd__qd_0_GxSgqd__c_q_qd_0_cyqd_0_z_q_tctr0_lF15GlobalStateTypeL_qd_0_mfp"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"StateType","preciseIdentifier":"s:7ReducerAAV9StateTypeq_mfp"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Void","preciseIdentifier":"s:s4Voida"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","identifier":"doc:\/\/Reducer\/documentation\/Reducer\/Reducer","preciseIdentifier":"s:7ReducerAAV","text":"Reducer"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"GlobalActionType","preciseIdentifier":"s:7ReducerAAV4lift12actionGetter05stateD00E6SetterAByqd__qd_0_GxSgqd__c_q_qd_0_cyqd_0_z_q_tctr0_lF16GlobalActionTypeL_qd__mfp"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"GlobalStateType","preciseIdentifier":"s:7ReducerAAV4lift12actionGetter05stateD00E6SetterAByqd__qd_0_GxSgqd__c_q_qd_0_cyqd_0_z_q_tctr0_lF15GlobalStateTypeL_qd_0_mfp"},{"kind":"text","text":">"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"anchor":"return-value","level":2,"type":"heading","text":"Return Value"},{"type":"paragraph","inlineContent":[{"type":"text","text":"a "},{"type":"codeVoice","code":"Reducer"},{"type":"text","text":" that maps actions and states from the original specialised"},{"type":"text","text":" "},{"type":"text","text":"reducer into a more generic and global reducer, to be used in a larger context."}]}]},{"kind":"parameters","parameters":[{"name":"actionGetter","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"a way to convert a global action into a local action, but it’s optional because maybe this"},{"type":"text","text":" "},{"type":"text","text":"reducer shouldn’t care about certain actions. Because actions are usually enums, you can switch"},{"type":"text","text":" "},{"type":"text","text":"over the enum and in case it’s nothing you care about, you simply return nil in the closure. If"},{"type":"text","text":" "},{"type":"text","text":"you don’t want to lift this reducer in terms of "},{"type":"codeVoice","code":"action"},{"type":"text","text":", just provide the identity function"},{"type":"text","text":" "},{"type":"codeVoice","code":"{ $0 }"},{"type":"text","text":" as input."}]}]},{"name":"stateGetter","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"a way to read from a global state and extract only the part that it’s relevant for this reducer,"},{"type":"text","text":" "},{"type":"text","text":"by traversing the tree of the global state until you find the property you want, for example:"},{"type":"text","text":" "},{"type":"codeVoice","code":"{ $0.currentGame.scoreBoard }"}]}]},{"name":"stateSetter","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"a way to write back into the global state once you finished reducing the "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Part"}]},{"type":"text","text":", so now you have"},{"type":"text","text":" "},{"type":"text","text":"a new part that was calculated by this reducer and you want to set it into the global state, also"},{"type":"text","text":" "},{"type":"text","text":"provided as the first parameter as an "},{"type":"codeVoice","code":"inout"},{"type":"text","text":" property:"},{"type":"text","text":" "},{"type":"codeVoice","code":"{ globalState, newScoreBoard in globalState.currentGame.scoreBoard = newScoreBoard }"}]}]}]},{"kind":"content","content":[{"anchor":"discussion","level":2,"type":"heading","text":"Discussion"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Let’s suppose you may want to have a "},{"type":"codeVoice","code":"gpsReducer"},{"type":"text","text":" that knows about the following "},{"type":"codeVoice","code":"struct"},{"type":"text","text":":"}]},{"type":"codeListing","syntax":null,"code":["struct Location {"," let latitude: Double"," let longitude: Double","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Let’s call it "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Part"}]},{"type":"text","text":". Both, this state and its reducer will be part of an external framework, used by dozens of"},{"type":"text","text":" "},{"type":"text","text":"apps. Internally probably the "},{"type":"codeVoice","code":"Reducer"},{"type":"text","text":" will receive some known "},{"type":"codeVoice","code":"ActionType"},{"type":"text","text":" and calculate a new location. On the"},{"type":"text","text":" "},{"type":"text","text":"main app we have a global state, that we now call "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Whole"}]},{"type":"text","text":"."}]},{"type":"codeListing","syntax":null,"code":["struct MyGlobalState {"," let title: String?"," let listOfItems: [Item]"," let currentLocation: Location","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"As expected, "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Part"}]},{"type":"text","text":" ("},{"type":"codeVoice","code":"Location"},{"type":"text","text":") is a property of "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Whole"}]},{"type":"text","text":" ("},{"type":"codeVoice","code":"MyGlobalState"},{"type":"text","text":"). This relationship could be less"},{"type":"text","text":" "},{"type":"text","text":"direct, for example there could be several levels of properties until you find the "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Part"}]},{"type":"text","text":" in the "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Whole"}]},{"type":"text","text":", like"},{"type":"text","text":" "},{"type":"codeVoice","code":"global.firstLevel.secondLevel.currentLocation"},{"type":"text","text":", but let’s keep it a single-level for this example."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Because our "},{"type":"codeVoice","code":"Store"},{"type":"text","text":" understands "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Whole"}]},{"type":"text","text":" ("},{"type":"codeVoice","code":"MyGlobalState"},{"type":"text","text":") and our "},{"type":"codeVoice","code":"gpsReducer"},{"type":"text","text":" understands "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Part"}]},{"type":"text","text":" ("},{"type":"codeVoice","code":"Location"},{"type":"text","text":"), we"},{"type":"text","text":" "},{"type":"text","text":"must "},{"type":"codeVoice","code":"lift"},{"type":"text","text":" the "},{"type":"codeVoice","code":"Reducer"},{"type":"text","text":" to the "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Whole"}]},{"type":"text","text":" level, by using:"}]},{"type":"codeListing","syntax":null,"code":["let globalStateReducer = gpsReducer.lift("," actionGetter: { $0 },"," stateGetter: { global in global.currentLocation },"," stateSetter: { global, part in global.currentLocation = path }",")","\/\/ where:","\/\/ globalStateReducer: Reducer","\/\/ ↑ lift","\/\/ gpsReducer: Reducer"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Now this reducer can be used within our "},{"type":"codeVoice","code":"Store"},{"type":"text","text":" or even composed with others. It also can be used in other apps as"},{"type":"text","text":" "},{"type":"text","text":"long as we have a way to lift it to the world of "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Whole"}]},{"type":"text","text":"."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Same strategy works for the "},{"type":"codeVoice","code":"action"},{"type":"text","text":", as you can guess by the "},{"type":"codeVoice","code":"actionGetter"},{"type":"text","text":" parameter. You can provide a function"},{"type":"text","text":" "},{"type":"text","text":"that takes a global action ("},{"type":"emphasis","inlineContent":[{"type":"text","text":"Whole"}]},{"type":"text","text":") and returns an optional local action ("},{"type":"emphasis","inlineContent":[{"type":"text","text":"Part"}]},{"type":"text","text":"). It’s optional because perhaps"},{"type":"text","text":" "},{"type":"text","text":"you want to ignore actions that are not relevant for this reducer."}]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/reducer\/reducer\/lift(actiongetter:stategetter:statesetter:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Reducer\/documentation\/Reducer\/Reducer\/lift(actionGetter:stateGetter:stateSetter:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"A type-lifting method. The global state of your app is "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Whole"}]},{"type":"text","text":", and the "},{"type":"codeVoice","code":"Reducer"},{"type":"text","text":" handles "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Part"}]},{"type":"text","text":", that is a"},{"type":"text","text":" "},{"type":"text","text":"sub-state."}],"kind":"symbol","metadata":{"role":"symbol","title":"lift(actionGetter:stateGetter:stateSetter:)","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"lift"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"GlobalActionType"},{"kind":"text","text":", "},{"kind":"genericParameter","text":"GlobalStateType"},{"kind":"text","text":">("},{"kind":"externalParam","text":"actionGetter"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"GlobalActionType","preciseIdentifier":"s:7ReducerAAV4lift12actionGetter05stateD00E6SetterAByqd__qd_0_GxSgqd__c_q_qd_0_cyqd_0_z_q_tctr0_lF16GlobalActionTypeL_qd__mfp"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"ActionType","preciseIdentifier":"s:7ReducerAAV10ActionTypexmfp"},{"kind":"text","text":"?, "},{"kind":"externalParam","text":"stateGetter"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"GlobalStateType","preciseIdentifier":"s:7ReducerAAV4lift12actionGetter05stateD00E6SetterAByqd__qd_0_GxSgqd__c_q_qd_0_cyqd_0_z_q_tctr0_lF15GlobalStateTypeL_qd_0_mfp"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"StateType","preciseIdentifier":"s:7ReducerAAV9StateTypeq_mfp"},{"kind":"text","text":", "},{"kind":"externalParam","text":"stateSetter"},{"kind":"text","text":": ("},{"kind":"keyword","text":"inout"},{"kind":"text","text":" "},{"kind":"typeIdentifier","text":"GlobalStateType","preciseIdentifier":"s:7ReducerAAV4lift12actionGetter05stateD00E6SetterAByqd__qd_0_GxSgqd__c_q_qd_0_cyqd_0_z_q_tctr0_lF15GlobalStateTypeL_qd_0_mfp"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"StateType","preciseIdentifier":"s:7ReducerAAV9StateTypeq_mfp"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Void","preciseIdentifier":"s:s4Voida"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Reducer","preciseIdentifier":"s:7ReducerAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"GlobalActionType","preciseIdentifier":"s:7ReducerAAV4lift12actionGetter05stateD00E6SetterAByqd__qd_0_GxSgqd__c_q_qd_0_cyqd_0_z_q_tctr0_lF16GlobalActionTypeL_qd__mfp"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"GlobalStateType","preciseIdentifier":"s:7ReducerAAV4lift12actionGetter05stateD00E6SetterAByqd__qd_0_GxSgqd__c_q_qd_0_cyqd_0_z_q_tctr0_lF15GlobalStateTypeL_qd_0_mfp"},{"kind":"text","text":">"}],"symbolKind":"method","externalID":"s:7ReducerAAV4lift12actionGetter05stateD00E6SetterAByqd__qd_0_GxSgqd__c_q_qd_0_cyqd_0_z_q_tctr0_lF","extendedModule":"Reducer","modules":[{"name":"Reducer"}]},"hierarchy":{"paths":[["doc:\/\/Reducer\/documentation\/Reducer","doc:\/\/Reducer\/documentation\/Reducer\/Reducer"]]},"references":{"doc://Reducer/documentation/Reducer/Reducer/lift(actionGetter:stateGetter:stateSetter:)":{"role":"symbol","title":"lift(actionGetter:stateGetter:stateSetter:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"lift"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"GlobalActionType"},{"kind":"text","text":", "},{"kind":"genericParameter","text":"GlobalStateType"},{"kind":"text","text":">("},{"kind":"externalParam","text":"actionGetter"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"GlobalActionType","preciseIdentifier":"s:7ReducerAAV4lift12actionGetter05stateD00E6SetterAByqd__qd_0_GxSgqd__c_q_qd_0_cyqd_0_z_q_tctr0_lF16GlobalActionTypeL_qd__mfp"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"ActionType","preciseIdentifier":"s:7ReducerAAV10ActionTypexmfp"},{"kind":"text","text":"?, "},{"kind":"externalParam","text":"stateGetter"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"GlobalStateType","preciseIdentifier":"s:7ReducerAAV4lift12actionGetter05stateD00E6SetterAByqd__qd_0_GxSgqd__c_q_qd_0_cyqd_0_z_q_tctr0_lF15GlobalStateTypeL_qd_0_mfp"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"StateType","preciseIdentifier":"s:7ReducerAAV9StateTypeq_mfp"},{"kind":"text","text":", "},{"kind":"externalParam","text":"stateSetter"},{"kind":"text","text":": ("},{"kind":"keyword","text":"inout"},{"kind":"text","text":" "},{"kind":"typeIdentifier","text":"GlobalStateType","preciseIdentifier":"s:7ReducerAAV4lift12actionGetter05stateD00E6SetterAByqd__qd_0_GxSgqd__c_q_qd_0_cyqd_0_z_q_tctr0_lF15GlobalStateTypeL_qd_0_mfp"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"StateType","preciseIdentifier":"s:7ReducerAAV9StateTypeq_mfp"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Void","preciseIdentifier":"s:s4Voida"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Reducer","preciseIdentifier":"s:7ReducerAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"GlobalActionType","preciseIdentifier":"s:7ReducerAAV4lift12actionGetter05stateD00E6SetterAByqd__qd_0_GxSgqd__c_q_qd_0_cyqd_0_z_q_tctr0_lF16GlobalActionTypeL_qd__mfp"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"GlobalStateType","preciseIdentifier":"s:7ReducerAAV4lift12actionGetter05stateD00E6SetterAByqd__qd_0_GxSgqd__c_q_qd_0_cyqd_0_z_q_tctr0_lF15GlobalStateTypeL_qd_0_mfp"},{"kind":"text","text":">"}],"abstract":[{"type":"text","text":"A type-lifting method. The global state of your app is "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Whole"}]},{"type":"text","text":", and the "},{"type":"codeVoice","code":"Reducer"},{"type":"text","text":" handles "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Part"}]},{"type":"text","text":", that is a"},{"type":"text","text":" "},{"type":"text","text":"sub-state."}],"identifier":"doc:\/\/Reducer\/documentation\/Reducer\/Reducer\/lift(actionGetter:stateGetter:stateSetter:)","kind":"symbol","type":"topic","url":"\/documentation\/reducer\/reducer\/lift(actiongetter:stategetter:statesetter:)"},"doc://Reducer/documentation/Reducer/Reducer":{"role":"symbol","title":"Reducer","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Reducer"}],"abstract":[{"type":"text","text":"An entity that calculates the new state when given current state and an incoming action "},{"type":"codeVoice","code":"(Action, inout State) -> Void"},{"type":"text","text":"."}],"identifier":"doc:\/\/Reducer\/documentation\/Reducer\/Reducer","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Reducer"}],"url":"\/documentation\/reducer\/reducer"},"doc://Reducer/documentation/Reducer":{"role":"collection","title":"Reducer","abstract":[],"identifier":"doc:\/\/Reducer\/documentation\/Reducer","kind":"symbol","type":"topic","url":"\/documentation\/reducer"}}} \ No newline at end of file diff --git a/docs/docc/Reducer.doccarchive/data/documentation/reducer/reducer/lift(state:).json b/docs/docc/Reducer.doccarchive/data/documentation/reducer/reducer/lift(state:).json deleted file mode 100644 index 4b8644a..0000000 --- a/docs/docc/Reducer.doccarchive/data/documentation/reducer/reducer/lift(state:).json +++ /dev/null @@ -1 +0,0 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"lift"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"GlobalStateType"},{"kind":"text","text":">("},{"kind":"externalParam","text":"state"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"WritableKeyPath","preciseIdentifier":"s:s15WritableKeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"GlobalStateType","preciseIdentifier":"s:7ReducerAAV4lift5stateAByxqd__Gs15WritableKeyPathCyqd__q_G_tlF15GlobalStateTypeL_qd__mfp"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"StateType","preciseIdentifier":"s:7ReducerAAV9StateTypeq_mfp"},{"kind":"text","text":">) -> "},{"kind":"typeIdentifier","identifier":"doc:\/\/Reducer\/documentation\/Reducer\/Reducer","preciseIdentifier":"s:7ReducerAAV","text":"Reducer"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"ActionType","preciseIdentifier":"s:7ReducerAAV10ActionTypexmfp"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"GlobalStateType","preciseIdentifier":"s:7ReducerAAV4lift5stateAByxqd__Gs15WritableKeyPathCyqd__q_G_tlF15GlobalStateTypeL_qd__mfp"},{"kind":"text","text":">"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"anchor":"return-value","level":2,"type":"heading","text":"Return Value"},{"type":"paragraph","inlineContent":[{"type":"text","text":"a "},{"type":"codeVoice","code":"Reducer"},{"type":"text","text":" that maps actions and states from the original specialized"},{"type":"text","text":" "},{"type":"text","text":"reducer into a more generic and global reducer, to be used in a larger context."}]}]},{"kind":"parameters","parameters":[{"name":"state","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"a writable key-path from global state that traverses into a local state, by extracting only the part"},{"type":"text","text":" "},{"type":"text","text":"that it’s relevant for this reducer. This will also be used to set the new local state into the global"},{"type":"text","text":" "},{"type":"text","text":"state once the reducer finishes it’s operation. For example: "},{"type":"codeVoice","code":"\\.currentGame.scoreBoard"},{"type":"text","text":"."}]}]}]},{"kind":"content","content":[{"anchor":"discussion","level":2,"type":"heading","text":"Discussion"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Let’s suppose you may want to have a "},{"type":"codeVoice","code":"gpsReducer"},{"type":"text","text":" that knows about the following "},{"type":"codeVoice","code":"struct"},{"type":"text","text":":"}]},{"type":"codeListing","syntax":null,"code":["struct Location {"," let latitude: Double"," let longitude: Double","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Let’s call it "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Part"}]},{"type":"text","text":". Both, this state and its reducer will be part of an external framework, used by dozens of"},{"type":"text","text":" "},{"type":"text","text":"apps. Internally probably the "},{"type":"codeVoice","code":"Reducer"},{"type":"text","text":" will receive some known "},{"type":"codeVoice","code":"ActionType"},{"type":"text","text":" and calculate a new location. On the"},{"type":"text","text":" "},{"type":"text","text":"main app we have a global state, that we now call "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Whole"}]},{"type":"text","text":"."}]},{"type":"codeListing","syntax":null,"code":["struct MyGlobalState {"," let title: String?"," let listOfItems: [Item]"," let currentLocation: Location","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"As expected, "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Part"}]},{"type":"text","text":" ("},{"type":"codeVoice","code":"Location"},{"type":"text","text":") is a property of "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Whole"}]},{"type":"text","text":" ("},{"type":"codeVoice","code":"MyGlobalState"},{"type":"text","text":"). This relationship could be less"},{"type":"text","text":" "},{"type":"text","text":"direct, for example there could be several levels of properties until you find the "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Part"}]},{"type":"text","text":" in the "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Whole"}]},{"type":"text","text":", like"},{"type":"text","text":" "},{"type":"codeVoice","code":"global.firstLevel.secondLevel.currentLocation"},{"type":"text","text":", but let’s keep it a single-level for this example."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Because our "},{"type":"codeVoice","code":"Store"},{"type":"text","text":" understands "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Whole"}]},{"type":"text","text":" ("},{"type":"codeVoice","code":"MyGlobalState"},{"type":"text","text":") and our "},{"type":"codeVoice","code":"gpsReducer"},{"type":"text","text":" understands "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Part"}]},{"type":"text","text":" ("},{"type":"codeVoice","code":"Location"},{"type":"text","text":"), we"},{"type":"text","text":" "},{"type":"text","text":"must "},{"type":"codeVoice","code":"lift"},{"type":"text","text":" the "},{"type":"codeVoice","code":"Reducer"},{"type":"text","text":" to the "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Whole"}]},{"type":"text","text":" level, by using:"}]},{"type":"codeListing","syntax":null,"code":["let globalStateReducer = gpsReducer.lift("," action: \\.self,"," state: \\.currentLocation",")","\/\/ where:","\/\/ globalStateReducer: Reducer","\/\/ ↑ lift","\/\/ gpsReducer: Reducer"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Now this reducer can be used within our "},{"type":"codeVoice","code":"Store"},{"type":"text","text":" or even composed with others. It also can be used in other apps as"},{"type":"text","text":" "},{"type":"text","text":"long as we have a way to lift it to the world of "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Whole"}]},{"type":"text","text":"."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Same strategy works for the "},{"type":"codeVoice","code":"action"},{"type":"text","text":", as you can guess by the "},{"type":"codeVoice","code":"action"},{"type":"text","text":" KeyPath parameter. You can provide a KeyPath"},{"type":"text","text":" "},{"type":"text","text":"that takes a global action ("},{"type":"emphasis","inlineContent":[{"type":"text","text":"Whole"}]},{"type":"text","text":") and returns an optional local action ("},{"type":"emphasis","inlineContent":[{"type":"text","text":"Part"}]},{"type":"text","text":"). It’s optional because perhaps"},{"type":"text","text":" "},{"type":"text","text":"you want to ignore actions that are not relevant for this reducer."}]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/reducer\/reducer\/lift(state:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Reducer\/documentation\/Reducer\/Reducer\/lift(state:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"A type-lifting method. The global state of your app is "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Whole"}]},{"type":"text","text":", and the "},{"type":"codeVoice","code":"Reducer"},{"type":"text","text":" handles "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Part"}]},{"type":"text","text":", that is a"},{"type":"text","text":" "},{"type":"text","text":"sub-state."}],"kind":"symbol","metadata":{"role":"symbol","title":"lift(state:)","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"lift"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"GlobalStateType"},{"kind":"text","text":">("},{"kind":"externalParam","text":"state"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"WritableKeyPath","preciseIdentifier":"s:s15WritableKeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"GlobalStateType","preciseIdentifier":"s:7ReducerAAV4lift5stateAByxqd__Gs15WritableKeyPathCyqd__q_G_tlF15GlobalStateTypeL_qd__mfp"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"StateType","preciseIdentifier":"s:7ReducerAAV9StateTypeq_mfp"},{"kind":"text","text":">) -> "},{"kind":"typeIdentifier","text":"Reducer","preciseIdentifier":"s:7ReducerAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"ActionType","preciseIdentifier":"s:7ReducerAAV10ActionTypexmfp"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"GlobalStateType","preciseIdentifier":"s:7ReducerAAV4lift5stateAByxqd__Gs15WritableKeyPathCyqd__q_G_tlF15GlobalStateTypeL_qd__mfp"},{"kind":"text","text":">"}],"symbolKind":"method","externalID":"s:7ReducerAAV4lift5stateAByxqd__Gs15WritableKeyPathCyqd__q_G_tlF","extendedModule":"Reducer","modules":[{"name":"Reducer"}]},"hierarchy":{"paths":[["doc:\/\/Reducer\/documentation\/Reducer","doc:\/\/Reducer\/documentation\/Reducer\/Reducer"]]},"references":{"doc://Reducer/documentation/Reducer/Reducer/lift(state:)":{"role":"symbol","title":"lift(state:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"lift"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"GlobalStateType"},{"kind":"text","text":">("},{"kind":"externalParam","text":"state"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"WritableKeyPath","preciseIdentifier":"s:s15WritableKeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"GlobalStateType","preciseIdentifier":"s:7ReducerAAV4lift5stateAByxqd__Gs15WritableKeyPathCyqd__q_G_tlF15GlobalStateTypeL_qd__mfp"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"StateType","preciseIdentifier":"s:7ReducerAAV9StateTypeq_mfp"},{"kind":"text","text":">) -> "},{"kind":"typeIdentifier","text":"Reducer","preciseIdentifier":"s:7ReducerAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"ActionType","preciseIdentifier":"s:7ReducerAAV10ActionTypexmfp"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"GlobalStateType","preciseIdentifier":"s:7ReducerAAV4lift5stateAByxqd__Gs15WritableKeyPathCyqd__q_G_tlF15GlobalStateTypeL_qd__mfp"},{"kind":"text","text":">"}],"abstract":[{"type":"text","text":"A type-lifting method. The global state of your app is "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Whole"}]},{"type":"text","text":", and the "},{"type":"codeVoice","code":"Reducer"},{"type":"text","text":" handles "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Part"}]},{"type":"text","text":", that is a"},{"type":"text","text":" "},{"type":"text","text":"sub-state."}],"identifier":"doc:\/\/Reducer\/documentation\/Reducer\/Reducer\/lift(state:)","kind":"symbol","type":"topic","url":"\/documentation\/reducer\/reducer\/lift(state:)"},"doc://Reducer/documentation/Reducer/Reducer":{"role":"symbol","title":"Reducer","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Reducer"}],"abstract":[{"type":"text","text":"An entity that calculates the new state when given current state and an incoming action "},{"type":"codeVoice","code":"(Action, inout State) -> Void"},{"type":"text","text":"."}],"identifier":"doc:\/\/Reducer\/documentation\/Reducer\/Reducer","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Reducer"}],"url":"\/documentation\/reducer\/reducer"},"doc://Reducer/documentation/Reducer":{"role":"collection","title":"Reducer","abstract":[],"identifier":"doc:\/\/Reducer\/documentation\/Reducer","kind":"symbol","type":"topic","url":"\/documentation\/reducer"}}} \ No newline at end of file diff --git a/docs/docc/Reducer.doccarchive/data/documentation/reducer/reducer/lifttocollection(action:statecollection:)-4gphe.json b/docs/docc/Reducer.doccarchive/data/documentation/reducer/reducer/lifttocollection(action:statecollection:)-4gphe.json deleted file mode 100644 index 5877243..0000000 --- a/docs/docc/Reducer.doccarchive/data/documentation/reducer/reducer/lifttocollection(action:statecollection:)-4gphe.json +++ /dev/null @@ -1 +0,0 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"liftToCollection"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"GlobalAction"},{"kind":"text","text":", "},{"kind":"genericParameter","text":"GlobalState"},{"kind":"text","text":", "},{"kind":"genericParameter","text":"CollectionState"},{"kind":"text","text":">("},{"kind":"externalParam","text":"action"},{"kind":"text","text":" "},{"kind":"internalParam","text":"actionMap"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"KeyPath","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"GlobalAction","preciseIdentifier":"s:7ReducerAAV16liftToCollection6action05stateD0AByqd__qd_0_Gs7KeyPathCyqd__5IndexQyd_1_5index_xADtSgG_s08WritablegH0Cyqd_0_qd_1_Gt7ElementQyd_1_Rs_SMRd_1_r1_lF12GlobalActionL_qd__mfp"},{"kind":"text","text":", (index"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"CollectionState","preciseIdentifier":"s:7ReducerAAV16liftToCollection6action05stateD0AByqd__qd_0_Gs7KeyPathCyqd__5IndexQyd_1_5index_xADtSgG_s08WritablegH0Cyqd_0_qd_1_Gt7ElementQyd_1_Rs_SMRd_1_r1_lF0D5StateL_qd_1_mfp"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Index","preciseIdentifier":"s:Sl5IndexQa"},{"kind":"text","text":", action"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"ActionType","preciseIdentifier":"s:7ReducerAAV10ActionTypexmfp"},{"kind":"text","text":")?>, "},{"kind":"externalParam","text":"stateCollection"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"WritableKeyPath","preciseIdentifier":"s:s15WritableKeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"GlobalState","preciseIdentifier":"s:7ReducerAAV16liftToCollection6action05stateD0AByqd__qd_0_Gs7KeyPathCyqd__5IndexQyd_1_5index_xADtSgG_s08WritablegH0Cyqd_0_qd_1_Gt7ElementQyd_1_Rs_SMRd_1_r1_lF11GlobalStateL_qd_0_mfp"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"CollectionState","preciseIdentifier":"s:7ReducerAAV16liftToCollection6action05stateD0AByqd__qd_0_Gs7KeyPathCyqd__5IndexQyd_1_5index_xADtSgG_s08WritablegH0Cyqd_0_qd_1_Gt7ElementQyd_1_Rs_SMRd_1_r1_lF0D5StateL_qd_1_mfp"},{"kind":"text","text":">) -> "},{"kind":"typeIdentifier","identifier":"doc:\/\/Reducer\/documentation\/Reducer\/Reducer","preciseIdentifier":"s:7ReducerAAV","text":"Reducer"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"GlobalAction","preciseIdentifier":"s:7ReducerAAV16liftToCollection6action05stateD0AByqd__qd_0_Gs7KeyPathCyqd__5IndexQyd_1_5index_xADtSgG_s08WritablegH0Cyqd_0_qd_1_Gt7ElementQyd_1_Rs_SMRd_1_r1_lF12GlobalActionL_qd__mfp"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"GlobalState","preciseIdentifier":"s:7ReducerAAV16liftToCollection6action05stateD0AByqd__qd_0_Gs7KeyPathCyqd__5IndexQyd_1_5index_xADtSgG_s08WritablegH0Cyqd_0_qd_1_Gt7ElementQyd_1_Rs_SMRd_1_r1_lF11GlobalStateL_qd_0_mfp"},{"kind":"text","text":"> "},{"kind":"keyword","text":"where"},{"kind":"text","text":" "},{"kind":"typeIdentifier","text":"StateType"},{"kind":"text","text":" == "},{"kind":"typeIdentifier","text":"CollectionState"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Element"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"CollectionState"},{"kind":"text","text":" : "},{"kind":"typeIdentifier","text":"MutableCollection","preciseIdentifier":"s:SM"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"anchor":"return-value","level":2,"type":"heading","text":"Return Value"},{"type":"paragraph","inlineContent":[{"type":"text","text":"a "},{"type":"codeVoice","code":"Reducer"},{"type":"text","text":" that maps actions and states from the original local reducer, which"},{"type":"text","text":" "},{"type":"text","text":"is specialised in a single Element, into a more generic and global reducer, to be used in a larger context."}]}]},{"kind":"parameters","parameters":[{"name":"actionMap","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"a read-only key-path from global action into a tuple: (index, local action), but it’s optional because"},{"type":"text","text":" "},{"type":"text","text":"maybe this reducer shouldn’t care about certain actions."}]}]},{"name":"stateCollection","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"a writable key-path from global state that traverses into a local state, by extracting only"},{"type":"text","text":" "},{"type":"text","text":"the part that it’s relevant for this reducer. This part needs to be a "},{"type":"codeVoice","code":"MutableCollection"},{"type":"text","text":"."}]}]}]},{"kind":"content","content":[{"anchor":"discussion","level":2,"type":"heading","text":"Discussion"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Let’s suppose you may want to have a "},{"type":"codeVoice","code":"gpsReducer"},{"type":"text","text":" that knows about the following "},{"type":"codeVoice","code":"struct"},{"type":"text","text":":"}]},{"type":"codeListing","syntax":null,"code":["struct Location {"," let latitude: Double"," let longitude: Double","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Let’s call it "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Part"}]},{"type":"text","text":". Both, this state and its reducer will be part of an external framework, used by dozens of"},{"type":"text","text":" "},{"type":"text","text":"apps. Internally probably the "},{"type":"codeVoice","code":"Reducer"},{"type":"text","text":" will receive some known "},{"type":"codeVoice","code":"ActionType"},{"type":"text","text":" and calculate a new location. On the"},{"type":"text","text":" "},{"type":"text","text":"main app we have a global state, that we now call "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Whole"}]},{"type":"text","text":"."}]},{"type":"codeListing","syntax":null,"code":["struct MyGlobalState {"," let title: String?"," let knownLocations: [Location]","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"As expected, "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Part"}]},{"type":"text","text":" ("},{"type":"codeVoice","code":"Location"},{"type":"text","text":") is an element of the array "},{"type":"codeVoice","code":"knownLocations"},{"type":"text","text":", which is property of "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Whole"}]},{"type":"text","text":" "},{"type":"text","text":"("},{"type":"codeVoice","code":"MyGlobalState"},{"type":"text","text":"). This relationship could be less direct, for example there could be several levels of properties"},{"type":"text","text":" "},{"type":"text","text":"until you find the "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Part"}]},{"type":"text","text":" in the "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Whole"}]},{"type":"text","text":", like "},{"type":"codeVoice","code":"global.firstLevel.secondLevel.knownLocations"},{"type":"text","text":", but let’s keep it a"},{"type":"text","text":" "},{"type":"text","text":"single-level for this example."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"To resolve this single element, we not only have to find the path to the array, but we have to find the element"},{"type":"text","text":" "},{"type":"text","text":"inside of the array. There are three methods for doing so:"}]},{"type":"orderedList","items":[{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"the element is "},{"type":"codeVoice","code":"Identifiable"},{"type":"text","text":" (iOS 13 or later)"}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"the element has a "},{"type":"codeVoice","code":"Hashable"},{"type":"text","text":" property that makes it unique, so we can find it in the array using this identifier"}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"using the index of the element in the array"}]}]}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Because our "},{"type":"codeVoice","code":"Store"},{"type":"text","text":" understands "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Whole"}]},{"type":"text","text":" ("},{"type":"codeVoice","code":"MyGlobalState"},{"type":"text","text":") and our "},{"type":"codeVoice","code":"gpsReducer"},{"type":"text","text":" understands "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Part"}]},{"type":"text","text":" ("},{"type":"codeVoice","code":"Location"},{"type":"text","text":"), we"},{"type":"text","text":" "},{"type":"text","text":"must "},{"type":"codeVoice","code":"liftToCollection"},{"type":"text","text":" the "},{"type":"codeVoice","code":"Reducer"},{"type":"text","text":" to the "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Whole"}]},{"type":"text","text":" level, by using:"}]},{"type":"codeListing","syntax":null,"code":["let globalStateReducer = gpsReducer.liftToCollection("," actionMap: \\.actionKeyPathToATuple,"," state: \\.knownLocations",")","\/\/ where:","\/\/ globalStateReducer: Reducer","\/\/ ↑ lift","\/\/ gpsReducer: Reducer"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Different from simple "},{"type":"codeVoice","code":"lift"},{"type":"text","text":" to scalar, this one requires necessarily that you lift the action together with the state."},{"type":"text","text":" "},{"type":"text","text":"That’s because your action has to contain the ID or Index of the element we will modify. The "},{"type":"codeVoice","code":"actionMap"},{"type":"text","text":" KeyPath has to"},{"type":"text","text":" "},{"type":"text","text":"give us a tuple of either:"}]},{"type":"unorderedList","items":[{"content":[{"type":"paragraph","inlineContent":[{"type":"codeVoice","code":"(id, actionToSingleElement)"}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"codeVoice","code":"(index, actionToSingleElement)"}]}]}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"The id or index is gonna be how we will search the array for the desired element, and only if we find it, we will run"},{"type":"text","text":" "},{"type":"text","text":"the "},{"type":"codeVoice","code":"gpsReducer"},{"type":"text","text":" for that specific element, using the action that has to do with single elements only."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"As "},{"type":"codeVoice","code":"Location"},{"type":"text","text":" doesn’t have an "},{"type":"codeVoice","code":"id"},{"type":"text","text":" property we will have to either use index, implement "},{"type":"codeVoice","code":"Identifiable"},{"type":"text","text":" protocol or"},{"type":"text","text":" "},{"type":"text","text":"give another unique and "},{"type":"codeVoice","code":"Hashable"},{"type":"text","text":" property."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Now this reducer can be used within our "},{"type":"codeVoice","code":"Store"},{"type":"text","text":" or even composed with others. It also can be used in other apps as"},{"type":"text","text":" "},{"type":"text","text":"long as we have a way to lift it to the world of "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Whole"}]},{"type":"text","text":"."}]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/reducer\/reducer\/lifttocollection(action:statecollection:)-4gphe"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Reducer\/documentation\/Reducer\/Reducer\/liftToCollection(action:stateCollection:)-4gphe","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"A type-lifting method for collections. The global state of your app is "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Whole"}]},{"type":"text","text":", and the "},{"type":"codeVoice","code":"Reducer"},{"type":"text","text":" handles an element"},{"type":"text","text":" "},{"type":"text","text":"that is inside of a collection, which itself is sub-state of the global. Let’s call this single element "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Part"}]},{"type":"text","text":"."}],"kind":"symbol","metadata":{"role":"symbol","title":"liftToCollection(action:stateCollection:)","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"liftToCollection"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"GlobalAction"},{"kind":"text","text":", "},{"kind":"genericParameter","text":"GlobalState"},{"kind":"text","text":", "},{"kind":"genericParameter","text":"CollectionState"},{"kind":"text","text":">("},{"kind":"externalParam","text":"action"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"KeyPath","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"GlobalAction","preciseIdentifier":"s:7ReducerAAV16liftToCollection6action05stateD0AByqd__qd_0_Gs7KeyPathCyqd__5IndexQyd_1_5index_xADtSgG_s08WritablegH0Cyqd_0_qd_1_Gt7ElementQyd_1_Rs_SMRd_1_r1_lF12GlobalActionL_qd__mfp"},{"kind":"text","text":", (index"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"CollectionState","preciseIdentifier":"s:7ReducerAAV16liftToCollection6action05stateD0AByqd__qd_0_Gs7KeyPathCyqd__5IndexQyd_1_5index_xADtSgG_s08WritablegH0Cyqd_0_qd_1_Gt7ElementQyd_1_Rs_SMRd_1_r1_lF0D5StateL_qd_1_mfp"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Index","preciseIdentifier":"s:Sl5IndexQa"},{"kind":"text","text":", action"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"ActionType","preciseIdentifier":"s:7ReducerAAV10ActionTypexmfp"},{"kind":"text","text":")?>, "},{"kind":"externalParam","text":"stateCollection"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"WritableKeyPath","preciseIdentifier":"s:s15WritableKeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"GlobalState","preciseIdentifier":"s:7ReducerAAV16liftToCollection6action05stateD0AByqd__qd_0_Gs7KeyPathCyqd__5IndexQyd_1_5index_xADtSgG_s08WritablegH0Cyqd_0_qd_1_Gt7ElementQyd_1_Rs_SMRd_1_r1_lF11GlobalStateL_qd_0_mfp"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"CollectionState","preciseIdentifier":"s:7ReducerAAV16liftToCollection6action05stateD0AByqd__qd_0_Gs7KeyPathCyqd__5IndexQyd_1_5index_xADtSgG_s08WritablegH0Cyqd_0_qd_1_Gt7ElementQyd_1_Rs_SMRd_1_r1_lF0D5StateL_qd_1_mfp"},{"kind":"text","text":">) -> "},{"kind":"typeIdentifier","text":"Reducer","preciseIdentifier":"s:7ReducerAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"GlobalAction","preciseIdentifier":"s:7ReducerAAV16liftToCollection6action05stateD0AByqd__qd_0_Gs7KeyPathCyqd__5IndexQyd_1_5index_xADtSgG_s08WritablegH0Cyqd_0_qd_1_Gt7ElementQyd_1_Rs_SMRd_1_r1_lF12GlobalActionL_qd__mfp"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"GlobalState","preciseIdentifier":"s:7ReducerAAV16liftToCollection6action05stateD0AByqd__qd_0_Gs7KeyPathCyqd__5IndexQyd_1_5index_xADtSgG_s08WritablegH0Cyqd_0_qd_1_Gt7ElementQyd_1_Rs_SMRd_1_r1_lF11GlobalStateL_qd_0_mfp"},{"kind":"text","text":">"}],"symbolKind":"method","externalID":"s:7ReducerAAV16liftToCollection6action05stateD0AByqd__qd_0_Gs7KeyPathCyqd__5IndexQyd_1_5index_xADtSgG_s08WritablegH0Cyqd_0_qd_1_Gt7ElementQyd_1_Rs_SMRd_1_r1_lF","extendedModule":"Reducer","modules":[{"name":"Reducer"}]},"hierarchy":{"paths":[["doc:\/\/Reducer\/documentation\/Reducer","doc:\/\/Reducer\/documentation\/Reducer\/Reducer"]]},"references":{"doc://Reducer/documentation/Reducer/Reducer/liftToCollection(action:stateCollection:)-4gphe":{"role":"symbol","title":"liftToCollection(action:stateCollection:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"liftToCollection"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"GlobalAction"},{"kind":"text","text":", "},{"kind":"genericParameter","text":"GlobalState"},{"kind":"text","text":", "},{"kind":"genericParameter","text":"CollectionState"},{"kind":"text","text":">("},{"kind":"externalParam","text":"action"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"KeyPath","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"GlobalAction","preciseIdentifier":"s:7ReducerAAV16liftToCollection6action05stateD0AByqd__qd_0_Gs7KeyPathCyqd__5IndexQyd_1_5index_xADtSgG_s08WritablegH0Cyqd_0_qd_1_Gt7ElementQyd_1_Rs_SMRd_1_r1_lF12GlobalActionL_qd__mfp"},{"kind":"text","text":", (index"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"CollectionState","preciseIdentifier":"s:7ReducerAAV16liftToCollection6action05stateD0AByqd__qd_0_Gs7KeyPathCyqd__5IndexQyd_1_5index_xADtSgG_s08WritablegH0Cyqd_0_qd_1_Gt7ElementQyd_1_Rs_SMRd_1_r1_lF0D5StateL_qd_1_mfp"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Index","preciseIdentifier":"s:Sl5IndexQa"},{"kind":"text","text":", action"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"ActionType","preciseIdentifier":"s:7ReducerAAV10ActionTypexmfp"},{"kind":"text","text":")?>, "},{"kind":"externalParam","text":"stateCollection"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"WritableKeyPath","preciseIdentifier":"s:s15WritableKeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"GlobalState","preciseIdentifier":"s:7ReducerAAV16liftToCollection6action05stateD0AByqd__qd_0_Gs7KeyPathCyqd__5IndexQyd_1_5index_xADtSgG_s08WritablegH0Cyqd_0_qd_1_Gt7ElementQyd_1_Rs_SMRd_1_r1_lF11GlobalStateL_qd_0_mfp"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"CollectionState","preciseIdentifier":"s:7ReducerAAV16liftToCollection6action05stateD0AByqd__qd_0_Gs7KeyPathCyqd__5IndexQyd_1_5index_xADtSgG_s08WritablegH0Cyqd_0_qd_1_Gt7ElementQyd_1_Rs_SMRd_1_r1_lF0D5StateL_qd_1_mfp"},{"kind":"text","text":">) -> "},{"kind":"typeIdentifier","text":"Reducer","preciseIdentifier":"s:7ReducerAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"GlobalAction","preciseIdentifier":"s:7ReducerAAV16liftToCollection6action05stateD0AByqd__qd_0_Gs7KeyPathCyqd__5IndexQyd_1_5index_xADtSgG_s08WritablegH0Cyqd_0_qd_1_Gt7ElementQyd_1_Rs_SMRd_1_r1_lF12GlobalActionL_qd__mfp"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"GlobalState","preciseIdentifier":"s:7ReducerAAV16liftToCollection6action05stateD0AByqd__qd_0_Gs7KeyPathCyqd__5IndexQyd_1_5index_xADtSgG_s08WritablegH0Cyqd_0_qd_1_Gt7ElementQyd_1_Rs_SMRd_1_r1_lF11GlobalStateL_qd_0_mfp"},{"kind":"text","text":">"}],"abstract":[{"type":"text","text":"A type-lifting method for collections. The global state of your app is "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Whole"}]},{"type":"text","text":", and the "},{"type":"codeVoice","code":"Reducer"},{"type":"text","text":" handles an element"},{"type":"text","text":" "},{"type":"text","text":"that is inside of a collection, which itself is sub-state of the global. Let’s call this single element "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Part"}]},{"type":"text","text":"."}],"identifier":"doc:\/\/Reducer\/documentation\/Reducer\/Reducer\/liftToCollection(action:stateCollection:)-4gphe","kind":"symbol","type":"topic","url":"\/documentation\/reducer\/reducer\/lifttocollection(action:statecollection:)-4gphe"},"doc://Reducer/documentation/Reducer/Reducer":{"role":"symbol","title":"Reducer","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Reducer"}],"abstract":[{"type":"text","text":"An entity that calculates the new state when given current state and an incoming action "},{"type":"codeVoice","code":"(Action, inout State) -> Void"},{"type":"text","text":"."}],"identifier":"doc:\/\/Reducer\/documentation\/Reducer\/Reducer","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Reducer"}],"url":"\/documentation\/reducer\/reducer"},"doc://Reducer/documentation/Reducer":{"role":"collection","title":"Reducer","abstract":[],"identifier":"doc:\/\/Reducer\/documentation\/Reducer","kind":"symbol","type":"topic","url":"\/documentation\/reducer"}}} \ No newline at end of file diff --git a/docs/docc/Reducer.doccarchive/data/documentation/reducer/reducer/lifttocollection(action:statecollection:)-5a160.json b/docs/docc/Reducer.doccarchive/data/documentation/reducer/reducer/lifttocollection(action:statecollection:)-5a160.json deleted file mode 100644 index d7d9cc5..0000000 --- a/docs/docc/Reducer.doccarchive/data/documentation/reducer/reducer/lifttocollection(action:statecollection:)-5a160.json +++ /dev/null @@ -1 +0,0 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"liftToCollection"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"GlobalAction"},{"kind":"text","text":", "},{"kind":"genericParameter","text":"GlobalState"},{"kind":"text","text":", "},{"kind":"genericParameter","text":"CollectionState"},{"kind":"text","text":">("},{"kind":"externalParam","text":"action"},{"kind":"text","text":" "},{"kind":"internalParam","text":"actionMap"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"KeyPath","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"GlobalAction","preciseIdentifier":"s:7ReducerAAVAAs12IdentifiableR_rlE16liftToCollection6action05stateE0AByqd__qd_0_Gs7KeyPathCyqd__2IDQy_2id_xAEtSgG_s08WritablehI0Cyqd_0_qd_1_Gt7ElementQyd_1_Rs_SMRd_1_r1_lF12GlobalActionL_qd__mfp"},{"kind":"text","text":", (id"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"StateType","preciseIdentifier":"s:7ReducerAAVAAs12IdentifiableR_rlE9StateTypeq_mfp"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"ID","preciseIdentifier":"s:s12IdentifiableP2IDQa"},{"kind":"text","text":", action"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"ActionType","preciseIdentifier":"s:7ReducerAAVAAs12IdentifiableR_rlE10ActionTypexmfp"},{"kind":"text","text":")?>, "},{"kind":"externalParam","text":"stateCollection"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"WritableKeyPath","preciseIdentifier":"s:s15WritableKeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"GlobalState","preciseIdentifier":"s:7ReducerAAVAAs12IdentifiableR_rlE16liftToCollection6action05stateE0AByqd__qd_0_Gs7KeyPathCyqd__2IDQy_2id_xAEtSgG_s08WritablehI0Cyqd_0_qd_1_Gt7ElementQyd_1_Rs_SMRd_1_r1_lF11GlobalStateL_qd_0_mfp"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"CollectionState","preciseIdentifier":"s:7ReducerAAVAAs12IdentifiableR_rlE16liftToCollection6action05stateE0AByqd__qd_0_Gs7KeyPathCyqd__2IDQy_2id_xAEtSgG_s08WritablehI0Cyqd_0_qd_1_Gt7ElementQyd_1_Rs_SMRd_1_r1_lF0E5StateL_qd_1_mfp"},{"kind":"text","text":">) -> "},{"kind":"typeIdentifier","identifier":"doc:\/\/Reducer\/documentation\/Reducer\/Reducer","preciseIdentifier":"s:7ReducerAAV","text":"Reducer"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"GlobalAction","preciseIdentifier":"s:7ReducerAAVAAs12IdentifiableR_rlE16liftToCollection6action05stateE0AByqd__qd_0_Gs7KeyPathCyqd__2IDQy_2id_xAEtSgG_s08WritablehI0Cyqd_0_qd_1_Gt7ElementQyd_1_Rs_SMRd_1_r1_lF12GlobalActionL_qd__mfp"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"GlobalState","preciseIdentifier":"s:7ReducerAAVAAs12IdentifiableR_rlE16liftToCollection6action05stateE0AByqd__qd_0_Gs7KeyPathCyqd__2IDQy_2id_xAEtSgG_s08WritablehI0Cyqd_0_qd_1_Gt7ElementQyd_1_Rs_SMRd_1_r1_lF11GlobalStateL_qd_0_mfp"},{"kind":"text","text":"> "},{"kind":"keyword","text":"where"},{"kind":"text","text":" "},{"kind":"typeIdentifier","text":"StateType"},{"kind":"text","text":" == "},{"kind":"typeIdentifier","text":"CollectionState"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Element"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"CollectionState"},{"kind":"text","text":" : "},{"kind":"typeIdentifier","text":"MutableCollection","preciseIdentifier":"s:SM"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"anchor":"return-value","level":2,"type":"heading","text":"Return Value"},{"type":"paragraph","inlineContent":[{"type":"text","text":"a "},{"type":"codeVoice","code":"Reducer"},{"type":"text","text":" that maps actions and states from the original local reducer, which"},{"type":"text","text":" "},{"type":"text","text":"is specialised in a single Element, into a more generic and global reducer, to be used in a larger context."}]}]},{"kind":"parameters","parameters":[{"name":"actionMap","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"a read-only key-path from global action into a tuple: (id, local action), but it’s optional because"},{"type":"text","text":" "},{"type":"text","text":"maybe this reducer shouldn’t care about certain actions."}]}]},{"name":"stateCollection","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"a writable key-path from global state that traverses into a local state, by extracting only"},{"type":"text","text":" "},{"type":"text","text":"the part that it’s relevant for this reducer. This part needs to be a "},{"type":"codeVoice","code":"MutableCollection"},{"type":"text","text":"."}]}]}]},{"kind":"content","content":[{"anchor":"discussion","level":2,"type":"heading","text":"Discussion"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Let’s suppose you may want to have a "},{"type":"codeVoice","code":"gpsReducer"},{"type":"text","text":" that knows about the following "},{"type":"codeVoice","code":"struct"},{"type":"text","text":":"}]},{"type":"codeListing","syntax":null,"code":["struct Location {"," let latitude: Double"," let longitude: Double","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Let’s call it "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Part"}]},{"type":"text","text":". Both, this state and its reducer will be part of an external framework, used by dozens of"},{"type":"text","text":" "},{"type":"text","text":"apps. Internally probably the "},{"type":"codeVoice","code":"Reducer"},{"type":"text","text":" will receive some known "},{"type":"codeVoice","code":"ActionType"},{"type":"text","text":" and calculate a new location. On the"},{"type":"text","text":" "},{"type":"text","text":"main app we have a global state, that we now call "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Whole"}]},{"type":"text","text":"."}]},{"type":"codeListing","syntax":null,"code":["struct MyGlobalState {"," let title: String?"," let knownLocations: [Location]","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"As expected, "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Part"}]},{"type":"text","text":" ("},{"type":"codeVoice","code":"Location"},{"type":"text","text":") is an element of the array "},{"type":"codeVoice","code":"knownLocations"},{"type":"text","text":", which is property of "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Whole"}]},{"type":"text","text":" "},{"type":"text","text":"("},{"type":"codeVoice","code":"MyGlobalState"},{"type":"text","text":"). This relationship could be less direct, for example there could be several levels of properties"},{"type":"text","text":" "},{"type":"text","text":"until you find the "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Part"}]},{"type":"text","text":" in the "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Whole"}]},{"type":"text","text":", like "},{"type":"codeVoice","code":"global.firstLevel.secondLevel.knownLocations"},{"type":"text","text":", but let’s keep it a"},{"type":"text","text":" "},{"type":"text","text":"single-level for this example."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"To resolve this single element, we not only have to find the path to the array, but we have to find the element"},{"type":"text","text":" "},{"type":"text","text":"inside of the array. There are three methods for doing so:"}]},{"type":"orderedList","items":[{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"the element is "},{"type":"codeVoice","code":"Identifiable"},{"type":"text","text":" (iOS 13 or later)"}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"the element has a "},{"type":"codeVoice","code":"Hashable"},{"type":"text","text":" property that makes it unique, so we can find it in the array using this identifier"}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"using the index of the element in the array"}]}]}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Because our "},{"type":"codeVoice","code":"Store"},{"type":"text","text":" understands "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Whole"}]},{"type":"text","text":" ("},{"type":"codeVoice","code":"MyGlobalState"},{"type":"text","text":") and our "},{"type":"codeVoice","code":"gpsReducer"},{"type":"text","text":" understands "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Part"}]},{"type":"text","text":" ("},{"type":"codeVoice","code":"Location"},{"type":"text","text":"), we"},{"type":"text","text":" "},{"type":"text","text":"must "},{"type":"codeVoice","code":"liftToCollection"},{"type":"text","text":" the "},{"type":"codeVoice","code":"Reducer"},{"type":"text","text":" to the "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Whole"}]},{"type":"text","text":" level, by using:"}]},{"type":"codeListing","syntax":null,"code":["let globalStateReducer = gpsReducer.liftToCollection("," actionMap: \\.actionKeyPathToATuple,"," state: \\.knownLocations",")","\/\/ where:","\/\/ globalStateReducer: Reducer","\/\/ ↑ lift","\/\/ gpsReducer: Reducer"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Different from simple "},{"type":"codeVoice","code":"lift"},{"type":"text","text":" to scalar, this one requires necessarily that you lift the action together with the state."},{"type":"text","text":" "},{"type":"text","text":"That’s because your action has to contain the ID or Index of the element we will modify. The "},{"type":"codeVoice","code":"actionMap"},{"type":"text","text":" KeyPath has to"},{"type":"text","text":" "},{"type":"text","text":"give us a tuple of either:"}]},{"type":"unorderedList","items":[{"content":[{"type":"paragraph","inlineContent":[{"type":"codeVoice","code":"(id, actionToSingleElement)"}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"codeVoice","code":"(index, actionToSingleElement)"}]}]}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"The id or index is gonna be how we will search the array for the desired element, and only if we find it, we will run"},{"type":"text","text":" "},{"type":"text","text":"the "},{"type":"codeVoice","code":"gpsReducer"},{"type":"text","text":" for that specific element, using the action that has to do with single elements only."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"As "},{"type":"codeVoice","code":"Location"},{"type":"text","text":" doesn’t have an "},{"type":"codeVoice","code":"id"},{"type":"text","text":" property we will have to either use index, implement "},{"type":"codeVoice","code":"Identifiable"},{"type":"text","text":" protocol or"},{"type":"text","text":" "},{"type":"text","text":"give another unique and "},{"type":"codeVoice","code":"Hashable"},{"type":"text","text":" property."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Now this reducer can be used within our "},{"type":"codeVoice","code":"Store"},{"type":"text","text":" or even composed with others. It also can be used in other apps as"},{"type":"text","text":" "},{"type":"text","text":"long as we have a way to lift it to the world of "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Whole"}]},{"type":"text","text":"."}]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/reducer\/reducer\/lifttocollection(action:statecollection:)-5a160"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Reducer\/documentation\/Reducer\/Reducer\/liftToCollection(action:stateCollection:)-5a160","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"A type-lifting method for collections. The global state of your app is "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Whole"}]},{"type":"text","text":", and the "},{"type":"codeVoice","code":"Reducer"},{"type":"text","text":" handles an element"},{"type":"text","text":" "},{"type":"text","text":"that is inside of a collection, which itself is sub-state of the global. Let’s call this single element "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Part"}]},{"type":"text","text":"."}],"kind":"symbol","metadata":{"modules":[{"name":"Reducer"}],"conformance":{"constraints":[{"type":"codeVoice","code":"StateType"},{"type":"text","text":" conforms to "},{"type":"codeVoice","code":"Identifiable"},{"type":"text","text":"."}],"availabilityPrefix":[{"type":"text","text":"Available when"}],"conformancePrefix":[{"type":"text","text":"Conforms when"}]},"role":"symbol","title":"liftToCollection(action:stateCollection:)","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"liftToCollection"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"GlobalAction"},{"kind":"text","text":", "},{"kind":"genericParameter","text":"GlobalState"},{"kind":"text","text":", "},{"kind":"genericParameter","text":"CollectionState"},{"kind":"text","text":">("},{"kind":"externalParam","text":"action"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"KeyPath","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"GlobalAction","preciseIdentifier":"s:7ReducerAAVAAs12IdentifiableR_rlE16liftToCollection6action05stateE0AByqd__qd_0_Gs7KeyPathCyqd__2IDQy_2id_xAEtSgG_s08WritablehI0Cyqd_0_qd_1_Gt7ElementQyd_1_Rs_SMRd_1_r1_lF12GlobalActionL_qd__mfp"},{"kind":"text","text":", (id"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"StateType","preciseIdentifier":"s:7ReducerAAVAAs12IdentifiableR_rlE9StateTypeq_mfp"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"ID","preciseIdentifier":"s:s12IdentifiableP2IDQa"},{"kind":"text","text":", action"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"ActionType","preciseIdentifier":"s:7ReducerAAVAAs12IdentifiableR_rlE10ActionTypexmfp"},{"kind":"text","text":")?>, "},{"kind":"externalParam","text":"stateCollection"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"WritableKeyPath","preciseIdentifier":"s:s15WritableKeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"GlobalState","preciseIdentifier":"s:7ReducerAAVAAs12IdentifiableR_rlE16liftToCollection6action05stateE0AByqd__qd_0_Gs7KeyPathCyqd__2IDQy_2id_xAEtSgG_s08WritablehI0Cyqd_0_qd_1_Gt7ElementQyd_1_Rs_SMRd_1_r1_lF11GlobalStateL_qd_0_mfp"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"CollectionState","preciseIdentifier":"s:7ReducerAAVAAs12IdentifiableR_rlE16liftToCollection6action05stateE0AByqd__qd_0_Gs7KeyPathCyqd__2IDQy_2id_xAEtSgG_s08WritablehI0Cyqd_0_qd_1_Gt7ElementQyd_1_Rs_SMRd_1_r1_lF0E5StateL_qd_1_mfp"},{"kind":"text","text":">) -> "},{"kind":"typeIdentifier","text":"Reducer","preciseIdentifier":"s:7ReducerAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"GlobalAction","preciseIdentifier":"s:7ReducerAAVAAs12IdentifiableR_rlE16liftToCollection6action05stateE0AByqd__qd_0_Gs7KeyPathCyqd__2IDQy_2id_xAEtSgG_s08WritablehI0Cyqd_0_qd_1_Gt7ElementQyd_1_Rs_SMRd_1_r1_lF12GlobalActionL_qd__mfp"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"GlobalState","preciseIdentifier":"s:7ReducerAAVAAs12IdentifiableR_rlE16liftToCollection6action05stateE0AByqd__qd_0_Gs7KeyPathCyqd__2IDQy_2id_xAEtSgG_s08WritablehI0Cyqd_0_qd_1_Gt7ElementQyd_1_Rs_SMRd_1_r1_lF11GlobalStateL_qd_0_mfp"},{"kind":"text","text":">"}],"symbolKind":"method","externalID":"s:7ReducerAAVAAs12IdentifiableR_rlE16liftToCollection6action05stateE0AByqd__qd_0_Gs7KeyPathCyqd__2IDQy_2id_xAEtSgG_s08WritablehI0Cyqd_0_qd_1_Gt7ElementQyd_1_Rs_SMRd_1_r1_lF","extendedModule":"Reducer","platforms":[{"beta":false,"unavailable":false,"name":"iOS","introducedAt":"13.0","deprecated":false},{"beta":false,"unavailable":false,"name":"macOS","introducedAt":"10.15","deprecated":false},{"beta":false,"unavailable":false,"name":"tvOS","introducedAt":"13.0","deprecated":false},{"beta":false,"unavailable":false,"name":"watchOS","introducedAt":"6.0","deprecated":false}]},"hierarchy":{"paths":[["doc:\/\/Reducer\/documentation\/Reducer","doc:\/\/Reducer\/documentation\/Reducer\/Reducer"]]},"references":{"doc://Reducer/documentation/Reducer/Reducer/liftToCollection(action:stateCollection:)-5a160":{"conformance":{"constraints":[{"type":"codeVoice","code":"StateType"},{"type":"text","text":" conforms to "},{"type":"codeVoice","code":"Identifiable"},{"type":"text","text":"."}],"availabilityPrefix":[{"type":"text","text":"Available when"}],"conformancePrefix":[{"type":"text","text":"Conforms when"}]},"role":"symbol","title":"liftToCollection(action:stateCollection:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"liftToCollection"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"GlobalAction"},{"kind":"text","text":", "},{"kind":"genericParameter","text":"GlobalState"},{"kind":"text","text":", "},{"kind":"genericParameter","text":"CollectionState"},{"kind":"text","text":">("},{"kind":"externalParam","text":"action"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"KeyPath","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"GlobalAction","preciseIdentifier":"s:7ReducerAAVAAs12IdentifiableR_rlE16liftToCollection6action05stateE0AByqd__qd_0_Gs7KeyPathCyqd__2IDQy_2id_xAEtSgG_s08WritablehI0Cyqd_0_qd_1_Gt7ElementQyd_1_Rs_SMRd_1_r1_lF12GlobalActionL_qd__mfp"},{"kind":"text","text":", (id"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"StateType","preciseIdentifier":"s:7ReducerAAVAAs12IdentifiableR_rlE9StateTypeq_mfp"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"ID","preciseIdentifier":"s:s12IdentifiableP2IDQa"},{"kind":"text","text":", action"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"ActionType","preciseIdentifier":"s:7ReducerAAVAAs12IdentifiableR_rlE10ActionTypexmfp"},{"kind":"text","text":")?>, "},{"kind":"externalParam","text":"stateCollection"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"WritableKeyPath","preciseIdentifier":"s:s15WritableKeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"GlobalState","preciseIdentifier":"s:7ReducerAAVAAs12IdentifiableR_rlE16liftToCollection6action05stateE0AByqd__qd_0_Gs7KeyPathCyqd__2IDQy_2id_xAEtSgG_s08WritablehI0Cyqd_0_qd_1_Gt7ElementQyd_1_Rs_SMRd_1_r1_lF11GlobalStateL_qd_0_mfp"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"CollectionState","preciseIdentifier":"s:7ReducerAAVAAs12IdentifiableR_rlE16liftToCollection6action05stateE0AByqd__qd_0_Gs7KeyPathCyqd__2IDQy_2id_xAEtSgG_s08WritablehI0Cyqd_0_qd_1_Gt7ElementQyd_1_Rs_SMRd_1_r1_lF0E5StateL_qd_1_mfp"},{"kind":"text","text":">) -> "},{"kind":"typeIdentifier","text":"Reducer","preciseIdentifier":"s:7ReducerAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"GlobalAction","preciseIdentifier":"s:7ReducerAAVAAs12IdentifiableR_rlE16liftToCollection6action05stateE0AByqd__qd_0_Gs7KeyPathCyqd__2IDQy_2id_xAEtSgG_s08WritablehI0Cyqd_0_qd_1_Gt7ElementQyd_1_Rs_SMRd_1_r1_lF12GlobalActionL_qd__mfp"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"GlobalState","preciseIdentifier":"s:7ReducerAAVAAs12IdentifiableR_rlE16liftToCollection6action05stateE0AByqd__qd_0_Gs7KeyPathCyqd__2IDQy_2id_xAEtSgG_s08WritablehI0Cyqd_0_qd_1_Gt7ElementQyd_1_Rs_SMRd_1_r1_lF11GlobalStateL_qd_0_mfp"},{"kind":"text","text":">"}],"abstract":[{"type":"text","text":"A type-lifting method for collections. The global state of your app is "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Whole"}]},{"type":"text","text":", and the "},{"type":"codeVoice","code":"Reducer"},{"type":"text","text":" handles an element"},{"type":"text","text":" "},{"type":"text","text":"that is inside of a collection, which itself is sub-state of the global. Let’s call this single element "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Part"}]},{"type":"text","text":"."}],"identifier":"doc:\/\/Reducer\/documentation\/Reducer\/Reducer\/liftToCollection(action:stateCollection:)-5a160","kind":"symbol","type":"topic","url":"\/documentation\/reducer\/reducer\/lifttocollection(action:statecollection:)-5a160"},"doc://Reducer/documentation/Reducer":{"role":"collection","title":"Reducer","abstract":[],"identifier":"doc:\/\/Reducer\/documentation\/Reducer","kind":"symbol","type":"topic","url":"\/documentation\/reducer"},"doc://Reducer/documentation/Reducer/Reducer":{"role":"symbol","title":"Reducer","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Reducer"}],"abstract":[{"type":"text","text":"An entity that calculates the new state when given current state and an incoming action "},{"type":"codeVoice","code":"(Action, inout State) -> Void"},{"type":"text","text":"."}],"identifier":"doc:\/\/Reducer\/documentation\/Reducer\/Reducer","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Reducer"}],"url":"\/documentation\/reducer\/reducer"}}} \ No newline at end of file diff --git a/docs/docc/Reducer.doccarchive/data/documentation/reducer/reducer/lifttocollection(action:statecollection:identifier:).json b/docs/docc/Reducer.doccarchive/data/documentation/reducer/reducer/lifttocollection(action:statecollection:identifier:).json deleted file mode 100644 index ecb391e..0000000 --- a/docs/docc/Reducer.doccarchive/data/documentation/reducer/reducer/lifttocollection(action:statecollection:identifier:).json +++ /dev/null @@ -1 +0,0 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"liftToCollection"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"GlobalAction"},{"kind":"text","text":", "},{"kind":"genericParameter","text":"GlobalState"},{"kind":"text","text":", "},{"kind":"genericParameter","text":"CollectionState"},{"kind":"text","text":", "},{"kind":"genericParameter","text":"ID"},{"kind":"text","text":">("},{"kind":"externalParam","text":"action"},{"kind":"text","text":" "},{"kind":"internalParam","text":"actionMap"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"KeyPath","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"GlobalAction","preciseIdentifier":"s:7ReducerAAV16liftToCollection6action05stateD010identifierAByqd__qd_0_Gs7KeyPathCyqd__qd_2_2id_xADtSgG_s08WritablehI0Cyqd_0_qd_1_GAIyq_qd_2_Gt7ElementQyd_1_Rs_SMRd_1_SHRd_2_r2_lF12GlobalActionL_qd__mfp"},{"kind":"text","text":", (id"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"ID","preciseIdentifier":"s:7ReducerAAV16liftToCollection6action05stateD010identifierAByqd__qd_0_Gs7KeyPathCyqd__qd_2_2id_xADtSgG_s08WritablehI0Cyqd_0_qd_1_GAIyq_qd_2_Gt7ElementQyd_1_Rs_SMRd_1_SHRd_2_r2_lF2IDL_qd_2_mfp"},{"kind":"text","text":", action"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"ActionType","preciseIdentifier":"s:7ReducerAAV10ActionTypexmfp"},{"kind":"text","text":")?>, "},{"kind":"externalParam","text":"stateCollection"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"WritableKeyPath","preciseIdentifier":"s:s15WritableKeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"GlobalState","preciseIdentifier":"s:7ReducerAAV16liftToCollection6action05stateD010identifierAByqd__qd_0_Gs7KeyPathCyqd__qd_2_2id_xADtSgG_s08WritablehI0Cyqd_0_qd_1_GAIyq_qd_2_Gt7ElementQyd_1_Rs_SMRd_1_SHRd_2_r2_lF11GlobalStateL_qd_0_mfp"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"CollectionState","preciseIdentifier":"s:7ReducerAAV16liftToCollection6action05stateD010identifierAByqd__qd_0_Gs7KeyPathCyqd__qd_2_2id_xADtSgG_s08WritablehI0Cyqd_0_qd_1_GAIyq_qd_2_Gt7ElementQyd_1_Rs_SMRd_1_SHRd_2_r2_lF0D5StateL_qd_1_mfp"},{"kind":"text","text":">, "},{"kind":"externalParam","text":"identifier"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"KeyPath","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"StateType","preciseIdentifier":"s:7ReducerAAV9StateTypeq_mfp"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"ID","preciseIdentifier":"s:7ReducerAAV16liftToCollection6action05stateD010identifierAByqd__qd_0_Gs7KeyPathCyqd__qd_2_2id_xADtSgG_s08WritablehI0Cyqd_0_qd_1_GAIyq_qd_2_Gt7ElementQyd_1_Rs_SMRd_1_SHRd_2_r2_lF2IDL_qd_2_mfp"},{"kind":"text","text":">) -> "},{"kind":"typeIdentifier","identifier":"doc:\/\/Reducer\/documentation\/Reducer\/Reducer","preciseIdentifier":"s:7ReducerAAV","text":"Reducer"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"GlobalAction","preciseIdentifier":"s:7ReducerAAV16liftToCollection6action05stateD010identifierAByqd__qd_0_Gs7KeyPathCyqd__qd_2_2id_xADtSgG_s08WritablehI0Cyqd_0_qd_1_GAIyq_qd_2_Gt7ElementQyd_1_Rs_SMRd_1_SHRd_2_r2_lF12GlobalActionL_qd__mfp"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"GlobalState","preciseIdentifier":"s:7ReducerAAV16liftToCollection6action05stateD010identifierAByqd__qd_0_Gs7KeyPathCyqd__qd_2_2id_xADtSgG_s08WritablehI0Cyqd_0_qd_1_GAIyq_qd_2_Gt7ElementQyd_1_Rs_SMRd_1_SHRd_2_r2_lF11GlobalStateL_qd_0_mfp"},{"kind":"text","text":"> "},{"kind":"keyword","text":"where"},{"kind":"text","text":" "},{"kind":"typeIdentifier","text":"StateType"},{"kind":"text","text":" == "},{"kind":"typeIdentifier","text":"CollectionState"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Element"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"CollectionState"},{"kind":"text","text":" : "},{"kind":"typeIdentifier","text":"MutableCollection","preciseIdentifier":"s:SM"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"ID"},{"kind":"text","text":" : "},{"kind":"typeIdentifier","text":"Hashable","preciseIdentifier":"s:SH"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"anchor":"return-value","level":2,"type":"heading","text":"Return Value"},{"type":"paragraph","inlineContent":[{"type":"text","text":"a "},{"type":"codeVoice","code":"Reducer"},{"type":"text","text":" that maps actions and states from the original local reducer, which"},{"type":"text","text":" "},{"type":"text","text":"is specialised in a single Element, into a more generic and global reducer, to be used in a larger context."}]}]},{"kind":"parameters","parameters":[{"name":"actionMap","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"a read-only key-path from global action into a tuple: (id, local action), but it’s optional because"},{"type":"text","text":" "},{"type":"text","text":"maybe this reducer shouldn’t care about certain actions."}]}]},{"name":"stateCollection","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"a writable key-path from global state that traverses into a local state, by extracting only"},{"type":"text","text":" "},{"type":"text","text":"the part that it’s relevant for this reducer. This part needs to be a "},{"type":"codeVoice","code":"MutableCollection"},{"type":"text","text":"."}]}]},{"name":"identifier","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"a key-path to define who is the unique-identifier of the Element (it has to be "},{"type":"codeVoice","code":"Hashable"},{"type":"text","text":")"}]}]}]},{"kind":"content","content":[{"anchor":"discussion","level":2,"type":"heading","text":"Discussion"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Let’s suppose you may want to have a "},{"type":"codeVoice","code":"gpsReducer"},{"type":"text","text":" that knows about the following "},{"type":"codeVoice","code":"struct"},{"type":"text","text":":"}]},{"type":"codeListing","syntax":null,"code":["struct Location {"," let latitude: Double"," let longitude: Double","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Let’s call it "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Part"}]},{"type":"text","text":". Both, this state and its reducer will be part of an external framework, used by dozens of"},{"type":"text","text":" "},{"type":"text","text":"apps. Internally probably the "},{"type":"codeVoice","code":"Reducer"},{"type":"text","text":" will receive some known "},{"type":"codeVoice","code":"ActionType"},{"type":"text","text":" and calculate a new location. On the"},{"type":"text","text":" "},{"type":"text","text":"main app we have a global state, that we now call "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Whole"}]},{"type":"text","text":"."}]},{"type":"codeListing","syntax":null,"code":["struct MyGlobalState {"," let title: String?"," let knownLocations: [Location]","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"As expected, "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Part"}]},{"type":"text","text":" ("},{"type":"codeVoice","code":"Location"},{"type":"text","text":") is an element of the array "},{"type":"codeVoice","code":"knownLocations"},{"type":"text","text":", which is property of "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Whole"}]},{"type":"text","text":" "},{"type":"text","text":"("},{"type":"codeVoice","code":"MyGlobalState"},{"type":"text","text":"). This relationship could be less direct, for example there could be several levels of properties"},{"type":"text","text":" "},{"type":"text","text":"until you find the "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Part"}]},{"type":"text","text":" in the "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Whole"}]},{"type":"text","text":", like "},{"type":"codeVoice","code":"global.firstLevel.secondLevel.knownLocations"},{"type":"text","text":", but let’s keep it a"},{"type":"text","text":" "},{"type":"text","text":"single-level for this example."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"To resolve this single element, we not only have to find the path to the array, but we have to find the element"},{"type":"text","text":" "},{"type":"text","text":"inside of the array. There are three methods for doing so:"}]},{"type":"orderedList","items":[{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"the element is "},{"type":"codeVoice","code":"Identifiable"},{"type":"text","text":" (iOS 13 or later)"}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"the element has a "},{"type":"codeVoice","code":"Hashable"},{"type":"text","text":" property that makes it unique, so we can find it in the array using this identifier"}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"using the index of the element in the array"}]}]}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Because our "},{"type":"codeVoice","code":"Store"},{"type":"text","text":" understands "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Whole"}]},{"type":"text","text":" ("},{"type":"codeVoice","code":"MyGlobalState"},{"type":"text","text":") and our "},{"type":"codeVoice","code":"gpsReducer"},{"type":"text","text":" understands "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Part"}]},{"type":"text","text":" ("},{"type":"codeVoice","code":"Location"},{"type":"text","text":"), we"},{"type":"text","text":" "},{"type":"text","text":"must "},{"type":"codeVoice","code":"liftToCollection"},{"type":"text","text":" the "},{"type":"codeVoice","code":"Reducer"},{"type":"text","text":" to the "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Whole"}]},{"type":"text","text":" level, by using:"}]},{"type":"codeListing","syntax":null,"code":["let globalStateReducer = gpsReducer.liftToCollection("," actionMap: \\.actionKeyPathToATuple,"," state: \\.knownLocations",")","\/\/ where:","\/\/ globalStateReducer: Reducer","\/\/ ↑ lift","\/\/ gpsReducer: Reducer"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Different from simple "},{"type":"codeVoice","code":"lift"},{"type":"text","text":" to scalar, this one requires necessarily that you lift the action together with the state."},{"type":"text","text":" "},{"type":"text","text":"That’s because your action has to contain the ID or Index of the element we will modify. The "},{"type":"codeVoice","code":"actionMap"},{"type":"text","text":" KeyPath has to"},{"type":"text","text":" "},{"type":"text","text":"give us a tuple of either:"}]},{"type":"unorderedList","items":[{"content":[{"type":"paragraph","inlineContent":[{"type":"codeVoice","code":"(id, actionToSingleElement)"}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"codeVoice","code":"(index, actionToSingleElement)"}]}]}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"The id or index is gonna be how we will search the array for the desired element, and only if we find it, we will run"},{"type":"text","text":" "},{"type":"text","text":"the "},{"type":"codeVoice","code":"gpsReducer"},{"type":"text","text":" for that specific element, using the action that has to do with single elements only."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"As "},{"type":"codeVoice","code":"Location"},{"type":"text","text":" doesn’t have an "},{"type":"codeVoice","code":"id"},{"type":"text","text":" property we will have to either use index, implement "},{"type":"codeVoice","code":"Identifiable"},{"type":"text","text":" protocol or"},{"type":"text","text":" "},{"type":"text","text":"give another unique and "},{"type":"codeVoice","code":"Hashable"},{"type":"text","text":" property."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Now this reducer can be used within our "},{"type":"codeVoice","code":"Store"},{"type":"text","text":" or even composed with others. It also can be used in other apps as"},{"type":"text","text":" "},{"type":"text","text":"long as we have a way to lift it to the world of "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Whole"}]},{"type":"text","text":"."}]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/reducer\/reducer\/lifttocollection(action:statecollection:identifier:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Reducer\/documentation\/Reducer\/Reducer\/liftToCollection(action:stateCollection:identifier:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"A type-lifting method for collections. The global state of your app is "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Whole"}]},{"type":"text","text":", and the "},{"type":"codeVoice","code":"Reducer"},{"type":"text","text":" handles an element"},{"type":"text","text":" "},{"type":"text","text":"that is inside of a collection, which itself is sub-state of the global. Let’s call this single element "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Part"}]},{"type":"text","text":"."}],"kind":"symbol","metadata":{"role":"symbol","title":"liftToCollection(action:stateCollection:identifier:)","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"liftToCollection"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"GlobalAction"},{"kind":"text","text":", "},{"kind":"genericParameter","text":"GlobalState"},{"kind":"text","text":", "},{"kind":"genericParameter","text":"CollectionState"},{"kind":"text","text":", "},{"kind":"genericParameter","text":"ID"},{"kind":"text","text":">("},{"kind":"externalParam","text":"action"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"KeyPath","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"GlobalAction","preciseIdentifier":"s:7ReducerAAV16liftToCollection6action05stateD010identifierAByqd__qd_0_Gs7KeyPathCyqd__qd_2_2id_xADtSgG_s08WritablehI0Cyqd_0_qd_1_GAIyq_qd_2_Gt7ElementQyd_1_Rs_SMRd_1_SHRd_2_r2_lF12GlobalActionL_qd__mfp"},{"kind":"text","text":", (id"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"ID","preciseIdentifier":"s:7ReducerAAV16liftToCollection6action05stateD010identifierAByqd__qd_0_Gs7KeyPathCyqd__qd_2_2id_xADtSgG_s08WritablehI0Cyqd_0_qd_1_GAIyq_qd_2_Gt7ElementQyd_1_Rs_SMRd_1_SHRd_2_r2_lF2IDL_qd_2_mfp"},{"kind":"text","text":", action"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"ActionType","preciseIdentifier":"s:7ReducerAAV10ActionTypexmfp"},{"kind":"text","text":")?>, "},{"kind":"externalParam","text":"stateCollection"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"WritableKeyPath","preciseIdentifier":"s:s15WritableKeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"GlobalState","preciseIdentifier":"s:7ReducerAAV16liftToCollection6action05stateD010identifierAByqd__qd_0_Gs7KeyPathCyqd__qd_2_2id_xADtSgG_s08WritablehI0Cyqd_0_qd_1_GAIyq_qd_2_Gt7ElementQyd_1_Rs_SMRd_1_SHRd_2_r2_lF11GlobalStateL_qd_0_mfp"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"CollectionState","preciseIdentifier":"s:7ReducerAAV16liftToCollection6action05stateD010identifierAByqd__qd_0_Gs7KeyPathCyqd__qd_2_2id_xADtSgG_s08WritablehI0Cyqd_0_qd_1_GAIyq_qd_2_Gt7ElementQyd_1_Rs_SMRd_1_SHRd_2_r2_lF0D5StateL_qd_1_mfp"},{"kind":"text","text":">, "},{"kind":"externalParam","text":"identifier"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"KeyPath","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"StateType","preciseIdentifier":"s:7ReducerAAV9StateTypeq_mfp"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"ID","preciseIdentifier":"s:7ReducerAAV16liftToCollection6action05stateD010identifierAByqd__qd_0_Gs7KeyPathCyqd__qd_2_2id_xADtSgG_s08WritablehI0Cyqd_0_qd_1_GAIyq_qd_2_Gt7ElementQyd_1_Rs_SMRd_1_SHRd_2_r2_lF2IDL_qd_2_mfp"},{"kind":"text","text":">) -> "},{"kind":"typeIdentifier","text":"Reducer","preciseIdentifier":"s:7ReducerAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"GlobalAction","preciseIdentifier":"s:7ReducerAAV16liftToCollection6action05stateD010identifierAByqd__qd_0_Gs7KeyPathCyqd__qd_2_2id_xADtSgG_s08WritablehI0Cyqd_0_qd_1_GAIyq_qd_2_Gt7ElementQyd_1_Rs_SMRd_1_SHRd_2_r2_lF12GlobalActionL_qd__mfp"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"GlobalState","preciseIdentifier":"s:7ReducerAAV16liftToCollection6action05stateD010identifierAByqd__qd_0_Gs7KeyPathCyqd__qd_2_2id_xADtSgG_s08WritablehI0Cyqd_0_qd_1_GAIyq_qd_2_Gt7ElementQyd_1_Rs_SMRd_1_SHRd_2_r2_lF11GlobalStateL_qd_0_mfp"},{"kind":"text","text":">"}],"symbolKind":"method","externalID":"s:7ReducerAAV16liftToCollection6action05stateD010identifierAByqd__qd_0_Gs7KeyPathCyqd__qd_2_2id_xADtSgG_s08WritablehI0Cyqd_0_qd_1_GAIyq_qd_2_Gt7ElementQyd_1_Rs_SMRd_1_SHRd_2_r2_lF","extendedModule":"Reducer","modules":[{"name":"Reducer"}]},"hierarchy":{"paths":[["doc:\/\/Reducer\/documentation\/Reducer","doc:\/\/Reducer\/documentation\/Reducer\/Reducer"]]},"references":{"doc://Reducer/documentation/Reducer/Reducer/liftToCollection(action:stateCollection:identifier:)":{"role":"symbol","title":"liftToCollection(action:stateCollection:identifier:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"liftToCollection"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"GlobalAction"},{"kind":"text","text":", "},{"kind":"genericParameter","text":"GlobalState"},{"kind":"text","text":", "},{"kind":"genericParameter","text":"CollectionState"},{"kind":"text","text":", "},{"kind":"genericParameter","text":"ID"},{"kind":"text","text":">("},{"kind":"externalParam","text":"action"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"KeyPath","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"GlobalAction","preciseIdentifier":"s:7ReducerAAV16liftToCollection6action05stateD010identifierAByqd__qd_0_Gs7KeyPathCyqd__qd_2_2id_xADtSgG_s08WritablehI0Cyqd_0_qd_1_GAIyq_qd_2_Gt7ElementQyd_1_Rs_SMRd_1_SHRd_2_r2_lF12GlobalActionL_qd__mfp"},{"kind":"text","text":", (id"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"ID","preciseIdentifier":"s:7ReducerAAV16liftToCollection6action05stateD010identifierAByqd__qd_0_Gs7KeyPathCyqd__qd_2_2id_xADtSgG_s08WritablehI0Cyqd_0_qd_1_GAIyq_qd_2_Gt7ElementQyd_1_Rs_SMRd_1_SHRd_2_r2_lF2IDL_qd_2_mfp"},{"kind":"text","text":", action"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"ActionType","preciseIdentifier":"s:7ReducerAAV10ActionTypexmfp"},{"kind":"text","text":")?>, "},{"kind":"externalParam","text":"stateCollection"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"WritableKeyPath","preciseIdentifier":"s:s15WritableKeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"GlobalState","preciseIdentifier":"s:7ReducerAAV16liftToCollection6action05stateD010identifierAByqd__qd_0_Gs7KeyPathCyqd__qd_2_2id_xADtSgG_s08WritablehI0Cyqd_0_qd_1_GAIyq_qd_2_Gt7ElementQyd_1_Rs_SMRd_1_SHRd_2_r2_lF11GlobalStateL_qd_0_mfp"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"CollectionState","preciseIdentifier":"s:7ReducerAAV16liftToCollection6action05stateD010identifierAByqd__qd_0_Gs7KeyPathCyqd__qd_2_2id_xADtSgG_s08WritablehI0Cyqd_0_qd_1_GAIyq_qd_2_Gt7ElementQyd_1_Rs_SMRd_1_SHRd_2_r2_lF0D5StateL_qd_1_mfp"},{"kind":"text","text":">, "},{"kind":"externalParam","text":"identifier"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"KeyPath","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"StateType","preciseIdentifier":"s:7ReducerAAV9StateTypeq_mfp"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"ID","preciseIdentifier":"s:7ReducerAAV16liftToCollection6action05stateD010identifierAByqd__qd_0_Gs7KeyPathCyqd__qd_2_2id_xADtSgG_s08WritablehI0Cyqd_0_qd_1_GAIyq_qd_2_Gt7ElementQyd_1_Rs_SMRd_1_SHRd_2_r2_lF2IDL_qd_2_mfp"},{"kind":"text","text":">) -> "},{"kind":"typeIdentifier","text":"Reducer","preciseIdentifier":"s:7ReducerAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"GlobalAction","preciseIdentifier":"s:7ReducerAAV16liftToCollection6action05stateD010identifierAByqd__qd_0_Gs7KeyPathCyqd__qd_2_2id_xADtSgG_s08WritablehI0Cyqd_0_qd_1_GAIyq_qd_2_Gt7ElementQyd_1_Rs_SMRd_1_SHRd_2_r2_lF12GlobalActionL_qd__mfp"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"GlobalState","preciseIdentifier":"s:7ReducerAAV16liftToCollection6action05stateD010identifierAByqd__qd_0_Gs7KeyPathCyqd__qd_2_2id_xADtSgG_s08WritablehI0Cyqd_0_qd_1_GAIyq_qd_2_Gt7ElementQyd_1_Rs_SMRd_1_SHRd_2_r2_lF11GlobalStateL_qd_0_mfp"},{"kind":"text","text":">"}],"abstract":[{"type":"text","text":"A type-lifting method for collections. The global state of your app is "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Whole"}]},{"type":"text","text":", and the "},{"type":"codeVoice","code":"Reducer"},{"type":"text","text":" handles an element"},{"type":"text","text":" "},{"type":"text","text":"that is inside of a collection, which itself is sub-state of the global. Let’s call this single element "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Part"}]},{"type":"text","text":"."}],"identifier":"doc:\/\/Reducer\/documentation\/Reducer\/Reducer\/liftToCollection(action:stateCollection:identifier:)","kind":"symbol","type":"topic","url":"\/documentation\/reducer\/reducer\/lifttocollection(action:statecollection:identifier:)"},"doc://Reducer/documentation/Reducer/Reducer":{"role":"symbol","title":"Reducer","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Reducer"}],"abstract":[{"type":"text","text":"An entity that calculates the new state when given current state and an incoming action "},{"type":"codeVoice","code":"(Action, inout State) -> Void"},{"type":"text","text":"."}],"identifier":"doc:\/\/Reducer\/documentation\/Reducer\/Reducer","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Reducer"}],"url":"\/documentation\/reducer\/reducer"},"doc://Reducer/documentation/Reducer":{"role":"collection","title":"Reducer","abstract":[],"identifier":"doc:\/\/Reducer\/documentation\/Reducer","kind":"symbol","type":"topic","url":"\/documentation\/reducer"}}} \ No newline at end of file diff --git a/docs/docc/Reducer.doccarchive/data/documentation/reducer/reducer/reduce(_:).json b/docs/docc/Reducer.doccarchive/data/documentation/reducer/reducer/reduce(_:).json deleted file mode 100644 index dc758fb..0000000 --- a/docs/docc/Reducer.doccarchive/data/documentation/reducer/reducer/reduce(_:).json +++ /dev/null @@ -1 +0,0 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"reduce"},{"kind":"text","text":"("},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"kind":"internalParam","text":"reduce"},{"kind":"text","text":": "},{"kind":"attribute","text":"@escaping"},{"kind":"text","text":" ("},{"kind":"typeIdentifier","text":"ActionType","preciseIdentifier":"s:7ReducerAAV10ActionTypexmfp"},{"kind":"text","text":", "},{"kind":"keyword","text":"inout"},{"kind":"text","text":" "},{"kind":"typeIdentifier","text":"StateType","preciseIdentifier":"s:7ReducerAAV9StateTypeq_mfp"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Void","preciseIdentifier":"s:s4Voida"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","identifier":"doc:\/\/Reducer\/documentation\/Reducer\/Reducer","preciseIdentifier":"s:7ReducerAAV","text":"Reducer"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"parameters","parameters":[{"name":"reduce","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"a pure function that calculates the new state from an action and the current state."}]}]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/reducer\/reducer\/reduce(_:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Reducer\/documentation\/Reducer\/Reducer\/reduce(_:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Reducer initialiser takes only the underlying function "},{"type":"codeVoice","code":"(ActionType, inout StateType) -> Void"},{"type":"text","text":" that is the reducer"},{"type":"text","text":" "},{"type":"text","text":"function itself."}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"reduce"},{"kind":"text","text":"(("},{"kind":"typeIdentifier","text":"ActionType","preciseIdentifier":"s:7ReducerAAV10ActionTypexmfp"},{"kind":"text","text":", "},{"kind":"keyword","text":"inout"},{"kind":"text","text":" "},{"kind":"typeIdentifier","text":"StateType","preciseIdentifier":"s:7ReducerAAV9StateTypeq_mfp"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Void","preciseIdentifier":"s:s4Voida"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Reducer","preciseIdentifier":"s:7ReducerAAV"}],"title":"reduce(_:)","roleHeading":"Type Method","role":"symbol","symbolKind":"method","externalID":"s:7ReducerAAV6reduceyAByxq_Gyx_q_ztcFZ","modules":[{"name":"Reducer"}]},"hierarchy":{"paths":[["doc:\/\/Reducer\/documentation\/Reducer","doc:\/\/Reducer\/documentation\/Reducer\/Reducer"]]},"references":{"doc://Reducer/documentation/Reducer/Reducer/reduce(_:)":{"role":"symbol","title":"reduce(_:)","fragments":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"reduce"},{"kind":"text","text":"(("},{"kind":"typeIdentifier","text":"ActionType","preciseIdentifier":"s:7ReducerAAV10ActionTypexmfp"},{"kind":"text","text":", "},{"kind":"keyword","text":"inout"},{"kind":"text","text":" "},{"kind":"typeIdentifier","text":"StateType","preciseIdentifier":"s:7ReducerAAV9StateTypeq_mfp"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Void","preciseIdentifier":"s:s4Voida"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Reducer","preciseIdentifier":"s:7ReducerAAV"}],"abstract":[{"type":"text","text":"Reducer initialiser takes only the underlying function "},{"type":"codeVoice","code":"(ActionType, inout StateType) -> Void"},{"type":"text","text":" that is the reducer"},{"type":"text","text":" "},{"type":"text","text":"function itself."}],"identifier":"doc:\/\/Reducer\/documentation\/Reducer\/Reducer\/reduce(_:)","kind":"symbol","type":"topic","url":"\/documentation\/reducer\/reducer\/reduce(_:)"},"doc://Reducer/documentation/Reducer":{"role":"collection","title":"Reducer","abstract":[],"identifier":"doc:\/\/Reducer\/documentation\/Reducer","kind":"symbol","type":"topic","url":"\/documentation\/reducer"},"doc://Reducer/documentation/Reducer/Reducer":{"role":"symbol","title":"Reducer","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Reducer"}],"abstract":[{"type":"text","text":"An entity that calculates the new state when given current state and an incoming action "},{"type":"codeVoice","code":"(Action, inout State) -> Void"},{"type":"text","text":"."}],"identifier":"doc:\/\/Reducer\/documentation\/Reducer\/Reducer","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Reducer"}],"url":"\/documentation\/reducer\/reducer"}}} \ No newline at end of file diff --git a/docs/docc/Reducer.doccarchive/data/documentation/reducer/reducer/reduce.json b/docs/docc/Reducer.doccarchive/data/documentation/reducer/reducer/reduce.json deleted file mode 100644 index c3009f3..0000000 --- a/docs/docc/Reducer.doccarchive/data/documentation/reducer/reducer/reduce.json +++ /dev/null @@ -1 +0,0 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"reduce"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"ActionType","preciseIdentifier":"s:7ReducerAAV10ActionTypexmfp"},{"kind":"text","text":", "},{"kind":"keyword","text":"inout"},{"kind":"text","text":" "},{"kind":"typeIdentifier","text":"StateType","preciseIdentifier":"s:7ReducerAAV9StateTypeq_mfp"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Void","preciseIdentifier":"s:s4Voida"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/reducer\/reducer\/reduce"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Reducer\/documentation\/Reducer\/Reducer\/reduce","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Execute the wrapped reduce function. You must provide the parameters "},{"type":"codeVoice","code":"action: ActionType"},{"type":"text","text":" (the action to be"},{"type":"text","text":" "},{"type":"text","text":"evaluated during the reducing process) and an "},{"type":"codeVoice","code":"inout"},{"type":"text","text":" version of the latest "},{"type":"codeVoice","code":"state: StateType"},{"type":"text","text":", (the current"},{"type":"text","text":" "},{"type":"text","text":"state in your single source-of-truth)."},{"type":"text","text":" "},{"type":"text","text":"State will be mutated in place ("},{"type":"codeVoice","code":"inout"},{"type":"text","text":") and finish with the calculated new state."}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"reduce"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"ActionType","preciseIdentifier":"s:7ReducerAAV10ActionTypexmfp"},{"kind":"text","text":", "},{"kind":"keyword","text":"inout"},{"kind":"text","text":" "},{"kind":"typeIdentifier","text":"StateType","preciseIdentifier":"s:7ReducerAAV9StateTypeq_mfp"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Void","preciseIdentifier":"s:s4Voida"}],"title":"reduce","roleHeading":"Instance Property","role":"symbol","symbolKind":"property","externalID":"s:7ReducerAAV6reduceyyx_q_ztcvp","modules":[{"name":"Reducer"}]},"hierarchy":{"paths":[["doc:\/\/Reducer\/documentation\/Reducer","doc:\/\/Reducer\/documentation\/Reducer\/Reducer"]]},"references":{"doc://Reducer/documentation/Reducer/Reducer":{"role":"symbol","title":"Reducer","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Reducer"}],"abstract":[{"type":"text","text":"An entity that calculates the new state when given current state and an incoming action "},{"type":"codeVoice","code":"(Action, inout State) -> Void"},{"type":"text","text":"."}],"identifier":"doc:\/\/Reducer\/documentation\/Reducer\/Reducer","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Reducer"}],"url":"\/documentation\/reducer\/reducer"},"doc://Reducer/documentation/Reducer/Reducer/reduce":{"role":"symbol","title":"reduce","fragments":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"reduce"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"ActionType","preciseIdentifier":"s:7ReducerAAV10ActionTypexmfp"},{"kind":"text","text":", "},{"kind":"keyword","text":"inout"},{"kind":"text","text":" "},{"kind":"typeIdentifier","text":"StateType","preciseIdentifier":"s:7ReducerAAV9StateTypeq_mfp"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Void","preciseIdentifier":"s:s4Voida"}],"abstract":[{"type":"text","text":"Execute the wrapped reduce function. You must provide the parameters "},{"type":"codeVoice","code":"action: ActionType"},{"type":"text","text":" (the action to be"},{"type":"text","text":" "},{"type":"text","text":"evaluated during the reducing process) and an "},{"type":"codeVoice","code":"inout"},{"type":"text","text":" version of the latest "},{"type":"codeVoice","code":"state: StateType"},{"type":"text","text":", (the current"},{"type":"text","text":" "},{"type":"text","text":"state in your single source-of-truth)."},{"type":"text","text":" "},{"type":"text","text":"State will be mutated in place ("},{"type":"codeVoice","code":"inout"},{"type":"text","text":") and finish with the calculated new state."}],"identifier":"doc:\/\/Reducer\/documentation\/Reducer\/Reducer\/reduce","kind":"symbol","type":"topic","url":"\/documentation\/reducer\/reducer\/reduce"},"doc://Reducer/documentation/Reducer":{"role":"collection","title":"Reducer","abstract":[],"identifier":"doc:\/\/Reducer\/documentation\/Reducer","kind":"symbol","type":"topic","url":"\/documentation\/reducer"}}} \ No newline at end of file diff --git a/docs/docc/Reducer.doccarchive/data/documentation/reducer/reducerbuilder.json b/docs/docc/Reducer.doccarchive/data/documentation/reducer/reducerbuilder.json deleted file mode 100644 index 43cda68..0000000 --- a/docs/docc/Reducer.doccarchive/data/documentation/reducer/reducerbuilder.json +++ /dev/null @@ -1 +0,0 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"attribute","text":"@resultBuilder"},{"kind":"text","text":" "},{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"ReducerBuilder"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/reducer\/reducerbuilder"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Reducer\/documentation\/Reducer\/ReducerBuilder","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"DSL Builder for Reducer compose"}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"ReducerBuilder"}],"title":"ReducerBuilder","roleHeading":"Enumeration","role":"symbol","symbolKind":"enum","externalID":"s:7Reducer0A7BuilderO","modules":[{"name":"Reducer"}],"navigatorTitle":[{"kind":"identifier","text":"ReducerBuilder"}]},"hierarchy":{"paths":[["doc:\/\/Reducer\/documentation\/Reducer"]]},"topicSections":[{"title":"Type Methods","identifiers":["doc:\/\/Reducer\/documentation\/Reducer\/ReducerBuilder\/buildBlock(_:)"]}],"references":{"doc://Reducer/documentation/Reducer/ReducerBuilder/buildBlock(_:)":{"role":"symbol","title":"buildBlock(_:)","fragments":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"buildBlock"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"Action"},{"kind":"text","text":", "},{"kind":"genericParameter","text":"State"},{"kind":"text","text":">("},{"kind":"typeIdentifier","text":"Reducer","preciseIdentifier":"s:7ReducerAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"Action","preciseIdentifier":"s:7Reducer0A7BuilderO10buildBlockyA2AVyxq_GAFd_tr0_lFZ6ActionL_xmfp"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"State","preciseIdentifier":"s:7Reducer0A7BuilderO10buildBlockyA2AVyxq_GAFd_tr0_lFZ5StateL_q_mfp"},{"kind":"text","text":">...) -> "},{"kind":"typeIdentifier","text":"Reducer","preciseIdentifier":"s:7ReducerAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"Action","preciseIdentifier":"s:7Reducer0A7BuilderO10buildBlockyA2AVyxq_GAFd_tr0_lFZ6ActionL_xmfp"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"State","preciseIdentifier":"s:7Reducer0A7BuilderO10buildBlockyA2AVyxq_GAFd_tr0_lFZ5StateL_q_mfp"},{"kind":"text","text":">"}],"abstract":[{"type":"text","text":"DSL Builder for Reducer compose"}],"identifier":"doc:\/\/Reducer\/documentation\/Reducer\/ReducerBuilder\/buildBlock(_:)","kind":"symbol","type":"topic","url":"\/documentation\/reducer\/reducerbuilder\/buildblock(_:)"},"doc://Reducer/documentation/Reducer/ReducerBuilder":{"role":"symbol","title":"ReducerBuilder","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"ReducerBuilder"}],"abstract":[{"type":"text","text":"DSL Builder for Reducer compose"}],"identifier":"doc:\/\/Reducer\/documentation\/Reducer\/ReducerBuilder","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ReducerBuilder"}],"url":"\/documentation\/reducer\/reducerbuilder"},"doc://Reducer/documentation/Reducer":{"role":"collection","title":"Reducer","abstract":[],"identifier":"doc:\/\/Reducer\/documentation\/Reducer","kind":"symbol","type":"topic","url":"\/documentation\/reducer"}}} \ No newline at end of file diff --git a/docs/docc/Reducer.doccarchive/data/documentation/reducer/reducerbuilder/buildblock(_:).json b/docs/docc/Reducer.doccarchive/data/documentation/reducer/reducerbuilder/buildblock(_:).json deleted file mode 100644 index 3ef35b6..0000000 --- a/docs/docc/Reducer.doccarchive/data/documentation/reducer/reducerbuilder/buildblock(_:).json +++ /dev/null @@ -1 +0,0 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"buildBlock"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"Action"},{"kind":"text","text":", "},{"kind":"genericParameter","text":"State"},{"kind":"text","text":">("},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"kind":"internalParam","text":"reducers"},{"kind":"text","text":": "},{"kind":"typeIdentifier","identifier":"doc:\/\/Reducer\/documentation\/Reducer\/Reducer","preciseIdentifier":"s:7ReducerAAV","text":"Reducer"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"Action","preciseIdentifier":"s:7Reducer0A7BuilderO10buildBlockyA2AVyxq_GAFd_tr0_lFZ6ActionL_xmfp"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"State","preciseIdentifier":"s:7Reducer0A7BuilderO10buildBlockyA2AVyxq_GAFd_tr0_lFZ5StateL_q_mfp"},{"kind":"text","text":">...) -> "},{"kind":"typeIdentifier","identifier":"doc:\/\/Reducer\/documentation\/Reducer\/Reducer","preciseIdentifier":"s:7ReducerAAV","text":"Reducer"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"Action","preciseIdentifier":"s:7Reducer0A7BuilderO10buildBlockyA2AVyxq_GAFd_tr0_lFZ6ActionL_xmfp"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"State","preciseIdentifier":"s:7Reducer0A7BuilderO10buildBlockyA2AVyxq_GAFd_tr0_lFZ5StateL_q_mfp"},{"kind":"text","text":">"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"anchor":"return-value","level":2,"type":"heading","text":"Return Value"},{"type":"paragraph","inlineContent":[{"type":"text","text":"the composed reducer that will run all the inner reducers sequentially\/"}]}]},{"kind":"parameters","parameters":[{"name":"reducers","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"the reducers to be combined\/"}]}]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/reducer\/reducerbuilder\/buildblock(_:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Reducer\/documentation\/Reducer\/ReducerBuilder\/buildBlock(_:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"DSL Builder for Reducer compose"}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"buildBlock"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"Action"},{"kind":"text","text":", "},{"kind":"genericParameter","text":"State"},{"kind":"text","text":">("},{"kind":"typeIdentifier","text":"Reducer","preciseIdentifier":"s:7ReducerAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"Action","preciseIdentifier":"s:7Reducer0A7BuilderO10buildBlockyA2AVyxq_GAFd_tr0_lFZ6ActionL_xmfp"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"State","preciseIdentifier":"s:7Reducer0A7BuilderO10buildBlockyA2AVyxq_GAFd_tr0_lFZ5StateL_q_mfp"},{"kind":"text","text":">...) -> "},{"kind":"typeIdentifier","text":"Reducer","preciseIdentifier":"s:7ReducerAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"Action","preciseIdentifier":"s:7Reducer0A7BuilderO10buildBlockyA2AVyxq_GAFd_tr0_lFZ6ActionL_xmfp"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"State","preciseIdentifier":"s:7Reducer0A7BuilderO10buildBlockyA2AVyxq_GAFd_tr0_lFZ5StateL_q_mfp"},{"kind":"text","text":">"}],"title":"buildBlock(_:)","roleHeading":"Type Method","role":"symbol","symbolKind":"method","externalID":"s:7Reducer0A7BuilderO10buildBlockyA2AVyxq_GAFd_tr0_lFZ","modules":[{"name":"Reducer"}]},"hierarchy":{"paths":[["doc:\/\/Reducer\/documentation\/Reducer","doc:\/\/Reducer\/documentation\/Reducer\/ReducerBuilder"]]},"references":{"doc://Reducer/documentation/Reducer/ReducerBuilder":{"role":"symbol","title":"ReducerBuilder","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"ReducerBuilder"}],"abstract":[{"type":"text","text":"DSL Builder for Reducer compose"}],"identifier":"doc:\/\/Reducer\/documentation\/Reducer\/ReducerBuilder","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ReducerBuilder"}],"url":"\/documentation\/reducer\/reducerbuilder"},"doc://Reducer/documentation/Reducer/Reducer":{"role":"symbol","title":"Reducer","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Reducer"}],"abstract":[{"type":"text","text":"An entity that calculates the new state when given current state and an incoming action "},{"type":"codeVoice","code":"(Action, inout State) -> Void"},{"type":"text","text":"."}],"identifier":"doc:\/\/Reducer\/documentation\/Reducer\/Reducer","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Reducer"}],"url":"\/documentation\/reducer\/reducer"},"doc://Reducer/documentation/Reducer":{"role":"collection","title":"Reducer","abstract":[],"identifier":"doc:\/\/Reducer\/documentation\/Reducer","kind":"symbol","type":"topic","url":"\/documentation\/reducer"},"doc://Reducer/documentation/Reducer/ReducerBuilder/buildBlock(_:)":{"role":"symbol","title":"buildBlock(_:)","fragments":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"buildBlock"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"Action"},{"kind":"text","text":", "},{"kind":"genericParameter","text":"State"},{"kind":"text","text":">("},{"kind":"typeIdentifier","text":"Reducer","preciseIdentifier":"s:7ReducerAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"Action","preciseIdentifier":"s:7Reducer0A7BuilderO10buildBlockyA2AVyxq_GAFd_tr0_lFZ6ActionL_xmfp"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"State","preciseIdentifier":"s:7Reducer0A7BuilderO10buildBlockyA2AVyxq_GAFd_tr0_lFZ5StateL_q_mfp"},{"kind":"text","text":">...) -> "},{"kind":"typeIdentifier","text":"Reducer","preciseIdentifier":"s:7ReducerAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"Action","preciseIdentifier":"s:7Reducer0A7BuilderO10buildBlockyA2AVyxq_GAFd_tr0_lFZ6ActionL_xmfp"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"State","preciseIdentifier":"s:7Reducer0A7BuilderO10buildBlockyA2AVyxq_GAFd_tr0_lFZ5StateL_q_mfp"},{"kind":"text","text":">"}],"abstract":[{"type":"text","text":"DSL Builder for Reducer compose"}],"identifier":"doc:\/\/Reducer\/documentation\/Reducer\/ReducerBuilder\/buildBlock(_:)","kind":"symbol","type":"topic","url":"\/documentation\/reducer\/reducerbuilder\/buildblock(_:)"}}} \ No newline at end of file diff --git a/docs/docc/Reducer.doccarchive/developer-og-twitter.jpg b/docs/docc/Reducer.doccarchive/developer-og-twitter.jpg deleted file mode 100644 index 63c4835..0000000 Binary files a/docs/docc/Reducer.doccarchive/developer-og-twitter.jpg and /dev/null differ diff --git a/docs/docc/Reducer.doccarchive/developer-og.jpg b/docs/docc/Reducer.doccarchive/developer-og.jpg deleted file mode 100644 index 4db8408..0000000 Binary files a/docs/docc/Reducer.doccarchive/developer-og.jpg and /dev/null differ diff --git a/docs/docc/Reducer.doccarchive/documentation/reducer/index.html b/docs/docc/Reducer.doccarchive/documentation/reducer/index.html deleted file mode 100644 index a58bd88..0000000 --- a/docs/docc/Reducer.doccarchive/documentation/reducer/index.html +++ /dev/null @@ -1 +0,0 @@ -Documentation
\ No newline at end of file diff --git a/docs/docc/Reducer.doccarchive/documentation/reducer/reducer/compose(_:_:)/index.html b/docs/docc/Reducer.doccarchive/documentation/reducer/reducer/compose(_:_:)/index.html deleted file mode 100644 index a58bd88..0000000 --- a/docs/docc/Reducer.doccarchive/documentation/reducer/reducer/compose(_:_:)/index.html +++ /dev/null @@ -1 +0,0 @@ -Documentation
\ No newline at end of file diff --git a/docs/docc/Reducer.doccarchive/documentation/reducer/reducer/compose(content:)/index.html b/docs/docc/Reducer.doccarchive/documentation/reducer/reducer/compose(content:)/index.html deleted file mode 100644 index a58bd88..0000000 --- a/docs/docc/Reducer.doccarchive/documentation/reducer/reducer/compose(content:)/index.html +++ /dev/null @@ -1 +0,0 @@ -Documentation
\ No newline at end of file diff --git a/docs/docc/Reducer.doccarchive/documentation/reducer/reducer/identity/index.html b/docs/docc/Reducer.doccarchive/documentation/reducer/reducer/identity/index.html deleted file mode 100644 index a58bd88..0000000 --- a/docs/docc/Reducer.doccarchive/documentation/reducer/reducer/identity/index.html +++ /dev/null @@ -1 +0,0 @@ -Documentation
\ No newline at end of file diff --git a/docs/docc/Reducer.doccarchive/documentation/reducer/reducer/index.html b/docs/docc/Reducer.doccarchive/documentation/reducer/reducer/index.html deleted file mode 100644 index a58bd88..0000000 --- a/docs/docc/Reducer.doccarchive/documentation/reducer/reducer/index.html +++ /dev/null @@ -1 +0,0 @@ -Documentation
\ No newline at end of file diff --git a/docs/docc/Reducer.doccarchive/documentation/reducer/reducer/lift(action:)/index.html b/docs/docc/Reducer.doccarchive/documentation/reducer/reducer/lift(action:)/index.html deleted file mode 100644 index a58bd88..0000000 --- a/docs/docc/Reducer.doccarchive/documentation/reducer/reducer/lift(action:)/index.html +++ /dev/null @@ -1 +0,0 @@ -Documentation
\ No newline at end of file diff --git a/docs/docc/Reducer.doccarchive/documentation/reducer/reducer/lift(action:state:)/index.html b/docs/docc/Reducer.doccarchive/documentation/reducer/reducer/lift(action:state:)/index.html deleted file mode 100644 index a58bd88..0000000 --- a/docs/docc/Reducer.doccarchive/documentation/reducer/reducer/lift(action:state:)/index.html +++ /dev/null @@ -1 +0,0 @@ -Documentation
\ No newline at end of file diff --git a/docs/docc/Reducer.doccarchive/documentation/reducer/reducer/lift(actiongetter:stategetter:statesetter:)/index.html b/docs/docc/Reducer.doccarchive/documentation/reducer/reducer/lift(actiongetter:stategetter:statesetter:)/index.html deleted file mode 100644 index a58bd88..0000000 --- a/docs/docc/Reducer.doccarchive/documentation/reducer/reducer/lift(actiongetter:stategetter:statesetter:)/index.html +++ /dev/null @@ -1 +0,0 @@ -Documentation
\ No newline at end of file diff --git a/docs/docc/Reducer.doccarchive/documentation/reducer/reducer/lift(state:)/index.html b/docs/docc/Reducer.doccarchive/documentation/reducer/reducer/lift(state:)/index.html deleted file mode 100644 index a58bd88..0000000 --- a/docs/docc/Reducer.doccarchive/documentation/reducer/reducer/lift(state:)/index.html +++ /dev/null @@ -1 +0,0 @@ -Documentation
\ No newline at end of file diff --git a/docs/docc/Reducer.doccarchive/documentation/reducer/reducer/lifttocollection(action:statecollection:)-4gphe/index.html b/docs/docc/Reducer.doccarchive/documentation/reducer/reducer/lifttocollection(action:statecollection:)-4gphe/index.html deleted file mode 100644 index a58bd88..0000000 --- a/docs/docc/Reducer.doccarchive/documentation/reducer/reducer/lifttocollection(action:statecollection:)-4gphe/index.html +++ /dev/null @@ -1 +0,0 @@ -Documentation
\ No newline at end of file diff --git a/docs/docc/Reducer.doccarchive/documentation/reducer/reducer/lifttocollection(action:statecollection:)-5a160/index.html b/docs/docc/Reducer.doccarchive/documentation/reducer/reducer/lifttocollection(action:statecollection:)-5a160/index.html deleted file mode 100644 index a58bd88..0000000 --- a/docs/docc/Reducer.doccarchive/documentation/reducer/reducer/lifttocollection(action:statecollection:)-5a160/index.html +++ /dev/null @@ -1 +0,0 @@ -Documentation
\ No newline at end of file diff --git a/docs/docc/Reducer.doccarchive/documentation/reducer/reducer/lifttocollection(action:statecollection:identifier:)/index.html b/docs/docc/Reducer.doccarchive/documentation/reducer/reducer/lifttocollection(action:statecollection:identifier:)/index.html deleted file mode 100644 index a58bd88..0000000 --- a/docs/docc/Reducer.doccarchive/documentation/reducer/reducer/lifttocollection(action:statecollection:identifier:)/index.html +++ /dev/null @@ -1 +0,0 @@ -Documentation
\ No newline at end of file diff --git a/docs/docc/Reducer.doccarchive/documentation/reducer/reducer/reduce(_:)/index.html b/docs/docc/Reducer.doccarchive/documentation/reducer/reducer/reduce(_:)/index.html deleted file mode 100644 index a58bd88..0000000 --- a/docs/docc/Reducer.doccarchive/documentation/reducer/reducer/reduce(_:)/index.html +++ /dev/null @@ -1 +0,0 @@ -Documentation
\ No newline at end of file diff --git a/docs/docc/Reducer.doccarchive/documentation/reducer/reducer/reduce/index.html b/docs/docc/Reducer.doccarchive/documentation/reducer/reducer/reduce/index.html deleted file mode 100644 index a58bd88..0000000 --- a/docs/docc/Reducer.doccarchive/documentation/reducer/reducer/reduce/index.html +++ /dev/null @@ -1 +0,0 @@ -Documentation
\ No newline at end of file diff --git a/docs/docc/Reducer.doccarchive/documentation/reducer/reducerbuilder/buildblock(_:)/index.html b/docs/docc/Reducer.doccarchive/documentation/reducer/reducerbuilder/buildblock(_:)/index.html deleted file mode 100644 index a58bd88..0000000 --- a/docs/docc/Reducer.doccarchive/documentation/reducer/reducerbuilder/buildblock(_:)/index.html +++ /dev/null @@ -1 +0,0 @@ -Documentation
\ No newline at end of file diff --git a/docs/docc/Reducer.doccarchive/documentation/reducer/reducerbuilder/index.html b/docs/docc/Reducer.doccarchive/documentation/reducer/reducerbuilder/index.html deleted file mode 100644 index a58bd88..0000000 --- a/docs/docc/Reducer.doccarchive/documentation/reducer/reducerbuilder/index.html +++ /dev/null @@ -1 +0,0 @@ -Documentation
\ No newline at end of file diff --git a/docs/docc/Reducer.doccarchive/favicon.ico b/docs/docc/Reducer.doccarchive/favicon.ico deleted file mode 100644 index 5231da6..0000000 Binary files a/docs/docc/Reducer.doccarchive/favicon.ico and /dev/null differ diff --git a/docs/docc/Reducer.doccarchive/favicon.svg b/docs/docc/Reducer.doccarchive/favicon.svg deleted file mode 100644 index c54c53f..0000000 --- a/docs/docc/Reducer.doccarchive/favicon.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - \ No newline at end of file diff --git a/docs/docc/Reducer.doccarchive/img/added-icon.d6f7e47d.svg b/docs/docc/Reducer.doccarchive/img/added-icon.d6f7e47d.svg deleted file mode 100644 index 6bb6d89..0000000 --- a/docs/docc/Reducer.doccarchive/img/added-icon.d6f7e47d.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - \ No newline at end of file diff --git a/docs/docc/Reducer.doccarchive/img/deprecated-icon.015b4f17.svg b/docs/docc/Reducer.doccarchive/img/deprecated-icon.015b4f17.svg deleted file mode 100644 index a0f8008..0000000 --- a/docs/docc/Reducer.doccarchive/img/deprecated-icon.015b4f17.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - \ No newline at end of file diff --git a/docs/docc/Reducer.doccarchive/img/modified-icon.f496e73d.svg b/docs/docc/Reducer.doccarchive/img/modified-icon.f496e73d.svg deleted file mode 100644 index 3e0bd6f..0000000 --- a/docs/docc/Reducer.doccarchive/img/modified-icon.f496e73d.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - \ No newline at end of file diff --git a/docs/docc/Reducer.doccarchive/img/no-image@2x.df2a0a50.png b/docs/docc/Reducer.doccarchive/img/no-image@2x.df2a0a50.png deleted file mode 100644 index 041394e..0000000 Binary files a/docs/docc/Reducer.doccarchive/img/no-image@2x.df2a0a50.png and /dev/null differ diff --git a/docs/docc/Reducer.doccarchive/index.html b/docs/docc/Reducer.doccarchive/index.html deleted file mode 100644 index a58bd88..0000000 --- a/docs/docc/Reducer.doccarchive/index.html +++ /dev/null @@ -1 +0,0 @@ -Documentation
\ No newline at end of file diff --git a/docs/docc/Reducer.doccarchive/index/availability.index b/docs/docc/Reducer.doccarchive/index/availability.index deleted file mode 100644 index f44216f..0000000 Binary files a/docs/docc/Reducer.doccarchive/index/availability.index and /dev/null differ diff --git a/docs/docc/Reducer.doccarchive/index/data.mdb b/docs/docc/Reducer.doccarchive/index/data.mdb deleted file mode 100755 index 4fdf084..0000000 Binary files a/docs/docc/Reducer.doccarchive/index/data.mdb and /dev/null differ diff --git a/docs/docc/Reducer.doccarchive/index/index.json b/docs/docc/Reducer.doccarchive/index/index.json deleted file mode 100644 index 3d12d8f..0000000 --- a/docs/docc/Reducer.doccarchive/index/index.json +++ /dev/null @@ -1 +0,0 @@ -{"interfaceLanguages":{"swift":[{"children":[{"title":"Structures","type":"groupMarker"},{"children":[{"title":"Instance Properties","type":"groupMarker"},{"path":"\/documentation\/reducer\/reducer\/reduce","title":"let reduce: (ActionType, inout StateType) -> Void","type":"property"},{"title":"Instance Methods","type":"groupMarker"},{"path":"\/documentation\/reducer\/reducer\/lift(action:)","title":"func lift(action: KeyPath) -> Reducer","type":"method"},{"path":"\/documentation\/reducer\/reducer\/lift(action:state:)","title":"func lift(action: KeyPath, state: WritableKeyPath) -> Reducer","type":"method"},{"path":"\/documentation\/reducer\/reducer\/lift(actiongetter:stategetter:statesetter:)","title":"func lift(actionGetter: (GlobalActionType) -> ActionType?, stateGetter: (GlobalStateType) -> StateType, stateSetter: (inout GlobalStateType, StateType) -> Void) -> Reducer","type":"method"},{"path":"\/documentation\/reducer\/reducer\/lift(state:)","title":"func lift(state: WritableKeyPath) -> Reducer","type":"method"},{"path":"\/documentation\/reducer\/reducer\/lifttocollection(action:statecollection:)-4gphe","title":"func liftToCollection(action: KeyPath, stateCollection: WritableKeyPath) -> Reducer","type":"method"},{"path":"\/documentation\/reducer\/reducer\/lifttocollection(action:statecollection:)-5a160","title":"func liftToCollection(action: KeyPath, stateCollection: WritableKeyPath) -> Reducer","type":"method"},{"path":"\/documentation\/reducer\/reducer\/lifttocollection(action:statecollection:identifier:)","title":"func liftToCollection(action: KeyPath, stateCollection: WritableKeyPath, identifier: KeyPath) -> Reducer","type":"method"},{"title":"Type Properties","type":"groupMarker"},{"path":"\/documentation\/reducer\/reducer\/identity","title":"static var identity: Reducer","type":"property"},{"title":"Type Methods","type":"groupMarker"},{"path":"\/documentation\/reducer\/reducer\/compose(_:_:)","title":"static func compose(Reducer, Reducer...) -> Reducer","type":"method"},{"path":"\/documentation\/reducer\/reducer\/compose(content:)","title":"static func compose(content: () -> Reducer) -> Reducer","type":"method"},{"path":"\/documentation\/reducer\/reducer\/reduce(_:)","title":"static func reduce((ActionType, inout StateType) -> Void) -> Reducer","type":"method"}],"path":"\/documentation\/reducer\/reducer","title":"Reducer","type":"struct"},{"title":"Enumerations","type":"groupMarker"},{"children":[{"title":"Type Methods","type":"groupMarker"},{"path":"\/documentation\/reducer\/reducerbuilder\/buildblock(_:)","title":"static func buildBlock(Reducer...) -> Reducer","type":"method"}],"path":"\/documentation\/reducer\/reducerbuilder","title":"ReducerBuilder","type":"enum"}],"path":"\/documentation\/reducer","title":"Reducer","type":"module"}]},"schemaVersion":{"major":0,"minor":1,"patch":0}} \ No newline at end of file diff --git a/docs/docc/Reducer.doccarchive/index/navigator.index b/docs/docc/Reducer.doccarchive/index/navigator.index deleted file mode 100644 index 4af6715..0000000 Binary files a/docs/docc/Reducer.doccarchive/index/navigator.index and /dev/null differ diff --git a/docs/docc/Reducer.doccarchive/js/chunk-2d0d3105.cd72cc8e.js b/docs/docc/Reducer.doccarchive/js/chunk-2d0d3105.cd72cc8e.js deleted file mode 100644 index 74345f0..0000000 --- a/docs/docc/Reducer.doccarchive/js/chunk-2d0d3105.cd72cc8e.js +++ /dev/null @@ -1,10 +0,0 @@ -/*! - * This source file is part of the Swift.org open source project - * - * Copyright (c) 2021 Apple Inc. and the Swift project authors - * Licensed under Apache License v2.0 with Runtime Library Exception - * - * See https://swift.org/LICENSE.txt for license information - * See https://swift.org/CONTRIBUTORS.txt for Swift project authors - */ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0d3105"],{"5abe":function(t,e){(function(){"use strict";if("object"===typeof window)if("IntersectionObserver"in window&&"IntersectionObserverEntry"in window&&"intersectionRatio"in window.IntersectionObserverEntry.prototype)"isIntersecting"in window.IntersectionObserverEntry.prototype||Object.defineProperty(window.IntersectionObserverEntry.prototype,"isIntersecting",{get:function(){return this.intersectionRatio>0}});else{var t=function(t){var e=t,n=i(e);while(n)e=n.ownerDocument,n=i(e);return e}(window.document),e=[],n=null,o=null;s.prototype.THROTTLE_TIMEOUT=100,s.prototype.POLL_INTERVAL=null,s.prototype.USE_MUTATION_OBSERVER=!0,s._setupCrossOriginUpdater=function(){return n||(n=function(t,n){o=t&&n?g(t,n):p(),e.forEach((function(t){t._checkForIntersections()}))}),n},s._resetCrossOriginUpdater=function(){n=null,o=null},s.prototype.observe=function(t){var e=this._observationTargets.some((function(e){return e.element==t}));if(!e){if(!t||1!=t.nodeType)throw new Error("target must be an Element");this._registerInstance(),this._observationTargets.push({element:t,entry:null}),this._monitorIntersections(t.ownerDocument),this._checkForIntersections()}},s.prototype.unobserve=function(t){this._observationTargets=this._observationTargets.filter((function(e){return e.element!=t})),this._unmonitorIntersections(t.ownerDocument),0==this._observationTargets.length&&this._unregisterInstance()},s.prototype.disconnect=function(){this._observationTargets=[],this._unmonitorAllIntersections(),this._unregisterInstance()},s.prototype.takeRecords=function(){var t=this._queuedEntries.slice();return this._queuedEntries=[],t},s.prototype._initThresholds=function(t){var e=t||[0];return Array.isArray(e)||(e=[e]),e.sort().filter((function(t,e,n){if("number"!=typeof t||isNaN(t)||t<0||t>1)throw new Error("threshold must be a number between 0 and 1 inclusively");return t!==n[e-1]}))},s.prototype._parseRootMargin=function(t){var e=t||"0px",n=e.split(/\s+/).map((function(t){var e=/^(-?\d*\.?\d+)(px|%)$/.exec(t);if(!e)throw new Error("rootMargin must be specified in pixels or percent");return{value:parseFloat(e[1]),unit:e[2]}}));return n[1]=n[1]||n[0],n[2]=n[2]||n[0],n[3]=n[3]||n[1],n},s.prototype._monitorIntersections=function(e){var n=e.defaultView;if(n&&-1==this._monitoringDocuments.indexOf(e)){var o=this._checkForIntersections,r=null,s=null;this.POLL_INTERVAL?r=n.setInterval(o,this.POLL_INTERVAL):(c(n,"resize",o,!0),c(e,"scroll",o,!0),this.USE_MUTATION_OBSERVER&&"MutationObserver"in n&&(s=new n.MutationObserver(o),s.observe(e,{attributes:!0,childList:!0,characterData:!0,subtree:!0}))),this._monitoringDocuments.push(e),this._monitoringUnsubscribes.push((function(){var t=e.defaultView;t&&(r&&t.clearInterval(r),a(t,"resize",o,!0)),a(e,"scroll",o,!0),s&&s.disconnect()}));var h=this.root&&(this.root.ownerDocument||this.root)||t;if(e!=h){var u=i(e);u&&this._monitorIntersections(u.ownerDocument)}}},s.prototype._unmonitorIntersections=function(e){var n=this._monitoringDocuments.indexOf(e);if(-1!=n){var o=this.root&&(this.root.ownerDocument||this.root)||t,r=this._observationTargets.some((function(t){var n=t.element.ownerDocument;if(n==e)return!0;while(n&&n!=o){var r=i(n);if(n=r&&r.ownerDocument,n==e)return!0}return!1}));if(!r){var s=this._monitoringUnsubscribes[n];if(this._monitoringDocuments.splice(n,1),this._monitoringUnsubscribes.splice(n,1),s(),e!=o){var h=i(e);h&&this._unmonitorIntersections(h.ownerDocument)}}}},s.prototype._unmonitorAllIntersections=function(){var t=this._monitoringUnsubscribes.slice(0);this._monitoringDocuments.length=0,this._monitoringUnsubscribes.length=0;for(var e=0;e=0&&h>=0&&{top:n,bottom:o,left:i,right:r,width:s,height:h}||null}function f(t){var e;try{e=t.getBoundingClientRect()}catch(n){}return e?(e.width&&e.height||(e={top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:e.right-e.left,height:e.bottom-e.top}),e):p()}function p(){return{top:0,bottom:0,left:0,right:0,width:0,height:0}}function d(t){return!t||"x"in t?t:{top:t.top,y:t.top,bottom:t.bottom,left:t.left,x:t.left,right:t.right,width:t.width,height:t.height}}function g(t,e){var n=e.top-t.top,o=e.left-t.left;return{top:n,left:o,height:e.height,width:e.width,bottom:n+e.height,right:o+e.width}}function m(t,e){var n=e;while(n){if(n==t)return!0;n=v(n)}return!1}function v(e){var n=e.parentNode;return 9==e.nodeType&&e!=t?i(e):(n&&n.assignedSlot&&(n=n.assignedSlot.parentNode),n&&11==n.nodeType&&n.host?n.host:n)}function w(t){return t&&9===t.nodeType}})()}}]); \ No newline at end of file diff --git a/docs/docc/Reducer.doccarchive/js/chunk-vendors.b24b7aaa.js b/docs/docc/Reducer.doccarchive/js/chunk-vendors.b24b7aaa.js deleted file mode 100644 index 5a98336..0000000 --- a/docs/docc/Reducer.doccarchive/js/chunk-vendors.b24b7aaa.js +++ /dev/null @@ -1,21 +0,0 @@ -/*! - * This source file is part of the Swift.org open source project - * - * Copyright (c) 2021 Apple Inc. and the Swift project authors - * Licensed under Apache License v2.0 with Runtime Library Exception - * - * See https://swift.org/LICENSE.txt for license information - * See https://swift.org/CONTRIBUTORS.txt for Swift project authors - */ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-vendors"],{2877:function(t,e,n){"use strict";function r(t,e,n,r,o,i,a,s){var c,u="function"===typeof t?t.options:t;if(e&&(u.render=e,u.staticRenderFns=n,u._compiled=!0),r&&(u.functional=!0),i&&(u._scopeId="data-v-"+i),a?(c=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,t||"undefined"===typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),o&&o.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(a)},u._ssrRegister=c):o&&(c=s?function(){o.call(this,(u.functional?this.parent:this).$root.$options.shadowRoot)}:o),c)if(u.functional){u._injectStyles=c;var f=u.render;u.render=function(t,e){return c.call(e),f(t,e)}}else{var l=u.beforeCreate;u.beforeCreate=l?[].concat(l,c):[c]}return{exports:t,options:u}}n.d(e,"a",(function(){return r}))},"2b0e":function(t,e,n){"use strict";n.r(e),function(t){ -/*! - * Vue.js v2.6.14 - * (c) 2014-2021 Evan You - * Released under the MIT License. - */ -var n=Object.freeze({});function r(t){return void 0===t||null===t}function o(t){return void 0!==t&&null!==t}function i(t){return!0===t}function a(t){return!1===t}function s(t){return"string"===typeof t||"number"===typeof t||"symbol"===typeof t||"boolean"===typeof t}function c(t){return null!==t&&"object"===typeof t}var u=Object.prototype.toString;function f(t){return"[object Object]"===u.call(t)}function l(t){return"[object RegExp]"===u.call(t)}function p(t){var e=parseFloat(String(t));return e>=0&&Math.floor(e)===e&&isFinite(t)}function d(t){return o(t)&&"function"===typeof t.then&&"function"===typeof t.catch}function h(t){return null==t?"":Array.isArray(t)||f(t)&&t.toString===u?JSON.stringify(t,null,2):String(t)}function v(t){var e=parseFloat(t);return isNaN(e)?t:e}function y(t,e){for(var n=Object.create(null),r=t.split(","),o=0;o-1)return t.splice(n,1)}}var _=Object.prototype.hasOwnProperty;function b(t,e){return _.call(t,e)}function w(t){var e=Object.create(null);return function(n){var r=e[n];return r||(e[n]=t(n))}}var C=/-(\w)/g,x=w((function(t){return t.replace(C,(function(t,e){return e?e.toUpperCase():""}))})),A=w((function(t){return t.charAt(0).toUpperCase()+t.slice(1)})),$=/\B([A-Z])/g,k=w((function(t){return t.replace($,"-$1").toLowerCase()}));function O(t,e){function n(n){var r=arguments.length;return r?r>1?t.apply(e,arguments):t.call(e,n):t.call(e)}return n._length=t.length,n}function S(t,e){return t.bind(e)}var E=Function.prototype.bind?S:O;function T(t,e){e=e||0;var n=t.length-e,r=new Array(n);while(n--)r[n]=t[n+e];return r}function j(t,e){for(var n in e)t[n]=e[n];return t}function R(t){for(var e={},n=0;n0,nt=Z&&Z.indexOf("edge/")>0,rt=(Z&&Z.indexOf("android"),Z&&/iphone|ipad|ipod|ios/.test(Z)||"ios"===Y),ot=(Z&&/chrome\/\d+/.test(Z),Z&&/phantomjs/.test(Z),Z&&Z.match(/firefox\/(\d+)/)),it={}.watch,at=!1;if(G)try{var st={};Object.defineProperty(st,"passive",{get:function(){at=!0}}),window.addEventListener("test-passive",null,st)}catch(Aa){}var ct=function(){return void 0===X&&(X=!G&&!Q&&"undefined"!==typeof t&&(t["process"]&&"server"===t["process"].env.VUE_ENV)),X},ut=G&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function ft(t){return"function"===typeof t&&/native code/.test(t.toString())}var lt,pt="undefined"!==typeof Symbol&&ft(Symbol)&&"undefined"!==typeof Reflect&&ft(Reflect.ownKeys);lt="undefined"!==typeof Set&&ft(Set)?Set:function(){function t(){this.set=Object.create(null)}return t.prototype.has=function(t){return!0===this.set[t]},t.prototype.add=function(t){this.set[t]=!0},t.prototype.clear=function(){this.set=Object.create(null)},t}();var dt=P,ht=0,vt=function(){this.id=ht++,this.subs=[]};vt.prototype.addSub=function(t){this.subs.push(t)},vt.prototype.removeSub=function(t){g(this.subs,t)},vt.prototype.depend=function(){vt.target&&vt.target.addDep(this)},vt.prototype.notify=function(){var t=this.subs.slice();for(var e=0,n=t.length;e-1)if(i&&!b(o,"default"))a=!1;else if(""===a||a===k(t)){var c=ee(String,o.type);(c<0||s0&&(a=Se(a,(e||"")+"_"+n),Oe(a[0])&&Oe(u)&&(f[c]=Ct(u.text+a[0].text),a.shift()),f.push.apply(f,a)):s(a)?Oe(u)?f[c]=Ct(u.text+a):""!==a&&f.push(Ct(a)):Oe(a)&&Oe(u)?f[c]=Ct(u.text+a.text):(i(t._isVList)&&o(a.tag)&&r(a.key)&&o(e)&&(a.key="__vlist"+e+"_"+n+"__"),f.push(a)));return f}function Ee(t){var e=t.$options.provide;e&&(t._provided="function"===typeof e?e.call(t):e)}function Te(t){var e=je(t.$options.inject,t);e&&(Et(!1),Object.keys(e).forEach((function(n){It(t,n,e[n])})),Et(!0))}function je(t,e){if(t){for(var n=Object.create(null),r=pt?Reflect.ownKeys(t):Object.keys(t),o=0;o0,a=t?!!t.$stable:!i,s=t&&t.$key;if(t){if(t._normalized)return t._normalized;if(a&&r&&r!==n&&s===r.$key&&!i&&!r.$hasNormal)return r;for(var c in o={},t)t[c]&&"$"!==c[0]&&(o[c]=Ne(e,c,t[c]))}else o={};for(var u in e)u in o||(o[u]=De(e,u));return t&&Object.isExtensible(t)&&(t._normalized=o),z(o,"$stable",a),z(o,"$key",s),z(o,"$hasNormal",i),o}function Ne(t,e,n){var r=function(){var t=arguments.length?n.apply(null,arguments):n({});t=t&&"object"===typeof t&&!Array.isArray(t)?[t]:ke(t);var e=t&&t[0];return t&&(!e||1===t.length&&e.isComment&&!Ie(e))?void 0:t};return n.proxy&&Object.defineProperty(t,e,{get:r,enumerable:!0,configurable:!0}),r}function De(t,e){return function(){return t[e]}}function Me(t,e){var n,r,i,a,s;if(Array.isArray(t)||"string"===typeof t)for(n=new Array(t.length),r=0,i=t.length;r1?T(n):n;for(var r=T(arguments,1),o='event handler for "'+t+'"',i=0,a=n.length;idocument.createEvent("Event").timeStamp&&(Jn=function(){return Gn.now()})}function Qn(){var t,e;for(Xn=Jn(),zn=!0,Vn.sort((function(t,e){return t.id-e.id})),Wn=0;WnWn&&Vn[n].id>t.id)n--;Vn.splice(n+1,0,t)}else Vn.push(t);qn||(qn=!0,ve(Qn))}}var nr=0,rr=function(t,e,n,r,o){this.vm=t,o&&(t._watcher=this),t._watchers.push(this),r?(this.deep=!!r.deep,this.user=!!r.user,this.lazy=!!r.lazy,this.sync=!!r.sync,this.before=r.before):this.deep=this.user=this.lazy=this.sync=!1,this.cb=n,this.id=++nr,this.active=!0,this.dirty=this.lazy,this.deps=[],this.newDeps=[],this.depIds=new lt,this.newDepIds=new lt,this.expression="","function"===typeof e?this.getter=e:(this.getter=K(e),this.getter||(this.getter=P)),this.value=this.lazy?void 0:this.get()};rr.prototype.get=function(){var t;mt(this);var e=this.vm;try{t=this.getter.call(e,e)}catch(Aa){if(!this.user)throw Aa;ne(Aa,e,'getter for watcher "'+this.expression+'"')}finally{this.deep&&me(t),gt(),this.cleanupDeps()}return t},rr.prototype.addDep=function(t){var e=t.id;this.newDepIds.has(e)||(this.newDepIds.add(e),this.newDeps.push(t),this.depIds.has(e)||t.addSub(this))},rr.prototype.cleanupDeps=function(){var t=this.deps.length;while(t--){var e=this.deps[t];this.newDepIds.has(e.id)||e.removeSub(this)}var n=this.depIds;this.depIds=this.newDepIds,this.newDepIds=n,this.newDepIds.clear(),n=this.deps,this.deps=this.newDeps,this.newDeps=n,this.newDeps.length=0},rr.prototype.update=function(){this.lazy?this.dirty=!0:this.sync?this.run():er(this)},rr.prototype.run=function(){if(this.active){var t=this.get();if(t!==this.value||c(t)||this.deep){var e=this.value;if(this.value=t,this.user){var n='callback for watcher "'+this.expression+'"';re(this.cb,this.vm,[t,e],this.vm,n)}else this.cb.call(this.vm,t,e)}}},rr.prototype.evaluate=function(){this.value=this.get(),this.dirty=!1},rr.prototype.depend=function(){var t=this.deps.length;while(t--)this.deps[t].depend()},rr.prototype.teardown=function(){if(this.active){this.vm._isBeingDestroyed||g(this.vm._watchers,this);var t=this.deps.length;while(t--)this.deps[t].removeSub(this);this.active=!1}};var or={enumerable:!0,configurable:!0,get:P,set:P};function ir(t,e,n){or.get=function(){return this[e][n]},or.set=function(t){this[e][n]=t},Object.defineProperty(t,n,or)}function ar(t){t._watchers=[];var e=t.$options;e.props&&sr(t,e.props),e.methods&&vr(t,e.methods),e.data?cr(t):Pt(t._data={},!0),e.computed&&lr(t,e.computed),e.watch&&e.watch!==it&&yr(t,e.watch)}function sr(t,e){var n=t.$options.propsData||{},r=t._props={},o=t.$options._propKeys=[],i=!t.$parent;i||Et(!1);var a=function(i){o.push(i);var a=Gt(i,e,n,t);It(r,i,a),i in t||ir(t,"_props",i)};for(var s in e)a(s);Et(!0)}function cr(t){var e=t.$options.data;e=t._data="function"===typeof e?ur(e,t):e||{},f(e)||(e={});var n=Object.keys(e),r=t.$options.props,o=(t.$options.methods,n.length);while(o--){var i=n[o];0,r&&b(r,i)||q(i)||ir(t,"_data",i)}Pt(e,!0)}function ur(t,e){mt();try{return t.call(e,e)}catch(Aa){return ne(Aa,e,"data()"),{}}finally{gt()}}var fr={lazy:!0};function lr(t,e){var n=t._computedWatchers=Object.create(null),r=ct();for(var o in e){var i=e[o],a="function"===typeof i?i:i.get;0,r||(n[o]=new rr(t,a||P,P,fr)),o in t||pr(t,o,i)}}function pr(t,e,n){var r=!ct();"function"===typeof n?(or.get=r?dr(e):hr(n),or.set=P):(or.get=n.get?r&&!1!==n.cache?dr(e):hr(n.get):P,or.set=n.set||P),Object.defineProperty(t,e,or)}function dr(t){return function(){var e=this._computedWatchers&&this._computedWatchers[t];if(e)return e.dirty&&e.evaluate(),vt.target&&e.depend(),e.value}}function hr(t){return function(){return t.call(this,this)}}function vr(t,e){t.$options.props;for(var n in e)t[n]="function"!==typeof e[n]?P:E(e[n],t)}function yr(t,e){for(var n in e){var r=e[n];if(Array.isArray(r))for(var o=0;o-1)return this;var n=T(arguments,1);return n.unshift(this),"function"===typeof t.install?t.install.apply(t,n):"function"===typeof t&&t.apply(null,n),e.push(t),this}}function kr(t){t.mixin=function(t){return this.options=Xt(this.options,t),this}}function Or(t){t.cid=0;var e=1;t.extend=function(t){t=t||{};var n=this,r=n.cid,o=t._Ctor||(t._Ctor={});if(o[r])return o[r];var i=t.name||n.options.name;var a=function(t){this._init(t)};return a.prototype=Object.create(n.prototype),a.prototype.constructor=a,a.cid=e++,a.options=Xt(n.options,t),a["super"]=n,a.options.props&&Sr(a),a.options.computed&&Er(a),a.extend=n.extend,a.mixin=n.mixin,a.use=n.use,U.forEach((function(t){a[t]=n[t]})),i&&(a.options.components[i]=a),a.superOptions=n.options,a.extendOptions=t,a.sealedOptions=j({},a.options),o[r]=a,a}}function Sr(t){var e=t.options.props;for(var n in e)ir(t.prototype,"_props",n)}function Er(t){var e=t.options.computed;for(var n in e)pr(t.prototype,n,e[n])}function Tr(t){U.forEach((function(e){t[e]=function(t,n){return n?("component"===e&&f(n)&&(n.name=n.name||t,n=this.options._base.extend(n)),"directive"===e&&"function"===typeof n&&(n={bind:n,update:n}),this.options[e+"s"][t]=n,n):this.options[e+"s"][t]}}))}function jr(t){return t&&(t.Ctor.options.name||t.tag)}function Rr(t,e){return Array.isArray(t)?t.indexOf(e)>-1:"string"===typeof t?t.split(",").indexOf(e)>-1:!!l(t)&&t.test(e)}function Pr(t,e){var n=t.cache,r=t.keys,o=t._vnode;for(var i in n){var a=n[i];if(a){var s=a.name;s&&!e(s)&&Ir(n,i,r,o)}}}function Ir(t,e,n,r){var o=t[e];!o||r&&o.tag===r.tag||o.componentInstance.$destroy(),t[e]=null,g(n,e)}br(Ar),gr(Ar),Tn(Ar),In(Ar),bn(Ar);var Lr=[String,RegExp,Array],Nr={name:"keep-alive",abstract:!0,props:{include:Lr,exclude:Lr,max:[String,Number]},methods:{cacheVNode:function(){var t=this,e=t.cache,n=t.keys,r=t.vnodeToCache,o=t.keyToCache;if(r){var i=r.tag,a=r.componentInstance,s=r.componentOptions;e[o]={name:jr(s),tag:i,componentInstance:a},n.push(o),this.max&&n.length>parseInt(this.max)&&Ir(e,n[0],n,this._vnode),this.vnodeToCache=null}}},created:function(){this.cache=Object.create(null),this.keys=[]},destroyed:function(){for(var t in this.cache)Ir(this.cache,t,this.keys)},mounted:function(){var t=this;this.cacheVNode(),this.$watch("include",(function(e){Pr(t,(function(t){return Rr(e,t)}))})),this.$watch("exclude",(function(e){Pr(t,(function(t){return!Rr(e,t)}))}))},updated:function(){this.cacheVNode()},render:function(){var t=this.$slots.default,e=An(t),n=e&&e.componentOptions;if(n){var r=jr(n),o=this,i=o.include,a=o.exclude;if(i&&(!r||!Rr(i,r))||a&&r&&Rr(a,r))return e;var s=this,c=s.cache,u=s.keys,f=null==e.key?n.Ctor.cid+(n.tag?"::"+n.tag:""):e.key;c[f]?(e.componentInstance=c[f].componentInstance,g(u,f),u.push(f)):(this.vnodeToCache=e,this.keyToCache=f),e.data.keepAlive=!0}return e||t&&t[0]}},Dr={KeepAlive:Nr};function Mr(t){var e={get:function(){return B}};Object.defineProperty(t,"config",e),t.util={warn:dt,extend:j,mergeOptions:Xt,defineReactive:It},t.set=Lt,t.delete=Nt,t.nextTick=ve,t.observable=function(t){return Pt(t),t},t.options=Object.create(null),U.forEach((function(e){t.options[e+"s"]=Object.create(null)})),t.options._base=t,j(t.options.components,Dr),$r(t),kr(t),Or(t),Tr(t)}Mr(Ar),Object.defineProperty(Ar.prototype,"$isServer",{get:ct}),Object.defineProperty(Ar.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),Object.defineProperty(Ar,"FunctionalRenderContext",{value:Ze}),Ar.version="2.6.14";var Fr=y("style,class"),Ur=y("input,textarea,option,select,progress"),Vr=function(t,e,n){return"value"===n&&Ur(t)&&"button"!==e||"selected"===n&&"option"===t||"checked"===n&&"input"===t||"muted"===n&&"video"===t},Br=y("contenteditable,draggable,spellcheck"),Hr=y("events,caret,typing,plaintext-only"),qr=function(t,e){return Jr(e)||"false"===e?"false":"contenteditable"===t&&Hr(e)?e:"true"},zr=y("allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,truespeed,typemustmatch,visible"),Wr="http://www.w3.org/1999/xlink",Kr=function(t){return":"===t.charAt(5)&&"xlink"===t.slice(0,5)},Xr=function(t){return Kr(t)?t.slice(6,t.length):""},Jr=function(t){return null==t||!1===t};function Gr(t){var e=t.data,n=t,r=t;while(o(r.componentInstance))r=r.componentInstance._vnode,r&&r.data&&(e=Qr(r.data,e));while(o(n=n.parent))n&&n.data&&(e=Qr(e,n.data));return Yr(e.staticClass,e.class)}function Qr(t,e){return{staticClass:Zr(t.staticClass,e.staticClass),class:o(t.class)?[t.class,e.class]:e.class}}function Yr(t,e){return o(t)||o(e)?Zr(t,to(e)):""}function Zr(t,e){return t?e?t+" "+e:t:e||""}function to(t){return Array.isArray(t)?eo(t):c(t)?no(t):"string"===typeof t?t:""}function eo(t){for(var e,n="",r=0,i=t.length;r-1?co[t]=e.constructor===window.HTMLUnknownElement||e.constructor===window.HTMLElement:co[t]=/HTMLUnknownElement/.test(e.toString())}var fo=y("text,number,password,search,email,tel,url");function lo(t){if("string"===typeof t){var e=document.querySelector(t);return e||document.createElement("div")}return t}function po(t,e){var n=document.createElement(t);return"select"!==t||e.data&&e.data.attrs&&void 0!==e.data.attrs.multiple&&n.setAttribute("multiple","multiple"),n}function ho(t,e){return document.createElementNS(ro[t],e)}function vo(t){return document.createTextNode(t)}function yo(t){return document.createComment(t)}function mo(t,e,n){t.insertBefore(e,n)}function go(t,e){t.removeChild(e)}function _o(t,e){t.appendChild(e)}function bo(t){return t.parentNode}function wo(t){return t.nextSibling}function Co(t){return t.tagName}function xo(t,e){t.textContent=e}function Ao(t,e){t.setAttribute(e,"")}var $o=Object.freeze({createElement:po,createElementNS:ho,createTextNode:vo,createComment:yo,insertBefore:mo,removeChild:go,appendChild:_o,parentNode:bo,nextSibling:wo,tagName:Co,setTextContent:xo,setStyleScope:Ao}),ko={create:function(t,e){Oo(e)},update:function(t,e){t.data.ref!==e.data.ref&&(Oo(t,!0),Oo(e))},destroy:function(t){Oo(t,!0)}};function Oo(t,e){var n=t.data.ref;if(o(n)){var r=t.context,i=t.componentInstance||t.elm,a=r.$refs;e?Array.isArray(a[n])?g(a[n],i):a[n]===i&&(a[n]=void 0):t.data.refInFor?Array.isArray(a[n])?a[n].indexOf(i)<0&&a[n].push(i):a[n]=[i]:a[n]=i}}var So=new _t("",{},[]),Eo=["create","activate","update","remove","destroy"];function To(t,e){return t.key===e.key&&t.asyncFactory===e.asyncFactory&&(t.tag===e.tag&&t.isComment===e.isComment&&o(t.data)===o(e.data)&&jo(t,e)||i(t.isAsyncPlaceholder)&&r(e.asyncFactory.error))}function jo(t,e){if("input"!==t.tag)return!0;var n,r=o(n=t.data)&&o(n=n.attrs)&&n.type,i=o(n=e.data)&&o(n=n.attrs)&&n.type;return r===i||fo(r)&&fo(i)}function Ro(t,e,n){var r,i,a={};for(r=e;r<=n;++r)i=t[r].key,o(i)&&(a[i]=r);return a}function Po(t){var e,n,a={},c=t.modules,u=t.nodeOps;for(e=0;ev?(l=r(n[g+1])?null:n[g+1].elm,x(t,l,n,h,g,i)):h>g&&$(e,p,v)}function S(t,e,n,r){for(var i=n;i-1?qo(t,e,n):zr(e)?Jr(n)?t.removeAttribute(e):(n="allowfullscreen"===e&&"EMBED"===t.tagName?"true":e,t.setAttribute(e,n)):Br(e)?t.setAttribute(e,qr(e,n)):Kr(e)?Jr(n)?t.removeAttributeNS(Wr,Xr(e)):t.setAttributeNS(Wr,e,n):qo(t,e,n)}function qo(t,e,n){if(Jr(n))t.removeAttribute(e);else{if(tt&&!et&&"TEXTAREA"===t.tagName&&"placeholder"===e&&""!==n&&!t.__ieph){var r=function(e){e.stopImmediatePropagation(),t.removeEventListener("input",r)};t.addEventListener("input",r),t.__ieph=!0}t.setAttribute(e,n)}}var zo={create:Bo,update:Bo};function Wo(t,e){var n=e.elm,i=e.data,a=t.data;if(!(r(i.staticClass)&&r(i.class)&&(r(a)||r(a.staticClass)&&r(a.class)))){var s=Gr(e),c=n._transitionClasses;o(c)&&(s=Zr(s,to(c))),s!==n._prevClass&&(n.setAttribute("class",s),n._prevClass=s)}}var Ko,Xo={create:Wo,update:Wo},Jo="__r",Go="__c";function Qo(t){if(o(t[Jo])){var e=tt?"change":"input";t[e]=[].concat(t[Jo],t[e]||[]),delete t[Jo]}o(t[Go])&&(t.change=[].concat(t[Go],t.change||[]),delete t[Go])}function Yo(t,e,n){var r=Ko;return function o(){var i=e.apply(null,arguments);null!==i&&ei(t,o,n,r)}}var Zo=se&&!(ot&&Number(ot[1])<=53);function ti(t,e,n,r){if(Zo){var o=Xn,i=e;e=i._wrapper=function(t){if(t.target===t.currentTarget||t.timeStamp>=o||t.timeStamp<=0||t.target.ownerDocument!==document)return i.apply(this,arguments)}}Ko.addEventListener(t,e,at?{capture:n,passive:r}:n)}function ei(t,e,n,r){(r||Ko).removeEventListener(t,e._wrapper||e,n)}function ni(t,e){if(!r(t.data.on)||!r(e.data.on)){var n=e.data.on||{},o=t.data.on||{};Ko=e.elm,Qo(n),we(n,o,ti,ei,Yo,e.context),Ko=void 0}}var ri,oi={create:ni,update:ni};function ii(t,e){if(!r(t.data.domProps)||!r(e.data.domProps)){var n,i,a=e.elm,s=t.data.domProps||{},c=e.data.domProps||{};for(n in o(c.__ob__)&&(c=e.data.domProps=j({},c)),s)n in c||(a[n]="");for(n in c){if(i=c[n],"textContent"===n||"innerHTML"===n){if(e.children&&(e.children.length=0),i===s[n])continue;1===a.childNodes.length&&a.removeChild(a.childNodes[0])}if("value"===n&&"PROGRESS"!==a.tagName){a._value=i;var u=r(i)?"":String(i);ai(a,u)&&(a.value=u)}else if("innerHTML"===n&&io(a.tagName)&&r(a.innerHTML)){ri=ri||document.createElement("div"),ri.innerHTML=""+i+"";var f=ri.firstChild;while(a.firstChild)a.removeChild(a.firstChild);while(f.firstChild)a.appendChild(f.firstChild)}else if(i!==s[n])try{a[n]=i}catch(Aa){}}}}function ai(t,e){return!t.composing&&("OPTION"===t.tagName||si(t,e)||ci(t,e))}function si(t,e){var n=!0;try{n=document.activeElement!==t}catch(Aa){}return n&&t.value!==e}function ci(t,e){var n=t.value,r=t._vModifiers;if(o(r)){if(r.number)return v(n)!==v(e);if(r.trim)return n.trim()!==e.trim()}return n!==e}var ui={create:ii,update:ii},fi=w((function(t){var e={},n=/;(?![^(]*\))/g,r=/:(.+)/;return t.split(n).forEach((function(t){if(t){var n=t.split(r);n.length>1&&(e[n[0].trim()]=n[1].trim())}})),e}));function li(t){var e=pi(t.style);return t.staticStyle?j(t.staticStyle,e):e}function pi(t){return Array.isArray(t)?R(t):"string"===typeof t?fi(t):t}function di(t,e){var n,r={};if(e){var o=t;while(o.componentInstance)o=o.componentInstance._vnode,o&&o.data&&(n=li(o.data))&&j(r,n)}(n=li(t.data))&&j(r,n);var i=t;while(i=i.parent)i.data&&(n=li(i.data))&&j(r,n);return r}var hi,vi=/^--/,yi=/\s*!important$/,mi=function(t,e,n){if(vi.test(e))t.style.setProperty(e,n);else if(yi.test(n))t.style.setProperty(k(e),n.replace(yi,""),"important");else{var r=_i(e);if(Array.isArray(n))for(var o=0,i=n.length;o-1?e.split(Ci).forEach((function(e){return t.classList.add(e)})):t.classList.add(e);else{var n=" "+(t.getAttribute("class")||"")+" ";n.indexOf(" "+e+" ")<0&&t.setAttribute("class",(n+e).trim())}}function Ai(t,e){if(e&&(e=e.trim()))if(t.classList)e.indexOf(" ")>-1?e.split(Ci).forEach((function(e){return t.classList.remove(e)})):t.classList.remove(e),t.classList.length||t.removeAttribute("class");else{var n=" "+(t.getAttribute("class")||"")+" ",r=" "+e+" ";while(n.indexOf(r)>=0)n=n.replace(r," ");n=n.trim(),n?t.setAttribute("class",n):t.removeAttribute("class")}}function $i(t){if(t){if("object"===typeof t){var e={};return!1!==t.css&&j(e,ki(t.name||"v")),j(e,t),e}return"string"===typeof t?ki(t):void 0}}var ki=w((function(t){return{enterClass:t+"-enter",enterToClass:t+"-enter-to",enterActiveClass:t+"-enter-active",leaveClass:t+"-leave",leaveToClass:t+"-leave-to",leaveActiveClass:t+"-leave-active"}})),Oi=G&&!et,Si="transition",Ei="animation",Ti="transition",ji="transitionend",Ri="animation",Pi="animationend";Oi&&(void 0===window.ontransitionend&&void 0!==window.onwebkittransitionend&&(Ti="WebkitTransition",ji="webkitTransitionEnd"),void 0===window.onanimationend&&void 0!==window.onwebkitanimationend&&(Ri="WebkitAnimation",Pi="webkitAnimationEnd"));var Ii=G?window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout:function(t){return t()};function Li(t){Ii((function(){Ii(t)}))}function Ni(t,e){var n=t._transitionClasses||(t._transitionClasses=[]);n.indexOf(e)<0&&(n.push(e),xi(t,e))}function Di(t,e){t._transitionClasses&&g(t._transitionClasses,e),Ai(t,e)}function Mi(t,e,n){var r=Ui(t,e),o=r.type,i=r.timeout,a=r.propCount;if(!o)return n();var s=o===Si?ji:Pi,c=0,u=function(){t.removeEventListener(s,f),n()},f=function(e){e.target===t&&++c>=a&&u()};setTimeout((function(){c0&&(n=Si,f=a,l=i.length):e===Ei?u>0&&(n=Ei,f=u,l=c.length):(f=Math.max(a,u),n=f>0?a>u?Si:Ei:null,l=n?n===Si?i.length:c.length:0);var p=n===Si&&Fi.test(r[Ti+"Property"]);return{type:n,timeout:f,propCount:l,hasTransform:p}}function Vi(t,e){while(t.length1}function Ki(t,e){!0!==e.data.show&&Hi(e)}var Xi=G?{create:Ki,activate:Ki,remove:function(t,e){!0!==t.data.show?qi(t,e):e()}}:{},Ji=[zo,Xo,oi,ui,wi,Xi],Gi=Ji.concat(Vo),Qi=Po({nodeOps:$o,modules:Gi});et&&document.addEventListener("selectionchange",(function(){var t=document.activeElement;t&&t.vmodel&&ia(t,"input")}));var Yi={inserted:function(t,e,n,r){"select"===n.tag?(r.elm&&!r.elm._vOptions?Ce(n,"postpatch",(function(){Yi.componentUpdated(t,e,n)})):Zi(t,e,n.context),t._vOptions=[].map.call(t.options,na)):("textarea"===n.tag||fo(t.type))&&(t._vModifiers=e.modifiers,e.modifiers.lazy||(t.addEventListener("compositionstart",ra),t.addEventListener("compositionend",oa),t.addEventListener("change",oa),et&&(t.vmodel=!0)))},componentUpdated:function(t,e,n){if("select"===n.tag){Zi(t,e,n.context);var r=t._vOptions,o=t._vOptions=[].map.call(t.options,na);if(o.some((function(t,e){return!N(t,r[e])}))){var i=t.multiple?e.value.some((function(t){return ea(t,o)})):e.value!==e.oldValue&&ea(e.value,o);i&&ia(t,"change")}}}};function Zi(t,e,n){ta(t,e,n),(tt||nt)&&setTimeout((function(){ta(t,e,n)}),0)}function ta(t,e,n){var r=e.value,o=t.multiple;if(!o||Array.isArray(r)){for(var i,a,s=0,c=t.options.length;s-1,a.selected!==i&&(a.selected=i);else if(N(na(a),r))return void(t.selectedIndex!==s&&(t.selectedIndex=s));o||(t.selectedIndex=-1)}}function ea(t,e){return e.every((function(e){return!N(e,t)}))}function na(t){return"_value"in t?t._value:t.value}function ra(t){t.target.composing=!0}function oa(t){t.target.composing&&(t.target.composing=!1,ia(t.target,"input"))}function ia(t,e){var n=document.createEvent("HTMLEvents");n.initEvent(e,!0,!0),t.dispatchEvent(n)}function aa(t){return!t.componentInstance||t.data&&t.data.transition?t:aa(t.componentInstance._vnode)}var sa={bind:function(t,e,n){var r=e.value;n=aa(n);var o=n.data&&n.data.transition,i=t.__vOriginalDisplay="none"===t.style.display?"":t.style.display;r&&o?(n.data.show=!0,Hi(n,(function(){t.style.display=i}))):t.style.display=r?i:"none"},update:function(t,e,n){var r=e.value,o=e.oldValue;if(!r!==!o){n=aa(n);var i=n.data&&n.data.transition;i?(n.data.show=!0,r?Hi(n,(function(){t.style.display=t.__vOriginalDisplay})):qi(n,(function(){t.style.display="none"}))):t.style.display=r?t.__vOriginalDisplay:"none"}},unbind:function(t,e,n,r,o){o||(t.style.display=t.__vOriginalDisplay)}},ca={model:Yi,show:sa},ua={name:String,appear:Boolean,css:Boolean,mode:String,type:String,enterClass:String,leaveClass:String,enterToClass:String,leaveToClass:String,enterActiveClass:String,leaveActiveClass:String,appearClass:String,appearActiveClass:String,appearToClass:String,duration:[Number,String,Object]};function fa(t){var e=t&&t.componentOptions;return e&&e.Ctor.options.abstract?fa(An(e.children)):t}function la(t){var e={},n=t.$options;for(var r in n.propsData)e[r]=t[r];var o=n._parentListeners;for(var i in o)e[x(i)]=o[i];return e}function pa(t,e){if(/\d-keep-alive$/.test(e.tag))return t("keep-alive",{props:e.componentOptions.propsData})}function da(t){while(t=t.parent)if(t.data.transition)return!0}function ha(t,e){return e.key===t.key&&e.tag===t.tag}var va=function(t){return t.tag||Ie(t)},ya=function(t){return"show"===t.name},ma={name:"transition",props:ua,abstract:!0,render:function(t){var e=this,n=this.$slots.default;if(n&&(n=n.filter(va),n.length)){0;var r=this.mode;0;var o=n[0];if(da(this.$vnode))return o;var i=fa(o);if(!i)return o;if(this._leaving)return pa(t,o);var a="__transition-"+this._uid+"-";i.key=null==i.key?i.isComment?a+"comment":a+i.tag:s(i.key)?0===String(i.key).indexOf(a)?i.key:a+i.key:i.key;var c=(i.data||(i.data={})).transition=la(this),u=this._vnode,f=fa(u);if(i.data.directives&&i.data.directives.some(ya)&&(i.data.show=!0),f&&f.data&&!ha(i,f)&&!Ie(f)&&(!f.componentInstance||!f.componentInstance._vnode.isComment)){var l=f.data.transition=j({},c);if("out-in"===r)return this._leaving=!0,Ce(l,"afterLeave",(function(){e._leaving=!1,e.$forceUpdate()})),pa(t,o);if("in-out"===r){if(Ie(i))return u;var p,d=function(){p()};Ce(c,"afterEnter",d),Ce(c,"enterCancelled",d),Ce(l,"delayLeave",(function(t){p=t}))}}return o}}},ga=j({tag:String,moveClass:String},ua);delete ga.mode;var _a={props:ga,beforeMount:function(){var t=this,e=this._update;this._update=function(n,r){var o=Rn(t);t.__patch__(t._vnode,t.kept,!1,!0),t._vnode=t.kept,o(),e.call(t,n,r)}},render:function(t){for(var e=this.tag||this.$vnode.data.tag||"span",n=Object.create(null),r=this.prevChildren=this.children,o=this.$slots.default||[],i=this.children=[],a=la(this),s=0;s=0&&(e=t.slice(r),t=t.slice(0,r));var o=t.indexOf("?");return o>=0&&(n=t.slice(o+1),t=t.slice(0,o)),{path:t,query:n,hash:e}}function T(t){return t.replace(/\/\//g,"/")}var j=Array.isArray||function(t){return"[object Array]"==Object.prototype.toString.call(t)},R=Q,P=M,I=F,L=B,N=G,D=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function M(t,e){var n,r=[],o=0,i=0,a="",s=e&&e.delimiter||"/";while(null!=(n=D.exec(t))){var c=n[0],u=n[1],f=n.index;if(a+=t.slice(i,f),i=f+c.length,u)a+=u[1];else{var l=t[i],p=n[2],d=n[3],h=n[4],v=n[5],y=n[6],m=n[7];a&&(r.push(a),a="");var g=null!=p&&null!=l&&l!==p,_="+"===y||"*"===y,b="?"===y||"*"===y,w=n[2]||s,C=h||v;r.push({name:d||o++,prefix:p||"",delimiter:w,optional:b,repeat:_,partial:g,asterisk:!!m,pattern:C?q(C):m?".*":"[^"+H(w)+"]+?"})}}return i1||!A.length)return 0===A.length?t():t("span",{},A)}if("a"===this.tag)x.on=w,x.attrs={href:c,"aria-current":g};else{var $=st(this.$slots.default);if($){$.isStatic=!1;var k=$.data=o({},$.data);for(var O in k.on=k.on||{},k.on){var S=k.on[O];O in w&&(k.on[O]=Array.isArray(S)?S:[S])}for(var E in w)E in k.on?k.on[E].push(w[E]):k.on[E]=_;var T=$.data.attrs=o({},$.data.attrs);T.href=c,T["aria-current"]=g}else x.on=w}return t(this.tag,x,this.$slots.default)}};function at(t){if(!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)&&!t.defaultPrevented&&(void 0===t.button||0===t.button)){if(t.currentTarget&&t.currentTarget.getAttribute){var e=t.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(e))return}return t.preventDefault&&t.preventDefault(),!0}}function st(t){if(t)for(var e,n=0;n-1&&(s.params[l]=n.params[l]);return s.path=Z(u.path,s.params,'named route "'+c+'"'),p(u,s,a)}if(s.path){s.params={};for(var d=0;d=t.length?n():t[o]?e(t[o],(function(){r(o+1)})):r(o+1)};r(0)}var Ft={redirected:2,aborted:4,cancelled:8,duplicated:16};function Ut(t,e){return qt(t,e,Ft.redirected,'Redirected when going from "'+t.fullPath+'" to "'+Wt(e)+'" via a navigation guard.')}function Vt(t,e){var n=qt(t,e,Ft.duplicated,'Avoided redundant navigation to current location: "'+t.fullPath+'".');return n.name="NavigationDuplicated",n}function Bt(t,e){return qt(t,e,Ft.cancelled,'Navigation cancelled from "'+t.fullPath+'" to "'+e.fullPath+'" with a new navigation.')}function Ht(t,e){return qt(t,e,Ft.aborted,'Navigation aborted from "'+t.fullPath+'" to "'+e.fullPath+'" via a navigation guard.')}function qt(t,e,n,r){var o=new Error(r);return o._isRouter=!0,o.from=t,o.to=e,o.type=n,o}var zt=["params","query","hash"];function Wt(t){if("string"===typeof t)return t;if("path"in t)return t.path;var e={};return zt.forEach((function(n){n in t&&(e[n]=t[n])})),JSON.stringify(e,null,2)}function Kt(t){return Object.prototype.toString.call(t).indexOf("Error")>-1}function Xt(t,e){return Kt(t)&&t._isRouter&&(null==e||t.type===e)}function Jt(t){return function(e,n,r){var o=!1,i=0,a=null;Gt(t,(function(t,e,n,s){if("function"===typeof t&&void 0===t.cid){o=!0,i++;var c,u=te((function(e){Zt(e)&&(e=e.default),t.resolved="function"===typeof e?e:et.extend(e),n.components[s]=e,i--,i<=0&&r()})),f=te((function(t){var e="Failed to resolve async component "+s+": "+t;a||(a=Kt(t)?t:new Error(e),r(a))}));try{c=t(u,f)}catch(p){f(p)}if(c)if("function"===typeof c.then)c.then(u,f);else{var l=c.component;l&&"function"===typeof l.then&&l.then(u,f)}}})),o||r()}}function Gt(t,e){return Qt(t.map((function(t){return Object.keys(t.components).map((function(n){return e(t.components[n],t.instances[n],t,n)}))})))}function Qt(t){return Array.prototype.concat.apply([],t)}var Yt="function"===typeof Symbol&&"symbol"===typeof Symbol.toStringTag;function Zt(t){return t.__esModule||Yt&&"Module"===t[Symbol.toStringTag]}function te(t){var e=!1;return function(){var n=[],r=arguments.length;while(r--)n[r]=arguments[r];if(!e)return e=!0,t.apply(this,n)}}var ee=function(t,e){this.router=t,this.base=ne(e),this.current=m,this.pending=null,this.ready=!1,this.readyCbs=[],this.readyErrorCbs=[],this.errorCbs=[],this.listeners=[]};function ne(t){if(!t)if(ut){var e=document.querySelector("base");t=e&&e.getAttribute("href")||"/",t=t.replace(/^https?:\/\/[^\/]+/,"")}else t="/";return"/"!==t.charAt(0)&&(t="/"+t),t.replace(/\/$/,"")}function re(t,e){var n,r=Math.max(t.length,e.length);for(n=0;n0)){var e=this.router,n=e.options.scrollBehavior,r=Lt&&n;r&&this.listeners.push(xt());var o=function(){var n=t.current,o=pe(t.base);t.current===m&&o===t._startLocation||t.transitionTo(o,(function(t){r&&At(e,t,n,!0)}))};window.addEventListener("popstate",o),this.listeners.push((function(){window.removeEventListener("popstate",o)}))}},e.prototype.go=function(t){window.history.go(t)},e.prototype.push=function(t,e,n){var r=this,o=this,i=o.current;this.transitionTo(t,(function(t){Nt(T(r.base+t.fullPath)),At(r.router,t,i,!1),e&&e(t)}),n)},e.prototype.replace=function(t,e,n){var r=this,o=this,i=o.current;this.transitionTo(t,(function(t){Dt(T(r.base+t.fullPath)),At(r.router,t,i,!1),e&&e(t)}),n)},e.prototype.ensureURL=function(t){if(pe(this.base)!==this.current.fullPath){var e=T(this.base+this.current.fullPath);t?Nt(e):Dt(e)}},e.prototype.getCurrentLocation=function(){return pe(this.base)},e}(ee);function pe(t){var e=window.location.pathname,n=e.toLowerCase(),r=t.toLowerCase();return!t||n!==r&&0!==n.indexOf(T(r+"/"))||(e=e.slice(t.length)),(e||"/")+window.location.search+window.location.hash}var de=function(t){function e(e,n,r){t.call(this,e,n),r&&he(this.base)||ve()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setupListeners=function(){var t=this;if(!(this.listeners.length>0)){var e=this.router,n=e.options.scrollBehavior,r=Lt&&n;r&&this.listeners.push(xt());var o=function(){var e=t.current;ve()&&t.transitionTo(ye(),(function(n){r&&At(t.router,n,e,!0),Lt||_e(n.fullPath)}))},i=Lt?"popstate":"hashchange";window.addEventListener(i,o),this.listeners.push((function(){window.removeEventListener(i,o)}))}},e.prototype.push=function(t,e,n){var r=this,o=this,i=o.current;this.transitionTo(t,(function(t){ge(t.fullPath),At(r.router,t,i,!1),e&&e(t)}),n)},e.prototype.replace=function(t,e,n){var r=this,o=this,i=o.current;this.transitionTo(t,(function(t){_e(t.fullPath),At(r.router,t,i,!1),e&&e(t)}),n)},e.prototype.go=function(t){window.history.go(t)},e.prototype.ensureURL=function(t){var e=this.current.fullPath;ye()!==e&&(t?ge(e):_e(e))},e.prototype.getCurrentLocation=function(){return ye()},e}(ee);function he(t){var e=pe(t);if(!/^\/#/.test(e))return window.location.replace(T(t+"/#"+e)),!0}function ve(){var t=ye();return"/"===t.charAt(0)||(_e("/"+t),!1)}function ye(){var t=window.location.href,e=t.indexOf("#");return e<0?"":(t=t.slice(e+1),t)}function me(t){var e=window.location.href,n=e.indexOf("#"),r=n>=0?e.slice(0,n):e;return r+"#"+t}function ge(t){Lt?Nt(me(t)):window.location.hash=t}function _e(t){Lt?Dt(me(t)):window.location.replace(me(t))}var be=function(t){function e(e,n){t.call(this,e,n),this.stack=[],this.index=-1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.push=function(t,e,n){var r=this;this.transitionTo(t,(function(t){r.stack=r.stack.slice(0,r.index+1).concat(t),r.index++,e&&e(t)}),n)},e.prototype.replace=function(t,e,n){var r=this;this.transitionTo(t,(function(t){r.stack=r.stack.slice(0,r.index).concat(t),e&&e(t)}),n)},e.prototype.go=function(t){var e=this,n=this.index+t;if(!(n<0||n>=this.stack.length)){var r=this.stack[n];this.confirmTransition(r,(function(){var t=e.current;e.index=n,e.updateRoute(r),e.router.afterHooks.forEach((function(e){e&&e(r,t)}))}),(function(t){Xt(t,Ft.duplicated)&&(e.index=n)}))}},e.prototype.getCurrentLocation=function(){var t=this.stack[this.stack.length-1];return t?t.fullPath:"/"},e.prototype.ensureURL=function(){},e}(ee),we=function(t){void 0===t&&(t={}),this.app=null,this.apps=[],this.options=t,this.beforeHooks=[],this.resolveHooks=[],this.afterHooks=[],this.matcher=ht(t.routes||[],this);var e=t.mode||"hash";switch(this.fallback="history"===e&&!Lt&&!1!==t.fallback,this.fallback&&(e="hash"),ut||(e="abstract"),this.mode=e,e){case"history":this.history=new le(this,t.base);break;case"hash":this.history=new de(this,t.base,this.fallback);break;case"abstract":this.history=new be(this,t.base);break;default:0}},Ce={currentRoute:{configurable:!0}};function xe(t,e){return t.push(e),function(){var n=t.indexOf(e);n>-1&&t.splice(n,1)}}function Ae(t,e,n){var r="hash"===n?"#"+e:e;return t?T(t+"/"+r):r}we.prototype.match=function(t,e,n){return this.matcher.match(t,e,n)},Ce.currentRoute.get=function(){return this.history&&this.history.current},we.prototype.init=function(t){var e=this;if(this.apps.push(t),t.$once("hook:destroyed",(function(){var n=e.apps.indexOf(t);n>-1&&e.apps.splice(n,1),e.app===t&&(e.app=e.apps[0]||null),e.app||e.history.teardown()})),!this.app){this.app=t;var n=this.history;if(n instanceof le||n instanceof de){var r=function(t){var r=n.current,o=e.options.scrollBehavior,i=Lt&&o;i&&"fullPath"in t&&At(e,t,r,!1)},o=function(t){n.setupListeners(),r(t)};n.transitionTo(n.getCurrentLocation(),o,o)}n.listen((function(t){e.apps.forEach((function(e){e._route=t}))}))}},we.prototype.beforeEach=function(t){return xe(this.beforeHooks,t)},we.prototype.beforeResolve=function(t){return xe(this.resolveHooks,t)},we.prototype.afterEach=function(t){return xe(this.afterHooks,t)},we.prototype.onReady=function(t,e){this.history.onReady(t,e)},we.prototype.onError=function(t){this.history.onError(t)},we.prototype.push=function(t,e,n){var r=this;if(!e&&!n&&"undefined"!==typeof Promise)return new Promise((function(e,n){r.history.push(t,e,n)}));this.history.push(t,e,n)},we.prototype.replace=function(t,e,n){var r=this;if(!e&&!n&&"undefined"!==typeof Promise)return new Promise((function(e,n){r.history.replace(t,e,n)}));this.history.replace(t,e,n)},we.prototype.go=function(t){this.history.go(t)},we.prototype.back=function(){this.go(-1)},we.prototype.forward=function(){this.go(1)},we.prototype.getMatchedComponents=function(t){var e=t?t.matched?t:this.resolve(t).route:this.currentRoute;return e?[].concat.apply([],e.matched.map((function(t){return Object.keys(t.components).map((function(e){return t.components[e]}))}))):[]},we.prototype.resolve=function(t,e,n){e=e||this.history.current;var r=tt(t,e,n,this),o=this.match(r,e),i=o.redirectedFrom||o.fullPath,a=this.history.base,s=Ae(a,i,this.mode);return{location:r,route:o,href:s,normalizedTo:r,resolved:o}},we.prototype.getRoutes=function(){return this.matcher.getRoutes()},we.prototype.addRoute=function(t,e){this.matcher.addRoute(t,e),this.history.current!==m&&this.history.transitionTo(this.history.getCurrentLocation())},we.prototype.addRoutes=function(t){this.matcher.addRoutes(t),this.history.current!==m&&this.history.transitionTo(this.history.getCurrentLocation())},Object.defineProperties(we.prototype,Ce),we.install=ct,we.version="3.5.2",we.isNavigationFailure=Xt,we.NavigationFailureType=Ft,we.START_LOCATION=m,ut&&window.Vue&&window.Vue.use(we),e["a"]=we},c8ba:function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(r){"object"===typeof window&&(n=window)}t.exports=n},e7a5:function(t,e,n){(function(e){(function(e,n){t.exports=n(e)})("undefined"!=typeof e?e:this,(function(t){if(t.CSS&&t.CSS.escape)return t.CSS.escape;var e=function(t){if(0==arguments.length)throw new TypeError("`CSS.escape` requires an argument.");var e,n=String(t),r=n.length,o=-1,i="",a=n.charCodeAt(0);while(++o=1&&e<=31||127==e||0==o&&e>=48&&e<=57||1==o&&e>=48&&e<=57&&45==a?"\\"+e.toString(16)+" ":(0!=o||1!=r||45!=e)&&(e>=128||45==e||95==e||e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122)?n.charAt(o):"\\"+n.charAt(o):"�";return i};return t.CSS||(t.CSS={}),t.CSS.escape=e,e}))}).call(this,n("c8ba"))}}]); \ No newline at end of file diff --git a/docs/docc/Reducer.doccarchive/js/documentation-topic.f62098b6.js b/docs/docc/Reducer.doccarchive/js/documentation-topic.f62098b6.js deleted file mode 100644 index b08b7a8..0000000 --- a/docs/docc/Reducer.doccarchive/js/documentation-topic.f62098b6.js +++ /dev/null @@ -1,10 +0,0 @@ -/*! - * This source file is part of the Swift.org open source project - * - * Copyright (c) 2021 Apple Inc. and the Swift project authors - * Licensed under Apache License v2.0 with Runtime Library Exception - * - * See https://swift.org/LICENSE.txt for license information - * See https://swift.org/CONTRIBUTORS.txt for Swift project authors - */ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["documentation-topic"],{"042f":function(e,t,n){},"0725":function(e,t,n){},"09db":function(e,t,n){"use strict";n("535f")},"0b15":function(e,t,n){"use strict";n("9792")},"0b72":function(e,t,n){},1347:function(e,t,n){"use strict";n("367e")},"18b3":function(e,t,n){"use strict";n("6fe8")},"1a47":function(e,t,n){"use strict";n("042f")},"1fb2":function(e,t,n){"use strict";n("476d")},"22f6":function(e,t,n){},2521:function(e,t,n){},"252c":function(e,t,n){"use strict";(function(e){function a(){var e=window.navigator.userAgent,t=e.indexOf("MSIE ");if(t>0)return parseInt(e.substring(t+5,e.indexOf(".",t)),10);var n=e.indexOf("Trident/");if(n>0){var a=e.indexOf("rv:");return parseInt(e.substring(a+3,e.indexOf(".",a)),10)}var i=e.indexOf("Edge/");return i>0?parseInt(e.substring(i+5,e.indexOf(".",i)),10):-1}n.d(t,"a",(function(){return r}));var i=void 0;function s(){s.init||(s.init=!0,i=-1!==a())}var r={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"resize-observer",attrs:{tabindex:"-1"}})},staticRenderFns:[],_scopeId:"data-v-b329ee4c",name:"resize-observer",methods:{compareAndNotify:function(){this._w===this.$el.offsetWidth&&this._h===this.$el.offsetHeight||(this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.$emit("notify"))},addResizeHandlers:function(){this._resizeObject.contentDocument.defaultView.addEventListener("resize",this.compareAndNotify),this.compareAndNotify()},removeResizeHandlers:function(){this._resizeObject&&this._resizeObject.onload&&(!i&&this._resizeObject.contentDocument&&this._resizeObject.contentDocument.defaultView.removeEventListener("resize",this.compareAndNotify),delete this._resizeObject.onload)}},mounted:function(){var e=this;s(),this.$nextTick((function(){e._w=e.$el.offsetWidth,e._h=e.$el.offsetHeight}));var t=document.createElement("object");this._resizeObject=t,t.setAttribute("aria-hidden","true"),t.setAttribute("tabindex",-1),t.onload=this.addResizeHandlers,t.type="text/html",i&&this.$el.appendChild(t),t.data="about:blank",i||this.$el.appendChild(t)},beforeDestroy:function(){this.removeResizeHandlers()}};function o(e){e.component("resize-observer",r),e.component("ResizeObserver",r)}var l={version:"0.4.5",install:o},c=null;"undefined"!==typeof window?c=window.Vue:"undefined"!==typeof e&&(c=e.Vue),c&&c.use(l)}).call(this,n("c8ba"))},"260a":function(e,t,n){"use strict";n("9a8a")},2822:function(e,t,n){"use strict";n("2521")},"2a5c":function(e,t,n){},"2ca2":function(e,t,n){"use strict";n("98e2")},"2dd1":function(e,t,n){"use strict";n("c953")},"2ddb":function(e,t,n){},"2f04":function(e,t,n){},"2f87":function(e,t,n){"use strict";n("b0a0")},3099:function(e,t,n){"use strict";n("ec60")},"367e":function(e,t,n){},"374e":function(e,t,n){"use strict";n("0b72")},"3b96":function(e,t,n){"use strict";var a=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("SVGIcon",{staticClass:"curly-brackets-icon",attrs:{viewBox:"0 0 14 14"}},[n("path",{attrs:{d:"M9.987 14h-0.814v-0.916h0.36c0.137 0 0.253-0.038 0.349-0.116 0.099-0.080 0.179-0.188 0.239-0.318 0.064-0.134 0.11-0.298 0.139-0.483 0.031-0.186 0.045-0.38 0.045-0.58v-2.115c0-0.417 0.046-0.781 0.139-1.083 0.092-0.3 0.2-0.554 0.322-0.754 0.127-0.203 0.246-0.353 0.366-0.458 0.087-0.076 0.155-0.131 0.207-0.169-0.052-0.037-0.12-0.093-0.207-0.167-0.12-0.105-0.239-0.255-0.366-0.459-0.122-0.2-0.23-0.453-0.322-0.754-0.093-0.3-0.139-0.665-0.139-1.082v-2.13c0-0.199-0.014-0.392-0.045-0.572-0.029-0.182-0.076-0.345-0.139-0.483-0.060-0.137-0.141-0.246-0.239-0.328-0.095-0.076-0.212-0.115-0.349-0.115h-0.36v-0.916h0.814c0.442 0 0.788 0.18 1.030 0.538 0.238 0.352 0.358 0.826 0.358 1.407v2.236c0 0.3 0.015 0.597 0.044 0.886 0.030 0.287 0.086 0.544 0.164 0.765 0.077 0.216 0.184 0.392 0.318 0.522 0.129 0.124 0.298 0.188 0.503 0.188h0.058v0.916h-0.058c-0.206 0-0.374 0.064-0.503 0.188-0.134 0.129-0.242 0.305-0.318 0.521-0.078 0.223-0.134 0.48-0.164 0.766-0.029 0.288-0.044 0.587-0.044 0.884v2.236c0 0.582-0.12 1.055-0.358 1.409-0.242 0.358-0.588 0.538-1.030 0.538z"}}),n("path",{attrs:{d:"M4.827 14h-0.814c-0.442 0-0.788-0.18-1.030-0.538-0.238-0.352-0.358-0.825-0.358-1.409v-2.221c0-0.301-0.015-0.599-0.045-0.886-0.029-0.287-0.085-0.544-0.163-0.764-0.077-0.216-0.184-0.393-0.318-0.522-0.131-0.127-0.296-0.188-0.503-0.188h-0.058v-0.916h0.058c0.208 0 0.373-0.063 0.503-0.188 0.135-0.129 0.242-0.304 0.318-0.522 0.078-0.22 0.134-0.477 0.163-0.765 0.030-0.286 0.045-0.585 0.045-0.886v-2.251c0-0.582 0.12-1.055 0.358-1.407 0.242-0.358 0.588-0.538 1.030-0.538h0.814v0.916h-0.36c-0.138 0-0.252 0.038-0.349 0.116-0.099 0.079-0.179 0.189-0.239 0.327-0.064 0.139-0.11 0.302-0.141 0.483-0.029 0.18-0.044 0.373-0.044 0.572v2.13c0 0.417-0.046 0.782-0.138 1.082-0.092 0.302-0.201 0.556-0.324 0.754-0.123 0.201-0.246 0.356-0.366 0.459-0.086 0.074-0.153 0.13-0.206 0.167 0.052 0.038 0.12 0.093 0.206 0.169 0.12 0.103 0.243 0.258 0.366 0.458s0.232 0.453 0.324 0.754c0.092 0.302 0.138 0.666 0.138 1.083v2.115c0 0.2 0.015 0.394 0.044 0.58 0.030 0.186 0.077 0.349 0.139 0.482 0.062 0.132 0.142 0.239 0.241 0.32 0.096 0.079 0.21 0.116 0.349 0.116h0.36z"}})])},i=[],s=n("be08"),r={name:"CurlyBracketsIcon",components:{SVGIcon:s["a"]}},o=r,l=n("2877"),c=Object(l["a"])(o,a,i,!1,null,null,null);t["a"]=c.exports},"3e7c":function(e,t,n){},4281:function(e,t,n){"use strict";n("f0dd")},4340:function(e,t,n){"use strict";n("a378")},4539:function(e,t,n){"use strict";n("7db8")},"476d":function(e,t,n){},"4ab9":function(e,t,n){},"4adf":function(e,t,n){},"4d12":function(e,t,n){},"4eb2":function(e,t,n){"use strict";n("2ddb")},"533e":function(e,t,n){},"535f":function(e,t,n){},"592d":function(e,t,n){},"59f2":function(e,t,n){},"5c57":function(e,t,n){"use strict";n("f0ff")},"5d48":function(e,t,n){"use strict";n("e81c")},"5fad":function(e,t,n){"use strict";n("2a5c")},"66c9":function(e,t,n){"use strict";t["a"]={state:{codeColors:null},reset(){this.state.codeColors=null},updateCodeColors(e){const t=e=>e?`rgba(${e.red}, ${e.green}, ${e.blue}, ${e.alpha})`:null;this.state.codeColors=Object.entries(e).reduce((e,[n,a])=>({...e,[n]:t(a)}),{})}}},6928:function(e,t,n){},6963:function(e,t,n){},"6b62":function(e,t,n){"use strict";n("59f2")},"6c70":function(e,t,n){},"6e80":function(e,t,n){"use strict";n("592d")},"6e90":function(e,t,n){},"6fe8":function(e,t,n){},"719b":function(e,t,n){"use strict";n("8b3c")},"73d6":function(e,t,n){"use strict";n("6963")},7500:function(e,t,n){"use strict";n("6928")},7625:function(e,t,n){},7948:function(e,t,n){"use strict";var a=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("SVGIcon",{staticClass:"inline-chevron-down-icon",attrs:{viewBox:"0 0 14 14"}},[n("path",{attrs:{d:"M12.634 2.964l0.76 0.649-6.343 7.426-6.445-7.423 0.755-0.655 5.683 6.545 5.59-6.542z"}})])},i=[],s=n("be08"),r={name:"InlineChevronDownIcon",components:{SVGIcon:s["a"]}},o=r,l=n("2877"),c=Object(l["a"])(o,a,i,!1,null,null,null);t["a"]=c.exports},"7a2c":function(e,t,n){"use strict";n("c4c1")},"7db8":function(e,t,n){},8464:function(e,t,n){},8590:function(e,t,n){"use strict";var a=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{style:e.codeStyle},[e._t("default")],2)},i=[],s=n("66c9");const r=0,o=255;function l(e){const t=e.match(/rgba\((\d+),\s*(\d+),\s*(\d+),\s*(\d+\.?\d*|\.\d+)\s*\)/);if(!t)throw new Error("invalid rgba() input");const n=10;return{r:parseInt(t[1],n),g:parseInt(t[2],n),b:parseInt(t[3],n),a:parseFloat(t[4])}}function c(e){const{r:t,g:n,b:a}=l(e);return.2126*t+.7152*n+.0722*a}function u(e,t){const n=Math.round(o*t),a=l(e),{a:i}=a,[s,c,u]=[a.r,a.g,a.b].map(e=>Math.max(r,Math.min(o,e+n)));return`rgba(${s}, ${c}, ${u}, ${i})`}function d(e,t){return u(e,t)}function h(e,t){return u(e,-1*t)}var p={name:"CodeTheme",data(){return{codeThemeState:s["a"].state}},computed:{codeStyle(){const{codeColors:e}=this.codeThemeState;return e?{"--text":e.text,"--background":e.background,"--line-highlight":e.lineHighlight,"--url":e.commentURL,"--syntax-comment":e.comment,"--syntax-quote":e.comment,"--syntax-keyword":e.keyword,"--syntax-literal":e.keyword,"--syntax-selector-tag":e.keyword,"--syntax-string":e.stringLiteral,"--syntax-bullet":e.stringLiteral,"--syntax-meta":e.keyword,"--syntax-number":e.stringLiteral,"--syntax-symbol":e.stringLiteral,"--syntax-tag":e.stringLiteral,"--syntax-attr":e.typeAnnotation,"--syntax-built_in":e.typeAnnotation,"--syntax-builtin-name":e.typeAnnotation,"--syntax-class":e.typeAnnotation,"--syntax-params":e.typeAnnotation,"--syntax-section":e.typeAnnotation,"--syntax-title":e.typeAnnotation,"--syntax-type":e.typeAnnotation,"--syntax-attribute":e.keyword,"--syntax-identifier":e.text,"--syntax-subst":e.text,"--color-syntax-param-internal-name":this.internalParamNameColor}:null},internalParamNameColor(){const{background:e,text:t}=this.codeThemeState.codeColors;try{const n=c(e),a=n2&&void 0!==arguments[2]?arguments[2]:{},r=function(r){for(var l=arguments.length,c=new Array(l>1?l-1:0),u=1;u1){var a=e.find((function(e){return e.isIntersecting}));a&&(t=a)}if(n.callback){var i=t.isIntersecting&&t.intersectionRatio>=n.threshold;if(i===n.oldResult)return;n.oldResult=i,n.callback(i,t)}}),this.options.intersection),t.context.$nextTick((function(){n.observer&&n.observer.observe(n.el)}))}}},{key:"destroyObserver",value:function(){this.observer&&(this.observer.disconnect(),this.observer=null),this.callback&&this.callback._clear&&(this.callback._clear(),this.callback=null)}},{key:"threshold",get:function(){return this.options.intersection&&this.options.intersection.threshold||0}}]),e}();function g(e,t,n){var a=t.value;if(a)if("undefined"===typeof IntersectionObserver)console.warn("[vue-observe-visibility] IntersectionObserver API is not available in your browser. Please install this polyfill: https://github.com/w3c/IntersectionObserver/tree/master/polyfill");else{var i=new f(e,a,n);e._vue_visibilityState=i}}function m(e,t,n){var a=t.value,i=t.oldValue;if(!p(a,i)){var s=e._vue_visibilityState;a?s?s.createObserver(a,n):g(e,{value:a},n):y(e)}}function y(e){var t=e._vue_visibilityState;t&&(t.destroyObserver(),delete e._vue_visibilityState)}var v={bind:g,update:m,unbind:y};function b(e){e.directive("observe-visibility",v)}var T={version:"0.4.6",install:b},_=null;"undefined"!==typeof window?_=window.Vue:"undefined"!==typeof e&&(_=e.Vue),_&&_.use(T)}).call(this,n("c8ba"))},"89ec":function(e,t,n){},"8b3c":function(e,t,n){},"8b7a":function(e,t,n){"use strict";n("89ec")},"8d2d":function(e,t,n){"use strict";var a=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("SVGIcon",{staticClass:"tutorial-icon",attrs:{viewBox:"0 0 14 14"}},[n("path",{attrs:{d:"M0.933 6.067h3.733v1.867h-3.733v-1.867z"}}),n("path",{attrs:{d:"M0.933 1.867h3.733v1.867h-3.733v-1.867z"}}),n("path",{attrs:{d:"M13.067 1.867v10.267h-7.467v-10.267zM12.133 2.8h-5.6v8.4h5.6z"}}),n("path",{attrs:{d:"M0.933 10.267h3.733v1.867h-3.733v-1.867z"}})])},i=[],s=n("be08"),r={name:"TutorialIcon",components:{SVGIcon:s["a"]}},o=r,l=n("2877"),c=Object(l["a"])(o,a,i,!1,null,null,null);t["a"]=c.exports},"8d93":function(e,t,n){"use strict";n("b059")},9062:function(e,t,n){},"918a":function(e,t,n){"use strict";n("a2b5")},"927b":function(e,t,n){},9792:function(e,t,n){},"97a5":function(e,t,n){"use strict";n("ec95")},"97c4":function(e,t,n){},"98e2":function(e,t,n){},"9a8a":function(e,t,n){},"9ac5":function(e,t,n){"use strict";n("927b")},"9d1f":function(e,t,n){"use strict";n("3e7c")},"9da8":function(e,t,n){"use strict";n("0725")},"9dff":function(e,t,n){},a20a:function(e,t,n){"use strict";n("a42c")},a2b5:function(e,t,n){},a378:function(e,t,n){},a40c:function(e,t,n){"use strict";n("c33d")},a42c:function(e,t,n){},a463:function(e,t,n){},a6c6:function(e,t,n){},a705:function(e,t,n){"use strict";n("6e90")},a8a5:function(e,t,n){"use strict";n("4d12")},a91f:function(e,t,n){"use strict";n("6c70")},a9f1:function(e,t,n){"use strict";var a=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("SVGIcon",{staticClass:"article-icon",attrs:{viewBox:"0 0 14 14"}},[n("path",{attrs:{d:"M8.033 1l3.967 4.015v7.985h-10v-12zM7.615 2h-4.615v10h8v-6.574z"}}),n("path",{attrs:{d:"M7 1h1v4h-1z"}}),n("path",{attrs:{d:"M7 5h5v1h-5z"}})])},i=[],s=n("be08"),r={name:"ArticleIcon",components:{SVGIcon:s["a"]}},o=r,l=n("2877"),c=Object(l["a"])(o,a,i,!1,null,null,null);t["a"]=c.exports},b059:function(e,t,n){},b0a0:function(e,t,n){},b13d:function(e,t,n){"use strict";n("4adf")},b831:function(e,t,n){"use strict";n("533e")},ba48:function(e,t,n){"use strict";n("e482")},bcfb:function(e,t,n){"use strict";n("e4ea")},be2a:function(e,t,n){"use strict";n("8464")},c18a:function(e,t,n){"use strict";n("97c4")},c33d:function(e,t,n){},c36f:function(e,t,n){"use strict";n("f8bd")},c459:function(e,t,n){"use strict";n("a6c6")},c4c1:function(e,t,n){},c875:function(e,t,n){"use strict";n("eecc")},c8fe:function(e,t,n){"use strict";n("a463")},c953:function(e,t,n){},dcf6:function(e,t,n){"use strict";n("2f04")},e335:function(e,t,n){"use strict";n("9dff")},e482:function(e,t,n){},e4ea:function(e,t,n){},e508:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return U})),n.d(t,"b",(function(){return D}));var a=n("252c"),i=n("85fe"),s=n("ed83"),r=n.n(s),o=n("2b0e"),l={itemsLimit:1e3};function c(e){return c="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function h(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,a=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i,s=!0,r=!1;return{s:function(){a=e[Symbol.iterator]()},n:function(){var e=a.next();return s=e.done,e},e:function(e){r=!0,i=e},f:function(){try{s||null==a.return||a.return()}finally{if(r)throw i}}}}var m={items:{type:Array,required:!0},keyField:{type:String,default:"id"},direction:{type:String,default:"vertical",validator:function(e){return["vertical","horizontal"].includes(e)}}};function y(){return this.items.length&&"object"!==c(this.items[0])}var v=!1;if("undefined"!==typeof window){v=!1;try{var b=Object.defineProperty({},"passive",{get:function(){v=!0}});window.addEventListener("test",null,b)}catch(J){}}var T=0,_={name:"RecycleScroller",components:{ResizeObserver:a["a"]},directives:{ObserveVisibility:i["a"]},props:h({},m,{itemSize:{type:Number,default:null},minItemSize:{type:[Number,String],default:null},sizeField:{type:String,default:"size"},typeField:{type:String,default:"type"},buffer:{type:Number,default:200},pageMode:{type:Boolean,default:!1},prerender:{type:Number,default:0},emitUpdate:{type:Boolean,default:!1}}),data:function(){return{pool:[],totalSize:0,ready:!1,hoverKey:null}},computed:{sizes:function(){if(null===this.itemSize){for(var e,t={"-1":{accumulator:0}},n=this.items,a=this.sizeField,i=this.minItemSize,s=1e4,r=0,o=0,l=n.length;o1&&void 0!==arguments[1]&&arguments[1],n=this.$_unusedViews,a=e.nr.type,i=n.get(a);i||(i=[],n.set(a,i)),i.push(e),t||(e.nr.used=!1,e.position=-9999,this.$_views.delete(e.nr.key))},handleResize:function(){this.$emit("resize"),this.ready&&this.updateVisibleItems(!1)},handleScroll:function(e){var t=this;this.$_scrollDirty||(this.$_scrollDirty=!0,requestAnimationFrame((function(){t.$_scrollDirty=!1;var e=t.updateVisibleItems(!1,!0),n=e.continuous;n||(clearTimeout(t.$_refreshTimout),t.$_refreshTimout=setTimeout(t.handleScroll,100))})))},handleVisibilityChange:function(e,t){var n=this;this.ready&&(e||0!==t.boundingClientRect.width||0!==t.boundingClientRect.height?(this.$emit("visible"),requestAnimationFrame((function(){n.updateVisibleItems(!1)}))):this.$emit("hidden"))},updateVisibleItems:function(e){var t,n,a,i,s=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=this.itemSize,o=this.$_computedMinItemSize,c=this.typeField,u=this.simpleArray?null:this.keyField,d=this.items,h=d.length,p=this.sizes,f=this.$_views,g=this.$_unusedViews,m=this.pool;if(h)if(this.$_prerender)t=0,n=this.prerender,a=null;else{var y=this.getScroll();if(s){var v=y.start-this.$_lastUpdateScrollPosition;if(v<0&&(v=-v),null===r&&vy.start&&(S=k),k=~~((C+S)/2)}while(k!==_);for(k<0&&(k=0),t=k,a=p[h-1].accumulator,n=k;nh&&(n=h))}else t=~~(y.start/r),n=Math.ceil(y.end/r),t<0&&(t=0),n>h&&(n=h),a=h*r}else t=n=a=0;n-t>l.itemsLimit&&this.itemsLimitError(),this.totalSize=a;var w=t<=this.$_endIndex&&n>=this.$_startIndex;if(this.$_continuous!==w){if(w){f.clear(),g.clear();for(var x=0,I=m.length;x=n)&&this.unuseView(i));for(var D,P,A,j,L=w?null:new Map,E=t;E=A.length)&&(i=this.addView(m,E,D,B,P),this.unuseView(i,!0),A=g.get(P)),i=A[j],i.item=D,i.nr.used=!0,i.nr.index=E,i.nr.key=B,i.nr.type=P,L.set(P,j+1),j++),f.set(B,i)),i.position=null===r?p[E-1].accumulator:E*r):i&&this.unuseView(i)}return this.$_startIndex=t,this.$_endIndex=n,this.emitUpdate&&this.$emit("update",t,n),clearTimeout(this.$_sortTimer),this.$_sortTimer=setTimeout(this.sortViews,300),{continuous:w}},getListenerTarget:function(){var e=r()(this.$el);return!window.document||e!==window.document.documentElement&&e!==window.document.body||(e=window),e},getScroll:function(){var e,t=this.$el,n=this.direction,a="vertical"===n;if(this.pageMode){var i=t.getBoundingClientRect(),s=a?i.height:i.width,r=-(a?i.top:i.left),o=a?window.innerHeight:window.innerWidth;r<0&&(o+=r,r=0),r+o>s&&(o=s-r),e={start:r,end:r+o}}else e=a?{start:t.scrollTop,end:t.scrollTop+t.clientHeight}:{start:t.scrollLeft,end:t.scrollLeft+t.clientWidth};return e},applyPageMode:function(){this.pageMode?this.addListeners():this.removeListeners()},addListeners:function(){this.listenerTarget=this.getListenerTarget(),this.listenerTarget.addEventListener("scroll",this.handleScroll,!!v&&{passive:!0}),this.listenerTarget.addEventListener("resize",this.handleResize)},removeListeners:function(){this.listenerTarget&&(this.listenerTarget.removeEventListener("scroll",this.handleScroll),this.listenerTarget.removeEventListener("resize",this.handleResize),this.listenerTarget=null)},scrollToItem:function(e){var t;t=null===this.itemSize?e>0?this.sizes[e-1].accumulator:0:e*this.itemSize,this.scrollToPosition(t)},scrollToPosition:function(e){"vertical"===this.direction?this.$el.scrollTop=e:this.$el.scrollLeft=e},itemsLimitError:function(){var e=this;throw setTimeout((function(){console.log("It seems the scroller element isn't scrolling, so it tries to render all the items at once.","Scroller:",e.$el),console.log("Make sure the scroller has a fixed height (or width) and 'overflow-y' (or 'overflow-x') set to 'auto' so it can scroll correctly and only render the items visible in the scroll viewport.")})),new Error("Rendered items limit reached")},sortViews:function(){this.pool.sort((function(e,t){return e.nr.index-t.nr.index}))}}};function C(e,t,n,a,i,s,r,o,l,c){"boolean"!==typeof r&&(l=o,o=r,r=!1);const u="function"===typeof n?n.options:n;let d;if(e&&e.render&&(u.render=e.render,u.staticRenderFns=e.staticRenderFns,u._compiled=!0,i&&(u.functional=!0)),a&&(u._scopeId=a),s?(d=function(e){e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,e||"undefined"===typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),t&&t.call(this,l(e)),e&&e._registeredComponents&&e._registeredComponents.add(s)},u._ssrRegister=d):t&&(d=r?function(e){t.call(this,c(e,this.$root.$options.shadowRoot))}:function(e){t.call(this,o(e))}),d)if(u.functional){const e=u.render;u.render=function(t,n){return d.call(n),e(t,n)}}else{const e=u.beforeCreate;u.beforeCreate=e?[].concat(e,d):[d]}return n}const S=_;var k=function(){var e,t,n=this,a=n.$createElement,i=n._self._c||a;return i("div",{directives:[{name:"observe-visibility",rawName:"v-observe-visibility",value:n.handleVisibilityChange,expression:"handleVisibilityChange"}],staticClass:"vue-recycle-scroller",class:(e={ready:n.ready,"page-mode":n.pageMode},e["direction-"+n.direction]=!0,e),on:{"&scroll":function(e){return n.handleScroll(e)}}},[n.$slots.before?i("div",{staticClass:"vue-recycle-scroller__slot"},[n._t("before")],2):n._e(),n._v(" "),i("div",{ref:"wrapper",staticClass:"vue-recycle-scroller__item-wrapper",style:(t={},t["vertical"===n.direction?"minHeight":"minWidth"]=n.totalSize+"px",t)},n._l(n.pool,(function(e){return i("div",{key:e.nr.id,staticClass:"vue-recycle-scroller__item-view",class:{hover:n.hoverKey===e.nr.key},style:n.ready?{transform:"translate"+("vertical"===n.direction?"Y":"X")+"("+e.position+"px)"}:null,on:{mouseenter:function(t){n.hoverKey=e.nr.key},mouseleave:function(e){n.hoverKey=null}}},[n._t("default",null,{item:e.item,index:e.nr.index,active:e.nr.used})],2)})),0),n._v(" "),n.$slots.after?i("div",{staticClass:"vue-recycle-scroller__slot"},[n._t("after")],2):n._e(),n._v(" "),i("ResizeObserver",{on:{notify:n.handleResize}})],1)},w=[];k._withStripped=!0;const x=void 0,I=void 0,O=void 0,$=!1,D=C({render:k,staticRenderFns:w},x,S,I,$,O,!1,void 0,void 0,void 0);var P={name:"DynamicScroller",components:{RecycleScroller:D},inheritAttrs:!1,provide:function(){return"undefined"!==typeof ResizeObserver&&(this.$_resizeObserver=new ResizeObserver((function(e){var t,n=g(e);try{for(n.s();!(t=n.n()).done;){var a=t.value;if(a.target){var i=new CustomEvent("resize",{detail:{contentRect:a.contentRect}});a.target.dispatchEvent(i)}}}catch(s){n.e(s)}finally{n.f()}}))),{vscrollData:this.vscrollData,vscrollParent:this,vscrollResizeObserver:this.$_resizeObserver}},props:h({},m,{minItemSize:{type:[Number,String],required:!0}}),data:function(){return{vscrollData:{active:!0,sizes:{},validSizes:{},keyField:this.keyField,simpleArray:!1}}},computed:{simpleArray:y,itemsWithSize:function(){for(var e=[],t=this.items,n=this.keyField,a=this.simpleArray,i=this.vscrollData.sizes,s=0;s0&&void 0!==arguments[0])||arguments[0];(e||this.simpleArray)&&(this.vscrollData.validSizes={}),this.$emit("vscroll:update",{force:!0})},scrollToItem:function(e){var t=this.$refs.scroller;t&&t.scrollToItem(e)},getItemSize:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=this.simpleArray?null!=t?t:this.items.indexOf(e):e[this.keyField];return this.vscrollData.sizes[n]||0},scrollToBottom:function(){var e=this;if(!this.$_scrollingToBottom){this.$_scrollingToBottom=!0;var t=this.$el;this.$nextTick((function(){t.scrollTop=t.scrollHeight+5e3;var n=function n(){t.scrollTop=t.scrollHeight+5e3,requestAnimationFrame((function(){t.scrollTop=t.scrollHeight+5e3,0===e.$_undefinedSizes?e.$_scrollingToBottom=!1:requestAnimationFrame(n)}))};requestAnimationFrame(n)}))}}}};const A=P;var j=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("RecycleScroller",e._g(e._b({ref:"scroller",attrs:{items:e.itemsWithSize,"min-item-size":e.minItemSize,direction:e.direction,"key-field":"id"},on:{resize:e.onScrollerResize,visible:e.onScrollerVisible},scopedSlots:e._u([{key:"default",fn:function(t){var n=t.item,a=t.index,i=t.active;return[e._t("default",null,null,{item:n.item,index:a,active:i,itemWithSize:n})]}}],null,!0)},"RecycleScroller",e.$attrs,!1),e.listeners),[e._v(" "),n("template",{slot:"before"},[e._t("before")],2),e._v(" "),n("template",{slot:"after"},[e._t("after")],2)],2)},L=[];j._withStripped=!0;const E=void 0,B=void 0,R=void 0,N=!1,z=C({render:j,staticRenderFns:L},E,A,B,N,R,!1,void 0,void 0,void 0);var M={name:"DynamicScrollerItem",inject:["vscrollData","vscrollParent","vscrollResizeObserver"],props:{item:{required:!0},watchData:{type:Boolean,default:!1},active:{type:Boolean,required:!0},index:{type:Number,default:void 0},sizeDependencies:{type:[Array,Object],default:null},emitResize:{type:Boolean,default:!1},tag:{type:String,default:"div"}},computed:{id:function(){return this.vscrollData.simpleArray?this.index:this.item[this.vscrollData.keyField]},size:function(){return this.vscrollData.validSizes[this.id]&&this.vscrollData.sizes[this.id]||0},finalActive:function(){return this.active&&this.vscrollData.active}},watch:{watchData:"updateWatchData",id:function(){this.size||this.onDataUpdate()},finalActive:function(e){this.size||(e?this.vscrollParent.$_undefinedMap[this.id]||(this.vscrollParent.$_undefinedSizes++,this.vscrollParent.$_undefinedMap[this.id]=!0):this.vscrollParent.$_undefinedMap[this.id]&&(this.vscrollParent.$_undefinedSizes--,this.vscrollParent.$_undefinedMap[this.id]=!1)),this.vscrollResizeObserver?e?this.observeSize():this.unobserveSize():e&&this.$_pendingVScrollUpdate===this.id&&this.updateSize()}},created:function(){var e=this;if(!this.$isServer&&(this.$_forceNextVScrollUpdate=null,this.updateWatchData(),!this.vscrollResizeObserver)){var t=function(t){e.$watch((function(){return e.sizeDependencies[t]}),e.onDataUpdate)};for(var n in this.sizeDependencies)t(n);this.vscrollParent.$on("vscroll:update",this.onVscrollUpdate),this.vscrollParent.$on("vscroll:update-size",this.onVscrollUpdateSize)}},mounted:function(){this.vscrollData.active&&(this.updateSize(),this.observeSize())},beforeDestroy:function(){this.vscrollParent.$off("vscroll:update",this.onVscrollUpdate),this.vscrollParent.$off("vscroll:update-size",this.onVscrollUpdateSize),this.unobserveSize()},methods:{updateSize:function(){this.finalActive?this.$_pendingSizeUpdate!==this.id&&(this.$_pendingSizeUpdate=this.id,this.$_forceNextVScrollUpdate=null,this.$_pendingVScrollUpdate=null,this.computeSize(this.id)):this.$_forceNextVScrollUpdate=this.id},updateWatchData:function(){var e=this;this.watchData?this.$_watchData=this.$watch("data",(function(){e.onDataUpdate()}),{deep:!0}):this.$_watchData&&(this.$_watchData(),this.$_watchData=null)},onVscrollUpdate:function(e){var t=e.force;!this.finalActive&&t&&(this.$_pendingVScrollUpdate=this.id),this.$_forceNextVScrollUpdate!==this.id&&!t&&this.size||this.updateSize()},onDataUpdate:function(){this.updateSize()},computeSize:function(e){var t=this;this.$nextTick((function(){if(t.id===e){var n=t.$el.offsetWidth,a=t.$el.offsetHeight;t.applySize(n,a)}t.$_pendingSizeUpdate=null}))},applySize:function(e,t){var n=Math.round("vertical"===this.vscrollParent.direction?t:e);n&&this.size!==n&&(this.vscrollParent.$_undefinedMap[this.id]&&(this.vscrollParent.$_undefinedSizes--,this.vscrollParent.$_undefinedMap[this.id]=void 0),this.$set(this.vscrollData.sizes,this.id,n),this.$set(this.vscrollData.validSizes,this.id,!0),this.emitResize&&this.$emit("resize",this.id))},observeSize:function(){this.vscrollResizeObserver&&(this.vscrollResizeObserver.observe(this.$el.parentNode),this.$el.parentNode.addEventListener("resize",this.onResize))},unobserveSize:function(){this.vscrollResizeObserver&&(this.vscrollResizeObserver.unobserve(this.$el.parentNode),this.$el.parentNode.removeEventListener("resize",this.onResize))},onResize:function(e){var t=e.detail.contentRect,n=t.width,a=t.height;this.applySize(n,a)}},render:function(e){return e(this.tag,this.$slots.default)}};const K=M,q=void 0,F=void 0,V=void 0,H=void 0,W=C({},q,K,F,H,V,!1,void 0,void 0,void 0);function U(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.idProp,n=void 0===t?function(e){return e.item.id}:t,a={},i=new o["default"]({data:function(){return{store:a}}});return{data:function(){return{idState:null}},created:function(){var e=this;this.$_id=null,this.$_getId="function"===typeof n?function(){return n.call(e,e)}:function(){return e[n]},this.$watch(this.$_getId,{handler:function(e){var t=this;this.$nextTick((function(){t.$_id=e}))},immediate:!0}),this.$_updateIdState()},beforeUpdate:function(){this.$_updateIdState()},methods:{$_idStateInit:function(e){var t=this.$options.idState;if("function"===typeof t){var n=t.call(this,this);return i.$set(a,e,n),this.$_id=e,n}throw new Error("[mixin IdState] Missing `idState` function on component definition.")},$_updateIdState:function(){var e=this.$_getId();null==e&&console.warn("No id found for IdState with idProp: '".concat(n,"'.")),e!==this.$_id&&(a[e]||this.$_idStateInit(e),this.idState=a[e])}}}}function G(e,t){e.component("".concat(t,"recycle-scroller"),D),e.component("".concat(t,"RecycleScroller"),D),e.component("".concat(t,"dynamic-scroller"),z),e.component("".concat(t,"DynamicScroller"),z),e.component("".concat(t,"dynamic-scroller-item"),W),e.component("".concat(t,"DynamicScrollerItem"),W)}var X={version:"1.0.10",install:function(e,t){var n=Object.assign({},{installComponents:!0,componentsPrefix:""},t);for(var a in n)"undefined"!==typeof n[a]&&(l[a]=n[a]);n.installComponents&&G(e,n.componentsPrefix)}},Y=null;"undefined"!==typeof window?Y=window.Vue:"undefined"!==typeof e&&(Y=e.Vue),Y&&Y.use(X)}).call(this,n("c8ba"))},e6b8:function(e,t,n){"use strict";n("9062")},e81c:function(e,t,n){},ec60:function(e,t,n){},ec95:function(e,t,n){},ed83:function(e,t,n){var a,i,s;(function(n,r){i=[],a=r,s="function"===typeof a?a.apply(t,i):a,void 0===s||(e.exports=s)})(0,(function(){var e=/(auto|scroll)/,t=function(e,n){return null===e.parentNode?n:t(e.parentNode,n.concat([e]))},n=function(e,t){return getComputedStyle(e,null).getPropertyValue(t)},a=function(e){return n(e,"overflow")+n(e,"overflow-y")+n(e,"overflow-x")},i=function(t){return e.test(a(t))},s=function(e){if(e instanceof HTMLElement||e instanceof SVGElement){for(var n=t(e.parentNode,[]),a=0;a({"~0":"~","~1":"/"}[e]||e))}function*o(e){const t=1;if(e.lengtht)throw new Error("invalid array index "+e);return n}function*p(e,t,n={strict:!1}){let a=e;for(const i of o(t)){if(n.strict&&!Object.prototype.hasOwnProperty.call(a,i))throw new d(t);a=a[i],yield{node:a,token:i}}}function f(e,t){let n=e;for(const{node:a}of p(e,t,{strict:!0}))n=a;return n}function g(e,t,n){let a=null,i=e,s=null;for(const{node:o,token:l}of p(e,t))a=i,i=o,s=l;if(!a)throw new d(t);if(Array.isArray(a))try{const e=h(s,a);a.splice(e,0,n)}catch(r){throw new d(t)}else Object.assign(a,{[s]:n});return e}function m(e,t){let n=null,a=e,i=null;for(const{node:r,token:o}of p(e,t))n=a,a=r,i=o;if(!n)throw new d(t);if(Array.isArray(n))try{const e=h(i,n);n.splice(e,1)}catch(s){throw new d(t)}else{if(!a)throw new d(t);delete n[i]}return e}function y(e,t,n){return m(e,t),g(e,t,n),e}function v(e,t,n){const a=f(e,t);return m(e,t),g(e,n,a),e}function b(e,t,n){return g(e,n,f(e,t)),e}function T(e,t,n){function a(e,t){const n=typeof e,i=typeof t;if(n!==i)return!1;switch(n){case u:{const n=Object.keys(e),i=Object.keys(t);return n.length===i.length&&n.every((n,s)=>n===i[s]&&a(e[n],t[n]))}default:return e===t}}const i=f(e,t);if(!a(n,i))throw new Error("test failed");return e}const _={add:(e,{path:t,value:n})=>g(e,t,n),copy:(e,{from:t,path:n})=>b(e,t,n),move:(e,{from:t,path:n})=>v(e,t,n),remove:(e,{path:t})=>m(e,t),replace:(e,{path:t,value:n})=>y(e,t,n),test:(e,{path:t,value:n})=>T(e,t,n)};function C(e,{op:t,...n}){const a=_[t];if(!a)throw new Error("unknown operation");return a(e,n)}function S(e,t){return t.reduce(C,e)}var k=n("66cd"),w=n("25a9"),x=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"doc-topic"},[n("main",{staticClass:"main",attrs:{id:"main",role:"main",tabindex:"0"}},[n("DocumentationHero",{attrs:{role:e.role,enhanceBackground:e.enhanceBackground,shortHero:e.shortHero,shouldShowLanguageSwitcher:e.shouldShowLanguageSwitcher},scopedSlots:e._u([{key:"above-content",fn:function(){return[e._t("above-hero-content")]},proxy:!0}],null,!0)},[e._t("above-title"),e.shouldShowLanguageSwitcher?n("LanguageSwitcher",{attrs:{interfaceLanguage:e.interfaceLanguage,objcPath:e.objcPath,swiftPath:e.swiftPath}}):e._e(),n("Title",{attrs:{eyebrow:e.roleHeading}},[n(e.titleBreakComponent,{tag:"component"},[e._v(e._s(e.title))]),e.isSymbolDeprecated||e.isSymbolBeta?n("small",{class:e.tagName,attrs:{slot:"after","data-tag-name":e.tagName},slot:"after"}):e._e()],1),e.abstract?n("Abstract",{attrs:{content:e.abstract}}):e._e(),e.sampleCodeDownload?n("div",[n("DownloadButton",{staticClass:"sample-download",attrs:{action:e.sampleCodeDownload.action}})],1):e._e(),e.hasAvailability?n("Availability",{attrs:{platforms:e.platforms,technologies:e.technologies}}):e._e()],2),e.showContainer?n("div",{staticClass:"container"},[n("div",{staticClass:"description",class:{"after-enhanced-hero":e.enhanceBackground}},[e.isRequirement?n("RequirementMetadata",{attrs:{defaultImplementationsCount:e.defaultImplementationsCount}}):e._e(),e.deprecationSummary&&e.deprecationSummary.length?n("Aside",{attrs:{kind:"deprecated"}},[n("ContentNode",{attrs:{content:e.deprecationSummary}})],1):e._e(),e.downloadNotAvailableSummary&&e.downloadNotAvailableSummary.length?n("Aside",{attrs:{kind:"note"}},[n("ContentNode",{attrs:{content:e.downloadNotAvailableSummary}})],1):e._e()],1),e.primaryContentSections&&e.primaryContentSections.length?n("PrimaryContent",{class:{"with-border":!e.enhanceBackground},attrs:{conformance:e.conformance,sections:e.primaryContentSections}}):e._e()],1):e._e(),e.topicSections?n("Topics",{attrs:{sections:e.topicSections,isSymbolDeprecated:e.isSymbolDeprecated,isSymbolBeta:e.isSymbolBeta}}):e._e(),e.defaultImplementationsSections?n("DefaultImplementations",{attrs:{sections:e.defaultImplementationsSections,isSymbolDeprecated:e.isSymbolDeprecated,isSymbolBeta:e.isSymbolBeta}}):e._e(),e.relationshipsSections?n("Relationships",{attrs:{sections:e.relationshipsSections}}):e._e(),e.seeAlsoSections?n("SeeAlso",{attrs:{sections:e.seeAlsoSections}}):e._e(),!e.isTargetIDE&&e.hasBetaContent?n("BetaLegalText"):e._e()],1),n("div",{staticClass:"visuallyhidden",attrs:{"aria-live":"polite"}},[e._v(" Current page is "+e._s(e.pageTitle)+" ")])])},I=[],O=n("8649"),$=n("bf08"),D=n("e3ab"),P=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"betainfo"},[n("div",{staticClass:"betainfo-container"},[n("GridRow",[n("GridColumn",{attrs:{span:{large:12}}},[n("p",{staticClass:"betainfo-label"},[e._v("Beta Software")]),n("div",{staticClass:"betainfo-content"},[e._t("content",(function(){return[n("p",[e._v("This documentation refers to beta software and may be changed.")])]}))],2),e._t("after")],2)],1)],1)])},A=[],j=n("0f00"),L=n("620a"),E={name:"BetaLegalText",components:{GridColumn:L["a"],GridRow:j["a"]}},B=E,R=(n("fb6d"),n("2877")),N=Object(R["a"])(B,P,A,!1,null,"fe7602da",null),z=N.exports,M=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("Section",{staticClass:"language",attrs:{role:"complementary","aria-label":"Language"}},[n("Title",[e._v("Language: ")]),n("div",{staticClass:"language-list"},[n("LanguageSwitcherLink",{staticClass:"language-option swift",class:{active:e.swift.active},attrs:{url:e.swift.active?null:e.swift.url},on:{click:function(t){return e.chooseLanguage(e.swift)}}},[e._v(" "+e._s(e.swift.name)+" ")]),n("LanguageSwitcherLink",{staticClass:"language-option objc",class:{active:e.objc.active},attrs:{url:e.objc.active?null:e.objc.url},on:{click:function(t){return e.chooseLanguage(e.objc)}}},[e._v(" "+e._s(e.objc.name)+" ")])],1)],1)},K=[],q=n("d26a"),F=function(){var e=this,t=e.$createElement,n=e._self._c||t;return e.url?n("a",{attrs:{href:e.url},on:{click:function(t){return t.preventDefault(),e.$emit("click")}}},[e._t("default")],2):n("span",[e._t("default")],2)},V=[],H={name:"LanguageSwitcherLink",props:{url:[String,Object]}},W=H,U=Object(R["a"])(W,F,V,!1,null,null,null),G=U.exports,X=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"summary-section"},[e._t("default")],2)},Y=[],J={name:"Section"},Q=J,Z=(n("1347"),Object(R["a"])(Q,X,Y,!1,null,"3aa6f694",null)),ee=Z.exports,te=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("p",{staticClass:"title"},[e._t("default")],2)},ne=[],ae={name:"Title"},ie=ae,se=(n("ede5"),Object(R["a"])(ie,te,ne,!1,null,"6796f6ea",null)),re=se.exports,oe={name:"LanguageSwitcher",components:{LanguageSwitcherLink:G,Section:ee,Title:re},inject:{isTargetIDE:{default:()=>!1},store:{default(){return{setPreferredLanguage(){}}}}},props:{interfaceLanguage:{type:String,required:!0},objcPath:{type:String,required:!0},swiftPath:{type:String,required:!0}},computed:{objc:({interfaceLanguage:e,normalizePath:t,objcPath:n,$route:{query:a}})=>({...O["a"].objectiveC,active:O["a"].objectiveC.key.api===e,url:Object(q["b"])(t(n),{...a,language:O["a"].objectiveC.key.url})}),swift:({interfaceLanguage:e,normalizePath:t,swiftPath:n,$route:{query:a}})=>({...O["a"].swift,active:O["a"].swift.key.api===e,url:Object(q["b"])(t(n),{...a,language:void 0})})},methods:{chooseLanguage(e){this.isTargetIDE||this.store.setPreferredLanguage(e.key.url),this.$router.push(e.url)},normalizePath(e){return e.startsWith("/")?e:"/"+e}}},le=oe,ce=(n("4539"),Object(R["a"])(le,M,K,!1,null,"0de98d61",null)),ue=ce.exports,de=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{class:["documentation-hero",{"documentation-hero--disabled":!e.enhanceBackground,"theme-dark":e.enhanceBackground}],style:e.styles},[n("div",{staticClass:"icon"},[e.enhanceBackground?n("NavigatorLeafIcon",{key:"first",staticClass:"background-icon first-icon",attrs:{type:e.type,"with-colors":""}}):e._e()],1),n("div",{staticClass:"documentation-hero__above-content"},[e._t("above-content")],2),n("div",{staticClass:"documentation-hero__content",class:{"short-hero":e.shortHero,"extra-bottom-padding":e.shouldShowLanguageSwitcher}},[e._t("default")],2)])},he=[],pe=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"NavigatorLeafIcon"},[n(e.icon,e._b({tag:"component",staticClass:"icon-inline",style:e.styles},"component",e.iconProps,!1))],1)},fe=[],ge=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("SVGIcon",{attrs:{viewBox:"0 0 14 14"}},[n("path",{attrs:{d:"M0 0.948h2.8v2.8h-2.8z"}}),n("path",{attrs:{d:"M11.2 10.252h2.8v2.8h-2.8z"}}),n("path",{attrs:{d:"M6.533 1.852h0.933v10.267h-0.933z"}}),n("path",{attrs:{d:"M2.8 1.852h4.667v0.933h-4.667z"}}),n("path",{attrs:{d:"M6.533 11.186h4.667v0.933h-4.667z"}})])},me=[],ye=n("be08"),ve={name:"PathIcon",components:{SVGIcon:ye["a"]}},be=ve,Te=Object(R["a"])(be,ge,me,!1,null,null,null),_e=Te.exports,Ce=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("SVGIcon",{staticClass:"technology-icon",attrs:{viewBox:"0 0 14 14"}},[n("path",{attrs:{d:"M3.39,9l3.16,1.84.47.28.47-.28L10.61,9l.45.26,1.08.63L7,12.91l-5.16-3,1.08-.64L3.39,9M7,0,0,4.1,2.47,5.55,0,7,2.47,8.44,0,9.9,7,14l7-4.1L11.53,8.45,14,7,11.53,5.56,14,4.1ZM7,7.12,5.87,6.45l-1.54-.9L3.39,5,1.85,4.1,7,1.08l5.17,3L10.6,5l-.93.55-1.54.91ZM7,10,3.39,7.9,1.85,7,3.4,6.09,4.94,7,7,8.2,9.06,7,10.6,6.1,12.15,7l-1.55.9Z"}})])},Se=[],ke={name:"TechnologyIcon",components:{SVGIcon:ye["a"]}},we=ke,xe=Object(R["a"])(we,Ce,Se,!1,null,null,null),Ie=xe.exports,Oe=n("a9f1"),$e=n("8d2d"),De=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("SVGIcon",{attrs:{viewBox:"0 0 14 14",height:"14"}},[n("path",{attrs:{d:"M13 1v12h-12v-12zM12.077 1.923h-10.154v10.154h10.154z"}}),n("path",{attrs:{d:"M5.191 9.529c0.044 0.002 0.089 0.004 0.133 0.004 0.108 0 0.196-0.025 0.262-0.074s0.122-0.113 0.166-0.188c0.044-0.077 0.078-0.159 0.103-0.247s0.049-0.173 0.074-0.251l0.598-2.186h-0.709l0.207-0.702h0.702l0.288-1.086c0.083-0.384 0.256-0.667 0.517-0.849s0.591-0.273 0.99-0.273c0.108 0 0.212 0.007 0.314 0.022s0.203 0.027 0.306 0.037l-0.207 0.761c-0.054-0.006-0.106-0.011-0.155-0.018s-0.102-0.011-0.155-0.011c-0.108 0-0.196 0.016-0.262 0.048s-0.122 0.075-0.166 0.129-0.080 0.115-0.107 0.185c-0.028 0.068-0.055 0.14-0.085 0.214l-0.222 0.842h0.768l-0.192 0.702h-0.783l-0.628 2.319c-0.059 0.222-0.129 0.419-0.21 0.594s-0.182 0.322-0.303 0.443-0.269 0.214-0.443 0.281-0.385 0.1-0.631 0.1c-0.084 0-0.168-0.004-0.251-0.011s-0.168-0.014-0.251-0.018l0.207-0.768c0.040 0 0.081 0.001 0.126 0.004z"}})])},Pe=[],Ae={name:"TopicFuncIcon",components:{SVGIcon:ye["a"]}},je=Ae,Le=Object(R["a"])(je,De,Pe,!1,null,null,null),Ee=Le.exports,Be=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("SVGIcon",{staticClass:"collection-icon",attrs:{viewBox:"0 0 14 14"}},[n("path",{attrs:{d:"m1 1v12h12v-12zm11 11h-10v-10h10z"}}),n("path",{attrs:{d:"m3 4h8v1h-8zm0 2.5h8v1h-8zm0 2.5h8v1h-8z"}}),n("path",{attrs:{d:"m3 4h8v1h-8z"}}),n("path",{attrs:{d:"m3 6.5h8v1h-8z"}}),n("path",{attrs:{d:"m3 9h8v1h-8z"}})])},Re=[],Ne={name:"CollectionIcon",components:{SVGIcon:ye["a"]}},ze=Ne,Me=Object(R["a"])(ze,Be,Re,!1,null,null,null),Ke=Me.exports,qe=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("SVGIcon",{attrs:{viewBox:"0 0 14 14",height:"14"}},[n("path",{attrs:{d:"M13 13h-12v-12h12zM1.923 12.077h10.154v-10.154h-10.154z"}}),n("path",{attrs:{d:"M5.098 4.968v-1.477h-0.738v1.477h-1.477v0.738h1.477v1.477h0.738v-1.477h1.477v-0.738z"}}),n("path",{attrs:{d:"M8.030 4.807l-2.031 5.538h0.831l2.031-5.538z"}}),n("path",{attrs:{d:"M8.894 8.805v0.923h2.215v-0.923z"}})])},Fe=[],Ve={name:"TopicFuncOpIcon",components:{SVGIcon:ye["a"]}},He=Ve,We=Object(R["a"])(He,qe,Fe,!1,null,null,null),Ue=We.exports,Ge=n("3b96"),Xe=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("SVGIcon",{attrs:{viewBox:"0 0 14 14",height:"14"}},[n("path",{attrs:{d:"M13 13h-12v-12h12zM1.923 12.077h10.154v-10.154h-10.154z"}}),n("path",{attrs:{d:"M4.133 3.633v6.738h1.938v-0.831h-0.923v-5.077h0.923v-0.831z"}}),n("path",{attrs:{d:"M9.856 10.371v-6.738h-1.938v0.831h0.923v5.077h-0.923v0.831z"}})])},Ye=[],Je={name:"TopicSubscriptIcon",components:{SVGIcon:ye["a"]}},Qe=Je,Ze=Object(R["a"])(Qe,Xe,Ye,!1,null,null,null),et=Ze.exports,tt=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("SVGIcon",{staticClass:"two-letter-icon",attrs:{width:"16px",height:"16px",viewBox:"0 0 16 16"}},[n("g",{attrs:{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"}},[n("g",{attrs:{transform:"translate(1.000000, 1.000000)"}},[n("rect",{attrs:{stroke:"currentColor",x:"0.5",y:"0.5",width:"13",height:"13"}}),n("text",{attrs:{"font-size":"8","font-weight":"bold",fill:"currentColor"}},[n("tspan",{attrs:{x:"9.08984375",y:"11"}},[e._v(e._s(e.second))])]),n("text",{attrs:{"font-size":"11","font-weight":"bold",fill:"currentColor"}},[n("tspan",{attrs:{x:"2",y:"11"}},[e._v(e._s(e.first))])])])])])},nt=[],at={name:"TwoLetterSymbolIcon",components:{SVGIcon:ye["a"]},props:{first:{type:String,required:!0},second:{type:String,required:!0}}},it=at,st=Object(R["a"])(it,tt,nt,!1,null,null,null),rt=st.exports,ot=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("SVGIcon",{staticClass:"single-letter-icon",attrs:{width:"16px",height:"16px",viewBox:"0 0 16 16"}},[n("g",{attrs:{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"}},[n("rect",{attrs:{stroke:"currentColor",x:"1",y:"1",width:"14",height:"14"}}),n("text",{attrs:{"font-size":"11","font-weight":"bold",fill:"currentColor",x:"49%",y:"12","text-anchor":"middle"}},[n("tspan",[e._v(e._s(e.symbol))])])])])},lt=[],ct={name:"SingleLetterSymbolIcon",components:{SVGIcon:ye["a"]},props:{symbol:{type:String,required:!0}}},ut=ct,dt=Object(R["a"])(ut,ot,lt,!1,null,null,null),ht=dt.exports;const pt={article:"article",associatedtype:"associatedtype",buildSetting:"buildSetting",case:"case",collection:"collection",class:"class",container:"container",dictionarySymbol:"dictionarySymbol",enum:"enum",extension:"extension",func:"func",groupMarker:"groupMarker",httpRequest:"httpRequest",init:"init",languageGroup:"languageGroup",learn:"learn",macro:"macro",method:"method",module:"module",op:"op",overview:"overview",project:"project",property:"property",propertyListKey:"propertyListKey",propertyListKeyReference:"propertyListKeyReference",protocol:"protocol",resources:"resources",root:"root",sampleCode:"sampleCode",section:"section",struct:"struct",subscript:"subscript",symbol:"symbol",tutorial:"tutorial",typealias:"typealias",union:"union",var:"var"},ft={[pt.init]:pt.method,[pt.case]:pt.enum,[pt.propertyListKeyReference]:pt.propertyListKey,[pt.project]:pt.tutorial},gt={blue:"blue",teal:"teal",orange:"orange",purple:"purple",green:"green",sky:"sky",pink:"pink"},mt={[pt.article]:gt.teal,[pt.init]:gt.blue,[pt.case]:gt.orange,[pt.class]:gt.purple,[pt.collection]:gt.pink,[k["a"].collectionGroup]:gt.teal,[pt.dictionarySymbol]:gt.purple,[pt.enum]:gt.orange,[pt.extension]:gt.orange,[pt.func]:gt.green,[pt.op]:gt.green,[pt.httpRequest]:gt.green,[pt.module]:gt.sky,[pt.method]:gt.blue,[pt.macro]:gt.pink,[pt.protocol]:gt.purple,[pt.property]:gt.teal,[pt.propertyListKey]:gt.green,[pt.propertyListKeyReference]:gt.green,[pt.sampleCode]:gt.purple,[pt.struct]:gt.purple,[pt.subscript]:gt.blue,[pt.typealias]:gt.orange,[pt.union]:gt.purple,[pt.var]:gt.purple},yt={[pt.article]:Oe["a"],[pt.associatedtype]:Ke,[pt.buildSetting]:Ke,[pt.class]:ht,[pt.collection]:Ke,[pt.dictionarySymbol]:ht,[pt.container]:Ke,[pt.enum]:ht,[pt.extension]:rt,[pt.func]:Ee,[pt.op]:Ue,[pt.httpRequest]:ht,[pt.languageGroup]:Ke,[pt.learn]:_e,[pt.method]:ht,[pt.macro]:ht,[pt.module]:Ie,[pt.overview]:_e,[pt.protocol]:rt,[pt.property]:ht,[pt.propertyListKey]:ht,[pt.resources]:_e,[pt.sampleCode]:Ge["a"],[pt.struct]:ht,[pt.subscript]:et,[pt.symbol]:Ke,[pt.tutorial]:$e["a"],[pt.typealias]:ht,[pt.union]:ht,[pt.var]:ht},vt={[pt.class]:{symbol:"C"},[pt.dictionarySymbol]:{symbol:"O"},[pt.enum]:{symbol:"E"},[pt.extension]:{first:"E",second:"x"},[pt.httpRequest]:{symbol:"E"},[pt.method]:{symbol:"M"},[pt.macro]:{symbol:"#"},[pt.protocol]:{first:"P",second:"r"},[pt.property]:{symbol:"P"},[pt.propertyListKey]:{symbol:"K"},[pt.struct]:{symbol:"S"},[pt.typealias]:{symbol:"T"},[pt.union]:{symbol:"U"},[pt.var]:{symbol:"V"}};var bt={name:"NavigatorLeafIcon",components:{SingleLetterSymbolIcon:ht},constants:{TopicTypeIcons:yt,TopicTypeProps:vt},props:{type:{type:String,required:!0},withColors:{type:Boolean,default:!1}},computed:{normalisedType:({type:e})=>ft[e]||e,icon:({normalisedType:e})=>yt[e]||Ke,iconProps:({normalisedType:e})=>vt[e]||{},color:({normalisedType:e})=>mt[e],styles:({color:e,withColors:t})=>t&&e?{color:`var(--color-type-icon-${e})`}:{}}},Tt=bt,_t=(n("b13d"),Object(R["a"])(Tt,pe,fe,!1,null,"031bfabc",null)),Ct=_t.exports,St={name:"DocumentationHero",components:{NavigatorLeafIcon:Ct},props:{role:{type:String,required:!0},enhanceBackground:{type:Boolean,required:!0},shortHero:{type:Boolean,required:!0},shouldShowLanguageSwitcher:{type:Boolean,required:!0}},computed:{color:({type:e})=>mt[ft[e]||e]||gt.teal,styles:({color:e})=>({"--accent-color":`var(--color-type-icon-${e}, var(--color-figure-gray-secondary))`}),type:({role:e})=>{switch(e){case k["a"].collection:return pt.module;case k["a"].collectionGroup:return pt.collection;default:return e}}}},kt=St,wt=(n("a8a5"),Object(R["a"])(kt,de,he,!1,null,"14076498",null)),xt=wt.exports,It=n("7b1f"),Ot=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("ContentNode",e._b({staticClass:"abstract"},"ContentNode",e.$props,!1))},$t=[],Dt=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("BaseContentNode",e._b({},"BaseContentNode",e.$props,!1))},Pt=[],At=n("5677"),jt={name:"ContentNode",components:{BaseContentNode:At["a"]},props:At["a"].props,methods:At["a"].methods,BlockType:At["a"].BlockType,InlineType:At["a"].InlineType},Lt=jt,Et=(n("c18a"),Object(R["a"])(Lt,Dt,Pt,!1,null,"002affcc",null)),Bt=Et.exports,Rt={name:"Abstract",components:{ContentNode:Bt},props:Bt.props},Nt=Rt,zt=(n("374e"),Object(R["a"])(Nt,Ot,$t,!1,null,"702ec04e",null)),Mt=zt.exports,Kt=n("c081"),qt=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("TopicsTable",{attrs:{anchor:"default-implementations",title:"Default Implementations",isSymbolDeprecated:e.isSymbolDeprecated,isSymbolBeta:e.isSymbolBeta,sections:e.sections,wrapTitle:!0}})},Ft=[],Vt=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("ContentTable",{attrs:{anchor:e.anchor,title:e.title}},e._l(e.sectionsWithTopics,(function(t){return n("ContentTableSection",{key:t.title,attrs:{title:t.title}},[e.wrapTitle?n("template",{slot:"title"},[n("WordBreak",{staticClass:"title",attrs:{tag:"h3"}},[e._v(" "+e._s(t.title)+" ")])],1):e._e(),t.abstract?n("template",{slot:"abstract"},[n("ContentNode",{attrs:{content:t.abstract}})],1):e._e(),t.discussion?n("template",{slot:"discussion"},[n("ContentNode",{attrs:{content:t.discussion.content}})],1):e._e(),e._l(t.topics,(function(t){return n("TopicsLinkBlock",{key:t.identifier,staticClass:"topic",attrs:{topic:t,isSymbolDeprecated:e.isSymbolDeprecated,isSymbolBeta:e.isSymbolBeta}})}))],2)})),1)},Ht=[],Wt=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("OnThisPageSection",{staticClass:"contenttable alt-light",attrs:{anchor:e.anchor,title:e.title}},[n("div",{staticClass:"container"},[n("h2",{staticClass:"title"},[e._v(e._s(e.title))]),e._t("default")],2)])},Ut=[],Gt=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("section",{attrs:{id:e.anchor}},[e._t("default")],2)},Xt=[],Yt={name:"OnThisPageSection",inject:{store:{default(){return{addOnThisPageSection(){}}}}},props:{anchor:{type:String,required:!0},title:{type:String,required:!0}},created(){this.store.addOnThisPageSection({anchor:this.anchor,title:this.title})}},Jt=Yt,Qt=Object(R["a"])(Jt,Gt,Xt,!1,null,null,null),Zt=Qt.exports,en={name:"ContentTable",components:{OnThisPageSection:Zt},props:{anchor:{type:String,required:!0},title:{type:String,required:!0}}},tn=en,nn=(n("ba48"),Object(R["a"])(tn,Wt,Ut,!1,null,"5a07ba83",null)),an=nn.exports,sn=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"contenttable-section"},[n("div",{staticClass:"section-title"},[e._t("title",(function(){return[n("h3",{staticClass:"title"},[e._v(e._s(e.title))])]}))],2),n("div",{staticClass:"section-content"},[e._t("abstract"),e._t("discussion"),e._t("default")],2)])},rn=[],on={name:"ContentTableSection",props:{title:{type:String,required:!0}}},ln=on,cn=(n("5d48"),Object(R["a"])(ln,sn,rn,!1,null,"627ab5f4",null)),un=cn.exports,dn=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"link-block",class:e.linkBlockClasses},[n(e.linkComponent,e._b({ref:"apiChangesDiff",tag:"component",staticClass:"link",class:e.linkClasses},"component",e.linkProps,!1),[e.topic.role&&!e.change?n("TopicLinkBlockIcon",{attrs:{role:e.topic.role}}):e._e(),e.topic.fragments?n("DecoratedTopicTitle",{attrs:{tokens:e.topic.fragments}}):n("WordBreak",{attrs:{tag:e.titleTag}},[e._v(e._s(e.topic.title))]),e.change?n("span",{staticClass:"visuallyhidden"},[e._v("- "+e._s(e.changeName))]):e._e()],1),e.hasAbstractElements?n("div",{staticClass:"abstract"},[e.topic.abstract?n("ContentNode",{attrs:{content:e.topic.abstract}}):e._e(),e.topic.ideTitle?n("div",{staticClass:"topic-keyinfo"},[e.topic.titleStyle===e.titleStyles.title?[n("strong",[e._v("Key:")]),e._v(" "+e._s(e.topic.name)+" ")]:e.topic.titleStyle===e.titleStyles.symbol?[n("strong",[e._v("Name:")]),e._v(" "+e._s(e.topic.ideTitle)+" ")]:e._e()],2):e._e(),e.topic.required||e.topic.defaultImplementations?n("RequirementMetadata",{staticClass:"topic-required",attrs:{defaultImplementationsCount:e.topic.defaultImplementations}}):e._e(),e.topic.conformance?n("ConditionalConstraints",{attrs:{constraints:e.topic.conformance.constraints,prefix:e.topic.conformance.availabilityPrefix}}):e._e()],1):e._e(),e.showDeprecatedBadge?n("Badge",{attrs:{variant:"deprecated"}}):e.showBetaBadge?n("Badge",{attrs:{variant:"beta"}}):e._e(),e._l(e.tags,(function(t){return n("Badge",{key:t.type+"-"+t.text,attrs:{variant:t.type}},[e._v(" "+e._s(t.text)+" ")])}))],2)},hn=[],pn=function(){var e,t=this,n=t.$createElement,a=t._self._c||n;return a("span",{staticClass:"badge",class:(e={},e["badge-"+t.variant]=t.variant,e),attrs:{role:"presentation"}},[t._t("default",(function(){return[t._v(t._s(t.text))]}))],2)},fn=[];const gn={beta:"Beta",deprecated:"Deprecated"};var mn={name:"Badge",props:{variant:{type:String,default:()=>""}},computed:{text:({variant:e})=>gn[e]}},yn=mn,vn=(n("8d93"),Object(R["a"])(yn,pn,fn,!1,null,"5a8ba4e0",null)),bn=vn.exports,Tn=function(){var e=this,t=e.$createElement,n=e._self._c||t;return e.icon?n("div",{staticClass:"topic-icon-wrapper"},[n(e.icon,{tag:"component",staticClass:"topic-icon"})],1):e._e()},_n=[],Cn=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("SVGIcon",{staticClass:"api-reference-icon",attrs:{viewBox:"0 0 14 14"}},[n("title",[e._v("API Reference")]),n("path",{attrs:{d:"m1 1v12h12v-12zm11 11h-10v-10h10z"}}),n("path",{attrs:{d:"m3 4h8v1h-8zm0 2.5h8v1h-8zm0 2.5h8v1h-8z"}}),n("path",{attrs:{d:"m3 4h8v1h-8z"}}),n("path",{attrs:{d:"m3 6.5h8v1h-8z"}}),n("path",{attrs:{d:"m3 9h8v1h-8z"}})])},Sn=[],kn={name:"APIReferenceIcon",components:{SVGIcon:ye["a"]}},wn=kn,xn=Object(R["a"])(wn,Cn,Sn,!1,null,null,null),In=xn.exports,On=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("SVGIcon",{attrs:{viewBox:"0 0 14 14"}},[n("title",[e._v("Web Service Endpoint")]),n("path",{attrs:{d:"M4.052 8.737h-1.242l-1.878 5.263h1.15l0.364-1.081h1.939l0.339 1.081h1.193zM2.746 12.012l0.678-2.071 0.653 2.071z"}}),n("path",{attrs:{d:"M11.969 8.737h1.093v5.263h-1.093v-5.263z"}}),n("path",{attrs:{d:"M9.198 8.737h-2.295v5.263h1.095v-1.892h1.12c0.040 0.003 0.087 0.004 0.134 0.004 0.455 0 0.875-0.146 1.217-0.394l-0.006 0.004c0.296-0.293 0.48-0.699 0.48-1.148 0-0.060-0.003-0.118-0.010-0.176l0.001 0.007c0.003-0.039 0.005-0.085 0.005-0.131 0-0.442-0.183-0.842-0.476-1.128l-0-0c-0.317-0.256-0.724-0.41-1.168-0.41-0.034 0-0.069 0.001-0.102 0.003l0.005-0zM9.628 11.014c-0.15 0.118-0.341 0.188-0.548 0.188-0.020 0-0.040-0.001-0.060-0.002l0.003 0h-1.026v-1.549h1.026c0.017-0.001 0.037-0.002 0.058-0.002 0.206 0 0.396 0.066 0.551 0.178l-0.003-0.002c0.135 0.13 0.219 0.313 0.219 0.515 0 0.025-0.001 0.050-0.004 0.074l0-0.003c0.002 0.020 0.003 0.044 0.003 0.068 0 0.208-0.083 0.396-0.219 0.534l0-0z"}}),n("path",{attrs:{d:"M13.529 4.981c0-1.375-1.114-2.489-2.489-2.49h-0l-0.134 0.005c-0.526-1.466-1.903-2.496-3.522-2.496-0.892 0-1.711 0.313-2.353 0.835l0.007-0.005c-0.312-0.243-0.709-0.389-1.14-0.389-1.030 0-1.865 0.834-1.866 1.864v0c0 0.001 0 0.003 0 0.004 0 0.123 0.012 0.242 0.036 0.358l-0.002-0.012c-0.94 0.37-1.593 1.27-1.593 2.323 0 1.372 1.11 2.485 2.482 2.49h8.243c1.306-0.084 2.333-1.164 2.333-2.484 0-0.001 0-0.002 0-0.003v0zM11.139 6.535h-8.319c-0.799-0.072-1.421-0.739-1.421-1.551 0-0.659 0.41-1.223 0.988-1.45l0.011-0.004 0.734-0.28-0.148-0.776-0.012-0.082v-0.088c0-0 0-0.001 0-0.001 0-0.515 0.418-0.933 0.933-0.933 0.216 0 0.416 0.074 0.574 0.197l-0.002-0.002 0.584 0.453 0.575-0.467 0.169-0.127c0.442-0.306 0.991-0.489 1.581-0.489 1.211 0 2.243 0.769 2.633 1.846l0.006 0.019 0.226 0.642 0.814-0.023 0.131 0.006c0.805 0.067 1.432 0.736 1.432 1.552 0 0.836-0.659 1.518-1.486 1.556l-0.003 0z"}})])},$n=[],Dn={name:"EndpointIcon",components:{SVGIcon:ye["a"]}},Pn=Dn,An=Object(R["a"])(Pn,On,$n,!1,null,null,null),jn=An.exports;const Ln={[k["a"].article]:Oe["a"],[k["a"].collectionGroup]:In,[k["a"].learn]:_e,[k["a"].overview]:_e,[k["a"].project]:$e["a"],[k["a"].tutorial]:$e["a"],[k["a"].resources]:_e,[k["a"].sampleCode]:Ge["a"],[k["a"].restRequestSymbol]:jn};var En,Bn,Rn,Nn,zn,Mn,Kn,qn,Fn={props:{role:{type:String,required:!0}},computed:{icon:({role:e})=>Ln[e]}},Vn=Fn,Hn=(n("1a47"),Object(R["a"])(Vn,Tn,_n,!1,null,"4d1e7968",null)),Wn=Hn.exports,Un=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("code",{staticClass:"decorated-title"},e._l(e.tokens,(function(t,a){return n(e.componentFor(t),{key:a,tag:"component",class:[e.classFor(t),e.emptyTokenClass(t)]},[e._v(e._s(t.text))])})),1)},Gn=[],Xn={name:"ChangedToken",render(e){const{kind:t,tokens:n}=this;return e("span",{class:["token-"+t,"token-changed"]},n.map(t=>e(va,{props:t})))},props:{kind:{type:String,required:!0},tokens:{type:Array,required:!0}}},Yn=Xn,Jn=Object(R["a"])(Yn,En,Bn,!1,null,null,null),Qn=Jn.exports,Zn={name:"RawText",render(e){const{_v:t=(t=>e("span",t)),text:n}=this;return t(n)},props:{text:{type:String,required:!0}}},ea=Zn,ta=Object(R["a"])(ea,Rn,Nn,!1,null,null,null),na=ta.exports,aa={name:"SyntaxToken",render(e){return e("span",{class:"token-"+this.kind},this.text)},props:{kind:{type:String,required:!0},text:{type:String,required:!0}}},ia=aa,sa=Object(R["a"])(ia,zn,Mn,!1,null,null,null),ra=sa.exports,oa=n("86d8"),la={name:"TypeIdentifierLink",inject:{references:{default(){return{}}}},render(e){const t="type-identifier-link",n=this.references[this.identifier];return n&&n.url?e(oa["a"],{class:t,props:{url:n.url,kind:n.kind,role:n.role}},this.$slots.default):e("span",{class:t},this.$slots.default)},props:{identifier:{type:String,required:!0,default:()=>""}}},ca=la,ua=Object(R["a"])(ca,Kn,qn,!1,null,null,null),da=ua.exports;const ha={attribute:"attribute",externalParam:"externalParam",genericParameter:"genericParameter",identifier:"identifier",internalParam:"internalParam",keyword:"keyword",label:"label",number:"number",string:"string",text:"text",typeIdentifier:"typeIdentifier",added:"added",removed:"removed"};var pa,fa,ga={name:"DeclarationToken",render(e){const{kind:t,text:n,tokens:a}=this;switch(t){case ha.text:{const t={text:n};return e(na,{props:t})}case ha.typeIdentifier:{const t={identifier:this.identifier};return e(da,{props:t},[e(It["a"],n)])}case ha.added:case ha.removed:return e(Qn,{props:{tokens:a,kind:t}});default:{const a={kind:t,text:n};return e(ra,{props:a})}}},constants:{TokenKind:ha},props:{kind:{type:String,required:!0},identifier:{type:String,required:!1},text:{type:String,required:!1},tokens:{type:Array,required:!1,default:()=>[]}}},ma=ga,ya=(n("c36f"),Object(R["a"])(ma,pa,fa,!1,null,"5caf1b5b",null)),va=ya.exports;const{TokenKind:ba}=va.constants,Ta={decorator:"decorator",identifier:"identifier",label:"label"};var _a={name:"DecoratedTopicTitle",components:{WordBreak:It["a"]},props:{tokens:{type:Array,required:!0,default:()=>[]}},constants:{TokenKind:ba},methods:{emptyTokenClass:({text:e})=>({"empty-token":" "===e}),classFor({kind:e}){switch(e){case ba.externalParam:case ba.identifier:return Ta.identifier;case ba.label:return Ta.label;default:return Ta.decorator}},componentFor(e){return/^\s+$/.test(e.text)?"span":It["a"]}}},Ca=_a,Sa=(n("dcf6"),Object(R["a"])(Ca,Un,Gn,!1,null,"06ec7395",null)),ka=Sa.exports,wa=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("ContentNode",{staticClass:"conditional-constraints",attrs:{content:e.content}})},xa=[],Ia={name:"ConditionalConstraints",components:{ContentNode:Bt},props:{constraints:Bt.props.content,prefix:Bt.props.content},computed:{content:({constraints:e,prefix:t,space:n})=>t.concat(n).concat(e),space:()=>({type:Bt.InlineType.text,text:" "})}},Oa=Ia,$a=(n("918a"),Object(R["a"])(Oa,wa,xa,!1,null,"1548fd90",null)),Da=$a.exports,Pa=function(e,t){var n=t._c;return n("p",{staticClass:"requirement-metadata",class:t.data.staticClass},[n("strong",[t._v("Required.")]),t.props.defaultImplementationsCount?[t._v(" Default implementation"+t._s(t.props.defaultImplementationsCount>1?"s":"")+" provided. ")]:t._e()],2)},Aa=[],ja={name:"RequirementMetadata",props:{defaultImplementationsCount:{type:Number,default:0}}},La=ja,Ea=Object(R["a"])(La,Pa,Aa,!0,null,null,null),Ba=Ea.exports;const Ra={added:"added",modified:"modified",deprecated:"deprecated"},Na=[Ra.modified,Ra.added,Ra.deprecated],za={[Ra.modified]:"Modified",[Ra.added]:"Added",[Ra.deprecated]:"Deprecated"},Ma={Modified:Ra.modified,Added:Ra.added,Deprecated:Ra.deprecated},Ka="has-multiple-lines";function qa(e){if(!e)return!1;const t=window.getComputedStyle(e.$el||e),n=(e.$el||e).offsetHeight,a=t.lineHeight?parseFloat(t.lineHeight):1,i=t.paddingTop?parseFloat(t.paddingTop):0,s=t.paddingBottom?parseFloat(t.paddingBottom):0,r=t.borderTopWidth?parseFloat(t.borderTopWidth):0,o=t.borderBottomWidth?parseFloat(t.borderBottomWidth):0,l=n-(i+s+r+o),c=l/a;return c>=2}const Fa="latest_",Va={xcode:{value:"xcode",label:"Xcode"},other:{value:"other",label:"Other"}},Ha={constants:{multipleLinesClass:Ka},data(){return{multipleLinesClass:Ka}},computed:{hasMultipleLinesAfterAPIChanges:({change:e,changeType:t,$refs:n})=>!(!e&&!t)&&qa(n.apiChangesDiff)}},Wa={methods:{toVersionRange({platform:e,versions:t}){return`${e} ${t[0]} – ${e} ${t[1]}`},toOptionValue:e=>`${Fa}${e}`,toScope:e=>e.slice(Fa.length,e.length),getOptionsForDiffAvailability(e={}){return this.getOptionsForDiffAvailabilities([e])},getOptionsForDiffAvailabilities(e=[]){const t=e.reduce((e,t={})=>Object.keys(t).reduce((e,n)=>({...e,[n]:(e[n]||[]).concat(t[n])}),e),{}),n=Object.keys(t),a=n.reduce((e,n)=>{const a=t[n];return{...e,[n]:a.find(e=>e.platform===Va.xcode.label)||a[0]}},{}),i=e=>({label:this.toVersionRange(a[e]),value:this.toOptionValue(e),platform:a[e].platform}),{sdk:s,beta:r,minor:o,major:l,...c}=a,u=[].concat(s?i("sdk"):[]).concat(r?i("beta"):[]).concat(o?i("minor"):[]).concat(l?i("major"):[]).concat(Object.keys(c).map(i));return this.splitOptionsPerPlatform(u)},changesClassesFor(e,t){const n=this.changeFor(e,t);return this.getChangesClasses(n)},getChangesClasses:e=>({["changed changed-"+e]:!!e}),changeFor(e,t){const{change:n}=(t||{})[e]||{};return n},splitOptionsPerPlatform(e){return e.reduce((e,t)=>{const n=t.platform===Va.xcode.label?Va.xcode.value:Va.other.value;return e[n].push(t),e},{[Va.xcode.value]:[],[Va.other.value]:[]})},getChangeName(e){return za[e]}},computed:{availableOptions({diffAvailability:e={},toOptionValue:t}){return new Set(Object.keys(e).map(t))}}},Ua={article:"article",symbol:"symbol"},Ga={title:"title",symbol:"symbol"},Xa={link:"link"};var Ya={name:"TopicsLinkBlock",components:{Badge:bn,WordBreak:It["a"],ContentNode:Bt,TopicLinkBlockIcon:Wn,DecoratedTopicTitle:ka,RequirementMetadata:Ba,ConditionalConstraints:Da},inject:["store"],mixins:[Wa,Ha],constants:{ReferenceType:Xa,TopicKind:Ua,TitleStyles:Ga},props:{isSymbolBeta:Boolean,isSymbolDeprecated:Boolean,topic:{type:Object,required:!0,validator:e=>(!("abstract"in e)||Array.isArray(e.abstract))&&"string"===typeof e.identifier&&(e.type===Xa.link&&!e.kind||"string"===typeof e.kind)&&(e.type===Xa.link&&!e.role||"string"===typeof e.role)&&"string"===typeof e.title&&"string"===typeof e.url&&(!("defaultImplementations"in e)||"number"===typeof e.defaultImplementations)&&(!("required"in e)||"boolean"===typeof e.required)&&(!("conformance"in e)||"object"===typeof e.conformance)}},data(){return{state:this.store.state}},computed:{linkComponent:({topic:e})=>e.type===Xa.link?"a":"router-link",linkProps({topic:e}){const t=Object(q["b"])(e.url,this.$route.query);return e.type===Xa.link?{href:t}:{to:t}},linkBlockClasses:({changesClasses:e,hasAbstractElements:t,hasMultipleLinesAfterAPIChanges:n,multipleLinesClass:a})=>({"has-inline-element":!t,[a]:n,...!t&&e}),linkClasses:({changesClasses:e,deprecated:t,hasAbstractElements:n})=>({deprecated:t,"has-adjacent-elements":n,...n&&e}),changesClasses:({getChangesClasses:e,change:t})=>e(t),titleTag({topic:e}){if(e.titleStyle===Ga.title)return e.ideTitle?"span":"code";if(e.role&&(e.role===k["a"].collection||e.role===k["a"].dictionarySymbol))return"span";switch(e.kind){case Ua.symbol:return"code";default:return"span"}},titleStyles:()=>Ga,deprecated:({showDeprecatedBadge:e,topic:t})=>e||t.deprecated,showBetaBadge:({topic:e,isSymbolBeta:t})=>Boolean(!t&&e.beta),showDeprecatedBadge:({topic:e,isSymbolDeprecated:t})=>Boolean(!t&&e.deprecated),change({topic:{identifier:e},state:{apiChanges:t}}){return this.changeFor(e,t)},changeName:({change:e,getChangeName:t})=>t(e),hasAbstractElements:({topic:{abstract:e,conformance:t,required:n,defaultImplementations:a}}={})=>e&&e.length>0||t||n||a,tags:({topic:e})=>(e.tags||[]).slice(0,1)}},Ja=Ya,Qa=(n("f158"),Object(R["a"])(Ja,dn,hn,!1,null,"3152d122",null)),Za=Qa.exports,ei={name:"TopicsTable",inject:{references:{default(){return{}}}},components:{WordBreak:It["a"],ContentTable:an,TopicsLinkBlock:Za,ContentNode:Bt,ContentTableSection:un},props:{isSymbolDeprecated:Boolean,isSymbolBeta:Boolean,sections:{type:Array,required:!0},title:{type:String,required:!1,default(){return"Topics"}},anchor:{type:String,required:!1,default(){return"topics"}},wrapTitle:{type:Boolean,default:!1}},computed:{sectionsWithTopics(){return this.sections.map(e=>({...e,topics:e.identifiers.reduce((e,t)=>this.references[t]?e.concat(this.references[t]):e,[])}))}}},ti=ei,ni=(n("6e80"),Object(R["a"])(ti,Vt,Ht,!1,null,"eb97add6",null)),ai=ni.exports,ii={name:"DefaultImplementations",components:{TopicsTable:ai},props:{isSymbolDeprecated:Boolean,isSymbolBeta:Boolean,sections:ai.props.sections}},si=ii,ri=Object(R["a"])(si,qt,Ft,!1,null,null,null),oi=ri.exports,li=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"primary-content"},e._l(e.sections,(function(t,a){return n(e.componentFor(t),e._b({key:a,tag:"component"},"component",e.propsFor(t),!1))})),1)},ci=[],ui=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("OnThisPageSection",{attrs:{anchor:"possibleValues",title:"PossibleValues"}},[n("h2",[e._v("Possible Values")]),n("dl",{staticClass:"datalist"},[e._l(e.values,(function(t){return[n("dt",{key:t.name+":name",staticClass:"param-name"},[n("WordBreak",{attrs:{tag:"code"}},[e._v(e._s(t.name))])],1),t.content?n("dd",{key:t.name+":content",staticClass:"value-content"},[n("ContentNode",{attrs:{content:t.content}})],1):e._e()]}))],2)])},di=[],hi={name:"PossibleValues",components:{ContentNode:At["a"],OnThisPageSection:Zt,WordBreak:It["a"]},props:{values:{type:Array,required:!0}}},pi=hi,fi=(n("719b"),Object(R["a"])(pi,ui,di,!1,null,null,null)),gi=fi.exports,mi=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("OnThisPageSection",{attrs:{anchor:e.anchor,title:e.title}},[n("h2",[e._v(e._s(e.title))]),n("DeclarationSource",{attrs:{tokens:e.tokens}})],1)},yi=[],vi=n("002d"),bi=function(){var e,t=this,n=t.$createElement,a=t._self._c||n;return a("pre",{ref:"declarationGroup",staticClass:"source",class:(e={},e[t.multipleLinesClass]=t.hasMultipleLines,e)},[a("code",{ref:"code"},t._l(t.formattedTokens,(function(e,n){return a("Token",t._b({key:n},"Token",t.propsFor(e),!1))})),1)])},Ti=[];function _i(e){const t=e.getElementsByClassName("token-identifier");if(t.length<2)return;const n=e.textContent.indexOf(":")+1;for(let a=1;aObject(Si["c"])(["theme","code","indentationWidth"],wi),formattedTokens:({language:e,formattedSwiftTokens:t,tokens:n})=>e===O["a"].swift.key.api?t:n,formattedSwiftTokens:({indentationWidth:e,tokens:t})=>{const n=" ".repeat(e);let a=!1;const i=[];let s=0,r=1,o=null,l=null,c=null,u=null,d=0;while(sObject(vi["a"])(e)}},Pi=Di,Ai=Object(R["a"])(Pi,mi,yi,!1,null,null,null),ji=Ai.exports,Li=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("OnThisPageSection",{staticClass:"declaration",attrs:{anchor:"declaration",title:"Declaration"}},[n("h2",[e._v("Declaration")]),e.hasModifiedChanges?[n("DeclarationDiff",{class:[e.changeClasses,e.multipleLinesClass],attrs:{changes:e.declarationChanges,changeType:e.changeType}})]:e._l(e.declarations,(function(t,a){return n("DeclarationGroup",{key:a,class:e.changeClasses,attrs:{declaration:t,shouldCaption:e.hasPlatformVariants,changeType:e.changeType}})})),e.conformance?n("ConditionalConstraints",{attrs:{constraints:e.conformance.constraints,prefix:e.conformance.availabilityPrefix}}):e._e()],2)},Ei=[],Bi=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{ref:"apiChangesDiff",staticClass:"declaration-group",class:e.classes},[e.shouldCaption?n("p",{staticClass:"platforms"},[n("strong",[e._v(e._s(e.caption))])]):e._e(),n("Source",{attrs:{tokens:e.declaration.tokens,language:e.interfaceLanguage}})],1)},Ri=[],Ni={name:"DeclarationGroup",components:{Source:$i},mixins:[Ha],inject:{languages:{default:()=>new Set},interfaceLanguage:{default:()=>O["a"].swift.key.api},symbolKind:{default:()=>{}}},props:{declaration:{type:Object,required:!0},shouldCaption:{type:Boolean,default:!1},changeType:{type:String,required:!1}},computed:{classes:({changeType:e,multipleLinesClass:t,hasMultipleLinesAfterAPIChanges:n})=>({["declaration-group--changed declaration-group--"+e]:e,[t]:n}),caption(){return this.declaration.platforms.join(", ")},isSwift:({interfaceLanguage:e})=>e===O["a"].swift.key.api}},zi=Ni,Mi=(n("a40c"),Object(R["a"])(zi,Bi,Ri,!1,null,"c5ecdd3e",null)),Ki=Mi.exports,qi=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"declaration-diff"},[n("div",{staticClass:"declaration-diff-current"},[n("div",{staticClass:"declaration-diff-version"},[e._v("Current")]),e._l(e.currentDeclarations,(function(t,a){return n("DeclarationGroup",{key:a,attrs:{declaration:t,"should-caption":e.currentDeclarations.length>1,changeType:e.changeType}})}))],2),n("div",{staticClass:"declaration-diff-previous"},[n("div",{staticClass:"declaration-diff-version"},[e._v("Previous")]),e._l(e.previousDeclarations,(function(t,a){return n("DeclarationGroup",{key:a,attrs:{declaration:t,"should-caption":e.previousDeclarations.length>1,changeType:e.changeType}})}))],2)])},Fi=[],Vi={name:"DeclarationDiff",components:{DeclarationGroup:Ki},props:{changes:{type:Object,required:!0},changeType:{type:String,required:!0}},computed:{previousDeclarations:({changes:e})=>e.declaration.previous||[],currentDeclarations:({changes:e})=>e.declaration.new||[]}},Hi=Vi,Wi=(n("7a2c"),Object(R["a"])(Hi,qi,Fi,!1,null,"b3e21c4a",null)),Ui=Wi.exports,Gi={name:"Declaration",components:{DeclarationDiff:Ui,DeclarationGroup:Ki,ConditionalConstraints:Da,OnThisPageSection:Zt},constants:{ChangeTypes:Ra,multipleLinesClass:Ka},inject:["identifier","store"],data:({store:{state:e}})=>({state:e,multipleLinesClass:Ka}),props:{conformance:{type:Object,required:!1},declarations:{type:Array,required:!0}},computed:{hasPlatformVariants(){return this.declarations.length>1},hasModifiedChanges({declarationChanges:e}){if(!e||!e.declaration)return!1;const t=e.declaration;return!(!(t.new||[]).length||!(t.previous||[]).length)},declarationChanges:({state:{apiChanges:e},identifier:t})=>e&&e[t],changeType:({declarationChanges:e,hasModifiedChanges:t})=>{if(!e)return;const n=e.declaration;return n?t?Ra.modified:e.change:e.change===Ra.added?Ra.added:void 0},changeClasses:({changeType:e})=>({["changed changed-"+e]:e})}},Xi=Gi,Yi=(n("4340"),Object(R["a"])(Xi,Li,Ei,!1,null,"e39c4ee4",null)),Ji=Yi.exports,Qi=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("OnThisPageSection",{staticClass:"details",attrs:{anchor:"details",title:"Details"}},[n("h2",[e._v("Details")]),n("dl",[e.isSymbol?[n("dt",{key:e.details.name+":name",staticClass:"detail-type"},[e._v(" Name ")]),n("dd",{key:e.details.ideTitle+":content",staticClass:"detail-content"},[e._v(" "+e._s(e.details.ideTitle)+" ")])]:e._e(),e.isTitle?[n("dt",{key:e.details.name+":key",staticClass:"detail-type"},[e._v(" Key ")]),n("dd",{key:e.details.ideTitle+":content",staticClass:"detail-content"},[e._v(" "+e._s(e.details.name)+" ")])]:e._e(),n("dt",{key:e.details.name+":type",staticClass:"detail-type"},[e._v(" Type ")]),n("dd",{staticClass:"detail-content"},[n("PropertyListKeyType",{attrs:{types:e.details.value}})],1)],2)])},Zi=[],es=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"type"},[e._v(e._s(e.typeOutput))])},ts=[],ns={name:"PropertyListKeyType",props:{types:{type:Array,required:!0}},computed:{englishTypes(){return this.types.map(({arrayMode:e,baseType:t="*"})=>e?"array of "+this.pluralizeKeyType(t):t)},typeOutput(){return this.englishTypes.length>2?[this.englishTypes.slice(0,this.englishTypes.length-1).join(", "),this.englishTypes[this.englishTypes.length-1]].join(", or "):this.englishTypes.join(" or ")}},methods:{pluralizeKeyType(e){switch(e){case"dictionary":return"dictionaries";case"array":case"number":case"string":return e+"s";default:return e}}}},as=ns,is=(n("f7c0"),Object(R["a"])(as,es,ts,!1,null,"791bac44",null)),ss=is.exports,rs={name:"PropertyListKeyDetails",components:{PropertyListKeyType:ss,OnThisPageSection:Zt},props:{details:{type:Object,required:!0}},computed:{isTitle(){return"title"===this.details.titleStyle&&this.details.ideTitle},isSymbol(){return"symbol"===this.details.titleStyle&&this.details.ideTitle}}},os=rs,ls=(n("a705"),Object(R["a"])(os,Qi,Zi,!1,null,"61ef551b",null)),cs=ls.exports,us=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("ContentNode",e._b({},"ContentNode",e.$props,!1))},ds=[],hs={name:"GenericContent",inject:{store:{default(){return{addOnThisPageSection(){}}}}},components:{ContentNode:Bt},props:Bt.props,methods:{...Bt.methods,addOnThisPageSections(){const{isTopLevelHeading:e,store:t}=this;this.forEach(n=>{e(n)&&t.addOnThisPageSection({anchor:n.anchor,title:n.text})})},isTopLevelHeading(e){const{level:t,type:n}=e;return n===Bt.BlockType.heading&&2===t}},created(){this.addOnThisPageSections()}},ps=hs,fs=Object(R["a"])(ps,us,ds,!1,null,null,null),gs=fs.exports,ms=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("OnThisPageSection",{staticClass:"parameters",attrs:{anchor:"parameters",title:"Parameters"}},[n("h2",[e._v("Parameters")]),n("dl",[e._l(e.parameters,(function(t){return[n("dt",{key:t.name+":name",staticClass:"param-name"},[n("code",[e._v(e._s(t.name))])]),n("dd",{key:t.name+":content",staticClass:"param-content"},[n("ContentNode",{attrs:{content:t.content}})],1)]}))],2)])},ys=[],vs={name:"Parameters",components:{ContentNode:Bt,OnThisPageSection:Zt},props:{parameters:{type:Array,required:!0}}},bs=vs,Ts=(n("09db"),Object(R["a"])(bs,ms,ys,!1,null,"7bb7c035",null)),_s=Ts.exports,Cs=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("OnThisPageSection",{attrs:{anchor:e.anchor,title:e.title}},[n("h2",[e._v(e._s(e.title))]),n("ParametersTable",{staticClass:"property-table",attrs:{parameters:e.properties,changes:e.propertyChanges},scopedSlots:e._u([{key:"symbol",fn:function(t){var a=t.name,i=t.type,s=t.content,r=t.changes,o=t.deprecated;return[n("div",{staticClass:"property-name",class:{deprecated:o}},[n("WordBreak",{attrs:{tag:"code"}},[e._v(e._s(a))])],1),e.shouldShiftType({name:a,content:s})?e._e():n("PossiblyChangedType",{attrs:{type:i,changes:r.type}})]}},{key:"description",fn:function(t){var a=t.name,i=t.type,s=t.attributes,r=t.content,o=t.required,l=t.changes,c=t.deprecated,u=t.readOnly;return[e.shouldShiftType({name:a,content:r})?n("PossiblyChangedType",{attrs:{type:i,changes:l.type}}):e._e(),c?[n("Badge",{staticClass:"property-deprecated",attrs:{variant:"deprecated"}}),e._v("  ")]:e._e(),n("PossiblyChangedTextAttribute",{attrs:{changes:l.required,value:o}},[e._v("(Required) ")]),n("PossiblyChangedTextAttribute",{attrs:{changes:l.readOnly,value:u}},[e._v("(Read only) ")]),r?n("ContentNode",{attrs:{content:r}}):e._e(),n("ParameterAttributes",{attrs:{attributes:s,changes:l.attributes}})]}}])})],1)},Ss=[],ks={inject:["identifier","store"],data:({store:{state:e}})=>({state:e}),computed:{apiChanges:({state:{apiChanges:e},identifier:t})=>e&&e[t]}},ws=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"parameters-table"},e._l(e.parameters,(function(t){return n("Row",{key:t[e.keyBy],staticClass:"param",class:e.changedClasses(t[e.keyBy])},[n("Column",{staticClass:"param-symbol",attrs:{span:{large:3,small:12}}},[e._t("symbol",null,null,e.getProps(t,e.changes[t[e.keyBy]]))],2),n("Column",{staticClass:"param-content",attrs:{span:{large:9,small:12}}},[e._t("description",null,null,e.getProps(t,e.changes[t[e.keyBy]]))],2)],1)})),1)},xs=[],Is={name:"ParametersTable",components:{Row:j["a"],Column:L["a"]},props:{parameters:{type:Array,required:!0},changes:{type:Object,default:()=>({})},keyBy:{type:String,default:"name"}},methods:{getProps(e,t={}){return{...e,changes:t}},changedClasses(e){const{changes:t}=this,{change:n}=t[e]||{};return{["changed changed-"+n]:n}}}},Os=Is,$s=(n("9da8"),Object(R["a"])(Os,ws,xs,!1,null,"2d54624a",null)),Ds=$s.exports,Ps=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"parameter-attributes"},[e.shouldRender(e.AttributeKind.default)?n("ParameterMetaAttribute",e._b({scopedSlots:e._u([{key:"default",fn:function(t){var a=t.attribute;return[e._v(" "+e._s(a.title||"Default")+": "),n("code",[e._v(e._s(a.value))])]}}],null,!1,4247435012)},"ParameterMetaAttribute",{kind:e.AttributeKind.default,attributes:e.attributesObject,changes:e.changes},!1)):e._e(),e.shouldRender(e.AttributeKind.minimum)?n("ParameterMetaAttribute",e._b({scopedSlots:e._u([{key:"default",fn:function(t){var a=t.attribute;return[e._v(" "+e._s(a.title||"Minimum")+": "),n("code",[e._v(e._s(a.value))])]}}],null,!1,455861177)},"ParameterMetaAttribute",{kind:e.AttributeKind.minimum,attributes:e.attributesObject,changes:e.changes},!1)):e._e(),e.shouldRender(e.AttributeKind.minimumExclusive)?n("ParameterMetaAttribute",e._b({scopedSlots:e._u([{key:"default",fn:function(t){var a=t.attribute;return[e._v(" "+e._s(a.title||"Minimum")+": "),n("code",[e._v("> "+e._s(a.value))])]}}],null,!1,3844501612)},"ParameterMetaAttribute",{kind:e.AttributeKind.minimumExclusive,attributes:e.attributesObject,changes:e.changes},!1)):e._e(),e.shouldRender(e.AttributeKind.maximum)?n("ParameterMetaAttribute",e._b({scopedSlots:e._u([{key:"default",fn:function(t){var a=t.attribute;return[e._v(" "+e._s(a.title||"Maximum")+": "),n("code",[e._v(e._s(a.value))])]}}],null,!1,19641767)},"ParameterMetaAttribute",{kind:e.AttributeKind.maximum,attributes:e.attributesObject,changes:e.changes},!1)):e._e(),e.shouldRender(e.AttributeKind.maximumExclusive)?n("ParameterMetaAttribute",e._b({scopedSlots:e._u([{key:"default",fn:function(t){var a=t.attribute;return[e._v(" "+e._s(a.title||"Maximum")+": "),n("code",[e._v("< "+e._s(a.value))])]}}],null,!1,4289558576)},"ParameterMetaAttribute",{kind:e.AttributeKind.maximumExclusive,attributes:e.attributesObject,changes:e.changes},!1)):e._e(),e.shouldRender(e.AttributeKind.allowedTypes)?n("ParameterMetaAttribute",e._b({scopedSlots:e._u([{key:"default",fn:function(t){var a=t.attribute;return[e._v(" "+e._s(e.fallbackToValues(a).length>1?"Possible types":"Type")+": "),n("code",[e._l(e.fallbackToValues(a),(function(t,i){return[e._l(t,(function(t,s){return[n("DeclarationToken",e._b({key:i+"-"+s},"DeclarationToken",t,!1)),i+11?"Possible values":"Value")+": "),n("code",[e._v(e._s(e.fallbackToValues(a).join(", ")))])]}}],null,!1,1507632019)},"ParameterMetaAttribute",{kind:e.AttributeKind.allowedValues,attributes:e.attributesObject,changes:e.changes},!1)):e._e()],1)},As=[],js=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("RenderChanged",{attrs:{value:e.attributes[e.kind],changes:e.changes[e.kind]},scopedSlots:e._u([{key:"default",fn:function(t){var a=t.value;return n("div",{staticClass:"property-metadata"},[e._t("default",null,{attribute:a})],2)}}],null,!0)})},Ls=[];const Es={added:"change-added",removed:"change-removed"};var Bs,Rs,Ns={name:"RenderChanged",constants:{ChangedClasses:Es},props:{changes:{type:Object,default:()=>({new:null,previous:null})},value:{type:[Object,Array,String,Boolean],default:null},wrapChanges:{type:Boolean,default:!0},renderSingleChange:{type:Boolean,default:!1}},render(e){const{value:t,changes:n={},wrapChanges:a,renderSingleChange:i}=this,{new:s,previous:r}=n,o=(t,n)=>{const i=this.$scopedSlots.default({value:t});return n&&a?e("div",{class:n},[i]):i?i[0]:null};if(s||r){const t=o(s,Es.added),n=o(r,Es.removed);return i?s&&!r?t:n:e("div",{class:"property-changegroup"},[s?t:"",r?n:""])}return o(t)}},zs=Ns,Ms=Object(R["a"])(zs,Bs,Rs,!1,null,null,null),Ks=Ms.exports,qs={name:"ParameterMetaAttribute",components:{RenderChanged:Ks},props:{kind:{type:String,required:!0},attributes:{type:Object,required:!0},changes:{type:Object,default:()=>({})}}},Fs=qs,Vs=(n("2822"),Object(R["a"])(Fs,js,Ls,!1,null,"8590589e",null)),Hs=Vs.exports;const Ws={allowedTypes:"allowedTypes",allowedValues:"allowedValues",default:"default",maximum:"maximum",maximumExclusive:"maximumExclusive",minimum:"minimum",minimumExclusive:"minimumExclusive"};var Us={name:"ParameterAttributes",components:{ParameterMetaAttribute:Hs,DeclarationToken:va},constants:{AttributeKind:Ws},props:{attributes:{type:Array,default:()=>[]},changes:{type:Object,default:()=>({})}},computed:{AttributeKind:()=>Ws,attributesObject:({attributes:e})=>e.reduce((e,t)=>({...e,[t.kind]:t}),{})},methods:{shouldRender(e){return Object.prototype.hasOwnProperty.call(this.attributesObject,e)},fallbackToValues:e=>{const t=e||[];return Array.isArray(t)?t:t.values}}},Gs=Us,Xs=Object(R["a"])(Gs,Ps,As,!1,null,null,null),Ys=Xs.exports,Js=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("RenderChanged",{attrs:{renderSingleChange:"",value:e.value,changes:e.changes},scopedSlots:e._u([{key:"default",fn:function(t){var a=t.value;return a?n("span",{staticClass:"property-text"},[e._t("default")],2):e._e()}}],null,!0)})},Qs=[],Zs={name:"PossiblyChangedTextAttribute",components:{RenderChanged:Ks},props:{changes:{type:Object,required:!1},value:{type:Boolean,default:!1}}},er=Zs,tr=(n("5c57"),Object(R["a"])(er,Js,Qs,!1,null,null,null)),nr=tr.exports,ar=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("RenderChanged",{attrs:{value:e.type,wrapChanges:!1,changes:e.changes},scopedSlots:e._u([{key:"default",fn:function(t){var a=t.value;return n("DeclarationTokenGroup",{staticClass:"property-metadata property-type",attrs:{type:e.getValues(a)}})}}])})},ir=[],sr=function(){var e=this,t=e.$createElement,n=e._self._c||t;return e.type&&e.type.length?n("div",[n("code",e._l(e.type,(function(t,a){return n("DeclarationToken",e._b({key:a},"DeclarationToken",t,!1))})),1)]):e._e()},rr=[],or={name:"DeclarationTokenGroup",components:{DeclarationToken:va},props:{type:{type:Array,default:()=>[],required:!1}}},lr=or,cr=Object(R["a"])(lr,sr,rr,!1,null,null,null),ur=cr.exports,dr={name:"PossiblyChangedType",components:{DeclarationTokenGroup:ur,RenderChanged:Ks},props:{type:{type:Array,required:!0},changes:{type:Object,required:!1}},methods:{getValues(e){return Array.isArray(e)?e:e.values}}},hr=dr,pr=(n("2f87"),Object(R["a"])(hr,ar,ir,!1,null,"0a648a1e",null)),fr=pr.exports,gr={name:"PropertyTable",mixins:[ks],components:{Badge:bn,WordBreak:It["a"],PossiblyChangedTextAttribute:nr,PossiblyChangedType:fr,ParameterAttributes:Ys,ContentNode:Bt,OnThisPageSection:Zt,ParametersTable:Ds},props:{title:{type:String,required:!0},properties:{type:Array,required:!0}},computed:{anchor:({title:e})=>Object(vi["a"])(e),propertyChanges:({apiChanges:e})=>(e||{}).properties},methods:{shouldShiftType:({content:e=[],name:t})=>!e.length&&t}},mr=gr,yr=(n("c875"),Object(R["a"])(mr,Cs,Ss,!1,null,"1b54be82",null)),vr=yr.exports,br=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("OnThisPageSection",{attrs:{anchor:e.anchor,title:e.title}},[n("h2",[e._v(e._s(e.title))]),n("ParametersTable",{attrs:{parameters:[e.bodyParam],changes:e.bodyChanges,keyBy:"key"},scopedSlots:e._u([{key:"symbol",fn:function(t){var a=t.type,i=t.content,s=t.changes,r=t.name;return[e.shouldShiftType({name:r,content:i})?e._e():n("PossiblyChangedType",{attrs:{type:a,changes:s.type}})]}},{key:"description",fn:function(t){var a=t.name,i=t.content,s=t.mimeType,r=t.type,o=t.changes;return[e.shouldShiftType({name:a,content:i})?n("PossiblyChangedType",{attrs:{type:r,changes:o.type}}):e._e(),i?n("ContentNode",{attrs:{content:i}}):e._e(),s?n("PossiblyChangedMimetype",{attrs:{mimetype:s,changes:o.mimetype,change:o.change}}):e._e()]}}])}),e.parts.length?[n("h3",[e._v("Parts")]),n("ParametersTable",{staticClass:"parts",attrs:{parameters:e.parts,changes:e.partsChanges},scopedSlots:e._u([{key:"symbol",fn:function(t){var a=t.name,i=t.type,s=t.content,r=t.changes;return[n("div",{staticClass:"part-name"},[n("WordBreak",{attrs:{tag:"code"}},[e._v(e._s(a))])],1),s?n("PossiblyChangedType",{attrs:{type:i,changes:r.type}}):e._e()]}},{key:"description",fn:function(t){var a=t.content,i=t.mimeType,s=t.required,r=t.type,o=t.attributes,l=t.changes,c=t.readOnly;return[n("div",[a?e._e():n("PossiblyChangedType",{attrs:{type:r,changes:l.type}}),n("PossiblyChangedTextAttribute",{attrs:{changes:l.required,value:s}},[e._v("(Required) ")]),n("PossiblyChangedTextAttribute",{attrs:{changes:l.readOnly,value:c}},[e._v("(Read only) ")]),a?n("ContentNode",{attrs:{content:a}}):e._e(),i?n("PossiblyChangedMimetype",{attrs:{mimetype:i,changes:l.mimetype,change:l.change}}):e._e(),n("ParameterAttributes",{attrs:{attributes:o,changes:l.attributes}})],1)]}}],null,!1,1779956822)})]:e._e()],2)},Tr=[],_r=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("RenderChanged",{attrs:{changes:e.changeValues,value:e.mimetype},scopedSlots:e._u([{key:"default",fn:function(t){var a=t.value;return n("div",{staticClass:"response-mimetype"},[e._v("Content-Type: "+e._s(a))])}}])})},Cr=[],Sr={name:"PossiblyChangedMimetype",components:{RenderChanged:Ks},props:{mimetype:{type:String,required:!0},changes:{type:[Object,String],required:!1},change:{type:String,required:!1}},computed:{changeValues({change:e,changes:t}){return e===Ra.modified&&"string"!==typeof t?t:void 0}}},kr=Sr,wr=(n("a91f"),Object(R["a"])(kr,_r,Cr,!1,null,"2faa6020",null)),xr=wr.exports;const Ir="restRequestBody";var Or={name:"RestBody",mixins:[ks],components:{PossiblyChangedMimetype:xr,PossiblyChangedTextAttribute:nr,PossiblyChangedType:fr,WordBreak:It["a"],ParameterAttributes:Ys,ContentNode:Bt,OnThisPageSection:Zt,ParametersTable:Ds},constants:{ChangesKey:Ir},props:{bodyContentType:{type:Array,required:!0},content:{type:Array},mimeType:{type:String,required:!0},parts:{type:Array,default:()=>[]},title:{type:String,required:!0}},computed:{anchor:({title:e})=>Object(vi["a"])(e),bodyParam:({bodyContentType:e,content:t,mimeType:n})=>({key:Ir,content:t,mimeType:n,type:e}),bodyChanges:({apiChanges:e})=>e||{},partsChanges:({bodyChanges:e})=>(e[Ir]||{}).parts},methods:{shouldShiftType:({content:e=[],name:t})=>!e.length&&t}},$r=Or,Dr=(n("7500"),Object(R["a"])($r,br,Tr,!1,null,"1b311f59",null)),Pr=Dr.exports,Ar=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("OnThisPageSection",{attrs:{anchor:e.anchor,title:e.title}},[n("h2",[e._v(e._s(e.title))]),n("ParametersTable",{attrs:{parameters:e.parameters,changes:e.parameterChanges},scopedSlots:e._u([{key:"symbol",fn:function(t){var a=t.name,i=t.type,s=t.content,r=t.changes,o=t.deprecated;return[n("div",{staticClass:"param-name",class:{deprecated:o}},[n("WordBreak",{attrs:{tag:"code"}},[e._v(e._s(a))])],1),e.shouldShiftType({content:s,name:a})?e._e():n("PossiblyChangedType",{attrs:{type:i,changes:r.type}})]}},{key:"description",fn:function(t){var a=t.name,i=t.type,s=t.content,r=t.required,o=t.attributes,l=t.changes,c=t.deprecated,u=t.readOnly;return[n("div",[e.shouldShiftType({content:s,name:a})?n("PossiblyChangedType",{attrs:{type:i,changes:l.type}}):e._e(),c?[n("Badge",{staticClass:"param-deprecated",attrs:{variant:"deprecated"}}),e._v("  ")]:e._e(),n("PossiblyChangedTextAttribute",{attrs:{changes:l.required,value:r}},[e._v("(Required) ")]),n("PossiblyChangedTextAttribute",{attrs:{changes:l.readOnly,value:u}},[e._v("(Read only) ")]),s?n("ContentNode",{attrs:{content:s}}):e._e(),n("ParameterAttributes",{attrs:{attributes:o,changes:l}})],2)]}}])})],1)},jr=[],Lr={name:"RestParameters",mixins:[ks],components:{Badge:bn,PossiblyChangedType:fr,PossiblyChangedTextAttribute:nr,ParameterAttributes:Ys,WordBreak:It["a"],ContentNode:Bt,OnThisPageSection:Zt,ParametersTable:Ds},props:{title:{type:String,required:!0},parameters:{type:Array,required:!0}},computed:{anchor:({title:e})=>Object(vi["a"])(e),parameterChanges:({apiChanges:e})=>(e||{}).restParameters},methods:{shouldShiftType:({content:e=[],name:t})=>!e.length&&t}},Er=Lr,Br=(n("18b3"),Object(R["a"])(Er,Ar,jr,!1,null,"5accae2c",null)),Rr=Br.exports,Nr=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("OnThisPageSection",{attrs:{anchor:e.anchor,title:e.title}},[n("h2",[e._v(e._s(e.title))]),n("ParametersTable",{attrs:{parameters:e.responses,changes:e.propertyChanges,"key-by":"status"},scopedSlots:e._u([{key:"symbol",fn:function(t){var a=t.status,i=t.type,s=t.reason,r=t.content,o=t.changes;return[n("div",{staticClass:"response-name"},[n("code",[e._v(" "+e._s(a)+" "),n("span",{staticClass:"reason"},[e._v(e._s(s))])])]),e.shouldShiftType({content:r,reason:s,status:a})?e._e():n("PossiblyChangedType",{attrs:{type:i,changes:o.type}})]}},{key:"description",fn:function(t){var a=t.content,i=t.mimetype,s=t.reason,r=t.type,o=t.status,l=t.changes;return[e.shouldShiftType({content:a,reason:s,status:o})?n("PossiblyChangedType",{attrs:{type:r,changes:l.type}}):e._e(),n("div",{staticClass:"response-reason"},[n("code",[e._v(e._s(s))])]),a?n("ContentNode",{attrs:{content:a}}):e._e(),i?n("PossiblyChangedMimetype",{attrs:{mimetype:i,changes:l.mimetype,change:l.change}}):e._e()]}}])})],1)},zr=[],Mr={name:"RestResponses",mixins:[ks],components:{PossiblyChangedMimetype:xr,PossiblyChangedType:fr,ContentNode:Bt,OnThisPageSection:Zt,ParametersTable:Ds},props:{title:{type:String,required:!0},responses:{type:Array,required:!0}},computed:{anchor:({title:e})=>Object(vi["a"])(e),propertyChanges:({apiChanges:e})=>(e||{}).restResponses},methods:{shouldShiftType:({content:e=[],reason:t,status:n})=>!(e.length||t)&&n}},Kr=Mr,qr=(n("e335"),Object(R["a"])(Kr,Nr,zr,!1,null,"57796e8c",null)),Fr=qr.exports;const Vr={content:"content",declarations:"declarations",details:"details",parameters:"parameters",possibleValues:"possibleValues",properties:"properties",restBody:"restBody",restCookies:"restCookies",restEndpoint:"restEndpoint",restHeaders:"restHeaders",restParameters:"restParameters",restResponses:"restResponses"};var Hr={name:"PrimaryContent",components:{Declaration:Ji,GenericContent:gs,Parameters:_s,PropertyListKeyDetails:cs,PropertyTable:vr,RestBody:Pr,RestEndpoint:ji,RestParameters:Rr,RestResponses:Fr,PossibleValues:gi},constants:{SectionKind:Vr},props:{conformance:{type:Object,required:!1},sections:{type:Array,required:!0,validator:e=>e.every(({kind:e})=>Object.prototype.hasOwnProperty.call(Vr,e))}},computed:{span(){return{large:9,medium:9,small:12}}},methods:{componentFor(e){return{[Vr.content]:gs,[Vr.declarations]:Ji,[Vr.details]:cs,[Vr.parameters]:_s,[Vr.properties]:vr,[Vr.restBody]:Pr,[Vr.restParameters]:Rr,[Vr.restHeaders]:Rr,[Vr.restCookies]:Rr,[Vr.restEndpoint]:ji,[Vr.restResponses]:Fr,[Vr.possibleValues]:gi}[e.kind]},propsFor(e){const{conformance:t}=this,{bodyContentType:n,content:a,declarations:i,details:s,items:r,kind:o,mimeType:l,parameters:c,title:u,tokens:d,values:h}=e;return{[Vr.content]:{content:a},[Vr.declarations]:{conformance:t,declarations:i},[Vr.details]:{details:s},[Vr.parameters]:{parameters:c},[Vr.possibleValues]:{values:h},[Vr.properties]:{properties:r,title:u},[Vr.restBody]:{bodyContentType:n,content:a,mimeType:l,parts:c,title:u},[Vr.restCookies]:{parameters:r,title:u},[Vr.restEndpoint]:{tokens:d,title:u},[Vr.restHeaders]:{parameters:r,title:u},[Vr.restParameters]:{parameters:r,title:u},[Vr.restResponses]:{responses:r,title:u}}[o]}}},Wr=Hr,Ur=(n("0b15"),Object(R["a"])(Wr,li,ci,!1,null,"0e405a2d",null)),Gr=Ur.exports,Xr=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("ContentTable",{attrs:{anchor:"relationships",title:"Relationships"}},e._l(e.sectionsWithSymbols,(function(e){return n("Section",{key:e.type,attrs:{title:e.title}},[n("List",{attrs:{symbols:e.symbols,type:e.type}})],1)})),1)},Yr=[],Jr=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("ul",{ref:"apiChangesDiff",staticClass:"relationships-list",class:e.classes},e._l(e.symbols,(function(t){return n("li",{key:t.identifier,staticClass:"relationships-item"},[t.url?n("router-link",{staticClass:"link",attrs:{to:e.buildUrl(t.url,e.$route.query)}},[n("WordBreak",{attrs:{tag:"code"}},[e._v(e._s(t.title))])],1):n("WordBreak",{attrs:{tag:"code"}},[e._v(e._s(t.title))]),t.conformance?n("ConditionalConstraints",{attrs:{constraints:t.conformance.constraints,prefix:t.conformance.conformancePrefix}}):e._e()],1)})),0)},Qr=[];const Zr=3,eo={conformsTo:"conformance",inheritsFrom:"inheritance",inheritedBy:"inheritedBy"};var to={name:"RelationshipsList",components:{ConditionalConstraints:Da,WordBreak:It["a"]},inject:["store","identifier"],mixins:[Wa,Ha],props:{symbols:{type:Array,required:!0},type:{type:String,required:!0}},data(){return{state:this.store.state}},computed:{classes({changeType:e,multipleLinesClass:t,hasMultipleLinesAfterAPIChanges:n}){return[{inline:this.shouldDisplayInline,column:!this.shouldDisplayInline,["changed changed-"+e]:!!e,[t]:n}]},hasAvailabilityConstraints(){return this.symbols.some(e=>!!(e.conformance||{}).constraints)},changes({identifier:e,state:{apiChanges:t}}){return(t||{})[e]||{}},changeType({changes:e,type:t}){const n=eo[t];if(e.change!==Ra.modified)return e.change;const a=e[n];if(!a)return;const i=(e,t)=>e.map((e,n)=>[e,t[n]]),s=i(a.previous,a.new).some(([e,t])=>e.content?0===e.content.length&&t.content.length>0:!!t.content);return s?Ra.added:Ra.modified},shouldDisplayInline(){const{hasAvailabilityConstraints:e,symbols:t}=this;return t.length<=Zr&&!e}},methods:{buildUrl:q["b"]}},no=to,ao=(n("4281"),Object(R["a"])(no,Jr,Qr,!1,null,"6497632e",null)),io=ao.exports,so={name:"Relationships",inject:{references:{default(){return{}}}},components:{ContentTable:an,List:io,Section:un},props:{sections:{type:Array,required:!0}},computed:{sectionsWithSymbols(){return this.sections.map(e=>({...e,symbols:e.identifiers.reduce((e,t)=>this.references[t]?e.concat(this.references[t]):e,[])}))}}},ro=so,oo=Object(R["a"])(ro,Xr,Yr,!1,null,null,null),lo=oo.exports,co=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("Section",{staticClass:"availability",attrs:{role:"complementary","aria-label":"Availability"}},[e._l(e.technologies,(function(t){return n("Badge",{key:t,staticClass:"technology"},[n("TechnologyIcon",{staticClass:"tech-icon"}),e._v(" "+e._s(t)+" ")],1)})),e._l(e.platforms,(function(t){return n("Badge",{key:t.name,staticClass:"platform",class:e.changesClassesFor(t.name)},[n("AvailabilityRange",{attrs:{deprecatedAt:t.deprecatedAt,introducedAt:t.introducedAt,platformName:t.name}}),t.deprecatedAt?n("span",{staticClass:"deprecated"},[e._v("Deprecated")]):t.beta?n("span",{staticClass:"beta"},[e._v("Beta")]):e._e()],1)}))],2)},uo=[],ho=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("span",{attrs:{role:"text","aria-label":e.ariaLabel,title:e.description}},[e._v(" "+e._s(e.text)+" ")])},po=[],fo={name:"AvailabilityRange",props:{deprecatedAt:{type:String,required:!1},introducedAt:{type:String,required:!0},platformName:{type:String,required:!0}},computed:{ariaLabel(){const{deprecatedAt:e,description:t,text:n}=this;return[n].concat(e?"Deprecated":[]).concat(t).join(", ")},description(){const{deprecatedAt:e,introducedAt:t,platformName:n}=this;return e?`Introduced in ${n} ${t} and deprecated in ${n} ${e}`:`Available on ${n} ${t} and later`},text(){const{deprecatedAt:e,introducedAt:t,platformName:n}=this;return e?`${n} ${t}–${e}`:`${n} ${t}+`}}},go=fo,mo=Object(R["a"])(go,ho,po,!1,null,null,null),yo=mo.exports,vo={name:"Availability",mixins:[Wa],inject:["identifier","store"],components:{Badge:bn,AvailabilityRange:yo,Section:ee,TechnologyIcon:Ie},props:{platforms:{type:Array,required:!0},technologies:{type:Array,required:!1}},data(){return{state:this.store.state}},methods:{changeFor(e){const{identifier:t,state:{apiChanges:n}}=this,{availability:a={}}=(n||{})[t]||{},i=a[e];if(i)return i.deprecated?Ra.deprecated:i.introduced&&!i.introduced.previous?Ra.added:Ra.modified}}},bo=vo,To=(n("c459"),Object(R["a"])(bo,co,uo,!1,null,"4df209be",null)),_o=To.exports,Co=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("TopicsTable",{attrs:{anchor:"see-also",title:"See Also",isSymbolDeprecated:e.isSymbolDeprecated,isSymbolBeta:e.isSymbolBeta,sections:e.sections}})},So=[],ko={name:"SeeAlso",components:{TopicsTable:ai},props:{isSymbolDeprecated:Boolean,isSymbolBeta:Boolean,sections:ai.props.sections}},wo=ko,xo=Object(R["a"])(wo,Co,So,!1,null,null,null),Io=xo.exports,Oo=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"topictitle"},[e.eyebrow?n("span",{staticClass:"eyebrow"},[e._v(e._s(e.eyebrow))]):e._e(),n("h1",{staticClass:"title"},[e._t("default"),e._t("after")],2)])},$o=[],Do={name:"Title",props:{eyebrow:{type:String,required:!1}}},Po=Do,Ao=(n("6b62"),Object(R["a"])(Po,Oo,$o,!1,null,"2e777455",null)),jo=Ao.exports,Lo=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("TopicsTable",{attrs:{anchor:"topics",title:"Topics",isSymbolDeprecated:e.isSymbolDeprecated,isSymbolBeta:e.isSymbolBeta,sections:e.sections}})},Eo=[],Bo={name:"Topics",components:{TopicsTable:ai},props:{isSymbolDeprecated:Boolean,isSymbolBeta:Boolean,sections:ai.props.sections}},Ro=Bo,No=Object(R["a"])(Ro,Lo,Eo,!1,null,null,null),zo=No.exports,Mo={name:"DocumentationTopic",mixins:[$["a"]],inject:{isTargetIDE:{default(){return!1}},store:{default(){return{reset(){},state:{onThisPageSections:[]}}}}},components:{DocumentationHero:xt,Abstract:Mt,Aside:D["a"],BetaLegalText:z,ContentNode:Bt,DefaultImplementations:oi,DownloadButton:Kt["a"],LanguageSwitcher:ue,PrimaryContent:Gr,Relationships:lo,RequirementMetadata:Ba,Availability:_o,SeeAlso:Io,Title:jo,Topics:zo,WordBreak:It["a"]},props:{abstract:{type:Array,required:!1},conformance:{type:Object,required:!1},defaultImplementationsSections:{type:Array,required:!1},downloadNotAvailableSummary:{type:Array,required:!1},deprecationSummary:{type:Array,required:!1},diffAvailability:{type:Object,required:!1},modules:{type:Array,required:!1},hierarchy:{type:Object,default:()=>({})},interfaceLanguage:{type:String,required:!0},identifier:{type:String,required:!0},isRequirement:{type:Boolean,default:()=>!1},platforms:{type:Array,required:!1},primaryContentSections:{type:Array,required:!1},references:{type:Object,required:!0},relationshipsSections:{type:Array,required:!1},roleHeading:{type:String,required:!1},title:{type:String,required:!0},topicSections:{type:Array,required:!1},sampleCodeDownload:{type:Object,required:!1},seeAlsoSections:{type:Array,required:!1},languagePaths:{type:Object,default:()=>({})},tags:{type:Array,required:!0},objcPath:{type:String,required:!1},swiftPath:{type:String,required:!1},isSymbolDeprecated:{type:Boolean,required:!1},isSymbolBeta:{type:Boolean,required:!1},symbolKind:{type:String,default:""},role:{type:String,default:""}},provide(){return{references:this.references,identifier:this.identifier,languages:new Set(Object.keys(this.languagePaths)),interfaceLanguage:this.interfaceLanguage,symbolKind:this.symbolKind}},data(){return{topicState:this.store.state}},computed:{defaultImplementationsCount(){return(this.defaultImplementationsSections||[]).reduce((e,t)=>e+t.identifiers.length,0)},onThisPageSections(){return this.topicState.onThisPageSections},hasAvailability:({platforms:e,technologies:t})=>(e||[]).length||(t||[]).length,hasBetaContent:({platforms:e})=>e&&e.length&&e.some(e=>e.beta),pageTitle:({title:e})=>e,pageDescription:({abstract:e,extractFirstParagraphText:t})=>e?t(e):null,shouldShowLanguageSwitcher:({objcPath:e,swiftPath:t,isTargetIDE:n})=>!!(e&&t&&n),enhanceBackground:({symbolKind:e})=>!e||"module"===e,shortHero:({roleHeading:e,abstract:t,sampleCodeDownload:n,hasAvailability:a,shouldShowLanguageSwitcher:i})=>!!e+!!t+!!n+!!a+i<=1,technologies({modules:e=[]}){const t=e.reduce((e,t)=>(e.push(t.name),e.concat(t.relatedModules||[])),[]);return t.length>1?t:[]},titleBreakComponent:({enhanceBackground:e})=>e?"span":It["a"],showContainer:({isRequirement:e,deprecationSummary:t,downloadNotAvailableSummary:n,primaryContentSections:a})=>e||t&&t.length||n&&n.length||a&&a.length,tagName:({isSymbolDeprecated:e})=>e?"Deprecated":"Beta"},methods:{normalizePath(e){return e.startsWith("/")?e:"/"+e}},created(){if(this.topicState.preferredLanguage===O["a"].objectiveC.key.url&&this.interfaceLanguage!==O["a"].objectiveC.key.api&&this.objcPath&&this.$route.query.language!==O["a"].objectiveC.key.url){const{query:e}=this.$route;this.$nextTick().then(()=>{this.$router.replace({path:this.normalizePath(this.objcPath),query:{...e,language:O["a"].objectiveC.key.url}})})}this.store.reset()}},Ko=Mo,qo=(n("be2a"),Object(R["a"])(Ko,x,I,!1,null,"a877f03c",null)),Fo=qo.exports,Vo=n("2b0e");const Ho=()=>({[Ra.modified]:0,[Ra.added]:0,[Ra.deprecated]:0});var Wo={state:{apiChanges:null,apiChangesCounts:Ho(),selectedAPIChangesVersion:null},setAPIChanges(e){this.state.apiChanges=e},setSelectedAPIChangesVersion(e){this.state.selectedAPIChangesVersion=e},resetApiChanges(){this.state.apiChanges=null,this.state.apiChangesCounts=Ho()},async updateApiChangesCounts(){await Vo["default"].nextTick(),Object.keys(this.state.apiChangesCounts).forEach(e=>{this.state.apiChangesCounts[e]=this.countChangeType(e)})},countChangeType(e){if(document&&document.querySelectorAll){const t=`.changed-${e}:not(.changed-total)`;return document.querySelectorAll(t).length}return 0}},Uo=n("d369");const{state:Go,...Xo}=Wo;var Yo,Jo,Qo={state:{onThisPageSections:[],preferredLanguage:Uo["a"].preferredLanguage,...Go},reset(){this.state.onThisPageSections=[],this.state.preferredLanguage=Uo["a"].preferredLanguage,this.resetApiChanges()},addOnThisPageSection(e){this.state.onThisPageSections.push(e)},setPreferredLanguage(e){this.state.preferredLanguage=e,Uo["a"].preferredLanguage=this.state.preferredLanguage},...Xo},Zo=n("8590"),el=n("66c9"),tl=n("bb52"),nl=n("146e"),al={name:"NavigatorDataProvider",props:{interfaceLanguage:{type:String,default:O["a"].swift.key.url},technology:{type:Object,required:!0},apiChangesVersion:{type:String,default:""}},data(){return{isFetching:!1,errorFetching:!1,isFetchingAPIChanges:!1,navigationIndex:{[O["a"].swift.key.url]:[]},diffs:null}},computed:{technologyPath:({technology:e})=>{const t=/(\/documentation\/(?:[^/]+))\/?/.exec(e.url);return t?t[1]:""},technologyWithChildren({navigationIndex:e,interfaceLanguage:t,technologyPath:n}){let a=e[t]||[];return a.length||(a=e[O["a"].swift.key.url]||[]),a.find(e=>n.toLowerCase()===e.path.toLowerCase())}},created(){this.fetchIndexData()},methods:{async fetchIndexData(){try{this.isFetching=!0;const{interfaceLanguages:e}=await Object(w["c"])();this.navigationIndex=Object.freeze(e)}catch(e){this.errorFetching=!0}finally{this.isFetching=!1}}},render(){return this.$scopedSlots.default({technology:this.technologyWithChildren,isFetching:this.isFetching,errorFetching:this.errorFetching,isFetchingAPIChanges:this.isFetchingAPIChanges,apiChanges:this.diffs})}},il=al,sl=Object(R["a"])(il,Yo,Jo,!1,null,null,null),rl=sl.exports,ol=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"adjustable-sidebar-width"},[n("div",{ref:"sidebar",staticClass:"sidebar"},[n("div",{ref:"aside",staticClass:"aside",class:e.asideClasses,style:e.asideStyles,on:{transitionstart:function(t){e.isTransitioning=!0},transitionend:function(t){e.isTransitioning=!1}}},[e._t("aside",null,{animationClass:"aside-animated-child",scrollLockID:e.scrollLockID,breakpoint:e.breakpoint})],2),n("div",{staticClass:"resize-handle",on:{mousedown:function(t){return t.preventDefault(),e.startDrag.apply(null,arguments)},touchstart:function(t){return t.preventDefault(),e.startDrag.apply(null,arguments)}}})]),n("div",{staticClass:"content"},[e._t("default")],2),n("BreakpointEmitter",{attrs:{scope:e.BreakpointScopes.nav},on:{change:function(t){e.breakpoint=t}}})],1)},ll=[],cl=n("5d2d");function ul(e,t,n,a){let i,s;return function(...r){function o(){clearTimeout(i),i=null}function l(){o(),e.apply(s,r)}if(s=this,!i||!n&&!a){if(!n)return o(),void(i=setTimeout(l,t));i=setTimeout(o,t),e.apply(s,r)}}}var dl=n("a97e"),hl=n("63b8"),pl=n("3908"),fl=n("f2af"),gl=n("c8e2"),ml=n("95da");function yl(e,t){let n,a;return function(...i){const s=this;if(!a)return e.apply(s,i),void(a=Date.now());clearTimeout(n),n=setTimeout(()=>{Date.now()-a>=t&&(e.apply(s,i),a=Date.now())},t-(Date.now()-a))}}var vl=n("942d");const bl="sidebar",Tl=1920,_l=543,Cl={touch:{move:"touchmove",end:"touchend"},mouse:{move:"mousemove",end:"mouseup"}},Sl=(e,t=window.innerWidth)=>{const n=Math.min(t,Tl);return Math.floor(Math.min(n*(e/100),n))},kl={medium:30,large:20},wl={medium:50,large:50},xl="sidebar-scroll-lock";var Il={name:"AdjustableSidebarWidth",constants:{SCROLL_LOCK_ID:xl},components:{BreakpointEmitter:dl["a"]},props:{openExternally:{type:Boolean,default:!1}},data(){const e=window.innerWidth,t=window.innerHeight,n=hl["b"].large,a=Sl(kl[n]),i=Sl(wl[n]),s=e>=Tl?_l:Math.round((a+i)/2),r=cl["c"].get(bl,s);return{isDragging:!1,width:Math.min(Math.max(r,a),i),isTouch:!1,windowWidth:e,windowHeight:t,breakpoint:n,noTransition:!1,isTransitioning:!1,focusTrapInstance:null,mobileTopOffset:0,topOffset:0}},computed:{minWidthPercent:({breakpoint:e})=>kl[e]||0,maxWidthPercent:({breakpoint:e})=>wl[e]||100,maxWidth:({maxWidthPercent:e,windowWidth:t})=>Sl(e,t),minWidth:({minWidthPercent:e,windowWidth:t})=>Sl(e,t),widthInPx:({width:e})=>e+"px",events:({isTouch:e})=>e?Cl.touch:Cl.mouse,asideStyles:({widthInPx:e,mobileTopOffset:t,topOffset:n,windowHeight:a})=>({width:e,"--top-offset":n?n+"px":null,"--top-offset-mobile":t+"px","--app-height":a+"px"}),asideClasses:({isDragging:e,openExternally:t,noTransition:n,isTransitioning:a,mobileTopOffset:i})=>({dragging:e,"force-open":t,"no-transition":n,animating:a,"has-mobile-top-offset":i}),scrollLockID:()=>xl,BreakpointScopes:()=>hl["c"]},async mounted(){window.addEventListener("keydown",this.onEscapeKeydown),window.addEventListener("resize",this.storeWindowSize,{passive:!0}),window.addEventListener("orientationchange",this.storeWindowSize,{passive:!0}),this.storeTopOffset(),0===this.topOffset&&0===window.scrollY||window.addEventListener("scroll",this.storeTopOffset,{passive:!0}),this.$once("hook:beforeDestroy",()=>{window.removeEventListener("keydown",this.onEscapeKeydown),window.removeEventListener("resize",this.storeWindowSize),window.removeEventListener("orientationchange",this.storeWindowSize),window.removeEventListener("scroll",this.storeTopOffset),this.openExternally&&this.toggleScrollLock(!1),this.focusTrapInstance&&this.focusTrapInstance.destroy()}),await this.$nextTick(),this.focusTrapInstance=new gl["a"](this.$refs.aside)},watch:{$route:"closeMobileSidebar",width:{immediate:!0,handler:ul((function(e){this.emitEventChange(e)}),250,!0,!0)},windowWidth:"getWidthInCheck",async breakpoint(e){this.getWidthInCheck(),e===hl["b"].large&&this.closeMobileSidebar(),this.noTransition=!0,await Object(pl["b"])(5),this.noTransition=!1},openExternally:"handleExternalOpen"},methods:{getWidthInCheck:ul((function(){this.width>this.maxWidth?this.width=this.maxWidth:this.widththis.maxWidth&&(a=this.maxWidth),this.width=Math.max(a,this.minWidth)},stopDrag(e){e.preventDefault(),this.isDragging&&(this.isDragging=!1,cl["c"].set(bl,this.width),document.removeEventListener(this.events.move,this.handleDrag),document.removeEventListener(this.events.end,this.stopDrag),this.emitEventChange(this.width))},emitEventChange(e){this.$emit("width-change",e)},getTopOffset(){const e=document.getElementById(vl["d"]);if(!e)return 0;const{y:t}=e.getBoundingClientRect();return Math.max(t,0)},handleExternalOpen(e){e&&(this.mobileTopOffset=this.getTopOffset()),this.toggleScrollLock(e)},async toggleScrollLock(e){const t=document.getElementById(this.scrollLockID);e?(await this.$nextTick(),fl["a"].lockScroll(t),this.focusTrapInstance.start(),ml["a"].hide(this.$refs.aside)):(fl["a"].unlockScroll(t),this.focusTrapInstance.stop(),ml["a"].show(this.$refs.aside))},storeTopOffset:yl((function(){this.topOffset=this.getTopOffset()}),60)}},Ol=Il,$l=(n("3099"),Object(R["a"])(Ol,ol,ll,!1,null,"453b0e76",null)),Dl=$l.exports,Pl=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("nav",{staticClass:"navigator",attrs:{"aria-labelledby":e.INDEX_ROOT_KEY}},[e.isFetching?n("NavigatorCardInner",{staticClass:"loading-placeholder"},[n("transition",{attrs:{name:"delay-visibility",appear:""}},[n("SpinnerIcon",{staticClass:"loading-spinner"})],1)],1):n("NavigatorCard",{attrs:{technology:e.technology.title,"is-technology-beta":e.technology.beta,"technology-path":e.technology.path||e.technology.url,type:e.type,children:e.flatChildren,"active-path":e.activePath,scrollLockID:e.scrollLockID,"error-fetching":e.errorFetching,breakpoint:e.breakpoint,"api-changes":e.apiChanges},on:{close:function(t){return e.$emit("close")}}}),n("div",{staticClass:"visuallyhidden",attrs:{"aria-live":"polite"}},[e._v(" Navigator is "+e._s(e.isFetching?"loading":"ready")+" ")])],1)},Al=[],jl=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"navigator-card"},[n("div",{staticClass:"navigator-card-full-height"},[n("NavigatorCardInner",[n("div",{staticClass:"head-wrapper"},[n("button",{staticClass:"close-card-mobile",attrs:{"aria-label":"Close documentation navigator"},on:{click:function(t){return e.$emit("close")}}},[n("SidenavIcon",{staticClass:"icon-inline close-icon"})],1),n("Reference",{staticClass:"navigator-head",attrs:{url:e.technologyPath,id:e.INDEX_ROOT_KEY}},[n("h2",{staticClass:"card-link"},[e._v(" "+e._s(e.technology)+" ")]),e.isTechnologyBeta?n("Badge",{attrs:{variant:"beta"}}):e._e()],1)],1),e._t("post-head"),n("div",{staticClass:"card-body",on:{"!keydown":[function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"up",38,t.key,["Up","ArrowUp"])?null:t.altKey?(t.preventDefault(),e.focusFirst.apply(null,arguments)):null},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"down",40,t.key,["Down","ArrowDown"])?null:t.altKey?(t.preventDefault(),e.focusLast.apply(null,arguments)):null},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"up",38,t.key,["Up","ArrowUp"])||t.ctrlKey||t.shiftKey||t.altKey||t.metaKey?null:(t.preventDefault(),e.focusPrev.apply(null,arguments))},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"down",40,t.key,["Down","ArrowDown"])||t.ctrlKey||t.shiftKey||t.altKey||t.metaKey?null:(t.preventDefault(),e.focusNext.apply(null,arguments))}]}},[n("RecycleScroller",{directives:[{name:"show",rawName:"v-show",value:e.hasNodes,expression:"hasNodes"}],ref:"scroller",staticClass:"scroller",attrs:{id:e.scrollLockID,"aria-label":"Documentation Navigator",items:e.nodesToRender,"item-size":e.itemSize,buffer:1e3,"emit-update":"","key-field":"uid"},on:{update:e.handleScrollerUpdate},nativeOn:{focusin:function(t){return e.handleFocusIn.apply(null,arguments)},focusout:function(t){return e.handleFocusOut.apply(null,arguments)}},scopedSlots:e._u([{key:"default",fn:function(t){var a=t.item,i=t.active,s=t.index;return[n("NavigatorCardItem",{attrs:{item:a,isRendered:i,"filter-pattern":e.filterPattern,"is-active":a.uid===e.activeUID,"is-bold":e.activePathMap[a.uid],expanded:e.openNodes[a.uid],"api-change":e.apiChangesObject[a.path],isFocused:e.focusedIndex===s,enableFocus:!e.externalFocusChange},on:{toggle:e.toggle,"toggle-full":e.toggleFullTree,"toggle-siblings":e.toggleSiblings,navigate:e.handleNavigationChange,"focus-parent":e.focusNodeParent}})]}}])}),n("div",{staticClass:"visuallyhidden",attrs:{"aria-live":"polite"}},[e._v(" "+e._s(e.politeAriaLive)+" ")]),n("div",{staticClass:"no-items-wrapper",attrs:{"aria-live":"assertive"}},[e._v(" "+e._s(e.assertiveAriaLive)+" ")])],1)],2)],1),e.errorFetching?e._e():n("div",{staticClass:"filter-wrapper"},[n("div",{staticClass:"navigator-filter"},[n("div",{staticClass:"input-wrapper"},[n("FilterInput",{staticClass:"filter-component",attrs:{tags:e.availableTags,"selected-tags":e.selectedTagsModelValue,placeholder:"Filter","should-keep-open-on-blur":!1,"position-reversed":e.isLargeBreakpoint,"clear-filter-on-tag-select":!1},on:{"update:selectedTags":function(t){e.selectedTagsModelValue=t},"update:selected-tags":function(t){e.selectedTagsModelValue=t},clear:e.clearFilters},model:{value:e.filter,callback:function(t){e.filter=t},expression:"filter"}})],1)])])])},Ll=[],El=n("e508");const Bl="",Rl=32;function Nl(e){const t=Object(vi["h"])(Object(vi["d"])(e));return new RegExp(t,"ig")}var zl,Ml,Kl=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"navigator-card-inner"},[e._t("default")],2)},ql=[],Fl={name:"NavigatorCardInner"},Vl=Fl,Hl=(n("e6b8"),Object(R["a"])(Vl,Kl,ql,!1,null,"7a09780d",null)),Wl=Hl.exports,Ul=function(){var e,t=this,n=t.$createElement,a=t._self._c||n;return a("div",{staticClass:"navigator-card-item",class:{expanded:t.expanded},style:{"--nesting-index":t.item.depth},attrs:{id:"container-"+t.item.uid,"aria-hidden":t.isRendered?null:"true"},on:{keydown:[function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"left",37,e.key,["Left","ArrowLeft"])||"button"in e&&0!==e.button?null:(e.preventDefault(),t.handleLeftKeydown.apply(null,arguments))},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"right",39,e.key,["Right","ArrowRight"])||"button"in e&&2!==e.button||e.ctrlKey||e.shiftKey||e.altKey||e.metaKey?null:(e.preventDefault(),t.handleRightKeydown.apply(null,arguments))},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:(e.preventDefault(),t.clickReference.apply(null,arguments))},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"right",39,e.key,["Right","ArrowRight"])?null:e.altKey?"button"in e&&2!==e.button?null:(e.preventDefault(),t.toggleEntireTree.apply(null,arguments)):null}]}},[a("div",{staticClass:"head-wrapper",class:{active:t.isActive,"is-group":t.isGroupMarker}},[a("span",{attrs:{hidden:"",id:t.usageLabel}},[t._v(" To navigate the symbols, press Up Arrow, Down Arrow, Left Arrow or Right Arrow ")]),a("div",{staticClass:"depth-spacer"},[t.isParent?a("button",{staticClass:"tree-toggle",attrs:{tabindex:"-1","aria-labelledby":t.item.uid,"aria-expanded":t.expanded?"true":"false","aria-describedby":t.ariaDescribedBy},on:{click:[function(e){return e.ctrlKey||e.shiftKey||e.altKey||e.metaKey?null:(e.preventDefault(),t.toggleTree.apply(null,arguments))},function(e){return e.altKey?(e.preventDefault(),t.toggleEntireTree.apply(null,arguments)):null},function(e){return e.metaKey?(e.preventDefault(),t.toggleSiblings.apply(null,arguments)):null}]}},[a("InlineChevronRightIcon",{staticClass:"icon-inline chevron",class:{rotate:t.expanded,animating:t.idState.isOpening}})],1):t._e()]),t.isGroupMarker||t.apiChange?t.apiChange?a("span",{staticClass:"navigator-icon",class:(e={},e["changed changed-"+t.apiChange]=t.apiChange,e)}):t._e():a("NavigatorLeafIcon",{staticClass:"navigator-icon",attrs:{type:t.item.type}}),a("div",{staticClass:"title-container"},[t.isParent?a("span",{attrs:{hidden:"",id:t.parentLabel}},[t._v(", containing "+t._s(t.item.childUIDs.length)+" symbols")]):t._e(),a("span",{attrs:{id:t.siblingsLabel,hidden:""}},[t._v(" "+t._s(t.item.index+1)+" of "+t._s(t.item.siblingsCount)+" symbols inside ")]),a(t.refComponent,{ref:"reference",tag:"component",staticClass:"leaf-link",class:{bolded:t.isBold},attrs:{id:t.item.uid,url:t.isGroupMarker?null:t.item.path||"",tabindex:t.isFocused?"0":"-1","aria-describedby":t.ariaDescribedBy+" "+t.usageLabel},nativeOn:{click:[function(e){return e.ctrlKey||e.shiftKey||e.altKey||e.metaKey?null:t.handleClick.apply(null,arguments)},function(e){return e.altKey?(e.preventDefault(),t.toggleEntireTree.apply(null,arguments)):null}]}},[a("HighlightMatches",{attrs:{text:t.item.title,matcher:t.filterPattern}})],1),t.isDeprecated?a("Badge",{attrs:{variant:"deprecated"}}):t.isBeta?a("Badge",{attrs:{variant:"beta"}}):t._e()],1)],1)])},Gl=[],Xl=n("34b0"),Yl={name:"HighlightMatch",props:{text:{type:String,required:!0},matcher:{type:RegExp,default:void 0}},render(e){const{matcher:t,text:n}=this;if(!t)return e("p",{class:"highlight"},n);const a=[];let i=0,s=null;const r=new RegExp(t,"gi");while(null!==(s=r.exec(n))){const t=s[0].length,r=s.index+t,o=n.slice(i,s.index);o&&a.push(e("span",o));const l=n.slice(s.index,r);l&&a.push(e("span",{class:"match"},l)),i=r}const o=n.slice(i,n.length);return o&&a.push(e("span",o)),e("p",{class:"highlight"},a)}},Jl=Yl,Ql=(n("b831"),Object(R["a"])(Jl,zl,Ml,!1,null,"d75876e2",null)),Zl=Ql.exports,ec={name:"NavigatorCardItem",mixins:[Object(El["a"])({idProp:e=>e.item.uid})],components:{HighlightMatches:Zl,NavigatorLeafIcon:Ct,InlineChevronRightIcon:Xl["a"],Reference:oa["a"],Badge:bn},props:{isRendered:{type:Boolean,default:!1},item:{type:Object,required:!0},expanded:{type:Boolean,default:!1},filterPattern:{type:RegExp,default:void 0},isActive:{type:Boolean,default:!1},isBold:{type:Boolean,default:!1},apiChange:{type:String,default:null,validator:e=>Na.includes(e)},isFocused:{type:Boolean,default:()=>!1},enableFocus:{type:Boolean,default:!0}},idState(){return{isOpening:!1}},computed:{isGroupMarker:({item:{type:e}})=>e===pt.groupMarker,isParent:({item:e})=>!!e.childUIDs.length,parentLabel:({item:e})=>"label-parent-"+e.uid,siblingsLabel:({item:e})=>"label-"+e.uid,usageLabel:({item:e})=>"usage-"+e.uid,ariaDescribedBy({item:e,siblingsLabel:t,parentLabel:n,isParent:a}){const i=`${t} ${e.parent}`;return a?`${i} ${n}`:""+i},isBeta:({item:{beta:e}})=>!!e,isDeprecated:({item:{deprecated:e}})=>!!e,refComponent:({isGroupMarker:e})=>e?"h3":oa["a"]},methods:{toggleTree(){this.idState.isOpening=!0,this.$emit("toggle",this.item)},toggleEntireTree(){this.idState.isOpening=!0,this.$emit("toggle-full",this.item)},toggleSiblings(){this.idState.isOpening=!0,this.$emit("toggle-siblings",this.item)},handleLeftKeydown(){this.expanded?this.toggleTree():this.$emit("focus-parent",this.item)},handleRightKeydown(){!this.expanded&&this.isParent&&this.toggleTree()},clickReference(){(this.$refs.reference.$el||this.$refs.reference).click()},focusReference(){(this.$refs.reference.$el||this.$refs.reference).focus()},handleClick(){this.isGroupMarker||this.$emit("navigate",this.item.uid)}},watch:{async isFocused(e){await Object(pl["b"])(8),e&&this.isRendered&&this.enableFocus&&this.focusReference()},async expanded(){await Object(pl["b"])(9),this.idState.isOpening=!1}}},tc=ec,nc=(n("9d1f"),Object(R["a"])(tc,Ul,Gl,!1,null,"6fb0778e",null)),ac=nc.exports,ic=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("SVGIcon",{staticClass:"sidenav-icon",attrs:{viewBox:"0 0 14 14",height:"14"}},[n("path",{attrs:{d:"M6.533 1.867h-6.533v10.267h14v-10.267zM0.933 11.2v-8.4h4.667v8.4zM13.067 11.2h-6.533v-8.4h6.533z"}}),n("path",{attrs:{d:"M1.867 5.133h2.8v0.933h-2.8z"}}),n("path",{attrs:{d:"M1.867 7.933h2.8v0.933h-2.8z"}})])},sc=[],rc={name:"SidenavIcon",components:{SVGIcon:ye["a"]}},oc=rc,lc=Object(R["a"])(oc,ic,sc,!1,null,null,null),cc=lc.exports,uc=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"filter",class:{focus:e.showSuggestedTags},attrs:{role:"search",tabindex:"0","aria-labelledby":e.searchAriaLabelledBy},on:{"!blur":function(t){return e.handleBlur.apply(null,arguments)},"!focus":function(t){e.showSuggestedTags=!0}}},[n("div",{class:["filter__wrapper",{"filter__wrapper--reversed":e.positionReversed}]},[n("div",{staticClass:"filter__top-wrapper"},[n("button",{staticClass:"filter__filter-button",class:{blue:e.inputIsNotEmpty},attrs:{"aria-hidden":"true",tabindex:"-1"},on:{click:e.focusInput,mousedown:function(e){e.preventDefault()}}},[e._t("icon",(function(){return[n("FilterIcon")]}))],2),n("div",{class:["filter__input-box-wrapper",{scrolling:e.isScrolling}],on:{scroll:e.handleScroll}},[e.hasSelectedTags?n("TagList",e._g(e._b({ref:"selectedTags",staticClass:"filter__selected-tags",attrs:{id:e.SelectedTagsId,input:e.input,tags:e.selectedTags,ariaLabel:e.selectedTagsLabel,activeTags:e.activeTags,areTagsRemovable:""},on:{"focus-prev":e.handleFocusPrevOnSelectedTags,"focus-next":e.focusInputFromTags,"reset-filters":e.resetFilters,"prevent-blur":function(t){return e.$emit("update:preventedBlur",!0)}}},"TagList",e.virtualKeyboardBind,!1),e.selectedTagsMultipleSelectionListeners)):e._e(),n("label",{staticClass:"filter__input-label",attrs:{id:"filter-label",for:e.FilterInputId,"data-value":e.modelValue,"aria-label":e.placeholder}},[n("input",e._g(e._b({directives:[{name:"model",rawName:"v-model",value:e.modelValue,expression:"modelValue"}],ref:"input",staticClass:"filter__input",attrs:{id:e.FilterInputId,placeholder:e.hasSelectedTags?"":e.placeholder,"aria-expanded":e.displaySuggestedTags?"true":"false",disabled:e.disabled,type:"text"},domProps:{value:e.modelValue},on:{keydown:[function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"down",40,t.key,["Down","ArrowDown"])?null:(t.preventDefault(),e.downHandler.apply(null,arguments))},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"up",38,t.key,["Up","ArrowUp"])?null:(t.preventDefault(),e.upHandler.apply(null,arguments))},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"left",37,t.key,["Left","ArrowLeft"])||"button"in t&&0!==t.button?null:e.leftKeyInputHandler.apply(null,arguments)},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"right",39,t.key,["Right","ArrowRight"])||"button"in t&&2!==t.button?null:e.rightKeyInputHandler.apply(null,arguments)},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"delete",[8,46],t.key,["Backspace","Delete","Del"])?null:e.deleteHandler.apply(null,arguments)},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"a",void 0,t.key,void 0)?null:t.metaKey?(t.preventDefault(),e.selectInputAndTags.apply(null,arguments)):null},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"a",void 0,t.key,void 0)?null:t.ctrlKey?(t.preventDefault(),e.selectInputAndTags.apply(null,arguments)):null},function(t){return t.ctrlKey||t.shiftKey||t.altKey||t.metaKey?null:e.inputKeydownHandler.apply(null,arguments)},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")||t.ctrlKey||t.shiftKey||t.altKey||t.metaKey?null:e.enterHandler.apply(null,arguments)},function(t){return t.shiftKey?t.ctrlKey||t.altKey||t.metaKey?null:e.inputKeydownHandler.apply(null,arguments):null},function(t){return t.shiftKey&&t.metaKey?t.ctrlKey||t.altKey?null:e.inputKeydownHandler.apply(null,arguments):null},function(t){return t.metaKey?t.ctrlKey||t.shiftKey||t.altKey?null:e.assignEventValues.apply(null,arguments):null},function(t){return t.ctrlKey?t.shiftKey||t.altKey||t.metaKey?null:e.assignEventValues.apply(null,arguments):null}],input:function(t){t.target.composing||(e.modelValue=t.target.value)}}},"input",e.AXinputProperties,!1),e.inputMultipleSelectionListeners))])],1),n("div",{staticClass:"filter__delete-button-wrapper"},[e.input.length||e.displaySuggestedTags||e.hasSelectedTags?n("button",{staticClass:"filter__delete-button",attrs:{"aria-label":"Reset Filter"},on:{click:function(t){return e.resetFilters(!0)},mousedown:function(e){e.preventDefault()}}},[n("ClearRoundedIcon")],1):e._e()])]),e.displaySuggestedTags?n("TagList",e._b({ref:"suggestedTags",staticClass:"filter__suggested-tags",attrs:{id:e.SuggestedTagsId,ariaLabel:e.suggestedTagsLabel,input:e.input,tags:e.suggestedTags},on:{"click-tags":function(t){return e.selectTag(t.tagName)},"prevent-blur":function(t){return e.$emit("update:preventedBlur",!0)},"focus-next":function(t){e.positionReversed?e.focusInput():e.$emit("focus-next")},"focus-prev":function(t){e.positionReversed?e.$emit("focus-prev"):e.focusInput()}}},"TagList",e.virtualKeyboardBind,!1)):e._e()],1)])},dc=[],hc=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("SVGIcon",{staticClass:"clear-rounded-icon",attrs:{viewBox:"0 0 16 16"}},[n("title",[e._v("Clear")]),n("path",{attrs:{d:"M9.864,3.5l.636.636L7.632,7l2.862,2.861-.636.636L7,7.639,4.142,10.494l-.636-.636L6.36,7,3.5,4.142l.636-.636L7,6.367Z","fill-rule":"evenodd"}})])},pc=[],fc={name:"ClearRoundedIcon",components:{SVGIcon:ye["a"]}},gc=fc,mc=Object(R["a"])(gc,hc,pc,!1,null,null,null),yc=mc.exports;function vc(){if(window.getSelection)try{const{activeElement:e}=document;return e&&e.value?e.value.substring(e.selectionStart,e.selectionEnd):window.getSelection().toString()}catch(e){return""}else if(document.selection&&"Control"!==document.selection.type)return document.selection.createRange().text;return""}function bc(e){if("number"===typeof e.selectionStart)e.selectionStart=e.selectionEnd=e.value.length;else if("undefined"!==typeof e.createTextRange){e.focus();const t=e.createTextRange();t.collapse(!1),t.select()}}function Tc(e){e.selectionStart=e.selectionEnd=0}function _c(e){return/^[\w\W\s]$/.test(e)}function Cc(e){const t=e.match(/(.*)<\/data>/);try{return t?JSON.parse(t[1]):null}catch(n){return null}}function Sc(e){return"string"!==typeof e&&(e=JSON.stringify(e)),`${e}`}const kc=280,wc=100;var xc={data(){return{keyboardIsVirtual:!1,activeTags:[],initTagIndex:null,focusedTagIndex:null,metaKey:!1,shiftKey:!1,tabbing:!1,debouncedHandleDeleteTag:null}},constants:{DebounceDelay:kc,VirtualKeyboardThreshold:wc},computed:{virtualKeyboardBind:({keyboardIsVirtual:e})=>({keyboardIsVirtual:e}),allSelectedTagsAreActive:({selectedTags:e,activeTags:t})=>e.every(e=>t.includes(e))},methods:{selectRangeActiveTags(e=this.focusedTagIndex,t=this.selectedTags.length){this.activeTags=this.selectedTags.slice(e,t)},selectTag(e){this.updateSelectedTags([e]),this.clearFilterOnTagSelect&&this.setFilterInput("")},unselectActiveTags(){this.activeTags.length&&(this.deleteTags(this.activeTags),this.resetActiveTags())},async deleteHandler(e){this.activeTags.length>0&&this.setSelectedTags(this.selectedTags.filter(e=>!this.activeTags.includes(e))),this.inputIsSelected()&&this.allSelectedTagsAreActive?(e.preventDefault(),await this.resetFilters()):0===this.$refs.input.selectionEnd&&this.hasSelectedTags&&(e.preventDefault(),this.keyboardIsVirtual?this.setSelectedTags(this.selectedTags.slice(0,-1)):this.$refs.selectedTags.focusLast()),this.unselectActiveTags()},leftKeyInputHandler(e){if(this.assignEventValues(e),this.hasSelectedTags){if(this.activeTags.length&&!this.shiftKey)return e.preventDefault(),void this.$refs.selectedTags.focusTag(this.activeTags[0]);if(this.shiftKey&&0===this.$refs.input.selectionStart&&"forward"!==this.$refs.input.selectionDirection)return null===this.focusedTagIndex&&(this.focusedTagIndex=this.selectedTags.length),this.focusedTagIndex>0&&(this.focusedTagIndex-=1),this.initTagIndex=this.selectedTags.length,void this.selectTagsPressingShift();(0===this.$refs.input.selectionEnd||this.inputIsSelected())&&this.$refs.selectedTags.focusLast()}},rightKeyInputHandler(e){if(this.assignEventValues(e),this.activeTags.length&&this.shiftKey&&this.focusedTagIndex=wc&&(this.keyboardIsVirtual=!0)}),kc),setFilterInput(e){this.$emit("update:input",e)},setSelectedTags(e){this.$emit("update:selectedTags",e)},updateSelectedTags(e){this.setSelectedTags([...new Set([...this.selectedTags,...e])])},handleCopy(e){e.preventDefault();const t=[],n={tags:[],input:vc()};if(this.activeTags.length){const e=this.activeTags;n.tags=e,t.push(e.join(" "))}return t.push(n.input),n.tags.length||n.input.length?(e.clipboardData.setData("text/html",Sc(n)),e.clipboardData.setData("text/plain",t.join(" ")),n):n},handleCut(e){e.preventDefault();const{input:t,tags:n}=this.handleCopy(e);if(!t&&!n.length)return;const a=this.selectedTags.filter(e=>!n.includes(e)),i=this.input.replace(t,"");this.setSelectedTags(a),this.setFilterInput(i)},handlePaste(e){e.preventDefault();const{types:t}=e.clipboardData;let n=[],a=e.clipboardData.getData("text/plain");if(t.includes("text/html")){const t=e.clipboardData.getData("text/html"),i=Cc(t);i&&({tags:n=[],input:a=""}=i)}const i=vc();a=i.length?this.input.replace(i,a):Object(vi["f"])(this.input,a,document.activeElement.selectionStart),this.setFilterInput(a.trim()),this.allSelectedTagsAreActive?this.setSelectedTags(n):this.updateSelectedTags(n),this.resetActiveTags()},async handleDeleteTag({tagName:e,event:t={}}){const{key:n}=t;this.activeTags.length||this.deleteTags([e]),this.unselectActiveTags(),await this.$nextTick(),bc(this.$refs.input),this.hasSelectedTags&&(await this.focusInput(),"Backspace"===n&&Tc(this.$refs.input))}},mounted(){window.visualViewport&&(window.visualViewport.addEventListener("resize",this.updateKeyboardType),this.$once("hook:beforeDestroy",()=>{window.visualViewport.removeEventListener("resize",this.updateKeyboardType)}))}};const Ic=1e3;var Oc={constants:{ScrollingDebounceDelay:Ic},data(){return{isScrolling:!1,scrollRemovedAt:0}},created(){this.deleteScroll=ul(this.deleteScroll,Ic)},methods:{deleteScroll(){this.isScrolling=!1,this.scrollRemovedAt=Date.now()},handleScroll(e){const{target:t}=e;if(0!==t.scrollTop)return t.scrollTop=0,void e.preventDefault();const n=150,a=t.offsetWidth,i=a+n;if(t.scrollWidth0?this.focusIndex(this.focusedIndex-1):this.startingPointHook())},focusNext({metaKey:e,ctrlKey:t,shiftKey:n}){(e||t)&&n||(this.externalFocusChange=!1,this.focusedIndex0}},Nc=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("li",{staticClass:"tag",attrs:{role:"presentation"}},[n("button",{ref:"button",class:{focus:e.isActiveTag},attrs:{role:"option","aria-selected":e.ariaSelected,"aria-roledescription":"tag"},on:{focus:function(t){return e.$emit("focus",{event:t,tagName:e.name})},click:function(t){return t.preventDefault(),e.$emit("click",{event:t,tagName:e.name})},dblclick:function(t){t.preventDefault(),!e.keyboardIsVirtual&&e.deleteTag()},keydown:[function(t){return t.ctrlKey||t.shiftKey||t.altKey||t.metaKey?null:e.$emit("keydown",{event:t,tagName:e.name})},function(t){return t.shiftKey?t.ctrlKey||t.altKey||t.metaKey?null:e.$emit("keydown",{event:t,tagName:e.name}):null},function(t){return t.shiftKey&&t.metaKey?t.ctrlKey||t.altKey?null:e.$emit("keydown",{event:t,tagName:e.name}):null},function(t){return t.metaKey?t.ctrlKey||t.shiftKey||t.altKey?null:e.$emit("keydown",{event:t,tagName:e.name}):null},function(t){return t.ctrlKey?t.shiftKey||t.altKey||t.metaKey?null:e.$emit("keydown",{event:t,tagName:e.name}):null},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"delete",[8,46],t.key,["Backspace","Delete","Del"])?null:(t.preventDefault(),e.deleteTag.apply(null,arguments))}],mousedown:function(t){return t.preventDefault(),e.focusButton.apply(null,arguments)},copy:e.handleCopy}},[e.isRemovableTag?e._e():n("span",{staticClass:"visuallyhidden"},[e._v(" Add tag - ")]),e._v(" "+e._s(e.name)+" "),e.isRemovableTag?n("span",{staticClass:"visuallyhidden"},[e._v(" – Tag. Select to remove from list. ")]):e._e()])])},zc=[],Mc={name:"Tag",props:{name:{type:String,required:!0},isFocused:{type:Boolean,default:()=>!1},isRemovableTag:{type:Boolean,default:!1},isActiveTag:{type:Boolean,default:!1},activeTags:{type:Array,required:!1},keyboardIsVirtual:{type:Boolean,default:!1}},watch:{isFocused(e){e&&this.focusButton()}},mounted(){document.addEventListener("copy",this.handleCopy),document.addEventListener("cut",this.handleCut),document.addEventListener("paste",this.handlePaste),this.$once("hook:beforeDestroy",()=>{document.removeEventListener("copy",this.handleCopy),document.removeEventListener("cut",this.handleCut),document.removeEventListener("paste",this.handlePaste)})},methods:{isCurrentlyActiveElement(){return document.activeElement===this.$refs.button},handleCopy(e){if(!this.isCurrentlyActiveElement())return;e.preventDefault();let t=[];t=this.activeTags.length>0?this.activeTags:[this.name],e.clipboardData.setData("text/html",Sc({tags:t})),e.clipboardData.setData("text/plain",t.join(" "))},handleCut(e){this.isCurrentlyActiveElement()&&this.isRemovableTag&&(this.handleCopy(e),this.deleteTag(e))},handlePaste(e){this.isCurrentlyActiveElement()&&this.isRemovableTag&&(e.preventDefault(),this.deleteTag(e),this.$emit("paste-content",e))},deleteTag(e){this.$emit("delete-tag",{tagName:this.name,event:e}),this.$emit("prevent-blur")},focusButton(e={}){this.keyboardIsVirtual||this.$refs.button.focus(),0===e.buttons&&this.isFocused&&this.deleteTag(e)}},computed:{ariaSelected:({isActiveTag:e,isRemovableTag:t})=>t?e?"true":"false":null}},Kc=Mc,qc=(n("bcfb"),Object(R["a"])(Kc,Nc,zc,!1,null,"3b809bfa",null)),Fc=qc.exports,Vc={name:"Tags",mixins:[Oc,Rc],props:{tags:{type:Array,default:()=>[]},activeTags:{type:Array,default:()=>[]},ariaLabel:{type:String,required:!1},id:{type:String,required:!1},input:{type:String,default:null},areTagsRemovable:{type:Boolean,default:!1},keyboardIsVirtual:{type:Boolean,default:!1}},components:{Tag:Fc},methods:{focusTag(e){this.focusIndex(this.tags.indexOf(e))},startingPointHook(){this.$emit("focus-prev")},handleFocus(e,t){this.focusIndex(t),this.isScrolling=!1,this.$emit("focus",e)},endingPointHook(){this.$emit("focus-next")},resetScroll(){this.$refs["scroll-wrapper"].scrollLeft=0},handleKeydown(e){const{key:t}=e,n=this.tags[this.focusedIndex];_c(t)&&n&&this.$emit("delete-tag",{tagName:n.label||n,event:e})}},computed:{totalItemsToNavigate:({tags:e})=>e.length}},Hc=Vc,Wc=(n("8b7a"),Object(R["a"])(Hc,Ec,Bc,!1,null,"4b231516",null)),Uc=Wc.exports;const Gc=5,Xc="filter-input",Yc="selected-tags",Jc="suggested-tags",Qc={autocorrect:"off",autocapitalize:"off",spellcheck:"false",role:"combobox","aria-haspopup":"true","aria-autocomplete":"none","aria-owns":"suggestedTags","aria-controls":"suggestedTags"};var Zc={name:"FilterInput",mixins:[Oc,xc],constants:{FilterInputId:Xc,SelectedTagsId:Yc,SuggestedTagsId:Jc,AXinputProperties:Qc,TagLimit:Gc},components:{TagList:Uc,ClearRoundedIcon:yc,FilterIcon:Lc},props:{positionReversed:{type:Boolean,default:()=>!1},tags:{type:Array,default:()=>[]},selectedTags:{type:Array,default:()=>[]},preventedBlur:{type:Boolean,default:()=>!1},placeholder:{type:String,default:()=>"Filter"},disabled:{type:Boolean,default:()=>!1},value:{type:String,default:()=>""},shouldTruncateTags:{type:Boolean,default:!1},focusInputWhenCreated:{type:Boolean,default:!1},clearFilterOnTagSelect:{type:Boolean,default:!0}},data(){return{resetedTagsViaDeleteButton:!1,FilterInputId:Xc,SelectedTagsId:Yc,SuggestedTagsId:Jc,AXinputProperties:Qc,showSuggestedTags:!1}},computed:{tagsText:({suggestedTags:e})=>Object(vi["g"])({en:{one:"tag",other:"tags"}},e.length),selectedTagsLabel:({tagsText:e})=>"Selected "+e,suggestedTagsLabel:({tagsText:e})=>"Suggested "+e,hasSuggestedTags:({suggestedTags:e})=>e.length,hasSelectedTags:({selectedTags:e})=>e.length,inputIsNotEmpty:({input:e,hasSelectedTags:t})=>e.length||t,searchAriaLabelledBy:({hasSelectedTags:e})=>e?Xc.concat(" ",Yc):Xc,modelValue:{get:({value:e})=>e,set(e){this.$emit("input",e)}},input:({value:e})=>e,suggestedTags:({tags:e,selectedTags:t,shouldTruncateTags:n})=>{const a=e.filter(e=>!t.includes(e));return n?a.slice(0,Gc):a},displaySuggestedTags:({showSuggestedTags:e,suggestedTags:t})=>e&&t.length>0,inputMultipleSelectionListeners:({resetActiveTags:e,handleCopy:t,handleCut:n,handlePaste:a})=>({click:e,copy:t,cut:n,paste:a}),selectedTagsMultipleSelectionListeners:({handleSingleTagClick:e,selectInputAndTags:t,handleDeleteTag:n,selectedTagsKeydownHandler:a,focusTagHandler:i,handlePaste:s})=>({"click-tags":e,"select-all":t,"delete-tag":n,keydown:a,focus:i,"paste-tags":s})},watch:{async selectedTags(){this.resetedTagsViaDeleteButton?this.resetedTagsViaDeleteButton=!1:this.$el.contains(document.activeElement)&&await this.focusInput(),this.displaySuggestedTags&&this.hasSuggestedTags&&this.$refs.suggestedTags.resetScroll()},suggestedTags:{immediate:!0,handler(e){this.$emit("suggested-tags",e)}},showSuggestedTags(e){this.$emit("show-suggested-tags",e)}},methods:{async focusInput(){await this.$nextTick(),this.$refs.input.focus(),!this.input&&this.resetActiveTags&&this.resetActiveTags()},async resetFilters(e=!1){if(this.setFilterInput(""),this.setSelectedTags([]),!e)return this.$emit("update:preventedBlur",!0),this.resetActiveTags&&this.resetActiveTags(),void await this.focusInput();this.resetedTagsViaDeleteButton=!0,this.showSuggestedTags=!1,this.$refs.input.blur()},focusFirstTag(e=(()=>{})){this.showSuggestedTags||(this.showSuggestedTags=!0),this.hasSuggestedTags&&this.$refs.suggestedTags?this.$refs.suggestedTags.focusFirst():e()},setFilterInput(e){this.$emit("input",e)},setSelectedTags(e){this.$emit("update:selectedTags",e)},deleteTags(e){this.setSelectedTags(this.selectedTags.filter(t=>!e.includes(t)))},async handleBlur(e){const t=e.relatedTarget;t&&t.matches&&t.matches("button, input, ul")&&this.$el.contains(t)||(await this.$nextTick(),this.resetActiveTags(),this.preventedBlur?this.$emit("update:preventedBlur",!1):this.showSuggestedTags=!1)},downHandler(e){const t=()=>this.$emit("focus-next",e);this.positionReversed?t():this.focusFirstTag(t)},upHandler(e){const t=()=>this.$emit("focus-prev",e);this.positionReversed?this.focusFirstTag(t):t()},handleFocusPrevOnSelectedTags(){this.positionReversed?this.focusFirstTag(()=>this.$emit("focus-prev")):this.$emit("focus-prev")}},created(){this.focusInputWhenCreated&&document.activeElement!==this.$refs.input&&this.inputIsNotEmpty&&this.focusInput()}},eu=Zc,tu=(n("4eb2"),Object(R["a"])(eu,uc,dc,!1,null,"3b91e60a",null)),nu=tu.exports;const au=e=>e[e.length-1],iu=(e,t)=>JSON.stringify(e)===JSON.stringify(t),su="navigator.state",ru="No results found.",ou="No data available.",lu="There was an error fetching the data.",cu="items were found. Tab back to navigate through them.",uu={sampleCode:"sampleCode",tutorials:"tutorials",articles:"articles"},du={[uu.sampleCode]:"Sample Code",[uu.tutorials]:"Tutorials",[uu.articles]:"Articles"},hu=Object.fromEntries(Object.entries(du).map(([e,t])=>[t,e])),pu={[pt.article]:uu.articles,[pt.learn]:uu.tutorials,[pt.overview]:uu.tutorials,[pt.resources]:uu.tutorials,[pt.sampleCode]:uu.sampleCode,[pt.section]:uu.tutorials,[pt.tutorial]:uu.tutorials,[pt.project]:uu.tutorials},fu="Hide Deprecated";var gu={name:"NavigatorCard",constants:{STORAGE_KEY:su,FILTER_TAGS:uu,FILTER_TAGS_TO_LABELS:du,FILTER_LABELS_TO_TAGS:hu,TOPIC_TYPE_TO_TAG:pu,NO_RESULTS:ru,NO_CHILDREN:ou,ERROR_FETCHING:lu,ITEMS_FOUND:cu,HIDE_DEPRECATED_TAG:fu},components:{Badge:bn,FilterInput:nu,SidenavIcon:cc,NavigatorCardInner:Wl,NavigatorCardItem:ac,RecycleScroller:El["b"],Reference:oa["a"]},props:{technology:{type:String,required:!0},children:{type:Array,required:!0},activePath:{type:Array,required:!0},type:{type:String,required:!0},technologyPath:{type:String,default:""},scrollLockID:{type:String,default:""},errorFetching:{type:Boolean,default:!1},breakpoint:{type:String,default:""},apiChanges:{type:Object,default:null},isTechnologyBeta:{type:Boolean,default:!1}},mixins:[Rc],data(){return{filter:"",debouncedFilter:"",selectedTags:[],openNodes:{},nodesToRender:[],activeUID:null,resetScroll:!1,lastFocusTarget:null,NO_RESULTS:ru,NO_CHILDREN:ou,ERROR_FETCHING:lu,ITEMS_FOUND:cu}},computed:{INDEX_ROOT_KEY:()=>Bl,politeAriaLive:({hasNodes:e,nodesToRender:t})=>e?[t.length,cu].join(" "):"",assertiveAriaLive:({hasNodes:e,hasFilter:t,errorFetching:n})=>e?"":t?ru:n?lu:ou,availableTags:({selectedTags:e,renderableChildNodesMap:t,apiChangesObject:n})=>{const a=e.length?[]:Object.values(du);if(!a.length)return a;const i=new Set(Object.values(n)),s=new Set(a),r=new Set([fu]);i.size&&r.delete(fu);const o={type:[],changes:[],other:[]},l=Object.values(t),c=l.length;let u;for(u=0;ue.map(e=>du[e]||za[e]||e),set(e){this.selectedTags=e.map(e=>hu[e]||Ma[e]||e),this.resetScroll=!0}},filterPattern:({debouncedFilter:e})=>e?new RegExp(Nl(e),"i"):null,itemSize:()=>Rl,childrenMap({children:e}){return this.convertChildrenArrayToObject(e)},activePathChildren({activeUID:e,childrenMap:t}){return e&&t[e]?this.getParents(e):[]},activePathMap:({activePathChildren:e})=>Object.fromEntries(e.map(({uid:e})=>[e,!0])),activeIndex:({activeUID:e,nodesToRender:t})=>t.findIndex(t=>t.uid===e),filteredChildren({hasFilter:e,children:t,filterPattern:n,selectedTags:a,apiChangesObject:i,apiChanges:s,deprecatedHidden:r}){if(!e)return[];const o=new Set(a);return t.filter(({title:e,path:t,type:l,deprecated:c})=>{const u=!n||n.test(e);let d=!0;a.length&&(d=o.has(pu[l]),s&&!d&&(d=o.has(i[t])),!c&&o.has(fu)&&(d=!0));const h=!s||i[t],p=!r&&l===pt.groupMarker;return u&&d&&h&&!p})},filteredChildrenUpToRootSet:({filteredChildren:e,getParents:t})=>new Set(e.flatMap(({uid:e})=>t(e))),renderableChildNodesMap({filteredChildrenUpToRootSet:e,childrenMap:t,hasFilter:n}){if(!n)return t;let a=[];return e.forEach(n=>{if(!n.childUIDs.length)return void a.push(n);const i=!n.childUIDs.some(n=>e.has(t[n]));a=a.concat(i?this.getAllChildren(n.uid):n)}),this.convertChildrenArrayToObject(a)},nodeChangeDeps:({filteredChildren:e,activePathChildren:t,debouncedFilter:n,selectedTags:a})=>[e,t,n,a],hasFilter({debouncedFilter:e,selectedTags:t,apiChanges:n}){return Boolean(e.length||t.length||n)},deprecatedHidden:({selectedTags:e,debouncedFilter:t})=>e[0]===fu&&!t.length,apiChangesObject(){return this.apiChanges||{}},isLargeBreakpoint:({breakpoint:e})=>e===hl["b"].large,hasNodes:({nodesToRender:e})=>!!e.length,totalItemsToNavigate:({nodesToRender:e})=>e.length,lastActivePathItem:({activePath:e})=>au(e)},created(){this.restorePersistedState()},watch:{filter:"debounceInput",nodeChangeDeps:"trackOpenNodes",activePath:"handleActivePathChange",apiChanges(e){e||(this.selectedTags=this.selectedTags.filter(e=>!za[e]))}},methods:{clearFilters(){this.filter="",this.debouncedFilter="",this.selectedTags=[],this.resetScroll=!0},scrollToFocus(){this.$refs.scroller.scrollToItem(this.focusedIndex)},debounceInput:ul((function(e){this.debouncedFilter=e,this.resetScroll=!0,this.lastFocusTarget=null}),500),trackOpenNodes([e,t,n,a],[,i=[],s="",r=[]]=[]){if(n!==s&&!s&&this.getFromStorage("filter")||!iu(a,r)&&!r.length&&this.getFromStorage("selectedTags",[]).length)return;const o=!iu(i,t),l=this.deprecatedHidden||o&&this.hasFilter||!this.hasFilter?t:e.flatMap(({uid:e})=>this.getParents(e).slice(0,-1)),c=Object.fromEntries(l.map(({uid:e})=>[e,!0])),u=o?this.openNodes:{};this.openNodes=Object.assign(u,c),this.generateNodesToRender(),this.updateFocusIndexExternally()},toggle(e){const t=this.openNodes[e.uid];let n=[],a=[];if(t){const t=Object(w["a"])(this.openNodes),n=this.getAllChildren(e.uid);n.forEach(({uid:e})=>{delete t[e]}),this.openNodes=t,a=n.slice(1)}else this.$set(this.openNodes,e.uid,!0),n=this.getChildren(e.uid).filter(e=>this.renderableChildNodesMap[e.uid]);this.augmentRenderNodes({uid:e.uid,include:n,exclude:a})},toggleFullTree(e){const t=this.openNodes[e.uid],n=Object(w["a"])(this.openNodes),a=this.getAllChildren(e.uid);let i=[],s=[];a.forEach(({uid:e})=>{t?delete n[e]:n[e]=!0}),t?i=a.slice(1):s=a.slice(1).filter(e=>this.renderableChildNodesMap[e.uid]),this.openNodes=n,this.augmentRenderNodes({uid:e.uid,exclude:i,include:s})},toggleSiblings(e){const t=this.openNodes[e.uid],n=Object(w["a"])(this.openNodes),a=this.getSiblings(e.uid);a.forEach(({uid:e,childUIDs:a})=>{if(a.length)if(t){const t=this.getAllChildren(e);t.forEach(e=>{delete n[e.uid]}),delete n[e],this.augmentRenderNodes({uid:e,exclude:t.slice(1),include:[]})}else{n[e]=!0;const t=this.getChildren(e).filter(e=>this.renderableChildNodesMap[e.uid]);this.augmentRenderNodes({uid:e,exclude:[],include:t})}}),this.openNodes=n,this.persistState()},getAllChildren(e){const t=[],n=[e];let a=null;while(n.length){a=n.shift();const e=this.childrenMap[a];t.push(e),n.unshift(...e.childUIDs)}return t},getParents(e){const t=[],n=[e];let a=null;while(n.length){a=n.pop();const e=this.childrenMap[a];if(!e)return[];t.unshift(e),e.parent&&e.parent!==Bl&&n.push(e.parent)}return t},getSiblings(e){const t=this.childrenMap[e];return t?this.getChildren(t.parent):[]},getChildren(e){if(e===Bl)return this.children.filter(e=>e.parent===Bl);const t=this.childrenMap[e];return t?(t.childUIDs||[]).map(e=>this.childrenMap[e]):[]},generateNodesToRender(){const{children:e,openNodes:t,renderableChildNodesMap:n}=this;this.nodesToRender=e.filter(e=>n[e.uid]&&(e.parent===Bl||t[e.parent])),this.persistState(),this.scrollToElement()},augmentRenderNodes({uid:e,include:t=[],exclude:n=[]}){const a=this.nodesToRender.findIndex(t=>t.uid===e);if(t.length){const e=t.filter(e=>!this.nodesToRender.includes(e));this.nodesToRender.splice(a+1,0,...e)}else if(n.length){const e=new Set(n);this.nodesToRender=this.nodesToRender.filter(t=>!e.has(t))}this.persistState()},getFromStorage(e,t=null){const n=cl["b"].get(su,{}),a=n[this.technologyPath];return a?e?a[e]||t:a:t},persistState(){const e={path:this.lastActivePathItem},{path:t}=this.activeUID&&this.childrenMap[this.activeUID]||e,n={technology:this.technology,path:t,hasApiChanges:!!this.apiChanges,openNodes:Object.keys(this.openNodes).map(Number),nodesToRender:this.nodesToRender.map(({uid:e})=>e),activeUID:this.activeUID,filter:this.filter,selectedTags:this.selectedTags},a={...cl["b"].get(su,{}),[this.technologyPath]:n};cl["b"].set(su,a)},clearPersistedState(){const e={...cl["b"].get(su,{}),[this.technologyPath]:{}};cl["b"].set(su,e)},restorePersistedState(){const e=this.getFromStorage();if(!e||e.path!==this.lastActivePathItem)return this.clearPersistedState(),void this.handleActivePathChange(this.activePath);const{technology:t,nodesToRender:n=[],filter:a="",hasAPIChanges:i=!1,activeUID:s=null,selectedTags:r=[],openNodes:o}=e;if(!n.length&&!a&&!r.length)return this.clearPersistedState(),void this.handleActivePathChange(this.activePath);const l=n.every(e=>this.childrenMap[e]),c=s?(this.childrenMap[s]||{}).path===this.lastActivePathItem:1===this.activePath.length;if(t!==this.technology||!l||i!==Boolean(this.apiChanges)||!c||s&&!a&&!r.length&&!n.includes(s))return this.clearPersistedState(),void this.handleActivePathChange(this.activePath);this.openNodes=Object.fromEntries(o.map(e=>[e,!0])),this.nodesToRender=n.map(e=>this.childrenMap[e]),this.selectedTags=r,this.filter=a,this.debouncedFilter=this.filter,this.activeUID=s,this.scrollToElement()},async scrollToElement(){if(await Object(pl["b"])(1),!this.$refs.scroller)return;if(this.resetScroll)return void this.$refs.scroller.scrollToItem(0);const e=document.getElementById(this.activeUID);if(0===this.getChildPositionInScroller(e))return;const t=this.nodesToRender.findIndex(e=>e.uid===this.activeUID);this.$refs.scroller.scrollToItem(t)},getChildPositionInScroller(e){if(!e)return 0;const{paddingTop:t,paddingBottom:n}=getComputedStyle(this.$refs.scroller.$el),a={top:parseInt(t,10)||0,bottom:parseInt(n,10)||0},{y:i,height:s}=this.$refs.scroller.$el.getBoundingClientRect(),{y:r}=e.getBoundingClientRect(),o=Rl,l=r-i-a.top;return l<0?-1:l+o>=s-a.bottom?1:0},isInsideScroller(e){return this.$refs.scroller.$el.contains(e)},handleFocusIn(e){this.lastFocusTarget=e.target;const t=this.getChildPositionInScroller(e.target);0!==t&&this.$refs.scroller.$el.scrollBy({top:Rl*t,left:0})},handleFocusOut(e){e.relatedTarget&&(this.isInsideScroller(e.relatedTarget)||(this.lastFocusTarget=null))},handleScrollerUpdate:ul((async function(){await Object(pl["a"])(300),this.lastFocusTarget&&this.isInsideScroller(this.lastFocusTarget)&&document.activeElement!==this.lastFocusTarget&&this.lastFocusTarget.focus({preventScroll:!0})}),50),setActiveUID(e){this.activeUID=e,this.resetScroll=!1},handleNavigationChange(e){this.childrenMap[e].path.startsWith(this.technologyPath)&&this.setActiveUID(e)},pathsToFlatChildren(e){const t=e.slice(0).reverse();let n=this.children;const a=[];while(t.length){const e=t.pop(),i=n.find(t=>t.path===e);if(!i)break;a.push(i),t.length&&(n=i.childUIDs.map(e=>this.childrenMap[e]))}return a},handleActivePathChange(e){const t=this.childrenMap[this.activeUID],n=au(e);if(t){if(n===t.path)return;const e=this.getSiblings(this.activeUID),a=this.getChildren(this.activeUID),i=this.getParents(this.activeUID),s=[...a,...e,...i].find(e=>e.path===n);if(s)return void this.setActiveUID(s.uid)}const a=this.pathsToFlatChildren(e);a.length?this.setActiveUID(a[a.length-1].uid):this.activeUID?this.setActiveUID(null):this.trackOpenNodes(this.nodeChangeDeps)},updateFocusIndexExternally(){this.externalFocusChange=!0,this.activeIndex>0?this.focusIndex(this.activeIndex):this.focusIndex(0)},convertChildrenArrayToObject(e){return e.reduce((e,t)=>(e[t.uid]=t,e),{})},focusNodeParent(e){const t=this.childrenMap[e.parent];if(!t)return;const n=this.nodesToRender.findIndex(e=>e.uid===t.uid);-1!==n&&this.focusIndex(n)}}},mu=gu,yu=(n("5fad"),Object(R["a"])(mu,jl,Ll,!1,null,"d21551d4",null)),vu=yu.exports,bu=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("SVGIcon",{staticClass:"spinner-icon",attrs:{viewBox:"0 0 39.02 39.02"}},[n("path",{attrs:{d:"m15.529 11.96-3.57 3.569-7.99-7.99 3.57-3.57z"}}),n("path",{attrs:{d:"M0 22.072v-5.06h11.331v5.06z"}}),n("path",{attrs:{d:"m7.54 35.096-3.57-3.569 7.99-7.99 3.57 3.569z"}}),n("path",{attrs:{d:"M22.057 39.02H17.01v-11.3h5.047z"}}),n("path",{attrs:{d:"m35.096 31.528-3.569 3.568-7.99-7.99 3.569-3.569z"}}),n("path",{attrs:{d:"M39.02 17.01v5.046h-11.3V17.01z"}}),n("path",{attrs:{d:"m31.528 3.97 3.569 3.57-7.99 7.99-3.57-3.57z"}}),n("path",{attrs:{d:"M17.011 0h5.061v11.331h-5.061z"}})])},Tu=[],_u={name:"SpinnerIcon",components:{SVGIcon:ye["a"]}},Cu=_u,Su=(n("73d6"),Object(R["a"])(Cu,bu,Tu,!1,null,"60936b56",null)),ku=Su.exports,wu={name:"Navigator",components:{NavigatorCard:vu,NavigatorCardInner:Wl,SpinnerIcon:ku},data(){return{INDEX_ROOT_KEY:Bl}},props:{parentTopicIdentifiers:{type:Array,required:!0},technology:{type:Object,required:!0},isFetching:{type:Boolean,default:!1},references:{type:Object,default:()=>{}},scrollLockID:{type:String,default:""},errorFetching:{type:Boolean,default:!1},breakpoint:{type:String,default:hl["b"].large},apiChanges:{type:Object,default:null}},computed:{parentTopicReferences({references:e,parentTopicIdentifiers:t}){return t.reduce((t,n)=>{const a=e[n];return a?t.concat(a):(console.error(`Reference for "${n}" is missing`),t)},[])},activePath({parentTopicReferences:e,$route:{path:t}}){if(t=t.replace(/\/$/,"").toLowerCase(),!e.length)return[t];let n=1;return"technologies"===e[0].kind&&(n=2),e.slice(n).map(e=>e.url).concat(t)},flatChildren:({flattenNestedData:e,technology:t={}})=>e(t.children||[],null,0,t.beta),type:()=>pt.module},methods:{hashCode(e){return e.split("").reduce((e,t)=>(e<<5)-e+t.charCodeAt(0)|0,0)},flattenNestedData(e,t=null,n=0,a=!1){let i=[];const s=e.length;let r;for(r=0;r({collapsed:!0}),props:{topics:{type:Array,required:!0}},watch:{collapsed(e,t){t&&!e?document.addEventListener("click",this.handleDocumentClick,!1):!t&&e&&document.removeEventListener("click",this.handleDocumentClick,!1)}},beforeDestroy(){document.removeEventListener("click",this.handleDocumentClick,!1)},computed:{topicsWithUrls:({$route:e,topics:t})=>t.map(t=>({...t,url:Object(q["b"])(t.url,e.query)}))},methods:{handleDocumentClick(e){const{target:t}=e,{collapsed:n,$refs:{btn:a,dropdown:i}}=this,s=!a.contains(t)&&!i.contains(t);!n&&s&&(this.collapsed=!0)},toggleCollapsed(){this.collapsed=!this.collapsed}}},Vu=Fu,Hu=(n("2ca2"),Object(R["a"])(Vu,Eu,Bu,!1,null,"74906830",null)),Wu=Hu.exports,Uu=function(e,t){var n=t._c;return n(t.$options.components.NavMenuItemBase,{tag:"component",staticClass:"hierarchy-item",class:[{collapsed:t.props.isCollapsed},t.data.staticClass]},[n("span",{staticClass:"hierarchy-item-icon icon-inline"},[t._v("/")]),t.props.url?n("router-link",{staticClass:"parent item nav-menu-link",attrs:{to:t.props.url}},[t._t("default")],2):[n("span",{staticClass:"current item"},[t._t("default")],2),t._t("tags")]],2)},Gu=[],Xu=n("863d"),Yu={name:"HierarchyItem",components:{NavMenuItemBase:Xu["a"],InlineChevronRightIcon:Xl["a"]},props:{isCollapsed:Boolean,url:{type:String,required:!1}}},Ju=Yu,Qu=(n("260a"),Object(R["a"])(Ju,Uu,Gu,!0,null,"382bf39e",null)),Zu=Qu.exports;const ed=3;var td={name:"Hierarchy",components:{Badge:bn,NavMenuItems:Au["a"],HierarchyCollapsedItems:Wu,HierarchyItem:Zu},constants:{MaxVisibleLinks:ed},props:{isSymbolDeprecated:Boolean,isSymbolBeta:Boolean,references:Object,currentTopicTitle:{type:String,required:!0},parentTopicIdentifiers:{type:Array,default:()=>[]},currentTopicTags:{type:Array,default:()=>[]}},data(){return{windowWidth:window.innerWidth}},mounted(){const e=yl(()=>{this.windowWidth=window.innerWidth},150);window.addEventListener("resize",e),this.$once("hook:beforeDestroy",()=>{window.removeEventListener("resize",e)})},computed:{parentTopics(){return this.parentTopicIdentifiers.reduce((e,t)=>{const n=this.references[t];if(n){const{title:t,url:a}=n;return e.concat({title:t,url:a})}return console.error(`Reference for "${t}" is missing`),e},[])},root:({parentTopics:e,windowWidth:t})=>t<=1e3?null:e[0],firstItemSlice:({root:e})=>e?1:0,linksAfterCollapse:({windowWidth:e,hasBadge:t})=>{const n=t?1:0;return e>1200?ed-n:e>1e3?ed-1-n:e>=800?ed-2-n:0},collapsibleItems:({parentTopics:e,linksAfterCollapse:t,firstItemSlice:n})=>t?e.slice(n,-t):e.slice(n),nonCollapsibleItems:({parentTopics:e,linksAfterCollapse:t,firstItemSlice:n})=>t?e.slice(n).slice(-t):[],hasBadge:({isSymbolDeprecated:e,isSymbolBeta:t,currentTopicTags:n})=>e||t||n.length},methods:{addQueryParamsToUrl(e){return Object(q["b"])(e,this.$route.query)}}},nd=td,ad=(n("1fb2"),Object(R["a"])(nd,ju,Lu,!1,null,"30132cb0",null)),id=ad.exports,sd=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("NavMenuItemBase",{staticClass:"nav-menu-setting language-container"},[n("div",{class:{"language-toggle-container":e.hasLanguages}},[n("select",{ref:"language-sizer",staticClass:"language-dropdown language-sizer",attrs:{"aria-hidden":"true",tabindex:"-1"}},[n("option",{attrs:{selected:""}},[e._v(e._s(e.currentLanguage.name))])]),n("label",{staticClass:"nav-menu-setting-label",attrs:{for:e.hasLanguages?"language-toggle":null}},[e._v("Language:")]),e.hasLanguages?n("select",{directives:[{name:"model",rawName:"v-model",value:e.languageModel,expression:"languageModel"}],staticClass:"language-dropdown nav-menu-link",style:"width: "+e.adjustedWidth+"px",attrs:{id:"language-toggle"},on:{change:[function(t){var n=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){var t="_value"in e?e._value:e.value;return t}));e.languageModel=t.target.multiple?n:n[0]},function(t){return e.pushRoute(e.currentLanguage.route)}]}},e._l(e.languages,(function(t){return n("option",{key:t.api,domProps:{value:t.api}},[e._v(" "+e._s(t.name)+" ")])})),0):n("span",{staticClass:"nav-menu-toggle-none current-language",attrs:{"aria-current":"page"}},[e._v(e._s(e.currentLanguage.name))]),e.hasLanguages?n("InlineChevronDownIcon",{staticClass:"toggle-icon icon-inline"}):e._e()],1),e.hasLanguages?n("div",{staticClass:"language-list-container"},[n("span",{staticClass:"nav-menu-setting-label"},[e._v("Language:")]),n("ul",{staticClass:"language-list"},e._l(e.languages,(function(t){return n("li",{key:t.api,staticClass:"language-list-item"},[t.api===e.languageModel?n("span",{staticClass:"current-language",attrs:{"data-language":t.api,"aria-current":"page"}},[e._v(" "+e._s(t.name)+" ")]):n("a",{staticClass:"nav-menu-link",attrs:{href:"#"},on:{click:function(n){return n.preventDefault(),e.pushRoute(t.route)}}},[e._v(" "+e._s(t.name)+" ")])])})),0)]):e._e()])},rd=[],od=n("7948"),ld={name:"LanguageToggle",components:{InlineChevronDownIcon:od["a"],NavMenuItemBase:Xu["a"]},inject:{store:{default(){return{setPreferredLanguage(){}}}}},props:{interfaceLanguage:{type:String,required:!0},objcPath:{type:String,required:!1},swiftPath:{type:String,required:!1},closeNav:{type:Function,default:()=>{}}},data(){return{languageModel:null,adjustedWidth:0}},mounted(){const e=ul(async()=>{await Object(pl["b"])(3),this.calculateSelectWidth()},150,!0);window.addEventListener("resize",e),window.addEventListener("orientationchange",e),this.$once("hook:beforeDestroy",()=>{window.removeEventListener("resize",e),window.removeEventListener("orientationchange",e)})},watch:{interfaceLanguage:{immediate:!0,handler(e){this.languageModel=e}},currentLanguage:{immediate:!0,handler:"calculateSelectWidth"}},methods:{getRoute(e){const t=e.query===O["a"].swift.key.url?void 0:e.query;return{query:{...this.$route.query,language:t},path:this.isCurrentPath(e.path)?null:this.normalizePath(e.path)}},async pushRoute(e){await this.closeNav(),this.store.setPreferredLanguage(e.query),this.$router.push(this.getRoute(e))},isCurrentPath(e){return this.$route.path.replace(/^\//,"")===e},normalizePath(e){return e.startsWith("/")?e:"/"+e},async calculateSelectWidth(){await this.$nextTick(),this.adjustedWidth=this.$refs["language-sizer"].clientWidth+6}},computed:{languages(){return[{name:O["a"].swift.name,api:O["a"].swift.key.api,route:{path:this.swiftPath,query:O["a"].swift.key.url}},{name:O["a"].objectiveC.name,api:O["a"].objectiveC.key.api,route:{path:this.objcPath,query:O["a"].objectiveC.key.url}}]},currentLanguage:({languages:e,languageModel:t})=>e.find(e=>e.api===t),hasLanguages:({objcPath:e,swiftPath:t})=>t&&e}},cd=ld,ud=(n("97a5"),Object(R["a"])(cd,sd,rd,!1,null,"126c8e14",null)),dd=ud.exports,hd={name:"DocumentationNav",components:{SidenavIcon:cc,NavBase:Pu["a"],NavMenuItems:Au["a"],Hierarchy:id,LanguageToggle:dd},props:{title:{type:String,required:!1},parentTopicIdentifiers:{type:Array,required:!1},isSymbolBeta:{type:Boolean,required:!1},isSymbolDeprecated:{type:Boolean,required:!1},isDark:{type:Boolean,default:!1},hasNoBorder:{type:Boolean,default:!1},currentTopicTags:{type:Array,required:!0},references:{type:Object,default:()=>({})},isWideFormat:{type:Boolean,default:!0},interfaceLanguage:{type:String,required:!1},objcPath:{type:String,required:!1},swiftPath:{type:String,required:!1}},computed:{BreakpointName:()=>hl["b"],breadcrumbCount:({hierarchyItems:e})=>e.length+1,rootHierarchyReference:({parentTopicIdentifiers:e,references:t})=>t[e[0]]||{},isRootTechnologyLink:({rootHierarchyReference:{kind:e}})=>"technologies"===e,rootLink:({isRootTechnologyLink:e,rootHierarchyReference:t,$route:n})=>e?{path:t.url,query:n.query}:null,hierarchyItems:({parentTopicIdentifiers:e,isRootTechnologyLink:t})=>t?e.slice(1):e},methods:{async handleSidenavToggle(e){await e(),this.$emit("toggle-sidenav")}}},pd=hd,fd=(n("2dd1"),Object(R["a"])(pd,$u,Du,!1,null,"cbd98416",null)),gd=fd.exports,md=n("3bdd");const yd="0.3.0";var vd={name:"DocumentationTopicView",constants:{MIN_RENDER_JSON_VERSION_WITH_INDEX:yd},components:{Navigator:Ou,AdjustableSidebarWidth:Dl,NavigatorDataProvider:rl,Topic:Fo,CodeTheme:Zo["a"],Nav:gd},mixins:[tl["a"],nl["a"]],data(){return{topicDataDefault:null,topicDataObjc:null,isSideNavOpen:!1,store:Qo,BreakpointName:hl["b"]}},computed:{objcOverrides:({topicData:e})=>{const{variantOverrides:t=[]}=e||{},n=({interfaceLanguage:e})=>e===O["a"].objectiveC.key.api,a=({traits:e})=>e.some(n),i=t.find(a);return i?i.patch:null},topicData:{get(){return this.topicDataObjc?this.topicDataObjc:this.topicDataDefault},set(e){this.topicDataDefault=e}},topicKey:({$route:e,topicProps:t})=>[e.path,t.interfaceLanguage].join(),topicProps(){const{abstract:e,defaultImplementationsSections:t,deprecationSummary:n,downloadNotAvailableSummary:a,diffAvailability:i,hierarchy:s,identifier:{interfaceLanguage:r,url:o},metadata:{conformance:l,modules:c,platforms:u,required:d=!1,roleHeading:h,title:p="",tags:f=[],role:g,symbolKind:m=""}={},primaryContentSections:y,relationshipsSections:v,references:b={},sampleCodeDownload:T,topicSections:_,seeAlsoSections:C,variantOverrides:S}=this.topicData;return{abstract:e,conformance:l,defaultImplementationsSections:t,deprecationSummary:n,downloadNotAvailableSummary:a,diffAvailability:i,hierarchy:s,role:g,identifier:o,interfaceLanguage:r,isRequirement:d,modules:c,platforms:u,primaryContentSections:y,relationshipsSections:v,references:b,roleHeading:h,sampleCodeDownload:T,title:p,topicSections:_,seeAlsoSections:C,variantOverrides:S,symbolKind:m,tags:f.slice(0,1)}},parentTopicIdentifiers:({topicProps:{hierarchy:{paths:e=[]},references:t},$route:n})=>e.length?e.find(e=>{const a=e.find(e=>t[e]&&"technologies"!==t[e].kind),i=a&&t[a];return i&&n.path.toLowerCase().startsWith(i.url.toLowerCase())})||e[0]:[],technology:({$route:e,topicProps:{identifier:t,references:n,role:a,title:i},parentTopicIdentifiers:s})=>{const r={title:i,url:e.path},o=n[t];if(!s.length)return o||r;const l=n[s[0]];return l&&"technologies"!==l.kind?l:(a!==k["a"].collection||o)&&(l&&n[s[1]]||o)||r},languagePaths:({topicData:{variants:e=[]}})=>e.reduce((e,t)=>t.traits.reduce((e,n)=>n.interfaceLanguage?{...e,[n.interfaceLanguage]:(e[n.interfaceLanguage]||[]).concat(t.paths)}:e,e),{}),objcPath:({languagePaths:{[O["a"].objectiveC.key.api]:[e]=[]}={}})=>e,swiftPath:({languagePaths:{[O["a"].swift.key.api]:[e]=[]}={}})=>e,isSymbolBeta:({topicProps:{platforms:e}})=>!!(e&&e.length&&e.every(e=>e.beta)),isSymbolDeprecated:({topicProps:{platforms:e,deprecationSummary:t}})=>!!(t&&t.length>0||e&&e.length&&e.every(e=>e.deprecatedAt)),enableNavigator:({isTargetIDE:e,topicDataDefault:t})=>!e&&Object(md["b"])(Object(md["a"])(t.schemaVersion),yd)>=0,sidebarProps:({isSideNavOpen:e,enableNavigator:t})=>t?{class:"full-width-container topic-wrapper",openExternally:e}:{class:"static-width-container topic-wrapper"},sidebarListeners(){return this.enableNavigator?{"update:openExternally":e=>{this.isSideNavOpen=e}}:{}}},methods:{applyObjcOverrides(){this.topicDataObjc=S(Object(w["a"])(this.topicData),this.objcOverrides)},handleCodeColorsChange(e){el["a"].updateCodeColors(e)}},mounted(){this.$bridge.on("contentUpdate",e=>{this.topicData=e}),this.$bridge.on("codeColors",this.handleCodeColorsChange),this.$bridge.send({type:"requestCodeColors"})},provide(){return{store:this.store}},inject:{isTargetIDE:{default(){return!1}}},beforeDestroy(){this.$bridge.off("codeColors",this.handleCodeColorsChange)},beforeRouteEnter(e,t,n){Object(w["b"])(e,t,n).then(t=>n(n=>{n.topicData=t,e.query.language===O["a"].objectiveC.key.url&&n.objcOverrides&&n.applyObjcOverrides()})).catch(n)},beforeRouteUpdate(e,t,n){e.path===t.path&&e.query.language===O["a"].objectiveC.key.url&&this.objcOverrides?(this.applyObjcOverrides(),n()):Object(w["d"])(e,t)?Object(w["b"])(e,t,n).then(t=>{this.topicDataObjc=null,this.topicData=t,e.query.language===O["a"].objectiveC.key.url&&this.objcOverrides&&this.applyObjcOverrides(),n()}).catch(n):n()},created(){this.store.reset()},watch:{topicData(){this.$nextTick(()=>{this.newContentMounted()})}}},bd=vd,Td=(n("c8fe"),Object(R["a"])(bd,a,i,!1,null,"6c414c34",null));t["default"]=Td.exports},f8bd:function(e,t,n){},fb6d:function(e,t,n){"use strict";n("4ab9")}}]); \ No newline at end of file diff --git a/docs/docc/Reducer.doccarchive/js/documentation-topic~topic~tutorials-overview.8e36e44f.js b/docs/docc/Reducer.doccarchive/js/documentation-topic~topic~tutorials-overview.8e36e44f.js deleted file mode 100644 index 36cb926..0000000 --- a/docs/docc/Reducer.doccarchive/js/documentation-topic~topic~tutorials-overview.8e36e44f.js +++ /dev/null @@ -1,10 +0,0 @@ -/*! - * This source file is part of the Swift.org open source project - * - * Copyright (c) 2021 Apple Inc. and the Swift project authors - * Licensed under Apache License v2.0 with Runtime Library Exception - * - * See https://swift.org/LICENSE.txt for license information - * See https://swift.org/CONTRIBUTORS.txt for Swift project authors - */ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["documentation-topic~topic~tutorials-overview"],{"05a1":function(e,t,n){},"0f00":function(e,t,n){"use strict";var i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"row"},[e._t("default")],2)},r=[],s={name:"GridRow"},a=s,o=(n("2224"),n("2877")),c=Object(o["a"])(a,i,r,!1,null,"be73599c",null);t["a"]=c.exports},1020:function(e,t){var n={exports:{}};function i(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw new Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw new Error("set is read-only")}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach((function(t){var n=e[t];"object"!=typeof n||Object.isFrozen(n)||i(n)})),e}n.exports=i,n.exports.default=i;var r=n.exports;class s{constructor(e){void 0===e.data&&(e.data={}),this.data=e.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function a(e){return e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function o(e,...t){const n=Object.create(null);for(const i in e)n[i]=e[i];return t.forEach((function(e){for(const t in e)n[t]=e[t]})),n}const c="",l=e=>!!e.kind,u=(e,{prefix:t})=>{if(e.includes(".")){const n=e.split(".");return[`${t}${n.shift()}`,...n.map((e,t)=>`${e}${"_".repeat(t+1)}`)].join(" ")}return`${t}${e}`};class d{constructor(e,t){this.buffer="",this.classPrefix=t.classPrefix,e.walk(this)}addText(e){this.buffer+=a(e)}openNode(e){if(!l(e))return;let t=e.kind;t=e.sublanguage?"language-"+t:u(t,{prefix:this.classPrefix}),this.span(t)}closeNode(e){l(e)&&(this.buffer+=c)}value(){return this.buffer}span(e){this.buffer+=``}}class h{constructor(){this.rootNode={children:[]},this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(e){this.top.children.push(e)}openNode(e){const t={kind:e,children:[]};this.add(t),this.stack.push(t)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){while(this.closeNode());}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(e){return this.constructor._walk(e,this.rootNode)}static _walk(e,t){return"string"===typeof t?e.addText(t):t.children&&(e.openNode(t),t.children.forEach(t=>this._walk(e,t)),e.closeNode(t)),e}static _collapse(e){"string"!==typeof e&&e.children&&(e.children.every(e=>"string"===typeof e)?e.children=[e.children.join("")]:e.children.forEach(e=>{h._collapse(e)}))}}class p extends h{constructor(e){super(),this.options=e}addKeyword(e,t){""!==e&&(this.openNode(t),this.addText(e),this.closeNode())}addText(e){""!==e&&this.add(e)}addSublanguage(e,t){const n=e.root;n.kind=t,n.sublanguage=!0,this.add(n)}toHTML(){const e=new d(this,this.options);return e.value()}finalize(){return!0}}function g(e){return e?"string"===typeof e?e:e.source:null}function f(e){return v("(?=",e,")")}function m(e){return v("(?:",e,")*")}function b(e){return v("(?:",e,")?")}function v(...e){const t=e.map(e=>g(e)).join("");return t}function y(e){const t=e[e.length-1];return"object"===typeof t&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function w(...e){const t=y(e),n="("+(t.capture?"":"?:")+e.map(e=>g(e)).join("|")+")";return n}function x(e){return new RegExp(e.toString()+"|").exec("").length-1}function E(e,t){const n=e&&e.exec(t);return n&&0===n.index}const _=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function j(e,{joinWith:t}){let n=0;return e.map(e=>{n+=1;const t=n;let i=g(e),r="";while(i.length>0){const e=_.exec(i);if(!e){r+=i;break}r+=i.substring(0,e.index),i=i.substring(e.index+e[0].length),"\\"===e[0][0]&&e[1]?r+="\\"+String(Number(e[1])+t):(r+=e[0],"("===e[0]&&n++)}return r}).map(e=>`(${e})`).join(t)}const k=/\b\B/,T="[a-zA-Z]\\w*",C="[a-zA-Z_]\\w*",S="\\b\\d+(\\.\\d+)?",O="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",N="\\b(0b[01]+)",I="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",L=(e={})=>{const t=/^#![ ]*\//;return e.binary&&(e.begin=v(t,/.*\b/,e.binary,/\b.*/)),o({scope:"meta",begin:t,end:/$/,relevance:0,"on:begin":(e,t)=>{0!==e.index&&t.ignoreMatch()}},e)},A={begin:"\\\\[\\s\\S]",relevance:0},B={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[A]},M={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[A]},$={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},R=function(e,t,n={}){const i=o({scope:"comment",begin:e,end:t,contains:[]},n);i.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const r=w("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return i.contains.push({begin:v(/[ ]+/,"(",r,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),i},D=R("//","$"),P=R("/\\*","\\*/"),F=R("#","$"),H={scope:"number",begin:S,relevance:0},q={scope:"number",begin:O,relevance:0},V={scope:"number",begin:N,relevance:0},U={begin:/(?=\/[^/\n]*\/)/,contains:[{scope:"regexp",begin:/\//,end:/\/[gimuy]*/,illegal:/\n/,contains:[A,{begin:/\[/,end:/\]/,relevance:0,contains:[A]}]}]},W={scope:"title",begin:T,relevance:0},z={scope:"title",begin:C,relevance:0},G={begin:"\\.\\s*"+C,relevance:0},K=function(e){return Object.assign(e,{"on:begin":(e,t)=>{t.data._beginMatch=e[1]},"on:end":(e,t)=>{t.data._beginMatch!==e[1]&&t.ignoreMatch()}})};var Y=Object.freeze({__proto__:null,MATCH_NOTHING_RE:k,IDENT_RE:T,UNDERSCORE_IDENT_RE:C,NUMBER_RE:S,C_NUMBER_RE:O,BINARY_NUMBER_RE:N,RE_STARTERS_RE:I,SHEBANG:L,BACKSLASH_ESCAPE:A,APOS_STRING_MODE:B,QUOTE_STRING_MODE:M,PHRASAL_WORDS_MODE:$,COMMENT:R,C_LINE_COMMENT_MODE:D,C_BLOCK_COMMENT_MODE:P,HASH_COMMENT_MODE:F,NUMBER_MODE:H,C_NUMBER_MODE:q,BINARY_NUMBER_MODE:V,REGEXP_MODE:U,TITLE_MODE:W,UNDERSCORE_TITLE_MODE:z,METHOD_GUARD:G,END_SAME_AS_BEGIN:K});function X(e,t){const n=e.input[e.index-1];"."===n&&t.ignoreMatch()}function Z(e,t){void 0!==e.className&&(e.scope=e.className,delete e.className)}function J(e,t){t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=X,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,void 0===e.relevance&&(e.relevance=0))}function Q(e,t){Array.isArray(e.illegal)&&(e.illegal=w(...e.illegal))}function ee(e,t){if(e.match){if(e.begin||e.end)throw new Error("begin & end are not supported with match");e.begin=e.match,delete e.match}}function te(e,t){void 0===e.relevance&&(e.relevance=1)}const ne=(e,t)=>{if(!e.beforeMatch)return;if(e.starts)throw new Error("beforeMatch cannot be used with starts");const n=Object.assign({},e);Object.keys(e).forEach(t=>{delete e[t]}),e.keywords=n.keywords,e.begin=v(n.beforeMatch,f(n.begin)),e.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},e.relevance=0,delete n.beforeMatch},ie=["of","and","for","in","not","or","if","then","parent","list","value"],re="keyword";function se(e,t,n=re){const i=Object.create(null);return"string"===typeof e?r(n,e.split(" ")):Array.isArray(e)?r(n,e):Object.keys(e).forEach((function(n){Object.assign(i,se(e[n],t,n))})),i;function r(e,n){t&&(n=n.map(e=>e.toLowerCase())),n.forEach((function(t){const n=t.split("|");i[n[0]]=[e,ae(n[0],n[1])]}))}}function ae(e,t){return t?Number(t):oe(e)?0:1}function oe(e){return ie.includes(e.toLowerCase())}const ce={},le=e=>{console.error(e)},ue=(e,...t)=>{console.log("WARN: "+e,...t)},de=(e,t)=>{ce[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),ce[`${e}/${t}`]=!0)},he=new Error;function pe(e,t,{key:n}){let i=0;const r=e[n],s={},a={};for(let o=1;o<=t.length;o++)a[o+i]=r[o],s[o+i]=!0,i+=x(t[o-1]);e[n]=a,e[n]._emit=s,e[n]._multi=!0}function ge(e){if(Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw le("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),he;if("object"!==typeof e.beginScope||null===e.beginScope)throw le("beginScope must be object"),he;pe(e,e.begin,{key:"beginScope"}),e.begin=j(e.begin,{joinWith:""})}}function fe(e){if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw le("skip, excludeEnd, returnEnd not compatible with endScope: {}"),he;if("object"!==typeof e.endScope||null===e.endScope)throw le("endScope must be object"),he;pe(e,e.end,{key:"endScope"}),e.end=j(e.end,{joinWith:""})}}function me(e){e.scope&&"object"===typeof e.scope&&null!==e.scope&&(e.beginScope=e.scope,delete e.scope)}function be(e){me(e),"string"===typeof e.beginScope&&(e.beginScope={_wrap:e.beginScope}),"string"===typeof e.endScope&&(e.endScope={_wrap:e.endScope}),ge(e),fe(e)}function ve(e){function t(t,n){return new RegExp(g(t),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(n?"g":""))}class n{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(e,t){t.position=this.position++,this.matchIndexes[this.matchAt]=t,this.regexes.push([t,e]),this.matchAt+=x(e)+1}compile(){0===this.regexes.length&&(this.exec=()=>null);const e=this.regexes.map(e=>e[1]);this.matcherRe=t(j(e,{joinWith:"|"}),!0),this.lastIndex=0}exec(e){this.matcherRe.lastIndex=this.lastIndex;const t=this.matcherRe.exec(e);if(!t)return null;const n=t.findIndex((e,t)=>t>0&&void 0!==e),i=this.matchIndexes[n];return t.splice(0,n),Object.assign(t,i)}}class i{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(e){if(this.multiRegexes[e])return this.multiRegexes[e];const t=new n;return this.rules.slice(e).forEach(([e,n])=>t.addRule(e,n)),t.compile(),this.multiRegexes[e]=t,t}resumingScanAtSamePosition(){return 0!==this.regexIndex}considerAll(){this.regexIndex=0}addRule(e,t){this.rules.push([e,t]),"begin"===t.type&&this.count++}exec(e){const t=this.getMatcher(this.regexIndex);t.lastIndex=this.lastIndex;let n=t.exec(e);if(this.resumingScanAtSamePosition())if(n&&n.index===this.lastIndex);else{const t=this.getMatcher(0);t.lastIndex=this.lastIndex+1,n=t.exec(e)}return n&&(this.regexIndex+=n.position+1,this.regexIndex===this.count&&this.considerAll()),n}}function r(e){const t=new i;return e.contains.forEach(e=>t.addRule(e.begin,{rule:e,type:"begin"})),e.terminatorEnd&&t.addRule(e.terminatorEnd,{type:"end"}),e.illegal&&t.addRule(e.illegal,{type:"illegal"}),t}function s(n,i){const a=n;if(n.isCompiled)return a;[Z,ee,be,ne].forEach(e=>e(n,i)),e.compilerExtensions.forEach(e=>e(n,i)),n.__beforeBegin=null,[J,Q,te].forEach(e=>e(n,i)),n.isCompiled=!0;let o=null;return"object"===typeof n.keywords&&n.keywords.$pattern&&(n.keywords=Object.assign({},n.keywords),o=n.keywords.$pattern,delete n.keywords.$pattern),o=o||/\w+/,n.keywords&&(n.keywords=se(n.keywords,e.case_insensitive)),a.keywordPatternRe=t(o,!0),i&&(n.begin||(n.begin=/\B|\b/),a.beginRe=t(a.begin),n.end||n.endsWithParent||(n.end=/\B|\b/),n.end&&(a.endRe=t(a.end)),a.terminatorEnd=g(a.end)||"",n.endsWithParent&&i.terminatorEnd&&(a.terminatorEnd+=(n.end?"|":"")+i.terminatorEnd)),n.illegal&&(a.illegalRe=t(n.illegal)),n.contains||(n.contains=[]),n.contains=[].concat(...n.contains.map((function(e){return we("self"===e?n:e)}))),n.contains.forEach((function(e){s(e,a)})),n.starts&&s(n.starts,i),a.matcher=r(a),a}if(e.compilerExtensions||(e.compilerExtensions=[]),e.contains&&e.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=o(e.classNameAliases||{}),s(e)}function ye(e){return!!e&&(e.endsWithParent||ye(e.starts))}function we(e){return e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map((function(t){return o(e,{variants:null},t)}))),e.cachedVariants?e.cachedVariants:ye(e)?o(e,{starts:e.starts?o(e.starts):null}):Object.isFrozen(e)?o(e):e}var xe="11.3.1";class Ee extends Error{constructor(e,t){super(e),this.name="HTMLInjectionError",this.html=t}}const _e=a,je=o,ke=Symbol("nomatch"),Te=7,Ce=function(e){const t=Object.create(null),n=Object.create(null),i=[];let a=!0;const o="Could not find the language '{}', did you forget to load/include a language module?",c={disableAutodetect:!0,name:"Plain text",contains:[]};let l={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:p};function u(e){return l.noHighlightRe.test(e)}function d(e){let t=e.className+" ";t+=e.parentNode?e.parentNode.className:"";const n=l.languageDetectRe.exec(t);if(n){const t=B(n[1]);return t||(ue(o.replace("{}",n[1])),ue("Falling back to no-highlight mode for this block.",e)),t?n[1]:"no-highlight"}return t.split(/\s+/).find(e=>u(e)||B(e))}function h(e,t,n){let i="",r="";"object"===typeof t?(i=e,n=t.ignoreIllegals,r=t.language):(de("10.7.0","highlight(lang, code, ...args) has been deprecated."),de("10.7.0","Please use highlight(code, options) instead.\nhttps://github.com/highlightjs/highlight.js/issues/2277"),r=e,i=t),void 0===n&&(n=!0);const s={code:i,language:r};P("before:highlight",s);const a=s.result?s.result:g(s.language,s.code,n);return a.code=s.code,P("after:highlight",a),a}function g(e,n,i,r){const c=Object.create(null);function u(e,t){return e.keywords[t]}function d(){if(!O.keywords)return void I.addText(L);let e=0;O.keywordPatternRe.lastIndex=0;let t=O.keywordPatternRe.exec(L),n="";while(t){n+=L.substring(e,t.index);const i=T.case_insensitive?t[0].toLowerCase():t[0],r=u(O,i);if(r){const[e,s]=r;if(I.addText(n),n="",c[i]=(c[i]||0)+1,c[i]<=Te&&(A+=s),e.startsWith("_"))n+=t[0];else{const n=T.classNameAliases[e]||e;I.addKeyword(t[0],n)}}else n+=t[0];e=O.keywordPatternRe.lastIndex,t=O.keywordPatternRe.exec(L)}n+=L.substr(e),I.addText(n)}function h(){if(""===L)return;let e=null;if("string"===typeof O.subLanguage){if(!t[O.subLanguage])return void I.addText(L);e=g(O.subLanguage,L,!0,N[O.subLanguage]),N[O.subLanguage]=e._top}else e=x(L,O.subLanguage.length?O.subLanguage:null);O.relevance>0&&(A+=e.relevance),I.addSublanguage(e._emitter,e.language)}function p(){null!=O.subLanguage?h():d(),L=""}function f(e,t){let n=1;while(void 0!==t[n]){if(!e._emit[n]){n++;continue}const i=T.classNameAliases[e[n]]||e[n],r=t[n];i?I.addKeyword(r,i):(L=r,d(),L=""),n++}}function m(e,t){return e.scope&&"string"===typeof e.scope&&I.openNode(T.classNameAliases[e.scope]||e.scope),e.beginScope&&(e.beginScope._wrap?(I.addKeyword(L,T.classNameAliases[e.beginScope._wrap]||e.beginScope._wrap),L=""):e.beginScope._multi&&(f(e.beginScope,t),L="")),O=Object.create(e,{parent:{value:O}}),O}function b(e,t,n){let i=E(e.endRe,n);if(i){if(e["on:end"]){const n=new s(e);e["on:end"](t,n),n.isMatchIgnored&&(i=!1)}if(i){while(e.endsParent&&e.parent)e=e.parent;return e}}if(e.endsWithParent)return b(e.parent,t,n)}function v(e){return 0===O.matcher.regexIndex?(L+=e[0],1):(R=!0,0)}function y(e){const t=e[0],n=e.rule,i=new s(n),r=[n.__beforeBegin,n["on:begin"]];for(const s of r)if(s&&(s(e,i),i.isMatchIgnored))return v(t);return n.skip?L+=t:(n.excludeBegin&&(L+=t),p(),n.returnBegin||n.excludeBegin||(L=t)),m(n,e),n.returnBegin?0:t.length}function w(e){const t=e[0],i=n.substr(e.index),r=b(O,e,i);if(!r)return ke;const s=O;O.endScope&&O.endScope._wrap?(p(),I.addKeyword(t,O.endScope._wrap)):O.endScope&&O.endScope._multi?(p(),f(O.endScope,e)):s.skip?L+=t:(s.returnEnd||s.excludeEnd||(L+=t),p(),s.excludeEnd&&(L=t));do{O.scope&&I.closeNode(),O.skip||O.subLanguage||(A+=O.relevance),O=O.parent}while(O!==r.parent);return r.starts&&m(r.starts,e),s.returnEnd?0:t.length}function _(){const e=[];for(let t=O;t!==T;t=t.parent)t.scope&&e.unshift(t.scope);e.forEach(e=>I.openNode(e))}let j={};function k(t,r){const s=r&&r[0];if(L+=t,null==s)return p(),0;if("begin"===j.type&&"end"===r.type&&j.index===r.index&&""===s){if(L+=n.slice(r.index,r.index+1),!a){const t=new Error(`0 width match regex (${e})`);throw t.languageName=e,t.badRule=j.rule,t}return 1}if(j=r,"begin"===r.type)return y(r);if("illegal"===r.type&&!i){const e=new Error('Illegal lexeme "'+s+'" for mode "'+(O.scope||"")+'"');throw e.mode=O,e}if("end"===r.type){const e=w(r);if(e!==ke)return e}if("illegal"===r.type&&""===s)return 1;if($>1e5&&$>3*r.index){const e=new Error("potential infinite loop, way more iterations than matches");throw e}return L+=s,s.length}const T=B(e);if(!T)throw le(o.replace("{}",e)),new Error('Unknown language: "'+e+'"');const C=ve(T);let S="",O=r||C;const N={},I=new l.__emitter(l);_();let L="",A=0,M=0,$=0,R=!1;try{for(O.matcher.considerAll();;){$++,R?R=!1:O.matcher.considerAll(),O.matcher.lastIndex=M;const e=O.matcher.exec(n);if(!e)break;const t=n.substring(M,e.index),i=k(t,e);M=e.index+i}return k(n.substr(M)),I.closeAllNodes(),I.finalize(),S=I.toHTML(),{language:e,value:S,relevance:A,illegal:!1,_emitter:I,_top:O}}catch(D){if(D.message&&D.message.includes("Illegal"))return{language:e,value:_e(n),illegal:!0,relevance:0,_illegalBy:{message:D.message,index:M,context:n.slice(M-100,M+100),mode:D.mode,resultSoFar:S},_emitter:I};if(a)return{language:e,value:_e(n),illegal:!1,relevance:0,errorRaised:D,_emitter:I,_top:O};throw D}}function y(e){const t={value:_e(e),illegal:!1,relevance:0,_top:c,_emitter:new l.__emitter(l)};return t._emitter.addText(e),t}function x(e,n){n=n||l.languages||Object.keys(t);const i=y(e),r=n.filter(B).filter($).map(t=>g(t,e,!1));r.unshift(i);const s=r.sort((e,t)=>{if(e.relevance!==t.relevance)return t.relevance-e.relevance;if(e.language&&t.language){if(B(e.language).supersetOf===t.language)return 1;if(B(t.language).supersetOf===e.language)return-1}return 0}),[a,o]=s,c=a;return c.secondBest=o,c}function _(e,t,i){const r=t&&n[t]||i;e.classList.add("hljs"),e.classList.add("language-"+r)}function j(e){let t=null;const n=d(e);if(u(n))return;if(P("before:highlightElement",{el:e,language:n}),e.children.length>0&&(l.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/issues/2886"),console.warn(e)),l.throwUnescapedHTML)){const t=new Ee("One of your code blocks includes unescaped HTML.",e.innerHTML);throw t}t=e;const i=t.textContent,r=n?h(i,{language:n,ignoreIllegals:!0}):x(i);e.innerHTML=r.value,_(e,n,r.language),e.result={language:r.language,re:r.relevance,relevance:r.relevance},r.secondBest&&(e.secondBest={language:r.secondBest.language,relevance:r.secondBest.relevance}),P("after:highlightElement",{el:e,result:r,text:i})}function k(e){l=je(l,e)}const T=()=>{O(),de("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function C(){O(),de("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let S=!1;function O(){if("loading"===document.readyState)return void(S=!0);const e=document.querySelectorAll(l.cssSelector);e.forEach(j)}function N(){S&&O()}function I(n,i){let r=null;try{r=i(e)}catch(s){if(le("Language definition for '{}' could not be registered.".replace("{}",n)),!a)throw s;le(s),r=c}r.name||(r.name=n),t[n]=r,r.rawDefinition=i.bind(null,e),r.aliases&&M(r.aliases,{languageName:n})}function L(e){delete t[e];for(const t of Object.keys(n))n[t]===e&&delete n[t]}function A(){return Object.keys(t)}function B(e){return e=(e||"").toLowerCase(),t[e]||t[n[e]]}function M(e,{languageName:t}){"string"===typeof e&&(e=[e]),e.forEach(e=>{n[e.toLowerCase()]=t})}function $(e){const t=B(e);return t&&!t.disableAutodetect}function R(e){e["before:highlightBlock"]&&!e["before:highlightElement"]&&(e["before:highlightElement"]=t=>{e["before:highlightBlock"](Object.assign({block:t.el},t))}),e["after:highlightBlock"]&&!e["after:highlightElement"]&&(e["after:highlightElement"]=t=>{e["after:highlightBlock"](Object.assign({block:t.el},t))})}function D(e){R(e),i.push(e)}function P(e,t){const n=e;i.forEach((function(e){e[n]&&e[n](t)}))}function F(e){return de("10.7.0","highlightBlock will be removed entirely in v12.0"),de("10.7.0","Please use highlightElement now."),j(e)}"undefined"!==typeof window&&window.addEventListener&&window.addEventListener("DOMContentLoaded",N,!1),Object.assign(e,{highlight:h,highlightAuto:x,highlightAll:O,highlightElement:j,highlightBlock:F,configure:k,initHighlighting:T,initHighlightingOnLoad:C,registerLanguage:I,unregisterLanguage:L,listLanguages:A,getLanguage:B,registerAliases:M,autoDetection:$,inherit:je,addPlugin:D}),e.debugMode=function(){a=!1},e.safeMode=function(){a=!0},e.versionString=xe,e.regex={concat:v,lookahead:f,either:w,optional:b,anyNumberOfTimes:m};for(const s in Y)"object"===typeof Y[s]&&r(Y[s]);return Object.assign(e,Y),e};var Se=Ce({});e.exports=Se,Se.HighlightJS=Se,Se.default=Se},1417:function(e,t,n){var i={"./markdown":["84cb","highlight-js-custom-markdown"],"./markdown.js":["84cb","highlight-js-custom-markdown"],"./swift":["81c8","highlight-js-custom-swift"],"./swift.js":["81c8","highlight-js-custom-swift"]};function r(e){if(!n.o(i,e))return Promise.resolve().then((function(){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=i[e],r=t[0];return n.e(t[1]).then((function(){return n(r)}))}r.keys=function(){return Object.keys(i)},r.id="1417",e.exports=r},"146e":function(e,t,n){"use strict";var i=n("8a61");t["a"]={mixins:[i["a"]],mounted(){this.$route.hash&&this.scrollToElement(this.$route.hash)}}},"189f":function(e,t,n){},2224:function(e,t,n){"use strict";n("b392")},"25a9":function(e,t,n){"use strict";n.d(t,"b",(function(){return h})),n.d(t,"d",(function(){return p})),n.d(t,"a",(function(){return g})),n.d(t,"c",(function(){return f}));var i=n("748c"),r=n("d26a"),s=n("3bdd"),a=n("6842");class o extends Error{constructor({location:e,response:t}){super("Request redirected"),this.location=e,this.response=t}}class c extends Error{constructor(e){super("Unable to fetch data"),this.route=e}}async function l(e,t={}){function n(e){return("ide"!==Object({NODE_ENV:"production",VUE_APP_TITLE:"Documentation",BASE_URL:"{{BASE_PATH}}/"}).VUE_APP_TARGET||0!==e.status)&&!e.ok}const i=new URL(e,window.location.href),a=Object(r["c"])(t);a&&(i.search=a);const c=await fetch(i.href);if(n(c))throw c;if(c.redirected)throw new o({location:c.url,response:c});const l=await c.json();return Object(s["c"])(l.schemaVersion),l}function u(e){const t=e.replace(/\/$/,"");return Object(i["c"])([a["a"],"data",t])+".json"}function d(e){const{pathname:t,search:n}=new URL(e),i=/\/data(\/.*).json$/,r=i.exec(t);return r?r[1]+n:t+n}async function h(e,t,n){const i=u(e.path);let r;try{r=await l(i,e.query)}catch(s){if("ide"===Object({NODE_ENV:"production",VUE_APP_TITLE:"Documentation",BASE_URL:"{{BASE_PATH}}/"}).VUE_APP_TARGET)throw console.error(s),!1;if(s instanceof o)throw d(s.location);s.status&&404===s.status?n({name:"not-found",params:[e.path]}):n(new c(e))}return r}function p(e,t){return!Object(r["a"])(e,t)}function g(e){return JSON.parse(JSON.stringify(e))}async function f(){const e=new URL(""+Object(i["c"])([a["a"],"index/index.json"]),window.location.href);return l(e)}},"287e":function(e,t,n){},"2ab3":function(e,t,n){var i={"./bash":["f0f8","highlight-js-bash"],"./bash.js":["f0f8","highlight-js-bash"],"./c":["1fe5","highlight-js-c"],"./c.js":["1fe5","highlight-js-c"],"./cpp":["0209","highlight-js-cpp"],"./cpp.js":["0209","highlight-js-cpp"],"./css":["ee8c","highlight-js-css"],"./css.js":["ee8c","highlight-js-css"],"./diff":["48b8","highlight-js-diff"],"./diff.js":["48b8","highlight-js-diff"],"./http":["c01d","highlight-js-http"],"./http.js":["c01d","highlight-js-http"],"./java":["332f","highlight-js-java"],"./java.js":["332f","highlight-js-java"],"./javascript":["4dd1","highlight-js-javascript"],"./javascript.js":["4dd1","highlight-js-javascript"],"./json":["5ad2","highlight-js-json"],"./json.js":["5ad2","highlight-js-json"],"./llvm":["7c30","highlight-js-llvm"],"./llvm.js":["7c30","highlight-js-llvm"],"./markdown":["04b0","highlight-js-markdown"],"./markdown.js":["04b0","highlight-js-markdown"],"./objectivec":["9bf2","highlight-js-objectivec"],"./objectivec.js":["9bf2","highlight-js-objectivec"],"./perl":["6a51","highlight-js-perl"],"./perl.js":["6a51","highlight-js-perl"],"./php":["2907","highlight-js-php"],"./php.js":["2907","highlight-js-php"],"./python":["9510","highlight-js-python"],"./python.js":["9510","highlight-js-python"],"./ruby":["82cb","highlight-js-ruby"],"./ruby.js":["82cb","highlight-js-ruby"],"./scss":["6113","highlight-js-scss"],"./scss.js":["6113","highlight-js-scss"],"./shell":["b65b","highlight-js-shell"],"./shell.js":["b65b","highlight-js-shell"],"./swift":["2a39","highlight-js-swift"],"./swift.js":["2a39","highlight-js-swift"],"./xml":["8dcb","highlight-js-xml"],"./xml.js":["8dcb","highlight-js-xml"]};function r(e){if(!n.o(i,e))return Promise.resolve().then((function(){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=i[e],r=t[0];return n.e(t[1]).then((function(){return n.t(r,7)}))}r.keys=function(){return Object.keys(i)},r.id="2ab3",e.exports=r},"30b0":function(e,t,n){},"34b0":function(e,t,n){"use strict";var i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("SVGIcon",{staticClass:"inline-chevron-right-icon",attrs:{viewBox:"0 0 14 14"}},[n("path",{attrs:{d:"M2.964 1.366l0.649-0.76 7.426 6.343-7.423 6.445-0.655-0.755 6.545-5.683-6.542-5.59z"}})])},r=[],s=n("be08"),a={name:"InlineChevronRightIcon",components:{SVGIcon:s["a"]}},o=a,c=n("2877"),l=Object(c["a"])(o,i,r,!1,null,null,null);t["a"]=l.exports},"3b8f":function(e,t,n){},"3bdd":function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return a})),n.d(t,"c",(function(){return d}));const i={major:0,minor:3,patch:0};function r({major:e,minor:t,patch:n}){return[e,t,n].join(".")}function s(e){const[t=0,n=0,i=0]=e.split(".");return[Number(t),Number(n),Number(i)]}function a(e,t){const n=s(e),i=s(t);for(let r=0;ri[r])return 1;if(n[r]`[Swift-DocC-Render] The render node version for this page (${e}) has a different major version component than Swift-DocC-Render supports (${o}). Compatibility is not guaranteed.`;function u(e){const{major:t,minor:n}=e,{major:s,minor:a}=i;return t!==s?l(r(e)):n>a?c(r(e)):""}function d(e){if(!e)return;const t=u(e);t&&console.warn(t)}},"43fe":function(e,t,n){"use strict";n("4573")},4573:function(e,t,n){},"47cc":function(e,t,n){},"4c7a":function(e,t,n){},"4d50":function(e,t,n){"use strict";n("ec05")},"50fc":function(e,t,n){},"517a":function(e,t,n){"use strict";n("8222")},"52e4":function(e,t,n){"use strict";var i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("WordBreak",{attrs:{tag:"code"}},[e._t("default")],2)},r=[],s=n("7b1f"),a={name:"CodeVoice",components:{WordBreak:s["a"]}},o=a,c=(n("8c92"),n("2877")),l=Object(c["a"])(o,i,r,!1,null,"05f4a5b7",null);t["a"]=l.exports},5677:function(e,t,n){"use strict";var i=n("e3ab"),r=n("7b69"),s=n("52e4"),a=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"DictionaryExample"},[e._t("default"),n("CollapsibleCodeListing",{attrs:{content:e.example.content,showLineNumbers:""}})],2)},o=[],c=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"collapsible-code-listing",class:{"single-line":1===e.content[0].code.length}},[n("pre",[n("div",e._l(this.content,(function(t,i){return n("div",{key:i,class:["container-general",{collapsible:!0===t.collapsible},{collapsed:!0===t.collapsible&&e.collapsed}]},e._l(t.code,(function(t,i){return n("code",{key:i,staticClass:"code-line-container"},[e._v("\n "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.showLineNumbers,expression:"showLineNumbers"}],staticClass:"code-number"}),e._v("\n "),n("div",{staticClass:"code-line"},[e._v(e._s(t))]),e._v("\n ")])})),0)})),0)])])},l=[],u={name:"CollapsibleCodeListing",props:{collapsed:{type:Boolean,required:!1},content:{type:Array,required:!0},showLineNumbers:{type:Boolean,default:()=>!0}}},d=u,h=(n("9975"),n("2877")),p=Object(h["a"])(d,c,l,!1,null,"d68ae420",null),g=p.exports,f={name:"DictionaryExample",components:{CollapsibleCodeListing:g},props:{example:{type:Object,required:!0}}},m=f,b=Object(h["a"])(m,a,o,!1,null,null,null),v=b.exports,y=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("Row",{staticClass:"endpoint-example"},[n("Column",{staticClass:"example-code"},[e._t("default"),n("Tabnav",{model:{value:e.currentTab,callback:function(t){e.currentTab=t},expression:"currentTab"}},[n("TabnavItem",{attrs:{value:e.Tab.request}},[e._v(e._s(e.Tab.request))]),n("TabnavItem",{attrs:{value:e.Tab.response}},[e._v(e._s(e.Tab.response))])],1),n("div",{staticClass:"output"},[e.isCurrent(e.Tab.request)?n("div",{staticClass:"code"},[n("CollapsibleCodeListing",e._b({attrs:{collapsed:e.isCollapsed,showLineNumbers:""}},"CollapsibleCodeListing",e.request,!1))],1):e._e(),e.isCurrent(e.Tab.response)?n("div",{staticClass:"code"},[n("CollapsibleCodeListing",e._b({attrs:{collapsed:e.isCollapsed,showLineNumbers:""}},"CollapsibleCodeListing",e.response,!1))],1):e._e()]),e.isCollapsible?n("div",{staticClass:"controls"},[e.isCollapsed?n("a",{staticClass:"toggle",attrs:{href:"#"},on:{click:function(t){return t.preventDefault(),e.showMore.apply(null,arguments)}}},[n("InlinePlusCircleSolidIcon",{staticClass:"control-icon icon-inline"}),e._v(" More ")],1):n("a",{staticClass:"toggle",attrs:{href:"#"},on:{click:function(t){return t.preventDefault(),e.showLess.apply(null,arguments)}}},[n("InlineMinusCircleSolidIcon",{staticClass:"control-icon icon-inline"}),e._v(" Less ")],1)]):e._e()],2)],1)},w=[],x=n("0f00"),E=n("620a"),_=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("nav",{staticClass:"tabnav"},[n("ul",{staticClass:"tabnav-items"},[e._t("default")],2)])},j=[];const k="tabnavData";var T={name:"Tabnav",constants:{ProvideKey:k},provide(){const e={selectTab:this.selectTab};return Object.defineProperty(e,"activeTab",{enumerable:!0,get:()=>this.value}),{[k]:e}},props:{value:{type:String,required:!0}},methods:{selectTab(e){this.$emit("input",e)}}},C=T,S=(n("bab1"),Object(h["a"])(C,_,j,!1,null,"42371214",null)),O=S.exports,N=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("li",{staticClass:"tabnav-item"},[n("a",{staticClass:"tabnav-link",class:{active:e.isActive},attrs:{href:"#"},on:{click:function(t){return t.preventDefault(),e.tabnavData.selectTab(e.value)}}},[e._t("default")],2)])},I=[],L={name:"TabnavItem",inject:{tabnavData:{default:{activeTab:null,selectTab:()=>{}}}},props:{value:{type:String,default:""}},computed:{isActive({tabnavData:e,value:t}){return e.activeTab===t}}},A=L,B=(n("c064"),Object(h["a"])(A,N,I,!1,null,"723a9588",null)),M=B.exports,$=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("SVGIcon",{staticClass:"inline-plus-circle-solid-icon",attrs:{viewBox:"0 0 14 14"}},[n("path",{attrs:{d:"M7.005 0.5h-0.008c-1.791 0.004-3.412 0.729-4.589 1.9l0-0c-1.179 1.177-1.908 2.803-1.908 4.6 0 3.59 2.91 6.5 6.5 6.5s6.5-2.91 6.5-6.5c0-3.587-2.906-6.496-6.492-6.5h-0zM4.005 7.52v-1h2.5v-2.51h1v2.51h2.5v1h-2.501v2.49h-1v-2.49z"}})])},R=[],D=n("be08"),P={name:"InlinePlusCircleSolidIcon",components:{SVGIcon:D["a"]}},F=P,H=Object(h["a"])(F,$,R,!1,null,null,null),q=H.exports,V=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("SVGIcon",{staticClass:"inline-minus-circle-solid-icon",attrs:{viewBox:"0 0 14 14"}},[n("path",{attrs:{d:"m6.98999129.48999129c3.58985091 0 6.50000001 2.91014913 6.50000001 6.5 0 3.58985091-2.9101491 6.50000001-6.50000001 6.50000001-3.58985087 0-6.5-2.9101491-6.5-6.50000001 0-3.58985087 2.91014913-6.5 6.5-6.5zm3 6.02001742h-6v1h6z","fill-rule":"evenodd"}})])},U=[],W={name:"InlineMinusCircleSolidIcon",components:{SVGIcon:D["a"]}},z=W,G=Object(h["a"])(z,V,U,!1,null,null,null),K=G.exports;const Y={request:"Request",response:"Response"};var X={name:"EndpointExample",components:{InlineMinusCircleSolidIcon:K,InlinePlusCircleSolidIcon:q,TabnavItem:M,Tabnav:O,CollapsibleCodeListing:g,Row:x["a"],Column:E["a"]},constants:{Tab:Y},props:{request:{type:Object,required:!0},response:{type:Object,required:!0}},data(){return{isCollapsed:!0,currentTab:Y.request}},computed:{Tab:()=>Y,isCollapsible:({response:e,request:t,currentTab:n})=>{const i={[Y.request]:t.content,[Y.response]:e.content}[n]||[];return i.some(({collapsible:e})=>e)}},methods:{isCurrent(e){return this.currentTab===e},showMore(){this.isCollapsed=!1},showLess(){this.isCollapsed=!0}}},Z=X,J=(n("9a2b"),Object(h["a"])(Z,y,w,!1,null,"6197ce3f",null)),Q=J.exports,ee=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("figure",{attrs:{id:e.anchor}},[e._t("default")],2)},te=[],ne={name:"Figure",props:{anchor:{type:String,required:!0}}},ie=ne,re=(n("57ea"),Object(h["a"])(ie,ee,te,!1,null,"7be42fb4",null)),se=re.exports,ae=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("figcaption",{staticClass:"caption"},[n("strong",[e._v(e._s(e.title))]),e._v(" "),e._t("default")],2)},oe=[],ce={name:"FigureCaption",props:{title:{type:String,required:!0}}},le=ce,ue=(n("e7fb"),Object(h["a"])(le,ae,oe,!1,null,"0bcb8b58",null)),de=ue.exports,he=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("ImageAsset",{attrs:{alt:e.alt,variants:e.variants}})},pe=[],ge=n("8bd9"),fe={name:"InlineImage",components:{ImageAsset:ge["a"]},props:{alt:{type:String,default:""},variants:{type:Array,required:!0}}},me=fe,be=(n("cb92"),Object(h["a"])(me,he,pe,!1,null,"3a939631",null)),ve=be.exports,ye=n("86d8"),we=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"table-wrapper"},[n("table",[e._t("default")],2)])},xe=[],Ee={name:"Table"},_e=Ee,je=(n("72af"),n("90f3"),Object(h["a"])(_e,we,xe,!1,null,"358dcd5e",null)),ke=je.exports,Te=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("s",[e._t("default")],2)},Ce=[],Se={name:"StrikeThrough"},Oe=Se,Ne=(n("830f"),Object(h["a"])(Oe,Te,Ce,!1,null,"eb91ce54",null)),Ie=Ne.exports;const Le={aside:"aside",codeListing:"codeListing",endpointExample:"endpointExample",heading:"heading",orderedList:"orderedList",paragraph:"paragraph",table:"table",termList:"termList",unorderedList:"unorderedList",dictionaryExample:"dictionaryExample"},Ae={codeVoice:"codeVoice",emphasis:"emphasis",image:"image",inlineHead:"inlineHead",link:"link",newTerm:"newTerm",reference:"reference",strong:"strong",text:"text",superscript:"superscript",subscript:"subscript",strikethrough:"strikethrough"},Be={both:"both",column:"column",none:"none",row:"row"};function Me(e,t){const n=n=>n.map(Me(e,t)),a=t=>t.map(t=>e("li",{},n(t.content))),o=(t,i=Be.none)=>{switch(i){case Be.both:{const[i,...r]=t;return[e("thead",{},[e("tr",{},i.map(t=>e("th",{attrs:{scope:"col"}},n(t))))]),e("tbody",{},r.map(([t,...i])=>e("tr",{},[e("th",{attrs:{scope:"row"}},n(t)),...i.map(t=>e("td",{},n(t)))])))]}case Be.column:return[e("tbody",{},t.map(([t,...i])=>e("tr",{},[e("th",{attrs:{scope:"row"}},n(t)),...i.map(t=>e("td",{},n(t)))])))];case Be.row:{const[i,...r]=t;return[e("thead",{},[e("tr",{},i.map(t=>e("th",{attrs:{scope:"col"}},n(t))))]),e("tbody",{},r.map(t=>e("tr",{},t.map(t=>e("td",{},n(t))))))]}default:return[e("tbody",{},t.map(t=>e("tr",{},t.map(t=>e("td",{},n(t))))))]}},c=({metadata:{abstract:t,anchor:i,title:r},...s})=>e(se,{props:{anchor:i}},[...r&&t&&t.length?[e(de,{props:{title:r}},n(t))]:[],n([s])]);return function(l){switch(l.type){case Le.aside:{const t={kind:l.style,name:l.name};return e(i["a"],{props:t},n(l.content))}case Le.codeListing:{if(l.metadata&&l.metadata.anchor)return c(l);const t={syntax:l.syntax,fileType:l.fileType,content:l.code,showLineNumbers:l.showLineNumbers};return e(r["a"],{props:t})}case Le.endpointExample:{const t={request:l.request,response:l.response};return e(Q,{props:t},n(l.summary||[]))}case Le.heading:return e("h"+l.level,{attrs:{id:l.anchor}},l.text);case Le.orderedList:return e("ol",{attrs:{start:l.start}},a(l.items));case Le.paragraph:return e("p",{},n(l.inlineContent));case Le.table:return l.metadata&&l.metadata.anchor?c(l):e(ke,{},o(l.rows,l.header));case Le.termList:return e("dl",{},l.items.map(({term:t,definition:i})=>[e("dt",{},n(t.inlineContent)),e("dd",{},n(i.content))]));case Le.unorderedList:return e("ul",{},a(l.items));case Le.dictionaryExample:{const t={example:l.example};return e(v,{props:t},n(l.summary||[]))}case Ae.codeVoice:return e(s["a"],{},l.code);case Ae.emphasis:case Ae.newTerm:return e("em",n(l.inlineContent));case Ae.image:{if(l.metadata&&l.metadata.anchor)return c(l);const n=t[l.identifier];return n?e(ve,{props:{alt:n.alt,variants:n.variants}}):null}case Ae.link:return e("a",{attrs:{href:l.destination}},l.title);case Ae.reference:{const i=t[l.identifier];if(!i)return null;const r=l.overridingTitleInlineContent||i.titleInlineContent,s=l.overridingTitle||i.title;return e(ye["a"],{props:{url:i.url,kind:i.kind,role:i.role,isActive:l.isActive,ideTitle:i.ideTitle,titleStyle:i.titleStyle}},r?n(r):s)}case Ae.strong:case Ae.inlineHead:return e("strong",n(l.inlineContent));case Ae.text:return l.text;case Ae.superscript:return e("sup",n(l.inlineContent));case Ae.subscript:return e("sub",n(l.inlineContent));case Ae.strikethrough:return e(Ie,n(l.inlineContent));default:return null}}}var $e,Re,De={name:"ContentNode",constants:{TableHeaderStyle:Be},render:function(e){return e(this.tag,{class:"content"},this.content.map(Me(e,this.references),this))},inject:{references:{default(){return{}}}},props:{content:{type:Array,required:!0},tag:{type:String,default:()=>"div"}},methods:{map(e){function t(n=[]){return n.map(n=>{switch(n.type){case Le.aside:return e({...n,content:t(n.content)});case Le.dictionaryExample:return e({...n,summary:t(n.summary)});case Le.paragraph:case Ae.emphasis:case Ae.strong:case Ae.inlineHead:case Ae.superscript:case Ae.subscript:case Ae.strikethrough:case Ae.newTerm:return e({...n,inlineContent:t(n.inlineContent)});case Le.orderedList:case Le.unorderedList:return e({...n,items:n.items.map(e=>({...e,content:t(e.content)}))});case Le.table:return e({...n,rows:n.rows.map(e=>e.map(t))});case Le.termList:return e({...n,items:n.items.map(e=>({...e,term:{inlineContent:t(e.term.inlineContent)},definition:{content:t(e.definition.content)}}))});default:return e(n)}})}return t(this.content)},forEach(e){function t(n=[]){n.forEach(n=>{switch(e(n),n.type){case Le.aside:t(n.content);break;case Le.paragraph:case Ae.emphasis:case Ae.strong:case Ae.inlineHead:case Ae.newTerm:case Ae.superscript:case Ae.subscript:case Ae.strikethrough:t(n.inlineContent);break;case Le.orderedList:case Le.unorderedList:n.items.forEach(e=>t(e.content));break;case Le.dictionaryExample:t(n.summary);break;case Le.table:n.rows.forEach(e=>{e.forEach(t)});break;case Le.termList:n.items.forEach(e=>{t(e.term.inlineContent),t(e.definition.content)});break}})}return t(this.content)},reduce(e,t){let n=t;return this.forEach(t=>{n=e(n,t)}),n}},computed:{plaintext(){return this.reduce((e,t)=>t.type===Le.paragraph?e+"\n":t.type===Ae.text?`${e}${t.text}`:e,"").trim()}},BlockType:Le,InlineType:Ae},Pe=De,Fe=Object(h["a"])(Pe,$e,Re,!1,null,null,null);t["a"]=Fe.exports},"57ea":function(e,t,n){"use strict";n("971b")},"598a":function(e,t,n){},"5da3":function(e,t,n){e.exports=n.p+"img/no-image@2x.df2a0a50.png"},"620a":function(e,t,n){"use strict";var i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"col",class:e.classes},[e._t("default")],2)},r=[];const s=0,a=12,o=new Set(["large","medium","small"]),c=e=>({type:Object,default:()=>({}),validator:t=>Object.keys(t).every(n=>o.has(n)&&e(t[n]))}),l=c(e=>"boolean"===typeof e),u=c(e=>"number"===typeof e&&e>=s&&e<=a);var d={name:"GridColumn",props:{isCentered:l,isUnCentered:l,span:{...u,default:()=>({large:a})}},computed:{classes:function(){return{["large-"+this.span.large]:void 0!==this.span.large,["medium-"+this.span.medium]:void 0!==this.span.medium,["small-"+this.span.small]:void 0!==this.span.small,"large-centered":!!this.isCentered.large,"medium-centered":!!this.isCentered.medium,"small-centered":!!this.isCentered.small,"large-uncentered":!!this.isUnCentered.large,"medium-uncentered":!!this.isUnCentered.medium,"small-uncentered":!!this.isUnCentered.small}}}},h=d,p=(n("6e4a"),n("2877")),g=Object(p["a"])(h,i,r,!1,null,"2ee3ad8b",null);t["a"]=g.exports},"621f":function(e,t,n){"use strict";n("b1d4")},"66cd":function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));const i={article:"article",codeListing:"codeListing",collection:"collection",collectionGroup:"collectionGroup",containerSymbol:"containerSymbol",devLink:"devLink",dictionarySymbol:"dictionarySymbol",generic:"generic",link:"link",media:"media",pseudoCollection:"pseudoCollection",pseudoSymbol:"pseudoSymbol",restRequestSymbol:"restRequestSymbol",sampleCode:"sampleCode",symbol:"symbol",table:"table",learn:"learn",overview:"overview",project:"project",tutorial:"tutorial",resources:"resources"}},"6cc4":function(e,t,n){},"6e4a":function(e,t,n){"use strict";n("05a1")},"72af":function(e,t,n){"use strict";n("d541")},"72e7":function(e,t,n){"use strict";const i={up:"up",down:"down"};t["a"]={constants:{IntersectionDirections:i},data(){return{intersectionObserver:null,intersectionPreviousScrollY:0,intersectionScrollDirection:i.down}},computed:{intersectionThreshold(){const e=[];for(let t=0;t<=1;t+=.01)e.push(t);return e},intersectionRoot(){return null},intersectionRootMargin(){return"0px 0px 0px 0px"},intersectionObserverOptions(){return{root:this.intersectionRoot,rootMargin:this.intersectionRootMargin,threshold:this.intersectionThreshold}}},async mounted(){await n.e("chunk-2d0d3105").then(n.t.bind(null,"5abe",7)),this.intersectionObserver=new IntersectionObserver(e=>{this.detectIntersectionScrollDirection();const t=this.onIntersect;t?e.forEach(t):console.warn("onIntersect not implemented")},this.intersectionObserverOptions),this.getIntersectionTargets().forEach(e=>{this.intersectionObserver.observe(e)})},beforeDestroy(){this.intersectionObserver&&this.intersectionObserver.disconnect()},methods:{getIntersectionTargets(){return[this.$el]},detectIntersectionScrollDirection(){window.scrollYthis.intersectionPreviousScrollY&&(this.intersectionScrollDirection=i.up),this.intersectionPreviousScrollY=window.scrollY}}}},"76ab":function(e,t,n){"use strict";var i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n(e.resolvedComponent,e._b({tag:"component",staticClass:"button-cta",class:{"is-dark":e.isDark}},"component",e.componentProps,!1),[e._t("default")],2)},r=[],s=n("86d8"),a={name:"ButtonLink",components:{Reference:s["a"]},props:{url:{type:String,required:!1},isDark:{type:Boolean,default:!1}},computed:{resolvedComponent:({url:e})=>e?s["a"]:"button",componentProps:({url:e})=>e?{url:e}:{}}},o=a,c=(n("621f"),n("2877")),l=Object(c["a"])(o,i,r,!1,null,"494ad9c8",null);t["a"]=l.exports},"7b1f":function(e,t,n){"use strict";var i,r,s={functional:!0,name:"WordBreak",render(e,{props:t,slots:n,data:i}){const r=n().default||[],s=r.filter(e=>e.text&&!e.tag);if(0===s.length||s.length!==r.length)return e(t.tag,i,r);const a=s.map(({text:e})=>e).join(),o=[];let c=null,l=0;while(null!==(c=t.safeBoundaryPattern.exec(a))){const t=c.index+1;o.push(a.slice(l,t)),o.push(e("wbr",{key:c.index})),l=t}return o.push(a.slice(l,a.length)),e(t.tag,i,o)},props:{safeBoundaryPattern:{type:RegExp,default:()=>/([a-z](?=[A-Z])|(:)\w|\w(?=[._]\w))/g},tag:{type:String,default:()=>"span"}}},a=s,o=n("2877"),c=Object(o["a"])(a,i,r,!1,null,null,null);t["a"]=c.exports},"7b69":function(e,t,n){"use strict";var i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"code-listing",class:{"single-line":1===e.syntaxHighlightedLines.length},attrs:{"data-syntax":e.syntaxNameNormalized}},[e.fileName?n("Filename",{attrs:{isActionable:e.isFileNameActionable,fileType:e.fileType},on:{click:function(t){return e.$emit("file-name-click")}}},[e._v(e._s(e.fileName)+" ")]):e._e(),n("div",{staticClass:"container-general"},[n("pre",[n("code",e._l(e.syntaxHighlightedLines,(function(t,i){return n("span",{key:i,class:["code-line-container",{highlighted:e.isHighlighted(i)}]},[n("span",{directives:[{name:"show",rawName:"v-show",value:e.showLineNumbers,expression:"showLineNumbers"}],staticClass:"code-number",attrs:{"data-line-number":e.lineNumberFor(i)}}),e._v("\n"),n("span",{staticClass:"code-line",domProps:{innerHTML:e._s(t)}})])})),0)])])],1)},r=[],s=n("002d"),a=n("8649"),o=n("1020"),c=n.n(o);const l={objectivec:["objective-c"]},u={bash:["sh","zsh"],c:["h"],cpp:["cc","c++","h++","hpp","hh","hxx","cxx"],css:[],diff:["patch"],http:["https"],java:["jsp"],javascript:["js","jsx","mjs","cjs"],json:[],llvm:[],markdown:["md","mkdown","mkd"],objectivec:["mm","objc","obj-c"].concat(l.objectivec),perl:["pl","pm"],php:[],python:["py","gyp","ipython"],ruby:["rb","gemspec","podspec","thor","irb"],scss:[],shell:["console","shellsession"],swift:[],xml:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"]},d=new Set(["markdown","swift"]),h=Object.entries(u),p=new Set(Object.keys(u)),g=new Map;async function f(e){const t=[e];try{return await t.reduce(async(e,t)=>{let i;await e,i=d.has(t)?await n("1417")("./"+t):await n("2ab3")("./"+t),c.a.registerLanguage(t,i.default)},Promise.resolve()),!0}catch(i){return console.error(`Could not load ${e} file`),!1}}function m(e){if(p.has(e))return e;const t=h.find(([,t])=>t.includes(e));return t?t[0]:null}function b(e){if(g.has(e))return g.get(e);const t=m(e);return g.set(e,t),t}c.a.configure({classPrefix:"syntax-",languages:[...p]});const v=async e=>{const t=b(e);return!(!t||c.a.listLanguages().includes(t))&&f(t)},y=/\r\n|\r|\n/g,w=/syntax-/;function x(e){return 0===e.length?[]:e.split(y)}function E(e){return(e.trim().match(y)||[]).length}function _(e){const t=document.createElement("template");return t.innerHTML=e,t.content.childNodes}function j(e){const{className:t}=e;if(!w.test(t))return null;const n=x(e.innerHTML).reduce((e,n)=>`${e}${n}\n`,"");return _(n.trim())}function k(e){return Array.from(e.childNodes).forEach(e=>{if(E(e.textContent))try{const t=e.childNodes.length?k(e):j(e);t&&e.replaceWith(...t)}catch(t){console.error(t)}}),j(e)}function T(e,t){const n=m(t);if(!c.a.getLanguage(n))throw new Error("Unsupported language for syntax highlighting: "+t);return c.a.highlight(e,{language:n,ignoreIllegals:!0}).value}function C(e,t){const n=e.join("\n"),i=T(n,t),r=document.createElement("code");return r.innerHTML=i,k(r),x(r.innerHTML)}var S=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("span",{staticClass:"filename"},[e.isActionable?n("a",{attrs:{href:"#"},on:{click:function(t){return t.preventDefault(),e.$emit("click")}}},[n("FileIcon",{attrs:{fileType:e.fileType}}),e._t("default")],2):n("span",[n("FileIcon",{attrs:{fileType:e.fileType}}),e._t("default")],2)])},O=[],N=function(){var e=this,t=e.$createElement,n=e._self._c||t;return"swift"===e.fileType?n("SwiftFileIcon",{staticClass:"file-icon"}):n("GenericFileIcon",{staticClass:"file-icon"})},I=[],L=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("SVGIcon",{staticClass:"swift-file-icon",attrs:{viewBox:"0 0 14 14"}},[n("path",{attrs:{d:"M8.033 1l3.967 4.015v7.985h-10v-12zM7.615 2h-4.615v10h8v-6.574z"}}),n("path",{attrs:{d:"M7 1h1v4h-1z"}}),n("path",{attrs:{d:"M7 5h5v1h-5z"}})])},A=[],B=n("be08"),M={name:"SwiftFileIcon",components:{SVGIcon:B["a"]}},$=M,R=n("2877"),D=Object(R["a"])($,L,A,!1,null,null,null),P=D.exports,F=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("SVGIcon",{staticClass:"generic-file-icon",attrs:{viewBox:"0 0 14 14"}},[n("path",{attrs:{d:"M8.033 1l3.967 4.015v7.985h-10v-12zM7.615 2h-4.615v10h8v-6.574z"}}),n("path",{attrs:{d:"M7 1h1v4h-1z"}}),n("path",{attrs:{d:"M7 5h5v1h-5z"}})])},H=[],q={name:"GenericFileIcon",components:{SVGIcon:B["a"]}},V=q,U=Object(R["a"])(V,F,H,!1,null,null,null),W=U.exports,z={name:"CodeListingFileIcon",components:{SwiftFileIcon:P,GenericFileIcon:W},props:{fileType:String}},G=z,K=(n("e6db"),Object(R["a"])(G,N,I,!1,null,"7c381064",null)),Y=K.exports,X={name:"CodeListingFilename",components:{FileIcon:Y},props:{isActionable:{type:Boolean,default:()=>!1},fileType:String}},Z=X,J=(n("8608"),Object(R["a"])(Z,S,O,!1,null,"c8c40662",null)),Q=J.exports,ee={name:"CodeListing",components:{Filename:Q},data(){return{syntaxHighlightedLines:[]}},props:{fileName:String,isFileNameActionable:{type:Boolean,default:()=>!1},syntax:String,fileType:String,content:{type:Array,required:!0},startLineNumber:{type:Number,default:()=>1},highlights:{type:Array,default:()=>[]},showLineNumbers:{type:Boolean,default:()=>!1}},computed:{escapedContent:({content:e})=>e.map(s["c"]),highlightedLineNumbers(){return new Set(this.highlights.map(({line:e})=>e))},syntaxNameNormalized(){const e={occ:a["a"].objectiveC.key.url};return e[this.syntax]||this.syntax}},watch:{content:{handler:"syntaxHighlightLines",immediate:!0}},methods:{isHighlighted(e){return this.highlightedLineNumbers.has(this.lineNumberFor(e))},lineNumberFor(e){return this.startLineNumber+e},async syntaxHighlightLines(){let e;try{await v(this.syntaxNameNormalized),e=C(this.content,this.syntaxNameNormalized)}catch(t){e=this.escapedContent}this.syntaxHighlightedLines=e.map(e=>""===e?"\n":e)}}},te=ee,ne=(n("4d50"),Object(R["a"])(te,i,r,!1,null,"df963650",null));t["a"]=ne.exports},"80c8":function(e,t,n){},8222:function(e,t,n){},"830f":function(e,t,n){"use strict";n("30b0")},8608:function(e,t,n){"use strict";n("a7f3")},"863d":function(e,t,n){"use strict";var i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("li",{staticClass:"nav-menu-item",class:{"nav-menu-item--animated":e.animate}},[e._t("default")],2)},r=[],s={name:"NavMenuItemBase",props:{animate:{type:Boolean,default:!0}}},a=s,o=(n("43fe"),n("2877")),c=Object(o["a"])(a,i,r,!1,null,"66cbfe4c",null);t["a"]=c.exports},8649:function(e,t,n){"use strict";t["a"]={objectiveC:{name:"Objective-C",key:{api:"occ",url:"objc"}},swift:{name:"Swift",key:{api:"swift",url:"swift"}}}},"86d8":function(e,t,n){"use strict";var i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n(e.refComponent,{tag:"component",attrs:{url:e.urlWithParams,"is-active":e.isActiveComputed}},[e._t("default")],2)},r=[],s=n("d26a"),a=n("66cd"),o=n("9895"),c=function(){var e=this,t=e.$createElement,n=e._self._c||t;return e.isActive?n("a",{attrs:{href:e.url}},[e._t("default")],2):n("span",[e._t("default")],2)},l=[],u={name:"ReferenceExternal",props:{url:{type:String,required:!0},isActive:{type:Boolean,default:!0}}},d=u,h=n("2877"),p=Object(h["a"])(d,c,l,!1,null,null,null),g=p.exports,f=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("ReferenceInternal",e._b({},"ReferenceInternal",e.$props,!1),[n("CodeVoice",[e._t("default")],2)],1)},m=[],b=function(){var e=this,t=e.$createElement,n=e._self._c||t;return e.isActive?n("router-link",{attrs:{to:e.url}},[e._t("default")],2):n("span",[e._t("default")],2)},v=[],y={name:"ReferenceInternal",props:{url:{type:String,required:!0},isActive:{type:Boolean,default:!0}}},w=y,x=Object(h["a"])(w,b,v,!1,null,null,null),E=x.exports,_=n("52e4"),j={name:"ReferenceInternalSymbol",props:E.props,components:{ReferenceInternal:E,CodeVoice:_["a"]}},k=j,T=Object(h["a"])(k,f,m,!1,null,null,null),C=T.exports,S={name:"Reference",computed:{isInternal({url:e}){if(!e.startsWith("/")&&!e.startsWith("#"))return!1;const{resolved:{name:t}={}}=this.$router.resolve(e)||{};return t!==o["b"]},isSymbolReference(){return"symbol"===this.kind&&(this.role===a["a"].symbol||this.role===a["a"].dictionarySymbol)},isDisplaySymbol({isSymbolReference:e,titleStyle:t,ideTitle:n}){return n?e&&"symbol"===t:e},refComponent(){return this.isInternal?this.isDisplaySymbol?C:E:g},urlWithParams({isInternal:e}){return e?Object(s["b"])(this.url,this.$route.query):this.url},isActiveComputed({url:e,isActive:t}){return!(!e||!t)}},props:{url:{type:String,required:!0},kind:{type:String,required:!1},role:{type:String,required:!1},isActive:{type:Boolean,required:!1,default:!0},ideTitle:{type:String,required:!1},titleStyle:{type:String,required:!1}}},O=S,N=Object(h["a"])(O,i,r,!1,null,null,null);t["a"]=N.exports},"8a61":function(e,t,n){"use strict";var i=n("3908");t["a"]={methods:{async scrollToElement(e){await Object(i["b"])(8);const t=this.$router.resolve({hash:e}),{selector:n,offset:r}=await this.$router.options.scrollBehavior(t.route),s=document.querySelector(n);return s?(s.scrollIntoView(),window.scrollBy(-r.x,-r.y),s):null}}}},"8bd9":function(e,t,n){"use strict";var i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return e.fallbackImageSrcSet?n("img",{staticClass:"fallback",attrs:{title:"Image failed to load",alt:e.alt,srcset:e.fallbackImageSrcSet}}):n("picture",[e.prefersAuto&&e.darkVariantAttributes?n("source",{attrs:{media:"(prefers-color-scheme: dark)",srcset:e.darkVariantAttributes.srcSet}}):e._e(),e.prefersDark&&e.darkVariantAttributes?n("img",e._b({ref:"img",attrs:{alt:e.alt,width:e.darkVariantAttributes.width||e.optimalWidth,height:e.darkVariantAttributes.width||e.optimalWidth?"auto":null},on:{error:e.handleImageLoadError}},"img",e.darkVariantAttributes,!1)):n("img",e._b({ref:"img",attrs:{alt:e.alt,width:e.defaultAttributes.width||e.optimalWidth,height:e.defaultAttributes.width||e.optimalWidth?"auto":null},on:{error:e.handleImageLoadError}},"img",e.defaultAttributes,!1))])},r=[],s=n("748c"),a={props:{variants:{type:Array,required:!0}},computed:{variantsGroupedByAppearance(){return Object(s["d"])(this.variants)},lightVariants(){return Object(s["a"])(this.variantsGroupedByAppearance.light)},darkVariants(){return Object(s["a"])(this.variantsGroupedByAppearance.dark)}}},o=n("e425"),c=n("821b"),l=n("5da3"),u=n.n(l);const d=10;function h(e){return new Promise((t,n)=>{const i=new Image;i.src=e,i.onerror=n,i.onload=()=>t({width:i.width,height:i.height})})}function p(e){if(!e.length)return null;const t=e.map(e=>`${Object(s["b"])(e.src)} ${e.density}`).join(", "),n=e[0],i={srcSet:t,src:Object(s["b"])(n.src)},{width:r}=n.size||{width:null};return r&&(i.width=r,i.height="auto"),i}var g={name:"ImageAsset",mixins:[a],data:()=>({appState:o["a"].state,fallbackImageSrcSet:null,optimalWidth:null}),computed:{allVariants:({lightVariants:e=[],darkVariants:t=[]})=>e.concat(t),defaultAttributes:({lightVariantAttributes:e,darkVariantAttributes:t})=>e||t,darkVariantAttributes:({darkVariants:e})=>p(e),lightVariantAttributes:({lightVariants:e})=>p(e),preferredColorScheme:({appState:e})=>e.preferredColorScheme,prefersAuto:({preferredColorScheme:e})=>e===c["a"].auto.value,prefersDark:({preferredColorScheme:e})=>e===c["a"].dark.value},props:{alt:{type:String,default:""},variants:{type:Array,required:!0}},methods:{handleImageLoadError(){this.fallbackImageSrcSet=u.a+" 2x"},async calculateOptimalWidth(){const{$refs:{img:{currentSrc:e}},allVariants:t}=this,{density:n}=t.find(({src:t})=>e.endsWith(t)),i=parseInt(n.match(/\d+/)[0],d),r=await h(e),s=r.width/i;return s},async optimizeImageSize(){if(!this.defaultAttributes.width)try{this.optimalWidth=await this.calculateOptimalWidth()}catch{console.error("Unable to calculate optimal image width")}}},mounted(){this.$refs.img.addEventListener("load",this.optimizeImageSize)}},f=g,m=n("2877"),b=Object(m["a"])(f,i,r,!1,null,null,null);t["a"]=b.exports},"8c92":function(e,t,n){"use strict";n("80c8")},"90f3":function(e,t,n){"use strict";n("6cc4")},9152:function(e,t,n){"use strict";n("50fc")},"95da":function(e,t,n){"use strict";function i(e,t){const n=document.body;let r=e,s=e;while(r=r.previousElementSibling)t(r);while(s=s.nextElementSibling)t(s);e.parentElement&&e.parentElement!==n&&i(e.parentElement,t)}const r="data-original-",s="aria-hidden",a=r+s,o=e=>{let t=e.getAttribute(a);t||(t=e.getAttribute(s)||"",e.setAttribute(a,t)),e.setAttribute(s,"true")},c=e=>{const t=e.getAttribute(a);"string"===typeof t&&(t.length?e.setAttribute(s,t):e.removeAttribute(s)),e.removeAttribute(a)};t["a"]={hide(e){i(e,o)},show(e){i(e,c)}}},"971b":function(e,t,n){},9975:function(e,t,n){"use strict";n("287e")},"9a2b":function(e,t,n){"use strict";n("dce7")},"9b30":function(e,t,n){"use strict";var i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("ul",{staticClass:"nav-menu-items",attrs:{"data-previous-menu-children-count":e.previousSiblingChildren}},[e._t("default")],2)},r=[],s={name:"NavMenuItems",props:{previousSiblingChildren:{type:Number,default:0}}},a=s,o=(n("517a"),n("2877")),c=Object(o["a"])(a,i,r,!1,null,"67c1c0a5",null);t["a"]=c.exports},"9bb2":function(e,t,n){"use strict";n("3b8f")},a1bd:function(e,t,n){},a7f3:function(e,t,n){},a97e:function(e,t,n){"use strict";var i=n("63b8");const r=e=>e?`(max-width: ${e}px)`:"",s=e=>e?`(min-width: ${e}px)`:"";function a({minWidth:e,maxWidth:t}){return["only screen",s(e),r(t)].filter(Boolean).join(" and ")}function o({maxWidth:e,minWidth:t}){return window.matchMedia(a({minWidth:t,maxWidth:e}))}var c,l,u={name:"BreakpointEmitter",constants:{BreakpointAttributes:i["a"],BreakpointName:i["b"],BreakpointScopes:i["c"]},props:{scope:{type:String,default:()=>i["c"].default,validator:e=>e in i["c"]}},render(){return this.$scopedSlots.default?this.$scopedSlots.default({matchingBreakpoint:this.matchingBreakpoint}):null},data:()=>({matchingBreakpoint:null}),methods:{initMediaQuery(e,t){const n=o(t),i=t=>this.handleMediaQueryChange(t,e);n.addListener(i),this.$once("hook:beforeDestroy",()=>{n.removeListener(i)}),i(n)},handleMediaQueryChange(e,t){e.matches&&(this.matchingBreakpoint=t,this.$emit("change",t))}},mounted(){const e=i["a"][this.scope]||{};Object.entries(e).forEach(([e,t])=>{this.initMediaQuery(e,t)})}},d=u,h=n("2877"),p=Object(h["a"])(d,c,l,!1,null,null,null);t["a"]=p.exports},b1d4:function(e,t,n){},b392:function(e,t,n){},b7fc:function(e,t,n){"use strict";n("189f")},bab1:function(e,t,n){"use strict";n("a1bd")},bb52:function(e,t,n){"use strict";t["a"]={inject:{performanceMetricsEnabled:{default:!1},isTargetIDE:{default:!1}},methods:{newContentMounted(){let e;this.performanceMetricsEnabled&&(e=Math.round(window.performance.now()),window.renderedTimes||(window.renderedTimes=[]),window.renderedTimes.push(e)),this.$bridge.send({type:"rendered",data:{time:e}})}}}},be08:function(e,t,n){"use strict";var i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("svg",{staticClass:"svg-icon",attrs:{"aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg"}},[e._t("default")],2)},r=[],s={name:"SVGIcon"},a=s,o=(n("9bb2"),n("2877")),c=Object(o["a"])(a,i,r,!1,null,"0137d411",null);t["a"]=c.exports},bf08:function(e,t,n){"use strict";var i=n("6842"),r=n("d26a");const s=Object(i["c"])(["meta","title"],"Documentation"),a=({title:e,description:t,url:n})=>[{name:"description",content:t},{property:"og:locale",content:"en_US"},{property:"og:site_name",content:s},{property:"og:type",content:"website"},{property:"og:title",content:e},{property:"og:description",content:t},{property:"og:url",content:n},{property:"og:image",content:Object(r["d"])("/developer-og.jpg")},{name:"twitter:image",content:Object(r["d"])("/developer-og-twitter.jpg")},{name:"twitter:card",content:"summary_large_image"},{name:"twitter:description",content:t},{name:"twitter:title",content:e},{name:"twitter:url",content:n}],o=e=>[e,s].filter(Boolean).join(" | "),c=e=>{const{content:t}=e,n=e.property?"property":"name",i=e[n],r=document.querySelector(`meta[${n}="${i}"]`);if(r&&t)r.setAttribute("content",t);else if(r&&!t)r.remove();else if(t){const t=document.createElement("meta");t.setAttribute(n,e[n]),t.setAttribute("content",e.content),document.getElementsByTagName("head")[0].appendChild(t)}},l=e=>{document.title=e};function u({title:e,description:t,url:n}){const i=o(e);l(i),a({title:i,description:t,url:n}).forEach(e=>c(e))}var d=n("002d"),h=n("5677");t["a"]={methods:{extractFirstParagraphText(e=[]){const t=h["a"].computed.plaintext.bind({...h["a"].methods,content:e})();return Object(d["e"])(t)}},computed:{pagePath:({$route:{path:e="/"}={}})=>e,pageURL:({pagePath:e="/"})=>Object(r["d"])(e)},mounted(){u({title:this.pageTitle,description:this.pageDescription,url:this.pageURL})}}},c064:function(e,t,n){"use strict";n("ca8c")},c081:function(e,t,n){"use strict";var i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return e.action?n("DestinationDataProvider",{attrs:{destination:e.action},scopedSlots:e._u([{key:"default",fn:function(t){var i=t.url,r=t.title;return n("ButtonLink",{attrs:{url:i,isDark:e.isDark}},[e._v(" "+e._s(r)+" ")])}}],null,!1,1264376715)}):e._e()},r=[],s=n("76ab"),a=n("c7ea"),o={name:"CallToActionButton",components:{DestinationDataProvider:a["a"],ButtonLink:s["a"]},props:{action:{type:Object,required:!0},isDark:{type:Boolean,default:!1}}},c=o,l=n("2877"),u=Object(l["a"])(c,i,r,!1,null,null,null);t["a"]=u.exports},c7ea:function(e,t,n){"use strict";const i={link:"link",reference:"reference",text:"text"};var r,s,a={name:"DestinationDataProvider",props:{destination:{type:Object,required:!0,default:()=>({})}},inject:{references:{default:()=>({})},isTargetIDE:{default:()=>!1}},constants:{DestinationType:i},computed:{isExternal:({reference:e,destination:t})=>e.type===i.link||t.type===i.link,shouldAppendOpensInBrowser:({isExternal:e,isTargetIDE:t})=>e&&t,reference:({references:e,destination:t})=>e[t.identifier]||{},linkUrl:({destination:e,reference:t})=>({[i.link]:e.destination,[i.reference]:t.url,[i.text]:e.text}[e.type]),linkTitle:({reference:e,destination:t})=>({[i.link]:t.title,[i.reference]:t.overridingTitle||e.title,[i.text]:""}[t.type])},methods:{formatAriaLabel(e){return this.shouldAppendOpensInBrowser?e+" (opens in browser)":e}},render(){return this.$scopedSlots.default({url:this.linkUrl||"",title:this.linkTitle||"",formatAriaLabel:this.formatAriaLabel,isExternal:this.isExternal})}},o=a,c=n("2877"),l=Object(c["a"])(o,r,s,!1,null,null,null);t["a"]=l.exports},c8e2:function(e,t,n){"use strict";function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,"a",(function(){return o}));const r=["input","select","textarea","button","optgroup","option","menuitem","fieldset","object","a[href]","*[tabindex]","*[contenteditable]"],s=r.join(",");var a={getTabbableElements(e){const t=e.querySelectorAll(s),n=t.length;let i;const r=[];for(i=0;i=0},isFocusableElement(e){const t=e.nodeName.toLowerCase(),n=r.includes(t);return!("a"!==t||!e.getAttribute("href"))||(n?!e.disabled:"true"===e.getAttribute("contenteditable")||!Number.isNaN(parseFloat(e.getAttribute("tabindex"))))}};class o{constructor(e){i(this,"focusContainer",null),i(this,"tabTargets",[]),i(this,"firstTabTarget",null),i(this,"lastTabTarget",null),i(this,"lastFocusedElement",null),this.focusContainer=e,this.onFocus=this.onFocus.bind(this)}updateFocusContainer(e){this.focusContainer=e}start(){this.collectTabTargets(),this.firstTabTarget?this.focusContainer.contains(document.activeElement)&&a.isTabbableElement(document.activeElement)||this.firstTabTarget.focus():console.warn("There are no focusable elements. FocusTrap needs at least one."),this.lastFocusedElement=document.activeElement,document.addEventListener("focus",this.onFocus,!0)}stop(){document.removeEventListener("focus",this.onFocus,!0)}collectTabTargets(){this.tabTargets=a.getTabbableElements(this.focusContainer),this.firstTabTarget=this.tabTargets[0],this.lastTabTarget=this.tabTargets[this.tabTargets.length-1]}onFocus(e){if(this.focusContainer.contains(e.target))this.lastFocusedElement=e.target;else{if(e.preventDefault(),this.collectTabTargets(),this.lastFocusedElement===this.lastTabTarget||!this.lastFocusedElement||!document.contains(this.lastFocusedElement))return this.firstTabTarget.focus(),void(this.lastFocusedElement=this.firstTabTarget);this.lastFocusedElement===this.firstTabTarget&&(this.lastTabTarget.focus(),this.lastFocusedElement=this.lastTabTarget)}}destroy(){this.stop(),this.focusContainer=null,this.tabTargets=[],this.firstTabTarget=null,this.lastTabTarget=null,this.lastFocusedElement=null}}},ca8c:function(e,t,n){},cb92:function(e,t,n){"use strict";n("598a")},cbcf:function(e,t,n){"use strict";var i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("nav",{ref:"nav",staticClass:"nav",class:e.rootClasses,attrs:{role:"navigation"}},[n("div",{ref:"wrapper",staticClass:"nav__wrapper"},[n("div",{staticClass:"nav__background"}),e.hasOverlay?n("div",{staticClass:"nav-overlay",on:{click:e.closeNav}}):e._e(),n("div",{staticClass:"nav-content"},[n("div",{staticClass:"pre-title"},[e._t("pre-title",null,{closeNav:e.closeNav,isOpen:e.isOpen})],2),e.$slots.default?n("div",{staticClass:"nav-title"},[e._t("default")],2):e._e(),e._t("after-title"),n("div",{staticClass:"nav-menu"},[n("a",{ref:"axToggle",staticClass:"nav-ax-toggle",attrs:{href:"#",role:"button"},on:{click:function(t){return t.preventDefault(),e.toggleNav.apply(null,arguments)}}},[n("span",{staticClass:"visuallyhidden"},[e.isOpen?[e._v("Close Menu")]:[e._v("Open Menu")]],2)]),n("div",{ref:"tray",staticClass:"nav-menu-tray",on:{transitionend:function(t){return t.target!==t.currentTarget?null:e.onTransitionEnd.apply(null,arguments)},click:e.handleTrayClick}},[e._t("tray",(function(){return[n("NavMenuItems",[e._t("menu-items")],2)]}),{closeNav:e.closeNav})],2)]),n("div",{staticClass:"nav-actions"},[n("a",{staticClass:"nav-menucta",attrs:{href:"#",tabindex:"-1","aria-hidden":"true"},on:{click:function(t){return t.preventDefault(),e.toggleNav.apply(null,arguments)}}},[n("span",{staticClass:"nav-menucta-chevron"})])])],2),e._t("after-content")],2),n("BreakpointEmitter",{attrs:{scope:e.BreakpointScopes.nav},on:{change:e.onBreakpointChange}})],1)},r=[],s=n("72e7"),a=n("9b30"),o=n("a97e"),c=n("c8e2"),l=n("f2af"),u=n("942d"),d=n("63b8"),h=n("95da"),p=n("3908");const{noClose:g}=u["a"],{BreakpointName:f,BreakpointScopes:m}=o["a"].constants,b=8,v={isDark:"theme-dark",isOpen:"nav--is-open",inBreakpoint:"nav--in-breakpoint-range",isTransitioning:"nav--is-transitioning",isSticking:"nav--is-sticking",hasSolidBackground:"nav--solid-background",hasNoBorder:"nav--noborder",hasFullWidthBorder:"nav--fullwidth-border",isWideFormat:"nav--is-wide-format",noBackgroundTransition:"nav--no-bg-transition"};var y={name:"NavBase",components:{NavMenuItems:a["a"],BreakpointEmitter:o["a"]},constants:{NavStateClasses:v,NoBGTransitionFrames:b},props:{breakpoint:{type:String,default:f.small},hasOverlay:{type:Boolean,default:!0},hasSolidBackground:{type:Boolean,default:!1},hasNoBorder:{type:Boolean,default:!1},hasFullWidthBorder:{type:Boolean,default:!1},isDark:{type:Boolean,default:!1},isWideFormat:{type:Boolean,default:!1}},mixins:[s["a"]],data(){return{isOpen:!1,inBreakpoint:!1,isTransitioning:!1,isSticking:!1,noBackgroundTransition:!0,focusTrapInstance:null}},computed:{BreakpointScopes:()=>m,rootClasses:({isOpen:e,inBreakpoint:t,isTransitioning:n,isSticking:i,hasSolidBackground:r,hasNoBorder:s,hasFullWidthBorder:a,isDark:o,isWideFormat:c,noBackgroundTransition:l})=>({[v.isDark]:o,[v.isOpen]:e,[v.inBreakpoint]:t,[v.isTransitioning]:n,[v.isSticking]:i,[v.hasSolidBackground]:r,[v.hasNoBorder]:s,[v.hasFullWidthBorder]:a,[v.isWideFormat]:c,[v.noBackgroundTransition]:l})},watch:{isOpen(e){this.$emit("change",e),e?this.onExpand():this.onClose()}},async mounted(){window.addEventListener("keydown",this.onEscape),window.addEventListener("popstate",this.closeNav),window.addEventListener("orientationchange",this.closeNav),document.addEventListener("click",this.handleClickOutside),this.handleFlashOnMount(),await this.$nextTick(),this.focusTrapInstance=new c["a"](this.$refs.wrapper)},beforeDestroy(){window.removeEventListener("keydown",this.onEscape),window.removeEventListener("popstate",this.closeNav),window.removeEventListener("orientationchange",this.closeNav),document.removeEventListener("click",this.handleClickOutside),this.isOpen&&this.toggleScrollLock(!1),this.focusTrapInstance.destroy()},methods:{getIntersectionTargets(){return[document.getElementById(u["d"])||this.$el]},toggleNav(){this.isOpen=!this.isOpen,this.isTransitioning=!0},closeNav(){const e=this.isOpen;return this.isOpen=!1,this.resolveOnceTransitionsEnd(e)},resolveOnceTransitionsEnd(e){return e&&this.inBreakpoint?(this.isTransitioning=!0,new Promise(e=>{const t=this.$watch("isTransitioning",()=>{e(),t()})})):Promise.resolve()},async onTransitionEnd({propertyName:e}){"max-height"===e&&(this.$emit("changed",this.isOpen),this.isTransitioning=!1,this.isOpen?(this.$emit("opened"),this.toggleScrollLock(!0)):this.$emit("closed"))},onBreakpointChange(e){const t=Object(d["d"])(e,this.breakpoint);this.inBreakpoint=!t,t&&this.closeNav()},onIntersect({intersectionRatio:e}){window.scrollY<0||(this.isSticking=1!==e)},onEscape({key:e}){"Escape"===e&&this.isOpen&&(this.closeNav(),this.$refs.axToggle.focus())},handleTrayClick({target:e}){e.href&&!e.classList.contains(g)&&this.closeNav()},handleClickOutside({target:e}){this.$refs.nav.contains(e)||this.closeNav()},toggleScrollLock(e){e?l["a"].lockScroll(this.$refs.tray):l["a"].unlockScroll(this.$refs.tray)},onExpand(){this.$emit("open"),this.focusTrapInstance.start(),h["a"].hide(this.$refs.wrapper)},onClose(){this.$emit("close"),this.toggleScrollLock(!1),this.focusTrapInstance.stop(),h["a"].show(this.$refs.wrapper)},async handleFlashOnMount(){await Object(p["b"])(b),this.noBackgroundTransition=!1}}},w=y,x=(n("b7fc"),n("2877")),E=Object(x["a"])(w,i,r,!1,null,"be9ec8e8",null);t["a"]=E.exports},d541:function(e,t,n){},dce7:function(e,t,n){},e3ab:function(e,t,n){"use strict";var i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("aside",{class:e.kind,attrs:{"aria-label":e.kind}},[n("p",{staticClass:"label"},[e._v(e._s(e.label))]),e._t("default")],2)},r=[];const s={deprecated:"deprecated",experiment:"experiment",important:"important",note:"note",tip:"tip",warning:"warning"};var a={name:"Aside",props:{kind:{type:String,required:!0,validator:e=>Object.prototype.hasOwnProperty.call(s,e)},name:{type:String,required:!1}},computed:{label:({kind:e,name:t})=>t||{[s.deprecated]:"Deprecated",[s.experiment]:"Experiment",[s.important]:"Important",[s.note]:"Note",[s.tip]:"Tip",[s.warning]:"Warning"}[e]}},o=a,c=(n("9152"),n("2877")),l=Object(c["a"])(o,i,r,!1,null,"5117d474",null);t["a"]=l.exports},e6db:function(e,t,n){"use strict";n("47cc")},e7fb:function(e,t,n){"use strict";n("4c7a")},ec05:function(e,t,n){},f2af:function(e,t,n){"use strict";let i=!1,r=-1,s=0;const a=()=>window.navigator&&window.navigator.platform&&(/iP(ad|hone|od)/.test(window.navigator.platform)||"MacIntel"===window.navigator.platform&&window.navigator.maxTouchPoints>1);function o(e){e.touches.length>1||e.preventDefault()}const c=e=>!!e&&e.scrollHeight-e.scrollTop<=e.clientHeight;function l(){s=document.body.getBoundingClientRect().top,document.body.style.overflow="hidden scroll",document.body.style.top=s+"px",document.body.style.position="fixed",document.body.style.width="100%"}function u(e){e&&(e.ontouchstart=null,e.ontouchmove=null),document.removeEventListener("touchmove",o)}function d(e,t){const n=e.targetTouches[0].clientY-r;return 0===t.scrollTop&&n>0||c(t)&&n<0?o(e):(e.stopPropagation(),!0)}function h(e){document.addEventListener("touchmove",o,{passive:!1}),e&&(e.ontouchstart=e=>{1===e.targetTouches.length&&(r=e.targetTouches[0].clientY)},e.ontouchmove=t=>{1===t.targetTouches.length&&d(t,e)})}t["a"]={lockScroll(e){i||(a()?h(e):l(),i=!0)},unlockScroll(e){i&&(a()?u(e):(document.body.style.cssText="",window.scrollTo(0,Math.abs(s))),i=!1)}}}}]); \ No newline at end of file diff --git a/docs/docc/Reducer.doccarchive/js/highlight-js-bash.1b52852f.js b/docs/docc/Reducer.doccarchive/js/highlight-js-bash.1b52852f.js deleted file mode 100644 index 6db1778..0000000 --- a/docs/docc/Reducer.doccarchive/js/highlight-js-bash.1b52852f.js +++ /dev/null @@ -1,10 +0,0 @@ -/*! - * This source file is part of the Swift.org open source project - * - * Copyright (c) 2021 Apple Inc. and the Swift project authors - * Licensed under Apache License v2.0 with Runtime Library Exception - * - * See https://swift.org/LICENSE.txt for license information - * See https://swift.org/CONTRIBUTORS.txt for Swift project authors - */ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["highlight-js-bash"],{f0f8:function(e,s){function t(e){const s=e.regex,t={},n={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[t]}]};Object.assign(t,{className:"variable",variants:[{begin:s.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},n]});const a={className:"subst",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},i={begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},c={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,t,a]};a.contains.push(c);const o={className:"",begin:/\\"/},r={className:"string",begin:/'/,end:/'/},l={begin:/\$\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,t]},p=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],d=e.SHEBANG({binary:`(${p.join("|")})`,relevance:10}),h={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},m=["if","then","else","elif","fi","for","while","in","do","done","case","esac","function"],u=["true","false"],b={match:/(\/[a-z._-]+)+/},g=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],f=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","type","typeset","ulimit","unalias"],w=["autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp"],k=["chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"];return{name:"Bash",aliases:["sh"],keywords:{$pattern:/\b[a-z._-]+\b/,keyword:m,literal:u,built_in:[...g,...f,"set","shopt",...w,...k]},contains:[d,e.SHEBANG(),h,l,e.HASH_COMMENT_MODE,i,b,c,o,r,t]}}e.exports=t}}]); \ No newline at end of file diff --git a/docs/docc/Reducer.doccarchive/js/highlight-js-c.d1db3f17.js b/docs/docc/Reducer.doccarchive/js/highlight-js-c.d1db3f17.js deleted file mode 100644 index 3bc41ac..0000000 --- a/docs/docc/Reducer.doccarchive/js/highlight-js-c.d1db3f17.js +++ /dev/null @@ -1,10 +0,0 @@ -/*! - * This source file is part of the Swift.org open source project - * - * Copyright (c) 2021 Apple Inc. and the Swift project authors - * Licensed under Apache License v2.0 with Runtime Library Exception - * - * See https://swift.org/LICENSE.txt for license information - * See https://swift.org/CONTRIBUTORS.txt for Swift project authors - */ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["highlight-js-c"],{"1fe5":function(e,n){function s(e){const n=e.regex,s=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),t="decltype\\(auto\\)",a="[a-zA-Z_]\\w*::",i="<[^<>]+>",r="("+t+"|"+n.optional(a)+"[a-zA-Z_]\\w*"+n.optional(i)+")",l={className:"type",variants:[{begin:"\\b[a-z\\d_]*_t\\b"},{match:/\batomic_[a-z]{3,6}\b/}]},o="\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)",c={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+o+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},d={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},u={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(c,{className:"string"}),{className:"string",begin:/<.*?>/},s,e.C_BLOCK_COMMENT_MODE]},g={className:"title",begin:n.optional(a)+e.IDENT_RE,relevance:0},p=n.optional(a)+e.IDENT_RE+"\\s*\\(",m=["asm","auto","break","case","continue","default","do","else","enum","extern","for","fortran","goto","if","inline","register","restrict","return","sizeof","struct","switch","typedef","union","volatile","while","_Alignas","_Alignof","_Atomic","_Generic","_Noreturn","_Static_assert","_Thread_local","alignas","alignof","noreturn","static_assert","thread_local","_Pragma"],_=["float","double","signed","unsigned","int","short","long","char","void","_Bool","_Complex","_Imaginary","_Decimal32","_Decimal64","_Decimal128","const","static","complex","bool","imaginary"],f={keyword:m,type:_,literal:"true false NULL",built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr"},b=[u,l,s,e.C_BLOCK_COMMENT_MODE,d,c],w={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:f,contains:b.concat([{begin:/\(/,end:/\)/,keywords:f,contains:b.concat(["self"]),relevance:0}]),relevance:0},h={begin:"("+r+"[\\*&\\s]+)+"+p,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:f,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:t,keywords:f,relevance:0},{begin:p,returnBegin:!0,contains:[e.inherit(g,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:f,relevance:0,contains:[s,e.C_BLOCK_COMMENT_MODE,c,d,l,{begin:/\(/,end:/\)/,keywords:f,relevance:0,contains:["self",s,e.C_BLOCK_COMMENT_MODE,c,d,l]}]},l,s,e.C_BLOCK_COMMENT_MODE,u]};return{name:"C",aliases:["h"],keywords:f,disableAutodetect:!0,illegal:"=]/,contains:[{beginKeywords:"final class struct"},e.TITLE_MODE]}]),exports:{preprocessor:u,strings:c,keywords:f}}}e.exports=s}}]); \ No newline at end of file diff --git a/docs/docc/Reducer.doccarchive/js/highlight-js-cpp.eaddddbe.js b/docs/docc/Reducer.doccarchive/js/highlight-js-cpp.eaddddbe.js deleted file mode 100644 index db9fd82..0000000 --- a/docs/docc/Reducer.doccarchive/js/highlight-js-cpp.eaddddbe.js +++ /dev/null @@ -1,10 +0,0 @@ -/*! - * This source file is part of the Swift.org open source project - * - * Copyright (c) 2021 Apple Inc. and the Swift project authors - * Licensed under Apache License v2.0 with Runtime Library Exception - * - * See https://swift.org/LICENSE.txt for license information - * See https://swift.org/CONTRIBUTORS.txt for Swift project authors - */ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["highlight-js-cpp"],{"0209":function(e,t){function n(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),a="decltype\\(auto\\)",i="[a-zA-Z_]\\w*::",r="<[^<>]+>",s="(?!struct)("+a+"|"+t.optional(i)+"[a-zA-Z_]\\w*"+t.optional(r)+")",c={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},o="\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)",l={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+o+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},d={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},u={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(l,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},p={className:"title",begin:t.optional(i)+e.IDENT_RE,relevance:0},_=t.optional(i)+e.IDENT_RE+"\\s*\\(",m=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],g=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],f=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],b=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],h=["NULL","false","nullopt","nullptr","true"],w=["_Pragma"],y={type:g,keyword:m,literal:h,built_in:w,_type_hints:f},v={className:"function.dispatch",relevance:0,keywords:{_hint:b},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},k=[v,u,c,n,e.C_BLOCK_COMMENT_MODE,d,l],x={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:y,contains:k.concat([{begin:/\(/,end:/\)/,keywords:y,contains:k.concat(["self"]),relevance:0}]),relevance:0},E={className:"function",begin:"("+s+"[\\*&\\s]+)+"+_,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:y,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:a,keywords:y,relevance:0},{begin:_,returnBegin:!0,contains:[p],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[l,d]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:y,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,l,d,c,{begin:/\(/,end:/\)/,keywords:y,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,l,d,c]}]},c,n,e.C_BLOCK_COMMENT_MODE,u]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:y,illegal:"",keywords:y,contains:["self",c]},{begin:e.IDENT_RE+"::",keywords:y},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}e.exports=n}}]); \ No newline at end of file diff --git a/docs/docc/Reducer.doccarchive/js/highlight-js-css.75eab1fe.js b/docs/docc/Reducer.doccarchive/js/highlight-js-css.75eab1fe.js deleted file mode 100644 index 3d507d0..0000000 --- a/docs/docc/Reducer.doccarchive/js/highlight-js-css.75eab1fe.js +++ /dev/null @@ -1,10 +0,0 @@ -/*! - * This source file is part of the Swift.org open source project - * - * Copyright (c) 2021 Apple Inc. and the Swift project authors - * Licensed under Apache License v2.0 with Runtime Library Exception - * - * See https://swift.org/LICENSE.txt for license information - * See https://swift.org/CONTRIBUTORS.txt for Swift project authors - */ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["highlight-js-css"],{ee8c:function(e,t){const o=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z][A-Za-z0-9_-]*/}}),i=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","p","q","quote","samp","section","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],r=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"],a=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"],n=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"],l=["align-content","align-items","align-self","all","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","backface-visibility","background","background-attachment","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","content","content-visibility","counter-increment","counter-reset","cue","cue-after","cue-before","cursor","direction","display","empty-cells","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-size","font-size-adjust","font-smoothing","font-stretch","font-style","font-synthesis","font-variant","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","gap","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","isolation","justify-content","left","letter-spacing","line-break","line-height","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","max-height","max-width","min-height","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page-break-after","page-break-before","page-break-inside","pause","pause-after","pause-before","perspective","perspective-origin","pointer-events","position","quotes","resize","rest","rest-after","rest-before","right","row-gap","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","shape-image-threshold","shape-margin","shape-outside","speak","speak-as","src","tab-size","table-layout","text-align","text-align-all","text-align-last","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-transform","text-underline-position","top","transform","transform-box","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","z-index"].reverse();function s(e){const t=e.regex,s=o(e),d={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},c="and or not only",g=/@-?\w[\w]*(-\w+)*/,m="[a-zA-Z-][a-zA-Z0-9_-]*",p=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[s.BLOCK_COMMENT,d,s.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\."+m,relevance:0},s.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+a.join("|")+")"},{begin:":(:)?("+n.join("|")+")"}]},s.CSS_VARIABLE,{className:"attribute",begin:"\\b("+l.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[s.BLOCK_COMMENT,s.HEXCOLOR,s.IMPORTANT,s.CSS_NUMBER_MODE,...p,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},s.FUNCTION_DISPATCH]},{begin:t.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:g},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:c,attribute:r.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...p,s.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+i.join("|")+")\\b"}]}}e.exports=s}}]); \ No newline at end of file diff --git a/docs/docc/Reducer.doccarchive/js/highlight-js-custom-markdown.7cffc4b3.js b/docs/docc/Reducer.doccarchive/js/highlight-js-custom-markdown.7cffc4b3.js deleted file mode 100644 index 5271416..0000000 --- a/docs/docc/Reducer.doccarchive/js/highlight-js-custom-markdown.7cffc4b3.js +++ /dev/null @@ -1,10 +0,0 @@ -/*! - * This source file is part of the Swift.org open source project - * - * Copyright (c) 2021 Apple Inc. and the Swift project authors - * Licensed under Apache License v2.0 with Runtime Library Exception - * - * See https://swift.org/LICENSE.txt for license information - * See https://swift.org/CONTRIBUTORS.txt for Swift project authors - */ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["highlight-js-custom-markdown","highlight-js-markdown"],{"04b0":function(n,e){function a(n){const e=n.regex,a={begin:/<\/?[A-Za-z_]/,end:">",subLanguage:"xml",relevance:0},i={begin:"^[-\\*]{3,}",end:"$"},s={className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},t={className:"bullet",begin:"^[ \t]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},c={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]},d=/[A-Za-z][A-Za-z0-9+.-]*/,l={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:e.concat(/\[.+?\]\(/,d,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}]},g={className:"strong",contains:[],variants:[{begin:/_{2}/,end:/_{2}/},{begin:/\*{2}/,end:/\*{2}/}]},o={className:"emphasis",contains:[],variants:[{begin:/\*(?!\*)/,end:/\*/},{begin:/_(?!_)/,end:/_/,relevance:0}]};g.contains.push(o),o.contains.push(g);let r=[a,l];g.contains=g.contains.concat(r),o.contains=o.contains.concat(r),r=r.concat(g,o);const b={className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:r},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:r}]}]},u={className:"quote",begin:"^>\\s+",contains:r,end:"$"};return{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[b,a,t,g,o,u,s,i,l,c]}}n.exports=a},"84cb":function(n,e,a){"use strict";a.r(e);var i=a("04b0"),s=a.n(i);const t={begin:"",returnBegin:!0,contains:[{className:"link",begin:"doc:",end:">",excludeEnd:!0}]},c={className:"link",begin:/`{2}(?!`)/,end:/`{2}(?!`)/,excludeBegin:!0,excludeEnd:!0},d={begin:"^>\\s+[Note:|Tip:|Important:|Experiment:|Warning:]",end:"$",returnBegin:!0,contains:[{className:"quote",begin:"^>",end:"\\s+"},{className:"type",begin:"Note|Tip|Important|Experiment|Warning",end:":"},{className:"quote",begin:".*",end:"$",endsParent:!0}]},l={begin:"@",end:"[{\\)\\s]",returnBegin:!0,contains:[{className:"title",begin:"@",end:"[\\s+(]",excludeEnd:!0},{begin:":",end:"[,\\)\n\t]",excludeBegin:!0,keywords:{literal:"true false null undefined"},contains:[{className:"number",begin:"\\b([\\d_]+(\\.[\\deE_]+)?|0x[a-fA-F0-9_]+(\\.[a-fA-F0-9p_]+)?|0b[01_]+|0o[0-7_]+)\\b",endsWithParent:!0,excludeEnd:!0},{className:"string",variants:[{begin:/"""/,end:/"""/},{begin:/"/,end:/"/}],endsParent:!0},{className:"link",begin:"http|https",endsWithParent:!0,excludeEnd:!0}]}]};e["default"]=function(n){const e=s()(n),a=e.contains.find(({className:n})=>"code"===n);a.variants=a.variants.filter(({begin:n})=>!n.includes("( {4}|\\t)"));const i=[...e.contains.filter(({className:n})=>"code"!==n),a];return{...e,contains:[c,t,d,l,...i]}}}}]); \ No newline at end of file diff --git a/docs/docc/Reducer.doccarchive/js/highlight-js-custom-swift.5cda5c20.js b/docs/docc/Reducer.doccarchive/js/highlight-js-custom-swift.5cda5c20.js deleted file mode 100644 index d19f988..0000000 --- a/docs/docc/Reducer.doccarchive/js/highlight-js-custom-swift.5cda5c20.js +++ /dev/null @@ -1,10 +0,0 @@ -/*! - * This source file is part of the Swift.org open source project - * - * Copyright (c) 2021 Apple Inc. and the Swift project authors - * Licensed under Apache License v2.0 with Runtime Library Exception - * - * See https://swift.org/LICENSE.txt for license information - * See https://swift.org/CONTRIBUTORS.txt for Swift project authors - */ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["highlight-js-custom-swift","highlight-js-swift"],{"2a39":function(e,n){function t(e){return e?"string"===typeof e?e:e.source:null}function a(e){return i("(?=",e,")")}function i(...e){const n=e.map(e=>t(e)).join("");return n}function s(e){const n=e[e.length-1];return"object"===typeof n&&n.constructor===Object?(e.splice(e.length-1,1),n):{}}function c(...e){const n=s(e),a="("+(n.capture?"":"?:")+e.map(e=>t(e)).join("|")+")";return a}const u=e=>i(/\b/,e,/\w$/.test(e)?/\b/:/\B/),o=["Protocol","Type"].map(u),r=["init","self"].map(u),l=["Any","Self"],m=["actor","associatedtype","async","await",/as\?/,/as!/,"as","break","case","catch","class","continue","convenience","default","defer","deinit","didSet","do","dynamic","else","enum","extension","fallthrough",/fileprivate\(set\)/,"fileprivate","final","for","func","get","guard","if","import","indirect","infix",/init\?/,/init!/,"inout",/internal\(set\)/,"internal","in","is","isolated","nonisolated","lazy","let","mutating","nonmutating",/open\(set\)/,"open","operator","optional","override","postfix","precedencegroup","prefix",/private\(set\)/,"private","protocol",/public\(set\)/,"public","repeat","required","rethrows","return","set","some","static","struct","subscript","super","switch","throws","throw",/try\?/,/try!/,"try","typealias",/unowned\(safe\)/,/unowned\(unsafe\)/,"unowned","var","weak","where","while","willSet"],d=["false","nil","true"],p=["assignment","associativity","higherThan","left","lowerThan","none","right"],F=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warn_unqualified_access","#warning"],b=["abs","all","any","assert","assertionFailure","debugPrint","dump","fatalError","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","withoutActuallyEscaping","zip"],f=c(/[/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),h=c(f,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),w=i(f,h,"*"),y=c(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),g=c(y,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),E=i(y,g,"*"),v=i(/[A-Z]/,g,"*"),A=["autoclosure",i(/convention\(/,c("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",i(/objc\(/,E,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","testable","UIApplicationMain","unknown","usableFromInline"],N=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];function k(e){const n={match:/\s+/,relevance:0},t=e.COMMENT("/\\*","\\*/",{contains:["self"]}),s=[e.C_LINE_COMMENT_MODE,t],f={match:[/\./,c(...o,...r)],className:{2:"keyword"}},y={match:i(/\./,c(...m)),relevance:0},k=m.filter(e=>"string"===typeof e).concat(["_|0"]),C=m.filter(e=>"string"!==typeof e).concat(l).map(u),D={variants:[{className:"keyword",match:c(...C,...r)}]},B={$pattern:c(/\b\w+/,/#\w+/),keyword:k.concat(F),literal:d},_=[f,y,D],S={match:i(/\./,c(...b)),relevance:0},x={className:"built_in",match:i(/\b/,c(...b),/(?=\()/)},M=[S,x],I={match:/->/,relevance:0},$={className:"operator",relevance:0,variants:[{match:w},{match:`\\.(\\.|${h})+`}]},O=[I,$],L="([0-9]_*)+",T="([0-9a-fA-F]_*)+",j={className:"number",relevance:0,variants:[{match:`\\b(${L})(\\.(${L}))?([eE][+-]?(${L}))?\\b`},{match:`\\b0x(${T})(\\.(${T}))?([pP][+-]?(${L}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},K=(e="")=>({className:"subst",variants:[{match:i(/\\/,e,/[0\\tnr"']/)},{match:i(/\\/,e,/u\{[0-9a-fA-F]{1,8}\}/)}]}),P=(e="")=>({className:"subst",match:i(/\\/,e,/[\t ]*(?:[\r\n]|\r\n)/)}),z=(e="")=>({className:"subst",label:"interpol",begin:i(/\\/,e,/\(/),end:/\)/}),q=(e="")=>({begin:i(e,/"""/),end:i(/"""/,e),contains:[K(e),P(e),z(e)]}),U=(e="")=>({begin:i(e,/"/),end:i(/"/,e),contains:[K(e),z(e)]}),Z={className:"string",variants:[q(),q("#"),q("##"),q("###"),U(),U("#"),U("##"),U("###")]},V={match:i(/`/,E,/`/)},W={className:"variable",match:/\$\d+/},G={className:"variable",match:`\\$${g}+`},J=[V,W,G],R={match:/(@|#)available/,className:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:N,contains:[...O,j,Z]}]}},X={className:"keyword",match:i(/@/,c(...A))},H={className:"meta",match:i(/@/,E)},Q=[R,X,H],Y={match:a(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:i(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,g,"+")},{className:"type",match:v,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:i(/\s+&\s+/,a(v)),relevance:0}]},ee={begin://,keywords:B,contains:[...s,..._,...Q,I,Y]};Y.contains.push(ee);const ne={match:i(E,/\s*:/),keywords:"_|0",relevance:0},te={begin:/\(/,end:/\)/,relevance:0,keywords:B,contains:["self",ne,...s,..._,...M,...O,j,Z,...J,...Q,Y]},ae={begin://,contains:[...s,Y]},ie={begin:c(a(i(E,/\s*:/)),a(i(E,/\s+/,E,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:E}]},se={begin:/\(/,end:/\)/,keywords:B,contains:[ie,...s,..._,...O,j,Z,...Q,Y,te],endsParent:!0,illegal:/["']/},ce={match:[/func/,/\s+/,c(V.match,E,w)],className:{1:"keyword",3:"title.function"},contains:[ae,se,n],illegal:[/\[/,/%/]},ue={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[ae,se,n],illegal:/\[|%/},oe={match:[/operator/,/\s+/,w],className:{1:"keyword",3:"title"}},re={begin:[/precedencegroup/,/\s+/,v],className:{1:"keyword",3:"title"},contains:[Y],keywords:[...p,...d],end:/}/};for(const a of Z.variants){const e=a.contains.find(e=>"interpol"===e.label);e.keywords=B;const n=[..._,...M,...O,j,Z,...J];e.contains=[...n,{begin:/\(/,end:/\)/,contains:["self",...n]}]}return{name:"Swift",keywords:B,contains:[...s,ce,ue,{beginKeywords:"struct protocol class extension enum actor",end:"\\{",excludeEnd:!0,keywords:B,contains:[e.inherit(e.TITLE_MODE,{className:"title.class",begin:/[A-Za-z$_][\u00C0-\u02B80-9A-Za-z$_]*/}),..._]},oe,re,{beginKeywords:"import",end:/$/,contains:[...s],relevance:0},..._,...M,...O,j,Z,...J,...Q,Y,te]}}e.exports=k},"81c8":function(e,n,t){"use strict";t.r(n);var a=t("2a39"),i=t.n(a);n["default"]=function(e){const n=i()(e);n.keywords.keyword=[...n.keywords.keyword,"distributed"];const t=({beginKeywords:e=""})=>e.split(" ").includes("class"),a=n.contains.findIndex(t);if(a>=0){const{beginKeywords:e,...t}=n.contains[a];n.contains[a]={...t,begin:/\b(struct|protocol|extension|enum|actor|class\b(?!.*\bfunc))\b/}}return n}}}]); \ No newline at end of file diff --git a/docs/docc/Reducer.doccarchive/js/highlight-js-diff.62d66733.js b/docs/docc/Reducer.doccarchive/js/highlight-js-diff.62d66733.js deleted file mode 100644 index 64337fa..0000000 --- a/docs/docc/Reducer.doccarchive/js/highlight-js-diff.62d66733.js +++ /dev/null @@ -1,10 +0,0 @@ -/*! - * This source file is part of the Swift.org open source project - * - * Copyright (c) 2021 Apple Inc. and the Swift project authors - * Licensed under Apache License v2.0 with Runtime Library Exception - * - * See https://swift.org/LICENSE.txt for license information - * See https://swift.org/CONTRIBUTORS.txt for Swift project authors - */ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["highlight-js-diff"],{"48b8":function(e,n){function a(e){const n=e.regex;return{name:"Diff",aliases:["patch"],contains:[{className:"meta",relevance:10,match:n.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/,/^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/)},{className:"comment",variants:[{begin:n.either(/Index: /,/^index/,/={3,}/,/^-{3}/,/^\*{3} /,/^\+{3}/,/^diff --git/),end:/$/},{match:/^\*{15}$/}]},{className:"addition",begin:/^\+/,end:/$/},{className:"deletion",begin:/^-/,end:/$/},{className:"addition",begin:/^!/,end:/$/}]}}e.exports=a}}]); \ No newline at end of file diff --git a/docs/docc/Reducer.doccarchive/js/highlight-js-http.163e45b6.js b/docs/docc/Reducer.doccarchive/js/highlight-js-http.163e45b6.js deleted file mode 100644 index 14f39a9..0000000 --- a/docs/docc/Reducer.doccarchive/js/highlight-js-http.163e45b6.js +++ /dev/null @@ -1,10 +0,0 @@ -/*! - * This source file is part of the Swift.org open source project - * - * Copyright (c) 2021 Apple Inc. and the Swift project authors - * Licensed under Apache License v2.0 with Runtime Library Exception - * - * See https://swift.org/LICENSE.txt for license information - * See https://swift.org/CONTRIBUTORS.txt for Swift project authors - */ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["highlight-js-http"],{c01d:function(e,n){function a(e){const n=e.regex,a="HTTP/(2|1\\.[01])",s=/[A-Za-z][A-Za-z0-9-]*/,t={className:"attribute",begin:n.concat("^",s,"(?=\\:\\s)"),starts:{contains:[{className:"punctuation",begin:/: /,relevance:0,starts:{end:"$",relevance:0}}]}},i=[t,{begin:"\\n\\n",starts:{subLanguage:[],endsWithParent:!0}}];return{name:"HTTP",aliases:["https"],illegal:/\S/,contains:[{begin:"^(?="+a+" \\d{3})",end:/$/,contains:[{className:"meta",begin:a},{className:"number",begin:"\\b\\d{3}\\b"}],starts:{end:/\b\B/,illegal:/\S/,contains:i}},{begin:"(?=^[A-Z]+ (.*?) "+a+"$)",end:/$/,contains:[{className:"string",begin:" ",end:" ",excludeBegin:!0,excludeEnd:!0},{className:"meta",begin:a},{className:"keyword",begin:"[A-Z]+"}],starts:{end:/\b\B/,illegal:/\S/,contains:i}},e.inherit(t,{relevance:0})]}}e.exports=a}}]); \ No newline at end of file diff --git a/docs/docc/Reducer.doccarchive/js/highlight-js-java.8326d9d8.js b/docs/docc/Reducer.doccarchive/js/highlight-js-java.8326d9d8.js deleted file mode 100644 index f11ca2a..0000000 --- a/docs/docc/Reducer.doccarchive/js/highlight-js-java.8326d9d8.js +++ /dev/null @@ -1,10 +0,0 @@ -/*! - * This source file is part of the Swift.org open source project - * - * Copyright (c) 2021 Apple Inc. and the Swift project authors - * Licensed under Apache License v2.0 with Runtime Library Exception - * - * See https://swift.org/LICENSE.txt for license information - * See https://swift.org/CONTRIBUTORS.txt for Swift project authors - */ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["highlight-js-java"],{"332f":function(e,a){var n="[0-9](_*[0-9])*",s=`\\.(${n})`,i="[0-9a-fA-F](_*[0-9a-fA-F])*",t={className:"number",variants:[{begin:`(\\b(${n})((${s})|\\.)?|(${s}))[eE][+-]?(${n})[fFdD]?\\b`},{begin:`\\b(${n})((${s})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${s})[fFdD]?\\b`},{begin:`\\b(${n})[fFdD]\\b`},{begin:`\\b0[xX]((${i})\\.?|(${i})?\\.(${i}))[pP][+-]?(${n})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${i})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function r(e,a,n){return-1===n?"":e.replace(a,s=>r(e,a,n-1))}function c(e){e.regex;const a="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",n=a+r("(?:<"+a+"~~~(?:\\s*,\\s*"+a+"~~~)*>)?",/~~~/g,2),s=["synchronized","abstract","private","var","static","if","const ","for","while","strictfp","finally","protected","import","native","final","void","enum","else","break","transient","catch","instanceof","volatile","case","assert","package","default","public","try","switch","continue","throws","protected","public","private","module","requires","exports","do"],i=["super","this"],c=["false","true","null"],l=["char","boolean","long","float","int","byte","short","double"],o={keyword:s,literal:c,type:l,built_in:i},b={className:"meta",begin:"@"+a,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},_={className:"params",begin:/\(/,end:/\)/,keywords:o,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:o,illegal:/<\/|#/,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"string",contains:[e.BACKSLASH_ESCAPE]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,a],className:{1:"keyword",3:"title.class"}},{begin:[a,/\s+/,a,/\s+/,/=/],className:{1:"type",3:"variable",5:"operator"}},{begin:[/record/,/\s+/,a],className:{1:"keyword",3:"title.class"},contains:[_,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new throw return else",relevance:0},{begin:["(?:"+n+"\\s+)",e.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:"title.function"},keywords:o,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:o,relevance:0,contains:[b,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,t,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},t,b]}}e.exports=c}}]); \ No newline at end of file diff --git a/docs/docc/Reducer.doccarchive/js/highlight-js-javascript.acb8a8eb.js b/docs/docc/Reducer.doccarchive/js/highlight-js-javascript.acb8a8eb.js deleted file mode 100644 index ac843fc..0000000 --- a/docs/docc/Reducer.doccarchive/js/highlight-js-javascript.acb8a8eb.js +++ /dev/null @@ -1,10 +0,0 @@ -/*! - * This source file is part of the Swift.org open source project - * - * Copyright (c) 2021 Apple Inc. and the Swift project authors - * Licensed under Apache License v2.0 with Runtime Library Exception - * - * See https://swift.org/LICENSE.txt for license information - * See https://swift.org/CONTRIBUTORS.txt for Swift project authors - */ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["highlight-js-javascript"],{"4dd1":function(e,n){const a="[A-Za-z$_][0-9A-Za-z$_]*",t=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],s=["true","false","null","undefined","NaN","Infinity"],c=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],r=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],i=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],o=["arguments","this","super","console","window","document","localStorage","module","global"],l=[].concat(i,c,r);function b(e){const n=e.regex,b=(e,{after:n})=>{const a="",end:""},u=/<[A-Za-z0-9\\._:-]+\s*\/>/,m={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(e,n)=>{const a=e[0].length+e.index,t=e.input[a];if("<"===t||","===t)return void n.ignoreMatch();let s;">"===t&&(b(e,{after:a})||n.ignoreMatch());const c=e.input.substr(a);(s=c.match(/^\s+extends\s+/))&&0===s.index&&n.ignoreMatch()}},E={$pattern:a,keyword:t,literal:s,built_in:l,"variable.language":o},A="[0-9](_?[0-9])*",y=`\\.(${A})`,N="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",f={className:"number",variants:[{begin:`(\\b(${N})((${y})|\\.)?|(${y}))[eE][+-]?(${A})\\b`},{begin:`\\b(${N})\\b((${y})\\b|\\.)?|(${y})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},h={className:"subst",begin:"\\$\\{",end:"\\}",keywords:E,contains:[]},_={begin:"html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,h],subLanguage:"xml"}},p={begin:"css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,h],subLanguage:"css"}},v={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,h]},w=e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:d+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),S={className:"comment",variants:[w,e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},R=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,_,p,v,f];h.contains=R.concat({begin:/\{/,end:/\}/,keywords:E,contains:["self"].concat(R)});const k=[].concat(S,h.contains),O=k.concat([{begin:/\(/,end:/\)/,keywords:E,contains:["self"].concat(k)}]),I={className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:E,contains:O},x={variants:[{match:[/class/,/\s+/,d,/\s+/,/extends/,/\s+/,n.concat(d,"(",n.concat(/\./,d),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,d],scope:{1:"keyword",3:"title.class"}}]},T={relevance:0,match:n.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]+|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+/),className:"title.class",keywords:{_:[...c,...r]}},C={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},M={variants:[{match:[/function/,/\s+/,d,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[I],illegal:/%/},B={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function $(e){return n.concat("(?!",e.join("|"),")")}const D={match:n.concat(/\b/,$([...i,"super"]),d,n.lookahead(/\(/)),className:"title.function",relevance:0},U={begin:n.concat(/\./,n.lookahead(n.concat(d,/(?![0-9A-Za-z$_(])/))),end:d,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},Z={match:[/get|set/,/\s+/,d,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},I]},z="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",F={match:[/const|var|let/,/\s+/,d,/\s*/,/=\s*/,n.lookahead(z)],className:{1:"keyword",3:"title.function"},contains:[I]};return{name:"Javascript",aliases:["js","jsx","mjs","cjs"],keywords:E,exports:{PARAMS_CONTAINS:O,CLASS_REFERENCE:T},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),C,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,_,p,v,S,f,T,{className:"attr",begin:d+n.lookahead(":"),relevance:0},F,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[S,e.REGEXP_MODE,{className:"function",begin:z,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:E,contains:O}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:g.begin,end:g.end},{match:u},{begin:m.begin,"on:begin":m.isTrulyOpeningTag,end:m.end}],subLanguage:"xml",contains:[{begin:m.begin,end:m.end,skip:!0,contains:["self"]}]}]},M,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[I,e.inherit(e.TITLE_MODE,{begin:d,className:"title.function"})]},{match:/\.\.\./,relevance:0},U,{match:"\\$"+d,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[I]},D,B,x,Z,{match:/\$[(.]/}]}}e.exports=b}}]); \ No newline at end of file diff --git a/docs/docc/Reducer.doccarchive/js/highlight-js-json.471128d2.js b/docs/docc/Reducer.doccarchive/js/highlight-js-json.471128d2.js deleted file mode 100644 index c87d3c3..0000000 --- a/docs/docc/Reducer.doccarchive/js/highlight-js-json.471128d2.js +++ /dev/null @@ -1,10 +0,0 @@ -/*! - * This source file is part of the Swift.org open source project - * - * Copyright (c) 2021 Apple Inc. and the Swift project authors - * Licensed under Apache License v2.0 with Runtime Library Exception - * - * See https://swift.org/LICENSE.txt for license information - * See https://swift.org/CONTRIBUTORS.txt for Swift project authors - */ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["highlight-js-json"],{"5ad2":function(n,e){function a(n){const e={className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},a={match:/[{}[\],:]/,className:"punctuation",relevance:0},s={beginKeywords:["true","false","null"].join(" ")};return{name:"JSON",contains:[e,a,n.QUOTE_STRING_MODE,s,n.C_NUMBER_MODE,n.C_LINE_COMMENT_MODE,n.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}n.exports=a}}]); \ No newline at end of file diff --git a/docs/docc/Reducer.doccarchive/js/highlight-js-llvm.6100b125.js b/docs/docc/Reducer.doccarchive/js/highlight-js-llvm.6100b125.js deleted file mode 100644 index 0beb806..0000000 --- a/docs/docc/Reducer.doccarchive/js/highlight-js-llvm.6100b125.js +++ /dev/null @@ -1,10 +0,0 @@ -/*! - * This source file is part of the Swift.org open source project - * - * Copyright (c) 2021 Apple Inc. and the Swift project authors - * Licensed under Apache License v2.0 with Runtime Library Exception - * - * See https://swift.org/LICENSE.txt for license information - * See https://swift.org/CONTRIBUTORS.txt for Swift project authors - */ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["highlight-js-llvm"],{"7c30":function(e,n){function a(e){const n=e.regex,a=/([-a-zA-Z$._][\w$.-]*)/,t={className:"type",begin:/\bi\d+(?=\s|\b)/},i={className:"operator",relevance:0,begin:/=/},c={className:"punctuation",relevance:0,begin:/,/},l={className:"number",variants:[{begin:/0[xX][a-fA-F0-9]+/},{begin:/-?\d+(?:[.]\d+)?(?:[eE][-+]?\d+(?:[.]\d+)?)?/}],relevance:0},r={className:"symbol",variants:[{begin:/^\s*[a-z]+:/}],relevance:0},s={className:"variable",variants:[{begin:n.concat(/%/,a)},{begin:/%\d+/},{begin:/#\d+/}]},o={className:"title",variants:[{begin:n.concat(/@/,a)},{begin:/@\d+/},{begin:n.concat(/!/,a)},{begin:n.concat(/!\d+/,a)},{begin:/!\d+/}]};return{name:"LLVM IR",keywords:"begin end true false declare define global constant private linker_private internal available_externally linkonce linkonce_odr weak weak_odr appending dllimport dllexport common default hidden protected extern_weak external thread_local zeroinitializer undef null to tail target triple datalayout volatile nuw nsw nnan ninf nsz arcp fast exact inbounds align addrspace section alias module asm sideeffect gc dbg linker_private_weak attributes blockaddress initialexec localdynamic localexec prefix unnamed_addr ccc fastcc coldcc x86_stdcallcc x86_fastcallcc arm_apcscc arm_aapcscc arm_aapcs_vfpcc ptx_device ptx_kernel intel_ocl_bicc msp430_intrcc spir_func spir_kernel x86_64_sysvcc x86_64_win64cc x86_thiscallcc cc c signext zeroext inreg sret nounwind noreturn noalias nocapture byval nest readnone readonly inlinehint noinline alwaysinline optsize ssp sspreq noredzone noimplicitfloat naked builtin cold nobuiltin noduplicate nonlazybind optnone returns_twice sanitize_address sanitize_memory sanitize_thread sspstrong uwtable returned type opaque eq ne slt sgt sle sge ult ugt ule uge oeq one olt ogt ole oge ord uno ueq une x acq_rel acquire alignstack atomic catch cleanup filter inteldialect max min monotonic nand personality release seq_cst singlethread umax umin unordered xchg add fadd sub fsub mul fmul udiv sdiv fdiv urem srem frem shl lshr ashr and or xor icmp fcmp phi call trunc zext sext fptrunc fpext uitofp sitofp fptoui fptosi inttoptr ptrtoint bitcast addrspacecast select va_arg ret br switch invoke unwind unreachable indirectbr landingpad resume malloc alloca free load store getelementptr extractelement insertelement shufflevector getresult extractvalue insertvalue atomicrmw cmpxchg fence argmemonly double",contains:[t,e.COMMENT(/;\s*$/,null,{relevance:0}),e.COMMENT(/;/,/$/),e.QUOTE_STRING_MODE,{className:"string",variants:[{begin:/"/,end:/[^\\]"/}]},o,c,i,s,r,l]}}e.exports=a}}]); \ No newline at end of file diff --git a/docs/docc/Reducer.doccarchive/js/highlight-js-markdown.90077643.js b/docs/docc/Reducer.doccarchive/js/highlight-js-markdown.90077643.js deleted file mode 100644 index dc8d097..0000000 --- a/docs/docc/Reducer.doccarchive/js/highlight-js-markdown.90077643.js +++ /dev/null @@ -1,10 +0,0 @@ -/*! - * This source file is part of the Swift.org open source project - * - * Copyright (c) 2021 Apple Inc. and the Swift project authors - * Licensed under Apache License v2.0 with Runtime Library Exception - * - * See https://swift.org/LICENSE.txt for license information - * See https://swift.org/CONTRIBUTORS.txt for Swift project authors - */ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["highlight-js-markdown"],{"04b0":function(n,e){function a(n){const e=n.regex,a={begin:/<\/?[A-Za-z_]/,end:">",subLanguage:"xml",relevance:0},i={begin:"^[-\\*]{3,}",end:"$"},s={className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},c={className:"bullet",begin:"^[ \t]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},t={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]},g=/[A-Za-z][A-Za-z0-9+.-]*/,d={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:e.concat(/\[.+?\]\(/,g,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}]},l={className:"strong",contains:[],variants:[{begin:/_{2}/,end:/_{2}/},{begin:/\*{2}/,end:/\*{2}/}]},o={className:"emphasis",contains:[],variants:[{begin:/\*(?!\*)/,end:/\*/},{begin:/_(?!_)/,end:/_/,relevance:0}]};l.contains.push(o),o.contains.push(l);let b=[a,d];l.contains=l.contains.concat(b),o.contains=o.contains.concat(b),b=b.concat(l,o);const r={className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:b},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:b}]}]},m={className:"quote",begin:"^>\\s+",contains:b,end:"$"};return{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[r,a,c,l,o,m,s,i,d,t]}}n.exports=a}}]); \ No newline at end of file diff --git a/docs/docc/Reducer.doccarchive/js/highlight-js-objectivec.bcdf5156.js b/docs/docc/Reducer.doccarchive/js/highlight-js-objectivec.bcdf5156.js deleted file mode 100644 index 2456ffc..0000000 --- a/docs/docc/Reducer.doccarchive/js/highlight-js-objectivec.bcdf5156.js +++ /dev/null @@ -1,10 +0,0 @@ -/*! - * This source file is part of the Swift.org open source project - * - * Copyright (c) 2021 Apple Inc. and the Swift project authors - * Licensed under Apache License v2.0 with Runtime Library Exception - * - * See https://swift.org/LICENSE.txt for license information - * See https://swift.org/CONTRIBUTORS.txt for Swift project authors - */ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["highlight-js-objectivec"],{"9bf2":function(e,n){function _(e){const n={className:"built_in",begin:"\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+"},_=/[a-zA-Z@][a-zA-Z0-9_]*/,i=["int","float","while","char","export","sizeof","typedef","const","struct","for","union","unsigned","long","volatile","static","bool","mutable","if","do","return","goto","void","enum","else","break","extern","asm","case","short","default","double","register","explicit","signed","typename","this","switch","continue","wchar_t","inline","readonly","assign","readwrite","self","@synchronized","id","typeof","nonatomic","super","unichar","IBOutlet","IBAction","strong","weak","copy","in","out","inout","bycopy","byref","oneway","__strong","__weak","__block","__autoreleasing","@private","@protected","@public","@try","@property","@end","@throw","@catch","@finally","@autoreleasepool","@synthesize","@dynamic","@selector","@optional","@required","@encode","@package","@import","@defs","@compatibility_alias","__bridge","__bridge_transfer","__bridge_retained","__bridge_retain","__covariant","__contravariant","__kindof","_Nonnull","_Nullable","_Null_unspecified","__FUNCTION__","__PRETTY_FUNCTION__","__attribute__","getter","setter","retain","unsafe_unretained","nonnull","nullable","null_unspecified","null_resettable","class","instancetype","NS_DESIGNATED_INITIALIZER","NS_UNAVAILABLE","NS_REQUIRES_SUPER","NS_RETURNS_INNER_POINTER","NS_INLINE","NS_AVAILABLE","NS_DEPRECATED","NS_ENUM","NS_OPTIONS","NS_SWIFT_UNAVAILABLE","NS_ASSUME_NONNULL_BEGIN","NS_ASSUME_NONNULL_END","NS_REFINED_FOR_SWIFT","NS_SWIFT_NAME","NS_SWIFT_NOTHROW","NS_DURING","NS_HANDLER","NS_ENDHANDLER","NS_VALUERETURN","NS_VOIDRETURN"],t=["false","true","FALSE","TRUE","nil","YES","NO","NULL"],a=["BOOL","dispatch_once_t","dispatch_queue_t","dispatch_sync","dispatch_async","dispatch_once"],o={$pattern:_,keyword:i,literal:t,built_in:a},s={$pattern:_,keyword:["@interface","@class","@protocol","@implementation"]};return{name:"Objective-C",aliases:["mm","objc","obj-c","obj-c++","objective-c++"],keywords:o,illegal:"/,end:/$/,illegal:"\\n"},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"class",begin:"("+s.keyword.join("|")+")\\b",end:/(\{|$)/,excludeEnd:!0,keywords:s,contains:[e.UNDERSCORE_TITLE_MODE]},{begin:"\\."+e.UNDERSCORE_IDENT_RE,relevance:0}]}}e.exports=_}}]); \ No newline at end of file diff --git a/docs/docc/Reducer.doccarchive/js/highlight-js-perl.757d7b6f.js b/docs/docc/Reducer.doccarchive/js/highlight-js-perl.757d7b6f.js deleted file mode 100644 index a4c74d1..0000000 --- a/docs/docc/Reducer.doccarchive/js/highlight-js-perl.757d7b6f.js +++ /dev/null @@ -1,10 +0,0 @@ -/*! - * This source file is part of the Swift.org open source project - * - * Copyright (c) 2021 Apple Inc. and the Swift project authors - * Licensed under Apache License v2.0 with Runtime Library Exception - * - * See https://swift.org/LICENSE.txt for license information - * See https://swift.org/CONTRIBUTORS.txt for Swift project authors - */ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["highlight-js-perl"],{"6a51":function(e,n){function t(e){const n=e.regex,t=["abs","accept","alarm","and","atan2","bind","binmode","bless","break","caller","chdir","chmod","chomp","chop","chown","chr","chroot","close","closedir","connect","continue","cos","crypt","dbmclose","dbmopen","defined","delete","die","do","dump","each","else","elsif","endgrent","endhostent","endnetent","endprotoent","endpwent","endservent","eof","eval","exec","exists","exit","exp","fcntl","fileno","flock","for","foreach","fork","format","formline","getc","getgrent","getgrgid","getgrnam","gethostbyaddr","gethostbyname","gethostent","getlogin","getnetbyaddr","getnetbyname","getnetent","getpeername","getpgrp","getpriority","getprotobyname","getprotobynumber","getprotoent","getpwent","getpwnam","getpwuid","getservbyname","getservbyport","getservent","getsockname","getsockopt","given","glob","gmtime","goto","grep","gt","hex","if","index","int","ioctl","join","keys","kill","last","lc","lcfirst","length","link","listen","local","localtime","log","lstat","lt","ma","map","mkdir","msgctl","msgget","msgrcv","msgsnd","my","ne","next","no","not","oct","open","opendir","or","ord","our","pack","package","pipe","pop","pos","print","printf","prototype","push","q|0","qq","quotemeta","qw","qx","rand","read","readdir","readline","readlink","readpipe","recv","redo","ref","rename","require","reset","return","reverse","rewinddir","rindex","rmdir","say","scalar","seek","seekdir","select","semctl","semget","semop","send","setgrent","sethostent","setnetent","setpgrp","setpriority","setprotoent","setpwent","setservent","setsockopt","shift","shmctl","shmget","shmread","shmwrite","shutdown","sin","sleep","socket","socketpair","sort","splice","split","sprintf","sqrt","srand","stat","state","study","sub","substr","symlink","syscall","sysopen","sysread","sysseek","system","syswrite","tell","telldir","tie","tied","time","times","tr","truncate","uc","ucfirst","umask","undef","unless","unlink","unpack","unshift","untie","until","use","utime","values","vec","wait","waitpid","wantarray","warn","when","while","write","x|0","xor","y|0"],s=/[dualxmsipngr]{0,12}/,r={$pattern:/[\w.]+/,keyword:t.join(" ")},i={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:r},a={begin:/->\{/,end:/\}/},o={variants:[{begin:/\$\d/},{begin:n.concat(/[$%@](\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,"(?![A-Za-z])(?![@$%])")},{begin:/[$%@][^\s\w{]/,relevance:0}]},c=[e.BACKSLASH_ESCAPE,i,o],g=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],l=(e,t,r="\\1")=>{const i="\\1"===r?r:n.concat(r,t);return n.concat(n.concat("(?:",e,")"),t,/(?:\\.|[^\\\/])*?/,i,/(?:\\.|[^\\\/])*?/,r,s)},d=(e,t,r)=>n.concat(n.concat("(?:",e,")"),t,/(?:\\.|[^\\\/])*?/,r,s),p=[o,e.HASH_COMMENT_MODE,e.COMMENT(/^=\w/,/=cut/,{endsWithParent:!0}),a,{className:"string",contains:c,variants:[{begin:"q[qwxr]?\\s*\\(",end:"\\)",relevance:5},{begin:"q[qwxr]?\\s*\\[",end:"\\]",relevance:5},{begin:"q[qwxr]?\\s*\\{",end:"\\}",relevance:5},{begin:"q[qwxr]?\\s*\\|",end:"\\|",relevance:5},{begin:"q[qwxr]?\\s*<",end:">",relevance:5},{begin:"qw\\s+q",end:"q",relevance:5},{begin:"'",end:"'",contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"'},{begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE]},{begin:/\{\w+\}/,relevance:0},{begin:"-?\\w+\\s*=>",relevance:0}]},{className:"number",begin:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",relevance:0},{begin:"(\\/\\/|"+e.RE_STARTERS_RE+"|\\b(split|return|print|reverse|grep)\\b)\\s*",keywords:"split return print reverse grep",relevance:0,contains:[e.HASH_COMMENT_MODE,{className:"regexp",variants:[{begin:l("s|tr|y",n.either(...g,{capture:!0}))},{begin:l("s|tr|y","\\(","\\)")},{begin:l("s|tr|y","\\[","\\]")},{begin:l("s|tr|y","\\{","\\}")}],relevance:2},{className:"regexp",variants:[{begin:/(m|qr)\/\//,relevance:0},{begin:d("(?:m|qr)?",/\//,/\//)},{begin:d("m|qr",n.either(...g,{capture:!0}),/\1/)},{begin:d("m|qr",/\(/,/\)/)},{begin:d("m|qr",/\[/,/\]/)},{begin:d("m|qr",/\{/,/\}/)}]}]},{className:"function",beginKeywords:"sub",end:"(\\s*\\(.*?\\))?[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE]},{begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return i.contains=p,a.contains=p,{name:"Perl",aliases:["pl","pm"],keywords:r,contains:p}}e.exports=t}}]); \ No newline at end of file diff --git a/docs/docc/Reducer.doccarchive/js/highlight-js-php.cc8d6c27.js b/docs/docc/Reducer.doccarchive/js/highlight-js-php.cc8d6c27.js deleted file mode 100644 index 3d12a9c..0000000 --- a/docs/docc/Reducer.doccarchive/js/highlight-js-php.cc8d6c27.js +++ /dev/null @@ -1,10 +0,0 @@ -/*! - * This source file is part of the Swift.org open source project - * - * Copyright (c) 2021 Apple Inc. and the Swift project authors - * Licensed under Apache License v2.0 with Runtime Library Exception - * - * See https://swift.org/LICENSE.txt for license information - * See https://swift.org/CONTRIBUTORS.txt for Swift project authors - */ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["highlight-js-php"],{2907:function(e,r){function t(e){const r={className:"variable",begin:"\\$+[a-zA-Z_-ÿ][a-zA-Z0-9_-ÿ]*(?![A-Za-z0-9])(?![$])"},t={className:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?[=]?/},{begin:/\?>/}]},a={className:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},n=e.inherit(e.APOS_STRING_MODE,{illegal:null}),i=e.inherit(e.QUOTE_STRING_MODE,{illegal:null,contains:e.QUOTE_STRING_MODE.contains.concat(a)}),o=e.END_SAME_AS_BEGIN({begin:/<<<[ \t]*(\w+)\n/,end:/[ \t]*(\w+)\b/,contains:e.QUOTE_STRING_MODE.contains.concat(a)}),l={className:"string",contains:[e.BACKSLASH_ESCAPE,t],variants:[e.inherit(n,{begin:"b'",end:"'"}),e.inherit(i,{begin:'b"',end:'"'}),i,n,o]},c={className:"number",variants:[{begin:"\\b0b[01]+(?:_[01]+)*\\b"},{begin:"\\b0o[0-7]+(?:_[0-7]+)*\\b"},{begin:"\\b0x[\\da-f]+(?:_[\\da-f]+)*\\b"},{begin:"(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:e[+-]?\\d+)?"}],relevance:0},s={keyword:"__CLASS__ __DIR__ __FILE__ __FUNCTION__ __LINE__ __METHOD__ __NAMESPACE__ __TRAIT__ die echo exit include include_once print require require_once array abstract and as binary bool boolean break callable case catch class clone const continue declare default do double else elseif empty enddeclare endfor endforeach endif endswitch endwhile enum eval extends final finally float for foreach from global goto if implements instanceof insteadof int integer interface isset iterable list match|0 mixed new object or private protected public real return string switch throw trait try unset use var void while xor yield",literal:"false null true",built_in:"Error|0 AppendIterator ArgumentCountError ArithmeticError ArrayIterator ArrayObject AssertionError BadFunctionCallException BadMethodCallException CachingIterator CallbackFilterIterator CompileError Countable DirectoryIterator DivisionByZeroError DomainException EmptyIterator ErrorException Exception FilesystemIterator FilterIterator GlobIterator InfiniteIterator InvalidArgumentException IteratorIterator LengthException LimitIterator LogicException MultipleIterator NoRewindIterator OutOfBoundsException OutOfRangeException OuterIterator OverflowException ParentIterator ParseError RangeException RecursiveArrayIterator RecursiveCachingIterator RecursiveCallbackFilterIterator RecursiveDirectoryIterator RecursiveFilterIterator RecursiveIterator RecursiveIteratorIterator RecursiveRegexIterator RecursiveTreeIterator RegexIterator RuntimeException SeekableIterator SplDoublyLinkedList SplFileInfo SplFileObject SplFixedArray SplHeap SplMaxHeap SplMinHeap SplObjectStorage SplObserver SplObserver SplPriorityQueue SplQueue SplStack SplSubject SplSubject SplTempFileObject TypeError UnderflowException UnexpectedValueException UnhandledMatchError ArrayAccess Closure Generator Iterator IteratorAggregate Serializable Stringable Throwable Traversable WeakReference WeakMap Directory __PHP_Incomplete_Class parent php_user_filter self static stdClass"};return{case_insensitive:!0,keywords:s,contains:[e.HASH_COMMENT_MODE,e.COMMENT("//","$",{contains:[t]}),e.COMMENT("/\\*","\\*/",{contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),e.COMMENT("__halt_compiler.+?;",!1,{endsWithParent:!0,keywords:"__halt_compiler"}),t,{className:"keyword",begin:/\$this\b/},r,{begin:/(::|->)+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/},{className:"function",relevance:0,beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[{beginKeywords:"use"},e.UNDERSCORE_TITLE_MODE,{begin:"=>",endsParent:!0},{className:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:s,contains:["self",r,e.C_BLOCK_COMMENT_MODE,l,c]}]},{className:"class",variants:[{beginKeywords:"enum",illegal:/[($"]/},{beginKeywords:"class interface trait",illegal:/[:($"]/}],relevance:0,end:/\{/,excludeEnd:!0,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",relevance:0,end:";",illegal:/[.']/,contains:[e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"use",relevance:0,end:";",contains:[e.UNDERSCORE_TITLE_MODE]},l,c]}}e.exports=t}}]); \ No newline at end of file diff --git a/docs/docc/Reducer.doccarchive/js/highlight-js-python.c214ed92.js b/docs/docc/Reducer.doccarchive/js/highlight-js-python.c214ed92.js deleted file mode 100644 index c8d2ed8..0000000 --- a/docs/docc/Reducer.doccarchive/js/highlight-js-python.c214ed92.js +++ /dev/null @@ -1,10 +0,0 @@ -/*! - * This source file is part of the Swift.org open source project - * - * Copyright (c) 2021 Apple Inc. and the Swift project authors - * Licensed under Apache License v2.0 with Runtime Library Exception - * - * See https://swift.org/LICENSE.txt for license information - * See https://swift.org/CONTRIBUTORS.txt for Swift project authors - */ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["highlight-js-python"],{9510:function(e,n){function a(e){const n=e.regex,a=/[\p{XID_Start}_]\p{XID_Continue}*/u,i=["and","as","assert","async","await","break","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],s=["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],t=["__debug__","Ellipsis","False","None","NotImplemented","True"],r=["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"],l={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:i,built_in:s,literal:t,type:r},o={className:"meta",begin:/^(>>>|\.\.\.) /},b={className:"subst",begin:/\{/,end:/\}/,keywords:l,illegal:/#/},c={begin:/\{\{/,relevance:0},d={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,o],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,o],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,o,c,b]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,o,c,b]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,c,b]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,c,b]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},p="[0-9](_?[0-9])*",g=`(\\b(${p}))?\\.(${p})|\\b(${p})\\.`,m={className:"number",relevance:0,variants:[{begin:`(\\b(${p})|(${g}))[eE][+-]?(${p})[jJ]?\\b`},{begin:`(${g})[jJ]?`},{begin:"\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?\\b"},{begin:"\\b0[bB](_?[01])+[lL]?\\b"},{begin:"\\b0[oO](_?[0-7])+[lL]?\\b"},{begin:"\\b0[xX](_?[0-9a-fA-F])+[lL]?\\b"},{begin:`\\b(${p})[jJ]\\b`}]},_={className:"comment",begin:n.lookahead(/# type:/),end:/$/,keywords:l,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},u={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:l,contains:["self",o,m,d,e.HASH_COMMENT_MODE]}]};return b.contains=[d,m,o],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:l,illegal:/(<\/|->|\?)|=>/,contains:[o,m,{begin:/\bself\b/},{beginKeywords:"if",relevance:0},d,_,e.HASH_COMMENT_MODE,{match:[/def/,/\s+/,a],scope:{1:"keyword",3:"title.function"},contains:[u]},{variants:[{match:[/class/,/\s+/,a,/\s*/,/\(\s*/,a,/\s*\)/]},{match:[/class/,/\s+/,a]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[m,u,d]}]}}e.exports=a}}]); \ No newline at end of file diff --git a/docs/docc/Reducer.doccarchive/js/highlight-js-ruby.f889d392.js b/docs/docc/Reducer.doccarchive/js/highlight-js-ruby.f889d392.js deleted file mode 100644 index a8355da..0000000 --- a/docs/docc/Reducer.doccarchive/js/highlight-js-ruby.f889d392.js +++ /dev/null @@ -1,10 +0,0 @@ -/*! - * This source file is part of the Swift.org open source project - * - * Copyright (c) 2021 Apple Inc. and the Swift project authors - * Licensed under Apache License v2.0 with Runtime Library Exception - * - * See https://swift.org/LICENSE.txt for license information - * See https://swift.org/CONTRIBUTORS.txt for Swift project authors - */ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["highlight-js-ruby"],{"82cb":function(e,n){function a(e){const n=e.regex,a="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",i={keyword:"and then defined module in return redo if BEGIN retry end for self when next until do begin unless END rescue else break undef not super class case require yield alias while ensure elsif or include attr_reader attr_writer attr_accessor __FILE__",built_in:"proc lambda",literal:"true false nil"},s={className:"doctag",begin:"@[A-Za-z]+"},b={begin:"#<",end:">"},c=[e.COMMENT("#","$",{contains:[s]}),e.COMMENT("^=begin","^=end",{contains:[s],relevance:10}),e.COMMENT("^__END__","\\n$")],r={className:"subst",begin:/#\{/,end:/\}/,keywords:i},d={className:"string",contains:[e.BACKSLASH_ESCAPE,r],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/,end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{begin:/%[qQwWx]?/},{begin:/%[qQwWx]?\//,end:/\//},{begin:/%[qQwWx]?%/,end:/%/},{begin:/%[qQwWx]?-/,end:/-/},{begin:/%[qQwWx]?\|/,end:/\|/},{begin:/\B\?(\\\d{1,3})/},{begin:/\B\?(\\x[A-Fa-f0-9]{1,2})/},{begin:/\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/},{begin:/\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/},{begin:/\B\?\\(c|C-)[\x20-\x7e]/},{begin:/\B\?\\?\S/},{begin:n.concat(/<<[-~]?'?/,n.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)),contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[e.BACKSLASH_ESCAPE,r]})]}]},t="[1-9](_?[0-9])*|0",o="[0-9](_?[0-9])*",g={className:"number",relevance:0,variants:[{begin:`\\b(${t})(\\.(${o}))?([eE][+-]?(${o})|r)?i?\\b`},{begin:"\\b0[dD][0-9](_?[0-9])*r?i?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*r?i?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*r?i?\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b"},{begin:"\\b0(_?[0-7])+r?i?\\b"}]},l={className:"params",begin:"\\(",end:"\\)",endsParent:!0,keywords:i},_=[d,{className:"class",beginKeywords:"class module",end:"$|;",illegal:/=/,contains:[e.inherit(e.TITLE_MODE,{begin:"[A-Za-z_]\\w*(::\\w+)*(\\?|!)?"}),{begin:"<\\s*",contains:[{begin:"("+e.IDENT_RE+"::)?"+e.IDENT_RE,relevance:0}]}].concat(c)},{className:"function",begin:n.concat(/def\s+/,n.lookahead(a+"\\s*(\\(|;|$)")),relevance:0,keywords:"def",end:"$|;",contains:[e.inherit(e.TITLE_MODE,{begin:a}),l].concat(c)},{begin:e.IDENT_RE+"::"},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[d,{begin:a}],relevance:0},g,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{className:"params",begin:/\|/,end:/\|/,relevance:0,keywords:i},{begin:"("+e.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[e.BACKSLASH_ESCAPE,r],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:/%r\{/,end:/\}[a-z]*/},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(b,c),relevance:0}].concat(b,c);r.contains=_,l.contains=_;const w="[>?]>",E="[\\w#]+\\(\\w+\\):\\d+:\\d+>",u="(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>",N=[{begin:/^\s*=>/,starts:{end:"$",contains:_}},{className:"meta",begin:"^("+w+"|"+E+"|"+u+")(?=[ ])",starts:{end:"$",contains:_}}];return c.unshift(b),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:i,illegal:/\/\*/,contains:[e.SHEBANG({binary:"ruby"})].concat(N).concat(c).concat(_)}}e.exports=a}}]); \ No newline at end of file diff --git a/docs/docc/Reducer.doccarchive/js/highlight-js-scss.62ee18da.js b/docs/docc/Reducer.doccarchive/js/highlight-js-scss.62ee18da.js deleted file mode 100644 index 8f46244..0000000 --- a/docs/docc/Reducer.doccarchive/js/highlight-js-scss.62ee18da.js +++ /dev/null @@ -1,10 +0,0 @@ -/*! - * This source file is part of the Swift.org open source project - * - * Copyright (c) 2021 Apple Inc. and the Swift project authors - * Licensed under Apache License v2.0 with Runtime Library Exception - * - * See https://swift.org/LICENSE.txt for license information - * See https://swift.org/CONTRIBUTORS.txt for Swift project authors - */ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["highlight-js-scss"],{6113:function(e,t){const i=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z][A-Za-z0-9_-]*/}}),o=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","p","q","quote","samp","section","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],r=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"],a=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"],n=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"],l=["align-content","align-items","align-self","all","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","backface-visibility","background","background-attachment","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","content","content-visibility","counter-increment","counter-reset","cue","cue-after","cue-before","cursor","direction","display","empty-cells","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-size","font-size-adjust","font-smoothing","font-stretch","font-style","font-synthesis","font-variant","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","gap","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","isolation","justify-content","left","letter-spacing","line-break","line-height","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","max-height","max-width","min-height","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page-break-after","page-break-before","page-break-inside","pause","pause-after","pause-before","perspective","perspective-origin","pointer-events","position","quotes","resize","rest","rest-after","rest-before","right","row-gap","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","shape-image-threshold","shape-margin","shape-outside","speak","speak-as","src","tab-size","table-layout","text-align","text-align-all","text-align-last","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-transform","text-underline-position","top","transform","transform-box","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","z-index"].reverse();function s(e){const t=i(e),s=n,d=a,c="@[a-z-]+",p="and or not only",g="[a-zA-Z-][a-zA-Z0-9_-]*",m={className:"variable",begin:"(\\$"+g+")\\b"};return{name:"SCSS",case_insensitive:!0,illegal:"[=/|']",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,t.CSS_NUMBER_MODE,{className:"selector-id",begin:"#[A-Za-z0-9_-]+",relevance:0},{className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-tag",begin:"\\b("+o.join("|")+")\\b",relevance:0},{className:"selector-pseudo",begin:":("+d.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+s.join("|")+")"},m,{begin:/\(/,end:/\)/,contains:[t.CSS_NUMBER_MODE]},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+l.join("|")+")\\b"},{begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b"},{begin:/:/,end:/[;}{]/,contains:[t.BLOCK_COMMENT,m,t.HEXCOLOR,t.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.IMPORTANT]},{begin:"@(page|font-face)",keywords:{$pattern:c,keyword:"@page @font-face"}},{begin:"@",end:"[{;]",returnBegin:!0,keywords:{$pattern:/[a-z-]+/,keyword:p,attribute:r.join(" ")},contains:[{begin:c,className:"keyword"},{begin:/[a-z-]+(?=:)/,className:"attribute"},m,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.HEXCOLOR,t.CSS_NUMBER_MODE]},t.FUNCTION_DISPATCH]}}e.exports=s}}]); \ No newline at end of file diff --git a/docs/docc/Reducer.doccarchive/js/highlight-js-shell.dd7f411f.js b/docs/docc/Reducer.doccarchive/js/highlight-js-shell.dd7f411f.js deleted file mode 100644 index 999f452..0000000 --- a/docs/docc/Reducer.doccarchive/js/highlight-js-shell.dd7f411f.js +++ /dev/null @@ -1,10 +0,0 @@ -/*! - * This source file is part of the Swift.org open source project - * - * Copyright (c) 2021 Apple Inc. and the Swift project authors - * Licensed under Apache License v2.0 with Runtime Library Exception - * - * See https://swift.org/LICENSE.txt for license information - * See https://swift.org/CONTRIBUTORS.txt for Swift project authors - */ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["highlight-js-shell"],{b65b:function(s,n){function e(s){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}}s.exports=e}}]); \ No newline at end of file diff --git a/docs/docc/Reducer.doccarchive/js/highlight-js-swift.84f3e88c.js b/docs/docc/Reducer.doccarchive/js/highlight-js-swift.84f3e88c.js deleted file mode 100644 index 89d1daf..0000000 --- a/docs/docc/Reducer.doccarchive/js/highlight-js-swift.84f3e88c.js +++ /dev/null @@ -1,10 +0,0 @@ -/*! - * This source file is part of the Swift.org open source project - * - * Copyright (c) 2021 Apple Inc. and the Swift project authors - * Licensed under Apache License v2.0 with Runtime Library Exception - * - * See https://swift.org/LICENSE.txt for license information - * See https://swift.org/CONTRIBUTORS.txt for Swift project authors - */ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["highlight-js-swift"],{"2a39":function(e,n){function a(e){return e?"string"===typeof e?e:e.source:null}function t(e){return i("(?=",e,")")}function i(...e){const n=e.map(e=>a(e)).join("");return n}function s(e){const n=e[e.length-1];return"object"===typeof n&&n.constructor===Object?(e.splice(e.length-1,1),n):{}}function u(...e){const n=s(e),t="("+(n.capture?"":"?:")+e.map(e=>a(e)).join("|")+")";return t}const c=e=>i(/\b/,e,/\w$/.test(e)?/\b/:/\B/),o=["Protocol","Type"].map(c),r=["init","self"].map(c),l=["Any","Self"],m=["actor","associatedtype","async","await",/as\?/,/as!/,"as","break","case","catch","class","continue","convenience","default","defer","deinit","didSet","do","dynamic","else","enum","extension","fallthrough",/fileprivate\(set\)/,"fileprivate","final","for","func","get","guard","if","import","indirect","infix",/init\?/,/init!/,"inout",/internal\(set\)/,"internal","in","is","isolated","nonisolated","lazy","let","mutating","nonmutating",/open\(set\)/,"open","operator","optional","override","postfix","precedencegroup","prefix",/private\(set\)/,"private","protocol",/public\(set\)/,"public","repeat","required","rethrows","return","set","some","static","struct","subscript","super","switch","throws","throw",/try\?/,/try!/,"try","typealias",/unowned\(safe\)/,/unowned\(unsafe\)/,"unowned","var","weak","where","while","willSet"],p=["false","nil","true"],d=["assignment","associativity","higherThan","left","lowerThan","none","right"],F=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warn_unqualified_access","#warning"],b=["abs","all","any","assert","assertionFailure","debugPrint","dump","fatalError","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","withoutActuallyEscaping","zip"],h=u(/[/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),f=u(h,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),w=i(h,f,"*"),y=u(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),g=u(y,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),E=i(y,g,"*"),v=i(/[A-Z]/,g,"*"),A=["autoclosure",i(/convention\(/,u("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",i(/objc\(/,E,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","testable","UIApplicationMain","unknown","usableFromInline"],N=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];function C(e){const n={match:/\s+/,relevance:0},a=e.COMMENT("/\\*","\\*/",{contains:["self"]}),s=[e.C_LINE_COMMENT_MODE,a],h={match:[/\./,u(...o,...r)],className:{2:"keyword"}},y={match:i(/\./,u(...m)),relevance:0},C=m.filter(e=>"string"===typeof e).concat(["_|0"]),k=m.filter(e=>"string"!==typeof e).concat(l).map(c),D={variants:[{className:"keyword",match:u(...k,...r)}]},B={$pattern:u(/\b\w+/,/#\w+/),keyword:C.concat(F),literal:p},_=[h,y,D],S={match:i(/\./,u(...b)),relevance:0},M={className:"built_in",match:i(/\b/,u(...b),/(?=\()/)},x=[S,M],$={match:/->/,relevance:0},I={className:"operator",relevance:0,variants:[{match:w},{match:`\\.(\\.|${f})+`}]},O=[$,I],L="([0-9]_*)+",T="([0-9a-fA-F]_*)+",j={className:"number",relevance:0,variants:[{match:`\\b(${L})(\\.(${L}))?([eE][+-]?(${L}))?\\b`},{match:`\\b0x(${T})(\\.(${T}))?([pP][+-]?(${L}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},P=(e="")=>({className:"subst",variants:[{match:i(/\\/,e,/[0\\tnr"']/)},{match:i(/\\/,e,/u\{[0-9a-fA-F]{1,8}\}/)}]}),K=(e="")=>({className:"subst",match:i(/\\/,e,/[\t ]*(?:[\r\n]|\r\n)/)}),z=(e="")=>({className:"subst",label:"interpol",begin:i(/\\/,e,/\(/),end:/\)/}),q=(e="")=>({begin:i(e,/"""/),end:i(/"""/,e),contains:[P(e),K(e),z(e)]}),U=(e="")=>({begin:i(e,/"/),end:i(/"/,e),contains:[P(e),z(e)]}),Z={className:"string",variants:[q(),q("#"),q("##"),q("###"),U(),U("#"),U("##"),U("###")]},V={match:i(/`/,E,/`/)},W={className:"variable",match:/\$\d+/},G={className:"variable",match:`\\$${g}+`},J=[V,W,G],R={match:/(@|#)available/,className:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:N,contains:[...O,j,Z]}]}},X={className:"keyword",match:i(/@/,u(...A))},H={className:"meta",match:i(/@/,E)},Q=[R,X,H],Y={match:t(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:i(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,g,"+")},{className:"type",match:v,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:i(/\s+&\s+/,t(v)),relevance:0}]},ee={begin://,keywords:B,contains:[...s,..._,...Q,$,Y]};Y.contains.push(ee);const ne={match:i(E,/\s*:/),keywords:"_|0",relevance:0},ae={begin:/\(/,end:/\)/,relevance:0,keywords:B,contains:["self",ne,...s,..._,...x,...O,j,Z,...J,...Q,Y]},te={begin://,contains:[...s,Y]},ie={begin:u(t(i(E,/\s*:/)),t(i(E,/\s+/,E,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:E}]},se={begin:/\(/,end:/\)/,keywords:B,contains:[ie,...s,..._,...O,j,Z,...Q,Y,ae],endsParent:!0,illegal:/["']/},ue={match:[/func/,/\s+/,u(V.match,E,w)],className:{1:"keyword",3:"title.function"},contains:[te,se,n],illegal:[/\[/,/%/]},ce={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[te,se,n],illegal:/\[|%/},oe={match:[/operator/,/\s+/,w],className:{1:"keyword",3:"title"}},re={begin:[/precedencegroup/,/\s+/,v],className:{1:"keyword",3:"title"},contains:[Y],keywords:[...d,...p],end:/}/};for(const t of Z.variants){const e=t.contains.find(e=>"interpol"===e.label);e.keywords=B;const n=[..._,...x,...O,j,Z,...J];e.contains=[...n,{begin:/\(/,end:/\)/,contains:["self",...n]}]}return{name:"Swift",keywords:B,contains:[...s,ue,ce,{beginKeywords:"struct protocol class extension enum actor",end:"\\{",excludeEnd:!0,keywords:B,contains:[e.inherit(e.TITLE_MODE,{className:"title.class",begin:/[A-Za-z$_][\u00C0-\u02B80-9A-Za-z$_]*/}),..._]},oe,re,{beginKeywords:"import",end:/$/,contains:[...s],relevance:0},..._,...x,...O,j,Z,...J,...Q,Y,ae]}}e.exports=C}}]); \ No newline at end of file diff --git a/docs/docc/Reducer.doccarchive/js/highlight-js-xml.9c3688c7.js b/docs/docc/Reducer.doccarchive/js/highlight-js-xml.9c3688c7.js deleted file mode 100644 index 55cc1e2..0000000 --- a/docs/docc/Reducer.doccarchive/js/highlight-js-xml.9c3688c7.js +++ /dev/null @@ -1,10 +0,0 @@ -/*! - * This source file is part of the Swift.org open source project - * - * Copyright (c) 2021 Apple Inc. and the Swift project authors - * Licensed under Apache License v2.0 with Runtime Library Exception - * - * See https://swift.org/LICENSE.txt for license information - * See https://swift.org/CONTRIBUTORS.txt for Swift project authors - */ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["highlight-js-xml"],{"8dcb":function(e,n){function a(e){const n=e.regex,a=n.concat(/[A-Z_]/,n.optional(/[A-Z0-9_.-]*:/),/[A-Z0-9_.-]*/),s=/[A-Za-z0-9._:-]+/,t={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},i={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},c=e.inherit(i,{begin:/\(/,end:/\)/}),l=e.inherit(e.APOS_STRING_MODE,{className:"string"}),r=e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),g={endsWithParent:!0,illegal:/`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,contains:[{className:"meta",begin://,relevance:10,contains:[i,r,l,c,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin://,contains:[i,c,r,l]}]}]},e.COMMENT(//,{relevance:10}),{begin://,relevance:10},t,{className:"meta",begin:/<\?xml/,end:/\?>/,relevance:10},{className:"tag",begin:/)/,end:/>/,keywords:{name:"style"},contains:[g],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/)/,end:/>/,keywords:{name:"script"},contains:[g],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:n.concat(//,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:a,relevance:0,starts:g}]},{className:"tag",begin:n.concat(/<\//,n.lookahead(n.concat(a,/>/))),contains:[{className:"name",begin:a,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}e.exports=a}}]); \ No newline at end of file diff --git a/docs/docc/Reducer.doccarchive/js/index.58e30ec4.js b/docs/docc/Reducer.doccarchive/js/index.58e30ec4.js deleted file mode 100644 index 920849f..0000000 --- a/docs/docc/Reducer.doccarchive/js/index.58e30ec4.js +++ /dev/null @@ -1,9 +0,0 @@ -/*! - * This source file is part of the Swift.org open source project - * - * Copyright (c) 2021 Apple Inc. and the Swift project authors - * Licensed under Apache License v2.0 with Runtime Library Exception - * - * See https://swift.org/LICENSE.txt for license information - * See https://swift.org/CONTRIBUTORS.txt for Swift project authors - */(function(e){function t(t){for(var o,i,c=t[0],h=t[1],a=t[2],l=0,u=[];l])/g,i=/^-+/,r=/["'&<>]/g;function s(e){return e.trim().replace(o,"-").replace(i,"").toLowerCase()}function c(e){const t=e=>({'"':""","'":"'","&":"&","<":"<",">":">"}[e]||e);return e.replace(r,t)}const h={zero:"zero",one:"one",two:"two",few:"few",many:"many",other:"other"},a={cardinal:"cardinal",ordinal:"ordinal"};function l(e,t){const{cardinal:n}=a,{one:o,other:i}=h,r="en",s=1===t?o:i;if(!e[r]||!e[r][s])throw new Error("No default choices provided to pluralize using default locale "+r);let c=r,l=s;if("Intl"in window&&"PluralRules"in window.Intl){const o=navigator.languages?navigator.languages:[navigator.language],i=new Intl.PluralRules(o,{type:n}),r=i.select(t),s=i.resolvedOptions().locale;e[s]&&e[s][r]&&(c=s,l=r)}return e[c][l]}function u(e){return e.replace(/#(.*)/,(e,t)=>"#"+CSS.escape(t))}function d(e){return e.replace(/[.*+\-?^${}()|[\]\\]/g,"\\$&")}function g(e){let t,n;const o="\\s*",i=" ",r=e.trim(),s=r.length;if(!s)return i;const c=[];for(t=0;t{t=e});return requestAnimationFrame((function e(){n-=1,n<=0?t():requestAnimationFrame(e)})),o}function i(e){return new Promise(t=>{setTimeout(t,e)})}n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return i}))},"3e80":function(e,t,n){"use strict";n("bb9e")},"48b1":function(e,t,n){"use strict";n("e487")},"5c0b":function(e,t,n){"use strict";n("9c0c")},"5d2d":function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"c",(function(){return h})),n.d(t,"b",(function(){return a}));const o="developer.setting.";function i(e=localStorage){return{getItem:t=>{try{return e.getItem(t)}catch(n){return null}},setItem:(t,n)=>{try{e.setItem(t,n)}catch(o){}},removeItem:t=>{try{e.removeItem(t)}catch(n){}}}}function r(e){return{get:(t,n)=>{const i=JSON.parse(e.getItem(o+t));return null!==i?i:n},set:(t,n)=>e.setItem(o+t,JSON.stringify(n)),remove:t=>e.removeItem(o+t)}}const s=i(window.localStorage),c=i(window.sessionStorage),h=r(s),a=r(c)},"63b8":function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return i})),n.d(t,"a",(function(){return r})),n.d(t,"d",(function(){return c}));const o={large:"large",medium:"medium",small:"small"},i={default:"default",nav:"nav"},r={[i.default]:{[o.large]:{minWidth:1069,contentWidth:980},[o.medium]:{minWidth:736,maxWidth:1068,contentWidth:692},[o.small]:{minWidth:320,maxWidth:735,contentWidth:280}},[i.nav]:{[o.large]:{minWidth:1024},[o.medium]:{minWidth:768,maxWidth:1023},[o.small]:{minWidth:320,maxWidth:767}}},s={[o.small]:0,[o.medium]:1,[o.large]:2};function c(e,t){return s[e]>s[t]}},6842:function(e,t,n){"use strict";function o(e,t,n){let o,i=e,r=t;for("string"===typeof r&&(r=[r]),o=0;oe.json()).catch(()=>({}))}const c=(e,t)=>o(i,e,t)},7138:function(e,t,n){"use strict";n("813c")},"748c":function(e,t,n){"use strict";n.d(t,"d",(function(){return i})),n.d(t,"a",(function(){return r})),n.d(t,"c",(function(){return s})),n.d(t,"b",(function(){return c}));var o=n("6842");function i(e){return e.reduce((e,t)=>(t.traits.includes("dark")?e.dark.push(t):e.light.push(t),e),{light:[],dark:[]})}function r(e){const t=["1x","2x","3x"];return t.reduce((t,n)=>{const o=e.find(e=>e.traits.includes(n));return o?t.concat({density:n,src:o.url,size:o.size}):t},[])}function s(e){const t="/",n=new RegExp(t+"+","g");return e.join(t).replace(n,t)}function c(e){return e&&"string"===typeof e&&!e.startsWith(o["a"])&&e.startsWith("/")?s([o["a"],e]):e}},"813c":function(e,t,n){},"821b":function(e,t,n){"use strict";t["a"]={auto:{label:"Auto",value:"auto"},dark:{label:"Dark",value:"dark"},light:{label:"Light",value:"light"}}},"942d":function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return i})),n.d(t,"d",(function(){return r})),n.d(t,"a",(function(){return s}));const o=52,i=48,r="nav-sticky-anchor",s={noClose:"noclose"}},9895:function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return i}));const o="not-found",i="documentation-topic"},"9b4f":function(e,t,n){},"9c0c":function(e,t,n){},bb9e:function(e,t,n){},d26a:function(e,t,n){"use strict";n.d(t,"c",(function(){return r})),n.d(t,"b",(function(){return s})),n.d(t,"a",(function(){return c})),n.d(t,"d",(function(){return h}));var o=n("748c"),i={input:"input",tags:"tags"};function r(e={}){return Object.entries(e).reduce((e,[t,n])=>n?e.concat(`${encodeURIComponent(t)}=${encodeURIComponent(n)}`):e,[]).join("&")}function s(e,{changes:t,language:n,context:o}={}){const[i,s]=e.split("#"),c=i.match(/\?.*/),h=r({changes:t,language:n,context:o}),a=c?"&":"?",l=s?i:e,u=h?`${a}${h}`:"",d=s?"#"+s:"";return`${l}${u}${d}`}function c(e,t){const{query:{changes:n,[i.input]:o,[i.tags]:r,...s}={}}=e,{query:{changes:c,[i.input]:h,[i.tags]:a,...l}={}}=t;return e.name===t.name&&JSON.stringify({path:e.path,query:s})===JSON.stringify({path:t.path,query:l})}function h(e,t=window.location.origin){return new URL(Object(o["b"])(e),t).href}},d369:function(e,t,n){"use strict";var o=n("5d2d");const i={preferredColorScheme:"developer.setting.preferredColorScheme",preferredLanguage:"docs.setting.preferredLanguage"},r={preferredColorScheme:"docs.setting.preferredColorScheme"};t["a"]=Object.defineProperties({},Object.keys(i).reduce((e,t)=>({...e,[t]:{get:()=>{const e=r[t],n=o["a"].getItem(i[t]);return e?n||o["a"].getItem(e):n},set:e=>o["a"].setItem(i[t],e)}}),{}))},e425:function(e,t,n){"use strict";var o=n("821b"),i=n("d369");const r="undefined"!==typeof window.matchMedia&&[o["a"].light.value,o["a"].dark.value,"no-preference"].some(e=>window.matchMedia(`(prefers-color-scheme: ${e})`).matches),s=r?o["a"].auto:o["a"].light;t["a"]={state:{preferredColorScheme:i["a"].preferredColorScheme||s.value,supportsAutoColorScheme:r,systemColorScheme:o["a"].light.value},setPreferredColorScheme(e){this.state.preferredColorScheme=e,i["a"].preferredColorScheme=e},setSystemColorScheme(e){this.state.systemColorScheme=e},syncPreferredColorScheme(){i["a"].preferredColorScheme&&i["a"].preferredColorScheme!==this.state.preferredColorScheme&&(this.state.preferredColorScheme=i["a"].preferredColorScheme)}}},e487:function(e,t,n){},ed96:function(e,t,n){n.p=window.baseUrl},f161:function(e,t,n){"use strict";n.r(t);n("ed96");var o=n("2b0e"),i=n("8c4f"),r=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{class:{fromkeyboard:e.fromKeyboard,hascustomheader:e.hasCustomHeader},attrs:{id:"app"}},[n("a",{attrs:{href:"#main",id:"skip-nav"}},[e._v("Skip Navigation")]),n("InitialLoadingPlaceholder"),e._t("header",(function(){return[e.hasCustomHeader?n("custom-header",{attrs:{"data-color-scheme":e.preferredColorScheme}}):e._e()]}),{isTargetIDE:e.isTargetIDE}),n("div",{attrs:{id:e.baseNavStickyAnchorId}}),e._t("default",(function(){return[n("router-view"),e.hasCustomFooter?n("custom-footer",{attrs:{"data-color-scheme":e.preferredColorScheme}}):e.isTargetIDE?e._e():n("Footer")]}),{isTargetIDE:e.isTargetIDE}),e._t("footer",null,{isTargetIDE:e.isTargetIDE})],2)},s=[],c=n("e425"),h=n("821b"),a=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("footer",{staticClass:"footer"},[n("div",{staticClass:"row"},[n("ColorSchemeToggle")],1)])},l=[],u=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"color-scheme-toggle",attrs:{"aria-label":"Select a color scheme preference",role:"radiogroup",tabindex:"0"}},e._l(e.options,(function(t){return n("label",{key:t.value},[n("input",{attrs:{type:"radio"},domProps:{checked:t.value==e.preferredColorScheme,value:t.value},on:{input:e.setPreferredColorScheme}}),n("div",{staticClass:"text"},[e._v(e._s(t.label))])])})),0)},d=[],g={name:"ColorSchemeToggle",data:()=>({appState:c["a"].state}),computed:{options:({supportsAutoColorScheme:e})=>[h["a"].light,h["a"].dark,...e?[h["a"].auto]:[]],preferredColorScheme:({appState:e})=>e.preferredColorScheme,supportsAutoColorScheme:({appState:e})=>e.supportsAutoColorScheme},methods:{setPreferredColorScheme:e=>{c["a"].setPreferredColorScheme(e.target.value)}},watch:{preferredColorScheme:{immediate:!0,handler(e){document.body.dataset.colorScheme=e}}}},f=g,m=(n("2be1"),n("2877")),p=Object(m["a"])(f,u,d,!1,null,"4472ec1e",null),j=p.exports,v={name:"Footer",components:{ColorSchemeToggle:j}},w=v,b=(n("2de0"),Object(m["a"])(w,a,l,!1,null,"72f2e2dc",null)),y=b.exports,S=function(){var e=this,t=e.$createElement,n=e._self._c||t;return e.loaded?e._e():n("div",{staticClass:"InitialLoadingPlaceholder",attrs:{id:"loading-placeholder"}})},E=[],C={name:"InitialLoadingPlaceholder",data(){return{loaded:!1}},created(){const e=()=>{this.loaded=!0};this.$router.onReady(e,e)}},_=C,P=(n("48b1"),Object(m["a"])(_,S,E,!1,null,"35c356b6",null)),T=P.exports,k=n("942d"),O=n("6842");function A(e,t){return e&&"object"===typeof e&&Object.prototype.hasOwnProperty.call(e,t)&&"string"===typeof e[t]}function x(e,t,n,o){if(!t||"object"!==typeof t||o&&(A(t,"light")||A(t,"dark"))){let i=t;if(A(t,o)&&(i=t[o]),"object"===typeof i)return;n[e]=i}else Object.entries(t).forEach(([t,i])=>{const r=[e,t].join("-");x(r,i,n,o)})}function I(e,t="light"){const n={},o=e||{};return x("-",o,n,t),n}var L={name:"CoreApp",components:{Footer:y,InitialLoadingPlaceholder:T},provide(){return{isTargetIDE:this.isTargetIDE,performanceMetricsEnabled:"true"===Object({NODE_ENV:"production",VUE_APP_TITLE:"Documentation",BASE_URL:"{{BASE_PATH}}/"}).VUE_APP_PERFORMANCE_ENABLED}},data(){return{appState:c["a"].state,fromKeyboard:!1,isTargetIDE:"ide"===Object({NODE_ENV:"production",VUE_APP_TITLE:"Documentation",BASE_URL:"{{BASE_PATH}}/"}).VUE_APP_TARGET,themeSettings:O["d"],baseNavStickyAnchorId:k["d"]}},computed:{currentColorScheme:({appState:e})=>e.systemColorScheme,preferredColorScheme:({appState:e})=>e.preferredColorScheme,CSSCustomProperties:({themeSettings:e,currentColorScheme:t})=>I(e.theme,t),hasCustomHeader:()=>!!window.customElements.get("custom-header"),hasCustomFooter:()=>!!window.customElements.get("custom-footer")},props:{enableThemeSettings:{type:Boolean,default:!0}},watch:{CSSCustomProperties:{immediate:!0,handler(e){this.detachStylesFromRoot(e),this.attachStylesToRoot(e)}}},async created(){window.addEventListener("keydown",this.onKeyDown),this.$bridge.on("navigation",this.handleNavigationRequest),this.enableThemeSettings&&Object.assign(this.themeSettings,await Object(O["b"])()),window.addEventListener("pageshow",this.syncPreferredColorScheme),this.$once("hook:beforeDestroy",()=>{window.removeEventListener("pageshow",this.syncPreferredColorScheme)})},mounted(){(document.querySelector(".footer-current-year")||{}).innerText=(new Date).getFullYear(),this.attachColorSchemeListeners()},beforeDestroy(){this.fromKeyboard?window.removeEventListener("mousedown",this.onMouseDown):window.removeEventListener("keydown",this.onKeyDown),this.$bridge.off("navigation",this.handleNavigationRequest),this.detachStylesFromRoot(this.CSSCustomProperties)},methods:{onKeyDown(){this.fromKeyboard=!0,window.addEventListener("mousedown",this.onMouseDown),window.removeEventListener("keydown",this.onKeyDown)},onMouseDown(){this.fromKeyboard=!1,window.addEventListener("keydown",this.onKeyDown),window.removeEventListener("mousedown",this.onMouseDown)},handleNavigationRequest(e){this.$router.push(e)},attachColorSchemeListeners(){if(!window.matchMedia)return;const e=window.matchMedia("(prefers-color-scheme: dark)");e.addListener(this.onColorSchemePreferenceChange),this.$once("hook:beforeDestroy",()=>{e.removeListener(this.onColorSchemePreferenceChange)}),this.onColorSchemePreferenceChange(e)},onColorSchemePreferenceChange({matches:e}){const t=e?h["a"].dark:h["a"].light;c["a"].setSystemColorScheme(t.value)},attachStylesToRoot(e){const t=document.documentElement;Object.entries(e).filter(([,e])=>Boolean(e)).forEach(([e,n])=>{t.style.setProperty(e,n)})},detachStylesFromRoot(e){const t=document.documentElement;Object.entries(e).forEach(([e])=>{t.style.removeProperty(e)})},syncPreferredColorScheme(){c["a"].syncPreferredColorScheme()}}},$=L,D=(n("5c0b"),n("3e80"),Object(m["a"])($,r,s,!1,null,"6f639c59",null)),N=D.exports;class R{constructor(){this.$send=()=>{}}send(e){this.$send(e)}}class U{constructor(){const{webkit:{messageHandlers:{bridge:e={}}={}}={}}=window;this.bridge=e;const{postMessage:t=(()=>{})}=e;this.$send=t.bind(e)}send(e){this.$send(e)}}class M{constructor(e=new R){this.backend=e,this.listeners={}}send(e){this.backend.send(e)}receive(e){this.emit(e.type,e.data)}emit(e,t){this.listeners[e]&&this.listeners[e].forEach(e=>e(t))}on(e,t){this.listeners[e]||(this.listeners[e]=new Set),this.listeners[e].add(t)}off(e,t){this.listeners[e]&&this.listeners[e].delete(t)}}var B={install(e,t){let n;n=t.performanceMetricsEnabled||"ide"===t.appTarget?new U:new R,e.prototype.$bridge=new M(n)}};function W(e){return"custom-"+e}function V(e){return class extends HTMLElement{constructor(){super();const t=this.attachShadow({mode:"open"}),n=e.content.cloneNode(!0);t.appendChild(n)}}}function q(e){const t=W(e),n=document.getElementById(t);n&&window.customElements.define(t,V(n))}function F(e,t={names:["header","footer"]}){const{names:n}=t;e.config.ignoredElements=/^custom-/,n.forEach(q)}function H(e,t){const{value:n=!1}=t;e.style.display=n?"none":""}var K={hide:H};function G(e,{performanceMetrics:t=!1}={}){e.config.productionTip=!1,e.use(F),e.directive("hide",K.hide),e.use(B,{appTarget:Object({NODE_ENV:"production",VUE_APP_TITLE:"Documentation",BASE_URL:"{{BASE_PATH}}/"}).VUE_APP_TARGET,performanceMetricsEnabled:t}),window.bridge=e.prototype.$bridge,e.config.performance=t}var J=n("9895"),z=n("63b8"),Y=n("3908"),X=n("002d"),Q=n("d26a");function Z(){const{location:e}=window;return e.pathname+e.search+e.hash}function ee(){const e=Math.max(document.documentElement.clientWidth||0,window.innerWidth||0);return ePromise.all([n.e("documentation-topic~topic~tutorials-overview"),n.e("tutorials-overview")]).then(n.bind(null,"f025"))},{path:"/tutorials/:id/*",name:"topic",component:()=>Promise.all([n.e("documentation-topic~topic~tutorials-overview"),n.e("topic")]).then(n.bind(null,"3213"))},{path:"/documentation/*",name:J["a"],component:()=>Promise.all([n.e("documentation-topic~topic~tutorials-overview"),n.e("documentation-topic")]).then(n.bind(null,"f8ac"))},{path:"*",name:J["b"],component:ye},{path:"*",name:"server-error",component:me}];function Ee(e={}){const t=new i["a"]({mode:"history",base:O["a"],scrollBehavior:te,...e,routes:e.routes||Se});return t.onReady(()=>{"scrollRestoration"in window.history&&(window.history.scrollRestoration="manual"),ne()}),"ide"!==Object({NODE_ENV:"production",VUE_APP_TITLE:"Documentation",BASE_URL:"{{BASE_PATH}}/"}).VUE_APP_TARGET&&t.onError(e=>{const{route:n={path:"/"}}=e;t.replace({name:"server-error",params:[n.path]})}),window.addEventListener("unload",oe),t}o["default"].use(G),o["default"].use(i["a"]),new o["default"]({router:Ee(),render:e=>e(N)}).$mount("#app")},fb1e:function(e,t,n){}}); \ No newline at end of file diff --git a/docs/docc/Reducer.doccarchive/js/topic.6a1c7b7f.js b/docs/docc/Reducer.doccarchive/js/topic.6a1c7b7f.js deleted file mode 100644 index db8926e..0000000 --- a/docs/docc/Reducer.doccarchive/js/topic.6a1c7b7f.js +++ /dev/null @@ -1,20 +0,0 @@ -/*! - * This source file is part of the Swift.org open source project - * - * Copyright (c) 2021 Apple Inc. and the Swift project authors - * Licensed under Apache License v2.0 with Runtime Library Exception - * - * See https://swift.org/LICENSE.txt for license information - * See https://swift.org/CONTRIBUTORS.txt for Swift project authors - */ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["topic"],{"00f4":function(e,t,n){"use strict";n("282f")},"0466":function(e,t,n){},"0530":function(e,t,n){"use strict";n("dbeb")},"0b61":function(e,t,n){},1006:function(e,t,n){"use strict";n("a95e")},"14b7":function(e,t,n){},"1a91":function(e,t,n){"use strict";n("db87")},"1aae":function(e,t,n){},"1dd5":function(e,t,n){"use strict";n("7b17")},"282f":function(e,t,n){},"2b86":function(e,t,n){},"2b88":function(e,t,n){"use strict"; -/*! - * portal-vue © Thorsten Lünborg, 2019 - * - * Version: 2.1.7 - * - * LICENCE: MIT - * - * https://github.com/linusborg/portal-vue - * - */function s(e){return e&&"object"===typeof e&&"default"in e?e["default"]:e}Object.defineProperty(t,"__esModule",{value:!0});var i=s(n("2b0e"));function r(e){return r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function o(e){return a(e)||l(e)||c()}function a(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t1&&void 0!==arguments[1]?arguments[1]:{};return e.reduce((function(e,n){var s=n.passengers[0],i="function"===typeof s?s(t):n.passengers;return e.concat(i)}),[])}function h(e,t){return e.map((function(e,t){return[t,e]})).sort((function(e,n){return t(e[1],n[1])||e[0]-n[0]})).map((function(e){return e[1]}))}function m(e,t){return t.reduce((function(t,n){return e.hasOwnProperty(n)&&(t[n]=e[n]),t}),{})}var f={},v={},g={},y=i.extend({data:function(){return{transports:f,targets:v,sources:g,trackInstances:u}},methods:{open:function(e){if(u){var t=e.to,n=e.from,s=e.passengers,r=e.order,o=void 0===r?1/0:r;if(t&&n&&s){var a={to:t,from:n,passengers:d(s),order:o},l=Object.keys(this.transports);-1===l.indexOf(t)&&i.set(this.transports,t,[]);var c=this.$_getTransportIndex(a),p=this.transports[t].slice(0);-1===c?p.push(a):p[c]=a,this.transports[t]=h(p,(function(e,t){return e.order-t.order}))}}},close:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.to,s=e.from;if(n&&(s||!1!==t)&&this.transports[n])if(t)this.transports[n]=[];else{var i=this.$_getTransportIndex(e);if(i>=0){var r=this.transports[n].slice(0);r.splice(i,1),this.transports[n]=r}}},registerTarget:function(e,t,n){u&&(this.trackInstances&&!n&&this.targets[e]&&console.warn("[portal-vue]: Target ".concat(e," already exists")),this.$set(this.targets,e,Object.freeze([t])))},unregisterTarget:function(e){this.$delete(this.targets,e)},registerSource:function(e,t,n){u&&(this.trackInstances&&!n&&this.sources[e]&&console.warn("[portal-vue]: source ".concat(e," already exists")),this.$set(this.sources,e,Object.freeze([t])))},unregisterSource:function(e){this.$delete(this.sources,e)},hasTarget:function(e){return!(!this.targets[e]||!this.targets[e][0])},hasSource:function(e){return!(!this.sources[e]||!this.sources[e][0])},hasContentFor:function(e){return!!this.transports[e]&&!!this.transports[e].length},$_getTransportIndex:function(e){var t=e.to,n=e.from;for(var s in this.transports[t])if(this.transports[t][s].from===n)return+s;return-1}}}),b=new y(f),C=1,w=i.extend({name:"portal",props:{disabled:{type:Boolean},name:{type:String,default:function(){return String(C++)}},order:{type:Number,default:0},slim:{type:Boolean},slotProps:{type:Object,default:function(){return{}}},tag:{type:String,default:"DIV"},to:{type:String,default:function(){return String(Math.round(1e7*Math.random()))}}},created:function(){var e=this;this.$nextTick((function(){b.registerSource(e.name,e)}))},mounted:function(){this.disabled||this.sendUpdate()},updated:function(){this.disabled?this.clear():this.sendUpdate()},beforeDestroy:function(){b.unregisterSource(this.name),this.clear()},watch:{to:function(e,t){t&&t!==e&&this.clear(t),this.sendUpdate()}},methods:{clear:function(e){var t={from:this.name,to:e||this.to};b.close(t)},normalizeSlots:function(){return this.$scopedSlots.default?[this.$scopedSlots.default]:this.$slots.default},normalizeOwnChildren:function(e){return"function"===typeof e?e(this.slotProps):e},sendUpdate:function(){var e=this.normalizeSlots();if(e){var t={from:this.name,to:this.to,passengers:o(e),order:this.order};b.open(t)}else this.clear()}},render:function(e){var t=this.$slots.default||this.$scopedSlots.default||[],n=this.tag;return t&&this.disabled?t.length<=1&&this.slim?this.normalizeOwnChildren(t)[0]:e(n,[this.normalizeOwnChildren(t)]):this.slim?e():e(n,{class:{"v-portal":!0},style:{display:"none"},key:"v-portal-placeholder"})}}),_=i.extend({name:"portalTarget",props:{multiple:{type:Boolean,default:!1},name:{type:String,required:!0},slim:{type:Boolean,default:!1},slotProps:{type:Object,default:function(){return{}}},tag:{type:String,default:"div"},transition:{type:[String,Object,Function]}},data:function(){return{transports:b.transports,firstRender:!0}},created:function(){var e=this;this.$nextTick((function(){b.registerTarget(e.name,e)}))},watch:{ownTransports:function(){this.$emit("change",this.children().length>0)},name:function(e,t){b.unregisterTarget(t),b.registerTarget(e,this)}},mounted:function(){var e=this;this.transition&&this.$nextTick((function(){e.firstRender=!1}))},beforeDestroy:function(){b.unregisterTarget(this.name)},computed:{ownTransports:function(){var e=this.transports[this.name]||[];return this.multiple?e:0===e.length?[]:[e[e.length-1]]},passengers:function(){return p(this.ownTransports,this.slotProps)}},methods:{children:function(){return 0!==this.passengers.length?this.passengers:this.$scopedSlots.default?this.$scopedSlots.default(this.slotProps):this.$slots.default||[]},noWrapper:function(){var e=this.slim&&!this.transition;return e&&this.children().length>1&&console.warn("[portal-vue]: PortalTarget with `slim` option received more than one child element."),e}},render:function(e){var t=this.noWrapper(),n=this.children(),s=this.transition||this.tag;return t?n[0]:this.slim&&!s?e():e(s,{props:{tag:this.transition&&this.tag?this.tag:void 0},class:{"vue-portal-target":!0}},n)}}),S=0,k=["disabled","name","order","slim","slotProps","tag","to"],x=["multiple","transition"],T=i.extend({name:"MountingPortal",inheritAttrs:!1,props:{append:{type:[Boolean,String]},bail:{type:Boolean},mountTo:{type:String,required:!0},disabled:{type:Boolean},name:{type:String,default:function(){return"mounted_"+String(S++)}},order:{type:Number,default:0},slim:{type:Boolean},slotProps:{type:Object,default:function(){return{}}},tag:{type:String,default:"DIV"},to:{type:String,default:function(){return String(Math.round(1e7*Math.random()))}},multiple:{type:Boolean,default:!1},targetSlim:{type:Boolean},targetSlotProps:{type:Object,default:function(){return{}}},targetTag:{type:String,default:"div"},transition:{type:[String,Object,Function]}},created:function(){if("undefined"!==typeof document){var e=document.querySelector(this.mountTo);if(e){var t=this.$props;if(b.targets[t.name])t.bail?console.warn("[portal-vue]: Target ".concat(t.name," is already mounted.\n Aborting because 'bail: true' is set")):this.portalTarget=b.targets[t.name];else{var n=t.append;if(n){var s="string"===typeof n?n:"DIV",i=document.createElement(s);e.appendChild(i),e=i}var r=m(this.$props,x);r.slim=this.targetSlim,r.tag=this.targetTag,r.slotProps=this.targetSlotProps,r.name=this.to,this.portalTarget=new _({el:e,parent:this.$parent||this,propsData:r})}}else console.error("[portal-vue]: Mount Point '".concat(this.mountTo,"' not found in document"))}},beforeDestroy:function(){var e=this.portalTarget;if(this.append){var t=e.$el;t.parentNode.removeChild(t)}e.$destroy()},render:function(e){if(!this.portalTarget)return console.warn("[portal-vue] Target wasn't mounted"),e();if(!this.$scopedSlots.manual){var t=m(this.$props,k);return e(w,{props:t,attrs:this.$attrs,on:this.$listeners,scopedSlots:this.$scopedSlots},this.$slots.default)}var n=this.$scopedSlots.manual({to:this.to});return Array.isArray(n)&&(n=n[0]),n||e()}});function A(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e.component(t.portalName||"Portal",w),e.component(t.portalTargetName||"PortalTarget",_),e.component(t.MountingPortalName||"MountingPortal",T)}var I={install:A};t.default=I,t.Portal=w,t.PortalTarget=_,t.MountingPortal=T,t.Wormhole=b},"2f9d":function(e,t,n){"use strict";n("525c")},"311e":function(e,t,n){},3213:function(e,t,n){"use strict";n.r(t);var s=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[e.topicData?n(e.componentFor(e.topicData),e._b({key:e.topicKey,tag:"component",attrs:{hierarchy:e.hierarchy}},"component",e.propsFor(e.topicData),!1)):e._e()],1)},i=[],r=n("25a9"),o=n("a97e");const{BreakpointName:a}=o["a"].constants;var l,c,u={state:{linkableSections:[],breakpoint:a.large},addLinkableSection(e){const t={...e,visibility:0};t.sectionNumber=this.state.linkableSections.length,this.state.linkableSections.push(t)},reset(){this.state.linkableSections=[],this.state.breakpoint=a.large},updateLinkableSection(e){this.state.linkableSections=this.state.linkableSections.map(t=>e.anchor===t.anchor?{...t,visibility:e.visibility}:t)},updateBreakpoint(e){this.state.breakpoint=e}},d=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"article"},[e.isTargetIDE?e._e():n("NavigationBar",{attrs:{chapters:e.hierarchy.modules,technology:e.metadata.category,topic:e.heroTitle||"",rootReference:e.hierarchy.reference,identifierUrl:e.identifierUrl}}),n("main",{attrs:{id:"main",role:"main",tabindex:"0"}},[e._t("above-hero"),e._l(e.sections,(function(t,s){return n(e.componentFor(t),e._b({key:s,tag:"component"},"component",e.propsFor(t),!1))}))],2),n("PortalTarget",{attrs:{name:"modal-destination",multiple:""}})],1)},p=[],h=n("2b88"),m=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("NavBase",{attrs:{id:"nav","aria-label":e.technology,hasSolidBackground:""}},[n("template",{slot:"default"},[n("ReferenceUrlProvider",{attrs:{reference:e.rootReference},scopedSlots:e._u([{key:"default",fn:function(t){var s=t.urlWithParams;return n("NavTitleContainer",{attrs:{to:s}},[n("template",{slot:"default"},[e._v(e._s(e.technology))]),n("template",{slot:"subhead"},[e._v("Tutorials")])],2)}}])})],1),n("template",{slot:"after-title"},[n("div",{staticClass:"separator"})]),n("template",{slot:"tray"},[n("div",{staticClass:"mobile-dropdown-container"},[n("MobileDropdown",{attrs:{options:e.chapters,sections:e.optionsForSections,currentOption:e.currentSection?e.currentSection.title:""},on:{"select-section":e.onSelectSection}})],1),n("div",{staticClass:"dropdown-container"},[n("PrimaryDropdown",{staticClass:"primary-dropdown",attrs:{options:e.chapters,currentOption:e.topic}}),n("ChevronIcon",{staticClass:"icon-inline"}),e.currentSection?n("SecondaryDropdown",{staticClass:"secondary-dropdown",attrs:{options:e.optionsForSections,currentOption:e.currentSection.title,sectionTracker:e.sectionIndicatorText},on:{"select-section":e.onSelectSection}}):e._e()],1),e._t("tray",null,{siblings:e.chapters.length+e.optionsForSections.length})],2)],2)},f=[],v=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("SVGIcon",{staticClass:"chevron-icon",attrs:{viewBox:"0 0 14 14"}},[n("path",{attrs:{d:"M3.22 1.184l0.325-0.38 7.235 6.201-7.235 6.19-0.325-0.38 6.792-5.811-6.792-5.82z"}})])},g=[],y=n("be08"),b={name:"ChevronIcon",components:{SVGIcon:y["a"]}},C=b,w=n("2877"),_=Object(w["a"])(C,v,g,!1,null,null,null),S=_.exports,k=n("d26a"),x={name:"ReferenceUrlProvider",inject:{references:{default:()=>({})}},props:{reference:{type:String,required:!0}},computed:{resolvedReference:({references:e,reference:t})=>e[t]||{},url:({resolvedReference:e})=>e.url,title:({resolvedReference:e})=>e.title},render(){return this.$scopedSlots.default({url:this.url,urlWithParams:Object(k["b"])(this.url,this.$route.query),title:this.title,reference:this.resolvedReference})}},T=x,A=Object(w["a"])(T,l,c,!1,null,null,null),I=A.exports,$=n("8a61"),O=n("cbcf"),P=n("653a"),j=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("NavMenuItems",{staticClass:"mobile-dropdown"},e._l(e.options,(function(t){return n("ReferenceUrlProvider",{key:t.reference,attrs:{reference:t.reference},scopedSlots:e._u([{key:"default",fn:function(s){var i=s.title;return n("NavMenuItemBase",{staticClass:"chapter-list",attrs:{role:"group"}},[n("p",{staticClass:"chapter-name"},[e._v(e._s(i))]),n("ul",{staticClass:"tutorial-list"},e._l(t.projects,(function(t){return n("ReferenceUrlProvider",{key:t.reference,attrs:{reference:t.reference},scopedSlots:e._u([{key:"default",fn:function(t){var s=t.url,i=t.urlWithParams,r=t.title;return n("li",{staticClass:"tutorial-list-item"},[n("router-link",{staticClass:"option tutorial",attrs:{to:i,value:r}},[e._v(" "+e._s(r)+" ")]),s===e.$route.path?n("ul",{staticClass:"section-list",attrs:{role:"listbox"}},e._l(e.sections,(function(t){return n("li",{key:t.title},[n("router-link",{class:e.classesFor(t),attrs:{to:{path:t.path,query:e.$route.query},value:t.title},nativeOn:{click:function(n){return e.onClick(t)}}},[e._v(" "+e._s(t.title)+" ")])],1)})),0):e._e()],1)}}],null,!0)})})),1)])}}],null,!0)})})),1)},N=[],D=n("863d"),B=n("9b30"),M={name:"MobileDropdown",components:{NavMenuItems:B["a"],NavMenuItemBase:D["a"],ReferenceUrlProvider:I},props:{options:{type:Array,required:!0},currentOption:{type:String,required:!0},sections:{type:Array,required:!1,default:()=>[]}},methods:{classesFor(e){return["option","section",{active:this.currentOption===e.title},this.depthClass(e)]},depthClass(e){const{depth:t=0}=e;return"depth"+t},onClick(e){this.$emit("select-section",e.path)}}},q=M,R=(n("e688"),Object(w["a"])(q,j,N,!1,null,"154acfbd",null)),E=R.exports,V=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("DropdownCustom",{staticClass:"tutorial-dropdown",attrs:{value:e.currentOption,"aria-label":"Current section",isSmall:""},scopedSlots:e._u([{key:"default",fn:function(t){var s=t.closeAndFocusToggler,i=t.contentClasses,r=t.navigateOverOptions,o=t.OptionClass,a=t.ActiveOptionClass;return[n("ul",{staticClass:"options",class:i,attrs:{role:"listbox",tabindex:"0"}},e._l(e.options,(function(t){return n("router-link",{key:t.title,attrs:{to:{path:t.path,query:e.$route.query},custom:""},scopedSlots:e._u([{key:"default",fn:function(i){var l,c=i.navigate;return[n("li",{class:[o,(l={},l[a]=e.currentOption===t.title,l)],attrs:{role:"option",value:t.title,"aria-selected":e.currentOption===t.title,"aria-current":e.ariaCurrent(t.title),tabindex:-1},on:{click:function(n){return e.setActive(t,c,s,n)},keydown:[function(n){return!n.type.indexOf("key")&&e._k(n.keyCode,"enter",13,n.key,"Enter")?null:e.setActive(t,c,s,n)},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"esc",27,t.key,["Esc","Escape"])?null:s.apply(null,arguments)},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"tab",9,t.key,"Tab")?null:s.apply(null,arguments)},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"down",40,t.key,["Down","ArrowDown"])?null:(t.preventDefault(),r(t,1))},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"up",38,t.key,["Up","ArrowUp"])?null:(t.preventDefault(),r(t,-1))}]}},[e._v(" "+e._s(t.title)+" ")])]}}],null,!0)})})),1)]}}])},[n("template",{slot:"toggle-post-content"},[n("span",{staticClass:"section-tracker"},[e._v(e._s(e.sectionTracker))])])],2)},L=[],F=function(){var e,t=this,n=t.$createElement,s=t._self._c||n;return s("BaseDropdown",{staticClass:"dropdown-custom",class:(e={},e[t.OpenedClass]=t.isOpen,e["dropdown-small"]=t.isSmall,e),attrs:{value:t.value},scopedSlots:t._u([{key:"dropdown",fn:function(e){var n=e.dropdownClasses;return[s("span",{staticClass:"visuallyhidden",attrs:{id:"DropdownLabel_"+t._uid}},[t._v(t._s(t.ariaLabel))]),s("button",{ref:"dropdownToggle",staticClass:"form-dropdown-toggle",class:n,attrs:{role:"button",id:"DropdownToggle_"+t._uid,"aria-labelledby":"DropdownLabel_"+t._uid+" DropdownToggle_"+t._uid,"aria-expanded":t.isOpen?"true":"false","aria-haspopup":"true"},on:{click:t.toggleDropdown,keydown:[function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:(e.preventDefault(),t.openDropdown.apply(null,arguments))},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.closeAndFocusToggler.apply(null,arguments)},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"down",40,e.key,["Down","ArrowDown"])?null:(e.preventDefault(),t.openDropdown.apply(null,arguments))},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"up",38,e.key,["Up","ArrowUp"])?null:(e.preventDefault(),t.openDropdown.apply(null,arguments))}]}},[s("span",{staticClass:"form-dropdown-title"},[t._v(t._s(t.value))]),t._t("toggle-post-content")],2)]}}],null,!0)},[s("template",{slot:"eyebrow"},[t._t("eyebrow")],2),s("template",{slot:"after"},[t._t("default",null,null,{value:t.value,isOpen:t.isOpen,contentClasses:["form-dropdown-content",{"is-open":t.isOpen}],closeDropdown:t.closeDropdown,onChangeAction:t.onChangeAction,closeAndFocusToggler:t.closeAndFocusToggler,navigateOverOptions:t.navigateOverOptions,OptionClass:t.OptionClass,ActiveOptionClass:t.ActiveOptionClass})],2)],2)},z=[],U=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"form-element"},[e._t("dropdown",(function(){return[n("select",e._b({directives:[{name:"model",rawName:"v-model",value:e.modelValue,expression:"modelValue"}],class:e.dropdownClasses,on:{change:function(t){var n=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){var t="_value"in e?e._value:e.value;return t}));e.modelValue=t.target.multiple?n:n[0]}}},"select",e.$attrs,!1),[e._t("default")],2)]}),{dropdownClasses:e.dropdownClasses,value:e.value}),n("InlineChevronDownIcon",{staticClass:"form-icon",attrs:{"aria-hidden":"true"}}),e.$slots.eyebrow?n("span",{staticClass:"form-label",attrs:{"aria-hidden":"true"}},[e._t("eyebrow")],2):e._e(),e._t("after")],2)},H=[],G=n("7948"),W={name:"BaseDropdown",inheritAttrs:!1,props:{value:{type:String,default:""}},components:{InlineChevronDownIcon:G["a"]},computed:{modelValue:{get:({value:e})=>e,set(e){this.$emit("input",e)}},dropdownClasses({value:e}){return["form-dropdown",{"form-dropdown-selectnone":""===e,"no-eyebrow":!this.$slots.eyebrow}]}}},Q=W,K=(n("ed71"),Object(w["a"])(Q,U,H,!1,null,"998803d8",null)),X=K.exports;const J="is-open",Y="option",Z="option-active";var ee={name:"DropdownCustom",components:{BaseDropdown:X},constants:{OpenedClass:J,OptionClass:Y,ActiveOptionClass:Z},props:{value:{type:String,default:""},ariaLabel:{type:String,default:""},isSmall:{type:Boolean,default:!1}},data(){return{isOpen:!1,OpenedClass:J,OptionClass:Y,ActiveOptionClass:Z}},mounted(){document.addEventListener("click",this.closeOnLoseFocus)},beforeDestroy(){document.removeEventListener("click",this.closeOnLoseFocus)},methods:{onChangeAction(e){this.$emit("input",e)},toggleDropdown(){this.isOpen?this.closeDropdown():this.openDropdown()},async closeAndFocusToggler(){this.closeDropdown(),await this.$nextTick(),this.$refs.dropdownToggle.focus({preventScroll:!0})},closeDropdown(){this.isOpen=!1,this.$emit("close")},openDropdown(){this.isOpen=!0,this.$emit("open"),this.focusActiveLink()},closeOnLoseFocus(e){!this.$el.contains(e.target)&&this.isOpen&&this.closeDropdown()},navigateOverOptions({target:e},t){const n=this.$el.querySelectorAll("."+Y),s=Array.from(n),i=s.indexOf(e),r=s[i+t];r&&r.focus({preventScroll:!0})},async focusActiveLink(){const e=this.$el.querySelector("."+Z);e&&(await this.$nextTick(),e.focus({preventScroll:!0}))}}},te=ee,ne=(n("e84c"),Object(w["a"])(te,F,z,!1,null,"12dd746a",null)),se=ne.exports,ie={name:"SecondaryDropdown",components:{DropdownCustom:se},props:{options:{type:Array,required:!0},currentOption:{type:String,required:!0},sectionTracker:{type:String,required:!1}},methods:{ariaCurrent(e){return this.currentOption===e&&"section"},setActive(e,t,n,s){t(s),this.$emit("select-section",e.path),n()}}},re=ie,oe=(n("5952"),Object(w["a"])(re,V,L,!1,null,"4a151342",null)),ae=oe.exports,le=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("DropdownCustom",{staticClass:"tutorial-dropdown",attrs:{value:e.currentOption,"aria-label":"Current tutorial",isSmall:""},scopedSlots:e._u([{key:"default",fn:function(t){var s=t.closeAndFocusToggler,i=t.contentClasses,r=t.closeDropdown,o=t.navigateOverOptions,a=t.OptionClass,l=t.ActiveOptionClass;return[n("ul",{staticClass:"options",class:i,attrs:{tabindex:"0"}},e._l(e.options,(function(t){return n("ReferenceUrlProvider",{key:t.reference,attrs:{reference:t.reference},scopedSlots:e._u([{key:"default",fn:function(i){var c=i.title;return n("li",{staticClass:"chapter-list",attrs:{role:"group"}},[n("p",{staticClass:"chapter-name"},[e._v(e._s(c))]),n("ul",{attrs:{role:"listbox"}},e._l(t.projects,(function(t){return n("ReferenceUrlProvider",{key:t.reference,attrs:{reference:t.reference},scopedSlots:e._u([{key:"default",fn:function(t){var i=t.urlWithParams,c=t.title;return[n("router-link",{attrs:{to:i,custom:""},scopedSlots:e._u([{key:"default",fn:function(t){var i,u=t.navigate,d=t.isActive;return[n("li",{class:(i={},i[a]=!0,i[l]=d,i),attrs:{role:"option",value:c,"aria-selected":d,"aria-current":!!d&&"tutorial",tabindex:-1},on:{click:function(t){return e.setActive(u,r,t)},keydown:[function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.setActive(u,r,t)},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"esc",27,t.key,["Esc","Escape"])?null:s.apply(null,arguments)},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"tab",9,t.key,"Tab")?null:s.apply(null,arguments)},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"down",40,t.key,["Down","ArrowDown"])?null:(t.preventDefault(),o(t,1))},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"up",38,t.key,["Up","ArrowUp"])?null:(t.preventDefault(),o(t,-1))}]}},[e._v(" "+e._s(c)+" ")])]}}],null,!0)})]}}],null,!0)})})),1)])}}],null,!0)})})),1)]}}])})},ce=[],ue={name:"PrimaryDropdown",components:{DropdownCustom:se,ReferenceUrlProvider:I},props:{options:{type:Array,required:!0},currentOption:{type:String,required:!0}},methods:{setActive(e,t,n){e(n),t()}}},de=ue,pe=(n("e4e4"),Object(w["a"])(de,le,ce,!1,null,"78dc103f",null)),he=pe.exports;const me={title:"Introduction",url:"#introduction",reference:"introduction",sectionNumber:0,depth:0};var fe={name:"NavigationBar",components:{NavTitleContainer:P["a"],NavBase:O["a"],ReferenceUrlProvider:I,PrimaryDropdown:he,SecondaryDropdown:ae,MobileDropdown:E,ChevronIcon:S},mixins:[$["a"]],inject:["store","references"],props:{chapters:{type:Array,required:!0},technology:{type:String,required:!0},topic:{type:String,required:!0},rootReference:{type:String,required:!0},identifierUrl:{type:String,required:!0}},data(){return{currentSection:me,tutorialState:this.store.state}},watch:{pageSectionWithHighestVisibility(e){e&&(this.currentSection=e)}},computed:{currentProject(){return this.chapters.reduce((e,{projects:t})=>e.concat(t),[]).find(e=>e.reference===this.identifierUrl)},pageSections(){if(!this.currentProject)return[];const e=[me].concat(this.currentProject.sections);return this.tutorialState.linkableSections.map((t,n)=>{const s=e[n],i=this.references[s.reference],{url:r,title:o}=i||s;return{...t,title:o,path:r}})},optionsForSections(){return this.pageSections.map(({depth:e,path:t,title:n})=>({depth:e,path:t,title:n}))},pageSectionWithHighestVisibility(){return[...this.pageSections].sort((e,t)=>t.visibility-e.visibility).find(e=>e.visibility>0)},sectionIndicatorText(){const e=this.tutorialState.linkableSections.length-1,{sectionNumber:t}=this.currentSection||{};if(0!==t)return`(${t} of ${e})`}},methods:{onSelectSection(e){const t="#"+e.split("#")[1];this.scrollToElement(t)}}},ve=fe,ge=(n("5241"),Object(w["a"])(ve,m,f,!1,null,"26e19f17",null)),ye=ge.exports,be=n("bf08"),Ce=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"body"},[n("BodyContent",{attrs:{content:e.content}})],1)},we=[],_e=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("article",{staticClass:"body-content"},e._l(e.content,(function(t,s){return n(e.componentFor(t),e._b({key:s,tag:"component",staticClass:"layout"},"component",e.propsFor(t),!1))})),1)},Se=[],ke=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"columns",class:e.classes},[e._l(e.columns,(function(t,s){return[n("Asset",{key:t.media,attrs:{identifier:t.media,videoAutoplays:!1}}),t.content?n("ContentNode",{key:s,attrs:{content:t.content}}):e._e()]}))],2)},xe=[],Te=n("80e4"),Ae=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("BaseContentNode",{attrs:{content:e.articleContent}})},Ie=[],$e=n("5677"),Oe={name:"ContentNode",components:{BaseContentNode:$e["a"]},props:$e["a"].props,computed:{articleContent(){return this.map(e=>{switch(e.type){case $e["a"].BlockType.codeListing:return{...e,showLineNumbers:!0};case $e["a"].BlockType.heading:{const{anchor:t,...n}=e;return n}default:return e}})}},methods:$e["a"].methods,BlockType:$e["a"].BlockType,InlineType:$e["a"].InlineType},Pe=Oe,je=(n("cb8d"),Object(w["a"])(Pe,Ae,Ie,!1,null,"3cfe1c35",null)),Ne=je.exports,De={name:"Columns",components:{Asset:Te["a"],ContentNode:Ne},props:{columns:{type:Array,required:!0}},computed:{classes(){return{"cols-2":2===this.columns.length,"cols-3":3===this.columns.length}}}},Be=De,Me=(n("e9b0"),Object(w["a"])(Be,ke,xe,!1,null,"30edf911",null)),qe=Me.exports,Re=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"content-and-media",class:e.classes},[n("ContentNode",{attrs:{content:e.content}}),n("Asset",{attrs:{identifier:e.media}})],1)},Ee=[];const Ve={leading:"leading",trailing:"trailing"};var Le={name:"ContentAndMedia",components:{Asset:Te["a"],ContentNode:Ne},props:{content:Ne.props.content,media:Te["a"].props.identifier,mediaPosition:{type:String,default:()=>Ve.trailing,validator:e=>Object.prototype.hasOwnProperty.call(Ve,e)}},computed:{classes(){return{"media-leading":this.mediaPosition===Ve.leading,"media-trailing":this.mediaPosition===Ve.trailing}}},MediaPosition:Ve},Fe=Le,ze=(n("1006"),Object(w["a"])(Fe,Re,Ee,!1,null,"3fa44f9e",null)),Ue=ze.exports,He=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"full-width"},e._l(e.groups,(function(t,s){return n(e.componentFor(t),e._b({key:s,tag:"component",staticClass:"group"},"component",e.propsFor(t),!1),[n("ContentNode",{attrs:{content:t.content}})],1)})),1)},Ge=[],We=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n(e.tag,{tag:"component",attrs:{id:e.anchor}},[e._t("default")],2)},Qe=[],Ke=n("72e7"),Xe={name:"LinkableElement",mixins:[Ke["a"]],inject:{navigationBarHeight:{default(){}},store:{default(){return{addLinkableSection(){},updateLinkableSection(){}}}}},props:{anchor:{type:String,required:!0},depth:{type:Number,default:()=>0},tag:{type:String,default:()=>"div"},title:{type:String,required:!0}},computed:{intersectionRootMargin(){const e=this.navigationBarHeight?`-${this.navigationBarHeight}px`:"0%";return e+" 0% -50% 0%"}},created(){this.store.addLinkableSection({anchor:this.anchor,depth:this.depth,title:this.title,visibility:0})},methods:{onIntersect(e){const t=Math.min(1,e.intersectionRatio);this.store.updateLinkableSection({anchor:this.anchor,depth:this.depth,title:this.title,visibility:t})}}},Je=Xe,Ye=Object(w["a"])(Je,We,Qe,!1,null,null,null),Ze=Ye.exports;const{BlockType:et}=Ne;var tt={name:"FullWidth",components:{ContentNode:Ne,LinkableElement:Ze},props:Ne.props,computed:{groups:({content:e})=>e.reduce((e,t)=>0===e.length||t.type===et.heading?[...e,{heading:t.type===et.heading?t:null,content:[t]}]:[...e.slice(0,e.length-1),{heading:e[e.length-1].heading,content:e[e.length-1].content.concat(t)}],[])},methods:{componentFor(e){return e.heading?Ze:"div"},depthFor(e){switch(e.level){case 1:case 2:return 0;default:return 1}},propsFor(e){return e.heading?{anchor:e.heading.anchor,depth:this.depthFor(e.heading),title:e.heading.text}:{}}}},nt=tt,st=(n("aece"),Object(w["a"])(nt,He,Ge,!1,null,"1f2be54b",null)),it=st.exports;const rt={columns:"columns",contentAndMedia:"contentAndMedia",fullWidth:"fullWidth"};var ot={name:"BodyContent",props:{content:{type:Array,required:!0,validator:e=>e.every(({kind:e})=>Object.prototype.hasOwnProperty.call(rt,e))}},methods:{componentFor(e){return{[rt.columns]:qe,[rt.contentAndMedia]:Ue,[rt.fullWidth]:it}[e.kind]},propsFor(e){const{content:t,kind:n,media:s,mediaPosition:i}=e;return{[rt.columns]:{columns:t},[rt.contentAndMedia]:{content:t,media:s,mediaPosition:i},[rt.fullWidth]:{content:t}}[n]}},LayoutKind:rt},at=ot,lt=(n("1dd5"),Object(w["a"])(at,_e,Se,!1,null,"4d5a806e",null)),ct=lt.exports,ut={name:"Body",components:{BodyContent:ct},props:ct.props},dt=ut,pt=(n("5237"),Object(w["a"])(dt,Ce,we,!1,null,"6499e2f2",null)),ht=pt.exports,mt=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("TutorialCTA",e._b({},"TutorialCTA",e.$props,!1))},ft=[],vt=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("BaseCTA",e._b({attrs:{label:"Next"}},"BaseCTA",e.baseProps,!1))},gt=[],yt=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"call-to-action"},[n("Row",[n("LeftColumn",[n("span",{staticClass:"label"},[e._v(e._s(e.label))]),n("h2",[e._v(" "+e._s(e.title)+" ")]),e.abstract?n("ContentNode",{staticClass:"description",attrs:{content:[e.abstractParagraph]}}):e._e(),e.action?n("Button",{attrs:{action:e.action}}):e._e()],1),n("RightColumn",{staticClass:"right-column"},[e.media?n("Asset",{staticClass:"media",attrs:{identifier:e.media}}):e._e()],1)],1)],1)},bt=[],Ct=n("0f00"),wt=n("620a"),_t=n("c081"),St={name:"CallToAction",components:{Asset:Te["a"],Button:_t["a"],ContentNode:$e["a"],LeftColumn:{render(e){return e(wt["a"],{props:{span:{large:5,small:12}}},this.$slots.default)}},RightColumn:{render(e){return e(wt["a"],{props:{span:{large:6,small:12}}},this.$slots.default)}},Row:Ct["a"]},props:{title:{type:String,required:!0},label:{type:String,required:!0},abstract:{type:Array,required:!1},action:{type:Object,required:!1},media:{type:String,required:!1}},computed:{abstractParagraph(){return{type:"paragraph",inlineContent:this.abstract}}}},kt=St,xt=(n("80f7"),Object(w["a"])(kt,yt,bt,!1,null,"2016b288",null)),Tt=xt.exports,At={name:"CallToAction",components:{BaseCTA:Tt},computed:{baseProps(){return{title:this.title,abstract:this.abstract,action:this.action,media:this.media}}},props:{title:{type:String,required:!0},abstract:{type:Array,required:!1},action:{type:Object,required:!1},media:{type:String,required:!1}}},It=At,$t=Object(w["a"])(It,vt,gt,!1,null,null,null),Ot=$t.exports,Pt={name:"CallToAction",components:{TutorialCTA:Ot},props:Ot.props},jt=Pt,Nt=(n("3e1b"),Object(w["a"])(jt,mt,ft,!1,null,"426a965c",null)),Dt=Nt.exports,Bt=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("TutorialHero",e._b({},"TutorialHero",e.$props,!1))},Mt=[],qt=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("LinkableSection",{staticClass:"tutorial-hero",attrs:{anchor:"introduction",title:e.sectionTitle}},[n("div",{staticClass:"hero dark"},[e.backgroundImageUrl?n("div",{staticClass:"bg",style:e.bgStyle}):e._e(),e._t("above-title"),n("Row",[n("Column",[n("Headline",{attrs:{level:1}},[e.chapter?n("template",{slot:"eyebrow"},[e._v(e._s(e.chapter))]):e._e(),e._v(" "+e._s(e.title)+" ")],2),e.content||e.video?n("div",{staticClass:"intro"},[e.content?n("ContentNode",{attrs:{content:e.content}}):e._e(),e.video?[n("p",[n("a",{staticClass:"call-to-action",attrs:{href:"#"},on:{click:function(t){return t.preventDefault(),e.toggleCallToActionModal.apply(null,arguments)}}},[e._v(" Watch intro video "),n("PlayIcon",{staticClass:"cta-icon icon-inline"})],1)]),n("GenericModal",{attrs:{visible:e.callToActionModalVisible,isFullscreen:"",theme:"dark"},on:{"update:visible":function(t){e.callToActionModalVisible=t}}},[n("Asset",{directives:[{name:"show",rawName:"v-show",value:e.callToActionModalVisible,expression:"callToActionModalVisible"}],ref:"asset",staticClass:"video-asset",attrs:{identifier:e.video},on:{videoEnded:e.handleVideoEnd}})],1)]:e._e()],2):e._e(),n("Metadata",{staticClass:"metadata",attrs:{projectFilesUrl:e.projectFilesUrl,estimatedTimeInMinutes:e.estimatedTimeInMinutes,xcodeRequirement:e.xcodeRequirementData}})],1)],1)],2)])},Rt=[],Et=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"headline"},[e.$slots.eyebrow?n("span",{staticClass:"eyebrow"},[e._t("eyebrow")],2):e._e(),n("Heading",{staticClass:"heading",attrs:{level:e.level}},[e._t("default")],2)],1)},Vt=[];const Lt=1,Ft=6,zt={type:Number,required:!0,validator:e=>e>=Lt&&e<=Ft},Ut={name:"Heading",render:function(e){return e("h"+this.level,this.$slots.default)},props:{level:zt}};var Ht={name:"Headline",components:{Heading:Ut},props:{level:zt}},Gt=Ht,Wt=(n("323a"),Object(w["a"])(Gt,Et,Vt,!1,null,"1898f592",null)),Qt=Wt.exports,Kt=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("PortalSource",{attrs:{to:"modal-destination",disabled:!e.isVisible}},[n("div",{directives:[{name:"show",rawName:"v-show",value:e.isVisible,expression:"isVisible"}],staticClass:"generic-modal",class:[e.stateClasses,e.themeClass],style:e.modalColors,attrs:{role:"dialog"}},[n("div",{staticClass:"backdrop",on:{click:e.onClickOutside}}),n("div",{ref:"container",staticClass:"container",style:{width:e.width}},[e.showClose?n("button",{ref:"close",staticClass:"close",attrs:{"aria-label":"Close"},on:{click:function(t){return t.preventDefault(),e.closeModal.apply(null,arguments)}}},[n("CloseIcon")],1):e._e(),n("div",{ref:"content",staticClass:"modal-content"},[e._t("default")],2)])])])},Xt=[],Jt=n("f2af"),Yt=n("c8e2"),Zt=n("95da"),en=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("SVGIcon",{staticClass:"close-icon",attrs:{viewBox:"0 0 14 14"}},[n("path",{attrs:{d:"m10.3772239 3.1109127.7266116.7266116-3.27800002 3.2763884 3.27072752 3.2703884-.7266116.7266116-3.27011592-3.271-3.26211596 3.2637276-.7266116-.7266116 3.26272756-3.263116-3.27-3.26911596.72661159-.72661159 3.26938841 3.26972755z","fill-rule":"evenodd"}})])},tn=[],nn={name:"CloseIcon",components:{SVGIcon:y["a"]}},sn=nn,rn=Object(w["a"])(sn,en,tn,!1,null,null,null),on=rn.exports;const an={light:"light",dark:"dark",dynamic:"dynamic",code:"code"};var ln={name:"GenericModal",model:{prop:"visible",event:"update:visible"},components:{CloseIcon:on,PortalSource:h["Portal"]},props:{visible:{type:Boolean,default:!1},isFullscreen:{type:Boolean,default:!1},theme:{type:String,validator:e=>Object.keys(an).includes(e),default:an.light},codeBackgroundColorOverride:{type:String,default:""},width:{type:String,default:null},showClose:{type:Boolean,default:!0}},data(){return{lastFocusItem:null,prefersDarkStyle:!1,focusTrapInstance:null}},computed:{isVisible:{get:({visible:e})=>e,set(e){this.$emit("update:visible",e)}},modalColors(){return{"--background":this.codeBackgroundColorOverride}},themeClass({theme:e,prefersDarkStyle:t,isThemeDynamic:n}){let s={};return n&&(s={"theme-light":!t,"theme-dark":t}),["theme-"+e,s]},stateClasses:({isFullscreen:e,isVisible:t,showClose:n})=>({"modal-fullscreen":e,"modal-standard":!e,"modal-open":t,"modal-with-close":n}),isThemeDynamic:({theme:e})=>e===an.dynamic||e===an.code},watch:{isVisible(e){e?this.onShow():this.onHide()}},mounted(){if(this.focusTrapInstance=new Yt["a"],document.addEventListener("keydown",this.onKeydown),this.isThemeDynamic){const e=window.matchMedia("(prefers-color-scheme: dark)");e.addListener(this.onColorSchemePreferenceChange),this.$once("hook:beforeDestroy",()=>{e.removeListener(this.onColorSchemePreferenceChange)}),this.onColorSchemePreferenceChange(e)}},beforeDestroy(){this.isVisible&&Jt["a"].unlockScroll(this.$refs.container),document.removeEventListener("keydown",this.onKeydown),this.focusTrapInstance.destroy()},methods:{async onShow(){await this.$nextTick(),Jt["a"].lockScroll(this.$refs.container),await this.focusCloseButton(),this.focusTrapInstance.updateFocusContainer(this.$refs.container),this.focusTrapInstance.start(),Zt["a"].hide(this.$refs.container)},onHide(){Jt["a"].unlockScroll(this.$refs.container),this.focusTrapInstance.stop(),this.lastFocusItem&&(this.lastFocusItem.focus({preventScroll:!0}),this.lastFocusItem=null),this.$emit("close"),Zt["a"].show(this.$refs.container)},closeModal(){this.isVisible=!1},selectContent(){window.getSelection().selectAllChildren(this.$refs.content)},onClickOutside(){this.closeModal()},onKeydown(e){const{metaKey:t=!1,ctrlKey:n=!1,key:s}=e;this.isVisible&&("a"===s&&(t||n)&&(e.preventDefault(),this.selectContent()),"Escape"===s&&this.closeModal())},onColorSchemePreferenceChange({matches:e}){this.prefersDarkStyle=e},async focusCloseButton(){this.lastFocusItem=document.activeElement,await this.$nextTick(),this.$refs.close&&this.$refs.close.focus(),this.$emit("open")}}},cn=ln,un=(n("8016"),Object(w["a"])(cn,Kt,Xt,!1,null,"ea628b36",null)),dn=un.exports,pn=n("c4dd"),hn=n("748c"),mn=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"metadata"},[e.estimatedTimeInMinutes?n("div",{staticClass:"item",attrs:{"aria-label":e.estimatedTimeInMinutes+" minutes estimated time"}},[n("div",{staticClass:"content",attrs:{"aria-hidden":"true"}},[n("div",{staticClass:"duration"},[e._v(" "+e._s(e.estimatedTimeInMinutes)+" "),n("div",{staticClass:"minutes"},[e._v("min")])])]),n("div",{staticClass:"bottom",attrs:{"aria-hidden":"true"}},[e._v("Estimated Time")])]):e._e(),e.projectFilesUrl?n("div",{staticClass:"item"},[n("DownloadIcon",{staticClass:"item-large-icon icon-inline"}),n("div",{staticClass:"content bottom"},[n("a",{staticClass:"content-link project-download",attrs:{href:e.projectFilesUrl}},[e._v(" Project files "),n("InlineDownloadIcon",{staticClass:"small-icon icon-inline"})],1)])],1):e._e(),e.xcodeRequirement?n("div",{staticClass:"item"},[n("XcodeIcon",{staticClass:"item-large-icon icon-inline"}),n("div",{staticClass:"content bottom"},[e.isTargetIDE?n("span",[e._v(e._s(e.xcodeRequirement.title))]):n("a",{staticClass:"content-link",attrs:{href:e.xcodeRequirement.url}},[e._v(" "+e._s(e.xcodeRequirement.title)+" "),n("InlineChevronRightIcon",{staticClass:"icon-inline small-icon xcode-icon"})],1)])],1):e._e()])},fn=[],vn=n("de60"),gn=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("SVGIcon",{staticClass:"xcode-icon",attrs:{viewBox:"0 0 14 14"}},[n("path",{attrs:{d:"M2.668 4.452l-1.338-2.229 0.891-0.891 2.229 1.338 1.338 2.228 3.667 3.666 0.194-0.194 2.933 2.933c0.13 0.155 0.209 0.356 0.209 0.576 0 0.497-0.403 0.9-0.9 0.9-0.22 0-0.421-0.079-0.577-0.209l0.001 0.001-2.934-2.933 0.181-0.181-3.666-3.666z"}}),n("path",{attrs:{d:"M11.824 1.277l-0.908 0.908c-0.091 0.091-0.147 0.216-0.147 0.354 0 0.106 0.033 0.205 0.090 0.286l-0.001-0.002 0.058 0.069 0.185 0.185c0.090 0.090 0.215 0.146 0.353 0.146 0.107 0 0.205-0.033 0.286-0.090l-0.002 0.001 0.069-0.057 0.909-0.908c0.118 0.24 0.187 0.522 0.187 0.82 0 1.045-0.848 1.893-1.893 1.893-0.296 0-0.577-0.068-0.826-0.189l0.011 0.005-5.5 5.5c0.116 0.238 0.184 0.518 0.184 0.813 0 1.045-0.848 1.893-1.893 1.893-0.296 0-0.576-0.068-0.826-0.189l0.011 0.005 0.908-0.909c0.090-0.090 0.146-0.215 0.146-0.353 0-0.107-0.033-0.205-0.090-0.286l0.001 0.002-0.057-0.069-0.185-0.185c-0.091-0.091-0.216-0.147-0.354-0.147-0.106 0-0.205 0.033-0.286 0.090l0.002-0.001-0.069 0.058-0.908 0.908c-0.116-0.238-0.184-0.518-0.184-0.813 0-1.045 0.847-1.892 1.892-1.892 0.293 0 0.571 0.067 0.819 0.186l-0.011-0.005 5.5-5.5c-0.116-0.238-0.184-0.519-0.184-0.815 0-1.045 0.847-1.892 1.892-1.892 0.296 0 0.577 0.068 0.827 0.19l-0.011-0.005z"}})])},yn=[],bn={name:"XcodeIcon",components:{SVGIcon:y["a"]}},Cn=bn,wn=Object(w["a"])(Cn,gn,yn,!1,null,null,null),_n=wn.exports,Sn=n("34b0"),kn=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("SVGIcon",{staticClass:"inline-download-icon",attrs:{viewBox:"0 0 14 14"}},[n("path",{attrs:{d:"M7 0.5c3.59 0 6.5 2.91 6.5 6.5s-2.91 6.5-6.5 6.5c-3.59 0-6.5-2.91-6.5-6.5s2.91-6.5 6.5-6.5zM7 1.5c-3.038 0-5.5 2.462-5.5 5.5s2.462 5.5 5.5 5.5c3.038 0 5.5-2.462 5.5-5.5s-2.462-5.5-5.5-5.5z"}}),n("path",{attrs:{d:"M7.51 2.964l-0.001 5.431 1.308-2.041 0.842 0.539-2.664 4.162-2.633-4.164 0.845-0.534 1.303 2.059 0.001-5.452z"}})])},xn=[],Tn={name:"InlineDownloadIcon",components:{SVGIcon:y["a"]}},An=Tn,In=Object(w["a"])(An,kn,xn,!1,null,null,null),$n=In.exports,On={name:"HeroMetadata",components:{InlineDownloadIcon:$n,InlineChevronRightIcon:Sn["a"],DownloadIcon:vn["a"],XcodeIcon:_n},inject:["isTargetIDE"],props:{projectFilesUrl:{type:String},estimatedTimeInMinutes:{type:Number},xcodeRequirement:{type:Object,required:!1}}},Pn=On,jn=(n("5356"),Object(w["a"])(Pn,mn,fn,!1,null,"2fa6f125",null)),Nn=jn.exports,Dn={name:"Hero",components:{PlayIcon:pn["a"],GenericModal:dn,Column:{render(e){return e(wt["a"],{props:{span:{large:7,medium:9,small:12}}},this.$slots.default)}},ContentNode:$e["a"],Headline:Qt,Metadata:Nn,Row:Ct["a"],Asset:Te["a"],LinkableSection:Ze},inject:["references"],props:{title:{type:String,required:!0},chapter:{type:String},content:{type:Array},projectFiles:{type:String},estimatedTimeInMinutes:{type:Number},xcodeRequirement:{type:String,required:!1},video:{type:String},backgroundImage:{type:String}},computed:{backgroundImageUrl(){const e=this.references[this.backgroundImage]||{},{variants:t=[]}=e,n=t.find(e=>e.traits.includes("light"));return n?Object(hn["b"])(n.url):""},projectFilesUrl(){return this.projectFiles?Object(hn["b"])(this.references[this.projectFiles].url):null},bgStyle(){return{backgroundImage:`url('${this.backgroundImageUrl}')`}},xcodeRequirementData(){return this.references[this.xcodeRequirement]},sectionTitle(){return"Introduction"}},data(){return{callToActionModalVisible:!1}},methods:{async toggleCallToActionModal(){this.callToActionModalVisible=!0,await this.$nextTick();const e=this.$refs.asset.$el.querySelector("video");if(e)try{await e.play(),e.muted=!1}catch(t){}},handleVideoEnd(){this.callToActionModalVisible=!1}}},Bn=Dn,Mn=(n("3c4b"),Object(w["a"])(Bn,qt,Rt,!1,null,"cb87b2d0",null)),qn=Mn.exports,Rn={name:"Hero",components:{TutorialHero:qn},props:qn.props},En=Rn,Vn=(n("2f9d"),Object(w["a"])(En,Bt,Mt,!1,null,"35a9482f",null)),Ln=Vn.exports,Fn=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("TutorialAssessments",e._b({},"TutorialAssessments",e.$props,!1),[n("p",{attrs:{slot:"success"},slot:"success"},[e._v("Great job, you've answered all the questions for this article.")])])},zn=[],Un=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("LinkableSection",{staticClass:"assessments-wrapper",attrs:{anchor:e.anchor,title:e.title}},[n("Row",{ref:"assessments",staticClass:"assessments"},[n("MainColumn",[n("Row",{staticClass:"banner"},[n("HeaderColumn",[n("h2",{staticClass:"title"},[e._v(e._s(e.title))])])],1),e.completed?n("div",{staticClass:"success"},[e._t("success",(function(){return[n("p",[e._v(e._s(e.SuccessMessage))])]}))],2):n("div",[n("Progress",e._b({ref:"progress"},"Progress",e.progress,!1)),n("Quiz",{key:e.activeIndex,attrs:{choices:e.activeAssessment.choices,content:e.activeAssessment.content,isLast:e.isLast,title:e.activeAssessment.title},on:{submit:e.onSubmit,advance:e.onAdvance,"see-results":e.onSeeResults}})],1),n("div",{staticClass:"visuallyhidden",attrs:{"aria-live":"assertive"}},[e.completed?e._t("success",(function(){return[e._v(" "+e._s(e.SuccessMessage)+" ")]})):e._e()],2)],1)],1)],1)},Hn=[],Gn=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("Row",[n("p",{staticClass:"title"},[e._v("Question "+e._s(e.index)+" of "+e._s(e.total))])])},Wn=[],Qn={name:"AssessmentsProgress",components:{Row:Ct["a"]},props:{index:{type:Number,required:!0},total:{type:Number,required:!0}}},Kn=Qn,Xn=(n("0530"),Object(w["a"])(Kn,Gn,Wn,!1,null,"8ec95972",null)),Jn=Xn.exports,Yn=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"quiz"},[n("ContentNode",{staticClass:"title",attrs:{content:e.title}}),e.content?n("ContentNode",{staticClass:"question-content",attrs:{content:e.content}}):e._e(),n("div",{staticClass:"choices"},[e._l(e.choices,(function(t,s){return n("label",{key:s,class:e.choiceClasses[s]},[n(e.getIconComponent(s),{tag:"component",staticClass:"choice-icon"}),n("input",{directives:[{name:"model",rawName:"v-model",value:e.selectedIndex,expression:"selectedIndex"}],attrs:{type:"radio",name:"assessment"},domProps:{value:s,checked:e._q(e.selectedIndex,s)},on:{change:function(t){e.selectedIndex=s}}}),n("ContentNode",{staticClass:"question",attrs:{content:t.content}}),e.userChoices[s].checked?[n("ContentNode",{staticClass:"answer",attrs:{content:t.justification}}),t.reaction?n("p",{staticClass:"answer"},[e._v(e._s(t.reaction))]):e._e()]:e._e()],2)})),n("div",{staticClass:"visuallyhidden",attrs:{"aria-live":"assertive"}},[e._v(" "+e._s(e.ariaLiveText)+" ")])],2),n("div",{staticClass:"controls"},[n("ButtonLink",{staticClass:"check",attrs:{disabled:null===e.selectedIndex||e.showNextQuestion},nativeOn:{click:function(t){return e.submit.apply(null,arguments)}}},[e._v(" Submit ")]),e.isLast?n("ButtonLink",{staticClass:"results",attrs:{disabled:!e.showNextQuestion},nativeOn:{click:function(t){return e.seeResults.apply(null,arguments)}}},[e._v(" Next ")]):n("ButtonLink",{staticClass:"next",attrs:{disabled:!e.showNextQuestion},nativeOn:{click:function(t){return e.advance.apply(null,arguments)}}},[e._v(" Next Question ")])],1)],1)},Zn=[],es=n("76ab"),ts=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("SVGIcon",{staticClass:"reset-circle-icon",attrs:{viewBox:"0 0 14 14"}},[n("path",{attrs:{d:"M7 0.5c3.59 0 6.5 2.91 6.5 6.5s-2.91 6.5-6.5 6.5c-3.59 0-6.5-2.91-6.5-6.5v0c0-3.59 2.91-6.5 6.5-6.5v0zM7 1.5c-3.038 0-5.5 2.462-5.5 5.5s2.462 5.5 5.5 5.5c3.038 0 5.5-2.462 5.5-5.5v0c0-3.038-2.462-5.5-5.5-5.5v0z"}}),n("path",{attrs:{d:"M3.828 4.539l0.707-0.707 5.657 5.657-0.707 0.707-5.657-5.657z"}}),n("path",{attrs:{d:"M3.828 9.489l5.657-5.657 0.707 0.707-5.657 5.657-0.707-0.707z"}})])},ns=[],ss={name:"ResetCircleIcon",components:{SVGIcon:y["a"]}},is=ss,rs=Object(w["a"])(is,ts,ns,!1,null,null,null),os=rs.exports,as=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("SVGIcon",{staticClass:"check-circle-icon",attrs:{viewBox:"0 0 14 14"}},[n("path",{attrs:{d:"M7 0.5c3.59 0 6.5 2.91 6.5 6.5s-2.91 6.5-6.5 6.5c-3.59 0-6.5-2.91-6.5-6.5v0c0-3.59 2.91-6.5 6.5-6.5v0zM7 1.5c-3.038 0-5.5 2.462-5.5 5.5s2.462 5.5 5.5 5.5c3.038 0 5.5-2.462 5.5-5.5v0c0-3.038-2.462-5.5-5.5-5.5v0z"}}),n("path",{attrs:{d:"M9.626 3.719l0.866 0.5-3.5 6.062-3.464-2 0.5-0.866 2.6 1.5z"}})])},ls=[],cs={name:"CheckCircleIcon",components:{SVGIcon:y["a"]}},us=cs,ds=Object(w["a"])(us,as,ls,!1,null,null,null),ps=ds.exports,hs={name:"Quiz",components:{CheckCircleIcon:ps,ResetCircleIcon:os,ContentNode:$e["a"],ButtonLink:es["a"]},props:{content:{type:Array,required:!1},choices:{type:Array,required:!0},isLast:{type:Boolean,default:!1},title:{type:Array,required:!0}},data(){return{userChoices:this.choices.map(()=>({checked:!1})),selectedIndex:null,checkedIndex:null}},computed:{correctChoices(){return this.choices.reduce((e,t,n)=>t.isCorrect?e.add(n):e,new Set)},choiceClasses(){return this.userChoices.map((e,t)=>({choice:!0,active:this.selectedIndex===t,disabled:e.checked||this.showNextQuestion,correct:e.checked&&this.choices[t].isCorrect,incorrect:e.checked&&!this.choices[t].isCorrect}))},showNextQuestion(){return Array.from(this.correctChoices).every(e=>this.userChoices[e].checked)},ariaLiveText:({checkedIndex:e,choices:t})=>{if(null===e)return"";const{isCorrect:n}=t[e];return`Answer number ${e+1} is ${n?"correct":"incorrect"}`}},methods:{getIconComponent(e){const t=this.userChoices[e];if(t&&t.checked)return this.choices[e].isCorrect?ps:os},submit(){this.$set(this.userChoices,this.selectedIndex,{checked:!0}),this.checkedIndex=this.selectedIndex,this.$emit("submit")},advance(){this.$emit("advance")},seeResults(){this.$emit("see-results")}}},ms=hs,fs=(n("5c7b"),Object(w["a"])(ms,Yn,Zn,!1,null,"455ff2a6",null)),vs=fs.exports;const gs=12,ys="Great job, you've answered all the questions for this tutorial.";var bs={name:"Assessments",constants:{SuccessMessage:ys},components:{LinkableSection:Ze,Quiz:vs,Progress:Jn,Row:Ct["a"],HeaderColumn:{render(e){return e(wt["a"],{props:{isCentered:{large:!0},span:{large:10}}},this.$slots.default)}},MainColumn:{render(e){return e(wt["a"],{props:{isCentered:{large:!0},span:{large:10,medium:10,small:12}}},this.$slots.default)}}},props:{assessments:{type:Array,required:!0},anchor:{type:String,required:!0}},inject:["navigationBarHeight"],data(){return{activeIndex:0,completed:!1,SuccessMessage:ys}},computed:{activeAssessment(){return this.assessments[this.activeIndex]},isLast(){return this.activeIndex===this.assessments.length-1},progress(){return{index:this.activeIndex+1,total:this.assessments.length}},title(){return"Check Your Understanding"}},methods:{scrollTo(e,t=0){e.scrollIntoView(!0),window.scrollBy(0,-this.navigationBarHeight-t)},onSubmit(){this.$nextTick(()=>{this.scrollTo(this.$refs.progress.$el,gs)})},onAdvance(){this.activeIndex+=1,this.$nextTick(()=>{this.scrollTo(this.$refs.progress.$el,gs)})},onSeeResults(){this.completed=!0,this.$nextTick(()=>{this.scrollTo(this.$refs.assessments.$el,gs)})}}},Cs=bs,ws=(n("53b5"),Object(w["a"])(Cs,Un,Hn,!1,null,"c1de71de",null)),_s=ws.exports,Ss={name:"Assessments",components:{TutorialAssessments:_s},props:_s.props},ks=Ss,xs=(n("f264"),Object(w["a"])(ks,Fn,zn,!1,null,"3c94366b",null)),Ts=xs.exports;const As={articleBody:"articleBody",callToAction:"callToAction",hero:"hero",assessments:"assessments"};var Is={name:"Article",components:{NavigationBar:ye,PortalTarget:h["PortalTarget"]},mixins:[be["a"]],inject:{isTargetIDE:{default:!1},store:{default(){return{reset(){}}}}},props:{hierarchy:{type:Object,required:!0},metadata:{type:Object,required:!0},references:{type:Object,required:!0},sections:{type:Array,required:!0,validator:e=>e.every(({kind:e})=>Object.prototype.hasOwnProperty.call(As,e))},identifierUrl:{type:String,required:!0}},computed:{heroSection(){return this.sections.find(this.isHero)},heroTitle(){return(this.heroSection||{}).title},pageTitle(){return this.heroTitle?`${this.heroTitle} — ${this.metadata.category} Tutorials`:void 0},pageDescription:({heroSection:e,extractFirstParagraphText:t})=>e?t(e.content):null},methods:{componentFor(e){const{kind:t}=e;return{[As.articleBody]:ht,[As.callToAction]:Dt,[As.hero]:Ln,[As.assessments]:Ts}[t]},isHero(e){return e.kind===As.hero},propsFor(e){const{abstract:t,action:n,anchor:s,assessments:i,backgroundImage:r,chapter:o,content:a,estimatedTimeInMinutes:l,kind:c,media:u,projectFiles:d,title:p,video:h,xcodeRequirement:m}=e;return{[As.articleBody]:{content:a},[As.callToAction]:{abstract:t,action:n,media:u,title:p},[As.hero]:{backgroundImage:r,chapter:o,content:a,estimatedTimeInMinutes:l,projectFiles:d,title:p,video:h,xcodeRequirement:m},[As.assessments]:{anchor:s,assessments:i}}[c]}},provide(){return{references:this.references}},created(){this.store.reset()},SectionKind:As},$s=Is,Os=(n("3a78"),Object(w["a"])($s,d,p,!1,null,"d9f204d0",null)),Ps=Os.exports,js=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"tutorial"},[e.isTargetIDE?e._e():n("NavigationBar",{attrs:{technology:e.metadata.category,chapters:e.hierarchy.modules,topic:e.tutorialTitle||"",rootReference:e.hierarchy.reference,identifierUrl:e.identifierUrl}}),n("main",{attrs:{id:"main",role:"main",tabindex:"0"}},[e._l(e.sections,(function(e,t){return n("Section",{key:t,attrs:{section:e}})})),n("BreakpointEmitter",{on:{change:e.handleBreakpointChange}})],2),n("PortalTarget",{attrs:{name:"modal-destination",multiple:""}})],1)},Ns=[],Ds=n("66c9"),Bs={computed:{isClientMobile(){let e=!1;return e="maxTouchPoints"in navigator||"msMaxTouchPoints"in navigator?Boolean(navigator.maxTouchPoints||navigator.msMaxTouchPoints):window.matchMedia?window.matchMedia("(pointer:coarse)").matches:"orientation"in window,e}}},Ms=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"sections"},e._l(e.tasks,(function(t,s){return n("Section",e._b({key:s,attrs:{id:t.anchor,sectionNumber:s+1,isRuntimePreviewVisible:e.isRuntimePreviewVisible},on:{"runtime-preview-toggle":e.onRuntimePreviewToggle}},"Section",t,!1))})),1)},qs=[],Rs=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("LinkableSection",{staticClass:"section",attrs:{anchor:e.anchor,title:e.introProps.title}},[n("Intro",e._b({},"Intro",e.introProps,!1)),e.stepsSection.length>0?n("Steps",{attrs:{content:e.stepsSection,isRuntimePreviewVisible:e.isRuntimePreviewVisible,sectionNumber:e.sectionNumber},on:{"runtime-preview-toggle":e.onRuntimePreviewToggle}}):e._e()],1)},Es=[],Vs=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"intro-container"},[n("Row",{class:["intro","intro-"+e.sectionNumber,{ide:e.isTargetIDE}]},[n("Column",{staticClass:"left"},[n("Headline",{attrs:{level:2}},[n("router-link",{attrs:{slot:"eyebrow",to:e.sectionLink},slot:"eyebrow"},[e._v(" Section "+e._s(e.sectionNumber)+" ")]),e._v(" "+e._s(e.title)+" ")],1),n("ContentNode",{attrs:{content:e.content}})],1),n("Column",{staticClass:"right"},[n("div",{staticClass:"media"},[e.media?n("Asset",{attrs:{identifier:e.media,showsReplayButton:!e.isClientMobile,showsVideoControls:e.isClientMobile,videoAutoplays:!e.isClientMobile}}):e._e()],1)])],1),e.expandedSections.length>0?n("ExpandedIntro",{staticClass:"expanded-intro",attrs:{content:e.expandedSections}}):e._e()],1)},Ls=[],Fs={name:"SectionIntro",inject:{isClientMobile:{default:()=>!1},isTargetIDE:{default:()=>!1}},components:{Asset:Te["a"],ContentNode:$e["a"],ExpandedIntro:ct,Headline:Qt,Row:Ct["a"],Column:{render(e){return e(wt["a"],{props:{span:{large:6,small:12}}},this.$slots.default)}}},props:{sectionAnchor:{type:String,required:!0},content:{type:Array,required:!0},media:{type:String,required:!0},title:{type:String,required:!0},sectionNumber:{type:Number,required:!0},expandedSections:{type:Array,default:()=>[]}},methods:{focus(){this.$emit("focus",this.media)}},computed:{sectionLink(){return{path:this.$route.path,hash:this.sectionAnchor,query:this.$route.query}}}},zs=Fs,Us=(n("4896"),Object(w["a"])(zs,Vs,Ls,!1,null,"54daa228",null)),Hs=Us.exports,Gs=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"steps"},[n("div",{staticClass:"content-container"},e._l(e.contentNodes,(function(t,s){return n(t.component,e._b({key:s,ref:"contentNodes",refInFor:!0,tag:"component",class:e.contentClass(s),attrs:{currentIndex:e.activeStep}},"component",t.props,!1))})),1),e.isBreakpointSmall?e._e():n("BackgroundTheme",{staticClass:"asset-container",class:e.assetContainerClasses},[n("transition",{attrs:{name:"fade"}},[e.visibleAsset.media?n("div",{key:e.visibleAsset.media,class:["asset-wrapper",{ide:e.isTargetIDE}]},[n("Asset",{ref:"asset",staticClass:"step-asset",attrs:{identifier:e.visibleAsset.media,showsReplayButton:"",showsVideoControls:!1}})],1):e._e(),e.visibleAsset.code?n("CodePreview",{attrs:{code:e.visibleAsset.code,preview:e.visibleAsset.runtimePreview,isRuntimePreviewVisible:e.isRuntimePreviewVisible},on:{"runtime-preview-toggle":e.onRuntimePreviewToggle}},[e.visibleAsset.runtimePreview?n("transition",{attrs:{name:"fade"}},[n("Asset",{key:e.visibleAsset.runtimePreview,attrs:{identifier:e.visibleAsset.runtimePreview}})],1):e._e()],1):e._e()],1)],1)],1)},Ws=[],Qs=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{class:["code-preview",{ide:e.isTargetIDE}]},[n("CodeTheme",[e.code?n("CodeListing",e._b({attrs:{showLineNumbers:""}},"CodeListing",e.codeProps,!1)):e._e()],1),n("div",{staticClass:"runtime-preview",class:e.runtimePreviewClasses,style:e.previewStyles},[n("div",{staticClass:"runtimve-preview__container"},[n("button",{staticClass:"header",attrs:{disabled:!e.hasRuntimePreview,title:e.runtimePreviewTitle},on:{click:e.togglePreview}},[n("span",{staticClass:"runtime-preview-label",attrs:{"aria-label":e.textAriaLabel}},[e._v(e._s(e.togglePreviewText))]),n("DiagonalArrowIcon",{staticClass:"icon-inline preview-icon",class:[e.shouldDisplayHideLabel?"preview-hide":"preview-show"]})],1),n("transition",{on:{leave:e.handleLeave}},[n("div",{directives:[{name:"show",rawName:"v-show",value:e.shouldDisplayHideLabel,expression:"shouldDisplayHideLabel"}],staticClass:"runtime-preview-asset"},[e._t("default")],2)])],1)])],1)},Ks=[],Xs=n("7b69"),Js=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("SVGIcon",{staticClass:"diagonal-arrow",attrs:{viewBox:"0 0 14 14"}},[n("path",{attrs:{d:"M0.010 12.881l10.429-10.477-3.764 0.824-0.339-1.549 7.653-1.679-1.717 7.622-1.546-0.349 0.847-3.759-10.442 10.487z"}})])},Ys=[],Zs={name:"DiagonalArrowIcon",components:{SVGIcon:y["a"]}},ei=Zs,ti=Object(w["a"])(ei,Js,Ys,!1,null,null,null),ni=ti.exports,si=n("8590");const{BreakpointName:ii}=o["a"].constants;function ri({width:e,height:t},n=1){const s=400,i=e<=s?1.75:3;return{width:e/(i/n),height:t/(i/n)}}var oi={name:"CodePreview",inject:["references","isTargetIDE","store"],components:{DiagonalArrowIcon:ni,CodeListing:Xs["a"],CodeTheme:si["a"]},props:{code:{type:String,required:!0},preview:{type:String,required:!1},isRuntimePreviewVisible:{type:Boolean,required:!0}},data(){return{tutorialState:this.store.state}},computed:{currentBreakpoint(){return this.tutorialState.breakpoint},hasRuntimePreview(){return!!this.preview},previewAssetSize(){const e=this.hasRuntimePreview?this.references[this.preview]:{},t=(e.variants||[{}])[0]||{},n={width:900};let s=t.size||{};s.width||s.height||(s=n);const i=this.currentBreakpoint===ii.medium?.8:1;return ri(s,i)},previewSize(){const e={width:102};return this.shouldDisplayHideLabel&&this.previewAssetSize?{width:this.previewAssetSize.width}:e},previewStyles(){const{width:e}=this.previewSize;return{width:e+"px"}},codeProps(){return this.references[this.code]},runtimePreviewClasses(){return{collapsed:!this.shouldDisplayHideLabel,disabled:!this.hasRuntimePreview,"runtime-preview-ide":this.isTargetIDE}},shouldDisplayHideLabel(){return this.hasRuntimePreview&&this.isRuntimePreviewVisible},runtimePreviewTitle(){return this.hasRuntimePreview?null:"No preview available for this step."},togglePreviewText(){return this.hasRuntimePreview?"Preview":"No Preview"},textAriaLabel:({shouldDisplayHideLabel:e,togglePreviewText:t})=>`${t}, ${e?"Hide":"Show"}`},methods:{handleLeave(e,t){setTimeout(t,200)},togglePreview(){this.hasRuntimePreview&&this.$emit("runtime-preview-toggle",!this.isRuntimePreviewVisible)}}},ai=oi,li=(n("5053"),Object(w["a"])(ai,Qs,Ks,!1,null,"9acc0234",null)),ci=li.exports,ui=n("3908"),di=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{style:e.backgroundStyle},[e._t("default")],2)},pi=[],hi={name:"BackgroundTheme",data(){return{codeThemeState:Ds["a"].state}},computed:{backgroundStyle(){const{codeColors:e}=this.codeThemeState;return e?{"--background":e.background}:null}}},mi=hi,fi=Object(w["a"])(mi,di,pi,!1,null,null,null),vi=fi.exports,gi=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{class:["step-container","step-"+e.stepNumber]},[n("div",{ref:"step",staticClass:"step",class:{focused:e.isActive},attrs:{"data-index":e.index}},[n("p",{staticClass:"step-label"},[e._v("Step "+e._s(e.stepNumber))]),n("ContentNode",{attrs:{content:e.content}}),e.caption&&e.caption.length>0?n("ContentNode",{staticClass:"caption",attrs:{content:e.caption}}):e._e()],1),e.isBreakpointSmall||!e.isTargetIDE?n("div",{staticClass:"media-container"},[e.media?n("Asset",{attrs:{identifier:e.media,showsReplayButton:!e.isClientMobile,showsVideoControls:e.isClientMobile,videoAutoplays:!e.isClientMobile}}):e._e(),e.code?n("MobileCodePreview",{attrs:{code:e.code}},[e.runtimePreview?n("Asset",{staticClass:"preview",attrs:{identifier:e.runtimePreview}}):e._e()],1):e._e()],1):e._e()])},yi=[],bi=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("BackgroundTheme",{staticClass:"mobile-code-preview"},[e.code?n("GenericModal",{staticClass:"full-code-listing-modal",attrs:{theme:e.isTargetIDE?"code":"light",codeBackgroundColorOverride:e.modalBackgroundColor,isFullscreen:"",visible:e.fullCodeIsVisible},on:{"update:visible":function(t){e.fullCodeIsVisible=t}}},[n("div",{staticClass:"full-code-listing-modal-content"},[n("CodeTheme",[n("CodeListing",e._b({staticClass:"full-code-listing",attrs:{showLineNumbers:""}},"CodeListing",e.codeProps,!1))],1)],1)]):e._e(),n("CodeTheme",[e.code?n("MobileCodeListing",e._b({attrs:{showLineNumbers:""},on:{"file-name-click":e.toggleFullCode}},"MobileCodeListing",e.codeProps,!1)):e._e()],1),n("CodeTheme",{staticClass:"preview-toggle-container"},[n("PreviewToggle",{attrs:{isActionable:!!e.$slots.default},on:{click:e.togglePreview}})],1),e.$slots.default?n("GenericModal",{staticClass:"runtime-preview-modal",attrs:{theme:e.isTargetIDE?"dynamic":"light",isFullscreen:"",visible:e.previewIsVisible},on:{"update:visible":function(t){e.previewIsVisible=t}}},[n("div",{staticClass:"runtime-preview-modal-content"},[n("span",{staticClass:"runtime-preview-label"},[e._v("Preview")]),e._t("default")],2)]):e._e()],1)},Ci=[],wi=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"code-listing-preview",attrs:{"data-syntax":e.syntax}},[n("CodeListing",{attrs:{fileName:e.fileName,syntax:e.syntax,fileType:e.fileType,content:e.previewedLines,startLineNumber:e.displayedRange.start,highlights:e.highlights,showLineNumbers:"",isFileNameActionable:""},on:{"file-name-click":function(t){return e.$emit("file-name-click")}}})],1)},_i=[],Si={name:"MobileCodeListing",components:{CodeListing:Xs["a"]},props:{fileName:String,syntax:String,fileType:String,content:{type:Array,required:!0},highlights:{type:Array,default:()=>[]}},computed:{highlightedLineNumbers(){return new Set(this.highlights.map(({line:e})=>e))},firstHighlightRange(){if(0===this.highlightedLineNumbers.size)return{start:1,end:this.content.length};const e=Math.min(...this.highlightedLineNumbers.values());let t=e;while(this.highlightedLineNumbers.has(t+1))t+=1;return{start:e,end:t}},displayedRange(){const e=this.firstHighlightRange,t=e.start-2<1?1:e.start-2,n=e.end+3>=this.content.length+1?this.content.length+1:e.end+3;return{start:t,end:n}},previewedLines(){return this.content.slice(this.displayedRange.start-1,this.displayedRange.end-1)}}},ki=Si,xi=(n("fae5"),Object(w["a"])(ki,wi,_i,!1,null,"5ad4e037",null)),Ti=xi.exports,Ai=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("span",{staticClass:"toggle-preview"},[e.isActionable?n("a",{staticClass:"toggle-text",attrs:{href:"#"},on:{click:function(t){return t.preventDefault(),e.$emit("click")}}},[e._v(" Preview "),n("InlinePlusCircleIcon",{staticClass:"toggle-icon icon-inline"})],1):n("span",{staticClass:"toggle-text"},[e._v(" No preview ")])])},Ii=[],$i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("SVGIcon",{staticClass:"inline-plus-circle-icon",attrs:{viewBox:"0 0 14 14"}},[n("path",{attrs:{d:"M7 0.5c3.59 0 6.5 2.91 6.5 6.5s-2.91 6.5-6.5 6.5c-3.59 0-6.5-2.91-6.5-6.5v0c0-3.59 2.91-6.5 6.5-6.5v0zM7 1.5c-3.038 0-5.5 2.462-5.5 5.5s2.462 5.5 5.5 5.5c3.038 0 5.5-2.462 5.5-5.5v0c0-3.038-2.462-5.5-5.5-5.5v0z"}}),n("path",{attrs:{d:"M4 6.52h6v1h-6v-1z"}}),n("path",{attrs:{d:"M6.5 4.010h1v6h-1v-6z"}})])},Oi=[],Pi={name:"InlinePlusCircleIcon",components:{SVGIcon:y["a"]}},ji=Pi,Ni=Object(w["a"])(ji,$i,Oi,!1,null,null,null),Di=Ni.exports,Bi={name:"MobileCodePreviewToggle",components:{InlinePlusCircleIcon:Di},props:{isActionable:{type:Boolean,required:!0}}},Mi=Bi,qi=(n("e97b"),Object(w["a"])(Mi,Ai,Ii,!1,null,"d0709828",null)),Ri=qi.exports,Ei={name:"MobileCodePreview",inject:["references","isTargetIDE","store"],components:{GenericModal:dn,CodeListing:Xs["a"],MobileCodeListing:Ti,PreviewToggle:Ri,CodeTheme:si["a"],BackgroundTheme:vi},props:{code:{type:String,required:!0}},computed:{codeProps(){return this.references[this.code]},modalBackgroundColor(){const{codeColors:e}=this.store.state;return e?e.background:null}},data(){return{previewIsVisible:!1,fullCodeIsVisible:!1}},methods:{togglePreview(){this.previewIsVisible=!this.previewIsVisible},toggleFullCode(){this.fullCodeIsVisible=!this.fullCodeIsVisible}}},Vi=Ei,Li=(n("4d5c"),Object(w["a"])(Vi,bi,Ci,!1,null,"3bee1128",null)),Fi=Li.exports;const{BreakpointName:zi}=o["a"].constants;var Ui={name:"Step",components:{Asset:Te["a"],MobileCodePreview:Fi,ContentNode:$e["a"]},inject:["isTargetIDE","isClientMobile","store"],props:{code:{type:String,required:!1},content:{type:Array,required:!0},caption:{type:Array,required:!1},media:{type:String,required:!1},runtimePreview:{type:String,required:!1},sectionNumber:{type:Number,required:!0},stepNumber:{type:Number,required:!0},numberOfSteps:{type:Number,required:!0},index:{type:Number,required:!0},currentIndex:{type:Number,required:!0}},data(){return{tutorialState:this.store.state}},computed:{isBreakpointSmall(){return this.tutorialState.breakpoint===zi.small},isActive:({index:e,currentIndex:t})=>e===t}},Hi=Ui,Gi=(n("bc03"),Object(w["a"])(Hi,gi,yi,!1,null,"4abdd121",null)),Wi=Gi.exports;const{BreakpointName:Qi}=o["a"].constants,{IntersectionDirections:Ki}=Ke["a"].constants,Xi="-35% 0% -65% 0%";var Ji={name:"SectionSteps",components:{ContentNode:$e["a"],Step:Wi,Asset:Te["a"],CodePreview:ci,BackgroundTheme:vi},mixins:[Ke["a"]],constants:{IntersectionMargins:Xi},inject:["isTargetIDE","store"],data(){const e=this.content.findIndex(this.isStepNode),{code:t,media:n,runtimePreview:s}=this.content[e]||{};return{tutorialState:this.store.state,visibleAsset:{media:n,code:t,runtimePreview:s},activeStep:e}},computed:{assetContainerClasses(){return{"for-step-code":!!this.visibleAsset.code,ide:this.isTargetIDE}},numberOfSteps(){return this.content.filter(this.isStepNode).length},contentNodes(){return this.content.reduce(({stepCounter:e,nodes:t},n,s)=>{const{type:i,...r}=n,o=this.isStepNode(n),a=o?e+1:e;return o?{stepCounter:e+1,nodes:t.concat({component:Wi,type:i,props:{...r,stepNumber:a,index:s,numberOfSteps:this.numberOfSteps,sectionNumber:this.sectionNumber}})}:{stepCounter:e,nodes:t.concat({component:$e["a"],type:i,props:{content:[n]}})}},{stepCounter:0,nodes:[]}).nodes},isBreakpointSmall(){return this.tutorialState.breakpoint===Qi.small},stepNodes:({contentNodes:e,isStepNode:t})=>e.filter(t),intersectionRootMargin:()=>Xi},async mounted(){await Object(ui["b"])(8),this.findClosestStepNode()},methods:{isStepNode({type:e}){return"step"===e},contentClass(e){return{["interstitial interstitial-"+(e+1)]:!this.isStepNode(this.content[e])}},onReverseIntoLastStep(){const{asset:e}=this.$refs;if(e){const t=e.$el.querySelector("video");t&&(t.currentTime=0,t.play().catch(()=>{}))}},onFocus(e){const{code:t,media:n,runtimePreview:s}=this.content[e];this.activeStep=e,this.visibleAsset={code:t,media:n,runtimePreview:s}},onRuntimePreviewToggle(e){this.$emit("runtime-preview-toggle",e)},findClosestStepNode(){const e=.333*window.innerHeight;let t=null,n=0;this.stepNodes.forEach(s=>{const{index:i}=s.props,r=this.$refs.contentNodes[i].$refs.step;if(!r)return;const{top:o,bottom:a}=r.getBoundingClientRect(),l=o-e,c=a-e,u=Math.abs(l+c);(0===n||u<=n)&&(n=u,t=i)}),null!==t&&this.onFocus(t)},getIntersectionTargets(){const{stepNodes:e,$refs:t}=this;return e.map(({props:{index:e}})=>t.contentNodes[e].$refs.step)},onIntersect(e){const{target:t,isIntersecting:n}=e;if(!n)return;const s=parseFloat(t.getAttribute("data-index"));this.intersectionScrollDirection===Ki.down&&s===this.stepNodes[this.stepNodes.length-1].props.index&&this.onReverseIntoLastStep(),this.onFocus(s)}},props:{content:{type:Array,required:!0},isRuntimePreviewVisible:{type:Boolean,require:!0},sectionNumber:{type:Number,required:!0}}},Yi=Ji,Zi=(n("00f4"),Object(w["a"])(Yi,Gs,Ws,!1,null,"25d30c2c",null)),er=Zi.exports,tr={name:"Section",components:{Intro:Hs,LinkableSection:Ze,Steps:er},computed:{introProps(){const[{content:e,media:t},...n]=this.contentSection;return{content:e,expandedSections:n,media:t,sectionAnchor:this.anchor,sectionNumber:this.sectionNumber,title:this.title}}},props:{anchor:{type:String,required:!0},title:{type:String,required:!0},contentSection:{type:Array,required:!0},stepsSection:{type:Array,required:!0},sectionNumber:{type:Number,required:!0},isRuntimePreviewVisible:{type:Boolean,required:!0}},methods:{onRuntimePreviewToggle(e){this.$emit("runtime-preview-toggle",e)}}},nr=tr,sr=(n("9dc4"),Object(w["a"])(nr,Rs,Es,!1,null,"6b3a0b3a",null)),ir=sr.exports,rr={name:"SectionList",components:{Section:ir},data(){return{isRuntimePreviewVisible:!0}},props:{tasks:{type:Array,required:!0}},methods:{onRuntimePreviewToggle(e){this.isRuntimePreviewVisible=e}}},or=rr,ar=(n("4d07"),Object(w["a"])(or,Ms,qs,!1,null,"79a75e9e",null)),lr=ar.exports;const cr={assessments:_s,hero:qn,tasks:lr,callToAction:Ot},ur=new Set(Object.keys(cr)),dr={name:"TutorialSection",render:function(e){const{kind:t,...n}=this.section,s=cr[t];return s?e(s,{props:n}):null},props:{section:{type:Object,required:!0,validator:e=>ur.has(e.kind)}}};var pr={name:"Tutorial",mixins:[be["a"],Bs],components:{NavigationBar:ye,Section:dr,PortalTarget:h["PortalTarget"],BreakpointEmitter:o["a"]},inject:["isTargetIDE","store"],computed:{heroSection(){return this.sections.find(({kind:e})=>"hero"===e)},tutorialTitle(){return(this.heroSection||{}).title},pageTitle(){return this.tutorialTitle?`${this.tutorialTitle} — ${this.metadata.category} Tutorials`:void 0},pageDescription:({heroSection:e,extractFirstParagraphText:t})=>e?t(e.content):null},props:{sections:{type:Array,required:!0},references:{type:Object,required:!0},hierarchy:{type:Object,required:!0},metadata:{type:Object,required:!0},identifierUrl:{type:String,required:!0}},methods:{handleBreakpointChange(e){this.store.updateBreakpoint(e)},handleCodeColorsChange(e){Ds["a"].updateCodeColors(e)}},created(){this.store.reset()},mounted(){this.$bridge.on("codeColors",this.handleCodeColorsChange),this.$bridge.send({type:"requestCodeColors"})},provide(){return{references:this.references,isClientMobile:this.isClientMobile}},beforeDestroy(){this.$bridge.off("codeColors",this.handleCodeColorsChange)}},hr=pr,mr=(n("1a91"),Object(w["a"])(hr,js,Ns,!1,null,"0f871b08",null)),fr=mr.exports,vr=n("bb52"),gr=n("146e");const yr={article:"article",tutorial:"project"};var br={name:"Topic",inject:{isTargetIDE:{default:!1}},mixins:[vr["a"],gr["a"]],data(){return{topicData:null}},computed:{navigationBarHeight(){return this.isTargetIDE?0:52},store(){return u},hierarchy(){const{hierarchy:e={}}=this.topicData,{technologyNavigation:t=["overview","tutorials","resources"]}=e||{};return{...e,technologyNavigation:t}},topicKey:({$route:e,topicData:t})=>[e.path,t.identifier.interfaceLanguage].join()},beforeRouteEnter(e,t,n){Object(r["b"])(e,t,n).then(e=>n(t=>{t.topicData=e})).catch(n)},beforeRouteUpdate(e,t,n){Object(r["d"])(e,t)?Object(r["b"])(e,t,n).then(e=>{this.topicData=e,n()}).catch(n):n()},created(){this.store.reset()},mounted(){this.$bridge.on("contentUpdate",e=>{this.topicData=e})},methods:{componentFor(e){const{kind:t}=e;return{[yr.article]:Ps,[yr.tutorial]:fr}[t]},propsFor(e){const{hierarchy:t,kind:n,metadata:s,references:i,sections:r,identifier:o}=e;return{[yr.article]:{hierarchy:t,metadata:s,references:i,sections:r,identifierUrl:o.url},[yr.tutorial]:{hierarchy:t,metadata:s,references:i,sections:r,identifierUrl:o.url}}[n]}},provide(){return{navigationBarHeight:this.navigationBarHeight,store:this.store}},watch:{topicData(){this.$nextTick(()=>{this.newContentMounted()})}}},Cr=br,wr=Object(w["a"])(Cr,s,i,!1,null,null,null);t["default"]=wr.exports},"323a":function(e,t,n){"use strict";n("0b61")},"32b1":function(e,t,n){},"385e":function(e,t,n){},"3a78":function(e,t,n){"use strict";n("90d1")},"3c4b":function(e,t,n){"use strict";n("1aae")},"3e1b":function(e,t,n){"use strict";n("c5c1")},4896:function(e,t,n){"use strict";n("fa9c")},"4b4a":function(e,t,n){},"4d07":function(e,t,n){"use strict";n("b52e")},"4d5c":function(e,t,n){"use strict";n("7730")},"4eea":function(e,t,n){},5053:function(e,t,n){"use strict";n("61a8")},5237:function(e,t,n){"use strict";n("4b4a")},5241:function(e,t,n){"use strict";n("2b86")},"525c":function(e,t,n){},5356:function(e,t,n){"use strict";n("7e3c")},"53b5":function(e,t,n){"use strict";n("a662")},5913:function(e,t,n){},5952:function(e,t,n){"use strict";n("14b7")},"5c7b":function(e,t,n){"use strict";n("311e")},"5da4":function(e,t,n){},"61a8":function(e,t,n){},"63a8":function(e,t,n){},"653a":function(e,t,n){"use strict";var s=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("router-link",{staticClass:"nav-title-content",attrs:{to:e.to}},[n("span",{staticClass:"title"},[e._t("default")],2),n("span",{staticClass:"subhead"},[e._v(" "),e._t("subhead")],2)])},i=[],r={name:"NavTitleContainer",props:{to:{type:[String,Object],required:!0}}},o=r,a=(n("a497"),n("2877")),l=Object(a["a"])(o,s,i,!1,null,"60ea3af8",null);t["a"]=l.exports},"66c9":function(e,t,n){"use strict";t["a"]={state:{codeColors:null},reset(){this.state.codeColors=null},updateCodeColors(e){const t=e=>e?`rgba(${e.red}, ${e.green}, ${e.blue}, ${e.alpha})`:null;this.state.codeColors=Object.entries(e).reduce((e,[n,s])=>({...e,[n]:t(s)}),{})}}},7096:function(e,t,n){},7730:function(e,t,n){},7839:function(e,t,n){"use strict";n("385e")},7948:function(e,t,n){"use strict";var s=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("SVGIcon",{staticClass:"inline-chevron-down-icon",attrs:{viewBox:"0 0 14 14"}},[n("path",{attrs:{d:"M12.634 2.964l0.76 0.649-6.343 7.426-6.445-7.423 0.755-0.655 5.683 6.545 5.59-6.542z"}})])},i=[],r=n("be08"),o={name:"InlineChevronDownIcon",components:{SVGIcon:r["a"]}},a=o,l=n("2877"),c=Object(l["a"])(a,s,i,!1,null,null,null);t["a"]=c.exports},"7b17":function(e,t,n){},"7e3c":function(e,t,n){},8016:function(e,t,n){"use strict";n("ce7d")},"80e4":function(e,t,n){"use strict";var s=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"asset"},[n(e.assetComponent,e._g(e._b({tag:"component"},"component",e.assetProps,!1),e.assetListeners))],1)},i=[],r=n("8bd9"),o=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("video",{attrs:{controls:e.showsControls,autoplay:e.autoplays,poster:e.normalizeAssetUrl(e.defaultPosterAttributes.url),muted:"",playsinline:""},domProps:{muted:!0},on:{playing:function(t){return e.$emit("playing")},ended:function(t){return e.$emit("ended")}}},[n("source",{attrs:{src:e.normalizeAssetUrl(e.videoAttributes.url)}})])},a=[],l=n("748c"),c=n("e425"),u=n("821b"),d={name:"VideoAsset",props:{variants:{type:Array,required:!0},showsControls:{type:Boolean,default:()=>!0},autoplays:{type:Boolean,default:()=>!0},posterVariants:{type:Array,required:!1,default:()=>[]}},data:()=>({appState:c["a"].state}),computed:{preferredColorScheme:({appState:e})=>e.preferredColorScheme,systemColorScheme:({appState:e})=>e.systemColorScheme,userPrefersDark:({preferredColorScheme:e,systemColorScheme:t})=>e===u["a"].dark.value||e===u["a"].auto.value&&t===u["a"].dark.value,shouldShowDarkVariant:({darkVideoVariantAttributes:e,userPrefersDark:t})=>e&&t,defaultVideoAttributes(){return this.videoVariantsGroupedByAppearance.light[0]||this.darkVideoVariantAttributes||{}},darkVideoVariantAttributes(){return this.videoVariantsGroupedByAppearance.dark[0]},videoVariantsGroupedByAppearance(){return Object(l["d"])(this.variants)},posterVariantsGroupedByAppearance(){return Object(l["d"])(this.posterVariants)},defaultPosterAttributes:({posterVariantsGroupedByAppearance:e,userPrefersDark:t})=>t&&e.dark.length?e.dark[0]:e.light[0]||{},videoAttributes:({darkVideoVariantAttributes:e,defaultVideoAttributes:t,shouldShowDarkVariant:n})=>n?e:t},methods:{normalizeAssetUrl:l["b"]}},p=d,h=n("2877"),m=Object(h["a"])(p,o,a,!1,null,null,null),f=m.exports,v=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"video-replay-container"},[n("VideoAsset",{ref:"asset",attrs:{variants:e.variants,showsControls:e.showsControls,autoplays:e.autoplays},on:{ended:e.onVideoEnd}}),n("a",{staticClass:"replay-button",class:{visible:this.showsReplayButton},attrs:{href:"#"},on:{click:function(t){return t.preventDefault(),e.replay.apply(null,arguments)}}},[e._v(" Replay "),n("InlineReplayIcon",{staticClass:"replay-icon icon-inline"})],1)],1)},g=[],y=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("SVGIcon",{staticClass:"inline-replay-icon",attrs:{viewBox:"0 0 14 14"}},[n("path",{attrs:{d:"M2.254 10.201c-1.633-2.613-0.838-6.056 1.775-7.689 2.551-1.594 5.892-0.875 7.569 1.592l0.12 0.184-0.848 0.53c-1.34-2.145-4.166-2.797-6.311-1.457s-2.797 4.166-1.457 6.311 4.166 2.797 6.311 1.457c1.006-0.629 1.71-1.603 2.003-2.723l0.056-0.242 0.98 0.201c-0.305 1.487-1.197 2.792-2.51 3.612-2.613 1.633-6.056 0.838-7.689-1.775z"}}),n("path",{attrs:{d:"M10.76 1.355l0.984-0.18 0.851 4.651-4.56-1.196 0.254-0.967 3.040 0.796z"}})])},b=[],C=n("be08"),w={name:"InlineReplayIcon",components:{SVGIcon:C["a"]}},_=w,S=Object(h["a"])(_,y,b,!1,null,null,null),k=S.exports,x={name:"ReplayableVideoAsset",components:{InlineReplayIcon:k,VideoAsset:f},props:{variants:{type:Array,required:!0},showsControls:{type:Boolean,default:()=>!0},autoplays:{type:Boolean,default:()=>!0}},data(){return{showsReplayButton:!1}},methods:{async replay(){const e=this.$refs.asset.$el;e&&(await e.play(),this.showsReplayButton=!1)},onVideoEnd(){this.showsReplayButton=!0}}},T=x,A=(n("dffc"),Object(h["a"])(T,v,g,!1,null,"59608016",null)),I=A.exports;const $={video:"video",image:"image"};var O={name:"Asset",components:{ImageAsset:r["a"],VideoAsset:f},constants:{AssetTypes:$},inject:["references"],props:{identifier:{type:String,required:!0},showsReplayButton:{type:Boolean,default:()=>!1},showsVideoControls:{type:Boolean,default:()=>!0},videoAutoplays:{type:Boolean,default:()=>!0}},computed:{rawAsset(){return this.references[this.identifier]||{}},isRawAssetVideo:({rawAsset:e})=>e.type===$.video,videoPoster(){return this.isRawAssetVideo&&this.references[this.rawAsset.poster]},asset(){return this.isRawAssetVideo&&this.prefersReducedMotion&&this.videoPoster||this.rawAsset},assetComponent(){switch(this.asset.type){case $.image:return r["a"];case $.video:return this.showsReplayButton?I:f;default:return}},prefersReducedMotion(){return window.matchMedia("(prefers-reduced-motion)").matches},assetProps(){return{[$.image]:this.imageProps,[$.video]:this.videoProps}[this.asset.type]},imageProps(){return{alt:this.asset.alt,variants:this.asset.variants}},videoProps(){return{variants:this.asset.variants,showsControls:this.showsVideoControls,autoplays:!this.prefersReducedMotion&&this.videoAutoplays,posterVariants:this.videoPoster?this.videoPoster.variants:[]}},assetListeners(){return{[$.image]:null,[$.video]:{ended:()=>this.$emit("videoEnded")}}[this.asset.type]}}},P=O,j=(n("7839"),Object(h["a"])(P,s,i,!1,null,"1b5cc854",null));t["a"]=j.exports},"80f7":function(e,t,n){"use strict";n("4eea")},8590:function(e,t,n){"use strict";var s=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{style:e.codeStyle},[e._t("default")],2)},i=[],r=n("66c9");const o=0,a=255;function l(e){const t=e.match(/rgba\((\d+),\s*(\d+),\s*(\d+),\s*(\d+\.?\d*|\.\d+)\s*\)/);if(!t)throw new Error("invalid rgba() input");const n=10;return{r:parseInt(t[1],n),g:parseInt(t[2],n),b:parseInt(t[3],n),a:parseFloat(t[4])}}function c(e){const{r:t,g:n,b:s}=l(e);return.2126*t+.7152*n+.0722*s}function u(e,t){const n=Math.round(a*t),s=l(e),{a:i}=s,[r,c,u]=[s.r,s.g,s.b].map(e=>Math.max(o,Math.min(a,e+n)));return`rgba(${r}, ${c}, ${u}, ${i})`}function d(e,t){return u(e,t)}function p(e,t){return u(e,-1*t)}var h={name:"CodeTheme",data(){return{codeThemeState:r["a"].state}},computed:{codeStyle(){const{codeColors:e}=this.codeThemeState;return e?{"--text":e.text,"--background":e.background,"--line-highlight":e.lineHighlight,"--url":e.commentURL,"--syntax-comment":e.comment,"--syntax-quote":e.comment,"--syntax-keyword":e.keyword,"--syntax-literal":e.keyword,"--syntax-selector-tag":e.keyword,"--syntax-string":e.stringLiteral,"--syntax-bullet":e.stringLiteral,"--syntax-meta":e.keyword,"--syntax-number":e.stringLiteral,"--syntax-symbol":e.stringLiteral,"--syntax-tag":e.stringLiteral,"--syntax-attr":e.typeAnnotation,"--syntax-built_in":e.typeAnnotation,"--syntax-builtin-name":e.typeAnnotation,"--syntax-class":e.typeAnnotation,"--syntax-params":e.typeAnnotation,"--syntax-section":e.typeAnnotation,"--syntax-title":e.typeAnnotation,"--syntax-type":e.typeAnnotation,"--syntax-attribute":e.keyword,"--syntax-identifier":e.text,"--syntax-subst":e.text,"--color-syntax-param-internal-name":this.internalParamNameColor}:null},internalParamNameColor(){const{background:e,text:t}=this.codeThemeState.codeColors;try{const n=c(e),s=n!0},autoplays:{type:Boolean,default:()=>!0},posterVariants:{type:Array,required:!1,default:()=>[]}},data:()=>({appState:l["a"].state}),computed:{preferredColorScheme:({appState:t})=>t.preferredColorScheme,systemColorScheme:({appState:t})=>t.systemColorScheme,userPrefersDark:({preferredColorScheme:t,systemColorScheme:e})=>t===u["a"].dark.value||t===u["a"].auto.value&&e===u["a"].dark.value,shouldShowDarkVariant:({darkVideoVariantAttributes:t,userPrefersDark:e})=>t&&e,defaultVideoAttributes(){return this.videoVariantsGroupedByAppearance.light[0]||this.darkVideoVariantAttributes||{}},darkVideoVariantAttributes(){return this.videoVariantsGroupedByAppearance.dark[0]},videoVariantsGroupedByAppearance(){return Object(c["d"])(this.variants)},posterVariantsGroupedByAppearance(){return Object(c["d"])(this.posterVariants)},defaultPosterAttributes:({posterVariantsGroupedByAppearance:t,userPrefersDark:e})=>e&&t.dark.length?t.dark[0]:t.light[0]||{},videoAttributes:({darkVideoVariantAttributes:t,defaultVideoAttributes:e,shouldShowDarkVariant:n})=>n?t:e},methods:{normalizeAssetUrl:c["b"]}},p=d,m=n("2877"),h=Object(m["a"])(p,o,r,!1,null,null,null),v=h.exports,f=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"video-replay-container"},[n("VideoAsset",{ref:"asset",attrs:{variants:t.variants,showsControls:t.showsControls,autoplays:t.autoplays},on:{ended:t.onVideoEnd}}),n("a",{staticClass:"replay-button",class:{visible:this.showsReplayButton},attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.replay.apply(null,arguments)}}},[t._v(" Replay "),n("InlineReplayIcon",{staticClass:"replay-icon icon-inline"})],1)],1)},y=[],b=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("SVGIcon",{staticClass:"inline-replay-icon",attrs:{viewBox:"0 0 14 14"}},[n("path",{attrs:{d:"M2.254 10.201c-1.633-2.613-0.838-6.056 1.775-7.689 2.551-1.594 5.892-0.875 7.569 1.592l0.12 0.184-0.848 0.53c-1.34-2.145-4.166-2.797-6.311-1.457s-2.797 4.166-1.457 6.311 4.166 2.797 6.311 1.457c1.006-0.629 1.71-1.603 2.003-2.723l0.056-0.242 0.98 0.201c-0.305 1.487-1.197 2.792-2.51 3.612-2.613 1.633-6.056 0.838-7.689-1.775z"}}),n("path",{attrs:{d:"M10.76 1.355l0.984-0.18 0.851 4.651-4.56-1.196 0.254-0.967 3.040 0.796z"}})])},C=[],_=n("be08"),g={name:"InlineReplayIcon",components:{SVGIcon:_["a"]}},V=g,S=Object(m["a"])(V,b,C,!1,null,null,null),A=S.exports,T={name:"ReplayableVideoAsset",components:{InlineReplayIcon:A,VideoAsset:v},props:{variants:{type:Array,required:!0},showsControls:{type:Boolean,default:()=>!0},autoplays:{type:Boolean,default:()=>!0}},data(){return{showsReplayButton:!1}},methods:{async replay(){const t=this.$refs.asset.$el;t&&(await t.play(),this.showsReplayButton=!1)},onVideoEnd(){this.showsReplayButton=!0}}},w=T,k=(n("dffc"),Object(m["a"])(w,f,y,!1,null,"59608016",null)),I=k.exports;const x={video:"video",image:"image"};var O={name:"Asset",components:{ImageAsset:i["a"],VideoAsset:v},constants:{AssetTypes:x},inject:["references"],props:{identifier:{type:String,required:!0},showsReplayButton:{type:Boolean,default:()=>!1},showsVideoControls:{type:Boolean,default:()=>!0},videoAutoplays:{type:Boolean,default:()=>!0}},computed:{rawAsset(){return this.references[this.identifier]||{}},isRawAssetVideo:({rawAsset:t})=>t.type===x.video,videoPoster(){return this.isRawAssetVideo&&this.references[this.rawAsset.poster]},asset(){return this.isRawAssetVideo&&this.prefersReducedMotion&&this.videoPoster||this.rawAsset},assetComponent(){switch(this.asset.type){case x.image:return i["a"];case x.video:return this.showsReplayButton?I:v;default:return}},prefersReducedMotion(){return window.matchMedia("(prefers-reduced-motion)").matches},assetProps(){return{[x.image]:this.imageProps,[x.video]:this.videoProps}[this.asset.type]},imageProps(){return{alt:this.asset.alt,variants:this.asset.variants}},videoProps(){return{variants:this.asset.variants,showsControls:this.showsVideoControls,autoplays:!this.prefersReducedMotion&&this.videoAutoplays,posterVariants:this.videoPoster?this.videoPoster.variants:[]}},assetListeners(){return{[x.image]:null,[x.video]:{ended:()=>this.$emit("videoEnded")}}[this.asset.type]}}},j=O,N=(n("7839"),Object(m["a"])(j,s,a,!1,null,"1b5cc854",null));e["a"]=N.exports},"82d9":function(t,e,n){},"85fb":function(t,e,n){},"8d2d":function(t,e,n){"use strict";var s=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("SVGIcon",{staticClass:"tutorial-icon",attrs:{viewBox:"0 0 14 14"}},[n("path",{attrs:{d:"M0.933 6.067h3.733v1.867h-3.733v-1.867z"}}),n("path",{attrs:{d:"M0.933 1.867h3.733v1.867h-3.733v-1.867z"}}),n("path",{attrs:{d:"M13.067 1.867v10.267h-7.467v-10.267zM12.133 2.8h-5.6v8.4h5.6z"}}),n("path",{attrs:{d:"M0.933 10.267h3.733v1.867h-3.733v-1.867z"}})])},a=[],i=n("be08"),o={name:"TutorialIcon",components:{SVGIcon:i["a"]}},r=o,c=n("2877"),l=Object(c["a"])(r,s,a,!1,null,null,null);e["a"]=l.exports},"8f86":function(t,e,n){},"9b79":function(t,e,n){},"9f56":function(t,e,n){},a497:function(t,e,n){"use strict";n("da75")},a9f1:function(t,e,n){"use strict";var s=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("SVGIcon",{staticClass:"article-icon",attrs:{viewBox:"0 0 14 14"}},[n("path",{attrs:{d:"M8.033 1l3.967 4.015v7.985h-10v-12zM7.615 2h-4.615v10h8v-6.574z"}}),n("path",{attrs:{d:"M7 1h1v4h-1z"}}),n("path",{attrs:{d:"M7 5h5v1h-5z"}})])},a=[],i=n("be08"),o={name:"ArticleIcon",components:{SVGIcon:i["a"]}},r=o,c=n("2877"),l=Object(c["a"])(r,s,a,!1,null,null,null);e["a"]=l.exports},b185:function(t,e,n){},b9c2:function(t,e,n){},c4dd:function(t,e,n){"use strict";var s=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("SVGIcon",{staticClass:"play-icon",attrs:{viewBox:"0 0 14 14"}},[n("path",{attrs:{d:"M7 0.5c3.59 0 6.5 2.91 6.5 6.5s-2.91 6.5-6.5 6.5c-3.59 0-6.5-2.91-6.5-6.5v0c0-3.59 2.91-6.5 6.5-6.5v0zM7 1.5c-3.038 0-5.5 2.462-5.5 5.5s2.462 5.5 5.5 5.5c3.038 0 5.5-2.462 5.5-5.5v0c0-3.038-2.462-5.5-5.5-5.5v0z"}}),n("path",{attrs:{d:"M10.195 7.010l-5 3v-6l5 3z"}})])},a=[],i=n("be08"),o={name:"PlayIcon",components:{SVGIcon:i["a"]}},r=o,c=n("2877"),l=Object(c["a"])(r,s,a,!1,null,null,null);e["a"]=l.exports},c802:function(t,e,n){"use strict";n("f084")},d647:function(t,e,n){"use strict";n("b185")},da75:function(t,e,n){},dcb9:function(t,e,n){},de60:function(t,e,n){"use strict";var s=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("SVGIcon",{staticClass:"download-icon",attrs:{viewBox:"0 0 14 14"}},[n("path",{attrs:{d:"M7 0.5c3.59 0 6.5 2.91 6.5 6.5s-2.91 6.5-6.5 6.5c-3.59 0-6.5-2.91-6.5-6.5s2.91-6.5 6.5-6.5zM7 1.5c-3.038 0-5.5 2.462-5.5 5.5s2.462 5.5 5.5 5.5c3.038 0 5.5-2.462 5.5-5.5s-2.462-5.5-5.5-5.5z"}}),n("path",{attrs:{d:"M7.51 2.964l-0.001 5.431 1.308-2.041 0.842 0.539-2.664 4.162-2.633-4.164 0.845-0.534 1.303 2.059 0.001-5.452z"}})])},a=[],i=n("be08"),o={name:"DownloadIcon",components:{SVGIcon:i["a"]}},r=o,c=n("2877"),l=Object(c["a"])(r,s,a,!1,null,null,null);e["a"]=l.exports},dffc:function(t,e,n){"use strict";n("f3cd")},e929:function(t,e,n){"use strict";n("54b0")},ec73:function(t,e,n){},ee29:function(t,e,n){"use strict";n("b9c2")},f025:function(t,e,n){"use strict";n.r(e);var s,a,i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.topicData?n("Overview",t._b({key:t.topicKey},"Overview",t.overviewProps,!1)):t._e()},o=[],r=n("25a9"),c=n("bb52"),l=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"tutorials-overview"},[t.isTargetIDE?t._e():n("Nav",{staticClass:"theme-dark",attrs:{sections:t.otherSections}},[t._v(" "+t._s(t.title)+" ")]),n("main",{staticClass:"main",attrs:{id:"main",role:"main",tabindex:"0"}},[n("div",{staticClass:"radial-gradient"},[t._t("above-hero"),t.heroSection?n("Hero",{attrs:{action:t.heroSection.action,content:t.heroSection.content,estimatedTime:t.metadata.estimatedTime,image:t.heroSection.image,title:t.heroSection.title}}):t._e()],2),t.otherSections.length>0?n("LearningPath",{attrs:{sections:t.otherSections}}):t._e()],1)],1)},u=[],d={state:{activeTutorialLink:null,activeVolume:null},reset(){this.state.activeTutorialLink=null,this.state.activeVolume=null},setActiveSidebarLink(t){this.state.activeTutorialLink=t},setActiveVolume(t){this.state.activeVolume=t}},p=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("NavBase",[n("NavTitleContainer",{attrs:{to:t.buildUrl(t.$route.path,t.$route.query)}},[n("template",{slot:"default"},[t._t("default")],2),n("template",{slot:"subhead"},[t._v("Tutorials")])],2),n("template",{slot:"menu-items"},[n("NavMenuItemBase",{staticClass:"in-page-navigation"},[n("TutorialsNavigation",{attrs:{sections:t.sections}})],1),t._t("menu-items")],2)],2)},m=[],h=n("cbcf"),v=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("nav",{staticClass:"tutorials-navigation"},[n("TutorialsNavigationList",t._l(t.sections,(function(e,s){return n("li",{key:e.name+"_"+s,class:t.sectionClasses(e)},[t.isVolume(e)?n(t.componentForVolume(e),t._b({tag:"component",on:{"select-menu":t.onSelectMenu,"deselect-menu":t.onDeselectMenu}},"component",t.propsForVolume(e),!1),t._l(e.chapters,(function(e){return n("li",{key:e.name},[n("TutorialsNavigationLink",[t._v(" "+t._s(e.name)+" ")])],1)})),0):t.isResources(e)?n("TutorialsNavigationLink",[t._v(" Resources ")]):t._e()],1)})),0)],1)},f=[],y=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("router-link",{staticClass:"tutorials-navigation-link",class:{active:t.active},attrs:{to:t.fragment},nativeOn:{click:function(e){return t.handleFocus.apply(null,arguments)}}},[t._t("default")],2)},b=[],C=n("002d"),_=n("8a61"),g={name:"TutorialsNavigationLink",mixins:[_["a"]],inject:{store:{default:()=>({state:{}})}},data(){return{state:this.store.state}},computed:{active:({state:{activeTutorialLink:t},text:e})=>e===t,fragment:({text:t,$route:e})=>({hash:Object(C["a"])(t),query:e.query}),text:({$slots:{default:[{text:t}]}})=>t.trim()},methods:{async handleFocus(){const{hash:t}=this.fragment,e=document.getElementById(t);e&&(e.focus(),await this.scrollToElement("#"+t))}}},V=g,S=(n("6962"),n("2877")),A=Object(S["a"])(V,y,b,!1,null,"6bb99205",null),T=A.exports,w=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("ol",{staticClass:"tutorials-navigation-list",attrs:{role:"list"}},[t._t("default")],2)},k=[],I={name:"TutorialsNavigationList"},x=I,O=(n("202a"),Object(S["a"])(x,w,k,!1,null,"6f2800d1",null)),j=O.exports,N=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"tutorials-navigation-menu",class:{collapsed:t.collapsed}},[n("button",{staticClass:"toggle",attrs:{"aria-expanded":t.collapsed?"false":"true",type:"button"},on:{click:function(e){return e.stopPropagation(),t.onClick.apply(null,arguments)}}},[n("span",{staticClass:"text"},[t._v(t._s(t.title))]),n("InlineCloseIcon",{staticClass:"toggle-icon icon-inline"})],1),n("transition-expand",[t.collapsed?t._e():n("div",{staticClass:"tutorials-navigation-menu-content"},[n("TutorialsNavigationList",{attrs:{"aria-label":"Chapters"}},[t._t("default")],2)],1)])],1)},M=[],E=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("SVGIcon",{staticClass:"inline-close-icon",attrs:{viewBox:"0 0 14 14"}},[n("path",{attrs:{d:"M11.91 1l1.090 1.090-4.917 4.915 4.906 4.905-1.090 1.090-4.906-4.905-4.892 4.894-1.090-1.090 4.892-4.894-4.903-4.904 1.090-1.090 4.903 4.904z"}})])},$=[],q=n("be08"),B={name:"InlineCloseIcon",components:{SVGIcon:q["a"]}},R=B,z=Object(S["a"])(R,E,$,!1,null,null,null),D=z.exports,L={name:"TransitionExpand",functional:!0,render(t,e){const n={props:{name:"expand"},on:{afterEnter(t){t.style.height="auto"},enter(t){const{width:e}=getComputedStyle(t);t.style.width=e,t.style.position="absolute",t.style.visibility="hidden",t.style.height="auto";const{height:n}=getComputedStyle(t);t.style.width=null,t.style.position=null,t.style.visibility=null,t.style.height=0,getComputedStyle(t).height,requestAnimationFrame(()=>{t.style.height=n})},leave(t){const{height:e}=getComputedStyle(t);t.style.height=e,getComputedStyle(t).height,requestAnimationFrame(()=>{t.style.height=0})}}};return t("transition",n,e.children)}},P=L,G=(n("032c"),Object(S["a"])(P,s,a,!1,null,null,null)),F=G.exports,H={name:"TutorialsNavigationMenu",components:{InlineCloseIcon:D,TransitionExpand:F,TutorialsNavigationList:j},props:{collapsed:{type:Boolean,default:!0},title:{type:String,required:!0}},methods:{onClick(){this.collapsed?this.$emit("select-menu",this.title):this.$emit("deselect-menu")}}},K=H,U=(n("d647"),Object(S["a"])(K,N,M,!1,null,"6513d652",null)),Z=U.exports;const J={resources:"resources",volume:"volume"};var Q={name:"TutorialsNavigation",components:{TutorialsNavigationLink:T,TutorialsNavigationList:j,TutorialsNavigationMenu:Z},constants:{SectionKind:J},inject:{store:{default:()=>({setActiveVolume(){}})}},data(){return{state:this.store.state}},props:{sections:{type:Array,required:!0}},computed:{activeVolume:({state:t})=>t.activeVolume},methods:{sectionClasses(t){return{volume:this.isVolume(t),"volume--named":this.isNamedVolume(t),resource:this.isResources(t)}},componentForVolume:({name:t})=>t?Z:j,isResources:({kind:t})=>t===J.resources,isVolume:({kind:t})=>t===J.volume,activateFirstNamedVolume(){const{isNamedVolume:t,sections:e}=this,n=e.find(t);n&&this.store.setActiveVolume(n.name)},isNamedVolume(t){return this.isVolume(t)&&t.name},onDeselectMenu(){this.store.setActiveVolume(null)},onSelectMenu(t){this.store.setActiveVolume(t)},propsForVolume({name:t}){const{activeVolume:e}=this;return t?{collapsed:t!==e,title:t}:{"aria-label":"Chapters"}}},created(){this.activateFirstNamedVolume()}},W=Q,X=(n("095b"),Object(S["a"])(W,v,f,!1,null,"0cbd8adb",null)),Y=X.exports,tt=n("653a"),et=n("d26a"),nt=n("863d");const st={resources:"resources",volume:"volume"};var at={name:"Nav",constants:{SectionKind:st},components:{NavMenuItemBase:nt["a"],NavTitleContainer:tt["a"],TutorialsNavigation:Y,NavBase:h["a"]},props:{sections:{type:Array,require:!0}},methods:{buildUrl:et["b"]}},it=at,ot=(n("6211"),Object(S["a"])(it,p,m,!1,null,"1001350c",null)),rt=ot.exports,ct=n("bf08"),lt=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("section",{staticClass:"hero"},[n("div",{staticClass:"copy-container"},[n("h1",{staticClass:"title"},[t._v(t._s(t.title))]),t.content?n("ContentNode",{attrs:{content:t.content}}):t._e(),t.estimatedTime?n("p",{staticClass:"meta"},[n("TimerIcon"),n("span",{staticClass:"meta-content"},[n("strong",{staticClass:"time"},[t._v(t._s(t.estimatedTime))]),n("span",[t._v(" Estimated Time")])])],1):t._e(),t.action?n("CallToActionButton",{attrs:{action:t.action,"aria-label":t.action.overridingTitle+" with "+t.title,isDark:""}}):t._e()],1),t.image?n("Asset",{attrs:{identifier:t.image}}):t._e()],1)},ut=[],dt=n("80e4"),pt=n("c081"),mt=n("5677"),ht=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("SVGIcon",{staticClass:"timer-icon",attrs:{viewBox:"0 0 14 14"}},[n("path",{attrs:{d:"M7 0.5c3.59 0 6.5 2.91 6.5 6.5s-2.91 6.5-6.5 6.5c-3.59 0-6.5-2.91-6.5-6.5v0c0-3.59 2.91-6.5 6.5-6.5v0zM7 2c-2.761 0-5 2.239-5 5s2.239 5 5 5c2.761 0 5-2.239 5-5v0c0-2.761-2.239-5-5-5v0z"}}),n("path",{attrs:{d:"M6.51 3.51h1.5v3.5h-1.5v-3.5z"}}),n("path",{attrs:{d:"M6.51 7.010h4v1.5h-4v-1.5z"}})])},vt=[],ft={name:"TimerIcon",components:{SVGIcon:q["a"]}},yt=ft,bt=Object(S["a"])(yt,ht,vt,!1,null,null,null),Ct=bt.exports,_t={name:"Hero",components:{Asset:dt["a"],CallToActionButton:pt["a"],ContentNode:mt["a"],TimerIcon:Ct},props:{action:{type:Object,required:!1},content:{type:Array,required:!1},estimatedTime:{type:String,required:!1},image:{type:String,required:!1},title:{type:String,required:!0}}},gt=_t,Vt=(n("f974"),Object(S["a"])(gt,lt,ut,!1,null,"fc7f508c",null)),St=Vt.exports,At=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"learning-path",class:t.classes},[n("div",{staticClass:"main-container"},[t.isTargetIDE?t._e():n("div",{staticClass:"secondary-content-container"},[n("TutorialsNavigation",{attrs:{sections:t.sections,"aria-label":"On this page"}})],1),n("div",{staticClass:"primary-content-container"},[n("div",{staticClass:"content-sections-container"},[t._l(t.volumes,(function(e,s){return n("Volume",t._b({key:"volume_"+s,staticClass:"content-section"},"Volume",t.propsFor(e),!1))})),t._l(t.otherSections,(function(e,s){return n(t.componentFor(e),t._b({key:"resource_"+s,tag:"component",staticClass:"content-section"},"component",t.propsFor(e),!1))}))],2)])])])},Tt=[],wt=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("section",{staticClass:"resources",attrs:{id:"resources",tabindex:"-1"}},[n("VolumeName",{attrs:{name:"Resources",content:t.content}}),n("TileGroup",{attrs:{tiles:t.tiles}})],1)},kt=[],It=n("72e7");const xt={topOneThird:"-30% 0% -70% 0%",center:"-50% 0% -50% 0%"};var Ot={mixins:[It["a"]],computed:{intersectionRoot(){return null},intersectionRootMargin(){return xt.center}},methods:{onIntersect(t){if(!t.isIntersecting)return;const e=this.onIntersectViewport;e?e():console.warn("onIntersectViewportCenter not implemented")}}},jt=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"volume-name"},[t.image?n("Asset",{staticClass:"image",attrs:{identifier:t.image,"aria-hidden":"true"}}):t._e(),n("h2",{staticClass:"name"},[t._v(" "+t._s(t.name)+" ")]),t.content?n("ContentNode",{attrs:{content:t.content}}):t._e()],1)},Nt=[],Mt={name:"VolumeName",components:{ContentNode:mt["a"],Asset:dt["a"]},props:{image:{type:String,required:!1},content:{type:Array,required:!1},name:{type:String,required:!1}}},Et=Mt,$t=(n("c802"),Object(S["a"])(Et,jt,Nt,!1,null,"14577284",null)),qt=$t.exports,Bt=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"tile-group",class:t.countClass},t._l(t.tiles,(function(e){return n("Tile",t._b({key:e.title},"Tile",t.propsFor(e),!1))})),1)},Rt=[],zt=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"tile"},[t.identifier?n("div",{staticClass:"icon"},[n(t.iconComponent,{tag:"component"})],1):t._e(),n("div",{staticClass:"title"},[t._v(t._s(t.title))]),n("ContentNode",{attrs:{content:t.content}}),t.action?n("DestinationDataProvider",{attrs:{destination:t.action},scopedSlots:t._u([{key:"default",fn:function(e){var s=e.url,a=e.title;return n("Reference",{staticClass:"link",attrs:{url:s}},[t._v(" "+t._s(a)+" "),n("InlineChevronRightIcon",{staticClass:"link-icon icon-inline"})],1)}}],null,!1,3874201962)}):t._e()],1)},Dt=[],Lt=n("3b96"),Pt=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("SVGIcon",{staticClass:"document-icon",attrs:{viewBox:"0 0 14 14"}},[n("path",{attrs:{d:"M11.2,5.3,8,2l-.1-.1H2.8V12.1h8.5V6.3l-.1-1ZM8,3.2l2,2.1H8Zm2.4,8H3.6V2.8H7V6.3h3.4Z"}})])},Gt=[],Ft={name:"DocumentIcon",components:{SVGIcon:q["a"]}},Ht=Ft,Kt=(n("77e2"),Object(S["a"])(Ht,Pt,Gt,!1,null,"56114692",null)),Ut=Kt.exports,Zt=n("de60"),Jt=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("SVGIcon",{staticClass:"forum-icon",attrs:{viewBox:"0 0 14 14"}},[n("path",{attrs:{d:"M13 1v9h-7l-1.5 3-1.5-3h-2v-9zM12 2h-10v7h1.616l0.884 1.763 0.88-1.763h6.62z"}}),n("path",{attrs:{d:"M3 4h8.001v1h-8.001v-1z"}}),n("path",{attrs:{d:"M3 6h8.001v1h-8.001v-1z"}})])},Qt=[],Wt={name:"ForumIcon",components:{SVGIcon:q["a"]}},Xt=Wt,Yt=Object(S["a"])(Xt,Jt,Qt,!1,null,null,null),te=Yt.exports,ee=n("c4dd"),ne=n("86d8"),se=n("34b0"),ae=n("c7ea");const ie={documentation:"documentation",downloads:"downloads",featured:"featured",forums:"forums",sampleCode:"sampleCode",videos:"videos"};var oe={name:"Tile",constants:{Identifier:ie},components:{DestinationDataProvider:ae["a"],InlineChevronRightIcon:se["a"],ContentNode:mt["a"],CurlyBracketsIcon:Lt["a"],DocumentIcon:Ut,DownloadIcon:Zt["a"],ForumIcon:te,PlayIcon:ee["a"],Reference:ne["a"]},props:{action:{type:Object,required:!1},content:{type:Array,required:!0},identifier:{type:String,required:!1},title:{type:String,require:!0}},computed:{iconComponent:({identifier:t})=>({[ie.documentation]:Ut,[ie.downloads]:Zt["a"],[ie.forums]:te,[ie.sampleCode]:Lt["a"],[ie.videos]:ee["a"]}[t])}},re=oe,ce=(n("0175"),Object(S["a"])(re,zt,Dt,!1,null,"86db603a",null)),le=ce.exports,ue={name:"TileGroup",components:{Tile:le},props:{tiles:{type:Array,required:!0}},computed:{countClass:({tiles:t})=>"count-"+t.length},methods:{propsFor:({action:t,content:e,identifier:n,title:s})=>({action:t,content:e,identifier:n,title:s})}},de=ue,pe=(n("f0ca"),Object(S["a"])(de,Bt,Rt,!1,null,"015f9f13",null)),me=pe.exports,he={name:"Resources",mixins:[Ot],inject:{store:{default:()=>({setActiveSidebarLink(){},setActiveVolume(){}})}},components:{VolumeName:qt,TileGroup:me},computed:{intersectionRootMargin:()=>xt.topOneThird},props:{content:{type:Array,required:!1},tiles:{type:Array,required:!0}},methods:{onIntersectViewport(){this.store.setActiveSidebarLink("Resources"),this.store.setActiveVolume(null)}}},ve=he,fe=(n("5668"),Object(S["a"])(ve,wt,kt,!1,null,"49ba6f62",null)),ye=fe.exports,be=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("section",{staticClass:"volume"},[t.name?n("VolumeName",t._b({},"VolumeName",{name:t.name,image:t.image,content:t.content},!1)):t._e(),t._l(t.chapters,(function(e,s){return n("Chapter",{key:e.name,staticClass:"tile",attrs:{content:e.content,image:e.image,name:e.name,number:s+1,topics:t.lookupTopics(e.tutorials),volumeHasName:!!t.name}})}))],2)},Ce=[],_e=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("section",{staticClass:"chapter",attrs:{id:t.anchor,tabindex:"-1"}},[n("div",{staticClass:"info"},[n("Asset",{attrs:{identifier:t.image,"aria-hidden":"true"}}),n("div",{staticClass:"intro"},[n(t.volumeHasName?"h3":"h2",{tag:"component",staticClass:"name",attrs:{"aria-label":t.name+" - Chapter "+t.number}},[n("span",{staticClass:"eyebrow",attrs:{"aria-hidden":"true"}},[t._v("Chapter "+t._s(t.number))]),n("span",{staticClass:"name-text",attrs:{"aria-hidden":"true"}},[t._v(t._s(t.name))])]),t.content?n("ContentNode",{attrs:{content:t.content}}):t._e()],1)],1),n("TopicList",{attrs:{topics:t.topics}})],1)},ge=[],Ve=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("ol",{staticClass:"topic-list"},t._l(t.topics,(function(e){return n("li",{key:e.url,staticClass:"topic",class:[t.kindClassFor(e),{"no-time-estimate":!e.estimatedTime}]},[n("div",{staticClass:"topic-icon"},[n(t.iconComponent(e),{tag:"component"})],1),n("router-link",{staticClass:"container",attrs:{to:t.buildUrl(e.url,t.$route.query),"aria-label":t.ariaLabelFor(e)}},[n("div",{staticClass:"link"},[t._v(t._s(e.title))]),e.estimatedTime?n("div",{staticClass:"time"},[n("TimerIcon"),n("span",{staticClass:"time-label"},[t._v(t._s(e.estimatedTime))])],1):t._e()])],1)})),0)},Se=[],Ae=n("a9f1"),Te=n("8d2d");const we={article:"article",tutorial:"project"},ke={article:"article",tutorial:"tutorial"},Ie={[we.article]:"Article",[we.tutorial]:"Tutorial"};var xe={name:"ChapterTopicList",components:{TimerIcon:Ct},constants:{TopicKind:we,TopicKindClass:ke,TopicKindIconLabel:Ie},props:{topics:{type:Array,required:!0}},methods:{buildUrl:et["b"],iconComponent:({kind:t})=>({[we.article]:Ae["a"],[we.tutorial]:Te["a"]}[t]),kindClassFor:({kind:t})=>({[we.article]:ke.article,[we.tutorial]:ke.tutorial}[t]),formatTime:t=>t.replace("min"," minutes").replace("hrs"," hours"),ariaLabelFor({title:t,estimatedTime:e,kind:n}){const s=[t,Ie[n]];return e&&s.push(this.formatTime(e)+" Estimated Time"),s.join(" - ")}}},Oe=xe,je=(n("1cc5"),Object(S["a"])(Oe,Ve,Se,!1,null,"da979188",null)),Ne=je.exports,Me={name:"Chapter",mixins:[Ot],inject:{store:{default:()=>({setActiveSidebarLink(){},setActiveVolume(){}})}},components:{Asset:dt["a"],ContentNode:mt["a"],TopicList:Ne},props:{content:{type:Array,required:!1},image:{type:String,required:!0},name:{type:String,required:!0},number:{type:Number,required:!0},topics:{type:Array,required:!0},volumeHasName:{type:Boolean,default:!1}},computed:{anchor:({name:t})=>Object(C["a"])(t),intersectionRootMargin:()=>xt.topOneThird},methods:{onIntersectViewport(){this.store.setActiveSidebarLink(this.name),this.volumeHasName||this.store.setActiveVolume(null)}}},Ee=Me,$e=(n("f31c"),Object(S["a"])(Ee,_e,ge,!1,null,"1d13969f",null)),qe=$e.exports,Be={name:"Volume",mixins:[Ot],components:{VolumeName:qt,Chapter:qe},computed:{intersectionRootMargin:()=>xt.topOneThird},inject:{references:{default:()=>({})},store:{default:()=>({setActiveVolume(){}})}},props:{chapters:{type:Array,required:!0},content:{type:Array,required:!1},image:{type:String,required:!1},name:{type:String,required:!1}},methods:{lookupTopics(t){return t.reduce((t,e)=>t.concat(this.references[e]||[]),[])},onIntersectViewport(){this.name&&this.store.setActiveVolume(this.name)}}},Re=Be,ze=(n("ee29"),Object(S["a"])(Re,be,Ce,!1,null,"2129f58c",null)),De=ze.exports;const Le={resources:"resources",volume:"volume"};var Pe={name:"LearningPath",components:{Resources:ye,TutorialsNavigation:Y,Volume:De},constants:{SectionKind:Le},inject:{isTargetIDE:{default:!1}},props:{sections:{type:Array,required:!0,validator:t=>t.every(t=>Object.prototype.hasOwnProperty.call(Le,t.kind))}},computed:{classes:({isTargetIDE:t})=>({ide:t}),partitionedSections:({sections:t})=>t.reduce(([t,e],n)=>n.kind===Le.volume?[t.concat(n),e]:[t,e.concat(n)],[[],[]]),volumes:({partitionedSections:t})=>t[0],otherSections:({partitionedSections:t})=>t[1]},methods:{componentFor:({kind:t})=>({[Le.resources]:ye,[Le.volume]:De}[t]),propsFor:({chapters:t,content:e,image:n,kind:s,name:a,tiles:i})=>({[Le.resources]:{content:e,tiles:i},[Le.volume]:{chapters:t,content:e,image:n,name:a}}[s])}},Ge=Pe,Fe=(n("e929"),Object(S["a"])(Ge,At,Tt,!1,null,"48bfa85c",null)),He=Fe.exports;const Ke={hero:"hero",resources:"resources",volume:"volume"};var Ue={name:"TutorialsOverview",components:{Hero:St,LearningPath:He,Nav:rt},mixins:[ct["a"]],constants:{SectionKind:Ke},inject:{isTargetIDE:{default:!1}},props:{metadata:{type:Object,default:()=>({})},references:{type:Object,default:()=>({})},sections:{type:Array,default:()=>[],validator:t=>t.every(t=>Object.prototype.hasOwnProperty.call(Ke,t.kind))}},computed:{pageTitle:({title:t})=>[t,"Tutorials"].filter(Boolean).join(" "),pageDescription:({heroSection:t,extractFirstParagraphText:e})=>t?e(t.content):null,partitionedSections:({sections:t})=>t.reduce(([t,e],n)=>n.kind===Ke.hero?[t.concat(n),e]:[t,e.concat(n)],[[],[]]),heroSections:({partitionedSections:t})=>t[0],otherSections:({partitionedSections:t})=>t[1],heroSection:({heroSections:t})=>t[0],store:()=>d,title:({metadata:{category:t=""}})=>t},provide(){return{references:this.references,store:this.store}},created(){this.store.reset()}},Ze=Ue,Je=(n("3f36"),Object(S["a"])(Ze,l,u,!1,null,"53888684",null)),Qe=Je.exports,We=n("146e"),Xe={name:"TutorialsOverview",components:{Overview:Qe},mixins:[c["a"],We["a"]],data(){return{topicData:null}},computed:{overviewProps:({topicData:{metadata:t,references:e,sections:n}})=>({metadata:t,references:e,sections:n}),topicKey:({$route:t,topicData:e})=>[t.path,e.identifier.interfaceLanguage].join()},beforeRouteEnter(t,e,n){Object(r["b"])(t,e,n).then(t=>n(e=>{e.topicData=t})).catch(n)},beforeRouteUpdate(t,e,n){Object(r["d"])(t,e)?Object(r["b"])(t,e,n).then(t=>{this.topicData=t,n()}).catch(n):n()},watch:{topicData(){this.$nextTick(()=>{this.newContentMounted()})}}},Ye=Xe,tn=Object(S["a"])(Ye,i,o,!1,null,null,null);e["default"]=tn.exports},f084:function(t,e,n){},f0ca:function(t,e,n){"use strict";n("8f86")},f31c:function(t,e,n){"use strict";n("9f56")},f3cd:function(t,e,n){},f974:function(t,e,n){"use strict";n("dcb9")},fb73:function(t,e,n){}}]); \ No newline at end of file diff --git a/docs/docc/Reducer.doccarchive/metadata.json b/docs/docc/Reducer.doccarchive/metadata.json deleted file mode 100644 index e32e9d6..0000000 --- a/docs/docc/Reducer.doccarchive/metadata.json +++ /dev/null @@ -1 +0,0 @@ -{"bundleDisplayName":"Reducer","bundleIdentifier":"Reducer","schemaVersion":{"major":0,"minor":1,"patch":0}} \ No newline at end of file diff --git a/docs/docc/Reducer.doccarchive/theme-settings.json b/docs/docc/Reducer.doccarchive/theme-settings.json deleted file mode 100644 index b0f5635..0000000 --- a/docs/docc/Reducer.doccarchive/theme-settings.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "meta": {}, - "theme": { - "code": { - "indentationWidth": 4 - }, - "colors": { - "text": "", - "text-background": "", - "grid": "", - "article-background": "", - "generic-modal-background": "", - "secondary-label": "", - "header-text": "", - "not-found": { - "input-border": "" - }, - "runtime-preview": { - "text": "" - }, - "tabnav-item": { - "border-color": "" - }, - "svg-icon": { - "fill-light": "", - "fill-dark": "" - }, - "loading-placeholder": { - "background": "" - }, - "button": { - "text": "", - "light": { - "background": "", - "backgroundHover": "", - "backgroundActive": "" - }, - "dark": { - "background": "", - "backgroundHover": "", - "backgroundActive": "" - } - }, - "link": null - }, - "style": { - "button": { - "borderRadius": null - } - }, - "typography": { - "html-font": "" - } - }, - "features": { - "docs": { - } - } -} diff --git a/docs/docc/Reducer/css/site.css b/docs/docc/Reducer/css/site.css deleted file mode 100644 index ed292bb..0000000 --- a/docs/docc/Reducer/css/site.css +++ /dev/null @@ -1,249 +0,0 @@ -/* custom stylesheet */ - -/* - TODO: media classes for responsiveness and light & dark - */ - -body { - font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; - background-color: white; - color: black; - padding: 0; - margin: 0; - font-synthesis: none; - -webkit-font-smoothing: antialiased; -} - -code { - font-family: "Menlo", monospace; -} - -h1 { - font-size: 2.4em; - font-weight: normal; -} -h2 { - font-size: 2em; - font-weight: normal; -} -h3 { - font-size: 1.5em; - font-weight: normal; -} -a { - text-decoration: none; - color: #4064F6; -} -a:visited { color: #4064F6; } - -/* navigation */ - -nav { - position: sticky; - top: 0; - width: 100%; - z-index: 10; - background-color: white; - opacity: 0.95; - - color: #777; - padding: 1em 3em 1em 3em; - margin: 0; - border-bottom: 1px solid #EEE; -} - -nav .nav-content { - display: flex; - align-items: bottom; -} - -nav ul { - padding: 0; - margin: 0; - display: inline; -} -nav .hierarchy li { - display: inline; -} -nav .hierarchy li *::before { - content: ">"; - padding: 0 0.5em 0 0.5em; -} - - -/* page title */ - -main { - padding: 2em 0em 1em 0em; - margin: 0; -} -main .topictitle { - padding: 0em 3em 0em 3em; -} -main > .container { - padding: 0em 3em 0em 3em; -} - -main .topictitle .eyebrow { - font-size: 1.4em; - color: #777; -} - - -/* page content */ - -main .description { - border-bottom: 1px solid #CCC; - padding-bottom: 2em; -} - -.description .abstract { - font-size: 1.4em; -} - -p > picture > img { - max-width: 100%; -} - -div.content { - font-size: 1em; - line-height: 1.5em; -} - -div.content > p > a > code { - display: inline; -} - - -/* topics */ - -section { - padding: 0em 3em 0em 3em; -} -div.section { - padding: 0em 3em 0em 3em; -} - -section.alt-light { - background-color: #F7F7F7; -} - -section h2 { - padding: 1.5em 0 1em 0; -} - -.topic .topic-icon-wrapper { -} - -/* contenttable */ - -.contenttable h3 { - margin: 0; -} -.contenttable .row { - display: flex; - align-items: flex-start; - border-top: 1px solid #CCC; - padding: 2em 0 1em 0; -} - -.large-3 { - max-width: 25%; - flex-basis: 25%; - flex-grow: 0; - flex-shrink: 0; -} -.large-3 { - max-width: 50%; - flex-basis: 50%; - flex-grow: 0; - flex-shrink: 0; -} -.large-9 { - max-width: 75%; - flex-basis: 75%; - flex-grow: 0; - flex-shrink: 0; -} - -.link-block { - padding-bottom: 1em; -} - -.section-content { - padding-left: 1em; -} - -a code .decorator { - color: #777; -} - -.topic .abstract .content { - padding: 1em 0 1em 3em; -} - -/* declarations */ - -pre { - border: 1px solid #CCC; - border-radius: 4px; - margin: 0; - padding: 0; -} -pre { - margin: 0; - padding: 0; -} - -/* hero */ - -div.hero { - padding: 4em 3em 3em 4em; - margin-top: -2em; /* hack to counter the main padding */ -} -div.hero.dark { - background-color: black; -} -div.hero.dark * { - color: white; -} - -.hero .headline h1 { - margin-top: 0.2em; -} -.hero .content { - font-size: 1.2em; -} -.hero .duration { - display: flex; -} -.hero .eyebrow { - font-size: 1.2em; - color: #CCC; -} -.hero .metadata .item .content { - font-size: 2em; - padding-left: 0.5em; -} -.hero .metadata .item .bottom { - font-weight: bold; - font-size: 0.8em; -} - -/* tasks */ - -.intro-container .intro { - display: flex; -} - - -/* volumes */ - -div.sections div.section { - padding-top: 2em; -} - -.intro-container .eyebrow a { - font-size: 1.2em; - color: #777; -} \ No newline at end of file diff --git a/docs/docc/Reducer/documentation/reducer/index.html b/docs/docc/Reducer/documentation/reducer/index.html deleted file mode 100644 index 2a98842..0000000 --- a/docs/docc/Reducer/documentation/reducer/index.html +++ /dev/null @@ -1,108 +0,0 @@ - - - - - - - - Reducer| Documentation - - - - - - - - - -
- - - \ No newline at end of file diff --git a/docs/docc/Reducer/documentation/reducer/reducer/compose(_:_:).html b/docs/docc/Reducer/documentation/reducer/reducer/compose(_:_:).html deleted file mode 100644 index adb2ae5..0000000 --- a/docs/docc/Reducer/documentation/reducer/reducer/compose(_:_:).html +++ /dev/null @@ -1,109 +0,0 @@ - - - - - - - - compose(_:_:)| Documentation - - - - - - - - -
-
- -
-
- Type Method -

compose(_:_:)

-
-
-
-
- Composes two or more reducers in series, to be evaluated from the left to the right for each incoming action. -
-
- - - -
-
-

Declaration

-
-
static func compose(_ first: Reducer, _ others: Reducer...) -> Reducer
-
-

Return Value

a composed reducer (ActionType, inout StateType) -> Void equivalent to g(f(x))

-

Parameters

-
- -
first
-
-

First reducer (ActionType, inout StateType) -> Void, let’s call it f(x)

-
- -
others
-
-

Second, Third, nth reducers (ActionType, inout StateType) -> Void, let’s call it g(x)

-
- -
-

Discussion

When composing reducer A with reducer B, when an action X arrives, first it will be forwarded to reducer A together with the initial state. This reducer may return a slightly (or completely) changed state from that operation, and this state will then be forwarded to reducer B together with the same action X. If you change the order, results may vary as you can imagine. Monoids don’t necessarily hold the commutative axiom, although sometimes they do. What they necessarily hold is the associativity axiom, which means that if you compose A and B, and later C, it’s exactly the same as if you compose A to a previously composed B and C: .compose(.compose(A, B), C) == .compose(A, .compose(B, C)). So please don’t worry about surrounding your reducers with parenthesis:

-
-
let globalReducer = .compose(firstReducer, secondReducer, thirdReducer, andSoOn)
-
-
-
-
-
- - - -
-
-
-
- - - \ No newline at end of file diff --git a/docs/docc/Reducer/documentation/reducer/reducer/compose(content:).html b/docs/docc/Reducer/documentation/reducer/reducer/compose(content:).html deleted file mode 100644 index dce0aaa..0000000 --- a/docs/docc/Reducer/documentation/reducer/reducer/compose(content:).html +++ /dev/null @@ -1,118 +0,0 @@ - - - - - - - - compose(content:)| Documentation - - - - - - - - -
-
- -
-
- Type Method -

compose(content:)

-
-
-
-
- Composes two or more reducers in series, to be evaluated from the top to the bottom for each incoming action. -
-
- - - -
-
-

Declaration

-
-
static func compose(content: () -> Reducer) -> Reducer
-
-

Return Value

a composed reducer (ActionType, inout StateType) -> Void equivalent to running all the internal reducers in series

-

Parameters

-
- -
content
-
-

a result builder (DSL) having zero or more reducers to be composed sequentially

-
- -
-

Discussion

When composing reducer A with reducer B, when an action X arrives, first it will be forwarded to reducer A together with the initial state. This reducer may return a slightly (or completely) changed state from that operation, and this state will then be forwarded to reducer B together with the same action X. If you change the order, results may vary as you can imagine. Monoids don’t necessarily hold the commutative axiom, although sometimes they do.

For example you can compose reducers like this:

-
-
Reducer.compose {
-    Reducer
-        .login
-        .lift(action: \.loginAction, state: \.loginState)
-
-    Reducer
-        .lifecycle
-        .lift(action: \.lifecycleAction, state: \.lifecycleState)
-
-    Reducer.app
-
-    Reducer.reduce { action, state in
-        // some inline reducer
-    }
-}
-
-
-
-
-
- - - -
-
-
-
- - - \ No newline at end of file diff --git a/docs/docc/Reducer/documentation/reducer/reducer/identity.html b/docs/docc/Reducer/documentation/reducer/reducer/identity.html deleted file mode 100644 index fadc0cf..0000000 --- a/docs/docc/Reducer/documentation/reducer/reducer/identity.html +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - - - identity| Documentation - - - - - - - - -
-
- -
-
- Type Property -

identity

-
-
-
-
- No-op reducer. Composing it with any other reducer will not change anything from the other reducer behaviour, regardless if the identity reducer is on the left-hand side or the right-hand side or this composition. This is the neutral element in a monoidal composition. -
-
- - - -
-
-

Declaration

-
-
static var identity: Reducer<ActionType, StateType> { get }
-
-

Discussion

Therefore:

-
-
   .compose( Reducer<ActionType, StateType>, .identity )
-== .compose( .identity, Reducer<ActionType, StateType> )
-== Reducer<ActionType, StateType>
-
-
-

This is useful for composition purposes, for example when you call a function Array.reduce in an array of Reducers and you need a no-op start:

-
-
[reducer1, reducer2].reduce(.identity) { accumulator, nextReducer in
-   Reducer.compose(accumulator, nextReducer)
-}
-// .identity won't have any behaviour and the final composition ".identity >>> reducer1, reducer2" will be as if .identity wasn't there.
-
-
-

The implementation of this reducer, as one should expect, simply ignores the action and returns the state unchanged

-
-
- - - -
-
-
-
- - - \ No newline at end of file diff --git a/docs/docc/Reducer/documentation/reducer/reducer/index.html b/docs/docc/Reducer/documentation/reducer/reducer/index.html deleted file mode 100644 index e88e369..0000000 --- a/docs/docc/Reducer/documentation/reducer/reducer/index.html +++ /dev/null @@ -1,272 +0,0 @@ - - - - - - - - Reducer| Documentation - - - - - - - - -
-
- -
-
- Structure -

Reducer

-
-
-
-
- An entity that calculates the new state when given current state and an incoming action (Action, inout State) -> Void. -
-
- - - -
-
-

Declaration

-
-
struct Reducer<ActionType, StateType>
-
-

Overview

An app triggers several actions over time, either coming from user input (button tap, scroll, pinch gesture), from sensors (CoreLocation, NFC, HealthKit), communication protocols (CoreBluetooth, networking, WebSocket), databases (CoreData, Realm), timers and many more. An app also starts with an initial state, right after its cold launch. For each action that arrives, the state can be modified, and this is exactly what a Reducer does: folds all actions that arrived since the app launch, plus the initial state, into the current state. One at the time. The shape of a Reducer could be represented as (Action, State) -> State, or given the incoming action and the latest known state, calculate the new state. For the sake of performance, and keeping the same semantics, the SwiftRex Reducer is represented as (Action, inout State) -> Void, avoiding unnecessary copies and allowing performance tuning for arrays or other big collections. A Reducer can focus in a small part, and be composed with other reducers. The order of this composition matters, because the state will be modified in the order as the reducers were composed, but you should avoid two reducers changing the same domain. If you can’t avoid, mind the order. A Reducer can also focus in a subset of your full AppAction and AppState, and be “lifted” from the subset to the whole, for example it’s focused on LoginAction and LoginState, then lifted to the whole AppAction and AppState by providing the KeyPath where the subset LoginAction is in the AppAction, and where the subset LoginState is in the AppState.

-
-
- -
-
-

Topics

- - -
-
-

Instance Properties

-
- -
- - - -
-
- -
-
-

Instance Methods

-
- -
- - - - - - - - - - - - - - - -
-
- -
-
-

Type Properties

-
- -
- - - -
-
- -
-
-

Type Methods

-
- -
- - - - - - - -
-
- -
-
- -
-
-
-
- - - \ No newline at end of file diff --git a/docs/docc/Reducer/documentation/reducer/reducer/lift(action:).html b/docs/docc/Reducer/documentation/reducer/reducer/lift(action:).html deleted file mode 100644 index da00b70..0000000 --- a/docs/docc/Reducer/documentation/reducer/reducer/lift(action:).html +++ /dev/null @@ -1,128 +0,0 @@ - - - - - - - - lift(action:)| Documentation - - - - - - - - -
-
- -
-
- Instance Method -

lift(action:)

-
-
-
-
- A type-lifting method. The global state of your app is Whole, and the Reducer handles Part, that is a sub-state. -
-
- - - -
-
-

Declaration

-
-
func lift<GlobalActionType>(action: KeyPath<GlobalActionType, ActionType?>) -> Reducer<GlobalActionType, StateType>
-
-

Return Value

a Reducer<GlobalAction, StateType> that maps actions and states from the original specialized reducer into a more generic and global reducer, to be used in a larger context.

-

Parameters

-
- -
action
-
-

a read-only key-path from global action into a local action, but it’s optional because maybe this reducer shouldn’t care about certain actions. Because actions are usually enums, you can switch over the enum and in case it’s nothing you care about, you simply return nil in the closure. If you don’t want to lift this reducer in terms of action, just remove this parameter from the call.

-
- -
-

Discussion

Let’s suppose you may want to have a gpsReducer that knows about the following struct:

-
-
struct Location {
-    let latitude: Double
-    let longitude: Double
-}
-
-
-

Let’s call it Part. Both, this state and its reducer will be part of an external framework, used by dozens of apps. Internally probably the Reducer will receive some known ActionType and calculate a new location. On the main app we have a global state, that we now call Whole.

-
-
struct MyGlobalState {
-    let title: String?
-    let listOfItems: [Item]
-    let currentLocation: Location
-}
-
-
-

As expected, Part (Location) is a property of Whole (MyGlobalState). This relationship could be less direct, for example there could be several levels of properties until you find the Part in the Whole, like global.firstLevel.secondLevel.currentLocation, but let’s keep it a single-level for this example.

Because our Store understands Whole (MyGlobalState) and our gpsReducer understands Part (Location), we must lift the Reducer to the Whole level, by using:

-
-
let globalStateReducer = gpsReducer.lift(
-    action: \.self,
-    state: \.currentLocation
-)
-// where:
-//   globalStateReducer: Reducer<MyAction, MyGlobalState>
-//                                             ↑ lift
-//           gpsReducer: Reducer<MyAction, Location>
-
-
-

Now this reducer can be used within our Store or even composed with others. It also can be used in other apps as long as we have a way to lift it to the world of Whole.

Same strategy works for the action, as you can guess by the action KeyPath parameter. You can provide a KeyPath that takes a global action (Whole) and returns an optional local action (Part). It’s optional because perhaps you want to ignore actions that are not relevant for this reducer.

-
-
- - - -
-
-
-
- - - \ No newline at end of file diff --git a/docs/docc/Reducer/documentation/reducer/reducer/lift(action:state:).html b/docs/docc/Reducer/documentation/reducer/reducer/lift(action:state:).html deleted file mode 100644 index 93089a4..0000000 --- a/docs/docc/Reducer/documentation/reducer/reducer/lift(action:state:).html +++ /dev/null @@ -1,133 +0,0 @@ - - - - - - - - lift(action:state:)| Documentation - - - - - - - - -
-
- -
-
- Instance Method -

lift(action:state:)

-
-
-
-
- A type-lifting method. The global state of your app is Whole, and the Reducer handles Part, that is a sub-state. -
-
- - - -
-
-

Declaration

-
-
func lift<GlobalActionType, GlobalStateType>(action: KeyPath<GlobalActionType, ActionType?>, state: WritableKeyPath<GlobalStateType, StateType>) -> Reducer<GlobalActionType, GlobalStateType>
-
-

Return Value

a Reducer<GlobalAction, GlobalState> that maps actions and states from the original specialised reducer into a more generic and global reducer, to be used in a larger context.

-

Parameters

-
- -
action
-
-

a read-only key-path from global action into a local action, but it’s optional because maybe this reducer shouldn’t care about certain actions. Because actions are usually enums, you can switch over the enum and in case it’s nothing you care about, you simply return nil in the closure. If you don’t want to lift this reducer in terms of action, just remove this parameter from the call.

-
- -
state
-
-

a writable key-path from global state that traverses into a local state, by extracting only the part that it’s relevant for this reducer. This will also be used to set the new local state into the global state once the reducer finishes it’s operation. For example: \.currentGame.scoreBoard.

-
- -
-

Discussion

Let’s suppose you may want to have a gpsReducer that knows about the following struct:

-
-
struct Location {
-    let latitude: Double
-    let longitude: Double
-}
-
-
-

Let’s call it Part. Both, this state and its reducer will be part of an external framework, used by dozens of apps. Internally probably the Reducer will receive some known ActionType and calculate a new location. On the main app we have a global state, that we now call Whole.

-
-
struct MyGlobalState {
-    let title: String?
-    let listOfItems: [Item]
-    let currentLocation: Location
-}
-
-
-

As expected, Part (Location) is a property of Whole (MyGlobalState). This relationship could be less direct, for example there could be several levels of properties until you find the Part in the Whole, like global.firstLevel.secondLevel.currentLocation, but let’s keep it a single-level for this example.

Because our Store understands Whole (MyGlobalState) and our gpsReducer understands Part (Location), we must lift the Reducer to the Whole level, by using:

-
-
let globalStateReducer = gpsReducer.lift(
-    action: \.self,
-    state: \.currentLocation
-)
-// where:
-//   globalStateReducer: Reducer<MyAction, MyGlobalState>
-//                                             ↑ lift
-//           gpsReducer: Reducer<MyAction, Location>
-
-
-

Now this reducer can be used within our Store or even composed with others. It also can be used in other apps as long as we have a way to lift it to the world of Whole.

Same strategy works for the action, as you can guess by the action KeyPath parameter. You can provide a KeyPath that takes a global action (Whole) and returns an optional local action (Part). It’s optional because perhaps you want to ignore actions that are not relevant for this reducer.

-
-
- - - -
-
-
-
- - - \ No newline at end of file diff --git a/docs/docc/Reducer/documentation/reducer/reducer/lift(actiongetter:stategetter:statesetter:).html b/docs/docc/Reducer/documentation/reducer/reducer/lift(actiongetter:stategetter:statesetter:).html deleted file mode 100644 index 5b9bd43..0000000 --- a/docs/docc/Reducer/documentation/reducer/reducer/lift(actiongetter:stategetter:statesetter:).html +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - - - lift(actionGetter:stateGetter:stateSetter:)| Documentation - - - - - - - - -
-
- -
-
- Instance Method -

lift(actionGetter:stateGetter:stateSetter:)

-
-
-
-
- A type-lifting method. The global state of your app is Whole, and the Reducer handles Part, that is a sub-state. -
-
- - - -
-
-

Declaration

-
-
func lift<GlobalActionType, GlobalStateType>(actionGetter: @escaping (GlobalActionType) -> ActionType?, stateGetter: @escaping (GlobalStateType) -> StateType, stateSetter: @escaping (inout GlobalStateType, StateType) -> Void) -> Reducer<GlobalActionType, GlobalStateType>
-
-

Return Value

a Reducer<GlobalAction, GlobalState> that maps actions and states from the original specialised reducer into a more generic and global reducer, to be used in a larger context.

-

Parameters

-
- -
actionGetter
-
-

a way to convert a global action into a local action, but it’s optional because maybe this reducer shouldn’t care about certain actions. Because actions are usually enums, you can switch over the enum and in case it’s nothing you care about, you simply return nil in the closure. If you don’t want to lift this reducer in terms of action, just provide the identity function { $0 } as input.

-
- -
stateGetter
-
-

a way to read from a global state and extract only the part that it’s relevant for this reducer, by traversing the tree of the global state until you find the property you want, for example: { $0.currentGame.scoreBoard }

-
- -
stateSetter
-
-

a way to write back into the global state once you finished reducing the Part, so now you have a new part that was calculated by this reducer and you want to set it into the global state, also provided as the first parameter as an inout property: { globalState, newScoreBoard in globalState.currentGame.scoreBoard = newScoreBoard }

-
- -
-

Discussion

Let’s suppose you may want to have a gpsReducer that knows about the following struct:

-
-
struct Location {
-    let latitude: Double
-    let longitude: Double
-}
-
-
-

Let’s call it Part. Both, this state and its reducer will be part of an external framework, used by dozens of apps. Internally probably the Reducer will receive some known ActionType and calculate a new location. On the main app we have a global state, that we now call Whole.

-
-
struct MyGlobalState {
-    let title: String?
-    let listOfItems: [Item]
-    let currentLocation: Location
-}
-
-
-

As expected, Part (Location) is a property of Whole (MyGlobalState). This relationship could be less direct, for example there could be several levels of properties until you find the Part in the Whole, like global.firstLevel.secondLevel.currentLocation, but let’s keep it a single-level for this example.

Because our Store understands Whole (MyGlobalState) and our gpsReducer understands Part (Location), we must lift the Reducer to the Whole level, by using:

-
-
let globalStateReducer = gpsReducer.lift(
-    actionGetter: { $0 },
-    stateGetter: { global in global.currentLocation },
-    stateSetter: { global, part in global.currentLocation = path }
-)
-// where:
-//   globalStateReducer: Reducer<MyAction, MyGlobalState>
-//                                             ↑ lift
-//           gpsReducer: Reducer<MyAction, Location>
-
-
-

Now this reducer can be used within our Store or even composed with others. It also can be used in other apps as long as we have a way to lift it to the world of Whole.

Same strategy works for the action, as you can guess by the actionGetter parameter. You can provide a function that takes a global action (Whole) and returns an optional local action (Part). It’s optional because perhaps you want to ignore actions that are not relevant for this reducer.

-
-
- - - -
-
-
-
- - - \ No newline at end of file diff --git a/docs/docc/Reducer/documentation/reducer/reducer/lift(state:).html b/docs/docc/Reducer/documentation/reducer/reducer/lift(state:).html deleted file mode 100644 index 7822314..0000000 --- a/docs/docc/Reducer/documentation/reducer/reducer/lift(state:).html +++ /dev/null @@ -1,128 +0,0 @@ - - - - - - - - lift(state:)| Documentation - - - - - - - - -
-
- -
-
- Instance Method -

lift(state:)

-
-
-
-
- A type-lifting method. The global state of your app is Whole, and the Reducer handles Part, that is a sub-state. -
-
- - - -
-
-

Declaration

-
-
func lift<GlobalStateType>(state: WritableKeyPath<GlobalStateType, StateType>) -> Reducer<ActionType, GlobalStateType>
-
-

Return Value

a Reducer<ActionType, GlobalState> that maps actions and states from the original specialized reducer into a more generic and global reducer, to be used in a larger context.

-

Parameters

-
- -
state
-
-

a writable key-path from global state that traverses into a local state, by extracting only the part that it’s relevant for this reducer. This will also be used to set the new local state into the global state once the reducer finishes it’s operation. For example: \.currentGame.scoreBoard.

-
- -
-

Discussion

Let’s suppose you may want to have a gpsReducer that knows about the following struct:

-
-
struct Location {
-    let latitude: Double
-    let longitude: Double
-}
-
-
-

Let’s call it Part. Both, this state and its reducer will be part of an external framework, used by dozens of apps. Internally probably the Reducer will receive some known ActionType and calculate a new location. On the main app we have a global state, that we now call Whole.

-
-
struct MyGlobalState {
-    let title: String?
-    let listOfItems: [Item]
-    let currentLocation: Location
-}
-
-
-

As expected, Part (Location) is a property of Whole (MyGlobalState). This relationship could be less direct, for example there could be several levels of properties until you find the Part in the Whole, like global.firstLevel.secondLevel.currentLocation, but let’s keep it a single-level for this example.

Because our Store understands Whole (MyGlobalState) and our gpsReducer understands Part (Location), we must lift the Reducer to the Whole level, by using:

-
-
let globalStateReducer = gpsReducer.lift(
-    action: \.self,
-    state: \.currentLocation
-)
-// where:
-//   globalStateReducer: Reducer<MyAction, MyGlobalState>
-//                                             ↑ lift
-//           gpsReducer: Reducer<MyAction, Location>
-
-
-

Now this reducer can be used within our Store or even composed with others. It also can be used in other apps as long as we have a way to lift it to the world of Whole.

Same strategy works for the action, as you can guess by the action KeyPath parameter. You can provide a KeyPath that takes a global action (Whole) and returns an optional local action (Part). It’s optional because perhaps you want to ignore actions that are not relevant for this reducer.

-
-
- - - -
-
-
-
- - - \ No newline at end of file diff --git a/docs/docc/Reducer/documentation/reducer/reducer/lifttocollection(action:statecollection:)-4gphe.html b/docs/docc/Reducer/documentation/reducer/reducer/lifttocollection(action:statecollection:)-4gphe.html deleted file mode 100644 index 5597ccf..0000000 --- a/docs/docc/Reducer/documentation/reducer/reducer/lifttocollection(action:statecollection:)-4gphe.html +++ /dev/null @@ -1,132 +0,0 @@ - - - - - - - - liftToCollection(action:stateCollection:)| Documentation - - - - - - - - -
-
- -
-
- Instance Method -

liftToCollection(action:stateCollection:)

-
-
-
-
- A type-lifting method for collections. The global state of your app is Whole, and the Reducer handles an element that is inside of a collection, which itself is sub-state of the global. Let’s call this single element Part. -
-
- - - -
-
-

Declaration

-
-
func liftToCollection<GlobalAction, GlobalState, CollectionState>(action actionMap: KeyPath<GlobalAction, (index: CollectionState.Index, action: ActionType)?>, stateCollection: WritableKeyPath<GlobalState, CollectionState>) -> Reducer<GlobalAction, GlobalState> where StateType == CollectionState.Element, CollectionState : MutableCollection
-
-

Return Value

a Reducer<GlobalAction, GlobalState> that maps actions and states from the original local reducer, which is specialised in a single Element, into a more generic and global reducer, to be used in a larger context.

-

Parameters

-
- -
actionMap
-
-

a read-only key-path from global action into a tuple: (index, local action), but it’s optional because maybe this reducer shouldn’t care about certain actions.

-
- -
stateCollection
-
-

a writable key-path from global state that traverses into a local state, by extracting only the part that it’s relevant for this reducer. This part needs to be a MutableCollection.

-
- -
-

Discussion

Let’s suppose you may want to have a gpsReducer that knows about the following struct:

-
-
struct Location {
-    let latitude: Double
-    let longitude: Double
-}
-
-
-

Let’s call it Part. Both, this state and its reducer will be part of an external framework, used by dozens of apps. Internally probably the Reducer will receive some known ActionType and calculate a new location. On the main app we have a global state, that we now call Whole.

-
-
struct MyGlobalState {
-    let title: String?
-    let knownLocations: [Location]
-}
-
-
-

As expected, Part (Location) is an element of the array knownLocations, which is property of Whole (MyGlobalState). This relationship could be less direct, for example there could be several levels of properties until you find the Part in the Whole, like global.firstLevel.secondLevel.knownLocations, but let’s keep it a single-level for this example.

To resolve this single element, we not only have to find the path to the array, but we have to find the element inside of the array. There are three methods for doing so:

  1. the element is Identifiable (iOS 13 or later)

  2. the element has a Hashable property that makes it unique, so we can find it in the array using this identifier

  3. using the index of the element in the array

Because our Store understands Whole (MyGlobalState) and our gpsReducer understands Part (Location), we must liftToCollection the Reducer to the Whole level, by using:

-
-
let globalStateReducer = gpsReducer.liftToCollection(
-    actionMap: \.actionKeyPathToATuple,
-    state: \.knownLocations
-)
-// where:
-//   globalStateReducer: Reducer<MyAction, MyGlobalState>
-//                                                 ↑ lift
-//           gpsReducer: Reducer<LocationAction, Location>
-
-
-

Different from simple lift to scalar, this one requires necessarily that you lift the action together with the state. That’s because your action has to contain the ID or Index of the element we will modify. The actionMap KeyPath has to give us a tuple of either:

  • (id, actionToSingleElement)

  • (index, actionToSingleElement)

The id or index is gonna be how we will search the array for the desired element, and only if we find it, we will run the gpsReducer for that specific element, using the action that has to do with single elements only.

As Location doesn’t have an id property we will have to either use index, implement Identifiable protocol or give another unique and Hashable property.

Now this reducer can be used within our Store or even composed with others. It also can be used in other apps as long as we have a way to lift it to the world of Whole.

-
-
- - - -
-
-
-
- - - \ No newline at end of file diff --git a/docs/docc/Reducer/documentation/reducer/reducer/lifttocollection(action:statecollection:)-5a160.html b/docs/docc/Reducer/documentation/reducer/reducer/lifttocollection(action:statecollection:)-5a160.html deleted file mode 100644 index e9fa23c..0000000 --- a/docs/docc/Reducer/documentation/reducer/reducer/lifttocollection(action:statecollection:)-5a160.html +++ /dev/null @@ -1,132 +0,0 @@ - - - - - - - - liftToCollection(action:stateCollection:)| Documentation - - - - - - - - -
-
- -
-
- Instance Method -

liftToCollection(action:stateCollection:)

-
-
-
-
- A type-lifting method for collections. The global state of your app is Whole, and the Reducer handles an element that is inside of a collection, which itself is sub-state of the global. Let’s call this single element Part. -
-
- - - -
-
-

Declaration

-
-
func liftToCollection<GlobalAction, GlobalState, CollectionState>(action actionMap: KeyPath<GlobalAction, (id: StateType.ID, action: ActionType)?>, stateCollection: WritableKeyPath<GlobalState, CollectionState>) -> Reducer<GlobalAction, GlobalState> where StateType == CollectionState.Element, CollectionState : MutableCollection
-
-

Return Value

a Reducer<GlobalAction, GlobalState> that maps actions and states from the original local reducer, which is specialised in a single Element, into a more generic and global reducer, to be used in a larger context.

-

Parameters

-
- -
actionMap
-
-

a read-only key-path from global action into a tuple: (id, local action), but it’s optional because maybe this reducer shouldn’t care about certain actions.

-
- -
stateCollection
-
-

a writable key-path from global state that traverses into a local state, by extracting only the part that it’s relevant for this reducer. This part needs to be a MutableCollection.

-
- -
-

Discussion

Let’s suppose you may want to have a gpsReducer that knows about the following struct:

-
-
struct Location {
-    let latitude: Double
-    let longitude: Double
-}
-
-
-

Let’s call it Part. Both, this state and its reducer will be part of an external framework, used by dozens of apps. Internally probably the Reducer will receive some known ActionType and calculate a new location. On the main app we have a global state, that we now call Whole.

-
-
struct MyGlobalState {
-    let title: String?
-    let knownLocations: [Location]
-}
-
-
-

As expected, Part (Location) is an element of the array knownLocations, which is property of Whole (MyGlobalState). This relationship could be less direct, for example there could be several levels of properties until you find the Part in the Whole, like global.firstLevel.secondLevel.knownLocations, but let’s keep it a single-level for this example.

To resolve this single element, we not only have to find the path to the array, but we have to find the element inside of the array. There are three methods for doing so:

  1. the element is Identifiable (iOS 13 or later)

  2. the element has a Hashable property that makes it unique, so we can find it in the array using this identifier

  3. using the index of the element in the array

Because our Store understands Whole (MyGlobalState) and our gpsReducer understands Part (Location), we must liftToCollection the Reducer to the Whole level, by using:

-
-
let globalStateReducer = gpsReducer.liftToCollection(
-    actionMap: \.actionKeyPathToATuple,
-    state: \.knownLocations
-)
-// where:
-//   globalStateReducer: Reducer<MyAction, MyGlobalState>
-//                                                 ↑ lift
-//           gpsReducer: Reducer<LocationAction, Location>
-
-
-

Different from simple lift to scalar, this one requires necessarily that you lift the action together with the state. That’s because your action has to contain the ID or Index of the element we will modify. The actionMap KeyPath has to give us a tuple of either:

  • (id, actionToSingleElement)

  • (index, actionToSingleElement)

The id or index is gonna be how we will search the array for the desired element, and only if we find it, we will run the gpsReducer for that specific element, using the action that has to do with single elements only.

As Location doesn’t have an id property we will have to either use index, implement Identifiable protocol or give another unique and Hashable property.

Now this reducer can be used within our Store or even composed with others. It also can be used in other apps as long as we have a way to lift it to the world of Whole.

-
-
- - - -
-
-
-
- - - \ No newline at end of file diff --git a/docs/docc/Reducer/documentation/reducer/reducer/lifttocollection(action:statecollection:identifier:).html b/docs/docc/Reducer/documentation/reducer/reducer/lifttocollection(action:statecollection:identifier:).html deleted file mode 100644 index 400e33a..0000000 --- a/docs/docc/Reducer/documentation/reducer/reducer/lifttocollection(action:statecollection:identifier:).html +++ /dev/null @@ -1,137 +0,0 @@ - - - - - - - - liftToCollection(action:stateCollection:identifier:)| Documentation - - - - - - - - -
-
- -
-
- Instance Method -

liftToCollection(action:stateCollection:identifier:)

-
-
-
-
- A type-lifting method for collections. The global state of your app is Whole, and the Reducer handles an element that is inside of a collection, which itself is sub-state of the global. Let’s call this single element Part. -
-
- - - -
-
-

Declaration

-
-
func liftToCollection<GlobalAction, GlobalState, CollectionState, ID>(action actionMap: KeyPath<GlobalAction, (id: ID, action: ActionType)?>, stateCollection: WritableKeyPath<GlobalState, CollectionState>, identifier: KeyPath<StateType, ID>) -> Reducer<GlobalAction, GlobalState> where StateType == CollectionState.Element, CollectionState : MutableCollection, ID : Hashable
-
-

Return Value

a Reducer<GlobalAction, GlobalState> that maps actions and states from the original local reducer, which is specialised in a single Element, into a more generic and global reducer, to be used in a larger context.

-

Parameters

-
- -
actionMap
-
-

a read-only key-path from global action into a tuple: (id, local action), but it’s optional because maybe this reducer shouldn’t care about certain actions.

-
- -
stateCollection
-
-

a writable key-path from global state that traverses into a local state, by extracting only the part that it’s relevant for this reducer. This part needs to be a MutableCollection.

-
- -
identifier
-
-

a key-path to define who is the unique-identifier of the Element (it has to be Hashable)

-
- -
-

Discussion

Let’s suppose you may want to have a gpsReducer that knows about the following struct:

-
-
struct Location {
-    let latitude: Double
-    let longitude: Double
-}
-
-
-

Let’s call it Part. Both, this state and its reducer will be part of an external framework, used by dozens of apps. Internally probably the Reducer will receive some known ActionType and calculate a new location. On the main app we have a global state, that we now call Whole.

-
-
struct MyGlobalState {
-    let title: String?
-    let knownLocations: [Location]
-}
-
-
-

As expected, Part (Location) is an element of the array knownLocations, which is property of Whole (MyGlobalState). This relationship could be less direct, for example there could be several levels of properties until you find the Part in the Whole, like global.firstLevel.secondLevel.knownLocations, but let’s keep it a single-level for this example.

To resolve this single element, we not only have to find the path to the array, but we have to find the element inside of the array. There are three methods for doing so:

  1. the element is Identifiable (iOS 13 or later)

  2. the element has a Hashable property that makes it unique, so we can find it in the array using this identifier

  3. using the index of the element in the array

Because our Store understands Whole (MyGlobalState) and our gpsReducer understands Part (Location), we must liftToCollection the Reducer to the Whole level, by using:

-
-
let globalStateReducer = gpsReducer.liftToCollection(
-    actionMap: \.actionKeyPathToATuple,
-    state: \.knownLocations
-)
-// where:
-//   globalStateReducer: Reducer<MyAction, MyGlobalState>
-//                                                 ↑ lift
-//           gpsReducer: Reducer<LocationAction, Location>
-
-
-

Different from simple lift to scalar, this one requires necessarily that you lift the action together with the state. That’s because your action has to contain the ID or Index of the element we will modify. The actionMap KeyPath has to give us a tuple of either:

  • (id, actionToSingleElement)

  • (index, actionToSingleElement)

The id or index is gonna be how we will search the array for the desired element, and only if we find it, we will run the gpsReducer for that specific element, using the action that has to do with single elements only.

As Location doesn’t have an id property we will have to either use index, implement Identifiable protocol or give another unique and Hashable property.

Now this reducer can be used within our Store or even composed with others. It also can be used in other apps as long as we have a way to lift it to the world of Whole.

-
-
- - - -
-
-
-
- - - \ No newline at end of file diff --git a/docs/docc/Reducer/documentation/reducer/reducer/reduce(_:).html b/docs/docc/Reducer/documentation/reducer/reducer/reduce(_:).html deleted file mode 100644 index 77d23c8..0000000 --- a/docs/docc/Reducer/documentation/reducer/reducer/reduce(_:).html +++ /dev/null @@ -1,99 +0,0 @@ - - - - - - - - reduce(_:)| Documentation - - - - - - - - -
-
- -
-
- Type Method -

reduce(_:)

-
-
-
-
- Reducer initialiser takes only the underlying function (ActionType, inout StateType) -> Void that is the reducer function itself. -
-
- - - -
-
-

Declaration

-
-
static func reduce(_ reduce: @escaping (ActionType, inout StateType) -> Void) -> Reducer
-
-
-

Parameters

-
- -
reduce
-
-

a pure function that calculates the new state from an action and the current state.

-
- -
-
-
-
- - - -
-
-
-
- - - \ No newline at end of file diff --git a/docs/docc/Reducer/documentation/reducer/reducer/reduce.html b/docs/docc/Reducer/documentation/reducer/reducer/reduce.html deleted file mode 100644 index b73cfea..0000000 --- a/docs/docc/Reducer/documentation/reducer/reducer/reduce.html +++ /dev/null @@ -1,89 +0,0 @@ - - - - - - - - reduce| Documentation - - - - - - - - -
-
- -
-
- Instance Property -

reduce

-
-
-
-
- Execute the wrapped reduce function. You must provide the parameters action: ActionType (the action to be evaluated during the reducing process) and an inout version of the latest state: StateType, (the current state in your single source-of-truth). State will be mutated in place (inout) and finish with the calculated new state. -
-
- - - -
-
-

Declaration

-
-
let reduce: (ActionType, inout StateType) -> Void
-
-
-
-
- - - -
-
-
-
- - - \ No newline at end of file diff --git a/docs/docc/Reducer/documentation/reducer/reducerbuilder/buildblock(_:).html b/docs/docc/Reducer/documentation/reducer/reducerbuilder/buildblock(_:).html deleted file mode 100644 index 35ab716..0000000 --- a/docs/docc/Reducer/documentation/reducer/reducerbuilder/buildblock(_:).html +++ /dev/null @@ -1,99 +0,0 @@ - - - - - - - - buildBlock(_:)| Documentation - - - - - - - - -
-
- -
-
- Type Method -

buildBlock(_:)

-
-
-
-
- DSL Builder for Reducer compose -
-
- - - -
-
-

Declaration

-
-
static func buildBlock<Action, State>(_ reducers: Reducer<Action, State>...) -> Reducer<Action, State>
-
-

Return Value

the composed reducer that will run all the inner reducers sequentially/

-

Parameters

-
- -
reducers
-
-

the reducers to be combined/

-
- -
-
-
-
- - - -
-
-
-
- - - \ No newline at end of file diff --git a/docs/docc/Reducer/documentation/reducer/reducerbuilder/index.html b/docs/docc/Reducer/documentation/reducer/reducerbuilder/index.html deleted file mode 100644 index af30127..0000000 --- a/docs/docc/Reducer/documentation/reducer/reducerbuilder/index.html +++ /dev/null @@ -1,110 +0,0 @@ - - - - - - - - ReducerBuilder| Documentation - - - - - - - - -
-
- -
-
- Enumeration -

ReducerBuilder

-
-
-
-
- DSL Builder for Reducer compose -
-
- - - -
-
-

Declaration

-
-
@resultBuilder enum ReducerBuilder
-
-
-
-
- -
-
-

Topics

- - -
-
-

Type Methods

-
- - -
- -
-
- -
-
-
-
- - - \ No newline at end of file diff --git a/docs/docc/Reducer/favicon.ico b/docs/docc/Reducer/favicon.ico deleted file mode 100644 index 5231da6..0000000 Binary files a/docs/docc/Reducer/favicon.ico and /dev/null differ diff --git a/docs/docc/Reducer/favicon.svg b/docs/docc/Reducer/favicon.svg deleted file mode 100644 index c54c53f..0000000 --- a/docs/docc/Reducer/favicon.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - \ No newline at end of file diff --git a/docs/docc/Reducer/img/added-icon.svg b/docs/docc/Reducer/img/added-icon.svg deleted file mode 100644 index 6bb6d89..0000000 --- a/docs/docc/Reducer/img/added-icon.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - \ No newline at end of file diff --git a/docs/docc/Reducer/img/deprecated-icon.svg b/docs/docc/Reducer/img/deprecated-icon.svg deleted file mode 100644 index a0f8008..0000000 --- a/docs/docc/Reducer/img/deprecated-icon.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - \ No newline at end of file diff --git a/docs/docc/Reducer/img/modified-icon.svg b/docs/docc/Reducer/img/modified-icon.svg deleted file mode 100644 index 3e0bd6f..0000000 --- a/docs/docc/Reducer/img/modified-icon.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - \ No newline at end of file diff --git a/docs/docc/Reducer/img/no-image@2x.png b/docs/docc/Reducer/img/no-image@2x.png deleted file mode 100644 index 041394e..0000000 Binary files a/docs/docc/Reducer/img/no-image@2x.png and /dev/null differ