"use strict";(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[1754],{89324:(e,t,o)=>{o.r(t),o.d(t,{Components:()=>h,showDefaultSearchDialog:()=>c,showSymbolSearchItemsDialog:()=>l.showSymbolSearchItemsDialog});var a=o(82992),n=(o(32563),o(79652)),s=o(94664),l=o(1861),i=o(64147),r=o(84015);o(56570),o(49483);!(0,r.isOnMobileAppPage)("any")&&window.matchMedia("(min-width: 602px) and (min-height: 445px)").matches;function c(e){new i.WatchedValue({});const t=(0,s.getSymbolSearchCompleteOverrideFunction)(),{defaultValue:o,showSpreadActions:r,source:c,onSearchComplete:h,trackResultsOptions:m,...d}=e,u={...d,showSpreadActions:r??(0,n.canShowSpreadActions)(),onSymbolFiltersParamsChange:void 0,onSearchComplete:(e,o)=>{t(e[0].symbol,e[0].result).then((e=>{a.linking.setSymbolAndLogInitiator(e.symbol,"symbol search"),h?.(e.symbol)}))},onEmptyResults:void 0};(0,l.showSymbolSearchItemsDialog)({...u,defaultValue:o})}const h={SymbolSearchWatchlistDialogContentItem:null,SymbolSearchWatchlistDialog:null}},1861:(e,t,o)=>{o.d(t,{showSymbolSearchItemsDialog:()=>r});var a=o(50959),n=o(50655),s=o(51826),l=o(73280),i=o(87896);function r(e){const{symbolTypeFilter:t,initialMode:o="symbolSearch",autofocus:r=!0,defaultValue:c,showSpreadActions:h,selectSearchOnInit:m,onSearchComplete:d,dialogTitle:u,placeholder:p,fullscreen:g,initialScreen:S,wrapper:y,dialog:b,contentItem:w,onClose:C,onOpen:O,footer:f,symbolTypes:I,searchInput:M,emptyState:D,hideMarkedListFlag:v,dialogWidth:A="auto",manager:F,shouldReturnFocus:k,onSymbolFiltersParamsChange:P,onEmptyResults:R,customSearchSymbols:E,enableOptionsChain:T,searchInitiationPoint:V}=e;if(s.dialogsOpenerManager.isOpened("SymbolSearch")||s.dialogsOpenerManager.isOpened("ChangeIntervalDialog"))return;const W=document.createElement("div"),_=a.createElement(n.SlotContext.Provider,{value:F??null},a.createElement(l.SymbolSearchItemsDialog,{symbolTypeFilter:t,onClose:L,initialMode:o,defaultValue:c,showSpreadActions:h,hideMarkedListFlag:v,selectSearchOnInit:m,onSearchComplete:d,dialogTitle:u,placeholder:p,fullscreen:g,initialScreen:S,wrapper:y,dialog:b,contentItem:w,footer:f,symbolTypes:I,searchInput:M,emptyState:D,autofocus:r,dialogWidth:A,shouldReturnFocus:k,onSymbolFiltersParamsChange:P,onEmptyResults:R,customSearchSymbols:E,enableOptionsChain:T,searchInitiationPoint:V})),x=(0,i.createReactRoot)(_,W);function L(){x.unmount(),s.dialogsOpenerManager.setAsClosed("SymbolSearch"),C&&C()}return s.dialogsOpenerManager.setAsOpened("SymbolSearch"),O&&O(),{close:L}}},51826:(e,t,o)=>{o.d(t,{DialogsOpenerManager:()=>a,dialogsOpenerManager:()=>n});class a{constructor(){this._storage=new Map}setAsOpened(e,t){this._storage.set(e,t)}setAsClosed(e){this._storage.delete(e)}isOpened(e){return this._storage.has(e)}getDialogPayload(e){return this._storage.get(e)}}const n=new a}}]);