PageSourceSearch

https://hix.ai/cdn/_next/static/chunks/2c57eg7smz7um.js?dpl=65ade358b108af034ae1b7d194e8c92a1336644c

js hix.ai collected 2026-09-24 09:19:56 UTC 27,148 bytes, 1 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,435688,t=>{"use strict";var e=t.i(85982),i=t.i(126745);function a(t,n="en"){let r="en"!==n?`/${n}`:"";if(/^(mailto:|tel:|sms:|data:|javascript:|ftp:|#)/.test(t))return t;if(t.startsWith("http")){let a=new URL(t),o=a.pathname||"",s=a.search||"",l=a.host,c=a.origin;return/((([a-z]+).)?)hix.ai/.test(l)&&!(0,e.getFilterLocale)(o,n)?`${i.urlByHostKeyMap[`${l}`]||c}${r}${"/"===o?"":o}${s}`:t}return`${r}${"/"===t&&"en"!==n?"":t}`}t.s(["editToolsUrl",0,function(t,e){return e.startsWith("http")?e:t.startsWith("/ai-writer")?`/ai-writer${e}`:t.startsWith("/ai-essay-writer")?`/ai-essay-writer/${e.replace("/tools/","")}`:t.startsWith("/ai-article-writer")?`/ai-article-writer/${e}`:e},"getHubUrl",0,function(t,e){return"resource.hix.ai"===e?"/hub"===t?"/":t.replace("/hub/","/"):t},"getResourceUrl",0,function(t,e="en"){return["/hub/messages","/hub/quotes","/hub/personal-bio","/hub/love-letter","/messages/","/quotes/","/personal-bio/","/love-letter/","/instagram-captions"].find(e=>t.startsWith(e))?`${i.resourceHixAIUrl}${"/hub"===t?"/":t.replace("/hub","")}`:t.split("/").length>3?i.hixAIUrl+("en"===e?"":`/${e}`)+t:("en"===e?"":`/${e}`)+t},"replaceSiteUrl",0,function(t,e,i=!1){let n=/href=(["'])([^"' ]+)(["'])/g;return i?a(t,e):(n.test(t)&&(t=t.replace(n,(t,i,n)=>{let r=a(n,e);return`href=${i}${r}${i}`})),t)}])},81795,t=>{"use strict";var e=t.i(166101),i=t.i(473406),a=t.i(435688),n=t.i(659638),r=t.i(742818),o=t.i(616405);let s=(0,n.memo)((0,n.forwardRef)(function({className:t,onClick:s,href:l,...c},u){let h=(0,i.useLocale)(),d=(0,n.useMemo)(()=>{let t=String(l);return t.startsWith("http")||t.startsWith("https")},[l]),p=(0,n.useMemo)(()=>d?(0,a.replaceSiteUrl)(String(l),h,!0):l,[l,h,d]);return(0,e.jsx)(r.default,{ref:u,href:p,className:o.tw`text-f-text hover:text-f-text ${t}`,onClick:t=>{s?.(t,h)},...!d?{locale:h}:{},...c})}));t.s(["default",0,s])},452313,252209,108013,347674,t=>{"use strict";var e=t.i(527862);t.s(["AGENT_TASK_STATUS_KEY",0,"agent-task-status-map","DEFAULT_REFETCH_INTERVAL_MS",0,1e4,"MAX_REFETCH_TIME",0,18e5],252209);let i=(0,e.createNanoEvents)();t.s(["agentTaskPollingEventBus",0,i,"checkIsPollingEnabled",0,function(t){var e;return!!t&&!(Number.isNaN(Number(e=t.createdAt))||!e||Date.now()-e>18e5)}],452313);var a=t.i(690740);let n=function(t,e){var i;if("function"!=typeof e)throw TypeError("Expected a function");return t=(0,a.default)(t),function(){return--t>0&&(i=e.apply(this,arguments)),t<=1&&(e=void 0),i}};var r=t.i(811169);t.i(826063);var o=t.i(486023);let s={"AI Image":"AI Image","AI Video":"AI Video","Image Models":"Image Models","Video Models":"Video Models","AI Chat":"AI Chat","Deep Research":"Deep Research","AI Writer":"AI Writer","AI Slides":"AI Slides",general_agent:"General Agent","Scheduled Task":"Scheduled Task","Business Report":"Business Report","Data Analysis":"Data Analysis","Social Media Post":"Social Media Post","Poster Design":"Poster Design","Industry Research":"Industry Research","Story to Video":"Story to Video"};function l(t){var e;return t.isLegacySlidesBot?"AI Slides":((e=t.trackType)?s[e]:void 0)??t.fallback}t.s(["resolveAgentChatPaidFeaturesLocation",0,l],108013),t.s(["createChatRequestTracker",0,function({chatId:t,modelNames:e,searchType:i}){return n(2,()=>{r.trackEmitter.emit("track-event",{name:"chat",id:t,type:e.length>1?"multi_modle":"single_modle",status:0,model:e[0]??"",value:e.length,meta:{},field1:"internet"===i?"yes":"no",field2:JSON.stringify(e)})})},"resolveChatRequestPaymentLocation",0,function({agentType:t,botId:e,modelCount:i}){return!t&&i>1?"aichat_multi_model":l({trackType:(0,o.normalizeOperationType)(t),fallback:"AI Chat",isLegacySlidesBot:74===e})},"resolveChatTrackModelNames",0,function(t,e){return t.map(t=>null==t?"":e.find(e=>e?.id===t)?.name??"")}],347674)},430931,t=>{"use strict";t.s(["ChatContainerIds",0,{Layout:"chat-layout-container"},"ChatContainerKeys",0,{HixChat:"hix-chat-container"},"HOME_ENTRY_SECONDARY_SLOT_HEIGHT",0,"min-h-[228px]","INDEX_ENTRY_SCENE_INPUT_POSITION",0,"absolute left-0 top-full w-full !mt-[30px]","SCENE_INPUT_SLOT_HEIGHT",0,{DEFAULT:"min-h-[100px]",WITH_SECONDARY_CONTENT:"min-h-[196px]"},"STICKY_HEIGHT",0,{HEADER:48,SEGMENTED:41}])},11846,t=>{"use strict";t.i(17335);var e=t.i(508861),i=t.i(588775);t.s(["useIsFrontContainer",0,function(){let{containerType:t}=(0,e.useChatContainerContext)(t=>({containerType:t.containerType}));return[i.EChatContainerType.MODEL_ENTRY,i.EChatContainerType.BOT_ENTRY,i.EChatContainerType.INDEX_ENTRY,i.EChatContainerType.CMS,i.EChatContainerType.TEMPLATE].includes(t)}])},950839,660183,t=>{"use strict";var e=t.i(659638),i=t.i(22451),a=t.i(243837),n=t.i(473406),r=t.i(443723),o=t.i(864894);function s(){let t=(0,n.useLocale)();return(0,e.useCallback)((e,i=!1)=>{let a="string"==typeof e?e:(0,o.routeObjectToPath)(e),n=(0,r.getI18nRoutePath)(a,t);i?window.history.replaceState({},"",n):window.history.pushState({},"",n)},[t])}t.s(["useNoRefreshUpdateUrl",0,s],660183),t.i(17335);var l=t.i(508861);t.s(["useNoRefreshUpdateChatByUrl",0,function(){let t=s(),r=(0,n.useRouter)(),c=(0,l.useChatContainerContext)(t=>!!(t.pageData||t.longText));return(0,e.useCallback)(async(e,n=!1)=>{let{replace:s=!1,chatType:l,agentMode:u,memo:h=!0}="object"==typeof n?n:{replace:n},d="string"==typeof e?e:(0,o.routeObjectToPath)(e),p=(0,o.getAsPath)();if(h&&p===d)return;let m=(0,o.getChatIdByHomePage)(p),f=(0,o.getProjectIdByProjectPage)(p),g=!1;if(m?g=m!==(0,o.getChatIdByHomePage)(d):f&&(g=f!==(0,o.getProjectIdByProjectPage)(d)),g&&i.chatEventBus.emit("resetChatForm",!0),c){let t=s?r.replace:r.push;await t(d,void 0,{shallow:!1})}else t(d,s);a.chatContainerEventBus.emit("updateChatByUrl",d,l,u)},[t,c,r])}],950839)},90041,t=>{"use strict";var e=t.i(517617),i=t.i(640931),a=t.i(611056),n=t.i(122633),r=t.i(729888),o=t.i(588775);t.i(17335);var s=t.i(508861),l=t.i(556303),c=t.i(659638);let u=(0,a.createUseBroadcastChannel)(e.SYNC_MODEL_BROADCAST_CHANNEL);
1function h(){let{set:t}=(0,r.useChatStore)(t=>({set:t.getSetFunction()}));return{set:t,setStorage:(0,c.useCallback)((t,e)=>{let i=(0,l.getLocalModelMap)();i[t]=e,localStorage.setItem(n.HIX_CHAT_KEYS.MODEL_MAP,JSON.stringify(i))},[])}}function d(){let{setStorage:t}=h(),{postMessage:a}=(0,i.useBroadcastChannel)(e.SYNC_MODEL_BROADCAST_CHANNEL);return{handleUpdateMediaModelUrl:(0,c.useCallback)((e,i)=>{let a=r.chatStoreInstance?.getState();if(!a)return;let n=a.modelListMap[e];n?.find(t=>t.modelName===i)&&t(e,i)},[t]),postMessage:a,setStorage:t}}t.s(["useListenMediaModelUrlUpdate",0,function(){let{handleUpdateMediaModelUrl:t}=d(),e=(0,s.useChatContainerContextStore)();u(({data:i})=>{if(!i)return;let[a,n]=i;e?.getState().containerType!==o.EChatContainerType.CHAT_LIST&&[o.EChatInputType.AI_IMAGE,o.EChatInputType.AI_VIDEO].includes(a)&&t(a,n)})},"useUpdateBotUrl",0,function(){let{set:t,setStorage:e}=h();return{handleUpdateBotUrl:(0,c.useCallback)(i=>{let a=r.chatStoreInstance?.getState();if(!a)return;let n=a.modelListMap[o.EChatInputType.AI_CHAT];n?.length&&i&&t(t=>{let a=n.find(t=>t.url===i);a&&(t.bot=a,t.modelInfoMap[o.EChatInputType.AI_CHAT]={name:a?.name,icon_class_name:a?.icon_class_name,icon_url:a?.icon_url,type:a?.type,url:i},e(o.EChatInputType.AI_CHAT,i))})},[t,e])}},"useUpdateMediaModelUrl",0,d])},243837,t=>{"use strict";let e=(0,t.i(527862).createNanoEvents)();t.s(["chatContainerEventBus",0,e])},473430,147841,t=>{"use strict";class e{static instance;editors=new Map;static getInstance(){return e.instance||(e.instance=new e),e.instance}getEditor(t){return this.editors.get(t)}setEditorRef(t,e){this.editors.set(t,e)}destroy(t){t?this.editors.delete(t):this.editors.clear()}focus(t,e){let{immediate:i=!1,delay:a=0,...n}=e||{},r=()=>{this.editors.get(t)?.slateEditorRef.current?.focus(n)};i?r():setTimeout(r,a)}selectSerializedRange(t,e,i={}){let a=()=>{this.editors.get(t)?.slateEditorRef.current?.selectSerializedRange(e)};i.delay?setTimeout(a,i.delay):requestAnimationFrame(a)}getAllEditors(){return Array.from(this.editors.entries()).map(([t,e])=>({key:t,editor:e}))}hasEditor(t){return this.editors.has(t)}}let i=e.getInstance();t.s(["chatFormEditorMedia",0,i],147841),t.s([],473430)},554690,t=>{"use strict";var e=t.i(335390),i=t.i(279023),a=t.i(325528);function n(t){let e=t||"",i=e.indexOf("?"),a=e.indexOf("#"),n=-1;return i>=0&&a>=0?n=Math.min(i,a):i>=0?n=i:a>=0&&(n=a),n>=0?e.slice(0,n):e}function r(t){let e=n(t).replaceAll("\\","/"),i=e.split("/").filter(Boolean);return i[i.length-1]||e}function o(t){let i=r(t);if(!i)return"application/octet-stream";let a=i.split(".").pop()?.toLowerCase();return a?(0,e.match)(a).with("jpg",()=>"image/jpeg").with("jpeg",()=>"image/jpeg").with("png",()=>"image/png").with("gif",()=>"image/gif").with("bmp",()=>"image/bmp").with("webp",()=>"image/webp").with("heic",()=>"image/heic").with("heif",()=>"image/heif").with("svg",()=>"image/svg+xml").with("tiff",()=>"image/tiff").with("ico",()=>"image/x-icon").with("pdf",()=>"application/pdf").with("doc",()=>"application/msword").with("docx",()=>"application/vnd.openxmlformats-officedocument.wordprocessingml.document").with("xls",()=>"application/vnd.ms-excel").with("xlsx",()=>"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet").with("ppt",()=>"application/vnd.ms-powerpoint").with("pptx",()=>"application/vnd.openxmlformats-officedocument.presentationml.presentation").with("mp4",()=>"video/mp4").with("avi",()=>"video/x-msvideo").with("mov",()=>"video/quicktime").with("wmv",()=>"video/x-ms-wmv").with("flv",()=>"video/x-flv").with("webm",()=>"video/webm").with("mpg",()=>"video/mpeg").with("3gp",()=>"video/3gpp").with("mkv",()=>"video/x-matroska").with("m4v",()=>"video/x-m4v").with("mp3",()=>"audio/mpeg").with("wav",()=>"audio/wav").with("flac",()=>"audio/flac").with("aac",()=>"audio/aac").with("ogg",()=>"audio/ogg").with("m4a",()=>"audio/mp4").with("wma",()=>"audio/x-ms-wma").with("zip",()=>"application/zip").with("rar",()=>"application/x-rar-compressed").with("7z",()=>"application/x-7z-compressed").with("tar",()=>"application/x-tar").with("gz",()=>"application/gzip").with("txt",()=>"text/plain").with("md",()=>"text/markdown").with("rtf",()=>"application/rtf").with("csv",()=>"text/csv").with("tsv",()=>"text/tab-separated-values").with(e.P.union("html","htm"),()=>"text/html").with("css",()=>"text/css").with("js",()=>"text/javascript").with("json",()=>"application/json").with("xml",()=>"application/xml").with("yaml",()=>"application/x-yaml").with("yml",()=>"application/x-yaml").with(e.P.union("ts","tsx","jsx","py","java","cpp","c","h","php","rb","go","rs","swift","kt","scala","sh","sql","scss","less"),()=>"text/plain").otherwise(()=>"application/octet-stream"):"application/octet-stream"}let s="i-cus--pdf-02",l="i-com--image-solid text-[#FF8D24]",c="i-cus--docx-02",u="i-cus--xlsx",h="i-cus--js",d="i-cus--md-01",p=[".mp4",".mov",".webm",".mpg",".flv",".wmv",".3gp"],m=[".jpg",".jpeg",".png",".gif",".bmp",".webp",".heic",".heif",".svg",".tiff",".ico"],f=[".mp3",".wav",".m4a",".flac",".ogg"];function g(t,e){let i=r(t).toLowerCase();return e.some(t=>i.endsWith(t))}t.s(["getFileIcon",0,function(t){let i=r(t);if(!i)return h;let a=i.split(".").pop()?.toLowerCase();return(0,e.match)(a).with("pdf",()=>s).with(e.P.union("ppt","pptx"),()=>"i-cus--ppt").with(e.P.union("xls","xlsx","csv","tsv"),()=>u).with(e.P.union("doc","docx"),()=>c).with(e.P.union("md","markdown"),()=>d).with(e.P.union("txt","rtf"),()=>"i-cus--txt-02").with(e.P.union("jpg","jpeg","png","gif","bmp","webp","svg","tiff","ico"),()=>l).with(e.P.union("code","py","js","ts","java","html","css","json","htm","sh","bash","zsh"),()=>h).with(e.P.union("zip","rar","7z","tar","gz","tgz"),()=>"i-cus--hix2-zip-02").with(e.P.union("mp3","wav","m4a","flac","ogg"),()=>"i-cus--music-02").with(e.P.union("mp4","mov","webm","mpg","flv","
1wmv","3gp"),()=>"i-cus--hix-video02").with("image",()=>l).otherwise(()=>"i-cus--file")},"getFileItem",0,function(t){let e=t?.url||"";(0,a.devLog)("rawUrl=====>",e);let s=r(t?.name||e)||e;return{name:s,url:e?n(e):"",size:t.size??0,uid:(0,i.v4)(),type:o(s),lastModified:0,uploadStatus:"success",frame:t?.frame||1}},"getFileMeta",0,function(t){return(0,e.match)(t).with("pdf",()=>({icon:s,suffix:"pdf"})).with(e.P.union("doc","docx"),()=>({icon:c,suffix:"docx"})).with(e.P.union("md","markdown"),()=>({icon:d,suffix:"md"})).with(e.P.union("csv","excel"),()=>({icon:u,suffix:"xlsx"})).with(e.P.union("html"),()=>({icon:h,suffix:"html"})).with(e.P.union("react"),()=>({icon:h,suffix:"tsx"})).with("image",()=>({icon:l,suffix:"image"})).otherwise(()=>({icon:c,suffix:"file"}))},"getStandardFileType",0,o,"isAudioFile",0,function(t){return t?.type?.startsWith("audio/")||g(t?.name||"",f)},"isImageFile",0,function(t){return t?.type?.startsWith("image/")||g(t?.name||"",m)},"isSlidesTemplateFile",0,function(t){return!!t?.slidesTemplate},"isVideoFile",0,function(t){return t?.type?.startsWith("video/")||g(t?.name||"",p)},"resolveBasename",0,r])},236706,t=>{"use strict";t.i(243046);var e=t.i(939189),i=t.i(881598),a=t.i(588775),n=t.i(115130),r=t.i(362420),o=t.i(162709);let s=a.EChatInputType.GENERIC,l="pending";function c(t){return t===e.EGeneralSubType.SCHEDULED?null:t??null}function u(t){return(0,o.getSkillFunctionValueFromEntryProfile)(t)}function h(t){return(0,n.getChatInfoFromAgentType)(i.EAgentType.GENERAL_AGENT,t?{entryProfile:t}:void 0).chatType}function d(t){let e=u(t);return e?[e]:(0,r.getDefaultShowcaseFilter)(h(t))}t.s(["GENERAL_AGENT_ENTRY_AGENT_MODE",0,l,"GENERAL_AGENT_ENTRY_CHAT_TYPE",0,s,"GENERAL_AGENT_ENTRY_QUERY_KEY",0,"generalAgentEntry","GENERAL_AGENT_ENTRY_QUERY_VALUE_SCHEDULED_TASK",0,"scheduled_task","clearGeneralAgentEntryState",0,function(t){t.generalAgentEntryProfile=null,t.selectedSkillFunctionValue=null,t.showcaseFilter=(0,r.getDefaultShowcaseFilter)(s)},"getGeneralAgentEntryShowcaseFilter",0,d,"isScheduledTaskEntryProfile",0,function(t){return t===e.EGeneralSubType.SCHEDULED_TASK},"resolveGeneralAgentHistoryEntryState",0,function(t){let{functionAreaList:e,historyMeta:i}=t,a=c(i?.entry_profile),n=(0,o.findSkillFunctionByWorkScene)(e,i?.work_scene);return{entryProfile:n?(0,o.getSkillFunctionEntryProfile)(n)??null:a,skillFunctionValue:(0,o.getSkillFunctionConversationType)(n)??u(a)}},"resolveGeneralAgentInputEntryProfile",0,c,"setGeneralAgentEntryState",0,function(t,e){let i=(0,o.isSkillFunctionValue)(e)?(0,o.getSkillFunctionEntryProfile)(e)??null:e;t.chatType=h(i),t.agentMode=l,t.generalAgentEntryProfile=i,t.selectedSkillFunctionValue=u(i),t.showcaseFilter=d(i)}])},867567,t=>{"use strict";var e=t.i(110258);t.i(697036);var i=t.i(781025),a=t.i(321089),n=t.i(1916),r=t.i(756305),o=t.i(588775),s=t.i(950839),l=t.i(90041),c=t.i(16865);t.i(473430);var u=t.i(147841),h=t.i(758304),d=t.i(22451),p=t.i(729888);t.i(17335);var m=t.i(508861),f=t.i(11846),g=t.i(236706),C=t.i(547123);t.s(["useCreateNewHIXChat",0,function(){let{set:t}=(0,p.useChatStore)(t=>({set:t.getSetFunction()})),{reset:I}=(0,i.useAgentActions)(),y=(0,s.useNoRefreshUpdateChatByUrl)(),{setChatContainerContext:T,updateContext:_}=(0,m.useChatContainerContext)(t=>({setChatContainerContext:t.getSetFunction(),updateContext:t.updateContext})),{handleUpdateBotUrl:E}=(0,l.useUpdateBotUrl)(),{stopChat:w}=(0,C.default)(),v=(0,f.useIsFrontContainer)();return{createChat:(0,e.useMemoizedFn)(e=>{let{needUpdateBotUrl:i=!0,question:s="",botUrl:l="",chatType:m,shouldFocus:f=!0}=e||{},C=p.chatStoreInstance.getState(),A=m||o.EChatInputType.GENERIC;if(w(),t(t=>{t.chatDetail=null,t.sessionListMap.chat=[]}),d.chatEventBus.emit("resetChatForm",!0,s),f&&u.chatFormEditorMedia.focus(c.HIX_CHAT_FORM_MEDIA_KEYS.NORMAL),i){let e=C.modelListMap[o.EChatInputType.AI_CHAT],i=l?e.find(t=>t.url===l):void 0;if(l)E(l),i&&(0,h.writeChatSelectedBots)(t,[i]);else{let{ids:i,primary:a}=(0,h.resolvePersistedChatBots)(e);a?.url&&E(a.url),i.length>0&&t(t=>{t.selectedBotIds=i})}}I(),(0,a.flushSync)(r.closeFilePreview),y(n.URLS.HIXChat.home,{replace:!v,chatType:A}),T(t=>{(0,g.clearGeneralAgentEntryState)(t)}),_("chatType",A)})}}])},547123,104873,109519,t=>{"use strict";var e=t.i(238118),i=t.i(110258),a=t.i(584526),n=t.i(811169),r=t.i(131347),o=t.i(1916),s=t.i(881598);t.i(826063);var l=t.i(486023),c=t.i(729888);t.i(473430);var u=t.i(147841),h=t.i(16865),d=t.i(918234),p=t.i(12195),m=t.i(891591),f=t.i(864894),g=t.i(950839),C=t.i(554690);t.i(17335);var I=t.i(508861),y=t.i(430931),T=t.i(588775),_=t.i(662154),E=t.i(315058),w=t.i(52065);let v=!1;function A(){return!w.IS_PROD&&v}
1t.s(["isAiChatForceCompressionEnabled",0,A,"setAiChatForceCompressionEnabled",0,function(t){v=t}],104873);var S=t.i(452313);function b(t){let{chats:e,chat:i}=t;if(e?.length)return e;if(i)return[i];let{bot:a,data:n,chatInfo:r}=t;return[{bot:a,data:n,chatInfo:{...r,parent_id:r.parent_id??null,chat_order:r.chat_order??null}}]}function x(t,e){return{bot:e.find(e=>e.id===t.bot_id)??null,data:[],chatInfo:{id:t.id,user_id:t.user_id,created_date:t.created_date,agent_type:t.agent_type,title:t.title,bot_id:t.bot_id,extra_data:t.extra_data,project_id:t.project_id,parent_id:t.parent_id,chat_order:t.chat_order??null}}}function F(t){var e,i,a,n,r;let o=t.existingShareBranches??[];if(o.length>0){let e;return a=o,n=t.created,r=t.modelList,e=new Map(a.flatMap(t=>"number"==typeof t.bot?.id?[[t.bot.id,t]]:[])),n.map(t=>{var i,a;let n=x(t,r),o=null==t.bot_id?void 0:e.get(t.bot_id);return o?{...n,data:(i=o.data,a=t.id,i.map(t=>({...t,chat_id:a,answers:t.answers.map(t=>({...t,chat_id:a})),files:t.files?.map(t=>({...t,chat_id:a}))})))}:n})}return e=t.created,i=t.modelList,e.map(t=>x(t,i))}t.s(["collectChatDetailBranchBotIds",0,function(t){return(t??[]).flatMap(t=>"number"==typeof t.bot?.id?[t.bot.id]:[])},"getChatDetailBranchActiveRunId",0,function(t){if(!("activeRun"in t)||null==t.activeRun)return;let e=t.activeRun;if("object"==typeof e&&"runId"in e&&"string"==typeof e.runId)return e.runId},"getChatDetailBranches",0,b,"isMultiColumnChatList",0,function(t){return(t?.length??0)>1},"resolveCreatedChatBranches",0,F],109519);var L=t.i(347674),M=t.i(74751),N=t.i(718451);t.s(["default",0,function(){let{i18n:t,_:w}=(0,a.useLingui)(),v=N.api.useUtils(),{chatId:x,chatType:P}=(0,I.useChatContainerContext)(t=>({chatId:t.chatId??null,chatType:t.chatType})),{updateState:R,fetchChat:D,unshiftOrMoveHistoryToTop:k,abortChatFetch:H,setSessionList:B,set:U}=(0,c.useChatStore)(t=>({updateState:t.updateState,fetchChat:t.fetchChat,unshiftOrMoveHistoryToTop:t.unshiftOrMoveHistoryToTop,abortChatFetch:t.abortChatFetch,setSessionList:t.setSessionList,set:t.getSetFunction()})),{mutateAsync:O}=N.api.hixChat.createChat.useMutation(),j=(0,g.useNoRefreshUpdateChatByUrl)(),G=(0,i.useMemoizedFn)(()=>{U(t=>{t.isChatLoading=!1,t.isPrepareWait=!1,t.isGenerating=!1})}),W=(0,i.useMemoizedFn)(()=>{H(),G()}),z=(0,i.useMemoizedFn)((e,i,a)=>{if(e)return e;if(a)return t._({id:"CIdew5",values:{similarTitle:a}});let n=i?.[0];return n?t._({id:"b4oLIQ",values:{0:n.name}}):""}),q=(0,i.useMemoizedFn)(async({reference:t,...e},{chatFileList:i,historyTitle:a,onFirstEvent:r,onFinally:o,historyChatId:s,onChatRequestAccepted:l,...d}={})=>{let p=c.chatStoreInstance.getState().bot,f=P===T.EChatInputType.AI_CHAT,g=s??e.chatId;n.trackEmitter.emit("track-event",{name:"use_tool",id:g,method:"HIX2 chat",field1:"Website",field2:"Send",model:p?.name||""}),R("isChatLoading",!0);let C=i?.map(t=>t.url).filter(Boolean);await D({...e,fileUrls:C,...P===T.EChatInputType.AI_CHAT&&A()?{forceCompression:!0}:{}},{...d,...f?{url:E.HIX_CHAT_API.AI_CHAT,onReplayUnavailable:()=>v.hixChat.getChatDetail.invalidate({chatId:e.chatId})}:{},onFirstEvent:()=>{l?.(),f||r?.();let n=c.chatStoreInstance.getState(),o=(0,m.resolveHistoryItemForTopPlacement)({threadId:g,chatId:x,historyList:n.historyList,chatDetail:n.chatDetail,chatInfo:n.chatInfoByGetChatDetail,fallbackHistoryItem:{bot:p,id:g,title:z(e.question,i,t?.name),user_id:"",created_date:new Date,bot_id:p?.id||null,agent_type:e.agentType||null,extra_data:e.extraData||null}});k(a?{...o,title:a}:o)},onFinally:()=>{0===c.chatStoreInstance.getState().inFlightChatFetchCount&&(R("isChatLoading",!1),u.chatFormEditorMedia.focus(h.HIX_CHAT_FORM_MEDIA_KEYS.NORMAL)),o?.()}})}),{setAgentChatTrackStorage:Y}=(0,M.useStorageTrackAgentChat)(),$=(0,i.useMemoizedFn)(async(t,{onFirstEvent:e,onBeforeFetch:i,onFinally:a,onChatRequestAccepted:r,...o}={})=>{let s=c.chatStoreInstance.getState(),l=s.bot,u=s.sessionListMap.chat,h=s.chatDetail?.chats,m=P===T.EChatInputType.AI_CHAT&&(h?.length??0)>1,f=s.chatDetail?b(s.chatDetail):[],g=m&&h?h:[f.find(e=>e.chatInfo.id===t.chatId)],C=s.historyList.find(e=>e.id===t.chatId),I=r??(P!==T.EChatInputType.AI_CHAT||t.agentType?void 0:(0,L.createChatRequestTracker)({chatId:t.chatId,modelNames:(0,L.resolveChatTrackModelNames)(g.map(t=>t?t.chatInfo.bot_id:C?.bot_id),[...g.map(t=>t?.bot),C?.bot&&null!=C.bot_id?{id:C.bot_id,name:C.bot.name}:void 0,l,...s.modelListMap[T.EChatInputType.AI_CHAT]]),searchType:s.netWorkType}));Y({location:(0,L.resolveChatRequestPaymentLocation)({agentType:t.agentType,botId:g[0]?.chatInfo.bot_id??C?.bot_id??l?.id,modelCount:g.length}),meta:t.extraData}),S.agentTaskPollingEventBus.emit("updateAgentTaskPolling",{chatId:t.chatId}),R("isPrepareWait",!0);let y=()=>{n.trackEmitter.emit("track-event",{name:"chat_history",id:t.chatId,method:String(+u?.length+1||0),model:l?.name||""})};if(m&&h){let n=h[0].data,r=h.map(e=>{let i=(0,p.resolveComparisonBranchParentQuestionId)(e.data,t.parentQuestionId,n),a=(0,d.createOptimisticSessionId)(),r=(0,d.generateNewSessionItem)({...t,chatId:e.chatInfo.id,parentQuestionId:i},{chatFileList:o.chatFileList,isOffline:s.isOffline,netWorkType:s.netWorkType});return r.id=a,{chatId:e.chatInfo.id,sessionId:a,item:r,parentQuestionId:i}});await i?.(),U(t=>{let e=t.chatDetail?.chats;e&&e.length===r.length&&(r.forEach((t,i)=>{e[i].data.push(t.item)}),(0,d.mirrorRootBranchSessions)(t))}),await Promise.all(r.map((i,n)=>q({...t,chatId:i.chatId,parentQuestionId:i.parentQuestionId,searchType:s.netWorkType||void 0},{...o,sessionId:i.sessionId,historyChatId:t.chatId,onChatRequestAccepted:I,onFirstEvent:0===n?e:void 0,onFinally:()=>{0===c.chatStoreInstance.getState().inFlightChatFetchCount&&(a?.(),y())}})));return}await q({...t,searchType:s.netWorkType||void 0},{onChatRequestAccepted:I,onFirstEvent:()=>{e?.(),P!==T.EChatInputType.AI_CHAT&&R("isPrepareWait",!1)},onBeforeFetch:()=>{i?.(),B([...u,(0,d.generateNewSessionItem)(t,{chatFileList:o.chatFileList,isOffline:s.isOffline,netWorkType:s.netWorkType})],"chat")},onFinally:()=>{a?.(),P!==T.EChatInputType.AI_CHAT&&R("isPrepareWait",!1),y()},...o})}),K=(0,I.useChatContainerContext)(t=>t.containerKey),V=(0,i.useMemoizedFn)(async({chatType:t,question:i="",isSimilarStyle:a,reference:u,...h},{onCreateChat:d,clearSessionListOnBeforeCreate:p,onAfterRouter:m,...g}={})=>{let C=c.chatStoreInstance.getState(),I=C.bot;p&&B([],"chat"),R("isPrepareWait",!0);let E=z(i,g?.chatFileList,u?.name),w=h.botIds?[...new Set(h.botIds)]:[h.botId];Y({location:(0,L.resolveChatRequestPaymentLocation)({agentType:h.agentType,botId:w[0]??I?.id,modelCount:w.length}),meta:h.extraData});let{data:v}=await (0,r.tryCatchAsync)(()=>O({title:E,...h}));if(!v||!("id"in v)||!v.id){R("isPrepareWait",!1),R("isChatLoading",!1);return}let A=h.agentType?void 0:(0,L.createChatRequestTracker)({chatId:v.id,modelNames:(0,L.resolveChatTrackModelNames)(w,[h.bot,I,...C.modelListMap[T.EChatInputType.AI_CHAT],...C.chatDetail?b(C.chatDetail).map(t=>t.bot):[]]),searchType:c.chatStoreInstance.getState().netWorkType});if(A)A();else if(h.agentType){let t,e=h?.extraData?.slidesMode||void 0,r=h.agentType;r===s.EAgentType.AI_SLIDES&&(t=e===s.ESlidesMode.NANO_BANANA_PRO?"nano_banana_pro":"standard"),n.trackEmitter.emit("track-event",{id:v.id,name:"start_task",type:(0,l.normalizeOperationType)(r)??r,meta:{question:i,reference:u,...h},field2:a?"use_create_similar":"notuse_create_similar",...t?{model:t}:{}})}let{id:S,answer:x,relatedQuestions:M}=v;d?.(S);let N=(0,f.getQueryObject)(),P=t?(0,_.getAgentParamFromChatType)(t):null;K!==y.ChatContainerKeys.HixChat&&P&&(N.agent=P),await j({pathname:`${o.URLS.HIXChat.home}/${S}`,query:(0,e.default)(N,["utm_source","utm_medium","utm_operator","utm_campaign","agent"])},{replace:!!h.shareId,chatType:t}),m?.();let D=c.chatStoreInstance.getState().bot;k({bot:D,id:S,title:g.historyTitle||E,user_id:"",created_date:new Date,bot_id:D?.id||null,agent_type:h.agentType||null,extra_data:h.extraData||null});let H="chats"in v&&Array.isArray(v.chats)?v.chats:void 0;if(H&&H.length>1){let t=c.chatStoreInstance.getState().modelListMap[T.EChatInputType.AI_CHAT],e=c.chatStoreInstance.getState().chatDetail,i=F({created:H,existingShareBranches:h.shareId&&e?b(e):void 0,modelList:t});U(t=>{let e=i[0];t.chatDetail={...t.chatDetail??{},bot:e.bot,data:e.data,chatInfo:e.chatInfo,chats:i},t.sessionListMap.chat=e.data})}x||await $({question:i,chatId:S,answer:x,relatedQuestions:M,agentType:h.agentType,extraData:h.extraData,isSimilarStyle:a,reference:u},{...g,onChatRequestAccepted:A})}),Q=(0,i.useMemoizedFn)(async t=>
1{let e=c.chatStoreInstance.getState(),i=(e.chatDetail?b(e.chatDetail):[]).find(e=>e.chatInfo.id===t.chatId),a=e.historyList.find(e=>e.id===t.chatId),n=e.chatDetail?.chats?.[0]?.chatInfo.id??x??t.chatId;Y({location:(0,L.resolveChatRequestPaymentLocation)({agentType:t.agentType,botId:i?.chatInfo.bot_id??a?.bot_id??e.bot?.id,modelCount:1}),meta:t.extraData});let r=P!==T.EChatInputType.AI_CHAT||t.agentType?void 0:(0,L.createChatRequestTracker)({chatId:n,modelNames:(0,L.resolveChatTrackModelNames)([i?i.chatInfo.bot_id:a?.bot_id],[i?.bot,a?.bot&&null!=a.bot_id?{id:a.bot_id,name:a.bot.name}:void 0,e.bot,...e.modelListMap[T.EChatInputType.AI_CHAT]]),searchType:t.searchType}),o=(0,d.generateNewAnswerItem)(t);c.chatStoreInstance.setState(e=>{let i=(0,d.getSession)(e,t.parentId,t.chatId);i&&(i.isStream=!0,i.answers.push(o))}),await q(t,{sessionId:t.parentId,chatFileList:t?.fileUrls?.map(t=>(0,C.getFileItem)({name:t,url:t})),historyChatId:n,onChatRequestAccepted:r})});return{fetchChatAction:q,createAndSendNewChat:V,sendNewSession:$,regenerateSession:Q,stopChat:W,resetState:G}}],547123)},12195,891591,t=>{"use strict";function e(t){return null===t.parent_question_id||void 0===t.parent_question_id}t.s(["resolveComparisonBranchParentQuestionId",0,function(t,i,a){if("number"!=typeof i)return;let n=function(t,e){let i=t.find(t=>t.id===e||t.parent_question_id===e);if(i)return i.parent_question_id??i.id}(a,i);if(null==n)return i;let r=a.filter(e),o=t.filter(e),s=r.findIndex(t=>t.id===n),l=s>=0?o[s]:void 0;return l?.id??i}],12195);var i=t.i(881598),a=t.i(411011);t.s(["resolveHistoryItemForTopPlacement",0,function(t){let{threadId:e,chatId:n,historyList:r,chatDetail:o,chatInfo:s,fallbackHistoryItem:l}=t,c=r.find(t=>t.id===e);return c||(e!==n||"string"!=typeof s?.title?l:(0,a.withChatOperationTrack)({id:e,title:s.title,user_id:"",created_date:new Date,bot:o?.bot??null,bot_id:s.bot_id??o?.bot?.id??null,agent_type:o?.data[0]?.content?.agentType??l.agent_type??i.EAgentType.GENERAL_AGENT,extra_data:s.extra_data}))}],891591)}]);

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.