diff --git a/apple/OmnivoreKit/Sources/App/Views/Home/Components/FeedCardNavigationLink.swift b/apple/OmnivoreKit/Sources/App/Views/Home/Components/FeedCardNavigationLink.swift
index c080ec145..8437868c1 100644
--- a/apple/OmnivoreKit/Sources/App/Views/Home/Components/FeedCardNavigationLink.swift
+++ b/apple/OmnivoreKit/Sources/App/Views/Home/Components/FeedCardNavigationLink.swift
@@ -58,7 +58,7 @@ struct FeedCardNavigationLink: View {
.onAppear {
Task { await viewModel.itemAppeared(item: item, dataService: dataService) }
}
- FeedCard(item: item, viewer: dataService.currentViewer)
+ LibraryItemCard(item: item, viewer: dataService.currentViewer)
}
}
}
diff --git a/apple/OmnivoreKit/Sources/App/Views/Home/HomeFeedViewIOS.swift b/apple/OmnivoreKit/Sources/App/Views/Home/HomeFeedViewIOS.swift
index 69bcd13a0..e28691269 100644
--- a/apple/OmnivoreKit/Sources/App/Views/Home/HomeFeedViewIOS.swift
+++ b/apple/OmnivoreKit/Sources/App/Views/Home/HomeFeedViewIOS.swift
@@ -13,6 +13,8 @@ import Views
struct HomeFeedContainerView: View {
@State var hasHighlightMutations = false
@State var searchPresented = false
+ @State var addLinkPresented = false
+ @State var settingsPresented = false
@EnvironmentObject var dataService: DataService
@EnvironmentObject var audioController: AudioController
@@ -129,16 +131,18 @@ import Views
}
ToolbarItem(placement: .barTrailing) {
if UIDevice.isIPhone {
- NavigationLink(
- destination: { ProfileView() },
- label: {
- Image(systemName: "person.circle")
- .resizable()
- .frame(width: 22, height: 22)
- .padding(.vertical, 16)
- .foregroundColor(.appGrayTextContrast)
- }
- )
+ Menu(content: {
+ Button(action: { settingsPresented = true }, label: {
+ Label(LocalText.genericProfile, systemImage: "person.circle")
+ })
+ Button(action: { addLinkPresented = true }, label: {
+ Label("Add Link", systemImage: "plus.square")
+ })
+ }, label: {
+ Image(systemName: "ellipsis")
+ .foregroundColor(.appGrayTextContrast)
+ .frame(width: 24, height: 24)
+ })
} else {
EmptyView()
}
@@ -189,6 +193,16 @@ import Views
.fullScreenCover(isPresented: $searchPresented) {
LibrarySearchView(homeFeedViewModel: self.viewModel)
}
+ .sheet(isPresented: $addLinkPresented) {
+ NavigationView {
+ LibraryAddLinkView()
+ }
+ }
+ .sheet(isPresented: $settingsPresented) {
+ NavigationView {
+ ProfileView()
+ }
+ }
.task {
if viewModel.items.isEmpty {
loadItems(isRefresh: false)
@@ -364,6 +378,7 @@ import Views
item: item,
viewModel: viewModel
)
+ .listRowInsets(.init(top: 0, leading: 8, bottom: 8, trailing: 8))
.contextMenu {
menuItems(for: item)
}
@@ -407,8 +422,9 @@ import Views
}
}
}
- .padding(.top, 0)
+ .padding(0)
.listStyle(PlainListStyle())
+ .listRowInsets(.init(top: 0, leading: 0, bottom: 0, trailing: 0))
.alert("Are you sure you want to delete this item? All associated notes and highlights will be deleted.",
isPresented: $confirmationShown) {
Button("Remove Item", role: .destructive) {
diff --git a/apple/OmnivoreKit/Sources/App/Views/Home/LibraryAddLinkView.swift b/apple/OmnivoreKit/Sources/App/Views/Home/LibraryAddLinkView.swift
new file mode 100644
index 000000000..9298fe44e
--- /dev/null
+++ b/apple/OmnivoreKit/Sources/App/Views/Home/LibraryAddLinkView.swift
@@ -0,0 +1,110 @@
+
+import Introspect
+import Models
+import Services
+import SwiftUI
+import UIKit
+import Views
+
+@MainActor final class LibraryAddLinkViewModel: NSObject, ObservableObject {
+ @Published var isLoading = false
+ @Published var errorMessage: String = ""
+ @Published var showErrorMessage: Bool = false
+
+ func addLink(dataService: DataService, newLinkURL: String, dismiss: DismissAction) {
+ isLoading = true
+ Task {
+ if URL(string: newLinkURL) == nil {
+ error("Invalid link")
+ } else {
+ let result = try? await dataService.saveURL(id: UUID().uuidString, url: newLinkURL)
+ if result == nil {
+ error("Error adding link")
+ } else {
+ dismiss()
+ }
+ }
+ isLoading = false
+ }
+ }
+
+ func error(_ msg: String) {
+ errorMessage = msg
+ showErrorMessage = true
+ isLoading = false
+ }
+}
+
+struct LibraryAddLinkView: View {
+ @StateObject var viewModel = LibraryAddLinkViewModel()
+
+ @State var newLinkURL: String = ""
+ @EnvironmentObject var dataService: DataService
+ @Environment(\.dismiss) private var dismiss
+
+ enum FocusField: Hashable {
+ case addLinkEditor
+ }
+
+ @FocusState private var focusedField: FocusField?
+
+ var body: some View {
+ innerBody
+ .navigationTitle("Add Link")
+ .navigationBarTitleDisplayMode(.inline)
+ .onAppear {
+ focusedField = .addLinkEditor
+ }
+ }
+
+ var innerBody: some View {
+ Form {
+ TextField("Add Link", text: $newLinkURL)
+ .keyboardType(.URL)
+ .textFieldStyle(StandardTextFieldStyle())
+ .focused($focusedField, equals: .addLinkEditor)
+
+ Button(action: {
+ if let url = UIPasteboard.general.url {
+ newLinkURL = url.absoluteString
+ } else {
+ viewModel.error("No URL on pasteboard")
+ }
+ }, label: {
+ Text("Get from pasteboard")
+ })
+ }
+ .navigationTitle("Add Link")
+ .navigationBarTitleDisplayMode(.inline)
+ .toolbar {
+ ToolbarItem(placement: .navigationBarLeading) {
+ dismissButton
+ }
+ ToolbarItem(placement: .navigationBarTrailing) {
+ viewModel.isLoading ? AnyView(ProgressView()) : AnyView(addButton)
+ }
+ }
+ .alert(viewModel.errorMessage,
+ isPresented: $viewModel.showErrorMessage) {
+ Button(LocalText.genericOk, role: .cancel) { viewModel.showErrorMessage = false }
+ }
+ }
+
+ var addButton: some View {
+ Button(
+ action: {
+ viewModel.addLink(dataService: dataService, newLinkURL: newLinkURL, dismiss: dismiss)
+ },
+ label: { Text("Add").bold() }
+ )
+ .disabled(viewModel.isLoading)
+ }
+
+ var dismissButton: some View {
+ Button(
+ action: { dismiss() },
+ label: { Text(LocalText.genericClose) }
+ )
+ .disabled(viewModel.isLoading)
+ }
+}
diff --git a/apple/OmnivoreKit/Sources/App/Views/Profile/ProfileView.swift b/apple/OmnivoreKit/Sources/App/Views/Profile/ProfileView.swift
index cf9273d20..ad7c53cbc 100644
--- a/apple/OmnivoreKit/Sources/App/Views/Profile/ProfileView.swift
+++ b/apple/OmnivoreKit/Sources/App/Views/Profile/ProfileView.swift
@@ -59,6 +59,7 @@ struct ProfileView: View {
@EnvironmentObject var authenticator: Authenticator
@EnvironmentObject var dataService: DataService
@Environment(\.openURL) var openURL
+ @Environment(\.dismiss) var dismiss
@StateObject private var viewModel = ProfileContainerViewModel()
@@ -69,6 +70,13 @@ struct ProfileView: View {
Form {
innerBody
}
+ .navigationTitle(LocalText.genericProfile)
+ .navigationBarTitleDisplayMode(.inline)
+ .toolbar {
+ ToolbarItem(placement: .navigationBarTrailing) {
+ dismissButton
+ }
+ }
#elseif os(macOS)
List {
innerBody
@@ -77,6 +85,13 @@ struct ProfileView: View {
#endif
}
+ var dismissButton: some View {
+ Button(
+ action: { dismiss() },
+ label: { Text(LocalText.genericClose) }
+ )
+ }
+
private var accountSection: some View {
Section {
NavigationLink(destination: LabelsView()) {
@@ -171,7 +186,6 @@ struct ProfileView: View {
}
}
}
- .navigationTitle(LocalText.genericProfile)
}
}
diff --git a/apple/OmnivoreKit/Sources/App/Views/Profile/Subscriptions.swift b/apple/OmnivoreKit/Sources/App/Views/Profile/Subscriptions.swift
index d9fee2c93..2f868cf92 100644
--- a/apple/OmnivoreKit/Sources/App/Views/Profile/Subscriptions.swift
+++ b/apple/OmnivoreKit/Sources/App/Views/Profile/Subscriptions.swift
@@ -46,44 +46,48 @@ struct SubscriptionsView: View {
@State private var progressViewOpacity = 0.0
var body: some View {
- if viewModel.isLoading {
- ProgressView()
- .opacity(progressViewOpacity)
- .onAppear {
- DispatchQueue.main.asyncAfter(deadline: .now() + .milliseconds(1000)) {
- progressViewOpacity = 1
+ Group {
+ if viewModel.isLoading {
+ ProgressView()
+ .opacity(progressViewOpacity)
+ .onAppear {
+ DispatchQueue.main.asyncAfter(deadline: .now() + .milliseconds(1000)) {
+ progressViewOpacity = 1
+ }
}
+ .task { await viewModel.loadSubscriptions(dataService: dataService) }
+ } else if viewModel.hasNetworkError {
+ VStack {
+ Text(LocalText.subscriptionsErrorRetrieving).multilineTextAlignment(.center)
+ Button(
+ action: { Task { await viewModel.loadSubscriptions(dataService: dataService) } },
+ label: { Text(LocalText.genericRetry) }
+ )
+ .buttonStyle(RoundedRectButtonStyle())
+ }
+ } else if viewModel.subscriptions.isEmpty {
+ VStack(alignment: .center) {
+ Spacer()
+ Text(LocalText.subscriptionsNone)
+ Spacer()
+ }
+ } else {
+ Group {
+ #if os(iOS)
+ Form {
+ innerBody
+ }
+ #elseif os(macOS)
+ List {
+ innerBody
+ }
+ .listStyle(InsetListStyle())
+ #endif
}
- .task { await viewModel.loadSubscriptions(dataService: dataService) }
- } else if viewModel.hasNetworkError {
- VStack {
- Text(LocalText.subscriptionsErrorRetrieving).multilineTextAlignment(.center)
- Button(
- action: { Task { await viewModel.loadSubscriptions(dataService: dataService) } },
- label: { Text(LocalText.genericRetry) }
- )
- .buttonStyle(RoundedRectButtonStyle())
- }
- } else if viewModel.subscriptions.isEmpty {
- VStack(alignment: .center) {
- Spacer()
- Text(LocalText.subscriptionsNone)
- Spacer()
- }
- } else {
- Group {
- #if os(iOS)
- Form {
- innerBody
- }
- #elseif os(macOS)
- List {
- innerBody
- }
- .listStyle(InsetListStyle())
- #endif
}
}
+ .navigationTitle("Subscriptions")
+ .navigationBarTitleDisplayMode(.inline)
}
private var innerBody: some View {
diff --git a/apple/OmnivoreKit/Sources/App/Views/WebReader/WebReader.swift b/apple/OmnivoreKit/Sources/App/Views/WebReader/WebReader.swift
index 667d980c2..a2537feea 100644
--- a/apple/OmnivoreKit/Sources/App/Views/WebReader/WebReader.swift
+++ b/apple/OmnivoreKit/Sources/App/Views/WebReader/WebReader.swift
@@ -9,6 +9,7 @@ struct WebReader: PlatformViewRepresentable {
let articleContent: ArticleContent
let openLinkAction: (URL) -> Void
let tapHandler: () -> Void
+ let scrollPercentHandler: (Int) -> Void
let webViewActionHandler: (WKScriptMessage, WKScriptMessageReplyHandler?) -> Void
let navBarVisibilityRatioUpdater: (Double) -> Void
@@ -52,6 +53,7 @@ struct WebReader: PlatformViewRepresentable {
webView.configuration.userContentController = contentController
webView.configuration.userContentController.removeAllScriptMessageHandlers()
+ webView.uiDelegate
#if os(iOS)
webView.isOpaque = false
webView.backgroundColor = .clear
@@ -74,6 +76,7 @@ struct WebReader: PlatformViewRepresentable {
context.coordinator.linkHandler = openLinkAction
context.coordinator.webViewActionHandler = webViewActionHandler
context.coordinator.updateNavBarVisibilityRatio = navBarVisibilityRatioUpdater
+ context.coordinator.scrollPercentHandler = scrollPercentHandler
context.coordinator.updateShowBottomBar = { newValue in
self.showBottomBar = newValue
}
diff --git a/apple/OmnivoreKit/Sources/App/Views/WebReader/WebReaderContainer.swift b/apple/OmnivoreKit/Sources/App/Views/WebReader/WebReaderContainer.swift
index cbe02bc0a..0efa6e090 100644
--- a/apple/OmnivoreKit/Sources/App/Views/WebReader/WebReaderContainer.swift
+++ b/apple/OmnivoreKit/Sources/App/Views/WebReader/WebReaderContainer.swift
@@ -30,6 +30,7 @@ struct WebReaderContainerView: View {
@State private var errorAlertMessage: String?
@State private var showErrorAlertMessage = false
@State private var showRecommendSheet = false
+ @State private var lastScrollPercentage: Int?
@State var safariWebLink: SafariWebLink?
@State var displayLinkSheet = false
@@ -56,6 +57,10 @@ struct WebReaderContainerView: View {
}
}
+ func scrollPercentHandler(percent: Int) {
+ lastScrollPercentage = percent
+ }
+
func onHighlightListViewDismissal() {
// Reload the web view if mutation happened in highlights list modal
guard hasPerformedHighlightMutations else { return }
@@ -369,6 +374,7 @@ struct WebReaderContainerView: View {
#endif
},
tapHandler: tapHandler,
+ scrollPercentHandler: scrollPercentHandler,
webViewActionHandler: webViewActionHandler,
navBarVisibilityRatioUpdater: {
navBarVisibilityRatio = $0
@@ -381,6 +387,20 @@ struct WebReaderContainerView: View {
showBottomBar: $showBottomBar,
showHighlightAnnotationModal: $showHighlightAnnotationModal
)
+ .onAppear {
+ if item.isUnread {
+ dataService.updateLinkReadingProgress(itemID: item.unwrappedID, readingProgress: 0.1, anchorIndex: 0)
+ }
+ }
+ .onDisappear {
+// if let lastScrollPercentage = self.lastScrollPercentage {
+// dataService.updateLinkReadingProgress(
+// itemID: item.unwrappedID,
+// readingProgress: Double(lastScrollPercentage),
+// anchorIndex: 0
+// )
+// }
+ }
.confirmationDialog(linkToOpen?.absoluteString ?? "", isPresented: $displayLinkSheet) {
Button(action: {
if let linkToOpen = linkToOpen {
@@ -495,9 +515,13 @@ struct WebReaderContainerView: View {
readerSettingsChangedTransactionID = UUID()
}
#endif
+ .onAppear {
+ try? WebViewManager.shared().dispatchEvent(.saveReadPosition)
+ }
.onDisappear {
+ try? WebViewManager.shared().dispatchEvent(.saveReadPosition)
// Clear the shared webview content when exiting
- WebViewManager.shared().loadHTMLString("", baseURL: nil)
+ // WebViewManager.shared().loadHTMLString("", baseURL: nil)
}
}
diff --git a/apple/OmnivoreKit/Sources/App/Views/WebReader/WebReaderCoordinator.swift b/apple/OmnivoreKit/Sources/App/Views/WebReader/WebReaderCoordinator.swift
index cffc3a7df..88d9d5603 100644
--- a/apple/OmnivoreKit/Sources/App/Views/WebReader/WebReaderCoordinator.swift
+++ b/apple/OmnivoreKit/Sources/App/Views/WebReader/WebReaderCoordinator.swift
@@ -13,6 +13,7 @@ typealias WKScriptMessageReplyHandler = (Any?, String?) -> Void
final class WebReaderCoordinator: NSObject {
var webViewActionHandler: (WKScriptMessage, WKScriptMessageReplyHandler?) -> Void = { _, _ in }
var linkHandler: (URL) -> Void = { _ in }
+ var scrollPercentHandler: ((Int) -> Void) = { _ in }
var needsReload = false
var lastSavedAnnotationID: UUID?
var previousReaderSettingsChangedUUID: UUID?
@@ -128,6 +129,9 @@ extension WebReaderCoordinator: WKNavigationDelegate {
} else {
updateShowBottomBar(false)
}
+
+ let percent = Int(((yOffset + scrollView.visibleSize.height) / scrollView.contentSize.height) * 100)
+ scrollPercentHandler(max(0, min(percent, 100)))
}
func scrollViewDidEndDragging(_ scrollView: UIScrollView, willDecelerate decelerate: Bool) {
diff --git a/apple/OmnivoreKit/Sources/Models/CoreData/CoreDataModel.xcdatamodeld/CoreDataModel.xcdatamodel/contents b/apple/OmnivoreKit/Sources/Models/CoreData/CoreDataModel.xcdatamodeld/CoreDataModel.xcdatamodel/contents
index 589583ad6..fe602d2a1 100644
--- a/apple/OmnivoreKit/Sources/Models/CoreData/CoreDataModel.xcdatamodeld/CoreDataModel.xcdatamodel/contents
+++ b/apple/OmnivoreKit/Sources/Models/CoreData/CoreDataModel.xcdatamodeld/CoreDataModel.xcdatamodel/contents
@@ -56,6 +56,7 @@
+
diff --git a/apple/OmnivoreKit/Sources/Models/DataModels/FeedItem.swift b/apple/OmnivoreKit/Sources/Models/DataModels/FeedItem.swift
index e07f2edf9..6ab31e75b 100644
--- a/apple/OmnivoreKit/Sources/Models/DataModels/FeedItem.swift
+++ b/apple/OmnivoreKit/Sources/Models/DataModels/FeedItem.swift
@@ -55,6 +55,7 @@ public struct JSONArticle: Decodable {
public let url: String
public let isArchived: Bool
public let language: String?
+ public let wordsCount: Int?
}
public extension LinkedItem {
@@ -69,6 +70,10 @@ public extension LinkedItem {
(labels?.count ?? 0) > 0
}
+ var isUnread: Bool {
+ readingProgress <= 0
+ }
+
var isRead: Bool {
readingProgress >= 0.98
}
diff --git a/apple/OmnivoreKit/Sources/Services/DataService/GQLSchema.swift b/apple/OmnivoreKit/Sources/Services/DataService/GQLSchema.swift
index 492f79f51..6ad1da397 100644
--- a/apple/OmnivoreKit/Sources/Services/DataService/GQLSchema.swift
+++ b/apple/OmnivoreKit/Sources/Services/DataService/GQLSchema.swift
@@ -700,6 +700,7 @@ extension Objects {
let updatedAt: [String: DateTime]
let uploadFileId: [String: String]
let url: [String: String]
+ let wordsCount: [String: Int]
enum TypeName: String, Codable {
case article = "Article"
@@ -871,6 +872,10 @@ extension Objects.Article: Decodable {
if let value = try container.decode(String?.self, forKey: codingKey) {
map.set(key: field, hash: alias, value: value as Any)
}
+ case "wordsCount":
+ if let value = try container.decode(Int?.self, forKey: codingKey) {
+ map.set(key: field, hash: alias, value: value as Any)
+ }
default:
throw DecodingError.dataCorrupted(
DecodingError.Context(
@@ -919,6 +924,7 @@ extension Objects.Article: Decodable {
updatedAt = map["updatedAt"]
uploadFileId = map["uploadFileId"]
url = map["url"]
+ wordsCount = map["wordsCount"]
}
}
@@ -1538,6 +1544,21 @@ extension Fields where TypeLock == Objects.Article {
return String.mockValue
}
}
+
+ func wordsCount() throws -> Int? {
+ let field = GraphQLField.leaf(
+ name: "wordsCount",
+ arguments: []
+ )
+ select(field)
+
+ switch response {
+ case let .decoding(data):
+ return data.wordsCount[field.alias!]
+ case .mocking:
+ return nil
+ }
+ }
}
extension Selection where TypeLock == Never, Type == Never {
@@ -2307,6 +2328,136 @@ extension Selection where TypeLock == Never, Type == Never {
typealias ArticlesSuccess = Selection
}
+extension Objects {
+ struct BulkActionError {
+ let __typename: TypeName = .bulkActionError
+ let errorCodes: [String: [Enums.BulkActionErrorCode]]
+
+ enum TypeName: String, Codable {
+ case bulkActionError = "BulkActionError"
+ }
+ }
+}
+
+extension Objects.BulkActionError: Decodable {
+ init(from decoder: Decoder) throws {
+ let container = try decoder.container(keyedBy: DynamicCodingKeys.self)
+
+ var map = HashMap()
+ for codingKey in container.allKeys {
+ if codingKey.isTypenameKey { continue }
+
+ let alias = codingKey.stringValue
+ let field = GraphQLField.getFieldNameFromAlias(alias)
+
+ switch field {
+ case "errorCodes":
+ if let value = try container.decode([Enums.BulkActionErrorCode]?.self, forKey: codingKey) {
+ map.set(key: field, hash: alias, value: value as Any)
+ }
+ default:
+ throw DecodingError.dataCorrupted(
+ DecodingError.Context(
+ codingPath: decoder.codingPath,
+ debugDescription: "Unknown key \(field)."
+ )
+ )
+ }
+ }
+
+ errorCodes = map["errorCodes"]
+ }
+}
+
+extension Fields where TypeLock == Objects.BulkActionError {
+ func errorCodes() throws -> [Enums.BulkActionErrorCode] {
+ let field = GraphQLField.leaf(
+ name: "errorCodes",
+ arguments: []
+ )
+ select(field)
+
+ switch response {
+ case let .decoding(data):
+ if let data = data.errorCodes[field.alias!] {
+ return data
+ }
+ throw HttpError.badpayload
+ case .mocking:
+ return []
+ }
+ }
+}
+
+extension Selection where TypeLock == Never, Type == Never {
+ typealias BulkActionError = Selection
+}
+
+extension Objects {
+ struct BulkActionSuccess {
+ let __typename: TypeName = .bulkActionSuccess
+ let success: [String: Bool]
+
+ enum TypeName: String, Codable {
+ case bulkActionSuccess = "BulkActionSuccess"
+ }
+ }
+}
+
+extension Objects.BulkActionSuccess: Decodable {
+ init(from decoder: Decoder) throws {
+ let container = try decoder.container(keyedBy: DynamicCodingKeys.self)
+
+ var map = HashMap()
+ for codingKey in container.allKeys {
+ if codingKey.isTypenameKey { continue }
+
+ let alias = codingKey.stringValue
+ let field = GraphQLField.getFieldNameFromAlias(alias)
+
+ switch field {
+ case "success":
+ if let value = try container.decode(Bool?.self, forKey: codingKey) {
+ map.set(key: field, hash: alias, value: value as Any)
+ }
+ default:
+ throw DecodingError.dataCorrupted(
+ DecodingError.Context(
+ codingPath: decoder.codingPath,
+ debugDescription: "Unknown key \(field)."
+ )
+ )
+ }
+ }
+
+ success = map["success"]
+ }
+}
+
+extension Fields where TypeLock == Objects.BulkActionSuccess {
+ func success() throws -> Bool {
+ let field = GraphQLField.leaf(
+ name: "success",
+ arguments: []
+ )
+ select(field)
+
+ switch response {
+ case let .decoding(data):
+ if let data = data.success[field.alias!] {
+ return data
+ }
+ throw HttpError.badpayload
+ case .mocking:
+ return Bool.mockValue
+ }
+ }
+}
+
+extension Selection where TypeLock == Never, Type == Never {
+ typealias BulkActionSuccess = Selection
+}
+
extension Objects {
struct CreateArticleError {
let __typename: TypeName = .createArticleError
@@ -9356,6 +9507,136 @@ extension Selection where TypeLock == Never, Type == Never {
typealias LoginSuccess = Selection
}
+extension Objects {
+ struct MarkEmailAsItemError {
+ let __typename: TypeName = .markEmailAsItemError
+ let errorCodes: [String: [Enums.MarkEmailAsItemErrorCode]]
+
+ enum TypeName: String, Codable {
+ case markEmailAsItemError = "MarkEmailAsItemError"
+ }
+ }
+}
+
+extension Objects.MarkEmailAsItemError: Decodable {
+ init(from decoder: Decoder) throws {
+ let container = try decoder.container(keyedBy: DynamicCodingKeys.self)
+
+ var map = HashMap()
+ for codingKey in container.allKeys {
+ if codingKey.isTypenameKey { continue }
+
+ let alias = codingKey.stringValue
+ let field = GraphQLField.getFieldNameFromAlias(alias)
+
+ switch field {
+ case "errorCodes":
+ if let value = try container.decode([Enums.MarkEmailAsItemErrorCode]?.self, forKey: codingKey) {
+ map.set(key: field, hash: alias, value: value as Any)
+ }
+ default:
+ throw DecodingError.dataCorrupted(
+ DecodingError.Context(
+ codingPath: decoder.codingPath,
+ debugDescription: "Unknown key \(field)."
+ )
+ )
+ }
+ }
+
+ errorCodes = map["errorCodes"]
+ }
+}
+
+extension Fields where TypeLock == Objects.MarkEmailAsItemError {
+ func errorCodes() throws -> [Enums.MarkEmailAsItemErrorCode] {
+ let field = GraphQLField.leaf(
+ name: "errorCodes",
+ arguments: []
+ )
+ select(field)
+
+ switch response {
+ case let .decoding(data):
+ if let data = data.errorCodes[field.alias!] {
+ return data
+ }
+ throw HttpError.badpayload
+ case .mocking:
+ return []
+ }
+ }
+}
+
+extension Selection where TypeLock == Never, Type == Never {
+ typealias MarkEmailAsItemError = Selection
+}
+
+extension Objects {
+ struct MarkEmailAsItemSuccess {
+ let __typename: TypeName = .markEmailAsItemSuccess
+ let success: [String: Bool]
+
+ enum TypeName: String, Codable {
+ case markEmailAsItemSuccess = "MarkEmailAsItemSuccess"
+ }
+ }
+}
+
+extension Objects.MarkEmailAsItemSuccess: Decodable {
+ init(from decoder: Decoder) throws {
+ let container = try decoder.container(keyedBy: DynamicCodingKeys.self)
+
+ var map = HashMap()
+ for codingKey in container.allKeys {
+ if codingKey.isTypenameKey { continue }
+
+ let alias = codingKey.stringValue
+ let field = GraphQLField.getFieldNameFromAlias(alias)
+
+ switch field {
+ case "success":
+ if let value = try container.decode(Bool?.self, forKey: codingKey) {
+ map.set(key: field, hash: alias, value: value as Any)
+ }
+ default:
+ throw DecodingError.dataCorrupted(
+ DecodingError.Context(
+ codingPath: decoder.codingPath,
+ debugDescription: "Unknown key \(field)."
+ )
+ )
+ }
+ }
+
+ success = map["success"]
+ }
+}
+
+extension Fields where TypeLock == Objects.MarkEmailAsItemSuccess {
+ func success() throws -> Bool {
+ let field = GraphQLField.leaf(
+ name: "success",
+ arguments: []
+ )
+ select(field)
+
+ switch response {
+ case let .decoding(data):
+ if let data = data.success[field.alias!] {
+ return data
+ }
+ throw HttpError.badpayload
+ case .mocking:
+ return Bool.mockValue
+ }
+ }
+}
+
+extension Selection where TypeLock == Never, Type == Never {
+ typealias MarkEmailAsItemSuccess = Selection
+}
+
extension Objects {
struct MergeHighlightError {
let __typename: TypeName = .mergeHighlightError
@@ -9777,6 +10058,7 @@ extension Objects {
struct Mutation {
let __typename: TypeName = .mutation
let addPopularRead: [String: Unions.AddPopularReadResult]
+ let bulkAction: [String: Unions.BulkActionResult]
let createArticle: [String: Unions.CreateArticleResult]
let createArticleSavingRequest: [String: Unions.CreateArticleSavingRequestResult]
let createGroup: [String: Unions.CreateGroupResult]
@@ -9803,6 +10085,7 @@ extension Objects {
let joinGroup: [String: Unions.JoinGroupResult]
let leaveGroup: [String: Unions.LeaveGroupResult]
let logOut: [String: Unions.LogOutResult]
+ let markEmailAsItem: [String: Unions.MarkEmailAsItemResult]
let mergeHighlight: [String: Unions.MergeHighlightResult]
let moveFilter: [String: Unions.MoveFilterResult]
let moveLabel: [String: Unions.MoveLabelResult]
@@ -9840,6 +10123,7 @@ extension Objects {
let updateUser: [String: Unions.UpdateUserResult]
let updateUserProfile: [String: Unions.UpdateUserProfileResult]
let uploadFileRequest: [String: Unions.UploadFileRequestResult]
+ let uploadImportFile: [String: Unions.UploadImportFileResult]
enum TypeName: String, Codable {
case mutation = "Mutation"
@@ -9863,6 +10147,10 @@ extension Objects.Mutation: Decodable {
if let value = try container.decode(Unions.AddPopularReadResult?.self, forKey: codingKey) {
map.set(key: field, hash: alias, value: value as Any)
}
+ case "bulkAction":
+ if let value = try container.decode(Unions.BulkActionResult?.self, forKey: codingKey) {
+ map.set(key: field, hash: alias, value: value as Any)
+ }
case "createArticle":
if let value = try container.decode(Unions.CreateArticleResult?.self, forKey: codingKey) {
map.set(key: field, hash: alias, value: value as Any)
@@ -9967,6 +10255,10 @@ extension Objects.Mutation: Decodable {
if let value = try container.decode(Unions.LogOutResult?.self, forKey: codingKey) {
map.set(key: field, hash: alias, value: value as Any)
}
+ case "markEmailAsItem":
+ if let value = try container.decode(Unions.MarkEmailAsItemResult?.self, forKey: codingKey) {
+ map.set(key: field, hash: alias, value: value as Any)
+ }
case "mergeHighlight":
if let value = try container.decode(Unions.MergeHighlightResult?.self, forKey: codingKey) {
map.set(key: field, hash: alias, value: value as Any)
@@ -10115,6 +10407,10 @@ extension Objects.Mutation: Decodable {
if let value = try container.decode(Unions.UploadFileRequestResult?.self, forKey: codingKey) {
map.set(key: field, hash: alias, value: value as Any)
}
+ case "uploadImportFile":
+ if let value = try container.decode(Unions.UploadImportFileResult?.self, forKey: codingKey) {
+ map.set(key: field, hash: alias, value: value as Any)
+ }
default:
throw DecodingError.dataCorrupted(
DecodingError.Context(
@@ -10126,6 +10422,7 @@ extension Objects.Mutation: Decodable {
}
addPopularRead = map["addPopularRead"]
+ bulkAction = map["bulkAction"]
createArticle = map["createArticle"]
createArticleSavingRequest = map["createArticleSavingRequest"]
createGroup = map["createGroup"]
@@ -10152,6 +10449,7 @@ extension Objects.Mutation: Decodable {
joinGroup = map["joinGroup"]
leaveGroup = map["leaveGroup"]
logOut = map["logOut"]
+ markEmailAsItem = map["markEmailAsItem"]
mergeHighlight = map["mergeHighlight"]
moveFilter = map["moveFilter"]
moveLabel = map["moveLabel"]
@@ -10189,6 +10487,7 @@ extension Objects.Mutation: Decodable {
updateUser = map["updateUser"]
updateUserProfile = map["updateUserProfile"]
uploadFileRequest = map["uploadFileRequest"]
+ uploadImportFile = map["uploadImportFile"]
}
}
@@ -10212,6 +10511,25 @@ extension Fields where TypeLock == Objects.Mutation {
}
}
+ func bulkAction(action: Enums.BulkActionType, query: OptionalArgument = .absent(), selection: Selection) throws -> Type {
+ let field = GraphQLField.composite(
+ name: "bulkAction",
+ arguments: [Argument(name: "action", type: "BulkActionType!", value: action), Argument(name: "query", type: "String", value: query)],
+ selection: selection.selection
+ )
+ select(field)
+
+ switch response {
+ case let .decoding(data):
+ if let data = data.bulkAction[field.alias!] {
+ return try selection.decode(data: data)
+ }
+ throw HttpError.badpayload
+ case .mocking:
+ return selection.mock()
+ }
+ }
+
func createArticle(input: InputObjects.CreateArticleInput, selection: Selection) throws -> Type {
let field = GraphQLField.composite(
name: "createArticle",
@@ -10706,6 +11024,25 @@ extension Fields where TypeLock == Objects.Mutation {
}
}
+ func markEmailAsItem(recentEmailId: String, selection: Selection) throws -> Type {
+ let field = GraphQLField.composite(
+ name: "markEmailAsItem",
+ arguments: [Argument(name: "recentEmailId", type: "ID!", value: recentEmailId)],
+ selection: selection.selection
+ )
+ select(field)
+
+ switch response {
+ case let .decoding(data):
+ if let data = data.markEmailAsItem[field.alias!] {
+ return try selection.decode(data: data)
+ }
+ throw HttpError.badpayload
+ case .mocking:
+ return selection.mock()
+ }
+ }
+
func mergeHighlight(input: InputObjects.MergeHighlightInput, selection: Selection) throws -> Type {
let field = GraphQLField.composite(
name: "mergeHighlight",
@@ -11408,6 +11745,25 @@ extension Fields where TypeLock == Objects.Mutation {
return selection.mock()
}
}
+
+ func uploadImportFile(contentType: String, type: Enums.UploadImportFileType, selection: Selection) throws -> Type {
+ let field = GraphQLField.composite(
+ name: "uploadImportFile",
+ arguments: [Argument(name: "contentType", type: "String!", value: contentType), Argument(name: "type", type: "UploadImportFileType!", value: type)],
+ selection: selection.selection
+ )
+ select(field)
+
+ switch response {
+ case let .decoding(data):
+ if let data = data.uploadImportFile[field.alias!] {
+ return try selection.decode(data: data)
+ }
+ throw HttpError.badpayload
+ case .mocking:
+ return selection.mock()
+ }
+ }
}
extension Selection where TypeLock == Never, Type == Never {
@@ -11419,7 +11775,9 @@ extension Objects {
let __typename: TypeName = .newsletterEmail
let address: [String: String]
let confirmationCode: [String: String]
+ let createdAt: [String: DateTime]
let id: [String: String]
+ let subscriptionCount: [String: Int]
enum TypeName: String, Codable {
case newsletterEmail = "NewsletterEmail"
@@ -11447,10 +11805,18 @@ extension Objects.NewsletterEmail: Decodable {
if let value = try container.decode(String?.self, forKey: codingKey) {
map.set(key: field, hash: alias, value: value as Any)
}
+ case "createdAt":
+ if let value = try container.decode(DateTime?.self, forKey: codingKey) {
+ map.set(key: field, hash: alias, value: value as Any)
+ }
case "id":
if let value = try container.decode(String?.self, forKey: codingKey) {
map.set(key: field, hash: alias, value: value as Any)
}
+ case "subscriptionCount":
+ if let value = try container.decode(Int?.self, forKey: codingKey) {
+ map.set(key: field, hash: alias, value: value as Any)
+ }
default:
throw DecodingError.dataCorrupted(
DecodingError.Context(
@@ -11463,7 +11829,9 @@ extension Objects.NewsletterEmail: Decodable {
address = map["address"]
confirmationCode = map["confirmationCode"]
+ createdAt = map["createdAt"]
id = map["id"]
+ subscriptionCount = map["subscriptionCount"]
}
}
@@ -11501,6 +11869,24 @@ extension Fields where TypeLock == Objects.NewsletterEmail {
}
}
+ func createdAt() throws -> DateTime {
+ let field = GraphQLField.leaf(
+ name: "createdAt",
+ arguments: []
+ )
+ select(field)
+
+ switch response {
+ case let .decoding(data):
+ if let data = data.createdAt[field.alias!] {
+ return data
+ }
+ throw HttpError.badpayload
+ case .mocking:
+ return DateTime.mockValue
+ }
+ }
+
func id() throws -> String {
let field = GraphQLField.leaf(
name: "id",
@@ -11518,6 +11904,24 @@ extension Fields where TypeLock == Objects.NewsletterEmail {
return String.mockValue
}
}
+
+ func subscriptionCount() throws -> Int {
+ let field = GraphQLField.leaf(
+ name: "subscriptionCount",
+ arguments: []
+ )
+ select(field)
+
+ switch response {
+ case let .decoding(data):
+ if let data = data.subscriptionCount[field.alias!] {
+ return data
+ }
+ throw HttpError.badpayload
+ case .mocking:
+ return Int.mockValue
+ }
+ }
}
extension Selection where TypeLock == Never, Type == Never {
@@ -12480,6 +12884,7 @@ extension Objects {
let labels: [String: Unions.LabelsResult]
let me: [String: Objects.User]
let newsletterEmails: [String: Unions.NewsletterEmailsResult]
+ let recentEmails: [String: Unions.RecentEmailsResult]
let recentSearches: [String: Unions.RecentSearchesResult]
let reminder: [String: Unions.ReminderResult]
let rules: [String: Unions.RulesResult]
@@ -12577,6 +12982,10 @@ extension Objects.Query: Decodable {
if let value = try container.decode(Unions.NewsletterEmailsResult?.self, forKey: codingKey) {
map.set(key: field, hash: alias, value: value as Any)
}
+ case "recentEmails":
+ if let value = try container.decode(Unions.RecentEmailsResult?.self, forKey: codingKey) {
+ map.set(key: field, hash: alias, value: value as Any)
+ }
case "recentSearches":
if let value = try container.decode(Unions.RecentSearchesResult?.self, forKey: codingKey) {
map.set(key: field, hash: alias, value: value as Any)
@@ -12659,6 +13068,7 @@ extension Objects.Query: Decodable {
labels = map["labels"]
me = map["me"]
newsletterEmails = map["newsletterEmails"]
+ recentEmails = map["recentEmails"]
recentSearches = map["recentSearches"]
reminder = map["reminder"]
rules = map["rules"]
@@ -12696,10 +13106,10 @@ extension Fields where TypeLock == Objects.Query {
}
}
- func article(slug: String, username: String, selection: Selection) throws -> Type {
+ func article(format: OptionalArgument = .absent(), slug: String, username: String, selection: Selection) throws -> Type {
let field = GraphQLField.composite(
name: "article",
- arguments: [Argument(name: "slug", type: "String!", value: slug), Argument(name: "username", type: "String!", value: username)],
+ arguments: [Argument(name: "format", type: "String", value: format), Argument(name: "slug", type: "String!", value: slug), Argument(name: "username", type: "String!", value: username)],
selection: selection.selection
)
select(field)
@@ -12974,6 +13384,25 @@ extension Fields where TypeLock == Objects.Query {
}
}
+ func recentEmails(selection: Selection) throws -> Type {
+ let field = GraphQLField.composite(
+ name: "recentEmails",
+ arguments: [],
+ selection: selection.selection
+ )
+ select(field)
+
+ switch response {
+ case let .decoding(data):
+ if let data = data.recentEmails[field.alias!] {
+ return try selection.decode(data: data)
+ }
+ throw HttpError.badpayload
+ case .mocking:
+ return selection.mock()
+ }
+ }
+
func recentSearches(selection: Selection) throws -> Type {
let field = GraphQLField.composite(
name: "recentSearches",
@@ -13031,10 +13460,10 @@ extension Fields where TypeLock == Objects.Query {
}
}
- func search(after: OptionalArgument = .absent(), first: OptionalArgument = .absent(), query: OptionalArgument = .absent(), selection: Selection) throws -> Type {
+ func search(after: OptionalArgument = .absent(), first: OptionalArgument = .absent(), format: OptionalArgument = .absent(), includeContent: OptionalArgument = .absent(), query: OptionalArgument = .absent(), selection: Selection) throws -> Type {
let field = GraphQLField.composite(
name: "search",
- arguments: [Argument(name: "after", type: "String", value: after), Argument(name: "first", type: "Int", value: first), Argument(name: "query", type: "String", value: query)],
+ arguments: [Argument(name: "after", type: "String", value: after), Argument(name: "first", type: "Int", value: first), Argument(name: "format", type: "String", value: format), Argument(name: "includeContent", type: "Boolean", value: includeContent), Argument(name: "query", type: "String", value: query)],
selection: selection.selection
)
select(field)
@@ -13534,6 +13963,367 @@ extension Selection where TypeLock == Never, Type == Never {
typealias ReadState = Selection
}
+extension Objects {
+ struct RecentEmail {
+ let __typename: TypeName = .recentEmail
+ let createdAt: [String: DateTime]
+ let from: [String: String]
+ let html: [String: String]
+ let id: [String: String]
+ let subject: [String: String]
+ let text: [String: String]
+ let to: [String: String]
+ let type: [String: String]
+
+ enum TypeName: String, Codable {
+ case recentEmail = "RecentEmail"
+ }
+ }
+}
+
+extension Objects.RecentEmail: Decodable {
+ init(from decoder: Decoder) throws {
+ let container = try decoder.container(keyedBy: DynamicCodingKeys.self)
+
+ var map = HashMap()
+ for codingKey in container.allKeys {
+ if codingKey.isTypenameKey { continue }
+
+ let alias = codingKey.stringValue
+ let field = GraphQLField.getFieldNameFromAlias(alias)
+
+ switch field {
+ case "createdAt":
+ if let value = try container.decode(DateTime?.self, forKey: codingKey) {
+ map.set(key: field, hash: alias, value: value as Any)
+ }
+ case "from":
+ if let value = try container.decode(String?.self, forKey: codingKey) {
+ map.set(key: field, hash: alias, value: value as Any)
+ }
+ case "html":
+ if let value = try container.decode(String?.self, forKey: codingKey) {
+ map.set(key: field, hash: alias, value: value as Any)
+ }
+ case "id":
+ if let value = try container.decode(String?.self, forKey: codingKey) {
+ map.set(key: field, hash: alias, value: value as Any)
+ }
+ case "subject":
+ if let value = try container.decode(String?.self, forKey: codingKey) {
+ map.set(key: field, hash: alias, value: value as Any)
+ }
+ case "text":
+ if let value = try container.decode(String?.self, forKey: codingKey) {
+ map.set(key: field, hash: alias, value: value as Any)
+ }
+ case "to":
+ if let value = try container.decode(String?.self, forKey: codingKey) {
+ map.set(key: field, hash: alias, value: value as Any)
+ }
+ case "type":
+ if let value = try container.decode(String?.self, forKey: codingKey) {
+ map.set(key: field, hash: alias, value: value as Any)
+ }
+ default:
+ throw DecodingError.dataCorrupted(
+ DecodingError.Context(
+ codingPath: decoder.codingPath,
+ debugDescription: "Unknown key \(field)."
+ )
+ )
+ }
+ }
+
+ createdAt = map["createdAt"]
+ from = map["from"]
+ html = map["html"]
+ id = map["id"]
+ subject = map["subject"]
+ text = map["text"]
+ to = map["to"]
+ type = map["type"]
+ }
+}
+
+extension Fields where TypeLock == Objects.RecentEmail {
+ func createdAt() throws -> DateTime {
+ let field = GraphQLField.leaf(
+ name: "createdAt",
+ arguments: []
+ )
+ select(field)
+
+ switch response {
+ case let .decoding(data):
+ if let data = data.createdAt[field.alias!] {
+ return data
+ }
+ throw HttpError.badpayload
+ case .mocking:
+ return DateTime.mockValue
+ }
+ }
+
+ func from() throws -> String {
+ let field = GraphQLField.leaf(
+ name: "from",
+ arguments: []
+ )
+ select(field)
+
+ switch response {
+ case let .decoding(data):
+ if let data = data.from[field.alias!] {
+ return data
+ }
+ throw HttpError.badpayload
+ case .mocking:
+ return String.mockValue
+ }
+ }
+
+ func html() throws -> String? {
+ let field = GraphQLField.leaf(
+ name: "html",
+ arguments: []
+ )
+ select(field)
+
+ switch response {
+ case let .decoding(data):
+ return data.html[field.alias!]
+ case .mocking:
+ return nil
+ }
+ }
+
+ func id() throws -> String {
+ let field = GraphQLField.leaf(
+ name: "id",
+ arguments: []
+ )
+ select(field)
+
+ switch response {
+ case let .decoding(data):
+ if let data = data.id[field.alias!] {
+ return data
+ }
+ throw HttpError.badpayload
+ case .mocking:
+ return String.mockValue
+ }
+ }
+
+ func subject() throws -> String {
+ let field = GraphQLField.leaf(
+ name: "subject",
+ arguments: []
+ )
+ select(field)
+
+ switch response {
+ case let .decoding(data):
+ if let data = data.subject[field.alias!] {
+ return data
+ }
+ throw HttpError.badpayload
+ case .mocking:
+ return String.mockValue
+ }
+ }
+
+ func text() throws -> String {
+ let field = GraphQLField.leaf(
+ name: "text",
+ arguments: []
+ )
+ select(field)
+
+ switch response {
+ case let .decoding(data):
+ if let data = data.text[field.alias!] {
+ return data
+ }
+ throw HttpError.badpayload
+ case .mocking:
+ return String.mockValue
+ }
+ }
+
+ func to() throws -> String {
+ let field = GraphQLField.leaf(
+ name: "to",
+ arguments: []
+ )
+ select(field)
+
+ switch response {
+ case let .decoding(data):
+ if let data = data.to[field.alias!] {
+ return data
+ }
+ throw HttpError.badpayload
+ case .mocking:
+ return String.mockValue
+ }
+ }
+
+ func type() throws -> String {
+ let field = GraphQLField.leaf(
+ name: "type",
+ arguments: []
+ )
+ select(field)
+
+ switch response {
+ case let .decoding(data):
+ if let data = data.type[field.alias!] {
+ return data
+ }
+ throw HttpError.badpayload
+ case .mocking:
+ return String.mockValue
+ }
+ }
+}
+
+extension Selection where TypeLock == Never, Type == Never {
+ typealias RecentEmail = Selection
+}
+
+extension Objects {
+ struct RecentEmailsError {
+ let __typename: TypeName = .recentEmailsError
+ let errorCodes: [String: [Enums.RecentEmailsErrorCode]]
+
+ enum TypeName: String, Codable {
+ case recentEmailsError = "RecentEmailsError"
+ }
+ }
+}
+
+extension Objects.RecentEmailsError: Decodable {
+ init(from decoder: Decoder) throws {
+ let container = try decoder.container(keyedBy: DynamicCodingKeys.self)
+
+ var map = HashMap()
+ for codingKey in container.allKeys {
+ if codingKey.isTypenameKey { continue }
+
+ let alias = codingKey.stringValue
+ let field = GraphQLField.getFieldNameFromAlias(alias)
+
+ switch field {
+ case "errorCodes":
+ if let value = try container.decode([Enums.RecentEmailsErrorCode]?.self, forKey: codingKey) {
+ map.set(key: field, hash: alias, value: value as Any)
+ }
+ default:
+ throw DecodingError.dataCorrupted(
+ DecodingError.Context(
+ codingPath: decoder.codingPath,
+ debugDescription: "Unknown key \(field)."
+ )
+ )
+ }
+ }
+
+ errorCodes = map["errorCodes"]
+ }
+}
+
+extension Fields where TypeLock == Objects.RecentEmailsError {
+ func errorCodes() throws -> [Enums.RecentEmailsErrorCode] {
+ let field = GraphQLField.leaf(
+ name: "errorCodes",
+ arguments: []
+ )
+ select(field)
+
+ switch response {
+ case let .decoding(data):
+ if let data = data.errorCodes[field.alias!] {
+ return data
+ }
+ throw HttpError.badpayload
+ case .mocking:
+ return []
+ }
+ }
+}
+
+extension Selection where TypeLock == Never, Type == Never {
+ typealias RecentEmailsError = Selection
+}
+
+extension Objects {
+ struct RecentEmailsSuccess {
+ let __typename: TypeName = .recentEmailsSuccess
+ let recentEmails: [String: [Objects.RecentEmail]]
+
+ enum TypeName: String, Codable {
+ case recentEmailsSuccess = "RecentEmailsSuccess"
+ }
+ }
+}
+
+extension Objects.RecentEmailsSuccess: Decodable {
+ init(from decoder: Decoder) throws {
+ let container = try decoder.container(keyedBy: DynamicCodingKeys.self)
+
+ var map = HashMap()
+ for codingKey in container.allKeys {
+ if codingKey.isTypenameKey { continue }
+
+ let alias = codingKey.stringValue
+ let field = GraphQLField.getFieldNameFromAlias(alias)
+
+ switch field {
+ case "recentEmails":
+ if let value = try container.decode([Objects.RecentEmail]?.self, forKey: codingKey) {
+ map.set(key: field, hash: alias, value: value as Any)
+ }
+ default:
+ throw DecodingError.dataCorrupted(
+ DecodingError.Context(
+ codingPath: decoder.codingPath,
+ debugDescription: "Unknown key \(field)."
+ )
+ )
+ }
+ }
+
+ recentEmails = map["recentEmails"]
+ }
+}
+
+extension Fields where TypeLock == Objects.RecentEmailsSuccess {
+ func recentEmails(selection: Selection) throws -> Type {
+ let field = GraphQLField.composite(
+ name: "recentEmails",
+ arguments: [],
+ selection: selection.selection
+ )
+ select(field)
+
+ switch response {
+ case let .decoding(data):
+ if let data = data.recentEmails[field.alias!] {
+ return try selection.decode(data: data)
+ }
+ throw HttpError.badpayload
+ case .mocking:
+ return selection.mock()
+ }
+ }
+}
+
+extension Selection where TypeLock == Never, Type == Never {
+ typealias RecentEmailsSuccess = Selection
+}
+
extension Objects {
struct RecentSearch {
let __typename: TypeName = .recentSearch
@@ -16030,6 +16820,7 @@ extension Objects {
let __typename: TypeName = .searchItem
let annotation: [String: String]
let author: [String: String]
+ let content: [String: String]
let contentReader: [String: Enums.ContentReader]
let createdAt: [String: DateTime]
let description: [String: String]
@@ -16062,6 +16853,7 @@ extension Objects {
let updatedAt: [String: DateTime]
let uploadFileId: [String: String]
let url: [String: String]
+ let wordsCount: [String: Int]
enum TypeName: String, Codable {
case searchItem = "SearchItem"
@@ -16089,6 +16881,10 @@ extension Objects.SearchItem: Decodable {
if let value = try container.decode(String?.self, forKey: codingKey) {
map.set(key: field, hash: alias, value: value as Any)
}
+ case "content":
+ if let value = try container.decode(String?.self, forKey: codingKey) {
+ map.set(key: field, hash: alias, value: value as Any)
+ }
case "contentReader":
if let value = try container.decode(Enums.ContentReader?.self, forKey: codingKey) {
map.set(key: field, hash: alias, value: value as Any)
@@ -16217,6 +17013,10 @@ extension Objects.SearchItem: Decodable {
if let value = try container.decode(String?.self, forKey: codingKey) {
map.set(key: field, hash: alias, value: value as Any)
}
+ case "wordsCount":
+ if let value = try container.decode(Int?.self, forKey: codingKey) {
+ map.set(key: field, hash: alias, value: value as Any)
+ }
default:
throw DecodingError.dataCorrupted(
DecodingError.Context(
@@ -16229,6 +17029,7 @@ extension Objects.SearchItem: Decodable {
annotation = map["annotation"]
author = map["author"]
+ content = map["content"]
contentReader = map["contentReader"]
createdAt = map["createdAt"]
description = map["description"]
@@ -16261,6 +17062,7 @@ extension Objects.SearchItem: Decodable {
updatedAt = map["updatedAt"]
uploadFileId = map["uploadFileId"]
url = map["url"]
+ wordsCount = map["wordsCount"]
}
}
@@ -16295,6 +17097,21 @@ extension Fields where TypeLock == Objects.SearchItem {
}
}
+ func content() throws -> String? {
+ let field = GraphQLField.leaf(
+ name: "content",
+ arguments: []
+ )
+ select(field)
+
+ switch response {
+ case let .decoding(data):
+ return data.content[field.alias!]
+ case .mocking:
+ return nil
+ }
+ }
+
func contentReader() throws -> Enums.ContentReader {
let field = GraphQLField.leaf(
name: "contentReader",
@@ -16810,6 +17627,21 @@ extension Fields where TypeLock == Objects.SearchItem {
return String.mockValue
}
}
+
+ func wordsCount() throws -> Int? {
+ let field = GraphQLField.leaf(
+ name: "wordsCount",
+ arguments: []
+ )
+ select(field)
+
+ switch response {
+ case let .decoding(data):
+ return data.wordsCount[field.alias!]
+ case .mocking:
+ return nil
+ }
+ }
}
extension Selection where TypeLock == Never, Type == Never {
@@ -21357,6 +22189,133 @@ extension Selection where TypeLock == Never, Type == Never {
typealias UploadFileRequestSuccess = Selection
}
+extension Objects {
+ struct UploadImportFileError {
+ let __typename: TypeName = .uploadImportFileError
+ let errorCodes: [String: [Enums.UploadImportFileErrorCode]]
+
+ enum TypeName: String, Codable {
+ case uploadImportFileError = "UploadImportFileError"
+ }
+ }
+}
+
+extension Objects.UploadImportFileError: Decodable {
+ init(from decoder: Decoder) throws {
+ let container = try decoder.container(keyedBy: DynamicCodingKeys.self)
+
+ var map = HashMap()
+ for codingKey in container.allKeys {
+ if codingKey.isTypenameKey { continue }
+
+ let alias = codingKey.stringValue
+ let field = GraphQLField.getFieldNameFromAlias(alias)
+
+ switch field {
+ case "errorCodes":
+ if let value = try container.decode([Enums.UploadImportFileErrorCode]?.self, forKey: codingKey) {
+ map.set(key: field, hash: alias, value: value as Any)
+ }
+ default:
+ throw DecodingError.dataCorrupted(
+ DecodingError.Context(
+ codingPath: decoder.codingPath,
+ debugDescription: "Unknown key \(field)."
+ )
+ )
+ }
+ }
+
+ errorCodes = map["errorCodes"]
+ }
+}
+
+extension Fields where TypeLock == Objects.UploadImportFileError {
+ func errorCodes() throws -> [Enums.UploadImportFileErrorCode] {
+ let field = GraphQLField.leaf(
+ name: "errorCodes",
+ arguments: []
+ )
+ select(field)
+
+ switch response {
+ case let .decoding(data):
+ if let data = data.errorCodes[field.alias!] {
+ return data
+ }
+ throw HttpError.badpayload
+ case .mocking:
+ return []
+ }
+ }
+}
+
+extension Selection where TypeLock == Never, Type == Never {
+ typealias UploadImportFileError = Selection
+}
+
+extension Objects {
+ struct UploadImportFileSuccess {
+ let __typename: TypeName = .uploadImportFileSuccess
+ let uploadSignedUrl: [String: String]
+
+ enum TypeName: String, Codable {
+ case uploadImportFileSuccess = "UploadImportFileSuccess"
+ }
+ }
+}
+
+extension Objects.UploadImportFileSuccess: Decodable {
+ init(from decoder: Decoder) throws {
+ let container = try decoder.container(keyedBy: DynamicCodingKeys.self)
+
+ var map = HashMap()
+ for codingKey in container.allKeys {
+ if codingKey.isTypenameKey { continue }
+
+ let alias = codingKey.stringValue
+ let field = GraphQLField.getFieldNameFromAlias(alias)
+
+ switch field {
+ case "uploadSignedUrl":
+ if let value = try container.decode(String?.self, forKey: codingKey) {
+ map.set(key: field, hash: alias, value: value as Any)
+ }
+ default:
+ throw DecodingError.dataCorrupted(
+ DecodingError.Context(
+ codingPath: decoder.codingPath,
+ debugDescription: "Unknown key \(field)."
+ )
+ )
+ }
+ }
+
+ uploadSignedUrl = map["uploadSignedUrl"]
+ }
+}
+
+extension Fields where TypeLock == Objects.UploadImportFileSuccess {
+ func uploadSignedUrl() throws -> String? {
+ let field = GraphQLField.leaf(
+ name: "uploadSignedUrl",
+ arguments: []
+ )
+ select(field)
+
+ switch response {
+ case let .decoding(data):
+ return data.uploadSignedUrl[field.alias!]
+ case .mocking:
+ return nil
+ }
+ }
+}
+
+extension Selection where TypeLock == Never, Type == Never {
+ typealias UploadImportFileSuccess = Selection
+}
+
extension Objects {
struct User {
let __typename: TypeName = .user
@@ -23178,6 +24137,80 @@ extension Selection where TypeLock == Never, Type == Never {
typealias ArticlesResult = Selection
}
+extension Unions {
+ struct BulkActionResult {
+ let __typename: TypeName
+ let errorCodes: [String: [Enums.BulkActionErrorCode]]
+ let success: [String: Bool]
+
+ enum TypeName: String, Codable {
+ case bulkActionError = "BulkActionError"
+ case bulkActionSuccess = "BulkActionSuccess"
+ }
+ }
+}
+
+extension Unions.BulkActionResult: Decodable {
+ init(from decoder: Decoder) throws {
+ let container = try decoder.container(keyedBy: DynamicCodingKeys.self)
+
+ var map = HashMap()
+ for codingKey in container.allKeys {
+ if codingKey.isTypenameKey { continue }
+
+ let alias = codingKey.stringValue
+ let field = GraphQLField.getFieldNameFromAlias(alias)
+
+ switch field {
+ case "errorCodes":
+ if let value = try container.decode([Enums.BulkActionErrorCode]?.self, forKey: codingKey) {
+ map.set(key: field, hash: alias, value: value as Any)
+ }
+ case "success":
+ if let value = try container.decode(Bool?.self, forKey: codingKey) {
+ map.set(key: field, hash: alias, value: value as Any)
+ }
+ default:
+ throw DecodingError.dataCorrupted(
+ DecodingError.Context(
+ codingPath: decoder.codingPath,
+ debugDescription: "Unknown key \(field)."
+ )
+ )
+ }
+ }
+
+ __typename = try container.decode(TypeName.self, forKey: DynamicCodingKeys(stringValue: "__typename")!)
+
+ errorCodes = map["errorCodes"]
+ success = map["success"]
+ }
+}
+
+extension Fields where TypeLock == Unions.BulkActionResult {
+ func on(bulkActionError: Selection, bulkActionSuccess: Selection) throws -> Type {
+ select([GraphQLField.fragment(type: "BulkActionError", selection: bulkActionError.selection), GraphQLField.fragment(type: "BulkActionSuccess", selection: bulkActionSuccess.selection)])
+
+ switch response {
+ case let .decoding(data):
+ switch data.__typename {
+ case .bulkActionError:
+ let data = Objects.BulkActionError(errorCodes: data.errorCodes)
+ return try bulkActionError.decode(data: data)
+ case .bulkActionSuccess:
+ let data = Objects.BulkActionSuccess(success: data.success)
+ return try bulkActionSuccess.decode(data: data)
+ }
+ case .mocking:
+ return bulkActionError.mock()
+ }
+ }
+}
+
+extension Selection where TypeLock == Never, Type == Never {
+ typealias BulkActionResult = Selection
+}
+
extension Unions {
struct CreateArticleResult {
let __typename: TypeName
@@ -25786,6 +26819,80 @@ extension Selection where TypeLock == Never, Type == Never {
typealias LoginResult = Selection
}
+extension Unions {
+ struct MarkEmailAsItemResult {
+ let __typename: TypeName
+ let errorCodes: [String: [Enums.MarkEmailAsItemErrorCode]]
+ let success: [String: Bool]
+
+ enum TypeName: String, Codable {
+ case markEmailAsItemError = "MarkEmailAsItemError"
+ case markEmailAsItemSuccess = "MarkEmailAsItemSuccess"
+ }
+ }
+}
+
+extension Unions.MarkEmailAsItemResult: Decodable {
+ init(from decoder: Decoder) throws {
+ let container = try decoder.container(keyedBy: DynamicCodingKeys.self)
+
+ var map = HashMap()
+ for codingKey in container.allKeys {
+ if codingKey.isTypenameKey { continue }
+
+ let alias = codingKey.stringValue
+ let field = GraphQLField.getFieldNameFromAlias(alias)
+
+ switch field {
+ case "errorCodes":
+ if let value = try container.decode([Enums.MarkEmailAsItemErrorCode]?.self, forKey: codingKey) {
+ map.set(key: field, hash: alias, value: value as Any)
+ }
+ case "success":
+ if let value = try container.decode(Bool?.self, forKey: codingKey) {
+ map.set(key: field, hash: alias, value: value as Any)
+ }
+ default:
+ throw DecodingError.dataCorrupted(
+ DecodingError.Context(
+ codingPath: decoder.codingPath,
+ debugDescription: "Unknown key \(field)."
+ )
+ )
+ }
+ }
+
+ __typename = try container.decode(TypeName.self, forKey: DynamicCodingKeys(stringValue: "__typename")!)
+
+ errorCodes = map["errorCodes"]
+ success = map["success"]
+ }
+}
+
+extension Fields where TypeLock == Unions.MarkEmailAsItemResult {
+ func on(markEmailAsItemError: Selection, markEmailAsItemSuccess: Selection) throws -> Type {
+ select([GraphQLField.fragment(type: "MarkEmailAsItemError", selection: markEmailAsItemError.selection), GraphQLField.fragment(type: "MarkEmailAsItemSuccess", selection: markEmailAsItemSuccess.selection)])
+
+ switch response {
+ case let .decoding(data):
+ switch data.__typename {
+ case .markEmailAsItemError:
+ let data = Objects.MarkEmailAsItemError(errorCodes: data.errorCodes)
+ return try markEmailAsItemError.decode(data: data)
+ case .markEmailAsItemSuccess:
+ let data = Objects.MarkEmailAsItemSuccess(success: data.success)
+ return try markEmailAsItemSuccess.decode(data: data)
+ }
+ case .mocking:
+ return markEmailAsItemError.mock()
+ }
+ }
+}
+
+extension Selection where TypeLock == Never, Type == Never {
+ typealias MarkEmailAsItemResult = Selection
+}
+
extension Unions {
struct MergeHighlightResult {
let __typename: TypeName
@@ -26162,6 +27269,80 @@ extension Selection where TypeLock == Never, Type == Never {
typealias OptInFeatureResult = Selection
}
+extension Unions {
+ struct RecentEmailsResult {
+ let __typename: TypeName
+ let errorCodes: [String: [Enums.RecentEmailsErrorCode]]
+ let recentEmails: [String: [Objects.RecentEmail]]
+
+ enum TypeName: String, Codable {
+ case recentEmailsError = "RecentEmailsError"
+ case recentEmailsSuccess = "RecentEmailsSuccess"
+ }
+ }
+}
+
+extension Unions.RecentEmailsResult: Decodable {
+ init(from decoder: Decoder) throws {
+ let container = try decoder.container(keyedBy: DynamicCodingKeys.self)
+
+ var map = HashMap()
+ for codingKey in container.allKeys {
+ if codingKey.isTypenameKey { continue }
+
+ let alias = codingKey.stringValue
+ let field = GraphQLField.getFieldNameFromAlias(alias)
+
+ switch field {
+ case "errorCodes":
+ if let value = try container.decode([Enums.RecentEmailsErrorCode]?.self, forKey: codingKey) {
+ map.set(key: field, hash: alias, value: value as Any)
+ }
+ case "recentEmails":
+ if let value = try container.decode([Objects.RecentEmail]?.self, forKey: codingKey) {
+ map.set(key: field, hash: alias, value: value as Any)
+ }
+ default:
+ throw DecodingError.dataCorrupted(
+ DecodingError.Context(
+ codingPath: decoder.codingPath,
+ debugDescription: "Unknown key \(field)."
+ )
+ )
+ }
+ }
+
+ __typename = try container.decode(TypeName.self, forKey: DynamicCodingKeys(stringValue: "__typename")!)
+
+ errorCodes = map["errorCodes"]
+ recentEmails = map["recentEmails"]
+ }
+}
+
+extension Fields where TypeLock == Unions.RecentEmailsResult {
+ func on(recentEmailsError: Selection, recentEmailsSuccess: Selection) throws -> Type {
+ select([GraphQLField.fragment(type: "RecentEmailsError", selection: recentEmailsError.selection), GraphQLField.fragment(type: "RecentEmailsSuccess", selection: recentEmailsSuccess.selection)])
+
+ switch response {
+ case let .decoding(data):
+ switch data.__typename {
+ case .recentEmailsError:
+ let data = Objects.RecentEmailsError(errorCodes: data.errorCodes)
+ return try recentEmailsError.decode(data: data)
+ case .recentEmailsSuccess:
+ let data = Objects.RecentEmailsSuccess(recentEmails: data.recentEmails)
+ return try recentEmailsSuccess.decode(data: data)
+ }
+ case .mocking:
+ return recentEmailsError.mock()
+ }
+ }
+}
+
+extension Selection where TypeLock == Never, Type == Never {
+ typealias RecentEmailsResult = Selection
+}
+
extension Unions {
struct RecentSearchesResult {
let __typename: TypeName
@@ -28960,6 +30141,80 @@ extension Selection where TypeLock == Never, Type == Never {
typealias UploadFileRequestResult = Selection
}
+extension Unions {
+ struct UploadImportFileResult {
+ let __typename: TypeName
+ let errorCodes: [String: [Enums.UploadImportFileErrorCode]]
+ let uploadSignedUrl: [String: String]
+
+ enum TypeName: String, Codable {
+ case uploadImportFileError = "UploadImportFileError"
+ case uploadImportFileSuccess = "UploadImportFileSuccess"
+ }
+ }
+}
+
+extension Unions.UploadImportFileResult: Decodable {
+ init(from decoder: Decoder) throws {
+ let container = try decoder.container(keyedBy: DynamicCodingKeys.self)
+
+ var map = HashMap()
+ for codingKey in container.allKeys {
+ if codingKey.isTypenameKey { continue }
+
+ let alias = codingKey.stringValue
+ let field = GraphQLField.getFieldNameFromAlias(alias)
+
+ switch field {
+ case "errorCodes":
+ if let value = try container.decode([Enums.UploadImportFileErrorCode]?.self, forKey: codingKey) {
+ map.set(key: field, hash: alias, value: value as Any)
+ }
+ case "uploadSignedUrl":
+ if let value = try container.decode(String?.self, forKey: codingKey) {
+ map.set(key: field, hash: alias, value: value as Any)
+ }
+ default:
+ throw DecodingError.dataCorrupted(
+ DecodingError.Context(
+ codingPath: decoder.codingPath,
+ debugDescription: "Unknown key \(field)."
+ )
+ )
+ }
+ }
+
+ __typename = try container.decode(TypeName.self, forKey: DynamicCodingKeys(stringValue: "__typename")!)
+
+ errorCodes = map["errorCodes"]
+ uploadSignedUrl = map["uploadSignedUrl"]
+ }
+}
+
+extension Fields where TypeLock == Unions.UploadImportFileResult {
+ func on(uploadImportFileError: Selection, uploadImportFileSuccess: Selection) throws -> Type {
+ select([GraphQLField.fragment(type: "UploadImportFileError", selection: uploadImportFileError.selection), GraphQLField.fragment(type: "UploadImportFileSuccess", selection: uploadImportFileSuccess.selection)])
+
+ switch response {
+ case let .decoding(data):
+ switch data.__typename {
+ case .uploadImportFileError:
+ let data = Objects.UploadImportFileError(errorCodes: data.errorCodes)
+ return try uploadImportFileError.decode(data: data)
+ case .uploadImportFileSuccess:
+ let data = Objects.UploadImportFileSuccess(uploadSignedUrl: data.uploadSignedUrl)
+ return try uploadImportFileSuccess.decode(data: data)
+ }
+ case .mocking:
+ return uploadImportFileError.mock()
+ }
+ }
+}
+
+extension Selection where TypeLock == Never, Type == Never {
+ typealias UploadImportFileResult = Selection
+}
+
extension Unions {
struct UserResult {
let __typename: TypeName
@@ -29328,6 +30583,22 @@ extension Enums {
}
}
+extension Enums {
+ /// BulkActionErrorCode
+ enum BulkActionErrorCode: String, CaseIterable, Codable {
+ case unauthorized = "UNAUTHORIZED"
+ }
+}
+
+extension Enums {
+ /// BulkActionType
+ enum BulkActionType: String, CaseIterable, Codable {
+ case archive = "ARCHIVE"
+
+ case delete = "DELETE"
+ }
+}
+
extension Enums {
/// ContentReader
enum ContentReader: String, CaseIterable, Codable {
@@ -29710,6 +30981,17 @@ extension Enums {
}
}
+extension Enums {
+ /// MarkEmailAsItemErrorCode
+ enum MarkEmailAsItemErrorCode: String, CaseIterable, Codable {
+ case badRequest = "BAD_REQUEST"
+
+ case notFound = "NOT_FOUND"
+
+ case unauthorized = "UNAUTHORIZED"
+ }
+}
+
extension Enums {
/// MergeHighlightErrorCode
enum MergeHighlightErrorCode: String, CaseIterable, Codable {
@@ -29801,6 +31083,15 @@ extension Enums {
}
}
+extension Enums {
+ /// RecentEmailsErrorCode
+ enum RecentEmailsErrorCode: String, CaseIterable, Codable {
+ case badRequest = "BAD_REQUEST"
+
+ case unauthorized = "UNAUTHORIZED"
+ }
+}
+
extension Enums {
/// RecentSearchesErrorCode
enum RecentSearchesErrorCode: String, CaseIterable, Codable {
@@ -30302,6 +31593,28 @@ extension Enums {
}
}
+extension Enums {
+ /// UploadImportFileErrorCode
+ enum UploadImportFileErrorCode: String, CaseIterable, Codable {
+ case badRequest = "BAD_REQUEST"
+
+ case unauthorized = "UNAUTHORIZED"
+
+ case uploadDailyLimitExceeded = "UPLOAD_DAILY_LIMIT_EXCEEDED"
+ }
+}
+
+extension Enums {
+ /// UploadImportFileType
+ enum UploadImportFileType: String, CaseIterable, Codable {
+ case matter = "MATTER"
+
+ case pocket = "POCKET"
+
+ case urlList = "URL_LIST"
+ }
+}
+
extension Enums {
/// UserErrorCode
enum UserErrorCode: String, CaseIterable, Codable {
@@ -30868,6 +32181,65 @@ extension InputObjects {
}
}
+extension InputObjects {
+ struct ParseResult: Encodable, Hashable {
+ var byline: OptionalArgument = .absent()
+
+ var content: String
+
+ var dir: OptionalArgument = .absent()
+
+ var excerpt: String
+
+ var language: OptionalArgument = .absent()
+
+ var length: Int
+
+ var previewImage: OptionalArgument = .absent()
+
+ var publishedDate: OptionalArgument = .absent()
+
+ var siteIcon: OptionalArgument = .absent()
+
+ var siteName: OptionalArgument = .absent()
+
+ var textContent: String
+
+ var title: String
+
+ func encode(to encoder: Encoder) throws {
+ var container = encoder.container(keyedBy: CodingKeys.self)
+ if byline.hasValue { try container.encode(byline, forKey: .byline) }
+ try container.encode(content, forKey: .content)
+ if dir.hasValue { try container.encode(dir, forKey: .dir) }
+ try container.encode(excerpt, forKey: .excerpt)
+ if language.hasValue { try container.encode(language, forKey: .language) }
+ try container.encode(length, forKey: .length)
+ if previewImage.hasValue { try container.encode(previewImage, forKey: .previewImage) }
+ if publishedDate.hasValue { try container.encode(publishedDate, forKey: .publishedDate) }
+ if siteIcon.hasValue { try container.encode(siteIcon, forKey: .siteIcon) }
+ if siteName.hasValue { try container.encode(siteName, forKey: .siteName) }
+ try container.encode(textContent, forKey: .textContent)
+ try container.encode(title, forKey: .title)
+ }
+
+ enum CodingKeys: String, CodingKey {
+ case byline
+ case content
+ case dir
+ case excerpt
+ case language
+ case length
+ case previewImage
+ case publishedDate
+ case siteIcon
+ case siteName
+ case textContent
+ case title
+ }
+ }
+}
+
extension InputObjects {
struct PreparedDocumentInput: Encodable, Hashable {
var document: String
@@ -31074,6 +32446,8 @@ extension InputObjects {
var originalContent: String
+ var parseResult: OptionalArgument = .absent()
+
var source: String
var title: OptionalArgument = .absent()
@@ -31084,6 +32458,7 @@ extension InputObjects {
var container = encoder.container(keyedBy: CodingKeys.self)
try container.encode(clientRequestId, forKey: .clientRequestId)
try container.encode(originalContent, forKey: .originalContent)
+ if parseResult.hasValue { try container.encode(parseResult, forKey: .parseResult) }
try container.encode(source, forKey: .source)
if title.hasValue { try container.encode(title, forKey: .title) }
try container.encode(url, forKey: .url)
@@ -31092,6 +32467,7 @@ extension InputObjects {
enum CodingKeys: String, CodingKey {
case clientRequestId
case originalContent
+ case parseResult
case source
case title
case url
diff --git a/apple/OmnivoreKit/Sources/Services/DataService/Mutations/UpdateArticleReadingProgress.swift b/apple/OmnivoreKit/Sources/Services/DataService/Mutations/UpdateArticleReadingProgress.swift
index 33711f651..0473a56ff 100644
--- a/apple/OmnivoreKit/Sources/Services/DataService/Mutations/UpdateArticleReadingProgress.swift
+++ b/apple/OmnivoreKit/Sources/Services/DataService/Mutations/UpdateArticleReadingProgress.swift
@@ -9,6 +9,7 @@ extension DataService {
guard let self = self else { return }
guard let linkedItem = LinkedItem.lookup(byID: itemID, inContext: self.backgroundContext) else { return }
+ print("updateLinkReadingProgress", readingProgress, anchorIndex)
linkedItem.update(
inContext: self.backgroundContext,
newReadingProgress: readingProgress,
diff --git a/apple/OmnivoreKit/Sources/Services/DataService/Queries/ArticleContentQuery.swift b/apple/OmnivoreKit/Sources/Services/DataService/Queries/ArticleContentQuery.swift
index a9170e38e..56e7a77ea 100644
--- a/apple/OmnivoreKit/Sources/Services/DataService/Queries/ArticleContentQuery.swift
+++ b/apple/OmnivoreKit/Sources/Services/DataService/Queries/ArticleContentQuery.swift
@@ -44,6 +44,7 @@ extension DataService {
contentReader: try $0.contentReader().rawValue,
originalHtml: nil,
language: try $0.language(),
+ wordsCount: try $0.wordsCount(),
recommendations: try $0.recommendations(selection: recommendationSelection.list.nullable) ?? [],
labels: try $0.labels(selection: feedItemLabelSelection.list.nullable) ?? []
),
diff --git a/apple/OmnivoreKit/Sources/Services/DataService/Queries/LinkedItemNetworkQuery.swift b/apple/OmnivoreKit/Sources/Services/DataService/Queries/LinkedItemNetworkQuery.swift
index eac3e5e26..c560cbcb1 100644
--- a/apple/OmnivoreKit/Sources/Services/DataService/Queries/LinkedItemNetworkQuery.swift
+++ b/apple/OmnivoreKit/Sources/Services/DataService/Queries/LinkedItemNetworkQuery.swift
@@ -275,6 +275,7 @@ private let libraryArticleSelection = Selection.Article {
contentReader: try $0.contentReader().rawValue,
originalHtml: nil,
language: try $0.language(),
+ wordsCount: try $0.wordsCount(),
recommendations: try $0.recommendations(selection: recommendationSelection.list.nullable) ?? [],
labels: try $0.labels(selection: feedItemLabelSelection.list.nullable) ?? []
)
@@ -313,6 +314,7 @@ private let searchItemSelection = Selection.SearchItem {
contentReader: try $0.contentReader().rawValue,
originalHtml: nil,
language: try $0.language(),
+ wordsCount: try $0.wordsCount(),
recommendations: try $0.recommendations(selection: recommendationSelection.list.nullable) ?? [],
labels: try $0.labels(selection: feedItemLabelSelection.list.nullable) ?? []
)
diff --git a/apple/OmnivoreKit/Sources/Services/InternalModels/InternalLinkedItem.swift b/apple/OmnivoreKit/Sources/Services/InternalModels/InternalLinkedItem.swift
index 46827adf8..4f914d7e8 100644
--- a/apple/OmnivoreKit/Sources/Services/InternalModels/InternalLinkedItem.swift
+++ b/apple/OmnivoreKit/Sources/Services/InternalModels/InternalLinkedItem.swift
@@ -26,6 +26,7 @@ struct InternalLinkedItem {
let contentReader: String?
let originalHtml: String?
let language: String?
+ let wordsCount: Int?
let recommendations: [InternalRecommendation]
var labels: [InternalLinkedItemLabel]
@@ -63,6 +64,7 @@ struct InternalLinkedItem {
linkedItem.contentReader = contentReader
linkedItem.originalHtml = originalHtml
linkedItem.language = language
+ linkedItem.wordsCount = Int64(wordsCount ?? 0)
// Remove existing labels in case a label had been deleted
if let existingLabels = linkedItem.labels {
@@ -142,6 +144,7 @@ extension JSONArticle {
contentReader: contentReader,
originalHtml: nil,
language: language,
+ wordsCount: wordsCount,
recommendations: [], // TODO:
labels: []
)
diff --git a/apple/OmnivoreKit/Sources/Utils/UserDefaultKeys.swift b/apple/OmnivoreKit/Sources/Utils/UserDefaultKeys.swift
index 6cafc7cd1..9549f5fc8 100644
--- a/apple/OmnivoreKit/Sources/Utils/UserDefaultKeys.swift
+++ b/apple/OmnivoreKit/Sources/Utils/UserDefaultKeys.swift
@@ -28,4 +28,5 @@ public enum UserDefaultKey: String {
case notificationsEnabled
case deviceTokenID
case shouldPromptCommunityModal
+ case userWordsPerMinute
}
diff --git a/apple/OmnivoreKit/Sources/Views/Article/OmnivoreWebView.swift b/apple/OmnivoreKit/Sources/Views/Article/OmnivoreWebView.swift
index 013e05dda..523f2515b 100644
--- a/apple/OmnivoreKit/Sources/Views/Article/OmnivoreWebView.swift
+++ b/apple/OmnivoreKit/Sources/Views/Article/OmnivoreWebView.swift
@@ -415,6 +415,7 @@ public enum WebViewDispatchEvent {
case speakingSection(anchorIdx: String)
case updateLabels(labels: String)
case updateTitle(title: String)
+ case saveReadPosition
var script: String {
get throws {
@@ -463,6 +464,8 @@ public enum WebViewDispatchEvent {
return "updateTitle"
case .handleAutoHighlightModeChange:
return "handleAutoHighlightModeChange"
+ case .saveReadPosition:
+ return "saveReadPosition"
}
}
@@ -503,10 +506,17 @@ public enum WebViewDispatchEvent {
}
case let .speakingSection(anchorIdx: anchorIdx):
return "event.anchorIdx = '\(anchorIdx)';"
- case .annotate, .highlight, .setHighlightLabels, .share, .remove, .copyHighlight, .dismissHighlight:
- return ""
case let .handleAutoHighlightModeChange(isEnabled: isEnabled):
return "event.enableHighlightOnRelease = '\(isEnabled ? "on" : "off")';"
+ case .annotate,
+ .highlight,
+ .setHighlightLabels,
+ .share,
+ .remove,
+ .copyHighlight,
+ .dismissHighlight,
+ .saveReadPosition:
+ return ""
}
}
}
diff --git a/apple/OmnivoreKit/Sources/Views/Colors/Colors.swift b/apple/OmnivoreKit/Sources/Views/Colors/Colors.swift
index cdb0cf5a5..15d2e2014 100644
--- a/apple/OmnivoreKit/Sources/Views/Colors/Colors.swift
+++ b/apple/OmnivoreKit/Sources/Views/Colors/Colors.swift
@@ -19,7 +19,7 @@ public extension Color {
static var appButtonBackground: Color { Color("_buttonBackground", bundle: .module) }
static var appTextDefault: Color { Color("_utilityTextDefault", bundle: .module) }
static var appPrimaryBackground: Color { Color("_appPrimaryBackground", bundle: .module) }
- static var checkmarkBlue: Color { Color("_checkmarkBlue", bundle: .module) }
+ static var indicatorBlue: Color { Color("_indicatorBlue", bundle: .module) }
static var webControlButtonBackground: Color { Color("_webControlButtonBackground", bundle: .module) }
// Apple system UIColor equivalents
diff --git a/apple/OmnivoreKit/Sources/Views/Colors/Colors.xcassets/_appGreenSuccess.colorset/Contents.json b/apple/OmnivoreKit/Sources/Views/Colors/Colors.xcassets/_appGreenSuccess.colorset/Contents.json
index 6f5bd0010..8ac27726e 100644
--- a/apple/OmnivoreKit/Sources/Views/Colors/Colors.xcassets/_appGreenSuccess.colorset/Contents.json
+++ b/apple/OmnivoreKit/Sources/Views/Colors/Colors.xcassets/_appGreenSuccess.colorset/Contents.json
@@ -5,9 +5,9 @@
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
- "blue" : "0.294",
- "green" : "0.843",
- "red" : "0.196"
+ "blue" : "0.220",
+ "green" : "0.725",
+ "red" : "0.333"
}
},
"idiom" : "universal"
@@ -23,9 +23,9 @@
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
- "blue" : "0.294",
- "green" : "0.843",
- "red" : "0.196"
+ "blue" : "0.220",
+ "green" : "0.725",
+ "red" : "0.333"
}
},
"idiom" : "universal"
diff --git a/apple/OmnivoreKit/Sources/Views/Colors/Colors.xcassets/_checkmarkBlue.colorset/Contents.json b/apple/OmnivoreKit/Sources/Views/Colors/Colors.xcassets/_indicatorBlue.colorset/Contents.json
similarity index 76%
rename from apple/OmnivoreKit/Sources/Views/Colors/Colors.xcassets/_checkmarkBlue.colorset/Contents.json
rename to apple/OmnivoreKit/Sources/Views/Colors/Colors.xcassets/_indicatorBlue.colorset/Contents.json
index c285b1550..e21405bea 100644
--- a/apple/OmnivoreKit/Sources/Views/Colors/Colors.xcassets/_checkmarkBlue.colorset/Contents.json
+++ b/apple/OmnivoreKit/Sources/Views/Colors/Colors.xcassets/_indicatorBlue.colorset/Contents.json
@@ -5,9 +5,9 @@
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
- "blue" : "0xFF",
- "green" : "0x84",
- "red" : "0x0A"
+ "blue" : "0xF7",
+ "green" : "0x82",
+ "red" : "0x3A"
}
},
"idiom" : "universal"
@@ -23,9 +23,9 @@
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
- "blue" : "0xFF",
- "green" : "0x84",
- "red" : "0x0A"
+ "blue" : "0xF7",
+ "green" : "0x82",
+ "red" : "0x3A"
}
},
"idiom" : "universal"
diff --git a/apple/OmnivoreKit/Sources/Views/FeedItem/LibraryItemCard.swift b/apple/OmnivoreKit/Sources/Views/FeedItem/LibraryItemCard.swift
new file mode 100644
index 000000000..29d84b04d
--- /dev/null
+++ b/apple/OmnivoreKit/Sources/Views/FeedItem/LibraryItemCard.swift
@@ -0,0 +1,221 @@
+import Models
+import SwiftUI
+import Utils
+
+public struct LibraryItemCard: View {
+ let viewer: Viewer?
+ let tapHandler: () -> Void
+ @ObservedObject var item: LinkedItem
+
+ public init(item: LinkedItem, viewer: Viewer?, tapHandler: @escaping () -> Void = {}) {
+ self.item = item
+ self.viewer = viewer
+ self.tapHandler = tapHandler
+ }
+
+ public var body: some View {
+ VStack {
+ HStack(alignment: .top, spacing: 0) {
+ readIndicator
+ articleInfo
+ imageBox
+ }
+ .frame(maxWidth: .infinity, maxHeight: .infinity)
+
+ if item.hasLabels {
+ labels
+ }
+ }
+ .padding(.bottom, 8)
+ }
+
+ var isFullyRead: Bool {
+ item.readingProgress > 95
+ }
+
+ var isPartiallyRead: Bool {
+ Int(item.readingProgress) > 0
+ }
+
+ var readIndicator: some View {
+ HStack {
+ Circle()
+ .foregroundColor(item.readingProgress > 0 ? .clear : .indicatorBlue)
+ .frame(width: 9, height: 9, alignment: .topLeading)
+ .padding(.top, 22)
+ .padding(.leading, 0)
+ .padding(.trailing, 8)
+ }
+ .padding(0)
+ .frame(width: 20)
+ }
+
+ var readingSpeed: Int64 {
+ var result = UserDefaults.standard.integer(forKey: UserDefaultKey.userWordsPerMinute.rawValue)
+ if result <= 0 {
+ result = 235
+ }
+ return Int64(result)
+ }
+
+ var estimatedReadingTime: String {
+ if item.wordsCount > 0 {
+ let readLen = max(1, item.wordsCount / readingSpeed)
+ return "\(readLen) MIN READ • "
+ }
+ return ""
+ }
+
+ var readingProgress: String {
+ // If there is no wordsCount don't show progress because it will make no sense
+ if item.wordsCount > 0 {
+ return "\(String(format: "%d", Int(item.readingProgress)))%"
+ }
+ return ""
+ }
+
+ var highlightsText: String {
+ if let highlights = item.highlights, highlights.count > 0 {
+ let fmted = LocalText.pluralizedText(key: "number_of_highlights", count: highlights.count)
+ if item.wordsCount > 0 {
+ return " • \(fmted)"
+ }
+ return fmted
+ }
+ return ""
+ }
+
+ var notesText: String {
+ let notes = item.highlights?.filter { item in
+ if let highlight = item as? Highlight {
+ return !(highlight.annotation ?? "").isEmpty
+ }
+ return false
+ }
+
+ if let notes = notes, notes.count > 0 {
+ let fmted = LocalText.pluralizedText(key: "number_of_notes", count: notes.count)
+ if item.wordsCount > 0 {
+ return " • \(fmted)"
+ }
+ return fmted
+ }
+ return ""
+ }
+
+ var readInfo: some View {
+ AnyView(HStack {
+ Text("\(estimatedReadingTime)")
+ .font(Font.system(size: 11, weight: .medium))
+ .foregroundColor(Color(hex: "#898989"))
+ +
+ Text("\(readingProgress)")
+ .font(Font.system(size: 11, weight: .medium))
+ .foregroundColor(isPartiallyRead ? Color.appGreenSuccess : Color(hex: "#898989"))
+
+ +
+ Text("\(highlightsText)")
+ .font(Font.system(size: 11, weight: .medium))
+ .foregroundColor(Color(hex: "#898989"))
+
+ +
+ Text("\(notesText)")
+ .font(Font.system(size: 11, weight: .medium))
+ .foregroundColor(Color(hex: "#898989"))
+ }
+ .frame(maxWidth: .infinity, alignment: .leading))
+ }
+
+ var imageBox: some View {
+ Group {
+ if let imageURL = item.imageURL {
+ AsyncImage(url: imageURL) { phase in
+ if let image = phase.image {
+ image
+ .resizable()
+ .aspectRatio(contentMode: .fill)
+ .frame(width: 55, height: 73)
+ .cornerRadius(4)
+ .padding(.top, 2)
+ } else {
+ Color.systemBackground
+ .frame(width: 55, height: 73)
+ .cornerRadius(4)
+ .padding(.top, 2)
+ }
+ }
+ }
+ }.opacity(isFullyRead ? 0.4 : 1.0)
+ }
+
+ var bylineStr: String {
+ // It seems like it could be cleaner just having author, instead of
+ // concating, maybe we fall back
+ if let author = item.author {
+ return author
+ } else if let publisherDisplayName = item.publisherDisplayName {
+ return publisherDisplayName
+ }
+
+ return ""
+
+// var str = ""
+// if let author = item.author {
+// str += author
+// }
+//
+// if item.author != nil, item.publisherDisplayName != nil {
+// str += ", "
+// }
+//
+// if let publisherDisplayName = item.publisherDisplayName {
+// str += publisherDisplayName
+// }
+//
+// return str
+ }
+
+ var byLine: some View {
+ Text(bylineStr)
+ .font(Font.system(size: 15, weight: .regular))
+ .foregroundColor(Color(hex: "#898989"))
+ .frame(maxWidth: .infinity, alignment: .leading)
+ .lineLimit(1)
+ }
+
+ public var articleInfo: some View {
+ VStack(alignment: .leading, spacing: 5) {
+ readInfo
+
+ Text(item.unwrappedTitle)
+ .font(Font.system(size: 18, weight: .semibold))
+ .lineSpacing(1.25)
+ .foregroundColor(isFullyRead ? Color(hex: "#898989") : .appGrayTextContrast)
+ .fixedSize(horizontal: false, vertical: true)
+
+ byLine
+ }
+ .padding(0)
+ .padding(.trailing, 8)
+ }
+
+ var labels: some View {
+ ScrollView(.horizontal, showsIndicators: false) {
+ HStack {
+ ForEach(item.sortedLabels, id: \.self) {
+ TextChip(feedItemLabel: $0)
+ }
+ Spacer()
+ }
+ }.introspectScrollView { scrollView in
+ scrollView.bounces = false
+ }
+ .padding(.top, 0)
+ .padding(.leading, 20)
+ #if os(macOS)
+ .onTapGesture {
+ tapHandler()
+ }
+ #endif
+ }
+}
diff --git a/apple/OmnivoreKit/Sources/Views/LocalText.swift b/apple/OmnivoreKit/Sources/Views/LocalText.swift
index c1186301f..ff21ce662 100644
--- a/apple/OmnivoreKit/Sources/Views/LocalText.swift
+++ b/apple/OmnivoreKit/Sources/Views/LocalText.swift
@@ -5,6 +5,12 @@ public enum LocalText {
NSLocalizedString(key, bundle: .module, comment: comment ?? "no comment provided by developer")
}
+ public static func pluralizedText(key: String, count: Int) -> String {
+ let format = NSLocalizedString(key, bundle: .module, comment: "")
+ print("key", key, "format", format)
+ return String.localizedStringWithFormat(format, count)
+ }
+
// Share extension
public static let saveArticleSavedState = localText(key: "saveArticleSavedState")
public static let saveArticleProcessingState = localText(key: "saveArticleProcessingState")
diff --git a/apple/OmnivoreKit/Sources/Views/Resources/bundle.js b/apple/OmnivoreKit/Sources/Views/Resources/bundle.js
index ee45d7e5d..dc9d5e930 100644
--- a/apple/OmnivoreKit/Sources/Views/Resources/bundle.js
+++ b/apple/OmnivoreKit/Sources/Views/Resources/bundle.js
@@ -1,2 +1,2 @@
/*! For license information please see bundle.js.LICENSE.txt */
-(()=>{var e,t,n={7162:(e,t,n)=>{e.exports=n(5047)},6279:function(e,t){var n="undefined"!=typeof self?self:this,r=function(){function e(){this.fetch=!1,this.DOMException=n.DOMException}return e.prototype=n,new e}();!function(e){!function(t){var n="URLSearchParams"in e,r="Symbol"in e&&"iterator"in Symbol,o="FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),i="FormData"in e,a="ArrayBuffer"in e;if(a)var l=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],s=ArrayBuffer.isView||function(e){return e&&l.indexOf(Object.prototype.toString.call(e))>-1};function u(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function c(e){return"string"!=typeof e&&(e=String(e)),e}function f(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return r&&(t[Symbol.iterator]=function(){return t}),t}function d(e){this.map={},e instanceof d?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function p(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function h(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function g(e){var t=new FileReader,n=h(t);return t.readAsArrayBuffer(e),n}function m(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function v(){return this.bodyUsed=!1,this._initBody=function(e){var t;this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:o&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:i&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:n&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():a&&o&&(t=e)&&DataView.prototype.isPrototypeOf(t)?(this._bodyArrayBuffer=m(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):a&&(ArrayBuffer.prototype.isPrototypeOf(e)||s(e))?this._bodyArrayBuffer=m(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):n&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},o&&(this.blob=function(){var e=p(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?p(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(g)}),this.text=function(){var e,t,n,r=p(this);if(r)return r;if(this._bodyBlob)return e=this._bodyBlob,n=h(t=new FileReader),t.readAsText(e),n;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r-1?r:n),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&o)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(o)}function w(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),o=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(o))}})),t}function x(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new d(t.headers),this.url=t.url||"",this._initBody(e)}b.prototype.clone=function(){return new b(this,{body:this._bodyInit})},v.call(b.prototype),v.call(x.prototype),x.prototype.clone=function(){return new x(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new d(this.headers),url:this.url})},x.error=function(){var e=new x(null,{status:0,statusText:""});return e.type="error",e};var E=[301,302,303,307,308];x.redirect=function(e,t){if(-1===E.indexOf(t))throw new RangeError("Invalid status code");return new x(null,{status:t,headers:{location:e}})},t.DOMException=e.DOMException;try{new t.DOMException}catch(e){t.DOMException=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function k(e,n){return new Promise((function(r,i){var a=new b(e,n);if(a.signal&&a.signal.aborted)return i(new t.DOMException("Aborted","AbortError"));var l=new XMLHttpRequest;function s(){l.abort()}l.onload=function(){var e,t,n={status:l.status,statusText:l.statusText,headers:(e=l.getAllResponseHeaders()||"",t=new d,e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(e){var n=e.split(":"),r=n.shift().trim();if(r){var o=n.join(":").trim();t.append(r,o)}})),t)};n.url="responseURL"in l?l.responseURL:n.headers.get("X-Request-URL");var o="response"in l?l.response:l.responseText;r(new x(o,n))},l.onerror=function(){i(new TypeError("Network request failed"))},l.ontimeout=function(){i(new TypeError("Network request failed"))},l.onabort=function(){i(new t.DOMException("Aborted","AbortError"))},l.open(a.method,a.url,!0),"include"===a.credentials?l.withCredentials=!0:"omit"===a.credentials&&(l.withCredentials=!1),"responseType"in l&&o&&(l.responseType="blob"),a.headers.forEach((function(e,t){l.setRequestHeader(t,e)})),a.signal&&(a.signal.addEventListener("abort",s),l.onreadystatechange=function(){4===l.readyState&&a.signal.removeEventListener("abort",s)}),l.send(void 0===a._bodyInit?null:a._bodyInit)}))}k.polyfill=!0,e.fetch||(e.fetch=k,e.Headers=d,e.Request=b,e.Response=x),t.Headers=d,t.Request=b,t.Response=x,t.fetch=k,Object.defineProperty(t,"__esModule",{value:!0})}({})}(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var o=r;(t=o.fetch).default=o.fetch,t.fetch=o.fetch,t.Headers=o.Headers,t.Request=o.Request,t.Response=o.Response,e.exports=t},1427:e=>{var t=function(){this.Diff_Timeout=1,this.Diff_EditCost=4,this.Match_Threshold=.5,this.Match_Distance=1e3,this.Patch_DeleteThreshold=.5,this.Patch_Margin=4,this.Match_MaxBits=32},n=-1;t.Diff=function(e,t){return[e,t]},t.prototype.diff_main=function(e,n,r,o){void 0===o&&(o=this.Diff_Timeout<=0?Number.MAX_VALUE:(new Date).getTime()+1e3*this.Diff_Timeout);var i=o;if(null==e||null==n)throw new Error("Null input. (diff_main)");if(e==n)return e?[new t.Diff(0,e)]:[];void 0===r&&(r=!0);var a=r,l=this.diff_commonPrefix(e,n),s=e.substring(0,l);e=e.substring(l),n=n.substring(l),l=this.diff_commonSuffix(e,n);var u=e.substring(e.length-l);e=e.substring(0,e.length-l),n=n.substring(0,n.length-l);var c=this.diff_compute_(e,n,a,i);return s&&c.unshift(new t.Diff(0,s)),u&&c.push(new t.Diff(0,u)),this.diff_cleanupMerge(c),c},t.prototype.diff_compute_=function(e,r,o,i){var a;if(!e)return[new t.Diff(1,r)];if(!r)return[new t.Diff(n,e)];var l=e.length>r.length?e:r,s=e.length>r.length?r:e,u=l.indexOf(s);if(-1!=u)return a=[new t.Diff(1,l.substring(0,u)),new t.Diff(0,s),new t.Diff(1,l.substring(u+s.length))],e.length>r.length&&(a[0][0]=a[2][0]=n),a;if(1==s.length)return[new t.Diff(n,e),new t.Diff(1,r)];var c=this.diff_halfMatch_(e,r);if(c){var f=c[0],d=c[1],p=c[2],h=c[3],g=c[4],m=this.diff_main(f,p,o,i),v=this.diff_main(d,h,o,i);return m.concat([new t.Diff(0,g)],v)}return o&&e.length>100&&r.length>100?this.diff_lineMode_(e,r,i):this.diff_bisect_(e,r,i)},t.prototype.diff_lineMode_=function(e,r,o){var i=this.diff_linesToChars_(e,r);e=i.chars1,r=i.chars2;var a=i.lineArray,l=this.diff_main(e,r,!1,o);this.diff_charsToLines_(l,a),this.diff_cleanupSemantic(l),l.push(new t.Diff(0,""));for(var s=0,u=0,c=0,f="",d="";s=1&&c>=1){l.splice(s-u-c,u+c),s=s-u-c;for(var p=this.diff_main(f,d,!1,o),h=p.length-1;h>=0;h--)l.splice(s,0,p[h]);s+=p.length}c=0,u=0,f="",d=""}s++}return l.pop(),l},t.prototype.diff_bisect_=function(e,r,o){for(var i=e.length,a=r.length,l=Math.ceil((i+a)/2),s=l,u=2*l,c=new Array(u),f=new Array(u),d=0;do);b++){for(var w=-b+g;w<=b-m;w+=2){for(var x=s+w,E=(O=w==-b||w!=b&&c[x-1]i)m+=2;else if(E>a)g+=2;else if(h&&(_=s+p-w)>=0&&_=(S=i-f[_]))return this.diff_bisectSplit_(e,r,O,E,o)}for(var k=-b+v;k<=b-y;k+=2){for(var S,_=s+k,C=(S=k==-b||k!=b&&f[_-1]i)y+=2;else if(C>a)v+=2;else if(!h){var O;if((x=s+p-k)>=0&&x=(S=i-S))return this.diff_bisectSplit_(e,r,O,E,o)}}}return[new t.Diff(n,e),new t.Diff(1,r)]},t.prototype.diff_bisectSplit_=function(e,t,n,r,o){var i=e.substring(0,n),a=t.substring(0,r),l=e.substring(n),s=t.substring(r),u=this.diff_main(i,a,!1,o),c=this.diff_main(l,s,!1,o);return u.concat(c)},t.prototype.diff_linesToChars_=function(e,t){var n=[],r={};function o(e){for(var t="",o=0,a=-1,l=n.length;ar?e=e.substring(n-r):nt.length?e:t,r=e.length>t.length?t:e;if(n.length<4||2*r.length=e.length?[r,i,a,l,c]:null}var a,l,s,u,c,f=i(n,r,Math.ceil(n.length/4)),d=i(n,r,Math.ceil(n.length/2));return f||d?(a=d?f&&f[4].length>d[4].length?f:d:f,e.length>t.length?(l=a[0],s=a[1],u=a[2],c=a[3]):(u=a[0],c=a[1],l=a[2],s=a[3]),[l,s,u,c,a[4]]):null},t.prototype.diff_cleanupSemantic=function(e){for(var r=!1,o=[],i=0,a=null,l=0,s=0,u=0,c=0,f=0;l0?o[i-1]:-1,s=0,u=0,c=0,f=0,a=null,r=!0)),l++;for(r&&this.diff_cleanupMerge(e),this.diff_cleanupSemanticLossless(e),l=1;l=g?(h>=d.length/2||h>=p.length/2)&&(e.splice(l,0,new t.Diff(0,p.substring(0,h))),e[l-1][1]=d.substring(0,d.length-h),e[l+1][1]=p.substring(h),l++):(g>=d.length/2||g>=p.length/2)&&(e.splice(l,0,new t.Diff(0,d.substring(0,g))),e[l-1][0]=1,e[l-1][1]=p.substring(0,p.length-g),e[l+1][0]=n,e[l+1][1]=d.substring(g),l++),l++}l++}},t.prototype.diff_cleanupSemanticLossless=function(e){function n(e,n){if(!e||!n)return 6;var r=e.charAt(e.length-1),o=n.charAt(0),i=r.match(t.nonAlphaNumericRegex_),a=o.match(t.nonAlphaNumericRegex_),l=i&&r.match(t.whitespaceRegex_),s=a&&o.match(t.whitespaceRegex_),u=l&&r.match(t.linebreakRegex_),c=s&&o.match(t.linebreakRegex_),f=u&&e.match(t.blanklineEndRegex_),d=c&&n.match(t.blanklineStartRegex_);return f||d?5:u||c?4:i&&!l&&s?3:l||s?2:i||a?1:0}for(var r=1;r=d&&(d=p,u=o,c=i,f=a)}e[r-1][1]!=u&&(u?e[r-1][1]=u:(e.splice(r-1,1),r--),e[r][1]=c,f?e[r+1][1]=f:(e.splice(r+1,1),r--))}r++}},t.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,t.whitespaceRegex_=/\s/,t.linebreakRegex_=/[\r\n]/,t.blanklineEndRegex_=/\n\r?\n$/,t.blanklineStartRegex_=/^\r?\n\r?\n/,t.prototype.diff_cleanupEfficiency=function(e){for(var r=!1,o=[],i=0,a=null,l=0,s=!1,u=!1,c=!1,f=!1;l0?o[i-1]:-1,c=f=!1),r=!0)),l++;r&&this.diff_cleanupMerge(e)},t.prototype.diff_cleanupMerge=function(e){e.push(new t.Diff(0,""));for(var r,o=0,i=0,a=0,l="",s="";o1?(0!==i&&0!==a&&(0!==(r=this.diff_commonPrefix(s,l))&&(o-i-a>0&&0==e[o-i-a-1][0]?e[o-i-a-1][1]+=s.substring(0,r):(e.splice(0,0,new t.Diff(0,s.substring(0,r))),o++),s=s.substring(r),l=l.substring(r)),0!==(r=this.diff_commonSuffix(s,l))&&(e[o][1]=s.substring(s.length-r)+e[o][1],s=s.substring(0,s.length-r),l=l.substring(0,l.length-r))),o-=i+a,e.splice(o,i+a),l.length&&(e.splice(o,0,new t.Diff(n,l)),o++),s.length&&(e.splice(o,0,new t.Diff(1,s)),o++),o++):0!==o&&0==e[o-1][0]?(e[o-1][1]+=e[o][1],e.splice(o,1)):o++,a=0,i=0,l="",s=""}""===e[e.length-1][1]&&e.pop();var u=!1;for(o=1;ot));r++)a=o,l=i;return e.length!=r&&e[r][0]===n?l:l+(t-a)},t.prototype.diff_prettyHtml=function(e){for(var t=[],r=/&/g,o=//g,a=/\n/g,l=0;l");switch(s){case 1:t[l]=''+u+"";break;case n:t[l]=''+u+"";break;case 0:t[l]=""+u+""}}return t.join("")},t.prototype.diff_text1=function(e){for(var t=[],n=0;nthis.Match_MaxBits)throw new Error("Pattern too long for this browser.");var r=this.match_alphabet_(t),o=this;function i(e,r){var i=e/t.length,a=Math.abs(n-r);return o.Match_Distance?i+a/o.Match_Distance:a?1:i}var a=this.Match_Threshold,l=e.indexOf(t,n);-1!=l&&(a=Math.min(i(0,l),a),-1!=(l=e.lastIndexOf(t,n+t.length))&&(a=Math.min(i(0,l),a)));var s,u,c=1<=h;v--){var y=r[e.charAt(v-1)];if(m[v]=0===p?(m[v+1]<<1|1)&y:(m[v+1]<<1|1)&y|(f[v+1]|f[v])<<1|1|f[v+1],m[v]&c){var b=i(p,v-1);if(b<=a){if(a=b,!((l=v-1)>n))break;h=Math.max(1,2*n-l)}}}if(i(p+1,n)>a)break;f=m}return l},t.prototype.match_alphabet_=function(e){for(var t={},n=0;n2&&(this.diff_cleanupSemantic(a),this.diff_cleanupEfficiency(a));else if(e&&"object"==typeof e&&void 0===r&&void 0===o)a=e,i=this.diff_text1(a);else if("string"==typeof e&&r&&"object"==typeof r&&void 0===o)i=e,a=r;else{if("string"!=typeof e||"string"!=typeof r||!o||"object"!=typeof o)throw new Error("Unknown call format to patch_make.");i=e,a=o}if(0===a.length)return[];for(var l=[],s=new t.patch_obj,u=0,c=0,f=0,d=i,p=i,h=0;h=2*this.Patch_Margin&&u&&(this.patch_addContext_(s,d),l.push(s),s=new t.patch_obj,u=0,d=p,c=f)}1!==g&&(c+=m.length),g!==n&&(f+=m.length)}return u&&(this.patch_addContext_(s,d),l.push(s)),l},t.prototype.patch_deepCopy=function(e){for(var n=[],r=0;rthis.Match_MaxBits?-1!=(l=this.match_main(t,c.substring(0,this.Match_MaxBits),u))&&(-1==(f=this.match_main(t,c.substring(c.length-this.Match_MaxBits),u+c.length-this.Match_MaxBits))||l>=f)&&(l=-1):l=this.match_main(t,c,u),-1==l)i[a]=!1,o-=e[a].length2-e[a].length1;else if(i[a]=!0,o=l-u,c==(s=-1==f?t.substring(l,l+c.length):t.substring(l,f+this.Match_MaxBits)))t=t.substring(0,l)+this.diff_text2(e[a].diffs)+t.substring(l+c.length);else{var d=this.diff_main(c,s,!1);if(c.length>this.Match_MaxBits&&this.diff_levenshtein(d)/c.length>this.Patch_DeleteThreshold)i[a]=!1;else{this.diff_cleanupSemanticLossless(d);for(var p,h=0,g=0;ga[0][1].length){var l=n-a[0][1].length;a[0][1]=r.substring(a[0][1].length)+a[0][1],i.start1-=l,i.start2-=l,i.length1+=l,i.length2+=l}return 0==(a=(i=e[e.length-1]).diffs).length||0!=a[a.length-1][0]?(a.push(new t.Diff(0,r)),i.length1+=n,i.length2+=n):n>a[a.length-1][1].length&&(l=n-a[a.length-1][1].length,a[a.length-1][1]+=r.substring(0,l),i.length1+=l,i.length2+=l),r},t.prototype.patch_splitMax=function(e){for(var r=this.Match_MaxBits,o=0;o2*r?(u.length1+=d.length,a+=d.length,c=!1,u.diffs.push(new t.Diff(f,d)),i.diffs.shift()):(d=d.substring(0,r-u.length1-this.Patch_Margin),u.length1+=d.length,a+=d.length,0===f?(u.length2+=d.length,l+=d.length):c=!1,u.diffs.push(new t.Diff(f,d)),d==i.diffs[0][1]?i.diffs.shift():i.diffs[0][1]=i.diffs[0][1].substring(d.length))}s=(s=this.diff_text2(u.diffs)).substring(s.length-this.Patch_Margin);var p=this.diff_text1(i.diffs).substring(0,this.Patch_Margin);""!==p&&(u.length1+=p.length,u.length2+=p.length,0!==u.diffs.length&&0===u.diffs[u.diffs.length-1][0]?u.diffs[u.diffs.length-1][1]+=p:u.diffs.push(new t.Diff(0,p))),c||e.splice(++o,0,u)}}},t.prototype.patch_toText=function(e){for(var t=[],n=0;n{"use strict";e.exports=function(e){var t=e.uri,n=e.name,r=e.type;this.uri=t,this.name=n,this.type=r}},2929:(e,t,n)=>{"use strict";var r=n(1278);e.exports=function e(t,n,o){var i;void 0===n&&(n=""),void 0===o&&(o=r);var a=new Map;function l(e,t){var n=a.get(t);n?n.push.apply(n,e):a.set(t,e)}if(o(t))i=null,l([n],t);else{var s=n?n+".":"";if("undefined"!=typeof FileList&&t instanceof FileList)i=Array.prototype.map.call(t,(function(e,t){return l([""+s+t],e),null}));else if(Array.isArray(t))i=t.map((function(t,n){var r=e(t,""+s+n,o);return r.files.forEach(l),r.clone}));else if(t&&t.constructor===Object)for(var u in i={},t){var c=e(t[u],""+s+u,o);c.files.forEach(l),i[u]=c.clone}else i=t}return{clone:i,files:a}}},9384:(e,t,n)=>{"use strict";t.ReactNativeFile=n(7570),t.extractFiles=n(2929),t.isExtractableFile=n(1278)},1278:(e,t,n)=>{"use strict";var r=n(7570);e.exports=function(e){return"undefined"!=typeof File&&e instanceof File||"undefined"!=typeof Blob&&e instanceof Blob||e instanceof r}},1688:e=>{e.exports="object"==typeof self?self.FormData:window.FormData},8749:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(9384),i=r(n(1688)),a=function(e){return o.isExtractableFile(e)||null!==e&&"object"==typeof e&&"function"==typeof e.pipe};t.default=function(e,t,n){var r=o.extractFiles({query:e,variables:t,operationName:n},"",a),l=r.clone,s=r.files;if(0===s.size){if(!Array.isArray(e))return JSON.stringify(l);if(void 0!==t&&!Array.isArray(t))throw new Error("Cannot create request body with given variable type, array expected");var u=e.reduce((function(e,n,r){return e.push({query:n,variables:t?t[r]:void 0}),e}),[]);return JSON.stringify(u)}var c=new("undefined"==typeof FormData?i.default:FormData);c.append("operations",JSON.stringify(l));var f={},d=0;return s.forEach((function(e){f[++d]=e})),c.append("map",JSON.stringify(f)),d=0,s.forEach((function(e,t){c.append(""+ ++d,t)})),c}},6647:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.prototype.toJSON;"function"==typeof t||(0,r.default)(0),e.prototype.inspect=t,o.default&&(e.prototype[o.default]=t)};var r=i(n(5006)),o=i(n(8019));function i(e){return e&&e.__esModule?e:{default:e}}},8048:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return a(e,[])};var r,o=(r=n(8019))&&r.__esModule?r:{default:r};function i(e){return i="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},i(e)}function a(e,t){switch(i(e)){case"string":return JSON.stringify(e);case"function":return e.name?"[function ".concat(e.name,"]"):"[function]";case"object":return null===e?"null":function(e,t){if(-1!==t.indexOf(e))return"[Circular]";var n=[].concat(t,[e]),r=function(e){var t=e[String(o.default)];return"function"==typeof t?t:"function"==typeof e.inspect?e.inspect:void 0}(e);if(void 0!==r){var i=r.call(e);if(i!==e)return"string"==typeof i?i:a(i,n)}else if(Array.isArray(e))return function(e,t){if(0===e.length)return"[]";if(t.length>2)return"[Array]";for(var n=Math.min(10,e.length),r=e.length-n,o=[],i=0;i1&&o.push("... ".concat(r," more items")),"["+o.join(", ")+"]"}(e,n);return function(e,t){var n=Object.keys(e);return 0===n.length?"{}":t.length>2?"["+function(e){var t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if("Object"===t&&"function"==typeof e.constructor){var n=e.constructor.name;if("string"==typeof n&&""!==n)return n}return t}(e)+"]":"{ "+n.map((function(n){return n+": "+a(e[n],t)})).join(", ")+" }"}(e,n)}(e,t);default:return String(e)}}},5006:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(!Boolean(e))throw new Error(null!=t?t:"Unexpected invariant triggered.")}},8019:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):void 0;t.default=n},4560:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isNode=function(e){return null!=e&&"string"==typeof e.kind},t.Token=t.Location=void 0;var r,o=(r=n(2678))&&r.__esModule?r:{default:r},i=function(){function e(e,t,n){this.start=e.start,this.end=t.end,this.startToken=e,this.endToken=t,this.source=n}return e.prototype.toJSON=function(){return{start:this.start,end:this.end}},e}();t.Location=i,(0,o.default)(i);var a=function(){function e(e,t,n,r,o,i,a){this.kind=e,this.start=t,this.end=n,this.line=r,this.column=o,this.value=a,this.prev=i,this.next=null}return e.prototype.toJSON=function(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}},e}();t.Token=a,(0,o.default)(a)},9501:(e,t)=>{"use strict";function n(e){for(var t=0;ta&&n(t[l-1]);)--l;return t.slice(a,l).join("\n")},t.getBlockStringIndentation=r,t.printBlockString=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=-1===e.indexOf("\n"),o=" "===e[0]||"\t"===e[0],i='"'===e[e.length-1],a="\\"===e[e.length-1],l=!r||i||a||n,s="";return!l||r&&o||(s+="\n"+t),s+=t?e.replace(/\n/g,"\n"+t):e,l&&(s+="\n"),'"""'+s.replace(/"""/g,'\\"""')+'"""'}},3083:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.print=function(e){return(0,r.visit)(e,{leave:i})};var r=n(2624),o=n(9501),i={Name:function(e){return e.value},Variable:function(e){return"$"+e.name},Document:function(e){return l(e.definitions,"\n\n")+"\n"},OperationDefinition:function(e){var t=e.operation,n=e.name,r=u("(",l(e.variableDefinitions,", "),")"),o=l(e.directives," "),i=e.selectionSet;return n||o||r||"query"!==t?l([t,l([n,r]),o,i]," "):i},VariableDefinition:function(e){var t=e.variable,n=e.type,r=e.defaultValue,o=e.directives;return t+": "+n+u(" = ",r)+u(" ",l(o," "))},SelectionSet:function(e){return s(e.selections)},Field:function(e){var t=e.alias,n=e.name,r=e.arguments,o=e.directives,i=e.selectionSet,a=u("",t,": ")+n,s=a+u("(",l(r,", "),")");return s.length>80&&(s=a+u("(\n",c(l(r,"\n")),"\n)")),l([s,l(o," "),i]," ")},Argument:function(e){return e.name+": "+e.value},FragmentSpread:function(e){return"..."+e.name+u(" ",l(e.directives," "))},InlineFragment:function(e){var t=e.typeCondition,n=e.directives,r=e.selectionSet;return l(["...",u("on ",t),l(n," "),r]," ")},FragmentDefinition:function(e){var t=e.name,n=e.typeCondition,r=e.variableDefinitions,o=e.directives,i=e.selectionSet;return"fragment ".concat(t).concat(u("(",l(r,", "),")")," ")+"on ".concat(n," ").concat(u("",l(o," ")," "))+i},IntValue:function(e){return e.value},FloatValue:function(e){return e.value},StringValue:function(e,t){var n=e.value;return e.block?(0,o.printBlockString)(n,"description"===t?"":" "):JSON.stringify(n)},BooleanValue:function(e){return e.value?"true":"false"},NullValue:function(){return"null"},EnumValue:function(e){return e.value},ListValue:function(e){return"["+l(e.values,", ")+"]"},ObjectValue:function(e){return"{"+l(e.fields,", ")+"}"},ObjectField:function(e){return e.name+": "+e.value},Directive:function(e){return"@"+e.name+u("(",l(e.arguments,", "),")")},NamedType:function(e){return e.name},ListType:function(e){return"["+e.type+"]"},NonNullType:function(e){return e.type+"!"},SchemaDefinition:a((function(e){var t=e.directives,n=e.operationTypes;return l(["schema",l(t," "),s(n)]," ")})),OperationTypeDefinition:function(e){return e.operation+": "+e.type},ScalarTypeDefinition:a((function(e){return l(["scalar",e.name,l(e.directives," ")]," ")})),ObjectTypeDefinition:a((function(e){var t=e.name,n=e.interfaces,r=e.directives,o=e.fields;return l(["type",t,u("implements ",l(n," & ")),l(r," "),s(o)]," ")})),FieldDefinition:a((function(e){var t=e.name,n=e.arguments,r=e.type,o=e.directives;return t+(d(n)?u("(\n",c(l(n,"\n")),"\n)"):u("(",l(n,", "),")"))+": "+r+u(" ",l(o," "))})),InputValueDefinition:a((function(e){var t=e.name,n=e.type,r=e.defaultValue,o=e.directives;return l([t+": "+n,u("= ",r),l(o," ")]," ")})),InterfaceTypeDefinition:a((function(e){var t=e.name,n=e.interfaces,r=e.directives,o=e.fields;return l(["interface",t,u("implements ",l(n," & ")),l(r," "),s(o)]," ")})),UnionTypeDefinition:a((function(e){var t=e.name,n=e.directives,r=e.types;return l(["union",t,l(n," "),r&&0!==r.length?"= "+l(r," | "):""]," ")})),EnumTypeDefinition:a((function(e){var t=e.name,n=e.directives,r=e.values;return l(["enum",t,l(n," "),s(r)]," ")})),EnumValueDefinition:a((function(e){return l([e.name,l(e.directives," ")]," ")})),InputObjectTypeDefinition:a((function(e){var t=e.name,n=e.directives,r=e.fields;return l(["input",t,l(n," "),s(r)]," ")})),DirectiveDefinition:a((function(e){var t=e.name,n=e.arguments,r=e.repeatable,o=e.locations;return"directive @"+t+(d(n)?u("(\n",c(l(n,"\n")),"\n)"):u("(",l(n,", "),")"))+(r?" repeatable":"")+" on "+l(o," | ")})),SchemaExtension:function(e){var t=e.directives,n=e.operationTypes;return l(["extend schema",l(t," "),s(n)]," ")},ScalarTypeExtension:function(e){return l(["extend scalar",e.name,l(e.directives," ")]," ")},ObjectTypeExtension:function(e){var t=e.name,n=e.interfaces,r=e.directives,o=e.fields;return l(["extend type",t,u("implements ",l(n," & ")),l(r," "),s(o)]," ")},InterfaceTypeExtension:function(e){var t=e.name,n=e.interfaces,r=e.directives,o=e.fields;return l(["extend interface",t,u("implements ",l(n," & ")),l(r," "),s(o)]," ")},UnionTypeExtension:function(e){var t=e.name,n=e.directives,r=e.types;return l(["extend union",t,l(n," "),r&&0!==r.length?"= "+l(r," | "):""]," ")},EnumTypeExtension:function(e){var t=e.name,n=e.directives,r=e.values;return l(["extend enum",t,l(n," "),s(r)]," ")},InputObjectTypeExtension:function(e){var t=e.name,n=e.directives,r=e.fields;return l(["extend input",t,l(n," "),s(r)]," ")}};function a(e){return function(t){return l([t.description,e(t)],"\n")}}function l(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return null!==(t=null==e?void 0:e.filter((function(e){return e})).join(n))&&void 0!==t?t:""}function s(e){return u("{\n",c(l(e,"\n")),"\n}")}function u(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return null!=t&&""!==t?e+t+n:""}function c(e){return u(" ",e.replace(/\n/g,"\n "))}function f(e){return-1!==e.indexOf("\n")}function d(e){return null!=e&&e.some(f)}},2624:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.visit=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:a,r=void 0,u=Array.isArray(e),c=[e],f=-1,d=[],p=void 0,h=void 0,g=void 0,m=[],v=[],y=e;do{var b=++f===c.length,w=b&&0!==d.length;if(b){if(h=0===v.length?void 0:m[m.length-1],p=g,g=v.pop(),w){if(u)p=p.slice();else{for(var x={},E=0,k=Object.keys(p);E{var r=n(7772).Symbol;e.exports=r},3366:(e,t,n)=>{var r=n(857),o=n(2107),i=n(7157),a=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?o(e):i(e)}},1704:(e,t,n)=>{var r=n(2153),o=/^\s+/;e.exports=function(e){return e?e.slice(0,r(e)+1).replace(o,""):e}},1242:(e,t,n)=>{var r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;e.exports=r},2107:(e,t,n)=>{var r=n(857),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,l=r?r.toStringTag:void 0;e.exports=function(e){var t=i.call(e,l),n=e[l];try{e[l]=void 0;var r=!0}catch(e){}var o=a.call(e);return r&&(t?e[l]=n:delete e[l]),o}},7157:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},7772:(e,t,n)=>{var r=n(1242),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();e.exports=i},2153:e=>{var t=/\s/;e.exports=function(e){for(var n=e.length;n--&&t.test(e.charAt(n)););return n}},4073:(e,t,n)=>{var r=n(9259),o=n(1100),i=n(7642),a=Math.max,l=Math.min;e.exports=function(e,t,n){var s,u,c,f,d,p,h=0,g=!1,m=!1,v=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function y(t){var n=s,r=u;return s=u=void 0,h=t,f=e.apply(r,n)}function b(e){return h=e,d=setTimeout(x,t),g?y(e):f}function w(e){var n=e-p;return void 0===p||n>=t||n<0||m&&e-h>=c}function x(){var e=o();if(w(e))return E(e);d=setTimeout(x,function(e){var n=t-(e-p);return m?l(n,c-(e-h)):n}(e))}function E(e){return d=void 0,v&&s?y(e):(s=u=void 0,f)}function k(){var e=o(),n=w(e);if(s=arguments,u=this,p=e,n){if(void 0===d)return b(p);if(m)return clearTimeout(d),d=setTimeout(x,t),y(p)}return void 0===d&&(d=setTimeout(x,t)),f}return t=i(t)||0,r(n)&&(g=!!n.leading,c=(m="maxWait"in n)?a(i(n.maxWait)||0,t):c,v="trailing"in n?!!n.trailing:v),k.cancel=function(){void 0!==d&&clearTimeout(d),h=0,s=p=u=d=void 0},k.flush=function(){return void 0===d?f:E(o())},k}},9259:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},5125:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},4795:(e,t,n)=>{var r=n(3366),o=n(5125);e.exports=function(e){return"symbol"==typeof e||o(e)&&"[object Symbol]"==r(e)}},1100:(e,t,n)=>{var r=n(7772);e.exports=function(){return r.Date.now()}},7642:(e,t,n)=>{var r=n(1704),o=n(9259),i=n(4795),a=/^[-+]0x[0-9a-f]+$/i,l=/^0b[01]+$/i,s=/^0o[0-7]+$/i,u=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(i(e))return NaN;if(o(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=o(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=r(e);var n=l.test(e);return n||s.test(e)?u(e.slice(2),n?2:8):a.test(e)?NaN:+e}},9410:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){let e=null;return{mountedInstances:new Set,updateHead:t=>{const n=e=Promise.resolve().then((()=>{if(n!==e)return;e=null;const i={};t.forEach((e=>{if("link"===e.type&&e.props["data-optimized-fonts"]){if(document.querySelector(`style[data-href="${e.props["data-href"]}"]`))return;e.props.href=e.props["data-href"],e.props["data-href"]=void 0}const t=i[e.type]||[];t.push(e),i[e.type]=t}));const a=i.title?i.title[0]:null;let l="";if(a){const{children:e}=a.props;l="string"==typeof e?e:Array.isArray(e)?e.join(""):""}l!==document.title&&(document.title=l),["meta","base","link","style","script"].forEach((e=>{!function(e,t){const n=document.getElementsByTagName("head")[0],i=n.querySelector("meta[name=next-head-count]"),a=Number(i.content),l=[];for(let t=0,n=i.previousElementSibling;t{for(let t=0,n=l.length;t{var t;return null===(t=e.parentNode)||void 0===t?void 0:t.removeChild(e)})),u.forEach((e=>n.insertBefore(e,i))),i.content=(a-l.length+u.length).toString()}(e,i[e]||[])}))}))}}},t.isEqualNode=o,t.DOMAttributeNames=void 0;const n={acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv",noModule:"noModule"};function r({type:e,props:t}){const r=document.createElement(e);for(const o in t){if(!t.hasOwnProperty(o))continue;if("children"===o||"dangerouslySetInnerHTML"===o)continue;if(void 0===t[o])continue;const i=n[o]||o.toLowerCase();"script"!==e||"async"!==i&&"defer"!==i&&"noModule"!==i?r.setAttribute(i,t[o]):r[i]=!!t[o]}const{children:o,dangerouslySetInnerHTML:i}=t;return i?r.innerHTML=i.__html||"":o&&(r.textContent="string"==typeof o?o:Array.isArray(o)?o.join(""):""),r}function o(e,t){if(e instanceof HTMLElement&&t instanceof HTMLElement){const n=t.getAttribute("nonce");if(n&&!e.getAttribute("nonce")){const r=t.cloneNode(!0);return r.setAttribute("nonce",""),r.nonce=n,n===e.nonce&&e.isEqualNode(r)}}return e.isEqualNode(t)}t.DOMAttributeNames=n,("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&(Object.assign(t.default,t),e.exports=t.default)},4529:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,o=(r=n(2784))&&r.__esModule?r:{default:r},i=n(6640),a=n(9518),l=n(3321);const s={};function u(e,t,n,r){if("undefined"==typeof window||!e)return;if(!i.isLocalURL(t))return;e.prefetch(t,n,r).catch((e=>{}));const o=r&&void 0!==r.locale?r.locale:e&&e.locale;s[t+"%"+n+(o?"%"+o:"")]=!0}var c=o.default.forwardRef(((e,t)=>{const{legacyBehavior:n=!0!==Boolean(window.omnivoreEnv.__NEXT_NEW_LINK_BEHAVIOR)}=e;let r;const{href:c,as:f,children:d,prefetch:p,passHref:h,replace:g,shallow:m,scroll:v,locale:y,onClick:b,onMouseEnter:w}=e,x=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["href","as","children","prefetch","passHref","replace","shallow","scroll","locale","onClick","onMouseEnter"]);r=d,n&&"string"==typeof r&&(r=o.default.createElement("a",null,r));const E=!1!==p,k=a.useRouter(),{href:S,as:_}=o.default.useMemo((()=>{const[e,t]=i.resolveHref(k,c,!0);return{href:e,as:f?i.resolveHref(k,f):t||e}}),[k,c,f]),C=o.default.useRef(S),O=o.default.useRef(_);let L;n&&(L=o.default.Children.only(r));const P=n?L&&"object"==typeof L&&L.ref:t,[R,j,T]=l.useIntersection({rootMargin:"200px"}),A=o.default.useCallback((e=>{O.current===_&&C.current===S||(T(),O.current=_,C.current=S),R(e),P&&("function"==typeof P?P(e):"object"==typeof P&&(P.current=e))}),[_,P,S,T,R]);o.default.useEffect((()=>{const e=j&&E&&i.isLocalURL(S),t=void 0!==y?y:k&&k.locale,n=s[S+"%"+_+(t?"%"+t:"")];e&&!n&&u(k,S,_,{locale:t})}),[_,S,j,y,E,k]);const M={ref:A,onClick:e=>{n||"function"!=typeof b||b(e),n&&L.props&&"function"==typeof L.props.onClick&&L.props.onClick(e),e.defaultPrevented||function(e,t,n,r,o,a,l,s){const{nodeName:u}=e.currentTarget;("A"!==u.toUpperCase()||!function(e){const{target:t}=e.currentTarget;return t&&"_self"!==t||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||e.nativeEvent&&2===e.nativeEvent.which}(e)&&i.isLocalURL(n))&&(e.preventDefault(),t[o?"replace":"push"](n,r,{shallow:a,locale:s,scroll:l}))}(e,k,S,_,g,m,v,y)},onMouseEnter:e=>{n||"function"!=typeof w||w(e),n&&L.props&&"function"==typeof L.props.onMouseEnter&&L.props.onMouseEnter(e),i.isLocalURL(S)&&u(k,S,_,{priority:!0})}};if(!n||h||"a"===L.type&&!("href"in L.props)){const e=void 0!==y?y:k&&k.locale,t=k&&k.isLocaleDomain&&i.getDomainLocale(_,e,k&&k.locales,k&&k.domainLocales);M.href=t||i.addBasePath(i.addLocale(_,e,k&&k.defaultLocale))}return n?o.default.cloneElement(L,M):o.default.createElement("a",Object.assign({},x,M),r)}));t.default=c,("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&(Object.assign(t.default,t),e.exports=t.default)},1119:(e,t)=>{"use strict";function n(e){return e.endsWith("/")&&"/"!==e?e.slice(0,-1):e}Object.defineProperty(t,"__esModule",{value:!0}),t.removePathTrailingSlash=n,t.normalizePathTrailingSlash=void 0;const r=window.omnivoreEnv.__NEXT_TRAILING_SLASH?e=>/\.[^/]+\/?$/.test(e)?n(e):e.endsWith("/")?e:e+"/":n;t.normalizePathTrailingSlash=r,("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&(Object.assign(t.default,t),e.exports=t.default)},1976:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.cancelIdleCallback=t.requestIdleCallback=void 0;const n="undefined"!=typeof self&&self.requestIdleCallback&&self.requestIdleCallback.bind(window)||function(e){let t=Date.now();return setTimeout((function(){e({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-t))}})}),1)};t.requestIdleCallback=n;const r="undefined"!=typeof self&&self.cancelIdleCallback&&self.cancelIdleCallback.bind(window)||function(e){return clearTimeout(e)};t.cancelIdleCallback=r,("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&(Object.assign(t.default,t),e.exports=t.default)},7928:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.markAssetError=u,t.isAssetError=function(e){return e&&s in e},t.getClientBuildManifest=f,t.getMiddlewareManifest=function(){return self.__MIDDLEWARE_MANIFEST?Promise.resolve(self.__MIDDLEWARE_MANIFEST):c(new Promise((e=>{const t=self.__MIDDLEWARE_MANIFEST_CB;self.__MIDDLEWARE_MANIFEST_CB=()=>{e(self.__MIDDLEWARE_MANIFEST),t&&t()}})),i,u(new Error("Failed to load client middleware manifest")))},t.createRouteLoader=function(e){const t=new Map,n=new Map,r=new Map,s=new Map;function f(e){{let t=n.get(e);return t||(document.querySelector(`script[src^="${e}"]`)?Promise.resolve():(n.set(e,t=function(e,t){return new Promise(((n,r)=>{(t=document.createElement("script")).onload=n,t.onerror=()=>r(u(new Error(`Failed to load script: ${e}`))),t.crossOrigin=window.omnivoreEnv.__NEXT_CROSS_ORIGIN,t.src=e,document.body.appendChild(t)}))}(e)),t))}}function p(e){let t=r.get(e);return t||(r.set(e,t=fetch(e).then((t=>{if(!t.ok)throw new Error(`Failed to load stylesheet: ${e}`);return t.text().then((t=>({href:e,content:t})))})).catch((e=>{throw u(e)}))),t)}return{whenEntrypoint:e=>a(e,t),onEntrypoint(e,n){(n?Promise.resolve().then((()=>n())).then((e=>({component:e&&e.default||e,exports:e})),(e=>({error:e}))):Promise.resolve(void 0)).then((n=>{const r=t.get(e);r&&"resolve"in r?n&&(t.set(e,n),r.resolve(n)):(n?t.set(e,n):t.delete(e),s.delete(e))}))},loadRoute(n,r){return a(n,s,(()=>c(d(e,n).then((({scripts:e,css:r})=>Promise.all([t.has(n)?[]:Promise.all(e.map(f)),Promise.all(r.map(p))]))).then((e=>this.whenEntrypoint(n).then((t=>({entrypoint:t,styles:e[1]}))))),i,u(new Error(`Route did not complete loading: ${n}`))).then((({entrypoint:e,styles:t})=>{const n=Object.assign({styles:t},e);return"error"in e?e:n})).catch((e=>{if(r)throw e;return{error:e}})).finally((()=>{}))))},prefetch(t){let n;return(n=navigator.connection)&&(n.saveData||/2g/.test(n.effectiveType))?Promise.resolve():d(e,t).then((e=>Promise.all(l?e.scripts.map((e=>{return t=e,n="script",new Promise(((e,o)=>{const i=`\n link[rel="prefetch"][href^="${t}"],\n link[rel="preload"][href^="${t}"],\n script[src^="${t}"]`;if(document.querySelector(i))return e();(r=document.createElement("link")).as=n,r.rel="prefetch",r.crossOrigin=window.omnivoreEnv.__NEXT_CROSS_ORIGIN,r.onload=e,r.onerror=o,r.href=t,document.head.appendChild(r)}));var t,n,r})):[]))).then((()=>{o.requestIdleCallback((()=>this.loadRoute(t,!0).catch((()=>{}))))})).catch((()=>{}))}}},(r=n(9983))&&r.__esModule;var r,o=n(1976);const i=3800;function a(e,t,n){let r,o=t.get(e);if(o)return"future"in o?o.future:Promise.resolve(o);const i=new Promise((e=>{r=e}));return t.set(e,o={resolve:r,future:i}),n?n().then((e=>(r(e),e))).catch((n=>{throw t.delete(e),n})):i}const l=function(e){try{return e=document.createElement("link"),!!window.MSInputMethodContext&&!!document.documentMode||e.relList.supports("prefetch")}catch(e){return!1}}(),s=Symbol("ASSET_LOAD_ERROR");function u(e){return Object.defineProperty(e,s,{})}function c(e,t,n){return new Promise(((r,i)=>{let a=!1;e.then((e=>{a=!0,r(e)})).catch(i),o.requestIdleCallback((()=>setTimeout((()=>{a||i(n)}),t)))}))}function f(){return self.__BUILD_MANIFEST?Promise.resolve(self.__BUILD_MANIFEST):c(new Promise((e=>{const t=self.__BUILD_MANIFEST_CB;self.__BUILD_MANIFEST_CB=()=>{e(self.__BUILD_MANIFEST),t&&t()}})),i,u(new Error("Failed to load client build manifest")))}function d(e,t){return f().then((n=>{if(!(t in n))throw u(new Error(`Failed to lookup route: ${t}`));const r=n[t].map((t=>e+"/_next/"+encodeURI(t)));return{scripts:r.filter((e=>e.endsWith(".js"))),css:r.filter((e=>e.endsWith(".css")))}}))}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&(Object.assign(t.default,t),e.exports=t.default)},9518:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Router",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"withRouter",{enumerable:!0,get:function(){return l.default}}),t.useRouter=function(){return r.default.useContext(i.RouterContext)},t.createRouter=function(...e){return u.router=new o.default(...e),u.readyCallbacks.forEach((e=>e())),u.readyCallbacks=[],u.router},t.makePublicRouterInstance=function(e){const t=e,n={};for(const e of c)"object"!=typeof t[e]?n[e]=t[e]:n[e]=Object.assign(Array.isArray(t[e])?[]:{},t[e]);return n.events=o.default.events,f.forEach((e=>{n[e]=(...n)=>t[e](...n)})),n},t.default=void 0;var r=s(n(2784)),o=s(n(6640)),i=n(6510),a=s(n(274)),l=s(n(9564));function s(e){return e&&e.__esModule?e:{default:e}}const u={router:null,readyCallbacks:[],ready(e){if(this.router)return e();"undefined"!=typeof window&&this.readyCallbacks.push(e)}},c=["pathname","route","query","asPath","components","isFallback","basePath","locale","locales","defaultLocale","isReady","isPreview","isLocaleDomain","domainLocales"],f=["push","replace","reload","back","prefetch","beforePopState"];function d(){if(!u.router)throw new Error('No router instance found.\nYou should only use "next/router" on the client side of your app.\n');return u.router}Object.defineProperty(u,"events",{get:()=>o.default.events}),c.forEach((e=>{Object.defineProperty(u,e,{get:()=>d()[e]})})),f.forEach((e=>{u[e]=(...t)=>d()[e](...t)})),["routeChangeStart","beforeHistoryChange","routeChangeComplete","routeChangeError","hashChangeStart","hashChangeComplete"].forEach((e=>{u.ready((()=>{o.default.events.on(e,((...t)=>{const n=`on${e.charAt(0).toUpperCase()}${e.substring(1)}`,r=u;if(r[n])try{r[n](...t)}catch(e){console.error(`Error when running the Router event: ${n}`),console.error(a.default(e)?`${e.message}\n${e.stack}`:e+"")}}))}))}));var p=u;t.default=p,("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&(Object.assign(t.default,t),e.exports=t.default)},9515:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.handleClientScriptLoad=p,t.initScriptLoader=function(e){e.forEach(p),[...document.querySelectorAll('[data-nscript="beforeInteractive"]'),...document.querySelectorAll('[data-nscript="beforePageRender"]')].forEach((e=>{const t=e.id||e.getAttribute("src");c.add(t)}))},t.default=void 0;var r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(2784)),o=n(7177),i=n(9410),a=n(1976);function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e){for(var t=1;t{const{src:t,id:n,onLoad:r=(()=>{}),dangerouslySetInnerHTML:o,children:a="",strategy:l="afterInteractive",onError:s}=e,d=n||t;if(d&&c.has(d))return;if(u.has(t))return c.add(d),void u.get(t).then(r,s);const p=document.createElement("script"),h=new Promise(((e,t)=>{p.addEventListener("load",(function(t){e(),r&&r.call(this,t)})),p.addEventListener("error",(function(e){t(e)}))})).catch((function(e){s&&s(e)}));t&&u.set(t,h),c.add(d),o?p.innerHTML=o.__html||"":a?p.textContent="string"==typeof a?a:Array.isArray(a)?a.join(""):"":t&&(p.src=t);for(const[t,n]of Object.entries(e)){if(void 0===n||f.includes(t))continue;const e=i.DOMAttributeNames[t]||t.toLowerCase();p.setAttribute(e,n)}"worker"===l&&p.setAttribute("type","text/partytown"),p.setAttribute("data-nscript",l),document.body.appendChild(p)};function p(e){const{strategy:t="afterInteractive"}=e;"lazyOnload"===t?window.addEventListener("load",(()=>{a.requestIdleCallback((()=>d(e)))})):d(e)}t.default=function(e){const{src:t="",onLoad:n=(()=>{}),strategy:i="afterInteractive",onError:l}=e,u=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["src","onLoad","strategy","onError"]),{updateScripts:f,scripts:p,getIsSsr:h}=r.useContext(o.HeadManagerContext);return r.useEffect((()=>{"afterInteractive"===i?d(e):"lazyOnload"===i&&function(e){"complete"===document.readyState?a.requestIdleCallback((()=>d(e))):window.addEventListener("load",(()=>{a.requestIdleCallback((()=>d(e)))}))}(e)}),[e,i]),"beforeInteractive"!==i&&"worker"!==i||(f?(p[i]=(p[i]||[]).concat([s({src:t,onLoad:n,onError:l},u)]),f(p)):h&&h()?c.add(u.id||t):h&&!h()&&d(e)),null},("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&(Object.assign(t.default,t),e.exports=t.default)},3321:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useIntersection=function({rootRef:e,rootMargin:t,disabled:n}){const s=n||!i,u=r.useRef(),[c,f]=r.useState(!1),[d,p]=r.useState(e?e.current:null),h=r.useCallback((e=>{u.current&&(u.current(),u.current=void 0),s||c||e&&e.tagName&&(u.current=function(e,t,n){const{id:r,observer:o,elements:i}=function(e){const t={root:e.root||null,margin:e.rootMargin||""};let n,r=l.find((e=>e.root===t.root&&e.margin===t.margin));if(r?n=a.get(r):(n=a.get(t),l.push(t)),n)return n;const o=new Map,i=new IntersectionObserver((e=>{e.forEach((e=>{const t=o.get(e.target),n=e.isIntersecting||e.intersectionRatio>0;t&&n&&t(n)}))}),e);return a.set(t,n={id:t,observer:i,elements:o}),n}(n);return i.set(e,(e=>e&&f(e))),o.observe(e),function(){if(i.delete(e),o.unobserve(e),0===i.size){o.disconnect(),a.delete(r);let e=l.findIndex((e=>e.root===r.root&&e.margin===r.margin));e>-1&&l.splice(e,1)}}}(e,0,{root:d,rootMargin:t}))}),[s,d,t,c]),g=r.useCallback((()=>{f(!1)}),[]);return r.useEffect((()=>{if(!i&&!c){const e=o.requestIdleCallback((()=>f(!0)));return()=>o.cancelIdleCallback(e)}}),[c]),r.useEffect((()=>{e&&p(e.current)}),[e]),[h,c,g]};var r=n(2784),o=n(1976);const i="undefined"!=typeof IntersectionObserver,a=new Map,l=[];("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&(Object.assign(t.default,t),e.exports=t.default)},9564:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){function t(t){return o.default.createElement(e,Object.assign({router:i.useRouter()},t))}return t.getInitialProps=e.getInitialProps,t.origGetInitialProps=e.origGetInitialProps,t};var r,o=(r=n(2784))&&r.__esModule?r:{default:r},i=n(9518);("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&(Object.assign(t.default,t),e.exports=t.default)},9264:(e,t)=>{"use strict";function n(e,t){void 0===t&&(t={});for(var n=function(e){for(var t=[],n=0;n=48&&s<=57||s>=65&&s<=90||s>=97&&s<=122||95===s))break;a+=e[l++]}if(!a)throw new TypeError("Missing parameter name at "+n);t.push({type:"NAME",index:n,value:a}),n=l}else t.push({type:"CLOSE",index:n,value:e[n++]});else t.push({type:"OPEN",index:n,value:e[n++]});else t.push({type:"ESCAPED_CHAR",index:n++,value:e[n++]});else t.push({type:"MODIFIER",index:n,value:e[n++]})}return t.push({type:"END",index:n,value:""}),t}(e),r=t.prefixes,o=void 0===r?"./":r,a="[^"+i(t.delimiter||"/#?")+"]+?",l=[],s=0,u=0,c="",f=function(e){if(u-1:void 0===E;o||(g+="(?:"+h+"(?="+p+"))?"),k||(g+="(?="+h+"|"+p+")")}return new RegExp(g,a(n))}function s(e,t,r){return e instanceof RegExp?function(e,t){if(!t)return e;var n=e.source.match(/\((?!\?)/g);if(n)for(var r=0;r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=o,t.getProperError=function(e){return o(e)?e:new Error(r.isPlainObject(e)?JSON.stringify(e):e+"")};var r=n(9910);function o(e){return"object"==typeof e&&null!==e&&"name"in e&&"message"in e}},8058:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.escapeStringRegexp=function(e){return n.test(e)?e.replace(r,"\\$&"):e};const n=/[|\\{}()[\]^$+*?.-]/,r=/[|\\{}()[\]^$+*?.-]/g},7177:(e,t,n)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.HeadManagerContext=void 0;const o=((r=n(2784))&&r.__esModule?r:{default:r}).default.createContext({});t.HeadManagerContext=o},927:(e,t)=>{"use strict";t.D=function(e,t,n){let r;if(e){n&&(n=n.toLowerCase());for(const a of e){var o,i;if(t===(null===(o=a.domain)||void 0===o?void 0:o.split(":")[0].toLowerCase())||n===a.defaultLocale.toLowerCase()||(null===(i=a.locales)||void 0===i?void 0:i.some((e=>e.toLowerCase()===n)))){r=a;break}}}return r}},816:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeLocalePath=function(e,t){let n;const r=e.split("/");return(t||[]).some((t=>!(!r[1]||r[1].toLowerCase()!==t.toLowerCase()||(n=t,r.splice(1,1),e=r.join("/")||"/",0)))),{pathname:e,detectedLocale:n}}},9910:(e,t)=>{"use strict";function n(e){return Object.prototype.toString.call(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.getObjectClassLabel=n,t.isPlainObject=function(e){if("[object Object]"!==n(e))return!1;const t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}},7471:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){const e=Object.create(null);return{on(t,n){(e[t]||(e[t]=[])).push(n)},off(t,n){e[t]&&e[t].splice(e[t].indexOf(n)>>>0,1)},emit(t,...n){(e[t]||[]).slice().map((e=>{e(...n)}))}}}},997:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.denormalizePagePath=function(e){let t=o.normalizePathSep(e);return t.startsWith("/index/")&&!r.isDynamicRoute(t)?t.slice(6):"/index"!==t?t:"/"};var r=n(9150),o=n(9356)},9356:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.normalizePathSep=function(e){return e.replace(/\\/g,"/")}},6510:(e,t,n)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.RouterContext=void 0;const o=((r=n(2784))&&r.__esModule?r:{default:r}).default.createContext(null);t.RouterContext=o},6640:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getDomainLocale=function(e,t,n,r){if(window.omnivoreEnv.__NEXT_I18N_SUPPORT){t=t||s.normalizeLocalePath(e,n).detectedLocale;const o=w(r,void 0,t);return!!o&&`http${o.http?"":"s"}://${o.domain}${x||""}${t===o.defaultLocale?"":`/${t}`}${e}`}return!1},t.addLocale=_,t.delLocale=C,t.hasBasePath=L,t.addBasePath=P,t.delBasePath=R,t.isLocalURL=j,t.interpolateAs=T,t.resolveHref=M,t.default=void 0;var r=n(1119),o=n(7928),i=n(9515),a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(274)),l=n(997),s=n(816),u=b(n(7471)),c=n(1624),f=n(7482),d=n(1577),p=n(646),h=b(n(5317)),g=n(3107),m=n(4794),v=n(2763),y=n(6555);function b(e){return e&&e.__esModule?e:{default:e}}let w;window.omnivoreEnv.__NEXT_I18N_SUPPORT&&(w=n(927).D);const x=window.omnivoreEnv.__NEXT_ROUTER_BASEPATH||"";function E(){return Object.assign(new Error("Route Cancelled"),{cancelled:!0})}function k(e,t){if(!e.startsWith("/")||!t)return e;const n=O(e);return r.normalizePathTrailingSlash(`${t}${n}`)+e.slice(n.length)}function S(e,t){return(e=O(e))===t||e.startsWith(t+"/")}function _(e,t,n){if(window.omnivoreEnv.__NEXT_I18N_SUPPORT&&t&&t!==n){const n=O(e).toLowerCase();if(!S(n,"/"+t.toLowerCase())&&!S(n,"/api"))return k(e,"/"+t)}return e}function C(e,t){if(window.omnivoreEnv.__NEXT_I18N_SUPPORT){const n=O(e),r=n.toLowerCase(),o=t&&t.toLowerCase();return t&&(r.startsWith("/"+o+"/")||r==="/"+o)?(n.length===t.length+1?"/":"")+e.slice(t.length+1):e}return e}function O(e){const t=e.indexOf("?"),n=e.indexOf("#");return(t>-1||n>-1)&&(e=e.substring(0,t>-1?t:n)),e}function L(e){return S(e,x)}function P(e){return k(e,x)}function R(e){return(e=e.slice(x.length)).startsWith("/")||(e=`/${e}`),e}function j(e){if(e.startsWith("/")||e.startsWith("#")||e.startsWith("?"))return!0;try{const t=c.getLocationOrigin(),n=new URL(e,t);return n.origin===t&&L(n.pathname)}catch(e){return!1}}function T(e,t,n){let r="";const o=m.getRouteRegex(e),i=o.groups,a=(t!==e?g.getRouteMatcher(o)(t):"")||n;r=e;const l=Object.keys(i);return l.every((e=>{let t=a[e]||"";const{repeat:n,optional:o}=i[e];let l=`[${n?"...":""}${e}]`;return o&&(l=`${t?"":"/"}[${l}]`),n&&!Array.isArray(t)&&(t=[t]),(o||e in a)&&(r=r.replace(l,n?t.map((e=>encodeURIComponent(e))).join("/"):encodeURIComponent(t))||"/")}))||(r=""),{params:l,result:r}}function A(e,t){const n={};return Object.keys(e).forEach((r=>{t.includes(r)||(n[r]=e[r])})),n}function M(e,t,n){let o,i="string"==typeof t?t:y.formatWithValidation(t);const a=i.match(/^[a-zA-Z]{1,}:\/\//),l=a?i.slice(a[0].length):i;if((l.split("?")[0]||"").match(/(\/\/|\\)/)){console.error(`Invalid href passed to next/router: ${i}, repeated forward-slashes (//) or backslashes \\ are not valid in the href`);const e=c.normalizeRepeatedSlashes(l);i=(a?a[0]:"")+e}if(!j(i))return n?[i]:i;try{o=new URL(i.startsWith("#")?e.asPath:e.pathname,"http://n")}catch(e){o=new URL("/","http://n")}try{const e=new URL(i,o);e.pathname=r.normalizePathTrailingSlash(e.pathname);let t="";if(f.isDynamicRoute(e.pathname)&&e.searchParams&&n){const n=p.searchParamsToUrlQuery(e.searchParams),{result:r,params:o}=T(e.pathname,e.pathname,n);r&&(t=y.formatWithValidation({pathname:r,hash:e.hash,query:A(n,o)}))}const a=e.origin===o.origin?e.href.slice(e.origin.length):e.href;return n?[a,t||a]:a}catch(e){return n?[i]:i}}function I(e){const t=c.getLocationOrigin();return e.startsWith(t)?e.substring(t.length):e}function D(e,t,n){let[r,o]=M(e,t,!0);const i=c.getLocationOrigin(),a=r.startsWith(i),l=o&&o.startsWith(i);r=I(r),o=o?I(o):o;const s=a?r:P(r),u=n?I(M(e,n)):o||r;return{url:s,as:l?u:P(u)}}function N(e,t){const n=r.removePathTrailingSlash(l.denormalizePagePath(e));return"/404"===n||"/_error"===n?e:(t.includes(n)||t.some((t=>{if(f.isDynamicRoute(t)&&m.getRouteRegex(t).re.test(n))return e=t,!0})),r.removePathTrailingSlash(e))}const F=window.omnivoreEnv.__NEXT_SCROLL_RESTORATION&&"undefined"!=typeof window&&"scrollRestoration"in window.history&&!!function(){try{let e="__next";return sessionStorage.setItem(e,e),sessionStorage.removeItem(e),!0}catch(e){}}(),z=Symbol("SSG_DATA_NOT_FOUND");function B(e,t,n){return fetch(e,{credentials:"same-origin"}).then((r=>{if(!r.ok){if(t>1&&r.status>=500)return B(e,t-1,n);if(404===r.status)return r.json().then((e=>{if(e.notFound)return{notFound:z};throw new Error("Failed to load static props")}));throw new Error("Failed to load static props")}return n.text?r.text():r.json()}))}function $(e,t,n,r,i){const{href:a}=new URL(e,window.location.href);return void 0!==r[a]?r[a]:r[a]=B(e,t?3:1,{text:n}).catch((e=>{throw t||o.markAssetError(e),e})).then((e=>(i||delete r[a],e))).catch((e=>{throw delete r[a],e}))}class W{constructor(e,t,n,{initialProps:o,pageLoader:i,App:a,wrapApp:l,Component:s,err:u,subscription:p,isFallback:h,locale:g,locales:m,defaultLocale:v,domainLocales:b,isPreview:E,isRsc:k}){this.sdc={},this.sdr={},this.sde={},this._idx=0,this.onPopState=e=>{const t=e.state;if(!t){const{pathname:e,query:t}=this;return void this.changeState("replaceState",y.formatWithValidation({pathname:P(e),query:t}),c.getURL())}if(!t.__N)return;let n;const{url:r,as:o,options:i,idx:a}=t;if(window.omnivoreEnv.__NEXT_SCROLL_RESTORATION&&F&&this._idx!==a){try{sessionStorage.setItem("__next_scroll_"+this._idx,JSON.stringify({x:self.pageXOffset,y:self.pageYOffset}))}catch{}try{const e=sessionStorage.getItem("__next_scroll_"+a);n=JSON.parse(e)}catch{n={x:0,y:0}}}this._idx=a;const{pathname:l}=d.parseRelativeUrl(r);this.isSsr&&o===P(this.asPath)&&l===P(this.pathname)||this._bps&&!this._bps(t)||this.change("replaceState",r,o,Object.assign({},i,{shallow:i.shallow&&this._shallow,locale:i.locale||this.defaultLocale}),n)};const S=r.removePathTrailingSlash(e);this.components={},"/_error"!==e&&(this.components[S]={Component:s,initial:!0,props:o,err:u,__N_SSG:o&&o.__N_SSG,__N_SSP:o&&o.__N_SSP,__N_RSC:!!k}),this.components["/_app"]={Component:a,styleSheets:[]},this.events=W.events,this.pageLoader=i;const _=f.isDynamicRoute(e)&&self.__NEXT_DATA__.autoExport;if(this.basePath=x,this.sub=p,this.clc=null,this._wrapApp=l,this.isSsr=!0,this.isLocaleDomain=!1,this.isReady=!(!(self.__NEXT_DATA__.gssp||self.__NEXT_DATA__.gip||self.__NEXT_DATA__.appGip&&!self.__NEXT_DATA__.gsp)&&(_||self.location.search||window.omnivoreEnv.__NEXT_HAS_REWRITES)),window.omnivoreEnv.__NEXT_I18N_SUPPORT&&(this.locales=m,this.defaultLocale=v,this.domainLocales=b,this.isLocaleDomain=!!w(b,self.location.hostname)),this.state={route:S,pathname:e,query:t,asPath:_?e:n,isPreview:!!E,locale:window.omnivoreEnv.__NEXT_I18N_SUPPORT?g:void 0,isFallback:h},"undefined"!=typeof window){if(!n.startsWith("//")){const r={locale:g};r._shouldResolveHref=n!==e,this.changeState("replaceState",y.formatWithValidation({pathname:P(e),query:t}),c.getURL(),r)}window.addEventListener("popstate",this.onPopState),window.omnivoreEnv.__NEXT_SCROLL_RESTORATION&&F&&(window.history.scrollRestoration="manual")}}reload(){window.location.reload()}back(){window.history.back()}push(e,t,n={}){if(window.omnivoreEnv.__NEXT_SCROLL_RESTORATION&&F)try{sessionStorage.setItem("__next_scroll_"+this._idx,JSON.stringify({x:self.pageXOffset,y:self.pageYOffset}))}catch{}return({url:e,as:t}=D(this,e,t)),this.change("pushState",e,t,n)}replace(e,t,n={}){return({url:e,as:t}=D(this,e,t)),this.change("replaceState",e,t,n)}async change(e,t,n,l,u){if(!j(t))return window.location.href=t,!1;const p=l._h||l._shouldResolveHref||O(t)===O(n),v={...this.state};l._h&&(this.isReady=!0);const b=v.locale;if(window.omnivoreEnv.__NEXT_I18N_SUPPORT){v.locale=!1===l.locale?this.defaultLocale:l.locale||v.locale,void 0===l.locale&&(l.locale=v.locale);const e=d.parseRelativeUrl(L(n)?R(n):n),r=s.normalizeLocalePath(e.pathname,this.locales);r.detectedLocale&&(v.locale=r.detectedLocale,e.pathname=P(e.pathname),n=y.formatWithValidation(e),t=P(s.normalizeLocalePath(L(t)?R(t):t,this.locales).pathname));let o=!1;var x;window.omnivoreEnv.__NEXT_I18N_SUPPORT&&((null===(x=this.locales)||void 0===x?void 0:x.includes(v.locale))||(e.pathname=_(e.pathname,v.locale),window.location.href=y.formatWithValidation(e),o=!0));const i=w(this.domainLocales,void 0,v.locale);if(window.omnivoreEnv.__NEXT_I18N_SUPPORT&&!o&&i&&this.isLocaleDomain&&self.location.hostname!==i.domain){const e=R(n);window.location.href=`http${i.http?"":"s"}://${i.domain}${P(`${v.locale===i.defaultLocale?"":`/${v.locale}`}${"/"===e?"":e}`||"/")}`,o=!0}if(o)return new Promise((()=>{}))}l._h||(this.isSsr=!1),c.ST&&performance.mark("routeChange");const{shallow:E=!1,scroll:k=!0}=l,S={shallow:E};this._inFlightRoute&&this.abortComponentLoad(this._inFlightRoute,S),n=P(_(L(n)?R(n):n,l.locale,this.defaultLocale));const M=C(L(n)?R(n):n,v.locale);this._inFlightRoute=n;let I=b!==v.locale;if(!l._h&&this.onlyAHashChange(M)&&!I)return v.asPath=M,W.events.emit("hashChangeStart",n,S),this.changeState(e,t,n,{...l,scroll:!1}),k&&this.scrollToHash(M),this.set(v,this.components[v.route],null),W.events.emit("hashChangeComplete",n,S),!0;let F,B,$=d.parseRelativeUrl(t),{pathname:H,query:U}=$;try{[F,{__rewrites:B}]=await Promise.all([this.pageLoader.getPageList(),o.getClientBuildManifest(),this.pageLoader.getMiddlewareList()])}catch(e){return window.location.href=n,!1}this.urlIsNew(M)||I||(e="replaceState");let V=n;if(H=H?r.removePathTrailingSlash(R(H)):H,p&&"/_error"!==H)if(l._shouldResolveHref=!0,window.omnivoreEnv.__NEXT_HAS_REWRITES&&n.startsWith("/")){const e=h.default(P(_(M,v.locale)),F,B,U,(e=>N(e,F)),this.locales);if(e.externalDest)return location.href=n,!0;V=e.asPath,e.matchedPage&&e.resolvedHref&&(H=e.resolvedHref,$.pathname=P(H),t=y.formatWithValidation($))}else $.pathname=N(H,F),$.pathname!==H&&(H=$.pathname,$.pathname=P(H),t=y.formatWithValidation($));if(!j(n))return window.location.href=n,!1;if(V=C(R(V),v.locale),(!l.shallow||1===l._h)&&(1!==l._h||f.isDynamicRoute(r.removePathTrailingSlash(H)))){const r=await this._preflightRequest({as:n,cache:!0,pages:F,pathname:H,query:U,locale:v.locale,isPreview:v.isPreview});if("rewrite"===r.type)U={...U,...r.parsedAs.query},V=r.asPath,H=r.resolvedHref,$.pathname=r.resolvedHref,t=y.formatWithValidation($);else{if("redirect"===r.type&&r.newAs)return this.change(e,r.newUrl,r.newAs,l);if("redirect"===r.type&&r.destination)return window.location.href=r.destination,new Promise((()=>{}));if("refresh"===r.type&&n!==window.location.pathname)return window.location.href=n,new Promise((()=>{}))}}const q=r.removePathTrailingSlash(H);if(f.isDynamicRoute(q)){const e=d.parseRelativeUrl(V),r=e.pathname,o=m.getRouteRegex(q),i=g.getRouteMatcher(o)(r),a=q===r,l=a?T(q,r,U):{};if(!i||a&&!l.result){const e=Object.keys(o.groups).filter((e=>!U[e]));if(e.length>0)throw new Error((a?`The provided \`href\` (${t}) value is missing query values (${e.join(", ")}) to be interpolated properly. `:`The provided \`as\` value (${r}) is incompatible with the \`href\` value (${q}). `)+"Read more: https://nextjs.org/docs/messages/"+(a?"href-interpolation-failed":"incompatible-href-as"))}else a?n=y.formatWithValidation(Object.assign({},e,{pathname:l.result,query:A(U,l.params)})):Object.assign(U,i)}W.events.emit("routeChangeStart",n,S);try{var K,G;let r=await this.getRouteInfo(q,H,U,n,V,S,v.locale,v.isPreview),{error:o,props:a,__N_SSG:s,__N_SSP:c}=r;const f=r.Component;if(f&&f.unstable_scriptLoader&&[].concat(f.unstable_scriptLoader()).forEach((e=>{i.handleClientScriptLoad(e.props)})),(s||c)&&a){if(a.pageProps&&a.pageProps.__N_REDIRECT){const t=a.pageProps.__N_REDIRECT;if(t.startsWith("/")&&!1!==a.pageProps.__N_REDIRECT_BASE_PATH){const n=d.parseRelativeUrl(t);n.pathname=N(n.pathname,F);const{url:r,as:o}=D(this,t,t);return this.change(e,r,o,l)}return window.location.href=t,new Promise((()=>{}))}if(v.isPreview=!!a.__N_PREVIEW,a.notFound===z){let e;try{await this.fetchComponent("/404"),e="/404"}catch(t){e="/_error"}r=await this.getRouteInfo(e,e,U,n,V,{shallow:!1},v.locale,v.isPreview)}}W.events.emit("beforeHistoryChange",n,S),this.changeState(e,t,n,l),l._h&&"/_error"===H&&500===(null===(K=self.__NEXT_DATA__.props)||void 0===K||null===(G=K.pageProps)||void 0===G?void 0:G.statusCode)&&(null==a?void 0:a.pageProps)&&(a.pageProps.statusCode=500);const p=l.shallow&&v.route===q;var X;const h=(null!==(X=l.scroll)&&void 0!==X?X:!p)?{x:0,y:0}:null;if(await this.set({...v,route:q,pathname:H,query:U,asPath:M,isFallback:!1},r,null!=u?u:h).catch((e=>{if(!e.cancelled)throw e;o=o||e})),o)throw W.events.emit("routeChangeError",o,M,S),o;return window.omnivoreEnv.__NEXT_I18N_SUPPORT&&v.locale&&(document.documentElement.lang=v.locale),W.events.emit("routeChangeComplete",n,S),!0}catch(e){if(a.default(e)&&e.cancelled)return!1;throw e}}changeState(e,t,n,r={}){"pushState"===e&&c.getURL()===n||(this._shallow=r.shallow,window.history[e]({url:t,as:n,options:r,__N:!0,idx:this._idx="pushState"!==e?this._idx:this._idx+1},"",n))}async handleRouteInfoError(e,t,n,r,i,l){if(e.cancelled)throw e;if(o.isAssetError(e)||l)throw W.events.emit("routeChangeError",e,r,i),window.location.href=r,E();try{let r,o,i;void 0!==r&&void 0!==o||({page:r,styleSheets:o}=await this.fetchComponent("/_error"));const a={props:i,Component:r,styleSheets:o,err:e,error:e};if(!a.props)try{a.props=await this.getInitialProps(r,{err:e,pathname:t,query:n})}catch(e){console.error("Error in error page `getInitialProps`: ",e),a.props={}}return a}catch(e){return this.handleRouteInfoError(a.default(e)?e:new Error(e+""),t,n,r,i,!0)}}async getRouteInfo(e,t,n,r,o,i,l,s){try{const a=this.components[e];if(i.shallow&&a&&this.route===e)return a;let u;a&&!("initial"in a)&&(u=a);const c=u||await this.fetchComponent(e).then((e=>({Component:e.page,styleSheets:e.styleSheets,__N_SSG:e.mod.__N_SSG,__N_SSP:e.mod.__N_SSP,__N_RSC:!!e.mod.__next_rsc__}))),{Component:f,__N_SSG:d,__N_SSP:p,__N_RSC:h}=c;let g;const m=p&&h;(d||p||h)&&(g=this.pageLoader.getDataHref({href:y.formatWithValidation({pathname:t,query:n}),asPath:o,ssg:d,flight:m,locale:l}));const v=await this._getData((()=>(d||p||h)&&!m?$(g,this.isSsr,!1,d?this.sdc:this.sdr,!!d&&!s):this.getInitialProps(f,{pathname:t,query:n,asPath:r,locale:l,locales:this.locales,defaultLocale:this.defaultLocale})));if(h)if(m){const{data:e}=await this._getData((()=>this._getFlightData(g)));v.pageProps=Object.assign(v.pageProps,{__flight__:e})}else{const{__flight__:e}=v;v.pageProps=Object.assign({},v.pageProps,{__flight__:e})}return c.props=v,this.components[e]=c,c}catch(e){return this.handleRouteInfoError(a.getProperError(e),t,n,r,i)}}set(e,t,n){return this.state=e,this.sub(t,this.components["/_app"].Component,n)}beforePopState(e){this._bps=e}onlyAHashChange(e){if(!this.asPath)return!1;const[t,n]=this.asPath.split("#"),[r,o]=e.split("#");return!(!o||t!==r||n!==o)||t===r&&n!==o}scrollToHash(e){const[,t=""]=e.split("#");if(""===t||"top"===t)return void window.scrollTo(0,0);const n=document.getElementById(t);if(n)return void n.scrollIntoView();const r=document.getElementsByName(t)[0];r&&r.scrollIntoView()}urlIsNew(e){return this.asPath!==e}async prefetch(e,t=e,n={}){let i=d.parseRelativeUrl(e),{pathname:a,query:l}=i;if(window.omnivoreEnv.__NEXT_I18N_SUPPORT&&!1===n.locale){a=s.normalizeLocalePath(a,this.locales).pathname,i.pathname=a,e=y.formatWithValidation(i);let r=d.parseRelativeUrl(t);const o=s.normalizeLocalePath(r.pathname,this.locales);r.pathname=o.pathname,n.locale=o.detectedLocale||this.defaultLocale,t=y.formatWithValidation(r)}const u=await this.pageLoader.getPageList();let c=t;if(window.omnivoreEnv.__NEXT_HAS_REWRITES&&t.startsWith("/")){let n;({__rewrites:n}=await o.getClientBuildManifest());const r=h.default(P(_(t,this.locale)),u,n,i.query,(e=>N(e,u)),this.locales);if(r.externalDest)return;c=C(R(r.asPath),this.locale),r.matchedPage&&r.resolvedHref&&(a=r.resolvedHref,i.pathname=a,e=y.formatWithValidation(i))}else i.pathname=N(i.pathname,u),i.pathname!==a&&(a=i.pathname,i.pathname=a,e=y.formatWithValidation(i));const f=await this._preflightRequest({as:P(t),cache:!0,pages:u,pathname:a,query:l,locale:this.locale,isPreview:this.isPreview});"rewrite"===f.type&&(i.pathname=f.resolvedHref,a=f.resolvedHref,l={...l,...f.parsedAs.query},c=f.asPath,e=y.formatWithValidation(i));const p=r.removePathTrailingSlash(a);await Promise.all([this.pageLoader._isSsg(p).then((t=>!!t&&$(this.pageLoader.getDataHref({href:e,asPath:c,ssg:!0,locale:void 0!==n.locale?n.locale:this.locale}),!1,!1,this.sdc,!0))),this.pageLoader[n.priority?"loadPage":"prefetch"](p)])}async fetchComponent(e){let t=!1;const n=this.clc=()=>{t=!0},r=()=>{if(t){const t=new Error(`Abort fetching component for route: "${e}"`);throw t.cancelled=!0,t}n===this.clc&&(this.clc=null)};try{const t=await this.pageLoader.loadPage(e);return r(),t}catch(e){throw r(),e}}_getData(e){let t=!1;const n=()=>{t=!0};return this.clc=n,e().then((e=>{if(n===this.clc&&(this.clc=null),t){const e=new Error("Loading initial props cancelled");throw e.cancelled=!0,e}return e}))}_getFlightData(e){return $(e,!0,!0,this.sdc,!1).then((e=>({data:e})))}async _preflightRequest(e){const t=O(e.as),n=C(L(t)?R(t):t,e.locale);if(!(await this.pageLoader.getMiddlewareList()).some((([e,t])=>g.getRouteMatcher(v.getMiddlewareRegex(e,!t))(n))))return{type:"next"};const o=_(e.as,e.locale);let i;try{i=await this._getPreflightData({preflightHref:o,shouldCache:e.cache,isPreview:e.isPreview})}catch(t){return{type:"redirect",destination:e.as}}if(i.rewrite){if(!i.rewrite.startsWith("/"))return{type:"redirect",destination:e.as};const t=d.parseRelativeUrl(s.normalizeLocalePath(L(i.rewrite)?R(i.rewrite):i.rewrite,this.locales).pathname),n=r.removePathTrailingSlash(t.pathname);let o,a;return e.pages.includes(n)?(o=!0,a=n):(a=N(n,e.pages),a!==t.pathname&&e.pages.includes(a)&&(o=!0)),{type:"rewrite",asPath:t.pathname,parsedAs:t,matchedPage:o,resolvedHref:a}}if(i.redirect){if(i.redirect.startsWith("/")){const e=r.removePathTrailingSlash(s.normalizeLocalePath(L(i.redirect)?R(i.redirect):i.redirect,this.locales).pathname),{url:t,as:n}=D(this,e,e);return{type:"redirect",newUrl:t,newAs:n}}return{type:"redirect",destination:i.redirect}}return i.refresh&&!i.ssr?{type:"refresh"}:{type:"next"}}_getPreflightData(e){const{preflightHref:t,shouldCache:n=!1,isPreview:r}=e,{href:o}=new URL(t,window.location.href);return!r&&n&&this.sde[o]?Promise.resolve(this.sde[o]):fetch(t,{method:"HEAD",credentials:"same-origin",headers:{"x-middleware-preflight":"1"}}).then((e=>{if(!e.ok)throw new Error("Failed to preflight request");return{cache:e.headers.get("x-middleware-cache"),redirect:e.headers.get("Location"),refresh:e.headers.has("x-middleware-refresh"),rewrite:e.headers.get("x-middleware-rewrite"),ssr:!!e.headers.get("x-middleware-ssr")}})).then((e=>(n&&"no-cache"!==e.cache&&(this.sde[o]=e),e))).catch((e=>{throw delete this.sde[o],e}))}getInitialProps(e,t){const{Component:n}=this.components["/_app"],r=this._wrapApp(n);return t.AppTree=r,c.loadGetInitialProps(n,{AppTree:r,Component:e,router:this,ctx:t})}abortComponentLoad(e,t){this.clc&&(W.events.emit("routeChangeError",E(),e,t),this.clc(),this.clc=null)}get route(){return this.state.route}get pathname(){return this.state.pathname}get query(){return this.state.query}get asPath(){return this.state.asPath}get locale(){return this.state.locale}get isFallback(){return this.state.isFallback}get isPreview(){return this.state.isPreview}}t.default=W,W.events=u.default()},6555:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatUrl=i,t.formatWithValidation=function(e){return i(e)},t.urlObjectKeys=void 0;var r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(646));const o=/https?|ftp|gopher|file/;function i(e){let{auth:t,hostname:n}=e,i=e.protocol||"",a=e.pathname||"",l=e.hash||"",s=e.query||"",u=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?u=t+e.host:n&&(u=t+(~n.indexOf(":")?`[${n}]`:n),e.port&&(u+=":"+e.port)),s&&"object"==typeof s&&(s=String(r.urlQueryToSearchParams(s)));let c=e.search||s&&`?${s}`||"";return i&&!i.endsWith(":")&&(i+=":"),e.slashes||(!i||o.test(i))&&!1!==u?(u="//"+(u||""),a&&"/"!==a[0]&&(a="/"+a)):u||(u=""),l&&"#"!==l[0]&&(l="#"+l),c&&"?"!==c[0]&&(c="?"+c),a=a.replace(/[?#]/g,encodeURIComponent),c=c.replace("#","%23"),`${i}${u}${a}${c}${l}`}t.urlObjectKeys=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"]},9983:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t=""){return("/"===e?"/index":/^\/index(\/|$)/.test(e)?`/index${e}`:`${e}`)+t}},2763:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getMiddlewareRegex=function(e,t=!0){const n=r.getParametrizedRoute(e);let o=t?"(?!_next).*":"",i=t?"(?:(/.*)?)":"";return"routeKeys"in n?"/"===n.parameterizedRoute?{groups:{},namedRegex:`^/${o}$`,re:new RegExp(`^/${o}$`),routeKeys:{}}:{groups:n.groups,namedRegex:`^${n.namedParameterizedRoute}${i}$`,re:new RegExp(`^${n.parameterizedRoute}${i}$`),routeKeys:n.routeKeys}:"/"===n.parameterizedRoute?{groups:{},re:new RegExp(`^/${o}$`)}:{groups:{},re:new RegExp(`^${n.parameterizedRoute}${i}$`)}};var r=n(4794)},9150:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getMiddlewareRegex",{enumerable:!0,get:function(){return r.getMiddlewareRegex}}),Object.defineProperty(t,"getRouteMatcher",{enumerable:!0,get:function(){return o.getRouteMatcher}}),Object.defineProperty(t,"getRouteRegex",{enumerable:!0,get:function(){return i.getRouteRegex}}),Object.defineProperty(t,"getSortedRoutes",{enumerable:!0,get:function(){return a.getSortedRoutes}}),Object.defineProperty(t,"isDynamicRoute",{enumerable:!0,get:function(){return l.isDynamicRoute}});var r=n(2763),o=n(3107),i=n(4794),a=n(9036),l=n(7482)},7482:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isDynamicRoute=function(e){return n.test(e)};const n=/\/\[[^/]+?\](?=\/|$)/},1577:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseRelativeUrl=function(e,t){const n=new URL("undefined"==typeof window?"http://n":r.getLocationOrigin()),i=t?new URL(t,n):n,{pathname:a,searchParams:l,search:s,hash:u,href:c,origin:f}=new URL(e,i);if(f!==n.origin)throw new Error(`invariant: invalid relative URL, router received ${e}`);return{pathname:a,query:o.searchParamsToUrlQuery(l),search:s,hash:u,href:c.slice(n.origin.length)}};var r=n(1624),o=n(646)},2011:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseUrl=function(e){if(e.startsWith("/"))return o.parseRelativeUrl(e);const t=new URL(e);return{hash:t.hash,hostname:t.hostname,href:t.href,pathname:t.pathname,port:t.port,protocol:t.protocol,query:r.searchParamsToUrlQuery(t.searchParams),search:t.search}};var r=n(646),o=n(1577)},1095:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getPathMatch=function(e,t){const n=[],o=r.pathToRegexp(e,n,{delimiter:"/",sensitive:!1,strict:null==t?void 0:t.strict}),i=r.regexpToFunction((null==t?void 0:t.regexModifier)?new RegExp(t.regexModifier(o.source),o.flags):o,n);return(e,r)=>{const o=null!=e&&i(e);if(!o)return!1;if(null==t?void 0:t.removeUnnamedParams)for(const e of n)"number"==typeof e.name&&delete o.params[e.name];return{...r,...o.params}}};var r=n(9264)},9716:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.matchHas=function(e,t,n){const r={};return!!t.every((t=>{let o,i=t.key;switch(t.type){case"header":i=i.toLowerCase(),o=e.headers[i];break;case"cookie":o=e.cookies[t.key];break;case"query":o=n[i];break;case"host":{const{host:t}=(null==e?void 0:e.headers)||{};o=null==t?void 0:t.split(":")[0].toLowerCase();break}}if(!t.value&&o)return r[function(e){let t="";for(let n=0;n64&&r<91||r>96&&r<123)&&(t+=e[n])}return t}(i)]=o,!0;if(o){const e=new RegExp(`^${t.value}$`),n=Array.isArray(o)?o.slice(-1)[0].match(e):o.match(e);if(n)return Array.isArray(n)&&(n.groups?Object.keys(n.groups).forEach((e=>{r[e]=n.groups[e]})):"host"===t.type&&n[0]&&(r.host=n[0])),!0}return!1}))&&r},t.compileNonPath=a,t.prepareDestination=function(e){const t=Object.assign({},e.query);delete t.__nextLocale,delete t.__nextDefaultLocale;let n=e.destination;for(const r of Object.keys({...e.params,...t}))s=r,n=n.replace(new RegExp(`:${o.escapeStringRegexp(s)}`,"g"),`__ESC_COLON_${s}`);var s;const u=i.parseUrl(n),c=u.query,f=l(`${u.pathname}${u.hash||""}`),d=l(u.hostname||""),p=[],h=[];r.pathToRegexp(f,p),r.pathToRegexp(d,h);const g=[];p.forEach((e=>g.push(e.name))),h.forEach((e=>g.push(e.name)));const m=r.compile(f,{validate:!1}),v=r.compile(d,{validate:!1});for(const[t,n]of Object.entries(c))Array.isArray(n)?c[t]=n.map((t=>a(l(t),e.params))):c[t]=a(l(n),e.params);let y,b=Object.keys(e.params).filter((e=>"nextInternalLocale"!==e));if(e.appendParamsToQuery&&!b.some((e=>g.includes(e))))for(const t of b)t in c||(c[t]=e.params[t]);try{y=m(e.params);const[t,n]=y.split("#");u.hostname=v(e.params),u.pathname=t,u.hash=`${n?"#":""}${n||""}`,delete u.search}catch(e){if(e.message.match(/Expected .*? to not repeat, but got an array/))throw new Error("To use a multi-match in the destination you must add `*` at the end of the param name to signify it should repeat. https://nextjs.org/docs/messages/invalid-multi-match");throw e}return u.query={...t,...u.query},{newUrl:y,destQuery:c,parsedDestination:u}};var r=n(9264),o=n(8058),i=n(2011);function a(e,t){if(!e.includes(":"))return e;for(const n of Object.keys(t))e.includes(`:${n}`)&&(e=e.replace(new RegExp(`:${n}\\*`,"g"),`:${n}--ESCAPED_PARAM_ASTERISKS`).replace(new RegExp(`:${n}\\?`,"g"),`:${n}--ESCAPED_PARAM_QUESTION`).replace(new RegExp(`:${n}\\+`,"g"),`:${n}--ESCAPED_PARAM_PLUS`).replace(new RegExp(`:${n}(?!\\w)`,"g"),`--ESCAPED_PARAM_COLON${n}`));return e=e.replace(/(:|\*|\?|\+|\(|\)|\{|\})/g,"\\$1").replace(/--ESCAPED_PARAM_PLUS/g,"+").replace(/--ESCAPED_PARAM_COLON/g,":").replace(/--ESCAPED_PARAM_QUESTION/g,"?").replace(/--ESCAPED_PARAM_ASTERISKS/g,"*"),r.compile(`/${e}`,{validate:!1})(t).slice(1)}function l(e){return e.replace(/__ESC_COLON_/gi,":")}},646:(e,t)=>{"use strict";function n(e){return"string"==typeof e||"number"==typeof e&&!isNaN(e)||"boolean"==typeof e?String(e):""}Object.defineProperty(t,"__esModule",{value:!0}),t.searchParamsToUrlQuery=function(e){const t={};return e.forEach(((e,n)=>{void 0===t[n]?t[n]=e:Array.isArray(t[n])?t[n].push(e):t[n]=[t[n],e]})),t},t.urlQueryToSearchParams=function(e){const t=new URLSearchParams;return Object.entries(e).forEach((([e,r])=>{Array.isArray(r)?r.forEach((r=>t.append(e,n(r)))):t.set(e,n(r))})),t},t.assign=function(e,...t){return t.forEach((t=>{Array.from(t.keys()).forEach((t=>e.delete(t))),t.forEach(((t,n)=>e.append(n,t)))})),e}},5317:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n,u,c,f){let d,p=!1,h=!1,g=l.parseRelativeUrl(e),m=i.removePathTrailingSlash(a.normalizeLocalePath(s.delBasePath(g.pathname),f).pathname);const v=n=>{let l=r.getPathMatch(n.source,{removeUnnamedParams:!0,strict:!0})(g.pathname);if(n.has&&l){const e=o.matchHas({headers:{host:document.location.hostname},cookies:document.cookie.split("; ").reduce(((e,t)=>{const[n,...r]=t.split("=");return e[n]=r.join("="),e}),{})},n.has,g.query);e?Object.assign(l,e):l=!1}if(l){if(!n.destination)return h=!0,!0;const r=o.prepareDestination({appendParamsToQuery:!0,destination:n.destination,params:l,query:u});if(g=r.parsedDestination,e=r.newUrl,Object.assign(u,r.parsedDestination.query),m=i.removePathTrailingSlash(a.normalizeLocalePath(s.delBasePath(e),f).pathname),t.includes(m))return p=!0,d=m,!0;if(d=c(m),d!==e&&t.includes(d))return p=!0,!0}};let y=!1;for(let e=0;e{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getRouteMatcher=function(e){const{re:t,groups:n}=e;return e=>{const o=t.exec(e);if(!o)return!1;const i=e=>{try{return decodeURIComponent(e)}catch(e){throw new r.DecodeError("failed to decode param")}},a={};return Object.keys(n).forEach((e=>{const t=n[e],r=o[t.pos];void 0!==r&&(a[e]=~r.indexOf("/")?r.split("/").map((e=>i(e))):t.repeat?[i(r)]:i(r))})),a}};var r=n(1624)},4794:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getParametrizedRoute=i,t.getRouteRegex=function(e){const t=i(e);return"routeKeys"in t?{re:new RegExp(`^${t.parameterizedRoute}(?:/)?$`),groups:t.groups,routeKeys:t.routeKeys,namedRegex:`^${t.namedParameterizedRoute}(?:/)?$`}:{re:new RegExp(`^${t.parameterizedRoute}(?:/)?$`),groups:t.groups}};var r=n(8058);function o(e){const t=e.startsWith("[")&&e.endsWith("]");t&&(e=e.slice(1,-1));const n=e.startsWith("...");return n&&(e=e.slice(3)),{key:e,repeat:n,optional:t}}function i(e){const t=(e.replace(/\/$/,"")||"/").slice(1).split("/"),n={};let i=1;const a=t.map((e=>{if(e.startsWith("[")&&e.endsWith("]")){const{key:t,optional:r,repeat:a}=o(e.slice(1,-1));return n[t]={pos:i++,repeat:a,optional:r},a?r?"(?:/(.+?))?":"/(.+?)":"/([^/]+?)"}return`/${r.escapeStringRegexp(e)}`})).join("");if("undefined"==typeof window){let e=97,i=1;const l=()=>{let t="";for(let n=0;n122&&(i++,e=97);return t},s={};return{parameterizedRoute:a,namedParameterizedRoute:t.map((e=>{if(e.startsWith("[")&&e.endsWith("]")){const{key:t,optional:n,repeat:r}=o(e.slice(1,-1));let i=t.replace(/\W/g,""),a=!1;return(0===i.length||i.length>30)&&(a=!0),isNaN(parseInt(i.slice(0,1)))||(a=!0),a&&(i=l()),s[i]=t,r?n?`(?:/(?<${i}>.+?))?`:`/(?<${i}>.+?)`:`/(?<${i}>[^/]+?)`}return`/${r.escapeStringRegexp(e)}`})).join(""),groups:n,routeKeys:s}}return{parameterizedRoute:a,groups:n}}},9036:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSortedRoutes=function(e){const t=new n;return e.forEach((e=>t.insert(e))),t.smoosh()};class n{insert(e){this._insert(e.split("/").filter(Boolean),[],!1)}smoosh(){return this._smoosh()}_smoosh(e="/"){const t=[...this.children.keys()].sort();null!==this.slugName&&t.splice(t.indexOf("[]"),1),null!==this.restSlugName&&t.splice(t.indexOf("[...]"),1),null!==this.optionalRestSlugName&&t.splice(t.indexOf("[[...]]"),1);const n=t.map((t=>this.children.get(t)._smoosh(`${e}${t}/`))).reduce(((e,t)=>[...e,...t]),[]);if(null!==this.slugName&&n.push(...this.children.get("[]")._smoosh(`${e}[${this.slugName}]/`)),!this.placeholder){const t="/"===e?"/":e.slice(0,-1);if(null!=this.optionalRestSlugName)throw new Error(`You cannot define a route with the same specificity as a optional catch-all route ("${t}" and "${t}[[...${this.optionalRestSlugName}]]").`);n.unshift(t)}return null!==this.restSlugName&&n.push(...this.children.get("[...]")._smoosh(`${e}[...${this.restSlugName}]/`)),null!==this.optionalRestSlugName&&n.push(...this.children.get("[[...]]")._smoosh(`${e}[[...${this.optionalRestSlugName}]]/`)),n}_insert(e,t,r){if(0===e.length)return void(this.placeholder=!1);if(r)throw new Error("Catch-all must be the last part of the URL.");let o=e[0];if(o.startsWith("[")&&o.endsWith("]")){let i=o.slice(1,-1),a=!1;if(i.startsWith("[")&&i.endsWith("]")&&(i=i.slice(1,-1),a=!0),i.startsWith("...")&&(i=i.substring(3),r=!0),i.startsWith("[")||i.endsWith("]"))throw new Error(`Segment names may not start or end with extra brackets ('${i}').`);if(i.startsWith("."))throw new Error(`Segment names may not start with erroneous periods ('${i}').`);function l(e,n){if(null!==e&&e!==n)throw new Error(`You cannot use different slug names for the same dynamic path ('${e}' !== '${n}').`);t.forEach((e=>{if(e===n)throw new Error(`You cannot have the same slug name "${n}" repeat within a single dynamic path`);if(e.replace(/\W/g,"")===o.replace(/\W/g,""))throw new Error(`You cannot have the slug names "${e}" and "${n}" differ only by non-word symbols within a single dynamic path`)})),t.push(n)}if(r)if(a){if(null!=this.restSlugName)throw new Error(`You cannot use both an required and optional catch-all route at the same level ("[...${this.restSlugName}]" and "${e[0]}" ).`);l(this.optionalRestSlugName,i),this.optionalRestSlugName=i,o="[[...]]"}else{if(null!=this.optionalRestSlugName)throw new Error(`You cannot use both an optional and required catch-all route at the same level ("[[...${this.optionalRestSlugName}]]" and "${e[0]}").`);l(this.restSlugName,i),this.restSlugName=i,o="[...]"}else{if(a)throw new Error(`Optional route parameters are not yet supported ("${e[0]}").`);l(this.slugName,i),this.slugName=i,o="[]"}}this.children.has(o)||this.children.set(o,new n),this.children.get(o)._insert(e.slice(1),t,r)}constructor(){this.placeholder=!0,this.children=new Map,this.slugName=null,this.restSlugName=null,this.optionalRestSlugName=null}}},1624:(e,t)=>{"use strict";function n(){const{protocol:e,hostname:t,port:n}=window.location;return`${e}//${t}${n?":"+n:""}`}function r(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function o(e){return e.finished||e.headersSent}Object.defineProperty(t,"__esModule",{value:!0}),t.execOnce=function(e){let t,n=!1;return(...r)=>(n||(n=!0,t=e(...r)),t)},t.getLocationOrigin=n,t.getURL=function(){const{href:e}=window.location,t=n();return e.substring(t.length)},t.getDisplayName=r,t.isResSent=o,t.normalizeRepeatedSlashes=function(e){const t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?`?${t.slice(1).join("?")}`:"")},t.loadGetInitialProps=async function e(t,n){const i=n.res||n.ctx&&n.ctx.res;if(!t.getInitialProps)return n.ctx&&n.Component?{pageProps:await e(n.Component,n.ctx)}:{};const a=await t.getInitialProps(n);if(i&&o(i))return a;if(!a){const e=`"${r(t)}.getInitialProps()" should resolve to an object. But found "${a}" instead.`;throw new Error(e)}return a},t.ST=t.SP=t.warnOnce=void 0,t.warnOnce=e=>{};const i="undefined"!=typeof performance;t.SP=i;const a=i&&"function"==typeof performance.mark&&"function"==typeof performance.measure;t.ST=a;class l extends Error{}t.DecodeError=l;class s extends Error{}t.NormalizeError=s},9097:(e,t,n)=>{e.exports=n(4529)},5632:(e,t,n)=>{e.exports=n(9518)},7320:e=>{"use strict";var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function o(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,i){for(var a,l,s=o(e),u=1;u{"use strict";var r=n(2784),o=n(7320),i=n(4616);function a(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;nt}return!1}(t,n,o,r)&&(n=null),r||null===o?function(e){return!!p.call(g,e)||!p.call(h,e)&&(d.test(e)?g[e]=!0:(h[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=null===n?3!==o.type&&"":n:(t=o.attributeName,r=o.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(o=o.type)||4===o&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(y,b);v[t]=new m(t,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(y,b);v[t]=new m(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(y,b);v[t]=new m(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){v[e]=new m(e,1,!1,e.toLowerCase(),null,!1,!1)})),v.xlinkHref=new m("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){v[e]=new m(e,1,!1,e.toLowerCase(),null,!0,!0)}));var x=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,E=60103,k=60106,S=60107,_=60108,C=60114,O=60109,L=60110,P=60112,R=60113,j=60120,T=60115,A=60116,M=60121,I=60128,D=60129,N=60130,F=60131;if("function"==typeof Symbol&&Symbol.for){var z=Symbol.for;E=z("react.element"),k=z("react.portal"),S=z("react.fragment"),_=z("react.strict_mode"),C=z("react.profiler"),O=z("react.provider"),L=z("react.context"),P=z("react.forward_ref"),R=z("react.suspense"),j=z("react.suspense_list"),T=z("react.memo"),A=z("react.lazy"),M=z("react.block"),z("react.scope"),I=z("react.opaque.id"),D=z("react.debug_trace_mode"),N=z("react.offscreen"),F=z("react.legacy_hidden")}var B,$="function"==typeof Symbol&&Symbol.iterator;function W(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=$&&e[$]||e["@@iterator"])?e:null}function H(e){if(void 0===B)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);B=t&&t[1]||""}return"\n"+B+e}var U=!1;function V(e,t){if(!e||U)return"";U=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(e){var r=e}Reflect.construct(e,[],t)}else{try{t.call()}catch(e){r=e}e.call(t.prototype)}else{try{throw Error()}catch(e){r=e}e()}}catch(e){if(e&&r&&"string"==typeof e.stack){for(var o=e.stack.split("\n"),i=r.stack.split("\n"),a=o.length-1,l=i.length-1;1<=a&&0<=l&&o[a]!==i[l];)l--;for(;1<=a&&0<=l;a--,l--)if(o[a]!==i[l]){if(1!==a||1!==l)do{if(a--,0>--l||o[a]!==i[l])return"\n"+o[a].replace(" at new "," at ")}while(1<=a&&0<=l);break}}}finally{U=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?H(e):""}function q(e){switch(e.tag){case 5:return H(e.type);case 16:return H("Lazy");case 13:return H("Suspense");case 19:return H("SuspenseList");case 0:case 2:case 15:return V(e.type,!1);case 11:return V(e.type.render,!1);case 22:return V(e.type._render,!1);case 1:return V(e.type,!0);default:return""}}function K(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case S:return"Fragment";case k:return"Portal";case C:return"Profiler";case _:return"StrictMode";case R:return"Suspense";case j:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case L:return(e.displayName||"Context")+".Consumer";case O:return(e._context.displayName||"Context")+".Provider";case P:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef");case T:return K(e.type);case M:return K(e._render);case A:t=e._payload,e=e._init;try{return K(e(t))}catch(e){}}return null}function G(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function X(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function Y(e){e._valueTracker||(e._valueTracker=function(e){var t=X(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(e){r=""+e,i.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function Z(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=X(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function Q(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function J(e,t){var n=t.checked;return o({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function ee(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=G(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function te(e,t){null!=(t=t.checked)&&w(e,"checked",t,!1)}function ne(e,t){te(e,t);var n=G(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?oe(e,t.type,n):t.hasOwnProperty("defaultValue")&&oe(e,t.type,G(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function re(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function oe(e,t,n){"number"===t&&Q(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function ie(e,t){return e=o({children:void 0},t),(t=function(e){var t="";return r.Children.forEach(e,(function(e){null!=e&&(t+=e)})),t}(t.children))&&(e.children=t),e}function ae(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o=n.length))throw Error(a(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:G(n)}}function ue(e,t){var n=G(t.value),r=G(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function ce(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}var fe="http://www.w3.org/1999/xhtml";function de(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function pe(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?de(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var he,ge,me=(ge=function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((he=he||document.createElement("div")).innerHTML="",t=he.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction((function(){return ge(e,t)}))}:ge);function ve(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var ye={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},be=["Webkit","ms","Moz","O"];function we(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||ye.hasOwnProperty(e)&&ye[e]?(""+t).trim():t+"px"}function xe(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),o=we(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}Object.keys(ye).forEach((function(e){be.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),ye[t]=ye[e]}))}));var Ee=o({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ke(e,t){if(t){if(Ee[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(a(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(a(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(a(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(a(62))}}function Se(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}function _e(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var Ce=null,Oe=null,Le=null;function Pe(e){if(e=Jr(e)){if("function"!=typeof Ce)throw Error(a(280));var t=e.stateNode;t&&(t=to(t),Ce(e.stateNode,e.type,t))}}function Re(e){Oe?Le?Le.push(e):Le=[e]:Oe=e}function je(){if(Oe){var e=Oe,t=Le;if(Le=Oe=null,Pe(e),t)for(e=0;e(r=31-Ht(r))?0:1<n;n++)t.push(e);return t}function Wt(e,t,n){e.pendingLanes|=t;var r=t-1;e.suspendedLanes&=r,e.pingedLanes&=r,(e=e.eventTimes)[t=31-Ht(t)]=n}var Ht=Math.clz32?Math.clz32:function(e){return 0===e?32:31-(Ut(e)/Vt|0)|0},Ut=Math.log,Vt=Math.LN2,qt=i.unstable_UserBlockingPriority,Kt=i.unstable_runWithPriority,Gt=!0;function Xt(e,t,n,r){De||Me();var o=Zt,i=De;De=!0;try{Ae(o,e,t,n,r)}finally{(De=i)||Fe()}}function Yt(e,t,n,r){Kt(qt,Zt.bind(null,e,t,n,r))}function Zt(e,t,n,r){var o;if(Gt)if((o=0==(4&t))&&0=Mn),Nn=String.fromCharCode(32),Fn=!1;function zn(e,t){switch(e){case"keyup":return-1!==Tn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Bn(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var $n=!1,Wn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Hn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Wn[e.type]:"textarea"===t}function Un(e,t,n,r){Re(r),0<(t=Ar(t,"onChange")).length&&(n=new dn("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Vn=null,qn=null;function Kn(e){_r(e,0)}function Gn(e){if(Z(eo(e)))return e}function Xn(e,t){if("change"===e)return t}var Yn=!1;if(f){var Zn;if(f){var Qn="oninput"in document;if(!Qn){var Jn=document.createElement("div");Jn.setAttribute("oninput","return;"),Qn="function"==typeof Jn.oninput}Zn=Qn}else Zn=!1;Yn=Zn&&(!document.documentMode||9=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=ur(r)}}function fr(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?fr(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function dr(){for(var e=window,t=Q();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(e){n=!1}if(!n)break;t=Q((e=t.contentWindow).document)}return t}function pr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}var hr=f&&"documentMode"in document&&11>=document.documentMode,gr=null,mr=null,vr=null,yr=!1;function br(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;yr||null==gr||gr!==Q(r)||(r="selectionStart"in(r=gr)&&pr(r)?{start:r.selectionStart,end:r.selectionEnd}:{anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},vr&&sr(vr,r)||(vr=r,0<(r=Ar(mr,"onSelect")).length&&(t=new dn("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=gr)))}Mt("cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focusin focus focusout blur input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange".split(" "),0),Mt("drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel".split(" "),1),Mt(At,2);for(var wr="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),xr=0;xroo||(e.current=ro[oo],ro[oo]=null,oo--)}function lo(e,t){oo++,ro[oo]=e.current,e.current=t}var so={},uo=io(so),co=io(!1),fo=so;function po(e,t){var n=e.type.contextTypes;if(!n)return so;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o,i={};for(o in n)i[o]=t[o];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function ho(e){return null!=e.childContextTypes}function go(){ao(co),ao(uo)}function mo(e,t,n){if(uo.current!==so)throw Error(a(168));lo(uo,t),lo(co,n)}function vo(e,t,n){var r=e.stateNode;if(e=t.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var i in r=r.getChildContext())if(!(i in e))throw Error(a(108,K(t)||"Unknown",i));return o({},n,r)}function yo(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||so,fo=uo.current,lo(uo,e),lo(co,co.current),!0}function bo(e,t,n){var r=e.stateNode;if(!r)throw Error(a(169));n?(e=vo(e,t,fo),r.__reactInternalMemoizedMergedChildContext=e,ao(co),ao(uo),lo(uo,e)):ao(co),lo(co,n)}var wo=null,xo=null,Eo=i.unstable_runWithPriority,ko=i.unstable_scheduleCallback,So=i.unstable_cancelCallback,_o=i.unstable_shouldYield,Co=i.unstable_requestPaint,Oo=i.unstable_now,Lo=i.unstable_getCurrentPriorityLevel,Po=i.unstable_ImmediatePriority,Ro=i.unstable_UserBlockingPriority,jo=i.unstable_NormalPriority,To=i.unstable_LowPriority,Ao=i.unstable_IdlePriority,Mo={},Io=void 0!==Co?Co:function(){},Do=null,No=null,Fo=!1,zo=Oo(),Bo=1e4>zo?Oo:function(){return Oo()-zo};function $o(){switch(Lo()){case Po:return 99;case Ro:return 98;case jo:return 97;case To:return 96;case Ao:return 95;default:throw Error(a(332))}}function Wo(e){switch(e){case 99:return Po;case 98:return Ro;case 97:return jo;case 96:return To;case 95:return Ao;default:throw Error(a(332))}}function Ho(e,t){return e=Wo(e),Eo(e,t)}function Uo(e,t,n){return e=Wo(e),ko(e,t,n)}function Vo(){if(null!==No){var e=No;No=null,So(e)}qo()}function qo(){if(!Fo&&null!==Do){Fo=!0;var e=0;try{var t=Do;Ho(99,(function(){for(;eg?(m=f,f=null):m=f.sibling;var v=p(o,f,l[g],s);if(null===v){null===f&&(f=m);break}e&&f&&null===v.alternate&&t(o,f),a=i(v,a,g),null===c?u=v:c.sibling=v,c=v,f=m}if(g===l.length)return n(o,f),u;if(null===f){for(;gm?(v=g,g=null):v=g.sibling;var b=p(o,g,y.value,u);if(null===b){null===g&&(g=v);break}e&&g&&null===b.alternate&&t(o,g),l=i(b,l,m),null===f?c=b:f.sibling=b,f=b,g=v}if(y.done)return n(o,g),c;if(null===g){for(;!y.done;m++,y=s.next())null!==(y=d(o,y.value,u))&&(l=i(y,l,m),null===f?c=y:f.sibling=y,f=y);return c}for(g=r(o,g);!y.done;m++,y=s.next())null!==(y=h(g,o,m,y.value,u))&&(e&&null!==y.alternate&&g.delete(null===y.key?m:y.key),l=i(y,l,m),null===f?c=y:f.sibling=y,f=y);return e&&g.forEach((function(e){return t(o,e)})),c}return function(e,r,i,s){var u="object"==typeof i&&null!==i&&i.type===S&&null===i.key;u&&(i=i.props.children);var c="object"==typeof i&&null!==i;if(c)switch(i.$$typeof){case E:e:{for(c=i.key,u=r;null!==u;){if(u.key===c){if(7===u.tag){if(i.type===S){n(e,u.sibling),(r=o(u,i.props.children)).return=e,e=r;break e}}else if(u.elementType===i.type){n(e,u.sibling),(r=o(u,i.props)).ref=wi(e,u,i),r.return=e,e=r;break e}n(e,u);break}t(e,u),u=u.sibling}i.type===S?((r=Ws(i.props.children,e.mode,s,i.key)).return=e,e=r):((s=$s(i.type,i.key,i.props,null,e.mode,s)).ref=wi(e,r,i),s.return=e,e=s)}return l(e);case k:e:{for(u=i.key;null!==r;){if(r.key===u){if(4===r.tag&&r.stateNode.containerInfo===i.containerInfo&&r.stateNode.implementation===i.implementation){n(e,r.sibling),(r=o(r,i.children||[])).return=e,e=r;break e}n(e,r);break}t(e,r),r=r.sibling}(r=Vs(i,e.mode,s)).return=e,e=r}return l(e)}if("string"==typeof i||"number"==typeof i)return i=""+i,null!==r&&6===r.tag?(n(e,r.sibling),(r=o(r,i)).return=e,e=r):(n(e,r),(r=Us(i,e.mode,s)).return=e,e=r),l(e);if(bi(i))return g(e,r,i,s);if(W(i))return m(e,r,i,s);if(c&&xi(e,i),void 0===i&&!u)switch(e.tag){case 1:case 22:case 0:case 11:case 15:throw Error(a(152,K(e.type)||"Component"))}return n(e,r)}}var ki=Ei(!0),Si=Ei(!1),_i={},Ci=io(_i),Oi=io(_i),Li=io(_i);function Pi(e){if(e===_i)throw Error(a(174));return e}function Ri(e,t){switch(lo(Li,t),lo(Oi,e),lo(Ci,_i),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:pe(null,"");break;default:t=pe(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}ao(Ci),lo(Ci,t)}function ji(){ao(Ci),ao(Oi),ao(Li)}function Ti(e){Pi(Li.current);var t=Pi(Ci.current),n=pe(t,e.type);t!==n&&(lo(Oi,e),lo(Ci,n))}function Ai(e){Oi.current===e&&(ao(Ci),ao(Oi))}var Mi=io(0);function Ii(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!=(64&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Di=null,Ni=null,Fi=!1;function zi(e,t){var n=Fs(5,null,null,0);n.elementType="DELETED",n.type="DELETED",n.stateNode=t,n.return=e,n.flags=8,null!==e.lastEffect?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function Bi(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,!0);default:return!1}}function $i(e){if(Fi){var t=Ni;if(t){var n=t;if(!Bi(e,t)){if(!(t=Ur(n.nextSibling))||!Bi(e,t))return e.flags=-1025&e.flags|2,Fi=!1,void(Di=e);zi(Di,n)}Di=e,Ni=Ur(t.firstChild)}else e.flags=-1025&e.flags|2,Fi=!1,Di=e}}function Wi(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;Di=e}function Hi(e){if(e!==Di)return!1;if(!Fi)return Wi(e),Fi=!0,!1;var t=e.type;if(5!==e.tag||"head"!==t&&"body"!==t&&!Br(t,e.memoizedProps))for(t=Ni;t;)zi(e,t),t=Ur(t.nextSibling);if(Wi(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(a(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){Ni=Ur(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}Ni=null}}else Ni=Di?Ur(e.stateNode.nextSibling):null;return!0}function Ui(){Ni=Di=null,Fi=!1}var Vi=[];function qi(){for(var e=0;ei))throw Error(a(301));i+=1,Qi=Zi=null,t.updateQueue=null,Ki.current=ja,e=n(r,o)}while(ea)}if(Ki.current=La,t=null!==Zi&&null!==Zi.next,Xi=0,Qi=Zi=Yi=null,Ji=!1,t)throw Error(a(300));return e}function oa(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===Qi?Yi.memoizedState=Qi=e:Qi=Qi.next=e,Qi}function ia(){if(null===Zi){var e=Yi.alternate;e=null!==e?e.memoizedState:null}else e=Zi.next;var t=null===Qi?Yi.memoizedState:Qi.next;if(null!==t)Qi=t,Zi=e;else{if(null===e)throw Error(a(310));e={memoizedState:(Zi=e).memoizedState,baseState:Zi.baseState,baseQueue:Zi.baseQueue,queue:Zi.queue,next:null},null===Qi?Yi.memoizedState=Qi=e:Qi=Qi.next=e}return Qi}function aa(e,t){return"function"==typeof t?t(e):t}function la(e){var t=ia(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=Zi,o=r.baseQueue,i=n.pending;if(null!==i){if(null!==o){var l=o.next;o.next=i.next,i.next=l}r.baseQueue=o=i,n.pending=null}if(null!==o){o=o.next,r=r.baseState;var s=l=i=null,u=o;do{var c=u.lane;if((Xi&c)===c)null!==s&&(s=s.next={lane:0,action:u.action,eagerReducer:u.eagerReducer,eagerState:u.eagerState,next:null}),r=u.eagerReducer===e?u.eagerState:e(r,u.action);else{var f={lane:c,action:u.action,eagerReducer:u.eagerReducer,eagerState:u.eagerState,next:null};null===s?(l=s=f,i=r):s=s.next=f,Yi.lanes|=c,Il|=c}u=u.next}while(null!==u&&u!==o);null===s?i=r:s.next=l,ar(r,t.memoizedState)||(Aa=!0),t.memoizedState=r,t.baseState=i,t.baseQueue=s,n.lastRenderedState=r}return[t.memoizedState,n.dispatch]}function sa(e){var t=ia(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,i=t.memoizedState;if(null!==o){n.pending=null;var l=o=o.next;do{i=e(i,l.action),l=l.next}while(l!==o);ar(i,t.memoizedState)||(Aa=!0),t.memoizedState=i,null===t.baseQueue&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function ua(e,t,n){var r=t._getVersion;r=r(t._source);var o=t._workInProgressVersionPrimary;if(null!==o?e=o===r:(e=e.mutableReadLanes,(e=(Xi&e)===e)&&(t._workInProgressVersionPrimary=r,Vi.push(t))),e)return n(t._source);throw Vi.push(t),Error(a(350))}function ca(e,t,n,r){var o=Ol;if(null===o)throw Error(a(349));var i=t._getVersion,l=i(t._source),s=Ki.current,u=s.useState((function(){return ua(o,t,n)})),c=u[1],f=u[0];u=Qi;var d=e.memoizedState,p=d.refs,h=p.getSnapshot,g=d.source;d=d.subscribe;var m=Yi;return e.memoizedState={refs:p,source:t,subscribe:r},s.useEffect((function(){p.getSnapshot=n,p.setSnapshot=c;var e=i(t._source);if(!ar(l,e)){e=n(t._source),ar(f,e)||(c(e),e=ls(m),o.mutableReadLanes|=e&o.pendingLanes),e=o.mutableReadLanes,o.entangledLanes|=e;for(var r=o.entanglements,a=e;0n?98:n,(function(){e(!0)})),Ho(97<\/script>",e=e.removeChild(e.firstChild)):"string"==typeof r.is?e=u.createElement(n,{is:r.is}):(e=u.createElement(n),"select"===n&&(u=e,r.multiple?u.multiple=!0:r.size&&(u.size=r.size))):e=u.createElementNS(e,n),e[Gr]=t,e[Xr]=r,Ua(e,t),t.stateNode=e,u=Se(n,r),n){case"dialog":Cr("cancel",e),Cr("close",e),i=r;break;case"iframe":case"object":case"embed":Cr("load",e),i=r;break;case"video":case"audio":for(i=0;iBl&&(t.flags|=64,l=!0,el(r,!1),t.lanes=33554432)}else{if(!l)if(null!==(e=Ii(u))){if(t.flags|=64,l=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),el(r,!0),null===r.tail&&"hidden"===r.tailMode&&!u.alternate&&!Fi)return null!==(t=t.lastEffect=r.lastEffect)&&(t.nextEffect=null),null}else 2*Bo()-r.renderingStartTime>Bl&&1073741824!==n&&(t.flags|=64,l=!0,el(r,!1),t.lanes=33554432);r.isBackwards?(u.sibling=t.child,t.child=u):(null!==(n=r.last)?n.sibling=u:t.child=u,r.last=u)}return null!==r.tail?(n=r.tail,r.rendering=n,r.tail=n.sibling,r.lastEffect=t.lastEffect,r.renderingStartTime=Bo(),n.sibling=null,t=Mi.current,lo(Mi,l?1&t|2:1&t),n):null;case 23:case 24:return vs(),null!==e&&null!==e.memoizedState!=(null!==t.memoizedState)&&"unstable-defer-without-hiding"!==r.mode&&(t.flags|=4),null}throw Error(a(156,t.tag))}function nl(e){switch(e.tag){case 1:ho(e.type)&&go();var t=e.flags;return 4096&t?(e.flags=-4097&t|64,e):null;case 3:if(ji(),ao(co),ao(uo),qi(),0!=(64&(t=e.flags)))throw Error(a(285));return e.flags=-4097&t|64,e;case 5:return Ai(e),null;case 13:return ao(Mi),4096&(t=e.flags)?(e.flags=-4097&t|64,e):null;case 19:return ao(Mi),null;case 4:return ji(),null;case 10:return ei(e),null;case 23:case 24:return vs(),null;default:return null}}function rl(e,t){try{var n="",r=t;do{n+=q(r),r=r.return}while(r);var o=n}catch(e){o="\nError generating stack: "+e.message+"\n"+e.stack}return{value:e,source:t,stack:o}}function ol(e,t){try{console.error(t.value)}catch(e){setTimeout((function(){throw e}))}}Ua=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Va=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Pi(Ci.current);var a,l=null;switch(n){case"input":i=J(e,i),r=J(e,r),l=[];break;case"option":i=ie(e,i),r=ie(e,r),l=[];break;case"select":i=o({},i,{value:void 0}),r=o({},r,{value:void 0}),l=[];break;case"textarea":i=le(e,i),r=le(e,r),l=[];break;default:"function"!=typeof i.onClick&&"function"==typeof r.onClick&&(e.onclick=Dr)}for(f in ke(n,r),n=null,i)if(!r.hasOwnProperty(f)&&i.hasOwnProperty(f)&&null!=i[f])if("style"===f){var u=i[f];for(a in u)u.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else"dangerouslySetInnerHTML"!==f&&"children"!==f&&"suppressContentEditableWarning"!==f&&"suppressHydrationWarning"!==f&&"autoFocus"!==f&&(s.hasOwnProperty(f)?l||(l=[]):(l=l||[]).push(f,null));for(f in r){var c=r[f];if(u=null!=i?i[f]:void 0,r.hasOwnProperty(f)&&c!==u&&(null!=c||null!=u))if("style"===f)if(u){for(a in u)!u.hasOwnProperty(a)||c&&c.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in c)c.hasOwnProperty(a)&&u[a]!==c[a]&&(n||(n={}),n[a]=c[a])}else n||(l||(l=[]),l.push(f,n)),n=c;else"dangerouslySetInnerHTML"===f?(c=c?c.__html:void 0,u=u?u.__html:void 0,null!=c&&u!==c&&(l=l||[]).push(f,c)):"children"===f?"string"!=typeof c&&"number"!=typeof c||(l=l||[]).push(f,""+c):"suppressContentEditableWarning"!==f&&"suppressHydrationWarning"!==f&&(s.hasOwnProperty(f)?(null!=c&&"onScroll"===f&&Cr("scroll",e),l||u===c||(l=[])):"object"==typeof c&&null!==c&&c.$$typeof===I?c.toString():(l=l||[]).push(f,c))}n&&(l=l||[]).push("style",n);var f=l;(t.updateQueue=f)&&(t.flags|=4)}},qa=function(e,t,n,r){n!==r&&(t.flags|=4)};var il="function"==typeof WeakMap?WeakMap:Map;function al(e,t,n){(n=li(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Ul||(Ul=!0,Vl=r),ol(0,t)},n}function ll(e,t,n){(n=li(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var o=t.value;n.payload=function(){return ol(0,t),r(o)}}var i=e.stateNode;return null!==i&&"function"==typeof i.componentDidCatch&&(n.callback=function(){"function"!=typeof r&&(null===ql?ql=new Set([this]):ql.add(this),ol(0,t));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}var sl="function"==typeof WeakSet?WeakSet:Set;function ul(e){var t=e.ref;if(null!==t)if("function"==typeof t)try{t(null)}catch(t){Ms(e,t)}else t.current=null}function cl(e,t){switch(t.tag){case 0:case 11:case 15:case 22:case 5:case 6:case 4:case 17:return;case 1:if(256&t.flags&&null!==e){var n=e.memoizedProps,r=e.memoizedState;t=(e=t.stateNode).getSnapshotBeforeUpdate(t.elementType===t.type?n:Go(t.type,n),r),e.__reactInternalSnapshotBeforeUpdate=t}return;case 3:return void(256&t.flags&&Hr(t.stateNode.containerInfo))}throw Error(a(163))}function fl(e,t,n){switch(n.tag){case 0:case 11:case 15:case 22:if(null!==(t=null!==(t=n.updateQueue)?t.lastEffect:null)){e=t=t.next;do{if(3==(3&e.tag)){var r=e.create;e.destroy=r()}e=e.next}while(e!==t)}if(null!==(t=null!==(t=n.updateQueue)?t.lastEffect:null)){e=t=t.next;do{var o=e;r=o.next,0!=(4&(o=o.tag))&&0!=(1&o)&&(js(n,e),Rs(n,e)),e=r}while(e!==t)}return;case 1:return e=n.stateNode,4&n.flags&&(null===t?e.componentDidMount():(r=n.elementType===n.type?t.memoizedProps:Go(n.type,t.memoizedProps),e.componentDidUpdate(r,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate))),void(null!==(t=n.updateQueue)&&fi(n,t,e));case 3:if(null!==(t=n.updateQueue)){if(e=null,null!==n.child)switch(n.child.tag){case 5:case 1:e=n.child.stateNode}fi(n,t,e)}return;case 5:return e=n.stateNode,void(null===t&&4&n.flags&&zr(n.type,n.memoizedProps)&&e.focus());case 6:case 4:case 12:case 19:case 17:case 20:case 21:case 23:case 24:return;case 13:return void(null===n.memoizedState&&(n=n.alternate,null!==n&&(n=n.memoizedState,null!==n&&(n=n.dehydrated,null!==n&&xt(n)))))}throw Error(a(163))}function dl(e,t){for(var n=e;;){if(5===n.tag){var r=n.stateNode;if(t)"function"==typeof(r=r.style).setProperty?r.setProperty("display","none","important"):r.display="none";else{r=n.stateNode;var o=n.memoizedProps.style;o=null!=o&&o.hasOwnProperty("display")?o.display:null,r.style.display=we("display",o)}}else if(6===n.tag)n.stateNode.nodeValue=t?"":n.memoizedProps;else if((23!==n.tag&&24!==n.tag||null===n.memoizedState||n===e)&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===e)break;for(;null===n.sibling;){if(null===n.return||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}}function pl(e,t){if(xo&&"function"==typeof xo.onCommitFiberUnmount)try{xo.onCommitFiberUnmount(wo,t)}catch(e){}switch(t.tag){case 0:case 11:case 14:case 15:case 22:if(null!==(e=t.updateQueue)&&null!==(e=e.lastEffect)){var n=e=e.next;do{var r=n,o=r.destroy;if(r=r.tag,void 0!==o)if(0!=(4&r))js(t,n);else{r=t;try{o()}catch(e){Ms(r,e)}}n=n.next}while(n!==e)}break;case 1:if(ul(t),"function"==typeof(e=t.stateNode).componentWillUnmount)try{e.props=t.memoizedProps,e.state=t.memoizedState,e.componentWillUnmount()}catch(e){Ms(t,e)}break;case 5:ul(t);break;case 4:bl(e,t)}}function hl(e){e.alternate=null,e.child=null,e.dependencies=null,e.firstEffect=null,e.lastEffect=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.return=null,e.updateQueue=null}function gl(e){return 5===e.tag||3===e.tag||4===e.tag}function ml(e){e:{for(var t=e.return;null!==t;){if(gl(t))break e;t=t.return}throw Error(a(160))}var n=t;switch(t=n.stateNode,n.tag){case 5:var r=!1;break;case 3:case 4:t=t.containerInfo,r=!0;break;default:throw Error(a(161))}16&n.flags&&(ve(t,""),n.flags&=-17);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||gl(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag&&18!==n.tag;){if(2&n.flags)continue t;if(null===n.child||4===n.tag)continue t;n.child.return=n,n=n.child}if(!(2&n.flags)){n=n.stateNode;break e}}r?vl(e,n,t):yl(e,n,t)}function vl(e,t,n){var r=e.tag,o=5===r||6===r;if(o)e=o?e.stateNode:e.stateNode.instance,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!=(n=n._reactRootContainer)||null!==t.onclick||(t.onclick=Dr));else if(4!==r&&null!==(e=e.child))for(vl(e,t,n),e=e.sibling;null!==e;)vl(e,t,n),e=e.sibling}function yl(e,t,n){var r=e.tag,o=5===r||6===r;if(o)e=o?e.stateNode:e.stateNode.instance,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(yl(e,t,n),e=e.sibling;null!==e;)yl(e,t,n),e=e.sibling}function bl(e,t){for(var n,r,o=t,i=!1;;){if(!i){i=o.return;e:for(;;){if(null===i)throw Error(a(160));switch(n=i.stateNode,i.tag){case 5:r=!1;break e;case 3:case 4:n=n.containerInfo,r=!0;break e}i=i.return}i=!0}if(5===o.tag||6===o.tag){e:for(var l=e,s=o,u=s;;)if(pl(l,u),null!==u.child&&4!==u.tag)u.child.return=u,u=u.child;else{if(u===s)break e;for(;null===u.sibling;){if(null===u.return||u.return===s)break e;u=u.return}u.sibling.return=u.return,u=u.sibling}r?(l=n,s=o.stateNode,8===l.nodeType?l.parentNode.removeChild(s):l.removeChild(s)):n.removeChild(o.stateNode)}else if(4===o.tag){if(null!==o.child){n=o.stateNode.containerInfo,r=!0,o.child.return=o,o=o.child;continue}}else if(pl(e,o),null!==o.child){o.child.return=o,o=o.child;continue}if(o===t)break;for(;null===o.sibling;){if(null===o.return||o.return===t)return;4===(o=o.return).tag&&(i=!1)}o.sibling.return=o.return,o=o.sibling}}function wl(e,t){switch(t.tag){case 0:case 11:case 14:case 15:case 22:var n=t.updateQueue;if(null!==(n=null!==n?n.lastEffect:null)){var r=n=n.next;do{3==(3&r.tag)&&(e=r.destroy,r.destroy=void 0,void 0!==e&&e()),r=r.next}while(r!==n)}return;case 1:case 12:case 17:return;case 5:if(null!=(n=t.stateNode)){r=t.memoizedProps;var o=null!==e?e.memoizedProps:r;e=t.type;var i=t.updateQueue;if(t.updateQueue=null,null!==i){for(n[Xr]=r,"input"===e&&"radio"===r.type&&null!=r.name&&te(n,r),Se(e,o),t=Se(e,r),o=0;oo&&(o=l),n&=~i}if(n=o,10<(n=(120>(n=Bo()-n)?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*kl(n/1960))-n)){e.timeoutHandle=$r(Cs.bind(null,e),n);break}Cs(e);break;default:throw Error(a(329))}}return cs(e,Bo()),e.callbackNode===t?fs.bind(null,e):null}function ds(e,t){for(t&=~Nl,t&=~Dl,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0 component higher in the tree to provide a loading indicator or placeholder to display.")}5!==Tl&&(Tl=2),s=rl(s,l),d=a;do{switch(d.tag){case 3:i=s,d.flags|=4096,t&=-t,d.lanes|=t,ui(d,al(0,i,t));break e;case 1:i=s;var x=d.type,E=d.stateNode;if(0==(64&d.flags)&&("function"==typeof x.getDerivedStateFromError||null!==E&&"function"==typeof E.componentDidCatch&&(null===ql||!ql.has(E)))){d.flags|=4096,t&=-t,d.lanes|=t,ui(d,ll(d,i,t));break e}}d=d.return}while(null!==d)}_s(n)}catch(e){t=e,Ll===n&&null!==n&&(Ll=n=n.return);continue}break}}function ws(){var e=Sl.current;return Sl.current=La,null===e?La:e}function xs(e,t){var n=Cl;Cl|=16;var r=ws();for(Ol===e&&Pl===t||ys(e,t);;)try{Es();break}catch(t){bs(e,t)}if(Jo(),Cl=n,Sl.current=r,null!==Ll)throw Error(a(261));return Ol=null,Pl=0,Tl}function Es(){for(;null!==Ll;)Ss(Ll)}function ks(){for(;null!==Ll&&!_o();)Ss(Ll)}function Ss(e){var t=Wl(e.alternate,e,Rl);e.memoizedProps=e.pendingProps,null===t?_s(e):Ll=t,_l.current=null}function _s(e){var t=e;do{var n=t.alternate;if(e=t.return,0==(2048&t.flags)){if(null!==(n=tl(n,t,Rl)))return void(Ll=n);if(24!==(n=t).tag&&23!==n.tag||null===n.memoizedState||0!=(1073741824&Rl)||0==(4&n.mode)){for(var r=0,o=n.child;null!==o;)r|=o.lanes|o.childLanes,o=o.sibling;n.childLanes=r}null!==e&&0==(2048&e.flags)&&(null===e.firstEffect&&(e.firstEffect=t.firstEffect),null!==t.lastEffect&&(null!==e.lastEffect&&(e.lastEffect.nextEffect=t.firstEffect),e.lastEffect=t.lastEffect),1l&&(s=l,l=E,E=s),s=cr(b,E),i=cr(b,l),s&&i&&(1!==x.rangeCount||x.anchorNode!==s.node||x.anchorOffset!==s.offset||x.focusNode!==i.node||x.focusOffset!==i.offset)&&((w=w.createRange()).setStart(s.node,s.offset),x.removeAllRanges(),E>l?(x.addRange(w),x.extend(i.node,i.offset)):(w.setEnd(i.node,i.offset),x.addRange(w))))),w=[];for(x=b;x=x.parentNode;)1===x.nodeType&&w.push({element:x,left:x.scrollLeft,top:x.scrollTop});for("function"==typeof b.focus&&b.focus(),b=0;bBo()-zl?ys(e,0):Nl|=n),cs(e,t)}function Ds(e,t){var n=e.stateNode;null!==n&&n.delete(t),0==(t=0)&&(0==(2&(t=e.mode))?t=1:0==(4&t)?t=99===$o()?1:2:(0===ns&&(ns=Ml),0===(t=Bt(62914560&~ns))&&(t=4194304))),n=as(),null!==(e=us(e,t))&&(Wt(e,t,n),cs(e,n))}function Ns(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.flags=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childLanes=this.lanes=0,this.alternate=null}function Fs(e,t,n,r){return new Ns(e,t,n,r)}function zs(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Bs(e,t){var n=e.alternate;return null===n?((n=Fs(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.nextEffect=null,n.firstEffect=null,n.lastEffect=null),n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function $s(e,t,n,r,o,i){var l=2;if(r=e,"function"==typeof e)zs(e)&&(l=1);else if("string"==typeof e)l=5;else e:switch(e){case S:return Ws(n.children,o,i,t);case D:l=8,o|=16;break;case _:l=8,o|=1;break;case C:return(e=Fs(12,n,t,8|o)).elementType=C,e.type=C,e.lanes=i,e;case R:return(e=Fs(13,n,t,o)).type=R,e.elementType=R,e.lanes=i,e;case j:return(e=Fs(19,n,t,o)).elementType=j,e.lanes=i,e;case N:return Hs(n,o,i,t);case F:return(e=Fs(24,n,t,o)).elementType=F,e.lanes=i,e;default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case O:l=10;break e;case L:l=9;break e;case P:l=11;break e;case T:l=14;break e;case A:l=16,r=null;break e;case M:l=22;break e}throw Error(a(130,null==e?e:typeof e,""))}return(t=Fs(l,n,t,o)).elementType=e,t.type=r,t.lanes=i,t}function Ws(e,t,n,r){return(e=Fs(7,e,r,t)).lanes=n,e}function Hs(e,t,n,r){return(e=Fs(23,e,r,t)).elementType=N,e.lanes=n,e}function Us(e,t,n){return(e=Fs(6,e,null,t)).lanes=n,e}function Vs(e,t,n){return(t=Fs(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function qs(e,t,n){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.pendingContext=this.context=null,this.hydrate=n,this.callbackNode=null,this.callbackPriority=0,this.eventTimes=$t(0),this.expirationTimes=$t(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=$t(0),this.mutableSourceEagerHydrationData=null}function Ks(e,t,n){var r=3{"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),e.exports=n(2967)},1837:(e,t,n)=>{"use strict";n(7320);var r=n(2784),o=60103;if(t.Fragment=60107,"function"==typeof Symbol&&Symbol.for){var i=Symbol.for;o=i("react.element"),t.Fragment=i("react.fragment")}var a=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l=Object.prototype.hasOwnProperty,s={key:!0,ref:!0,__self:!0,__source:!0};function u(e,t,n){var r,i={},u=null,c=null;for(r in void 0!==n&&(u=""+n),void 0!==t.key&&(u=""+t.key),void 0!==t.ref&&(c=t.ref),t)l.call(t,r)&&!s.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===i[r]&&(i[r]=t[r]);return{$$typeof:o,type:e,key:u,ref:c,props:i,_owner:a.current}}t.jsx=u,t.jsxs=u},3426:(e,t,n)=>{"use strict";var r=n(7320),o=60103,i=60106;t.Fragment=60107,t.StrictMode=60108,t.Profiler=60114;var a=60109,l=60110,s=60112;t.Suspense=60113;var u=60115,c=60116;if("function"==typeof Symbol&&Symbol.for){var f=Symbol.for;o=f("react.element"),i=f("react.portal"),t.Fragment=f("react.fragment"),t.StrictMode=f("react.strict_mode"),t.Profiler=f("react.profiler"),a=f("react.provider"),l=f("react.context"),s=f("react.forward_ref"),t.Suspense=f("react.suspense"),u=f("react.memo"),c=f("react.lazy")}var d="function"==typeof Symbol&&Symbol.iterator;function p(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n{"use strict";e.exports=n(3426)},2322:(e,t,n)=>{"use strict";e.exports=n(1837)},5047:e=>{var t=function(e){"use strict";var t,n=Object.prototype,r=n.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var o=t&&t.prototype instanceof m?t:m,i=Object.create(o.prototype),a=new L(r||[]);return i._invoke=function(e,t,n){var r=f;return function(o,i){if(r===p)throw new Error("Generator is already running");if(r===h){if("throw"===o)throw i;return R()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var l=_(a,n);if(l){if(l===g)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===f)throw r=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=p;var s=c(e,t,n);if("normal"===s.type){if(r=n.done?h:d,s.arg===g)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(r=h,n.method="throw",n.arg=s.arg)}}}(e,n,a),i}function c(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=u;var f="suspendedStart",d="suspendedYield",p="executing",h="completed",g={};function m(){}function v(){}function y(){}var b={};s(b,i,(function(){return this}));var w=Object.getPrototypeOf,x=w&&w(w(P([])));x&&x!==n&&r.call(x,i)&&(b=x);var E=y.prototype=m.prototype=Object.create(b);function k(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function S(e,t){function n(o,i,a,l){var s=c(e[o],e,i);if("throw"!==s.type){var u=s.arg,f=u.value;return f&&"object"==typeof f&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,a,l)}),(function(e){n("throw",e,a,l)})):t.resolve(f).then((function(e){u.value=e,a(u)}),(function(e){return n("throw",e,a,l)}))}l(s.arg)}var o;this._invoke=function(e,r){function i(){return new t((function(t,o){n(e,r,t,o)}))}return o=o?o.then(i,i):i()}}function _(e,n){var r=e.iterator[n.method];if(r===t){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=t,_(e,n),"throw"===n.method))return g;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return g}var o=c(r,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,g;var i=o.arg;return i?i.done?(n[e.resultName]=i.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,g):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function O(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function L(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function P(e){if(e){var n=e[i];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function n(){for(;++o=0;--i){var a=this.tryEntries[i],l=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(s&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),O(n),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;O(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:P(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),g}},e}(e.exports);try{regeneratorRuntime=t}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=t:Function("r","regeneratorRuntime = r")(t)}},6475:(e,t)=>{"use strict";var n,r,o,i;if("object"==typeof performance&&"function"==typeof performance.now){var a=performance;t.unstable_now=function(){return a.now()}}else{var l=Date,s=l.now();t.unstable_now=function(){return l.now()-s}}if("undefined"==typeof window||"function"!=typeof MessageChannel){var u=null,c=null,f=function(){if(null!==u)try{var e=t.unstable_now();u(!0,e),u=null}catch(e){throw setTimeout(f,0),e}};n=function(e){null!==u?setTimeout(n,0,e):(u=e,setTimeout(f,0))},r=function(e,t){c=setTimeout(e,t)},o=function(){clearTimeout(c)},t.unstable_shouldYield=function(){return!1},i=t.unstable_forceFrameRate=function(){}}else{var d=window.setTimeout,p=window.clearTimeout;if("undefined"!=typeof console){var h=window.cancelAnimationFrame;"function"!=typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),"function"!=typeof h&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills")}var g=!1,m=null,v=-1,y=5,b=0;t.unstable_shouldYield=function(){return t.unstable_now()>=b},i=function(){},t.unstable_forceFrameRate=function(e){0>e||125>>1,o=e[r];if(!(void 0!==o&&0<_(o,t)))break e;e[r]=t,e[n]=o,n=r}}function k(e){return void 0===(e=e[0])?null:e}function S(e){var t=e[0];if(void 0!==t){var n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,o=e.length;r_(a,n))void 0!==s&&0>_(s,a)?(e[r]=s,e[l]=n,r=l):(e[r]=a,e[i]=n,r=i);else{if(!(void 0!==s&&0>_(s,n)))break e;e[r]=s,e[l]=n,r=l}}}return t}return null}function _(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var C=[],O=[],L=1,P=null,R=3,j=!1,T=!1,A=!1;function M(e){for(var t=k(O);null!==t;){if(null===t.callback)S(O);else{if(!(t.startTime<=e))break;S(O),t.sortIndex=t.expirationTime,E(C,t)}t=k(O)}}function I(e){if(A=!1,M(e),!T)if(null!==k(C))T=!0,n(D);else{var t=k(O);null!==t&&r(I,t.startTime-e)}}function D(e,n){T=!1,A&&(A=!1,o()),j=!0;var i=R;try{for(M(n),P=k(C);null!==P&&(!(P.expirationTime>n)||e&&!t.unstable_shouldYield());){var a=P.callback;if("function"==typeof a){P.callback=null,R=P.priorityLevel;var l=a(P.expirationTime<=n);n=t.unstable_now(),"function"==typeof l?P.callback=l:P===k(C)&&S(C),M(n)}else S(C);P=k(C)}if(null!==P)var s=!0;else{var u=k(O);null!==u&&r(I,u.startTime-n),s=!1}return s}finally{P=null,R=i,j=!1}}var N=i;t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){T||j||(T=!0,n(D))},t.unstable_getCurrentPriorityLevel=function(){return R},t.unstable_getFirstCallbackNode=function(){return k(C)},t.unstable_next=function(e){switch(R){case 1:case 2:case 3:var t=3;break;default:t=R}var n=R;R=t;try{return e()}finally{R=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=N,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=R;R=e;try{return t()}finally{R=n}},t.unstable_scheduleCallback=function(e,i,a){var l=t.unstable_now();switch(a="object"==typeof a&&null!==a&&"number"==typeof(a=a.delay)&&0l?(e.sortIndex=a,E(O,e),null===k(C)&&e===k(O)&&(A?o():A=!0,r(I,a-l))):(e.sortIndex=s,E(C,e),T||j||(T=!0,n(D))),e},t.unstable_wrapCallback=function(e){var t=R;return function(){var n=R;R=t;try{return e.apply(this,arguments)}finally{R=n}}}},4616:(e,t,n)=>{"use strict";e.exports=n(6475)},2778:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,".article-inner-css * {\n max-width: 100%;\n}\n\n:root {\n color-scheme: light dark;\n}\n\n.speakingSection {\n color: var(--colors-highlightText);\n background-color: rgba(255, 210, 52, 0.2);\n}\n\n.highlight {\n color: var(--colors-highlightText);\n background-color: rgb(var(--colors-highlightBackground));\n cursor: pointer;\n}\n\n.highlight_with_note {\n color: var(--colors-highlightText);\n background-color: rgba(var(--colors-highlightBackground), 0.35);\n border-bottom: 2px rgb(var(--colors-highlightBackground)) solid;\n border-radius: 2px;\n cursor: pointer;\n}\n\n.article-inner-css {\n font-family: var(--text-font-family);\n}\n\n.article-inner-css .highlight_with_note .highlight_note_button {\n display: unset !important;\n margin: 0px !important;\n max-width: unset !important;\n height: unset !important;\n padding: 0px 8px;\n cursor: pointer;\n}\n/* \non smaller screens we display the note icon\n@media (max-width: 768px) {\n .highlight_with_note.last_element:after { \n content: url(/static/icons/highlight-note-icon.svg);\n padding: 0 3px;\n cursor: pointer;\n }\n} */\n\n.article-inner-css h1,\n.article-inner-css h2,\n.article-inner-css h3,\n.article-inner-css h4,\n.article-inner-css h5,\n.article-inner-css h6 {\n margin-block-start: 0.83em;\n margin-block-end: 0.83em;\n margin-inline-start: 0px;\n margin-inline-end: 0px;\n line-height: var(--line-height);\n font-size: var(--text-font-size);\n font-weight: bold;\n}\n.article-inner-css h1 {\n font-size: 1.5em !important;\n line-height: 1.4em !important;\n}\n.article-inner-css h2 {\n font-size: 1.43em !important;\n}\n.article-inner-css h3 {\n font-size: 1.25em !important;\n}\n.article-inner-css h4,\n.article-inner-css h5,\n.article-inner-css h6 {\n font-size: 1em !important;\n margin: 1em 0 !important;\n}\n\n.article-inner-css .scrollable {\n overflow: auto;\n}\n\n.article-inner-css div {\n line-height: var(--line-height);\n /* font-size: var(--text-font-size); */\n color: var(--font-color);\n}\n\n.article-inner-css p {\n font-style: normal;\n font-weight: normal;\n\n color: var(--font-color);\n\n display: block;\n margin-block-start: 1em;\n margin-block-end: 1em;\n margin-inline-start: 0px;\n margin-inline-end: 0px;\n\n > img {\n display: block;\n margin: 0.5em auto !important;\n max-width: 100% !important;\n }\n\n > iframe {\n width: 100%;\n height: 350px;\n }\n}\n\n.article-inner-css section {\n line-height: 1.65em;\n font-size: var(--text-font-size);\n}\n\n.article-inner-css blockquote {\n display: block;\n border-left: 1px solid var(--font-color-transparent);\n padding-left: 16px;\n font-style: italic;\n margin-inline-start: 0px;\n > * {\n font-style: italic;\n }\n p:last-of-type {\n margin-bottom: 0;\n }\n}\n\n.article-inner-css a {\n color: var(--font-color-readerFont);\n}\n\n.article-inner-css .highlight a {\n color: var(--colors-highlightText);\n}\n\n.article-inner-css figure {\n * {\n color: var(--font-color-transparent);\n }\n\n margin: 30px 0;\n font-size: 0.75em;\n line-height: 1.5em;\n\n figcaption {\n color: var(--font-color);\n opacity: 0.7;\n margin: 10px 20px 10px 0;\n }\n\n figcaption * {\n color: var(--font-color);\n opacity: 0.7;\n }\n figcaption a {\n color: var(--font-color);\n /* margin: 10px 20px 10px 0; */\n opacity: 0.6;\n }\n\n > div {\n max-width: 100%;\n }\n}\n\n.article-inner-css figure[aria-label='media'] {\n margin: var(--figure-margin);\n display: flex;\n flex-direction: column;\n align-items: center;\n}\n\n.article-inner-css hr {\n margin-bottom: var(--hr-margin);\n border: none;\n}\n\n.article-inner-css table {\n display: block;\n word-break: normal;\n white-space: nowrap;\n border: 1px solid rgb(216, 216, 216);\n border-spacing: 0;\n border-collapse: collapse;\n font-size: 0.8rem;\n margin: auto;\n line-height: 1.5em;\n font-size: 0.9em;\n max-width: -moz-fit-content;\n max-width: fit-content;\n margin: 0 auto;\n overflow-x: auto;\n caption {\n margin: 0.5em 0;\n }\n th {\n border: 1px solid rgb(216, 216, 216);\n background-color: var(--table-header-color);\n padding: 5px;\n }\n td {\n border: 1px solid rgb(216, 216, 216);\n padding: 0.5em;\n padding: 5px;\n }\n\n p {\n margin: 0;\n padding: 0;\n }\n\n img {\n display: block;\n margin: 0.5em auto !important;\n max-width: 100% !important;\n }\n}\n\n.article-inner-css ul,\n.article-inner-css ol {\n margin-block-start: 1em;\n margin-block-end: 1em;\n margin-inline-start: 0px;\n margin-inline-end: 0px;\n padding-inline-start: 40px;\n margin-top: 18px;\n\n font-family: var(--text-font-family);\n font-style: normal;\n font-weight: normal;\n\n line-height: var(--line-height);\n font-size: var(--text-font-size);\n\n color: var(--font-color);\n}\n\n.article-inner-css li {\n word-break: break-word;\n ol,\n ul {\n margin: 0;\n }\n}\n\n.article-inner-css sup,\n.article-inner-css sub {\n position: relative;\n a {\n color: inherit;\n pointer-events: none;\n }\n}\n\n.article-inner-css sup {\n top: -0.3em;\n}\n\n.article-inner-css sub {\n bottom: 0.3em;\n}\n\n.article-inner-css cite {\n font-style: normal;\n}\n\n.article-inner-css .page {\n width: 100%;\n}\n\n/* Collapse excess whitespace. */\n.page p > p:empty,\n.page div > p:empty,\n.page p > div:empty,\n.page div > div:empty,\n.page p + br,\n.page p > br:only-child,\n.page div > br:only-child,\n.page img + br {\n display: none;\n}\n\n.article-inner-css video {\n max-width: 100%;\n}\n\n.article-inner-css dl {\n display: block;\n margin-block-start: 1em;\n margin-block-end: 1em;\n margin-inline-start: 0px;\n margin-inline-end: 0px;\n}\n\n.article-inner-css dd {\n display: block;\n margin-inline-start: 40px;\n}\n\n.article-inner-css pre,\n.article-inner-css code {\n vertical-align: bottom;\n word-wrap: initial;\n font-family: 'SF Mono', monospace !important;\n white-space: pre;\n direction: ltr;\n unicode-bidi: embed;\n color: var(--font-color);\n margin: 0;\n overflow-x: auto;\n word-wrap: normal;\n border-radius: 4px;\n}\n\n.article-inner-css img {\n display: block;\n margin: 0.5em auto !important;\n max-width: 100% !important;\n height: auto;\n}\n\n.article-inner-css .page {\n text-align: start;\n word-wrap: break-word;\n\n font-size: var(--text-font-size);\n line-height: var(--line-height);\n}\n\n.article-inner-css .omnivore-instagram-embed {\n img {\n margin: 0 !important;\n }\n}\n\n.article-inner-css .morning-brew-markets {\n max-width: 100% !important;\n}\n\n.article-inner-css .morning-brew-markets tbody{\n width: 100%;\n display: table;\n}\n\n.article-inner-css .morning-brew-markets td:nth-child(1) {\n width: 20%;\n}\n\n.article-inner-css .morning-brew-markets td:nth-child(2) {\n width: 30%;\n}\n\n.article-inner-css .morning-brew-markets td:nth-child(3) {\n width: 30%;\n}\n\n.article-inner-css .morning-brew-markets td:nth-child(4) {\n width: 20%;\n}\n\n.article-inner-css ._omnivore-static-tweet {\n color: #0F1419 !important;\n background: #ffffff !important;\n display: flex;\n flex-direction: column;\n gap: 12px;\n max-width: 550px;\n margin: 32px auto;\n border: 1px solid #e0e0e0;\n direction: ltr;\n border-radius: 8px;\n padding: 16px 16px ;\n box-sizing: border-box;\n -webkit-font-smoothing: subpixel-antialiased;\n}\n\n._omnivore-static-tweet ._omnivore-static-tweet-header {\n display: flex;\n align-items: center;\n flex-direction: row;\n gap: 12px;\n margin: unset;\n justify-content: flex-start;\n color: #0F1419 !important;\n}\n\n\n._omnivore-static-tweet-header ._omnivore-static-tweet-header-text {\n display: flex;\n flex-direction: column;\n color: #0F1419 !important;\n font-size: 14px;\n line-height: 20px;\n}\n\n._omnivore-static-tweet-header-text .tweet-author-name {\n font-weight: 600;\n}\n\n._omnivore-static-tweet-header-text .tweet-author-handle {\n color: #808080;\n}\n\n\n._omnivore-static-tweet ._omnivore-static-tweet-fake-link {\n color: #1da1f2;\n}\n\n._omnivore-static-tweet ._omnivore-static-tweet-text {\n font-size: 14px;\n line-height: 20px;\n color: #0F1419 !important;\n}\n\n._omnivore-static-tweet ._omnivore-static-tweet-link-top {\n text-decoration: none;\n}\n\n._omnivore-static-tweet ._omnivore-static-tweet-header-avatar {\n -ms-interpolation-mode: bicubic; \n border: none !important;\n border-radius: 50%;\n float: left;\n height: 48px;\n width: 48px;\n margin: unset !important;\n margin-right: 12px;\n max-width: 100%;\n vertical-align: middle;\n}\n\n._omnivore-static-tweet ._omnivore-static-tweet-link-bottom {\n display: flex;\n flex-direction: column;\n text-decoration: none;\n white-space: pre-wrap;\n}\n\n._omnivore-static-tweet ._omnivore-static-tweet-footer {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n color: #808080;\n font-size: 14px;\n line-height: 20px;\n}\n\n._omnivore-static-tweet ._omnivore-static-tweet-footer hr {\n background: #e0e0e0;\n border: none;\n height: 1px;\n margin: 12px 0;\n padding: 0;\n width: 100%;\n color: #496F72;\n font-size: 14px;\n line-height: 20px;\n}\n\n._omnivore-static-tweet ._omnivore-static-tweet-author-handle {\n display: block;\n}\n\n._omnivore-static-tweet ._omnivore-static-tweet-ufi {\n display: flex;\n gap: 24px;\n align-items: center;\n}\n\n._omnivore-static-tweet ._omnivore-static-tweet-ufi .likes, .retweets {\n display: flex;\n gap: 4px;\n text-decoration: none;\n color: #808080;\n font-size: 14px;\n line-height: 20px;\n}\n\n._omnivore-static-tweet ._omnivore-static-tweet-photo {\n width: 100%;\n height: 100%;\n object-fit: cover;\n border-radius: 2px;\n}\n\n._omnivore-static-tweet .expanded-link {\n display: flex;\n flex-direction: column;\n text-decoration: none;\n border: 1px solid #e0e0e0;\n border-radius: 8px;\n box-sizing: border-box;\n overflow: hidden;\n}\n\n._omnivore-static-tweet .expanded-link-img {\n cursor: pointer;\n width: 100%;\n max-height: 280px;\n max-width: 100%;\n object-fit: cover;\n margin: 0px auto !important\n}\n\n._omnivore-static-tweet .expanded-link img {\n margin: 0px auto !important\n}\n\n._omnivore-static-tweet .expanded-link-bottom {\n display: flex;\n flex-direction: column;\n padding: 12px;\n gap: 2px;\n font-size: 14px;\n line-height: 20px;\n text-decoration: none;\n}\n\n.expanded-link-bottom .expanded-link-domain {\n color: #808080;\n text-transform: lowercase;\n text-decoration: none;\n}\n\n.expanded-link-bottom .expanded-link-title {\n color: #0F1419 !important;\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 2;\n overflow: hidden;\n}\n\n.expanded-link-bottom .expanded-link-description {\n color: #808080;\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 2;\n overflow: hidden;\n}\n",""]);const l=a},7420:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,"html,\nbody {\n padding: 0;\n margin: 0;\n font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen,\n Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n line-height: 1.6;\n font-size: 18px;\n}\n\n.disable-webkit-callout {\n -webkit-touch-callout: none;\n}\n\n*,\n*::before,\n*::after {\n box-sizing: border-box;\n}\n\ndiv#appleid-signin {\n min-width: 300px;\n min-height: 40px;\n}\n\n@font-face {\n font-family: 'Inter';\n font-weight: 200;\n font-style: normal;\n src: url(Inter-ExtraLight-200.ttf);\n}\n\n@font-face {\n font-family: 'Inter';\n font-weight: 300;\n font-style: normal;\n src: url(Inter-Light-300.ttf);\n}\n\n@font-face {\n font-family: 'Inter';\n font-weight: 400;\n font-style: normal;\n src: url(Inter-Regular-400.ttf);\n}\n\n@font-face {\n font-family: 'Inter';\n font-weight: 500;\n font-style: normal;\n src: url(Inter-Medium-500.ttf);\n}\n\n@font-face {\n font-family: 'Inter';\n font-weight: 600;\n font-style: normal;\n src: url(Inter-SemiBold-600.ttf);\n}\n\n@font-face {\n font-family: 'Inter';\n font-weight: 700;\n font-style: normal;\n src: url(Inter-Bold-700.ttf);\n}\n\n@font-face {\n font-family: 'Inter';\n font-weight: 800;\n font-style: normal;\n src: url(Inter-ExtraBold-800.ttf);\n}\n\n@font-face {\n font-family: 'Inter';\n font-weight: 900;\n font-style: normal;\n src: url(Inter-Black-900.ttf);\n}\n\n@font-face {\n font-family: 'Lora';\n font-weight: 400;\n font-style: normal;\n src: url(Lora-Regular.ttf);\n}\n\n@font-face {\n font-family: 'Lora';\n font-weight: 700;\n font-style: normal;\n src: url(Lora-Bold.ttf);\n}\n\n@font-face {\n font-family: 'Lora';\n font-weight: 400;\n font-style: italic;\n src: url(Lora-Italic.ttf);\n}\n\n@font-face {\n font-family: 'Merriweather';\n font-weight: 400;\n font-style: normal;\n src: url(Merriweather-Regular.ttf);\n}\n\n@font-face {\n font-family: 'Merriweather';\n font-weight: 700;\n font-style: normal;\n src: url(Merriweather-Bold.ttf);\n}\n\n@font-face {\n font-family: 'Merriweather';\n font-weight: 400;\n font-style: italic;\n src: url(Merriweather-Italic.ttf);\n}\n\n@font-face {\n font-family: 'Open Sans';\n font-weight: 400;\n font-style: normal;\n src: url(OpenSans-Regular.ttf);\n}\n\n@font-face {\n font-family: 'Open Sans';\n font-weight: 700;\n font-style: normal;\n src: url(OpenSans-Bold.ttf);\n}\n\n@font-face {\n font-family: 'Open Sans';\n font-weight: 400;\n font-style: italic;\n src: url(OpenSans-Italic.ttf);\n}\n\n@font-face {\n font-family: 'Roboto';\n font-weight: 400;\n font-style: normal;\n src: url(Roboto-Regular.ttf);\n}\n\n@font-face {\n font-family: 'Roboto';\n font-weight: 700;\n font-style: normal;\n src: url(Roboto-Bold.ttf);\n}\n\n@font-face {\n font-family: 'Roboto';\n font-weight: 400;\n font-style: italic;\n src: url(Roboto-Italic.ttf);\n}\n\n@font-face {\n font-family: 'Crimson Text';\n font-weight: 400;\n font-style: normal;\n src: url(CrimsonText-Regular.ttf);\n}\n\n@font-face {\n font-family: 'Crimson Text';\n font-weight: 700;\n font-style: normal;\n src: url(CrimsonText-Bold.ttf);\n}\n\n@font-face {\n font-family: 'Crimson Text';\n font-weight: 400;\n font-style: italic;\n src: url(CrimsonText-Italic.ttf);\n}\n\n@font-face {\n font-family: 'OpenDyslexic';\n font-weight: 400;\n font-style: normal;\n src: url(OpenDyslexicAlta-Regular.otf);\n}\n\n@font-face {\n font-family: 'OpenDyslexic';\n font-weight: 700;\n font-style: normal;\n src: url(OpenDyslexicAlta-Bold.otf);\n}\n\n@font-face {\n font-family: 'OpenDyslexic';\n font-weight: 400;\n font-style: italic;\n src: url(OpenDyslexicAlta-Italic.otf);\n}\n\n@font-face {\n font-family: 'Source Serif Pro';\n font-weight: 400;\n font-style: normal;\n src: url(SourceSerifPro-Regular.ttf);\n}\n\n@font-face {\n font-family: 'Source Serif Pro';\n font-weight: 700;\n font-style: normal;\n src: url(SourceSerifPro-Bold.ttf);\n}\n\n@font-face {\n font-family: 'Source Serif Pro';\n font-weight: 400;\n font-style: italic;\n src: url(SourceSerifPro-Italic.ttf);\n}\n\n@font-face {\n font-family: 'Montserrat';\n font-weight: 400;\n font-style: normal;\n src: url(Montserrat-Regular.ttf);\n}\n\n@font-face {\n font-family: 'Montserrat';\n font-weight: 700;\n font-style: normal;\n src: url(Montserrat-Bold.ttf);\n}\n\n@font-face {\n font-family: 'Montserrat';\n font-weight: 400;\n font-style: italic;\n src: url(Montserrat-Italic.ttf);\n}\n\n@font-face {\n font-family: 'Georgia';\n font-weight: 400;\n font-style: normal;\n src: url(Georgia-Regular.ttf);\n}\n\n@font-face {\n font-family: 'Georgia';\n font-weight: 700;\n font-style: normal;\n src: url(Georgia-Bold.ttf);\n}\n\n@font-face {\n font-family: 'Georgia';\n font-weight: 400;\n font-style: italic;\n src: url(Georgia-Italic.ttf);\n}\n\n@font-face {\n font-family: 'Newsreader';\n font-weight: 400;\n font-style: normal;\n src: url(Newsreader-Regular.ttf);\n}\n\n@font-face {\n font-family: 'Newsreader';\n font-weight: 700;\n font-style: normal;\n src: url(Newsreader-Bold.ttf);\n}\n\n@font-face {\n font-family: 'Newsreader';\n font-weight: 400;\n font-style: italic;\n src: url(Newsreader-Italic.ttf);\n}\n\n@font-face {\n font-family: 'AtkinsonHyperlegible';\n font-weight: 400;\n font-style: normal;\n src: url(AtkinsonHyperlegible-Regular.ttf);\n}\n\n@font-face {\n font-family: 'AtkinsonHyperlegible';\n font-weight: 700;\n font-style: normal;\n src: url(AtkinsonHyperlegible-Bold.ttf);\n}\n\n@font-face {\n font-family: 'AtkinsonHyperlegible';\n font-weight: 400;\n font-style: italic;\n src: url(AtkinsonHyperlegible-Italic.ttf);\n}\n\n@font-face {\n font-family: 'SF Mono';\n font-weight: 400;\n font-style: normal;\n src: url(SFMonoRegular.otf);\n}\n\n.dropdown-arrow {\n display: inline-block;\n width: 0;\n height: 0;\n vertical-align: middle;\n border-style: solid;\n border-width: 4px 4px 0;\n border-right-color: transparent;\n border-bottom-color: transparent;\n border-left-color: transparent;\n}\n\n.slider {\n -webkit-appearance: none;\n appearance: none;\n width: 100%;\n height: 1px;\n background: var(--colors-grayBorderHover);\n}\n\n.slider::-webkit-slider-thumb {\n -webkit-appearance: none;\n appearance: none;\n width: 16px !important;\n height: 16px;\n border-radius: 50%;\n background: var(--colors-utilityTextContrast);\n cursor: pointer;\n}\n\n.slider::-moz-range-thumb {\n -webkit-appearance: none;\n width: 16px !important;\n height: 16px;\n border-radius: 50%;\n background: var(--colors-utilityTextContrast);\n cursor: pointer;\n}\n\nselect {\n color: var(--colors-grayTextContrast);\n background-color: transparent;\n}\n\nselect option {\n background-color: transparent;\n}\n\ninput[type=range]::-webkit-slider-thumb {\n -webkit-appearance: none;\n border: none;\n height: 16px;\n width: 16px;\n border-radius: 50%;\n background: var(--colors-grayTextContrast);\n}\n\nbutton {\n padding: 0px;\n margin: 0px;\n}\n\n.omnivore-masonry-grid {\n display: -webkit-box; /* Not needed if autoprefixing */\n display: -ms-flexbox; /* Not needed if autoprefixing */\n display: flex;\n margin-left: -16px; /* gutter size offset */\n margin-right: 14px;\n width: auto;\n}\n.omnivore-masonry-grid_column {\n padding-left: 16px; /* gutter size */\n background-clip: padding-box;\n}\n\n/* .omnivore-masonry-grid_column > div {\n background: grey;\n margin-bottom: 16px;\n} */\n\n.ProgressRoot {\n overflow: hidden;\n background: var(--colors-omnivoreGray);\n border-radius: 99999px;\n height: 25px;\n transform: translateZ(0);\n}\n\n.ProgressIndicator {\n background-color: var(--colors-omnivoreCtaYellow) ;\n width: 100%;\n height: 100%;\n transition: transform 660ms cubic-bezier(0.65, 0, 0.35, 1);\n}",""]);const l=a},3645:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",r=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),r&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),r&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,r,o,i){"string"==typeof e&&(e=[[null,e,void 0]]);var a={};if(r)for(var l=0;l0?" ".concat(c[5]):""," {").concat(c[1],"}")),c[5]=i),n&&(c[2]?(c[1]="@media ".concat(c[2]," {").concat(c[1],"}"),c[2]=n):c[2]=n),o&&(c[4]?(c[1]="@supports (".concat(c[4],") {").concat(c[1],"}"),c[4]=o):c[4]="".concat(o)),t.push(c))}},t}},8081:e=>{"use strict";e.exports=function(e){return e[1]}},3379:e=>{"use strict";var t=[];function n(e){for(var n=-1,r=0;r{"use strict";var t={};e.exports=function(e,n){var r=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},9216:e=>{"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},3565:(e,t,n)=>{"use strict";e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},7795:e=>{"use strict";e.exports=function(e){var t=e.insertStyleElement(e);return{update:function(n){!function(e,t,n){var r="";n.supports&&(r+="@supports (".concat(n.supports,") {")),n.media&&(r+="@media ".concat(n.media," {"));var o=void 0!==n.layer;o&&(r+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),r+=n.css,o&&(r+="}"),n.media&&(r+="}"),n.supports&&(r+="}");var i=n.sourceMap;i&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),t.styleTagTransform(r,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},4589:e=>{"use strict";e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}}},r={};function o(e){var t=r[e];if(void 0!==t)return t.exports;var i=r[e]={id:e,exports:{}};return n[e].call(i.exports,i,i.exports,o),i.exports}o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,o.t=function(n,r){if(1&r&&(n=this(n)),8&r)return n;if("object"==typeof n&&n){if(4&r&&n.__esModule)return n;if(16&r&&"function"==typeof n.then)return n}var i=Object.create(null);o.r(i);var a={};e=e||[null,t({}),t([]),t(t)];for(var l=2&r&&n;"object"==typeof l&&!~e.indexOf(l);l=t(l))Object.getOwnPropertyNames(l).forEach((e=>a[e]=()=>n[e]));return a.default=()=>n,o.d(i,a),i},o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{"use strict";function e(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function t(e,t,n,r,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void n(e)}l.done?t(s):Promise.resolve(s).then(r,o)}var n,r,i,a=o(7162),l=o.n(a),s=o(2784),u=o.t(s,2),c=o(8316),f="colors",d="sizes",p="space",h={gap:p,gridGap:p,columnGap:p,gridColumnGap:p,rowGap:p,gridRowGap:p,inset:p,insetBlock:p,insetBlockEnd:p,insetBlockStart:p,insetInline:p,insetInlineEnd:p,insetInlineStart:p,margin:p,marginTop:p,marginRight:p,marginBottom:p,marginLeft:p,marginBlock:p,marginBlockEnd:p,marginBlockStart:p,marginInline:p,marginInlineEnd:p,marginInlineStart:p,padding:p,paddingTop:p,paddingRight:p,paddingBottom:p,paddingLeft:p,paddingBlock:p,paddingBlockEnd:p,paddingBlockStart:p,paddingInline:p,paddingInlineEnd:p,paddingInlineStart:p,top:p,right:p,bottom:p,left:p,scrollMargin:p,scrollMarginTop:p,scrollMarginRight:p,scrollMarginBottom:p,scrollMarginLeft:p,scrollMarginX:p,scrollMarginY:p,scrollMarginBlock:p,scrollMarginBlockEnd:p,scrollMarginBlockStart:p,scrollMarginInline:p,scrollMarginInlineEnd:p,scrollMarginInlineStart:p,scrollPadding:p,scrollPaddingTop:p,scrollPaddingRight:p,scrollPaddingBottom:p,scrollPaddingLeft:p,scrollPaddingX:p,scrollPaddingY:p,scrollPaddingBlock:p,scrollPaddingBlockEnd:p,scrollPaddingBlockStart:p,scrollPaddingInline:p,scrollPaddingInlineEnd:p,scrollPaddingInlineStart:p,fontSize:"fontSizes",background:f,backgroundColor:f,backgroundImage:f,borderImage:f,border:f,borderBlock:f,borderBlockEnd:f,borderBlockStart:f,borderBottom:f,borderBottomColor:f,borderColor:f,borderInline:f,borderInlineEnd:f,borderInlineStart:f,borderLeft:f,borderLeftColor:f,borderRight:f,borderRightColor:f,borderTop:f,borderTopColor:f,caretColor:f,color:f,columnRuleColor:f,fill:f,outline:f,outlineColor:f,stroke:f,textDecorationColor:f,fontFamily:"fonts",fontWeight:"fontWeights",lineHeight:"lineHeights",letterSpacing:"letterSpacings",blockSize:d,minBlockSize:d,maxBlockSize:d,inlineSize:d,minInlineSize:d,maxInlineSize:d,width:d,minWidth:d,maxWidth:d,height:d,minHeight:d,maxHeight:d,flexBasis:d,gridTemplateColumns:d,gridTemplateRows:d,borderWidth:"borderWidths",borderTopWidth:"borderWidths",borderRightWidth:"borderWidths",borderBottomWidth:"borderWidths",borderLeftWidth:"borderWidths",borderStyle:"borderStyles",borderTopStyle:"borderStyles",borderRightStyle:"borderStyles",borderBottomStyle:"borderStyles",borderLeftStyle:"borderStyles",borderRadius:"radii",borderTopLeftRadius:"radii",borderTopRightRadius:"radii",borderBottomRightRadius:"radii",borderBottomLeftRadius:"radii",boxShadow:"shadows",textShadow:"shadows",transition:"transitions",zIndex:"zIndices"},g=(e,t)=>"function"==typeof t?{"()":Function.prototype.toString.call(t)}:t,m=()=>{const e=Object.create(null);return(t,n,...r)=>{const o=(e=>JSON.stringify(e,g))(t);return o in e?e[o]:e[o]=n(t,...r)}},v=Symbol.for("sxs.internal"),y=(e,t)=>Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)),b=e=>{for(const t in e)return!0;return!1},{hasOwnProperty:w}=Object.prototype,x=e=>e.includes("-")?e:e.replace(/[A-Z]/g,(e=>"-"+e.toLowerCase())),E=/\s+(?![^()]*\))/,k=e=>t=>e(..."string"==typeof t?String(t).split(E):[t]),S={appearance:e=>({WebkitAppearance:e,appearance:e}),backfaceVisibility:e=>({WebkitBackfaceVisibility:e,backfaceVisibility:e}),backdropFilter:e=>({WebkitBackdropFilter:e,backdropFilter:e}),backgroundClip:e=>({WebkitBackgroundClip:e,backgroundClip:e}),boxDecorationBreak:e=>({WebkitBoxDecorationBreak:e,boxDecorationBreak:e}),clipPath:e=>({WebkitClipPath:e,clipPath:e}),content:e=>({content:e.includes('"')||e.includes("'")||/^([A-Za-z]+\([^]*|[^]*-quote|inherit|initial|none|normal|revert|unset)$/.test(e)?e:`"${e}"`}),hyphens:e=>({WebkitHyphens:e,hyphens:e}),maskImage:e=>({WebkitMaskImage:e,maskImage:e}),maskSize:e=>({WebkitMaskSize:e,maskSize:e}),tabSize:e=>({MozTabSize:e,tabSize:e}),textSizeAdjust:e=>({WebkitTextSizeAdjust:e,textSizeAdjust:e}),userSelect:e=>({WebkitUserSelect:e,userSelect:e}),marginBlock:k(((e,t)=>({marginBlockStart:e,marginBlockEnd:t||e}))),marginInline:k(((e,t)=>({marginInlineStart:e,marginInlineEnd:t||e}))),maxSize:k(((e,t)=>({maxBlockSize:e,maxInlineSize:t||e}))),minSize:k(((e,t)=>({minBlockSize:e,minInlineSize:t||e}))),paddingBlock:k(((e,t)=>({paddingBlockStart:e,paddingBlockEnd:t||e}))),paddingInline:k(((e,t)=>({paddingInlineStart:e,paddingInlineEnd:t||e})))},_=/([\d.]+)([^]*)/,C=(e,t)=>e.length?e.reduce(((e,n)=>(e.push(...t.map((e=>e.includes("&")?e.replace(/&/g,/[ +>|~]/.test(n)&&/&.*&/.test(e)?`:is(${n})`:n):n+" "+e))),e)),[]):t,O=(e,t)=>e in L&&"string"==typeof t?t.replace(/^((?:[^]*[^\w-])?)(fit-content|stretch)((?:[^\w-][^]*)?)$/,((t,n,r,o)=>n+("stretch"===r?`-moz-available${o};${x(e)}:${n}-webkit-fill-available`:`-moz-fit-content${o};${x(e)}:${n}fit-content`)+o)):String(t),L={blockSize:1,height:1,inlineSize:1,maxBlockSize:1,maxHeight:1,maxInlineSize:1,maxWidth:1,minBlockSize:1,minHeight:1,minInlineSize:1,minWidth:1,width:1},P=e=>e?e+"-":"",R=(e,t,n)=>e.replace(/([+-])?((?:\d+(?:\.\d*)?|\.\d+)(?:[Ee][+-]?\d+)?)?(\$|--)([$\w-]+)/g,((e,r,o,i,a)=>"$"==i==!!o?e:(r||"--"==i?"calc(":"")+"var(--"+("$"===i?P(t)+(a.includes("$")?"":P(n))+a.replace(/\$/g,"-"):a)+")"+(r||"--"==i?"*"+(r||"")+(o||"1")+")":""))),j=/\s*,\s*(?![^()]*\))/,T=Object.prototype.toString,A=(e,t,n,r,o)=>{let i,a,l;const s=(e,t,n)=>{let u,c;const f=e=>{for(u in e){const h=64===u.charCodeAt(0),g=h&&Array.isArray(e[u])?e[u]:[e[u]];for(c of g){const e=/[A-Z]/.test(p=u)?p:p.replace(/-[^]/g,(e=>e[1].toUpperCase())),g="object"==typeof c&&c&&c.toString===T&&(!r.utils[e]||!t.length);if(e in r.utils&&!g){const t=r.utils[e];if(t!==a){a=t,f(t(c)),a=null;continue}}else if(e in S){const t=S[e];if(t!==l){l=t,f(t(c)),l=null;continue}}if(h&&(d=u.slice(1)in r.media?"@media "+r.media[u.slice(1)]:u,u=d.replace(/\(\s*([\w-]+)\s*(=|<|<=|>|>=)\s*([\w-]+)\s*(?:(<|<=|>|>=)\s*([\w-]+)\s*)?\)/g,((e,t,n,r,o,i)=>{const a=_.test(t),l=.0625*(a?-1:1),[s,u]=a?[r,t]:[t,r];return"("+("="===n[0]?"":">"===n[0]===a?"max-":"min-")+s+":"+("="!==n[0]&&1===n.length?u.replace(_,((e,t,r)=>Number(t)+l*(">"===n?1:-1)+r)):u)+(o?") and ("+(">"===o[0]?"min-":"max-")+s+":"+(1===o.length?i.replace(_,((e,t,n)=>Number(t)+l*(">"===o?-1:1)+n)):i):"")+")"}))),g){const e=h?n.concat(u):[...n],r=h?[...t]:C(t,u.split(j));void 0!==i&&o(M(...i)),i=void 0,s(c,r,e)}else void 0===i&&(i=[[],t,n]),u=h||36!==u.charCodeAt(0)?u:`--${P(r.prefix)}${u.slice(1).replace(/\$/g,"-")}`,c=g?c:"number"==typeof c?c&&e in I?String(c)+"px":String(c):R(O(e,null==c?"":c),r.prefix,r.themeMap[e]),i[0].push(`${h?`${u} `:`${x(u)}:`}${c}`)}}var d,p};f(e),void 0!==i&&o(M(...i)),i=void 0};s(e,t,n)},M=(e,t,n)=>`${n.map((e=>`${e}{`)).join("")}${t.length?`${t.join(",")}{`:""}${e.join(";")}${t.length?"}":""}${Array(n.length?n.length+1:0).join("}")}`,I={animationDelay:1,animationDuration:1,backgroundSize:1,blockSize:1,border:1,borderBlock:1,borderBlockEnd:1,borderBlockEndWidth:1,borderBlockStart:1,borderBlockStartWidth:1,borderBlockWidth:1,borderBottom:1,borderBottomLeftRadius:1,borderBottomRightRadius:1,borderBottomWidth:1,borderEndEndRadius:1,borderEndStartRadius:1,borderInlineEnd:1,borderInlineEndWidth:1,borderInlineStart:1,borderInlineStartWidth:1,borderInlineWidth:1,borderLeft:1,borderLeftWidth:1,borderRadius:1,borderRight:1,borderRightWidth:1,borderSpacing:1,borderStartEndRadius:1,borderStartStartRadius:1,borderTop:1,borderTopLeftRadius:1,borderTopRightRadius:1,borderTopWidth:1,borderWidth:1,bottom:1,columnGap:1,columnRule:1,columnRuleWidth:1,columnWidth:1,containIntrinsicSize:1,flexBasis:1,fontSize:1,gap:1,gridAutoColumns:1,gridAutoRows:1,gridTemplateColumns:1,gridTemplateRows:1,height:1,inlineSize:1,inset:1,insetBlock:1,insetBlockEnd:1,insetBlockStart:1,insetInline:1,insetInlineEnd:1,insetInlineStart:1,left:1,letterSpacing:1,margin:1,marginBlock:1,marginBlockEnd:1,marginBlockStart:1,marginBottom:1,marginInline:1,marginInlineEnd:1,marginInlineStart:1,marginLeft:1,marginRight:1,marginTop:1,maxBlockSize:1,maxHeight:1,maxInlineSize:1,maxWidth:1,minBlockSize:1,minHeight:1,minInlineSize:1,minWidth:1,offsetDistance:1,offsetRotate:1,outline:1,outlineOffset:1,outlineWidth:1,overflowClipMargin:1,padding:1,paddingBlock:1,paddingBlockEnd:1,paddingBlockStart:1,paddingBottom:1,paddingInline:1,paddingInlineEnd:1,paddingInlineStart:1,paddingLeft:1,paddingRight:1,paddingTop:1,perspective:1,right:1,rowGap:1,scrollMargin:1,scrollMarginBlock:1,scrollMarginBlockEnd:1,scrollMarginBlockStart:1,scrollMarginBottom:1,scrollMarginInline:1,scrollMarginInlineEnd:1,scrollMarginInlineStart:1,scrollMarginLeft:1,scrollMarginRight:1,scrollMarginTop:1,scrollPadding:1,scrollPaddingBlock:1,scrollPaddingBlockEnd:1,scrollPaddingBlockStart:1,scrollPaddingBottom:1,scrollPaddingInline:1,scrollPaddingInlineEnd:1,scrollPaddingInlineStart:1,scrollPaddingLeft:1,scrollPaddingRight:1,scrollPaddingTop:1,shapeMargin:1,textDecoration:1,textDecorationThickness:1,textIndent:1,textUnderlineOffset:1,top:1,transitionDelay:1,transitionDuration:1,verticalAlign:1,width:1,wordSpacing:1},D=e=>String.fromCharCode(e+(e>25?39:97)),N=e=>(e=>{let t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=D(t%52)+n;return D(t%52)+n})(((e,t)=>{let n=t.length;for(;n;)e=33*e^t.charCodeAt(--n);return e})(5381,JSON.stringify(e))>>>0),F=["themed","global","styled","onevar","resonevar","allvar","inline"],z=e=>{if(e.href&&!e.href.startsWith(location.origin))return!1;try{return!!e.cssRules}catch(e){return!1}},B=e=>{let t;const n=()=>{const{cssRules:e}=t.sheet;return[].map.call(e,((n,r)=>{const{cssText:o}=n;let i="";if(o.startsWith("--sxs"))return"";if(e[r-1]&&(i=e[r-1].cssText).startsWith("--sxs")){if(!n.cssRules.length)return"";for(const e in t.rules)if(t.rules[e].group===n)return`--sxs{--sxs:${[...t.rules[e].cache].join(" ")}}${o}`;return n.cssRules.length?`${i}${o}`:""}return o})).join("")},r=()=>{if(t){const{rules:e,sheet:n}=t;if(!n.deleteRule){for(;3===Object(Object(n.cssRules)[0]).type;)n.cssRules.splice(0,1);n.cssRules=[]}for(const t in e)delete e[t]}const o=Object(e).styleSheets||[];for(const e of o)if(z(e)){for(let o=0,i=e.cssRules;i[o];++o){const a=Object(i[o]);if(1!==a.type)continue;const l=Object(i[o+1]);if(4!==l.type)continue;++o;const{cssText:s}=a;if(!s.startsWith("--sxs"))continue;const u=s.slice(14,-3).trim().split(/\s+/),c=F[u[0]];c&&(t||(t={sheet:e,reset:r,rules:{},toString:n}),t.rules[c]={group:l,index:o,cache:new Set(u)})}if(t)break}if(!t){const o=(e,t)=>({type:t,cssRules:[],insertRule(e,t){this.cssRules.splice(t,0,o(e,{import:3,undefined:1}[(e.toLowerCase().match(/^@([a-z]+)/)||[])[1]]||4))},get cssText(){return"@media{}"===e?`@media{${[].map.call(this.cssRules,(e=>e.cssText)).join("")}}`:e}});t={sheet:e?(e.head||e).appendChild(document.createElement("style")).sheet:o("","text/css"),rules:{},reset:r,toString:n}}const{sheet:i,rules:a}=t;for(let e=F.length-1;e>=0;--e){const t=F[e];if(!a[t]){const n=F[e+1],r=a[n]?a[n].index:i.cssRules.length;i.insertRule("@media{}",r),i.insertRule(`--sxs{--sxs:${e}}`,r),a[t]={group:i.cssRules[r+1],index:r,cache:new Set([e])}}$(a[t])}};return r(),t},$=e=>{const t=e.group;let n=t.cssRules.length;e.apply=e=>{try{t.insertRule(e,n),++n}catch(e){}}},W=Symbol(),H=m(),U=(e,t)=>H(e,(()=>(...n)=>{let r={type:null,composers:new Set};for(const t of n)if(null!=t)if(t[v]){null==r.type&&(r.type=t[v].type);for(const e of t[v].composers)r.composers.add(e)}else t.constructor!==Object||t.$$typeof?null==r.type&&(r.type=t):r.composers.add(V(t,e));return null==r.type&&(r.type="span"),r.composers.size||r.composers.add(["PJLV",{},[],[],{},[]]),q(e,r,t)})),V=({variants:e,compoundVariants:t,defaultVariants:n,...r},o)=>{const i=`${P(o.prefix)}c-${N(r)}`,a=[],l=[],s=Object.create(null),u=[];for(const e in n)s[e]=String(n[e]);if("object"==typeof e&&e)for(const t in e){c=s,f=t,w.call(c,f)||(s[t]="undefined");const n=e[t];for(const e in n){const r={[t]:String(e)};"undefined"===String(e)&&u.push(t);const o=n[e],i=[r,o,!b(o)];a.push(i)}}var c,f;if("object"==typeof t&&t)for(const e of t){let{css:t,...n}=e;t="object"==typeof t&&t||{};for(const e in n)n[e]=String(n[e]);const r=[n,t,!b(t)];l.push(r)}return[i,r,a,l,s,u]},q=(e,t,n)=>{const[r,o,i,a]=K(t.composers),l="function"==typeof t.type||t.type.$$typeof?(e=>{function t(){for(let n=0;nt.rules[e]={apply:n=>t[W].push([e,n])})),t})(n):null,s=(l||n).rules,u=`.${r}${o.length>1?`:where(.${o.slice(1).join(".")})`:""}`,c=c=>{c="object"==typeof c&&c||X;const{css:f,...d}=c,p={};for(const e in i)if(delete d[e],e in c){let t=c[e];"object"==typeof t&&t?p[e]={"@initial":i[e],...t}:(t=String(t),p[e]="undefined"!==t||a.has(e)?t:i[e])}else p[e]=i[e];const h=new Set([...o]);for(const[r,o,i,a]of t.composers){n.rules.styled.cache.has(r)||(n.rules.styled.cache.add(r),A(o,[`.${r}`],[],e,(e=>{s.styled.apply(e)})));const t=G(i,p,e.media),l=G(a,p,e.media,!0);for(const o of t)if(void 0!==o)for(const[t,i,a]of o){const o=`${r}-${N(i)}-${t}`;h.add(o);const l=(a?n.rules.resonevar:n.rules.onevar).cache,u=a?s.resonevar:s.onevar;l.has(o)||(l.add(o),A(i,[`.${o}`],[],e,(e=>{u.apply(e)})))}for(const t of l)if(void 0!==t)for(const[o,i]of t){const t=`${r}-${N(i)}-${o}`;h.add(t),n.rules.allvar.cache.has(t)||(n.rules.allvar.cache.add(t),A(i,[`.${t}`],[],e,(e=>{s.allvar.apply(e)})))}}if("object"==typeof f&&f){const t=`${r}-i${N(f)}-css`;h.add(t),n.rules.inline.cache.has(t)||(n.rules.inline.cache.add(t),A(f,[`.${t}`],[],e,(e=>{s.inline.apply(e)})))}for(const e of String(c.className||"").trim().split(/\s+/))e&&h.add(e);const g=d.className=[...h].join(" ");return{type:t.type,className:g,selector:u,props:d,toString:()=>g,deferredInjector:l}};return y(c,{className:r,selector:u,[v]:t,toString:()=>(n.rules.styled.cache.has(r)||c(),r)})},K=e=>{let t="";const n=[],r={},o=[];for(const[i,,,,a,l]of e){""===t&&(t=i),n.push(i),o.push(...l);for(const e in a){const t=a[e];(void 0===r[e]||"undefined"!==t||l.includes(t))&&(r[e]=t)}}return[t,n,r,new Set(o)]},G=(e,t,n,r)=>{const o=[];e:for(let[i,a,l]of e){if(l)continue;let e,s=0,u=!1;for(e in i){const r=i[e];let o=t[e];if(o!==r){if("object"!=typeof o||!o)continue e;{let e,t,i=0;for(const a in o){if(r===String(o[a])){if("@initial"!==a){const e=a.slice(1);(t=t||[]).push(e in n?n[e]:a.replace(/^@media ?/,"")),u=!0}s+=i,e=!0}++i}if(t&&t.length&&(a={["@media "+t.join(", ")]:a}),!e)continue e}}}(o[s]=o[s]||[]).push([r?"cv":`${e}-${i[e]}`,a,u])}return o},X={},Y=m(),Z=(e,t)=>Y(e,(()=>(...n)=>{const r=()=>{for(let r of n){r="object"==typeof r&&r||{};let n=N(r);if(!t.rules.global.cache.has(n)){if(t.rules.global.cache.add(n),"@import"in r){let e=[].indexOf.call(t.sheet.cssRules,t.rules.themed.group)-1;for(let n of[].concat(r["@import"]))n=n.includes('"')||n.includes("'")?n:`"${n}"`,t.sheet.insertRule(`@import ${n};`,e++);delete r["@import"]}A(r,[],[],e,(e=>{t.rules.global.apply(e)}))}}return""};return y(r,{toString:r})})),Q=m(),J=(e,t)=>Q(e,(()=>n=>{const r=`${P(e.prefix)}k-${N(n)}`,o=()=>{if(!t.rules.global.cache.has(r)){t.rules.global.cache.add(r);const o=[];A(n,[],[],e,(e=>o.push(e)));const i=`@keyframes ${r}{${o.join("")}}`;t.rules.global.apply(i)}return r};return y(o,{get name(){return o()},toString:o})})),ee=class{constructor(e,t,n,r){this.token=null==e?"":String(e),this.value=null==t?"":String(t),this.scale=null==n?"":String(n),this.prefix=null==r?"":String(r)}get computedValue(){return"var("+this.variable+")"}get variable(){return"--"+P(this.prefix)+P(this.scale)+this.token}toString(){return this.computedValue}},te=m(),ne=(e,t)=>te(e,(()=>(n,r)=>{r="object"==typeof n&&n||Object(r);const o=`.${n=(n="string"==typeof n?n:"")||`${P(e.prefix)}t-${N(r)}`}`,i={},a=[];for(const t in r){i[t]={};for(const n in r[t]){const o=`--${P(e.prefix)}${t}-${n}`,l=R(String(r[t][n]),e.prefix,t);i[t][n]=new ee(n,l,t,e.prefix),a.push(`${o}:${l}`)}}const l=()=>{if(a.length&&!t.rules.themed.cache.has(n)){t.rules.themed.cache.add(n);const o=`${r===e.theme?":root,":""}.${n}{${a.join(";")}}`;t.rules.themed.apply(o)}return n};return{...i,get className(){return l()},selector:o,toString:l}})),re=m(),oe=m(),ie=e=>{const t=(e=>{let t=!1;const n=re(e,(e=>{t=!0;const n="prefix"in(e="object"==typeof e&&e||{})?String(e.prefix):"",r="object"==typeof e.media&&e.media||{},o="object"==typeof e.root?e.root||null:globalThis.document||null,i="object"==typeof e.theme&&e.theme||{},a={prefix:n,media:r,theme:i,themeMap:"object"==typeof e.themeMap&&e.themeMap||{...h},utils:"object"==typeof e.utils&&e.utils||{}},l=B(o),s={css:U(a,l),globalCss:Z(a,l),keyframes:J(a,l),createTheme:ne(a,l),reset(){l.reset(),s.theme.toString()},theme:{},sheet:l,config:a,prefix:n,getCssText:l.toString,toString:l.toString};return String(s.theme=s.createTheme(i)),s}));return t||n.reset(),n})(e);return t.styled=(({config:e,sheet:t})=>oe(e,(()=>{const n=U(e,t);return(...e)=>{const t=n(...e),r=t[v].type,o=s.forwardRef(((e,n)=>{const o=e&&e.as||r,{props:i,deferredInjector:a}=t(e);return delete i.as,i.ref=n,a?s.createElement(s.Fragment,null,s.createElement(o,i),s.createElement(a,null)):s.createElement(o,i)}));return o.className=t.className,o.displayName=`Styled.${r.displayName||r.name||r}`,o.selector=t.selector,o.toString=()=>t.selector,o[v]=t[v],o}})))(t),t},ae=()=>n||(n=ie()),le=(...e)=>ae().createTheme(...e),se=(...e)=>ae().styled(...e);function ue(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ce(e){for(var t=1;te.forEach((e=>function(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}(e,t)))}function Ee(...e){return s.useCallback(xe(...e),e)}function ke(){return ke=Object.assign||function(e){for(var t=1;t{const{children:n,...r}=e;return s.Children.toArray(n).some(Oe)?s.createElement(s.Fragment,null,s.Children.map(n,(e=>Oe(e)?s.createElement(_e,ke({},r,{ref:t}),e.props.children):e))):s.createElement(_e,ke({},r,{ref:t}),n)}));Se.displayName="Slot";const _e=s.forwardRef(((e,t)=>{const{children:n,...r}=e;return s.isValidElement(n)?s.cloneElement(n,{...Le(r,n.props),ref:xe(t,n.ref)}):s.Children.count(n)>1?s.Children.only(null):null}));_e.displayName="SlotClone";const Ce=({children:e})=>s.createElement(s.Fragment,null,e);function Oe(e){return s.isValidElement(e)&&e.type===Ce}function Le(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?n[r]=(...e)=>{null==i||i(...e),null==o||o(...e)}:"style"===r?n[r]={...o,...i}:"className"===r&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}const Pe=["a","button","div","h2","h3","img","li","nav","p","span","svg","ul"].reduce(((e,t)=>({...e,[t]:s.forwardRef(((e,n)=>{const{asChild:r,...o}=e,i=r?Se:t;return s.useEffect((()=>{window[Symbol.for("radix-ui")]=!0}),[]),e.as&&console.error(Re),s.createElement(i,ke({},o,{ref:n}))}))})),{}),Re="Warning: The `as` prop has been removed in favour of `asChild`. For details, see https://radix-ui.com/docs/primitives/overview/styling#changing-the-rendered-element",je="horizontal",Te=["horizontal","vertical"],Ae=s.forwardRef(((e,t)=>{const{decorative:n,orientation:r=je,...o}=e,i=Me(r)?r:je,a=n?{role:"none"}:{"aria-orientation":"vertical"===i?i:void 0,role:"separator"};return s.createElement(Pe.div,ke({"data-orientation":i},a,o,{ref:t}))}));function Me(e){return Te.includes(e)}Ae.propTypes={orientation(e,t,n){const r=e[t],o=String(r);return r&&!Me(r)?new Error(function(e,t){return`Invalid prop \`orientation\` of value \`${e}\` supplied to \`${t}\`, expected one of:\n - horizontal\n - vertical\n\nDefaulting to \`${je}\`.`}(o,n)):null}};const Ie=Ae;var De=o(2322),Ne={alignment:{start:{alignItems:"flex-start"},center:{alignItems:"center"},end:{alignItems:"end"}},distribution:{around:{justifyContent:"space-around"},between:{justifyContent:"space-between"},evenly:{justifyContent:"space-evenly"},start:{justifyContent:"flex-start"},center:{justifyContent:"center"},end:{justifyContent:"flex-end"}}},Fe=pe("div",{}),ze=pe("span",{}),Be=pe("a",{}),$e=pe("blockquote",{}),We=pe(Fe,{display:"flex",flexDirection:"row",variants:Ne,defaultVariants:{alignment:"start",distribution:"around"}}),He=pe(Fe,{display:"flex",flexDirection:"column",variants:Ne,defaultVariants:{alignment:"start",distribution:"around"}});pe(Ie,{backgroundColor:"$grayLine","&[data-orientation=horizontal]":{height:1,width:"100%"},"&[data-orientation=vertical]":{height:"100%",width:1}});var Ue=["omnivore-highlight-id","data-twitter-tweet-id","data-instagram-id"];function Ve(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]i||setTimeout(r,l,o)},onDiscarded:bt,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:Wt?1e4:5e3,focusThrottleInterval:5e3,dedupingInterval:2e3,loadingTimeout:Wt?5e3:3e3,compare:function(e,t){return Pt(e)==Pt(t)},isPaused:function(){return!1},cache:Qt,mutate:Jt,fallback:{}},Nt),tn=function(e,t){var n=St(e,t);if(t){var r=e.use,o=e.fallback,i=t.use,a=t.fallback;r&&i&&(n.use=r.concat(i)),o&&a&&(n.fallback=St(o,a))}return n},nn=(0,s.createContext)({}),rn=function(e){return kt(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(null===e[1]?e[2]:e[1])||{}]},on=function(){return St(en,(0,s.useContext)(nn))},an=function(e,t,n){var r=t[e]||(t[e]=[]);return r.push(n),function(){var e=r.indexOf(n);e>=0&&(r[e]=r[r.length-1],r.pop())}},ln={dedupe:!0},sn=(xt.defineProperty((function(e){var t=e.value,n=tn((0,s.useContext)(nn),t),r=t&&t.provider,o=(0,s.useState)((function(){return r?Yt(r(n.cache||Qt),t):wt}))[0];return o&&(n.cache=o[0],n.mutate=o[1]),Bt((function(){return o?o[2]:wt}),[]),(0,s.createElement)(nn.Provider,St(e,{value:n}))}),"default",{value:en}),at=function(e,t,n){var r=n.cache,o=n.compare,i=n.fallbackData,a=n.suspense,l=n.revalidateOnMount,u=n.refreshInterval,c=n.refreshWhenHidden,f=n.refreshWhenOffline,d=Ut.get(r),p=d[0],h=d[1],g=d[2],m=d[3],v=Ht(e),y=v[0],b=v[1],w=v[2],x=(0,s.useRef)(!1),E=(0,s.useRef)(!1),k=(0,s.useRef)(y),S=(0,s.useRef)(t),_=(0,s.useRef)(n),C=function(){return _.current},O=function(){return C().isVisible()&&C().isOnline()},L=function(e){return r.set(w,St(r.get(w),e))},P=r.get(y),R=Et(i)?n.fallback[y]:i,j=Et(P)?R:P,T=r.get(w)||{},A=T.error,M=!x.current,I=function(){return M&&!Et(l)?l:!C().isPaused()&&(a?!Et(j)&&n.revalidateIfStale:Et(j)||n.revalidateIfStale)},D=!(!y||!t)&&(!!T.isValidating||M&&I()),N=function(e,t){var n=(0,s.useState)({})[1],r=(0,s.useRef)(e),o=(0,s.useRef)({data:!1,error:!1,isValidating:!1}),i=(0,s.useCallback)((function(e){var i=!1,a=r.current;for(var l in e){var s=l;a[s]!==e[s]&&(a[s]=e[s],o.current[s]&&(i=!0))}i&&!t.current&&n({})}),[]);return Bt((function(){r.current=e})),[r,o.current,i]}({data:j,error:A,isValidating:D},E),F=N[0],z=N[1],B=N[2],$=(0,s.useCallback)((function(e){return ot(void 0,void 0,void 0,(function(){var t,i,a,l,s,u,c,f,d,p,h,v,w;return it(this,(function(_){switch(_.label){case 0:if(t=S.current,!y||!t||E.current||C().isPaused())return[2,!1];l=!0,s=e||{},u=!m[y]||!s.dedupe,c=function(){return!E.current&&y===k.current&&x.current},f=function(){var e=m[y];e&&e[1]===a&&delete m[y]},d={isValidating:!1},p=function(){L({isValidating:!1}),c()&&B(d)},L({isValidating:!0}),B({isValidating:!0}),_.label=1;case 1:return _.trys.push([1,3,,4]),u&&(Vt(r,y,F.current.data,F.current.error,!0),n.loadingTimeout&&!r.get(y)&&setTimeout((function(){l&&c()&&C().onLoadingSlow(y,n)}),n.loadingTimeout),m[y]=[t.apply(void 0,b),Kt()]),w=m[y],i=w[0],a=w[1],[4,i];case 2:return i=_.sent(),u&&setTimeout(f,n.dedupingInterval),m[y]&&m[y][1]===a?(L({error:wt}),d.error=wt,h=g[y],!Et(h)&&(a<=h[0]||a<=h[1]||0===h[1])?(p(),u&&c()&&C().onDiscarded(y),[2,!1]):(o(F.current.data,i)?d.data=F.current.data:d.data=i,o(r.get(y),i)||r.set(y,i),u&&c()&&C().onSuccess(i,y,n),[3,4])):(u&&c()&&C().onDiscarded(y),[2,!1]);case 3:return v=_.sent(),f(),C().isPaused()||(L({error:v}),d.error=v,u&&c()&&(C().onError(v,y,n),("boolean"==typeof n.shouldRetryOnError&&n.shouldRetryOnError||kt(n.shouldRetryOnError)&&n.shouldRetryOnError(v))&&O()&&C().onErrorRetry(v,y,n,$,{retryCount:(s.retryCount||0)+1,dedupe:!0}))),[3,4];case 4:return l=!1,p(),c()&&u&&Vt(r,y,d.data,d.error,!1),[2,!0]}}))}))}),[y]),W=(0,s.useCallback)(Gt.bind(wt,r,(function(){return k.current})),[]);if(Bt((function(){S.current=t,_.current=n})),Bt((function(){if(y){var e=y!==k.current,t=$.bind(wt,ln),n=0,r=an(y,h,(function(e,t,n){B(St({error:t,isValidating:n},o(F.current.data,e)?wt:{data:e}))})),i=an(y,p,(function(e){if(0==e){var r=Date.now();C().revalidateOnFocus&&r>n&&O()&&(n=r+C().focusThrottleInterval,t())}else if(1==e)C().revalidateOnReconnect&&O()&&t();else if(2==e)return $()}));return E.current=!1,k.current=y,x.current=!0,e&&B({data:j,error:A,isValidating:D}),I()&&(Et(j)||zt?t():(a=t,Ct()&&typeof window.requestAnimationFrame!=_t?window.requestAnimationFrame(a):setTimeout(a,1))),function(){E.current=!0,r(),i()}}var a}),[y,$]),Bt((function(){var e;function t(){var t=kt(u)?u(j):u;t&&-1!==e&&(e=setTimeout(n,t))}function n(){F.current.error||!c&&!C().isVisible()||!f&&!C().isOnline()?t():$(ln).then(t)}return t(),function(){e&&(clearTimeout(e),e=-1)}}),[u,c,f,$]),(0,s.useDebugValue)(j),a&&Et(j)&&y)throw S.current=t,_.current=n,E.current=!1,Et(A)?$(ln):A;return{mutate:W,get data(){return z.data=!0,j},get error(){return z.error=!0,A},get isValidating(){return z.isValidating=!0,D}}},function(){for(var e=[],t=0;t0;)s=u[c](s);return s(o,i||l.fetcher,l)}),un={prod:{webBaseURL:null!==(lt=window.omnivoreEnv.NEXT_PUBLIC_BASE_URL)&&void 0!==lt?lt:"",serverBaseURL:null!==(st=window.omnivoreEnv.NEXT_PUBLIC_SERVER_BASE_URL)&&void 0!==st?st:"",highlightsBaseURL:null!==(ut=window.omnivoreEnv.NEXT_PUBLIC_HIGHLIGHTS_BASE_URL)&&void 0!==ut?ut:""},dev:{webBaseURL:null!==(ct=window.omnivoreEnv.NEXT_PUBLIC_DEV_BASE_URL)&&void 0!==ct?ct:"",serverBaseURL:null!==(ft=window.omnivoreEnv.NEXT_PUBLIC_DEV_SERVER_BASE_URL)&&void 0!==ft?ft:"",highlightsBaseURL:null!==(dt=window.omnivoreEnv.NEXT_PUBLIC_DEV_HIGHLIGHTS_BASE_URL)&&void 0!==dt?dt:""},demo:{webBaseURL:null!==(pt=window.omnivoreEnv.NEXT_PUBLIC_DEMO_BASE_URL)&&void 0!==pt?pt:"",serverBaseURL:null!==(ht=window.omnivoreEnv.NEXT_PUBLIC_DEMO_SERVER_BASE_URL)&&void 0!==ht?ht:"",highlightsBaseURL:null!==(gt=window.omnivoreEnv.NEXT_PUBLIC_DEMO_HIGHLIGHTS_BASE_URL)&&void 0!==gt?gt:""},local:{webBaseURL:null!==(mt=window.omnivoreEnv.NEXT_PUBLIC_LOCAL_BASE_URL)&&void 0!==mt?mt:"",serverBaseURL:null!==(vt=window.omnivoreEnv.NEXT_PUBLIC_LOCAL_SERVER_BASE_URL)&&void 0!==vt?vt:"",highlightsBaseURL:null!==(yt=window.omnivoreEnv.NEXT_PUBLIC_LOCAL_HIGHLIGHTS_BASE_URL)&&void 0!==yt?yt:""}};function cn(e){var t=un[dn].serverBaseURL;if(0==t.length)throw new Error("Couldn't find environment variable for server base url in ".concat(e," environment"));return t}var fn,dn=window.omnivoreEnv.NEXT_PUBLIC_APP_ENV||"prod",pn=(window.omnivoreEnv.SENTRY_DSN||window.omnivoreEnv.NEXT_PUBLIC_SENTRY_DSN,window.omnivoreEnv.NEXT_PUBLIC_PSPDFKIT_LICENSE_KEY,window.omnivoreEnv.SSO_JWT_SECRET,"".concat(un[dn].serverBaseURL,"local"==dn?"/api/auth/gauth-redirect-localhost":"/api/auth/vercel/gauth-redirect"),"".concat(un[dn].serverBaseURL,"local"==dn?"/api/auth/apple-redirect-localhost":"/api/auth/vercel/apple-redirect"),window.omnivoreEnv.NEXT_PUBLIC_INTERCOM_APP_ID,window.omnivoreEnv.NEXT_PUBLIC_SEGMENT_API_KEY,"prod"==dn?window.omnivoreEnv.NEXT_PUBLIC_GOOGLE_ID:window.omnivoreEnv.NEXT_PUBLIC_DEV_GOOGLE_ID,"".concat(cn(dn),"/api/graphql")),hn="".concat(cn(dn),"/api");function gn(e,t,n,r,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void n(e)}l.done?t(s):Promise.resolve(s).then(r,o)}function mn(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){gn(i,r,o,a,l,"next",e)}function l(e){gn(i,r,o,a,l,"throw",e)}a(void 0)}))}}function vn(){var e,t,n=(null===(e=window)||void 0===e?void 0:e.localStorage.getItem("authToken"))||void 0,r=(null===(t=window)||void 0===t?void 0:t.localStorage.getItem("pendingUserAuth"))||void 0;return n?{authorization:n}:r?{pendingUserAuth:r}:{}}function yn(e,t){return bn(e,t,!1)}function bn(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];n&&wn();var r=new rt.GraphQLClient(pn,{credentials:"include",mode:"cors"});return r.request(e,t,vn())}function wn(){return xn.apply(this,arguments)}function xn(){return(xn=mn(regeneratorRuntime.mark((function e(){var t,n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("undefined"!=typeof window){e.next=2;break}return e.abrupt("return");case 2:if(!window.localStorage.getItem("authVerified")){e.next=4;break}return e.abrupt("return");case 4:return e.prev=4,e.next=7,fetch("".concat(hn,"/auth/verify"),{credentials:"include",mode:"cors",headers:vn()});case 7:if(200===(t=e.sent).status){e.next=10;break}return e.abrupt("return");case 10:return e.next=12,t.json();case 12:n=e.sent,r=n.authStatus,e.t0=r,e.next="AUTHENTICATED"===e.t0?17:"PENDING_USER"===e.t0?19:"NOT_AUTHENTICATED"===e.t0?21:22;break;case 17:return window.localStorage.setItem("authVerified","true"),e.abrupt("break",22);case 19:return"/confirm-profile"!==window.location.pathname&&(window.location.href="/confirm-profile"),e.abrupt("break",22);case 21:"/login"!==window.location.pathname&&(window.location.href="/login?errorCodes=AUTH_FAILED");case 22:e.next=27;break;case 24:return e.prev=24,e.t1=e.catch(4),e.abrupt("return");case 27:case"end":return e.stop()}}),e,null,[[4,24]])})))).apply(this,arguments)}(function(e){if(0==un[dn].highlightsBaseURL.length)throw new Error("Couldn't find environment variable for highlights base url in ".concat(e," environment"))})(dn),function(e){if(0==un[dn].webBaseURL.length)throw new Error("Couldn't find environment variable for web base url in ".concat(e," environment"))}(dn);var En,kn,Sn,_n=(0,rt.gql)(fn||(En=["\n query GetUserPersonalization {\n getUserPersonalization {\n ... on GetUserPersonalizationSuccess {\n userPersonalization {\n id\n theme\n margin\n fontSize\n fontFamily\n libraryLayoutType\n librarySortOrder\n }\n }\n ... on GetUserPersonalizationError {\n errorCodes\n }\n }\n }\n"],kn||(kn=En.slice(0)),fn=Object.freeze(Object.defineProperties(En,{raw:{value:Object.freeze(kn)}}))));function Cn(e){Jt(_n,{getUserPersonalization:{userPersonalization:e}},!1)}function On(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function Ln(e,t,n,r,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void n(e)}l.done?t(s):Promise.resolve(s).then(r,o)}function Pn(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Ln(i,r,o,a,l,"next",e)}function l(e){Ln(i,r,o,a,l,"throw",e)}a(void 0)}))}}function Rn(e){return jn.apply(this,arguments)}function jn(){return jn=Pn(regeneratorRuntime.mark((function e(t){var n,r,o,i,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=(0,rt.gql)(Sn||(Sn=On(["\n mutation SetUserPersonalization($input: SetUserPersonalizationInput!) {\n setUserPersonalization(input: $input) {\n ... on SetUserPersonalizationSuccess {\n updatedUserPersonalization {\n id\n theme\n fontSize\n fontFamily\n margin\n libraryLayoutType\n librarySortOrder\n }\n }\n ... on SetUserPersonalizationError {\n errorCodes\n }\n }\n }\n "]))),e.prev=1,e.next=4,bn(n,{input:t});case 4:if(o=e.sent,null==(i=o)||null===(r=i.setUserPersonalization)||void 0===r||!r.updatedUserPersonalization){e.next=9;break}return Cn(i.setUserPersonalization.updatedUserPersonalization),e.abrupt("return",null===(a=i.setUserPersonalization)||void 0===a?void 0:a.updatedUserPersonalization);case 9:return e.abrupt("return",void 0);case 12:return e.prev=12,e.t0=e.catch(1),e.abrupt("return",void 0);case 15:case"end":return e.stop()}}),e,null,[[1,12]])}))),jn.apply(this,arguments)}var Tn="theme";function An(e){"undefined"!=typeof window&&(Mn(e),Rn({theme:e}))}function Mn(e){"undefined"!=typeof window&&window.localStorage.setItem(Tn,e),document.body.classList.remove(we,ye,be,r.Light,r.Dark,r.Darker,r.Lighter,r.Sepia,r.Charcoal),document.body.classList.add(e)}function In(){switch(function(){if("undefined"!=typeof window)return window.localStorage.getItem(Tn)}()){case r.Light:return"Light";case r.Dark:return"Dark";case r.Darker:return"Darker";case r.Lighter:return"Lighter";case r.Sepia:return"Sepia";case r.Charcoal:return"Charcoal";default:return""}}function Dn(){var e=In();return"Dark"===e||"Darker"===e}var Nn=o(4073),Fn=o.n(Nn);function zn(e,t,n,r,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void n(e)}l.done?t(s):Promise.resolve(s).then(r,o)}function Bn(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){l=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return $n(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?$n(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function $n(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0;)r();return n.shift(),n.forEach((function(e,t){e.setAttribute("data-omnivore-anchor-idx",(t+1).toString())})),n}(e.current),r=new IntersectionObserver((function(e){var n=0,r=1e5;if(e.forEach((function(e){var t=e.target.getAttribute("data-omnivore-anchor-idx")||"0";e.isIntersecting&&1===e.intersectionRatio&&e.boundingClientRect.top0){for(var o=n;o-1>0;){var i=document.querySelector("[data-omnivore-anchor-idx='".concat((o-1).toString(),"']"));if(!i)throw new Error("Unable to find previous intersection element!");var a=i.getBoundingClientRect();if(!(a.top>=0&&a.left>=0&&a.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&a.right<=(window.innerWidth||document.documentElement.clientWidth)))break;o-=1}t(o)}}),{root:null,rootMargin:"0px",threshold:[1]});return null==n||n.forEach((function(e){r.observe(e)})),function(){r.disconnect()}}),[e,t])}(p,l);var h=(0,s.useMemo)((function(){return Fn()((function(e){o(e)}),2e3)}),[]);(0,s.useEffect)((function(){return function(){h.cancel()}}),[]),(0,s.useEffect)((function(){var t;(t=regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r){t.next=2;break}return t.abrupt("return");case 2:return t.next=4,e.articleMutations.articleReadingProgressMutation({id:e.articleId,readingProgressPercent:r>100?100:r,readingProgressAnchorIndex:a});case 4:case"end":return t.stop()}}),t)})),function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(e){zn(i,r,o,a,l,"next",e)}function l(e){zn(i,r,o,a,l,"throw",e)}a(void 0)}))})()}),[e.articleId,r]),(0,s.useEffect)((function(){var e,t;void 0!==(null===(e=window)||void 0===e?void 0:e.webkit)&&(null===(t=window.webkit.messageHandlers.readingProgressUpdate)||void 0===t||t.postMessage({progress:r}))}),[r]),function(e,t){var n,r,o=(0,s.useRef)(void 0),i=(n=(0,s.useState)({x:0,y:0}),r=2,function(e){if(Array.isArray(e))return e}(n)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){l=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(n,r)||function(e,t){if(e){if("string"==typeof e)return Ve(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ve(e,t):void 0}}(n,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),a=i[0],l=i[1];(0,s.useEffect)((function(){var t=function(){var t,n,r,i,a,s,u={x:null!==(t=null!==(n=window.document.documentElement.scrollLeft)&&void 0!==n?n:null===(r=window)||void 0===r?void 0:r.scrollX)&&void 0!==t?t:0,y:null!==(i=null!==(a=window.document.documentElement.scrollTop)&&void 0!==a?a:null===(s=window)||void 0===s?void 0:s.scrollY)&&void 0!==i?i:0};e(),l(u),o.current=void 0},n=function(){void 0===o.current&&(o.current=setTimeout(t,1e3))};return window.addEventListener("scroll",n),function(){return window.removeEventListener("scroll",n)}}),[a,1e3,e])}((function(e){if(window&&window.document.scrollingElement){var t=window.scrollY/window.document.scrollingElement.scrollHeight;h(100*(t>.92?1:t))}}));var g=(0,s.useCallback)((function(e,t){if(t){var n=t.clientWidth+140;if(!e.closest("blockquote, table")){var r=parseFloat(e.getAttribute("width")||"");(r=isNaN(r)?e.naturalWidth:r)>n&&(e.style.setProperty("width","".concat(Math.min(r,n),"px")),e.style.setProperty("max-width","unset"),e.style.setProperty("margin-left","-".concat(Math.round(70),"px")))}}}),[]);(0,s.useEffect)((function(){if("undefined"!=typeof window&&f&&(d(!1),!(e.highlightHref.current||e.initialReadingProgress&&e.initialReadingProgress>=98))){var t=e.highlightHref.current?document.querySelector('[omnivore-highlight-id="'.concat(e.highlightHref.current,'"]')):document.querySelector("[data-omnivore-anchor-idx='".concat(e.initialAnchorIndex.toString(),"']"));if(t){var n=function(e){var t=0;if(e.offsetParent){do{t+=e.offsetTop}while(e=e.offsetParent);return t}return 0}(t);window.document.documentElement.scroll(0,n-100)}}}),[e.initialAnchorIndex,e.initialReadingProgress,f]),(0,s.useEffect)((function(){var e,t;"function"==typeof(null===(e=window)||void 0===e||null===(t=e.MathJax)||void 0===t?void 0:t.typeset)&&window.MathJax.typeset(),Array.from(document.getElementsByClassName("tweet-placeholder")).forEach((function(e){(0,c.render)((0,De.jsx)(nt,{tweetId:e.getAttribute("data-tweet-id")||"",options:{theme:Dn()?"dark":"light",align:"center"}}),e)}))}),[]);var m=(0,s.useCallback)((function(){var e,t=null===(e=p.current)||void 0===e?void 0:e.querySelectorAll("img");null==t||t.forEach((function(e){g(e,p.current)}))}),[g]);return(0,s.useEffect)((function(){return window.addEventListener("load",m),function(){window.removeEventListener("load",m)}}),[m]),(0,De.jsxs)(De.Fragment,{children:[(0,De.jsx)("link",{rel:"stylesheet",href:"https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.4.0/styles/".concat(t,".min.css")}),(0,De.jsx)(Fe,{ref:p,css:{maxWidth:"100%"},className:"article-inner-css","data-testid":"article-inner",dangerouslySetInnerHTML:{__html:e.content}})]})}var Hn=pe("p",{fontFamily:"Inter",fontWeight:"normal",lineHeight:"120%",color:"$grayTextContrast",variants:{style:{body:{fontSize:"$2",lineHeight:"1.25"},logoTitle:{fontFamily:"Inter",fontWeight:700,fontSize:"18px",textTransform:"uppercase",letterSpacing:"0.15em"},bodyBold:{fontWeight:"bold",fontSize:"$2",lineHeight:"1.25"},recommendedByline:{fontWeight:"bold",fontSize:"13.5px",paddingTop:"4px",mt:"0px",mb:"16px",color:"$grayTextContrast"},userName:{fontWeight:"600",fontSize:"13.5px",paddingTop:"4px",my:"6px",color:"$grayText"},userNote:{fontSize:"16px",paddingTop:"0px",marginTop:"0px",lineHeight:"1.5",color:"$grayTextContrast"},headline:{fontSize:"$4","@md":{fontSize:"$6"}},fixedHeadline:{fontSize:"24px",fontWeight:"500"},subHeadline:{fontSize:"24px",fontWeight:"500"},articleTitle:{fontWeight:"bold",fontSize:"32px","@md":{fontSize:"47px"},margin:0},boldHeadline:{fontWeight:"bold",fontSize:"$4","@md":{fontSize:"$6"},margin:0},modalHeadline:{fontWeight:"500",fontSize:"24px",lineHeight:"1",color:"$grayText",margin:0},modalTitle:{fontSize:"16px",fontWeight:"600",color:"$grayText",lineHeight:"1.50",margin:0},boldText:{fontWeight:"600",fontSize:"16px",lineHeight:"1",color:"$textDefault"},shareHighlightModalAnnotation:{fontSize:"18px",lineHeight:"23.4px",color:"$utilityTextSubtle",m:0},footnote:{fontSize:"$1"},shareTitle:{fontSize:"$1",fontWeight:"600",color:"$grayText"},shareSubtitle:{fontSize:"$1",color:"$grayText"},listTitle:{fontSize:"16px",fontWeight:"500",color:"$grayTextContrast",lineHeight:"1.5",wordBreak:"break-word"},caption:{color:"$grayText",fontSize:"12px",lineHeight:"1.5",wordBreak:"break-word"},captionLink:{fontSize:"$2",textDecoration:"underline",lineHeight:"1.5",cursor:"pointer"},action:{fontSize:"16px",fontWeight:"500",lineHeight:"1.5"},actionLink:{fontSize:"16px",fontWeight:"500",lineHeight:"1.5",textDecoration:"underline",cursor:"pointer"},navLink:{m:0,fontSize:"$1",fontWeight:400,color:"$graySolid",cursor:"pointer","&:hover":{opacity:.7}},controlButton:{color:"$grayText",fontWeight:"500",fontFamily:"inter",fontSize:"14px"},menuTitle:{pt:"0px",m:"0px",color:"$utilityTextDefault",fontSize:16,fontFamily:"inter",fontWeight:"500",lineHeight:"unset"},libraryHeader:{pt:"0px",m:"0px",fontSize:24,fontFamily:"inter",lineHeight:"unset",fontWeight:"bold",color:"$textSubtle"},aboutFooter:{pt:"0px",m:"0px",fontSize:24,fontFamily:"inter",lineHeight:"unset",fontWeight:"bold",color:"white"},error:{color:"$error",fontSize:"$2",lineHeight:"1.25"}}},defaultVariants:{style:"footnote"}}),Un=(pe("span",Hn),pe("li",{fontFamily:"Inter",fontWeight:"normal",lineHeight:"1.35",color:"$grayTextContrast"}),pe("ul",{fontFamily:"Inter",fontWeight:"normal",lineHeight:"1.35",color:"$grayTextContrast"}),pe("img",{}),pe("a",{textDecoration:"none"}),pe("mark",{}),Intl.DateTimeFormat().resolvedOptions().locale||"en-US");function Vn(e){var t,n=e.style||"footnote",r=function(e,t){var n=new URL(e).origin,r=qn(e);if(t){var o="".concat(function(e){return"by ".concat("string"==typeof(t=e)?t.replace(/(<([^>]+)>)/gi,""):"");var t}(t));return r?o:"".concat(o,", ").concat(new URL(e).hostname)}if(!r)return n}(e.href,e.author);return(0,De.jsx)(Fe,{children:(0,De.jsxs)(Hn,{style:n,css:{wordBreak:"break-word"},children:[r," ",r&&(0,De.jsx)("span",{style:{position:"relative",bottom:1},children:"• "})," ",(t=e.rawDisplayDate,new Intl.DateTimeFormat(Un,{dateStyle:"long"}).format(new Date(t)))," ",!e.hideButton&&!qn(e.href)&&(0,De.jsxs)(De.Fragment,{children:[(0,De.jsx)("span",{style:{position:"relative",bottom:1},children:"• "})," ",(0,De.jsx)(Be,{href:e.href,target:"_blank",rel:"noreferrer",css:{textDecoration:"underline",color:"$grayTextContrast"},children:"See original"})]})]})})}function qn(e){var t=new URL(e).origin;return-1!=["https://storage.googleapis.com","https://omnivore.app"].indexOf(t)}var Kn=o(1427);function Gn(e,t){for(var n=0,r=e.length-1;n=e[l+1]))return l;n=l+1}}throw new Error("Unable to find text node")}var Xn="omnivore-highlight-id",Yn="omnivore-highlight-note-id",Zn="omnivore_highlight",Qn="article-container",Jn=/^(a|b|basefont|bdo|big|em|font|i|s|small|span|strike|strong|su[bp]|tt|u|code|mark)$/i,er=new RegExp("<".concat(Zn,">([\\s\\S]*)<\\/").concat(Zn,">"),"i"),tr=2e3;function nr(e,t,n,r,o){var i,a=lr({patch:e}),l=a.prefix,s=a.suffix,u=a.highlightTextStart,c=a.highlightTextEnd,f=a.textNodes,d=a.textNodeIndex,p="";if(ur(t).length)return{prefix:l,suffix:s,quote:p,startLocation:u,endLocation:c};for(var h=function(){var e=sr({textNodes:f,startingTextNodeIndex:d,highlightTextStart:u,highlightTextEnd:c}),a=e.node,l=e.textPartsToHighlight,s=e.startsParagraph,h=a.parentNode,g=a.nextSibling,m=!1,v=a instanceof HTMLElement?a:a.parentElement;v&&(m=window.getComputedStyle(v).whiteSpace.startsWith("pre")),null==h||h.removeChild(a),l.forEach((function(e,a){var l=e.highlight,u=e.text,c=m?u:u.replace(/\n/g,""),f=document.createTextNode(u);if(l){c&&(s&&!a&&p&&(p+="\n"),p+=c);var d=document.createElement("span");return d.className=n?"highlight_with_note":"highlight",d.setAttribute(Xn,t),r&&d.setAttribute("style","background-color: ".concat(r," !important")),o&&d.setAttribute("title",o),d.appendChild(f),i=d,null==h?void 0:h.insertBefore(d,g)}return null==h?void 0:h.insertBefore(f,g)})),d++};c>f[d].startIndex;)h();if(n&&i){i.classList.add("last_element");var g=function(){var e="http://www.w3.org/2000/svg",t=document.createElementNS(e,"svg");t.setAttribute("viewBox","0 0 14 14"),t.setAttribute("width","14"),t.setAttribute("height","14"),t.setAttribute("fill","none");var n=document.createElementNS(e,"path");return n.setAttribute("d","M1 5.66602C1 3.7804 1 2.83759 1.58579 2.2518C2.17157 1.66602 3.11438 1.66602 5 1.66602H9C10.8856 1.66602 11.8284 1.66602 12.4142 2.2518C13 2.83759 13 3.7804 13 5.66602V7.66601C13 9.55163 13 10.4944 12.4142 11.0802C11.8284 11.666 10.8856 11.666 9 11.666H4.63014C4.49742 11.666 4.43106 11.666 4.36715 11.6701C3.92582 11.6984 3.50632 11.8722 3.17425 12.1642C3.12616 12.2065 3.07924 12.2534 2.98539 12.3473V12.3473C2.75446 12.5782 2.639 12.6937 2.55914 12.7475C1.96522 13.1481 1.15512 12.8125 1.01838 12.1093C1 12.0148 1 11.8515 1 11.5249V5.66602Z"),n.setAttribute("stroke","rgba(255, 210, 52, 0.8)"),n.setAttribute("stroke-width","1.8"),n.setAttribute("stroke-linejoin","round"),t.appendChild(n),t}();g.setAttribute(Yn,t);var m=document.createElement("div");m.className="highlight_note_button",m.appendChild(g),m.setAttribute(Yn,t),m.setAttribute("width","14px"),m.setAttribute("height","14px"),i.appendChild(m)}return{prefix:l,suffix:s,quote:p,startLocation:u,endLocation:c}}function rr(e){var t=document.getElementById(Qn);if(!t)throw new Error("Unable to find article content element");var n=new Range,r=new Range,o=new Range;o.selectNode(t),n.setStart(o.startContainer,o.startOffset),n.setEnd(e.startContainer,e.startOffset),r.setStart(e.endContainer,e.endOffset),r.setEnd(o.endContainer,o.endOffset);var i="".concat(n.toString(),"<").concat(Zn,">").concat(e.toString(),"").concat(Zn,">").concat(r.toString()),a=new Kn.diff_match_patch,l=a.patch_toText(a.patch_make(o.toString(),i));if(!l)throw new Error("Invalid patch");return l}function or(e){var t=rr(e),n=ar(t);return[n.highlightTextStart,n.highlightTextEnd]}var ir=function(e){var t=(null==e?void 0:e.current)||document.getElementById(Qn);if(!t)throw new Error("Unable to find article content element");var n=0,r="",o=!1,i=[];return t.childNodes.forEach((function e(t){var a;t.nodeType===Node.TEXT_NODE?(i.push({startIndex:n,node:t,startsParagraph:o}),n+=(null===(a=t.nodeValue)||void 0===a?void 0:a.length)||0,r+=t.nodeValue,o=!1):(Jn.test(t.tagName)||(o=!0),t.childNodes.forEach(e))})),i.push({startIndex:n,node:document.createTextNode("")}),{textNodes:i,articleText:r}},ar=function(e){if(!e)throw new Error("Invalid patch");var t,n=ir().articleText,r=new Kn.diff_match_patch,o=r.patch_apply(r.patch_fromText(e),n);if(o[1][0])t=er.exec(o[0]);else{r.Match_Threshold=.5,r.Match_Distance=4e3;var i=r.patch_apply(r.patch_fromText(e),n);if(!i[1][0])throw new Error("Unable to find the highlight");t=er.exec(i[0])}if(!t)throw new Error("Unable to find the highlight from patch");var a=t.index;return{highlightTextStart:a,highlightTextEnd:a+t[1].length,matchingHighlightContent:t}};function lr(e){var t=e.patch;if(!t)throw new Error("Invalid patch");var n=ir().textNodes,r=ar(t),o=r.highlightTextStart,i=r.highlightTextEnd,a=Gn(n.map((function(e){return e.startIndex})),o),l=Gn(n.map((function(e){return e.startIndex})),i);return{prefix:cr({textNodes:n,startingTextNodeIndex:a,startingOffset:o-n[a].startIndex,side:"prefix"}),suffix:cr({textNodes:n,startingTextNodeIndex:l,startingOffset:i-n[l].startIndex,side:"suffix"}),highlightTextStart:o,highlightTextEnd:i,textNodes:n,textNodeIndex:a}}var sr=function(e){var t=e.textNodes,n=e.startingTextNodeIndex,r=e.highlightTextStart,o=e.highlightTextEnd,i=t[n],a=i.node,l=i.startIndex,s=i.startsParagraph,u=a.nodeValue||"",c=r-l,f=o-l,d=[];return c>0&&d.push({text:u.substring(0,c),highlight:!1}),d.push({text:u.substring(c,f),highlight:!0}),f<=u.length&&d.push({text:u.substring(f),highlight:!1}),{node:a,textPartsToHighlight:d,startsParagraph:s}},ur=function(e){return Array.from(document.querySelectorAll("[".concat(Xn,"='").concat(e,"']")))},cr=function(e){var t,n=e.textNodes,r=e.startingTextNodeIndex,o=e.startingOffset,i="prefix"===e.side,a=r,l=function e(){var t=n[a+=i?-1:1],r=t.node,o=t.startsParagraph,l=r.nodeValue||"";return i?o||l.length>tr?l:e()+l:!n[a+1]||n[a+1].startsParagraph||l.length>tr?l:l+e()},s=n[r],u=s.startsParagraph,c=s.node.nodeValue||"",f=i?c.substring(0,o):c.substring(o);return(t=i?u?f:l()+f:!n[a+1]||n[a+1].startsParagraph?f:f+l()).length<=tr?t:i?t.slice(t.length-tr):t.substring(0,tr)},fr=function(e){var t=lr({patch:e}),n=t.highlightTextStart;return t.highlightTextEnd-n<6e3};function dr(e,t,n,r,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void n(e)}l.done?t(s):Promise.resolve(s).then(r,o)}function pr(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){dr(i,r,o,a,l,"next",e)}function l(e){dr(i,r,o,a,l,"throw",e)}a(void 0)}))}}function hr(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){l=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return gr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?gr(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function gr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0&&l<=0,u=i.startContainer===t.focusNode&&i.endOffset===t.anchorOffset,e.abrupt("return",s?{range:i,isReverseSelected:u,selection:t}:void 0);case 20:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var yr=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if("undefined"==typeof window||!e)return{left:0,top:0,right:0,bottom:0,width:0,height:0};var n=e.getClientRects();if(!n||!n.length)return{left:0,top:0,right:0,bottom:0,width:0,height:0};var r=n[t?0:n.length-1];return{left:window.scrollX+r.left,top:window.scrollY+r.top,right:window.scrollX+r.right,bottom:window.scrollY+r.bottom,width:r.width,height:r.height}};function br(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}function wr(){return navigator.userAgent.includes("Android")}function xr(){return wr()||br()}var Er=pe("button",{fontFamily:"inter",fontSize:"$2",lineHeight:"1.25",color:"$grayText",variants:{style:{ctaYellow:{borderRadius:"$3",px:"$3",py:"$2",border:"1px solid $yellow3",bg:"$yellow3","&:hover":{bg:"$yellow4",border:"1px solid $grayBorderHover"}},ctaDarkYellow:{border:0,fontSize:"14px",fontWeight:500,fontStyle:"normal",fontFamily:"Inter",borderRadius:"8px",cursor:"pointer",color:"$omnivoreGray",bg:"$omnivoreCtaYellow",p:"10px 13px"},ctaOutlineYellow:{boxSizing:"border-box","-moz-box-sizing":"border-box","-webkit-box-sizing":"border-box",borderColor:"unset",border:"1px solid $omnivoreCtaYellow",fontSize:"14px",fontWeight:500,fontStyle:"normal",fontFamily:"Inter",borderRadius:"8px",cursor:"pointer",color:"$utilityTextDefault",bg:"transparent",p:"9px 12px"},ctaLightGray:{border:0,fontSize:"14px",fontWeight:500,fontStyle:"normal",fontFamily:"Inter",borderRadius:"8px",cursor:"pointer",color:"$grayTextContrast",p:"10px 12px",bg:"rgb(125, 125, 125, 0.1)","&:hover":{bg:"rgb(47, 47, 47, 0.1)",".ctaButtonIcon":{visibility:"visible"}},".ctaButtonIcon":{visibility:"hidden"}},ctaGray:{border:0,fontSize:"14px",fontWeight:500,fontStyle:"normal",fontFamily:"Inter",borderRadius:"8px",cursor:"pointer",color:"$omnivoreGray",bg:"$grayBgActive",p:"10px 12px"},ctaWhite:{borderRadius:"$3",px:"$3",py:"$2",cursor:"pointer",border:"1px solid $grayBgSubtle",bg:"$grayBgSubtle","&:hover":{border:"1px solid $grayBorderHover"}},modalOption:{style:"ghost",height:"52px",width:"100%",textAlign:"left",verticalAlign:"middle",color:"#0A0806",backgroundColor:"unset",outlineColor:"rgba(0, 0, 0, 0)",border:"1px solid rgba(0, 0, 0, 0.06)",cursor:"pointer","&:focus":{outline:"none"}},ctaModal:{height:"32px",verticalAlign:"middle",color:"$textDefault",backgroundColor:"$grayBase",fontWeight:"600",padding:"0px 12px",fontSize:"16px",border:"1px solid $grayBorder",cursor:"pointer",borderRadius:"8px","&:focus":{outline:"none"}},ctaSecondary:{color:"$grayText",border:"none",bg:"transparent","&:hover":{opacity:.8}},ctaPill:{borderRadius:"$3",px:"$3",py:"$2",border:"1px solid $grayBorder",bg:"$grayBgActive","&:hover":{bg:"$grayBgHover",border:"1px solid $grayBorderHover"}},circularIcon:{mx:"$1",display:"flex",alignItems:"center",fontWeight:500,height:44,width:44,borderRadius:"50%",justifyContent:"center",textAlign:"center",background:"$grayBase",cursor:"pointer",border:"none",opacity:.9,"&:hover":{opacity:1}},squareIcon:{mx:"$1",display:"flex",alignItems:"center",fontWeight:500,height:44,width:44,justifyContent:"center",textAlign:"center",background:"$grayBase",cursor:"pointer",border:"none",borderRight:"1px solid $grayText",opacity:.9,"&:hover":{opacity:1}},plainIcon:{bg:"transparent",border:"none",cursor:"pointer","&:hover":{opacity:.8}},articleActionIcon:{bg:"transparent",border:"none",cursor:"pointer","&:hover":{opacity:.8}},ghost:{color:"transparent",border:"none",bg:"transparent",cursor:"pointer","&:hover":{opacity:.8}},themeSwitch:{p:"0px",m:"0px",ml:"0px",width:"60px",height:"48px",fontSize:"14px",border:"unset",borderRadius:"6px","&:hover":{transform:"scale(1.1)",border:"2px solid #F9D354"},'&[data-state="selected"]':{border:"2px solid #F9D354"}}}},defaultVariants:{style:"ctaWhite"}});function kr(e){return e.color,e.height,e.width,(0,De.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,De.jsx)("path",{d:"M4.5 20.25H8.68934C8.78783 20.25 8.88536 20.2306 8.97635 20.1929C9.06735 20.1552 9.15003 20.1 9.21967 20.0303L18 11.25L12.75 6.00001L3.96967 14.7803C3.90003 14.85 3.84478 14.9327 3.80709 15.0237C3.80379 15.0316 3.80063 15.0396 3.79761 15.0477C3.76615 15.1317 3.75 15.2208 3.75 15.3107V19.5C3.75 19.6989 3.82902 19.8897 3.96967 20.0303C4.11032 20.171 4.30109 20.25 4.5 20.25Z",fill:"#FFD234"}),(0,De.jsx)("path",{d:"M15.2197 3.53034L12.75 6.00001L18 11.25L20.4697 8.78034C20.6103 8.63969 20.6893 8.44892 20.6893 8.25001C20.6893 8.0511 20.6103 7.86033 20.4697 7.71968L16.2803 3.53034C16.1397 3.38969 15.9489 3.31067 15.75 3.31067C15.5511 3.31067 15.3603 3.38969 15.2197 3.53034Z",fill:"#FFD234"}),(0,De.jsx)("path",{d:"M8.68934 20.25H4.5C4.30109 20.25 4.11032 20.171 3.96967 20.0303C3.82902 19.8897 3.75 19.6989 3.75 19.5V15.3107C3.75 15.2122 3.7694 15.1147 3.80709 15.0237C3.84478 14.9327 3.90003 14.85 3.96967 14.7803L15.2197 3.53034C15.3603 3.38969 15.5511 3.31067 15.75 3.31067C15.9489 3.31067 16.1397 3.38969 16.2803 3.53034L20.4697 7.71968C20.6103 7.86033 20.6893 8.0511 20.6893 8.25001C20.6893 8.44892 20.6103 8.63969 20.4697 8.78034L9.21967 20.0303C9.15003 20.1 9.06735 20.1552 8.97635 20.1929C8.88536 20.2306 8.78783 20.25 8.68934 20.25Z",stroke:"#0A0806",strokeOpacity:"0.8",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,De.jsx)("path",{d:"M12.75 6L18 11.25",stroke:"#0A0806",strokeOpacity:"0.8",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,De.jsx)("path",{d:"M8.95223 20.2021L3.79785 15.0477",stroke:"black",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})}pe(Er,{variants:{style:{ctaWhite:{color:"red",padding:"10px",display:"flex",justifyContent:"center",alignItems:"center",border:"1px solid $grayBorder",boxSizing:"border-box",borderRadius:6,width:40,height:40}}}});var Sr=(0,s.createContext)({color:"currentColor",size:"1em",weight:"regular",mirrored:!1}),_r=function(e,t,n){var r=n.get(e);return r?r(t):(console.error('Unsupported icon weight. Choose from "thin", "light", "regular", "bold", "fill", or "duotone".'),null)};function Cr(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}var Or=(0,s.forwardRef)((function(e,t){var n=e.alt,r=e.color,o=e.size,i=e.weight,a=e.mirrored,l=e.children,u=e.renderPath,c=Cr(e,["alt","color","size","weight","mirrored","children","renderPath"]),f=(0,s.useContext)(Sr),d=f.color,p=void 0===d?"currentColor":d,h=f.size,g=f.weight,m=void 0===g?"regular":g,v=f.mirrored,y=void 0!==v&&v,b=Cr(f,["color","size","weight","mirrored"]);return s.createElement("svg",Object.assign({ref:t,xmlns:"http://www.w3.org/2000/svg",width:null!=o?o:h,height:null!=o?o:h,fill:null!=r?r:p,viewBox:"0 0 256 256",transform:a||y?"scale(-1, 1)":void 0},b,c),!!n&&s.createElement("title",null,n),l,s.createElement("rect",{width:"256",height:"256",fill:"none"}),u(null!=i?i:m,null!=r?r:p))}));Or.displayName="IconBase";const Lr=Or;var Pr=new Map;Pr.set("bold",(function(e){return s.createElement(s.Fragment,null,s.createElement("line",{x1:"216",y1:"60",x2:"40",y2:"60",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"24"}),s.createElement("line",{x1:"104",y1:"104",x2:"104",y2:"168",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"24"}),s.createElement("line",{x1:"152",y1:"104",x2:"152",y2:"168",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"24"}),s.createElement("path",{d:"M200,60V208a8,8,0,0,1-8,8H64a8,8,0,0,1-8-8V60",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"24"}),s.createElement("path",{d:"M168,60V36a16,16,0,0,0-16-16H104A16,16,0,0,0,88,36V60",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"24"}))})),Pr.set("duotone",(function(e){return s.createElement(s.Fragment,null,s.createElement("path",{d:"M200,56V208a8,8,0,0,1-8,8H64a8,8,0,0,1-8-8V56Z",opacity:"0.2"}),s.createElement("line",{x1:"216",y1:"56",x2:"40",y2:"56",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}),s.createElement("line",{x1:"104",y1:"104",x2:"104",y2:"168",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}),s.createElement("line",{x1:"152",y1:"104",x2:"152",y2:"168",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}),s.createElement("path",{d:"M200,56V208a8,8,0,0,1-8,8H64a8,8,0,0,1-8-8V56",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}),s.createElement("path",{d:"M168,56V40a16,16,0,0,0-16-16H104A16,16,0,0,0,88,40V56",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}))})),Pr.set("fill",(function(){return s.createElement(s.Fragment,null,s.createElement("path",{d:"M216,48H176V40a24.1,24.1,0,0,0-24-24H104A24.1,24.1,0,0,0,80,40v8H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM112,168a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm0-120H96V40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8Z"}))})),Pr.set("light",(function(e){return s.createElement(s.Fragment,null,s.createElement("line",{x1:"216",y1:"56",x2:"40",y2:"56",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"12"}),s.createElement("line",{x1:"104",y1:"104",x2:"104",y2:"168",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"12"}),s.createElement("line",{x1:"152",y1:"104",x2:"152",y2:"168",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"12"}),s.createElement("path",{d:"M200,56V208a8,8,0,0,1-8,8H64a8,8,0,0,1-8-8V56",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"12"}),s.createElement("path",{d:"M168,56V40a16,16,0,0,0-16-16H104A16,16,0,0,0,88,40V56",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"12"}))})),Pr.set("thin",(function(e){return s.createElement(s.Fragment,null,s.createElement("line",{x1:"216",y1:"56",x2:"40",y2:"56",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"8"}),s.createElement("line",{x1:"104",y1:"104",x2:"104",y2:"168",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"8"}),s.createElement("line",{x1:"152",y1:"104",x2:"152",y2:"168",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"8"}),s.createElement("path",{d:"M200,56V208a8,8,0,0,1-8,8H64a8,8,0,0,1-8-8V56",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"8"}),s.createElement("path",{d:"M168,56V40a16,16,0,0,0-16-16H104A16,16,0,0,0,88,40V56",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"8"}))})),Pr.set("regular",(function(e){return s.createElement(s.Fragment,null,s.createElement("line",{x1:"216",y1:"56",x2:"40",y2:"56",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}),s.createElement("line",{x1:"104",y1:"104",x2:"104",y2:"168",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}),s.createElement("line",{x1:"152",y1:"104",x2:"152",y2:"168",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}),s.createElement("path",{d:"M200,56V208a8,8,0,0,1-8,8H64a8,8,0,0,1-8-8V56",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}),s.createElement("path",{d:"M168,56V40a16,16,0,0,0-16-16H104A16,16,0,0,0,88,40V56",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}))}));var Rr=function(e,t){return _r(e,t,Pr)},jr=(0,s.forwardRef)((function(e,t){return s.createElement(Lr,Object.assign({ref:t},e,{renderPath:Rr}))}));jr.displayName="Trash";const Tr=jr;var Ar=new Map;Ar.set("bold",(function(e){return s.createElement(s.Fragment,null,s.createElement("path",{d:"M122.7,25.9,42,42,25.9,122.7a8,8,0,0,0,2.2,7.2L132.5,234.3a7.9,7.9,0,0,0,11.3,0l90.5-90.5a7.9,7.9,0,0,0,0-11.3L129.9,28.1A8,8,0,0,0,122.7,25.9Z",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"24"}),s.createElement("circle",{cx:"84",cy:"84",r:"16"}))})),Ar.set("duotone",(function(e){return s.createElement(s.Fragment,null,s.createElement("path",{d:"M122.7,25.9,42,42,25.9,122.7a8,8,0,0,0,2.2,7.2L132.5,234.3a7.9,7.9,0,0,0,11.3,0l90.5-90.5a7.9,7.9,0,0,0,0-11.3L129.9,28.1A8,8,0,0,0,122.7,25.9Z",opacity:"0.2"}),s.createElement("path",{d:"M122.7,25.9,42,42,25.9,122.7a8,8,0,0,0,2.2,7.2L132.5,234.3a7.9,7.9,0,0,0,11.3,0l90.5-90.5a7.9,7.9,0,0,0,0-11.3L129.9,28.1A8,8,0,0,0,122.7,25.9Z",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}),s.createElement("circle",{cx:"84",cy:"84",r:"12"}))})),Ar.set("fill",(function(){return s.createElement(s.Fragment,null,s.createElement("path",{d:"M240,126.9,135.5,22.4A15.9,15.9,0,0,0,121.1,18L40.4,34.2a7.9,7.9,0,0,0-6.2,6.2L18,121.1a15.9,15.9,0,0,0,4.4,14.4L126.9,240a15.9,15.9,0,0,0,22.6,0L240,149.5a15.9,15.9,0,0,0,0-22.6ZM84,96A12,12,0,1,1,96,84,12,12,0,0,1,84,96Z"}))})),Ar.set("light",(function(e){return s.createElement(s.Fragment,null,s.createElement("path",{d:"M122.7,25.9,42,42,25.9,122.7a8,8,0,0,0,2.2,7.2L132.5,234.3a7.9,7.9,0,0,0,11.3,0l90.5-90.5a7.9,7.9,0,0,0,0-11.3L129.9,28.1A8,8,0,0,0,122.7,25.9Z",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"12"}),s.createElement("circle",{cx:"84",cy:"84",r:"10"}))})),Ar.set("thin",(function(e){return s.createElement(s.Fragment,null,s.createElement("path",{d:"M122.7,25.9,42,42,25.9,122.7a8,8,0,0,0,2.2,7.2L132.5,234.3a7.9,7.9,0,0,0,11.3,0l90.5-90.5a7.9,7.9,0,0,0,0-11.3L129.9,28.1A8,8,0,0,0,122.7,25.9Z",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"8"}),s.createElement("circle",{cx:"84",cy:"84",r:"8"}))})),Ar.set("regular",(function(e){return s.createElement(s.Fragment,null,s.createElement("path",{d:"M122.7,25.9,42,42,25.9,122.7a8,8,0,0,0,2.2,7.2L132.5,234.3a7.9,7.9,0,0,0,11.3,0l90.5-90.5a7.9,7.9,0,0,0,0-11.3L129.9,28.1A8,8,0,0,0,122.7,25.9Z",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}),s.createElement("circle",{cx:"84",cy:"84",r:"12"}))}));var Mr=function(e,t){return _r(e,t,Ar)},Ir=(0,s.forwardRef)((function(e,t){return s.createElement(Lr,Object.assign({ref:t},e,{renderPath:Mr}))}));Ir.displayName="Tag";const Dr=Ir;var Nr=new Map;Nr.set("bold",(function(e){return s.createElement(s.Fragment,null,s.createElement("line",{x1:"96",y1:"108",x2:"160",y2:"108",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"24"}),s.createElement("line",{x1:"96",y1:"148",x2:"116",y2:"148",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"24"}),s.createElement("path",{d:"M156.7,216H48a8,8,0,0,1-8-8V48a8,8,0,0,1,8-8H208a8,8,0,0,1,8,8V156.7a7.9,7.9,0,0,1-2.3,5.6l-51.4,51.4A7.9,7.9,0,0,1,156.7,216Z",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"24"}),s.createElement("polyline",{points:"215.3 156 156 156 156 215.3",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"24"}))})),Nr.set("duotone",(function(e){return s.createElement(s.Fragment,null,s.createElement("polygon",{points:"216 160 160 160 160 216 216 160",opacity:"0.2"}),s.createElement("line",{x1:"96",y1:"96",x2:"160",y2:"96",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}),s.createElement("line",{x1:"96",y1:"128",x2:"160",y2:"128",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}),s.createElement("line",{x1:"96",y1:"160",x2:"128",y2:"160",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}),s.createElement("path",{d:"M156.7,216H48a8,8,0,0,1-8-8V48a8,8,0,0,1,8-8H208a8,8,0,0,1,8,8V156.7a7.9,7.9,0,0,1-2.3,5.6l-51.4,51.4A7.9,7.9,0,0,1,156.7,216Z",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}),s.createElement("polyline",{points:"215.3 160 160 160 160 215.3",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}))})),Nr.set("fill",(function(){return s.createElement(s.Fragment,null,s.createElement("path",{d:"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H156.7a15.9,15.9,0,0,0,11.3-4.7L219.3,168a15.9,15.9,0,0,0,4.7-11.3V48A16,16,0,0,0,208,32ZM96,88h64a8,8,0,0,1,0,16H96a8,8,0,0,1,0-16Zm32,80H96a8,8,0,0,1,0-16h32a8,8,0,0,1,0,16ZM96,136a8,8,0,0,1,0-16h64a8,8,0,0,1,0,16Zm64,68.7V160h44.7Z"}))})),Nr.set("light",(function(e){return s.createElement(s.Fragment,null,s.createElement("line",{x1:"96",y1:"96",x2:"160",y2:"96",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"12"}),s.createElement("line",{x1:"96",y1:"128",x2:"160",y2:"128",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"12"}),s.createElement("line",{x1:"96",y1:"160",x2:"128",y2:"160",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"12"}),s.createElement("path",{d:"M156.7,216H48a8,8,0,0,1-8-8V48a8,8,0,0,1,8-8H208a8,8,0,0,1,8,8V156.7a7.9,7.9,0,0,1-2.3,5.6l-51.4,51.4A7.9,7.9,0,0,1,156.7,216Z",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"12"}),s.createElement("polyline",{points:"215.3 160 160 160 160 215.3",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"12"}))})),Nr.set("thin",(function(e){return s.createElement(s.Fragment,null,s.createElement("line",{x1:"96",y1:"96",x2:"160",y2:"96",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"8"}),s.createElement("line",{x1:"96",y1:"128",x2:"160",y2:"128",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"8"}),s.createElement("line",{x1:"96",y1:"160",x2:"128",y2:"160",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"8"}),s.createElement("path",{d:"M156.7,216H48a8,8,0,0,1-8-8V48a8,8,0,0,1,8-8H208a8,8,0,0,1,8,8V156.7a7.9,7.9,0,0,1-2.3,5.6l-51.4,51.4A7.9,7.9,0,0,1,156.7,216Z",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"8"}),s.createElement("polyline",{points:"215.3 160 160 160 160 215.3",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"8"}))})),Nr.set("regular",(function(e){return s.createElement(s.Fragment,null,s.createElement("line",{x1:"96",y1:"96",x2:"160",y2:"96",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}),s.createElement("line",{x1:"96",y1:"128",x2:"160",y2:"128",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}),s.createElement("line",{x1:"96",y1:"160",x2:"128",y2:"160",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}),s.createElement("path",{d:"M156.7,216H48a8,8,0,0,1-8-8V48a8,8,0,0,1,8-8H208a8,8,0,0,1,8,8V156.7a7.9,7.9,0,0,1-2.3,5.6l-51.4,51.4A7.9,7.9,0,0,1,156.7,216Z",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}),s.createElement("polyline",{points:"215.3 160 160 160 160 215.3",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}))}));var Fr=function(e,t){return _r(e,t,Nr)},zr=(0,s.forwardRef)((function(e,t){return s.createElement(Lr,Object.assign({ref:t},e,{renderPath:Fr}))}));zr.displayName="Note";const Br=zr;function $r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Wr(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:0,n=(Qr[e[t+0]]+Qr[e[t+1]]+Qr[e[t+2]]+Qr[e[t+3]]+"-"+Qr[e[t+4]]+Qr[e[t+5]]+"-"+Qr[e[t+6]]+Qr[e[t+7]]+"-"+Qr[e[t+8]]+Qr[e[t+9]]+"-"+Qr[e[t+10]]+Qr[e[t+11]]+Qr[e[t+12]]+Qr[e[t+13]]+Qr[e[t+14]]+Qr[e[t+15]]).toLowerCase();if(!Zr(n))throw TypeError("Stringified UUID is invalid");return n}(r)};let to=(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce(((e,t)=>e+((t&=63)<36?t.toString(36):t<62?(t-26).toString(36).toUpperCase():t>62?"-":"_")),"");function no(e){var t=e.startContainer.nodeValue,n=e.endContainer.nodeValue,r=!!e.toString().match(/[\u1C88\u3131-\uD79D]/gi),o=r?e.startOffset:oo(e.startOffset,!1,t),i=r?e.endOffset:oo(e.endOffset,!0,n);try{e.setStart(e.startContainer,o),e.setEnd(e.endContainer,i)}catch(e){console.warn("Unable to snap selection to the next word")}}var ro=function(e){return!!e&&/\u2014|\u2013|,|\s/.test(e)};function oo(e,t,n){if(!n)return e;var r=n.split(""),o=e;if(t){if(ro(r[o-1]))return o-1;for(;o0;){if(ro(r[o-1]))return o;o--}}return o}function io(e){return function(e){if(Array.isArray(e))return ao(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return ao(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ao(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ao(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0,o=t.selection,i=o.range,a=o.selection,no(i),l=eo(),s=rr(i),fr(s)){e.next=9;break}return e.abrupt("return",{errorMessage:"Highlight is too long"});case 9:if(a.isCollapsed||a.collapseToStart(),u=[],t.annotation&&u.push(t.annotation),r&&(t.selection.overlapHighlights.forEach((function(e){var n=t.existingHighlights.find((function(t){return t.id===e})),r=null==n?void 0:n.annotation;r&&u.push(r)})),qr(t.selection.overlapHighlights,t.highlightStartEndOffsets)),c=nr(s,l,u.length>0),f={prefix:c.prefix,suffix:c.suffix,quote:c.quote,id:l,shortId:to(8),patch:s,annotation:u.length>0?u.join("\n"):void 0,articleId:t.articleId,highlightPositionPercent:t.highlightPositionPercent,highlightPositionAnchorIndex:t.highlightPositionAnchorIndex},p=t.existingHighlights,!r){e.next=23;break}return e.next=19,n.mergeHighlightMutation(so(so({},f),{},{overlapHighlightIdList:t.selection.overlapHighlights}));case 19:d=e.sent,p=t.existingHighlights.filter((function(e){return!t.selection.overlapHighlights.includes(e.id)})),e.next=26;break;case 23:return e.next=25,n.createHighlightMutation(f);case 25:d=e.sent;case 26:if(!d){e.next=31;break}return h=[].concat(io(p),[d]),e.abrupt("return",{highlights:h,newHighlightIndex:h.length>0?h.length-1:void 0});case 31:return e.abrupt("return",{highlights:t.existingHighlights,errorMessage:"Could not create highlight"});case 32:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var go=new WeakMap,mo=new WeakMap,vo={},yo=0,bo=function(e,t,n){void 0===t&&(t=function(e){return"undefined"==typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body}(e)),void 0===n&&(n="data-aria-hidden");var r=Array.isArray(e)?e:[e];vo[n]||(vo[n]=new WeakMap);var o=vo[n],i=[],a=new Set,l=function(e){e&&!a.has(e)&&(a.add(e),l(e.parentNode))};r.forEach(l);var s=function(e){!e||r.indexOf(e)>=0||Array.prototype.forEach.call(e.children,(function(e){if(a.has(e))s(e);else{var t=e.getAttribute("aria-hidden"),r=null!==t&&"false"!==t,l=(go.get(e)||0)+1,u=(o.get(e)||0)+1;go.set(e,l),o.set(e,u),i.push(e),1===l&&r&&mo.set(e,!0),1===u&&e.setAttribute(n,"true"),r||e.setAttribute("aria-hidden","true")}}))};return s(t),a.clear(),yo++,function(){i.forEach((function(e){var t=go.get(e)-1,r=o.get(e)-1;go.set(e,t),o.set(e,r),t||(mo.has(e)||e.removeAttribute("aria-hidden"),mo.delete(e)),r||e.removeAttribute(n)})),--yo||(go=new WeakMap,go=new WeakMap,mo=new WeakMap,vo={})}},wo=function(){return wo=Object.assign||function(e){for(var t,n=1,r=arguments.length;nr[2])return!0}n=n.parentNode}while(n&&n!==document.body);return!1},Fo=function(e,t){return"v"===e?function(e){var t=window.getComputedStyle(e);return"hidden"!==t.overflowY&&!(t.overflowY===t.overflowX&&"visible"===t.overflowY)}(t):function(e){var t=window.getComputedStyle(e);return"range"===e.type||"hidden"!==t.overflowX&&!(t.overflowY===t.overflowX&&"visible"===t.overflowX)}(t)},zo=function(e,t){return"v"===e?function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]}(t):function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(t)},Bo=!1;if("undefined"!=typeof window)try{var $o=Object.defineProperty({},"passive",{get:function(){return Bo=!0,!0}});window.addEventListener("test",$o,$o),window.removeEventListener("test",$o,$o)}catch(e){Bo=!1}var Wo=!!Bo&&{passive:!1},Ho=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Uo=function(e){return[e.deltaX,e.deltaY]},Vo=function(e){return e&&"current"in e?e.current:e},qo=function(e){return"\n .block-interactivity-"+e+" {pointer-events: none;}\n .allow-interactivity-"+e+" {pointer-events: all;}\n"},Ko=0,Go=[];const Xo=(Yo=function(e){var t=s.useRef([]),n=s.useRef([0,0]),r=s.useRef(),o=s.useState(Ko++)[0],i=s.useState((function(){return Ro()}))[0],a=s.useRef(e);s.useEffect((function(){a.current=e}),[e]),s.useEffect((function(){if(e.inert){document.body.classList.add("block-interactivity-"+o);var t=[e.lockRef.current].concat((e.shards||[]).map(Vo)).filter(Boolean);return t.forEach((function(e){return e.classList.add("allow-interactivity-"+o)})),function(){document.body.classList.remove("block-interactivity-"+o),t.forEach((function(e){return e.classList.remove("allow-interactivity-"+o)}))}}}),[e.inert,e.lockRef.current,e.shards]);var l=s.useCallback((function(e,t){if("touches"in e&&2===e.touches.length)return!a.current.allowPinchZoom;var o,i=Ho(e),l=n.current,s="deltaX"in e?e.deltaX:l[0]-i[0],u="deltaY"in e?e.deltaY:l[1]-i[1],c=e.target,f=Math.abs(s)>Math.abs(u)?"h":"v",d=No(f,c);if(!d)return!0;if(d?o=f:(o="v"===f?"h":"v",d=No(f,c)),!d)return!1;if(!r.current&&"changedTouches"in e&&(s||u)&&(r.current=o),!o)return!0;var p=r.current||o;return function(e,t,n,r,o){var i=r,a=n.target,l=t.contains(a),s=!1,u=i>0,c=0,f=0;do{var d=zo(e,a),p=d[0],h=d[1]-d[2]-p;(p||h)&&Fo(e,a)&&(c+=h,f+=p),a=a.parentNode}while(!l&&a!==document.body||l&&(t.contains(a)||t===a));return(u&&(0===c||!1)||!u&&(0===f||!1))&&(s=!0),s}(p,t,e,"h"===p?s:u)}),[]),u=s.useCallback((function(e){var n=e;if(Go.length&&Go[Go.length-1]===i){var r="deltaY"in n?Uo(n):Ho(n),o=t.current.filter((function(e){return e.name===n.type&&e.target===n.target&&function(e,t){return e[0]===t[0]&&e[1]===t[1]}(e.delta,r)}))[0];if(o&&o.should)n.preventDefault();else if(!o){var s=(a.current.shards||[]).map(Vo).filter(Boolean).filter((function(e){return e.contains(n.target)}));(s.length>0?l(n,s[0]):!a.current.noIsolation)&&n.preventDefault()}}}),[]),c=s.useCallback((function(e,n,r,o){var i={name:e,delta:n,target:r,should:o};t.current.push(i),setTimeout((function(){t.current=t.current.filter((function(e){return e!==i}))}),1)}),[]),f=s.useCallback((function(e){n.current=Ho(e),r.current=void 0}),[]),d=s.useCallback((function(t){c(t.type,Uo(t),t.target,l(t,e.lockRef.current))}),[]),p=s.useCallback((function(t){c(t.type,Ho(t),t.target,l(t,e.lockRef.current))}),[]);s.useEffect((function(){return Go.push(i),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:p}),document.addEventListener("wheel",u,Wo),document.addEventListener("touchmove",u,Wo),document.addEventListener("touchstart",f,Wo),function(){Go=Go.filter((function(e){return e!==i})),document.removeEventListener("wheel",u,Wo),document.removeEventListener("touchmove",u,Wo),document.removeEventListener("touchstart",f,Wo)}}),[]);var h=e.removeScrollBar,g=e.inert;return s.createElement(s.Fragment,null,g?s.createElement(i,{styles:qo(o)}):null,h?s.createElement(Do,{gapMode:"margin"}):null)},_o.useMedium(Yo),Lo);var Yo,Zo=s.forwardRef((function(e,t){return s.createElement(Oo,wo({},e,{ref:t,sideCar:Xo}))}));Zo.classNames=Oo.classNames;const Qo=Zo;let Jo=0;function ei(){s.useEffect((()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",null!==(e=n[0])&&void 0!==e?e:ti()),document.body.insertAdjacentElement("beforeend",null!==(t=n[1])&&void 0!==t?t:ti()),Jo++,()=>{1===Jo&&document.querySelectorAll("[data-radix-focus-guard]").forEach((e=>e.remove())),Jo--}}),[])}function ti(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}const ni=["a","button","div","h2","h3","img","li","nav","ol","p","span","svg","ul"].reduce(((e,t)=>({...e,[t]:s.forwardRef(((e,n)=>{const{asChild:r,...o}=e,i=r?Se:t;return s.useEffect((()=>{window[Symbol.for("radix-ui")]=!0}),[]),s.createElement(i,ke({},o,{ref:n}))}))})),{}),ri=Boolean(null===globalThis||void 0===globalThis?void 0:globalThis.document)?s.useLayoutEffect:()=>{},oi=e=>{const{present:t,children:n}=e,r=function(e){const[t,n]=s.useState(),r=s.useRef({}),o=s.useRef(e),i=s.useRef("none"),a=e?"mounted":"unmounted",[l,u]=function(e,t){return s.useReducer(((e,n)=>{const r=t[e][n];return null!=r?r:e}),e)}(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return s.useEffect((()=>{const e=ii(r.current);i.current="mounted"===l?e:"none"}),[l]),ri((()=>{const t=r.current,n=o.current;if(n!==e){const r=i.current,a=ii(t);if(e)u("MOUNT");else if("none"===a||"none"===(null==t?void 0:t.display))u("UNMOUNT");else{const e=r!==a;u(n&&e?"ANIMATION_OUT":"UNMOUNT")}o.current=e}}),[e,u]),ri((()=>{if(t){const e=e=>{const n=ii(r.current).includes(e.animationName);e.target===t&&n&&u("ANIMATION_END")},n=e=>{e.target===t&&(i.current=ii(r.current))};return t.addEventListener("animationstart",n),t.addEventListener("animationcancel",e),t.addEventListener("animationend",e),()=>{t.removeEventListener("animationstart",n),t.removeEventListener("animationcancel",e),t.removeEventListener("animationend",e)}}u("ANIMATION_END")}),[t,u]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:s.useCallback((e=>{e&&(r.current=getComputedStyle(e)),n(e)}),[])}}(t),o="function"==typeof n?n({present:r.isPresent}):s.Children.only(n),i=Ee(r.ref,o.ref);return"function"==typeof n||r.isPresent?s.cloneElement(o,{ref:i}):null};function ii(e){return(null==e?void 0:e.animationName)||"none"}function ai(e){const t=s.useRef(e);return s.useEffect((()=>{t.current=e})),s.useMemo((()=>(...e)=>{var n;return null===(n=t.current)||void 0===n?void 0:n.call(t,...e)}),[])}oi.displayName="Presence";const li={bubbles:!1,cancelable:!0},si=s.forwardRef(((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...a}=e,[l,u]=s.useState(null),c=ai(o),f=ai(i),d=s.useRef(null),p=Ee(t,(e=>u(e))),h=s.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;s.useEffect((()=>{if(r){function e(e){if(h.paused||!l)return;const t=e.target;l.contains(t)?d.current=t:di(d.current,{select:!0})}function t(e){!h.paused&&l&&(l.contains(e.relatedTarget)||di(d.current,{select:!0}))}return document.addEventListener("focusin",e),document.addEventListener("focusout",t),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t)}}}),[r,l,h.paused]),s.useEffect((()=>{if(l){pi.add(h);const e=document.activeElement;if(!l.contains(e)){const t=new Event("focusScope.autoFocusOnMount",li);l.addEventListener("focusScope.autoFocusOnMount",c),l.dispatchEvent(t),t.defaultPrevented||(function(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(di(r,{select:t}),document.activeElement!==n)return}(ui(l).filter((e=>"A"!==e.tagName)),{select:!0}),document.activeElement===e&&di(l))}return()=>{l.removeEventListener("focusScope.autoFocusOnMount",c),setTimeout((()=>{const t=new Event("focusScope.autoFocusOnUnmount",li);l.addEventListener("focusScope.autoFocusOnUnmount",f),l.dispatchEvent(t),t.defaultPrevented||di(null!=e?e:document.body,{select:!0}),l.removeEventListener("focusScope.autoFocusOnUnmount",f),pi.remove(h)}),0)}}}),[l,c,f,h]);const g=s.useCallback((e=>{if(!n&&!r)return;if(h.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,o=document.activeElement;if(t&&o){const t=e.currentTarget,[r,i]=function(e){const t=ui(e);return[ci(t,e),ci(t.reverse(),e)]}(t);r&&i?e.shiftKey||o!==i?e.shiftKey&&o===r&&(e.preventDefault(),n&&di(i,{select:!0})):(e.preventDefault(),n&&di(r,{select:!0})):o===t&&e.preventDefault()}}),[n,r,h.paused]);return s.createElement(ni.div,ke({tabIndex:-1},a,{ref:p,onKeyDown:g}))}));function ui(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function ci(e,t){for(const n of e)if(!fi(n,{upTo:t}))return n}function fi(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function di(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&function(e){return e instanceof HTMLInputElement&&"select"in e}(e)&&t&&e.select()}}const pi=function(){let e=[];return{add(t){const n=e[0];t!==n&&(null==n||n.pause()),e=hi(e,t),e.unshift(t)},remove(t){var n;e=hi(e,t),null===(n=e[0])||void 0===n||n.resume()}}}();function hi(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}let gi,mi=0;function vi(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(null==e||e(r),!1===n||!r.defaultPrevented)return null==t?void 0:t(r)}}const yi=s.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),bi=s.forwardRef(((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:a,onDismiss:l,...u}=e,c=s.useContext(yi),[f,d]=s.useState(null),[,p]=s.useState({}),h=Ee(t,(e=>d(e))),g=Array.from(c.layers),[m]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),v=g.indexOf(m),y=f?g.indexOf(f):-1,b=c.layersWithOutsidePointerEventsDisabled.size>0,w=y>=v,x=function(e){const t=ai((e=>{const t=e.target,n=[...c.branches].some((e=>e.contains(t)));w&&!n&&(null==o||o(e),null==a||a(e),e.defaultPrevented||null==l||l())})),n=s.useRef(!1);return s.useEffect((()=>{const e=e=>{e.target&&!n.current&&xi("dismissableLayer.pointerDownOutside",t,{originalEvent:e}),n.current=!1},r=window.setTimeout((()=>{document.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(r),document.removeEventListener("pointerdown",e)}}),[t]),{onPointerDownCapture:()=>n.current=!0}}(),E=function(e){const t=ai((e=>{const t=e.target;[...c.branches].some((e=>e.contains(t)))||(null==i||i(e),null==a||a(e),e.defaultPrevented||null==l||l())})),n=s.useRef(!1);return s.useEffect((()=>{const e=e=>{e.target&&!n.current&&xi("dismissableLayer.focusOutside",t,{originalEvent:e})};return document.addEventListener("focusin",e),()=>document.removeEventListener("focusin",e)}),[t]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}();return function(e){const t=ai((e=>{y===c.layers.size-1&&(null==r||r(e),e.defaultPrevented||null==l||l())}));s.useEffect((()=>{const e=e=>{"Escape"===e.key&&t(e)};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)}),[t])}(),function({disabled:e}){const t=s.useRef(!1);ri((()=>{if(e){function n(){mi--,0===mi&&(document.body.style.pointerEvents=gi)}function r(e){t.current="mouse"!==e.pointerType}return 0===mi&&(gi=document.body.style.pointerEvents),document.body.style.pointerEvents="none",mi++,document.addEventListener("pointerup",r),()=>{t.current?document.addEventListener("click",n,{once:!0}):n(),document.removeEventListener("pointerup",r)}}}),[e])}({disabled:n}),s.useEffect((()=>{f&&(n&&c.layersWithOutsidePointerEventsDisabled.add(f),c.layers.add(f),wi())}),[f,n,c]),s.useEffect((()=>()=>{f&&(c.layers.delete(f),c.layersWithOutsidePointerEventsDisabled.delete(f),wi())}),[f,c]),s.useEffect((()=>{const e=()=>p({});return document.addEventListener("dismissableLayer.update",e),()=>document.removeEventListener("dismissableLayer.update",e)}),[]),s.createElement(ni.div,ke({},u,{ref:h,style:{pointerEvents:b?w?"auto":"none":void 0,...e.style},onFocusCapture:vi(e.onFocusCapture,E.onFocusCapture),onBlurCapture:vi(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:vi(e.onPointerDownCapture,x.onPointerDownCapture)}))}));function wi(){const e=new Event("dismissableLayer.update");document.dispatchEvent(e)}function xi(e,t,n){const r=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});return t&&r.addEventListener(e,t,{once:!0}),!r.dispatchEvent(o)}function Ei({prop:e,defaultProp:t,onChange:n=(()=>{})}){const[r,o]=function({defaultProp:e,onChange:t}){const n=s.useState(e),[r]=n,o=s.useRef(r),i=ai(t);return s.useEffect((()=>{o.current!==r&&(i(r),o.current=r)}),[r,o,i]),n}({defaultProp:t,onChange:n}),i=void 0!==e,a=i?e:r,l=ai(n);return[a,s.useCallback((t=>{if(i){const n=t,r="function"==typeof t?n(e):t;r!==e&&l(r)}else o(t)}),[i,e,o,l])]}const ki=u["useId".toString()]||(()=>{});let Si=0;function _i(e){const[t,n]=s.useState(ki());return ri((()=>{e||n((e=>null!=e?e:String(Si++)))}),[e]),e||(t?`radix-${t}`:"")}function Ci(e,t=[]){let n=[];const r=()=>{const t=n.map((e=>s.createContext(e)));return function(n){const r=(null==n?void 0:n[e])||t;return s.useMemo((()=>({[`__scope${e}`]:{...n,[e]:r}})),[n,r])}};return r.scopeName=e,[function(t,r){const o=s.createContext(r),i=n.length;function a(t){const{scope:n,children:r,...a}=t,l=(null==n?void 0:n[e][i])||o,u=s.useMemo((()=>a),Object.values(a));return s.createElement(l.Provider,{value:u},r)}return n=[...n,r],a.displayName=t+"Provider",[a,function(n,a){const l=(null==a?void 0:a[e][i])||o,u=s.useContext(l);if(u)return u;if(void 0!==r)return r;throw new Error(`\`${n}\` must be used within \`${t}\``)}]},Oi(r,...t)]}function Oi(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(e){const r=n.reduce(((t,{useScope:n,scopeName:r})=>({...t,...n(e)[`__scope${r}`]})),{});return s.useMemo((()=>({[`__scope${t.scopeName}`]:r})),[r])}};return n.scopeName=t.scopeName,n}const[Li,Pi]=Ci("Dialog"),[Ri,ji]=Li("Dialog"),Ti=s.forwardRef(((e,t)=>{const{forceMount:n,...r}=e,o=ji("DialogOverlay",e.__scopeDialog);return o.modal?s.createElement(oi,{present:n||o.open},s.createElement(Ai,ke({},r,{ref:t}))):null})),Ai=s.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=ji("DialogOverlay",n);return s.createElement(Qo,{as:Se,allowPinchZoom:o.allowPinchZoom,shards:[o.contentRef]},s.createElement(ni.div,ke({"data-state":Fi(o.open)},r,{ref:t,style:{pointerEvents:"auto",...r.style}})))})),Mi=s.forwardRef(((e,t)=>{const{forceMount:n,...r}=e,o=ji("DialogContent",e.__scopeDialog);return s.createElement(oi,{present:n||o.open},o.modal?s.createElement(Ii,ke({},r,{ref:t})):s.createElement(Di,ke({},r,{ref:t})))})),Ii=s.forwardRef(((e,t)=>{const n=ji("DialogContent",e.__scopeDialog),r=s.useRef(null),o=Ee(t,n.contentRef,r);return s.useEffect((()=>{const e=r.current;if(e)return bo(e)}),[]),s.createElement(Ni,ke({},e,{ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:vi(e.onCloseAutoFocus,(e=>{var t;e.preventDefault(),null===(t=n.triggerRef.current)||void 0===t||t.focus()})),onPointerDownOutside:vi(e.onPointerDownOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey;(2===t.button||n)&&e.preventDefault()})),onFocusOutside:vi(e.onFocusOutside,(e=>e.preventDefault()))}))})),Di=s.forwardRef(((e,t)=>{const n=ji("DialogContent",e.__scopeDialog),r=s.useRef(!1);return s.createElement(Ni,ke({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{var o,i;null===(o=e.onCloseAutoFocus)||void 0===o||o.call(e,t),t.defaultPrevented||(r.current||null===(i=n.triggerRef.current)||void 0===i||i.focus(),t.preventDefault()),r.current=!1},onInteractOutside:t=>{var o,i;null===(o=e.onInteractOutside)||void 0===o||o.call(e,t),t.defaultPrevented||(r.current=!0);const a=t.target;(null===(i=n.triggerRef.current)||void 0===i?void 0:i.contains(a))&&t.preventDefault()}}))})),Ni=s.forwardRef(((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,...a}=e,l=ji("DialogContent",n),u=Ee(t,s.useRef(null));return ei(),s.createElement(s.Fragment,null,s.createElement(si,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i},s.createElement(bi,ke({role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":Fi(l.open)},a,{ref:u,onDismiss:()=>l.onOpenChange(!1)}))),!1)}));function Fi(e){return e?"open":"closed"}const[zi,Bi]=function(e,t){const n=s.createContext(t);function r(e){const{children:t,...r}=e,o=s.useMemo((()=>r),Object.values(r));return s.createElement(n.Provider,{value:o},t)}return r.displayName=e+"Provider",[r,function(r){const o=s.useContext(n);if(o)return o;if(void 0!==t)return t;throw new Error(`\`${r}\` must be used within \`${e}\``)}]}("DialogTitleWarning",{contentName:"DialogContent",titleName:"DialogTitle",docsSlug:"dialog"}),$i=Ti,Wi=Mi;var Hi=new Map;Hi.set("bold",(function(e){return s.createElement(s.Fragment,null,s.createElement("line",{x1:"200",y1:"56",x2:"56",y2:"200",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"24"}),s.createElement("line",{x1:"200",y1:"200",x2:"56",y2:"56",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"24"}))})),Hi.set("duotone",(function(e){return s.createElement(s.Fragment,null,s.createElement("line",{x1:"200",y1:"56",x2:"56",y2:"200",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}),s.createElement("line",{x1:"200",y1:"200",x2:"56",y2:"56",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}))})),Hi.set("fill",(function(){return s.createElement(s.Fragment,null,s.createElement("path",{d:"M139.3,128l66.4-66.3a8.1,8.1,0,0,0-11.4-11.4L128,116.7,61.7,50.3A8.1,8.1,0,0,0,50.3,61.7L116.7,128,50.3,194.3a8.1,8.1,0,0,0,0,11.4,8.2,8.2,0,0,0,11.4,0L128,139.3l66.3,66.4a8.2,8.2,0,0,0,11.4,0,8.1,8.1,0,0,0,0-11.4Z"}))})),Hi.set("light",(function(e){return s.createElement(s.Fragment,null,s.createElement("line",{x1:"200",y1:"56",x2:"56",y2:"200",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"12"}),s.createElement("line",{x1:"200",y1:"200",x2:"56",y2:"56",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"12"}))})),Hi.set("thin",(function(e){return s.createElement(s.Fragment,null,s.createElement("line",{x1:"200",y1:"56",x2:"56",y2:"200",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"8"}),s.createElement("line",{x1:"200",y1:"200",x2:"56",y2:"56",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"8"}))})),Hi.set("regular",(function(e){return s.createElement(s.Fragment,null,s.createElement("line",{x1:"200",y1:"56",x2:"56",y2:"200",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}),s.createElement("line",{x1:"200",y1:"200",x2:"56",y2:"56",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}))}));var Ui=function(e,t){return _r(e,t,Hi)},Vi=(0,s.forwardRef)((function(e,t){return s.createElement(Lr,Object.assign({ref:t},e,{renderPath:Ui}))}));Vi.displayName="X";const qi=Vi;var Ki,Gi,Xi=pe((e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:a=!0,allowPinchZoom:l}=e,u=s.useRef(null),c=s.useRef(null),[f=!1,d]=Ei({prop:r,defaultProp:o,onChange:i});return s.createElement(Ri,{scope:t,triggerRef:u,contentRef:c,contentId:_i(),titleId:_i(),descriptionId:_i(),open:f,onOpenChange:d,onOpenToggle:s.useCallback((()=>d((e=>!e))),[d]),modal:a,allowPinchZoom:l},n)}),{}),Yi=me({"0%":{opacity:0},"100%":{opacity:1}}),Zi=pe($i,{backgroundColor:"$overlay",width:"100vw",height:"100vh",position:"fixed",inset:0,"@media (prefers-reduced-motion: no-preference)":{animation:"".concat(Yi," 150ms cubic-bezier(0.16, 1, 0.3, 1)")}}),Qi=pe(Wi,{backgroundColor:"$grayBg",borderRadius:6,boxShadow:he.shadows.cardBoxShadow.toString(),position:"fixed","&:focus":{outline:"none"},zIndex:"1"}),Ji=pe(Qi,{top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:"90vw",maxWidth:"450px",maxHeight:"85vh","@smDown":{maxWidth:"95%",width:"95%"},zIndex:"10"}),ea=function(e){return(0,De.jsxs)(We,{distribution:"between",alignment:"center",css:{height:"68px",width:"100%"},children:[(0,De.jsx)(Hn,{style:"modalHeadline",children:e.title}),(0,De.jsx)(Er,{css:{ml:"auto"},style:"ghost",onClick:function(){e.onOpenChange(!1)},children:(0,De.jsx)(qi,{size:24,color:he.colors.textNonessential.toString()})})]})},ta=function(e){return(0,De.jsxs)(We,{alignment:"center",distribution:"end",css:{gap:"10px",width:"100%",height:"80px","input:focus":{outline:"5px auto -webkit-focus-ring-color"},"button:focus":{outline:"5px auto -webkit-focus-ring-color"}},children:[(0,De.jsx)(Er,{style:"ctaOutlineYellow",type:"button",onClick:function(t){t.preventDefault(),e.onOpenChange(!1)},children:"Cancel"}),(0,De.jsx)(Er,{style:"ctaDarkYellow",children:e.acceptButtonLabel||"Submit"})]})},na=pe("textarea",{outline:"none",border:"none",overflow:"auto",resize:"none",background:"unset",color:"$grayText",fontSize:"$3",fontFamily:"inter",lineHeight:"1.35","&::placeholder":{opacity:.7}});function ra(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function oa(e,t,n,r,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void n(e)}l.done?t(s):Promise.resolve(s).then(r,o)}function ia(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){oa(i,r,o,a,l,"next",e)}function l(e){oa(i,r,o,a,l,"throw",e)}a(void 0)}))}}function aa(e){return la.apply(this,arguments)}function la(){return la=ia(regeneratorRuntime.mark((function e(t){var n,r,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=(0,rt.gql)(Ki||(Ki=ra(["\n mutation UpdateHighlight($input: UpdateHighlightInput!) {\n updateHighlight(input: $input) {\n ... on UpdateHighlightSuccess {\n highlight {\n id\n }\n }\n\n ... on UpdateHighlightError {\n errorCodes\n }\n }\n }\n "]))),e.prev=1,e.next=4,bn(n,{input:t});case 4:return r=e.sent,o=r,e.abrupt("return",null==o?void 0:o.updateHighlight.highlight.id);case 9:return e.prev=9,e.t0=e.catch(1),e.abrupt("return",void 0);case 12:case"end":return e.stop()}}),e,null,[[1,9]])}))),la.apply(this,arguments)}pe(na,{borderRadius:"6px",border:"1px solid $grayBorder",p:"$3",fontSize:"$1"}),function(e){e[e.SET_KEY_DOWN=0]="SET_KEY_DOWN",e[e.SET_KEY_UP=1]="SET_KEY_UP"}(Gi||(Gi={}));let sa,ua,ca,fa={data:""},da=e=>"object"==typeof window?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||fa,pa=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,ha=/\/\*[^]*?\*\/|\s\s+|\n/g,ga=(e,t)=>{let n="",r="",o="";for(let i in e){let a=e[i];"@"==i[0]?"i"==i[1]?n=i+" "+a+";":r+="f"==i[1]?ga(a,i):i+"{"+ga(a,"k"==i[1]?"":t)+"}":"object"==typeof a?r+=ga(a,t?t.replace(/([^,])+/g,(e=>i.replace(/(^:.*)|([^,])+/g,(t=>/&/.test(t)?t.replace(/&/g,e):e?e+" "+t:t)))):i):null!=a&&(i=/^--/.test(i)?i:i.replace(/[A-Z]/g,"-$&").toLowerCase(),o+=ga.p?ga.p(i,a):i+":"+a+";")}return n+(t&&o?t+"{"+o+"}":o)+r},ma={},va=e=>{if("object"==typeof e){let t="";for(let n in e)t+=n+va(e[n]);return t}return e},ya=(e,t,n,r,o)=>{let i=va(e),a=ma[i]||(ma[i]=(e=>{let t=0,n=11;for(;t>>0;return"go"+n})(i));if(!ma[a]){let t=i!==e?e:(e=>{let t,n=[{}];for(;t=pa.exec(e.replace(ha,""));)t[4]?n.shift():t[3]?n.unshift(n[0][t[3]]=n[0][t[3]]||{}):n[0][t[1]]=t[2];return n[0]})(e);ma[a]=ga(o?{["@keyframes "+a]:t}:t,n?"":"."+a)}return((e,t,n)=>{-1==t.data.indexOf(e)&&(t.data=n?e+t.data:t.data+e)})(ma[a],t,r),a},ba=(e,t,n)=>e.reduce(((e,r,o)=>{let i=t[o];if(i&&i.call){let e=i(n),t=e&&e.props&&e.props.className||/^go/.test(e)&&e;i=t?"."+t:e&&"object"==typeof e?e.props?"":ga(e,""):!1===e?"":e}return e+r+(null==i?"":i)}),"");function wa(e){let t=this||{},n=e.call?e(t.p):e;return ya(n.unshift?n.raw?ba(n,[].slice.call(arguments,1),t.p):n.reduce(((e,n)=>Object.assign(e,n&&n.call?n(t.p):n)),{}):n,da(t.target),t.g,t.o,t.k)}function xa(){return xa=Object.assign||function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n2&&void 0!==arguments[2])||arguments[2],r=(0,s.useCallback)((function(r){var o=r.key.toLowerCase();if(e&&"enter"===o){if(n&&!r.metaKey&&!r.ctrlKey)return;e()}else t&&"escape"===o&&t()}),[t,e]);(0,s.useEffect)((function(){if("undefined"!=typeof window)return window.addEventListener("keydown",r),function(){window.removeEventListener("keydown",r)}}),[r])}((function(){h()}),void 0,!0),e.highlight&&(c=null===(r=e.highlight)||void 0===r?void 0:r.updatedAt,f="Updated ",(d=Math.ceil((new Date).valueOf()-new Date(c).valueOf())/1e3)<60?"".concat(f," a few seconds ago"):d<3600?"".concat(f," ").concat(Math.floor(d/60)," minutes ago"):d<86400?"".concat(f," ").concat(Math.floor(d/3600)," hours ago"):d<604800?"".concat(f," ").concat(Math.floor(d/86400)," days ago"):d<2592e3?"".concat(f," ").concat(Math.floor(d/604800)," weeks ago"):d<31536e3?"".concat(f," ").concat(Math.floor(d/2592e3)," months ago"):d<31536e4?"".concat(f," ").concat(Math.floor(d/31536e3)," years ago"):d<31536e5&&"".concat(f," ").concat(Math.floor(d/31536e4)," decades ago"));var c,f,d,p=(0,s.useCallback)((function(e){u(e.target.value)}),[u]),h=(0,s.useCallback)(tl(regeneratorRuntime.mark((function t(){var n,r,o;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(l==(null===(n=e.highlight)||void 0===n?void 0:n.annotation)||null===(r=e.highlight)||void 0===r||!r.id){t.next=5;break}return t.next=3,aa({highlightId:null===(o=e.highlight)||void 0===o?void 0:o.id,annotation:l});case 3:t.sent?(e.onUpdate(Qa(Qa({},e.highlight),{},{annotation:l})),e.onOpenChange(!1)):Ya("Error updating your note",{position:"bottom-right"});case 5:if(e.highlight||!e.createHighlightForNote){t.next=12;break}return t.next=8,e.createHighlightForNote(l);case 8:t.sent?e.onOpenChange(!0):Ya("Error saving highlight",{position:"bottom-right"}),t.next=13;break;case 12:e.onOpenChange(!1);case 13:case"end":return t.stop()}}),t)}))),[l,e]);return(0,De.jsxs)(Xi,{defaultOpen:!0,onOpenChange:e.onOpenChange,children:[(0,De.jsx)(Zi,{}),(0,De.jsx)(Ji,{css:{bg:"$grayBg",px:"24px"},onPointerDownOutside:function(e){e.preventDefault()},children:(0,De.jsx)("form",{onSubmit:function(t){t.preventDefault(),h(),e.onOpenChange(!1)},children:(0,De.jsxs)(He,{children:[(0,De.jsx)(ea,{title:"Notes",onOpenChange:e.onOpenChange}),(0,De.jsx)(na,{css:{mt:"16px",p:"6px",width:"100%",height:"248px",fontSize:"14px",border:"1px solid $textNonessential",borderRadius:"6px"},autoFocus:!0,placeholder:"Add your note here",value:l,onChange:p,maxLength:4e3}),(0,De.jsx)(ta,{onOpenChange:e.onOpenChange,acceptButtonLabel:"Save"})]})})})]})}function ol(e){return(0,De.jsx)("svg",{width:e.size,height:e.size,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,De.jsx)("path",{d:"M11.6663 8.33333L11.4163 14.1667M8.58301 14.1667L8.33301 8.33333M4.99967 5L5.70854 15.633C5.77858 16.6836 6.65119 17.5 7.70411 17.5H12.2952C13.3482 17.5 14.2208 16.6836 14.2908 15.633L14.9997 5M4.99967 5H7.49967M4.99967 5H3.33301M14.9997 5H16.6663M14.9997 5H12.4997M12.4997 5V4.5C12.4997 3.39543 11.6042 2.5 10.4997 2.5H9.49967C8.3951 2.5 7.49967 3.39543 7.49967 4.5V5M12.4997 5H7.49967",stroke:e.strokeColor,strokeWidth:"1",strokeLinecap:"round",strokeLinejoin:"round"})})}function il(e,t,n){return Math.min(Math.max(e,n),t)}class al extends Error{constructor(e){super(`Failed to parse color: "${e}"`)}}var ll=al;function sl(e){if("string"!=typeof e)throw new ll(e);if("transparent"===e.trim().toLowerCase())return[0,0,0,0];let t=e.trim();t=ml.test(e)?function(e){const t=e.toLowerCase().trim(),n=cl[function(e){let t=5381,n=e.length;for(;n;)t=33*t^e.charCodeAt(--n);return(t>>>0)%2341}(t)];if(!n)throw new ll(e);return`#${n}`}(e):e;const n=dl.exec(t);if(n){const e=Array.from(n).slice(1);return[...e.slice(0,3).map((e=>parseInt(fl(e,2),16))),parseInt(fl(e[3]||"f",2),16)/255]}const r=pl.exec(t);if(r){const e=Array.from(r).slice(1);return[...e.slice(0,3).map((e=>parseInt(e,16))),parseInt(e[3]||"ff",16)/255]}const o=hl.exec(t);if(o){const e=Array.from(o).slice(1);return[...e.slice(0,3).map((e=>parseInt(e,10))),parseFloat(e[3]||"1")]}const i=gl.exec(t);if(i){const[t,n,r,o]=Array.from(i).slice(1).map(parseFloat);if(il(0,100,n)!==n)throw new ll(e);if(il(0,100,r)!==r)throw new ll(e);return[...yl(t,n,r),o||1]}throw new ll(e)}const ul=e=>parseInt(e.replace(/_/g,""),36),cl="1q29ehhb 1n09sgk7 1kl1ekf_ _yl4zsno 16z9eiv3 1p29lhp8 _bd9zg04 17u0____ _iw9zhe5 _to73___ _r45e31e _7l6g016 _jh8ouiv _zn3qba8 1jy4zshs 11u87k0u 1ro9yvyo 1aj3xael 1gz9zjz0 _3w8l4xo 1bf1ekf_ _ke3v___ _4rrkb__ 13j776yz _646mbhl _nrjr4__ _le6mbhl 1n37ehkb _m75f91n _qj3bzfz 1939yygw 11i5z6x8 _1k5f8xs 1509441m 15t5lwgf _ae2th1n _tg1ugcv 1lp1ugcv 16e14up_ _h55rw7n _ny9yavn _7a11xb_ 1ih442g9 _pv442g9 1mv16xof 14e6y7tu 1oo9zkds 17d1cisi _4v9y70f _y98m8kc 1019pq0v 12o9zda8 _348j4f4 1et50i2o _8epa8__ _ts6senj 1o350i2o 1mi9eiuo 1259yrp0 1ln80gnw _632xcoy 1cn9zldc _f29edu4 1n490c8q _9f9ziet 1b94vk74 _m49zkct 1kz6s73a 1eu9dtog _q58s1rz 1dy9sjiq __u89jo3 _aj5nkwg _ld89jo3 13h9z6wx _qa9z2ii _l119xgq _bs5arju 1hj4nwk9 1qt4nwk9 1ge6wau6 14j9zlcw 11p1edc_ _ms1zcxe _439shk6 _jt9y70f _754zsow 1la40eju _oq5p___ _x279qkz 1fa5r3rv _yd2d9ip _424tcku _8y1di2_ _zi2uabw _yy7rn9h 12yz980_ __39ljp6 1b59zg0x _n39zfzp 1fy9zest _b33k___ _hp9wq92 1il50hz4 _io472ub _lj9z3eo 19z9ykg0 _8t8iu3a 12b9bl4a 1ak5yw0o _896v4ku _tb8k8lv _s59zi6t _c09ze0p 1lg80oqn 1id9z8wb _238nba5 1kq6wgdi _154zssg _tn3zk49 _da9y6tc 1sg7cv4f _r12jvtt 1gq5fmkz 1cs9rvci _lp9jn1c _xw1tdnb 13f9zje6 16f6973h _vo7ir40 _bt5arjf _rc45e4t _hr4e100 10v4e100 _hc9zke2 _w91egv_ _sj2r1kk 13c87yx8 _vqpds__ _ni8ggk8 _tj9yqfb 1ia2j4r4 _7x9b10u 1fc9ld4j 1eq9zldr _5j9lhpx _ez9zl6o _md61fzm".split(" ").reduce(((e,t)=>{const n=ul(t.substring(0,3)),r=ul(t.substring(3)).toString(16);let o="";for(let e=0;e<6-r.length;e++)o+="0";return e[n]=`${o}${r}`,e}),{}),fl=(e,t)=>Array.from(Array(t)).map((()=>e)).join(""),dl=new RegExp(`^#${fl("([a-f0-9])",3)}([a-f0-9])?$`,"i"),pl=new RegExp(`^#${fl("([a-f0-9]{2})",3)}([a-f0-9]{2})?$`,"i"),hl=new RegExp(`^rgba?\\(\\s*(\\d+)\\s*${fl(",\\s*(\\d+)\\s*",2)}(?:,\\s*([\\d.]+))?\\s*\\)$`,"i"),gl=/^hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%(?:\s*,\s*([\d.]+))?\s*\)$/i,ml=/^[a-z]+$/i,vl=e=>Math.round(255*e),yl=(e,t,n)=>{let r=n/100;if(0===t)return[r,r,r].map(vl);const o=(e%360+360)%360/60,i=(1-Math.abs(2*r-1))*(t/100),a=i*(1-Math.abs(o%2-1));let l=0,s=0,u=0;o>=0&&o<1?(l=i,s=a):o>=1&&o<2?(l=a,s=i):o>=2&&o<3?(s=i,u=a):o>=3&&o<4?(s=a,u=i):o>=4&&o<5?(l=a,u=i):o>=5&&o<6&&(l=i,u=a);const c=r-i/2;return[l+c,s+c,u+c].map(vl)};var bl=o(5632);function wl(e){var t=(0,bl.useRouter)(),n=sl(e.color);function r(e){var t=e/255;return t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)}console.log(" -- parsed: ",n,"for",e.color),console.log(" -- parts: ",r(n[0]),r(n[1]),r(n[2]));var o=function(e){if("transparent"===e)return 0;function t(e){const t=e/255;return t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)}const[n,r,o]=sl(e);return.2126*t(n)+.7152*t(r)+.0722*t(o)}(e.color),i=function(e){var t=parseInt(e.substring(1),16),n=t>>16&255,r=t>>8&255,o=255&t;return console.log(" -- ",n,r,o,"for",e),[n,r,o]}(e.color);console.log("luminance",o,"for color: ",e.color);var a=o>.5?"#000000":"#ffffff";return(0,De.jsx)(Er,{style:"plainIcon",onClick:function(n){t.push('/home?q=label:"'.concat(e.text,'"')),n.stopPropagation()},children:(0,De.jsx)(ze,{css:{display:"inline-table",margin:"4px",borderRadius:"4px",fontSize:"12px",fontWeight:"500",padding:"5px 8px 5px 8px",whiteSpace:"nowrap",cursor:"pointer",backgroundClip:"padding-box",color:a,backgroundColor:"rgba(".concat(i,", 0.9)")},children:e.text})})}function xl(e){var t,n=(0,s.useMemo)((function(){return e.highlight.quote.split("\n")}),[e.highlight.quote]),r=pe($e,{margin:"0px 0px 0px 0px",fontSize:"18px",lineHeight:"27px",color:"$grayText",padding:"0px 16px",borderLeft:"2px solid $omnivoreCtaYellow"});return(0,De.jsx)(He,{css:{width:"100%",boxSizing:"border-box"},children:(0,De.jsxs)(r,{onClick:function(){e.scrollToHighlight&&e.scrollToHighlight(e.highlight.id)},children:[(0,De.jsx)(ze,{css:{p:"1px",borderRadius:"2px"},children:n.map((function(e,t){return(0,De.jsxs)(s.Fragment,{children:[e,t!==n.length-1&&(0,De.jsxs)(De.Fragment,{children:[(0,De.jsx)("br",{}),(0,De.jsx)("br",{})]})]},t)}))}),(0,De.jsx)(Fe,{css:{display:"block",pt:"16px"},children:null===(t=e.highlight.labels)||void 0===t?void 0:t.map((function(e,t){var n=e.name,r=e.color;return(0,De.jsx)(wl,{text:n||"",color:r},t)}))})]})})}function El(e){var t;return(0,De.jsxs)(Xi,{defaultOpen:!0,onOpenChange:e.onOpenChange,children:[(0,De.jsx)(Zi,{}),(0,De.jsx)(Ji,{css:{bg:"$grayBg",maxWidth:"20em",zIndex:"20"},children:(0,De.jsxs)(He,{alignment:"center",distribution:"center",css:{p:"$2"},children:[e.icon?e.icon:null,e.richMessage?e.richMessage:(0,De.jsx)(Hn,{children:e.message}),(0,De.jsxs)(We,{distribution:"center",css:{pt:"$2"},children:[(0,De.jsx)(Er,{style:"ctaOutlineYellow",css:{mr:"$2"},onClick:function(){return e.onOpenChange(!1)},onKeyDown:function(t){"Enter"===t.key&&(t.preventDefault(),e.onOpenChange(!1))},children:e.cancelButtonLabel?e.cancelButtonLabel:"Cancel"}),(0,De.jsx)(Er,{style:"ctaDarkYellow",onClick:e.onAccept,onKeyDown:function(t){"Enter"===t.key&&(t.preventDefault(),e.onAccept())},children:null!==(t=e.acceptButtonLabel)&&void 0!==t?t:"Confirm"})]})]})})]})}var kl=new Map;kl.set("bold",(function(){return s.createElement(s.Fragment,null,s.createElement("circle",{cx:"128",cy:"128",r:"16"}),s.createElement("circle",{cx:"64",cy:"128",r:"16"}),s.createElement("circle",{cx:"192",cy:"128",r:"16"}))})),kl.set("duotone",(function(){return s.createElement(s.Fragment,null,s.createElement("circle",{cx:"128",cy:"128",r:"12"}),s.createElement("circle",{cx:"192",cy:"128",r:"12"}),s.createElement("circle",{cx:"64",cy:"128",r:"12"}))})),kl.set("fill",(function(){return s.createElement(s.Fragment,null,s.createElement("path",{d:"M140,128a12,12,0,1,1-12-12A12,12,0,0,1,140,128Zm52-12a12,12,0,1,0,12,12A12,12,0,0,0,192,116ZM64,116a12,12,0,1,0,12,12A12,12,0,0,0,64,116Z"}))})),kl.set("light",(function(){return s.createElement(s.Fragment,null,s.createElement("circle",{cx:"128",cy:"128",r:"10"}),s.createElement("circle",{cx:"64",cy:"128",r:"10"}),s.createElement("circle",{cx:"192",cy:"128",r:"10"}))})),kl.set("thin",(function(){return s.createElement(s.Fragment,null,s.createElement("circle",{cx:"128",cy:"128",r:"8"}),s.createElement("circle",{cx:"64",cy:"128",r:"8"}),s.createElement("circle",{cx:"192",cy:"128",r:"8"}))})),kl.set("regular",(function(){return s.createElement(s.Fragment,null,s.createElement("circle",{cx:"128",cy:"128",r:"12"}),s.createElement("circle",{cx:"192",cy:"128",r:"12"}),s.createElement("circle",{cx:"64",cy:"128",r:"12"}))}));var Sl=function(e,t){return _r(e,t,kl)},_l=(0,s.forwardRef)((function(e,t){return s.createElement(Lr,Object.assign({ref:t},e,{renderPath:Sl}))}));_l.displayName="DotsThree";const Cl=_l;function Ol(e){const t=e+"CollectionProvider",[n,r]=Ci(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=e+"CollectionSlot",l=s.forwardRef(((e,t)=>{const{scope:n,children:r}=e,o=Ee(t,i(a,n).collectionRef);return s.createElement(Se,{ref:o},r)})),u=e+"CollectionItemSlot",c="data-radix-collection-item",f=s.forwardRef(((e,t)=>{const{scope:n,children:r,...o}=e,a=s.useRef(null),l=Ee(t,a),f=i(u,n);return s.useEffect((()=>(f.itemMap.set(a,{ref:a,...o}),()=>{f.itemMap.delete(a)}))),s.createElement(Se,{[c]:"",ref:l},r)}));return[{Provider:e=>{const{scope:t,children:n}=e,r=s.useRef(null),i=s.useRef(new Map).current;return s.createElement(o,{scope:t,itemMap:i,collectionRef:r},n)},Slot:l,ItemSlot:f},function(t){const n=i(e+"CollectionConsumer",t);return s.useCallback((()=>{const e=n.collectionRef.current;if(!e)return[];const t=Array.from(e.querySelectorAll(`[${c}]`));return Array.from(n.itemMap.values()).sort(((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current)))}),[n.collectionRef,n.itemMap])},r]}const Ll={bubbles:!1,cancelable:!0},[Pl,Rl,jl]=Ol("RovingFocusGroup"),[Tl,Al]=Ci("RovingFocusGroup",[jl]),[Ml,Il]=Tl("RovingFocusGroup"),Dl=s.forwardRef(((e,t)=>s.createElement(Pl.Provider,{scope:e.__scopeRovingFocusGroup},s.createElement(Pl.Slot,{scope:e.__scopeRovingFocusGroup},s.createElement(Nl,ke({},e,{ref:t})))))),Nl=s.forwardRef(((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,dir:o="ltr",loop:i=!1,currentTabStopId:a,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:u,onEntryFocus:c,...f}=e,d=s.useRef(null),p=Ee(t,d),[h=null,g]=Ei({prop:a,defaultProp:l,onChange:u}),[m,v]=s.useState(!1),y=ai(c),b=Rl(n),w=s.useRef(!1);return s.useEffect((()=>{const e=d.current;if(e)return e.addEventListener("rovingFocusGroup.onEntryFocus",y),()=>e.removeEventListener("rovingFocusGroup.onEntryFocus",y)}),[y]),s.createElement(Ml,{scope:n,orientation:r,dir:o,loop:i,currentTabStopId:h,onItemFocus:s.useCallback((e=>g(e)),[g]),onItemShiftTab:s.useCallback((()=>v(!0)),[])},s.createElement(ni.div,ke({tabIndex:m?-1:0,"data-orientation":r},f,{ref:p,style:{outline:"none",...e.style},onMouseDown:vi(e.onMouseDown,(()=>{w.current=!0})),onFocus:vi(e.onFocus,(e=>{const t=!w.current;if(e.target===e.currentTarget&&t&&!m){const t=new Event("rovingFocusGroup.onEntryFocus",Ll);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){const e=b().filter((e=>e.focusable));Bl([e.find((e=>e.active)),e.find((e=>e.id===h)),...e].filter(Boolean).map((e=>e.ref.current)))}}w.current=!1})),onBlur:vi(e.onBlur,(()=>v(!1)))})))})),Fl=s.forwardRef(((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,...i}=e,a=_i(),l=Il("RovingFocusGroupItem",n),u=l.currentTabStopId===a,c=Rl(n);return s.createElement(Pl.ItemSlot,{scope:n,id:a,focusable:r,active:o},s.createElement(ni.span,ke({tabIndex:u?0:-1,"data-orientation":l.orientation},i,{ref:t,onMouseDown:vi(e.onMouseDown,(e=>{r?l.onItemFocus(a):e.preventDefault()})),onFocus:vi(e.onFocus,(()=>l.onItemFocus(a))),onKeyDown:vi(e.onKeyDown,(e=>{if("Tab"===e.key&&e.shiftKey)return void l.onItemShiftTab();if(e.target!==e.currentTarget)return;const t=function(e,t,n){const r=function(e,t){return"rtl"!==t?e:"ArrowLeft"===e?"ArrowRight":"ArrowRight"===e?"ArrowLeft":e}(e.key,n);return"vertical"===t&&["ArrowLeft","ArrowRight"].includes(r)||"horizontal"===t&&["ArrowUp","ArrowDown"].includes(r)?void 0:zl[r]}(e,l.orientation,l.dir);if(void 0!==t){e.preventDefault();let o=c().filter((e=>e.focusable)).map((e=>e.ref.current));if("last"===t)o.reverse();else if("prev"===t||"next"===t){"prev"===t&&o.reverse();const i=o.indexOf(e.currentTarget);o=l.loop?(r=i+1,(n=o).map(((e,t)=>n[(r+t)%n.length]))):o.slice(i+1)}setTimeout((()=>Bl(o)))}var n,r}))})))})),zl={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Bl(e){const t=document.activeElement;for(const n of e){if(n===t)return;if(n.focus(),document.activeElement!==t)return}}const $l=Dl,Wl=Fl,Hl=s.forwardRef(((e,t)=>{var n,r;const{containerRef:o,style:i,...a}=e,l=null!==(n=null==o?void 0:o.current)&&void 0!==n?n:null===globalThis||void 0===globalThis||null===(r=globalThis.document)||void 0===r?void 0:r.body,[,u]=s.useState({});return ri((()=>{u({})}),[]),l?c.createPortal(s.createElement(ni.div,ke({"data-radix-portal":""},a,{ref:t,style:l===document.body?{position:"absolute",top:0,left:0,zIndex:2147483647,...i}:void 0})),l):null})),Ul=s.forwardRef(((e,t)=>{const{children:n,width:r=10,height:o=5,...i}=e;return s.createElement(ni.svg,ke({},i,{ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none"}),e.asChild?n:s.createElement("polygon",{points:"0,0 30,0 15,10"}))})),Vl=Ul;function ql(e){const[t,n]=s.useState(void 0);return s.useEffect((()=>{if(e){const t=new ResizeObserver((t=>{if(!Array.isArray(t))return;if(!t.length)return;const r=t[0];let o,i;if("borderBoxSize"in r){const e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;o=t.inlineSize,i=t.blockSize}else{const t=e.getBoundingClientRect();o=t.width,i=t.height}n({width:o,height:i})}));return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)}),[e]),t}let Kl;const Gl=new Map;function Xl(){const e=[];Gl.forEach(((t,n)=>{const r=n.getBoundingClientRect();var o,i;i=r,((o=t.rect).width!==i.width||o.height!==i.height||o.top!==i.top||o.right!==i.right||o.bottom!==i.bottom||o.left!==i.left)&&(t.rect=r,e.push(t))})),e.forEach((e=>{e.callbacks.forEach((t=>t(e.rect)))})),Kl=requestAnimationFrame(Xl)}function Yl(e,t,n){const r=e["x"===n?"left":"top"],o="x"===n?"width":"height",i=e[o],a=t[o];return{before:r-a,start:r,center:r+(i-a)/2,end:r+i-a,after:r+i}}function Zl(e){return{position:"absolute",top:0,left:0,minWidth:"max-content",willChange:"transform",transform:`translate3d(${Math.round(e.x+window.scrollX)}px, ${Math.round(e.y+window.scrollY)}px, 0)`}}function Ql(e,t,n,r,o){const i="top"===t||"bottom"===t,a=o?o.width:0,l=o?o.height:0,s=a/2+r;let u="",c="";return i?(u={start:`${s}px`,center:"center",end:e.width-s+"px"}[n],c="top"===t?`${e.height+l}px`:-l+"px"):(u="left"===t?`${e.width+l}px`:-l+"px",c={start:`${s}px`,center:"center",end:e.height-s+"px"}[n]),`${u} ${c}`}const Jl={position:"fixed",top:0,left:0,opacity:0,transform:"translate3d(0, -200%, 0)"},es={position:"absolute",opacity:0};function ts({popperSize:e,arrowSize:t,arrowOffset:n,side:r,align:o}){const i=(e.width-t.width)/2,a=(e.height-t.width)/2,l={top:0,right:90,bottom:180,left:-90}[r],s=Math.max(t.width,t.height),u={width:`${s}px`,height:`${s}px`,transform:`rotate(${l}deg)`,willChange:"transform",position:"absolute",[r]:"100%",direction:ns(r,o)};return"top"!==r&&"bottom"!==r||("start"===o&&(u.left=`${n}px`),"center"===o&&(u.left=`${i}px`),"end"===o&&(u.right=`${n}px`)),"left"!==r&&"right"!==r||("start"===o&&(u.top=`${n}px`),"center"===o&&(u.top=`${a}px`),"end"===o&&(u.bottom=`${n}px`)),u}function ns(e,t){return("top"!==e&&"right"!==e||"end"!==t)&&("bottom"!==e&&"left"!==e||"end"===t)?"ltr":"rtl"}function rs(e){return{top:"bottom",right:"left",bottom:"top",left:"right"}[e]}function os(e,t){return{top:e.topt.right,bottom:e.bottom>t.bottom,left:e.left{const{__scopePopper:n,virtualRef:r,...o}=e,i=ss("PopperAnchor",n),a=s.useRef(null),l=Ee(t,a);return s.useEffect((()=>{i.onAnchorChange((null==r?void 0:r.current)||a.current)})),r?null:s.createElement(ni.div,ke({},o,{ref:l}))})),[cs,fs]=is("PopperContent"),ds=s.forwardRef(((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:o,align:i="center",alignOffset:a,collisionTolerance:l,avoidCollisions:u=!0,...c}=e,f=ss("PopperContent",n),[d,p]=s.useState(),h=function(e){const[t,n]=s.useState();return s.useEffect((()=>{if(e){const t=function(e,t){const n=Gl.get(e);return void 0===n?(Gl.set(e,{rect:{},callbacks:[t]}),1===Gl.size&&(Kl=requestAnimationFrame(Xl))):(n.callbacks.push(t),t(e.getBoundingClientRect())),()=>{const n=Gl.get(e);if(void 0===n)return;const r=n.callbacks.indexOf(t);r>-1&&n.callbacks.splice(r,1),0===n.callbacks.length&&(Gl.delete(e),0===Gl.size&&cancelAnimationFrame(Kl))}}(e,n);return()=>{n(void 0),t()}}}),[e]),t}(f.anchor),[g,m]=s.useState(null),v=ql(g),[y,b]=s.useState(null),w=ql(y),x=Ee(t,(e=>m(e))),E=function(){const[e,t]=s.useState(void 0);return s.useEffect((()=>{let e;function n(){t({width:window.innerWidth,height:window.innerHeight})}function r(){window.clearTimeout(e),e=window.setTimeout(n,100)}return n(),window.addEventListener("resize",r),()=>window.removeEventListener("resize",r)}),[]),e}(),k=E?DOMRect.fromRect({...E,x:0,y:0}):void 0,{popperStyles:S,arrowStyles:_,placedSide:C,placedAlign:O}=function({anchorRect:e,popperSize:t,arrowSize:n,arrowOffset:r=0,side:o,sideOffset:i=0,align:a,alignOffset:l=0,shouldAvoidCollisions:s=!0,collisionBoundariesRect:u,collisionTolerance:c=0}){if(!e||!t||!u)return{popperStyles:Jl,arrowStyles:es};const f=function(e,t,n=0,r=0,o){const i=o?o.height:0,a=Yl(t,e,"x"),l=Yl(t,e,"y"),s=l.before-n-i,u=l.after+n+i,c=a.before-n-i,f=a.after+n+i;return{top:{start:{x:a.start+r,y:s},center:{x:a.center,y:s},end:{x:a.end-r,y:s}},right:{start:{x:f,y:l.start+r},center:{x:f,y:l.center},end:{x:f,y:l.end-r}},bottom:{start:{x:a.start+r,y:u},center:{x:a.center,y:u},end:{x:a.end-r,y:u}},left:{start:{x:c,y:l.start+r},center:{x:c,y:l.center},end:{x:c,y:l.end-r}}}}(t,e,i,l,n),d=f[o][a];if(!1===s){const e=Zl(d);let i=es;return n&&(i=ts({popperSize:t,arrowSize:n,arrowOffset:r,side:o,align:a})),{popperStyles:{...e,"--radix-popper-transform-origin":Ql(t,o,a,r,n)},arrowStyles:i,placedSide:o,placedAlign:a}}const p=DOMRect.fromRect({...t,...d}),h=(g=u,m=c,DOMRect.fromRect({width:g.width-2*m,height:g.height-2*m,x:g.left+m,y:g.top+m}));var g,m;const v=os(p,h),y=f[rs(o)][a],b=function(e,t,n){const r=rs(e);return t[e]&&!n[r]?r:e}(o,v,os(DOMRect.fromRect({...t,...y}),h)),w=function(e,t,n,r,o){const i="top"===n||"bottom"===n,a=i?"left":"top",l=i?"right":"bottom",s=i?"width":"height",u=t[s]>e[s];return"start"!==r&&"center"!==r||!(o[a]&&u||o[l]&&!u)?"end"!==r&&"center"!==r||!(o[l]&&u||o[a]&&!u)?r:"start":"end"}(t,e,o,a,v),x=Zl(f[b][w]);let E=es;return n&&(E=ts({popperSize:t,arrowSize:n,arrowOffset:r,side:b,align:w})),{popperStyles:{...x,"--radix-popper-transform-origin":Ql(t,b,w,r,n)},arrowStyles:E,placedSide:b,placedAlign:w}}({anchorRect:h,popperSize:v,arrowSize:w,arrowOffset:d,side:r,sideOffset:o,align:i,alignOffset:a,shouldAvoidCollisions:u,collisionBoundariesRect:k,collisionTolerance:l}),L=void 0!==C;return s.createElement("div",{style:S,"data-radix-popper-content-wrapper":""},s.createElement(cs,{scope:n,arrowStyles:_,onArrowChange:b,onArrowOffsetChange:p},s.createElement(ni.div,ke({"data-side":C,"data-align":O},c,{style:{...c.style,animation:L?void 0:"none"},ref:x}))))})),ps=s.forwardRef((function(e,t){const{__scopePopper:n,offset:r,...o}=e,i=fs("PopperArrow",n),{onArrowOffsetChange:a}=i;return s.useEffect((()=>a(r)),[a,r]),s.createElement("span",{style:{...i.arrowStyles,pointerEvents:"none"}},s.createElement("span",{ref:i.onArrowChange,style:{display:"inline-block",verticalAlign:"top",pointerEvents:"auto"}},s.createElement(Vl,ke({},o,{ref:t,style:{...o.style,display:"block"}}))))})),hs=e=>{const{__scopePopper:t,children:n}=e,[r,o]=s.useState(null);return s.createElement(ls,{scope:t,anchor:r,onAnchorChange:o},n)},gs=us,ms=ds,vs=ps,ys=["Enter"," "],bs=["ArrowUp","PageDown","End"],ws=["ArrowDown","PageUp","Home",...bs],xs={ltr:[...ys,"ArrowRight"],rtl:[...ys,"ArrowLeft"]},Es={ltr:["ArrowLeft"],rtl:["ArrowRight"]},[ks,Ss,_s]=Ol("Menu"),[Cs,Os]=Ci("Menu",[_s,as,Al]),Ls=as(),Ps=Al(),[Rs,js]=Cs("Menu"),Ts=s.forwardRef(((e,t)=>{const{__scopeMenu:n,...r}=e,o=Ls(n);return s.createElement(gs,ke({},o,r,{ref:t}))})),[As,Ms]=Cs("MenuContent"),Is=s.forwardRef(((e,t)=>{const{forceMount:n,...r}=e,o=js("MenuContent",e.__scopeMenu);return s.createElement(ks.Provider,{scope:e.__scopeMenu},s.createElement(oi,{present:n||o.open},s.createElement(ks.Slot,{scope:e.__scopeMenu},o.isSubmenu?s.createElement(zs,ke({},r,{ref:t})):s.createElement(Ds,ke({},r,{ref:t})))))})),Ds=s.forwardRef(((e,t)=>js("MenuContent",e.__scopeMenu).modal?s.createElement(Ns,ke({},e,{ref:t})):s.createElement(Fs,ke({},e,{ref:t})))),Ns=s.forwardRef(((e,t)=>{const n=js("MenuContent",e.__scopeMenu),r=s.useRef(null),o=Ee(t,r);return s.useEffect((()=>{const e=r.current;if(e)return bo(e)}),[]),s.createElement(Bs,ke({},e,{ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:vi(e.onFocusOutside,(e=>e.preventDefault()),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)}))})),Fs=s.forwardRef(((e,t)=>{const n=js("MenuContent",e.__scopeMenu);return s.createElement(Bs,ke({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)}))})),zs=s.forwardRef(((e,t)=>{const n=js("MenuContent",e.__scopeMenu),r=s.useRef(null),o=Ee(t,r);return n.isSubmenu?s.createElement(Bs,ke({id:n.contentId,"aria-labelledby":n.triggerId},e,{ref:o,align:"start",side:"rtl"===n.dir?"left":"right",portalled:!0,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{var t;n.isUsingKeyboardRef.current&&(null===(t=r.current)||void 0===t||t.focus()),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:vi(e.onFocusOutside,(e=>{e.target!==n.trigger&&n.onOpenChange(!1)})),onEscapeKeyDown:vi(e.onEscapeKeyDown,n.onRootClose),onKeyDown:vi(e.onKeyDown,(e=>{const t=e.currentTarget.contains(e.target),r=Es[n.dir].includes(e.key);var o;t&&r&&(n.onOpenChange(!1),null===(o=n.trigger)||void 0===o||o.focus(),e.preventDefault())}))})):null})),Bs=s.forwardRef(((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:l,onEscapeKeyDown:u,onPointerDownOutside:c,onFocusOutside:f,onInteractOutside:d,onDismiss:p,disableOutsideScroll:h,allowPinchZoom:g,portalled:m,...v}=e,y=js("MenuContent",n),b=Ls(n),w=Ps(n),x=Ss(n),[E,k]=s.useState(null),S=s.useRef(null),_=Ee(t,S,y.onContentChange),C=s.useRef(0),O=s.useRef(""),L=s.useRef(0),P=s.useRef(null),R=s.useRef("right"),j=s.useRef(0),T=m?Hl:s.Fragment,A=h?Qo:s.Fragment,M=h?{allowPinchZoom:g}:void 0;s.useEffect((()=>()=>window.clearTimeout(C.current)),[]),ei();const I=s.useCallback((e=>{var t,n;return R.current===(null===(t=P.current)||void 0===t?void 0:t.side)&&function(e,t){return!!t&&function(e,t){const{x:n,y:r}=e;let o=!1;for(let e=0,i=t.length-1;er!=u>r&&n<(s-a)*(r-l)/(u-l)+a&&(o=!o)}return o}({x:e.clientX,y:e.clientY},t)}(e,null===(n=P.current)||void 0===n?void 0:n.area)}),[]);return s.createElement(T,null,s.createElement(A,M,s.createElement(As,{scope:n,searchRef:O,onItemEnter:s.useCallback((e=>{I(e)&&e.preventDefault()}),[I]),onItemLeave:s.useCallback((e=>{var t;I(e)||(null===(t=S.current)||void 0===t||t.focus(),k(null))}),[I]),onTriggerLeave:s.useCallback((e=>{I(e)&&e.preventDefault()}),[I]),pointerGraceTimerRef:L,onPointerGraceIntentChange:s.useCallback((e=>{P.current=e}),[])},s.createElement(si,{asChild:!0,trapped:o,onMountAutoFocus:vi(i,(e=>{var t;e.preventDefault(),null===(t=S.current)||void 0===t||t.focus()})),onUnmountAutoFocus:a},s.createElement(bi,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:u,onPointerDownOutside:c,onFocusOutside:f,onInteractOutside:d,onDismiss:p},s.createElement($l,ke({asChild:!0},w,{dir:y.dir,orientation:"vertical",loop:r,currentTabStopId:E,onCurrentTabStopIdChange:k,onEntryFocus:e=>{y.isUsingKeyboardRef.current||e.preventDefault()}}),s.createElement(ms,ke({role:"menu","aria-orientation":"vertical","data-state":Xs(y.open),dir:y.dir},b,v,{ref:_,style:{outline:"none",...v.style},onKeyDown:vi(v.onKeyDown,(e=>{const t=e.target,n=e.currentTarget.contains(t),r=e.ctrlKey||e.altKey||e.metaKey,o=1===e.key.length;n&&("Tab"===e.key&&e.preventDefault(),!r&&o&&(e=>{var t,n;const r=O.current+e,o=x().filter((e=>!e.disabled)),i=document.activeElement,a=null===(t=o.find((e=>e.ref.current===i)))||void 0===t?void 0:t.textValue,l=function(e,t,n){const r=t.length>1&&Array.from(t).every((e=>e===t[0]))?t[0]:t,o=n?e.indexOf(n):-1;let i=(a=e,l=Math.max(o,0),a.map(((e,t)=>a[(l+t)%a.length])));var a,l;1===r.length&&(i=i.filter((e=>e!==n)));const s=i.find((e=>e.toLowerCase().startsWith(r.toLowerCase())));return s!==n?s:void 0}(o.map((e=>e.textValue)),r,a),s=null===(n=o.find((e=>e.textValue===l)))||void 0===n?void 0:n.ref.current;!function e(t){O.current=t,window.clearTimeout(C.current),""!==t&&(C.current=window.setTimeout((()=>e("")),1e3))}(r),s&&setTimeout((()=>s.focus()))})(e.key));const i=S.current;if(e.target!==i)return;if(!ws.includes(e.key))return;e.preventDefault();const a=x().filter((e=>!e.disabled)).map((e=>e.ref.current));bs.includes(e.key)&&a.reverse(),function(e){const t=document.activeElement;for(const n of e){if(n===t)return;if(n.focus(),document.activeElement!==t)return}}(a)})),onBlur:vi(e.onBlur,(e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(C.current),O.current="")})),onPointerMove:vi(e.onPointerMove,Ys((e=>{const t=e.target,n=j.current!==e.clientX;if(e.currentTarget.contains(t)&&n){const t=e.clientX>j.current?"right":"left";R.current=t,j.current=e.clientX}})))}))))))))})),$s=s.forwardRef(((e,t)=>{const{__scopeMenu:n,...r}=e;return s.createElement(ni.div,ke({},r,{ref:t}))})),Ws=s.forwardRef(((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,i=s.useRef(null),a=js("MenuItem",e.__scopeMenu),l=Ms("MenuItem",e.__scopeMenu),u=Ee(t,i),c=s.useRef(!1);return s.createElement(Us,ke({},o,{ref:u,disabled:n,onClick:vi(e.onClick,(()=>{const e=i.current;if(!n&&e){const t=new Event("menu.itemSelect",{bubbles:!0,cancelable:!0});e.addEventListener("menu.itemSelect",(e=>null==r?void 0:r(e)),{once:!0}),e.dispatchEvent(t),t.defaultPrevented?c.current=!1:a.onRootClose()}})),onPointerDown:t=>{var n;null===(n=e.onPointerDown)||void 0===n||n.call(e,t),c.current=!0},onPointerUp:vi(e.onPointerUp,(e=>{var t;c.current||null===(t=e.currentTarget)||void 0===t||t.click()})),onKeyDown:vi(e.onKeyDown,(e=>{const t=""!==l.searchRef.current;n||t&&" "===e.key||ys.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())}))}))})),Hs=s.forwardRef(((e,t)=>{const n=js("MenuSubTrigger",e.__scopeMenu),r=Ms("MenuSubTrigger",e.__scopeMenu),o=s.useRef(null),{pointerGraceTimerRef:i,onPointerGraceIntentChange:a}=r,l={__scopeMenu:e.__scopeMenu},u=s.useCallback((()=>{o.current&&window.clearTimeout(o.current),o.current=null}),[]);return s.useEffect((()=>u),[u]),s.useEffect((()=>{const e=i.current;return()=>{window.clearTimeout(e),a(null)}}),[i,a]),n.isSubmenu?s.createElement(Ts,ke({asChild:!0},l),s.createElement(Us,ke({id:n.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":Xs(n.open)},e,{ref:xe(t,n.onTriggerChange),onClick:t=>{var r;null===(r=e.onClick)||void 0===r||r.call(e,t),e.disabled||t.defaultPrevented||(t.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:vi(e.onPointerMove,Ys((t=>{r.onItemEnter(t),t.defaultPrevented||e.disabled||n.open||o.current||(r.onPointerGraceIntentChange(null),o.current=window.setTimeout((()=>{n.onOpenChange(!0),u()}),100))}))),onPointerLeave:vi(e.onPointerLeave,Ys((e=>{var t;u();const o=null===(t=n.content)||void 0===t?void 0:t.getBoundingClientRect();if(o){var a;const t=null===(a=n.content)||void 0===a?void 0:a.dataset.side,l="right"===t,s=l?-5:5,u=o[l?"left":"right"],c=o[l?"right":"left"];r.onPointerGraceIntentChange({area:[{x:e.clientX+s,y:e.clientY},{x:u,y:o.top},{x:c,y:o.top},{x:c,y:o.bottom},{x:u,y:o.bottom}],side:t}),window.clearTimeout(i.current),i.current=window.setTimeout((()=>r.onPointerGraceIntentChange(null)),300)}else{if(r.onTriggerLeave(e),e.defaultPrevented)return;r.onPointerGraceIntentChange(null)}}))),onKeyDown:vi(e.onKeyDown,(t=>{const o=""!==r.searchRef.current;var i;e.disabled||o&&" "===t.key||xs[n.dir].includes(t.key)&&(n.onOpenChange(!0),null===(i=n.content)||void 0===i||i.focus(),t.preventDefault())}))}))):null})),Us=s.forwardRef(((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...i}=e,a=Ms("MenuItem",n),l=Ps(n),u=s.useRef(null),c=Ee(t,u),[f,d]=s.useState("");return s.useEffect((()=>{const e=u.current;var t;e&&d((null!==(t=e.textContent)&&void 0!==t?t:"").trim())}),[i.children]),s.createElement(ks.ItemSlot,{scope:n,disabled:r,textValue:null!=o?o:f},s.createElement(Wl,ke({asChild:!0},l,{focusable:!r}),s.createElement(ni.div,ke({role:"menuitem","aria-disabled":r||void 0,"data-disabled":r?"":void 0},i,{ref:c,onPointerMove:vi(e.onPointerMove,Ys((e=>{r?a.onItemLeave(e):(a.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus())}))),onPointerLeave:vi(e.onPointerLeave,Ys((e=>a.onItemLeave(e))))}))))})),[Vs,qs]=Cs("MenuRadioGroup",{value:void 0,onValueChange:()=>{}}),[Ks,Gs]=Cs("MenuItemIndicator",{checked:!1});function Xs(e){return e?"open":"closed"}function Ys(e){return t=>"mouse"===t.pointerType?e(t):void 0}const Zs=e=>{const{__scopeMenu:t,open:n=!1,children:r,onOpenChange:o,modal:i=!0}=e,a=Ls(t),[l,u]=s.useState(null),c=s.useRef(!1),f=ai(o),d=function(e,t){const[n,r]=s.useState("ltr"),[o,i]=s.useState(),a=s.useRef(0);return s.useEffect((()=>{if(void 0===t&&null!=e&&e.parentElement){const t=getComputedStyle(e.parentElement);i(t)}}),[e,t]),s.useEffect((()=>(void 0===t&&function e(){a.current=requestAnimationFrame((()=>{const t=null==o?void 0:o.direction;t&&r(t),e()}))}(),()=>cancelAnimationFrame(a.current))),[o,t,r]),t||n}(l,e.dir);return s.useEffect((()=>{const e=()=>{c.current=!0,document.addEventListener("pointerdown",t,{capture:!0,once:!0}),document.addEventListener("pointermove",t,{capture:!0,once:!0})},t=()=>c.current=!1;return document.addEventListener("keydown",e,{capture:!0}),()=>{document.removeEventListener("keydown",e,{capture:!0}),document.removeEventListener("pointerdown",t,{capture:!0}),document.removeEventListener("pointermove",t,{capture:!0})}}),[]),s.createElement(hs,a,s.createElement(Rs,{scope:t,isSubmenu:!1,isUsingKeyboardRef:c,dir:d,open:n,onOpenChange:f,content:l,onContentChange:u,onRootClose:s.useCallback((()=>f(!1)),[f]),modal:i},r))},Qs=e=>{const{__scopeMenu:t,children:n,open:r=!1,onOpenChange:o}=e,i=js("MenuSub",t),a=Ls(t),[l,u]=s.useState(null),[c,f]=s.useState(null),d=ai(o);return s.useEffect((()=>(!1===i.open&&d(!1),()=>d(!1))),[i.open,d]),s.createElement(hs,a,s.createElement(Rs,{scope:t,isSubmenu:!0,isUsingKeyboardRef:i.isUsingKeyboardRef,dir:i.dir,open:r,onOpenChange:d,content:c,onContentChange:f,onRootClose:i.onRootClose,contentId:_i(),trigger:l,onTriggerChange:u,triggerId:_i(),modal:!1},n))},Js=Ts,eu=Hs,tu=Is,nu=$s,ru=Ws,ou=s.forwardRef(((e,t)=>{const{__scopeMenu:n,...r}=e;return s.createElement(ni.div,ke({role:"separator","aria-orientation":"horizontal"},r,{ref:t}))})),iu=s.forwardRef(((e,t)=>{const{__scopeMenu:n,...r}=e,o=Ls(n);return s.createElement(vs,ke({},o,r,{ref:t}))})),[au,lu]=Ci("DropdownMenu",[Os]),su=Os(),[uu,cu]=au("DropdownMenu"),fu=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,onOpenChange:i,onOpenToggle:a,modal:l=!0}=e,u=su(t),c=s.useRef(null);return s.createElement(uu,{scope:t,isRootMenu:!0,triggerId:_i(),triggerRef:c,contentId:_i(),open:o,onOpenChange:i,onOpenToggle:a,modal:l},s.createElement(Zs,ke({},u,{open:o,onOpenChange:i,dir:r,modal:l}),n))},du=s.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,i=cu("DropdownMenuTrigger",n),a=su(n);return i.isRootMenu?s.createElement(Js,ke({asChild:!0},a),s.createElement(ni.button,ke({type:"button",id:i.triggerId,"aria-haspopup":"menu","aria-expanded":!!i.open||void 0,"aria-controls":i.open?i.contentId:void 0,"data-state":i.open?"open":"closed","data-disabled":r?"":void 0,disabled:r},o,{ref:xe(t,i.triggerRef),onPointerDown:vi(e.onPointerDown,(e=>{r||0!==e.button||!1!==e.ctrlKey||(i.open||e.preventDefault(),i.onOpenToggle())})),onKeyDown:vi(e.onKeyDown,(e=>{r||(["Enter"," "].includes(e.key)&&i.onOpenToggle(),"ArrowDown"===e.key&&i.onOpenChange(!0),[" ","ArrowDown"].includes(e.key)&&e.preventDefault())}))}))):null})),[pu,hu]=au("DropdownMenuContent",{isInsideContent:!1}),gu=s.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=cu("DropdownMenuContent",n),i=su(n),a={...r,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)"}};return s.createElement(pu,{scope:n,isInsideContent:!0},o.isRootMenu?s.createElement(mu,ke({__scopeDropdownMenu:n},a,{ref:t})):s.createElement(tu,ke({},i,a,{ref:t})))})),mu=s.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,portalled:r=!0,...o}=e,i=cu("DropdownMenuContent",n),a=su(n),l=s.useRef(!1);return i.isRootMenu?s.createElement(tu,ke({id:i.contentId,"aria-labelledby":i.triggerId},a,o,{ref:t,portalled:r,onCloseAutoFocus:vi(e.onCloseAutoFocus,(e=>{var t;l.current||null===(t=i.triggerRef.current)||void 0===t||t.focus(),l.current=!1,e.preventDefault()})),onInteractOutside:vi(e.onInteractOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey,r=2===t.button||n;i.modal&&!r||(l.current=!0)}))})):null})),vu=s.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=su(n);return s.createElement(nu,ke({},o,r,{ref:t}))})),yu=s.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=su(n);return s.createElement(ru,ke({},o,r,{ref:t}))})),bu=s.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=su(n);return s.createElement(eu,ke({},o,r,{ref:t}))})),wu=s.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=su(n);return s.createElement(ou,ke({},o,r,{ref:t}))})),xu=s.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=su(n);return s.createElement(iu,ke({},o,r,{ref:t}))})),Eu=e=>{const{__scopeDropdownMenu:t,children:n,open:r,defaultOpen:o,onOpenChange:i}=e,a=hu("DropdownMenu",t),l=su(t),[u=!1,c]=Ei({prop:r,defaultProp:o,onChange:i}),f=s.useCallback((()=>c((e=>!e))),[c]);return a.isInsideContent?s.createElement(uu,{scope:t,isRootMenu:!1,open:u,onOpenChange:c,onOpenToggle:f},s.createElement(Qs,ke({},l,{open:u,onOpenChange:c}),n)):s.createElement(fu,ke({},e,{open:u,onOpenChange:c,onOpenToggle:f}),n)},ku=du,Su=gu,_u=vu,Cu=bu,Ou=wu,Lu=xu;function Pu(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ru(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ju={fontSize:"16px",fontWeight:"500",py:"12px",px:"24px",borderRadius:3,cursor:"default",color:"$utilityTextDefault","&:focus":{outline:"none",backgroundColor:"$grayBgHover"}},Tu=pe(yu,ju),Au=pe(ku,{fontSize:"100%",border:0,padding:0,backgroundColor:"transparent","&:hover":{opacity:.7}}),Mu=(pe(Cu,function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}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 i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}(e);try{var o=function(){var e=n.value;if(!t.find((function(t){return e.id==t.id})))return{v:!1}};for(r.s();!(n=r.n()).done;){var i=o();if("object"===Lc(i))return i.v}}catch(e){r.e(e)}finally{r.f()}return!0},f=(0,s.useCallback)(function(){var t,n=(t=regeneratorRuntime.mark((function t(n){var r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(c(l,o)){t.next=6;break}return t.next=3,e.save(l);case 3:r=t.sent,e.onLabelsUpdated&&e.onLabelsUpdated(l),r||Ya("Error updating labels");case 6:e.onOpenChange(n);case 7:case"end":return t.stop()}}),t)})),function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(e){Oc(i,r,o,a,l,"next",e)}function l(e){Oc(i,r,o,a,l,"throw",e)}a(void 0)}))});return function(e){return n.apply(this,arguments)}}(),[e,l,o,u]);return(0,s.useEffect)((function(){c(l,o)||e.save(l).then((function(e){i(null!=e?e:[])})).catch((function(e){console.log("error saving labels: ",e)}))}),[l,i]),(0,De.jsxs)(Xi,{defaultOpen:!0,onOpenChange:f,children:[(0,De.jsx)(Zi,{}),(0,De.jsx)(Ji,{css:{border:"1px solid $grayBorder"},onPointerDownOutside:function(e){e.preventDefault(),f(!1)},children:(0,De.jsxs)(He,{distribution:"start",css:{height:"100%"},children:[(0,De.jsx)(ze,{css:{p:"16px",width:"100%"},children:(0,De.jsx)(ea,{title:"Labels",onOpenChange:f})}),(0,De.jsx)(Cc,{provider:e.provider,selectedLabels:l,setSelectedLabels:u,onLabelsUpdated:e.onLabelsUpdated})]})})]})}function Ac(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function Mc(e,t,n,r,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void n(e)}l.done?t(s):Promise.resolve(s).then(r,o)}function Ic(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Mc(i,r,o,a,l,"next",e)}function l(e){Mc(i,r,o,a,l,"throw",e)}a(void 0)}))}}function Dc(e,t){return Nc.apply(this,arguments)}function Nc(){return Nc=Ic(regeneratorRuntime.mark((function e(t,n){var r,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=(0,rt.gql)(wc||(wc=Ac(["\n mutation SetLabelsForHighlight($input: SetLabelsForHighlightInput!) {\n setLabelsForHighlight(input: $input) {\n ... on SetLabelsSuccess {\n labels {\n ...LabelFields\n }\n }\n ... on SetLabelsError {\n errorCodes\n }\n }\n }\n ","\n "])),Uu),console.log("setting label for highlight id: ",t,"labelIds",n),e.prev=2,e.next=5,bn(r,{input:{highlightId:t,labelIds:n}});case 5:return o=e.sent,console.log(" -- errorCodes",o.setLabelsForHighlight.errorCodes),e.abrupt("return",o.setLabelsForHighlight.errorCodes?void 0:o.setLabelsForHighlight.labels);case 10:return e.prev=10,e.t0=e.catch(2),console.log("setLabelsForHighlightInput error",e.t0),e.abrupt("return",void 0);case 14:case"end":return e.stop()}}),e,null,[[2,10]])}))),Nc.apply(this,arguments)}function Fc(e,t,n,r,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void n(e)}l.done?t(s):Promise.resolve(s).then(r,o)}function zc(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Fc(i,r,o,a,l,"next",e)}function l(e){Fc(i,r,o,a,l,"throw",e)}a(void 0)}))}}function Bc(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){l=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return $c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?$c(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function $c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);nt?1:0};return e.highlights.sort((function(e,n){if(e.highlightPositionPercent&&n.highlightPositionPercent)return t(e.highlightPositionPercent,n.highlightPositionPercent);try{var r=Wc(e.patch),o=Wc(n.patch);if(r&&o)return t(r,o)}catch(e){}return e.createdAt.localeCompare(n.createdAt)}))}),[e.highlights]);return(0,De.jsxs)(Xi,{defaultOpen:!0,onOpenChange:e.onOpenChange,children:[(0,De.jsx)(Zi,{}),(0,De.jsx)(Ji,{onPointerDownOutside:function(t){t.preventDefault(),e.onOpenChange(!1)},css:{overflow:"auto",px:"24px"},children:(0,De.jsxs)(He,{distribution:"start",css:{height:"100%"},children:[(0,De.jsx)(ea,{title:"Notebook",onOpenChange:e.onOpenChange}),(0,De.jsxs)(Fe,{css:{overflow:"auto",width:"100%"},children:[u.map((function(t){return(0,De.jsx)(Uc,{highlight:t,showDelete:!!e.deleteHighlightAction,scrollToHighlight:e.scrollToHighlight,setSetLabelsTarget:a,setShowConfirmDeleteHighlightId:r,deleteHighlightAction:function(){e.deleteHighlightAction&&e.deleteHighlightAction(t.id)},updateHighlight:e.updateHighlight},t.id)})),0===u.length&&(0,De.jsx)(ze,{css:{textAlign:"center",width:"100%"},children:(0,De.jsx)(Hn,{css:{mb:"40px"},children:"You have not added any highlights or notes to this document"})})]})]})}),n&&(0,De.jsx)(El,{message:"Are you sure you want to delete this highlight?",onAccept:function(){e.deleteHighlightAction&&e.deleteHighlightAction(n),r(void 0)},onOpenChange:function(){return r(void 0)},icon:(0,De.jsx)(ol,{size:40,strokeColor:he.colors.grayTextContrast.toString()})}),i&&(0,De.jsx)(Tc,{provider:i,onOpenChange:function(e){a(void 0)},onLabelsUpdated:function(e){l({})},save:function(e){return Dc(i.id,e.map((function(e){return e.id})))}})]})}function Uc(e){var t=Bc((0,s.useState)(!1),2),n=t[0],r=t[1],o=(0,s.useCallback)(zc(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,navigator.clipboard.writeText(e.highlight.quote);case 2:case"end":return t.stop()}}),t)}))),[e.highlight]);return(0,De.jsx)(De.Fragment,{children:(0,De.jsxs)(He,{children:[(0,De.jsx)(ze,{css:{marginLeft:"auto"},children:(0,De.jsxs)(Fu,{triggerElement:(0,De.jsx)(Cl,{size:24,color:he.colors.readerFont.toString()}),children:[(0,De.jsx)(Nu,{onSelect:zc(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,o();case 2:case"end":return e.stop()}}),e)}))),title:"Copy"}),(0,De.jsx)(Nu,{onSelect:function(){e.setSetLabelsTarget(e.highlight)},title:"Labels"}),(0,De.jsx)(Nu,{onSelect:function(){e.setShowConfirmDeleteHighlightId(e.highlight.id)},title:"Delete"})]})}),(0,De.jsx)(xl,{scrollToHighlight:e.scrollToHighlight,highlight:e.highlight}),n?null:(0,De.jsx)(Hn,{css:{borderRadius:"6px",bg:"$grayBase",p:"16px",width:"100%",marginTop:"24px",color:"$grayText"},onClick:function(){return r(!0)},children:e.highlight.annotation?e.highlight.annotation:"Add your notes..."}),n&&(0,De.jsx)(qc,{setIsEditing:r,highlight:e.highlight,updateHighlight:e.updateHighlight}),(0,De.jsx)(ze,{css:{mt:"$2",mb:"$4"}})]})})}var Vc,qc=function(e){var t,n=Bc((0,s.useState)(null!==(t=e.highlight.annotation)&&void 0!==t?t:""),2),r=n[0],o=n[1],i=(0,s.useCallback)((function(e){o(e.target.value)}),[o]);return(0,De.jsxs)(He,{css:{width:"100%"},children:[(0,De.jsx)(na,{css:{my:"$3",minHeight:"$6",borderRadius:"6px",bg:"$grayBase",p:"16px",width:"100%",marginTop:"16px",resize:"vertical"},autoFocus:!0,maxLength:4e3,value:r,placeholder:"Add your notes...",onChange:i}),(0,De.jsxs)(We,{alignment:"center",distribution:"end",css:{width:"100%"},children:[(0,De.jsx)(Er,{style:"ctaPill",css:{mr:"$2"},onClick:function(){var t;e.setIsEditing(!1),o(null!==(t=e.highlight.annotation)&&void 0!==t?t:"")},children:"Cancel"}),(0,De.jsx)(Er,{style:"ctaDarkYellow",onClick:function(){var t=zc(regeneratorRuntime.mark((function t(n){var o;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n.preventDefault(),console.log("updating highlight"),t.prev=2,t.next=5,aa({highlightId:e.highlight.id,annotation:r});case 5:o=t.sent,console.log("result: "+o),o?(Xa("Note saved"),e.highlight.annotation=r,e.updateHighlight(e.highlight)):Ya("There was an error updating your highlight."),t.next=14;break;case 10:t.prev=10,t.t0=t.catch(2),console.log("error updating annoation",t.t0),Ya("There was an error updating your highlight.");case 14:e.setIsEditing(!1);case 15:case"end":return t.stop()}}),t,null,[[2,10]])})));return function(e){return t.apply(this,arguments)}}(),children:"Save"})]})]},"textEditor")};function Kc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Gc(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n10||Math.abs(n.y-r.pageY)>10)&&(s=!0),null===(o=window)||void 0===o||null===(i=o.AndroidWebKitMessenger)||void 0===i||i.handleIdentifiableMessage("userTap",JSON.stringify(u)),t.next=6,mr();case 6:if(c=t.sent){t.next=9;break}return t.abrupt("return",setTimeout((function(){a(null)}),100));case 9:if(f=c.range,d=c.isReverseSelected,p=c.selection,h=or(f),g=hr(h,2),m=g[0],v=g[1],y=yr(f,d),b=!1,w=[],e.sort((function(e,t){return e.startt.start?1:0})).forEach((function(e){m>=e.start&&v<=e.end?b=!0:m<=e.end&&e.start<=v&&w.push(e)})),x=null,!w.length){t.next=25;break}if(C=!1,m<=w[0].start?(E=f.startContainer,k=f.startOffset):(O=ur(w[0].id),E=O.shift(),k=0),v>=w[w.length-1].end?(S=f.endContainer,_=f.endOffset):(L=ur(w[w.length-1].id),S=L.pop(),_=0,C=!0),E&&S){t.next=22;break}throw new Error("Failed to query node for computing new merged range");case 22:(x=new Range).setStart(E,k),C?x.setEndAfter(S):x.setEnd(S,_);case 25:if(!b){t.next=27;break}return t.abrupt("return",setTimeout((function(){a(null)}),100));case 27:return t.abrupt("return",a({selection:p,wasDragEvent:s,range:null!==(l=x)&&void 0!==l?l:f,focusPosition:{x:y[d?"left":"right"],y:y[d?"top":"bottom"],isReverseSelected:d},overlapHighlights:w.map((function(e){return e.id}))}));case 28:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),[e,n,r]),c=(0,s.useCallback)(pr(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:null===(t=window.AndroidWebKitMessenger)||void 0===t||t.handleIdentifiableMessage("writeToClipboard",JSON.stringify({quote:null==i?void 0:i.selection.toString()}));case 1:case"end":return e.stop()}}),e)}))),[null==i?void 0:i.selection]);return(0,s.useEffect)((function(){return document.addEventListener("mouseup",u),document.addEventListener("touchstart",l),document.addEventListener("touchend",u),document.addEventListener("contextmenu",u),document.addEventListener("copyTextSelection",c),function(){document.removeEventListener("mouseup",u),document.removeEventListener("touchstart",l),document.removeEventListener("touchend",u),document.removeEventListener("contextmenu",u),document.removeEventListener("copyTextSelection",c)}}),[e,u,c,n,r]),[i,a]}(u),m=Qc(g,2),v=m[0],y=m[1],b=Qc((0,s.useState)(void 0),2),w=b[0],x=b[1],E=(0,s.useMemo)((function(){var e;return"undefined"!=typeof window&&!(!wr()&&!br())&&"function"==typeof(null===(e=navigator)||void 0===e?void 0:e.share)}),[]);(0,s.useEffect)((function(){var t=[];if(n.forEach((function(e){try{var n=function(e){var t=function(e){return nr(e.patch,e.id,!!e.annotation,e.createdByMe?void 0:"var(--colors-recommendedHighlightBackground)",void 0)}(e),n=t.startLocation,r=t.endLocation;return{id:e.id,start:n,end:r}}(e);t.push(n)}catch(e){console.error(e)}})),c(t),e.scrollToHighlight.current){var r=document.querySelector('[omnivore-highlight-id="'.concat(e.scrollToHighlight.current,'"]'));r&&r.scrollIntoView({behavior:"auto"})}}),[n,c]);var k=(0,s.useCallback)(function(){var t=Zc(regeneratorRuntime.mark((function t(o){var i;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i=o||(null==p?void 0:p.id)){t.next=4;break}return console.trace("Failed to identify highlight to be removed"),t.abrupt("return");case 4:return t.next=6,e.articleMutations.deleteHighlightMutation(i);case 6:t.sent?(qr(n.map((function(e){return e.id}))),r(n.filter((function(e){return e.id!==i}))),h(void 0)):console.error("Failed to delete highlight");case 8:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),[p,n,u]),S=(0,s.useCallback)((function(e){qr([e.id]);var t,o=n.filter((function(t){return t.id!==e.id}));r([].concat(function(e){if(Array.isArray(e))return ef(e)}(t=o)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||Jc(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),[e]))}),[n,u]),_=(0,s.useCallback)((function(t){var n,r,o,i,l,s,u,c;if(void 0!==(null===(n=window)||void 0===n||null===(r=n.webkit)||void 0===r?void 0:r.messageHandlers.highlightAction)&&e.highlightBarDisabled)null===(i=window)||void 0===i||null===(l=i.webkit)||void 0===l||null===(s=l.messageHandlers.highlightAction)||void 0===s||s.postMessage({actionID:"annotate",annotation:null!==(u=null===(c=t.highlight)||void 0===c?void 0:c.annotation)&&void 0!==u?u:""});else if(void 0!==(null===(o=window)||void 0===o?void 0:o.AndroidWebKitMessenger)){var f,d;window.AndroidWebKitMessenger.handleIdentifiableMessage("annotate",JSON.stringify({annotation:null!==(f=null===(d=t.highlight)||void 0===d?void 0:d.annotation)&&void 0!==f?f:""}))}else t.createHighlightForNote=function(){var e=Zc(regeneratorRuntime.mark((function e(n){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.selectionData){e.next=2;break}return e.abrupt("return",void 0);case 2:return e.next=4,L(t.selectionData,n);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),a(t)}),[e.highlightBarDisabled]),C=function(e){if(e.rangeCount>0&&window&&window.document.scrollingElement){var t=(e.getRangeAt(0).getBoundingClientRect().y+window.scrollY)/window.document.scrollingElement.scrollHeight;return Math.min(Math.max(0,100*t),100)}},O=function(e){if(e.rangeCount>0)for(var t=(r=e.getRangeAt(0).startContainer).nodeType==Node.ELEMENT_NODE?r:r.parentElement;t;){var n=Number(t.getAttribute("data-omnivore-anchor-idx"));if(n>0)return n;t=t.parentElement}var r},L=function(){var t=Zc(regeneratorRuntime.mark((function t(o,i){var l;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,po({selection:o,articleId:e.articleId,existingHighlights:n,highlightStartEndOffsets:u,annotation:i,highlightPositionPercent:C(o.selection),highlightPositionAnchorIndex:O(o.selection)},e.articleMutations);case 2:if(!(l=t.sent).errorMessage){t.next=5;break}throw"Failed to create highlight: "+l.errorMessage;case 5:if(l.highlights&&0!=l.highlights.length){t.next=8;break}return console.error("Failed to create highlight"),t.abrupt("return",void 0);case 8:if(y(null),r(l.highlights),void 0!==l.newHighlightIndex){t.next=13;break}return a({highlightModalAction:"none"}),t.abrupt("return",void 0);case 13:return t.abrupt("return",l.highlights[l.newHighlightIndex]);case 14:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}(),P=(0,s.useCallback)(function(){var e=Zc(regeneratorRuntime.mark((function e(t,n){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(v){e.next=2;break}return e.abrupt("return");case 2:return e.prev=2,e.next=5,L(v,n);case 5:if(e.sent){e.next=9;break}throw Ya("Error saving highlight",{position:"bottom-right"}),"Error creating highlight";case 9:e.next=14;break;case 11:throw e.prev=11,e.t0=e.catch(2),e.t0;case 14:case"end":return e.stop()}}),e,null,[[2,11]])})));return function(t,n){return e.apply(this,arguments)}}(),[n,_,e.articleId,v,y,E,u]),R=(0,s.useCallback)((function(e){var t,r,o=e.target,i=e.pageX,a=e.pageY;if(o&&(null==o?void 0:o.nodeType)===Node.ELEMENT_NODE){var l={tapX:e.screenX,tapY:e.screenY};if(null===(t=window)||void 0===t||null===(r=t.AndroidWebKitMessenger)||void 0===r||r.handleIdentifiableMessage("userTap",JSON.stringify(l)),f.current={pageX:i,pageY:a},o.hasAttribute(Xn)){var s=o.getAttribute(Xn),u=n.find((function(e){return e.id===s}));if(u){var c,d,p,g,m;h(u);var v=o.getBoundingClientRect();null===(c=window)||void 0===c||null===(d=c.webkit)||void 0===d||null===(p=d.messageHandlers.viewerAction)||void 0===p||p.postMessage({actionID:"showMenu",rectX:v.x,rectY:v.y,rectWidth:v.width,rectHeight:v.height}),null===(g=window)||void 0===g||null===(m=g.AndroidWebKitMessenger)||void 0===m||m.handleIdentifiableMessage("existingHighlightTap",JSON.stringify(Gc({},l)))}}else if(o.hasAttribute(Yn)){var y=o.getAttribute(Yn),b=n.find((function(e){return e.id===y}));h(b),_({highlight:b,highlightModalAction:"addComment"})}else{var w,x,E;console.log("sending page tapped"),null===(w=window)||void 0===w||null===(x=w.webkit)||void 0===x||null===(E=x.messageHandlers.viewerAction)||void 0===E||E.postMessage({actionID:"pageTapped"}),h(void 0)}}else console.log(" -- returning early from page tap")}),[_,n,u,p,h]),j=(0,s.useCallback)((function(e){var t=e.target;if(t&&(null==t?void 0:t.nodeType)===Node.ELEMENT_NODE)if(t.hasAttribute(Xn)){var r=t.getAttribute(Xn),o=n.find((function(e){return e.id===r}));console.log("double tapped highlight: ",o),h(o),_({highlight:o,highlightModalAction:"addComment"})}else if(t.hasAttribute(Yn)){var i=t.getAttribute(Yn),a=n.find((function(e){return e.id===i}));console.log("double tapped highlight with note: ",a),h(a),_({highlight:a,highlightModalAction:"addComment"})}else h(void 0)}),[_,n,u,p,h]);(0,s.useEffect)((function(){var e=0,t=function(t){e+=1,setTimeout((function(){1===e?R(t):2===e&&j(t),e=0}),250)};return document.addEventListener("click",t),function(){document.removeEventListener("click",t)}}),[R,j]);var T=(0,s.useCallback)(function(){var t=Zc(regeneratorRuntime.mark((function t(n){var r,o,i,a,l,s,u,c;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:t.t0=n,t.next="delete"===t.t0?3:"create"===t.t0?6:"comment"===t.t0?9:"share"===t.t0?11:"unshare"===t.t0?19:"setHighlightLabels"===t.t0?21:23;break;case 3:return t.next=5,k();case 5:case 8:case 18:return t.abrupt("break",23);case 6:return t.next=8,P("none");case 9:return e.highlightBarDisabled||p?_({highlight:p,highlightModalAction:"addComment"}):_({highlight:void 0,selectionData:v||void 0,highlightModalAction:"addComment"}),t.abrupt("break",23);case 11:if(e.isAppleAppEmbed&&(null===(i=window)||void 0===i||null===(a=i.webkit)||void 0===a||null===(l=a.messageHandlers.highlightAction)||void 0===l||l.postMessage({actionID:"share",highlightID:null==p?void 0:p.id})),null===(r=window)||void 0===r||null===(o=r.AndroidWebKitMessenger)||void 0===o||o.handleIdentifiableMessage("shareHighlight",JSON.stringify({highlightID:null==p?void 0:p.id})),!p){t.next=16;break}t.next=18;break;case 16:return t.next=18,P("share");case 19:return console.log("unshare"),t.abrupt("break",23);case 21:return e.isAppleAppEmbed?null===(s=window)||void 0===s||null===(u=s.webkit)||void 0===u||null===(c=u.messageHandlers.highlightAction)||void 0===c||c.postMessage({actionID:"setHighlightLabels",highlightID:null==p?void 0:p.id}):x(p),t.abrupt("break",23);case 23:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),[P,p,_,e.highlightBarDisabled,e.isAppleAppEmbed,k,E]);(0,s.useEffect)((function(){e.highlightOnRelease&&null!=v&&v.wasDragEvent&&(T("create"),y(null))}),[v,y]);var A,M,I,D,N,F,z=function(t,n){var r,o,i;e.isAppleAppEmbed&&(null===(r=window)||void 0===r||null===(o=r.webkit)||void 0===o||null===(i=o.messageHandlers.highlightAction)||void 0===i||i.postMessage({actionID:"highlightError",highlightAction:t,highlightID:null==p?void 0:p.id,error:"string"==typeof n?n:JSON.stringify(n)}))},B=function(t){var n,r,o;e.isAppleAppEmbed&&(null===(n=window)||void 0===n||null===(r=n.webkit)||void 0===r||null===(o=r.messageHandlers.highlightAction)||void 0===o||o.postMessage({actionID:t,highlightID:null==p?void 0:p.id}))};return(0,s.useEffect)((function(){var t=function(){var e=Zc(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,T(t);case 3:e.next=8;break;case 5:e.prev=5,e.t0=e.catch(0),z(t,e.t0);case 8:case"end":return e.stop()}}),e,null,[[0,5]])})));return function(t){return e.apply(this,arguments)}}(),n=function(){var e=Zc(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t("comment");case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),r=function(){var e=Zc(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t("create");case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),o=function(){var e=Zc(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t("share");case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),i=function(){var e=Zc(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t("delete");case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),a=function(){h(void 0)},l=function(){T("setHighlightLabels")},s=function(){var e=Zc(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!p){e.next=8;break}if(!window.AndroidWebKitMessenger){e.next=5;break}window.AndroidWebKitMessenger.handleIdentifiableMessage("writeToClipboard",JSON.stringify({quote:p.quote})),e.next=7;break;case 5:return e.next=7,navigator.clipboard.writeText(p.quote);case 7:h(void 0);case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),u=function(){var e=Zc(regeneratorRuntime.mark((function e(t){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=document.querySelector('[data-omnivore-anchor-idx="'.concat(t.anchorIdx,'"]')),document.querySelectorAll(".speakingSection").forEach((function(e){e!=n&&(null==e||e.classList.remove("speakingSection"))})),null==n||n.classList.add("speakingSection");case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),c=function(){var t=Zc(regeneratorRuntime.mark((function t(n){var r,o,i;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!p){t.next=10;break}return i=null!==(r=n.annotation)&&void 0!==r?r:"",t.next=4,e.articleMutations.updateHighlightMutation({highlightId:p.id,annotation:null!==(o=n.annotation)&&void 0!==o?o:""});case 4:t.sent?S(Gc(Gc({},p),{},{annotation:i})):(console.log("failed to change annotation for highlight with id",p.id),z("saveAnnotation","Failed to create highlight.")),h(void 0),B("noteCreated"),t.next=19;break;case 10:return t.prev=10,t.next=13,P("none",n.annotation);case 13:B("noteCreated"),t.next=19;break;case 16:t.prev=16,t.t0=t.catch(10),z("saveAnnotation",t.t0);case 19:case"end":return t.stop()}}),t,null,[[10,16]])})));return function(e){return t.apply(this,arguments)}}();return document.addEventListener("annotate",n),document.addEventListener("highlight",r),document.addEventListener("share",o),document.addEventListener("remove",i),document.addEventListener("copyHighlight",s),document.addEventListener("dismissHighlight",a),document.addEventListener("saveAnnotation",c),document.addEventListener("speakingSection",u),document.addEventListener("setHighlightLabels",l),function(){document.removeEventListener("annotate",n),document.removeEventListener("highlight",r),document.removeEventListener("share",o),document.removeEventListener("remove",i),document.removeEventListener("copyHighlight",s),document.removeEventListener("dismissHighlight",a),document.removeEventListener("saveAnnotation",c),document.removeEventListener("speakingSection",u),document.removeEventListener("setHighlightLabels",l)}})),"addComment"==(null==i?void 0:i.highlightModalAction)?(0,De.jsx)(rl,{highlight:i.highlight,author:e.articleAuthor,title:e.articleTitle,onUpdate:S,onOpenChange:function(){return a({highlightModalAction:"none"})},createHighlightForNote:null==i?void 0:i.createHighlightForNote}):w?(0,De.jsx)(Tc,{provider:w,onOpenChange:function(e){x(void 0)},save:function(e){return Dc(w.id,e.map((function(e){return e.id})))}}):e.highlightBarDisabled||!p&&!v?e.showHighlightsModal?(0,De.jsx)(Hc,{highlights:n,onOpenChange:function(){return e.setShowHighlightsModal(!1)},deleteHighlightAction:function(e){k(e)},updateHighlight:S}):(0,De.jsx)(De.Fragment,{}):(0,De.jsx)(De.Fragment,{children:(0,De.jsx)(Ur,{anchorCoordinates:{pageX:null!==(A=null!==(M=null===(I=f.current)||void 0===I?void 0:I.pageX)&&void 0!==M?M:null==v?void 0:v.focusPosition.x)&&void 0!==A?A:0,pageY:null!==(D=null!==(N=null===(F=f.current)||void 0===F?void 0:F.pageY)&&void 0!==N?N:null==v?void 0:v.focusPosition.y)&&void 0!==D?D:0},isNewHighlight:!!v,handleButtonClick:T,isSharedToFeed:null!=(null==p?void 0:p.sharedAt),displayAtBottom:xr()})})}function nf(e,t,n,r,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void n(e)}l.done?t(s):Promise.resolve(s).then(r,o)}function rf(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){nf(i,r,o,a,l,"next",e)}function l(e){nf(i,r,o,a,l,"throw",e)}a(void 0)}))}}function of(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n{const{__scopeAvatar:n,...r}=e,[o,i]=s.useState("idle");return s.createElement(pf,{scope:n,imageLoadingStatus:o,onImageLoadingStatusChange:i},s.createElement(ni.span,ke({},r,{ref:t})))})),mf=s.forwardRef(((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:o=(()=>{}),...i}=e,a=hf("AvatarImage",n),l=function(e){const[t,n]=s.useState("idle");return s.useEffect((()=>{if(!e)return void n("error");let t=!0;const r=new window.Image,o=e=>()=>{t&&n(e)};return n("loading"),r.onload=o("loaded"),r.onerror=o("error"),r.src=e,()=>{t=!1}}),[e]),t}(r),u=ai((e=>{o(e),a.onImageLoadingStatusChange(e)}));return ri((()=>{"idle"!==l&&u(l)}),[l,u]),"loaded"===l?s.createElement(ni.img,ke({},i,{ref:t,src:r})):null})),vf=s.forwardRef(((e,t)=>{const{__scopeAvatar:n,delayMs:r,...o}=e,i=hf("AvatarFallback",n),[a,l]=s.useState(void 0===r);return s.useEffect((()=>{if(void 0!==r){const e=window.setTimeout((()=>l(!0)),r);return()=>window.clearTimeout(e)}}),[r]),a&&"loaded"!==i.imageLoadingStatus?s.createElement(ni.span,ke({},o,{ref:t})):null})),yf=mf,bf=vf;function wf(e){return(0,De.jsxs)(xf,{title:e.tooltip,css:{width:e.height,height:e.height,borderRadius:"50%"},children:[(0,De.jsx)(Ef,{src:e.imageURL,css:{opacity:e.noFade?"unset":"48%"}}),(0,De.jsx)(kf,{children:e.fallbackText})]})}var xf=pe(gf,{display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"middle",overflow:"hidden",userSelect:"none",border:"1px solid $grayBorder"}),Ef=pe(yf,{width:"100%",height:"100%",objectFit:"cover","&:hover":{opacity:"100%"}}),kf=pe(bf,{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"$2",fontWeight:700,backgroundColor:"$avatarBg",color:"$avatarFont"});function Sf(e,t,n,r,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void n(e)}l.done?t(s):Promise.resolve(s).then(r,o)}function _f(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Sf(i,r,o,a,l,"next",e)}function l(e){Sf(i,r,o,a,l,"throw",e)}a(void 0)}))}}function Cf(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){l=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Of(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Of(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Of(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=100&&r<=300&&j(r)},n=function(e){var t="on"===e.enableHighlightOnRelease;_(t)},o=function(e){var t,n,r=null!==(t=null!==(n=e.maxWidthPercentage)&&void 0!==n?n:O)&&void 0!==t?t:100;r>=40&&r<=100&&L(r)},i=function(t){var n,r,o,i=null!==(n=null!==(r=null!==(o=t.fontFamily)&&void 0!==o?o:A)&&void 0!==r?r:e.fontFamily)&&void 0!==n?n:"inter";console.log("setting font fam to",t.fontFamily),M(i)},a=function(){var e=_f(regeneratorRuntime.mark((function e(t){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n="high"==t.fontContrast,N(n);case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),l=function(){var e=_f(regeneratorRuntime.mark((function e(t){var n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(r=null!==(n=t.fontSize)&&void 0!==n?n:18)>=10&&r<=28&&z(r);case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),s=function(){var e=_f(regeneratorRuntime.mark((function e(t){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(n=t.themeName)&&An(n);case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),u=function(e){var t;Mn("true"===(null!==(t=e.isDark)&&void 0!==t?t:"false")?r.Dark:r.Light)},c=function(e){var t;p(null!==(t=e.labels)&&void 0!==t?t:[])},f=function(e){e.title&&m(e.title)},d=function(){navigator.share&&navigator.share({title:g,url:e.article.originalArticleUrl})};return document.addEventListener("updateFontFamily",i),document.addEventListener("updateLineHeight",t),document.addEventListener("updateMaxWidthPercentage",o),document.addEventListener("updateTheme",s),document.addEventListener("updateFontSize",l),document.addEventListener("updateColorMode",u),document.addEventListener("handleFontContrastChange",a),document.addEventListener("updateTitle",f),document.addEventListener("updateLabels",c),document.addEventListener("share",d),document.addEventListener("handleAutoHighlightModeChange",n),function(){document.removeEventListener("updateFontFamily",i),document.removeEventListener("updateLineHeight",t),document.removeEventListener("updateMaxWidthPercentage",o),document.removeEventListener("updateTheme",s),document.removeEventListener("updateFontSize",l),document.removeEventListener("updateColorMode",u),document.removeEventListener("handleFontContrastChange",a),document.removeEventListener("updateTitle",f),document.removeEventListener("updateLabels",c),document.removeEventListener("share",d),document.removeEventListener("handleAutoHighlightModeChange",n)}}));var B={fontSize:x,margin:null!==(o=e.margin)&&void 0!==o?o:360,maxWidthPercentage:null!=O?O:e.maxWidthPercentage,lineHeight:null!==(i=null!=R?R:e.lineHeight)&&void 0!==i?i:150,fontFamily:null!==(a=null!=A?A:e.fontFamily)&&void 0!==a?a:"inter",readerFontColor:D?he.colors.readerFontHighContrast.toString():he.colors.readerFont.toString(),readerTableHeaderColor:he.colors.readerTableHeader.toString()},$=(0,s.useMemo)((function(){var t,n;return null!==(t=null===(n=e.article.recommendations)||void 0===n?void 0:n.filter((function(e){return e.note})))&&void 0!==t?t:[]}),[e.article.recommendations]);return(0,De.jsxs)(De.Fragment,{children:[(0,De.jsxs)(Fe,{id:"article-container",css:{padding:"16px",maxWidth:"".concat(null!==(l=B.maxWidthPercentage)&&void 0!==l?l:100,"%"),background:e.isAppleAppEmbed?"unset":he.colors.readerBg.toString(),"--text-font-family":B.fontFamily,"--text-font-size":"".concat(B.fontSize,"px"),"--line-height":"".concat(B.lineHeight,"%"),"--blockquote-padding":"0.5em 1em","--blockquote-icon-font-size":"1.3rem","--figure-margin":"1.6rem auto","--hr-margin":"1em","--font-color":B.readerFontColor,"--table-header-color":B.readerTableHeaderColor,"@sm":{"--blockquote-padding":"1em 2em","--blockquote-icon-font-size":"1.7rem","--figure-margin":"2.6875rem auto","--hr-margin":"2em",margin:"30px 0px"},"@md":{maxWidth:B.maxWidthPercentage?"".concat(B.maxWidthPercentage,"%"):1024-B.margin}},children:[(0,De.jsxs)(He,{alignment:"start",distribution:"start",children:[(0,De.jsx)(Hn,{style:"articleTitle","data-testid":"article-headline",css:{color:B.readerFontColor,fontFamily:B.fontFamily,width:"100%",wordWrap:"break-word"},children:g}),(0,De.jsx)(Vn,{rawDisplayDate:null!==(u=e.article.publishedAt)&&void 0!==u?u:e.article.createdAt,author:e.article.author,href:e.article.url}),d?(0,De.jsx)(ze,{css:{pb:"16px",width:"100%","&:empty":{display:"none"}},children:null==d?void 0:d.map((function(e){return(0,De.jsx)(wl,{text:e.name,color:e.color},e.id)}))}):null,$.length>0&&(0,De.jsx)(Lf,{recommendationsWithNotes:$})]}),(0,De.jsx)(Wn,{articleId:e.article.id,content:e.article.content,highlightHref:F,initialAnchorIndex:e.article.readingProgressAnchorIndex,articleMutations:e.articleMutations}),(0,De.jsxs)(Er,{style:"ghost",css:{p:0,my:"$4",color:"$error",fontSize:"$1","&:hover":{opacity:.8}},onClick:function(){return b(!0)},children:["Report issues with this page -",">"]}),(0,De.jsx)(Fe,{css:{height:"100px"}})]}),(0,De.jsx)(tf,{scrollToHighlight:F,highlights:e.article.highlights,articleTitle:g,articleAuthor:null!==(c=e.article.author)&&void 0!==c?c:"",articleId:e.article.id,isAppleAppEmbed:e.isAppleAppEmbed,highlightBarDisabled:e.highlightBarDisabled,showHighlightsModal:e.showHighlightsModal,setShowHighlightsModal:e.setShowHighlightsModal,highlightOnRelease:S,articleMutations:e.articleMutations}),y?(0,De.jsx)(af,{onCommit:function(t){!function(e){cf.apply(this,arguments)}({pageId:e.article.id,itemUrl:e.article.url,reportTypes:["CONTENT_DISPLAY"],reportComment:t})},onOpenChange:function(e){return b(e)}}):null]})}var Rf=o(3379),jf=o.n(Rf),Tf=o(7795),Af=o.n(Tf),Mf=o(569),If=o.n(Mf),Df=o(3565),Nf=o.n(Df),Ff=o(9216),zf=o.n(Ff),Bf=o(4589),$f=o.n(Bf),Wf=o(7420),Hf={};Hf.styleTagTransform=$f(),Hf.setAttributes=Nf(),Hf.insert=If().bind(null,"head"),Hf.domAPI=Af(),Hf.insertStyleElement=zf(),jf()(Wf.Z,Hf),Wf.Z&&Wf.Z.locals&&Wf.Z.locals;var Uf=o(2778),Vf={};function qf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Kf(t){for(var n=1;n0&&void 0!==arguments[0])||arguments[0];if("undefined"!=typeof window){var t=window.themeKey||window.localStorage.getItem(Tn);t&&Object.values(r).includes(t)&&(e?An(t):Mn(t))}}(!1),(0,De.jsx)(De.Fragment,{children:(0,De.jsx)(Fe,{css:{overflowY:"auto",height:"100%",width:"100vw"},children:(0,De.jsx)(He,{alignment:"center",distribution:"center",className:"disable-webkit-callout",children:(0,De.jsx)(Pf,{article:window.omnivoreArticle,labels:window.omnivoreArticle.labels,isAppleAppEmbed:!0,highlightBarDisabled:!window.enableHighlightBar,fontSize:null!==(e=window.fontSize)&&void 0!==e?e:18,fontFamily:null!==(t=window.fontFamily)&&void 0!==t?t:"inter",margin:window.margin,maxWidthPercentage:window.maxWidthPercentage,lineHeight:window.lineHeight,highlightOnRelease:window.highlightOnRelease,highContrastFont:null===(n=window.prefersHighContrastFont)||void 0===n||n,articleMutations:{createHighlightMutation:function(e){return Gf("createHighlight",e)},deleteHighlightMutation:function(e){return Gf("deleteHighlight",{highlightId:e})},mergeHighlightMutation:function(e){return Gf("mergeHighlight",e)},updateHighlightMutation:function(e){return Gf("updateHighlight",e)},articleReadingProgressMutation:function(e){return Gf("articleReadingProgress",e)}}})})})})};c.render((0,De.jsx)(Xf,{}),document.getElementById("root"))})()})();
\ No newline at end of file
+(()=>{var e,t,n={7162:(e,t,n)=>{e.exports=n(5047)},6279:function(e,t){var n="undefined"!=typeof self?self:this,r=function(){function e(){this.fetch=!1,this.DOMException=n.DOMException}return e.prototype=n,new e}();!function(e){!function(t){var n="URLSearchParams"in e,r="Symbol"in e&&"iterator"in Symbol,o="FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),i="FormData"in e,a="ArrayBuffer"in e;if(a)var l=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],s=ArrayBuffer.isView||function(e){return e&&l.indexOf(Object.prototype.toString.call(e))>-1};function u(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function c(e){return"string"!=typeof e&&(e=String(e)),e}function f(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return r&&(t[Symbol.iterator]=function(){return t}),t}function d(e){this.map={},e instanceof d?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function p(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function h(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function g(e){var t=new FileReader,n=h(t);return t.readAsArrayBuffer(e),n}function m(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function v(){return this.bodyUsed=!1,this._initBody=function(e){var t;this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:o&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:i&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:n&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():a&&o&&(t=e)&&DataView.prototype.isPrototypeOf(t)?(this._bodyArrayBuffer=m(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):a&&(ArrayBuffer.prototype.isPrototypeOf(e)||s(e))?this._bodyArrayBuffer=m(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):n&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},o&&(this.blob=function(){var e=p(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?p(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(g)}),this.text=function(){var e,t,n,r=p(this);if(r)return r;if(this._bodyBlob)return e=this._bodyBlob,n=h(t=new FileReader),t.readAsText(e),n;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r-1?r:n),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&o)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(o)}function w(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),o=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(o))}})),t}function x(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new d(t.headers),this.url=t.url||"",this._initBody(e)}b.prototype.clone=function(){return new b(this,{body:this._bodyInit})},v.call(b.prototype),v.call(x.prototype),x.prototype.clone=function(){return new x(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new d(this.headers),url:this.url})},x.error=function(){var e=new x(null,{status:0,statusText:""});return e.type="error",e};var E=[301,302,303,307,308];x.redirect=function(e,t){if(-1===E.indexOf(t))throw new RangeError("Invalid status code");return new x(null,{status:t,headers:{location:e}})},t.DOMException=e.DOMException;try{new t.DOMException}catch(e){t.DOMException=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function k(e,n){return new Promise((function(r,i){var a=new b(e,n);if(a.signal&&a.signal.aborted)return i(new t.DOMException("Aborted","AbortError"));var l=new XMLHttpRequest;function s(){l.abort()}l.onload=function(){var e,t,n={status:l.status,statusText:l.statusText,headers:(e=l.getAllResponseHeaders()||"",t=new d,e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(e){var n=e.split(":"),r=n.shift().trim();if(r){var o=n.join(":").trim();t.append(r,o)}})),t)};n.url="responseURL"in l?l.responseURL:n.headers.get("X-Request-URL");var o="response"in l?l.response:l.responseText;r(new x(o,n))},l.onerror=function(){i(new TypeError("Network request failed"))},l.ontimeout=function(){i(new TypeError("Network request failed"))},l.onabort=function(){i(new t.DOMException("Aborted","AbortError"))},l.open(a.method,a.url,!0),"include"===a.credentials?l.withCredentials=!0:"omit"===a.credentials&&(l.withCredentials=!1),"responseType"in l&&o&&(l.responseType="blob"),a.headers.forEach((function(e,t){l.setRequestHeader(t,e)})),a.signal&&(a.signal.addEventListener("abort",s),l.onreadystatechange=function(){4===l.readyState&&a.signal.removeEventListener("abort",s)}),l.send(void 0===a._bodyInit?null:a._bodyInit)}))}k.polyfill=!0,e.fetch||(e.fetch=k,e.Headers=d,e.Request=b,e.Response=x),t.Headers=d,t.Request=b,t.Response=x,t.fetch=k,Object.defineProperty(t,"__esModule",{value:!0})}({})}(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var o=r;(t=o.fetch).default=o.fetch,t.fetch=o.fetch,t.Headers=o.Headers,t.Request=o.Request,t.Response=o.Response,e.exports=t},1427:e=>{var t=function(){this.Diff_Timeout=1,this.Diff_EditCost=4,this.Match_Threshold=.5,this.Match_Distance=1e3,this.Patch_DeleteThreshold=.5,this.Patch_Margin=4,this.Match_MaxBits=32},n=-1;t.Diff=function(e,t){return[e,t]},t.prototype.diff_main=function(e,n,r,o){void 0===o&&(o=this.Diff_Timeout<=0?Number.MAX_VALUE:(new Date).getTime()+1e3*this.Diff_Timeout);var i=o;if(null==e||null==n)throw new Error("Null input. (diff_main)");if(e==n)return e?[new t.Diff(0,e)]:[];void 0===r&&(r=!0);var a=r,l=this.diff_commonPrefix(e,n),s=e.substring(0,l);e=e.substring(l),n=n.substring(l),l=this.diff_commonSuffix(e,n);var u=e.substring(e.length-l);e=e.substring(0,e.length-l),n=n.substring(0,n.length-l);var c=this.diff_compute_(e,n,a,i);return s&&c.unshift(new t.Diff(0,s)),u&&c.push(new t.Diff(0,u)),this.diff_cleanupMerge(c),c},t.prototype.diff_compute_=function(e,r,o,i){var a;if(!e)return[new t.Diff(1,r)];if(!r)return[new t.Diff(n,e)];var l=e.length>r.length?e:r,s=e.length>r.length?r:e,u=l.indexOf(s);if(-1!=u)return a=[new t.Diff(1,l.substring(0,u)),new t.Diff(0,s),new t.Diff(1,l.substring(u+s.length))],e.length>r.length&&(a[0][0]=a[2][0]=n),a;if(1==s.length)return[new t.Diff(n,e),new t.Diff(1,r)];var c=this.diff_halfMatch_(e,r);if(c){var f=c[0],d=c[1],p=c[2],h=c[3],g=c[4],m=this.diff_main(f,p,o,i),v=this.diff_main(d,h,o,i);return m.concat([new t.Diff(0,g)],v)}return o&&e.length>100&&r.length>100?this.diff_lineMode_(e,r,i):this.diff_bisect_(e,r,i)},t.prototype.diff_lineMode_=function(e,r,o){var i=this.diff_linesToChars_(e,r);e=i.chars1,r=i.chars2;var a=i.lineArray,l=this.diff_main(e,r,!1,o);this.diff_charsToLines_(l,a),this.diff_cleanupSemantic(l),l.push(new t.Diff(0,""));for(var s=0,u=0,c=0,f="",d="";s=1&&c>=1){l.splice(s-u-c,u+c),s=s-u-c;for(var p=this.diff_main(f,d,!1,o),h=p.length-1;h>=0;h--)l.splice(s,0,p[h]);s+=p.length}c=0,u=0,f="",d=""}s++}return l.pop(),l},t.prototype.diff_bisect_=function(e,r,o){for(var i=e.length,a=r.length,l=Math.ceil((i+a)/2),s=l,u=2*l,c=new Array(u),f=new Array(u),d=0;do);b++){for(var w=-b+g;w<=b-m;w+=2){for(var x=s+w,E=(O=w==-b||w!=b&&c[x-1]i)m+=2;else if(E>a)g+=2;else if(h&&(_=s+p-w)>=0&&_=(S=i-f[_]))return this.diff_bisectSplit_(e,r,O,E,o)}for(var k=-b+v;k<=b-y;k+=2){for(var S,_=s+k,C=(S=k==-b||k!=b&&f[_-1]i)y+=2;else if(C>a)v+=2;else if(!h){var O;if((x=s+p-k)>=0&&x=(S=i-S))return this.diff_bisectSplit_(e,r,O,E,o)}}}return[new t.Diff(n,e),new t.Diff(1,r)]},t.prototype.diff_bisectSplit_=function(e,t,n,r,o){var i=e.substring(0,n),a=t.substring(0,r),l=e.substring(n),s=t.substring(r),u=this.diff_main(i,a,!1,o),c=this.diff_main(l,s,!1,o);return u.concat(c)},t.prototype.diff_linesToChars_=function(e,t){var n=[],r={};function o(e){for(var t="",o=0,a=-1,l=n.length;ar?e=e.substring(n-r):nt.length?e:t,r=e.length>t.length?t:e;if(n.length<4||2*r.length=e.length?[r,i,a,l,c]:null}var a,l,s,u,c,f=i(n,r,Math.ceil(n.length/4)),d=i(n,r,Math.ceil(n.length/2));return f||d?(a=d?f&&f[4].length>d[4].length?f:d:f,e.length>t.length?(l=a[0],s=a[1],u=a[2],c=a[3]):(u=a[0],c=a[1],l=a[2],s=a[3]),[l,s,u,c,a[4]]):null},t.prototype.diff_cleanupSemantic=function(e){for(var r=!1,o=[],i=0,a=null,l=0,s=0,u=0,c=0,f=0;l0?o[i-1]:-1,s=0,u=0,c=0,f=0,a=null,r=!0)),l++;for(r&&this.diff_cleanupMerge(e),this.diff_cleanupSemanticLossless(e),l=1;l=g?(h>=d.length/2||h>=p.length/2)&&(e.splice(l,0,new t.Diff(0,p.substring(0,h))),e[l-1][1]=d.substring(0,d.length-h),e[l+1][1]=p.substring(h),l++):(g>=d.length/2||g>=p.length/2)&&(e.splice(l,0,new t.Diff(0,d.substring(0,g))),e[l-1][0]=1,e[l-1][1]=p.substring(0,p.length-g),e[l+1][0]=n,e[l+1][1]=d.substring(g),l++),l++}l++}},t.prototype.diff_cleanupSemanticLossless=function(e){function n(e,n){if(!e||!n)return 6;var r=e.charAt(e.length-1),o=n.charAt(0),i=r.match(t.nonAlphaNumericRegex_),a=o.match(t.nonAlphaNumericRegex_),l=i&&r.match(t.whitespaceRegex_),s=a&&o.match(t.whitespaceRegex_),u=l&&r.match(t.linebreakRegex_),c=s&&o.match(t.linebreakRegex_),f=u&&e.match(t.blanklineEndRegex_),d=c&&n.match(t.blanklineStartRegex_);return f||d?5:u||c?4:i&&!l&&s?3:l||s?2:i||a?1:0}for(var r=1;r=d&&(d=p,u=o,c=i,f=a)}e[r-1][1]!=u&&(u?e[r-1][1]=u:(e.splice(r-1,1),r--),e[r][1]=c,f?e[r+1][1]=f:(e.splice(r+1,1),r--))}r++}},t.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,t.whitespaceRegex_=/\s/,t.linebreakRegex_=/[\r\n]/,t.blanklineEndRegex_=/\n\r?\n$/,t.blanklineStartRegex_=/^\r?\n\r?\n/,t.prototype.diff_cleanupEfficiency=function(e){for(var r=!1,o=[],i=0,a=null,l=0,s=!1,u=!1,c=!1,f=!1;l0?o[i-1]:-1,c=f=!1),r=!0)),l++;r&&this.diff_cleanupMerge(e)},t.prototype.diff_cleanupMerge=function(e){e.push(new t.Diff(0,""));for(var r,o=0,i=0,a=0,l="",s="";o1?(0!==i&&0!==a&&(0!==(r=this.diff_commonPrefix(s,l))&&(o-i-a>0&&0==e[o-i-a-1][0]?e[o-i-a-1][1]+=s.substring(0,r):(e.splice(0,0,new t.Diff(0,s.substring(0,r))),o++),s=s.substring(r),l=l.substring(r)),0!==(r=this.diff_commonSuffix(s,l))&&(e[o][1]=s.substring(s.length-r)+e[o][1],s=s.substring(0,s.length-r),l=l.substring(0,l.length-r))),o-=i+a,e.splice(o,i+a),l.length&&(e.splice(o,0,new t.Diff(n,l)),o++),s.length&&(e.splice(o,0,new t.Diff(1,s)),o++),o++):0!==o&&0==e[o-1][0]?(e[o-1][1]+=e[o][1],e.splice(o,1)):o++,a=0,i=0,l="",s=""}""===e[e.length-1][1]&&e.pop();var u=!1;for(o=1;ot));r++)a=o,l=i;return e.length!=r&&e[r][0]===n?l:l+(t-a)},t.prototype.diff_prettyHtml=function(e){for(var t=[],r=/&/g,o=//g,a=/\n/g,l=0;l");switch(s){case 1:t[l]=''+u+"";break;case n:t[l]=''+u+"";break;case 0:t[l]=""+u+""}}return t.join("")},t.prototype.diff_text1=function(e){for(var t=[],n=0;nthis.Match_MaxBits)throw new Error("Pattern too long for this browser.");var r=this.match_alphabet_(t),o=this;function i(e,r){var i=e/t.length,a=Math.abs(n-r);return o.Match_Distance?i+a/o.Match_Distance:a?1:i}var a=this.Match_Threshold,l=e.indexOf(t,n);-1!=l&&(a=Math.min(i(0,l),a),-1!=(l=e.lastIndexOf(t,n+t.length))&&(a=Math.min(i(0,l),a)));var s,u,c=1<=h;v--){var y=r[e.charAt(v-1)];if(m[v]=0===p?(m[v+1]<<1|1)&y:(m[v+1]<<1|1)&y|(f[v+1]|f[v])<<1|1|f[v+1],m[v]&c){var b=i(p,v-1);if(b<=a){if(a=b,!((l=v-1)>n))break;h=Math.max(1,2*n-l)}}}if(i(p+1,n)>a)break;f=m}return l},t.prototype.match_alphabet_=function(e){for(var t={},n=0;n2&&(this.diff_cleanupSemantic(a),this.diff_cleanupEfficiency(a));else if(e&&"object"==typeof e&&void 0===r&&void 0===o)a=e,i=this.diff_text1(a);else if("string"==typeof e&&r&&"object"==typeof r&&void 0===o)i=e,a=r;else{if("string"!=typeof e||"string"!=typeof r||!o||"object"!=typeof o)throw new Error("Unknown call format to patch_make.");i=e,a=o}if(0===a.length)return[];for(var l=[],s=new t.patch_obj,u=0,c=0,f=0,d=i,p=i,h=0;h=2*this.Patch_Margin&&u&&(this.patch_addContext_(s,d),l.push(s),s=new t.patch_obj,u=0,d=p,c=f)}1!==g&&(c+=m.length),g!==n&&(f+=m.length)}return u&&(this.patch_addContext_(s,d),l.push(s)),l},t.prototype.patch_deepCopy=function(e){for(var n=[],r=0;rthis.Match_MaxBits?-1!=(l=this.match_main(t,c.substring(0,this.Match_MaxBits),u))&&(-1==(f=this.match_main(t,c.substring(c.length-this.Match_MaxBits),u+c.length-this.Match_MaxBits))||l>=f)&&(l=-1):l=this.match_main(t,c,u),-1==l)i[a]=!1,o-=e[a].length2-e[a].length1;else if(i[a]=!0,o=l-u,c==(s=-1==f?t.substring(l,l+c.length):t.substring(l,f+this.Match_MaxBits)))t=t.substring(0,l)+this.diff_text2(e[a].diffs)+t.substring(l+c.length);else{var d=this.diff_main(c,s,!1);if(c.length>this.Match_MaxBits&&this.diff_levenshtein(d)/c.length>this.Patch_DeleteThreshold)i[a]=!1;else{this.diff_cleanupSemanticLossless(d);for(var p,h=0,g=0;ga[0][1].length){var l=n-a[0][1].length;a[0][1]=r.substring(a[0][1].length)+a[0][1],i.start1-=l,i.start2-=l,i.length1+=l,i.length2+=l}return 0==(a=(i=e[e.length-1]).diffs).length||0!=a[a.length-1][0]?(a.push(new t.Diff(0,r)),i.length1+=n,i.length2+=n):n>a[a.length-1][1].length&&(l=n-a[a.length-1][1].length,a[a.length-1][1]+=r.substring(0,l),i.length1+=l,i.length2+=l),r},t.prototype.patch_splitMax=function(e){for(var r=this.Match_MaxBits,o=0;o2*r?(u.length1+=d.length,a+=d.length,c=!1,u.diffs.push(new t.Diff(f,d)),i.diffs.shift()):(d=d.substring(0,r-u.length1-this.Patch_Margin),u.length1+=d.length,a+=d.length,0===f?(u.length2+=d.length,l+=d.length):c=!1,u.diffs.push(new t.Diff(f,d)),d==i.diffs[0][1]?i.diffs.shift():i.diffs[0][1]=i.diffs[0][1].substring(d.length))}s=(s=this.diff_text2(u.diffs)).substring(s.length-this.Patch_Margin);var p=this.diff_text1(i.diffs).substring(0,this.Patch_Margin);""!==p&&(u.length1+=p.length,u.length2+=p.length,0!==u.diffs.length&&0===u.diffs[u.diffs.length-1][0]?u.diffs[u.diffs.length-1][1]+=p:u.diffs.push(new t.Diff(0,p))),c||e.splice(++o,0,u)}}},t.prototype.patch_toText=function(e){for(var t=[],n=0;n{"use strict";e.exports=function(e){var t=e.uri,n=e.name,r=e.type;this.uri=t,this.name=n,this.type=r}},2929:(e,t,n)=>{"use strict";var r=n(1278);e.exports=function e(t,n,o){var i;void 0===n&&(n=""),void 0===o&&(o=r);var a=new Map;function l(e,t){var n=a.get(t);n?n.push.apply(n,e):a.set(t,e)}if(o(t))i=null,l([n],t);else{var s=n?n+".":"";if("undefined"!=typeof FileList&&t instanceof FileList)i=Array.prototype.map.call(t,(function(e,t){return l([""+s+t],e),null}));else if(Array.isArray(t))i=t.map((function(t,n){var r=e(t,""+s+n,o);return r.files.forEach(l),r.clone}));else if(t&&t.constructor===Object)for(var u in i={},t){var c=e(t[u],""+s+u,o);c.files.forEach(l),i[u]=c.clone}else i=t}return{clone:i,files:a}}},9384:(e,t,n)=>{"use strict";t.ReactNativeFile=n(7570),t.extractFiles=n(2929),t.isExtractableFile=n(1278)},1278:(e,t,n)=>{"use strict";var r=n(7570);e.exports=function(e){return"undefined"!=typeof File&&e instanceof File||"undefined"!=typeof Blob&&e instanceof Blob||e instanceof r}},1688:e=>{e.exports="object"==typeof self?self.FormData:window.FormData},8749:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(9384),i=r(n(1688)),a=function(e){return o.isExtractableFile(e)||null!==e&&"object"==typeof e&&"function"==typeof e.pipe};t.default=function(e,t,n){var r=o.extractFiles({query:e,variables:t,operationName:n},"",a),l=r.clone,s=r.files;if(0===s.size){if(!Array.isArray(e))return JSON.stringify(l);if(void 0!==t&&!Array.isArray(t))throw new Error("Cannot create request body with given variable type, array expected");var u=e.reduce((function(e,n,r){return e.push({query:n,variables:t?t[r]:void 0}),e}),[]);return JSON.stringify(u)}var c=new("undefined"==typeof FormData?i.default:FormData);c.append("operations",JSON.stringify(l));var f={},d=0;return s.forEach((function(e){f[++d]=e})),c.append("map",JSON.stringify(f)),d=0,s.forEach((function(e,t){c.append(""+ ++d,t)})),c}},6647:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.prototype.toJSON;"function"==typeof t||(0,r.default)(0),e.prototype.inspect=t,o.default&&(e.prototype[o.default]=t)};var r=i(n(5006)),o=i(n(8019));function i(e){return e&&e.__esModule?e:{default:e}}},8048:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return a(e,[])};var r,o=(r=n(8019))&&r.__esModule?r:{default:r};function i(e){return i="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},i(e)}function a(e,t){switch(i(e)){case"string":return JSON.stringify(e);case"function":return e.name?"[function ".concat(e.name,"]"):"[function]";case"object":return null===e?"null":function(e,t){if(-1!==t.indexOf(e))return"[Circular]";var n=[].concat(t,[e]),r=function(e){var t=e[String(o.default)];return"function"==typeof t?t:"function"==typeof e.inspect?e.inspect:void 0}(e);if(void 0!==r){var i=r.call(e);if(i!==e)return"string"==typeof i?i:a(i,n)}else if(Array.isArray(e))return function(e,t){if(0===e.length)return"[]";if(t.length>2)return"[Array]";for(var n=Math.min(10,e.length),r=e.length-n,o=[],i=0;i1&&o.push("... ".concat(r," more items")),"["+o.join(", ")+"]"}(e,n);return function(e,t){var n=Object.keys(e);return 0===n.length?"{}":t.length>2?"["+function(e){var t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if("Object"===t&&"function"==typeof e.constructor){var n=e.constructor.name;if("string"==typeof n&&""!==n)return n}return t}(e)+"]":"{ "+n.map((function(n){return n+": "+a(e[n],t)})).join(", ")+" }"}(e,n)}(e,t);default:return String(e)}}},5006:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(!Boolean(e))throw new Error(null!=t?t:"Unexpected invariant triggered.")}},8019:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):void 0;t.default=n},4560:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isNode=function(e){return null!=e&&"string"==typeof e.kind},t.Token=t.Location=void 0;var r,o=(r=n(2678))&&r.__esModule?r:{default:r},i=function(){function e(e,t,n){this.start=e.start,this.end=t.end,this.startToken=e,this.endToken=t,this.source=n}return e.prototype.toJSON=function(){return{start:this.start,end:this.end}},e}();t.Location=i,(0,o.default)(i);var a=function(){function e(e,t,n,r,o,i,a){this.kind=e,this.start=t,this.end=n,this.line=r,this.column=o,this.value=a,this.prev=i,this.next=null}return e.prototype.toJSON=function(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}},e}();t.Token=a,(0,o.default)(a)},9501:(e,t)=>{"use strict";function n(e){for(var t=0;ta&&n(t[l-1]);)--l;return t.slice(a,l).join("\n")},t.getBlockStringIndentation=r,t.printBlockString=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=-1===e.indexOf("\n"),o=" "===e[0]||"\t"===e[0],i='"'===e[e.length-1],a="\\"===e[e.length-1],l=!r||i||a||n,s="";return!l||r&&o||(s+="\n"+t),s+=t?e.replace(/\n/g,"\n"+t):e,l&&(s+="\n"),'"""'+s.replace(/"""/g,'\\"""')+'"""'}},3083:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.print=function(e){return(0,r.visit)(e,{leave:i})};var r=n(2624),o=n(9501),i={Name:function(e){return e.value},Variable:function(e){return"$"+e.name},Document:function(e){return l(e.definitions,"\n\n")+"\n"},OperationDefinition:function(e){var t=e.operation,n=e.name,r=u("(",l(e.variableDefinitions,", "),")"),o=l(e.directives," "),i=e.selectionSet;return n||o||r||"query"!==t?l([t,l([n,r]),o,i]," "):i},VariableDefinition:function(e){var t=e.variable,n=e.type,r=e.defaultValue,o=e.directives;return t+": "+n+u(" = ",r)+u(" ",l(o," "))},SelectionSet:function(e){return s(e.selections)},Field:function(e){var t=e.alias,n=e.name,r=e.arguments,o=e.directives,i=e.selectionSet,a=u("",t,": ")+n,s=a+u("(",l(r,", "),")");return s.length>80&&(s=a+u("(\n",c(l(r,"\n")),"\n)")),l([s,l(o," "),i]," ")},Argument:function(e){return e.name+": "+e.value},FragmentSpread:function(e){return"..."+e.name+u(" ",l(e.directives," "))},InlineFragment:function(e){var t=e.typeCondition,n=e.directives,r=e.selectionSet;return l(["...",u("on ",t),l(n," "),r]," ")},FragmentDefinition:function(e){var t=e.name,n=e.typeCondition,r=e.variableDefinitions,o=e.directives,i=e.selectionSet;return"fragment ".concat(t).concat(u("(",l(r,", "),")")," ")+"on ".concat(n," ").concat(u("",l(o," ")," "))+i},IntValue:function(e){return e.value},FloatValue:function(e){return e.value},StringValue:function(e,t){var n=e.value;return e.block?(0,o.printBlockString)(n,"description"===t?"":" "):JSON.stringify(n)},BooleanValue:function(e){return e.value?"true":"false"},NullValue:function(){return"null"},EnumValue:function(e){return e.value},ListValue:function(e){return"["+l(e.values,", ")+"]"},ObjectValue:function(e){return"{"+l(e.fields,", ")+"}"},ObjectField:function(e){return e.name+": "+e.value},Directive:function(e){return"@"+e.name+u("(",l(e.arguments,", "),")")},NamedType:function(e){return e.name},ListType:function(e){return"["+e.type+"]"},NonNullType:function(e){return e.type+"!"},SchemaDefinition:a((function(e){var t=e.directives,n=e.operationTypes;return l(["schema",l(t," "),s(n)]," ")})),OperationTypeDefinition:function(e){return e.operation+": "+e.type},ScalarTypeDefinition:a((function(e){return l(["scalar",e.name,l(e.directives," ")]," ")})),ObjectTypeDefinition:a((function(e){var t=e.name,n=e.interfaces,r=e.directives,o=e.fields;return l(["type",t,u("implements ",l(n," & ")),l(r," "),s(o)]," ")})),FieldDefinition:a((function(e){var t=e.name,n=e.arguments,r=e.type,o=e.directives;return t+(d(n)?u("(\n",c(l(n,"\n")),"\n)"):u("(",l(n,", "),")"))+": "+r+u(" ",l(o," "))})),InputValueDefinition:a((function(e){var t=e.name,n=e.type,r=e.defaultValue,o=e.directives;return l([t+": "+n,u("= ",r),l(o," ")]," ")})),InterfaceTypeDefinition:a((function(e){var t=e.name,n=e.interfaces,r=e.directives,o=e.fields;return l(["interface",t,u("implements ",l(n," & ")),l(r," "),s(o)]," ")})),UnionTypeDefinition:a((function(e){var t=e.name,n=e.directives,r=e.types;return l(["union",t,l(n," "),r&&0!==r.length?"= "+l(r," | "):""]," ")})),EnumTypeDefinition:a((function(e){var t=e.name,n=e.directives,r=e.values;return l(["enum",t,l(n," "),s(r)]," ")})),EnumValueDefinition:a((function(e){return l([e.name,l(e.directives," ")]," ")})),InputObjectTypeDefinition:a((function(e){var t=e.name,n=e.directives,r=e.fields;return l(["input",t,l(n," "),s(r)]," ")})),DirectiveDefinition:a((function(e){var t=e.name,n=e.arguments,r=e.repeatable,o=e.locations;return"directive @"+t+(d(n)?u("(\n",c(l(n,"\n")),"\n)"):u("(",l(n,", "),")"))+(r?" repeatable":"")+" on "+l(o," | ")})),SchemaExtension:function(e){var t=e.directives,n=e.operationTypes;return l(["extend schema",l(t," "),s(n)]," ")},ScalarTypeExtension:function(e){return l(["extend scalar",e.name,l(e.directives," ")]," ")},ObjectTypeExtension:function(e){var t=e.name,n=e.interfaces,r=e.directives,o=e.fields;return l(["extend type",t,u("implements ",l(n," & ")),l(r," "),s(o)]," ")},InterfaceTypeExtension:function(e){var t=e.name,n=e.interfaces,r=e.directives,o=e.fields;return l(["extend interface",t,u("implements ",l(n," & ")),l(r," "),s(o)]," ")},UnionTypeExtension:function(e){var t=e.name,n=e.directives,r=e.types;return l(["extend union",t,l(n," "),r&&0!==r.length?"= "+l(r," | "):""]," ")},EnumTypeExtension:function(e){var t=e.name,n=e.directives,r=e.values;return l(["extend enum",t,l(n," "),s(r)]," ")},InputObjectTypeExtension:function(e){var t=e.name,n=e.directives,r=e.fields;return l(["extend input",t,l(n," "),s(r)]," ")}};function a(e){return function(t){return l([t.description,e(t)],"\n")}}function l(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return null!==(t=null==e?void 0:e.filter((function(e){return e})).join(n))&&void 0!==t?t:""}function s(e){return u("{\n",c(l(e,"\n")),"\n}")}function u(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return null!=t&&""!==t?e+t+n:""}function c(e){return u(" ",e.replace(/\n/g,"\n "))}function f(e){return-1!==e.indexOf("\n")}function d(e){return null!=e&&e.some(f)}},2624:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.visit=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:a,r=void 0,u=Array.isArray(e),c=[e],f=-1,d=[],p=void 0,h=void 0,g=void 0,m=[],v=[],y=e;do{var b=++f===c.length,w=b&&0!==d.length;if(b){if(h=0===v.length?void 0:m[m.length-1],p=g,g=v.pop(),w){if(u)p=p.slice();else{for(var x={},E=0,k=Object.keys(p);E{var r=n(7772).Symbol;e.exports=r},3366:(e,t,n)=>{var r=n(857),o=n(2107),i=n(7157),a=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?o(e):i(e)}},1704:(e,t,n)=>{var r=n(2153),o=/^\s+/;e.exports=function(e){return e?e.slice(0,r(e)+1).replace(o,""):e}},1242:(e,t,n)=>{var r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;e.exports=r},2107:(e,t,n)=>{var r=n(857),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,l=r?r.toStringTag:void 0;e.exports=function(e){var t=i.call(e,l),n=e[l];try{e[l]=void 0;var r=!0}catch(e){}var o=a.call(e);return r&&(t?e[l]=n:delete e[l]),o}},7157:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},7772:(e,t,n)=>{var r=n(1242),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();e.exports=i},2153:e=>{var t=/\s/;e.exports=function(e){for(var n=e.length;n--&&t.test(e.charAt(n)););return n}},4073:(e,t,n)=>{var r=n(9259),o=n(1100),i=n(7642),a=Math.max,l=Math.min;e.exports=function(e,t,n){var s,u,c,f,d,p,h=0,g=!1,m=!1,v=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function y(t){var n=s,r=u;return s=u=void 0,h=t,f=e.apply(r,n)}function b(e){return h=e,d=setTimeout(x,t),g?y(e):f}function w(e){var n=e-p;return void 0===p||n>=t||n<0||m&&e-h>=c}function x(){var e=o();if(w(e))return E(e);d=setTimeout(x,function(e){var n=t-(e-p);return m?l(n,c-(e-h)):n}(e))}function E(e){return d=void 0,v&&s?y(e):(s=u=void 0,f)}function k(){var e=o(),n=w(e);if(s=arguments,u=this,p=e,n){if(void 0===d)return b(p);if(m)return clearTimeout(d),d=setTimeout(x,t),y(p)}return void 0===d&&(d=setTimeout(x,t)),f}return t=i(t)||0,r(n)&&(g=!!n.leading,c=(m="maxWait"in n)?a(i(n.maxWait)||0,t):c,v="trailing"in n?!!n.trailing:v),k.cancel=function(){void 0!==d&&clearTimeout(d),h=0,s=p=u=d=void 0},k.flush=function(){return void 0===d?f:E(o())},k}},9259:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},5125:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},4795:(e,t,n)=>{var r=n(3366),o=n(5125);e.exports=function(e){return"symbol"==typeof e||o(e)&&"[object Symbol]"==r(e)}},1100:(e,t,n)=>{var r=n(7772);e.exports=function(){return r.Date.now()}},7642:(e,t,n)=>{var r=n(1704),o=n(9259),i=n(4795),a=/^[-+]0x[0-9a-f]+$/i,l=/^0b[01]+$/i,s=/^0o[0-7]+$/i,u=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(i(e))return NaN;if(o(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=o(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=r(e);var n=l.test(e);return n||s.test(e)?u(e.slice(2),n?2:8):a.test(e)?NaN:+e}},9410:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){let e=null;return{mountedInstances:new Set,updateHead:t=>{const n=e=Promise.resolve().then((()=>{if(n!==e)return;e=null;const i={};t.forEach((e=>{if("link"===e.type&&e.props["data-optimized-fonts"]){if(document.querySelector(`style[data-href="${e.props["data-href"]}"]`))return;e.props.href=e.props["data-href"],e.props["data-href"]=void 0}const t=i[e.type]||[];t.push(e),i[e.type]=t}));const a=i.title?i.title[0]:null;let l="";if(a){const{children:e}=a.props;l="string"==typeof e?e:Array.isArray(e)?e.join(""):""}l!==document.title&&(document.title=l),["meta","base","link","style","script"].forEach((e=>{!function(e,t){const n=document.getElementsByTagName("head")[0],i=n.querySelector("meta[name=next-head-count]"),a=Number(i.content),l=[];for(let t=0,n=i.previousElementSibling;t{for(let t=0,n=l.length;t{var t;return null===(t=e.parentNode)||void 0===t?void 0:t.removeChild(e)})),u.forEach((e=>n.insertBefore(e,i))),i.content=(a-l.length+u.length).toString()}(e,i[e]||[])}))}))}}},t.isEqualNode=o,t.DOMAttributeNames=void 0;const n={acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv",noModule:"noModule"};function r({type:e,props:t}){const r=document.createElement(e);for(const o in t){if(!t.hasOwnProperty(o))continue;if("children"===o||"dangerouslySetInnerHTML"===o)continue;if(void 0===t[o])continue;const i=n[o]||o.toLowerCase();"script"!==e||"async"!==i&&"defer"!==i&&"noModule"!==i?r.setAttribute(i,t[o]):r[i]=!!t[o]}const{children:o,dangerouslySetInnerHTML:i}=t;return i?r.innerHTML=i.__html||"":o&&(r.textContent="string"==typeof o?o:Array.isArray(o)?o.join(""):""),r}function o(e,t){if(e instanceof HTMLElement&&t instanceof HTMLElement){const n=t.getAttribute("nonce");if(n&&!e.getAttribute("nonce")){const r=t.cloneNode(!0);return r.setAttribute("nonce",""),r.nonce=n,n===e.nonce&&e.isEqualNode(r)}}return e.isEqualNode(t)}t.DOMAttributeNames=n,("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&(Object.assign(t.default,t),e.exports=t.default)},4529:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,o=(r=n(2784))&&r.__esModule?r:{default:r},i=n(6640),a=n(9518),l=n(3321);const s={};function u(e,t,n,r){if("undefined"==typeof window||!e)return;if(!i.isLocalURL(t))return;e.prefetch(t,n,r).catch((e=>{}));const o=r&&void 0!==r.locale?r.locale:e&&e.locale;s[t+"%"+n+(o?"%"+o:"")]=!0}var c=o.default.forwardRef(((e,t)=>{const{legacyBehavior:n=!0!==Boolean(window.omnivoreEnv.__NEXT_NEW_LINK_BEHAVIOR)}=e;let r;const{href:c,as:f,children:d,prefetch:p,passHref:h,replace:g,shallow:m,scroll:v,locale:y,onClick:b,onMouseEnter:w}=e,x=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["href","as","children","prefetch","passHref","replace","shallow","scroll","locale","onClick","onMouseEnter"]);r=d,n&&"string"==typeof r&&(r=o.default.createElement("a",null,r));const E=!1!==p,k=a.useRouter(),{href:S,as:_}=o.default.useMemo((()=>{const[e,t]=i.resolveHref(k,c,!0);return{href:e,as:f?i.resolveHref(k,f):t||e}}),[k,c,f]),C=o.default.useRef(S),O=o.default.useRef(_);let L;n&&(L=o.default.Children.only(r));const P=n?L&&"object"==typeof L&&L.ref:t,[R,j,T]=l.useIntersection({rootMargin:"200px"}),A=o.default.useCallback((e=>{O.current===_&&C.current===S||(T(),O.current=_,C.current=S),R(e),P&&("function"==typeof P?P(e):"object"==typeof P&&(P.current=e))}),[_,P,S,T,R]);o.default.useEffect((()=>{const e=j&&E&&i.isLocalURL(S),t=void 0!==y?y:k&&k.locale,n=s[S+"%"+_+(t?"%"+t:"")];e&&!n&&u(k,S,_,{locale:t})}),[_,S,j,y,E,k]);const M={ref:A,onClick:e=>{n||"function"!=typeof b||b(e),n&&L.props&&"function"==typeof L.props.onClick&&L.props.onClick(e),e.defaultPrevented||function(e,t,n,r,o,a,l,s){const{nodeName:u}=e.currentTarget;("A"!==u.toUpperCase()||!function(e){const{target:t}=e.currentTarget;return t&&"_self"!==t||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||e.nativeEvent&&2===e.nativeEvent.which}(e)&&i.isLocalURL(n))&&(e.preventDefault(),t[o?"replace":"push"](n,r,{shallow:a,locale:s,scroll:l}))}(e,k,S,_,g,m,v,y)},onMouseEnter:e=>{n||"function"!=typeof w||w(e),n&&L.props&&"function"==typeof L.props.onMouseEnter&&L.props.onMouseEnter(e),i.isLocalURL(S)&&u(k,S,_,{priority:!0})}};if(!n||h||"a"===L.type&&!("href"in L.props)){const e=void 0!==y?y:k&&k.locale,t=k&&k.isLocaleDomain&&i.getDomainLocale(_,e,k&&k.locales,k&&k.domainLocales);M.href=t||i.addBasePath(i.addLocale(_,e,k&&k.defaultLocale))}return n?o.default.cloneElement(L,M):o.default.createElement("a",Object.assign({},x,M),r)}));t.default=c,("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&(Object.assign(t.default,t),e.exports=t.default)},1119:(e,t)=>{"use strict";function n(e){return e.endsWith("/")&&"/"!==e?e.slice(0,-1):e}Object.defineProperty(t,"__esModule",{value:!0}),t.removePathTrailingSlash=n,t.normalizePathTrailingSlash=void 0;const r=window.omnivoreEnv.__NEXT_TRAILING_SLASH?e=>/\.[^/]+\/?$/.test(e)?n(e):e.endsWith("/")?e:e+"/":n;t.normalizePathTrailingSlash=r,("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&(Object.assign(t.default,t),e.exports=t.default)},1976:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.cancelIdleCallback=t.requestIdleCallback=void 0;const n="undefined"!=typeof self&&self.requestIdleCallback&&self.requestIdleCallback.bind(window)||function(e){let t=Date.now();return setTimeout((function(){e({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-t))}})}),1)};t.requestIdleCallback=n;const r="undefined"!=typeof self&&self.cancelIdleCallback&&self.cancelIdleCallback.bind(window)||function(e){return clearTimeout(e)};t.cancelIdleCallback=r,("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&(Object.assign(t.default,t),e.exports=t.default)},7928:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.markAssetError=u,t.isAssetError=function(e){return e&&s in e},t.getClientBuildManifest=f,t.getMiddlewareManifest=function(){return self.__MIDDLEWARE_MANIFEST?Promise.resolve(self.__MIDDLEWARE_MANIFEST):c(new Promise((e=>{const t=self.__MIDDLEWARE_MANIFEST_CB;self.__MIDDLEWARE_MANIFEST_CB=()=>{e(self.__MIDDLEWARE_MANIFEST),t&&t()}})),i,u(new Error("Failed to load client middleware manifest")))},t.createRouteLoader=function(e){const t=new Map,n=new Map,r=new Map,s=new Map;function f(e){{let t=n.get(e);return t||(document.querySelector(`script[src^="${e}"]`)?Promise.resolve():(n.set(e,t=function(e,t){return new Promise(((n,r)=>{(t=document.createElement("script")).onload=n,t.onerror=()=>r(u(new Error(`Failed to load script: ${e}`))),t.crossOrigin=window.omnivoreEnv.__NEXT_CROSS_ORIGIN,t.src=e,document.body.appendChild(t)}))}(e)),t))}}function p(e){let t=r.get(e);return t||(r.set(e,t=fetch(e).then((t=>{if(!t.ok)throw new Error(`Failed to load stylesheet: ${e}`);return t.text().then((t=>({href:e,content:t})))})).catch((e=>{throw u(e)}))),t)}return{whenEntrypoint:e=>a(e,t),onEntrypoint(e,n){(n?Promise.resolve().then((()=>n())).then((e=>({component:e&&e.default||e,exports:e})),(e=>({error:e}))):Promise.resolve(void 0)).then((n=>{const r=t.get(e);r&&"resolve"in r?n&&(t.set(e,n),r.resolve(n)):(n?t.set(e,n):t.delete(e),s.delete(e))}))},loadRoute(n,r){return a(n,s,(()=>c(d(e,n).then((({scripts:e,css:r})=>Promise.all([t.has(n)?[]:Promise.all(e.map(f)),Promise.all(r.map(p))]))).then((e=>this.whenEntrypoint(n).then((t=>({entrypoint:t,styles:e[1]}))))),i,u(new Error(`Route did not complete loading: ${n}`))).then((({entrypoint:e,styles:t})=>{const n=Object.assign({styles:t},e);return"error"in e?e:n})).catch((e=>{if(r)throw e;return{error:e}})).finally((()=>{}))))},prefetch(t){let n;return(n=navigator.connection)&&(n.saveData||/2g/.test(n.effectiveType))?Promise.resolve():d(e,t).then((e=>Promise.all(l?e.scripts.map((e=>{return t=e,n="script",new Promise(((e,o)=>{const i=`\n link[rel="prefetch"][href^="${t}"],\n link[rel="preload"][href^="${t}"],\n script[src^="${t}"]`;if(document.querySelector(i))return e();(r=document.createElement("link")).as=n,r.rel="prefetch",r.crossOrigin=window.omnivoreEnv.__NEXT_CROSS_ORIGIN,r.onload=e,r.onerror=o,r.href=t,document.head.appendChild(r)}));var t,n,r})):[]))).then((()=>{o.requestIdleCallback((()=>this.loadRoute(t,!0).catch((()=>{}))))})).catch((()=>{}))}}},(r=n(9983))&&r.__esModule;var r,o=n(1976);const i=3800;function a(e,t,n){let r,o=t.get(e);if(o)return"future"in o?o.future:Promise.resolve(o);const i=new Promise((e=>{r=e}));return t.set(e,o={resolve:r,future:i}),n?n().then((e=>(r(e),e))).catch((n=>{throw t.delete(e),n})):i}const l=function(e){try{return e=document.createElement("link"),!!window.MSInputMethodContext&&!!document.documentMode||e.relList.supports("prefetch")}catch(e){return!1}}(),s=Symbol("ASSET_LOAD_ERROR");function u(e){return Object.defineProperty(e,s,{})}function c(e,t,n){return new Promise(((r,i)=>{let a=!1;e.then((e=>{a=!0,r(e)})).catch(i),o.requestIdleCallback((()=>setTimeout((()=>{a||i(n)}),t)))}))}function f(){return self.__BUILD_MANIFEST?Promise.resolve(self.__BUILD_MANIFEST):c(new Promise((e=>{const t=self.__BUILD_MANIFEST_CB;self.__BUILD_MANIFEST_CB=()=>{e(self.__BUILD_MANIFEST),t&&t()}})),i,u(new Error("Failed to load client build manifest")))}function d(e,t){return f().then((n=>{if(!(t in n))throw u(new Error(`Failed to lookup route: ${t}`));const r=n[t].map((t=>e+"/_next/"+encodeURI(t)));return{scripts:r.filter((e=>e.endsWith(".js"))),css:r.filter((e=>e.endsWith(".css")))}}))}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&(Object.assign(t.default,t),e.exports=t.default)},9518:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Router",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"withRouter",{enumerable:!0,get:function(){return l.default}}),t.useRouter=function(){return r.default.useContext(i.RouterContext)},t.createRouter=function(...e){return u.router=new o.default(...e),u.readyCallbacks.forEach((e=>e())),u.readyCallbacks=[],u.router},t.makePublicRouterInstance=function(e){const t=e,n={};for(const e of c)"object"!=typeof t[e]?n[e]=t[e]:n[e]=Object.assign(Array.isArray(t[e])?[]:{},t[e]);return n.events=o.default.events,f.forEach((e=>{n[e]=(...n)=>t[e](...n)})),n},t.default=void 0;var r=s(n(2784)),o=s(n(6640)),i=n(6510),a=s(n(274)),l=s(n(9564));function s(e){return e&&e.__esModule?e:{default:e}}const u={router:null,readyCallbacks:[],ready(e){if(this.router)return e();"undefined"!=typeof window&&this.readyCallbacks.push(e)}},c=["pathname","route","query","asPath","components","isFallback","basePath","locale","locales","defaultLocale","isReady","isPreview","isLocaleDomain","domainLocales"],f=["push","replace","reload","back","prefetch","beforePopState"];function d(){if(!u.router)throw new Error('No router instance found.\nYou should only use "next/router" on the client side of your app.\n');return u.router}Object.defineProperty(u,"events",{get:()=>o.default.events}),c.forEach((e=>{Object.defineProperty(u,e,{get:()=>d()[e]})})),f.forEach((e=>{u[e]=(...t)=>d()[e](...t)})),["routeChangeStart","beforeHistoryChange","routeChangeComplete","routeChangeError","hashChangeStart","hashChangeComplete"].forEach((e=>{u.ready((()=>{o.default.events.on(e,((...t)=>{const n=`on${e.charAt(0).toUpperCase()}${e.substring(1)}`,r=u;if(r[n])try{r[n](...t)}catch(e){console.error(`Error when running the Router event: ${n}`),console.error(a.default(e)?`${e.message}\n${e.stack}`:e+"")}}))}))}));var p=u;t.default=p,("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&(Object.assign(t.default,t),e.exports=t.default)},9515:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.handleClientScriptLoad=p,t.initScriptLoader=function(e){e.forEach(p),[...document.querySelectorAll('[data-nscript="beforeInteractive"]'),...document.querySelectorAll('[data-nscript="beforePageRender"]')].forEach((e=>{const t=e.id||e.getAttribute("src");c.add(t)}))},t.default=void 0;var r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(2784)),o=n(7177),i=n(9410),a=n(1976);function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e){for(var t=1;t{const{src:t,id:n,onLoad:r=(()=>{}),dangerouslySetInnerHTML:o,children:a="",strategy:l="afterInteractive",onError:s}=e,d=n||t;if(d&&c.has(d))return;if(u.has(t))return c.add(d),void u.get(t).then(r,s);const p=document.createElement("script"),h=new Promise(((e,t)=>{p.addEventListener("load",(function(t){e(),r&&r.call(this,t)})),p.addEventListener("error",(function(e){t(e)}))})).catch((function(e){s&&s(e)}));t&&u.set(t,h),c.add(d),o?p.innerHTML=o.__html||"":a?p.textContent="string"==typeof a?a:Array.isArray(a)?a.join(""):"":t&&(p.src=t);for(const[t,n]of Object.entries(e)){if(void 0===n||f.includes(t))continue;const e=i.DOMAttributeNames[t]||t.toLowerCase();p.setAttribute(e,n)}"worker"===l&&p.setAttribute("type","text/partytown"),p.setAttribute("data-nscript",l),document.body.appendChild(p)};function p(e){const{strategy:t="afterInteractive"}=e;"lazyOnload"===t?window.addEventListener("load",(()=>{a.requestIdleCallback((()=>d(e)))})):d(e)}t.default=function(e){const{src:t="",onLoad:n=(()=>{}),strategy:i="afterInteractive",onError:l}=e,u=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["src","onLoad","strategy","onError"]),{updateScripts:f,scripts:p,getIsSsr:h}=r.useContext(o.HeadManagerContext);return r.useEffect((()=>{"afterInteractive"===i?d(e):"lazyOnload"===i&&function(e){"complete"===document.readyState?a.requestIdleCallback((()=>d(e))):window.addEventListener("load",(()=>{a.requestIdleCallback((()=>d(e)))}))}(e)}),[e,i]),"beforeInteractive"!==i&&"worker"!==i||(f?(p[i]=(p[i]||[]).concat([s({src:t,onLoad:n,onError:l},u)]),f(p)):h&&h()?c.add(u.id||t):h&&!h()&&d(e)),null},("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&(Object.assign(t.default,t),e.exports=t.default)},3321:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useIntersection=function({rootRef:e,rootMargin:t,disabled:n}){const s=n||!i,u=r.useRef(),[c,f]=r.useState(!1),[d,p]=r.useState(e?e.current:null),h=r.useCallback((e=>{u.current&&(u.current(),u.current=void 0),s||c||e&&e.tagName&&(u.current=function(e,t,n){const{id:r,observer:o,elements:i}=function(e){const t={root:e.root||null,margin:e.rootMargin||""};let n,r=l.find((e=>e.root===t.root&&e.margin===t.margin));if(r?n=a.get(r):(n=a.get(t),l.push(t)),n)return n;const o=new Map,i=new IntersectionObserver((e=>{e.forEach((e=>{const t=o.get(e.target),n=e.isIntersecting||e.intersectionRatio>0;t&&n&&t(n)}))}),e);return a.set(t,n={id:t,observer:i,elements:o}),n}(n);return i.set(e,(e=>e&&f(e))),o.observe(e),function(){if(i.delete(e),o.unobserve(e),0===i.size){o.disconnect(),a.delete(r);let e=l.findIndex((e=>e.root===r.root&&e.margin===r.margin));e>-1&&l.splice(e,1)}}}(e,0,{root:d,rootMargin:t}))}),[s,d,t,c]),g=r.useCallback((()=>{f(!1)}),[]);return r.useEffect((()=>{if(!i&&!c){const e=o.requestIdleCallback((()=>f(!0)));return()=>o.cancelIdleCallback(e)}}),[c]),r.useEffect((()=>{e&&p(e.current)}),[e]),[h,c,g]};var r=n(2784),o=n(1976);const i="undefined"!=typeof IntersectionObserver,a=new Map,l=[];("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&(Object.assign(t.default,t),e.exports=t.default)},9564:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){function t(t){return o.default.createElement(e,Object.assign({router:i.useRouter()},t))}return t.getInitialProps=e.getInitialProps,t.origGetInitialProps=e.origGetInitialProps,t};var r,o=(r=n(2784))&&r.__esModule?r:{default:r},i=n(9518);("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&(Object.assign(t.default,t),e.exports=t.default)},9264:(e,t)=>{"use strict";function n(e,t){void 0===t&&(t={});for(var n=function(e){for(var t=[],n=0;n=48&&s<=57||s>=65&&s<=90||s>=97&&s<=122||95===s))break;a+=e[l++]}if(!a)throw new TypeError("Missing parameter name at "+n);t.push({type:"NAME",index:n,value:a}),n=l}else t.push({type:"CLOSE",index:n,value:e[n++]});else t.push({type:"OPEN",index:n,value:e[n++]});else t.push({type:"ESCAPED_CHAR",index:n++,value:e[n++]});else t.push({type:"MODIFIER",index:n,value:e[n++]})}return t.push({type:"END",index:n,value:""}),t}(e),r=t.prefixes,o=void 0===r?"./":r,a="[^"+i(t.delimiter||"/#?")+"]+?",l=[],s=0,u=0,c="",f=function(e){if(u-1:void 0===E;o||(g+="(?:"+h+"(?="+p+"))?"),k||(g+="(?="+h+"|"+p+")")}return new RegExp(g,a(n))}function s(e,t,r){return e instanceof RegExp?function(e,t){if(!t)return e;var n=e.source.match(/\((?!\?)/g);if(n)for(var r=0;r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=o,t.getProperError=function(e){return o(e)?e:new Error(r.isPlainObject(e)?JSON.stringify(e):e+"")};var r=n(9910);function o(e){return"object"==typeof e&&null!==e&&"name"in e&&"message"in e}},8058:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.escapeStringRegexp=function(e){return n.test(e)?e.replace(r,"\\$&"):e};const n=/[|\\{}()[\]^$+*?.-]/,r=/[|\\{}()[\]^$+*?.-]/g},7177:(e,t,n)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.HeadManagerContext=void 0;const o=((r=n(2784))&&r.__esModule?r:{default:r}).default.createContext({});t.HeadManagerContext=o},927:(e,t)=>{"use strict";t.D=function(e,t,n){let r;if(e){n&&(n=n.toLowerCase());for(const a of e){var o,i;if(t===(null===(o=a.domain)||void 0===o?void 0:o.split(":")[0].toLowerCase())||n===a.defaultLocale.toLowerCase()||(null===(i=a.locales)||void 0===i?void 0:i.some((e=>e.toLowerCase()===n)))){r=a;break}}}return r}},816:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeLocalePath=function(e,t){let n;const r=e.split("/");return(t||[]).some((t=>!(!r[1]||r[1].toLowerCase()!==t.toLowerCase()||(n=t,r.splice(1,1),e=r.join("/")||"/",0)))),{pathname:e,detectedLocale:n}}},9910:(e,t)=>{"use strict";function n(e){return Object.prototype.toString.call(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.getObjectClassLabel=n,t.isPlainObject=function(e){if("[object Object]"!==n(e))return!1;const t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}},7471:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){const e=Object.create(null);return{on(t,n){(e[t]||(e[t]=[])).push(n)},off(t,n){e[t]&&e[t].splice(e[t].indexOf(n)>>>0,1)},emit(t,...n){(e[t]||[]).slice().map((e=>{e(...n)}))}}}},997:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.denormalizePagePath=function(e){let t=o.normalizePathSep(e);return t.startsWith("/index/")&&!r.isDynamicRoute(t)?t.slice(6):"/index"!==t?t:"/"};var r=n(9150),o=n(9356)},9356:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.normalizePathSep=function(e){return e.replace(/\\/g,"/")}},6510:(e,t,n)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.RouterContext=void 0;const o=((r=n(2784))&&r.__esModule?r:{default:r}).default.createContext(null);t.RouterContext=o},6640:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getDomainLocale=function(e,t,n,r){if(window.omnivoreEnv.__NEXT_I18N_SUPPORT){t=t||s.normalizeLocalePath(e,n).detectedLocale;const o=w(r,void 0,t);return!!o&&`http${o.http?"":"s"}://${o.domain}${x||""}${t===o.defaultLocale?"":`/${t}`}${e}`}return!1},t.addLocale=_,t.delLocale=C,t.hasBasePath=L,t.addBasePath=P,t.delBasePath=R,t.isLocalURL=j,t.interpolateAs=T,t.resolveHref=M,t.default=void 0;var r=n(1119),o=n(7928),i=n(9515),a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(274)),l=n(997),s=n(816),u=b(n(7471)),c=n(1624),f=n(7482),d=n(1577),p=n(646),h=b(n(5317)),g=n(3107),m=n(4794),v=n(2763),y=n(6555);function b(e){return e&&e.__esModule?e:{default:e}}let w;window.omnivoreEnv.__NEXT_I18N_SUPPORT&&(w=n(927).D);const x=window.omnivoreEnv.__NEXT_ROUTER_BASEPATH||"";function E(){return Object.assign(new Error("Route Cancelled"),{cancelled:!0})}function k(e,t){if(!e.startsWith("/")||!t)return e;const n=O(e);return r.normalizePathTrailingSlash(`${t}${n}`)+e.slice(n.length)}function S(e,t){return(e=O(e))===t||e.startsWith(t+"/")}function _(e,t,n){if(window.omnivoreEnv.__NEXT_I18N_SUPPORT&&t&&t!==n){const n=O(e).toLowerCase();if(!S(n,"/"+t.toLowerCase())&&!S(n,"/api"))return k(e,"/"+t)}return e}function C(e,t){if(window.omnivoreEnv.__NEXT_I18N_SUPPORT){const n=O(e),r=n.toLowerCase(),o=t&&t.toLowerCase();return t&&(r.startsWith("/"+o+"/")||r==="/"+o)?(n.length===t.length+1?"/":"")+e.slice(t.length+1):e}return e}function O(e){const t=e.indexOf("?"),n=e.indexOf("#");return(t>-1||n>-1)&&(e=e.substring(0,t>-1?t:n)),e}function L(e){return S(e,x)}function P(e){return k(e,x)}function R(e){return(e=e.slice(x.length)).startsWith("/")||(e=`/${e}`),e}function j(e){if(e.startsWith("/")||e.startsWith("#")||e.startsWith("?"))return!0;try{const t=c.getLocationOrigin(),n=new URL(e,t);return n.origin===t&&L(n.pathname)}catch(e){return!1}}function T(e,t,n){let r="";const o=m.getRouteRegex(e),i=o.groups,a=(t!==e?g.getRouteMatcher(o)(t):"")||n;r=e;const l=Object.keys(i);return l.every((e=>{let t=a[e]||"";const{repeat:n,optional:o}=i[e];let l=`[${n?"...":""}${e}]`;return o&&(l=`${t?"":"/"}[${l}]`),n&&!Array.isArray(t)&&(t=[t]),(o||e in a)&&(r=r.replace(l,n?t.map((e=>encodeURIComponent(e))).join("/"):encodeURIComponent(t))||"/")}))||(r=""),{params:l,result:r}}function A(e,t){const n={};return Object.keys(e).forEach((r=>{t.includes(r)||(n[r]=e[r])})),n}function M(e,t,n){let o,i="string"==typeof t?t:y.formatWithValidation(t);const a=i.match(/^[a-zA-Z]{1,}:\/\//),l=a?i.slice(a[0].length):i;if((l.split("?")[0]||"").match(/(\/\/|\\)/)){console.error(`Invalid href passed to next/router: ${i}, repeated forward-slashes (//) or backslashes \\ are not valid in the href`);const e=c.normalizeRepeatedSlashes(l);i=(a?a[0]:"")+e}if(!j(i))return n?[i]:i;try{o=new URL(i.startsWith("#")?e.asPath:e.pathname,"http://n")}catch(e){o=new URL("/","http://n")}try{const e=new URL(i,o);e.pathname=r.normalizePathTrailingSlash(e.pathname);let t="";if(f.isDynamicRoute(e.pathname)&&e.searchParams&&n){const n=p.searchParamsToUrlQuery(e.searchParams),{result:r,params:o}=T(e.pathname,e.pathname,n);r&&(t=y.formatWithValidation({pathname:r,hash:e.hash,query:A(n,o)}))}const a=e.origin===o.origin?e.href.slice(e.origin.length):e.href;return n?[a,t||a]:a}catch(e){return n?[i]:i}}function I(e){const t=c.getLocationOrigin();return e.startsWith(t)?e.substring(t.length):e}function D(e,t,n){let[r,o]=M(e,t,!0);const i=c.getLocationOrigin(),a=r.startsWith(i),l=o&&o.startsWith(i);r=I(r),o=o?I(o):o;const s=a?r:P(r),u=n?I(M(e,n)):o||r;return{url:s,as:l?u:P(u)}}function N(e,t){const n=r.removePathTrailingSlash(l.denormalizePagePath(e));return"/404"===n||"/_error"===n?e:(t.includes(n)||t.some((t=>{if(f.isDynamicRoute(t)&&m.getRouteRegex(t).re.test(n))return e=t,!0})),r.removePathTrailingSlash(e))}const F=window.omnivoreEnv.__NEXT_SCROLL_RESTORATION&&"undefined"!=typeof window&&"scrollRestoration"in window.history&&!!function(){try{let e="__next";return sessionStorage.setItem(e,e),sessionStorage.removeItem(e),!0}catch(e){}}(),z=Symbol("SSG_DATA_NOT_FOUND");function B(e,t,n){return fetch(e,{credentials:"same-origin"}).then((r=>{if(!r.ok){if(t>1&&r.status>=500)return B(e,t-1,n);if(404===r.status)return r.json().then((e=>{if(e.notFound)return{notFound:z};throw new Error("Failed to load static props")}));throw new Error("Failed to load static props")}return n.text?r.text():r.json()}))}function $(e,t,n,r,i){const{href:a}=new URL(e,window.location.href);return void 0!==r[a]?r[a]:r[a]=B(e,t?3:1,{text:n}).catch((e=>{throw t||o.markAssetError(e),e})).then((e=>(i||delete r[a],e))).catch((e=>{throw delete r[a],e}))}class W{constructor(e,t,n,{initialProps:o,pageLoader:i,App:a,wrapApp:l,Component:s,err:u,subscription:p,isFallback:h,locale:g,locales:m,defaultLocale:v,domainLocales:b,isPreview:E,isRsc:k}){this.sdc={},this.sdr={},this.sde={},this._idx=0,this.onPopState=e=>{const t=e.state;if(!t){const{pathname:e,query:t}=this;return void this.changeState("replaceState",y.formatWithValidation({pathname:P(e),query:t}),c.getURL())}if(!t.__N)return;let n;const{url:r,as:o,options:i,idx:a}=t;if(window.omnivoreEnv.__NEXT_SCROLL_RESTORATION&&F&&this._idx!==a){try{sessionStorage.setItem("__next_scroll_"+this._idx,JSON.stringify({x:self.pageXOffset,y:self.pageYOffset}))}catch{}try{const e=sessionStorage.getItem("__next_scroll_"+a);n=JSON.parse(e)}catch{n={x:0,y:0}}}this._idx=a;const{pathname:l}=d.parseRelativeUrl(r);this.isSsr&&o===P(this.asPath)&&l===P(this.pathname)||this._bps&&!this._bps(t)||this.change("replaceState",r,o,Object.assign({},i,{shallow:i.shallow&&this._shallow,locale:i.locale||this.defaultLocale}),n)};const S=r.removePathTrailingSlash(e);this.components={},"/_error"!==e&&(this.components[S]={Component:s,initial:!0,props:o,err:u,__N_SSG:o&&o.__N_SSG,__N_SSP:o&&o.__N_SSP,__N_RSC:!!k}),this.components["/_app"]={Component:a,styleSheets:[]},this.events=W.events,this.pageLoader=i;const _=f.isDynamicRoute(e)&&self.__NEXT_DATA__.autoExport;if(this.basePath=x,this.sub=p,this.clc=null,this._wrapApp=l,this.isSsr=!0,this.isLocaleDomain=!1,this.isReady=!(!(self.__NEXT_DATA__.gssp||self.__NEXT_DATA__.gip||self.__NEXT_DATA__.appGip&&!self.__NEXT_DATA__.gsp)&&(_||self.location.search||window.omnivoreEnv.__NEXT_HAS_REWRITES)),window.omnivoreEnv.__NEXT_I18N_SUPPORT&&(this.locales=m,this.defaultLocale=v,this.domainLocales=b,this.isLocaleDomain=!!w(b,self.location.hostname)),this.state={route:S,pathname:e,query:t,asPath:_?e:n,isPreview:!!E,locale:window.omnivoreEnv.__NEXT_I18N_SUPPORT?g:void 0,isFallback:h},"undefined"!=typeof window){if(!n.startsWith("//")){const r={locale:g};r._shouldResolveHref=n!==e,this.changeState("replaceState",y.formatWithValidation({pathname:P(e),query:t}),c.getURL(),r)}window.addEventListener("popstate",this.onPopState),window.omnivoreEnv.__NEXT_SCROLL_RESTORATION&&F&&(window.history.scrollRestoration="manual")}}reload(){window.location.reload()}back(){window.history.back()}push(e,t,n={}){if(window.omnivoreEnv.__NEXT_SCROLL_RESTORATION&&F)try{sessionStorage.setItem("__next_scroll_"+this._idx,JSON.stringify({x:self.pageXOffset,y:self.pageYOffset}))}catch{}return({url:e,as:t}=D(this,e,t)),this.change("pushState",e,t,n)}replace(e,t,n={}){return({url:e,as:t}=D(this,e,t)),this.change("replaceState",e,t,n)}async change(e,t,n,l,u){if(!j(t))return window.location.href=t,!1;const p=l._h||l._shouldResolveHref||O(t)===O(n),v={...this.state};l._h&&(this.isReady=!0);const b=v.locale;if(window.omnivoreEnv.__NEXT_I18N_SUPPORT){v.locale=!1===l.locale?this.defaultLocale:l.locale||v.locale,void 0===l.locale&&(l.locale=v.locale);const e=d.parseRelativeUrl(L(n)?R(n):n),r=s.normalizeLocalePath(e.pathname,this.locales);r.detectedLocale&&(v.locale=r.detectedLocale,e.pathname=P(e.pathname),n=y.formatWithValidation(e),t=P(s.normalizeLocalePath(L(t)?R(t):t,this.locales).pathname));let o=!1;var x;window.omnivoreEnv.__NEXT_I18N_SUPPORT&&((null===(x=this.locales)||void 0===x?void 0:x.includes(v.locale))||(e.pathname=_(e.pathname,v.locale),window.location.href=y.formatWithValidation(e),o=!0));const i=w(this.domainLocales,void 0,v.locale);if(window.omnivoreEnv.__NEXT_I18N_SUPPORT&&!o&&i&&this.isLocaleDomain&&self.location.hostname!==i.domain){const e=R(n);window.location.href=`http${i.http?"":"s"}://${i.domain}${P(`${v.locale===i.defaultLocale?"":`/${v.locale}`}${"/"===e?"":e}`||"/")}`,o=!0}if(o)return new Promise((()=>{}))}l._h||(this.isSsr=!1),c.ST&&performance.mark("routeChange");const{shallow:E=!1,scroll:k=!0}=l,S={shallow:E};this._inFlightRoute&&this.abortComponentLoad(this._inFlightRoute,S),n=P(_(L(n)?R(n):n,l.locale,this.defaultLocale));const M=C(L(n)?R(n):n,v.locale);this._inFlightRoute=n;let I=b!==v.locale;if(!l._h&&this.onlyAHashChange(M)&&!I)return v.asPath=M,W.events.emit("hashChangeStart",n,S),this.changeState(e,t,n,{...l,scroll:!1}),k&&this.scrollToHash(M),this.set(v,this.components[v.route],null),W.events.emit("hashChangeComplete",n,S),!0;let F,B,$=d.parseRelativeUrl(t),{pathname:H,query:U}=$;try{[F,{__rewrites:B}]=await Promise.all([this.pageLoader.getPageList(),o.getClientBuildManifest(),this.pageLoader.getMiddlewareList()])}catch(e){return window.location.href=n,!1}this.urlIsNew(M)||I||(e="replaceState");let V=n;if(H=H?r.removePathTrailingSlash(R(H)):H,p&&"/_error"!==H)if(l._shouldResolveHref=!0,window.omnivoreEnv.__NEXT_HAS_REWRITES&&n.startsWith("/")){const e=h.default(P(_(M,v.locale)),F,B,U,(e=>N(e,F)),this.locales);if(e.externalDest)return location.href=n,!0;V=e.asPath,e.matchedPage&&e.resolvedHref&&(H=e.resolvedHref,$.pathname=P(H),t=y.formatWithValidation($))}else $.pathname=N(H,F),$.pathname!==H&&(H=$.pathname,$.pathname=P(H),t=y.formatWithValidation($));if(!j(n))return window.location.href=n,!1;if(V=C(R(V),v.locale),(!l.shallow||1===l._h)&&(1!==l._h||f.isDynamicRoute(r.removePathTrailingSlash(H)))){const r=await this._preflightRequest({as:n,cache:!0,pages:F,pathname:H,query:U,locale:v.locale,isPreview:v.isPreview});if("rewrite"===r.type)U={...U,...r.parsedAs.query},V=r.asPath,H=r.resolvedHref,$.pathname=r.resolvedHref,t=y.formatWithValidation($);else{if("redirect"===r.type&&r.newAs)return this.change(e,r.newUrl,r.newAs,l);if("redirect"===r.type&&r.destination)return window.location.href=r.destination,new Promise((()=>{}));if("refresh"===r.type&&n!==window.location.pathname)return window.location.href=n,new Promise((()=>{}))}}const q=r.removePathTrailingSlash(H);if(f.isDynamicRoute(q)){const e=d.parseRelativeUrl(V),r=e.pathname,o=m.getRouteRegex(q),i=g.getRouteMatcher(o)(r),a=q===r,l=a?T(q,r,U):{};if(!i||a&&!l.result){const e=Object.keys(o.groups).filter((e=>!U[e]));if(e.length>0)throw new Error((a?`The provided \`href\` (${t}) value is missing query values (${e.join(", ")}) to be interpolated properly. `:`The provided \`as\` value (${r}) is incompatible with the \`href\` value (${q}). `)+"Read more: https://nextjs.org/docs/messages/"+(a?"href-interpolation-failed":"incompatible-href-as"))}else a?n=y.formatWithValidation(Object.assign({},e,{pathname:l.result,query:A(U,l.params)})):Object.assign(U,i)}W.events.emit("routeChangeStart",n,S);try{var K,G;let r=await this.getRouteInfo(q,H,U,n,V,S,v.locale,v.isPreview),{error:o,props:a,__N_SSG:s,__N_SSP:c}=r;const f=r.Component;if(f&&f.unstable_scriptLoader&&[].concat(f.unstable_scriptLoader()).forEach((e=>{i.handleClientScriptLoad(e.props)})),(s||c)&&a){if(a.pageProps&&a.pageProps.__N_REDIRECT){const t=a.pageProps.__N_REDIRECT;if(t.startsWith("/")&&!1!==a.pageProps.__N_REDIRECT_BASE_PATH){const n=d.parseRelativeUrl(t);n.pathname=N(n.pathname,F);const{url:r,as:o}=D(this,t,t);return this.change(e,r,o,l)}return window.location.href=t,new Promise((()=>{}))}if(v.isPreview=!!a.__N_PREVIEW,a.notFound===z){let e;try{await this.fetchComponent("/404"),e="/404"}catch(t){e="/_error"}r=await this.getRouteInfo(e,e,U,n,V,{shallow:!1},v.locale,v.isPreview)}}W.events.emit("beforeHistoryChange",n,S),this.changeState(e,t,n,l),l._h&&"/_error"===H&&500===(null===(K=self.__NEXT_DATA__.props)||void 0===K||null===(G=K.pageProps)||void 0===G?void 0:G.statusCode)&&(null==a?void 0:a.pageProps)&&(a.pageProps.statusCode=500);const p=l.shallow&&v.route===q;var X;const h=(null!==(X=l.scroll)&&void 0!==X?X:!p)?{x:0,y:0}:null;if(await this.set({...v,route:q,pathname:H,query:U,asPath:M,isFallback:!1},r,null!=u?u:h).catch((e=>{if(!e.cancelled)throw e;o=o||e})),o)throw W.events.emit("routeChangeError",o,M,S),o;return window.omnivoreEnv.__NEXT_I18N_SUPPORT&&v.locale&&(document.documentElement.lang=v.locale),W.events.emit("routeChangeComplete",n,S),!0}catch(e){if(a.default(e)&&e.cancelled)return!1;throw e}}changeState(e,t,n,r={}){"pushState"===e&&c.getURL()===n||(this._shallow=r.shallow,window.history[e]({url:t,as:n,options:r,__N:!0,idx:this._idx="pushState"!==e?this._idx:this._idx+1},"",n))}async handleRouteInfoError(e,t,n,r,i,l){if(e.cancelled)throw e;if(o.isAssetError(e)||l)throw W.events.emit("routeChangeError",e,r,i),window.location.href=r,E();try{let r,o,i;void 0!==r&&void 0!==o||({page:r,styleSheets:o}=await this.fetchComponent("/_error"));const a={props:i,Component:r,styleSheets:o,err:e,error:e};if(!a.props)try{a.props=await this.getInitialProps(r,{err:e,pathname:t,query:n})}catch(e){console.error("Error in error page `getInitialProps`: ",e),a.props={}}return a}catch(e){return this.handleRouteInfoError(a.default(e)?e:new Error(e+""),t,n,r,i,!0)}}async getRouteInfo(e,t,n,r,o,i,l,s){try{const a=this.components[e];if(i.shallow&&a&&this.route===e)return a;let u;a&&!("initial"in a)&&(u=a);const c=u||await this.fetchComponent(e).then((e=>({Component:e.page,styleSheets:e.styleSheets,__N_SSG:e.mod.__N_SSG,__N_SSP:e.mod.__N_SSP,__N_RSC:!!e.mod.__next_rsc__}))),{Component:f,__N_SSG:d,__N_SSP:p,__N_RSC:h}=c;let g;const m=p&&h;(d||p||h)&&(g=this.pageLoader.getDataHref({href:y.formatWithValidation({pathname:t,query:n}),asPath:o,ssg:d,flight:m,locale:l}));const v=await this._getData((()=>(d||p||h)&&!m?$(g,this.isSsr,!1,d?this.sdc:this.sdr,!!d&&!s):this.getInitialProps(f,{pathname:t,query:n,asPath:r,locale:l,locales:this.locales,defaultLocale:this.defaultLocale})));if(h)if(m){const{data:e}=await this._getData((()=>this._getFlightData(g)));v.pageProps=Object.assign(v.pageProps,{__flight__:e})}else{const{__flight__:e}=v;v.pageProps=Object.assign({},v.pageProps,{__flight__:e})}return c.props=v,this.components[e]=c,c}catch(e){return this.handleRouteInfoError(a.getProperError(e),t,n,r,i)}}set(e,t,n){return this.state=e,this.sub(t,this.components["/_app"].Component,n)}beforePopState(e){this._bps=e}onlyAHashChange(e){if(!this.asPath)return!1;const[t,n]=this.asPath.split("#"),[r,o]=e.split("#");return!(!o||t!==r||n!==o)||t===r&&n!==o}scrollToHash(e){const[,t=""]=e.split("#");if(""===t||"top"===t)return void window.scrollTo(0,0);const n=document.getElementById(t);if(n)return void n.scrollIntoView();const r=document.getElementsByName(t)[0];r&&r.scrollIntoView()}urlIsNew(e){return this.asPath!==e}async prefetch(e,t=e,n={}){let i=d.parseRelativeUrl(e),{pathname:a,query:l}=i;if(window.omnivoreEnv.__NEXT_I18N_SUPPORT&&!1===n.locale){a=s.normalizeLocalePath(a,this.locales).pathname,i.pathname=a,e=y.formatWithValidation(i);let r=d.parseRelativeUrl(t);const o=s.normalizeLocalePath(r.pathname,this.locales);r.pathname=o.pathname,n.locale=o.detectedLocale||this.defaultLocale,t=y.formatWithValidation(r)}const u=await this.pageLoader.getPageList();let c=t;if(window.omnivoreEnv.__NEXT_HAS_REWRITES&&t.startsWith("/")){let n;({__rewrites:n}=await o.getClientBuildManifest());const r=h.default(P(_(t,this.locale)),u,n,i.query,(e=>N(e,u)),this.locales);if(r.externalDest)return;c=C(R(r.asPath),this.locale),r.matchedPage&&r.resolvedHref&&(a=r.resolvedHref,i.pathname=a,e=y.formatWithValidation(i))}else i.pathname=N(i.pathname,u),i.pathname!==a&&(a=i.pathname,i.pathname=a,e=y.formatWithValidation(i));const f=await this._preflightRequest({as:P(t),cache:!0,pages:u,pathname:a,query:l,locale:this.locale,isPreview:this.isPreview});"rewrite"===f.type&&(i.pathname=f.resolvedHref,a=f.resolvedHref,l={...l,...f.parsedAs.query},c=f.asPath,e=y.formatWithValidation(i));const p=r.removePathTrailingSlash(a);await Promise.all([this.pageLoader._isSsg(p).then((t=>!!t&&$(this.pageLoader.getDataHref({href:e,asPath:c,ssg:!0,locale:void 0!==n.locale?n.locale:this.locale}),!1,!1,this.sdc,!0))),this.pageLoader[n.priority?"loadPage":"prefetch"](p)])}async fetchComponent(e){let t=!1;const n=this.clc=()=>{t=!0},r=()=>{if(t){const t=new Error(`Abort fetching component for route: "${e}"`);throw t.cancelled=!0,t}n===this.clc&&(this.clc=null)};try{const t=await this.pageLoader.loadPage(e);return r(),t}catch(e){throw r(),e}}_getData(e){let t=!1;const n=()=>{t=!0};return this.clc=n,e().then((e=>{if(n===this.clc&&(this.clc=null),t){const e=new Error("Loading initial props cancelled");throw e.cancelled=!0,e}return e}))}_getFlightData(e){return $(e,!0,!0,this.sdc,!1).then((e=>({data:e})))}async _preflightRequest(e){const t=O(e.as),n=C(L(t)?R(t):t,e.locale);if(!(await this.pageLoader.getMiddlewareList()).some((([e,t])=>g.getRouteMatcher(v.getMiddlewareRegex(e,!t))(n))))return{type:"next"};const o=_(e.as,e.locale);let i;try{i=await this._getPreflightData({preflightHref:o,shouldCache:e.cache,isPreview:e.isPreview})}catch(t){return{type:"redirect",destination:e.as}}if(i.rewrite){if(!i.rewrite.startsWith("/"))return{type:"redirect",destination:e.as};const t=d.parseRelativeUrl(s.normalizeLocalePath(L(i.rewrite)?R(i.rewrite):i.rewrite,this.locales).pathname),n=r.removePathTrailingSlash(t.pathname);let o,a;return e.pages.includes(n)?(o=!0,a=n):(a=N(n,e.pages),a!==t.pathname&&e.pages.includes(a)&&(o=!0)),{type:"rewrite",asPath:t.pathname,parsedAs:t,matchedPage:o,resolvedHref:a}}if(i.redirect){if(i.redirect.startsWith("/")){const e=r.removePathTrailingSlash(s.normalizeLocalePath(L(i.redirect)?R(i.redirect):i.redirect,this.locales).pathname),{url:t,as:n}=D(this,e,e);return{type:"redirect",newUrl:t,newAs:n}}return{type:"redirect",destination:i.redirect}}return i.refresh&&!i.ssr?{type:"refresh"}:{type:"next"}}_getPreflightData(e){const{preflightHref:t,shouldCache:n=!1,isPreview:r}=e,{href:o}=new URL(t,window.location.href);return!r&&n&&this.sde[o]?Promise.resolve(this.sde[o]):fetch(t,{method:"HEAD",credentials:"same-origin",headers:{"x-middleware-preflight":"1"}}).then((e=>{if(!e.ok)throw new Error("Failed to preflight request");return{cache:e.headers.get("x-middleware-cache"),redirect:e.headers.get("Location"),refresh:e.headers.has("x-middleware-refresh"),rewrite:e.headers.get("x-middleware-rewrite"),ssr:!!e.headers.get("x-middleware-ssr")}})).then((e=>(n&&"no-cache"!==e.cache&&(this.sde[o]=e),e))).catch((e=>{throw delete this.sde[o],e}))}getInitialProps(e,t){const{Component:n}=this.components["/_app"],r=this._wrapApp(n);return t.AppTree=r,c.loadGetInitialProps(n,{AppTree:r,Component:e,router:this,ctx:t})}abortComponentLoad(e,t){this.clc&&(W.events.emit("routeChangeError",E(),e,t),this.clc(),this.clc=null)}get route(){return this.state.route}get pathname(){return this.state.pathname}get query(){return this.state.query}get asPath(){return this.state.asPath}get locale(){return this.state.locale}get isFallback(){return this.state.isFallback}get isPreview(){return this.state.isPreview}}t.default=W,W.events=u.default()},6555:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatUrl=i,t.formatWithValidation=function(e){return i(e)},t.urlObjectKeys=void 0;var r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(646));const o=/https?|ftp|gopher|file/;function i(e){let{auth:t,hostname:n}=e,i=e.protocol||"",a=e.pathname||"",l=e.hash||"",s=e.query||"",u=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?u=t+e.host:n&&(u=t+(~n.indexOf(":")?`[${n}]`:n),e.port&&(u+=":"+e.port)),s&&"object"==typeof s&&(s=String(r.urlQueryToSearchParams(s)));let c=e.search||s&&`?${s}`||"";return i&&!i.endsWith(":")&&(i+=":"),e.slashes||(!i||o.test(i))&&!1!==u?(u="//"+(u||""),a&&"/"!==a[0]&&(a="/"+a)):u||(u=""),l&&"#"!==l[0]&&(l="#"+l),c&&"?"!==c[0]&&(c="?"+c),a=a.replace(/[?#]/g,encodeURIComponent),c=c.replace("#","%23"),`${i}${u}${a}${c}${l}`}t.urlObjectKeys=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"]},9983:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t=""){return("/"===e?"/index":/^\/index(\/|$)/.test(e)?`/index${e}`:`${e}`)+t}},2763:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getMiddlewareRegex=function(e,t=!0){const n=r.getParametrizedRoute(e);let o=t?"(?!_next).*":"",i=t?"(?:(/.*)?)":"";return"routeKeys"in n?"/"===n.parameterizedRoute?{groups:{},namedRegex:`^/${o}$`,re:new RegExp(`^/${o}$`),routeKeys:{}}:{groups:n.groups,namedRegex:`^${n.namedParameterizedRoute}${i}$`,re:new RegExp(`^${n.parameterizedRoute}${i}$`),routeKeys:n.routeKeys}:"/"===n.parameterizedRoute?{groups:{},re:new RegExp(`^/${o}$`)}:{groups:{},re:new RegExp(`^${n.parameterizedRoute}${i}$`)}};var r=n(4794)},9150:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getMiddlewareRegex",{enumerable:!0,get:function(){return r.getMiddlewareRegex}}),Object.defineProperty(t,"getRouteMatcher",{enumerable:!0,get:function(){return o.getRouteMatcher}}),Object.defineProperty(t,"getRouteRegex",{enumerable:!0,get:function(){return i.getRouteRegex}}),Object.defineProperty(t,"getSortedRoutes",{enumerable:!0,get:function(){return a.getSortedRoutes}}),Object.defineProperty(t,"isDynamicRoute",{enumerable:!0,get:function(){return l.isDynamicRoute}});var r=n(2763),o=n(3107),i=n(4794),a=n(9036),l=n(7482)},7482:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isDynamicRoute=function(e){return n.test(e)};const n=/\/\[[^/]+?\](?=\/|$)/},1577:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseRelativeUrl=function(e,t){const n=new URL("undefined"==typeof window?"http://n":r.getLocationOrigin()),i=t?new URL(t,n):n,{pathname:a,searchParams:l,search:s,hash:u,href:c,origin:f}=new URL(e,i);if(f!==n.origin)throw new Error(`invariant: invalid relative URL, router received ${e}`);return{pathname:a,query:o.searchParamsToUrlQuery(l),search:s,hash:u,href:c.slice(n.origin.length)}};var r=n(1624),o=n(646)},2011:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseUrl=function(e){if(e.startsWith("/"))return o.parseRelativeUrl(e);const t=new URL(e);return{hash:t.hash,hostname:t.hostname,href:t.href,pathname:t.pathname,port:t.port,protocol:t.protocol,query:r.searchParamsToUrlQuery(t.searchParams),search:t.search}};var r=n(646),o=n(1577)},1095:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getPathMatch=function(e,t){const n=[],o=r.pathToRegexp(e,n,{delimiter:"/",sensitive:!1,strict:null==t?void 0:t.strict}),i=r.regexpToFunction((null==t?void 0:t.regexModifier)?new RegExp(t.regexModifier(o.source),o.flags):o,n);return(e,r)=>{const o=null!=e&&i(e);if(!o)return!1;if(null==t?void 0:t.removeUnnamedParams)for(const e of n)"number"==typeof e.name&&delete o.params[e.name];return{...r,...o.params}}};var r=n(9264)},9716:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.matchHas=function(e,t,n){const r={};return!!t.every((t=>{let o,i=t.key;switch(t.type){case"header":i=i.toLowerCase(),o=e.headers[i];break;case"cookie":o=e.cookies[t.key];break;case"query":o=n[i];break;case"host":{const{host:t}=(null==e?void 0:e.headers)||{};o=null==t?void 0:t.split(":")[0].toLowerCase();break}}if(!t.value&&o)return r[function(e){let t="";for(let n=0;n64&&r<91||r>96&&r<123)&&(t+=e[n])}return t}(i)]=o,!0;if(o){const e=new RegExp(`^${t.value}$`),n=Array.isArray(o)?o.slice(-1)[0].match(e):o.match(e);if(n)return Array.isArray(n)&&(n.groups?Object.keys(n.groups).forEach((e=>{r[e]=n.groups[e]})):"host"===t.type&&n[0]&&(r.host=n[0])),!0}return!1}))&&r},t.compileNonPath=a,t.prepareDestination=function(e){const t=Object.assign({},e.query);delete t.__nextLocale,delete t.__nextDefaultLocale;let n=e.destination;for(const r of Object.keys({...e.params,...t}))s=r,n=n.replace(new RegExp(`:${o.escapeStringRegexp(s)}`,"g"),`__ESC_COLON_${s}`);var s;const u=i.parseUrl(n),c=u.query,f=l(`${u.pathname}${u.hash||""}`),d=l(u.hostname||""),p=[],h=[];r.pathToRegexp(f,p),r.pathToRegexp(d,h);const g=[];p.forEach((e=>g.push(e.name))),h.forEach((e=>g.push(e.name)));const m=r.compile(f,{validate:!1}),v=r.compile(d,{validate:!1});for(const[t,n]of Object.entries(c))Array.isArray(n)?c[t]=n.map((t=>a(l(t),e.params))):c[t]=a(l(n),e.params);let y,b=Object.keys(e.params).filter((e=>"nextInternalLocale"!==e));if(e.appendParamsToQuery&&!b.some((e=>g.includes(e))))for(const t of b)t in c||(c[t]=e.params[t]);try{y=m(e.params);const[t,n]=y.split("#");u.hostname=v(e.params),u.pathname=t,u.hash=`${n?"#":""}${n||""}`,delete u.search}catch(e){if(e.message.match(/Expected .*? to not repeat, but got an array/))throw new Error("To use a multi-match in the destination you must add `*` at the end of the param name to signify it should repeat. https://nextjs.org/docs/messages/invalid-multi-match");throw e}return u.query={...t,...u.query},{newUrl:y,destQuery:c,parsedDestination:u}};var r=n(9264),o=n(8058),i=n(2011);function a(e,t){if(!e.includes(":"))return e;for(const n of Object.keys(t))e.includes(`:${n}`)&&(e=e.replace(new RegExp(`:${n}\\*`,"g"),`:${n}--ESCAPED_PARAM_ASTERISKS`).replace(new RegExp(`:${n}\\?`,"g"),`:${n}--ESCAPED_PARAM_QUESTION`).replace(new RegExp(`:${n}\\+`,"g"),`:${n}--ESCAPED_PARAM_PLUS`).replace(new RegExp(`:${n}(?!\\w)`,"g"),`--ESCAPED_PARAM_COLON${n}`));return e=e.replace(/(:|\*|\?|\+|\(|\)|\{|\})/g,"\\$1").replace(/--ESCAPED_PARAM_PLUS/g,"+").replace(/--ESCAPED_PARAM_COLON/g,":").replace(/--ESCAPED_PARAM_QUESTION/g,"?").replace(/--ESCAPED_PARAM_ASTERISKS/g,"*"),r.compile(`/${e}`,{validate:!1})(t).slice(1)}function l(e){return e.replace(/__ESC_COLON_/gi,":")}},646:(e,t)=>{"use strict";function n(e){return"string"==typeof e||"number"==typeof e&&!isNaN(e)||"boolean"==typeof e?String(e):""}Object.defineProperty(t,"__esModule",{value:!0}),t.searchParamsToUrlQuery=function(e){const t={};return e.forEach(((e,n)=>{void 0===t[n]?t[n]=e:Array.isArray(t[n])?t[n].push(e):t[n]=[t[n],e]})),t},t.urlQueryToSearchParams=function(e){const t=new URLSearchParams;return Object.entries(e).forEach((([e,r])=>{Array.isArray(r)?r.forEach((r=>t.append(e,n(r)))):t.set(e,n(r))})),t},t.assign=function(e,...t){return t.forEach((t=>{Array.from(t.keys()).forEach((t=>e.delete(t))),t.forEach(((t,n)=>e.append(n,t)))})),e}},5317:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n,u,c,f){let d,p=!1,h=!1,g=l.parseRelativeUrl(e),m=i.removePathTrailingSlash(a.normalizeLocalePath(s.delBasePath(g.pathname),f).pathname);const v=n=>{let l=r.getPathMatch(n.source,{removeUnnamedParams:!0,strict:!0})(g.pathname);if(n.has&&l){const e=o.matchHas({headers:{host:document.location.hostname},cookies:document.cookie.split("; ").reduce(((e,t)=>{const[n,...r]=t.split("=");return e[n]=r.join("="),e}),{})},n.has,g.query);e?Object.assign(l,e):l=!1}if(l){if(!n.destination)return h=!0,!0;const r=o.prepareDestination({appendParamsToQuery:!0,destination:n.destination,params:l,query:u});if(g=r.parsedDestination,e=r.newUrl,Object.assign(u,r.parsedDestination.query),m=i.removePathTrailingSlash(a.normalizeLocalePath(s.delBasePath(e),f).pathname),t.includes(m))return p=!0,d=m,!0;if(d=c(m),d!==e&&t.includes(d))return p=!0,!0}};let y=!1;for(let e=0;e{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getRouteMatcher=function(e){const{re:t,groups:n}=e;return e=>{const o=t.exec(e);if(!o)return!1;const i=e=>{try{return decodeURIComponent(e)}catch(e){throw new r.DecodeError("failed to decode param")}},a={};return Object.keys(n).forEach((e=>{const t=n[e],r=o[t.pos];void 0!==r&&(a[e]=~r.indexOf("/")?r.split("/").map((e=>i(e))):t.repeat?[i(r)]:i(r))})),a}};var r=n(1624)},4794:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getParametrizedRoute=i,t.getRouteRegex=function(e){const t=i(e);return"routeKeys"in t?{re:new RegExp(`^${t.parameterizedRoute}(?:/)?$`),groups:t.groups,routeKeys:t.routeKeys,namedRegex:`^${t.namedParameterizedRoute}(?:/)?$`}:{re:new RegExp(`^${t.parameterizedRoute}(?:/)?$`),groups:t.groups}};var r=n(8058);function o(e){const t=e.startsWith("[")&&e.endsWith("]");t&&(e=e.slice(1,-1));const n=e.startsWith("...");return n&&(e=e.slice(3)),{key:e,repeat:n,optional:t}}function i(e){const t=(e.replace(/\/$/,"")||"/").slice(1).split("/"),n={};let i=1;const a=t.map((e=>{if(e.startsWith("[")&&e.endsWith("]")){const{key:t,optional:r,repeat:a}=o(e.slice(1,-1));return n[t]={pos:i++,repeat:a,optional:r},a?r?"(?:/(.+?))?":"/(.+?)":"/([^/]+?)"}return`/${r.escapeStringRegexp(e)}`})).join("");if("undefined"==typeof window){let e=97,i=1;const l=()=>{let t="";for(let n=0;n122&&(i++,e=97);return t},s={};return{parameterizedRoute:a,namedParameterizedRoute:t.map((e=>{if(e.startsWith("[")&&e.endsWith("]")){const{key:t,optional:n,repeat:r}=o(e.slice(1,-1));let i=t.replace(/\W/g,""),a=!1;return(0===i.length||i.length>30)&&(a=!0),isNaN(parseInt(i.slice(0,1)))||(a=!0),a&&(i=l()),s[i]=t,r?n?`(?:/(?<${i}>.+?))?`:`/(?<${i}>.+?)`:`/(?<${i}>[^/]+?)`}return`/${r.escapeStringRegexp(e)}`})).join(""),groups:n,routeKeys:s}}return{parameterizedRoute:a,groups:n}}},9036:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSortedRoutes=function(e){const t=new n;return e.forEach((e=>t.insert(e))),t.smoosh()};class n{insert(e){this._insert(e.split("/").filter(Boolean),[],!1)}smoosh(){return this._smoosh()}_smoosh(e="/"){const t=[...this.children.keys()].sort();null!==this.slugName&&t.splice(t.indexOf("[]"),1),null!==this.restSlugName&&t.splice(t.indexOf("[...]"),1),null!==this.optionalRestSlugName&&t.splice(t.indexOf("[[...]]"),1);const n=t.map((t=>this.children.get(t)._smoosh(`${e}${t}/`))).reduce(((e,t)=>[...e,...t]),[]);if(null!==this.slugName&&n.push(...this.children.get("[]")._smoosh(`${e}[${this.slugName}]/`)),!this.placeholder){const t="/"===e?"/":e.slice(0,-1);if(null!=this.optionalRestSlugName)throw new Error(`You cannot define a route with the same specificity as a optional catch-all route ("${t}" and "${t}[[...${this.optionalRestSlugName}]]").`);n.unshift(t)}return null!==this.restSlugName&&n.push(...this.children.get("[...]")._smoosh(`${e}[...${this.restSlugName}]/`)),null!==this.optionalRestSlugName&&n.push(...this.children.get("[[...]]")._smoosh(`${e}[[...${this.optionalRestSlugName}]]/`)),n}_insert(e,t,r){if(0===e.length)return void(this.placeholder=!1);if(r)throw new Error("Catch-all must be the last part of the URL.");let o=e[0];if(o.startsWith("[")&&o.endsWith("]")){let i=o.slice(1,-1),a=!1;if(i.startsWith("[")&&i.endsWith("]")&&(i=i.slice(1,-1),a=!0),i.startsWith("...")&&(i=i.substring(3),r=!0),i.startsWith("[")||i.endsWith("]"))throw new Error(`Segment names may not start or end with extra brackets ('${i}').`);if(i.startsWith("."))throw new Error(`Segment names may not start with erroneous periods ('${i}').`);function l(e,n){if(null!==e&&e!==n)throw new Error(`You cannot use different slug names for the same dynamic path ('${e}' !== '${n}').`);t.forEach((e=>{if(e===n)throw new Error(`You cannot have the same slug name "${n}" repeat within a single dynamic path`);if(e.replace(/\W/g,"")===o.replace(/\W/g,""))throw new Error(`You cannot have the slug names "${e}" and "${n}" differ only by non-word symbols within a single dynamic path`)})),t.push(n)}if(r)if(a){if(null!=this.restSlugName)throw new Error(`You cannot use both an required and optional catch-all route at the same level ("[...${this.restSlugName}]" and "${e[0]}" ).`);l(this.optionalRestSlugName,i),this.optionalRestSlugName=i,o="[[...]]"}else{if(null!=this.optionalRestSlugName)throw new Error(`You cannot use both an optional and required catch-all route at the same level ("[[...${this.optionalRestSlugName}]]" and "${e[0]}").`);l(this.restSlugName,i),this.restSlugName=i,o="[...]"}else{if(a)throw new Error(`Optional route parameters are not yet supported ("${e[0]}").`);l(this.slugName,i),this.slugName=i,o="[]"}}this.children.has(o)||this.children.set(o,new n),this.children.get(o)._insert(e.slice(1),t,r)}constructor(){this.placeholder=!0,this.children=new Map,this.slugName=null,this.restSlugName=null,this.optionalRestSlugName=null}}},1624:(e,t)=>{"use strict";function n(){const{protocol:e,hostname:t,port:n}=window.location;return`${e}//${t}${n?":"+n:""}`}function r(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function o(e){return e.finished||e.headersSent}Object.defineProperty(t,"__esModule",{value:!0}),t.execOnce=function(e){let t,n=!1;return(...r)=>(n||(n=!0,t=e(...r)),t)},t.getLocationOrigin=n,t.getURL=function(){const{href:e}=window.location,t=n();return e.substring(t.length)},t.getDisplayName=r,t.isResSent=o,t.normalizeRepeatedSlashes=function(e){const t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?`?${t.slice(1).join("?")}`:"")},t.loadGetInitialProps=async function e(t,n){const i=n.res||n.ctx&&n.ctx.res;if(!t.getInitialProps)return n.ctx&&n.Component?{pageProps:await e(n.Component,n.ctx)}:{};const a=await t.getInitialProps(n);if(i&&o(i))return a;if(!a){const e=`"${r(t)}.getInitialProps()" should resolve to an object. But found "${a}" instead.`;throw new Error(e)}return a},t.ST=t.SP=t.warnOnce=void 0,t.warnOnce=e=>{};const i="undefined"!=typeof performance;t.SP=i;const a=i&&"function"==typeof performance.mark&&"function"==typeof performance.measure;t.ST=a;class l extends Error{}t.DecodeError=l;class s extends Error{}t.NormalizeError=s},9097:(e,t,n)=>{e.exports=n(4529)},5632:(e,t,n)=>{e.exports=n(9518)},7320:e=>{"use strict";var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function o(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,i){for(var a,l,s=o(e),u=1;u{"use strict";var r=n(2784),o=n(7320),i=n(4616);function a(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;nt}return!1}(t,n,o,r)&&(n=null),r||null===o?function(e){return!!p.call(g,e)||!p.call(h,e)&&(d.test(e)?g[e]=!0:(h[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=null===n?3!==o.type&&"":n:(t=o.attributeName,r=o.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(o=o.type)||4===o&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(y,b);v[t]=new m(t,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(y,b);v[t]=new m(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(y,b);v[t]=new m(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){v[e]=new m(e,1,!1,e.toLowerCase(),null,!1,!1)})),v.xlinkHref=new m("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){v[e]=new m(e,1,!1,e.toLowerCase(),null,!0,!0)}));var x=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,E=60103,k=60106,S=60107,_=60108,C=60114,O=60109,L=60110,P=60112,R=60113,j=60120,T=60115,A=60116,M=60121,I=60128,D=60129,N=60130,F=60131;if("function"==typeof Symbol&&Symbol.for){var z=Symbol.for;E=z("react.element"),k=z("react.portal"),S=z("react.fragment"),_=z("react.strict_mode"),C=z("react.profiler"),O=z("react.provider"),L=z("react.context"),P=z("react.forward_ref"),R=z("react.suspense"),j=z("react.suspense_list"),T=z("react.memo"),A=z("react.lazy"),M=z("react.block"),z("react.scope"),I=z("react.opaque.id"),D=z("react.debug_trace_mode"),N=z("react.offscreen"),F=z("react.legacy_hidden")}var B,$="function"==typeof Symbol&&Symbol.iterator;function W(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=$&&e[$]||e["@@iterator"])?e:null}function H(e){if(void 0===B)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);B=t&&t[1]||""}return"\n"+B+e}var U=!1;function V(e,t){if(!e||U)return"";U=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(e){var r=e}Reflect.construct(e,[],t)}else{try{t.call()}catch(e){r=e}e.call(t.prototype)}else{try{throw Error()}catch(e){r=e}e()}}catch(e){if(e&&r&&"string"==typeof e.stack){for(var o=e.stack.split("\n"),i=r.stack.split("\n"),a=o.length-1,l=i.length-1;1<=a&&0<=l&&o[a]!==i[l];)l--;for(;1<=a&&0<=l;a--,l--)if(o[a]!==i[l]){if(1!==a||1!==l)do{if(a--,0>--l||o[a]!==i[l])return"\n"+o[a].replace(" at new "," at ")}while(1<=a&&0<=l);break}}}finally{U=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?H(e):""}function q(e){switch(e.tag){case 5:return H(e.type);case 16:return H("Lazy");case 13:return H("Suspense");case 19:return H("SuspenseList");case 0:case 2:case 15:return V(e.type,!1);case 11:return V(e.type.render,!1);case 22:return V(e.type._render,!1);case 1:return V(e.type,!0);default:return""}}function K(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case S:return"Fragment";case k:return"Portal";case C:return"Profiler";case _:return"StrictMode";case R:return"Suspense";case j:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case L:return(e.displayName||"Context")+".Consumer";case O:return(e._context.displayName||"Context")+".Provider";case P:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef");case T:return K(e.type);case M:return K(e._render);case A:t=e._payload,e=e._init;try{return K(e(t))}catch(e){}}return null}function G(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function X(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function Y(e){e._valueTracker||(e._valueTracker=function(e){var t=X(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(e){r=""+e,i.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function Z(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=X(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function Q(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function J(e,t){var n=t.checked;return o({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function ee(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=G(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function te(e,t){null!=(t=t.checked)&&w(e,"checked",t,!1)}function ne(e,t){te(e,t);var n=G(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?oe(e,t.type,n):t.hasOwnProperty("defaultValue")&&oe(e,t.type,G(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function re(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function oe(e,t,n){"number"===t&&Q(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function ie(e,t){return e=o({children:void 0},t),(t=function(e){var t="";return r.Children.forEach(e,(function(e){null!=e&&(t+=e)})),t}(t.children))&&(e.children=t),e}function ae(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o=n.length))throw Error(a(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:G(n)}}function ue(e,t){var n=G(t.value),r=G(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function ce(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}var fe="http://www.w3.org/1999/xhtml";function de(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function pe(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?de(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var he,ge,me=(ge=function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((he=he||document.createElement("div")).innerHTML="",t=he.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction((function(){return ge(e,t)}))}:ge);function ve(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var ye={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},be=["Webkit","ms","Moz","O"];function we(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||ye.hasOwnProperty(e)&&ye[e]?(""+t).trim():t+"px"}function xe(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),o=we(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}Object.keys(ye).forEach((function(e){be.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),ye[t]=ye[e]}))}));var Ee=o({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ke(e,t){if(t){if(Ee[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(a(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(a(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(a(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(a(62))}}function Se(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}function _e(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var Ce=null,Oe=null,Le=null;function Pe(e){if(e=Jr(e)){if("function"!=typeof Ce)throw Error(a(280));var t=e.stateNode;t&&(t=to(t),Ce(e.stateNode,e.type,t))}}function Re(e){Oe?Le?Le.push(e):Le=[e]:Oe=e}function je(){if(Oe){var e=Oe,t=Le;if(Le=Oe=null,Pe(e),t)for(e=0;e(r=31-Ht(r))?0:1<n;n++)t.push(e);return t}function Wt(e,t,n){e.pendingLanes|=t;var r=t-1;e.suspendedLanes&=r,e.pingedLanes&=r,(e=e.eventTimes)[t=31-Ht(t)]=n}var Ht=Math.clz32?Math.clz32:function(e){return 0===e?32:31-(Ut(e)/Vt|0)|0},Ut=Math.log,Vt=Math.LN2,qt=i.unstable_UserBlockingPriority,Kt=i.unstable_runWithPriority,Gt=!0;function Xt(e,t,n,r){De||Me();var o=Zt,i=De;De=!0;try{Ae(o,e,t,n,r)}finally{(De=i)||Fe()}}function Yt(e,t,n,r){Kt(qt,Zt.bind(null,e,t,n,r))}function Zt(e,t,n,r){var o;if(Gt)if((o=0==(4&t))&&0=Mn),Nn=String.fromCharCode(32),Fn=!1;function zn(e,t){switch(e){case"keyup":return-1!==Tn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Bn(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var $n=!1,Wn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Hn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Wn[e.type]:"textarea"===t}function Un(e,t,n,r){Re(r),0<(t=Ar(t,"onChange")).length&&(n=new dn("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Vn=null,qn=null;function Kn(e){_r(e,0)}function Gn(e){if(Z(eo(e)))return e}function Xn(e,t){if("change"===e)return t}var Yn=!1;if(f){var Zn;if(f){var Qn="oninput"in document;if(!Qn){var Jn=document.createElement("div");Jn.setAttribute("oninput","return;"),Qn="function"==typeof Jn.oninput}Zn=Qn}else Zn=!1;Yn=Zn&&(!document.documentMode||9=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=ur(r)}}function fr(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?fr(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function dr(){for(var e=window,t=Q();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(e){n=!1}if(!n)break;t=Q((e=t.contentWindow).document)}return t}function pr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}var hr=f&&"documentMode"in document&&11>=document.documentMode,gr=null,mr=null,vr=null,yr=!1;function br(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;yr||null==gr||gr!==Q(r)||(r="selectionStart"in(r=gr)&&pr(r)?{start:r.selectionStart,end:r.selectionEnd}:{anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},vr&&sr(vr,r)||(vr=r,0<(r=Ar(mr,"onSelect")).length&&(t=new dn("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=gr)))}Mt("cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focusin focus focusout blur input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange".split(" "),0),Mt("drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel".split(" "),1),Mt(At,2);for(var wr="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),xr=0;xroo||(e.current=ro[oo],ro[oo]=null,oo--)}function lo(e,t){oo++,ro[oo]=e.current,e.current=t}var so={},uo=io(so),co=io(!1),fo=so;function po(e,t){var n=e.type.contextTypes;if(!n)return so;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o,i={};for(o in n)i[o]=t[o];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function ho(e){return null!=e.childContextTypes}function go(){ao(co),ao(uo)}function mo(e,t,n){if(uo.current!==so)throw Error(a(168));lo(uo,t),lo(co,n)}function vo(e,t,n){var r=e.stateNode;if(e=t.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var i in r=r.getChildContext())if(!(i in e))throw Error(a(108,K(t)||"Unknown",i));return o({},n,r)}function yo(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||so,fo=uo.current,lo(uo,e),lo(co,co.current),!0}function bo(e,t,n){var r=e.stateNode;if(!r)throw Error(a(169));n?(e=vo(e,t,fo),r.__reactInternalMemoizedMergedChildContext=e,ao(co),ao(uo),lo(uo,e)):ao(co),lo(co,n)}var wo=null,xo=null,Eo=i.unstable_runWithPriority,ko=i.unstable_scheduleCallback,So=i.unstable_cancelCallback,_o=i.unstable_shouldYield,Co=i.unstable_requestPaint,Oo=i.unstable_now,Lo=i.unstable_getCurrentPriorityLevel,Po=i.unstable_ImmediatePriority,Ro=i.unstable_UserBlockingPriority,jo=i.unstable_NormalPriority,To=i.unstable_LowPriority,Ao=i.unstable_IdlePriority,Mo={},Io=void 0!==Co?Co:function(){},Do=null,No=null,Fo=!1,zo=Oo(),Bo=1e4>zo?Oo:function(){return Oo()-zo};function $o(){switch(Lo()){case Po:return 99;case Ro:return 98;case jo:return 97;case To:return 96;case Ao:return 95;default:throw Error(a(332))}}function Wo(e){switch(e){case 99:return Po;case 98:return Ro;case 97:return jo;case 96:return To;case 95:return Ao;default:throw Error(a(332))}}function Ho(e,t){return e=Wo(e),Eo(e,t)}function Uo(e,t,n){return e=Wo(e),ko(e,t,n)}function Vo(){if(null!==No){var e=No;No=null,So(e)}qo()}function qo(){if(!Fo&&null!==Do){Fo=!0;var e=0;try{var t=Do;Ho(99,(function(){for(;eg?(m=f,f=null):m=f.sibling;var v=p(o,f,l[g],s);if(null===v){null===f&&(f=m);break}e&&f&&null===v.alternate&&t(o,f),a=i(v,a,g),null===c?u=v:c.sibling=v,c=v,f=m}if(g===l.length)return n(o,f),u;if(null===f){for(;gm?(v=g,g=null):v=g.sibling;var b=p(o,g,y.value,u);if(null===b){null===g&&(g=v);break}e&&g&&null===b.alternate&&t(o,g),l=i(b,l,m),null===f?c=b:f.sibling=b,f=b,g=v}if(y.done)return n(o,g),c;if(null===g){for(;!y.done;m++,y=s.next())null!==(y=d(o,y.value,u))&&(l=i(y,l,m),null===f?c=y:f.sibling=y,f=y);return c}for(g=r(o,g);!y.done;m++,y=s.next())null!==(y=h(g,o,m,y.value,u))&&(e&&null!==y.alternate&&g.delete(null===y.key?m:y.key),l=i(y,l,m),null===f?c=y:f.sibling=y,f=y);return e&&g.forEach((function(e){return t(o,e)})),c}return function(e,r,i,s){var u="object"==typeof i&&null!==i&&i.type===S&&null===i.key;u&&(i=i.props.children);var c="object"==typeof i&&null!==i;if(c)switch(i.$$typeof){case E:e:{for(c=i.key,u=r;null!==u;){if(u.key===c){if(7===u.tag){if(i.type===S){n(e,u.sibling),(r=o(u,i.props.children)).return=e,e=r;break e}}else if(u.elementType===i.type){n(e,u.sibling),(r=o(u,i.props)).ref=wi(e,u,i),r.return=e,e=r;break e}n(e,u);break}t(e,u),u=u.sibling}i.type===S?((r=Ws(i.props.children,e.mode,s,i.key)).return=e,e=r):((s=$s(i.type,i.key,i.props,null,e.mode,s)).ref=wi(e,r,i),s.return=e,e=s)}return l(e);case k:e:{for(u=i.key;null!==r;){if(r.key===u){if(4===r.tag&&r.stateNode.containerInfo===i.containerInfo&&r.stateNode.implementation===i.implementation){n(e,r.sibling),(r=o(r,i.children||[])).return=e,e=r;break e}n(e,r);break}t(e,r),r=r.sibling}(r=Vs(i,e.mode,s)).return=e,e=r}return l(e)}if("string"==typeof i||"number"==typeof i)return i=""+i,null!==r&&6===r.tag?(n(e,r.sibling),(r=o(r,i)).return=e,e=r):(n(e,r),(r=Us(i,e.mode,s)).return=e,e=r),l(e);if(bi(i))return g(e,r,i,s);if(W(i))return m(e,r,i,s);if(c&&xi(e,i),void 0===i&&!u)switch(e.tag){case 1:case 22:case 0:case 11:case 15:throw Error(a(152,K(e.type)||"Component"))}return n(e,r)}}var ki=Ei(!0),Si=Ei(!1),_i={},Ci=io(_i),Oi=io(_i),Li=io(_i);function Pi(e){if(e===_i)throw Error(a(174));return e}function Ri(e,t){switch(lo(Li,t),lo(Oi,e),lo(Ci,_i),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:pe(null,"");break;default:t=pe(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}ao(Ci),lo(Ci,t)}function ji(){ao(Ci),ao(Oi),ao(Li)}function Ti(e){Pi(Li.current);var t=Pi(Ci.current),n=pe(t,e.type);t!==n&&(lo(Oi,e),lo(Ci,n))}function Ai(e){Oi.current===e&&(ao(Ci),ao(Oi))}var Mi=io(0);function Ii(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!=(64&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Di=null,Ni=null,Fi=!1;function zi(e,t){var n=Fs(5,null,null,0);n.elementType="DELETED",n.type="DELETED",n.stateNode=t,n.return=e,n.flags=8,null!==e.lastEffect?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function Bi(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,!0);default:return!1}}function $i(e){if(Fi){var t=Ni;if(t){var n=t;if(!Bi(e,t)){if(!(t=Ur(n.nextSibling))||!Bi(e,t))return e.flags=-1025&e.flags|2,Fi=!1,void(Di=e);zi(Di,n)}Di=e,Ni=Ur(t.firstChild)}else e.flags=-1025&e.flags|2,Fi=!1,Di=e}}function Wi(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;Di=e}function Hi(e){if(e!==Di)return!1;if(!Fi)return Wi(e),Fi=!0,!1;var t=e.type;if(5!==e.tag||"head"!==t&&"body"!==t&&!Br(t,e.memoizedProps))for(t=Ni;t;)zi(e,t),t=Ur(t.nextSibling);if(Wi(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(a(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){Ni=Ur(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}Ni=null}}else Ni=Di?Ur(e.stateNode.nextSibling):null;return!0}function Ui(){Ni=Di=null,Fi=!1}var Vi=[];function qi(){for(var e=0;ei))throw Error(a(301));i+=1,Qi=Zi=null,t.updateQueue=null,Ki.current=ja,e=n(r,o)}while(ea)}if(Ki.current=La,t=null!==Zi&&null!==Zi.next,Xi=0,Qi=Zi=Yi=null,Ji=!1,t)throw Error(a(300));return e}function oa(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===Qi?Yi.memoizedState=Qi=e:Qi=Qi.next=e,Qi}function ia(){if(null===Zi){var e=Yi.alternate;e=null!==e?e.memoizedState:null}else e=Zi.next;var t=null===Qi?Yi.memoizedState:Qi.next;if(null!==t)Qi=t,Zi=e;else{if(null===e)throw Error(a(310));e={memoizedState:(Zi=e).memoizedState,baseState:Zi.baseState,baseQueue:Zi.baseQueue,queue:Zi.queue,next:null},null===Qi?Yi.memoizedState=Qi=e:Qi=Qi.next=e}return Qi}function aa(e,t){return"function"==typeof t?t(e):t}function la(e){var t=ia(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=Zi,o=r.baseQueue,i=n.pending;if(null!==i){if(null!==o){var l=o.next;o.next=i.next,i.next=l}r.baseQueue=o=i,n.pending=null}if(null!==o){o=o.next,r=r.baseState;var s=l=i=null,u=o;do{var c=u.lane;if((Xi&c)===c)null!==s&&(s=s.next={lane:0,action:u.action,eagerReducer:u.eagerReducer,eagerState:u.eagerState,next:null}),r=u.eagerReducer===e?u.eagerState:e(r,u.action);else{var f={lane:c,action:u.action,eagerReducer:u.eagerReducer,eagerState:u.eagerState,next:null};null===s?(l=s=f,i=r):s=s.next=f,Yi.lanes|=c,Il|=c}u=u.next}while(null!==u&&u!==o);null===s?i=r:s.next=l,ar(r,t.memoizedState)||(Aa=!0),t.memoizedState=r,t.baseState=i,t.baseQueue=s,n.lastRenderedState=r}return[t.memoizedState,n.dispatch]}function sa(e){var t=ia(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,i=t.memoizedState;if(null!==o){n.pending=null;var l=o=o.next;do{i=e(i,l.action),l=l.next}while(l!==o);ar(i,t.memoizedState)||(Aa=!0),t.memoizedState=i,null===t.baseQueue&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function ua(e,t,n){var r=t._getVersion;r=r(t._source);var o=t._workInProgressVersionPrimary;if(null!==o?e=o===r:(e=e.mutableReadLanes,(e=(Xi&e)===e)&&(t._workInProgressVersionPrimary=r,Vi.push(t))),e)return n(t._source);throw Vi.push(t),Error(a(350))}function ca(e,t,n,r){var o=Ol;if(null===o)throw Error(a(349));var i=t._getVersion,l=i(t._source),s=Ki.current,u=s.useState((function(){return ua(o,t,n)})),c=u[1],f=u[0];u=Qi;var d=e.memoizedState,p=d.refs,h=p.getSnapshot,g=d.source;d=d.subscribe;var m=Yi;return e.memoizedState={refs:p,source:t,subscribe:r},s.useEffect((function(){p.getSnapshot=n,p.setSnapshot=c;var e=i(t._source);if(!ar(l,e)){e=n(t._source),ar(f,e)||(c(e),e=ls(m),o.mutableReadLanes|=e&o.pendingLanes),e=o.mutableReadLanes,o.entangledLanes|=e;for(var r=o.entanglements,a=e;0n?98:n,(function(){e(!0)})),Ho(97