1;!function(){try { var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&((e._debugIds|| (e._debugIds={}))[n]="8e5ec673-11d4-5b9a-3a5d-145b545052d8")}catch(e){}}(); 2(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,7704207,e=>{"use strict";e.s(["BOOLEAN_FLAGS",()=>u,"BUSY_SEND_BEHAVIOR_FLAG",()=>m,"EWS_PICKER_CONFIG_FLAG",()=>z,"parseComputerRevivingConfig",()=>x,"parseCreditTopupConfig",()=>eL,"parseEwsPickerConfig",()=>V,"parseImagineAnnouncementsConfig",()=>O,"parseMaxFiles",()=>v,"parseQueryBarAccessibility",()=>A,"parseQueryBarPlaceholders",()=>p,"parseVoiceAgentBuilderCtaConfig",()=>h,"parseWebFileUpload",()=>U,"useFeatureFlags",()=>T,"useImagineAudioCapabilities",()=>eS,"useImagineCanvasLightbox",()=>ee,"useImagineCollectionsEnabled",()=>Q,"useImagineVideoPromptHelperModel",()=>q,"useMaxFiles",()=>P,"useMaxImagineFiles",()=>K,"useMaxImagineR2VFiles",()=>Y,"useProjectStorageLimits",()=>y,"useShowImagineAgentInputs",()=>eI,"useShowImagineAutoAspectRatio",()=>J,"useShowImagineCameraEdit",()=>ea,"useShowImagineDraw",()=>$,"useShowImagineExtractSubject",()=>ei,"useShowImagineFramePins",()=>eu,"useShowImagineImageEditReferences",()=>em,"useShowImagineImageModeExtras",()=>eg,"useShowImagineImageZoom",()=>en,"useShowImagineIntermediateFrames",()=>ed,"useShowImagineMultiRegionEdit",()=>er,"useShowImagineMultiRegionRefs",()=>eo,"useShowImagineMusicComposer",()=>eA,"useShowImagineOmniAudio",()=>eE,"useShowImagineOmniModel",()=>j,"useShowImaginePaletteEdit",()=>Z,"useShowImagineReframe",()=>et,"useShowImagineSavedReferences",()=>X,"useShowImagineShareAudience",()=>el,"useShowImagineTextEdit",()=>es,"useShowImagineToolbarGroupedSettings",()=>e_,"useShowOpenInImagineFromChat",()=>ec,"useVerifyIntegrity",()=>C]);var t=e.i(5833606),n=e.i(8914543),i=e.i(2284795),a=e.i(4690862),r=e.i(1144566),o=e.i(5122204),s=e.i(6877861),_=e.i(4302469),l=e.i(8175652),c=e.i(1546153),E=e.i(3424751);let u={ENABLE_BILLING_FACADE:"enable_billing_facade",ENABLE_GROK_BACKEND_JOIN_LINKS:"enable_grok_backend_join_links",ENABLE_PREPAID_BENEFITS:"enable_prepaid_benefits",ENABLE_SCREEN_SHARING:"enable_screen_sharing",ENABLE_DICTATION:"enable_dictation",SHOW_FAVORITE_BUTTON:"show_favorite_button",SHOW_MODEL_CONFIG_OVERRIDE:"show_model_config_override",SHOW_OPEN_IN_APP_DIALOG_EVERY_TIME:"show_open_in_app_dialog_every_time",USE_OPEN_IN_APP_BANNER:"use_open_in_app_banner",USE_IMAGINE_OPEN_IN_APP_DIALOG:"use_imagine_open_in_app_dialog",SHOW_OPEN_IN_APP_ON_IOS_SAFARI:"show_open_in_app_on_ios_safari",SHOW_RESPONSE_LOAD_TIMER:"show_response_load_timer",SHOW_X_INLINE:"show_x_inline",SHOW_YOUTUBE_EMBEDS:"show_youtube_embeds",SUBSCRIPTIONS_PAGE_ANIMATE:"subscriptions_page_animate",ENABLE_TOPUP_UPDATE_DELAY_COPY:"enable_topup_update_delay_copy",ENABLE_USAGE_LIMIT_RESET:"enable_usage_limit_reset",ENABLE_USAGE_LIMIT_RESET_BANNER:"enable_usage_limit_reset_banner",ENABLE_FREE_USAGE_AFTER_LIMIT_BANNER:"enable_free_usage_after_limit_banner",SUBSCRIPTIONS_CANCEL_FLOW_DOWNGRADE_STEP_ENABLED:"subscriptions_cancel_flow_downgrade_step_enabled",ENABLE_IMAGINE_MORE_BUTTON:"enable_imagine_more_button",NO_IMAGINE_BANNER:"no_imagine_banner",IMAGINE_ENABLE_CHILD_POST_IDS:"imagine_enable_child_post_ids",IMAGINE_RESOLVE_DIRECT_LOAD_CONTAINER:"imagine_resolve_direct_load_container",ENABLE_SHARE_TO_X_BUTTON:"enable_share_to_x_button",SHOW_X_CONNECTOR_READY_BANNER:"show_x_connector_ready_banner",ENABLE_BROWSER_GEO_LOCATION:"enable_browser_geo_location",ENABLE_CHAT_LOCATION_REQUEST:"enable_chat_location_request",ENABLE_CHECKOUT_FORMS:"enable_checkout_forms",ENABLE_UPDATED_UPSELL_FREE_TRIAL_SUBTITLE:"enable_updated_upsell_free_trial_subtitle",ENABLE_FETCH_OFFER_DATA:"enable_fetch_offer_data",ENABLE_PAYPAL_CHECKOUT_ROUTE:"enable_paypal_checkout_route",VOICE_CHAT_VIEW_RECORDING_PLAYER:"voice_chat_view_recording_player",VOICE_ENABLE_RICH_FORMAT:"enable_rich_format",ENABLE_VOICE_SAFARI_AUDIO_WARMUP:"enable_voice_safari_audio_warmup",ENABLE_VOICE_THUMBS_FEEDBACK:"enable_voice_thumbs_feedback",WEB_VOICE_LIBRARY_ENABLED:"web_voice_library_enabled",ENABLE_VOICE_IN_PROJECTS:"enable_voice_in_projects",ENABLE_MEMORY_TOGGLE:"enable_memory_toggle",ENABLE_MEMORY_SUMMARY:"enable_memory_summary",ENABLE_MEMORY_IMPORT:"enable_memory_import",ENABLE_MARKDOWN_BREAKOUT:"enable_markdown_breakout",ENABLE_XLSX_EDITING:"enable_xlsx_editing",USE_EXCELJS:"use_exceljs",XLSX_EXCELJS_LIGHT_DEFAULT:"xlsx_exceljs_light_default",ENABLE_ORG_SCOPE_CONNECTORS:"connectors_org_scope_enabled",ENABLE_GROK_WEB_PLUGIN_MARKETPLACE:"enable_grok_web_plugin_marketplace",ENABLE_PLAID_FINANCE:"grok_web_plaid_finance_enabled",CONSUMER_MARKETING_CONSENT_ENABLED:"consumer_marketing_consent_enabled",CONSUMER_MARKETING_PRE_CHECKED_ENABLED:"consumer_marketing_pre_checked_enabled",ENABLE_MCP_ADVANCED_SELECTOR:"grok_web_mcp_enabled_advanced_selector",ENABLE_MCP_ENTERPRISE_MANAGED_AUTH:"grok_web_mcp_enterprise_managed_auth",ENABLE_CONNECTOR_SERVICE_ACCOUNT_AUTH:"connectors_manager_service_account_auth_enabled",ENABLE_CONNECTOR_KEYWORD_UPSELL:"grok_web_enable_connector_keyword_match_upsell",ENABLE_BUILD_MODE_QUERY_HINT:"enable_build_mode_query_hint",ENABLE_OFFICE_PLUGIN_CTA:"office_plugin_cta",ENABLE_NOTIFICATIONS:"enable_notifications",ENABLE_IMAGINE_SIDE_BY_SIDE_PLAY_ON_HOVER:"enable_imagine_side_by_side_play_on_hover",ENABLE_TEXT_TO_SPEECH:"enable_text_to_speech",SHOW_IMAGINE_DEV_INFO:"show_imagine_dev_info",SHOW_REMAINING_QUERIES_TOAST:"show_remaining_queries_toast",DISABLE_SELF_HARM_SHORT_CIRCUIT:"disable_self_harm_short_circuit",ENABLE_PERFORMANCE_OBSERVER_LOGS:"enable_performance_observer_logs",ENABLE_IMAGINE_EXTEND_VIDEO_MODE:"enable_imagine_extend_video_mode",ENABLE_IMAGINE_EXTEND_TIMELINE:"enable_imagine_extend_timeline",ENABLE_IMAGINE_VIDEO_LENGTH:"enable_imagine_video_length",ENABLE_WEB_FLEXIBLE_VIDEO:"web-flexible-video",ENABLE_IMAGINE_PROJECTS_VIEW:"web-imagine-projects-view",ENABLE_UNIFIED_IMAGINE_SIDEBAR:"web-unified-imagine-sidebar",ENABLE_UNIFIED_PROJECTS:"web-unified-projects",ENABLE_IMAGINE_CANVAS_JSON:"web-imagine-canvas-json",ENABLE_IMAGINE_DISCOVER_V2:"enable_imagine_discover_v2",ENABLE_IMAGINE_MORE_IN_CHAT:"enable_imagine_more_in_chat",ENABLE_IMAGINE_VIDEO_CANCEL_BUTTON:"enable_imagine_video_cancel_button",ENABLE_RATE_LIMIT_LOGGED_OUT_COPY_UPDATE:"enable_rate_limit_logged_out_copy_update",ENABLE_IMAGINE_VIDEO_AUTO_GENERATION_PREFERENCE:"enable_imagine_video_auto_generation_preference",ENABLE_IMAGINE_PERF_MONITOR:"enable_imagine_perf_monitor",ENABLE_SKILL_SHARING:"enable_skill_sharing",ENABLE_VERIFIED_SKILLS:"enable_verified_skills",SHOW_SKILLS_SAMPLE_PROMPTS:"show_skills_sample_prompts",ENABLE_AUTOMATIONS_WEEKDAY_CADENCE:"enable_automations_weekday_cadence",ENABLE_CUSTOM_SCHEDULES:"enable_custom_schedules",ENABLE_EVENT_TRIGGERS:"enable_event_triggers",ENABLE_IMAGINE_MENTIONS:"enable_imagine_mentions",ENABLE_IMAGINE_IMAGE_COUNT:"enable_imagine_image_count",IMAGINE_SHOW_PAYWALL_WEB:"imagine_show_paywall_web",ENABLE_APP_OPEN_PAYWALL:"enable_app_open_paywall",ENABLE_IMAGINE_R2V:"enable_imagine_r2v",ENABLE_IMAGINE_AGENT_CONNECTORS:"enable_imagine_agent_c
2onnectors",IMAGINE_AGENT_CONNECTORS_GLOBAL_PERSISTENCE:"imagine_agent_connectors_global_persistence",ENABLE_IMAGINE_MULTI_REF_EDIT_TEMPLATE:"enable_imagine_multi_ref_edit_template",DISABLE_IMAGINE_MATURE_CONTENT_GATE:"disable_imagine_mature_content_gate",ENABLE_IMAGINE_POST_NAV:"enable_imagine_post_nav",ENABLE_IMAGINE_POST_ACTION_REORDER:"enable_imagine_post_action_reorder",ENABLE_IMAGINE_LIGHTBOX_SIDE_PANEL:"enable_imagine_lightbox_side_panel",ENABLE_IMAGINE_LIGHTBOX_VIEW_TABS:"enable_imagine_lightbox_view_tabs",ENABLE_IMAGINE_VIDEO_FLICKER_FIX:"enable_imagine_video_flicker_fix",ENABLE_CHAT_IMAGE_MAKE_VIDEO:"enable_chat_image_make_video",SUGGESTIONS_SHOW_DEV_ICON:"suggestions_show_dev_icon",ENABLE_UPGRADE_BUTTON_IN_SIDEBAR:"enable_upgrade_button_in_sidebar",ENABLE_UPGRADE_BUTTON_IN_IMAGINE_PAGE:"enable_upgrade_button_in_imagine_page",ENABLE_IMAGINE_LIMITED_TIME_UPSELL_PILL:"enable_imagine_limited_time_upsell_pill",ENABLE_SETTINGS_UPSELL_PROMO_BANNER:"enable_settings_upsell_promo_banner",SUPERGROK_PAYWALL_ANNUAL_PRICING_MONTHLY_EQUIVALENT_ENABLED:"supergrok_paywall_annual_pricing_monthly_equivalent_enabled",SUPERGROK_PAYWALL_HIDE_LITE_ON_PROMO_ENABLED:"supergrok_paywall_hide_lite_on_promo_enabled",SUPERGROK_UPSELL_SMALL_PROMO_COUNTDOWN_ENABLED:"supergrok_upsell_small_promo_countdown_enabled",SUPERGROK_PAYWALL_HIDE_OFFER_COUNTDOWN_ENABLED:"supergrok_paywall_hide_offer_countdown_enabled",SUPERGROK_PAYWALL_MOBILE_SUPERGROK_FIRST_ENABLED:"supergrok_paywall_mobile_supergrok_first_enabled",SUPERGROK_PAYWALL_ROCKET_THEME:"supergrok_paywall_rocket_theme",SUPERGROK_PAYWALL_RESTYLE_V3:"supergrok_paywall_restyle_v3",SUPERGROK_PAYWALL_HEAVY_X_PREMIUM_PLUS_ENABLED:"supergrok_paywall_heavy_x_premium_plus_enabled",SUPERGROK_PAYWALL_CLICKABLE_CARD:"supergrok_paywall_clickable_card",ENABLE_DOWNGRADE_CARDS_PAYWALL:"enable_downgrade_cards_paywall",ENABLE_GROK_45_COPY:"enable_grok_4_5_copy",SHOW_MODEL_HASH_DEBUG:"show_model_hash_debug",MODEL_FAV_ENABLED:"model_fav_enabled",ENABLE_PLAYGROUND:"enable_playground",ENABLE_QUICK_IMAGINE_REDO_SHORTCUT:"enable_quick_imagine_redo_shortcut",ENABLE_BETTER_UPSCALE_WEB:"enable_better_upscale_web",ENABLE_AGENT_CUSTOMIZATIONS:"enable_agent_customizations",ENABLE_IMAGINE_FOLDERS:"enable_imagine_folders",ENABLE_ATLAS_TYPE_TO_PROMPT:"enable_atlas_type_to_prompt",ENABLE_WEB_IMAGINE_MULTISELECT:"enable_web_imagine_multiselect",ENABLE_WEB_IMAGINE_COMPACT_VIEW:"enable_web_imagine_compact_view",ENABLE_IMAGINE_SEARCH_INDEX_ON_DEMAND:"enable_imagine_search_index_on_demand",ENABLE_IMAGINE_SAVED_SEARCH_ON_DEMAND:"enable_imagine_saved_search_on_demand",DISABLE_DOWNLOAD_PAGE:"disable_download_page",HIDE_DEFAULT_EXAMPLE_PROJECTS:"hide_default_example_projects",ENABLE_DOB_LOCK:"enable_dob_lock",USE_TEXT_DOB_YEAR_INPUT:"use_text_dob_year_input",ENABLE_IMAGINE_QUERY_BAR_ANIMATION:"enable_imagine_query_bar_animation",ENABLE_ACTIVE_PROMOTION_SECTION_IN_BILLING_TAB:"enable_active_promotion_section_in_billing_tab",ENABLE_REMOVE_CREDIT_PAYMENT_METHOD:"enable_remove_credit_payment_method",ENABLE_INLINE_AUTO_TOPUP_DISABLE:"enable_inline_auto_topup_disable",ENABLE_TEAM_SHARE_CONFIRMATION:"enable_team_share_confirmation",ENABLE_WORKSPACE_SHARE_EXPLAINER:"grok_web_workspace_share_explainer",ENABLE_SHARED_WORKSPACE_PREVIEW:"grok_web_shared_workspace_preview",SHOW_EMAIL_IN_SHARE_PICKER:"show_email_in_share_picker",ENABLE_PBT:"enable_pbt",ENABLE_FEEDBACK_ATTACHMENTS:"enable_feedback_attachments",ENABLE_FEEDBACK_WANTS_RESPONSE:"enable_feedback_wants_response",SHOW_CHAT_DISCLAIMER:"show_chat_disclaimer",SHOW_FILES_EXPLORER_SHARED_PAGE:"show_files_explorer_shared_page",ENABLE_CONNECTOR_REAUTH:"connector_reauth_exp_web",DISABLE_REPORT_ISSUE:"disable_report_issue",ENABLE_EXPERIMENTAL_REPORTING:"enable_experimental_reporting",SHOW_PRIVACY_POLICY_NOTICE:"show_privacy_policy_notice",ENABLE_IN_APP_AUTH:"enable_in_app_auth",CURSOR_LOGIN_UNIFICATION_GROK_CURSOR_BLOCKED_SCREEN:a.CURSOR_LOGIN_UNIFICATION_GROK_CURSOR_BLOCKED_SCREEN_FLAG,CURSOR_LOGIN_UNIFICATION_SSO_ROUTING_WEB:"cursor_login_unification_sso_routing_web",ENABLE_X_SEAMLESS_SIGNIN:"enable_x_seamless_signin",ENABLE_TEAM_MANAGEMENT:"grok_web_team_management",ENABLE_ONE_TO_TWO_INVITES:"grok_web_enable_one_to_two_invites",ENABLE_AVATAR_MENU_EXTRAS:"grok_web_avatar_menu_extras",DPOP_ENFORCE:"grok_dpop_enforce_enabled",SHOW_ADMIN_TEAMS_IN_SWITCHER:n.ADMIN_TEAMS_IN_SWITCHER_FLAG,ENABLE_IMAGINE_PAYWALL:"enable_imagine_paywall",ENABLE_FILE_MENTIONS:"enable_file_mentions",ENABLE_IMAGINE_PAYWALL_TESTIMONIALS:"enable_imagine_paywall_testimonials",ENABLE_IMAGINE_PAYWALL_GALLERY_CAROUSEL:"enable_imagine_paywall_gallery_carousel",ENABLE_IMAGINE_TEMPLATE_X_HANDLE:"enable_imagine_template_x_handle",ENABLE_IMAGINE_TEMPLATE_FEATURING_OPT_IN:"enable_imagine_template_featuring_opt_in",ENABLE_IMAGINE_NATIVE_MEDIA_SIZING:"enable_imagine_native_media_sizing",ENABLE_IMAGINE_CREDIT_QUOTA_NOTICE:"enable_imagine_credit_quota_notice",ENABLE_IMAGINE_CREDIT_QUOTA_NOTICE_LOW:"enable_imagine_credit_quota_notice_low",ENABLE_IMAGINE_CREDIT_QUOTA_TOAST:"enable_imagine_credit_quota_toast",ENABLE_IMAGINE_USAGE_LIMIT_WARNING_TOASTS:"enable_imagine_usage_limit_warning_toasts",ENABLE_IMAGINE_USAGE_LIMIT_UNVEIL:"enable_imagine_usage_limit_unveil",ENABLE_IMAGINE_VIDEO_DURATION_COST:"enable_imagine_video_duration_cost",SUPERGROK_PAYWALL_FREE_TRIAL_ZERO_PRICE:"supergrok_paywall_free_trial_zero_price",SUPERGROK_UPSELLS_FREE_TRIAL_ZERO_PRICE:"supergrok_upsells_free_trial_zero_price",ENABLE_AGE_GATE:"enable_age_gate",ENABLE_TOS_GATE:"enable_tos_gate",ENABLE_CASTLE_INTEGRATION:"enable_castle_integration",ENABLE_CASTLE_COMMERCE_MINTING:"enable_castle_commerce_minting",ENABLE_CASTLE_CHAT_MINTING:"enable_castle_chat_minting",WEB_KESTREL:"web_kestrel",ENABLE_MCP_APPS_RENDERER:"grok_web_enable_mcp_apps_renderer",ENABLE_MESSAGE_QUEUE:"enable_message_queue",WEB_USE_STREAMING_DICTATION:"web_use_streaming_dictation",ENABLE_SERVER_SLASH_COMMANDS:"enable_server_slash_commands",ENABLE_GROK_BOT:"enable_grok_bot",ENABLE_GROK_BOT_RELAY_CLIENT:"grok_bot_relay_client_enabled",GROK_BOT_SIDEBAR_V2:"grok_bot_sidebar_v2_enabled",ENABLE_GROK_BOT_INTRO_CARD:"enable_grok_bot_intro_card",ENABLE_GROK_BOT_UPSELL:"enable_grok_bot_upsell",ENABLE_STABLE_PREVIEW_LINK:"enable_stable_preview_link",ENABLE_FILE_CARD_OPENS_FILES_TAB:"enable_file_card_opens_files_tab",ENABLE_PREVIEW_RECOVER_ON_DEATH:"enable_preview_recover_on_death",ENABLE_BUILD_MODE_PREVIEW_E
2MPTY_STATE:"enable_build_mode_preview_empty_state",ENABLE_BUILD_MODE_PREVIEW_UPGRADE_CTA:"enable_build_mode_preview_upgrade_cta",APP_BUILDER_WARN_ON_PUBLIC_DEPLOY:"app_builder_warn_on_public_deploy",FREE_TIER_PUBLISH_DIALOG_BANNER:"free-tier-publish-dialog-banner",ENABLE_IMAGINE_SESSION_RESUME:"enable_imagine_session_resume",ENABLE_IMAGINE_VIDEO_AUDIO_TOGGLE:"enable_imagine_video_audio_toggle_web",SHOW_SECRETS_IN_PUBLISH_DIALOG:"show-secrets-in-publish-dialog",SHOW_CUSTOM_DOMAIN_PUBLISH_DIALOG:"show-custom-domain-publish-dialog",SHOW_XAI_API_KEY_PUBLISH_DIALOG:"show-xai-api-key-publish-dialog",SHOW_FORKING_PUBLISH_DIALOG:"show-forking-publish-dialog",DISABLE_APP_PUBLISH:"disable_app_publish",DISABLE_APP_BUILDER_GITHUB_EXPORT:"disable_app_builder_github_export",NEW_PUBLISH_DIALOG:"new-publish-dialog",ENABLE_DS_PICKER_ICONS:"enable_ds_picker_icons",ENABLE_EWS_PICKER:"grok_web_ews_picker_enabled"},d=["modal-video","modal-static","modal-static-right","full-page"],g=["supergrok","plus","heavy"],m="grok_web_busy_send_behavior",I=["queue","steer"];function A(e){if("object"!=typeof e||null===e)return{enabled:!1,accessiblity_path:"",button_name:"",text:"",pills:[],show_model_selector:!1};let t=(Array.isArray(e.dynamic_pills)?e.dynamic_pills:[]).filter(e=>"object"==typeof e&&null!==e).map((e,t)=>{let n=function(e){if(!Array.isArray(e))return[];let t=[];for(let n of e){if("object"!=typeof n||null===n)continue;let e="string"==typeof n.label?n.label.trim():"",i=String(n.prompt??"").trim();e&&i&&t.push({label:e,prompt:i})}return t}(e.prompts),i=String(e.icon??"");return{key:`dyn:${i}:${t}`,label:n[0]?.label??"",icon:i,variants:n}}).filter(e=>e.variants.length>0);return{enabled:!0===e.enabled,accessiblity_path:String(e.accessiblity_path??""),button_name:String(e.button_name??""),text:String(e.text??""),pills:t,show_model_selector:!0===e.show_model_selector}}let S=E.z.object({desktop:E.z.array(E.z.string()).optional(),mobile:E.z.string().optional()});function p(e){let t=S.safeParse(e);return t.success?t.data:{}}let b=E.z.object({enabled:E.z.boolean().default(!1),redirectURL:E.z.string().default(""),opensInExternalBrowser:E.z.boolean().default(!1),showsShareButton:E.z.boolean().default(!1)}),N=b.parse({});function h(e){let t=b.safeParse(e);return t.success?t.data:N}let f=E.z.object({key:E.z.string().min(1),mediaVideoSrc:E.z.string().default(""),mediaImageSrc:E.z.string().default(""),eyebrow:E.z.string().default(""),title:E.z.string().min(1),body:E.z.string().default(""),ctaLabel:E.z.string().min(1),ctaStoreOverrides:E.z.object({imagineMode:E.z.enum(["image","video"]).optional(),imageGenSpeed:E.z.enum(["fast","pro"]).optional(),imageGenResolution:E.z.enum(["1k","2k"]).optional(),videoLength:E.z.number().optional(),resolution:E.z.string().optional(),videoAudioEnabled:E.z.boolean().optional(),videoUseFirstFrame:E.z.boolean().optional(),toolbox:E.z.object({section:E.z.enum(["images","audio","references","connectors"]).optional(),openNewReference:E.z.boolean().optional()}).optional()}).optional(),ctaRoute:E.z.string().default(""),ctaFocusQueryBar:E.z.boolean().default(!0),learnMoreLabel:E.z.string().default(""),learnMoreUrl:E.z.string().default("")}),L=E.z.object({promos:E.z.array(E.z.unknown()).default([]).transform(e=>e.flatMap(e=>{let t=f.safeParse(e);return t.success?[t.data]:[]}))});function O(e){let t=L.safeParse(e);return t.success?t.data.promos:[]}function T(){let{user:e}=(0,i.useSession)(),n=(0,c.useMemo)(()=>(0,o.isXaiInternalEmail)(e?.email),[e?.email]),a=(0,_.useFeatureStore)(e=>e.config),r=(0,_.useFeatureStore)(e=>e.overrides),l=(0,_.useFeatureStore)(e=>e.overridesEnabled),E=(0,_.useFeatureStore)(e=>"ready"===e.status);return(0,c.useMemo)(()=>{var e,i,o,c,A;let S={config:a,overrides:r,overridesEnabled:l},p=e=>(0,_.selectFeature)(S,e),b=(e,t)=>{let n=p(e);return"number"==typeof n&&Number.isFinite(n)?n:t},N=e=>{let t=p(e)??{};return{value:t,get:(e,n)=>"object"==typeof t&&t&&!Array.isArray(t)?t[e]??n:n}},h=Object.fromEntries(Object.entries(u).map(([e,t])=>[e,!!p(t)]));return{...h,SHOW_CUSTOM_DOMAIN_PUBLISH_DIALOG:!!(p(u.SHOW_CUSTOM_DOMAIN_PUBLISH_DIALOG)??!0),SHOW_FORKING_PUBLISH_DIALOG:h.SHOW_FORKING_PUBLISH_DIALOG&&!h.DISABLE_APP_PUBLISH,isXaiEmployee:n,PAY_UPFRONT_IMAGINE_RATE_LIMIT:N("pay_upfront_imagine_rate_limit").value,PAY_UPFRONT_NEW_CHAT:N("pay_upfront_new_chat").value,PAY_UPFRONT_MODEL_SELECT:N("pay_upfront_model_select").value,PAY_UPFRONT_IMAGINE_PAGE:N("pay_upfront_imagine_page").value,GROK_BUILD_SHOW_INSTALL:!0===N("grok_build_access_gate_web").get("allow_access",!1),BANNER:N("banner"),VOICE_MODE_CONFIG:(0,s.resolveVoiceModeConfigFromV2)(p("voice_mode_config_v2")),MEDIA_GEN_V
2IDEO_CONFIG:N("media_gen_video_config"),IMAGINE_CAPTION_PRESETS:N("imagine-caption-presets"),IMAGINE_CAPTION_PRESETS_V2:N("imagine-caption-presets-v2"),IMAGINE_CONFIGS:N("imagine-configs"),IMAGE_TOOL_PROMPTS:N("image-tool-prompts"),APP_BUILDER_COVER_PROMPTS:N("app-builder-cover-prompts"),IMAGINE_BLOCKED_X_HANDLES:N("imagine-blocked-x-handles"),IMAGINE_TEMPLATES_CONFIG:N("imagine-templates-config"),RESPONSE_FEEDBACK_DROPDOWNS:N("response_feedback_dropdowns"),SUGGESTION_QA_MSG_TEMPLATE:String(p("suggestion_qa_msg_template")??""),QUICK_ANSWER_RATING:p("quick_answer_rating"),PLACES_MAP_LOAD_BEHAVIOR:p("places_map_load_behavior"),UPGRADE_BUTTON_IN_NEW_CHAT_TOP_POSITION:N("upgrade_button_in_new_chat_top_position"),GROK_SUBSCRIPTION_COPY_VERSION:String(p("grok_subscription_copy_version")??"4.5"),GROK_BOT_PAYWALL_VARIANT:(e=p("grok_bot_paywall_variant"),d.find(t=>t===e)),BUSY_SEND_BEHAVIOR:(i=p(m),I.find(e=>e===i)),GROK_BOT_MIN_TIER:(o=p("grok_bot_min_tier"),g.find(e=>e===o)??"heavy"),SUPERGROK_PAYWALL_INTERVAL_SELECTOR:"monthly"===(c=p("supergrok_paywall_interval_selector"))||"annual"===c?c:"both",SUPERGROK_PAYWALL_CATEGORY_SELECTOR:"individual"===(A=p("supergrok_paywall_category_selector"))||"business"===A?A:"both",MAX_CUSTOM_INSTRUCTIONS_LENGTH:N("max_custom_instructions_length"),PERSONALITY_PRESETS:N("personality_presets"),UPSELL_SMALL_KEY:N("upsell_small_key"),MAX_FILES:N("max_files"),PROJECT_STORAGE_LIMITS:N("project_storage_limits"),TIMELINE_NAVIGATOR:N("timeline_navigator"),EXAMPLE_SHARED_PROJECTS:N("example_shared_projects"),TEMPLATE_PRESET_CONFIGS:N("template_preset_configs"),IMAGINE_HOME_V2:N("enable_imagine_home_v2"),IMAGINE_TEMPLATES_WEB:N("imagine_templates_web"),IMAGINE_LIGHTBOX_FEEDBACK:N("imagine_lightbox_feedback"),IMAGINE_ANNOUNCEMENTS:N("imagine_announcements_config"),VOICE_AGENT_BUILDER_CTA_CONFIG:N("voice_agent_builder_cta_config"),VOICE_ATTACHMENTS_LIMIT:b("voice_attachments_limit",15),LATEST_TOS_VERSION:b("latest_tos_version",0),NOTIFICATIONS_FETCH_INTERVAL_MS:b("notifications_fetch_interval_ms",0),MARKETING_PROMPT_MIN_ACCOUNT_AGE_HOURS:b("marketing_prompt_min_account_age_hours",24),REDIRECT_REQUEST_CONVO_FETCH_INTERVAL_MS:b("redirect_request_convo_fetch_interval_ms",0),CREDIT_TOPUP_CONFIG:N("credit-topup-config").value,QUERY_BAR_ACCESSIBILITY:N("query_bar_accessibility"),QUERY_BAR_PLACEHOLDERS:p("query_bar_placeholders")??null,REMIX_OPENING_MESSAGE:String(p("remix_opening_message")??""),NSFW_ENABLED:!!p("nsfw_enabled"),ENABLE_X_INTEGRATION:!!p("enable_x_integration"),LOGO_VARIANT:p("logo_variant")??"",GROK_WEB_BANNER_TEXT:p("grok_web_banner_text")??"",IMPORT_MEMORY_PROMPT:p("import_memory_prompt")??"",IMAGINE_INFINITE_FEED_VARIANT:p("enable_imagine_web_infinite_feed")??"control",ENABLE_COMMUNITY_LINK:!!p("enable_community_link"),DISABLE_IMAGE_GEN:!!p("disable_image_gen"),DISABLE_IMAGINE_VIDEO_MODE:!!p("disable_imagine_video_mode"),DISABLE_VOICE_MODE:!!p("disable_voice_mode")||"true"===t.default.env.NEXT_PUBLIC_FORCE_DISABLE_VOICE,DISABLE_CONVERSATION_SEARCH:!!p("disable_conversation_search"),DISABLE_APP_PUBLISH:!!p(u.DISABLE_APP_PUBLISH),DISABLE_CHANGELOG:!!p("disable_changelog"),DISABLE_INCOGNITO:!!p("disable_incognito"),DISABLE_SHARING:!!p("disable_sharing"),HIDE_FILES_PAGE:!!p("hide_files_page"),HIDE_SUBSCRIPTION_UI:!!p("hide_subscription_ui"),ENABLE_ORG_SCOPE_CONNECTORS:!!p("connectors_org_scope_enabled"),ENABLE_PLAID_FINANCE:!!p(u.ENABLE_PLAID_FINANCE),WEB_KESTREL:!!p(u.WEB_KESTREL),ENABLE_PAYMENT_LAPSED_BANNER:!0===N("web_payment_lapsed_banner").get("enabled"),EXTERNAL_PROJECT_COMPUTER_ROOT_PROVIDERS:N("grok_chat_external_project_computer_root_providers_web"),isReady:E}},[E,a,r,l,n])}function C(e){return!e.SHOW_FAVORITE_BUTTON}let R=E.z.object({max_files:E.z.number()}).catch({max_files:r.DEFAULT_MAX_FILES});function v(e){let t=R.safeParse(e);return t.success?t.data:{max_files:r.DEFAULT_MAX_FILES}}function P(){let e=T(),{max_files:t}=(0,c.useMemo)(()=>v(e.MAX_FILES.value),[e.MAX_FILES]);return t}let B=E.z.object({max_files:E.z.number().default(5e3).catch(5e3),max_total_mb:E.z.number().default(10240).catch(10240)}),M=B.parse({});function y(){let e=T();return(0,c.useMemo)(()=>{var t;let n;return t=e.PROJECT_STORAGE_LIMITS.value,(n=B.safeParse(t)).success?n.data:M},[e.PROJECT_STORAGE_LIMITS])}let w=["image/png","image/jpeg","image/jpg","image/webp","image/heic","image/heif","image/svg+xml","
2image/avif","image/gif","image/bmp","text/*","message/*","application/*","audio/*","video/mp4","video/quicktime",""],G=E.z.object({allowed_mime_types:E.z.array(E.z.string()).default([...w]).catch([...w]),v2_direct_upload_max_size_mb:E.z.number().default(0).catch(0),is_direct_to_http:E.z.boolean().default(!1).catch(!1),max_upload_file_size_mb:E.z.number().default(150).catch(150),max_upload_video_size_mb:E.z.number().default(100).catch(100),multipart_supported:E.z.boolean().default(!0).catch(!0),multipart_concurrency:E.z.number().default(4).catch(4)}),D=G.parse({});function U(e){let t=G.safeParse(e);return t.success?t.data:D}let k=E.z.object({timeout_ms:E.z.number().positive().catch(3e5)}),F=k.parse({});function x(e){let t=k.safeParse(e);return t.success?t.data:F}let z="grok_web_ews_picker_config",H=E.z.object({keep_mode_ids:E.z.array(E.z.string()).default([]).catch([])}),W=H.parse({});function V(e){let t=H.safeParse(e);return t.success?t.data:W}function K(){return T().IMAGINE_CONFIGS.get("max_image_edit_attachments",5)}function Y(){return T().IMAGINE_CONFIGS.get("max_r2v_attachments",7)}function j(){return(0,_.useFeatureStore)(l.selectShowImagineOmniModel)}function X(){return(0,_.useFeatureStore)(l.selectShowImagineSavedReferences)}function q(){return(0,_.useFeatureStore)(l.selectImagineVideoPromptHelperModel)}function Q(){return(0,_.useFeatureStore)(l.selectShowImagineCollections)}function J(){return(0,_.useFeatureStore)(l.selectShowImagineAutoAspectRatio)}function Z(){return(0,_.useFeatureStore)(l.selectShowImaginePaletteEdit)}function $(){return(0,_.useFeatureStore)(l.selectShowImagineDraw)}function ee(){return(0,_.useFeatureStore)(l.selectShowImagineCanvasLightbox)}function et(){return(0,_.useFeatureStore)(l.selectShowImagineReframe)}function en(){return(0,_.useFeatureStore)(l.selectShowImagineImageZoom)}function ei(){return(0,_.useFeatureStore)(l.selectShowImagineExtractSubject)}function ea(){return(0,_.useFeatureStore)(l.selectShowImagineCameraEdit)}function er(){return(0,_.useFeatureStore)(l.selectShowImagineMultiRegionEdit)}function eo(){return(0,_.useFeatureStore)(l.selectShowImagineMultiRegionRefs)}function es(){return(0,_.useFeatureStore)(l.selectShowImagineTextEdit)}function e_(){return(0,_.useFeatureStore)(l.selectShowImagineToolbarGroupedSettings)}function el(){return(0,_.useFeatureStore)(l.selectShowImagineShareAudience)}function ec(){return(0,_.useFeatureStore)(l.selectShowOpenInImagineFromChat)}function eE(){return(0,_.useFeatureStore)(l.selectShowImagineOmniAudio)}function eu(){return(0,_.useFeatureStore)(l.selectShowImagineFramePins)}function ed(){return(0,_.useFeatureStore)(l.selectShowImagineIntermediateFrames)}function eg(){return(0,_.useFeatureStore)(l.selectShowImagineImageModeExtras)}function em(){return(0,_.useFeatureStore)(l.selectShowImagineImageEditReferences)}function eI(){return(0,_.useFeatureStore)(l.selectShowImagineAgentInputs)}function eA(){return(0,_.useFeatureStore)(l.selectShowImagineMusicComposer)}function eS(){let e=(0,_.useFeatureStore)(l.selectShowImagineCuratedVoices),t=(0,_.useFeatureStore)(l.selectShowImagineAudioUpload),n=(0,_.useFeatureStore)(l.selectShowImagineAgentAudioUpload),i=(0,_.useFeatureStore)(l.selectShowImagineAudioRecording),a=(0,_.useFeatureStore)(l.selectShowImagineVoiceDesign);return(0,c.useMemo)(()=>({curated:e,uploads:t,agentUploads:n,record:i,design:a}),[e,t,n,i,a])}let ep=[5,20,50,100],eb=E.z.array(E.z.number().int().min(5).max(2e3)).min(1),eN=eb.optional().catch(void 0),eh=E.z.object({default:eb.catch(ep),byTier:E.z.object({supergrok_lite:eN,supergrok_regular:eN,supergrok_plus:eN,supergrok_heavy:eN,premium_plus:eN,premium:eN}).catch({}).default({})}),ef={default:ep,byTier:{}};function eL(e){let t=eh.safeParse(e);return t.success?t.data:ef}},6697282,e=>{"use strict";e.s(["isDevelopment",0,function(){return!1}])},2458581,e=>{"use strict";let t={ar:{nativeName:"Ø§ÙØ¹Ø±Ø¨ÙØ©",name:"Arabic"},"ar-SA":{nativeName:"Ø§ÙØ¹Ø±Ø¨ÙØ© (Ø§ÙØ³Ø¹ÙØ¯ÙØ©)",name:"Arabic (Saudi Arabia)"},bn:{nativeName:"বাà¦à¦²à¦¾",name:"Bengali"},cs:{nativeName:"ÄeÅ¡tina",name:"Czech"},de:{nativeName:"Deutsch",name:"German"},en:{nativeName:"English",name:"English"},es:{nativeName:"Español",name:"Spanish"},fa:{nativeName:"ÙØ§Ø±Ø³Û",name:"Persian"},fil:{nativeName:"Filipino",name:"Filipino"},fr:{nativeName:"Français",name:"French"},gu:{nativeName:"àªà«àªàª°àª¾àª¤à«",name:"Gujarati"},hi:{nativeName:"हिनà¥à¤¦à¥",name:"Hindi"},hu:{nativeName:"Magyar",name:"Hungarian"},id:{nativeName:"Bahasa Indonesia",name:"Indonesian"},it:{nativeName:"Italiano",name:"Italian"},ja:{nativeName:"æ¥æ¬èª",name:"Japanese"}
2,ko:{nativeName:"íêµì´",name:"Korean"},mr:{nativeName:"मराठà¥",name:"Marathi"},nl:{nativeName:"Nederlands",name:"Dutch"},pl:{nativeName:"Polski",name:"Polish"},pt:{nativeName:"Português",name:"Portuguese"},ro:{nativeName:"RomânÄ",name:"Romanian"},ru:{nativeName:"Ð ÑÑÑкий",name:"Russian"},sv:{nativeName:"Svenska",name:"Swedish"},ta:{nativeName:"தமிழà¯",name:"Tamil"},te:{nativeName:"à°¤à±à°²à±à°à±",name:"Telugu"},tr:{nativeName:"Türkçe",name:"Turkish"},"uk-UA":{nativeName:"УкÑаÑнÑÑка мова",name:"Ukrainian"},vi:{nativeName:"Tiếng Viá»t",name:"Vietnamese"},zh:{nativeName:"ç®ä½ä¸æ",name:"Simplified Chinese"},"zh-TW":{nativeName:"ç¹é«ä¸æ",name:"Traditional Chinese"}},n=Object.entries(t).reduce((e,[t,n])=>(e[t]=n.nativeName,e),{}),i=Object.entries(n),a=new Set(["ar","he","fa","ur","ps","sd","ug","ha","ks","ku"]);e.s(["canonicalTag",0,function(e){try{return Intl.getCanonicalLocales(e)[0]}catch{return}},"getLocaleDirection",0,function(e){if(!e)return"ltr";let t=e.split("-")[0]?.toLowerCase();return t&&a.has(t)?"rtl":"ltr"},"globalLocale",0,"en","locales",0,t,"supportedLocaleLanguages",0,i,"supportedLocaleToLanguage",0,n,"supportedLocales",0,["ar","ar-SA","bn","cs","de","en","es","fa","fil","fr","gu","hi","hu","id","it","ja","ko","mr","nl","pl","pt","ro","ru","sv","ta","te","tr","uk-UA","vi","zh","zh-TW"]])},8914543,4690862,1144566,6877861,e=>{"use strict";function t(e){return e.filter(e=>0n!==e.manageableLicenses)}function n(e){return Array.isArray(e)&&e.every(e=>"string"==typeof e)}e.s(["ADMIN_TEAMS_IN_SWITCHER_FLAG",0,"grok_web_admin_teams_in_switcher","filterTeamsWithSeats",0,t,"mergeAdminManagedTeams",0,function(e,t){let n=new Set(e.map(e=>e.teamId));return[...e,...t.filter(e=>!n.has(e.teamId))]},"switcherAdminManagedTeams",0,function(e,n){return t(e).filter(e=>e.teamId!==n)}],8914543),e.s(["CURSOR_LOGIN_UNIFICATION_GROK_CURSOR_BLOCKED_SCREEN_FLAG",0,"cursor_login_unification_grok_cursor_blocked_screen","shouldShowOrganizationBlocked",0,function(e,t){return e&&"cursor-only-enterprise"===t}],4690862),e.s(["DEFAULT_MAX_FILES",0,10,"MAX_QUERY_LENGTH",0,39e4],1144566);let i={disablePersonalities:!1,mature:!1},a=[{key:"ara",serverId:"ara",name:"Ara",description:"Warm Female",longDescription:"Warm and friendly.",aliases:["ara"],...i},{key:"eve",serverId:"eve",name:"Eve",description:"Energetic Female",longDescription:"Energetic and upbeat.",aliases:["eve"],...i},{key:"leo",serverId:"leo",name:"Leo",description:"Authoritative Male",longDescription:"Authoritative and strong.",aliases:["leo"],...i},{key:"rex",serverId:"rex",name:"Rex",description:"Confident Male",longDescription:"Confident and clear.",aliases:["rex","grok"],...i},{key:"sal",serverId:"sal",name:"Sal",description:"Smooth Male",longDescription:"Smooth and balanced.",aliases:["sal","xai_sal"],...i},{key:"gork",serverId:"Gork",name:"Gork",description:"Lazy Male",longDescription:"Lazy.",disablePersonalities:!0,mature:!0,aliases:["gork"]},{key:"carina",serverId:"carina",name:"Carina",description:"Soft Female",longDescription:"Soft, empathetic, and soothing.",aliases:["carina"],...i},{key:"zagan",serverId:"zagan",name:"Zagan",description:"Powerful Male",longDescription:"Powerful, dramatic, and unmistakable.",aliases:["zagan"],...i},{key:"helix",serverId:"helix",name:"Helix",description:"Bold Male",longDescription:"Bold, dynamic, and adrenaline-fueled.",aliases:["helix"],...i},{key:"orion",serverId:"orion",name:"Orion",description:"Cinematic Male",longDescription:"Rich, cinematic, and resonant.",aliases:["orion"],...i},{key:"luna",serverId:"luna",name:"Luna",description:"Gentle Female",longDescription:"Gentle, patient, and deeply nurturing.",aliases:["luna"],...i},{key:"iris",serverId:"iris",name:"Iris",description:"Friendly Female",longDescription:"Friendly, upbeat, and naturally charming.",aliases:["iris"],...i},{key:"altair",serverId:"altair",name:"Altair",description:"Elegant Male",longDescription:"Elegant, refined, and effortlessly premium.",aliases:["altair"],...i},{key:"zenith",serverId:"zenith",name:"Zenith",description:"Sharp Male",longDescription:"Sharp, focused, and driven.",aliases:["zenith"],...i},{key:"perseus",serverId:"perseus",name:"Perseus",description:"Strong Male",longDescription:"Strong, confident, and trustworthy.",aliases:["perseus"],...i},{key:"helios",serverId:"helios",name:"Helios",description:"Upbeat Male",longDescription:"Upbeat, energetic, and endlessly versatile.",aliases:["helios"],...i},{key:"lux",serverId:"lux",name:"Lux",description:"Calm Female",longDescription:"Grounded, calm, and quietly wise.",aliases:["lux"],...i},{key:"kepler",serverId:"kepler",name:"Kepler",description:"Inventive Male",longDescription:"Inventive, forward-thinking, and charismatic.",aliases:["kepler"],...i},{key:"rigel",serverId:"rigel",name:"Rigel",description:"Precise Male",longDescription:"Precise, professional, and calmly confident.",aliases:["rigel"],...i},{key:"cosmo",serverId:"cosmo",name:"Cosmo",description:"Bright Male",longDescription:"Bright, curious, and easy to follow.",aliases:["cosmo"],...i},{key:"celeste",serverId:"celeste",name:"Celeste",description:"Compassionate Female",longDescription:"Compassionate, confident, and reassuring.",aliases:["celeste"],...i},{key:"ursa",serverId:"ursa",name:"Ursa",description:"Warm Female",longDescription:"Friendly, warm, and steadfast.",aliases:["ursa"],...i},{key:"sirius",serverId:"sirius",name:"Sirius",description:"Playful Male",longDescription:"Quick-witted, clever, and playful.",aliases:["sirius"],...i},{key:"lumen",serverId:"lumen",name:"Lumen",description:"Articulate Female",longDescription:"Warm, articulate, and engaging.",aliases:["lumen"],...i},{key:"castor",serverId:"castor",name:"Castor",description:"Charismatic Male",longDescription:"Charismatic, down-to-earth, and easygoing.",aliases:["castor"],...i},{key:"naksh",serverId:"naksh",name:"Naksh",description:"Thoughtful Male",longDescription:"Warm, thoughtful, and wise.",aliases:["naksh"],...i},{key:"atlas",serverId:"atlas",name:"Atlas",description:"Commanding Male",longDescription:"Confident, commanding, and reassuring.",aliases:["atlas"],...i},{key:"aurora",serverId:"aurora",name:"Aurora",description:"Serene Female",longDescription:"Serene, steady, and radiant.",aliases:["aurora"],...i},{key:"liora",serverId:"liora",name:"Liora",description:"Calm Female",longDescription:"Calm, grounded, and luminous.",aliases:["liora"],...i}],r=[{key:"assistant",serverId:"assistant",title:"Assistant",mature:!1,kids:!1,aliases:["assistant"]},{key:"therapist",serverId:"therapist",title:"Therapist",mature:!1,kids:!1,aliases:["therapist"]},{key:"storyteller",serverId:"storyteller",title:"Storyteller",mature:!1,kids:!1,aliases:["storyteller"]}
2,{key:"kids_stories",serverId:"kids-stories",title:"Kids Story Time",mature:!1,kids:!0,aliases:["kids_stories","kids-stories"]},{key:"kids_trivia",serverId:"kids-trivia",title:"Kids Trivia Game",mature:!1,kids:!0,aliases:["kids_trivia","kids-trivia"]},{key:"meditation",serverId:"meditation",title:"Meditation",mature:!1,kids:!1,aliases:["meditation"]},{key:"doctor",serverId:"doctor",title:"Doctor",mature:!1,kids:!1,aliases:["doctor"]},{key:"unhinged",serverId:"unhinged",title:"Unhinged",mature:!0,kids:!1,aliases:["unhinged"]},{key:"sexy",serverId:"sexy",title:"Sexy",mature:!0,kids:!1,aliases:["sexy"]},{key:"motivation",serverId:"motivation",title:"Motivation",mature:!0,kids:!1,aliases:["motivation"]},{key:"conspiracy",serverId:"conspiracy",title:"Conspiracy",mature:!1,kids:!1,aliases:["conspiracy"]},{key:"romantic",serverId:"romantic",title:"Romantic",mature:!0,kids:!1,aliases:["romantic"]},{key:"argumentative",serverId:"argumentative",title:"Argumentative",mature:!0,kids:!1,aliases:["argumentative"]}];function o(e){return e.trim().toLowerCase().replace(/[\s-]+/g,"_")}function s(e){return e.trim().toLowerCase()}let _=new Map;for(let e of a){for(let t of e.aliases)_.set(s(t),e);_.set(s(e.serverId),e),_.set(s(e.name),e)}let l=new Map;for(let e of r){for(let t of e.aliases)l.set(o(t),e);l.set(o(e.serverId),e),l.set(o(e.key),e)}function c(e){return _.get(s(e))}function E(e){return{id:e.serverId,name:e.name,description:e.description,longDescription:e.longDescription,disablePersonalities:e.disablePersonalities,...e.mature?{mature:!0}:{}}}function u(e){return{id:e.serverId,title:e.title,...e.mature?{mature:!0}:{},...e.kids?{kids:!0}:{}}}let d={voices:["ara","eve","leo","rex","sal","gork"],personalities:r.map(e=>e.key)};a.map(E),r.map(u),e.s(["BUILT_IN_VOICES",0,a,"DEFAULT_PERSONALITY_WIRE_ID",0,"assistant","DEFAULT_VOICE_WIRE_ID",0,"ara","canonicalizePersonalityWireId",0,function(e){return l.get(o(e))?.serverId??e},"canonicalizeVoiceWireId",0,function(e){return c(e)?.serverId??e},"parseBuiltInVoice",0,c,"resolveVoiceModeConfigFromV2",0,function(e){let t=function(e){if("object"!=typeof e||null===e||Array.isArray(e))return null;let t="voices"in e?e.voices:void 0,i="personalities"in e?e.personalities:void 0;return n(t)&&n(i)&&0!==t.length?{voices:t,personalities:i}:null}(e)??d,i=[];for(let e of t.voices){let t=c(e);t&&i.push(E(t))}let a=[];for(let e of t.personalities){let t=l.get(o(e));t&&a.push(u(t))}return{voices:i,personalities:a}},"voiceDisablesPersonalities",0,function(e){return c(e)?.disablePersonalities??!1},"voiceToConfig",0,E],6877861)},2284795,e=>{"use strict";var t=e.i(9338149),n=e.i(112524),i=e.i(1546153),a=e.i(3576855),r=e.i(3982827);let o=(0,i.createContext)(void 0);e.s(["SessionStoreContext",0,o,"SessionStoreProvider",0,({initialData:e,children:a})=>{(0,i.useEffect)(()=>(0,n.setSentryUser)(e),[e]);let s=(0,i.useRef)(void 0);return s.current||(s.current=(0,r.createSessionStore)(e),(0,r.setSessionStoreState)(s.current)),(0,t.jsx)(o.Provider,{value:s.current,children:a})},"useSession",0,()=>{let e=(0,i.useContext)(o);if(!e)throw Error("useSession must be used within SessionStoreProvider");return(0,a.useStore)(e)}])},4302469,1052649,e=>{"use strict";e.s(["ServerFeatureStateContext",()=>M,"selectFeature",()=>v,"serverFeatureState",()=>y,"useFeature",()=>P,"useFeatureStore",()=>w],4302469),e.s(["logExposure",()=>S,"updateConfig",()=>b],1052649);var t=e.i(4372644),n=e.i(3386380),i=e.i(572671),a=e.i(2458581),r=e.i(6523006),o=e.i(6249432),s=e.i(3424751),_=e.i(1494440),l=e.i(603814),c=e.i(7422069),E=e.i(7336663),u=e.i(3949645),d=e.i(2274141);let g=new _.DataGatewayClient("/_data"),m=s.z.object({config:s.z.record(s.z.string(),o.jsonSchema)}),I=[],A=(0,r.throttle)(p,1e3,{leading:!1,trailing:!0});function S(e){let t={...e,exposedAt:new Date};I.push(t),A()}function p(){if(0===I.length)return;let e=I.splice(0),t=(0,u.getEnv)("DATA_GATEWAY_API_KEY");if(!t)return;let n={api_key:t,viewer_context:(0,d.buildViewerContext)(),events:e.map(e=>({experiment_id:e.id,variation_id:e.variationId,feature_flag:e.featureFlag||null,timestamp:e.exposedAt.toISOString()}))};g.sendBatchLogExperimentExposure(n)}async function b({userId:e,teamId:t,organizationId:r,userSegment:o}){try{let s=E.useSettingsStore.getState().selectedLanguage||n.default?.languages?.find(e=>e in a.supportedLocaleToLanguage)||a.globalLocale,_=await (0,i.fetch)("/api/experimentation/config",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({userId:e,teamId:t,organizationId:r,userSegment:o,userLocale:s})});if(!_.ok)throw Error(`experimentation config fetch failed: HTTP ${_.status}`);let c=m.parse(await _.json());return(0,l.logMetric)("experimentation-client",{type:"experimentation_config_init",status:"client_success"}),{status:"ready",serverConfig:c.config}}catch(e){return c.captureException(e,{tags:{loc:"exp-client-update-config"}}),(0,l.logMetric)("experimentation-client",{type:"experimentation_config_init",status:"client_error"}),{status:"error"}}}window.document.addEventListener("visibilitychange",()=>{"hidden"===document.visibilityState&&(A.cancel(),p())});var N=e.i(1546153),h=e.i(4617014);let f="xai-ff-bu",L="xai-ff-overrides",O="imagine-configs";function T(e,t){return e.overridesEnabled&&void 0!==e.overrides[t]?e.overrides[t]:e.config[t]}function C(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}let R=null;function v(e,t){if(t!==O)return T(e,t);let n=T(e,"imagine-configs-base"),i=T(e,O);if(!C(n))return i;if(!C(i))return n;if(R?.base===n&&R.configs===i)return R.merged;let a={...n,...i};return R={base:n,configs:i,merged:a},a}function P(e){let n,i=(0,t.c)(2);return i[0]!==e?(n=t=>v(t,e),i[0]=e,i[1]=n):n=i[1],w(n)}let B=(0,h.createStore)(class{set;get;status;config;overrides;overridesEnabled;constructor(e,t){this.set=e,this.get=t,this.status="uninitialized",this.config={},this.overrides={},this.overridesEnabled=!1,this.bootstrap=e=>{if("uninitialized"===this.get().status){if("ready"===e.status){this.set(t=>({...t,status:"ready",config:e.serverConfig})),U(e.serverConfig);return}if("error"===e.status){let e=function(){if(!G())return null;try{let e=globalThis.localStorage.getItem(f)??"",t=JSON.parse(e);if(!Number.isInteger(t.updatedAt)||t.updatedAt+1728e5<Date.now()||"object"!=typeof t.config)return null;return t.config}catch(e){return c.captureException(e,{tags:{loc:"feature-store-read-from-ls"}}),null}}();this.set(t=>e?{...t,status:"ready",config:e}:{...t,status:"error",config:{}})}}},this.logExposure=S,this.getFeature=e=>v(this.get(),e),this.setOverridesEnabled=e=>{this.set(t=>({...t,overridesEnabled:e}))},this.refreshConfig=async e=>{let t=await b(e);this.set(e=>({...e,status:t.status,config:"ready"===t.status?t.serverConfig:{}})),"ready"===t.status&&U(t.serverConfig)},this.setOverride=(e,t)=>{"boolean"==typeof t&&(0,l.logEventGlobal)("feature-store-set-override",void 0,{location:"feature-store",key:e,value:t?"true":"false"});let n={...this.get().overrides,[e]:t};this.set(e=>({...e,overrides:n})),k(n)},this.clearOverride=e=>{(0,l.logEventGlobal)("feature-store-clear-override",void 0,{location:"feature-store",key:e});let{[e]:t,...n}=this.get().overrides;this.set(e=>({...e,overrides:n})),k(n)},this.clearAllOverrides=()=>{(0,l.logEventGlobal)("feature-store-clear-all-overrides",void 0,{location:"feature-store"}),this.set(e=>({...e,overrides:{}})),k({})};const n=function(){if(!G())return{};try{let e=globalThis.localStorage.getItem(L);if(!e)return{};let t=JSON.parse(e);if("object"!=typeof t||null===t)return{};return t}catch(e){return c.captureException(e,{tags:{loc:"feature-store-read-overrides-from-ls"}}),{}}}();this.overrides=n}bootstrap;logExposure;getFeature;setOverridesEnabled;refreshConfig;setOverride;clearOverride;clearAllOverrides},"useFeatureStore"),M=(0,N.createContext)(null);function y(e){return{...B.getInitialState(),status:e.status,config:"ready"===e.status?e.serverConfig:{},overrides:{},overridesEnabled:!1}}let w=Object.assign(function(e){let n,i,a,r=(0,t.c)(7),o=(0,N.use)(M);r[0]!==e?(n=t=>e?e(t):t,r[0]=e,r[1]=n):n=r[1];let s=n;return r[2]!==s?(i=()=>s(B.getState()),r[2]=s,r[3]=i):i=r[3],r[4]!==s||r[5]!==o?(a=()=>s(o??B.getInitialState()),r[4]=s,r[5]=o,r[6]=a):a=r[6],(0,N.useSyncExternalStore)(B.subscribe,i,a)},{getState:B.getState,getInitialState:B.getInitialState,setState:B.setState,subscribe:B.subscribe});function G(){return void 0!==globalThis.localStorage}function D(e){return e instanceof DOMException&&("QuotaExceededError"===e.name||"NS_ERROR_DOM_QUOTA_REACHED"===e.name)}function U(e){if(G())try{let t=JSON.stringify({config:e,updatedAt:Date.now()});globalThis.localStorage.setItem(f,t)}catch(e){if(D(e))return;c.captureException(e,{tags:{loc:"feature-store-write-to-ls"}})}}function k(e){if(G())try{globalThis.localStorage.setItem(L,JSON.stringify(e))}catch(e){if(D(e))return;c.captureException(e,{tags:{loc:"feature-store-write-overrides-to-ls"}})}}},8175652,e=>{"use strict";e.s(["configValue",()=>a,"imagineTextEditEnabled",()=>T,"isImagineAutoAspectRatioEnabled",()=>D,"isImagineCanvasLightboxEnabled",()=>P,"isImagineImageEditReferencesEnabled",()=>g,"isImagineOmniModelEnabled",()=>j,"isImagineSessionResumeEnabled",()=>X,"isImagineShareAudienceEnabled",()=>y,"isImagineVideoAudioToggleEnabled",()=>o,"selectImagineTextEditFonts",()=>C,"selectImagineVideoPromptHelperModel",()=>R,"selectShowImagineAgentAudioUpload",()=>x,"selectShowImagineAgentInputs",()=>m,"selectShowImagineAnyAudioSource",()=>Y,"selectShowImagineAudioRecording",()=>z,"selectShowImagineAudioUpload",()=>F,"selectShowImagineAutoAspectRatio",()=>G,"selectShowImagineCameraEdit",()=>h,"selectShowImagineCanvasAudio",()=>H,"selectShowImagineCanvasAudioUpload",()=>W,"selectShowImagineCanvasLightbox",()=>v,"selectShowImagineCollections",()=>I,"selectShowImagineCuratedVoices",()=>k,"selectShowImagineDraw",()=>S,"selectShowImagineExtractSubject",()=>N,"selectShowImagineFramePins",()=>c,"selectShowImagineImageEditReferences",()=>d,"selectShowImagineImageModeExtras",()=>u,"selectShowImagineImageZoom",()=>b,"selectShowImagineIntermediateFrames",()=>E,"selectShowImagineMultiRegionEdit",()=>f,"selectShowImagineMultiRegionRefs",()=>L,"selectShowImagineMusicComposer",()=>K,"selectShowImagineOmniAudio",()=>_,"selectShowImagineOmniModel",()=>s,"selectShowImaginePaletteEdit",()=>A,"selectShowImagineReframe",()=>p,"selectShowImagineSavedReferences",()=>l,"selectShowImagineShareAudience",()=>M,"selectShowImagineTextEdit",()=>O,"selectShowImagineToolbarGroupedSettings",()=>B,"selectShowImagineVoiceDesign",()=>V,"selectShowOpenInImagineFromChat",()=>w]);var t=e.i(6697282),n=e.i(4302469);function i(e,t){return!0===e.getFeature(t)}function a(e,t){let i=(0,n.selectFeature)(e,"imagine-configs");return"object"!=typeof i||Array.isArray(i)?void 0:i?.[t]}function r(e,n){let i=a(e,n);return"boolean"==typeof i?i:(0,t.isDevelopment)()}function o(){return i(n.useFeatureStore.getState(),"enable_imagine_video_audio_toggle_web")}function s(e){return r(e,"enable_r2v_v2")}function _(e){return s(e)&&r(e,"enable_r2v_v2_extras")}function l(e){return s(e)&&r(e,"v2_saved_references")}function c(e){return s(e)&&r(e,"v2_frame_pins")}function E(e){return c(e)&&r(e,"v2_frame_pins_mid")}function u(e){return s(e)&&r(e,"v2_image_mode_refs")}function d(e){return u(e)&&r(e,"v2_image_edit_refs")}function g(){return d(n.useFeatureStore.getState())}function m(e){return s(e)&&r(e,"v2_agent_inputs")}function I(e){return r(e,"v2_collections")}function A(e){return r(e,"image_edit_palette")}function S(e){return!!(0,t.isDevelopment)()||!0===a(e,"enable_draw_mode")}function p(e){return r(e,"image_edit_reframe")}function b(e){return r(e,"image_edit_zoom")}function N(e){return r(e,"image_edit_extract_subject")}function h(e){return r(e,"image_edit_camera")}function f(e){return r(e,"image_edit_multi_region")}function L(e){return r(e,"image_edit_multi_region_refs")}function O(e){return r(e,"image_edit_multi_region_text")}function T(){return O(n.useFeatureStore.getState())}function C(e){return a(e,"image_edit_multi_region_text_fonts")}function R(e){let n=a(e,"video_prompt_helper_model");return"string"==typeof n&&""!==n?n:(0,t.isDevelopment)()?"plane:imagine-video-prompt-enhance":void 0}function v(e){return r(e,"v2_canvas_lightbox")}function P(){return v(n.useFeatureStore.getState())}function B(e){return r(e,"toolbar_grouped_settings")}function M(e){return r(e,"v2_share_audience")}function y(){return M(n.useFeatureStore.getState())}function w(e){return r(e,"v2_chat_post_entry")}function G(e){return!!(0,t.isDevelopment)()||!0===a(e,"auto_aspect_ratio")}function D(){return G(n.useFeatureStore.getState())}function U(e,n){let i=a(e,"v2_extra_capabilities");return Array.isArray(i)?i.includes(n):(0,t.isDevelopment)()}function k(e){return U(e,"curated")}function F(e){return U(e,"uploads")}function x(e){return F(e)||U(e,"agent_uploads")}function z(e){return U(e,"record")}function H(e){return U(e,"canvas")}function W(e){return H(e)&&x(e)}function V(e){return U(e,"design")}function K(e){return!!(0,t.isDevelopment)()||!0===a(e,"video_edit_audio")}function Y(e){return k(e)||x(e)||z(e)||V(e)}function j(){return s(n.useFeatureStore.getState())}function X(){return i(n.useFeatureStore.getState(),"enable_imagine_session_resume")}},7336663,4889861,6623195,1754598,8864036,7104834,8227823,e=>{"use strict";e.s(["modelConfigOverrideSchema",()=>v,"useSettingsStore",()=>w],7336663),e.s(["EMPTY_ENABLED_CONNECTOR_IDS",()=>r,"getEnabledConnectorIdsForConversation",()=>_,"hydrateImagineEnabledConnectorsFromUserSettings",()=>
2l,"useImagineAgentConnectorsStore",()=>s],4889861);var t=e.i(7704207),n=e.i(603814),i=e.i(4617014),a=e.i(4302469);let r=[];function o(e){return Array.isArray(e)?e.filter(e=>"string"==typeof e&&!!e):[]}let s=(0,i.createImmerStore)(class{set;enabledByConversation;globalEnabledConnectorIds;pendingEnabledConnectorIds;constructor(e){this.set=e,this.enabledByConversation={},this.globalEnabledConnectorIds=[],this.pendingEnabledConnectorIds=[],this.toggleConnector=(e,t)=>{this.set(n=>{let i=n.enabledByConversation[e]??[],a=i.includes(t)?i.filter(e=>e!==t):[...i,t];a.length>0?n.enabledByConversation[e]=a:delete n.enabledByConversation[e]})},this.migrateConversation=(e,t)=>{e!==t&&this.set(n=>{let i=n.enabledByConversation[e];if(void 0===i)return;delete n.enabledByConversation[e];let a=n.enabledByConversation[t];n.enabledByConversation[t]=a?[...new Set([...a,...i])]:i})},this.clearConversation=e=>{this.set(t=>{delete t.enabledByConversation[e]})},this.setGlobalEnabledConnectorIds=e=>{let t=o(e);!function(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}(s.getState().globalEnabledConnectorIds,t)&&this.set(e=>{e.globalEnabledConnectorIds=t})},this.toggleGlobalConnector=e=>{this.set(t=>{t.globalEnabledConnectorIds=t.globalEnabledConnectorIds.includes(e)?t.globalEnabledConnectorIds.filter(t=>t!==e):[...t.globalEnabledConnectorIds,e]}),d()},this.togglePendingConnector=e=>{this.set(t=>{t.pendingEnabledConnectorIds=t.pendingEnabledConnectorIds.includes(e)?t.pendingEnabledConnectorIds.filter(t=>t!==e):[...t.pendingEnabledConnectorIds,e]})},this.applyPendingToConversation=e=>{this.set(t=>{let n=t.pendingEnabledConnectorIds;if(0===n.length)return;let i=t.enabledByConversation[e]??[];t.enabledByConversation[e]=[...new Set([...i,...n])],t.pendingEnabledConnectorIds=[]})}}toggleConnector;migrateConversation;clearConversation;setGlobalEnabledConnectorIds;toggleGlobalConnector;togglePendingConnector;applyPendingToConversation}
2,"useImagineAgentConnectorsStore");function _(e){let n=s.getState();return a.useFeatureStore.getState().getFeature(t.BOOLEAN_FLAGS.IMAGINE_AGENT_CONNECTORS_GLOBAL_PERSISTENCE)?n.globalEnabledConnectorIds:n.enabledByConversation[e]??[]}function l(e){if(!(E>0)){if(null!=e)return void s.getState().setGlobalEnabledConnectorIds(e.connectorIds??[]);u||(u=!0,0!==s.getState().globalEnabledConnectorIds.length&&d())}}let c=Promise.resolve(),E=0,u=!1;function d(){E+=1,c=c.then(()=>g()).catch((0,n.createLogError)("ImagineAgentConnectorsStore:queuePersist")).finally(()=>{E-=1})}async function g(){let{useSettingsStore:t}=await e.A(4522637),n=s.getState().globalEnabledConnectorIds;await t.getState().fetchSetUserSettings({imagineEnabledConnectors:{connectorIds:n}})}(0,i.localStorageSync)(s,"enabledByConversation","imagine-agent-enabled-connectors-by-conversation",{},{valueParser:function(e){if(!e||"object"!=typeof e||Array.isArray(e))return{};let t={};for(let[n,i]of Object.entries(e)){if(!Array.isArray(i))continue;let e=i.filter(e=>"string"==typeof e&&!!e);e.length>0&&(t[n]=e)}return t}}),(0,i.localStorageSync)(s,"globalEnabledConnectorIds","imagine-agent-enabled-connectors-global",[],{valueParser:o});var m=e.i(2569170);e.i(3778443);var I=e.i(7865038);let A={settings:()=>["user-settings"],notificationPreferences:()=>["notification-preferences"]};e.s(["userSettingsKeys",0,A],6623195),e.s(["setMarketingOptInMutation",0,e=>(0,I.mutationOptions)({mutationFn:e=>m.authMgmtApi.authManagementSetMarketingOptIn({authMgmtSetMarketingOptInRequest:{optedIn:e}}),onSuccess:t=>{e.setQueryData(A.notificationPreferences(),{preferences:t})}})],1754598);var S=e.i(3003272);e.s(["notificationPreferencesQuery",0,({enabled:e})=>(0,S.queryOptions)({queryKey:A.notificationPreferences(),queryFn:()=>m.authMgmtApi.authManagementGetNotificationPreferences(),enabled:e,staleTime:6e4})],8864036),e.s([],7104834);var p=e.i(1345596),b=e.i(5976479),N=e.i(3565010),h=e.i(7669021);let f=function(e,t){return(0,h.default)(e,(0,N.default)((0,b.default)(t)))};e.s(["omitBy",0,f],8227823);var L=e.i(8501781),O=e.i(3424751),T=e.i(3576855),C=e.i(3320588);let R=O.z.object({model_name:O.z.string().nullish(),system_prompt_name:O.z.string().nullish(),enable_unified_layout:O.z.boolean().nullish(),tools_set:O.z.string().nullish(),system_turn_prompt:O.z.string().nullish(),tool_definition_prompt:O.z.string().nullish()}),v=O.z.object({promptMap:O.z.object({toolUseFc:O.z.string().nullish(),noToolUse:O.z.string().nullish(),toolUseSummarizer:O.z.string().nullish(),memorySystemPrompt:O.z.string().nullish()}).nullish(),modelMap:O.z.object({noToolUse:O.z.string().nullish(),toolUse:O.z.string().nullish(),toolUseSummarizer:O.z.string().nullish(),imageGenModel:O.z.string().nullish(),imageEditModel:O.z.string().nullish(),modelAddress:O.z.string().nullish()}).nullish(),useSingleModelEverything:O.z.boolean().nullish(),tools:O.z.record(O.z.nativeEnum({web_search:"web_search",google_web_search:"google_web_search",bing_web_search:"bing_web_search",web_search_with_snippets:"web_search_with_snippets",browse_page_with_js:"browse_page_with_js",browse_page_no_js:"browse_page_no_js",code_execution_training_parity:"code_execution_training_parity",get_x_user_handle:"get_x_user_handle",get_x_user_profile_pic_description:"get_x_user_profile_pic_description",x_post_lookup:"x_post_lookup",x_search:"x_search",x_keyword_search:"x_keyword_search",x_semantic_search:"x_semantic_search",get_top_us_news_from_x_trends:"get_top_us_news_from_x_trends",get_x_user_timeline:"get_x_user_timeline",get_x_bookmarks:"get_x_bookmarks",get_x_liked_posts:"get_x_liked_posts",render_x_posts:"render_x_posts",render_x_users:"render_x_users",render_card:"render_card"}),O.z.boolean()).nullish(),useToolOverrides:O.z.boolean().nullish(),sideBySideParams:R.array().nullish(),useSideBySideParams:O.z.boolean().nullish()});O.z.object({autoWrapLongLinesCode:O.z.boolean(),browserNotificationsEnabled:O.z.boolean(),enableBrowserGeoLocation:O.z.boolean(),selectedSystemPromptId:O.z.string().optional(),showConversationPreviews:O.z.boolean(),showActiveTabs:O.z.boolean(),disableAutoScroll:O.z.boolean(),useModelModeSelector3:O.z.boolean(),isAsyncChat:O.z.boolean(),enableEarlyAccessModels:O.z.boolean(),disableVideoGenerationOnUpload:O.z.boolean(),requireCmdEnterToSubmit:O.z.boolean(),enableColoredFileIcons:O.z.boolean(),watermarkImagineGenerations:O.z.boolean(),customPromptDraft:O.z.string().optional()});let P={autoWrapLongLinesCode:!1,browserNotificationsEnabled:!1,enableBrowserGeoLocation:!1,selectedSystemPromptId:void 0,showConversationPreviews:!0,showActiveTabs:!0,disableAutoScroll:!1,useModelModeSelector3:!0,isAsyncChat:!1,enableEarlyAccessModels:!1,disableVideoGenerationOnUpload:!1,requireCmdEnterToSubmit:!1,enableColoredFileIcons:!0,watermarkImagineGenerations:!1,customPromptDraft:void 0},B={excludeFromTraining:!1,allowXPersonalization:!0,preferences:P,enableMemory:!0,allowShareIndexing:!0,allowCompanionNotifications:!1,allowAutoShare:!0,allowGrokFinishedNotification:!1,agentCustomizations:[],agentLibrary:[],imagineEnabledConnectors:{connectorIds:[]}},M={excludeFromTraining:!0,allowXPersonalization:!1,preferences:P,enableMemory:!1,allowShareIndexing:!1,allowCompanionNotifications:!1,allowAutoShare:!0,allowGrokFinishedNotification:!1};class y{set;get;isIncognito;userSettingsPromise;userSettings;lastSavedUserSettings;settingsWriteSeq;latestSettingsWrites;selectedLanguage;showAgeVerification;ageVerificationBehavior;ageVerificationCallback;modelConfigOverride;sideBySideMode;
2skipResponseCache;constructor(e,t){this.set=e,this.get=t,this.isIncognito=!1,this.userSettingsPromise=void 0,this.userSettings=B,this.lastSavedUserSettings=void 0,this.settingsWriteSeq=0,this.latestSettingsWrites={},this.selectedLanguage=void 0,this.showAgeVerification=!1,this.ageVerificationCallback=void 0,this.modelConfigOverride=void 0,this.sideBySideMode=void 0,this.skipResponseCache=void 0,this.setIsIncognito=(0,i.assign)(this.set,"isIncognito"),this.setUserSettingsPromise=(0,i.assign)(this.set,"userSettingsPromise"),this.setUserSettings=(0,i.assign)(this.set,"userSettings"),this.setSelectedLanguage=(0,i.assign)(this.set,"selectedLanguage"),this.setShowAgeVerification=(0,i.assign)(this.set,"showAgeVerification"),this.setAgeVerificationBehavior=(0,i.assign)(this.set,"ageVerificationBehavior"),this.setAgeVerificationCallback=(0,i.assign)(this.set,"ageVerificationCallback"),this.setSideBySideMode=(0,i.assign)(this.set,"sideBySideMode"),this.setSkipResponseCache=(0,i.assign)(this.set,"skipResponseCache"),this.loadFromPrefetch=e=>{U(e,this.get())},this.initializeGdprUserSettings=()=>m.settingsApi.settingsGetUserSettings().then(e=>{let t=this.get();void 0===e.excludeFromTraining||void 0===e.enableMemory?t.fetchSetUserSettings(M).catch(console.error):U(e,t)}),this.initializeEnterpriseUserSettings=()=>m.settingsApi.settingsGetUserSettings().then(e=>{let t=this.get();e.excludeFromTraining?U(e,t):t.fetchSetUserSettings(M).catch(console.error)}),this.fetchGetUserSettings=()=>{let e=this.get();if(e.userSettingsPromise)return e.userSettingsPromise;let t=m.settingsApi.settingsGetUserSettings().then(e=>U(e,this.get()));return e.setUserSettingsPromise(t),t},this.fetchSetUserSettings=e=>{let t,n=this.get(),i=n.settingsWriteSeq+1,a=Object.keys(e).filter(t=>t in e&&"imagineEnabledConnectors"!==t);this.set({settingsWriteSeq:i,latestSettingsWrites:{...n.latestSettingsWrites,...Object.fromEntries(a.map(e=>[e,i]))},lastSavedUserSettings:n.lastSavedUserSettings??n.userSettings}),n.setUserSettings({...n.userSettings,...e}),void 0!==e.imagineEnabledConnectors&&l(e.imagineEnabledConnectors);let r=(t=e,m.settingsApi.settingsSetUserSettings({body:function({agentCustomizations:e,agentLibrary:t,...n}){return{...n,...void 0!==e?{agentCustomizations:{values:e}}:{},...void 0!==t?{agentLibrary:{agents:t}}:{}}}(t)})).then(e=>U(e,this.get()));return n.setUserSettingsPromise(r),r.catch(e=>{console.error(e);let t=this.get();t.userSettingsPromise===r&&t.setUserSettingsPromise(void 0);let n=a.filter(e=>t.latestSettingsWrites[e]===i);0!==n.length&&t.lastSavedUserSettings&&t.setUserSettings({...t.userSettings,...(0,L.pick)(t.lastSavedUserSettings,n)})}),r},this.fetchSetPreference=(e,t)=>{let n=this.get();return n.fetchSetUserSettings({preferences:{...n.userSettings.preferences,[e]:t}})}}setIsIncognito;setUserSettingsPromise;setUserSettings;setSelectedLanguage;setShowAgeVerification;setAgeVerificationBehavior;setAgeVerificationCallback;setSideBySideMode;setSkipResponseCache;loadFromPrefetch;initializeGdprUserSettings;initializeEnterpriseUserSettings;fetchGetUserSettings;fetchSetUserSettings;fetchSetPreference}let w=(0,T.create)()((0,C.subscribeWithSelector)((0,C.persist)((e,t)=>new y(e,t),{name:"settings-store",storage:(0,i.safeLocalStorageJson)(),partialize:e=>({sideBySideMode:e.sideBySideMode,skipResponseCache:e.skipResponseCache}),version:2})));function G(e,t){return O.z.object({autoWrapLongLinesCode:O.z.boolean().catch(e.autoWrapLongLinesCode),browserNotificationsEnabled:O.z.boolean().catch(e.browserNotificationsEnabled),enableBrowserGeoLocation:O.z.boolean().catch(e.enableBrowserGeoLocation),selectedSystemPromptId:O.z.string().optional().catch(e.selectedSystemPromptId),showConversationPreviews:O.z.boolean().catch(e.showConversationPreviews),showActiveTabs:O.z.boolean().catch(e.showActiveTabs),disableAutoScroll:O.z.boolean().catch(e.disableAutoScroll),useModelModeSelector3:O.z.boolean().catch(e.useModelModeSelector3),isAsyncChat:O.z.boolean().catch(e.isAsyncChat),enableEarlyAccessModels:O.z.boolean().catch(e.enableEarlyAccessModels),disableVideoGenerationOnUpload:O.z.boolean().catch(e.disableVideoGenerationOnUpload),requireCmdEnterToSubmit:O.z.boolean().catch(e.requireCmdEnterToSubmit),enableColoredFileIcons:O.z.boolean().catch(e.enableColoredFileIcons),watermarkImagineGenerations:O.z.boolean().catch(e.watermarkImagineGenerations),customPromptDraft:O.z.string().optional().catch(e.customPromptDraft)}).catch(e).parse(t)}function D(e,t){let n=f(e,p.isUndefined),i=e.agentLibrary?.agents?e.agentLibrary.agents.filter(e=>!!e.name):t.agentLibrary,a=void 0!==e.imagineEnabledConnectors?{connectorIds:(e.imagineEnabledConnectors?.connectorIds??[]).filter(e=>"string"==typeof e&&!!e)}:t.imagineEnabledConnectors;return{...t,...n,preferences:G(t.preferences,e.preferences),agentLibrary:i,imagineEnabledConnectors:a,audioRefConsent:e.audioRefConsent}}function U(e,t){let n=D(e,t.userSettings);return t.set({userSettings:n,lastSavedUserSettings:t.lastSavedUserSettings?D(e,t.lastSavedUserSettings):n}),l(e.imagineEnabledConnectors),n}(0,i.localStorageSync)(w,"userSettings","user-settings",w.getInitialState().userSettings,{valueParser:function(e){if(!e||"object"!=typeof e)return B;let t=f(e,p.isUndefined);return{...B,...t,preferences:G(P,e.preferences)}}})},8501781,e=>{"use strict";var t=e.i(6549184),n=e.i(8115825),i=(0,e.i(8282682).default)(function(e,i){return null==e?{}:(0,t.default)(e,i,function(t,i){return(0,n.default)(e,i)})});e.s(["pick",0,i],8501781)}]); 3 4//# debugId=8e5ec673-11d4-5b9a-3a5d-145b545052d8
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.