(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,903224,e=>{"use strict";var t=e.i(942347);let n={};function r(e,r){let s=t.useRef(n);return s.current===n&&(s.current=e(r)),s}e.s(["useRefWithInit",()=>r])},804849,e=>{"use strict";var t=e.i(942347);let n="u">typeof document?t.useLayoutEffect:()=>{};e.s(["useIsoLayoutEffect",0,n])},462902,e=>{"use strict";let t=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;rs.searchParams.append("args[]",e)),`Base UI error #${e}; visit ${s} for the full message.`};e.s(["default",0,t])},887642,e=>{"use strict";var t=e.i(942347),n=e.i(903224);let r=t[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],s=r&&r!==t.useLayoutEffect?r:e=>e();function o(e){let t=(0,n.useRefWithInit)(i).current;return t.next=e,s(t.effect),t.trampoline}function i(){let e={next:void 0,callback:a,trampoline:function(){for(var t=arguments.length,n=Array(t),r=0;r{e.callback=e.next}};return e}function a(){}e.s(["useStableCallback",()=>o])},954588,e=>{"use strict";function t(){}let n=Object.freeze([]),r=Object.freeze({});e.s(["EMPTY_ARRAY",0,n,"EMPTY_OBJECT",0,r,"NOOP",()=>t])},422556,e=>{"use strict";let t=parseInt(e.i(942347).version,10);function n(e){return t>=e}e.s(["isReactVersionAtLeast",()=>n])},362891,e=>{"use strict";var t=e.i(903224);function n(e,n,r,i){var a,l,c,u,f;let d=(0,t.useRefWithInit)(s).current;return a=d,l=e,c=n,u=r,f=i,(a.refs[0]!==l||a.refs[1]!==c||a.refs[2]!==u||a.refs[3]!==f)&&o(d,[e,n,r,i]),d.callback}function r(e){var n,r;let i=(0,t.useRefWithInit)(s).current;return n=i,r=e,(n.refs.length!==r.length||n.refs.some((e,t)=>e!==r[t]))&&o(i,e),i.callback}function s(){return{callback:null,cleanup:null,refs:[]}}function o(e,t){if(e.refs=t,t.every(e=>null==e)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),null!=n){let r=Array(t.length).fill(null);for(let e=0;e{for(let e=0;en,"useMergedRefsN",()=>r])},231610,e=>{"use strict";var t=e.i(942347),n=e.i(422556);function r(e){if(!t.isValidElement(e))return null;let r=e.props;return((0,n.isReactVersionAtLeast)(19)?r?.ref:e.ref)??null}e.s(["getReactElementRef",()=>r])},338530,e=>{"use strict";function t(e,t){return e&&!t?e:!e&&t?t:e||t?{...e,...t}:void 0}e.s(["mergeObjects",()=>t])},461903,417914,485486,923252,e=>{"use strict";function t(){for(var e=arguments.length,t=Array(e),n=0;nt],461903),e.s(["getStateAttributesProps",()=>n],417914),e.s(["resolveClassName",()=>r],485486),e.s(["resolveStyle",()=>s],923252)},565455,e=>{"use strict";var t=e.i(338530);let n={};function r(e,t,r,s,i){let l={...a(e,n)};return t&&(l=o(l,t)),r&&(l=o(l,r)),s&&(l=o(l,s)),i&&(l=o(l,i)),l}function s(e){if(0===e.length)return n;if(1===e.length)return a(e[0],n);let t={...a(e[0],n)};for(let n=1;n=65&&s<=90&&("function"==typeof t||void 0===t)}(r,s)?e[r]=s:e[r]=function(e,t){return t?e?n=>{var r;if(null!=(r=n)&&"object"==typeof r&&"nativeEvent"in r){l(n);let r=t(n);return n.baseUIHandlerPrevented||e?.(n),r}let s=t(n);return e?.(n),s}:t:e}(e[r],s)}}return e}(e,n)}function i(e){return"function"==typeof e}function a(e,t){return i(e)?e(t):e??n}function l(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function c(e,t){return t?e?t+" "+e:t:e}e.s(["makeEventPreventable",()=>l,"mergeClassNames",()=>c,"mergeProps",()=>r,"mergePropsN",()=>s])},581263,e=>{"use strict";var t=e.i(462902),n=e.i(942347),r=e.i(362891),s=e.i(231610),o=e.i(338530);e.i(461903);var i=e.i(417914),a=e.i(485486),l=e.i(923252),c=e.i(565455),u=e.i(954588);function f(e,f){let p=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},m=f.render,y=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{className:n,style:f,render:d}=e,{state:p=u.EMPTY_OBJECT,ref:m,props:y,stateAttributesMapping:v,enabled:b=!0}=t,g=b?(0,a.resolveClassName)(n,p):void 0,h=b?(0,l.resolveStyle)(f,p):void 0,x=b?(0,i.getStateAttributesProps)(p,v):u.EMPTY_OBJECT,w=b?(0,o.mergeObjects)(x,Array.isArray(y)?(0,c.mergePropsN)(y):y)??u.EMPTY_OBJECT:u.EMPTY_OBJECT;return("u">typeof document&&(b?Array.isArray(m)?w.ref=(0,r.useMergedRefsN)([w.ref,(0,s.getReactElementRef)(d),...m]):w.ref=(0,r.useMergedRefs)(w.ref,(0,s.getReactElementRef)(d),m):(0,r.useMergedRefs)(null,null)),b)?(void 0!==g&&(w.className=(0,c.mergeClassNames)(w.className,g)),void 0!==h&&(w.style=(0,o.mergeObjects)(w.style,h)),w):u.EMPTY_OBJECT}(f,p);return!1===p.enabled?null:function(e,r,s,o){if(r){if("function"==typeof r)return r(s,o);let e=(0,c.mergeProps)(s,r.props);e.ref=s.ref;let t=r;return t?.$$typeof===d&&(t=n.Children.toArray(r)[0]),n.cloneElement(t,e)}if(e&&"string"==typeof e){var i,a;return i=e,a=s,"button"===i?(0,n.createElement)("button",{type:"button",...a,key:a.key}):"img"===i?(0,n.createElement)("img",{alt:"",...a,key:a.key}):n.createElement(i,a)}throw Error((0,t.default)(8))}(e,m,y,p.state??u.EMPTY_OBJECT)}let d=Symbol.for("react.lazy");e.s(["useRenderElement",()=>f])},92615,e=>{"use strict";let t;function n(){return"u">typeof window}function r(e){return i(e)?(e.nodeName||"").toLowerCase():"#document"}function s(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function o(e){var t;return null==(t=(i(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function i(e){return!!n()&&(e instanceof Node||e instanceof s(e).Node)}function a(e){return!!n()&&(e instanceof Element||e instanceof s(e).Element)}function l(e){return!!n()&&(e instanceof HTMLElement||e instanceof s(e).HTMLElement)}function c(e){return!(!n()||"u"!!e&&"none"!==e;function v(e){let t=a(e)?x(e):e;return y(t.transform)||y(t.translate)||y(t.scale)||y(t.rotate)||y(t.perspective)||!g()&&(y(t.backdropFilter)||y(t.filter))||p.test(t.willChange||"")||m.test(t.contain||"")}function b(e){let t=k(e);for(;l(t)&&!h(t);){if(v(t))return t;if(d(t))break;t=k(t)}return null}function g(){return null==t&&(t="u">typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),t}function h(e){return/^(html|body|#document)$/.test(r(e))}function x(e){return s(e).getComputedStyle(e)}function w(e){return a(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function k(e){if("html"===r(e))return e;let t=e.assignedSlot||e.parentNode||c(e)&&e.host||o(e);return c(t)?t.host:t}function j(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}e.s(["getComputedStyle",()=>x,"getContainingBlock",()=>b,"getDocumentElement",()=>o,"getFrameElement",()=>j,"getNodeName",()=>r,"getNodeScroll",()=>w,"getOverflowAncestors",()=>function e(t,n,r){var o;void 0===n&&(n=[]),void 0===r&&(r=!0);let i=function e(t){let n=k(t);return h(n)?t.ownerDocument?t.ownerDocument.body:t.body:l(n)&&u(n)?n:e(n)}(t),a=i===(null==(o=t.ownerDocument)?void 0:o.body),c=s(i);if(!a)return n.concat(i,e(i,[],r));{let t=j(c);return n.concat(c,c.visualViewport||[],u(i)?i:[],t&&r?e(t):[])}},"getParentNode",()=>k,"getWindow",()=>s,"isContainingBlock",()=>v,"isElement",()=>a,"isHTMLElement",()=>l,"isLastTraversableNode",()=>h,"isNode",()=>i,"isOverflowElement",()=>u,"isShadowRoot",()=>c,"isTableElement",()=>f,"isTopLayer",()=>d,"isWebKit",()=>g])},804730,e=>{e.v({name:"dify-web",type:"module",version:"1.13.2",private:!0,packageManager:"pnpm@10.32.1",imports:{"#i18n":{"react-server":"./i18n-config/lib.server.ts",default:"./i18n-config/lib.client.ts"}},browserslist:["last 1 Chrome version","last 1 Firefox version","last 1 Edge version","last 1 Safari version","iOS >=15","Android >= 10","and_chr >= 126","and_ff >= 137","and_uc >= 15.5","and_qq >= 14.9"],engines:{node:"^22.22.1"},scripts:{analyze:"next experimental-analyze","analyze-component":"node ./scripts/analyze-component.js",build:"next build","build:vinext":"vinext build",dev:"next dev","dev:inspect":"next dev --inspect","dev:proxy":"tsx ./scripts/dev-hono-proxy.ts","dev:vinext":"vinext dev","gen-doc-paths":"tsx ./scripts/gen-doc-paths.ts","gen-icons":"node ./scripts/gen-icons.mjs && eslint --fix app/components/base/icons/src/","i18n:check":"tsx ./scripts/check-i18n.js",knip:"knip",lint:"eslint --cache --concurrency=auto","lint:ci":"eslint --cache --concurrency 2","lint:fix":"pnpm lint --fix","lint:quiet":"pnpm lint --quiet","lint:tss":"tsslint --project tsconfig.json",preinstall:"npx only-allow pnpm",prepare:"cd ../ && node -e \"if (process.env.NODE_ENV !== 'production'){process.exit(1)} \" || husky ./web/.husky","refactor-component":"node ./scripts/refactor-component.js",start:"node ./scripts/copy-and-start.mjs","start:vinext":"vinext start",storybook:"storybook dev -p 6006","storybook:build":"storybook build",test:"vp test","test:coverage":"vp test --coverage","test:watch":"vp test --watch","type-check":"tsc --noEmit","type-check:tsgo":"tsgo --noEmit","uglify-embed":"node ./bin/uglify-embed"},dependencies:{"@amplitude/analytics-browser":"2.36.4","@amplitude/plugin-session-replay-browser":"1.26.1","@base-ui/react":"1.3.0","@emoji-mart/data":"1.2.1","@floating-ui/react":"0.27.19","@formatjs/intl-localematcher":"0.8.1","@headlessui/react":"2.2.9","@heroicons/react":"2.2.0","@hono/node-server":"1.19.11","@lexical/code":"0.41.0","@lexical/link":"0.41.0","@lexical/list":"0.41.0","@lexical/react":"0.41.0","@lexical/selection":"0.41.0","@lexical/text":"0.41.0","@lexical/utils":"0.41.0","@monaco-editor/react":"4.7.0","@octokit/core":"7.0.6","@octokit/request-error":"7.1.0","@orpc/client":"1.13.6","@orpc/contract":"1.13.6","@orpc/openapi-client":"1.13.6","@orpc/tanstack-query":"1.13.6","@remixicon/react":"4.9.0","@sentry/react":"10.43.0","@streamdown/math":"1.0.2","@svgdotjs/svg.js":"3.2.5","@t3-oss/env-nextjs":"0.13.10","@tailwindcss/typography":"0.5.19","@tanstack/react-form":"1.28.5","@tanstack/react-query":"5.90.21",abcjs:"6.6.2",ahooks:"3.9.6","class-variance-authority":"0.7.1",clsx:"2.1.1",cmdk:"1.1.1","copy-to-clipboard":"3.3.3","cron-parser":"5.5.0",dayjs:"1.11.20","decimal.js":"10.6.0",dompurify:"3.3.3",echarts:"6.0.0","echarts-for-react":"3.0.6",elkjs:"0.11.1","embla-carousel-autoplay":"8.6.0","embla-carousel-react":"8.6.0","emoji-mart":"5.6.0","es-toolkit":"1.45.1","fast-deep-equal":"3.1.3",foxact:"0.2.54",hono:"4.12.7","html-entities":"2.6.0","html-to-image":"1.11.13",i18next:"25.8.18","i18next-resources-to-backend":"1.2.1",immer:"11.1.4",jotai:"2.18.1","js-audio-recorder":"1.0.7","js-cookie":"3.0.5","js-yaml":"4.1.1",jsonschema:"1.5.0",katex:"0.16.38",ky:"1.14.3",lamejs:"1.2.1",lexical:"0.41.0",mermaid:"11.13.0",mime:"4.1.0",mitt:"3.0.1",negotiator:"1.0.0",next:"16.1.6","next-themes":"0.4.6",nuqs:"2.8.9","pinyin-pro":"3.28.0","qrcode.react":"4.2.0",qs:"6.15.0",react:"19.2.4","react-18-input-autosize":"3.0.0","react-dom":"19.2.4","react-easy-crop":"5.5.6","react-hotkeys-hook":"5.2.4","react-i18next":"16.5.8","react-multi-email":"1.0.25","react-papaparse":"4.4.0","react-pdf-highlighter":"8.0.0-rc.0","react-slider":"2.0.6","react-sortablejs":"6.1.4","react-syntax-highlighter":"15.6.6","react-textarea-autosize":"8.5.9","react-window":"1.8.11",reactflow:"11.11.4","remark-breaks":"4.0.0","remark-directive":"4.0.0",scheduler:"0.27.0",semver:"7.7.4",sharp:"0.34.5",sortablejs:"1.15.7",streamdown:"2.4.0","string-ts":"2.3.1","tailwind-merge":"2.6.1",tldts:"7.0.25","unist-util-visit":"5.1.0","use-context-selector":"2.0.0",uuid:"13.0.0",zod:"4.3.6",zundo:"2.3.0",zustand:"5.0.11"},devDependencies:{"@antfu/eslint-config":"7.7.2","@chromatic-com/storybook":"5.0.1","@egoist/tailwindcss-icons":"1.9.2","@eslint-react/eslint-plugin":"2.13.0","@iconify-json/heroicons":"1.2.3","@iconify-json/ri":"1.2.10","@mdx-js/loader":"3.1.1","@mdx-js/react":"3.1.1","@mdx-js/rollup":"3.1.1","@next/eslint-plugin-next":"16.1.6","@next/mdx":"16.1.6","@rgrove/parse-xml":"4.2.0","@storybook/addon-docs":"10.2.17","@storybook/addon-links":"10.2.17","@storybook/addon-onboarding":"10.2.17","@storybook/addon-themes":"10.2.17","@storybook/nextjs-vite":"10.2.17","@storybook/react":"10.2.17","@tanstack/eslint-plugin-query":"5.91.4","@tanstack/react-devtools":"0.9.13","@tanstack/react-form-devtools":"0.2.18","@tanstack/react-query-devtools":"5.91.3","@testing-library/dom":"10.4.1","@testing-library/jest-dom":"6.9.1","@testing-library/react":"16.3.2","@testing-library/user-event":"14.6.1","@tsslint/cli":"3.0.2","@tsslint/compat-eslint":"3.0.2","@tsslint/config":"3.0.2","@types/js-cookie":"3.0.6","@types/js-yaml":"4.0.9","@types/negotiator":"0.6.4","@types/node":"25.5.0","@types/postcss-js":"4.1.0","@types/qs":"6.15.0","@types/react":"19.2.14","@types/react-dom":"19.2.3","@types/react-slider":"1.3.6","@types/react-syntax-highlighter":"15.5.13","@types/react-window":"1.8.8","@types/semver":"7.7.1","@types/sortablejs":"1.15.9","@typescript-eslint/parser":"8.57.0","@typescript/native-preview":"7.0.0-dev.20260312.1","@vitejs/plugin-react":"6.0.0","@vitejs/plugin-rsc":"0.5.21","@vitest/coverage-v8":"4.1.0","@voidzero-dev/vite-plus-core":"0.1.11",agentation:"2.3.2",autoprefixer:"10.4.27","code-inspector-plugin":"1.4.4",eslint:"10.0.3","eslint-plugin-better-tailwindcss":"4.3.2","eslint-plugin-hyoban":"0.14.1","eslint-plugin-react-hooks":"7.0.1","eslint-plugin-react-refresh":"0.5.2","eslint-plugin-sonarjs":"4.0.2","eslint-plugin-storybook":"10.2.17",husky:"9.1.7","iconify-import-svg":"0.1.2",jsdom:"28.1.0","jsdom-testing-mocks":"1.16.0",knip:"5.86.0","lint-staged":"16.3.3",nock:"14.0.11",postcss:"8.5.8","postcss-js":"5.1.0","react-server-dom-webpack":"19.2.4",sass:"1.98.0",storybook:"10.2.17",tailwindcss:"3.4.19",taze:"19.10.0",tsx:"4.21.0",typescript:"5.9.3","uglify-js":"3.19.3",vinext:"https://pkg.pr.new/vinext@18fe3ea",vite:"npm:@voidzero-dev/vite-plus-core@0.1.11","vite-plugin-inspect":"11.3.3","vite-plus":"0.1.11",vitest:"npm:@voidzero-dev/vite-plus-test@0.1.11","vitest-canvas-mock":"1.1.3"},pnpm:{overrides:{"@lexical/code":"npm:lexical-code-no-prism@0.41.0","@monaco-editor/loader":"1.7.0","@nolyfill/safe-buffer":"npm:safe-buffer@^5.2.1","array-includes":"npm:@nolyfill/array-includes@^1.0.44","array.prototype.findlast":"npm:@nolyfill/array.prototype.findlast@^1.0.44","array.prototype.findlastindex":"npm:@nolyfill/array.prototype.findlastindex@^1.0.44","array.prototype.flat":"npm:@nolyfill/array.prototype.flat@^1.0.44","array.prototype.flatmap":"npm:@nolyfill/array.prototype.flatmap@^1.0.44","array.prototype.tosorted":"npm:@nolyfill/array.prototype.tosorted@^1.0.44",assert:"npm:@nolyfill/assert@^1.0.26","brace-expansion@<2.0.2":"2.0.2",canvas:"^3.2.1","devalue@<5.3.2":"5.3.2","dompurify@>=3.1.3,<=3.3.1":"3.3.2","es-iterator-helpers":"npm:@nolyfill/es-iterator-helpers@^1.0.21","esbuild@<0.27.2":"0.27.2","glob@>=10.2.0,<10.5.0":"11.1.0",hasown:"npm:@nolyfill/hasown@^1.0.44","is-arguments":"npm:@nolyfill/is-arguments@^1.0.44","is-core-module":"npm:@nolyfill/is-core-module@^1.0.39","is-generator-function":"npm:@nolyfill/is-generator-function@^1.0.44","is-typed-array":"npm:@nolyfill/is-typed-array@^1.0.44",isarray:"npm:@nolyfill/isarray@^1.0.44","object.assign":"npm:@nolyfill/object.assign@^1.0.44","object.entries":"npm:@nolyfill/object.entries@^1.0.44","object.fromentries":"npm:@nolyfill/object.fromentries@^1.0.44","object.groupby":"npm:@nolyfill/object.groupby@^1.0.44","object.values":"npm:@nolyfill/object.values@^1.0.44",pbkdf2:"~3.1.5","pbkdf2@<3.1.3":"3.1.3",prismjs:"~1.30","prismjs@<1.30.0":"1.30.0","rollup@>=4.0.0,<4.59.0":"4.59.0","safe-buffer":"^5.2.1","safe-regex-test":"npm:@nolyfill/safe-regex-test@^1.0.44","safer-buffer":"npm:@nolyfill/safer-buffer@^1.0.44","side-channel":"npm:@nolyfill/side-channel@^1.0.44","solid-js":"1.9.11","string-width":"~8.2.0","string.prototype.includes":"npm:@nolyfill/string.prototype.includes@^1.0.44","string.prototype.matchall":"npm:@nolyfill/string.prototype.matchall@^1.0.44","string.prototype.repeat":"npm:@nolyfill/string.prototype.repeat@^1.0.44","string.prototype.trimend":"npm:@nolyfill/string.prototype.trimend@^1.0.44","svgo@>=3.0.0,<3.3.3":"3.3.3","tar@<=7.5.10":"7.5.11","typed-array-buffer":"npm:@nolyfill/typed-array-buffer@^1.0.44","undici@>=7.0.0,<7.24.0":"7.24.0",vite:"npm:@voidzero-dev/vite-plus-core@0.1.11",vitest:"npm:@voidzero-dev/vite-plus-test@0.1.11","which-typed-array":"npm:@nolyfill/which-typed-array@^1.0.44","yauzl@<3.2.1":"3.2.1"},ignoredBuiltDependencies:["canvas","core-js-pure"],onlyBuiltDependencies:["@parcel/watcher","esbuild","sharp"]},"lint-staged":{"*":"eslint --fix --pass-on-unpruned-suppressions"}})},137667,734962,e=>{"use strict";var t=e.i(162115),n=e.i(220365),r=e.i(942347),s=e.i(27193),o=e.i(654313),i=e.i(935139),a=e.i(339548);let l=(0,a.createContext)({}),c=()=>(0,a.useContext)(l);e.s(["ToastContext",0,l,"useToastContext",0,c],734962);let u=e=>{let{type:n="info",size:r="md",message:s,children:a,className:l,customComponent:u}=e,{close:f}=c();return"string"!=typeof s?null:(0,t.jsxs)("div",{className:(0,i.cn)(l,"fixed z-[9999] mx-8 my-4 w-[360px] grow overflow-hidden rounded-xl","border border-components-panel-border-subtle bg-components-panel-bg-blur shadow-sm","top-0","right-0","md"===r?"p-3":"p-2",l),children:[(0,t.jsx)("div",{className:(0,i.cn)("absolute inset-0 -z-10 opacity-40","success"===n&&"bg-toast-success-bg","warning"===n&&"bg-toast-warning-bg","error"===n&&"bg-toast-error-bg","info"===n&&"bg-toast-info-bg")}),(0,t.jsxs)("div",{className:(0,i.cn)("flex","md"===r?"gap-1":"gap-0.5"),children:[(0,t.jsxs)("div",{className:(0,i.cn)("flex items-center justify-center","md"===r?"p-0.5":"p-1"),children:["success"===n&&(0,t.jsx)("span",{className:(0,i.cn)("i-ri-checkbox-circle-fill","text-text-success","md"===r?"h-5 w-5":"h-4 w-4"),"data-testid":"toast-icon-success","aria-hidden":"true"}),"error"===n&&(0,t.jsx)("span",{className:(0,i.cn)("i-ri-error-warning-fill","text-text-destructive","md"===r?"h-5 w-5":"h-4 w-4"),"data-testid":"toast-icon-error","aria-hidden":"true"}),"warning"===n&&(0,t.jsx)("span",{className:(0,i.cn)("i-ri-alert-fill","text-text-warning-secondary","md"===r?"h-5 w-5":"h-4 w-4"),"data-testid":"toast-icon-warning","aria-hidden":"true"}),"info"===n&&(0,t.jsx)("span",{className:(0,i.cn)("i-ri-information-2-fill","text-text-accent","md"===r?"h-5 w-5":"h-4 w-4"),"data-testid":"toast-icon-info","aria-hidden":"true"})]}),(0,t.jsxs)("div",{className:(0,i.cn)("flex grow flex-col items-start gap-1 py-1","md"===r?"px-1":"px-0.5"),children:[(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)("div",{className:"text-text-primary system-sm-semibold [word-break:break-word]",children:s}),u]}),!!a&&(0,t.jsx)("div",{className:"text-text-secondary system-xs-regular",children:a})]}),f&&(0,t.jsx)(o.default,{"data-testid":"toast-close-button",className:"z-[1000]",onClick:f,children:(0,t.jsx)("span",{className:"i-ri-close-line h-4 w-4 shrink-0 text-text-tertiary"})})]})]})};u.notify=e=>{let{type:r,size:o="md",message:i,duration:a,className:c,customComponent:f,onClose:d}=e,p="success"===r||"info"===r?3e3:6e3,m={};{let e=document.createElement("div"),y=(0,s.createRoot)(e);m.clear=()=>{e&&(y.unmount(),e.remove()),d?.()},y.render((0,t.jsx)(l.Provider,{value:{notify:n.noop,close:()=>{e&&(y.unmount(),e.remove()),d?.()}},children:(0,t.jsx)(u,{type:r,size:o,message:i,duration:a,className:c,customComponent:f})})),document.body.appendChild(e);let v=a??p;v>0&&setTimeout(m.clear,v)}return m},e.s(["ToastProvider",0,e=>{let{children:n}=e,[s,o]=r.useState({type:"info",message:"Toast message",duration:6e3}),i="success"===s.type||"info"===s.type?3e3:6e3,[a,c]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{a&&setTimeout(()=>{c(!1)},s.duration||i)},[i,a,s.duration]),(0,t.jsxs)(l.Provider,{value:{notify:e=>{c(!0),o(e)},close:()=>c(!1)},children:[a&&(0,t.jsx)(u,{...s}),n]})},"default",0,u],137667)},7284,e=>{"use strict";function t(){for(var e,t,n=0,r="",s=arguments.length;nt,"default",0,t])},294237,e=>{"use strict";var t=e.i(7284);let n=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,r=t.clsx;e.s(["cva",0,(e,t)=>s=>{var o;if((null==t?void 0:t.variants)==null)return r(e,null==s?void 0:s.class,null==s?void 0:s.className);let{variants:i,defaultVariants:a}=t,l=Object.keys(i).map(e=>{let t=null==s?void 0:s[e],r=null==a?void 0:a[e];if(null===t)return null;let o=n(t)||n(r);return i[e][o]}),c=s&&Object.entries(s).reduce((e,t)=>{let[n,r]=t;return void 0===r||(e[n]=r),e},{});return r(e,l,null==t||null==(o=t.compoundVariants)?void 0:o.reduce((e,t)=>{let{class:n,className:r,...s}=t;return Object.entries(s).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...a,...c}[t]):({...a,...c})[t]===n})?[...e,n,r]:e},[]),null==s?void 0:s.class,null==s?void 0:s.className)}])},220365,e=>{"use strict";function t(){}e.s(["noop",()=>t])},794138,(e,t,n)=>{"use strict";function r(e,t){var n=e.length;for(e.push(t);0>>1,s=e[r];if(0>>1;ri(l,n))ci(u,l)?(e[r]=u,e[c]=n,r=c):(e[r]=l,e[a]=n,r=a);else if(ci(u,n))e[r]=u,e[c]=n,r=c;else break}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if(n.unstable_now=void 0,"object"==typeof performance&&"function"==typeof performance.now){var a,l=performance;n.unstable_now=function(){return l.now()}}else{var c=Date,u=c.now();n.unstable_now=function(){return c.now()-u}}var f=[],d=[],p=1,m=null,y=3,v=!1,b=!1,g=!1,h=!1,x="function"==typeof setTimeout?setTimeout:null,w="function"==typeof clearTimeout?clearTimeout:null,k="u">typeof setImmediate?setImmediate:null;function j(e){for(var t=s(d);null!==t;){if(null===t.callback)o(d);else if(t.startTime<=e)o(d),t.sortIndex=t.expirationTime,r(f,t);else break;t=s(d)}}function E(e){if(g=!1,j(e),!b)if(null!==s(f))b=!0,T||(T=!0,a());else{var t=s(d);null!==t&&O(E,t.startTime-e)}}var T=!1,_=-1,C=5,N=-1;function P(){return!!h||!(n.unstable_now()-Ne&&P());){var i=m.callback;if("function"==typeof i){m.callback=null,y=m.priorityLevel;var l=i(m.expirationTime<=e);if(e=n.unstable_now(),"function"==typeof l){m.callback=l,j(e),t=!0;break t}m===s(f)&&o(f),j(e)}else o(f);m=s(f)}if(null!==m)t=!0;else{var c=s(d);null!==c&&O(E,c.startTime-e),t=!1}}break e}finally{m=null,y=r,v=!1}}}finally{t?a():T=!1}}}if("function"==typeof k)a=function(){k(A)};else if("u">typeof MessageChannel){var R=new MessageChannel,S=R.port2;R.port1.onmessage=A,a=function(){S.postMessage(null)}}else a=function(){x(A,0)};function O(e,t){_=x(function(){e(n.unstable_now())},t)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(e){e.callback=null},n.unstable_forceFrameRate=function(e){0>e||125i?(e.sortIndex=o,r(d,e),null===s(f)&&e===s(d)&&(g?(w(_),_=-1):g=!0,O(E,o-i))):(e.sortIndex=l,r(f,e),b||v||(b=!0,T||(T=!0,a()))),e},n.unstable_shouldYield=P,n.unstable_wrapCallback=function(e){var t=y;return function(){var n=y;y=t;try{return e.apply(this,arguments)}finally{y=n}}}},488440,(e,t,n)=>{"use strict";t.exports=e.r(794138)},339548,e=>{"use strict";var t=e.i(942347),n=e.i(488440);let r=Symbol(),s=Symbol(),o="u"{try{(0,n.unstable_runWithPriority)(n.unstable_NormalPriority,e)}catch(t){if("Not implemented."===t.message)e();else throw t}}:e=>e(),a=e=>e;function l(e){var n;let a=(0,t.createContext)({[r]:{v:{current:e},n:{current:-1},l:new Set,u:e=>e()}});return a[s]=a.Provider,n=a.Provider,a.Provider=e=>{let{value:s,children:a}=e,l=(0,t.useRef)(s),c=(0,t.useRef)(0),[u,f]=(0,t.useState)(null);u&&(u(s),f(null));let d=(0,t.useRef)();if(!d.current){let e=new Set;d.current={[r]:{v:l,n:c,l:e,u:(t,n)=>{c.current+=1;let r={n:c.current};(null==n?void 0:n.suspense)&&(r.n*=-1,r.p=new Promise(e=>{f(()=>t=>{r.v=t,delete r.p,e(t)})})),e.forEach(e=>e(r)),t()}}}}return o(()=>{l.current=s,c.current+=1,i(()=>{d.current[r].l.forEach(e=>{e({n:c.current,v:s})})})},[s]),(0,t.createElement)(n,{value:d.current},a)},delete a.Consumer,a}function c(e,n){let{v:{current:s},n:{current:i},l:a}=(0,t.useContext)(e)[r],l=n(s),[c,u]=(0,t.useReducer)((e,t)=>{if(!t)return[s,l];if("p"in t)throw t.p;if(t.n===i)return Object.is(e[1],l)?e:[s,l];try{if("v"in t){if(Object.is(e[0],t.v))return e;let r=n(t.v);if(Object.is(e[1],r))return e;return[t.v,r]}}catch(e){}return[...e]},[s,l]);return Object.is(c[1],l)||u(),o(()=>(a.add(u),()=>{a.delete(u)}),[a]),c[1]}function u(e){return c(e,a)}e.s(["createContext",()=>l,"useContext",()=>u,"useContextSelector",()=>c])},654313,e=>{"use strict";var t,n=e.i(162115),r=e.i(294237),s=e.i(935139),o=((t=o||{}).Destructive="destructive",t.Active="active",t.Disabled="disabled",t.Default="",t.Hover="hover",t);let i=(0,r.cva)("action-btn",{variants:{size:{xs:"action-btn-xs",s:"action-btn-s",m:"action-btn-m",l:"action-btn-l",xl:"action-btn-xl"}},defaultVariants:{size:"m"}}),a=e=>{let{className:t,size:r,state:o="",styleCss:a,children:l,ref:c,disabled:u,...f}=e;return(0,n.jsx)("button",{type:"button",className:(0,s.cn)(i({className:t,size:r}),function(e){switch(e){case"destructive":return"action-btn-destructive";case"active":return"action-btn-active";case"disabled":return"action-btn-disabled";case"hover":return"action-btn-hover";default:return""}}(o),u&&"cursor-not-allowed text-text-disabled hover:bg-transparent hover:text-text-disabled"),disabled:u,ref:c,style:a,...f,children:l})};a.displayName="ActionButton",e.s(["ActionButton",()=>a,"ActionButtonState",()=>o,"default",0,a])},648404,e=>{"use strict";var t,n,r,s,o,i,a,l,c,u=((t={}).light="light",t.dark="dark",t.system="system",t),f=((n={}).chat="chat",n.completion="completion",n.unset="",n),d=((r={}).oneWay="single",r.multiWay="multiple",r),p=((s={}).semantic="semantic_search",s.fullText="full_text_search",s.hybrid="hybrid_search",s.invertedIndex="invertedIndex",s.keywordSearch="keyword_search",s),m=((o={}).COMPLETION="completion",o.WORKFLOW="workflow",o.CHAT="chat",o.ADVANCED_CHAT="advanced-chat",o.AGENT_CHAT="agent-chat",o),y=((i={}).functionCall="function_call",i.react="react",i),v=((a={}).low="low",a.high="high",a),b=((l={}).all="all",l.local_file="local_file",l.remote_url="remote_url",l),g=((c={}).enabled="enabled",c.disabled="disabled",c);e.s(["ALLOW_FILE_EXTENSIONS",0,["png","jpg","jpeg","webp","gif"],"AgentStrategy",()=>y,"AppModeEnum",()=>m,"AppModes",0,["completion","workflow","chat","advanced-chat","agent-chat"],"ModelModeType",()=>f,"RETRIEVE_METHOD",()=>p,"RETRIEVE_TYPE",()=>d,"Resolution",()=>v,"Theme",()=>u,"TransferMethod",()=>b,"TtsAutoPlay",()=>g])}]);