You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

constant.tsx 58KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043
  1. import {
  2. GitHubIcon,
  3. KeywordIcon,
  4. QWeatherIcon,
  5. WikipediaIcon,
  6. } from '@/assets/icon/Icon';
  7. import { ReactComponent as AkShareIcon } from '@/assets/svg/akshare.svg';
  8. import { ReactComponent as ArXivIcon } from '@/assets/svg/arxiv.svg';
  9. import { ReactComponent as baiduFanyiIcon } from '@/assets/svg/baidu-fanyi.svg';
  10. import { ReactComponent as BaiduIcon } from '@/assets/svg/baidu.svg';
  11. import { ReactComponent as BeginIcon } from '@/assets/svg/begin.svg';
  12. import { ReactComponent as BingIcon } from '@/assets/svg/bing.svg';
  13. import { ReactComponent as ConcentratorIcon } from '@/assets/svg/concentrator.svg';
  14. import { ReactComponent as CrawlerIcon } from '@/assets/svg/crawler.svg';
  15. import { ReactComponent as DeepLIcon } from '@/assets/svg/deepl.svg';
  16. import { ReactComponent as DuckIcon } from '@/assets/svg/duck.svg';
  17. import { ReactComponent as EmailIcon } from '@/assets/svg/email.svg';
  18. import { ReactComponent as ExeSqlIcon } from '@/assets/svg/exesql.svg';
  19. import { ReactComponent as GoogleScholarIcon } from '@/assets/svg/google-scholar.svg';
  20. import { ReactComponent as GoogleIcon } from '@/assets/svg/google.svg';
  21. import { ReactComponent as InvokeIcon } from '@/assets/svg/invoke-ai.svg';
  22. import { ReactComponent as Jin10Icon } from '@/assets/svg/jin10.svg';
  23. import { ReactComponent as NoteIcon } from '@/assets/svg/note.svg';
  24. import { ReactComponent as PubMedIcon } from '@/assets/svg/pubmed.svg';
  25. import { ReactComponent as SwitchIcon } from '@/assets/svg/switch.svg';
  26. import { ReactComponent as TemplateIcon } from '@/assets/svg/template.svg';
  27. import { ReactComponent as TuShareIcon } from '@/assets/svg/tushare.svg';
  28. import { ReactComponent as WenCaiIcon } from '@/assets/svg/wencai.svg';
  29. import { ReactComponent as YahooFinanceIcon } from '@/assets/svg/yahoo-finance.svg';
  30. import { CodeTemplateStrMap, ProgrammingLanguage } from '@/constants/agent';
  31. export enum AgentDialogueMode {
  32. Conversational = 'Conversational',
  33. Task = 'Task',
  34. }
  35. import {
  36. ChatVariableEnabledField,
  37. variableEnabledFieldMap,
  38. } from '@/constants/chat';
  39. import { ModelVariableType } from '@/constants/knowledge';
  40. import i18n from '@/locales/config';
  41. import { setInitialChatVariableEnabledFieldValue } from '@/utils/chat';
  42. // DuckDuckGo's channel options
  43. export enum Channel {
  44. Text = 'text',
  45. News = 'news',
  46. }
  47. import {
  48. BranchesOutlined,
  49. DatabaseOutlined,
  50. FormOutlined,
  51. MergeCellsOutlined,
  52. MessageOutlined,
  53. RocketOutlined,
  54. SendOutlined,
  55. } from '@ant-design/icons';
  56. import upperFirst from 'lodash/upperFirst';
  57. import {
  58. Box,
  59. CirclePower,
  60. CloudUpload,
  61. CodeXml,
  62. IterationCcw,
  63. ListOrdered,
  64. MessageSquareMore,
  65. OptionIcon,
  66. TextCursorInput,
  67. ToggleLeft,
  68. WrapText,
  69. } from 'lucide-react';
  70. export const BeginId = 'begin';
  71. export enum Operator {
  72. Begin = 'Begin',
  73. Retrieval = 'Retrieval',
  74. Generate = 'Generate',
  75. Answer = 'Answer',
  76. Categorize = 'Categorize',
  77. Message = 'Message',
  78. Relevant = 'Relevant',
  79. RewriteQuestion = 'RewriteQuestion',
  80. KeywordExtract = 'KeywordExtract',
  81. Baidu = 'Baidu',
  82. DuckDuckGo = 'DuckDuckGo',
  83. Wikipedia = 'Wikipedia',
  84. PubMed = 'PubMed',
  85. ArXiv = 'ArXiv',
  86. Google = 'Google',
  87. Bing = 'Bing',
  88. GoogleScholar = 'GoogleScholar',
  89. DeepL = 'DeepL',
  90. GitHub = 'GitHub',
  91. BaiduFanyi = 'BaiduFanyi',
  92. QWeather = 'QWeather',
  93. ExeSQL = 'ExeSQL',
  94. Switch = 'Switch',
  95. WenCai = 'WenCai',
  96. AkShare = 'AkShare',
  97. YahooFinance = 'YahooFinance',
  98. Jin10 = 'Jin10',
  99. Concentrator = 'Concentrator',
  100. TuShare = 'TuShare',
  101. Note = 'Note',
  102. Crawler = 'Crawler',
  103. Invoke = 'Invoke',
  104. Template = 'Template',
  105. Email = 'Email',
  106. Iteration = 'Iteration',
  107. IterationStart = 'IterationItem',
  108. Code = 'Code',
  109. WaitingDialogue = 'WaitingDialogue',
  110. Agent = 'Agent',
  111. }
  112. export const CommonOperatorList = Object.values(Operator).filter(
  113. (x) => x !== Operator.Note,
  114. );
  115. export const AgentOperatorList = [
  116. Operator.Retrieval,
  117. Operator.Generate,
  118. Operator.Answer,
  119. Operator.Categorize,
  120. Operator.Message,
  121. Operator.RewriteQuestion,
  122. Operator.KeywordExtract,
  123. Operator.Switch,
  124. Operator.Concentrator,
  125. Operator.Template,
  126. Operator.Iteration,
  127. Operator.WaitingDialogue,
  128. Operator.Note,
  129. Operator.Agent,
  130. ];
  131. export const operatorIconMap = {
  132. [Operator.Retrieval]: RocketOutlined,
  133. [Operator.Generate]: MergeCellsOutlined,
  134. [Operator.Answer]: SendOutlined,
  135. [Operator.Begin]: BeginIcon,
  136. [Operator.Categorize]: DatabaseOutlined,
  137. [Operator.Message]: MessageOutlined,
  138. [Operator.Relevant]: BranchesOutlined,
  139. [Operator.RewriteQuestion]: FormOutlined,
  140. [Operator.KeywordExtract]: KeywordIcon,
  141. [Operator.DuckDuckGo]: DuckIcon,
  142. [Operator.Baidu]: BaiduIcon,
  143. [Operator.Wikipedia]: WikipediaIcon,
  144. [Operator.PubMed]: PubMedIcon,
  145. [Operator.ArXiv]: ArXivIcon,
  146. [Operator.Google]: GoogleIcon,
  147. [Operator.Bing]: BingIcon,
  148. [Operator.GoogleScholar]: GoogleScholarIcon,
  149. [Operator.DeepL]: DeepLIcon,
  150. [Operator.GitHub]: GitHubIcon,
  151. [Operator.BaiduFanyi]: baiduFanyiIcon,
  152. [Operator.QWeather]: QWeatherIcon,
  153. [Operator.ExeSQL]: ExeSqlIcon,
  154. [Operator.Switch]: SwitchIcon,
  155. [Operator.WenCai]: WenCaiIcon,
  156. [Operator.AkShare]: AkShareIcon,
  157. [Operator.YahooFinance]: YahooFinanceIcon,
  158. [Operator.Jin10]: Jin10Icon,
  159. [Operator.Concentrator]: ConcentratorIcon,
  160. [Operator.TuShare]: TuShareIcon,
  161. [Operator.Note]: NoteIcon,
  162. [Operator.Crawler]: CrawlerIcon,
  163. [Operator.Invoke]: InvokeIcon,
  164. [Operator.Template]: TemplateIcon,
  165. [Operator.Email]: EmailIcon,
  166. [Operator.Iteration]: IterationCcw,
  167. [Operator.IterationStart]: CirclePower,
  168. [Operator.Code]: CodeXml,
  169. [Operator.WaitingDialogue]: MessageSquareMore,
  170. [Operator.Agent]: Box,
  171. };
  172. export const operatorMap: Record<
  173. Operator,
  174. {
  175. backgroundColor?: string;
  176. color?: string;
  177. width?: number;
  178. height?: number;
  179. fontSize?: number;
  180. iconFontSize?: number;
  181. iconWidth?: number;
  182. moreIconColor?: string;
  183. }
  184. > = {
  185. [Operator.Retrieval]: {
  186. backgroundColor: '#cad6e0',
  187. color: '#385974',
  188. },
  189. [Operator.Generate]: {
  190. backgroundColor: '#ebd6d6',
  191. width: 150,
  192. height: 150,
  193. fontSize: 20,
  194. iconFontSize: 30,
  195. color: '#996464',
  196. },
  197. [Operator.Answer]: {
  198. backgroundColor: '#f4816d',
  199. color: '#f4816d',
  200. },
  201. [Operator.Begin]: {
  202. backgroundColor: '#4f51d6',
  203. },
  204. [Operator.Categorize]: {
  205. backgroundColor: '#ffebcd',
  206. color: '#cc8a26',
  207. },
  208. [Operator.Message]: {
  209. backgroundColor: '#c5ddc7',
  210. color: 'green',
  211. },
  212. [Operator.Relevant]: {
  213. backgroundColor: '#9fd94d',
  214. color: '#8ef005',
  215. width: 70,
  216. height: 70,
  217. fontSize: 12,
  218. iconFontSize: 16,
  219. },
  220. [Operator.RewriteQuestion]: {
  221. backgroundColor: '#f8c7f8',
  222. color: '#f32bf3',
  223. width: 70,
  224. height: 70,
  225. fontSize: 12,
  226. iconFontSize: 16,
  227. },
  228. [Operator.KeywordExtract]: {
  229. width: 70,
  230. height: 70,
  231. backgroundColor: '#6E5494',
  232. color: '#6E5494',
  233. fontSize: 12,
  234. iconWidth: 16,
  235. },
  236. [Operator.DuckDuckGo]: {
  237. backgroundColor: '#e7e389',
  238. color: '#aea00c',
  239. },
  240. [Operator.Baidu]: {
  241. backgroundColor: '#d9e0f8',
  242. },
  243. [Operator.Wikipedia]: {
  244. backgroundColor: '#dee0e2',
  245. },
  246. [Operator.PubMed]: {
  247. backgroundColor: '#a2ccf0',
  248. },
  249. [Operator.ArXiv]: {
  250. width: 70,
  251. height: 70,
  252. fontSize: 12,
  253. iconWidth: 16,
  254. iconFontSize: 16,
  255. moreIconColor: 'white',
  256. backgroundColor: '#b31b1b',
  257. color: 'white',
  258. },
  259. [Operator.Google]: {
  260. backgroundColor: 'pink',
  261. },
  262. [Operator.Bing]: {
  263. backgroundColor: '#c0dcc4',
  264. },
  265. [Operator.GoogleScholar]: {
  266. backgroundColor: '#b4e4f6',
  267. },
  268. [Operator.DeepL]: {
  269. backgroundColor: '#f5e8e6',
  270. },
  271. [Operator.GitHub]: {
  272. backgroundColor: 'purple',
  273. color: 'purple',
  274. },
  275. [Operator.BaiduFanyi]: { backgroundColor: '#e5f2d3' },
  276. [Operator.QWeather]: {
  277. backgroundColor: '#a4bbf3',
  278. color: '#a4bbf3',
  279. },
  280. [Operator.ExeSQL]: { backgroundColor: '#b9efe8' },
  281. [Operator.Switch]: { backgroundColor: '#dbaff6', color: '#dbaff6' },
  282. [Operator.WenCai]: { backgroundColor: '#faac5b' },
  283. [Operator.AkShare]: { backgroundColor: '#8085f5' },
  284. [Operator.YahooFinance]: { backgroundColor: '#b474ff' },
  285. [Operator.Jin10]: { backgroundColor: '#a0b9f8' },
  286. [Operator.Concentrator]: {
  287. backgroundColor: '#32d2a3',
  288. color: '#32d2a3',
  289. width: 70,
  290. height: 70,
  291. fontSize: 10,
  292. iconFontSize: 16,
  293. },
  294. [Operator.TuShare]: { backgroundColor: '#f8cfa0' },
  295. [Operator.Note]: { backgroundColor: '#f8cfa0' },
  296. [Operator.Crawler]: {
  297. backgroundColor: '#dee0e2',
  298. },
  299. [Operator.Invoke]: {
  300. backgroundColor: '#dee0e2',
  301. },
  302. [Operator.Template]: {
  303. backgroundColor: '#dee0e2',
  304. },
  305. [Operator.Email]: { backgroundColor: '#e6f7ff' },
  306. [Operator.Iteration]: { backgroundColor: '#e6f7ff' },
  307. [Operator.IterationStart]: { backgroundColor: '#e6f7ff' },
  308. [Operator.Code]: { backgroundColor: '#4c5458' },
  309. [Operator.WaitingDialogue]: { backgroundColor: '#a5d65c' },
  310. [Operator.Agent]: { backgroundColor: '#a5d65c' },
  311. };
  312. export const componentMenuList = [
  313. {
  314. name: Operator.Retrieval,
  315. },
  316. {
  317. name: Operator.Generate,
  318. },
  319. {
  320. name: Operator.Answer,
  321. },
  322. {
  323. name: Operator.Categorize,
  324. },
  325. {
  326. name: Operator.Message,
  327. },
  328. {
  329. name: Operator.RewriteQuestion,
  330. },
  331. {
  332. name: Operator.KeywordExtract,
  333. },
  334. {
  335. name: Operator.Switch,
  336. },
  337. {
  338. name: Operator.Concentrator,
  339. },
  340. {
  341. name: Operator.Template,
  342. },
  343. {
  344. name: Operator.Iteration,
  345. },
  346. {
  347. name: Operator.Code,
  348. },
  349. {
  350. name: Operator.WaitingDialogue,
  351. },
  352. {
  353. name: Operator.Agent,
  354. },
  355. {
  356. name: Operator.Note,
  357. },
  358. {
  359. name: Operator.DuckDuckGo,
  360. },
  361. {
  362. name: Operator.Baidu,
  363. },
  364. {
  365. name: Operator.Wikipedia,
  366. },
  367. {
  368. name: Operator.PubMed,
  369. },
  370. {
  371. name: Operator.ArXiv,
  372. },
  373. {
  374. name: Operator.Google,
  375. },
  376. {
  377. name: Operator.Bing,
  378. },
  379. {
  380. name: Operator.GoogleScholar,
  381. },
  382. {
  383. name: Operator.DeepL,
  384. },
  385. {
  386. name: Operator.GitHub,
  387. },
  388. {
  389. name: Operator.BaiduFanyi,
  390. },
  391. {
  392. name: Operator.QWeather,
  393. },
  394. {
  395. name: Operator.ExeSQL,
  396. },
  397. {
  398. name: Operator.WenCai,
  399. },
  400. {
  401. name: Operator.AkShare,
  402. },
  403. {
  404. name: Operator.YahooFinance,
  405. },
  406. {
  407. name: Operator.Jin10,
  408. },
  409. {
  410. name: Operator.TuShare,
  411. },
  412. {
  413. name: Operator.Crawler,
  414. },
  415. {
  416. name: Operator.Invoke,
  417. },
  418. {
  419. name: Operator.Email,
  420. },
  421. ];
  422. const initialQueryBaseValues = {
  423. query: [],
  424. };
  425. export const initialRetrievalValues = {
  426. similarity_threshold: 0.2,
  427. keywords_similarity_weight: 0.3,
  428. top_n: 8,
  429. ...initialQueryBaseValues,
  430. };
  431. export const initialBeginValues = {
  432. mode: AgentDialogueMode.Conversational,
  433. prologue: `Hi! I'm your assistant, what can I do for you?`,
  434. };
  435. export const variableCheckBoxFieldMap = Object.keys(
  436. variableEnabledFieldMap,
  437. ).reduce<Record<string, boolean>>((pre, cur) => {
  438. pre[cur] = setInitialChatVariableEnabledFieldValue(
  439. cur as ChatVariableEnabledField,
  440. );
  441. return pre;
  442. }, {});
  443. const initialLlmBaseValues = {
  444. ...variableCheckBoxFieldMap,
  445. temperature: 0.1,
  446. top_p: 0.3,
  447. frequency_penalty: 0.7,
  448. presence_penalty: 0.4,
  449. max_tokens: 256,
  450. };
  451. export const initialGenerateValues = {
  452. ...initialLlmBaseValues,
  453. prompt: i18n.t('flow.promptText'),
  454. cite: true,
  455. message_history_window_size: 12,
  456. parameters: [],
  457. };
  458. export const initialRewriteQuestionValues = {
  459. ...initialLlmBaseValues,
  460. language: '',
  461. message_history_window_size: 6,
  462. };
  463. export const initialRelevantValues = {
  464. ...initialLlmBaseValues,
  465. };
  466. export const initialCategorizeValues = {
  467. ...initialLlmBaseValues,
  468. parameter: ModelVariableType.Precise,
  469. message_history_window_size: 1,
  470. category_description: {},
  471. ...initialQueryBaseValues,
  472. };
  473. export const initialMessageValues = {
  474. messages: [],
  475. };
  476. export const initialKeywordExtractValues = {
  477. ...initialLlmBaseValues,
  478. top_n: 3,
  479. ...initialQueryBaseValues,
  480. };
  481. export const initialDuckValues = {
  482. top_n: 10,
  483. channel: Channel.Text,
  484. ...initialQueryBaseValues,
  485. };
  486. export const initialBaiduValues = {
  487. top_n: 10,
  488. ...initialQueryBaseValues,
  489. };
  490. export const initialWikipediaValues = {
  491. top_n: 10,
  492. language: 'en',
  493. ...initialQueryBaseValues,
  494. };
  495. export const initialPubMedValues = {
  496. top_n: 10,
  497. email: '',
  498. ...initialQueryBaseValues,
  499. };
  500. export const initialArXivValues = {
  501. top_n: 10,
  502. sort_by: 'relevance',
  503. ...initialQueryBaseValues,
  504. };
  505. export const initialGoogleValues = {
  506. top_n: 10,
  507. api_key: 'YOUR_API_KEY (obtained from https://serpapi.com/manage-api-key)',
  508. country: 'cn',
  509. language: 'en',
  510. ...initialQueryBaseValues,
  511. };
  512. export const initialBingValues = {
  513. top_n: 10,
  514. channel: 'Webpages',
  515. api_key:
  516. 'YOUR_API_KEY (obtained from https://www.microsoft.com/en-us/bing/apis/bing-web-search-api)',
  517. country: 'CH',
  518. language: 'en',
  519. ...initialQueryBaseValues,
  520. };
  521. export const initialGoogleScholarValues = {
  522. top_n: 5,
  523. sort_by: 'relevance',
  524. patents: true,
  525. ...initialQueryBaseValues,
  526. };
  527. export const initialDeepLValues = {
  528. top_n: 5,
  529. auth_key: 'relevance',
  530. };
  531. export const initialGithubValues = {
  532. top_n: 5,
  533. ...initialQueryBaseValues,
  534. };
  535. export const initialBaiduFanyiValues = {
  536. appid: 'xxx',
  537. secret_key: 'xxx',
  538. trans_type: 'translate',
  539. ...initialQueryBaseValues,
  540. };
  541. export const initialQWeatherValues = {
  542. web_apikey: 'xxx',
  543. type: 'weather',
  544. user_type: 'free',
  545. time_period: 'now',
  546. ...initialQueryBaseValues,
  547. };
  548. export const initialExeSqlValues = {
  549. ...initialLlmBaseValues,
  550. db_type: 'mysql',
  551. database: '',
  552. username: '',
  553. host: '',
  554. port: 3306,
  555. password: '',
  556. loop: 3,
  557. top_n: 30,
  558. ...initialQueryBaseValues,
  559. };
  560. export const initialSwitchValues = { conditions: [] };
  561. export const initialWenCaiValues = {
  562. top_n: 20,
  563. query_type: 'stock',
  564. ...initialQueryBaseValues,
  565. };
  566. export const initialAkShareValues = { top_n: 10, ...initialQueryBaseValues };
  567. export const initialYahooFinanceValues = {
  568. info: true,
  569. history: false,
  570. financials: false,
  571. balance_sheet: false,
  572. cash_flow_statement: false,
  573. news: true,
  574. ...initialQueryBaseValues,
  575. };
  576. export const initialJin10Values = {
  577. type: 'flash',
  578. secret_key: 'xxx',
  579. flash_type: '1',
  580. contain: '',
  581. filter: '',
  582. ...initialQueryBaseValues,
  583. };
  584. export const initialConcentratorValues = {};
  585. export const initialTuShareValues = {
  586. token: 'xxx',
  587. src: 'eastmoney',
  588. start_date: '2024-01-01 09:00:00',
  589. ...initialQueryBaseValues,
  590. };
  591. export const initialNoteValues = {
  592. text: '',
  593. };
  594. export const initialCrawlerValues = {
  595. extract_type: 'markdown',
  596. ...initialQueryBaseValues,
  597. };
  598. export const initialInvokeValues = {
  599. url: 'http://',
  600. method: 'GET',
  601. timeout: 60,
  602. headers: `{
  603. "Accept": "*/*",
  604. "Cache-Control": "no-cache",
  605. "Connection": "keep-alive"
  606. }`,
  607. proxy: 'http://',
  608. clean_html: false,
  609. };
  610. export const initialTemplateValues = {
  611. content: '',
  612. parameters: [],
  613. };
  614. export const initialEmailValues = {
  615. smtp_server: '',
  616. smtp_port: 587,
  617. email: '',
  618. password: '',
  619. sender_name: '',
  620. to_email: '',
  621. cc_email: '',
  622. subject: '',
  623. content: '',
  624. };
  625. export const initialIterationValues = {
  626. delimiter: ',',
  627. };
  628. export const initialIterationStartValues = {};
  629. export const initialCodeValues = {
  630. lang: 'python',
  631. script: CodeTemplateStrMap[ProgrammingLanguage.Python],
  632. arguments: [
  633. {
  634. name: 'arg1',
  635. },
  636. {
  637. name: 'arg2',
  638. },
  639. ],
  640. };
  641. export const initialWaitingDialogueValues = {};
  642. export const initialAgentValues = {
  643. ...initialLlmBaseValues,
  644. sys_prompt: ``,
  645. prompts: [],
  646. message_history_window_size: 12,
  647. tools: [],
  648. };
  649. export const CategorizeAnchorPointPositions = [
  650. { top: 1, right: 34 },
  651. { top: 8, right: 18 },
  652. { top: 15, right: 10 },
  653. { top: 24, right: 4 },
  654. { top: 31, right: 1 },
  655. { top: 38, right: -2 },
  656. { top: 62, right: -2 }, //bottom
  657. { top: 71, right: 1 },
  658. { top: 79, right: 6 },
  659. { top: 86, right: 12 },
  660. { top: 91, right: 20 },
  661. { top: 98, right: 34 },
  662. ];
  663. // key is the source of the edge, value is the target of the edge
  664. // no connection lines are allowed between key and value
  665. export const RestrictedUpstreamMap = {
  666. [Operator.Begin]: [Operator.Relevant],
  667. [Operator.Categorize]: [
  668. Operator.Begin,
  669. Operator.Categorize,
  670. Operator.Answer,
  671. Operator.Relevant,
  672. ],
  673. [Operator.Answer]: [
  674. Operator.Begin,
  675. Operator.Answer,
  676. Operator.Message,
  677. Operator.Relevant,
  678. ],
  679. [Operator.Retrieval]: [Operator.Begin, Operator.Retrieval],
  680. [Operator.Generate]: [Operator.Begin, Operator.Relevant],
  681. [Operator.Message]: [
  682. Operator.Begin,
  683. Operator.Message,
  684. Operator.Generate,
  685. Operator.Retrieval,
  686. Operator.RewriteQuestion,
  687. Operator.Categorize,
  688. Operator.Relevant,
  689. ],
  690. [Operator.Relevant]: [Operator.Begin, Operator.Answer, Operator.Relevant],
  691. [Operator.RewriteQuestion]: [
  692. Operator.Begin,
  693. Operator.Message,
  694. Operator.RewriteQuestion,
  695. Operator.Relevant,
  696. ],
  697. [Operator.KeywordExtract]: [
  698. Operator.Begin,
  699. Operator.Message,
  700. Operator.Relevant,
  701. ],
  702. [Operator.Baidu]: [Operator.Begin, Operator.Retrieval],
  703. [Operator.DuckDuckGo]: [Operator.Begin, Operator.Retrieval],
  704. [Operator.Wikipedia]: [Operator.Begin, Operator.Retrieval],
  705. [Operator.PubMed]: [Operator.Begin, Operator.Retrieval],
  706. [Operator.ArXiv]: [Operator.Begin, Operator.Retrieval],
  707. [Operator.Google]: [Operator.Begin, Operator.Retrieval],
  708. [Operator.Bing]: [Operator.Begin, Operator.Retrieval],
  709. [Operator.GoogleScholar]: [Operator.Begin, Operator.Retrieval],
  710. [Operator.DeepL]: [Operator.Begin, Operator.Retrieval],
  711. [Operator.GitHub]: [Operator.Begin, Operator.Retrieval],
  712. [Operator.BaiduFanyi]: [Operator.Begin, Operator.Retrieval],
  713. [Operator.QWeather]: [Operator.Begin, Operator.Retrieval],
  714. [Operator.ExeSQL]: [Operator.Begin],
  715. [Operator.Switch]: [Operator.Begin],
  716. [Operator.WenCai]: [Operator.Begin],
  717. [Operator.AkShare]: [Operator.Begin],
  718. [Operator.YahooFinance]: [Operator.Begin],
  719. [Operator.Jin10]: [Operator.Begin],
  720. [Operator.Concentrator]: [Operator.Begin],
  721. [Operator.TuShare]: [Operator.Begin],
  722. [Operator.Crawler]: [Operator.Begin],
  723. [Operator.Note]: [],
  724. [Operator.Invoke]: [Operator.Begin],
  725. [Operator.Template]: [Operator.Begin, Operator.Relevant],
  726. [Operator.Email]: [Operator.Begin],
  727. [Operator.Iteration]: [Operator.Begin],
  728. [Operator.IterationStart]: [Operator.Begin],
  729. [Operator.Code]: [Operator.Begin],
  730. [Operator.WaitingDialogue]: [Operator.Begin],
  731. };
  732. export const NodeMap = {
  733. [Operator.Begin]: 'beginNode',
  734. [Operator.Categorize]: 'categorizeNode',
  735. [Operator.Retrieval]: 'retrievalNode',
  736. [Operator.Generate]: 'generateNode',
  737. [Operator.Answer]: 'logicNode',
  738. [Operator.Message]: 'messageNode',
  739. [Operator.Relevant]: 'relevantNode',
  740. [Operator.RewriteQuestion]: 'rewriteNode',
  741. [Operator.KeywordExtract]: 'keywordNode',
  742. [Operator.DuckDuckGo]: 'ragNode',
  743. [Operator.Baidu]: 'ragNode',
  744. [Operator.Wikipedia]: 'ragNode',
  745. [Operator.PubMed]: 'ragNode',
  746. [Operator.ArXiv]: 'ragNode',
  747. [Operator.Google]: 'ragNode',
  748. [Operator.Bing]: 'ragNode',
  749. [Operator.GoogleScholar]: 'ragNode',
  750. [Operator.DeepL]: 'ragNode',
  751. [Operator.GitHub]: 'ragNode',
  752. [Operator.BaiduFanyi]: 'ragNode',
  753. [Operator.QWeather]: 'ragNode',
  754. [Operator.ExeSQL]: 'ragNode',
  755. [Operator.Switch]: 'switchNode',
  756. [Operator.Concentrator]: 'logicNode',
  757. [Operator.WenCai]: 'ragNode',
  758. [Operator.AkShare]: 'ragNode',
  759. [Operator.YahooFinance]: 'ragNode',
  760. [Operator.Jin10]: 'ragNode',
  761. [Operator.TuShare]: 'ragNode',
  762. [Operator.Note]: 'noteNode',
  763. [Operator.Crawler]: 'ragNode',
  764. [Operator.Invoke]: 'invokeNode',
  765. [Operator.Template]: 'templateNode',
  766. [Operator.Email]: 'emailNode',
  767. [Operator.Iteration]: 'group',
  768. [Operator.IterationStart]: 'iterationStartNode',
  769. [Operator.Code]: 'ragNode',
  770. [Operator.WaitingDialogue]: 'ragNode',
  771. [Operator.Agent]: 'agentNode',
  772. };
  773. export const LanguageOptions = [
  774. {
  775. value: 'af',
  776. label: 'Afrikaans',
  777. },
  778. {
  779. value: 'pl',
  780. label: 'Polski',
  781. },
  782. {
  783. value: 'ar',
  784. label: 'العربية',
  785. },
  786. {
  787. value: 'ast',
  788. label: 'Asturianu',
  789. },
  790. {
  791. value: 'az',
  792. label: 'Azərbaycanca',
  793. },
  794. {
  795. value: 'bg',
  796. label: 'Български',
  797. },
  798. {
  799. value: 'nan',
  800. label: '閩南語 / Bân-lâm-gú',
  801. },
  802. {
  803. value: 'bn',
  804. label: 'বাংলা',
  805. },
  806. {
  807. value: 'be',
  808. label: 'Беларуская',
  809. },
  810. {
  811. value: 'ca',
  812. label: 'Català',
  813. },
  814. {
  815. value: 'cs',
  816. label: 'Čeština',
  817. },
  818. {
  819. value: 'cy',
  820. label: 'Cymraeg',
  821. },
  822. {
  823. value: 'da',
  824. label: 'Dansk',
  825. },
  826. {
  827. value: 'de',
  828. label: 'Deutsch',
  829. },
  830. {
  831. value: 'et',
  832. label: 'Eesti',
  833. },
  834. {
  835. value: 'el',
  836. label: 'Ελληνικά',
  837. },
  838. {
  839. value: 'en',
  840. label: 'English',
  841. },
  842. {
  843. value: 'es',
  844. label: 'Español',
  845. },
  846. {
  847. value: 'eo',
  848. label: 'Esperanto',
  849. },
  850. {
  851. value: 'eu',
  852. label: 'Euskara',
  853. },
  854. {
  855. value: 'fa',
  856. label: 'فارسی',
  857. },
  858. {
  859. value: 'fr',
  860. label: 'Français',
  861. },
  862. {
  863. value: 'gl',
  864. label: 'Galego',
  865. },
  866. {
  867. value: 'ko',
  868. label: '한국어',
  869. },
  870. {
  871. value: 'hy',
  872. label: 'Հայերեն',
  873. },
  874. {
  875. value: 'hi',
  876. label: 'हिन्दी',
  877. },
  878. {
  879. value: 'hr',
  880. label: 'Hrvatski',
  881. },
  882. {
  883. value: 'id',
  884. label: 'Bahasa Indonesia',
  885. },
  886. {
  887. value: 'it',
  888. label: 'Italiano',
  889. },
  890. {
  891. value: 'he',
  892. label: 'עברית',
  893. },
  894. {
  895. value: 'ka',
  896. label: 'ქართული',
  897. },
  898. {
  899. value: 'lld',
  900. label: 'Ladin',
  901. },
  902. {
  903. value: 'la',
  904. label: 'Latina',
  905. },
  906. {
  907. value: 'lv',
  908. label: 'Latviešu',
  909. },
  910. {
  911. value: 'lt',
  912. label: 'Lietuvių',
  913. },
  914. {
  915. value: 'hu',
  916. label: 'Magyar',
  917. },
  918. {
  919. value: 'mk',
  920. label: 'Македонски',
  921. },
  922. {
  923. value: 'arz',
  924. label: 'مصرى',
  925. },
  926. {
  927. value: 'ms',
  928. label: 'Bahasa Melayu',
  929. },
  930. {
  931. value: 'min',
  932. label: 'Bahaso Minangkabau',
  933. },
  934. {
  935. value: 'my',
  936. label: 'မြန်မာဘာသာ',
  937. },
  938. {
  939. value: 'nl',
  940. label: 'Nederlands',
  941. },
  942. {
  943. value: 'ja',
  944. label: '日本語',
  945. },
  946. {
  947. value: 'no',
  948. label: 'Norsk (bokmål)',
  949. },
  950. {
  951. value: 'nn',
  952. label: 'Norsk (nynorsk)',
  953. },
  954. {
  955. value: 'ce',
  956. label: 'Нохчийн',
  957. },
  958. {
  959. value: 'uz',
  960. label: 'Oʻzbekcha / Ўзбекча',
  961. },
  962. {
  963. value: 'pt',
  964. label: 'Português',
  965. },
  966. {
  967. value: 'kk',
  968. label: 'Қазақша / Qazaqşa / قازاقشا',
  969. },
  970. {
  971. value: 'ro',
  972. label: 'Română',
  973. },
  974. {
  975. value: 'ru',
  976. label: 'Русский',
  977. },
  978. {
  979. value: 'ceb',
  980. label: 'Sinugboanong Binisaya',
  981. },
  982. {
  983. value: 'sk',
  984. label: 'Slovenčina',
  985. },
  986. {
  987. value: 'sl',
  988. label: 'Slovenščina',
  989. },
  990. {
  991. value: 'sr',
  992. label: 'Српски / Srpski',
  993. },
  994. {
  995. value: 'sh',
  996. label: 'Srpskohrvatski / Српскохрватски',
  997. },
  998. {
  999. value: 'fi',
  1000. label: 'Suomi',
  1001. },
  1002. {
  1003. value: 'sv',
  1004. label: 'Svenska',
  1005. },
  1006. {
  1007. value: 'ta',
  1008. label: 'தமிழ்',
  1009. },
  1010. {
  1011. value: 'tt',
  1012. label: 'Татарча / Tatarça',
  1013. },
  1014. {
  1015. value: 'th',
  1016. label: 'ภาษาไทย',
  1017. },
  1018. {
  1019. value: 'tg',
  1020. label: 'Тоҷикӣ',
  1021. },
  1022. {
  1023. value: 'azb',
  1024. label: 'تۆرکجه',
  1025. },
  1026. {
  1027. value: 'tr',
  1028. label: 'Türkçe',
  1029. },
  1030. {
  1031. value: 'uk',
  1032. label: 'Українська',
  1033. },
  1034. {
  1035. value: 'ur',
  1036. label: 'اردو',
  1037. },
  1038. {
  1039. value: 'vi',
  1040. label: 'Tiếng Việt',
  1041. },
  1042. {
  1043. value: 'war',
  1044. label: 'Winaray',
  1045. },
  1046. {
  1047. value: 'zh',
  1048. label: '中文',
  1049. },
  1050. {
  1051. value: 'yue',
  1052. label: '粵語',
  1053. },
  1054. ];
  1055. export const GoogleLanguageOptions = [
  1056. {
  1057. language_code: 'af',
  1058. language_name: 'Afrikaans',
  1059. },
  1060. {
  1061. language_code: 'ak',
  1062. language_name: 'Akan',
  1063. },
  1064. {
  1065. language_code: 'sq',
  1066. language_name: 'Albanian',
  1067. },
  1068. {
  1069. language_code: 'ws',
  1070. language_name: 'Samoa',
  1071. },
  1072. {
  1073. language_code: 'am',
  1074. language_name: 'Amharic',
  1075. },
  1076. {
  1077. language_code: 'ar',
  1078. language_name: 'Arabic',
  1079. },
  1080. {
  1081. language_code: 'hy',
  1082. language_name: 'Armenian',
  1083. },
  1084. {
  1085. language_code: 'az',
  1086. language_name: 'Azerbaijani',
  1087. },
  1088. {
  1089. language_code: 'eu',
  1090. language_name: 'Basque',
  1091. },
  1092. {
  1093. language_code: 'be',
  1094. language_name: 'Belarusian',
  1095. },
  1096. {
  1097. language_code: 'bem',
  1098. language_name: 'Bemba',
  1099. },
  1100. {
  1101. language_code: 'bn',
  1102. language_name: 'Bengali',
  1103. },
  1104. {
  1105. language_code: 'bh',
  1106. language_name: 'Bihari',
  1107. },
  1108. {
  1109. language_code: 'xx-bork',
  1110. language_name: 'Bork, bork, bork!',
  1111. },
  1112. {
  1113. language_code: 'bs',
  1114. language_name: 'Bosnian',
  1115. },
  1116. {
  1117. language_code: 'br',
  1118. language_name: 'Breton',
  1119. },
  1120. {
  1121. language_code: 'bg',
  1122. language_name: 'Bulgarian',
  1123. },
  1124. {
  1125. language_code: 'bt',
  1126. language_name: 'Bhutanese',
  1127. },
  1128. {
  1129. language_code: 'km',
  1130. language_name: 'Cambodian',
  1131. },
  1132. {
  1133. language_code: 'ca',
  1134. language_name: 'Catalan',
  1135. },
  1136. {
  1137. language_code: 'chr',
  1138. language_name: 'Cherokee',
  1139. },
  1140. {
  1141. language_code: 'ny',
  1142. language_name: 'Chichewa',
  1143. },
  1144. {
  1145. language_code: 'zh-cn',
  1146. language_name: 'Chinese (Simplified)',
  1147. },
  1148. {
  1149. language_code: 'zh-tw',
  1150. language_name: 'Chinese (Traditional)',
  1151. },
  1152. {
  1153. language_code: 'co',
  1154. language_name: 'Corsican',
  1155. },
  1156. {
  1157. language_code: 'hr',
  1158. language_name: 'Croatian',
  1159. },
  1160. {
  1161. language_code: 'cs',
  1162. language_name: 'Czech',
  1163. },
  1164. {
  1165. language_code: 'da',
  1166. language_name: 'Danish',
  1167. },
  1168. {
  1169. language_code: 'nl',
  1170. language_name: 'Dutch',
  1171. },
  1172. {
  1173. language_code: 'xx-elmer',
  1174. language_name: 'Elmer Fudd',
  1175. },
  1176. {
  1177. language_code: 'en',
  1178. language_name: 'English',
  1179. },
  1180. {
  1181. language_code: 'eo',
  1182. language_name: 'Esperanto',
  1183. },
  1184. {
  1185. language_code: 'et',
  1186. language_name: 'Estonian',
  1187. },
  1188. {
  1189. language_code: 'ee',
  1190. language_name: 'Ewe',
  1191. },
  1192. {
  1193. language_code: 'fo',
  1194. language_name: 'Faroese',
  1195. },
  1196. {
  1197. language_code: 'tl',
  1198. language_name: 'Filipino',
  1199. },
  1200. {
  1201. language_code: 'fi',
  1202. language_name: 'Finnish',
  1203. },
  1204. {
  1205. language_code: 'fr',
  1206. language_name: 'French',
  1207. },
  1208. {
  1209. language_code: 'fy',
  1210. language_name: 'Frisian',
  1211. },
  1212. {
  1213. language_code: 'gaa',
  1214. language_name: 'Ga',
  1215. },
  1216. {
  1217. language_code: 'gl',
  1218. language_name: 'Galician',
  1219. },
  1220. {
  1221. language_code: 'ka',
  1222. language_name: 'Georgian',
  1223. },
  1224. {
  1225. language_code: 'de',
  1226. language_name: 'German',
  1227. },
  1228. {
  1229. language_code: 'el',
  1230. language_name: 'Greek',
  1231. },
  1232. {
  1233. language_code: 'kl',
  1234. language_name: 'Greenlandic',
  1235. },
  1236. {
  1237. language_code: 'gn',
  1238. language_name: 'Guarani',
  1239. },
  1240. {
  1241. language_code: 'gu',
  1242. language_name: 'Gujarati',
  1243. },
  1244. {
  1245. language_code: 'xx-hacker',
  1246. language_name: 'Hacker',
  1247. },
  1248. {
  1249. language_code: 'ht',
  1250. language_name: 'Haitian Creole',
  1251. },
  1252. {
  1253. language_code: 'ha',
  1254. language_name: 'Hausa',
  1255. },
  1256. {
  1257. language_code: 'haw',
  1258. language_name: 'Hawaiian',
  1259. },
  1260. {
  1261. language_code: 'iw',
  1262. language_name: 'Hebrew',
  1263. },
  1264. {
  1265. language_code: 'hi',
  1266. language_name: 'Hindi',
  1267. },
  1268. {
  1269. language_code: 'hu',
  1270. language_name: 'Hungarian',
  1271. },
  1272. {
  1273. language_code: 'is',
  1274. language_name: 'Icelandic',
  1275. },
  1276. {
  1277. language_code: 'ig',
  1278. language_name: 'Igbo',
  1279. },
  1280. {
  1281. language_code: 'id',
  1282. language_name: 'Indonesian',
  1283. },
  1284. {
  1285. language_code: 'ia',
  1286. language_name: 'Interlingua',
  1287. },
  1288. {
  1289. language_code: 'ga',
  1290. language_name: 'Irish',
  1291. },
  1292. {
  1293. language_code: 'it',
  1294. language_name: 'Italian',
  1295. },
  1296. {
  1297. language_code: 'ja',
  1298. language_name: 'Japanese',
  1299. },
  1300. {
  1301. language_code: 'jw',
  1302. language_name: 'Javanese',
  1303. },
  1304. {
  1305. language_code: 'kn',
  1306. language_name: 'Kannada',
  1307. },
  1308. {
  1309. language_code: 'kk',
  1310. language_name: 'Kazakh',
  1311. },
  1312. {
  1313. language_code: 'rw',
  1314. language_name: 'Kinyarwanda',
  1315. },
  1316. {
  1317. language_code: 'rn',
  1318. language_name: 'Kirundi',
  1319. },
  1320. {
  1321. language_code: 'xx-klingon',
  1322. language_name: 'Klingon',
  1323. },
  1324. {
  1325. language_code: 'kg',
  1326. language_name: 'Kongo',
  1327. },
  1328. {
  1329. language_code: 'ko',
  1330. language_name: 'Korean',
  1331. },
  1332. {
  1333. language_code: 'kri',
  1334. language_name: 'Krio (Sierra Leone)',
  1335. },
  1336. {
  1337. language_code: 'ku',
  1338. language_name: 'Kurdish',
  1339. },
  1340. {
  1341. language_code: 'ckb',
  1342. language_name: 'Kurdish (Soranî)',
  1343. },
  1344. {
  1345. language_code: 'ky',
  1346. language_name: 'Kyrgyz',
  1347. },
  1348. {
  1349. language_code: 'lo',
  1350. language_name: 'Laothian',
  1351. },
  1352. {
  1353. language_code: 'la',
  1354. language_name: 'Latin',
  1355. },
  1356. {
  1357. language_code: 'lv',
  1358. language_name: 'Latvian',
  1359. },
  1360. {
  1361. language_code: 'ln',
  1362. language_name: 'Lingala',
  1363. },
  1364. {
  1365. language_code: 'lt',
  1366. language_name: 'Lithuanian',
  1367. },
  1368. {
  1369. language_code: 'loz',
  1370. language_name: 'Lozi',
  1371. },
  1372. {
  1373. language_code: 'lg',
  1374. language_name: 'Luganda',
  1375. },
  1376. {
  1377. language_code: 'ach',
  1378. language_name: 'Luo',
  1379. },
  1380. {
  1381. language_code: 'mk',
  1382. language_name: 'Macedonian',
  1383. },
  1384. {
  1385. language_code: 'mg',
  1386. language_name: 'Malagasy',
  1387. },
  1388. {
  1389. language_code: 'ms',
  1390. language_name: 'Malay',
  1391. },
  1392. {
  1393. language_code: 'ml',
  1394. language_name: 'Malayalam',
  1395. },
  1396. {
  1397. language_code: 'mt',
  1398. language_name: 'Maltese',
  1399. },
  1400. {
  1401. language_code: 'mv',
  1402. language_name: 'Maldives',
  1403. },
  1404. {
  1405. language_code: 'mi',
  1406. language_name: 'Maori',
  1407. },
  1408. {
  1409. language_code: 'mr',
  1410. language_name: 'Marathi',
  1411. },
  1412. {
  1413. language_code: 'mfe',
  1414. language_name: 'Mauritian Creole',
  1415. },
  1416. {
  1417. language_code: 'mo',
  1418. language_name: 'Moldavian',
  1419. },
  1420. {
  1421. language_code: 'mn',
  1422. language_name: 'Mongolian',
  1423. },
  1424. {
  1425. language_code: 'sr-me',
  1426. language_name: 'Montenegrin',
  1427. },
  1428. {
  1429. language_code: 'my',
  1430. language_name: 'Myanmar',
  1431. },
  1432. {
  1433. language_code: 'ne',
  1434. language_name: 'Nepali',
  1435. },
  1436. {
  1437. language_code: 'pcm',
  1438. language_name: 'Nigerian Pidgin',
  1439. },
  1440. {
  1441. language_code: 'nso',
  1442. language_name: 'Northern Sotho',
  1443. },
  1444. {
  1445. language_code: 'no',
  1446. language_name: 'Norwegian',
  1447. },
  1448. {
  1449. language_code: 'nn',
  1450. language_name: 'Norwegian (Nynorsk)',
  1451. },
  1452. {
  1453. language_code: 'oc',
  1454. language_name: 'Occitan',
  1455. },
  1456. {
  1457. language_code: 'or',
  1458. language_name: 'Oriya',
  1459. },
  1460. {
  1461. language_code: 'om',
  1462. language_name: 'Oromo',
  1463. },
  1464. {
  1465. language_code: 'ps',
  1466. language_name: 'Pashto',
  1467. },
  1468. {
  1469. language_code: 'fa',
  1470. language_name: 'Persian',
  1471. },
  1472. {
  1473. language_code: 'xx-pirate',
  1474. language_name: 'Pirate',
  1475. },
  1476. {
  1477. language_code: 'pl',
  1478. language_name: 'Polish',
  1479. },
  1480. {
  1481. language_code: 'pt',
  1482. language_name: 'Portuguese',
  1483. },
  1484. {
  1485. language_code: 'pt-br',
  1486. language_name: 'Portuguese (Brazil)',
  1487. },
  1488. {
  1489. language_code: 'pt-pt',
  1490. language_name: 'Portuguese (Portugal)',
  1491. },
  1492. {
  1493. language_code: 'pa',
  1494. language_name: 'Punjabi',
  1495. },
  1496. {
  1497. language_code: 'qu',
  1498. language_name: 'Quechua',
  1499. },
  1500. {
  1501. language_code: 'ro',
  1502. language_name: 'Romanian',
  1503. },
  1504. {
  1505. language_code: 'rm',
  1506. language_name: 'Romansh',
  1507. },
  1508. {
  1509. language_code: 'nyn',
  1510. language_name: 'Runyakitara',
  1511. },
  1512. {
  1513. language_code: 'ru',
  1514. language_name: 'Russian',
  1515. },
  1516. {
  1517. language_code: 'gd',
  1518. language_name: 'Scots Gaelic',
  1519. },
  1520. {
  1521. language_code: 'sr',
  1522. language_name: 'Serbian',
  1523. },
  1524. {
  1525. language_code: 'sh',
  1526. language_name: 'Serbo-Croatian',
  1527. },
  1528. {
  1529. language_code: 'st',
  1530. language_name: 'Sesotho',
  1531. },
  1532. {
  1533. language_code: 'tn',
  1534. language_name: 'Setswana',
  1535. },
  1536. {
  1537. language_code: 'crs',
  1538. language_name: 'Seychellois Creole',
  1539. },
  1540. {
  1541. language_code: 'sn',
  1542. language_name: 'Shona',
  1543. },
  1544. {
  1545. language_code: 'sd',
  1546. language_name: 'Sindhi',
  1547. },
  1548. {
  1549. language_code: 'si',
  1550. language_name: 'Sinhalese',
  1551. },
  1552. {
  1553. language_code: 'sk',
  1554. language_name: 'Slovak',
  1555. },
  1556. {
  1557. language_code: 'sl',
  1558. language_name: 'Slovenian',
  1559. },
  1560. {
  1561. language_code: 'so',
  1562. language_name: 'Somali',
  1563. },
  1564. {
  1565. language_code: 'es',
  1566. language_name: 'Spanish',
  1567. },
  1568. {
  1569. language_code: 'es-419',
  1570. language_name: 'Spanish (Latin American)',
  1571. },
  1572. {
  1573. language_code: 'su',
  1574. language_name: 'Sundanese',
  1575. },
  1576. {
  1577. language_code: 'sw',
  1578. language_name: 'Swahili',
  1579. },
  1580. {
  1581. language_code: 'sv',
  1582. language_name: 'Swedish',
  1583. },
  1584. {
  1585. language_code: 'tg',
  1586. language_name: 'Tajik',
  1587. },
  1588. {
  1589. language_code: 'ta',
  1590. language_name: 'Tamil',
  1591. },
  1592. {
  1593. language_code: 'tt',
  1594. language_name: 'Tatar',
  1595. },
  1596. {
  1597. language_code: 'te',
  1598. language_name: 'Telugu',
  1599. },
  1600. {
  1601. language_code: 'th',
  1602. language_name: 'Thai',
  1603. },
  1604. {
  1605. language_code: 'ti',
  1606. language_name: 'Tigrinya',
  1607. },
  1608. {
  1609. language_code: 'to',
  1610. language_name: 'Tonga',
  1611. },
  1612. {
  1613. language_code: 'lua',
  1614. language_name: 'Tshiluba',
  1615. },
  1616. {
  1617. language_code: 'tum',
  1618. language_name: 'Tumbuka',
  1619. },
  1620. {
  1621. language_code: 'tr',
  1622. language_name: 'Turkish',
  1623. },
  1624. {
  1625. language_code: 'tk',
  1626. language_name: 'Turkmen',
  1627. },
  1628. {
  1629. language_code: 'tw',
  1630. language_name: 'Twi',
  1631. },
  1632. {
  1633. language_code: 'ug',
  1634. language_name: 'Uighur',
  1635. },
  1636. {
  1637. language_code: 'uk',
  1638. language_name: 'Ukrainian',
  1639. },
  1640. {
  1641. language_code: 'ur',
  1642. language_name: 'Urdu',
  1643. },
  1644. {
  1645. language_code: 'uz',
  1646. language_name: 'Uzbek',
  1647. },
  1648. {
  1649. language_code: 'vu',
  1650. language_name: 'Vanuatu',
  1651. },
  1652. {
  1653. language_code: 'vi',
  1654. language_name: 'Vietnamese',
  1655. },
  1656. {
  1657. language_code: 'cy',
  1658. language_name: 'Welsh',
  1659. },
  1660. {
  1661. language_code: 'wo',
  1662. language_name: 'Wolof',
  1663. },
  1664. {
  1665. language_code: 'xh',
  1666. language_name: 'Xhosa',
  1667. },
  1668. {
  1669. language_code: 'yi',
  1670. language_name: 'Yiddish',
  1671. },
  1672. {
  1673. language_code: 'yo',
  1674. language_name: 'Yoruba',
  1675. },
  1676. {
  1677. language_code: 'zu',
  1678. language_name: 'Zulu',
  1679. },
  1680. ].map((x) => ({ label: x.language_name, value: x.language_code }));
  1681. export const GoogleCountryOptions = [
  1682. {
  1683. country_code: 'af',
  1684. country_name: 'Afghanistan',
  1685. },
  1686. {
  1687. country_code: 'al',
  1688. country_name: 'Albania',
  1689. },
  1690. {
  1691. country_code: 'dz',
  1692. country_name: 'Algeria',
  1693. },
  1694. {
  1695. country_code: 'as',
  1696. country_name: 'American Samoa',
  1697. },
  1698. {
  1699. country_code: 'ad',
  1700. country_name: 'Andorra',
  1701. },
  1702. {
  1703. country_code: 'ao',
  1704. country_name: 'Angola',
  1705. },
  1706. {
  1707. country_code: 'ai',
  1708. country_name: 'Anguilla',
  1709. },
  1710. {
  1711. country_code: 'aq',
  1712. country_name: 'Antarctica',
  1713. },
  1714. {
  1715. country_code: 'ag',
  1716. country_name: 'Antigua and Barbuda',
  1717. },
  1718. {
  1719. country_code: 'ar',
  1720. country_name: 'Argentina',
  1721. },
  1722. {
  1723. country_code: 'am',
  1724. country_name: 'Armenia',
  1725. },
  1726. {
  1727. country_code: 'aw',
  1728. country_name: 'Aruba',
  1729. },
  1730. {
  1731. country_code: 'au',
  1732. country_name: 'Australia',
  1733. },
  1734. {
  1735. country_code: 'at',
  1736. country_name: 'Austria',
  1737. },
  1738. {
  1739. country_code: 'az',
  1740. country_name: 'Azerbaijan',
  1741. },
  1742. {
  1743. country_code: 'bs',
  1744. country_name: 'Bahamas',
  1745. },
  1746. {
  1747. country_code: 'bh',
  1748. country_name: 'Bahrain',
  1749. },
  1750. {
  1751. country_code: 'bd',
  1752. country_name: 'Bangladesh',
  1753. },
  1754. {
  1755. country_code: 'bb',
  1756. country_name: 'Barbados',
  1757. },
  1758. {
  1759. country_code: 'by',
  1760. country_name: 'Belarus',
  1761. },
  1762. {
  1763. country_code: 'be',
  1764. country_name: 'Belgium',
  1765. },
  1766. {
  1767. country_code: 'bz',
  1768. country_name: 'Belize',
  1769. },
  1770. {
  1771. country_code: 'bj',
  1772. country_name: 'Benin',
  1773. },
  1774. {
  1775. country_code: 'bm',
  1776. country_name: 'Bermuda',
  1777. },
  1778. {
  1779. country_code: 'bt',
  1780. country_name: 'Bhutan',
  1781. },
  1782. {
  1783. country_code: 'bo',
  1784. country_name: 'Bolivia',
  1785. },
  1786. {
  1787. country_code: 'ba',
  1788. country_name: 'Bosnia and Herzegovina',
  1789. },
  1790. {
  1791. country_code: 'bw',
  1792. country_name: 'Botswana',
  1793. },
  1794. {
  1795. country_code: 'bv',
  1796. country_name: 'Bouvet Island',
  1797. },
  1798. {
  1799. country_code: 'br',
  1800. country_name: 'Brazil',
  1801. },
  1802. {
  1803. country_code: 'io',
  1804. country_name: 'British Indian Ocean Territory',
  1805. },
  1806. {
  1807. country_code: 'bn',
  1808. country_name: 'Brunei Darussalam',
  1809. },
  1810. {
  1811. country_code: 'bg',
  1812. country_name: 'Bulgaria',
  1813. },
  1814. {
  1815. country_code: 'bf',
  1816. country_name: 'Burkina Faso',
  1817. },
  1818. {
  1819. country_code: 'bi',
  1820. country_name: 'Burundi',
  1821. },
  1822. {
  1823. country_code: 'kh',
  1824. country_name: 'Cambodia',
  1825. },
  1826. {
  1827. country_code: 'cm',
  1828. country_name: 'Cameroon',
  1829. },
  1830. {
  1831. country_code: 'ca',
  1832. country_name: 'Canada',
  1833. },
  1834. {
  1835. country_code: 'cv',
  1836. country_name: 'Cape Verde',
  1837. },
  1838. {
  1839. country_code: 'ky',
  1840. country_name: 'Cayman Islands',
  1841. },
  1842. {
  1843. country_code: 'cf',
  1844. country_name: 'Central African Republic',
  1845. },
  1846. {
  1847. country_code: 'td',
  1848. country_name: 'Chad',
  1849. },
  1850. {
  1851. country_code: 'cl',
  1852. country_name: 'Chile',
  1853. },
  1854. {
  1855. country_code: 'cn',
  1856. country_name: 'China',
  1857. },
  1858. {
  1859. country_code: 'cx',
  1860. country_name: 'Christmas Island',
  1861. },
  1862. {
  1863. country_code: 'cc',
  1864. country_name: 'Cocos (Keeling) Islands',
  1865. },
  1866. {
  1867. country_code: 'co',
  1868. country_name: 'Colombia',
  1869. },
  1870. {
  1871. country_code: 'km',
  1872. country_name: 'Comoros',
  1873. },
  1874. {
  1875. country_code: 'cg',
  1876. country_name: 'Congo',
  1877. },
  1878. {
  1879. country_code: 'cd',
  1880. country_name: 'Congo, the Democratic Republic of the',
  1881. },
  1882. {
  1883. country_code: 'ck',
  1884. country_name: 'Cook Islands',
  1885. },
  1886. {
  1887. country_code: 'cr',
  1888. country_name: 'Costa Rica',
  1889. },
  1890. {
  1891. country_code: 'ci',
  1892. country_name: "Cote D'ivoire",
  1893. },
  1894. {
  1895. country_code: 'hr',
  1896. country_name: 'Croatia',
  1897. },
  1898. {
  1899. country_code: 'cu',
  1900. country_name: 'Cuba',
  1901. },
  1902. {
  1903. country_code: 'cy',
  1904. country_name: 'Cyprus',
  1905. },
  1906. {
  1907. country_code: 'cz',
  1908. country_name: 'Czech Republic',
  1909. },
  1910. {
  1911. country_code: 'dk',
  1912. country_name: 'Denmark',
  1913. },
  1914. {
  1915. country_code: 'dj',
  1916. country_name: 'Djibouti',
  1917. },
  1918. {
  1919. country_code: 'dm',
  1920. country_name: 'Dominica',
  1921. },
  1922. {
  1923. country_code: 'do',
  1924. country_name: 'Dominican Republic',
  1925. },
  1926. {
  1927. country_code: 'ec',
  1928. country_name: 'Ecuador',
  1929. },
  1930. {
  1931. country_code: 'eg',
  1932. country_name: 'Egypt',
  1933. },
  1934. {
  1935. country_code: 'sv',
  1936. country_name: 'El Salvador',
  1937. },
  1938. {
  1939. country_code: 'gq',
  1940. country_name: 'Equatorial Guinea',
  1941. },
  1942. {
  1943. country_code: 'er',
  1944. country_name: 'Eritrea',
  1945. },
  1946. {
  1947. country_code: 'ee',
  1948. country_name: 'Estonia',
  1949. },
  1950. {
  1951. country_code: 'et',
  1952. country_name: 'Ethiopia',
  1953. },
  1954. {
  1955. country_code: 'fk',
  1956. country_name: 'Falkland Islands (Malvinas)',
  1957. },
  1958. {
  1959. country_code: 'fo',
  1960. country_name: 'Faroe Islands',
  1961. },
  1962. {
  1963. country_code: 'fj',
  1964. country_name: 'Fiji',
  1965. },
  1966. {
  1967. country_code: 'fi',
  1968. country_name: 'Finland',
  1969. },
  1970. {
  1971. country_code: 'fr',
  1972. country_name: 'France',
  1973. },
  1974. {
  1975. country_code: 'gf',
  1976. country_name: 'French Guiana',
  1977. },
  1978. {
  1979. country_code: 'pf',
  1980. country_name: 'French Polynesia',
  1981. },
  1982. {
  1983. country_code: 'tf',
  1984. country_name: 'French Southern Territories',
  1985. },
  1986. {
  1987. country_code: 'ga',
  1988. country_name: 'Gabon',
  1989. },
  1990. {
  1991. country_code: 'gm',
  1992. country_name: 'Gambia',
  1993. },
  1994. {
  1995. country_code: 'ge',
  1996. country_name: 'Georgia',
  1997. },
  1998. {
  1999. country_code: 'de',
  2000. country_name: 'Germany',
  2001. },
  2002. {
  2003. country_code: 'gh',
  2004. country_name: 'Ghana',
  2005. },
  2006. {
  2007. country_code: 'gi',
  2008. country_name: 'Gibraltar',
  2009. },
  2010. {
  2011. country_code: 'gr',
  2012. country_name: 'Greece',
  2013. },
  2014. {
  2015. country_code: 'gl',
  2016. country_name: 'Greenland',
  2017. },
  2018. {
  2019. country_code: 'gd',
  2020. country_name: 'Grenada',
  2021. },
  2022. {
  2023. country_code: 'gp',
  2024. country_name: 'Guadeloupe',
  2025. },
  2026. {
  2027. country_code: 'gu',
  2028. country_name: 'Guam',
  2029. },
  2030. {
  2031. country_code: 'gt',
  2032. country_name: 'Guatemala',
  2033. },
  2034. {
  2035. country_code: 'gn',
  2036. country_name: 'Guinea',
  2037. },
  2038. {
  2039. country_code: 'gw',
  2040. country_name: 'Guinea-Bissau',
  2041. },
  2042. {
  2043. country_code: 'gy',
  2044. country_name: 'Guyana',
  2045. },
  2046. {
  2047. country_code: 'ht',
  2048. country_name: 'Haiti',
  2049. },
  2050. {
  2051. country_code: 'hm',
  2052. country_name: 'Heard Island and Mcdonald Islands',
  2053. },
  2054. {
  2055. country_code: 'va',
  2056. country_name: 'Holy See (Vatican City State)',
  2057. },
  2058. {
  2059. country_code: 'hn',
  2060. country_name: 'Honduras',
  2061. },
  2062. {
  2063. country_code: 'hk',
  2064. country_name: 'Hong Kong',
  2065. },
  2066. {
  2067. country_code: 'hu',
  2068. country_name: 'Hungary',
  2069. },
  2070. {
  2071. country_code: 'is',
  2072. country_name: 'Iceland',
  2073. },
  2074. {
  2075. country_code: 'in',
  2076. country_name: 'India',
  2077. },
  2078. {
  2079. country_code: 'id',
  2080. country_name: 'Indonesia',
  2081. },
  2082. {
  2083. country_code: 'ir',
  2084. country_name: 'Iran, Islamic Republic of',
  2085. },
  2086. {
  2087. country_code: 'iq',
  2088. country_name: 'Iraq',
  2089. },
  2090. {
  2091. country_code: 'ie',
  2092. country_name: 'Ireland',
  2093. },
  2094. {
  2095. country_code: 'il',
  2096. country_name: 'Israel',
  2097. },
  2098. {
  2099. country_code: 'it',
  2100. country_name: 'Italy',
  2101. },
  2102. {
  2103. country_code: 'jm',
  2104. country_name: 'Jamaica',
  2105. },
  2106. {
  2107. country_code: 'jp',
  2108. country_name: 'Japan',
  2109. },
  2110. {
  2111. country_code: 'jo',
  2112. country_name: 'Jordan',
  2113. },
  2114. {
  2115. country_code: 'kz',
  2116. country_name: 'Kazakhstan',
  2117. },
  2118. {
  2119. country_code: 'ke',
  2120. country_name: 'Kenya',
  2121. },
  2122. {
  2123. country_code: 'ki',
  2124. country_name: 'Kiribati',
  2125. },
  2126. {
  2127. country_code: 'kp',
  2128. country_name: "Korea, Democratic People's Republic of",
  2129. },
  2130. {
  2131. country_code: 'kr',
  2132. country_name: 'Korea, Republic of',
  2133. },
  2134. {
  2135. country_code: 'kw',
  2136. country_name: 'Kuwait',
  2137. },
  2138. {
  2139. country_code: 'kg',
  2140. country_name: 'Kyrgyzstan',
  2141. },
  2142. {
  2143. country_code: 'la',
  2144. country_name: "Lao People's Democratic Republic",
  2145. },
  2146. {
  2147. country_code: 'lv',
  2148. country_name: 'Latvia',
  2149. },
  2150. {
  2151. country_code: 'lb',
  2152. country_name: 'Lebanon',
  2153. },
  2154. {
  2155. country_code: 'ls',
  2156. country_name: 'Lesotho',
  2157. },
  2158. {
  2159. country_code: 'lr',
  2160. country_name: 'Liberia',
  2161. },
  2162. {
  2163. country_code: 'ly',
  2164. country_name: 'Libyan Arab Jamahiriya',
  2165. },
  2166. {
  2167. country_code: 'li',
  2168. country_name: 'Liechtenstein',
  2169. },
  2170. {
  2171. country_code: 'lt',
  2172. country_name: 'Lithuania',
  2173. },
  2174. {
  2175. country_code: 'lu',
  2176. country_name: 'Luxembourg',
  2177. },
  2178. {
  2179. country_code: 'mo',
  2180. country_name: 'Macao',
  2181. },
  2182. {
  2183. country_code: 'mk',
  2184. country_name: 'Macedonia, the Former Yugosalv Republic of',
  2185. },
  2186. {
  2187. country_code: 'mg',
  2188. country_name: 'Madagascar',
  2189. },
  2190. {
  2191. country_code: 'mw',
  2192. country_name: 'Malawi',
  2193. },
  2194. {
  2195. country_code: 'my',
  2196. country_name: 'Malaysia',
  2197. },
  2198. {
  2199. country_code: 'mv',
  2200. country_name: 'Maldives',
  2201. },
  2202. {
  2203. country_code: 'ml',
  2204. country_name: 'Mali',
  2205. },
  2206. {
  2207. country_code: 'mt',
  2208. country_name: 'Malta',
  2209. },
  2210. {
  2211. country_code: 'mh',
  2212. country_name: 'Marshall Islands',
  2213. },
  2214. {
  2215. country_code: 'mq',
  2216. country_name: 'Martinique',
  2217. },
  2218. {
  2219. country_code: 'mr',
  2220. country_name: 'Mauritania',
  2221. },
  2222. {
  2223. country_code: 'mu',
  2224. country_name: 'Mauritius',
  2225. },
  2226. {
  2227. country_code: 'yt',
  2228. country_name: 'Mayotte',
  2229. },
  2230. {
  2231. country_code: 'mx',
  2232. country_name: 'Mexico',
  2233. },
  2234. {
  2235. country_code: 'fm',
  2236. country_name: 'Micronesia, Federated States of',
  2237. },
  2238. {
  2239. country_code: 'md',
  2240. country_name: 'Moldova, Republic of',
  2241. },
  2242. {
  2243. country_code: 'mc',
  2244. country_name: 'Monaco',
  2245. },
  2246. {
  2247. country_code: 'mn',
  2248. country_name: 'Mongolia',
  2249. },
  2250. {
  2251. country_code: 'ms',
  2252. country_name: 'Montserrat',
  2253. },
  2254. {
  2255. country_code: 'ma',
  2256. country_name: 'Morocco',
  2257. },
  2258. {
  2259. country_code: 'mz',
  2260. country_name: 'Mozambique',
  2261. },
  2262. {
  2263. country_code: 'mm',
  2264. country_name: 'Myanmar',
  2265. },
  2266. {
  2267. country_code: 'na',
  2268. country_name: 'Namibia',
  2269. },
  2270. {
  2271. country_code: 'nr',
  2272. country_name: 'Nauru',
  2273. },
  2274. {
  2275. country_code: 'np',
  2276. country_name: 'Nepal',
  2277. },
  2278. {
  2279. country_code: 'nl',
  2280. country_name: 'Netherlands',
  2281. },
  2282. {
  2283. country_code: 'an',
  2284. country_name: 'Netherlands Antilles',
  2285. },
  2286. {
  2287. country_code: 'nc',
  2288. country_name: 'New Caledonia',
  2289. },
  2290. {
  2291. country_code: 'nz',
  2292. country_name: 'New Zealand',
  2293. },
  2294. {
  2295. country_code: 'ni',
  2296. country_name: 'Nicaragua',
  2297. },
  2298. {
  2299. country_code: 'ne',
  2300. country_name: 'Niger',
  2301. },
  2302. {
  2303. country_code: 'ng',
  2304. country_name: 'Nigeria',
  2305. },
  2306. {
  2307. country_code: 'nu',
  2308. country_name: 'Niue',
  2309. },
  2310. {
  2311. country_code: 'nf',
  2312. country_name: 'Norfolk Island',
  2313. },
  2314. {
  2315. country_code: 'mp',
  2316. country_name: 'Northern Mariana Islands',
  2317. },
  2318. {
  2319. country_code: 'no',
  2320. country_name: 'Norway',
  2321. },
  2322. {
  2323. country_code: 'om',
  2324. country_name: 'Oman',
  2325. },
  2326. {
  2327. country_code: 'pk',
  2328. country_name: 'Pakistan',
  2329. },
  2330. {
  2331. country_code: 'pw',
  2332. country_name: 'Palau',
  2333. },
  2334. {
  2335. country_code: 'ps',
  2336. country_name: 'Palestinian Territory, Occupied',
  2337. },
  2338. {
  2339. country_code: 'pa',
  2340. country_name: 'Panama',
  2341. },
  2342. {
  2343. country_code: 'pg',
  2344. country_name: 'Papua New Guinea',
  2345. },
  2346. {
  2347. country_code: 'py',
  2348. country_name: 'Paraguay',
  2349. },
  2350. {
  2351. country_code: 'pe',
  2352. country_name: 'Peru',
  2353. },
  2354. {
  2355. country_code: 'ph',
  2356. country_name: 'Philippines',
  2357. },
  2358. {
  2359. country_code: 'pn',
  2360. country_name: 'Pitcairn',
  2361. },
  2362. {
  2363. country_code: 'pl',
  2364. country_name: 'Poland',
  2365. },
  2366. {
  2367. country_code: 'pt',
  2368. country_name: 'Portugal',
  2369. },
  2370. {
  2371. country_code: 'pr',
  2372. country_name: 'Puerto Rico',
  2373. },
  2374. {
  2375. country_code: 'qa',
  2376. country_name: 'Qatar',
  2377. },
  2378. {
  2379. country_code: 're',
  2380. country_name: 'Reunion',
  2381. },
  2382. {
  2383. country_code: 'ro',
  2384. country_name: 'Romania',
  2385. },
  2386. {
  2387. country_code: 'ru',
  2388. country_name: 'Russian Federation',
  2389. },
  2390. {
  2391. country_code: 'rw',
  2392. country_name: 'Rwanda',
  2393. },
  2394. {
  2395. country_code: 'sh',
  2396. country_name: 'Saint Helena',
  2397. },
  2398. {
  2399. country_code: 'kn',
  2400. country_name: 'Saint Kitts and Nevis',
  2401. },
  2402. {
  2403. country_code: 'lc',
  2404. country_name: 'Saint Lucia',
  2405. },
  2406. {
  2407. country_code: 'pm',
  2408. country_name: 'Saint Pierre and Miquelon',
  2409. },
  2410. {
  2411. country_code: 'vc',
  2412. country_name: 'Saint Vincent and the Grenadines',
  2413. },
  2414. {
  2415. country_code: 'ws',
  2416. country_name: 'Samoa',
  2417. },
  2418. {
  2419. country_code: 'sm',
  2420. country_name: 'San Marino',
  2421. },
  2422. {
  2423. country_code: 'st',
  2424. country_name: 'Sao Tome and Principe',
  2425. },
  2426. {
  2427. country_code: 'sa',
  2428. country_name: 'Saudi Arabia',
  2429. },
  2430. {
  2431. country_code: 'sn',
  2432. country_name: 'Senegal',
  2433. },
  2434. {
  2435. country_code: 'rs',
  2436. country_name: 'Serbia and Montenegro',
  2437. },
  2438. {
  2439. country_code: 'sc',
  2440. country_name: 'Seychelles',
  2441. },
  2442. {
  2443. country_code: 'sl',
  2444. country_name: 'Sierra Leone',
  2445. },
  2446. {
  2447. country_code: 'sg',
  2448. country_name: 'Singapore',
  2449. },
  2450. {
  2451. country_code: 'sk',
  2452. country_name: 'Slovakia',
  2453. },
  2454. {
  2455. country_code: 'si',
  2456. country_name: 'Slovenia',
  2457. },
  2458. {
  2459. country_code: 'sb',
  2460. country_name: 'Solomon Islands',
  2461. },
  2462. {
  2463. country_code: 'so',
  2464. country_name: 'Somalia',
  2465. },
  2466. {
  2467. country_code: 'za',
  2468. country_name: 'South Africa',
  2469. },
  2470. {
  2471. country_code: 'gs',
  2472. country_name: 'South Georgia and the South Sandwich Islands',
  2473. },
  2474. {
  2475. country_code: 'es',
  2476. country_name: 'Spain',
  2477. },
  2478. {
  2479. country_code: 'lk',
  2480. country_name: 'Sri Lanka',
  2481. },
  2482. {
  2483. country_code: 'sd',
  2484. country_name: 'Sudan',
  2485. },
  2486. {
  2487. country_code: 'sr',
  2488. country_name: 'Suriname',
  2489. },
  2490. {
  2491. country_code: 'sj',
  2492. country_name: 'Svalbard and Jan Mayen',
  2493. },
  2494. {
  2495. country_code: 'sz',
  2496. country_name: 'Swaziland',
  2497. },
  2498. {
  2499. country_code: 'se',
  2500. country_name: 'Sweden',
  2501. },
  2502. {
  2503. country_code: 'ch',
  2504. country_name: 'Switzerland',
  2505. },
  2506. {
  2507. country_code: 'sy',
  2508. country_name: 'Syrian Arab Republic',
  2509. },
  2510. {
  2511. country_code: 'tw',
  2512. country_name: 'Taiwan, Province of China',
  2513. },
  2514. {
  2515. country_code: 'tj',
  2516. country_name: 'Tajikistan',
  2517. },
  2518. {
  2519. country_code: 'tz',
  2520. country_name: 'Tanzania, United Republic of',
  2521. },
  2522. {
  2523. country_code: 'th',
  2524. country_name: 'Thailand',
  2525. },
  2526. {
  2527. country_code: 'tl',
  2528. country_name: 'Timor-Leste',
  2529. },
  2530. {
  2531. country_code: 'tg',
  2532. country_name: 'Togo',
  2533. },
  2534. {
  2535. country_code: 'tk',
  2536. country_name: 'Tokelau',
  2537. },
  2538. {
  2539. country_code: 'to',
  2540. country_name: 'Tonga',
  2541. },
  2542. {
  2543. country_code: 'tt',
  2544. country_name: 'Trinidad and Tobago',
  2545. },
  2546. {
  2547. country_code: 'tn',
  2548. country_name: 'Tunisia',
  2549. },
  2550. {
  2551. country_code: 'tr',
  2552. country_name: 'Turkiye',
  2553. },
  2554. {
  2555. country_code: 'tm',
  2556. country_name: 'Turkmenistan',
  2557. },
  2558. {
  2559. country_code: 'tc',
  2560. country_name: 'Turks and Caicos Islands',
  2561. },
  2562. {
  2563. country_code: 'tv',
  2564. country_name: 'Tuvalu',
  2565. },
  2566. {
  2567. country_code: 'ug',
  2568. country_name: 'Uganda',
  2569. },
  2570. {
  2571. country_code: 'ua',
  2572. country_name: 'Ukraine',
  2573. },
  2574. {
  2575. country_code: 'ae',
  2576. country_name: 'United Arab Emirates',
  2577. },
  2578. {
  2579. country_code: 'uk',
  2580. country_name: 'United Kingdom',
  2581. },
  2582. {
  2583. country_code: 'gb',
  2584. country_name: 'United Kingdom',
  2585. },
  2586. {
  2587. country_code: 'us',
  2588. country_name: 'United States',
  2589. },
  2590. {
  2591. country_code: 'um',
  2592. country_name: 'United States Minor Outlying Islands',
  2593. },
  2594. {
  2595. country_code: 'uy',
  2596. country_name: 'Uruguay',
  2597. },
  2598. {
  2599. country_code: 'uz',
  2600. country_name: 'Uzbekistan',
  2601. },
  2602. {
  2603. country_code: 'vu',
  2604. country_name: 'Vanuatu',
  2605. },
  2606. {
  2607. country_code: 've',
  2608. country_name: 'Venezuela',
  2609. },
  2610. {
  2611. country_code: 'vn',
  2612. country_name: 'Viet Nam',
  2613. },
  2614. {
  2615. country_code: 'vg',
  2616. country_name: 'Virgin Islands, British',
  2617. },
  2618. {
  2619. country_code: 'vi',
  2620. country_name: 'Virgin Islands, U.S.',
  2621. },
  2622. {
  2623. country_code: 'wf',
  2624. country_name: 'Wallis and Futuna',
  2625. },
  2626. {
  2627. country_code: 'eh',
  2628. country_name: 'Western Sahara',
  2629. },
  2630. {
  2631. country_code: 'ye',
  2632. country_name: 'Yemen',
  2633. },
  2634. {
  2635. country_code: 'zm',
  2636. country_name: 'Zambia',
  2637. },
  2638. {
  2639. country_code: 'zw',
  2640. country_name: 'Zimbabwe',
  2641. },
  2642. ].map((x) => ({ label: x.country_name, value: x.country_code }));
  2643. export const BingCountryOptions = [
  2644. { label: 'Argentina AR', value: 'AR' },
  2645. { label: 'Australia AU', value: 'AU' },
  2646. { label: 'Austria AT', value: 'AT' },
  2647. { label: 'Belgium BE', value: 'BE' },
  2648. { label: 'Brazil BR', value: 'BR' },
  2649. { label: 'Canada CA', value: 'CA' },
  2650. { label: 'Chile CL', value: 'CL' },
  2651. { label: 'Denmark DK', value: 'DK' },
  2652. { label: 'Finland FI', value: 'FI' },
  2653. { label: 'France FR', value: 'FR' },
  2654. { label: 'Germany DE', value: 'DE' },
  2655. { label: 'Hong Kong SAR HK', value: 'HK' },
  2656. { label: 'India IN', value: 'IN' },
  2657. { label: 'Indonesia ID', value: 'ID' },
  2658. { label: 'Italy IT', value: 'IT' },
  2659. { label: 'Japan JP', value: 'JP' },
  2660. { label: 'Korea KR', value: 'KR' },
  2661. { label: 'Malaysia MY', value: 'MY' },
  2662. { label: 'Mexico MX', value: 'MX' },
  2663. { label: 'Netherlands NL', value: 'NL' },
  2664. { label: 'New Zealand NZ', value: 'NZ' },
  2665. { label: 'Norway NO', value: 'NO' },
  2666. { label: "People's Republic of China CN", value: 'CN' },
  2667. { label: 'Poland PL', value: 'PL' },
  2668. { label: 'Portugal PT', value: 'PT' },
  2669. { label: 'Republic of the Philippines PH', value: 'PH' },
  2670. { label: 'Russia RU', value: 'RU' },
  2671. { label: 'Saudi Arabia SA', value: 'SA' },
  2672. { label: 'South Africa ZA', value: 'ZA' },
  2673. { label: 'Spain ES', value: 'ES' },
  2674. { label: 'Sweden SE', value: 'SE' },
  2675. { label: 'Switzerland CH', value: 'CH' },
  2676. { label: 'Taiwan TW', value: 'TW' },
  2677. { label: 'Türkiye TR', value: 'TR' },
  2678. { label: 'United Kingdom GB', value: 'GB' },
  2679. { label: 'United States US', value: 'US' },
  2680. ];
  2681. export const BingLanguageOptions = [
  2682. { label: 'Arabic ar', value: 'ar' },
  2683. { label: 'Basque eu', value: 'eu' },
  2684. { label: 'Bengali bn', value: 'bn' },
  2685. { label: 'Bulgarian bg', value: 'bg' },
  2686. { label: 'Catalan ca', value: 'ca' },
  2687. { label: 'Chinese (Simplified) zh-hans', value: 'ns' },
  2688. { label: 'Chinese (Traditional) zh-hant', value: 'nt' },
  2689. { label: 'Croatian hr', value: 'hr' },
  2690. { label: 'Czech cs', value: 'cs' },
  2691. { label: 'Danish da', value: 'da' },
  2692. { label: 'Dutch nl', value: 'nl' },
  2693. { label: 'English en', value: 'en' },
  2694. { label: 'English-United Kingdom en-gb', value: 'gb' },
  2695. { label: 'Estonian et', value: 'et' },
  2696. { label: 'Finnish fi', value: 'fi' },
  2697. { label: 'French fr', value: 'fr' },
  2698. { label: 'Galician gl', value: 'gl' },
  2699. { label: 'German de', value: 'de' },
  2700. { label: 'Gujarati gu', value: 'gu' },
  2701. { label: 'Hebrew he', value: 'he' },
  2702. { label: 'Hindi hi', value: 'hi' },
  2703. { label: 'Hungarian hu', value: 'hu' },
  2704. { label: 'Icelandic is', value: 'is' },
  2705. { label: 'Italian it', value: 'it' },
  2706. { label: 'Japanese jp', value: 'jp' },
  2707. { label: 'Kannada kn', value: 'kn' },
  2708. { label: 'Korean ko', value: 'ko' },
  2709. { label: 'Latvian lv', value: 'lv' },
  2710. { label: 'Lithuanian lt', value: 'lt' },
  2711. { label: 'Malay ms', value: 'ms' },
  2712. { label: 'Malayalam ml', value: 'ml' },
  2713. { label: 'Marathi mr', value: 'mr' },
  2714. { label: 'Norwegian (Bokmål) nb', value: 'nb' },
  2715. { label: 'Polish pl', value: 'pl' },
  2716. { label: 'Portuguese (Brazil) pt-br', value: 'br' },
  2717. { label: 'Portuguese (Portugal) pt-pt', value: 'pt' },
  2718. { label: 'Punjabi pa', value: 'pa' },
  2719. { label: 'Romanian ro', value: 'ro' },
  2720. { label: 'Russian ru', value: 'ru' },
  2721. { label: 'Serbian (Cyrylic) sr', value: 'sr' },
  2722. { label: 'Slovak sk', value: 'sk' },
  2723. { label: 'Slovenian sl', value: 'sl' },
  2724. { label: 'Spanish es', value: 'es' },
  2725. { label: 'Swedish sv', value: 'sv' },
  2726. { label: 'Tamil ta', value: 'ta' },
  2727. { label: 'Telugu te', value: 'te' },
  2728. { label: 'Thai th', value: 'th' },
  2729. { label: 'Turkish tr', value: 'tr' },
  2730. { label: 'Ukrainian uk', value: 'uk' },
  2731. { label: 'Vietnamese vi', value: 'vi' },
  2732. ];
  2733. export const DeepLSourceLangOptions = [
  2734. { label: 'Arabic [1]', value: 'AR' },
  2735. { label: 'Bulgarian', value: 'BG' },
  2736. { label: 'Czech', value: 'CS' },
  2737. { label: 'Danish', value: 'DA' },
  2738. { label: 'German', value: 'DE' },
  2739. { label: 'Greek', value: 'EL' },
  2740. { label: 'English', value: 'EN' },
  2741. { label: 'Spanish', value: 'ES' },
  2742. { label: 'Estonian', value: 'ET' },
  2743. { label: 'Finnish', value: 'FI' },
  2744. { label: 'French', value: 'FR' },
  2745. { label: 'Hungarian', value: 'HU' },
  2746. { label: 'Indonesian', value: 'ID' },
  2747. { label: 'Italian', value: 'IT' },
  2748. { label: 'Japanese', value: 'JA' },
  2749. { label: 'Korean', value: 'KO' },
  2750. { label: 'Lithuanian', value: 'LT' },
  2751. { label: 'Latvian', value: 'LV' },
  2752. { label: 'Norwegian Bokmål', value: 'NB' },
  2753. { label: 'Dutch', value: 'NL' },
  2754. { label: 'Polish', value: 'PL' },
  2755. { label: 'Portuguese (all Portuguese varieties mixed)', value: 'PT' },
  2756. { label: 'Romanian', value: 'RO' },
  2757. { label: 'Russian', value: 'RU' },
  2758. { label: 'Slovak', value: 'SK' },
  2759. { label: 'Slovenian', value: 'SL' },
  2760. { label: 'Swedish', value: 'SV' },
  2761. { label: 'Turkish', value: 'TR' },
  2762. { label: 'Ukrainian', value: 'UK' },
  2763. { label: 'Chinese', value: 'ZH' },
  2764. ];
  2765. export const DeepLTargetLangOptions = [
  2766. { label: 'Arabic [1]', value: 'AR' },
  2767. { label: 'Bulgarian', value: 'BG' },
  2768. { label: 'Czech', value: 'CS' },
  2769. { label: 'Danish', value: 'DA' },
  2770. { label: 'German', value: 'DE' },
  2771. { label: 'Greek', value: 'EL' },
  2772. { label: 'English (British)', value: 'EN-GB' },
  2773. { label: 'English (American)', value: 'EN-US' },
  2774. { label: 'Spanish', value: 'ES' },
  2775. { label: 'Estonian', value: 'ET' },
  2776. { label: 'Finnish', value: 'FI' },
  2777. { label: 'French', value: 'FR' },
  2778. { label: 'Hungarian', value: 'HU' },
  2779. { label: 'Indonesian', value: 'ID' },
  2780. { label: 'Italian', value: 'IT' },
  2781. { label: 'Japanese', value: 'JA' },
  2782. { label: 'Korean', value: 'KO' },
  2783. { label: 'Lithuanian', value: 'LT' },
  2784. { label: 'Latvian', value: 'LV' },
  2785. { label: 'Norwegian Bokmål', value: 'NB' },
  2786. { label: 'Dutch', value: 'NL' },
  2787. { label: 'Polish', value: 'PL' },
  2788. { label: 'Portuguese (Brazilian)', value: 'PT-BR' },
  2789. {
  2790. label:
  2791. 'Portuguese (all Portuguese varieties excluding Brazilian Portuguese)',
  2792. value: 'PT-PT',
  2793. },
  2794. { label: 'Romanian', value: 'RO' },
  2795. { label: 'Russian', value: 'RU' },
  2796. { label: 'Slovak', value: 'SK' },
  2797. { label: 'Slovenian', value: 'SL' },
  2798. { label: 'Swedish', value: 'SV' },
  2799. { label: 'Turkish', value: 'TR' },
  2800. { label: 'Ukrainian', value: 'UK' },
  2801. { label: 'Chinese (simplified)', value: 'ZH' },
  2802. ];
  2803. export const BaiduFanyiDomainOptions = [
  2804. 'it',
  2805. 'finance',
  2806. 'machinery',
  2807. 'senimed',
  2808. 'novel',
  2809. 'academic',
  2810. 'aerospace',
  2811. 'wiki',
  2812. 'news',
  2813. 'law',
  2814. 'contract',
  2815. ];
  2816. export const BaiduFanyiSourceLangOptions = [
  2817. 'auto',
  2818. 'zh',
  2819. 'en',
  2820. 'yue',
  2821. 'wyw',
  2822. 'jp',
  2823. 'kor',
  2824. 'fra',
  2825. 'spa',
  2826. 'th',
  2827. 'ara',
  2828. 'ru',
  2829. 'pt',
  2830. 'de',
  2831. 'it',
  2832. 'el',
  2833. 'nl',
  2834. 'pl',
  2835. 'bul',
  2836. 'est',
  2837. 'dan',
  2838. 'fin',
  2839. 'cs',
  2840. 'rom',
  2841. 'slo',
  2842. 'swe',
  2843. 'hu',
  2844. 'cht',
  2845. 'vie',
  2846. ];
  2847. export const QWeatherLangOptions = [
  2848. 'zh',
  2849. 'zh-hant',
  2850. 'en',
  2851. 'de',
  2852. 'es',
  2853. 'fr',
  2854. 'it',
  2855. 'ja',
  2856. 'ko',
  2857. 'ru',
  2858. 'hi',
  2859. 'th',
  2860. 'ar',
  2861. 'pt',
  2862. 'bn',
  2863. 'ms',
  2864. 'nl',
  2865. 'el',
  2866. 'la',
  2867. 'sv',
  2868. 'id',
  2869. 'pl',
  2870. 'tr',
  2871. 'cs',
  2872. 'et',
  2873. 'vi',
  2874. 'fil',
  2875. 'fi',
  2876. 'he',
  2877. 'is',
  2878. 'nb',
  2879. ];
  2880. export const QWeatherTypeOptions = ['weather', 'indices', 'airquality'];
  2881. export const QWeatherUserTypeOptions = ['free', 'paid'];
  2882. export const QWeatherTimePeriodOptions = [
  2883. 'now',
  2884. '3d',
  2885. '7d',
  2886. '10d',
  2887. '15d',
  2888. '30d',
  2889. ];
  2890. export const ExeSQLOptions = ['mysql', 'postgresql', 'mariadb', 'mssql'].map(
  2891. (x) => ({
  2892. label: upperFirst(x),
  2893. value: x,
  2894. }),
  2895. );
  2896. export const SwitchElseTo = 'end_cpn_id';
  2897. export const SwitchOperatorOptions = [
  2898. { value: '=', label: 'equal' },
  2899. { value: '≠', label: 'notEqual' },
  2900. { value: '>', label: 'gt' },
  2901. { value: '≥', label: 'ge' },
  2902. { value: '<', label: 'lt' },
  2903. { value: '≤', label: 'le' },
  2904. { value: 'contains', label: 'contains' },
  2905. { value: 'not contains', label: 'notContains' },
  2906. { value: 'start with', label: 'startWith' },
  2907. { value: 'end with', label: 'endWith' },
  2908. { value: 'empty', label: 'empty' },
  2909. { value: 'not empty', label: 'notEmpty' },
  2910. ];
  2911. export const SwitchLogicOperatorOptions = ['and', 'or'];
  2912. export const WenCaiQueryTypeOptions = [
  2913. 'stock',
  2914. 'zhishu',
  2915. 'fund',
  2916. 'hkstock',
  2917. 'usstock',
  2918. 'threeboard',
  2919. 'conbond',
  2920. 'insurance',
  2921. 'futures',
  2922. 'lccp',
  2923. 'foreign_exchange',
  2924. ];
  2925. export const Jin10TypeOptions = ['flash', 'calendar', 'symbols', 'news'];
  2926. export const Jin10FlashTypeOptions = new Array(5)
  2927. .fill(1)
  2928. .map((x, idx) => (idx + 1).toString());
  2929. export const Jin10CalendarTypeOptions = ['cj', 'qh', 'hk', 'us'];
  2930. export const Jin10CalendarDatashapeOptions = ['data', 'event', 'holiday'];
  2931. export const Jin10SymbolsTypeOptions = ['GOODS', 'FOREX', 'FUTURE', 'CRYPTO'];
  2932. export const Jin10SymbolsDatatypeOptions = ['symbols', 'quotes'];
  2933. export const TuShareSrcOptions = [
  2934. 'sina',
  2935. 'wallstreetcn',
  2936. '10jqka',
  2937. 'eastmoney',
  2938. 'yuncaijing',
  2939. 'fenghuang',
  2940. 'jinrongjie',
  2941. ];
  2942. export const CrawlerResultOptions = ['markdown', 'html', 'content'];
  2943. export enum BeginQueryType {
  2944. Line = 'line',
  2945. Paragraph = 'paragraph',
  2946. Options = 'options',
  2947. File = 'file',
  2948. Integer = 'integer',
  2949. Boolean = 'boolean',
  2950. }
  2951. export const BeginQueryTypeIconMap = {
  2952. [BeginQueryType.Line]: TextCursorInput,
  2953. [BeginQueryType.Paragraph]: WrapText,
  2954. [BeginQueryType.Options]: OptionIcon,
  2955. [BeginQueryType.File]: CloudUpload,
  2956. [BeginQueryType.Integer]: ListOrdered,
  2957. [BeginQueryType.Boolean]: ToggleLeft,
  2958. };
  2959. export const NoDebugOperatorsList = [
  2960. Operator.Begin,
  2961. Operator.Answer,
  2962. Operator.Concentrator,
  2963. Operator.Template,
  2964. Operator.Message,
  2965. Operator.RewriteQuestion,
  2966. Operator.Switch,
  2967. Operator.Iteration,
  2968. ];